Files
PCAdmissionOfficer/js/dist-play.js
DESKTOP-RQ919RC\Pc 09f25f3649 feat(H5): 调整样式尺寸并添加视频播放功能
- 修改了H5页面的CSS和LESS文件中的尺寸样式
- 添加了新的HTML文件实现视频播放器功能
- 新增WASM文件支持视频解码
2025-08-12 18:49:42 +08:00

749 lines
836 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
(function (global){
"use strict";function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}!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;s<r.length;s++){n(r[s]);}return n;}({1:[function(e,t,i){(function(i,r,n){"use strict";function a(e){return(a="function"==typeof Symbol&&"symbol"==_typeof(Symbol.iterator)?function(e){return _typeof(e);}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof(e);})(e);}var s,o=!0,l=void 0!==l?l:{},f={};for(s in l){l.hasOwnProperty(s)&&(f[s]=l[s]);}var u=[],c="./this.program",h=!1,d=!1,_=!1,p=!1,m=!1;if(h="object"===("undefined"==typeof window?"undefined":a(window)),d="function"==typeof importScripts,p="object"===(void 0===i?"undefined":a(i))&&"object"===a(i.versions)&&"string"==typeof i.versions.node,_=p&&!h&&!d,m=!h&&!_&&!d,l.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var b,v,y,g,w="";function E(e){return l.locateFile?l.locateFile(e,w):w+e;}if(_)w=n+"/",b=function b(t,i){var r;return y||(y=e("fs")),g||(g=e("path")),t=g.normalize(t),r=y.readFileSync(t),i?r:r.toString();},v=function v(e){var t=b(e,!0);return t.buffer||(t=new Uint8Array(t)),N(t.buffer),t;},i.argv.length>1&&(c=i.argv[1].replace(/\\/g,"/")),u=i.argv.slice(2),void 0!==t&&(t.exports=l),i.on("uncaughtException",function(e){if(!(e instanceof la))throw e;}),i.on("unhandledRejection",Ze),l.inspect=function(){return"[Emscripten Module object]";};else if(m)"undefined"!=typeof read&&(b=function b(e){return read(e);}),v=function v(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(N("object"===a(t=read(e,"binary"))),t);},"undefined"!=typeof scriptArgs?u=scriptArgs:void 0!==arguments&&(u=arguments),"function"==typeof quit&&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(!h&&!d)throw new Error("environment detection error");d?w=self.location.href:document.currentScript&&(w=document.currentScript.src),w=0!==w.indexOf("blob:")?w.substr(0,w.lastIndexOf("/")+1):"",b=function b(e){var t=new XMLHttpRequest();return t.open("GET",e,!1),t.send(null),t.responseText;},d&&(v=function v(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 C=l.print||console.log.bind(console),S=l.printErr||console.warn.bind(console);for(s in f){f.hasOwnProperty(s)&&(l[s]=f[s]);}function j(e){N(ye);var t=le[ye>>2],i=t+e+15&-16;return i>Yt()&&Ze("failure to dynamicAlloc - memory growth etc. is not supported there, call malloc/sbrk directly"),le[ye>>2]=i,t;}function T(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 N(t%8==0,"getNativeTypeSize invalid bits "+t+", type "+e),t/8;}return 0;}}function A(e){A.shown||(A.shown={}),A.shown[e]||(A.shown[e]=1,S(e));}f=null,l.arguments&&(u=l.arguments),Object.getOwnPropertyDescriptor(l,"arguments")||Object.defineProperty(l,"arguments",{configurable:!0,get:function get(){Ze("Module.arguments has been replaced with plain arguments_");}}),l.thisProgram&&(c=l.thisProgram),Object.getOwnPropertyDescriptor(l,"thisProgram")||Object.defineProperty(l,"thisProgram",{configurable:!0,get:function get(){Ze("Module.thisProgram has been replaced with plain thisProgram");}}),l.quit&&l.quit,Object.getOwnPropertyDescriptor(l,"quit")||Object.defineProperty(l,"quit",{configurable:!0,get:function get(){Ze("Module.quit has been replaced with plain quit_");}}),N(void 0===l.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),N(void 0===l.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),N(void 0===l.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),N(void 0===l.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),N(void 0===l.read,"Module.read option was removed (modify read_ in JS)"),N(void 0===l.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),N(void 0===l.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),N(void 0===l.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),Object.getOwnPropertyDescriptor(l,"read")||Object.defineProperty(l,"read",{configurable:!0,get:function get(){Ze("Module.read has been replaced with plain read_");}}),Object.getOwnPropertyDescriptor(l,"readAsync")||Object.defineProperty(l,"readAsync",{configurable:!0,get:function get(){Ze("Module.readAsync has been replaced with plain readAsync");}}),Object.getOwnPropertyDescriptor(l,"readBinary")||Object.defineProperty(l,"readBinary",{configurable:!0,get:function get(){Ze("Module.readBinary has been replaced with plain readBinary");}}),sa=aa=na=function na(){Ze("cannot use the stack before compiled code is ready to run, and has provided stack access");};var x={"f64-rem":function f64Rem(e,t){return e%t;},"debugger":function _debugger(){}},M=1,k=new Array(35);function P(e,t){N(void 0!==e);for(var i=0;i<35;i++){if(!k[i])return k[i]=e,M+i;}throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.";}var I,U,R,D=0,O=function O(){return D;};function F(e,t,i,r){switch("*"===(i=i||"i8").charAt(i.length-1)&&(i="i32"),i){case"i1":case"i8":ne[e>>0]=t;break;case"i16":se[e>>1]=t;break;case"i32":le[e>>2]=t;break;case"i64":tt=[t>>>0,(et=t,+Le(et)>=1?et>0?(0|He(+ze(et/4294967296),4294967295))>>>0:~~+Ne((et-+(~~et>>>0))/4294967296)>>>0:0)],le[e>>2]=tt[0],le[e+4>>2]=tt[1];break;case"float":ue[e>>2]=t;break;case"double":ce[e>>3]=t;break;default:Ze("invalid type for setValue: "+i);}}l.wasmBinary&&(I=l.wasmBinary),Object.getOwnPropertyDescriptor(l,"wasmBinary")||Object.defineProperty(l,"wasmBinary",{configurable:!0,get:function get(){Ze("Module.wasmBinary has been replaced with plain wasmBinary");}}),l.noExitRuntime&&(U=l.noExitRuntime),Object.getOwnPropertyDescriptor(l,"noExitRuntime")||Object.defineProperty(l,"noExitRuntime",{configurable:!0,get:function get(){Ze("Module.noExitRuntime has been replaced with plain noExitRuntime");}}),"object"!==("undefined"==typeof WebAssembly?"undefined":a(WebAssembly))&&Ze("No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.");var B=new WebAssembly.Table({initial:4288,element:"anyfunc"}),L=!1;function N(e,t){e||Ze("Assertion failed: "+t);}function z(e){var t=l["_"+e];return N(t,"Cannot call unknown function "+e+", make sure it is exported"),t;}function H(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);J(e,t=na(i),i);}return t;},array:function array(e){var t=na(e.length);return te(e,t),t;}};var s=z(e),o=[],l=0;if(N("array"!==t,'Return type should not be "array".'),r)for(var f=0;f<r.length;f++){var u=a[i[f]];u?(0===l&&(l=sa()),o[f]=u(r[f])):o[f]=r[f];}var c=s.apply(null,o);return c=function(e){return"string"===t?Q(e):"boolean"===t?Boolean(e):e;}(c),0!==l&&aa(l),c;}function V(e,t,i,r){return function(){return H(e,t,i,arguments);};}var Y=0,q=3;function X(e,t,i,r){var n,a;"number"==typeof e?(n=!0,a=e):(n=!1,a=e.length);var s,o="string"==typeof t?t:null;if(s=i==q?r:[ra,na,j][i](Math.max(a,o?1:t.length)),n){var l;for(r=s,N(0==(3&s)),l=s+(-4&a);r<l;r+=4){le[r>>2]=0;}for(l=s+a;r<l;){ne[r++>>0]=0;}return s;}if("i8"===o)return e.subarray||e.slice?ae.set(e,s):ae.set(new Uint8Array(e),s),s;for(var f,u,c,h=0;h<a;){var d=e[h];0!==(f=o||t[h])?(N(f,"Must know what type to store in allocate!"),"i64"==f&&(f="i32"),F(s+h,d,f),c!==f&&(u=T(f),c=f),h+=u):h++;}return s;}function W(e){return Pe?ra(e):j(e);}var G="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function K(e,t,i){for(var r=t+i,n=t;e[n]&&!(n>=r);){++n;}if(n-t>16&&e.subarray&&G)return G.decode(e.subarray(t,n));for(var a="";t<n;){var s=e[t++];if(128&s){var o=63&e[t++];if(192!=(224&s)){var l=63&e[t++];if(224==(240&s)?s=(15&s)<<12|o<<6|l:(240!=(248&s)&&A("Invalid UTF-8 leading byte 0x"+s.toString(16)+" encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!"),s=(7&s)<<18|o<<12|l<<6|63&e[t++]),s<65536)a+=String.fromCharCode(s);else{var f=s-65536;a+=String.fromCharCode(55296|f>>10,56320|1023&f);}}else a+=String.fromCharCode((31&s)<<6|o);}else a+=String.fromCharCode(s);}return a;}function Q(e,t){return e?K(ae,e,t):"";}function Z(e,t,i,r){if(!(r>0))return 0;for(var n=i,a=i+r-1,s=0;s<e.length;++s){var o=e.charCodeAt(s);if(o>=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&&A("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 J(e,t,i){return N("number"==typeof i,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),Z(e,ae,t,i);}function $(e){for(var t=0,i=0;i<e.length;++i){var r=e.charCodeAt(i);r>=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 ee(e){var t=$(e)+1,i=ra(t);return i&&Z(e,ne,i,t),i;}function te(e,t){N(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),ne.set(e,t);}function ie(e,t,i){for(var r=0;r<e.length;++r){N(e.charCodeAt(r)==e.charCodeAt(r)&255),ne[t++>>0]=e.charCodeAt(r);}i||(ne[t>>0]=0);}var re,ne,ae,se,oe,le,fe,ue,ce,he=16384,de=65536;function _e(e,t){return e%t>0&&(e+=t-e%t),e;}function pe(e){re=e,l.HEAP8=ne=new Int8Array(e),l.HEAP16=se=new Int16Array(e),l.HEAP32=le=new Int32Array(e),l.HEAPU8=ae=new Uint8Array(e),l.HEAPU16=oe=new Uint16Array(e),l.HEAPU32=fe=new Uint32Array(e),l.HEAPF32=ue=new Float32Array(e),l.HEAPF64=ce=new Float64Array(e);}var me=1127504,be=6370384,ve=6370384,ye=1127280;N(me%16==0,"stack must start aligned"),N(ve%16==0,"heap must start aligned");var ge=5242880;l.TOTAL_STACK&&N(ge===l.TOTAL_STACK,"the stack size can no longer be determined at runtime");var we=l.TOTAL_MEMORY||1073741824;function Ee(){N(0==(3&be)),fe[(be>>2)-1]=34821223,fe[(be>>2)-2]=2310721022,le[0]=1668509029;}function Ce(){var e=fe[(be>>2)-1],t=fe[(be>>2)-2];34821223==e&&2310721022==t||Ze("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x"+t.toString(16)+" "+e.toString(16)),1668509029!==le[0]&&Ze("Runtime error: The application has corrupted its heap memory area (address zero)!");}function Se(e){Ze("Stack overflow! Attempted to allocate "+e+" bytes on the stack, but stack has only "+(be-sa()+e)+" bytes available!");}function je(e,t){var i="";for(var r in vr){var n=vr[r];n[e]&&(i+='as sig "'+r+'" pointing to function '+n[e]+", ");}Ze("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 Te(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var i=t.func;"number"==typeof i?void 0===t.arg?l.dynCall_v(i):l.dynCall_vi(i,t.arg):i(void 0===t.arg?null:t.arg);}else t();}}Object.getOwnPropertyDescriptor(l,"TOTAL_MEMORY")||Object.defineProperty(l,"TOTAL_MEMORY",{configurable:!0,get:function get(){Ze("Module.TOTAL_MEMORY has been replaced with plain INITIAL_TOTAL_MEMORY");}}),N(we>=ge,"TOTAL_MEMORY should be larger than TOTAL_STACK, was "+we+"! (TOTAL_STACK="+ge+")"),N("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"),(R=l.wasmMemory?l.wasmMemory:new WebAssembly.Memory({initial:we/de}))&&(re=R.buffer),N((we=re.byteLength)%de==0),pe(re),le[ye>>2]=ve,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 Ae=[],xe=[],Me=[],ke=[],Pe=!1,Ie=!1;function Ue(){if(l.preRun)for("function"==typeof l.preRun&&(l.preRun=[l.preRun]);l.preRun.length;){Fe(l.preRun.shift());}Te(Ae);}function Re(){Ce(),N(!Pe),Pe=!0,l.noFSInit||St.init.initialized||St.init(),bt.init(),Te(xe);}function De(){Ce(),St.ignorePermissions=!1,Te(Me);}function Oe(){if(Ce(),l.postRun)for("function"==typeof l.postRun&&(l.postRun=[l.postRun]);l.postRun.length;){Be(l.postRun.shift());}Te(ke);}function Fe(e){Ae.unshift(e);}function Be(e){ke.unshift(e);}N(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),N(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),N(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),N(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 Le=Math.abs,Ne=Math.ceil,ze=Math.floor,He=Math.min,Ve=Math.trunc,Ye=0,qe=null,Xe=null,We={};function Ge(e){for(var t=e;;){if(!We[e])return e;e=t+Math.random();}return e;}function Ke(e){Ye++,l.monitorRunDependencies&&l.monitorRunDependencies(Ye),e?(N(!We[e]),We[e]=1,null===qe&&"undefined"!=typeof setInterval&&(qe=setInterval(function(){if(L)return clearInterval(qe),void(qe=null);var e=!1;for(var t in We){e||(e=!0,S("still waiting on run dependencies:")),S("dependency: "+t);}e&&S("(end of list)");},1e4))):S("warning: run dependency added without ID");}function Qe(e){if(Ye--,l.monitorRunDependencies&&l.monitorRunDependencies(Ye),e?(N(We[e]),delete We[e]):S("warning: run dependency removed without ID"),0==Ye&&(null!==qe&&(clearInterval(qe),qe=null),Xe)){var t=Xe;Xe=null,t();}}function Ze(e){l.onAbort&&l.onAbort(e),C(e+=""),S(e),L=!0,1;throw"abort("+e+") at "+ut();}l.preloadedImages={},l.preloadedAudios={},o||Fe(function(){"undefined"!=typeof SharedArrayBuffer&&(Ke("pthreads"),PThread.allocateUnusedWorkers(2,function(){Qe("pthreads");}));});var Je="data:application/octet-stream;base64,";function $e(e){return String.prototype.startsWith?e.startsWith(Je):0===e.indexOf(Je);}var et,tt,it="missile-v20210718.wasm";function rt(){try{if(I)return new Uint8Array(I);if(v)return v(it);throw"both async and sync fetching of the wasm failed";}catch(e){Ze(e);}}function nt(){return I||!h&&!d||"function"!=typeof fetch?new Promise(function(e,t){e(rt());}):fetch(it,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+it+"'";return e.arrayBuffer();})["catch"](function(){return rt();});}function at(){var e={env:Kn,wasi_unstable:Kn,global:{NaN:NaN,Infinity:1/0},"global.Math":Math,asm2wasm:x};function t(e,t){var i=e.exports;l.asm=i,Qe("wasm-instantiate");}Ke("wasm-instantiate");var i=l;function r(e){N(l===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 nt().then(function(t){return WebAssembly.instantiate(t,e);}).then(t,function(e){S("failed to asynchronously prepare wasm: "+e),Ze(e);});}if(l.instantiateWasm)try{return l.instantiateWasm(e,t);}catch(e){return S("Module.instantiateWasm callback failed with error: "+e),!1;}return function(){if(I||"function"!=typeof WebAssembly.instantiateStreaming||$e(it)||"function"!=typeof fetch)return n(r);fetch(it,{credentials:"same-origin"}).then(function(t){return WebAssembly.instantiateStreaming(t,e).then(r,function(e){S("wasm streaming compile failed: "+e),S("falling back to ArrayBuffer instantiation"),n(r);});});}(),{};}$e(it)||(it=E(it)),l.asm=at,xe.push({func:function func(){Jn();}});var st=1127488;function ot(e){return A("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e;}function lt(e){return e.replace(/\b__Z[\w\d_]+/g,function(e){var t=ot(e);return e===t?e:t+" ["+e+"]";});}function ft(){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 ut(){var e=ft();return l.extraStackTrace&&(e+="\n"+l.extraStackTrace()),lt(e);}N(st%8==0);var ct={};function ht(e){var t,i;ht.called?(i=le[e>>2],t=le[i>>2]):(ht.called=!0,ct.USER="web_user",ct.LOGNAME="web_user",ct.PATH="/",ct.PWD="/",ct.HOME="/home/web_user",ct.LANG=("object"===("undefined"==typeof navigator?"undefined":a(navigator))&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",ct._=c,t=W(1024),i=W(256),le[i>>2]=t,le[e>>2]=i);var r=[],n=0;for(var s in ct){if("string"==typeof ct[s]){var o=s+"="+ct[s];r.push(o),n+=o.length;}}if(n>1024)throw new Error("Environment size exceeded TOTAL_ENV_SIZE!");for(var l=0;l<r.length;l++){ie(o=r[l],t),le[i+4*l>>2]=t,t+=o.length+1;}le[i+4*r.length>>2]=0;}function dt(){}function _t(e){return l.___errno_location?le[l.___errno_location()>>2]=e:S("failed to set errno from JS"),e;}var pt={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=pt.normalizeArray(e.split("/").filter(function(e){return!!e;}),!t).join("/"))||t||(e="."),e&&i&&(e+="/"),(t?"/":"")+e;},dirname:function dirname(e){var t=pt.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 pt.splitPath(e)[3];},join:function join(){var e=Array.prototype.slice.call(arguments,0);return pt.normalize(e.join("/"));},join2:function join2(e,t){return pt.normalize(e+"/"+t);}},mt={resolve:function resolve(){for(var e="",t=!1,i=arguments.length-1;i>=-1&&!t;i--){var r=i>=0?arguments[i]:St.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=pt.normalizeArray(e.split("/").filter(function(e){return!!e;}),!t).join("/"))||".";},relative:function relative(e,t){function i(e){for(var t=0;t<e.length&&""===e[t];t++){;}for(var i=e.length-1;i>=0&&""===e[i];i--){;}return t>i?[]:e.slice(t,i-t+1);}e=mt.resolve(e).substr(1),t=mt.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;o<a;o++){if(r[o]!==n[o]){s=o;break;}}var l=[];for(o=s;o<r.length;o++){l.push("..");}return(l=l.concat(n.slice(s))).join("/");}},bt={ttys:[],init:function init(){},shutdown:function shutdown(){},register:function register(e,t){bt.ttys[e]={input:[],output:[],ops:t},St.registerDevice(e,bt.stream_ops);},stream_ops:{open:function open(e){var t=bt.ttys[e.node.rdev];if(!t)throw new St.ErrnoError(43);e.tty=t,e.seekable=!1;},close:function close(e){e.tty.ops.flush(e.tty);},flush:function flush(e){e.tty.ops.flush(e.tty);},read:function read(e,t,i,r,n){if(!e.tty||!e.tty.ops.get_char)throw new St.ErrnoError(60);for(var a=0,s=0;s<r;s++){var o;try{o=e.tty.ops.get_char(e.tty);}catch(e){throw new St.ErrnoError(29);}if(void 0===o&&0===a)throw new St.ErrnoError(6);if(null==o)break;a++,t[i+s]=o;}return a&&(e.node.timestamp=Date.now()),a;},write:function write(e,t,i,r,n){if(!e.tty||!e.tty.ops.put_char)throw new St.ErrnoError(60);try{for(var a=0;a<r;a++){e.tty.ops.put_char(e.tty,t[i+a]);}}catch(e){throw new St.ErrnoError(29);}return r&&(e.node.timestamp=Date.now()),a;}},default_tty_ops:{get_char:function get_char(e){if(!e.input.length){var t=null;if(_){var n=r.alloc?r.alloc(256):new r(256),a=0;try{a=xi.readSync(i.stdin.fd,n,0,256,null);}catch(e){if(-1==e.toString().indexOf("EOF"))throw e;a=0;}t=a>0?n.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=ki(t,!0);}return e.input.shift();},put_char:function put_char(e,t){null===t||10===t?(C(K(e.output,0)),e.output=[]):0!=t&&e.output.push(t);},flush:function flush(e){e.output&&e.output.length>0&&(C(K(e.output,0)),e.output=[]);}},default_tty1_ops:{put_char:function put_char(e,t){null===t||10===t?(S(K(e.output,0)),e.output=[]):0!=t&&e.output.push(t);},flush:function flush(e){e.output&&e.output.length>0&&(S(K(e.output,0)),e.output=[]);}}},vt={ops_table:null,mount:function mount(e){return vt.createNode(null,"/",16895,0);},createNode:function createNode(e,t,i,r){if(St.isBlkdev(i)||St.isFIFO(i))throw new St.ErrnoError(63);vt.ops_table||(vt.ops_table={dir:{node:{getattr:vt.node_ops.getattr,setattr:vt.node_ops.setattr,lookup:vt.node_ops.lookup,mknod:vt.node_ops.mknod,rename:vt.node_ops.rename,unlink:vt.node_ops.unlink,rmdir:vt.node_ops.rmdir,readdir:vt.node_ops.readdir,symlink:vt.node_ops.symlink},stream:{llseek:vt.stream_ops.llseek}},file:{node:{getattr:vt.node_ops.getattr,setattr:vt.node_ops.setattr},stream:{llseek:vt.stream_ops.llseek,read:vt.stream_ops.read,write:vt.stream_ops.write,allocate:vt.stream_ops.allocate,mmap:vt.stream_ops.mmap,msync:vt.stream_ops.msync}},link:{node:{getattr:vt.node_ops.getattr,setattr:vt.node_ops.setattr,readlink:vt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:vt.node_ops.getattr,setattr:vt.node_ops.setattr},stream:St.chrdev_stream_ops}});var n=St.createNode(e,t,i,r);return St.isDir(n.mode)?(n.node_ops=vt.ops_table.dir.node,n.stream_ops=vt.ops_table.dir.stream,n.contents={}):St.isFile(n.mode)?(n.node_ops=vt.ops_table.file.node,n.stream_ops=vt.ops_table.file.stream,n.usedBytes=0,n.contents=null):St.isLink(n.mode)?(n.node_ops=vt.ops_table.link.node,n.stream_ops=vt.ops_table.link.stream):St.isChrdev(n.mode)&&(n.node_ops=vt.ops_table.chrdev.node,n.stream_ops=vt.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<e.usedBytes;++i){t.push(e.contents[i]);}return t;}return e.contents;},getFileDataAsTypedArray:function getFileDataAsTypedArray(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array();},expandFileStorage:function expandFileStorage(e,t){var i=e.contents?e.contents.length:0;if(!(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<t;){e.contents.push(0);}e.usedBytes=t;}},node_ops:{getattr:function getattr(e){var t={};return t.dev=St.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,St.isDir(e.mode)?t.size=4096:St.isFile(e.mode)?t.size=e.usedBytes:St.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t;},setattr:function setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&vt.resizeFileStorage(e,t.size);},lookup:function lookup(e,t){throw St.genericErrors[44];},mknod:function mknod(e,t,i,r){return vt.createNode(e,t,i,r);},rename:function rename(e,t,i){if(St.isDir(e.mode)){var r;try{r=St.lookupNode(t,i);}catch(e){}if(r)for(var n in r.contents){throw new St.ErrnoError(55);}}delete e.parent.contents[e.name],e.name=i,t.contents[i]=e,e.parent=t;},unlink:function unlink(e,t){delete e.contents[t];},rmdir:function rmdir(e,t){var i=St.lookupNode(e,t);for(var r in i.contents){throw new St.ErrnoError(55);}delete e.contents[t];},readdir:function readdir(e){var t=[".",".."];for(var i in e.contents){e.contents.hasOwnProperty(i)&&t.push(i);}return t;},symlink:function symlink(e,t,i){var r=vt.createNode(e,t,41471,0);return r.link=i,r;},readlink:function readlink(e){if(!St.isLink(e.mode))throw new St.ErrnoError(28);return e.link;}},stream_ops:{read:function read(e,t,i,r,n){var a=e.node.contents;if(n>=e.node.usedBytes)return 0;var s=Math.min(e.node.usedBytes-n,r);if(N(s>=0),s>8&&a.subarray)t.set(a.subarray(n,n+s),i);else for(var o=0;o<s;o++){t[i+o]=a[n+o];}return s;},write:function write(e,t,i,r,n,a){if(a&&A("file packager has copied file data into memory, but in memory growth we are forced to copy it again (see --no-heap-copy)"),a=!1,!r)return 0;var s=e.node;if(s.timestamp=Date.now(),t.subarray&&(!s.contents||s.contents.subarray)){if(a)return N(0===n,"canOwn must imply no weird position inside the file"),s.contents=t.subarray(i,i+r),s.usedBytes=r,r;if(0===s.usedBytes&&0===n)return s.contents=new Uint8Array(t.subarray(i,i+r)),s.usedBytes=r,r;if(n+r<=s.usedBytes)return s.contents.set(t.subarray(i,i+r),n),r;}if(vt.expandFileStorage(s,n+r),s.contents.subarray&&t.subarray)s.contents.set(t.subarray(i,i+r),n);else for(var o=0;o<r;o++){s.contents[n+o]=t[i+o];}return s.usedBytes=Math.max(s.usedBytes,n+r),r;},llseek:function llseek(e,t,i){var r=t;if(1===i?r+=e.position:2===i&&St.isFile(e.node.mode)&&(r+=e.node.usedBytes),r<0)throw new St.ErrnoError(28);return r;},allocate:function allocate(e,t,i){vt.expandFileStorage(e.node,t+i),e.node.usedBytes=Math.max(e.node.usedBytes,t+i);},mmap:function mmap(e,t,i,r,n,a,s){if(!St.isFile(e.node.mode))throw new St.ErrnoError(43);var o,l,f=e.node.contents;if(2&s||f.buffer!==t&&f.buffer!==t.buffer){(n>0||n+r<e.node.usedBytes)&&(f=f.subarray?f.subarray(n,n+r):Array.prototype.slice.call(f,n,n+r)),l=!0;var u=t.buffer==ne.buffer;if(!(o=ra(r)))throw new St.ErrnoError(48);(u?ne:t).set(f,o);}else l=!1,o=f.byteOffset;return{ptr:o,allocated:l};},msync:function msync(e,t,i,r,n){if(!St.isFile(e.node.mode))throw new St.ErrnoError(43);if(2&n)return 0;vt.stream_ops.write(e,t,0,r,i,!1);return 0;}}},yt={dbs:{},indexedDB:function(e){function t(){return e.apply(this,arguments);}return t.toString=function(){return e.toString();},t;}(function(){if("undefined"!=typeof indexedDB)return indexedDB;var e=null;return"object"===("undefined"==typeof window?"undefined":a(window))&&(e=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),N(e,"IDBFS used, but indexedDB not supported"),e;}),DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function mount(e){return vt.mount.apply(null,arguments);},syncfs:function syncfs(e,t,i){yt.getLocalSet(e,function(r,n){if(r)return i(r);yt.getRemoteSet(e,function(e,r){if(e)return i(e);var a=t?r:n,s=t?n:r;yt.reconcile(a,s,i);});});},getDB:function getDB(e,t){var i,r=yt.dbs[e];if(r)return t(null,r);try{i=yt.indexedDB().open(e,yt.DB_VERSION);}catch(e){return t(e);}if(!i)return t("Unable to connect to IndexedDB");i.onupgradeneeded=function(e){var t,i=e.target.result,r=e.target.transaction;(t=i.objectStoreNames.contains(yt.DB_STORE_NAME)?r.objectStore(yt.DB_STORE_NAME):i.createObjectStore(yt.DB_STORE_NAME)).indexNames.contains("timestamp")||t.createIndex("timestamp","timestamp",{unique:!1});},i.onsuccess=function(){r=i.result,yt.dbs[e]=r,t(null,r);},i.onerror=function(e){t(this.error),e.preventDefault();};},getLocalSet:function getLocalSet(e,t){var i={};function r(e){return"."!==e&&".."!==e;}function n(e){return function(t){return pt.join2(e,t);};}for(var a=St.readdir(e.mountpoint).filter(r).map(n(e.mountpoint));a.length;){var s,o=a.pop();try{s=St.stat(o);}catch(e){return t(e);}St.isDir(s.mode)&&a.push.apply(a,St.readdir(o).filter(r).map(n(o))),i[o]={timestamp:s.mtime};}return t(null,{type:"local",entries:i});},getRemoteSet:function getRemoteSet(e,t){var i={};yt.getDB(e.mountpoint,function(e,r){if(e)return t(e);try{var n=r.transaction([yt.DB_STORE_NAME],"readonly");n.onerror=function(e){t(this.error),e.preventDefault();},n.objectStore(yt.DB_STORE_NAME).index("timestamp").openKeyCursor().onsuccess=function(e){var n=e.target.result;if(!n)return t(null,{type:"remote",db:r,entries:i});i[n.primaryKey]={timestamp:n.key},n["continue"]();};}catch(e){return t(e);}});},loadLocalEntry:function loadLocalEntry(e,t){var i,r;try{r=St.lookupPath(e).node,i=St.stat(e);}catch(e){return t(e);}return St.isDir(i.mode)?t(null,{timestamp:i.mtime,mode:i.mode}):St.isFile(i.mode)?(r.contents=vt.getFileDataAsTypedArray(r),t(null,{timestamp:i.mtime,mode:i.mode,contents:r.contents})):t(new Error("node type not supported"));},storeLocalEntry:function storeLocalEntry(e,t,i){try{if(St.isDir(t.mode))St.mkdir(e,t.mode);else{if(!St.isFile(t.mode))return i(new Error("node type not supported"));St.writeFile(e,t.contents,{canOwn:!0});}St.chmod(e,t.mode),St.utime(e,t.timestamp,t.timestamp);}catch(e){return i(e);}i(null);},removeLocalEntry:function removeLocalEntry(e,t){try{St.lookupPath(e);var i=St.stat(e);St.isDir(i.mode)?St.rmdir(e):St.isFile(i.mode)&&St.unlink(e);}catch(e){return t(e);}t(null);},loadRemoteEntry:function loadRemoteEntry(e,t,i){var r=e.get(t);r.onsuccess=function(e){i(null,e.target.result);},r.onerror=function(e){i(this.error),e.preventDefault();};},storeRemoteEntry:function storeRemoteEntry(e,t,i,r){var n=e.put(i,t);n.onsuccess=function(){r(null);},n.onerror=function(e){r(this.error),e.preventDefault();};},removeRemoteEntry:function removeRemoteEntry(e,t,i){var r=e["delete"](t);r.onsuccess=function(){i(null);},r.onerror=function(e){i(this.error),e.preventDefault();};},reconcile:function reconcile(e,t,i){var r=0,n=[];Object.keys(e.entries).forEach(function(i){var a=e.entries[i],s=t.entries[i];(!s||a.timestamp>s.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([yt.DB_STORE_NAME],"readwrite"),l=o.objectStore(yt.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?yt.loadRemoteEntry(l,e,function(t,i){if(t)return f(t);yt.storeLocalEntry(e,i,f);}):yt.loadLocalEntry(e,function(t,i){if(t)return f(t);yt.storeRemoteEntry(l,e,i,f);});}),a.sort().reverse().forEach(function(e){"local"===t.type?yt.removeLocalEntry(e,f):yt.removeRemoteEntry(l,e,f);});}},gt={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},wt={isWindows:!1,staticInit:function staticInit(){wt.isWindows=!!i.platform.match(/^win/);var e=i.binding("constants");e.fs&&(e=e.fs),wt.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 r.alloc?r.from(e):new r(e);},convertNodeCode:function convertNodeCode(e){var t=e.code;return N(t in gt),gt[t];},mount:function mount(e){return N(p),wt.createNode(null,"/",wt.getMode(e.opts.root),0);},createNode:function createNode(e,t,i,r){if(!St.isDir(i)&&!St.isFile(i)&&!St.isLink(i))throw new St.ErrnoError(28);var n=St.createNode(e,t,i);return n.node_ops=wt.node_ops,n.stream_ops=wt.stream_ops,n;},getMode:function getMode(e){var t;try{t=xi.lstatSync(e),wt.isWindows&&(t.mode=t.mode|(292&t.mode)>>2);}catch(e){if(!e.code)throw e;throw new St.ErrnoError(wt.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(),pt.join.apply(null,t);},flagsForNode:function flagsForNode(e){e&=-2097153,e&=-2049,e&=-32769,e&=-524289;var t=0;for(var i in wt.flagsForNodeMap){e&i&&(t|=wt.flagsForNodeMap[i],e^=i);}if(e)throw new St.ErrnoError(28);return t;},node_ops:{getattr:function getattr(e){var t,i=wt.realPath(e);try{t=xi.lstatSync(i);}catch(e){if(!e.code)throw e;throw new St.ErrnoError(wt.convertNodeCode(e));}return wt.isWindows&&!t.blksize&&(t.blksize=4096),wt.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=wt.realPath(e);try{if(void 0!==t.mode&&(xi.chmodSync(i,t.mode),e.mode=t.mode),void 0!==t.timestamp){var r=new Date(t.timestamp);xi.utimesSync(i,r,r);}void 0!==t.size&&xi.truncateSync(i,t.size);}catch(e){if(!e.code)throw e;throw new St.ErrnoError(wt.convertNodeCode(e));}},lookup:function lookup(e,t){var i=pt.join2(wt.realPath(e),t),r=wt.getMode(i);return wt.createNode(e,t,r);},mknod:function mknod(e,t,i,r){var n=wt.createNode(e,t,i,r),a=wt.realPath(n);try{St.isDir(n.mode)?xi.mkdirSync(a,n.mode):xi.writeFileSync(a,"",{mode:n.mode});}catch(e){if(!e.code)throw e;throw new St.ErrnoError(wt.convertNodeCode(e));}return n;},rename:function rename(e,t,i){var r=wt.realPath(e),n=pt.join2(wt.realPath(t),i);try{xi.renameSync(r,n);}catch(e){if(!e.code)throw e;throw new St.ErrnoError(wt.convertNodeCode(e));}},unlink:function unlink(e,t){var i=pt.join2(wt.realPath(e),t);try{xi.unlinkSync(i);}catch(e){if(!e.code)throw e;throw new St.ErrnoError(wt.convertNodeCode(e));}},rmdir:function rmdir(e,t){var i=pt.join2(wt.realPath(e),t);try{xi.rmdirSync(i);}catch(e){if(!e.code)throw e;throw new St.ErrnoError(wt.convertNodeCode(e));}},readdir:function readdir(e){var t=wt.realPath(e);try{return xi.readdirSync(t);}catch(e){if(!e.code)throw e;throw new St.ErrnoError(wt.convertNodeCode(e));}},symlink:function symlink(e,t,i){var r=pt.join2(wt.realPath(e),t);try{xi.symlinkSync(i,r);}catch(e){if(!e.code)throw e;throw new St.ErrnoError(wt.convertNodeCode(e));}},readlink:function readlink(e){var t=wt.realPath(e);try{return t=xi.readlinkSync(t),t=Mi.relative(Mi.resolve(e.mount.opts.root),t);}catch(e){if(!e.code)throw e;throw new St.ErrnoError(wt.convertNodeCode(e));}}},stream_ops:{open:function open(e){var t=wt.realPath(e.node);try{St.isFile(e.node.mode)&&(e.nfd=xi.openSync(t,wt.flagsForNode(e.flags)));}catch(e){if(!e.code)throw e;throw new St.ErrnoError(wt.convertNodeCode(e));}},close:function close(e){try{St.isFile(e.node.mode)&&e.nfd&&xi.closeSync(e.nfd);}catch(e){if(!e.code)throw e;throw new St.ErrnoError(wt.convertNodeCode(e));}},read:function read(e,t,i,r,n){if(0===r)return 0;try{return xi.readSync(e.nfd,wt.bufferFrom(t.buffer),i,r,n);}catch(e){throw new St.ErrnoError(wt.convertNodeCode(e));}},write:function write(e,t,i,r,n){try{return xi.writeSync(e.nfd,wt.bufferFrom(t.buffer),i,r,n);}catch(e){throw new St.ErrnoError(wt.convertNodeCode(e));}},llseek:function llseek(e,t,i){var r=t;if(1===i)r+=e.position;else if(2===i&&St.isFile(e.node.mode))try{r+=xi.fstatSync(e.nfd).size;}catch(e){throw new St.ErrnoError(wt.convertNodeCode(e));}if(r<0)throw new St.ErrnoError(28);return r;}}},Et={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function mount(e){N(d),Et.reader||(Et.reader=new FileReaderSync());var t=Et.createNode(null,"/",Et.DIR_MODE,0),i={};function r(e){for(var r=e.split("/"),n=t,a=0;a<r.length-1;a++){var s=r.slice(0,a+1).join("/");i[s]||(i[s]=Et.createNode(n,r[a],Et.DIR_MODE,0)),n=i[s];}return n;}function n(e){var t=e.split("/");return t[t.length-1];}return Array.prototype.forEach.call(e.opts.files||[],function(e){Et.createNode(r(e.name),n(e.name),Et.FILE_MODE,0,e,e.lastModifiedDate);}),(e.opts.blobs||[]).forEach(function(e){Et.createNode(r(e.name),n(e.name),Et.FILE_MODE,0,e.data);}),(e.opts.packages||[]).forEach(function(e){e.metadata.files.forEach(function(t){var i=t.filename.substr(1);Et.createNode(r(i),n(i),Et.FILE_MODE,0,e.blob.slice(t.start,t.end));});}),t;},createNode:function createNode(e,t,i,r,n,a){var s=St.createNode(e,t,i);return s.mode=i,s.node_ops=Et.node_ops,s.stream_ops=Et.stream_ops,s.timestamp=(a||new Date()).getTime(),N(Et.FILE_MODE!==Et.DIR_MODE),i===Et.FILE_MODE?(s.size=n.size,s.contents=n):(s.size=4096,s.contents={}),e&&(e.contents[t]=s),s;},node_ops:{getattr:function getattr(e){return{dev:1,ino:void 0,mode:e.mode,nlink:1,uid:0,gid:0,rdev:void 0,size:e.size,atime:new Date(e.timestamp),mtime:new Date(e.timestamp),ctime:new Date(e.timestamp),blksize:4096,blocks:Math.ceil(e.size/4096)};},setattr:function setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp);},lookup:function lookup(e,t){throw new St.ErrnoError(44);},mknod:function mknod(e,t,i,r){throw new St.ErrnoError(63);},rename:function rename(e,t,i){throw new St.ErrnoError(63);},unlink:function unlink(e,t){throw new St.ErrnoError(63);},rmdir:function rmdir(e,t){throw new St.ErrnoError(63);},readdir:function readdir(e){var t=[".",".."];for(var i in e.contents){e.contents.hasOwnProperty(i)&&t.push(i);}return t;},symlink:function symlink(e,t,i){throw new St.ErrnoError(63);},readlink:function readlink(e){throw new St.ErrnoError(63);}},stream_ops:{read:function read(e,t,i,r,n){if(n>=e.node.size)return 0;var a=e.node.contents.slice(n,n+r),s=Et.reader.readAsArrayBuffer(a);return t.set(new Uint8Array(s),i),a.size;},write:function write(e,t,i,r,n){throw new St.ErrnoError(29);},llseek:function llseek(e,t,i){var r=t;if(1===i?r+=e.position:2===i&&St.isFile(e.node.mode)&&(r+=e.node.size),r<0)throw new St.ErrnoError(28);return r;}}},Ct={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"},St={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 St.ErrnoError))throw e+" : "+ut();return _t(e.errno);},lookupPath:function lookupPath(e,t){if(t=t||{},!(e=mt.resolve(St.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 St.ErrnoError(32);for(var n=pt.normalizeArray(e.split("/").filter(function(e){return!!e;}),!1),a=St.root,s="/",o=0;o<n.length;o++){var l=o===n.length-1;if(l&&t.parent)break;if(a=St.lookupNode(a,n[o]),s=pt.join2(s,n[o]),St.isMountpoint(a)&&(!l||l&&t.follow_mount)&&(a=a.mounted.root),!l||t.follow)for(var f=0;St.isLink(a.mode);){var u=St.readlink(s);if(s=mt.resolve(pt.dirname(s),u),a=St.lookupPath(s,{recurse_count:t.recurse_count}).node,f++>40)throw new St.ErrnoError(32);}}return{path:s,node:a};},getPath:function getPath(e){for(var t;;){if(St.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<t.length;r++){i=(i<<5)-i+t.charCodeAt(r)|0;}return(e+i>>>0)%St.nameTable.length;},hashAddNode:function hashAddNode(e){var t=St.hashName(e.parent.id,e.name);e.name_next=St.nameTable[t],St.nameTable[t]=e;},hashRemoveNode:function hashRemoveNode(e){var t=St.hashName(e.parent.id,e.name);if(St.nameTable[t]===e)St.nameTable[t]=e.name_next;else for(var i=St.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=St.mayLookup(e);if(i)throw new St.ErrnoError(i,e);for(var r=St.hashName(e.id,t),n=St.nameTable[r];n;n=n.name_next){var a=n.name;if(n.parent.id===e.id&&a===t)return n;}return St.lookup(e,t);},createNode:function createNode(e,t,i,r){if(!St.FSNode){St.FSNode=function(e,t,i,r){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=St.nextInode++,this.name=t,this.mode=i,this.node_ops={},this.stream_ops={},this.rdev=r;},St.FSNode.prototype={};Object.defineProperties(St.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 St.isDir(this.mode);}},isDevice:{get:function get(){return St.isChrdev(this.mode);}}});}var n=new St.FSNode(e,t,i,r);return St.hashAddNode(n),n;},destroyNode:function destroyNode(e){St.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=St.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 St.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=St.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2);},mayCreate:function mayCreate(e,t){try{St.lookupNode(e,t);return 20;}catch(e){}return St.nodePermissions(e,"wx");},mayDelete:function mayDelete(e,t,i){var r;try{r=St.lookupNode(e,t);}catch(e){return e.errno;}var n=St.nodePermissions(e,"wx");if(n)return n;if(i){if(!St.isDir(r.mode))return 54;if(St.isRoot(r)||St.getPath(r)===St.cwd())return 10;}else if(St.isDir(r.mode))return 31;return 0;},mayOpen:function mayOpen(e,t){return e?St.isLink(e.mode)?32:St.isDir(e.mode)&&("r"!==St.flagsToPermissionString(t)||512&t)?31:St.nodePermissions(e,St.flagsToPermissionString(t)):44;},MAX_OPEN_FDS:4096,nextfd:function nextfd(e,t){e=e||0,t=t||St.MAX_OPEN_FDS;for(var i=e;i<=t;i++){if(!St.streams[i])return i;}throw new St.ErrnoError(33);},getStream:function getStream(e){return St.streams[e];},createStream:function createStream(e,t,i){St.FSStream||(St.FSStream=function(){},St.FSStream.prototype={},Object.defineProperties(St.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 St.FSStream();for(var n in e){r[n]=e[n];}e=r;var a=St.nextfd(t,i);return e.fd=a,St.streams[a]=e,e;},closeStream:function closeStream(e){St.streams[e]=null;},chrdev_stream_ops:{open:function open(e){var t=St.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e);},llseek:function llseek(){throw new St.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){St.devices[e]={stream_ops:t};},getDevice:function getDevice(e){return St.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),St.syncFSRequests++,St.syncFSRequests>1&&St.syncFSRequests;var i=St.getMounts(St.root.mount),r=0;function n(e){return N(St.syncFSRequests>0),St.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&&St.root)throw new St.ErrnoError(10);if(!n&&!a){var s=St.lookupPath(i,{follow_mount:!1});if(i=s.path,r=s.node,St.isMountpoint(r))throw new St.ErrnoError(10);if(!St.isDir(r.mode))throw new St.ErrnoError(54);}var o={type:e,opts:t,mountpoint:i,mounts:[]},l=e.mount(o);return l.mount=o,o.root=l,n?St.root=l:r&&(r.mounted=o,r.mount&&r.mount.mounts.push(o)),l;},unmount:function unmount(e){var t=St.lookupPath(e,{follow_mount:!1});if(!St.isMountpoint(t.node))throw new St.ErrnoError(28);var i=t.node,r=i.mounted,n=St.getMounts(r);Object.keys(St.nameTable).forEach(function(e){for(var t=St.nameTable[e];t;){var i=t.name_next;-1!==n.indexOf(t.mount)&&St.destroyNode(t),t=i;}}),i.mounted=null;var a=i.mount.mounts.indexOf(r);N(-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=St.lookupPath(e,{parent:!0}).node,n=pt.basename(e);if(!n||"."===n||".."===n)throw new St.ErrnoError(28);var a=St.mayCreate(r,n);if(a)throw new St.ErrnoError(a);if(!r.node_ops.mknod)throw new St.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,St.mknod(e,t,0);},mkdir:function mkdir(e,t){return t=void 0!==t?t:511,t&=1023,t|=16384,St.mknod(e,t,0);},mkdirTree:function mkdirTree(e,t){for(var i=e.split("/"),r="",n=0;n<i.length;++n){if(i[n]){r+="/"+i[n];try{St.mkdir(r,t);}catch(e){if(20!=e.errno)throw e;}}}},mkdev:function mkdev(e,t,i){return void 0===i&&(i=t,t=438),t|=8192,St.mknod(e,t,i);},symlink:function symlink(e,t){if(!mt.resolve(e))throw new St.ErrnoError(44);var i=St.lookupPath(t,{parent:!0}).node;if(!i)throw new St.ErrnoError(44);var r=pt.basename(t),n=St.mayCreate(i,r);if(n)throw new St.ErrnoError(n);if(!i.node_ops.symlink)throw new St.ErrnoError(63);return i.node_ops.symlink(i,r,e);},rename:function rename(e,t){var i,r,n=pt.dirname(e),a=pt.dirname(t),s=pt.basename(e),o=pt.basename(t);try{i=St.lookupPath(e,{parent:!0}).node,r=St.lookupPath(t,{parent:!0}).node;}catch(e){throw new St.ErrnoError(10);}if(!i||!r)throw new St.ErrnoError(44);if(i.mount!==r.mount)throw new St.ErrnoError(75);var l,f=St.lookupNode(i,s),u=mt.relative(e,a);if("."!==u.charAt(0))throw new St.ErrnoError(28);if("."!==(u=mt.relative(t,n)).charAt(0))throw new St.ErrnoError(55);try{l=St.lookupNode(r,o);}catch(e){}if(f!==l){var c=St.isDir(f.mode),h=St.mayDelete(i,s,c);if(h)throw new St.ErrnoError(h);if(h=l?St.mayDelete(r,o,c):St.mayCreate(r,o))throw new St.ErrnoError(h);if(!i.node_ops.rename)throw new St.ErrnoError(63);if(St.isMountpoint(f)||l&&St.isMountpoint(l))throw new St.ErrnoError(10);if(r!==i&&(h=St.nodePermissions(i,"w")))throw new St.ErrnoError(h);try{St.trackingDelegate.willMovePath&&St.trackingDelegate.willMovePath(e,t);}catch(e){e.message;}St.hashRemoveNode(f);try{i.node_ops.rename(f,r,o);}catch(e){throw e;}finally{St.hashAddNode(f);}try{St.trackingDelegate.onMovePath&&St.trackingDelegate.onMovePath(e,t);}catch(e){e.message;}}},rmdir:function rmdir(e){var t=St.lookupPath(e,{parent:!0}).node,i=pt.basename(e),r=St.lookupNode(t,i),n=St.mayDelete(t,i,!0);if(n)throw new St.ErrnoError(n);if(!t.node_ops.rmdir)throw new St.ErrnoError(63);if(St.isMountpoint(r))throw new St.ErrnoError(10);try{St.trackingDelegate.willDeletePath&&St.trackingDelegate.willDeletePath(e);}catch(e){e.message;}t.node_ops.rmdir(t,i),St.destroyNode(r);try{St.trackingDelegate.onDeletePath&&St.trackingDelegate.onDeletePath(e);}catch(e){e.message;}},readdir:function readdir(e){var t=St.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new St.ErrnoError(54);return t.node_ops.readdir(t);},unlink:function unlink(e){var t=St.lookupPath(e,{parent:!0}).node,i=pt.basename(e),r=St.lookupNode(t,i),n=St.mayDelete(t,i,!1);if(n)throw new St.ErrnoError(n);if(!t.node_ops.unlink)throw new St.ErrnoError(63);if(St.isMountpoint(r))throw new St.ErrnoError(10);try{St.trackingDelegate.willDeletePath&&St.trackingDelegate.willDeletePath(e);}catch(e){e.message;}t.node_ops.unlink(t,i),St.destroyNode(r);try{St.trackingDelegate.onDeletePath&&St.trackingDelegate.onDeletePath(e);}catch(e){e.message;}},readlink:function readlink(e){var t=St.lookupPath(e).node;if(!t)throw new St.ErrnoError(44);if(!t.node_ops.readlink)throw new St.ErrnoError(28);return mt.resolve(St.getPath(t.parent),t.node_ops.readlink(t));},stat:function stat(e,t){var i=St.lookupPath(e,{follow:!t}).node;if(!i)throw new St.ErrnoError(44);if(!i.node_ops.getattr)throw new St.ErrnoError(63);return i.node_ops.getattr(i);},lstat:function lstat(e){return St.stat(e,!0);},chmod:function chmod(e,t,i){var r;"string"==typeof e?r=St.lookupPath(e,{follow:!i}).node:r=e;if(!r.node_ops.setattr)throw new St.ErrnoError(63);r.node_ops.setattr(r,{mode:4095&t|-4096&r.mode,timestamp:Date.now()});},lchmod:function lchmod(e,t){St.chmod(e,t,!0);},fchmod:function fchmod(e,t){var i=St.getStream(e);if(!i)throw new St.ErrnoError(8);St.chmod(i.node,t);},chown:function chown(e,t,i,r){var n;"string"==typeof e?n=St.lookupPath(e,{follow:!r}).node:n=e;if(!n.node_ops.setattr)throw new St.ErrnoError(63);n.node_ops.setattr(n,{timestamp:Date.now()});},lchown:function lchown(e,t,i){St.chown(e,t,i,!0);},fchown:function fchown(e,t,i){var r=St.getStream(e);if(!r)throw new St.ErrnoError(8);St.chown(r.node,t,i);},truncate:function truncate(e,t){if(t<0)throw new St.ErrnoError(28);var i;"string"==typeof e?i=St.lookupPath(e,{follow:!0}).node:i=e;if(!i.node_ops.setattr)throw new St.ErrnoError(63);if(St.isDir(i.mode))throw new St.ErrnoError(31);if(!St.isFile(i.mode))throw new St.ErrnoError(28);var r=St.nodePermissions(i,"w");if(r)throw new St.ErrnoError(r);i.node_ops.setattr(i,{size:t,timestamp:Date.now()});},ftruncate:function ftruncate(e,t){var i=St.getStream(e);if(!i)throw new St.ErrnoError(8);if(0==(2097155&i.flags))throw new St.ErrnoError(28);St.truncate(i.node,t);},utime:function utime(e,t,i){var r=St.lookupPath(e,{follow:!0}).node;r.node_ops.setattr(r,{timestamp:Math.max(t,i)});},open:function open(e,t,i,r,n){if(""===e)throw new St.ErrnoError(44);var s;if(i=void 0===i?438:i,i=64&(t="string"==typeof t?St.modeStringToFlags(t):t)?4095&i|32768:0,"object"===a(e))s=e;else{e=pt.normalize(e);try{s=St.lookupPath(e,{follow:!(131072&t)}).node;}catch(e){}}var o=!1;if(64&t)if(s){if(128&t)throw new St.ErrnoError(20);}else s=St.mknod(e,i,0),o=!0;if(!s)throw new St.ErrnoError(44);if(St.isChrdev(s.mode)&&(t&=-513),65536&t&&!St.isDir(s.mode))throw new St.ErrnoError(54);if(!o){var f=St.mayOpen(s,t);if(f)throw new St.ErrnoError(f);}512&t&&St.truncate(s,0),t&=-641;var u=St.createStream({node:s,path:St.getPath(s),flags:t,seekable:!0,position:0,stream_ops:s.stream_ops,ungotten:[],error:!1},r,n);u.stream_ops.open&&u.stream_ops.open(u),!l.logReadFiles||1&t||(St.readFiles||(St.readFiles={}),e in St.readFiles||(St.readFiles[e]=1));try{if(St.trackingDelegate.onOpenFile){var c=0;1!=(2097155&t)&&(c|=St.tracking.openFlags.READ),0!=(2097155&t)&&(c|=St.tracking.openFlags.WRITE),St.trackingDelegate.onOpenFile(e,c);}}catch(e){e.message;}return u;},close:function close(e){if(St.isClosed(e))throw new St.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e);}catch(e){throw e;}finally{St.closeStream(e.fd);}e.fd=null;},isClosed:function isClosed(e){return null===e.fd;},llseek:function llseek(e,t,i){if(St.isClosed(e))throw new St.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new St.ErrnoError(70);if(0!=i&&1!=i&&2!=i)throw new St.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,i),e.ungotten=[],e.position;},read:function read(e,t,i,r,n){if(r<0||n<0)throw new St.ErrnoError(28);if(St.isClosed(e))throw new St.ErrnoError(8);if(1==(2097155&e.flags))throw new St.ErrnoError(8);if(St.isDir(e.node.mode))throw new St.ErrnoError(31);if(!e.stream_ops.read)throw new St.ErrnoError(28);var a=void 0!==n;if(a){if(!e.seekable)throw new St.ErrnoError(70);}else n=e.position;var s=e.stream_ops.read(e,t,i,r,n);return a||(e.position+=s),s;},write:function write(e,t,i,r,n,a){if(r<0||n<0)throw new St.ErrnoError(28);if(St.isClosed(e))throw new St.ErrnoError(8);if(0==(2097155&e.flags))throw new St.ErrnoError(8);if(St.isDir(e.node.mode))throw new St.ErrnoError(31);if(!e.stream_ops.write)throw new St.ErrnoError(28);1024&e.flags&&St.llseek(e,0,2);var s=void 0!==n;if(s){if(!e.seekable)throw new St.ErrnoError(70);}else n=e.position;var o=e.stream_ops.write(e,t,i,r,n,a);s||(e.position+=o);try{e.path&&St.trackingDelegate.onWriteToFile&&St.trackingDelegate.onWriteToFile(e.path);}catch(t){e.path,t.message;}return o;},allocate:function allocate(e,t,i){if(St.isClosed(e))throw new St.ErrnoError(8);if(t<0||i<=0)throw new St.ErrnoError(28);if(0==(2097155&e.flags))throw new St.ErrnoError(8);if(!St.isFile(e.node.mode)&&!St.isDir(e.node.mode))throw new St.ErrnoError(43);if(!e.stream_ops.allocate)throw new St.ErrnoError(138);e.stream_ops.allocate(e,t,i);},mmap:function mmap(e,t,i,r,n,a,s){if(0!=(2&a)&&0==(2&s)&&2!=(2097155&e.flags))throw new St.ErrnoError(2);if(1==(2097155&e.flags))throw new St.ErrnoError(2);if(!e.stream_ops.mmap)throw new St.ErrnoError(43);return e.stream_ops.mmap(e,t,i,r,n,a,s);},msync:function msync(e,t,i,r,n){return e&&e.stream_ops.msync?e.stream_ops.msync(e,t,i,r,n):0;},munmap:function munmap(e){return 0;},ioctl:function ioctl(e,t,i){if(!e.stream_ops.ioctl)throw new St.ErrnoError(59);return e.stream_ops.ioctl(e,t,i);},readFile:function readFile(e,t){if((t=t||{}).flags=t.flags||"r",t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var i,r=St.open(e,t.flags),n=St.stat(e).size,a=new Uint8Array(n);return St.read(r,a,0,n,0),"utf8"===t.encoding?i=K(a,0):"binary"===t.encoding&&(i=a),St.close(r),i;},writeFile:function writeFile(e,t,i){(i=i||{}).flags=i.flags||"w";var r=St.open(e,i.flags,i.mode);if("string"==typeof t){var n=new Uint8Array($(t)+1),a=Z(t,n,0,n.length);St.write(r,n,0,a,void 0,i.canOwn);}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");St.write(r,t,0,t.byteLength,void 0,i.canOwn);}St.close(r);},cwd:function cwd(){return St.currentPath;},chdir:function chdir(e){var t=St.lookupPath(e,{follow:!0});if(null===t.node)throw new St.ErrnoError(44);if(!St.isDir(t.node.mode))throw new St.ErrnoError(54);var i=St.nodePermissions(t.node,"x");if(i)throw new St.ErrnoError(i);St.currentPath=t.path;},createDefaultDirectories:function createDefaultDirectories(){St.mkdir("/tmp"),St.mkdir("/home"),St.mkdir("/home/web_user");},createDefaultDevices:function createDefaultDevices(){var t;if(St.mkdir("/dev"),St.registerDevice(St.makedev(1,3),{read:function read(){return 0;},write:function write(e,t,i,r,n){return r;}}),St.mkdev("/dev/null",St.makedev(1,3)),bt.register(St.makedev(5,0),bt.default_tty_ops),bt.register(St.makedev(6,0),bt.default_tty1_ops),St.mkdev("/dev/tty",St.makedev(5,0)),St.mkdev("/dev/tty1",St.makedev(6,0)),"object"===("undefined"==typeof crypto?"undefined":a(crypto))&&"function"==typeof crypto.getRandomValues){var i=new Uint8Array(1);t=function t(){return crypto.getRandomValues(i),i[0];};}else if(_)try{var r=e("crypto");t=function t(){return r.randomBytes(1)[0];};}catch(e){}t||(t=function t(){Ze("no cryptographic support found for random_device. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };");}),St.createDevice("/dev","random",t),St.createDevice("/dev","urandom",t),St.mkdir("/dev/shm"),St.mkdir("/dev/shm/tmp");},createSpecialDirectories:function createSpecialDirectories(){St.mkdir("/proc"),St.mkdir("/proc/self"),St.mkdir("/proc/self/fd"),St.mount({mount:function mount(){var e=St.createNode("/proc/self","fd",16895,73);return e.node_ops={lookup:function lookup(e,t){var i=+t,r=St.getStream(i);if(!r)throw new St.ErrnoError(8);var n={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function readlink(){return r.path;}}};return n.parent=n,n;}},e;}},{},"/proc/self/fd");},createStandardStreams:function createStandardStreams(){l.stdin?St.createDevice("/dev","stdin",l.stdin):St.symlink("/dev/tty","/dev/stdin"),l.stdout?St.createDevice("/dev","stdout",null,l.stdout):St.symlink("/dev/tty","/dev/stdout"),l.stderr?St.createDevice("/dev","stderr",null,l.stderr):St.symlink("/dev/tty1","/dev/stderr");var e=St.open("/dev/stdin","r"),t=St.open("/dev/stdout","w"),i=St.open("/dev/stderr","w");N(0===e.fd,"invalid handle for stdin ("+e.fd+")"),N(1===t.fd,"invalid handle for stdout ("+t.fd+")"),N(2===i.fd,"invalid handle for stderr ("+i.fd+")");},ensureErrnoError:function ensureErrnoError(){St.ErrnoError||(St.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){for(var t in this.errno=e,gt){if(gt[t]===e){this.code=t;break;}}},this.setErrno(e),this.message=Ct[e],this.stack&&(Object.defineProperty(this,"stack",{value:new Error().stack,writable:!0}),this.stack=lt(this.stack));},St.ErrnoError.prototype=new Error(),St.ErrnoError.prototype.constructor=St.ErrnoError,[44].forEach(function(e){St.genericErrors[e]=new St.ErrnoError(e),St.genericErrors[e].stack="<generic error, no stack>";}));},staticInit:function staticInit(){St.ensureErrnoError(),St.nameTable=new Array(4096),St.mount(vt,{},"/"),St.createDefaultDirectories(),St.createDefaultDevices(),St.createSpecialDirectories(),St.filesystems={MEMFS:vt,IDBFS:yt,NODEFS:wt,WORKERFS:Et};},init:function init(e,t,i){N(!St.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),St.init.initialized=!0,St.ensureErrnoError(),l.stdin=e||l.stdin,l.stdout=t||l.stdout,l.stderr=i||l.stderr,St.createStandardStreams();},quit:function quit(){St.init.initialized=!1;var e=l._fflush;e&&e(0);for(var t=0;t<St.streams.length;t++){var i=St.streams[t];i&&St.close(i);}},getMode:function getMode(e,t){var i=0;return e&&(i|=365),t&&(i|=146),i;},joinPath:function joinPath(e,t){var i=pt.join.apply(null,e);return t&&"/"==i[0]&&(i=i.substr(1)),i;},absolutePath:function absolutePath(e,t){return mt.resolve(t,e);},standardizePath:function standardizePath(e){return pt.normalize(e);},findObject:function findObject(e,t){var i=St.analyzePath(e,t);return i.exists?i.object:(_t(i.error),null);},analyzePath:function analyzePath(e,t){try{e=(r=St.lookupPath(e,{follow:!t})).path;}catch(e){}var i={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var r=St.lookupPath(e,{parent:!0});i.parentExists=!0,i.parentPath=r.path,i.parentObject=r.node,i.name=pt.basename(e),r=St.lookupPath(e,{follow:!t}),i.exists=!0,i.path=r.path,i.object=r.node,i.name=r.node.name,i.isRoot="/"===r.path;}catch(e){i.error=e.errno;}return i;},createFolder:function createFolder(e,t,i,r){var n=pt.join2("string"==typeof e?e:St.getPath(e),t),a=St.getMode(i,r);return St.mkdir(n,a);},createPath:function createPath(e,t,i,r){e="string"==typeof e?e:St.getPath(e);for(var n=t.split("/").reverse();n.length;){var a=n.pop();if(a){var s=pt.join2(e,a);try{St.mkdir(s);}catch(e){}e=s;}}return s;},createFile:function createFile(e,t,i,r,n){var a=pt.join2("string"==typeof e?e:St.getPath(e),t),s=St.getMode(r,n);return St.create(a,s);},createDataFile:function createDataFile(e,t,i,r,n,a){var s=t?pt.join2("string"==typeof e?e:St.getPath(e),t):e,o=St.getMode(r,n),l=St.create(s,o);if(i){if("string"==typeof i){for(var f=new Array(i.length),u=0,c=i.length;u<c;++u){f[u]=i.charCodeAt(u);}i=f;}St.chmod(l,146|o);var h=St.open(l,"w");St.write(h,i,0,i.length,0,a),St.close(h),St.chmod(l,o);}return l;},createDevice:function createDevice(e,t,i,r){var n=pt.join2("string"==typeof e?e:St.getPath(e),t),a=St.getMode(!!i,!!r);St.createDevice.major||(St.createDevice.major=64);var s=St.makedev(St.createDevice.major++,0);return St.registerDevice(s,{open:function open(e){e.seekable=!1;},close:function close(e){r&&r.buffer&&r.buffer.length&&r(10);},read:function read(e,t,r,n,a){for(var s=0,o=0;o<n;o++){var l;try{l=i();}catch(e){throw new St.ErrnoError(29);}if(void 0===l&&0===s)throw new St.ErrnoError(6);if(null==l)break;s++,t[r+o]=l;}return s&&(e.node.timestamp=Date.now()),s;},write:function write(e,t,i,n,a){for(var s=0;s<n;s++){try{r(t[i+s]);}catch(e){throw new St.ErrnoError(29);}}return n&&(e.node.timestamp=Date.now()),s;}}),St.mkdev(n,a,s);},createLink:function createLink(e,t,i,r,n){var a=pt.join2("string"==typeof e?e:St.getPath(e),t);return St.symlink(i,a);},forceLoadFile:function forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;var t=!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!b)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=ki(b(e.url),!0),e.usedBytes=e.contents.length;}catch(e){t=!1;}return t||_t(29),t;},createLazyFile:function createLazyFile(e,t,i,r,n){function a(){this.lengthKnown=!1,this.chunks=[];}if(a.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,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||[]):ki(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(!d)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=St.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(!St.forceLoadFile(l))throw new St.ErrnoError(29);return t.apply(null,arguments);};}),f.read=function(e,t,i,r,n){if(!St.forceLoadFile(l))throw new St.ErrnoError(29);var a=e.node.contents;if(n>=a.length)return 0;var s=Math.min(a.length-n,r);if(N(s>=0),a.slice)for(var o=0;o<s;o++){t[i+o]=a[n+o];}else for(o=0;o<s;o++){t[i+o]=a.get(n+o);}return s;},l.stream_ops=f,l;},createPreloadedFile:function createPreloadedFile(e,t,i,r,n,a,s,o,f,u){Browser.init();var c=t?mt.resolve(pt.join2(e,t)):e,h=Ge("cp "+c);function d(i){function d(i){u&&u(),o||St.createDataFile(e,t,i,r,n,f),a&&a(),Qe(h);}var _=!1;l.preloadPlugins.forEach(function(e){_||e.canHandle(c)&&(e.handle(i,c,d,function(){s&&s(),Qe(h);}),_=!0);}),_||d(i);}Ke(h),"string"==typeof i?Browser.asyncLoad(i,function(e){d(e);},s):d(i);},indexedDB:function indexedDB(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB;},DB_NAME:function DB_NAME(){return"EM_FS_"+window.location.pathname;},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function saveFilesToDB(e,t,i){t=t||function(){},i=i||function(){};var r=St.indexedDB();try{var n=r.open(St.DB_NAME(),St.DB_VERSION);}catch(e){return i(e);}n.onupgradeneeded=function(){n.result.createObjectStore(St.DB_STORE_NAME);},n.onsuccess=function(){var r=n.result.transaction([St.DB_STORE_NAME],"readwrite"),a=r.objectStore(St.DB_STORE_NAME),s=0,o=0,l=e.length;function f(){0==o?t():i();}e.forEach(function(e){var t=a.put(St.analyzePath(e).object.contents,e);t.onsuccess=function(){++s+o==l&&f();},t.onerror=function(){o++,s+o==l&&f();};}),r.onerror=i;},n.onerror=i;},loadFilesFromDB:function loadFilesFromDB(e,t,i){t=t||function(){},i=i||function(){};var r=St.indexedDB();try{var n=r.open(St.DB_NAME(),St.DB_VERSION);}catch(e){return i(e);}n.onupgradeneeded=i,n.onsuccess=function(){var r=n.result;try{var a=r.transaction([St.DB_STORE_NAME],"readonly");}catch(e){return void i(e);}var s=a.objectStore(St.DB_STORE_NAME),o=0,l=0,f=e.length;function u(){0==l?t():i();}e.forEach(function(e){var t=s.get(e);t.onsuccess=function(){St.analyzePath(e).exists&&St.unlink(e),St.createDataFile(pt.dirname(e),pt.basename(e),t.result,!0,!0,!0),++o+l==f&&u();},t.onerror=function(){l++,o+l==f&&u();};}),a.onerror=i;},n.onerror=i;}},jt={DEFAULT_POLLMASK:5,mappings:{},umask:511,calculateAt:function calculateAt(e,t){if("/"!==t[0]){var i;if(-100===e)i=St.cwd();else{var r=St.getStream(e);if(!r)throw new St.ErrnoError(8);i=r.path;}t=pt.join2(i,t);}return t;},doStat:function doStat(e,t,i){try{var r=e(t);}catch(e){if(e&&e.node&&pt.normalize(t)!==pt.normalize(St.getPath(e.node)))return-54;throw e;}return le[i>>2]=r.dev,le[i+4>>2]=0,le[i+8>>2]=r.ino,le[i+12>>2]=r.mode,le[i+16>>2]=r.nlink,le[i+20>>2]=r.uid,le[i+24>>2]=r.gid,le[i+28>>2]=r.rdev,le[i+32>>2]=0,tt=[r.size>>>0,(et=r.size,+Le(et)>=1?et>0?(0|He(+ze(et/4294967296),4294967295))>>>0:~~+Ne((et-+(~~et>>>0))/4294967296)>>>0:0)],le[i+40>>2]=tt[0],le[i+44>>2]=tt[1],le[i+48>>2]=4096,le[i+52>>2]=r.blocks,le[i+56>>2]=r.atime.getTime()/1e3|0,le[i+60>>2]=0,le[i+64>>2]=r.mtime.getTime()/1e3|0,le[i+68>>2]=0,le[i+72>>2]=r.ctime.getTime()/1e3|0,le[i+76>>2]=0,tt=[r.ino>>>0,(et=r.ino,+Le(et)>=1?et>0?(0|He(+ze(et/4294967296),4294967295))>>>0:~~+Ne((et-+(~~et>>>0))/4294967296)>>>0:0)],le[i+80>>2]=tt[0],le[i+84>>2]=tt[1],0;},doMsync:function doMsync(e,t,i,r){var n=new Uint8Array(ae.subarray(e,e+i));St.msync(t,n,0,i,r);},doMkdir:function doMkdir(e,t){return"/"===(e=pt.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),St.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 St.mknod(e,t,i),0;},doReadlink:function doReadlink(e,t,i){if(i<=0)return-28;var r=St.readlink(e),n=Math.min(i,$(r)),a=ne[t+n];return J(r,t,i+1),ne[t+n]=a,n;},doAccess:function doAccess(e,t){if(-8&t)return-28;var i;if(!(i=St.lookupPath(e,{follow:!0}).node))return-44;var r="";return 4&t&&(r+="r"),2&t&&(r+="w"),1&t&&(r+="x"),r&&St.nodePermissions(i,r)?-2:0;},doDup:function doDup(e,t,i){var r=St.getStream(i);return r&&St.close(r),St.open(e,t,0,i,i).fd;},doReadv:function doReadv(e,t,i,r){for(var n=0,a=0;a<i;a++){var s=le[t+8*a>>2],o=le[t+(8*a+4)>>2],l=St.read(e,ne,s,o,r);if(l<0)return-1;if(n+=l,l<o)break;}return n;},doWritev:function doWritev(e,t,i,r){for(var n=0,a=0;a<i;a++){var s=le[t+8*a>>2],o=le[t+(8*a+4)>>2],l=St.write(e,ne,s,o,r);if(l<0)return-1;n+=l;}return n;},varargs:0,get:function get(e){return jt.varargs+=4,le[jt.varargs-4>>2];},getStr:function getStr(){return Q(jt.get());},getStreamFromFD:function getStreamFromFD(e){void 0===e&&(e=jt.get());var t=St.getStream(e);if(!t)throw new St.ErrnoError(8);return t;},get64:function get64(){var e=jt.get(),t=jt.get();return N(e>=0?0===t:-1===t),e;},getZero:function getZero(){N(0===jt.get());}};function Tt(e,t){jt.varargs=t;try{var i=jt.getStreamFromFD();switch(jt.get()){case 0:return(r=jt.get())<0?-28:St.open(i.path,i.flags,0,r).fd;case 1:case 2:return 0;case 3:return i.flags;case 4:var r=jt.get();return i.flags|=r,0;case 12:r=jt.get();return se[r+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return _t(28),-1;default:return-28;}}catch(e){return void 0!==St&&e instanceof St.ErrnoError||Ze(e),-e.errno;}}function At(e,t){jt.varargs=t;try{var i=jt.getStreamFromFD(),r=jt.get(),n=jt.get();return St.read(i,ne,r,n);}catch(e){return void 0!==St&&e instanceof St.ErrnoError||Ze(e),-e.errno;}}function xt(e,t){jt.varargs=t;try{var i=jt.getStr(),r=jt.get(),n=jt.get();return St.open(i,r,n).fd;}catch(e){return void 0!==St&&e instanceof St.ErrnoError||Ze(e),-e.errno;}}function Mt(){}function kt(e){try{var t=jt.getStreamFromFD(e);return St.close(t),0;}catch(e){return void 0!==St&&e instanceof St.ErrnoError||Ze(e),e.errno;}}function Pt(){return kt.apply(null,arguments);}function It(e,t){try{var i=jt.getStreamFromFD(e),r=i.tty?2:St.isDir(i.mode)?3:St.isLink(i.mode)?7:4;return ne[t>>0]=r,0;}catch(e){return void 0!==St&&e instanceof St.ErrnoError||Ze(e),e.errno;}}function Ut(){return It.apply(null,arguments);}function Rt(e,t,i,r,n){try{var a=jt.getStreamFromFD(e),s=4294967296*i+(t>>>0);return s<=-9007199254740992||s>=9007199254740992?-61:(St.llseek(a,s,r),tt=[a.position>>>0,(et=a.position,+Le(et)>=1?et>0?(0|He(+ze(et/4294967296),4294967295))>>>0:~~+Ne((et-+(~~et>>>0))/4294967296)>>>0:0)],le[n>>2]=tt[0],le[n+4>>2]=tt[1],a.getdents&&0===s&&0===r&&(a.getdents=null),0);}catch(e){return void 0!==St&&e instanceof St.ErrnoError||Ze(e),e.errno;}}function Dt(){return Rt.apply(null,arguments);}function Ot(e,t,i,r){try{var n=jt.getStreamFromFD(e),a=jt.doWritev(n,t,i);return le[r>>2]=a,0;}catch(e){return void 0!==St&&e instanceof St.ErrnoError||Ze(e),e.errno;}}function Ft(){return Ot.apply(null,arguments);}function Bt(e){delete Gt.xhrs[e-1];}function Lt(){Ze();}function Nt(){return void 0===Nt.start&&(Nt.start=Date.now()),1e3*(Date.now()-Nt.start)|0;}function zt(){Ze();}function Ht(){return _||"undefined"!=typeof dateNow||"object"===("undefined"==typeof performance?"undefined":a(performance))&&performance&&"function"==typeof performance.now;}function Vt(e,t){var i;if(0===e)i=Date.now();else{if(1!==e||!Ht())return _t(28),-1;i=zt();}return le[t>>2]=i/1e3|0,le[t+4>>2]=i%1e3*1e3*1e3|0,0;}function Yt(){return ne.length;}function qt(){return!d;}function Xt(e){try{return R.grow(e-re.byteLength+65535>>16),pe(R.buffer),1;}catch(t){console.error("emscripten_realloc_buffer: Attempted to grow heap from "+re.byteLength+" bytes to "+e+" bytes, but got error: "+t);}}function Wt(e){var t=Yt();N(e>t);if(e>2147418112)return S("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<e;){(i=i<=536870912?_e(2*i,65536):Math.min(_e((3*i+2147483648)/4,65536),2147418112))===t&&A("Cannot ask for more memory since we reached the practical limit in browsers (which is just below 2GB), so the request would have failed. Requesting only "+ne.length);}return!!Xt(i)||(S("Failed to grow the heap from "+t+" bytes to "+i+" bytes, not enough memory!"),!1);}var Gt={xhrs:[],setu64:function setu64(e,t){fe[e>>2]=t,fe[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;Gt.openDatabase("emscripten_filesystem",1,function(t){Gt.dbInstance=t,e&&Qe("library_fetch_init");},function(){Gt.dbInstance=!1,e&&Qe("library_fetch_init");}),"undefined"!=typeof ENVIRONMENT_IS_FETCH_WORKER&&ENVIRONMENT_IS_FETCH_WORKER||Ke("library_fetch_init");}};function Kt(e,t,i,r,n){var a=fe[e+8>>2];if(a){var s=Q(a),o=e+112,l=Q(o);l||(l="GET");fe[o+32>>2];var f=fe[o+52>>2],u=fe[o+56>>2],c=!!fe[o+60>>2],h=(fe[o+64>>2],fe[o+68>>2]),d=fe[o+72>>2],_=fe[o+76>>2],p=fe[o+80>>2],m=fe[o+84>>2],b=fe[o+88>>2],v=!!(1&f),y=!!(2&f),g=!!(64&f),w=h?Q(h):void 0,E=d?Q(d):void 0,C=p?Q(p):void 0,S=new XMLHttpRequest();if(S.withCredentials=c,S.open(l,s,!g,w,E),g||(S.timeout=u),S.url_=s,N(!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=fe[_>>2];if(!j)break;var T=fe[_+4>>2];if(!T)break;_+=8;var A=Q(j),x=Q(T);S.setRequestHeader(A,x);}Gt.xhrs.push(S);var M=Gt.xhrs.length;fe[e+0>>2]=M;var k=m&&b?ae.slice(m,m+b):null;S.onload=function(r){var n=S.response?S.response.byteLength:0,a=0,s=0;v&&!y&&(a=ra(s=n),ae.set(new Uint8Array(S.response),a)),fe[e+12>>2]=a,Gt.setu64(e+16,s),Gt.setu64(e+24,0),n&&Gt.setu64(e+32,n),oe[e+40>>1]=S.readyState,4===S.readyState&&0===S.status&&(S.status=n>0?200:404),oe[e+42>>1]=S.status,S.statusText&&J(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),fe[e+12>>2]=0,Gt.setu64(e+16,0),Gt.setu64(e+24,0),Gt.setu64(e+32,0),oe[e+40>>1]=S.readyState,oe[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=ra(i),ae.set(new Uint8Array(S.response),n)),fe[e+12>>2]=n,Gt.setu64(e+16,i),Gt.setu64(e+24,t.loaded-i),Gt.setu64(e+32,t.total),oe[e+40>>1]=S.readyState,S.readyState>=3&&0===S.status&&t.loaded>0&&(S.status=200),oe[e+42>>1]=S.status,S.statusText&&J(S.statusText,e+44,64),r&&r(e,S,t);},S.onreadystatechange=function(t){oe[e+40>>1]=S.readyState,S.readyState>=2&&(oe[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 Qt(e,t,i,r,n){if(e){var a=fe[t+112+64>>2];a||(a=fe[t+8>>2]);var s=Q(a);try{var o=e.transaction(["FILES"],"readwrite").objectStore("FILES").put(i,s);o.onsuccess=function(e){oe[t+40>>1]=4,oe[t+42>>1]=200,J("OK",t+44,64),r(t,0,s);},o.onerror=function(e){oe[t+40>>1]=4,oe[t+42>>1]=413,J("Payload Too Large",t+44,64),n(t,0,e);};}catch(e){n(t,0,e);}}else n(t,0,"IndexedDB not available!");}function Zt(e,t,i,r){if(e){var n=fe[t+112+64>>2];n||(n=fe[t+8>>2]);var a=Q(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=ra(a);ae.set(new Uint8Array(n),s),fe[t+12>>2]=s,Gt.setu64(t+16,a),Gt.setu64(t+24,0),Gt.setu64(t+32,a),oe[t+40>>1]=4,oe[t+42>>1]=200,J("OK",t+44,64),i(t,0,n);}else oe[t+40>>1]=4,oe[t+42>>1]=404,J("Not Found",t+44,64),r(t,0,"no data");},s.onerror=function(e){oe[t+40>>1]=4,oe[t+42>>1]=404,J("Not Found",t+44,64),r(t,0,e);};}catch(e){r(t,0,e);}}else r(t,0,"IndexedDB not available!");}function Jt(e,t,i,r){if(e){var n=fe[t+112+64>>2];n||(n=fe[t+8>>2]);var a=Q(n);try{var s=e.transaction(["FILES"],"readwrite").objectStore("FILES")["delete"](a);s.onsuccess=function(e){var r=e.target.result;fe[t+12>>2]=0,Gt.setu64(t+16,0),Gt.setu64(t+24,0),Gt.setu64(t+32,0),oe[t+40>>1]=4,oe[t+42>>1]=200,J("OK",t+44,64),i(t,0,r);},s.onerror=function(e){oe[t+40>>1]=4,oe[t+42>>1]=404,J("Not Found",t+44,64),r(t,0,e);};}catch(e){r(t,0,e);}}else r(t,0,"IndexedDB not available!");}function $t(e,t,i,r,n){void 0!==U&&(U=!0);var a=e+112,s=Q(a),o=fe[a+36>>2],l=fe[a+40>>2],f=fe[a+44>>2],u=fe[a+48>>2],c=fe[a+52>>2],h=!!(4&c),d=!!(32&c),_=!!(16&c),p=function p(e,i,r){o?oa(o,e):t&&t(e);},m=function m(e,t,i){f?oa(f,e):r&&r(e);},b=function b(e,t,r){l?oa(l,e):i&&i(e);},v=function v(e,t,i){u?oa(u,e):n&&n(e);},y=function y(e,i,r){Qt(Gt.dbInstance,e,i.response,function(e,i,r){o?oa(o,e):t&&t(e);},function(e,i,r){o?oa(o,e):t&&t(e);});};if("EM_IDB_STORE"===s){var g=fe[a+84>>2];Qt(Gt.dbInstance,e,ae.slice(g,g+fe[a+88>>2]),p,b);}else if("EM_IDB_DELETE"===s)Jt(Gt.dbInstance,e,p,b);else if(_){if(d)return 0;Kt(e,h?y:p,b,m,v);}else Zt(Gt.dbInstance,e,p,d?b:h?function(e,t,i){Kt(e,y,b,m,v);}:function(e,t,i){Kt(e,p,b,m,v);});return e;}var ei=Le;function ti(e){return 0===e?0:(e=Q(e),ct.hasOwnProperty(e)?(ti.ret&&ia(ti.ret),ti.ret=ee(ct[e]),ti.ret):0);}function ii(e){var t=Date.now();return le[e>>2]=t/1e3|0,le[e+4>>2]=t%1e3*1e3|0,0;}var ri=(J("GMT",1127376,4),1127376);function ni(e,t){var i=new Date(1e3*le[e>>2]);le[t>>2]=i.getUTCSeconds(),le[t+4>>2]=i.getUTCMinutes(),le[t+8>>2]=i.getUTCHours(),le[t+12>>2]=i.getUTCDate(),le[t+16>>2]=i.getUTCMonth(),le[t+20>>2]=i.getUTCFullYear()-1900,le[t+24>>2]=i.getUTCDay(),le[t+36>>2]=0,le[t+32>>2]=0;var r=Date.UTC(i.getUTCFullYear(),0,1,0,0,0,0),n=(i.getTime()-r)/864e5|0;return le[t+28>>2]=n,le[t+40>>2]=ri,t;}function ai(e){return Math.pow(2,e);}function si(e){return ai(e);}function oi(e){return Math.log(e)/Math.LN2;}function li(e){var t=fi,i=t.LLVM_SAVEDSTACKS[e];t.LLVM_SAVEDSTACKS.splice(e,1),aa(i);}function fi(){var e=fi;return e.LLVM_SAVEDSTACKS||(e.LLVM_SAVEDSTACKS=[]),e.LLVM_SAVEDSTACKS.push(sa()),e.LLVM_SAVEDSTACKS.length-1;}var ui=Ve;function ci(){if(!ci.called){ci.called=!0,le[ea()>>2]=60*new Date().getTimezoneOffset();var e=new Date().getFullYear(),t=new Date(e,0,1),i=new Date(e,6,1);le[$n()>>2]=Number(t.getTimezoneOffset()!=i.getTimezoneOffset());var r=o(t),n=o(i),a=X(ki(r),"i8",Y),s=X(ki(n),"i8",Y);i.getTimezoneOffset()<t.getTimezoneOffset()?(le[ta()>>2]=a,le[ta()+4>>2]=s):(le[ta()>>2]=s,le[ta()+4>>2]=a);}function o(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT";}}function hi(e,t){ci();var i=new Date(1e3*le[e>>2]);le[t>>2]=i.getSeconds(),le[t+4>>2]=i.getMinutes(),le[t+8>>2]=i.getHours(),le[t+12>>2]=i.getDate(),le[t+16>>2]=i.getMonth(),le[t+20>>2]=i.getFullYear()-1900,le[t+24>>2]=i.getDay();var r=new Date(i.getFullYear(),0,1),n=(i.getTime()-r.getTime())/864e5|0;le[t+28>>2]=n,le[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));le[t+32>>2]=o;var l=le[ta()+(o?4:0)>>2];return le[t+40>>2]=l,t;}function di(e,t,i){ae.set(ae.subarray(t,t+i),e);}function _i(e){var t=e/1e3;if((h||d)&&self.performance&&self.performance.now)for(var i=self.performance.now();self.performance.now()-i<t;){;}else for(i=Date.now();Date.now()-i<t;){;}return 0;}function pi(e,t){if(0===e)return _t(28),-1;var i=le[e>>2],r=le[e+4>>2];return r<0||r>999999999||i<0?(_t(28),-1):(0!==t&&(le[t>>2]=0,le[t+4>>2]=0),_i(1e6*i+r/1e3));}function mi(){return 0;}function bi(){return 0;}function vi(){return 6;}function yi(){}function gi(e){return e%4==0&&(e%100!=0||e%400==0);}function wi(e,t){for(var i=0,r=0;r<=t;i+=e[r++]){;}return i;}var Ei=[31,29,31,30,31,30,31,31,30,31,30,31],Ci=[31,28,31,30,31,30,31,31,30,31,30,31];function Si(e,t){for(var i=new Date(e.getTime());t>0;){var r=gi(i.getFullYear()),n=i.getMonth(),a=(r?Ei:Ci)[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 ji(e,t,i,r){var n=le[r+40>>2],a={tm_sec:le[r>>2],tm_min:le[r+4>>2],tm_hour:le[r+8>>2],tm_mday:le[r+12>>2],tm_mon:le[r+16>>2],tm_year:le[r+20>>2],tm_wday:le[r+24>>2],tm_yday:le[r+28>>2],tm_isdst:le[r+32>>2],tm_gmtoff:le[r+36>>2],tm_zone:n?Q(n):""},s=Q(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.length<t;){r=i[0]+r;}return r;}function h(e,t){return c(e,t,"0");}function d(e,t){function i(e){return e<0?-1:e>0?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=Si(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+wi(gi(e.tm_year+1900)?Ei:Ci,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:Si(t,7-t.getDay()),r=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(d(i,r)<0){var n=wi(gi(r.getFullYear())?Ei:Ci,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=Si(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()<e.tm_year+1900?e.tm_yday+32-n.getDate():e.tm_yday+1-n.getDate(),h(Math.ceil(t/7),2));},"%w":function w(e){return e.tm_wday;},"%W":function W(e){var t=new Date(e.tm_year,0,1),i=1===t.getDay()?t:Si(t,0===t.getDay()?1:7-t.getDay()+1),r=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(d(i,r)<0){var n=wi(gi(r.getFullYear())?Ei:Ci,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";},"%y":function y(e){return(e.tm_year+1900).toString().substring(2);},"%Y":function Y(e){return e.tm_year+1900;},"%z":function z(e){var t=e.tm_gmtoff,i=t>=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=ki(s,!1);return b.length>t?0:(te(b,e),b.length-1);}function Ti(e){switch(e){case 30:return he;case 85:return 2147418112/he;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":a(navigator))&&navigator.hardwareConcurrency||1;}return _t(28),-1;}function Ai(e){var t=Date.now()/1e3|0;return e&&(le[e>>2]=t),t;}if(St.staticInit(),p){var xi=e("fs"),Mi=e("path");wt.staticInit();}function ki(e,t,i){var r=i>0?i:$(e)+1,n=new Array(r),a=Z(e,n,0,n.length);return t&&(n.length=a),n;}zt=_?function(){var e=i.hrtime();return 1e3*e[0]+e[1]/1e6;}:"undefined"!=typeof dateNow?dateNow:"object"===("undefined"==typeof performance?"undefined":a(performance))&&performance&&"function"==typeof performance.now?function(){return performance.now();}:Date.now,Gt.staticInit();var Pi=[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],Ii=[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],Ui=[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],Ri=[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],Di=[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],Oi=[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","_bsf_list_init","_bsf_list_item_name","_bsf_to_name","_ff_bsf_child_class_next","_hevc_mp4toannexb_init","_hevc_decode_init","_hevc_decode_free","_context_to_name","_codec_child_class_next","_get_category_2157","_aac_decode_init","_aac_decode_close","_init","___stdio_close","___emscripten_stdout_close","_releaseSniffStreamFunc","_initializeDecoderFunc","__getFrame","_closeVideoFunc","_releaseFunc","_initializeDemuxerFunc","_getPacketFunc","_releaseDemuxerFunc","_ffurl_get_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],Fi=[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],Bi=[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_list_filter","_bsf_child_next","_hevc_mp4toannexb_filter","_hevc_update_thread_context","_ff_bsf_get_packet_ref","_codec_child_next","_initSniffStreamFunc","_getSniffStreamPacketFunc","_descriptor_compare","_hls_decode_entry","_avcodec_default_get_format","_ff_startcode_find_candidate_c","_color_table_compare",0,0,0,0,0,0,0,0],Li=[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_sdtp","_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_dmlp","_mov_read_smdm","_mov_read_coll","_mov_read_vpcc","_mov_read_mdcv","_mov_read_clli","_mov_read_dvcc_dvvc","_h264_split","_hevc_split","___stdio_write","_sn_write","_read_stream_live","_read_stream_vod","_setCodecTypeFunc","_read_packet","_demuxBoxFunc","_ffurl_write","_ffurl_read","_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],Ni=[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","_pushBufferFunc","_decodeCodecContextFunc","_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],zi=[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","_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,0,0],Hi=[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","_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],Vi=[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","_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","_bswap_32bpc","_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,0],Yi=[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],qi=[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],Xi=[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],Wi=[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",0,0,0,0,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_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","_ffurl_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,0],Ki=[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"],Qi=[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],Zi=[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","_bsf_list_close","_bsf_list_flush","_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],Ji=[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","_frame_pool_free","_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","_pps_free","_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],$i=[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],er=[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],tr=[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","_eit_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],ir=[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_rgbf32le_to_a","_planar_rgbf32le_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_rgbf32be_to_a","_planar_rgbf32be_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],rr=[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],nr=[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],ar=[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_rgbf32le_to_uv","_planar_rgb9be_to_uv","_planar_rgb10be_to_uv","_planar_rgb12be_to_uv","_planar_rgb14be_to_uv","_planar_rgb16be_to_uv","_planar_rgbf32be_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],sr=[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],or=[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","_y210le_Y_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],lr=[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],fr=[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","_y210le_UV_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],ur=[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],hr=[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],dr=[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],_r=[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],pr=[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"],mr=[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","_yuv2gbrpf32_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],br=[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"],vr={dd:Pi,did:Ii,didd:Ui,fii:Ri,fiii:Di,ii:Oi,iidiiii:Fi,iii:Bi,iiii:Li,iiiii:Ni,iiiiii:zi,iiiiiii:Hi,iiiiiiii:Vi,iiiiij:Yi,iiiji:qi,jiiij:Xi,jiiji:Wi,jiji:Gi,v:Ki,vdiidiiiii:Qi,vi:Zi,vii:Ji,viidi:$i,viifi:er,viii:tr,viiii:ir,viiiid:rr,viiiifii:nr,viiiii:ar,viiiiidd:sr,viiiiii:or,viiiiiifi:lr,viiiiiii:fr,viiiiiiii:ur,viiiiiiiid:cr,viiiiiiiidi:hr,viiiiiiiii:dr,viiiiiiiiii:_r,viiiiiiiiiii:pr,viiiiiiiiiiii:mr,viiiiiiiiiiiiii:br};function yr(e){je(e,"dd");}function gr(e){je(e,"did");}function wr(e){je(e,"didd");}function Er(e){je(e,"fii");}function Cr(e){je(e,"fiii");}function Sr(e){je(e,"ii");}function jr(e){je(e,"iidiiii");}function Tr(e){je(e,"iii");}function Ar(e){je(e,"iiii");}function xr(e){je(e,"iiiii");}function Mr(e){je(e,"iiiiii");}function kr(e){je(e,"iiiiiii");}function Pr(e){je(e,"iiiiiiii");}function Ir(e){je(e,"iiiiij");}function Ur(e){je(e,"iiiji");}function Rr(e){je(e,"jiiij");}function Dr(e){je(e,"jiiji");}function Or(e){je(e,"jiji");}function Fr(e){je(e,"v");}function Br(e){je(e,"vdiidiiiii");}function Lr(e){je(e,"vi");}function Nr(e){je(e,"vii");}function zr(e){je(e,"viidi");}function Hr(e){je(e,"viifi");}function Vr(e){je(e,"viii");}function Yr(e){je(e,"viiii");}function qr(e){je(e,"viiiid");}function Xr(e){je(e,"viiiifii");}function Wr(e){je(e,"viiiii");}function Gr(e){je(e,"viiiiidd");}function Kr(e){je(e,"viiiiii");}function Qr(e){je(e,"viiiiiifi");}function Zr(e){je(e,"viiiiiii");}function Jr(e){je(e,"viiiiiiii");}function $r(e){je(e,"viiiiiiiid");}function en(e){je(e,"viiiiiiiidi");}function tn(e){je(e,"viiiiiiiii");}function rn(e){je(e,"viiiiiiiiii");}function nn(e){je(e,"viiiiiiiiiii");}function an(e){je(e,"viiiiiiiiiiii");}function sn(e){je(e,"viiiiiiiiiiiiii");}function on(e,t){return k[e](t);}function ln(e,t,i){return k[e](t,i);}function fn(e,t,i,r){return k[e](t,i,r);}function un(e,t,i){return k[e](t,i);}function cn(e,t,i,r){return k[e](t,i,r);}function hn(e,t){return k[e](t);}function dn(e,t,i,r,n,a,s){return k[e](t,i,r,n,a,s);}function _n(e,t,i){return k[e](t,i);}function pn(e,t,i,r){return k[e](t,i,r);}function mn(e,t,i,r,n){return k[e](t,i,r,n);}function bn(e,t,i,r,n,a){return k[e](t,i,r,n,a);}function vn(e,t,i,r,n,a,s){return k[e](t,i,r,n,a,s);}function yn(e,t,i,r,n,a,s,o){return k[e](t,i,r,n,a,s,o);}function gn(e,t,i,r,n,a){return k[e](t,i,r,n,a);}function wn(e,t,i,r,n){return k[e](t,i,r,n);}function En(e,t,i,r,n){return k[e](t,i,r,n);}function Cn(e,t,i,r,n){return k[e](t,i,r,n);}function Sn(e,t,i,r){return k[e](t,i,r);}function jn(e){k[e]();}function Tn(e,t,i,r,n,a,s,o,l,f){k[e](t,i,r,n,a,s,o,l,f);}function An(e,t){k[e](t);}function xn(e,t,i){k[e](t,i);}function Mn(e,t,i,r,n){k[e](t,i,r,n);}function kn(e,t,i,r,n){k[e](t,i,r,n);}function Pn(e,t,i,r){k[e](t,i,r);}function In(e,t,i,r,n){k[e](t,i,r,n);}function Un(e,t,i,r,n,a){k[e](t,i,r,n,a);}function Rn(e,t,i,r,n,a,s,o){k[e](t,i,r,n,a,s,o);}function Dn(e,t,i,r,n,a){k[e](t,i,r,n,a);}function On(e,t,i,r,n,a,s,o){k[e](t,i,r,n,a,s,o);}function Fn(e,t,i,r,n,a,s){k[e](t,i,r,n,a,s);}function Bn(e,t,i,r,n,a,s,o,l){k[e](t,i,r,n,a,s,o,l);}function Ln(e,t,i,r,n,a,s,o){k[e](t,i,r,n,a,s,o);}function Nn(e,t,i,r,n,a,s,o,l){k[e](t,i,r,n,a,s,o,l);}function zn(e,t,i,r,n,a,s,o,l,f){k[e](t,i,r,n,a,s,o,l,f);}function Hn(e,t,i,r,n,a,s,o,l,f,u){k[e](t,i,r,n,a,s,o,l,f,u);}function Vn(e,t,i,r,n,a,s,o,l,f){k[e](t,i,r,n,a,s,o,l,f);}function Yn(e,t,i,r,n,a,s,o,l,f,u){k[e](t,i,r,n,a,s,o,l,f,u);}function qn(e,t,i,r,n,a,s,o,l,f,u,c){k[e](t,i,r,n,a,s,o,l,f,u,c);}function Xn(e,t,i,r,n,a,s,o,l,f,u,c,h){k[e](t,i,r,n,a,s,o,l,f,u,c,h);}function Wn(e,t,i,r,n,a,s,o,l,f,u,c,h,d,_){k[e](t,i,r,n,a,s,o,l,f,u,c,h,d,_);}var Gn={},Kn={___buildEnvironment:ht,___lock:dt,___syscall221:Tt,___syscall3:At,___syscall5:xt,___unlock:Mt,___wasi_fd_close:Pt,___wasi_fd_fdstat_get:Ut,___wasi_fd_seek:Dt,___wasi_fd_write:Ft,__emscripten_fetch_free:Bt,__memory_base:1024,__table_base:0,_abort:Lt,_clock:Nt,_clock_gettime:Vt,_emscripten_get_heap_size:Yt,_emscripten_is_main_browser_thread:qt,_emscripten_memcpy_big:di,_emscripten_resize_heap:Wt,_emscripten_start_fetch:$t,_fabs:ei,_getenv:ti,_gettimeofday:ii,_gmtime_r:ni,_llvm_exp2_f64:si,_llvm_log2_f32:oi,_llvm_stackrestore:li,_llvm_stacksave:fi,_llvm_trunc_f64:ui,_localtime_r:hi,_nanosleep:pi,_pthread_cond_destroy:mi,_pthread_cond_init:bi,_pthread_create:vi,_pthread_join:yi,_strftime:ji,_sysconf:Ti,_time:Ai,abortStackOverflow:Se,getTempRet0:O,jsCall_dd:on,jsCall_did:ln,jsCall_didd:fn,jsCall_fii:un,jsCall_fiii:cn,jsCall_ii:hn,jsCall_iidiiii:dn,jsCall_iii:_n,jsCall_iiii:pn,jsCall_iiiii:mn,jsCall_iiiiii:bn,jsCall_iiiiiii:vn,jsCall_iiiiiiii:yn,jsCall_iiiiij:gn,jsCall_iiiji:wn,jsCall_jiiij:En,jsCall_jiiji:Cn,jsCall_jiji:Sn,jsCall_v:jn,jsCall_vdiidiiiii:Tn,jsCall_vi:An,jsCall_vii:xn,jsCall_viidi:Mn,jsCall_viifi:kn,jsCall_viii:Pn,jsCall_viiii:In,jsCall_viiiid:Un,jsCall_viiiifii:Rn,jsCall_viiiii:Dn,jsCall_viiiiidd:On,jsCall_viiiiii:Fn,jsCall_viiiiiifi:Bn,jsCall_viiiiiii:Ln,jsCall_viiiiiiii:Nn,jsCall_viiiiiiiid:zn,jsCall_viiiiiiiidi:Hn,jsCall_viiiiiiiii:Vn,jsCall_viiiiiiiiii:Yn,jsCall_viiiiiiiiiii:qn,jsCall_viiiiiiiiiiii:Xn,jsCall_viiiiiiiiiiiiii:Wn,memory:R,nullFunc_dd:yr,nullFunc_did:gr,nullFunc_didd:wr,nullFunc_fii:Er,nullFunc_fiii:Cr,nullFunc_ii:Sr,nullFunc_iidiiii:jr,nullFunc_iii:Tr,nullFunc_iiii:Ar,nullFunc_iiiii:xr,nullFunc_iiiiii:Mr,nullFunc_iiiiiii:kr,nullFunc_iiiiiiii:Pr,nullFunc_iiiiij:Ir,nullFunc_iiiji:Ur,nullFunc_jiiij:Rr,nullFunc_jiiji:Dr,nullFunc_jiji:Or,nullFunc_v:Fr,nullFunc_vdiidiiiii:Br,nullFunc_vi:Lr,nullFunc_vii:Nr,nullFunc_viidi:zr,nullFunc_viifi:Hr,nullFunc_viii:Vr,nullFunc_viiii:Yr,nullFunc_viiiid:qr,nullFunc_viiiifii:Xr,nullFunc_viiiii:Wr,nullFunc_viiiiidd:Gr,nullFunc_viiiiii:Kr,nullFunc_viiiiiifi:Qr,nullFunc_viiiiiii:Zr,nullFunc_viiiiiiii:Jr,nullFunc_viiiiiiiid:$r,nullFunc_viiiiiiiidi:en,nullFunc_viiiiiiiii:tn,nullFunc_viiiiiiiiii:rn,nullFunc_viiiiiiiiiii:nn,nullFunc_viiiiiiiiiiii:an,nullFunc_viiiiiiiiiiiiii:sn,table:B},Qn=l.asm(Gn,Kn,re);l.asm=Qn;l._AVSniffStreamInit=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._AVSniffStreamInit.apply(null,arguments);};var Zn,Jn=l.___emscripten_environ_constructor=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm.___emscripten_environ_constructor.apply(null,arguments);},$n=(l.___errno_location=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm.___errno_location.apply(null,arguments);},l.__get_daylight=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm.__get_daylight.apply(null,arguments);}),ea=l.__get_timezone=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm.__get_timezone.apply(null,arguments);},ta=l.__get_tzname=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm.__get_tzname.apply(null,arguments);},ia=(l._closeVideo=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._closeVideo.apply(null,arguments);},l._decodeCodecContext=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._decodeCodecContext.apply(null,arguments);},l._decodeVideoFrame=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._decodeVideoFrame.apply(null,arguments);},l._demuxBox=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._demuxBox.apply(null,arguments);},l._exitMissile=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._exitMissile.apply(null,arguments);},l._exitTsMissile=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._exitTsMissile.apply(null,arguments);},l._fflush=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._fflush.apply(null,arguments);},l._free=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._free.apply(null,arguments);}),ra=(l._getAudioCodecID=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._getAudioCodecID.apply(null,arguments);},l._getExtensionInfo=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._getExtensionInfo.apply(null,arguments);},l._getMediaInfo=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._getMediaInfo.apply(null,arguments);},l._getPPS=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._getPPS.apply(null,arguments);},l._getPPSLen=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._getPPSLen.apply(null,arguments);},l._getPacket=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._getPacket.apply(null,arguments);},l._getSEI=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._getSEI.apply(null,arguments);},l._getSEILen=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._getSEILen.apply(null,arguments);},l._getSPS=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._getSPS.apply(null,arguments);},l._getSPSLen=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._getSPSLen.apply(null,arguments);},l._getSniffStreamPkg=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._getSniffStreamPkg.apply(null,arguments);},l._getSniffStreamPkgNoCheckProbe=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._getSniffStreamPkgNoCheckProbe.apply(null,arguments);},l._getVLC=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._getVLC.apply(null,arguments);},l._getVLCLen=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._getVLCLen.apply(null,arguments);},l._getVPS=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._getVPS.apply(null,arguments);},l._getVPSLen=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._getVPSLen.apply(null,arguments);},l._getVideoCodecID=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._getVideoCodecID.apply(null,arguments);},l._initMissile=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._initMissile.apply(null,arguments);},l._initTsMissile=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._initTsMissile.apply(null,arguments);},l._initializeDecoder=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._initializeDecoder.apply(null,arguments);},l._initializeDemuxer=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._initializeDemuxer.apply(null,arguments);},l._initializeSniffStreamModule=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._initializeSniffStreamModule.apply(null,arguments);},l._initializeSniffStreamModuleWithAOpt=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._initializeSniffStreamModuleWithAOpt.apply(null,arguments);},l._malloc=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._malloc.apply(null,arguments);}),na=(l._pushSniffStreamData=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._pushSniffStreamData.apply(null,arguments);},l._registerPlayer=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._registerPlayer.apply(null,arguments);},l._release=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._release.apply(null,arguments);},l._releaseSniffStream=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._releaseSniffStream.apply(null,arguments);},l._setCodecType=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm._setCodecType.apply(null,arguments);},l.establishStackSpace=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm.establishStackSpace.apply(null,arguments);},l.stackAlloc=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm.stackAlloc.apply(null,arguments);}),aa=l.stackRestore=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm.stackRestore.apply(null,arguments);},sa=l.stackSave=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm.stackSave.apply(null,arguments);},oa=(l.dynCall_v=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm.dynCall_v.apply(null,arguments);},l.dynCall_vi=function(){return N(Pe,"you need to wait for the runtime to be ready (e.g. wait for main() to be called)"),N(!Ie,"the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),l.asm.dynCall_vi.apply(null,arguments);});function la(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e;}function fa(e){function t(){Zn||(Zn=!0,L||(Re(),De(),l.onRuntimeInitialized&&l.onRuntimeInitialized(),N(!l._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),Oe()));}e=e||u,Ye>0||(Ee(),Ue(),Ye>0||(l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("");},1),t();},1)):t(),Ce()));}if(l.asm=Qn,Object.getOwnPropertyDescriptor(l,"intArrayFromString")||(l.intArrayFromString=function(){Ze("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"intArrayToString")||(l.intArrayToString=function(){Ze("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),l.ccall=H,l.cwrap=V,Object.getOwnPropertyDescriptor(l,"setValue")||(l.setValue=function(){Ze("'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"getValue")||(l.getValue=function(){Ze("'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"allocate")||(l.allocate=function(){Ze("'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"getMemory")||(l.getMemory=function(){Ze("'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(l,"AsciiToString")||(l.AsciiToString=function(){Ze("'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"stringToAscii")||(l.stringToAscii=function(){Ze("'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"UTF8ArrayToString")||(l.UTF8ArrayToString=function(){Ze("'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"UTF8ToString")||(l.UTF8ToString=function(){Ze("'UTF8ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"stringToUTF8Array")||(l.stringToUTF8Array=function(){Ze("'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"stringToUTF8")||(l.stringToUTF8=function(){Ze("'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"lengthBytesUTF8")||(l.lengthBytesUTF8=function(){Ze("'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"UTF16ToString")||(l.UTF16ToString=function(){Ze("'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"stringToUTF16")||(l.stringToUTF16=function(){Ze("'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"lengthBytesUTF16")||(l.lengthBytesUTF16=function(){Ze("'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"UTF32ToString")||(l.UTF32ToString=function(){Ze("'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"stringToUTF32")||(l.stringToUTF32=function(){Ze("'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"lengthBytesUTF32")||(l.lengthBytesUTF32=function(){Ze("'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"allocateUTF8")||(l.allocateUTF8=function(){Ze("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"stackTrace")||(l.stackTrace=function(){Ze("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"addOnPreRun")||(l.addOnPreRun=function(){Ze("'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"addOnInit")||(l.addOnInit=function(){Ze("'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"addOnPreMain")||(l.addOnPreMain=function(){Ze("'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"addOnExit")||(l.addOnExit=function(){Ze("'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"addOnPostRun")||(l.addOnPostRun=function(){Ze("'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"writeStringToMemory")||(l.writeStringToMemory=function(){Ze("'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"writeArrayToMemory")||(l.writeArrayToMemory=function(){Ze("'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"writeAsciiToMemory")||(l.writeAsciiToMemory=function(){Ze("'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"addRunDependency")||(l.addRunDependency=function(){Ze("'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(l,"removeRunDependency")||(l.removeRunDependency=function(){Ze("'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(l,"ENV")||(l.ENV=function(){Ze("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"FS")||(l.FS=function(){Ze("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"FS_createFolder")||(l.FS_createFolder=function(){Ze("'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(l,"FS_createPath")||(l.FS_createPath=function(){Ze("'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(l,"FS_createDataFile")||(l.FS_createDataFile=function(){Ze("'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(l,"FS_createPreloadedFile")||(l.FS_createPreloadedFile=function(){Ze("'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(l,"FS_createLazyFile")||(l.FS_createLazyFile=function(){Ze("'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(l,"FS_createLink")||(l.FS_createLink=function(){Ze("'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(l,"FS_createDevice")||(l.FS_createDevice=function(){Ze("'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(l,"FS_unlink")||(l.FS_unlink=function(){Ze("'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(l,"GL")||(l.GL=function(){Ze("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"dynamicAlloc")||(l.dynamicAlloc=function(){Ze("'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"loadDynamicLibrary")||(l.loadDynamicLibrary=function(){Ze("'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"loadWebAssemblyModule")||(l.loadWebAssemblyModule=function(){Ze("'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"getLEB")||(l.getLEB=function(){Ze("'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"getFunctionTables")||(l.getFunctionTables=function(){Ze("'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"alignFunctionTables")||(l.alignFunctionTables=function(){Ze("'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"registerFunctions")||(l.registerFunctions=function(){Ze("'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),l.addFunction=P,Object.getOwnPropertyDescriptor(l,"removeFunction")||(l.removeFunction=function(){Ze("'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"getFuncWrapper")||(l.getFuncWrapper=function(){Ze("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"prettyPrint")||(l.prettyPrint=function(){Ze("'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"makeBigInt")||(l.makeBigInt=function(){Ze("'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"dynCall")||(l.dynCall=function(){Ze("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"getCompilerSetting")||(l.getCompilerSetting=function(){Ze("'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"stackSave")||(l.stackSave=function(){Ze("'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"stackRestore")||(l.stackRestore=function(){Ze("'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"stackAlloc")||(l.stackAlloc=function(){Ze("'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"establishStackSpace")||(l.establishStackSpace=function(){Ze("'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"print")||(l.print=function(){Ze("'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"printErr")||(l.printErr=function(){Ze("'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"getTempRet0")||(l.getTempRet0=function(){Ze("'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"setTempRet0")||(l.setTempRet0=function(){Ze("'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"callMain")||(l.callMain=function(){Ze("'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"abort")||(l.abort=function(){Ze("'abort' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"Pointer_stringify")||(l.Pointer_stringify=function(){Ze("'Pointer_stringify' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"warnOnce")||(l.warnOnce=function(){Ze("'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}),Object.getOwnPropertyDescriptor(l,"ALLOC_NORMAL")||Object.defineProperty(l,"ALLOC_NORMAL",{configurable:!0,get:function get(){Ze("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}}),Object.getOwnPropertyDescriptor(l,"ALLOC_STACK")||Object.defineProperty(l,"ALLOC_STACK",{configurable:!0,get:function get(){Ze("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}}),Object.getOwnPropertyDescriptor(l,"ALLOC_DYNAMIC")||Object.defineProperty(l,"ALLOC_DYNAMIC",{configurable:!0,get:function get(){Ze("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}}),Object.getOwnPropertyDescriptor(l,"ALLOC_NONE")||Object.defineProperty(l,"ALLOC_NONE",{configurable:!0,get:function get(){Ze("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)");}}),Object.getOwnPropertyDescriptor(l,"calledRun")||Object.defineProperty(l,"calledRun",{configurable:!0,get:function get(){Ze("'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");}}),Xe=function e(){Zn||fa(),Zn||(Xe=e);},l.run=fa,l.preInit)for("function"==typeof l.preInit&&(l.preInit=[l.preInit]);l.preInit.length>0;){l.preInit.pop()();}U=!0,fa(),t.exports=l;}).call(this,e("_process"),e("buffer").Buffer,"/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<n;_t4++){r<<=8;var _t5=e.readUInt8(i);if(e.isError(_t5))return _t5;r|=_t5;}return r;}t.exports=l,l.prototype.decode=function(e,t){return a.isDecoderBuffer(e)||(e=new a(e,t)),this.tree._decode(e,t);},r(f,s),f.prototype._peekTag=function(e,t,i){if(e.isEmpty())return!1;var r=e.save(),n=u(e,'Failed to peek tag: "'+t+'"');return e.isError(n)?n:(e.restore(r),n.tag===t||n.tagStr===t||n.tagStr+"of"===t||i);},f.prototype._decodeTag=function(e,t,i){var r=u(e,'Failed to decode tag of "'+t+'"');if(e.isError(r))return r;var n=c(e,r.primitive,'Failed to get length of "'+t+'"');if(e.isError(n))return n;if(!i&&r.tag!==t&&r.tagStr!==t&&r.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(r.primitive||null!==n)return e.skip(n,'Failed to match body of: "'+t+'"');var a=e.save(),s=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(s)?s:(n=e.offset-a.offset,e.restore(a),e.skip(n,'Failed to match body of: "'+t+'"'));},f.prototype._skipUntilEnd=function(e,t){for(;;){var _i5=u(e,t);if(e.isError(_i5))return _i5;var _r8=c(e,_i5.primitive,t);if(e.isError(_r8))return _r8;var _n2=void 0;if(_n2=_i5.primitive||null!==_r8?e.skip(_r8):this._skipUntilEnd(e,t),e.isError(_n2))return _n2;if("end"===_i5.tagStr)break;}},f.prototype._decodeList=function(e,t,i,r){var n=[];for(;!e.isEmpty();){var _t6=this._peekTag(e,"end");if(e.isError(_t6))return _t6;var _a=i.decode(e,"der",r);if(e.isError(_a)&&_t6)break;n.push(_a);}return n;},f.prototype._decodeStr=function(e,t){if("bitstr"===t){var _t7=e.readUInt8();return e.isError(_t7)?_t7:{unused:_t7,data:e.raw()};}if("bmpstr"===t){var _t8=e.raw();if(_t8.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");var _i6="";for(var _e4=0;_e4<_t8.length/2;_e4++){_i6+=String.fromCharCode(_t8.readUInt16BE(2*_e4));}return _i6;}if("numstr"===t){var _t9=e.raw().toString("ascii");return this._isNumstr(_t9)?_t9:e.error("Decoding of string type: numstr unsupported characters");}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){var _t0=e.raw().toString("ascii");return this._isPrintstr(_t0)?_t0:e.error("Decoding of string type: printstr unsupported characters");}return /str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported");},f.prototype._decodeObjid=function(e,t,i){var r;var n=[];var a=0,s=0;for(;!e.isEmpty();){s=e.readUInt8(),a<<=7,a|=127&s,0==(128&s)&&(n.push(a),a=0);}128&s&&n.push(a);var o=n[0]/40|0,l=n[0]%40;if(r=i?n:[o,l].concat(n.slice(1)),t){var _e5=t[r.join(" ")];void 0===_e5&&(_e5=t[r.join(".")]),void 0!==_e5&&(r=_e5);}return r;},f.prototype._decodeTime=function(e,t){var i=e.raw().toString();var r,n,a,s,o,l;if("gentime"===t)r=0|i.slice(0,4),n=0|i.slice(4,6),a=0|i.slice(6,8),s=0|i.slice(8,10),o=0|i.slice(10,12),l=0|i.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");r=0|i.slice(0,2),n=0|i.slice(2,4),a=0|i.slice(4,6),s=0|i.slice(6,8),o=0|i.slice(8,10),l=0|i.slice(10,12),r=r<70?2e3+r:1900+r;}return Date.UTC(r,n-1,a,s,o,l,0);},f.prototype._decodeNull=function(){return null;},f.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t;},f.prototype._decodeInt=function(e,t){var i=e.raw();var r=new n(i);return t&&(r=t[r.toString(10)]||r),r;},f.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree;};},{"../base/buffer":4,"../base/node":6,"../constants/der":8,"bn.js":16,inherits:136}],11:[function(e,t,i){"use strict";var r=i;r.der=e("./der"),r.pem=e("./pem");},{"./der":10,"./pem":12}],12:[function(e,t,i){"use strict";var r=e("inherits"),n=e("safer-buffer").Buffer,a=e("./der");function s(e){a.call(this,e),this.enc="pem";}r(s,a),t.exports=s,s.prototype.decode=function(e,t){var i=e.toString().split(/[\r\n]+/g),r=t.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/;var o=-1,l=-1;for(var _e6=0;_e6<i.length;_e6++){var _t1=i[_e6].match(s);if(null!==_t1&&_t1[2]===r){if(-1!==o){if("END"!==_t1[1])break;l=_e6;break;}if("BEGIN"!==_t1[1])break;o=_e6;}}if(-1===o||-1===l)throw new Error("PEM section not found for: "+r);var f=i.slice(o+1,l).join("");f.replace(/[^a-z0-9+/=]+/gi,"");var u=n.from(f,"base64");return a.prototype.decode.call(this,u,t);};},{"./der":10,inherits:136,"safer-buffer":185}],13:[function(e,t,i){"use strict";var r=e("inherits"),n=e("safer-buffer").Buffer,a=e("../base/node"),s=e("../constants/der");function o(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new l(),this.tree._init(e.body);}function l(e){a.call(this,"der",e);}function f(e){return e<10?"0"+e:e;}t.exports=o,o.prototype.encode=function(e,t){return this.tree._encode(e,t).join();},r(l,a),l.prototype._encodeComposite=function(e,t,i,r){var a=function(e,t,i,r){var n;"seqof"===e?e="seq":"setof"===e&&(e="set");if(s.tagByName.hasOwnProperty(e))n=s.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return r.error("Unknown tag: "+e);n=e;}if(n>=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,_t10=r.length;_t10>0;_e9--,_t10>>=8){l[_e9]=255&_t10;}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 _t11=n.alloc(2*e.length);for(var _i7=0;_i7<e.length;_i7++){_t11.writeUInt16BE(e.charCodeAt(_i7),2*_i7);}return this._createEncoderBuffer(_t11);}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported");},l.prototype._encodeObjid=function(e,t,i){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s.]+/g);for(var _t12=0;_t12<e.length;_t12++){e[_t12]|=0;}}else if(Array.isArray(e)){e=e.slice();for(var _t13=0;_t13<e.length;_t13++){e[_t13]|=0;}}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!i){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1]);}var r=0;for(var _t14=0;_t14<e.length;_t14++){var _i8=e[_t14];for(r++;_i8>=128;_i8>>=7){r++;}}var a=n.alloc(r);var s=a.length-1;for(var _t15=e.length-1;_t15>=0;_t15--){var _i9=e[_t15];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 _t16=e.toArray();!e.sign&&128&_t16[0]&&_t16.unshift(0),e=n.from(_t16);}if(n.isBuffer(e)){var _t17=e.length;0===e.length&&_t17++;var _i0=n.alloc(_t17);return e.copy(_i0),0===e.length&&(_i0[0]=0),this._createEncoderBuffer(_i0);}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);var i=1;for(var _t18=e;_t18>=256;_t18>>=8){i++;}var r=new Array(i);for(var _t19=r.length-1;_t19>=0;_t19--){r[_t19]=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<a.length;n++){if(a[n]!==r.defaultBuffer[n])return!1;}return!0;};},{"../base/node":6,"../constants/der":8,inherits:136,"safer-buffer":185}],14:[function(e,t,i){"use strict";var r=i;r.der=e("./der"),r.pem=e("./pem");},{"./der":13,"./pem":15}],15:[function(e,t,i){"use strict";var r=e("inherits"),n=e("./der");function a(e){n.call(this,e),this.enc="pem";}r(a,n),t.exports=a,a.prototype.encode=function(e,t){var i=n.prototype.encode.call(this,e).toString("base64"),r=["-----BEGIN "+t.label+"-----"];for(var _e0=0;_e0<i.length;_e0+=64){r.push(i.slice(_e0,_e0+64));}return r.push("-----END "+t.label+"-----"),r.join("\n");};},{"./der":13,inherits:136}],16:[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 r=0,n=Math.min(e.length,i),a=t;a<n;a++){var s=e.charCodeAt(a)-48;r<<=4,r|=s>=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<a;s++){var o=e.charCodeAt(s)-48;n*=r,n+=o>=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<this.length;n++){this.words[n]=0;}var a,s,o=0;if("be"===i)for(n=e.length-1,a=0;n>=0;n-=3){s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);}else if("le"===i)for(n=0,a=0;n<e.length;n+=3){s=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>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<this.length;i++){this.words[i]=0;}var r,n,a=0;for(i=e.length-6,r=0;i>=t;i-=6){n=o(e,i,i+6),this.words[r]|=n<<a&67108863,this.words[r+1]|=n>>>26-a&4194303,(a+=24)>=26&&(a-=26,r++);}i+6!==t&&(n=o(e,t,i+6),this.words[r]|=n<<a&67108863,this.words[r+1]|=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;u<o;u+=r){f=l(e,u,u+r,t),this.imuln(n),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);}if(0!==s){var c=1;for(f=l(e,u,e.length,t),u=0;u<s;u++){c*=t;}this.imuln(c),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);}},a.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++){e.words[t]=this.words[t];}e.length=this.length,e.negative=this.negative,e.red=this.red;},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e;},a.prototype._expand=function(e){for(;this.length<e;){this.words[this.length++]=0;}return this;},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];){this.length--;}return this._normSign();},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this;},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">";};var 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<r;f++){for(var u=l>>>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<this.length;s++){var o=this.words[s],l=(16777215&(o<<n|a)).toString(16);i=0!==(a=o>>>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<a;o++){f[o]=0;}}else{for(o=0;o<a-n;o++){f[o]=0;}for(o=0;!u.isZero();o++){s=u.andln(255),u.iushrn(8),f[a-o-1]=s;}}return f;},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;t<this.length;t++){var i=this._zeroBits(this.words[t]);if(e+=i,26!==i)break;}return e;},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8);},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone();},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone();},a.prototype.isNeg=function(){return 0!==this.negative;},a.prototype.neg=function(){return this.clone().ineg();},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this;},a.prototype.iuor=function(e){for(;this.length<e.length;){this.words[this.length++]=0;}for(var t=0;t<e.length;t++){this.words[t]=this.words[t]|e.words[t];}return this.strip();},a.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e);},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this);},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this);},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var i=0;i<t.length;i++){this.words[i]=this.words[i]&e.words[i];}return this.length=t.length,this.strip();},a.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e);},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this);},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this);},a.prototype.iuxor=function(e){var t,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var r=0;r<i.length;r++){this.words[r]=t.words[r]^i.words[r];}if(this!==t)for(;r<t.length;r++){this.words[r]=t.words[r];}return this.length=t.length,this.strip();},a.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e);},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this);},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this);},a.prototype.inotn=function(e){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;n<t;n++){this.words[n]=67108863&~this.words[n];}return i>0&&(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<<n:this.words[i]&~(1<<n),this.strip();},a.prototype.iadd=function(e){var t,i,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(i=this,r=e):(i=e,r=this);for(var n=0,a=0;a<r.length;a++){t=(0|i.words[a])+(0|r.words[a])+n,this.words[a]=67108863&t,n=t>>>26;}for(;0!==n&&a<i.length;a++){t=(0|i.words[a])+n,this.words[a]=67108863&t,n=t>>>26;}if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;a<i.length;a++){this.words[a]=i.words[a];}return this;},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this);},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign();}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var 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<r.length;s++){a=(t=(0|i.words[s])-(0|r.words[s])+a)>>26,this.words[s]=67108863&t;}for(;0!==a&&s<i.length;s++){a=(t=(0|i.words[s])+a)>>26,this.words[s]=67108863&t;}if(0===a&&s<i.length&&i!==this)for(;s<i.length;s++){this.words[s]=i.words[s];}return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip();},a.prototype.sub=function(e){return this.clone().isub(e);};var d=function d(e,t,i){var r,n,a,s=e.words,o=t.words,l=i.words,f=0,u=0|s[0],c=8191&u,h=u>>>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,U=P>>>13,R=0|s[8],D=8191&R,O=R>>>13,F=0|s[9],B=8191&F,L=F>>>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(U,z)|0,a=Math.imul(U,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(O,z)|0,a=Math.imul(O,H),r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,q)|0)+Math.imul(U,Y)|0,a=a+Math.imul(U,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(B,z),n=(n=Math.imul(B,H))+Math.imul(L,z)|0,a=Math.imul(L,H),r=r+Math.imul(D,Y)|0,n=(n=n+Math.imul(D,q)|0)+Math.imul(O,Y)|0,a=a+Math.imul(O,q)|0,r=r+Math.imul(I,W)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(U,W)|0,a=a+Math.imul(U,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(B,Y),n=(n=Math.imul(B,q))+Math.imul(L,Y)|0,a=Math.imul(L,q),r=r+Math.imul(D,W)|0,n=(n=n+Math.imul(D,G)|0)+Math.imul(O,W)|0,a=a+Math.imul(O,G)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(U,Q)|0,a=a+Math.imul(U,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(B,W),n=(n=Math.imul(B,G))+Math.imul(L,W)|0,a=Math.imul(L,G),r=r+Math.imul(D,Q)|0,n=(n=n+Math.imul(D,Z)|0)+Math.imul(O,Q)|0,a=a+Math.imul(O,Z)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(U,$)|0,a=a+Math.imul(U,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(B,Q),n=(n=Math.imul(B,Z))+Math.imul(L,Q)|0,a=Math.imul(L,Z),r=r+Math.imul(D,$)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(O,$)|0,a=a+Math.imul(O,ee)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(U,ie)|0,a=a+Math.imul(U,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(B,$),n=(n=Math.imul(B,ee))+Math.imul(L,$)|0,a=Math.imul(L,ee),r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(O,ie)|0,a=a+Math.imul(O,re)|0,r=r+Math.imul(I,ae)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(U,ae)|0,a=a+Math.imul(U,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(B,ie),n=(n=Math.imul(B,re))+Math.imul(L,ie)|0,a=Math.imul(L,re),r=r+Math.imul(D,ae)|0,n=(n=n+Math.imul(D,se)|0)+Math.imul(O,ae)|0,a=a+Math.imul(O,se)|0,r=r+Math.imul(I,le)|0,n=(n=n+Math.imul(I,fe)|0)+Math.imul(U,le)|0,a=a+Math.imul(U,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(B,ae),n=(n=Math.imul(B,se))+Math.imul(L,ae)|0,a=Math.imul(L,se),r=r+Math.imul(D,le)|0,n=(n=n+Math.imul(D,fe)|0)+Math.imul(O,le)|0,a=a+Math.imul(O,fe)|0,r=r+Math.imul(I,ce)|0,n=(n=n+Math.imul(I,he)|0)+Math.imul(U,ce)|0,a=a+Math.imul(U,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(B,le),n=(n=Math.imul(B,fe))+Math.imul(L,le)|0,a=Math.imul(L,fe),r=r+Math.imul(D,ce)|0,n=(n=n+Math.imul(D,he)|0)+Math.imul(O,ce)|0,a=a+Math.imul(O,he)|0;var Ie=(f+(r=r+Math.imul(I,_e)|0)|0)+((8191&(n=(n=n+Math.imul(I,pe)|0)+Math.imul(U,_e)|0))<<13)|0;f=((a=a+Math.imul(U,pe)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(B,ce),n=(n=Math.imul(B,he))+Math.imul(L,ce)|0,a=Math.imul(L,he);var Ue=(f+(r=r+Math.imul(D,_e)|0)|0)+((8191&(n=(n=n+Math.imul(D,pe)|0)+Math.imul(O,_e)|0))<<13)|0;f=((a=a+Math.imul(O,pe)|0)+(n>>>13)|0)+(Ue>>>26)|0,Ue&=67108863;var Re=(f+(r=Math.imul(B,_e))|0)+((8191&(n=(n=Math.imul(B,pe))+Math.imul(L,_e)|0))<<13)|0;return f=((a=Math.imul(L,pe))+(n>>>13)|0)+(Re>>>26)|0,Re&=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]=Ue,l[18]=Re,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<i.length-1;a++){var s=n;n=0;for(var o=67108863&r,l=Math.min(a,t.length-1),f=Math.max(0,a-e.length+1);f<=l;f++){var u=a-f,c=(0|e.words[u])*(0|t.words[f]),h=67108863&c;o=67108863&(h=h+o|0),n+=(s=(s=s+(c/67108864|0)|0)+(h>>>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<e;r++){t[r]=this.revBin(r,i,e);}return t;},p.prototype.revBin=function(e,t,i){if(0===e||e===i-1)return e;for(var r=0,n=0;n<t;n++){r|=(1&e)<<t-n-1,e>>=1;}return r;},p.prototype.permute=function(e,t,i,r,n,a){for(var s=0;s<a;s++){r[s]=t[e[s]],n[s]=i[e[s]];}},p.prototype.transform=function(e,t,i,r,n,a){this.permute(a,e,t,i,r,n);for(var s=1;s<n;s<<=1){for(var o=s<<1,l=Math.cos(2*Math.PI/o),f=Math.sin(2*Math.PI/o),u=0;u<n;u+=o){for(var c=l,h=f,d=0;d<s;d++){var _=i[u+d],p=r[u+d],m=i[u+d+s],b=r[u+d+s],v=c*m-h*b;b=c*b+h*m,m=v,i[u+d]=_+m,r[u+d]=p+b,i[u+d+s]=_-m,r[u+d+s]=p-b,d!==o&&(v=l*c-f*h,h=l*h+f*c,c=v);}}}},p.prototype.guessLen13b=function(e,t){var i=1|Math.max(t,e),r=1&i,n=0;for(i=i/2|0;i;i>>>=1){n++;}return 1<<n+1+r;},p.prototype.conjugate=function(e,t,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=e[r];e[r]=e[i-r-1],e[i-r-1]=n,n=t[r],t[r]=-t[i-r-1],t[i-r-1]=-n;}},p.prototype.normalize13b=function(e,t){for(var i=0,r=0;r<t/2;r++){var n=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+i;e[r]=67108863&n,i=n<67108864?0:n/67108864|0;}return e;},p.prototype.convert13b=function(e,t,i,n){for(var a=0,s=0;s<t;s++){a+=0|e[s],i[2*s]=8191&a,a>>>=13,i[2*s+1]=8191&a,a>>>=13;}for(s=2*t;s<n;++s){i[s]=0;}r(0===a),r(0==(-8192&a));},p.prototype.stub=function(e){for(var t=new Array(e),i=0;i<e;i++){t[i]=0;}return t;},p.prototype.mulp=function(e,t,i){var r=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(r),a=this.stub(r),s=new Array(r),o=new Array(r),l=new Array(r),f=new Array(r),u=new Array(r),c=new Array(r),h=i.words;h.length=r,this.convert13b(e.words,e.length,s,r),this.convert13b(t.words,t.length,f,r),this.transform(s,a,o,l,r,n),this.transform(f,a,u,c,r,n);for(var d=0;d<r;d++){var _=o[d]*u[d]-l[d]*c[d];l[d]=o[d]*c[d]+l[d]*u[d],o[d]=_;}return this.conjugate(o,l,r),this.transform(o,l,h,a,r,n),this.conjugate(h,a,r),this.normalize13b(h,r),i.negative=e.negative^t.negative,i.length=e.length+t.length,i.strip();},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t);},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),_(this,e,t);},a.prototype.imul=function(e){return this.clone().mulTo(e,this);},a.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,i=0;i<this.length;i++){var n=(0|this.words[i])*e,a=(67108863&n)+(67108863&t);t>>=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<t.length;i++){var r=i/26|0,n=i%26;t[i]=(e.words[r]&1<<n)>>>n;}return t;}(e);if(0===t.length)return new a(1);for(var i=this,r=0;r<t.length&&0===t[r];r++,i=i.sqr()){;}if(++r<t.length)for(var n=i.sqr();r<t.length;r++,n=n.sqr()){0!==t[r]&&(i=i.mul(n));}return i;},a.prototype.iushln=function(e){r("number"==typeof e&&e>=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<this.length;t++){var o=this.words[t]&a,l=(0|this.words[t])-o<<i;this.words[t]=l|s,s=o>>>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<n;t++){this.words[t]=0;}this.length+=n;}return this.strip();},a.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e);},a.prototype.iushrn=function(e,t,i){var n;r("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<<a,l=i;if(n-=s,n=Math.max(0,n),l){for(var f=0;f<s;f++){l.words[f]=this.words[f];}l.length=s;}if(0===s);else if(this.length>s)for(this.length-=s,f=0;f<this.length;f++){this.words[f]=this.words[f+s];}else this.words[0]=0,this.length=1;var u=0;for(f=this.length-1;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<<t;return!(this.length<=i)&&!!(this.words[i]&n);},a.prototype.imaskn=function(e){r("number"==typeof e&&e>=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<<t;this.words[this.length-1]&=n;}return this.strip();},a.prototype.maskn=function(e){return this.clone().imaskn(e);},a.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e);},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++){this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;}return this.length=Math.max(this.length,t+1),this;},a.prototype.isubn=function(e){if(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<this.length&&this.words[t]<0;t++){this.words[t]+=67108864,this.words[t+1]-=1;}return this.strip();},a.prototype.addn=function(e){return this.clone().iaddn(e);},a.prototype.subn=function(e){return this.clone().isubn(e);},a.prototype.iabs=function(){return this.negative=0,this;},a.prototype.abs=function(){return this.clone().iabs();},a.prototype._ishlnsubmul=function(e,t,i){var n,a,s=e.length+i;this._expand(s);var o=0;for(n=0;n<e.length;n++){a=(0|this.words[n+i])+o;var l=(0|e.words[n])*t;o=((a-=67108863&l)>>26)-(l/67108864|0),this.words[n+i]=67108863&a;}for(;n<this.length-i;n++){o=(a=(0|this.words[n+i])+o)>>26,this.words[n+i]=67108863&a;}if(0===o)return this.strip();for(r(-1===o),o=0,n=0;n<this.length;n++){o=(a=-(0|this.words[n])+o)>>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<o.length;f++){o.words[f]=0;}}var u=r.clone()._ishlnsubmul(n,1,l);0===u.negative&&(r=u,o&&(o.words[l]=1));for(var c=l-1;c>=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<<t;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var a=n,s=i;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>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:n<e?-1:1;}return 0!==this.negative?0|-t:t;},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t;},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|e.words[i];if(r!==n){r<n?t=-1:r>n&&(t=1);break;}}return t;},a.prototype.gtn=function(e){return 1===this.cmpn(e);},a.prototype.gt=function(e){return 1===this.cmp(e);},a.prototype.gten=function(e){return this.cmpn(e)>=0;},a.prototype.gte=function(e){return this.cmp(e)>=0;},a.prototype.ltn=function(e){return-1===this.cmpn(e);},a.prototype.lt=function(e){return-1===this.cmp(e);},a.prototype.lten=function(e){return this.cmpn(e)<=0;},a.prototype.lte=function(e){return this.cmp(e)<=0;},a.prototype.eqn=function(e){return 0===this.cmpn(e);},a.prototype.eq=function(e){return 0===this.cmp(e);},a.red=function(e){return new 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=t<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?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<i;r++){t.words[r]=e.words[r];}if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var n=e.words[9];for(t.words[t.length++]=4194303&n,r=10;r<e.length;r++){var a=0|e.words[r];e.words[r-10]=(4194303&a)<<4|n>>>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<e.length;i++){var r=0|e.words[i];t+=977*r,e.words[i]=67108863&t,t=64*r+(t/67108864|0);}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e;},n(y,b),n(g,b),n(w,b),w.prototype.imulK=function(e){for(var t=0,i=0;i<e.length;i++){var r=19*(0|e.words[i])+t,n=67108863&r;r>>>=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<i.length;r++){i[r]=this.mul(i[r-1],e);}var n=i[0],s=0,o=0,l=t.bitLength()%26;for(0===l&&(l=26),r=t.length-1;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<c;i+=4){t=n[e.charCodeAt(i)]<<18|n[e.charCodeAt(i+1)]<<12|n[e.charCodeAt(i+2)]<<6|n[e.charCodeAt(i+3)],l[u++]=t>>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;s<o;s+=16383){a.push(u(e,s,s+16383>o?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;o<l;++o){r[o]=s[o],n[s.charCodeAt(o)]=o;}function f(e){var t=e.length;if(t%4>0)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<i;o+=3){n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),s.push(r[(a=n)>>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<a;o++){var l,f=e.charCodeAt(o)-48;n<<=4,n|=l=f>=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<o;l++){var f=e.charCodeAt(l)-48;a*=n,s=f>=49?f-49+10:f>=17?f-17+10:f,r(f>=0&&s<n,"Invalid character"),a+=s;}return a;}function f(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red;}if(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<this.length;n++){this.words[n]=0;}var a,s,o=0;if("be"===i)for(n=e.length-1,a=0;n>=0;n-=3){s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);}else if("le"===i)for(n=0,a=0;n<e.length;n+=3){s=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[a]|=s<<o&67108863,this.words[a+1]=s>>>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<this.length;i++){this.words[i]=0;}var r,n,a=0;for(i=e.length-6,r=0;i>=t;i-=6){n=o(e,i,i+6),this.words[r]|=n<<a&67108863,this.words[r+1]|=n>>>26-a&4194303,(a+=24)>=26&&(a-=26,r++);}i+6!==t&&(n=o(e,t,i+6),this.words[r]|=n<<a&67108863,this.words[r+1]|=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;u<o;u+=r){f=l(e,u,u+r,t),this.imuln(n),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);}if(0!==s){var c=1;for(f=l(e,u,e.length,t),u=0;u<s;u++){c*=t;}this.imuln(c),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);}},a.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++){e.words[t]=this.words[t];}e.length=this.length,e.negative=this.negative,e.red=this.red;},a.prototype._move=function(e){f(e,this);},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e;},a.prototype._expand=function(e){for(;this.length<e;){this.words[this.length++]=0;}return this;},a.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];){this.length--;}return this._normSign();},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this;},"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?"<BN-R: ":"<BN: ")+this.toString(16)+">";}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<this.length;s++){var o=this.words[s],l=(16777215&(o<<n|a)).toString(16);i=0!==(a=o>>>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<r;f++){for(var u=l>>>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<this.length;n++){var s=this.words[n]<<a|r;e[i++]=255&s,i<e.length&&(e[i++]=s>>8&255),i<e.length&&(e[i++]=s>>16&255),6===a?(i<e.length&&(e[i++]=s>>24&255),r=0,a=0):(r=s>>>24,a+=2);}if(i<e.length)for(e[i++]=r;i<e.length;){e[i++]=0;}},a.prototype._toArrayLikeBE=function(e,t){for(var i=e.length-1,r=0,n=0,a=0;n<this.length;n++){var s=this.words[n]<<a|r;e[i--]=255&s,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;t<this.length;t++){var i=this._zeroBits(this.words[t]);if(e+=i,26!==i)break;}return e;},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8);},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone();},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone();},a.prototype.isNeg=function(){return 0!==this.negative;},a.prototype.neg=function(){return this.clone().ineg();},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this;},a.prototype.iuor=function(e){for(;this.length<e.length;){this.words[this.length++]=0;}for(var t=0;t<e.length;t++){this.words[t]=this.words[t]|e.words[t];}return this._strip();},a.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e);},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this);},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this);},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var i=0;i<t.length;i++){this.words[i]=this.words[i]&e.words[i];}return this.length=t.length,this._strip();},a.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e);},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this);},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this);},a.prototype.iuxor=function(e){var t,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var r=0;r<i.length;r++){this.words[r]=t.words[r]^i.words[r];}if(this!==t)for(;r<t.length;r++){this.words[r]=t.words[r];}return this.length=t.length,this._strip();},a.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e);},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this);},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this);},a.prototype.inotn=function(e){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;n<t;n++){this.words[n]=67108863&~this.words[n];}return i>0&&(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<<n:this.words[i]&~(1<<n),this._strip();},a.prototype.iadd=function(e){var t,i,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(i=this,r=e):(i=e,r=this);for(var n=0,a=0;a<r.length;a++){t=(0|i.words[a])+(0|r.words[a])+n,this.words[a]=67108863&t,n=t>>>26;}for(;0!==n&&a<i.length;a++){t=(0|i.words[a])+n,this.words[a]=67108863&t,n=t>>>26;}if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;a<i.length;a++){this.words[a]=i.words[a];}return this;},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this);},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign();}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var 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<r.length;s++){a=(t=(0|i.words[s])-(0|r.words[s])+a)>>26,this.words[s]=67108863&t;}for(;0!==a&&s<i.length;s++){a=(t=(0|i.words[s])+a)>>26,this.words[s]=67108863&t;}if(0===a&&s<i.length&&i!==this)for(;s<i.length;s++){this.words[s]=i.words[s];}return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this._strip();},a.prototype.sub=function(e){return this.clone().isub(e);};var p=function p(e,t,i){var r,n,a,s=e.words,o=t.words,l=i.words,f=0,u=0|s[0],c=8191&u,h=u>>>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,U=P>>>13,R=0|s[8],D=8191&R,O=R>>>13,F=0|s[9],B=8191&F,L=F>>>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(U,z)|0,a=Math.imul(U,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(O,z)|0,a=Math.imul(O,H),r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,q)|0)+Math.imul(U,Y)|0,a=a+Math.imul(U,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(B,z),n=(n=Math.imul(B,H))+Math.imul(L,z)|0,a=Math.imul(L,H),r=r+Math.imul(D,Y)|0,n=(n=n+Math.imul(D,q)|0)+Math.imul(O,Y)|0,a=a+Math.imul(O,q)|0,r=r+Math.imul(I,W)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(U,W)|0,a=a+Math.imul(U,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(B,Y),n=(n=Math.imul(B,q))+Math.imul(L,Y)|0,a=Math.imul(L,q),r=r+Math.imul(D,W)|0,n=(n=n+Math.imul(D,G)|0)+Math.imul(O,W)|0,a=a+Math.imul(O,G)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(U,Q)|0,a=a+Math.imul(U,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(B,W),n=(n=Math.imul(B,G))+Math.imul(L,W)|0,a=Math.imul(L,G),r=r+Math.imul(D,Q)|0,n=(n=n+Math.imul(D,Z)|0)+Math.imul(O,Q)|0,a=a+Math.imul(O,Z)|0,r=r+Math.imul(I,$)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(U,$)|0,a=a+Math.imul(U,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(B,Q),n=(n=Math.imul(B,Z))+Math.imul(L,Q)|0,a=Math.imul(L,Z),r=r+Math.imul(D,$)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(O,$)|0,a=a+Math.imul(O,ee)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(U,ie)|0,a=a+Math.imul(U,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(B,$),n=(n=Math.imul(B,ee))+Math.imul(L,$)|0,a=Math.imul(L,ee),r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(O,ie)|0,a=a+Math.imul(O,re)|0,r=r+Math.imul(I,ae)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(U,ae)|0,a=a+Math.imul(U,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(B,ie),n=(n=Math.imul(B,re))+Math.imul(L,ie)|0,a=Math.imul(L,re),r=r+Math.imul(D,ae)|0,n=(n=n+Math.imul(D,se)|0)+Math.imul(O,ae)|0,a=a+Math.imul(O,se)|0,r=r+Math.imul(I,le)|0,n=(n=n+Math.imul(I,fe)|0)+Math.imul(U,le)|0,a=a+Math.imul(U,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(B,ae),n=(n=Math.imul(B,se))+Math.imul(L,ae)|0,a=Math.imul(L,se),r=r+Math.imul(D,le)|0,n=(n=n+Math.imul(D,fe)|0)+Math.imul(O,le)|0,a=a+Math.imul(O,fe)|0,r=r+Math.imul(I,ce)|0,n=(n=n+Math.imul(I,he)|0)+Math.imul(U,ce)|0,a=a+Math.imul(U,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(B,le),n=(n=Math.imul(B,fe))+Math.imul(L,le)|0,a=Math.imul(L,fe),r=r+Math.imul(D,ce)|0,n=(n=n+Math.imul(D,he)|0)+Math.imul(O,ce)|0,a=a+Math.imul(O,he)|0;var Ie=(f+(r=r+Math.imul(I,_e)|0)|0)+((8191&(n=(n=n+Math.imul(I,pe)|0)+Math.imul(U,_e)|0))<<13)|0;f=((a=a+Math.imul(U,pe)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(B,ce),n=(n=Math.imul(B,he))+Math.imul(L,ce)|0,a=Math.imul(L,he);var Ue=(f+(r=r+Math.imul(D,_e)|0)|0)+((8191&(n=(n=n+Math.imul(D,pe)|0)+Math.imul(O,_e)|0))<<13)|0;f=((a=a+Math.imul(O,pe)|0)+(n>>>13)|0)+(Ue>>>26)|0,Ue&=67108863;var Re=(f+(r=Math.imul(B,_e))|0)+((8191&(n=(n=Math.imul(B,pe))+Math.imul(L,_e)|0))<<13)|0;return f=((a=Math.imul(L,pe))+(n>>>13)|0)+(Re>>>26)|0,Re&=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]=Ue,l[18]=Re,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<i.length-1;a++){var s=n;n=0;for(var o=67108863&r,l=Math.min(a,t.length-1),f=Math.max(0,a-e.length+1);f<=l;f++){var u=a-f,c=(0|e.words[u])*(0|t.words[f]),h=67108863&c;o=67108863&(h=h+o|0),n+=(s=(s=s+(c/67108864|0)|0)+(h>>>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<e;r++){t[r]=this.revBin(r,i,e);}return t;},v.prototype.revBin=function(e,t,i){if(0===e||e===i-1)return e;for(var r=0,n=0;n<t;n++){r|=(1&e)<<t-n-1,e>>=1;}return r;},v.prototype.permute=function(e,t,i,r,n,a){for(var s=0;s<a;s++){r[s]=t[e[s]],n[s]=i[e[s]];}},v.prototype.transform=function(e,t,i,r,n,a){this.permute(a,e,t,i,r,n);for(var s=1;s<n;s<<=1){for(var o=s<<1,l=Math.cos(2*Math.PI/o),f=Math.sin(2*Math.PI/o),u=0;u<n;u+=o){for(var c=l,h=f,d=0;d<s;d++){var _=i[u+d],p=r[u+d],m=i[u+d+s],b=r[u+d+s],v=c*m-h*b;b=c*b+h*m,m=v,i[u+d]=_+m,r[u+d]=p+b,i[u+d+s]=_-m,r[u+d+s]=p-b,d!==o&&(v=l*c-f*h,h=l*h+f*c,c=v);}}}},v.prototype.guessLen13b=function(e,t){var i=1|Math.max(t,e),r=1&i,n=0;for(i=i/2|0;i;i>>>=1){n++;}return 1<<n+1+r;},v.prototype.conjugate=function(e,t,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=e[r];e[r]=e[i-r-1],e[i-r-1]=n,n=t[r],t[r]=-t[i-r-1],t[i-r-1]=-n;}},v.prototype.normalize13b=function(e,t){for(var i=0,r=0;r<t/2;r++){var n=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+i;e[r]=67108863&n,i=n<67108864?0:n/67108864|0;}return e;},v.prototype.convert13b=function(e,t,i,n){for(var a=0,s=0;s<t;s++){a+=0|e[s],i[2*s]=8191&a,a>>>=13,i[2*s+1]=8191&a,a>>>=13;}for(s=2*t;s<n;++s){i[s]=0;}r(0===a),r(0==(-8192&a));},v.prototype.stub=function(e){for(var t=new Array(e),i=0;i<e;i++){t[i]=0;}return t;},v.prototype.mulp=function(e,t,i){var r=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(r),a=this.stub(r),s=new Array(r),o=new Array(r),l=new Array(r),f=new Array(r),u=new Array(r),c=new Array(r),h=i.words;h.length=r,this.convert13b(e.words,e.length,s,r),this.convert13b(t.words,t.length,f,r),this.transform(s,a,o,l,r,n),this.transform(f,a,u,c,r,n);for(var d=0;d<r;d++){var _=o[d]*u[d]-l[d]*c[d];l[d]=o[d]*c[d]+l[d]*u[d],o[d]=_;}return this.conjugate(o,l,r),this.transform(o,l,h,a,r,n),this.conjugate(h,a,r),this.normalize13b(h,r),i.negative=e.negative^t.negative,i.length=e.length+t.length,i._strip();},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t);},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),b(this,e,t);},a.prototype.imul=function(e){return this.clone().mulTo(e,this);},a.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"==typeof e),r(e<67108864);for(var i=0,n=0;n<this.length;n++){var a=(0|this.words[n])*e,s=(67108863&a)+(67108863&i);i>>=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<t.length;i++){var r=i/26|0,n=i%26;t[i]=e.words[r]>>>n&1;}return t;}(e);if(0===t.length)return new a(1);for(var i=this,r=0;r<t.length&&0===t[r];r++,i=i.sqr()){;}if(++r<t.length)for(var n=i.sqr();r<t.length;r++,n=n.sqr()){0!==t[r]&&(i=i.mul(n));}return i;},a.prototype.iushln=function(e){r("number"==typeof e&&e>=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<this.length;t++){var o=this.words[t]&a,l=(0|this.words[t])-o<<i;this.words[t]=l|s,s=o>>>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<n;t++){this.words[t]=0;}this.length+=n;}return this._strip();},a.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e);},a.prototype.iushrn=function(e,t,i){var n;r("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var a=e%26,s=Math.min((e-a)/26,this.length),o=67108863^67108863>>>a<<a,l=i;if(n-=s,n=Math.max(0,n),l){for(var f=0;f<s;f++){l.words[f]=this.words[f];}l.length=s;}if(0===s);else if(this.length>s)for(this.length-=s,f=0;f<this.length;f++){this.words[f]=this.words[f+s];}else this.words[0]=0,this.length=1;var u=0;for(f=this.length-1;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<<t;return!(this.length<=i)&&!!(this.words[i]&n);},a.prototype.imaskn=function(e){r("number"==typeof e&&e>=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<<t;this.words[this.length-1]&=n;}return this._strip();},a.prototype.maskn=function(e){return this.clone().imaskn(e);},a.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e);},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++){this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;}return this.length=Math.max(this.length,t+1),this;},a.prototype.isubn=function(e){if(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<this.length&&this.words[t]<0;t++){this.words[t]+=67108864,this.words[t+1]-=1;}return this._strip();},a.prototype.addn=function(e){return this.clone().iaddn(e);},a.prototype.subn=function(e){return this.clone().isubn(e);},a.prototype.iabs=function(){return this.negative=0,this;},a.prototype.abs=function(){return this.clone().iabs();},a.prototype._ishlnsubmul=function(e,t,i){var n,a,s=e.length+i;this._expand(s);var o=0;for(n=0;n<e.length;n++){a=(0|this.words[n+i])+o;var l=(0|e.words[n])*t;o=((a-=67108863&l)>>26)-(l/67108864|0),this.words[n+i]=67108863&a;}for(;n<this.length-i;n++){o=(a=(0|this.words[n+i])+o)>>26,this.words[n+i]=67108863&a;}if(0===o)return this._strip();for(r(-1===o),o=0,n=0;n<this.length;n++){o=(a=-(0|this.words[n])+o)>>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<o.length;f++){o.words[f]=0;}}var u=r.clone()._ishlnsubmul(n,1,l);0===u.negative&&(r=u,o&&(o.words[l]=1));for(var c=l-1;c>=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<<t;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var a=n,s=i;0!==a&&s<this.length;s++){var o=0|this.words[s];a=(o+=a)>>>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:n<e?-1:1;}return 0!==this.negative?0|-t:t;},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t;},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|e.words[i];if(r!==n){r<n?t=-1:r>n&&(t=1);break;}}return t;},a.prototype.gtn=function(e){return 1===this.cmpn(e);},a.prototype.gt=function(e){return 1===this.cmp(e);},a.prototype.gten=function(e){return this.cmpn(e)>=0;},a.prototype.gte=function(e){return this.cmp(e)>=0;},a.prototype.ltn=function(e){return-1===this.cmpn(e);},a.prototype.lt=function(e){return-1===this.cmp(e);},a.prototype.lten=function(e){return this.cmpn(e)<=0;},a.prototype.lte=function(e){return this.cmp(e)<=0;},a.prototype.eqn=function(e){return 0===this.cmpn(e);},a.prototype.eq=function(e){return 0===this.cmp(e);},a.red=function(e){return new 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=t<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?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<i;r++){t.words[r]=e.words[r];}if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var n=e.words[9];for(t.words[t.length++]=4194303&n,r=10;r<e.length;r++){var a=0|e.words[r];e.words[r-10]=(4194303&a)<<4|n>>>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<e.length;i++){var r=0|e.words[i];t+=977*r,e.words[i]=67108863&t,t=64*r+(t/67108864|0);}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e;},n(E,g),n(C,g),n(S,g),S.prototype.imulK=function(e){for(var t=0,i=0;i<e.length;i++){var r=19*(0|e.words[i])+t,n=67108863&r;r>>>=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<i.length;r++){i[r]=this.mul(i[r-1],e);}var n=i[0],s=0,o=0,l=t.bitLength()%26;for(0===l&&(l=26),r=t.length-1;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<t.length;i++){t[i]=this.rand.getByte();}return t;},"object"==(typeof self==="undefined"?"undefined":_typeof(self)))self.crypto&&self.crypto.getRandomValues?n.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t;}:self.msCrypto&&self.msCrypto.getRandomValues?n.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t;}:"object"==(typeof window==="undefined"?"undefined":_typeof(window))&&(n.prototype._rand=function(){throw new Error("Not implemented yet");});else try{var a=e("crypto");if("function"!=typeof a.randomBytes)throw new Error("Not supported");n.prototype._rand=function(e){return a.randomBytes(e);};}catch(e){}},{crypto:20}],20:[function(e,t,i){},{}],21:[function(e,t,i){var r=e("safe-buffer").Buffer;function n(e){r.isBuffer(e)||(e=r.from(e));for(var t=e.length/4|0,i=new Array(t),n=0;n<t;n++){i[n]=e.readUInt32BE(4*n);}return i;}function a(e){for(;0<e.length;e++){e[0]=0;}}function s(e,t,i,r,n){for(var a,s,o,l,f=i[0],u=i[1],c=i[2],h=i[3],d=e[0]^t[0],_=e[1]^t[1],p=e[2]^t[2],m=e[3]^t[3],b=4,v=1;v<n;v++){a=f[d>>>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<t;a++){n[a]=e[a];}for(a=t;a<r;a++){var s=n[a-1];a%t==0?(s=s<<8|s>>>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<r;u++){var c=r-u,h=n[c-(u%4?0:4)];f[u]=u<4||c<=4?h:l.INV_SUB_MIX[0][l.SBOX[h>>>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;n<r;++n){i+=e[n]^t[n];}return i;}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub();},u.prototype.getAuthTag=function(){if(this._decrypt||!n.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag;},u.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e;},u.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length;},t.exports=u;},{"./aes":21,"./ghash":26,"./incr32":27,"buffer-xor":65,"cipher-base":67,inherits:136,"safe-buffer":184}],23:[function(e,t,i){var r=e("./encrypter"),n=e("./decrypter"),a=e("./modes/list.json");i.createCipher=i.Cipher=r.createCipher,i.createCipheriv=i.Cipheriv=r.createCipheriv,i.createDecipher=i.Decipher=n.createDecipher,i.createDecipheriv=i.Decipheriv=n.createDecipheriv,i.listCiphers=i.getCiphers=function(){return Object.keys(a);};},{"./decrypter":24,"./encrypter":25,"./modes/list.json":35}],24:[function(e,t,i){var r=e("./authCipher"),n=e("safe-buffer").Buffer,a=e("./modes"),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._last=void 0,this._cipher=new l.AES(t),this._prev=n.from(i),this._mode=e,this._autopadding=!0;}function c(){this.cache=n.allocUnsafe(0);}function h(e,t,i){var o=a[e.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"==typeof i&&(i=n.from(i)),"GCM"!==o.mode&&i.length!==o.iv)throw new TypeError("invalid iv length "+i.length);if("string"==typeof t&&(t=n.from(t)),t.length!==o.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===o.type?new s(o.module,t,i,!0):"auth"===o.type?new r(o.module,t,i,!0):new u(o.module,t,i);}e("inherits")(u,o),u.prototype._update=function(e){var t,i;this._cache.add(e);for(var r=[];t=this._cache.get(this._autopadding);){i=this._mode.decrypt(this,t),r.push(i);}return n.concat(r);},u.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var i=-1;for(;++i<t;){if(e[i+(16-t)]!==t)throw new Error("unable to decrypt data");}if(16===t)return;return e.slice(0,16-t);}(this._mode.decrypt(this,e));if(e)throw 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=n.concat([this.cache,e]);},c.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null;},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<e;){t.writeUInt8(e,i);}return a.concat([this.cache,t]);},i.createCipheriv=d,i.createCipher=function(e,t){var i=r[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var n=f(t,!1,i.key,i.iv);return d(e,n.key,n.iv);};},{"./aes":21,"./authCipher":22,"./modes":34,"./streamCipher":37,"cipher-base":67,evp_bytestokey:105,inherits:136,"safe-buffer":184}],26:[function(e,t,i){var r=e("safe-buffer").Buffer,n=r.alloc(16,0);function a(e){var t=r.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t;}function 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;++t<e.length;){this.state[t]^=e[t];}this._multiply();},s.prototype._multiply=function(){for(var e,t,i,r=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],n=[0,0,0,0],s=-1;++s<128;){for(0!=(this.state[~~(s/8)]&1<<7-s%8)&&(n[0]^=r[0],n[1]^=r[1],n[2]^=r[2],n[3]^=r[3]),i=0!=(1&r[3]),t=3;t>0;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<i;){a[n]=e[n]<<1|e[n+1]>>7;}return a;}i.encrypt=function(e,t,i){for(var a=t.length,s=r.allocUnsafe(a),o=-1;++o<a;){s[o]=n(e,t[o],i);}return s;};},{"safe-buffer":184}],31:[function(e,t,i){var r=e("safe-buffer").Buffer;function n(e,t,i){var n=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=r.concat([e._prev.slice(1),r.from([i?t:n])]),n;}i.encrypt=function(e,t,i){for(var a=t.length,s=r.allocUnsafe(a),o=-1;++o<a;){s[o]=n(e,t[o],i);}return s;};},{"safe-buffer":184}],32:[function(e,t,i){var r=e("buffer-xor"),n=e("safe-buffer").Buffer,a=e("../incr32");function s(e){var t=e._cipher.encryptBlockRaw(e._prev);return a(e._prev),t;}i.encrypt=function(e,t){var i=Math.ceil(t.length/16),a=e._cache.length;e._cache=n.concat([e._cache,n.allocUnsafe(16*i)]);for(var o=0;o<i;o++){var l=s(e),f=a+16*o;e._cache.writeUInt32BE(l[0],f+0),e._cache.writeUInt32BE(l[1],f+4),e._cache.writeUInt32BE(l[2],f+8),e._cache.writeUInt32BE(l[3],f+12);}var u=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),r(t,u);};},{"../incr32":27,"buffer-xor":65,"safe-buffer":184}],33:[function(e,t,i){i.encrypt=function(e,t){return e._cipher.encryptBlock(t);},i.decrypt=function(e,t){return e._cipher.decryptBlock(t);};},{}],34:[function(e,t,i){var r={ECB:e("./ecb"),CBC:e("./cbc"),CFB:e("./cfb"),CFB8:e("./cfb8"),CFB1:e("./cfb1"),OFB:e("./ofb"),CTR:e("./ctr"),GCM:e("./ctr")},n=e("./list.json");for(var a in n){n[a].module=r[n[a].mode];}t.exports=n;},{"./cbc":28,"./cfb":29,"./cfb1":30,"./cfb8":31,"./ctr":32,"./ecb":33,"./list.json":35,"./ofb":36}],35:[function(e,t,i){t.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}};},{}],36:[function(e,t,i){(function(t){var r=e("buffer-xor");function n(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev;}i.encrypt=function(e,i){for(;e._cache.length<i.length;){e._cache=t.concat([e._cache,n(e)]);}var a=e._cache.slice(0,i.length);return e._cache=e._cache.slice(i.length),r(i,a);};}).call(this,e("buffer").Buffer);},{buffer:66,"buffer-xor":65}],37:[function(e,t,i){var r=e("./aes"),n=e("safe-buffer").Buffer,a=e("cipher-base");function s(e,t,i,s){a.call(this),this._cipher=new r.AES(t),this._prev=n.from(i),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=s,this._mode=e;}e("inherits")(s,a),s.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt);},s.prototype._final=function(){this._cipher.scrub();},t.exports=s;},{"./aes":21,"cipher-base":67,inherits:136,"safe-buffer":184}],38:[function(e,t,i){var r=e("browserify-des"),n=e("browserify-aes/browser"),a=e("browserify-aes/modes"),s=e("browserify-des/modes"),o=e("evp_bytestokey");function l(e,t,i){if(e=e.toLowerCase(),a[e])return n.createCipheriv(e,t,i);if(s[e])return new r({key:t,iv:i,mode:e});throw new TypeError("invalid suite type");}function f(e,t,i){if(e=e.toLowerCase(),a[e])return n.createDecipheriv(e,t,i);if(s[e])return new r({key:t,iv:i,mode:e,decrypt:!0});throw new TypeError("invalid suite type");}i.createCipher=i.Cipher=function(e,t){var i,r;if(e=e.toLowerCase(),a[e])i=a[e].key,r=a[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");i=8*s[e].key,r=s[e].iv;}var n=o(t,!1,i,r);return l(e,n.key,n.iv);},i.createCipheriv=i.Cipheriv=l,i.createDecipher=i.Decipher=function(e,t){var i,r;if(e=e.toLowerCase(),a[e])i=a[e].key,r=a[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");i=8*s[e].key,r=s[e].iv;}var n=o(t,!1,i,r);return f(e,n.key,n.iv);},i.createDecipheriv=i.Decipheriv=f,i.listCiphers=i.getCiphers=function(){return Object.keys(s).concat(n.getCiphers());};},{"browserify-aes/browser":23,"browserify-aes/modes":34,"browserify-des":39,"browserify-des/modes":40,evp_bytestokey:105}],39:[function(e,t,i){var r=e("cipher-base"),n=e("des.js"),a=e("inherits"),s=e("safe-buffer").Buffer,o={"des-ede3-cbc":n.CBC.instantiate(n.EDE),"des-ede3":n.EDE,"des-ede-cbc":n.CBC.instantiate(n.EDE),"des-ede":n.EDE,"des-cbc":n.CBC.instantiate(n.DES),"des-ecb":n.DES};function l(e){r.call(this);var t,i=e.mode.toLowerCase(),n=o[i];t=e.decrypt?"decrypt":"encrypt";var a=e.key;s.isBuffer(a)||(a=s.from(a)),"des-ede"!==i&&"des-ede-cbc"!==i||(a=s.concat([a,a.slice(0,8)]));var l=e.iv;s.isBuffer(l)||(l=s.from(l)),this._des=n.create({key:a,iv:l,type:t});}o.des=o["des-cbc"],o.des3=o["des-ede3-cbc"],t.exports=l,a(l,r),l.prototype._update=function(e){return s.from(this._des.update(e));},l.prototype._final=function(){return s.from(this._des["final"]());};},{"cipher-base":67,"des.js":76,inherits:136,"safe-buffer":184}],40:[function(e,t,i){i["des-ecb"]={key:8,iv:0},i["des-cbc"]=i.des={key:8,iv:8},i["des-ede3-cbc"]=i.des3={key:24,iv:8},i["des-ede3"]={key:24,iv:0},i["des-ede-cbc"]={key:16,iv:8},i["des-ede"]={key:16,iv:0};},{}],41:[function(e,t,i){(function(i){var r=e("bn.js"),n=e("randombytes");function a(e,t){var n=function(e){var t=s(e);return{blinder:t.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)};}(t),a=t.modulus.byteLength(),o=(r.mont(t.modulus),new r(e).mul(n.blinder).umod(t.modulus)),l=o.toRed(r.mont(t.prime1)),f=o.toRed(r.mont(t.prime2)),u=t.coefficient,c=t.prime1,h=t.prime2,d=l.redPow(t.exponent1),_=f.redPow(t.exponent2);d=d.fromRed(),_=_.fromRed();var p=d.isub(_).imul(u).umod(c);return p.imul(h),_.iadd(p),new i(_.imul(n.unblinder).umod(t.modulus).toArray(!1,a));}function s(e){for(var t=e.modulus.byteLength(),i=new r(n(t));i.cmp(e.modulus)>=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())).length<t.byteLength()){var s=r.alloc(t.byteLength()-e.length);e=r.concat([s,e]);}var o=i.length,l=function(e,t){e=(e=c(e,t)).mod(t);var i=r.from(e.toArray());if(i.length<t.byteLength()){var n=r.alloc(t.byteLength()-i.length);i=r.concat([n,i]);}return i;}(i,t),f=r.alloc(o);f.fill(1);var u=r.alloc(o);return u=n(a,u).update(f).update(r.from([0])).update(e).update(l).digest(),f=n(a,u).update(f).digest(),{k:u=n(a,u).update(f).update(r.from([1])).update(e).update(l).digest(),v:f=n(a,u).update(f).digest()};}function c(e,t){var i=new o(e),r=(e.length<<3)-t.bitLength();return r>0&&i.ishrn(r),i;}function h(e,t,i){var a,s;do{for(a=r.alloc(0);8*a.length<e.bitLength();){t.v=n(i,t.k).update(t.v).digest(),a=r.concat([a,t.v]);}s=c(a,e),t.k=n(i,t.k).update(t.v).update(r.from([0])).digest(),t.v=n(i,t.k).update(t.v).digest();}while(-1!==s.cmp(e));return s;}function d(e,t,i,r){return e.toRed(o.mont(i)).redPow(t).fromRed().mod(r);}t.exports=function(e,t,i,n,_){var p=l(t);if(p.curve){if("ecdsa"!==n&&"ecdsa/rsa"!==n)throw new Error("wrong private key type");return function(e,t){var i=f[t.curve.join(".")];if(!i)throw new Error("unknown curve "+t.curve.join("."));var n=new s(i).keyFromPrivate(t.privateKey).sign(e);return r.from(n.toDER());}(e,p);}if("dsa"===p.type){if("dsa"!==n)throw new Error("wrong private key type");return function(e,t,i){var n,a=t.params.priv_key,s=t.params.p,l=t.params.q,f=t.params.g,_=new o(0),p=c(e,l).mod(l),m=!1,b=u(a,l,e,i);for(;!1===m;){n=h(l,b,i),_=d(f,n,s,l),0===(m=n.invm(l).imul(p.add(a.mul(_))).mod(l)).cmpn(0)&&(m=!1,_=new o(0));}return function(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e));128&t[0]&&(t=[0].concat(t));var i=[48,e.length+t.length+4,2,e.length];return i=i.concat(e,[2,t.length],t),r.from(i);}(_,m);}(e,p,i);}if("rsa"!==n&&"ecdsa/rsa"!==n)throw new Error("wrong private key type");e=r.concat([_,e]);for(var m=p.modulus.byteLength(),b=[0,1];e.length+b.length+1<m;){b.push(255);}b.push(0);for(var v=-1;++v<e.length;){b.push(e[v]);}return a(b,p);},t.exports.getKey=u,t.exports.makeKey=h;},{"./curves.json":45,"bn.js":18,"browserify-rsa":41,"create-hmac":73,elliptic:87,"parse-asn1":149,"safe-buffer":184}],48:[function(e,t,i){var r=e("safe-buffer").Buffer,n=e("bn.js"),a=e("elliptic").ec,s=e("parse-asn1"),o=e("./curves.json");function l(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=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+2<h;){d.push(255),_++;}d.push(0);for(var p=-1;++p<t.length;){d.push(t[p]);}d=r.from(d);var m=n.mont(c.modulus);e=(e=new n(e).toRed(m)).redPow(new n(c.publicExponent)),e=r.from(e.fromRed().toArray());var b=_<8?1:0;for(h=Math.min(e.length,d.length),e.length!==d.length&&(b=1),p=-1;++p<h;){b|=e[p]^d[p];}return 0===b;};},{"./curves.json":45,"bn.js":18,elliptic:87,"parse-asn1":149,"safe-buffer":184}],49:[function(e,t,i){"use strict";var r={};function n(e,t,i){i||(i=Error);var n=function(e){var i,r;function n(i,r,n){return e.call(this,function(e,i,r){return"string"==typeof t?t:t(e,i,r);}(i,r,n))||this;}return r=e,(i=n).prototype=Object.create(r.prototype),i.prototype.constructor=i,i.__proto__=r,n;}(i);n.prototype.name=i.name,n.prototype.code=e,r[e]=n;}function a(e,t){if(Array.isArray(e)){var i=e.length;return e=e.map(function(e){return String(e);}),i>2?"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;o<s.length;o++){var l=s[o];f.prototype[l]||(f.prototype[l]=a.prototype[l]);}function f(e){if(!(this instanceof f))return new f(e);n.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",u)));}function u(){this._writableState.ended||i.nextTick(c,this);}function c(e){e.end();}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function get(){return this._writableState.highWaterMark;}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function get(){return this._writableState&&this._writableState.getBuffer();}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function get(){return this._writableState.length;}}),Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function get(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed;},set:function set(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e);}});}).call(this,e("_process"));},{"./_stream_readable":52,"./_stream_writable":54,_process:158,inherits:136}],51:[function(e,t,i){"use strict";t.exports=n;var r=e("./_stream_transform");function n(e){if(!(this instanceof n))return new n(e);r.call(this,e);}e("inherits")(n,r),n.prototype._transform=function(e,t,i){i(null,e);};},{"./_stream_transform":53,inherits:136}],52:[function(e,t,i){(function(i,r){"use strict";var n;t.exports=j,j.ReadableState=S;e("events").EventEmitter;var a=function a(e,t){return e.listeners(t).length;},s=e("./internal/streams/stream"),o=e("buffer").Buffer,l=r.Uint8Array||function(){};var f,u=e("util");f=u&&u.debuglog?u.debuglog("stream"):function(){};var c,h,d,_=e("./internal/streams/buffer_list"),p=e("./internal/streams/destroy"),m=e("./internal/streams/state").getHighWaterMark,b=e("../errors").codes,v=b.ERR_INVALID_ARG_TYPE,y=b.ERR_STREAM_PUSH_AFTER_EOF,g=b.ERR_METHOD_NOT_IMPLEMENTED,w=b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(j,s);var E=p.errorOrDestroy,C=["error","close","destroy","pause","resume"];function S(t,i,r){n=n||e("./_stream_duplex"),t=t||{},"boolean"!=typeof r&&(r=i instanceof n),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=m(this,t,"readableHighWaterMark",r),this.buffer=new _(),this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(c||(c=e("string_decoder/").StringDecoder),this.decoder=new c(t.encoding),this.encoding=t.encoding);}function j(t){if(n=n||e("./_stream_duplex"),!(this instanceof j))return new j(t);var i=this instanceof n;this._readableState=new S(t,this,i),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this);}function T(e,t,i,r,n){f("readableAddChunk",t);var a,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(f("onEofChunk"),t.ended)return;if(t.decoder){var i=t.decoder.end();i&&i.length&&(t.buffer.push(i),t.length+=t.objectMode?1:i.length);}t.ended=!0,t.sync?M(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,k(e)));}(e,s);else if(n||(a=function(e,t){var i;r=t,o.isBuffer(r)||r instanceof l||"string"==typeof t||void 0===t||e.objectMode||(i=new v("chunk",["string","Buffer","Uint8Array"],t));var r;return i;}(s,t)),a)E(e,a);else if(s.objectMode||t&&t.length>0){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.length<s.highWaterMark||0===s.length);}function A(e,t,i,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",i)):(t.length+=t.objectMode?1:i.length,r?t.buffer.unshift(i):t.buffer.push(i),t.needReadable&&M(e)),P(e,t);}Object.defineProperty(j.prototype,"destroyed",{enumerable:!1,get:function get(){return void 0!==this._readableState&&this._readableState.destroyed;},set:function set(e){this._readableState&&(this._readableState.destroyed=e);}}),j.prototype.destroy=p.destroy,j.prototype._undestroy=p.undestroy,j.prototype._destroy=function(e,t){t(e);},j.prototype.push=function(e,t){var i,r=this._readableState;return r.objectMode?i=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=o.from(e,t),t=""),i=!0),T(this,e,t,!1,i);},j.prototype.unshift=function(e){return T(this,e,null,!0,!1);},j.prototype.isPaused=function(){return!1===this._readableState.flowing;},j.prototype.setEncoding=function(t){c||(c=e("string_decoder/").StringDecoder);var i=new c(t);this._readableState.decoder=i,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";null!==r;){n+=i.write(r.data),r=r.next;}return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this;};function x(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=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,O(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.length<t.highWaterMark||t.flowing&&0===t.length);){var i=t.length;if(f("maybeReadMore read 0"),e.read(0),i===t.length)break;}t.readingMore=!1;}function U(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume();}function R(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"),O(e),t.flowing&&!t.reading&&e.read(0);}function O(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read();){;}}function F(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 B(e){var t=e._readableState;f("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(L,t,e));}function L(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<r;i++){if(e[i]===t)return i;}return-1;}j.prototype.read=function(e){f("read",e),e=parseInt(e,10);var t=this._readableState,i=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?B(this):M(this),null;if(0===(e=x(e,t))&&t.ended)return 0===t.length&&B(this),null;var r,n=t.needReadable;return f("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&f("length less than watermark",n=!0),t.ended||t.reading?f("reading or ended",n=!1):n&&(f("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=x(i,t))),null===(r=e>0?F(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&&B(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,O(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;a<n;a++){r[a].emit("unpipe",this,{hasUnpiped:!1});}return this;}var s=N(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,i)),this;},j.prototype.on=function(e,t){var r=s.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!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(R,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(U,this),r;},j.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(U,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<C.length;a++){e.on(C[a],this.emit.bind(this,C[a]));}return this._read=function(t){f("wrapped _read",t),r&&(r=!1,e.resume());},this;},"function"==typeof Symbol&&(j.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=e("./internal/streams/async_iterator")),h(this);}),Object.defineProperty(j.prototype,"readableHighWaterMark",{enumerable:!1,get:function get(){return this._readableState.highWaterMark;}}),Object.defineProperty(j.prototype,"readableBuffer",{enumerable:!1,get:function get(){return this._readableState&&this._readableState.buffer;}}),Object.defineProperty(j.prototype,"readableFlowing",{enumerable:!1,get:function get(){return this._readableState.flowing;},set:function set(e){this._readableState&&(this._readableState.flowing=e);}}),j._fromList=F,Object.defineProperty(j.prototype,"readableLength",{enumerable:!1,get:function get(){return this._readableState.length;}}),"function"==typeof Symbol&&(j.from=function(t,i){return void 0===d&&(d=e("./internal/streams/from")),d(j,t,i);});}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});},{"../errors":49,"./_stream_duplex":50,"./internal/streams/async_iterator":55,"./internal/streams/buffer_list":56,"./internal/streams/destroy":57,"./internal/streams/from":59,"./internal/streams/state":61,"./internal/streams/stream":62,_process:158,buffer:66,events:104,inherits:136,"string_decoder/":195,util:20}],53:[function(e,t,i){"use strict";t.exports=u;var r=e("../errors").codes,n=r.ERR_METHOD_NOT_IMPLEMENTED,a=r.ERR_MULTIPLE_CALLBACK,s=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=r.ERR_TRANSFORM_WITH_LENGTH_0,l=e("./_stream_duplex");function f(e,t){var i=this._transformState;i.transforming=!1;var r=i.writecb;if(null===r)return this.emit("error",new a());i.writechunk=null,i.writecb=null,null!=t&&this.push(t),r(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark);}function u(e){if(!(this instanceof u))return new u(e);l.call(this,e),this._transformState={afterTransform:f.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",c);}function c(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush(function(t,i){h(e,t,i);});}function h(e,t,i){if(t)return e.emit("error",t);if(null!=i&&e.push(i),e._writableState.length)throw new o();if(e._transformState.transforming)throw new s();return e.push(null);}e("inherits")(u,l),u.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t);},u.prototype._transform=function(e,t,i){i(new n("_transform()"));},u.prototype._write=function(e,t,i){var r=this._transformState;if(r.writecb=i,r.writechunk=e,r.writeencoding=t,!r.transforming){var n=this._readableState;(r.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark);}},u.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform));},u.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,function(e){t(e);});};},{"../errors":49,"./_stream_duplex":50,inherits:136}],54:[function(e,t,i){(function(i,r){"use strict";function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,i){var r=e.entry;e.entry=null;for(;r;){var n=r.callback;t.pendingcb--,n(i),r=r.next;}t.corkedRequestsFree.next=e;}(t,e);};}var a;t.exports=j,j.WritableState=S;var s={deprecate:e("util-deprecate")},o=e("./internal/streams/stream"),l=e("buffer").Buffer,f=r.Uint8Array||function(){};var u,c=e("./internal/streams/destroy"),h=e("./internal/streams/state").getHighWaterMark,d=e("../errors").codes,_=d.ERR_INVALID_ARG_TYPE,p=d.ERR_METHOD_NOT_IMPLEMENTED,m=d.ERR_MULTIPLE_CALLBACK,b=d.ERR_STREAM_CANNOT_PIPE,v=d.ERR_STREAM_DESTROYED,y=d.ERR_STREAM_NULL_VALUES,g=d.ERR_STREAM_WRITE_AFTER_END,w=d.ERR_UNKNOWN_ENCODING,E=c.errorOrDestroy;function C(){}function S(t,r,s){a=a||e("./_stream_duplex"),t=t||{},"boolean"!=typeof s&&(s=r instanceof a),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=h(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===t.decodeStrings;this.decodeStrings=!o,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 r=e._writableState,n=r.sync,a=r.writecb;if("function"!=typeof a)throw new m();if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0;}(r),t)!function(e,t,r,n,a){--t.pendingcb,r?(i.nextTick(a,n),i.nextTick(P,e,t),e._writableState.errorEmitted=!0,E(e,n)):(a(n),e._writableState.errorEmitted=!0,E(e,n),P(e,t));}(e,r,n,t,a);else{var s=M(r)||e.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||x(e,r),n?i.nextTick(A,e,r,s,a):A(e,r,s,a);}}(r,e);},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this);}function j(t){var i=this instanceof(a=a||e("./_stream_duplex"));if(!i&&!u.call(j,this))return new j(t);this._writableState=new S(t,this,i),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"])),o.call(this);}function T(e,t,i,r,n,a,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new v("write")):i?e._writev(n,t.onwrite):e._write(n,a,t.onwrite),t.sync=!1;}function A(e,t,i,r){i||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));}(e,t),t.pendingcb--,r(),P(e,t);}function x(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var r=t.bufferedRequestCount,a=new Array(r),s=t.corkedRequestsFree;s.entry=i;for(var o=0,l=!0;i;){a[o]=i,i.isBuf||(l=!1),i=i.next,o+=1;}a.allBuffers=l,T(e,t,!0,t.length,a,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new n(t),t.bufferedRequestCount=0;}else{for(;i;){var f=i.chunk,u=i.encoding,c=i.callback;if(T(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 M(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing;}function k(e,t){e._final(function(i){t.pendingcb--,i&&E(e,i),t.prefinished=!0,e.emit("prefinish"),P(e,t);});}function P(e,t){var r=M(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,i.nextTick(k,e,t)));}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy();}return r;}e("inherits")(j,o),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;){t.push(e),e=e.next;}return t;},function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.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]?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(j,Symbol.hasInstance,{value:function value(e){return!!u.call(this,e)||this===j&&e&&e._writableState instanceof S;}})):u=function u(e){return e instanceof this;},j.prototype.pipe=function(){E(this,new b());},j.prototype.write=function(e,t,r){var n,a=this._writableState,s=!1,o=!a.objectMode&&(n=e,l.isBuffer(n)||n instanceof f);return o&&!l.isBuffer(e)&&(e=function(e){return l.from(e);}(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=a.defaultEncoding),"function"!=typeof r&&(r=C),a.ending?function(e,t){var r=new g();E(e,r),i.nextTick(t,r);}(this,r):(o||function(e,t,r,n){var a;return null===r?a=new y():"string"==typeof r||t.objectMode||(a=new _("chunk",["string","Buffer"],r)),!a||(E(e,a),i.nextTick(n,a),!1);}(this,a,e,r))&&(a.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=l.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 f=t.length<t.highWaterMark;f||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:n,isBuf:i,callback:a,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1;}else T(e,t,!1,o,r,n,a);return f;}(this,a,o,e,t,r)),s;},j.prototype.cork=function(){this._writableState.corked++;},j.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||x(this,e));},j.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new 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;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r);}}var s=e("buffer").Buffer,o=e("util").inspect,l=o&&o.custom||"inspect";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;}var t,i,f;return t=e,(i=[{key:"push",value:function value(e){var t={data:e,next:null};this.length>0?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 e<this.head.data.length?(i=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):i=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),i;}},{key:"first",value:function value(){return this.head.data;}},{key:"_getString",value:function value(e){var t=this.head,i=1,r=t.data;for(e-=r.length;t=t.next;){var n=t.data,a=e>n.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;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?r(Object(i),!0).forEach(function(t){n(e,t,i[t]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t));});}return e;}({},t,{depth:0,customInspect:!1}));}}])&&a(t.prototype,i),f&&a(t,f),e;}();},{buffer:66,util:20}],57:[function(e,t,i){(function(e){"use strict";function i(e,t){n(e,t),r(e);}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close");}function n(e,t){e.emit("error",t);}t.exports={destroy:function destroy(t,a){var s=this,o=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return o||l?(a?a(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(n,this,t)):e.nextTick(n,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!a&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(r,s):(s._writableState.errorEmitted=!0,e.nextTick(i,s,t)):e.nextTick(i,s,t):a?(e.nextTick(r,s),a(t)):e.nextTick(r,s);}),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.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1);},errorOrDestroy:function errorOrDestroy(e,t){var i=e._readableState,r=e._writableState;i&&i.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t);}};}).call(this,e("_process"));},{_process:158}],58:[function(e,t,i){"use strict";var r=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function n(){}t.exports=function e(t,i,a){if("function"==typeof i)return e(t,null,i);i||(i={}),a=function(e){var t=!1;return function(){if(!t){t=!0;for(var i=arguments.length,r=new Array(i),n=0;n<i;n++){r[n]=arguments[n];}e.apply(this,r);}};}(a||n);var s=i.readable||!1!==i.readable&&t.readable,o=i.writable||!1!==i.writable&&t.writable,l=function l(){t.writable||u();},f=t._writableState&&t._writableState.finished,u=function u(){o=!1,f=!0,s||a.call(t);},c=t._readableState&&t._readableState.endEmitted,h=function h(){s=!1,c=!0,o||a.call(t);},d=function d(e){a.call(t,e);},_=function _(){var e;return s&&!c?(t._readableState&&t._readableState.ended||(e=new r()),a.call(t,e)):o&&!f?(t._writableState&&t._writableState.ended||(e=new r()),a.call(t,e)):void 0;},p=function p(){t.req.on("finish",u);};return!function(e){return e.setHeader&&"function"==typeof e.abort;}(t)?o&&!t._writableState&&(t.on("end",l),t.on("close",l)):(t.on("complete",u),t.on("abort",_),t.req?p():t.on("request",p)),t.on("end",h),t.on("finish",u),!1!==i.error&&t.on("error",d),t.on("close",_),function(){t.removeListener("complete",u),t.removeListener("abort",_),t.removeListener("request",p),t.req&&t.req.removeListener("finish",u),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",u),t.removeListener("end",h),t.removeListener("error",d),t.removeListener("close",_);};};},{"../../../errors":49}],59:[function(e,t,i){t.exports=function(){throw new Error("Readable.from is not available in the browser");};},{}],60:[function(e,t,i){"use strict";var r;var n=e("../../../errors").codes,a=n.ERR_MISSING_ARGS,s=n.ERR_STREAM_DESTROYED;function o(e){if(e)throw e;}function l(t,i,n,a){a=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments));};}(a);var o=!1;t.on("close",function(){o=!0;}),void 0===r&&(r=e("./end-of-stream")),r(t,{readable:i,writable:n},function(e){if(e)return a(e);o=!0,a();});var l=!1;return function(e){if(!o&&!l)return l=!0,function(e){return e.setHeader&&"function"==typeof e.abort;}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void a(e||new s("pipe"));};}function f(e){e();}function u(e,t){return e.pipe(t);}function c(e){return e.length?"function"!=typeof e[e.length-1]?o:e.pop():o;}t.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++){t[i]=arguments[i];}var r,n=c(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new a("streams");var s=t.map(function(e,i){var a=i<t.length-1;return l(e,a,i>0,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<r;++a){n[a]=t[a]^i[a];}return n;};}).call(this,e("buffer").Buffer);},{buffer:66}],66:[function(e,t,i){(function(t){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @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(B(e,ArrayBuffer)||e&&B(e.buffer,ArrayBuffer))return function(e,i,r){if(i<0||e.byteLength<i)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<i+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;n=void 0===i&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,i):new Uint8Array(e,i,r);return n.__proto__=t.prototype,n;}(e,i,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return t.from(n,i,r);var s=function(e){if(t.isBuffer(e)){var i=0|u(e.length),r=a(i);return 0===r.length||e.copy(r,0,0,i),r;}if(void 0!==e.length)return"number"!=typeof e.length||L(e.length)?a(0):f(e);if("Buffer"===e.type&&Array.isArray(e.data))return f(e.data);}(e);if(s)return s;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return t.from(e[Symbol.toPrimitive]("string"),i,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_typeof(e));}function o(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"');}function l(e){return o(e),a(e<0?0:0|u(e));}function f(e){for(var t=e.length<0?0:0|u(e.length),i=a(t),r=0;r<t;r+=1){i[r]=255&e[r];}return i;}function u(e){if(e>=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)||B(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 O(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),L(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;a<o;a++){if(f(e,a)===f(t,-1===u?0:a-u)){if(-1===u&&(u=a),a-u+1===l)return u*s;}else-1!==u&&(a-=a-u),u=-1;}}else for(i+l>o&&(i=o-l),a=i;a>=0;a--){for(var c=!0,h=0;h<l;h++){if(f(e,a+h)!==f(t,h)){c=!1;break;}}if(c)return a;}return-1;}function m(e,t,i,r){i=Number(i)||0;var n=e.length-i;r?(r=Number(r))>n&&(r=n):r=n;var a=t.length;r>a/2&&(r=a/2);for(var s=0;s<r;++s){var o=parseInt(t.substr(2*s,2),16);if(L(o))return s;e[i+s]=o;}return s;}function b(e,t,i,r){return F(D(t,e.length-i),e,i,r);}function v(e,t,i,r){return F(function(e){for(var t=[],i=0;i<e.length;++i){t.push(255&e.charCodeAt(i));}return t;}(t),e,i,r);}function y(e,t,i,r){return v(e,t,i,r);}function g(e,t,i,r){return F(O(t),e,i,r);}function w(e,t,i,r){return F(function(e,t){for(var i,r,n,a=[],s=0;s<e.length&&!((t-=2)<0);++s){i=e.charCodeAt(s),r=i>>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;n<i;){var a,s,o,l,f=e[n],u=null,c=f>239?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(;r<t;){i+=String.fromCharCode.apply(String,e.slice(r,r+=4096));}return i;}(r);}i.kMaxLength=2147483647,t.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function foo(){return 42;}},42===e.foo();}catch(e){return!1;}}(),t.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(t.prototype,"parent",{enumerable:!0,get:function get(){if(t.isBuffer(this))return this.buffer;}}),Object.defineProperty(t.prototype,"offset",{enumerable:!0,get:function get(){if(t.isBuffer(this))return this.byteOffset;}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),t.poolSize=8192,t.from=function(e,t,i){return s(e,t,i);},t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,t.alloc=function(e,t,i){return function(e,t,i){return o(e),e<=0?a(e):void 0!==t?"string"==typeof i?a(e).fill(t,i):a(e).fill(t):a(e);}(e,t,i);},t.allocUnsafe=function(e){return l(e);},t.allocUnsafeSlow=function(e){return l(e);},t.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==t.prototype;},t.compare=function(e,i){if(B(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),B(i,Uint8Array)&&(i=t.from(i,i.offset,i.byteLength)),!t.isBuffer(e)||!t.isBuffer(i))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===i)return 0;for(var r=e.length,n=i.length,a=0,s=Math.min(r,n);a<s;++a){if(e[a]!==i[a]){r=e[a],n=i[a];break;}}return r<n?-1:n<r?1:0;},t.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1;}},t.concat=function(e,i){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);var r;if(void 0===i)for(i=0,r=0;r<e.length;++r){i+=e[r].length;}var n=t.allocUnsafe(i),a=0;for(r=0;r<e.length;++r){var s=e[r];if(B(s,Uint8Array)&&(s=t.from(s)),!t.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,a),a+=s.length;}return n;},t.byteLength=c,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2){d(this,t,t+1);}return this;},t.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4){d(this,t,t+3),d(this,t+1,t+2);}return this;},t.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8){d(this,t,t+7),d(this,t+1,t+6),d(this,t+2,t+5),d(this,t+3,t+4);}return this;},t.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?C(this,0,e):h.apply(this,arguments);},t.prototype.toLocaleString=t.prototype.toString,t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e);},t.prototype.inspect=function(){var e="",t=i.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">";},t.prototype.compare=function(e,i,r,n,a){if(B(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<l;++c){if(f[c]!==u[c]){s=f[c],o=u[c];break;}}return s<o?-1:o<s?1:0;},t.prototype.includes=function(e,t,i){return-1!==this.indexOf(e,t,i);},t.prototype.indexOf=function(e,t,i){return _(this,e,t,i,!0);},t.prototype.lastIndexOf=function(e,t,i){return _(this,e,t,i,!1);},t.prototype.write=function(e,t,i,r){if(void 0===t)r="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)r=t,i=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=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;n<i;++n){r+=String.fromCharCode(127&e[n]);}return r;}function j(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;n<i;++n){r+=String.fromCharCode(e[n]);}return r;}function T(e,t,i){var r=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>r)&&(i=r);for(var n="",a=t;a<i;++a){n+=R(e[a]);}return n;}function A(e,t,i){for(var r=e.slice(t,i),n="",a=0;a<r.length;a+=2){n+=String.fromCharCode(r[a]+256*r[a+1]);}return n;}function x(e,t,i){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>i)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||i<s)throw new RangeError('"value" argument is out of bounds');if(r+n>e.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<e&&(i=e);var n=this.subarray(e,i);return n.__proto__=t.prototype,n;},t.prototype.readUIntLE=function(e,t,i){e>>>=0,t>>>=0,i||x(e,t,this.length);for(var r=this[e],n=1,a=0;++a<t&&(n*=256);){r+=this[e+a]*n;}return r;},t.prototype.readUIntBE=function(e,t,i){e>>>=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<t&&(n*=256);){r+=this[e+a]*n;}return r>=(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<i&&(n*=256);){this[t+a]=e/n&255;}return t+i;},t.prototype.writeUIntBE=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=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<i&&(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.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<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(i<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=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<n-r&&(n=e.length-i+r);var a=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(i,r,n);else if(this===e&&r<i&&i<n)for(var s=a-1;s>=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<i||this.length<r)throw new RangeError("Out of range index");if(r<=i)return this;var s;if(i>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=i;s<r;++s){this[s]=e;}else{var o=t.isBuffer(e)?e:t.from(e,n),l=o.length;if(0===l)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<r-i;++s){this[s+i]=o[s%l];}}return this;};var U=/[^+/0-9A-Za-z-_]/g;function R(e){return e<16?"0"+e.toString(16):e.toString(16);}function D(e,t){var i;t=t||1/0;for(var r=e.length,n=null,a=[],s=0;s<r;++s){if((i=e.charCodeAt(s))>55295&&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 O(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(U,"")).length<2)return"";for(;e.length%4!=0;){e+="=";}return e;}(e));}function F(e,t,i,r){for(var n=0;n<r&&!(n+i>=t.length||n>=e.length);++n){t[n+i]=e[n];}return n;}function B(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name;}function L(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.length<r){var a=new i(r-n.length);a.fill(0),n=i.concat([a,n]);}return t?n.toString(t):n;}a.p224=a.secp224r1,a.p256=a.secp256r1=a.prime256v1,a.p192=a.secp192r1=a.prime192v1,a.p384=a.secp384r1,a.p521=a.secp521r1,s.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t);},s.prototype.computeSecret=function(e,t,r){return t=t||"utf8",i.isBuffer(e)||(e=new i(e,t)),o(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength);},s.prototype.getPublicKey=function(e,t){var i=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(i[i.length-1]%2?i[0]=7:i[0]=6),o(i,e);},s.prototype.getPrivateKey=function(e){return o(this.keys.getPrivate(),e);},s.prototype.setPublicKey=function(e,t){return t=t||"utf8",i.isBuffer(e)||(e=new i(e,t)),this.keys._importPublic(e),this;},s.prototype.setPrivateKey=function(e,t){t=t||"utf8",i.isBuffer(e)||(e=new i(e,t));var r=new n(e);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this;};}).call(this,e("buffer").Buffer);},{"bn.js":70,buffer:66,elliptic:87}],70:[function(e,t,i){arguments[4][16][0].apply(i,arguments);},{buffer:20,dup:16}],71:[function(e,t,i){"use strict";var r=e("inherits"),n=e("md5.js"),a=e("ripemd160"),s=e("sha.js"),o=e("cipher-base");function l(e){o.call(this,"digest"),this._hash=e;}r(l,o),l.prototype._update=function(e){this._hash.update(e);},l.prototype._final=function(){return this._hash.digest();},t.exports=function(e){return"md5"===(e=e.toLowerCase())?new n():"rmd160"===e||"ripemd160"===e?new a():new l(s(e));};},{"cipher-base":67,inherits:136,"md5.js":139,ripemd160:183,"sha.js":187}],72:[function(e,t,i){var r=e("md5.js");t.exports=function(e){return new r().update(e).digest();};},{"md5.js":139}],73:[function(e,t,i){"use strict";var r=e("inherits"),n=e("./legacy"),a=e("cipher-base"),s=e("safe-buffer").Buffer,o=e("create-hash/md5"),l=e("ripemd160"),f=e("sha.js"),u=s.alloc(128);function c(e,t){a.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var i="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>i)?t=("rmd160"===e?new l():f(e)).update(t).digest():t.length<i&&(t=s.concat([t,u],i));for(var r=this._ipad=s.allocUnsafe(i),n=this._opad=s.allocUnsafe(i),o=0;o<i;o++){r[o]=54^t[o],n[o]=92^t[o];}this._hash="rmd160"===e?new l():f(e),this._hash.update(r);}r(c,a),c.prototype._update=function(e){this._hash.update(e);},c.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new l():f(this._alg)).update(this._opad).update(e).digest();},t.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new c("rmd160",t):"md5"===e?new n(o,t):new c(e,t);};},{"./legacy":74,"cipher-base":67,"create-hash/md5":72,inherits:136,ripemd160:183,"safe-buffer":184,"sha.js":187}],74:[function(e,t,i){"use strict";var r=e("inherits"),n=e("safe-buffer").Buffer,a=e("cipher-base"),s=n.alloc(128);function o(e,t){a.call(this,"digest"),"string"==typeof t&&(t=n.from(t)),this._alg=e,this._key=t,t.length>64?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;t<this.iv.length;t++){this.iv[t]=e[t];}}i.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit();}n(t,e);for(var i=Object.keys(a),r=0;r<i.length;r++){var s=i[r];t.prototype[s]=a[s];}return t.create=function(e){return new t(e);},t;},a._cbcInit=function(){var e=new s(this.options.iv);this._cbcState=e;},a._update=function(e,t,i,r){var n=this._cbcState,a=this.constructor.super_.prototype,s=n.iv;if("encrypt"===this.type){for(var o=0;o<this.blockSize;o++){s[o]^=e[t+o];}a._update.call(this,s,0,i,r);for(o=0;o<this.blockSize;o++){s[o]=i[r+o];}}else{a._update.call(this,e,t,i,r);for(o=0;o<this.blockSize;o++){i[r+o]^=s[o];}for(o=0;o<this.blockSize;o++){s[o]=e[t+o];}}};},{inherits:136,"minimalistic-assert":142}],78:[function(e,t,i){"use strict";var r=e("minimalistic-assert");function n(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0;}t.exports=n,n.prototype._init=function(){},n.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e);},n.prototype._buffer=function(e,t){for(var i=Math.min(this.buffer.length-this.bufferOff,e.length-t),r=0;r<i;r++){this.buffer[this.bufferOff+r]=e[t+r];}return this.bufferOff+=i,i;},n.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize;},n.prototype._updateEncrypt=function(e){var t=0,i=0,r=(this.bufferOff+e.length)/this.blockSize|0,n=new Array(r*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(i+=this._flushBuffer(n,i)));for(var a=e.length-(e.length-t)%this.blockSize;t<a;t+=this.blockSize){this._update(e,t,n,i),i+=this.blockSize;}for(;t<e.length;t++,this.bufferOff++){this.buffer[this.bufferOff]=e[t];}return n;},n.prototype._updateDecrypt=function(e){for(var t=0,i=0,r=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,n=new Array(r*this.blockSize);r>0;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<e.length;){e[t++]=0;}return!0;},n.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e;},n.prototype._unpad=function(e){return e;},n.prototype._finalDecrypt=function(){r.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e);};},{"minimalistic-assert":142}],79:[function(e,t,i){"use strict";var r=e("minimalistic-assert"),n=e("inherits"),a=e("./utils"),s=e("./cipher");function o(){this.tmp=new Array(2),this.keys=null;}function l(e){s.call(this,e);var t=new o();this._desState=t,this.deriveKeys(t,e.key);}n(l,s),t.exports=l,l.create=function(e){return new l(e);};var f=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];l.prototype.deriveKeys=function(e,t){e.keys=new Array(32),r.equal(t.length,this.blockSize,"Invalid key length");var i=a.readUInt32BE(t,0),n=a.readUInt32BE(t,4);a.pc1(i,n,e.tmp,0),i=e.tmp[0],n=e.tmp[1];for(var s=0;s<e.keys.length;s+=2){var o=f[s>>>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<e.length;r++){e[r]=i;}return!0;},l.prototype._unpad=function(e){for(var t=e[e.length-1],i=e.length-t;i<e.length;i++){r.equal(e[i],t);}return e.slice(0,e.length-t);},l.prototype._encrypt=function(e,t,i,r,n){for(var s=t,o=i,l=0;l<e.keys.length;l+=2){var f=e.keys[l],u=e.keys[l+1];a.expand(o,e.tmp,0),f^=e.tmp[0],u^=e.tmp[1];var c=a.substitute(f,u),h=o;o=(s^a.permute(c))>>>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<<t&268435455|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<o;l++){a<<=1,a|=e>>>r[l]&1;}for(l=o;l<r.length;l++){s<<=1,s|=t>>>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.length;i++){t<<=1,t|=e>>>a[i]&1;}return t>>>0;},i.padSplit=function(e,t,i){for(var r=e.toString(2);r.length<t;){r="0"+r;}for(var n=[],a=0;a<t;a+=i){n.push(r.slice(a,a+i));}return n.join(" ");};},{}],82:[function(e,t,i){(function(t){var r=e("./lib/generatePrime"),n=e("./lib/primes.json"),a=e("./lib/dh");var s={binary:!0,hex:!0,base64:!0};i.DiffieHellmanGroup=i.createDiffieHellmanGroup=i.getDiffieHellman=function(e){var i=new t(n[e].prime,"hex"),r=new t(n[e].gen,"hex");return new a(i,r);},i.createDiffieHellman=i.DiffieHellman=function e(i,n,o,l){return t.isBuffer(n)||void 0===s[n]?e(i,"binary",n,o):(n=n||"binary",l=l||"binary",o=o||new t([2]),t.isBuffer(o)||(o=new t(o,l)),"number"==typeof i?new a(r(i,o),o,!0):(t.isBuffer(i)||(i=new t(i,n)),new a(i,o,!0)));};}).call(this,e("buffer").Buffer);},{"./lib/dh":83,"./lib/generatePrime":84,"./lib/primes.json":85,buffer:66}],83:[function(e,t,i){(function(i){var r=e("bn.js"),n=new(e("miller-rabin"))(),a=new r(24),s=new r(11),o=new r(10),l=new r(3),f=new r(7),u=e("./generatePrime"),c=e("randombytes");function h(e,t){return t=t||"utf8",i.isBuffer(e)||(e=new i(e,t)),this._pub=new r(e),this;}function d(e,t){return t=t||"utf8",i.isBuffer(e)||(e=new i(e,t)),this._priv=new r(e),this;}t.exports=p;var _={};function p(e,t,i){this.setGenerator(t),this.__prime=new r(e),this._prime=r.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,i?(this.setPublicKey=h,this.setPrivateKey=d):this._primeCode=8;}function m(e,t){var r=new i(e.toArray());return t?r.toString(t):r;}Object.defineProperty(p.prototype,"verifyError",{enumerable:!0,get:function get(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var i=t.toString("hex"),r=[i,e.toString(16)].join("_");if(r in _)return _[r];var c,h=0;if(e.isEven()||!u.simpleSieve||!u.fermatTest(e)||!n.test(e))return h+=1,h+="02"===i||"05"===i?8:4,_[r]=h,h;switch(n.test(e.shrn(1))||(h+=2),i){case"02":e.mod(a).cmp(s)&&(h+=8);break;case"05":(c=e.mod(o)).cmp(l)&&c.cmp(f)&&(h+=8);break;default:h+=4;}return _[r]=h,h;}(this.__prime,this.__gen)),this._primeCode;}}),p.prototype.generateKeys=function(){return this._priv||(this._priv=new r(c(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey();},p.prototype.computeSecret=function(e){var t=(e=(e=new r(e)).toRed(this._prime)).redPow(this._priv).fromRed(),n=new i(t.toArray()),a=this.getPrime();if(n.length<a.length){var s=new i(a.length-n.length);s.fill(0),n=i.concat([s,n]);}return n;},p.prototype.getPublicKey=function(e){return m(this._pub,e);},p.prototype.getPrivateKey=function(e){return m(this._priv,e);},p.prototype.getPrime=function(e){return m(this.__prime,e);},p.prototype.getGenerator=function(e){return m(this._gen,e);},p.prototype.setGenerator=function(e,t){return t=t||"utf8",i.isBuffer(e)||(e=new i(e,t)),this.__gen=e,this._gen=new r(e),this;};}).call(this,e("buffer").Buffer);},{"./generatePrime":84,"bn.js":86,buffer:66,"miller-rabin":140,randombytes:166}],84:[function(e,t,i){var r=e("randombytes");t.exports=v,v.simpleSieve=m,v.fermatTest=b;var n=e("bn.js"),a=new n(24),s=new(e("miller-rabin"))(),o=new n(1),l=new n(2),f=new n(5),u=(new n(16),new n(8),new n(10)),c=new n(3),h=(new n(7),new n(11)),d=new n(4),_=(new n(12),null);function p(){if(null!==_)return _;var e=[];e[0]=2;for(var t=1,i=3;i<1048576;i+=2){for(var r=Math.ceil(Math.sqrt(i)),n=0;n<t&&e[n]<=r&&i%e[n]!=0;n++){;}t!==n&&e[n]<=r||(e[t++]=i);}return _=e,e;}function m(e){for(var t=p(),i=0;i<t.length;i++){if(0===e.modn(t[i]))return 0===e.cmpn(t[i]);}return!0;}function b(e){var t=n.mont(e);return 0===l.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1);}function v(e,t){if(e<16)return new n(2===t||5===t?[140,123]:[140,39]);var i,_;for(t=new n(t);;){for(i=new n(r(Math.ceil(e/8)));i.bitLength()>e;){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<<i.step+1)-(i.step%2==0?2:1);n/=3;for(var s=[],l=0;l<r.length;l+=i.step){var f=0;for(t=l+i.step-1;t>=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<s.length;l++){(f=s[l])===h?c=c.mixedAdd(i.points[l]):f===-h&&(c=c.mixedAdd(i.points[l].neg()));}u=u.add(c);}return u.toP();},l.prototype._wnafMul=function(e,t){var i=4,r=e._getNAFPoints(i);i=r.wnd;for(var n=r.points,s=a(t,i,this._bitLength),l=this.jpoint(null,null,null),f=s.length-1;f>=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<r;c++){var h=(j=t[c])._getNAFPoints(e);o[c]=h.wnd,l[c]=h.points;}for(c=r-1;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<u;v++){var y=0|b[0][v],g=0|b[1][v];f[d][v]=m[3*(y+1)+(g+1)],f[_][v]=0,l[d]=p;}}else f[d]=a(i[d],o[d],this._bitLength),f[_]=a(i[_],o[_],this._bitLength),u=Math.max(f[d].length,u),u=Math.max(f[_].length,u);}var w=this.jpoint(null,null,null),E=this._wnafT4;for(c=u;c>=0;c--){for(var C=0;c>=0;){var S=!0;for(v=0;v<r;v++){E[v]=0|f[v][c],0!==E[v]&&(S=!1);}if(!S)break;C++,c--;}if(c>=0&&C++,w=w.dblp(C),c<0)break;for(v=0;v<r;v++){var j,T=E[v];0!==T&&(T>0?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<r;c++){l[c]=null;}return n?w:w.toP();},l.BasePoint=f,f.prototype.eq=function(){throw new Error("Not implemented");},f.prototype.validate=function(){return this.curve.validate(this);},l.prototype.decodePoint=function(e,t){e=n.toArray(e,t);var i=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*i)return 6===e[0]?o(e[e.length-1]%2==0):7===e[0]&&o(e[e.length-1]%2==1),this.point(e.slice(1,1+i),e.slice(1+i,1+2*i));if((2===e[0]||3===e[0])&&e.length-1===i)return this.pointFromX(e.slice(1,1+i),3===e[0]);throw new Error("Unknown point format");},f.prototype.encodeCompressed=function(e){return this.encode(e,!0);},f.prototype._encode=function(e){var t=this.curve.p.byteLength(),i=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(i):[4].concat(i,this.getY().toArray("be",t));},f.prototype.encode=function(e,t){return n.encode(this._encode(t),e);},f.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this;},f.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step);},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<t;n+=e){for(var a=0;a<e;a++){r=r.dbl();}i.push(r);}return{step:e,points:i};},f.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],i=(1<<e)-1,r=1===i?null:this.dbl(),n=1;n<i;n++){t[n]=t[n-1].add(r);}return{wnd:e,points:t};},f.prototype._getBeta=function(){return null;},f.prototype.dblp=function(e){for(var t=this,i=0;i<e;i++){t=t.dbl();}return t;};},{"../utils":101,"bn.js":102}],89:[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){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,s.call(this,"edwards",e),this.a=new n(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new n(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new n(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),o(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c);}function f(e,t,i,r,a){s.BasePoint.call(this,e,"projective"),null===t&&null===i&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new n(t,16),this.y=new n(i,16),this.z=r?new n(r,16):this.curve.one,this.t=a&&new n(a,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))));}a(l,s),t.exports=l,l.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e);},l.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e);},l.prototype.jpoint=function(e,t,i,r){return this.point(e,t,i,r);},l.prototype.pointFromX=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr(),r=this.c2.redSub(this.a.redMul(i)),a=this.one.redSub(this.c2.redMul(this.d).redMul(i)),s=r.redMul(a.redInvm()),o=s.redSqrt();if(0!==o.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var l=o.fromRed().isOdd();return(t&&!l||!t&&l)&&(o=o.redNeg()),this.point(e,o);},l.prototype.pointFromY=function(e,t){(e=new n(e,16)).red||(e=e.toRed(this.red));var i=e.redSqr(),r=i.redSub(this.c2),a=i.redMul(this.d).redMul(this.c2).redSub(this.a),s=r.redMul(a.redInvm());if(0===s.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e);}var o=s.redSqrt();if(0!==o.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return o.fromRed().isOdd()!==t&&(o=o.redNeg()),this.point(o,e);},l.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),i=e.y.redSqr(),r=t.redMul(this.a).redAdd(i),n=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(i)));return 0===r.cmp(n);},a(f,s.BasePoint),l.prototype.pointFromJSON=function(e){return f.fromJSON(this,e);},l.prototype.point=function(e,t,i,r){return new f(this,e,t,i,r);},f.fromJSON=function(e,t){return new f(e,t[0],t[1],t[2]);},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">";},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()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">";},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<e.length;a++){var s=this._endoSplit(t[a]),o=e[a],l=o._getBeta();s.k1.negative&&(s.k1.ineg(),o=o.neg(!0)),s.k2.negative&&(s.k2.ineg(),l=l.neg(!0)),r[2*a]=o,r[2*a+1]=l,n[2*a]=s.k1,n[2*a+1]=s.k2;}for(var f=this._wnafMulAdd(1,r,n,2*a,i),u=0;u<2*a;u++){r[u]=null,n[u]=null;}return f;},a(f,s.BasePoint),l.prototype.point=function(e,t,i){return new f(this,e,t,i);},l.prototype.pointFromJSON=function(e,t){return f.fromJSON(this,e,t);},f.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var i=this.curve,r=function r(e){return i.point(e.x.redMul(i.endo.beta),e.y);};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}};}return t;}},f.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y];},f.fromJSON=function(e,t,i){"string"==typeof t&&(t=JSON.parse(t));var r=e.point(t[0],t[1],i);if(!t[2])return r;function n(t){return e.point(t[0],t[1],i);}var a=t[2];return r.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[r].concat(a.doubles.points.map(n))},naf:a.naf&&{wnd:a.naf.wnd,points:[r].concat(a.naf.points.map(n))}},r;},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">";},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<e;i++){t=t.dbl();}return t;}var r=this.curve.a,n=this.curve.tinv,a=this.x,s=this.y,o=this.z,l=o.redSqr().redSqr(),f=s.redAdd(s);for(i=0;i<e;i++){var u=a.redSqr(),c=f.redSqr(),h=c.redSqr(),d=u.redAdd(u).redIAdd(u).redIAdd(r.redMul(l)),_=a.redMul(c),p=d.redSqr().redISub(_.redAdd(_)),m=_.redISub(p),b=d.redMul(m);b=b.redIAdd(b).redISub(h);var v=f.redMul(o);i+1<e&&(l=l.redMul(h)),a=p,o=v,f=b;}return this.curve.jpoint(a,f.redMul(n),o);},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl();},u.prototype._zeroDbl=function(){var e,t,i;if(this.zOne){var r=this.x.redSqr(),n=this.y.redSqr(),a=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(r).redISub(a);s=s.redIAdd(s);var o=r.redAdd(r).redIAdd(r),l=o.redSqr().redISub(s).redISub(s),f=a.redIAdd(a);f=(f=f.redIAdd(f)).redIAdd(f),e=l,t=o.redMul(s.redISub(l)).redISub(f),i=this.y.redAdd(this.y);}else{var u=this.x.redSqr(),c=this.y.redSqr(),h=c.redSqr(),d=this.x.redAdd(c).redSqr().redISub(u).redISub(h);d=d.redIAdd(d);var _=u.redAdd(u).redIAdd(u),p=_.redSqr(),m=h.redIAdd(h);m=(m=m.redIAdd(m)).redIAdd(m),e=p.redISub(d).redISub(d),t=_.redMul(d.redISub(e)).redISub(m),i=(i=this.y.redMul(this.z)).redIAdd(i);}return this.curve.jpoint(e,t,i);},u.prototype._threeDbl=function(){var e,t,i;if(this.zOne){var r=this.x.redSqr(),n=this.y.redSqr(),a=n.redSqr(),s=this.x.redAdd(n).redSqr().redISub(r).redISub(a);s=s.redIAdd(s);var o=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),l=o.redSqr().redISub(s).redISub(s);e=l;var f=a.redIAdd(a);f=(f=f.redIAdd(f)).redIAdd(f),t=o.redMul(s.redISub(l)).redISub(f),i=this.y.redAdd(this.y);}else{var u=this.z.redSqr(),c=this.y.redSqr(),h=this.x.redMul(c),d=this.x.redSub(u).redMul(this.x.redAdd(u));d=d.redAdd(d).redIAdd(d);var _=h.redIAdd(h),p=(_=_.redIAdd(_)).redAdd(_);e=d.redSqr().redISub(p),i=this.y.redAdd(this.z).redSqr().redISub(c).redISub(u);var m=c.redSqr();m=(m=(m=m.redIAdd(m)).redIAdd(m)).redIAdd(m),t=d.redMul(_.redISub(e)).redISub(m);}return this.curve.jpoint(e,t,i);},u.prototype._dbl=function(){var e=this.curve.a,t=this.x,i=this.y,r=this.z,n=r.redSqr().redSqr(),a=t.redSqr(),s=i.redSqr(),o=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(n)),l=t.redAdd(t),f=(l=l.redIAdd(l)).redMul(s),u=o.redSqr().redISub(f.redAdd(f)),c=f.redISub(u),h=s.redSqr();h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var d=o.redMul(c).redISub(h),_=i.redAdd(i).redMul(r);return this.curve.jpoint(u,d,_);},u.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),i=this.z.redSqr(),r=t.redSqr(),n=e.redAdd(e).redIAdd(e),a=n.redSqr(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(r),o=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(a)).redSqr(),l=r.redIAdd(r);l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var f=n.redIAdd(s).redSqr().redISub(a).redISub(o).redISub(l),u=t.redMul(f);u=(u=u.redIAdd(u)).redIAdd(u);var c=this.x.redMul(o).redISub(u);c=(c=c.redIAdd(c)).redIAdd(c);var h=this.y.redMul(f.redMul(l.redISub(f)).redISub(s.redMul(o)));h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var d=this.z.redAdd(s).redSqr().redISub(i).redISub(o);return this.curve.jpoint(c,h,d);},u.prototype.mul=function(e,t){return e=new n(e,t),this.curve._wnafMul(this,e);},u.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),i=e.z.redSqr();if(0!==this.x.redMul(i).redISub(e.x.redMul(t)).cmpn(0))return!1;var r=t.redMul(this.z),n=i.redMul(e.z);return 0===this.y.redMul(n).redISub(e.y.redMul(r)).cmpn(0);},u.prototype.eqXToP=function(e){var t=this.z.redSqr(),i=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(i))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(t);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(i.redIAdd(n),0===this.x.cmp(i))return!0;}},u.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">";},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"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >";};},{"../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<r;a++,s++){n<<=8,n|=e[s],n>>>=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<i;){t++;}return 0===t?e:e.slice(t);}function u(e,t){if(t<128)e.push(t);else{var i=1+(Math.log(t)/Math.LN2>>>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<arguments.length;t++){e.update(arguments[t]);}return a.intFromLE(e.digest()).umod(this.curve.n);},u.prototype.keyFromPublic=function(e){return l.fromPublic(this,e);},u.prototype.keyFromSecret=function(e){return l.fromSecret(this,e);},u.prototype.makeSignature=function(e){return e instanceof f?e:new f(this,e);},u.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t;},u.prototype.decodePoint=function(e){var t=(e=a.parseBytes(e)).length-1,i=e.slice(0,t).concat(-129&e[t]),r=0!=(128&e[t]),n=a.intFromLE(i);return this.curve.pointFromY(n,r);},u.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength);},u.prototype.decodeInt=function(e){return a.intFromLE(e);},u.prototype.isPoint=function(e){return e instanceof this.pointClass;};},{"../curves":93,"../utils":101,"./key":98,"./signature":99,"hash.js":122}],98:[function(e,t,i){"use strict";var r=e("../utils"),n=r.assert,a=r.parseBytes,s=r.cachedProperty;function o(e,t){this.eddsa=e,this._secret=a(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=a(t.pub);}o.fromPublic=function(e,t){return t instanceof o?t:new o(e,{pub:t});},o.fromSecret=function(e,t){return t instanceof o?t:new o(e,{secret:t});},o.prototype.secret=function(){return this._secret;},s(o,"pubBytes",function(){return this.eddsa.encodePoint(this.pub());}),s(o,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv());}),s(o,"privBytes",function(){var e=this.eddsa,t=this.hash(),i=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[i]&=127,r[i]|=64,r;}),s(o,"priv",function(){return this.eddsa.decodeInt(this.privBytes());}),s(o,"hash",function(){return this.eddsa.hash().update(this.secret()).digest();}),s(o,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength);}),o.prototype.sign=function(e){return n(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this);},o.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this);},o.prototype.getSecret=function(e){return n(this._secret,"KeyPair is public only"),r.encode(this.secret(),e);},o.prototype.getPublic=function(e){return r.encode(this.pubBytes(),e);},t.exports=o;},{"../utils":101}],99:[function(e,t,i){"use strict";var r=e("bn.js"),n=e("../utils"),a=n.assert,s=n.cachedProperty,o=n.parseBytes;function l(e,t){this.eddsa=e,"object"!=_typeof(t)&&(t=o(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),a(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof r&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded;}s(l,"S",function(){return this.eddsa.decodeInt(this.Sencoded());}),s(l,"R",function(){return this.eddsa.decodePoint(this.Rencoded());}),s(l,"Rencoded",function(){return this.eddsa.encodePoint(this.R());}),s(l,"Sencoded",function(){return this.eddsa.encodeInt(this.S());}),l.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded());},l.prototype.toHex=function(){return n.encode(this.toBytes(),"hex").toUpperCase();},t.exports=l;},{"../utils":101,"bn.js":102}],100:[function(e,t,i){t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}};},{}],101:[function(e,t,i){"use strict";var r=i,n=e("bn.js"),a=e("minimalistic-assert"),s=e("minimalistic-crypto-utils");r.assert=a,r.toArray=s.toArray,r.zero2=s.zero2,r.toHex=s.toHex,r.encode=s.encode,r.getNAF=function(e,t,i){var r=new Array(Math.max(e.bitLength(),i)+1);r.fill(0);for(var n=1<<t+1,a=e.clone(),s=0;s<r.length;s++){var o,l=a.andln(n-1);a.isOdd()?(o=l>(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;a<r;++a){n[a].call(i);}}function h(e,t,i,r){if(t)e.call(i,r);else for(var n=e.length,a=w(e,n),s=0;s<n;++s){a[s].call(i,r);}}function d(e,t,i,r,n){if(t)e.call(i,r,n);else for(var a=e.length,s=w(e,a),o=0;o<a;++o){s[o].call(i,r,n);}}function _(e,t,i,r,n,a){if(t)e.call(i,r,n,a);else for(var s=e.length,o=w(e,s),l=0;l<s;++l){o[l].call(i,r,n,a);}}function p(e,t,i,r){if(t)e.apply(i,r);else for(var n=e.length,a=w(e,n),s=0;s<n;++s){a[s].apply(i,r);}}function m(e,t,i,n){var a,s,o;if("function"!=typeof i)throw new TypeError('"listener" argument must be a function');if((s=e._events)?(s.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),s=e._events),o=s[t]):(s=e._events=r(null),e._eventsCount=0),o){if("function"==typeof o?o=s[t]=n?[i,o]:[o,i]:n?o.unshift(i):o.push(i),!o.warned&&(a=u(e))&&a>0&&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;t<e.length;++t){e[t]=arguments[t];}this.listener.apply(this.target,e);}}function v(e,t,i){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},n=a.call(b,r);return n.listener=i,r.wrapFn=n,n;}function y(e,t,i){var r=e._events;if(!r)return[];var n=r[t];return n?"function"==typeof n?i?[n.listener||n]:[n]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i){t[i]=e[i].listener||e[i];}return t;}(n):w(n,n.length):[];}function g(e){var t=this._events;if(t){var i=t[e];if("function"==typeof i)return 1;if(i)return i.length;}return 0;}function w(e,t){for(var i=new Array(t),r=0;r<t;++r){i[r]=e[r];}return i;}o?Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function get(){return l;},set:function set(e){if("number"!=typeof e||e<0||e!=e)throw new TypeError('"defaultMaxListeners" must be a positive number');l=e;}}):s.defaultMaxListeners=l,s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this;},s.prototype.getMaxListeners=function(){return u(this);},s.prototype.emit=function(e){var t,i,r,n,a,s,o="error"===e;if(s=this._events)o=o&&null==s.error;else if(!o)return!1;if(o){if(arguments.length>1&&(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<r;a++){n[a-1]=arguments[a];}p(i,f,this,n);}return!0;},s.prototype.addListener=function(e,t){return m(this,e,t,!1);},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return m(this,e,t,!0);},s.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,v(this,e,t)),this;},s.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,v(this,e,t)),this;},s.prototype.removeListener=function(e,t){var i,n,a,s,o;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(n=this._events))return this;if(!(i=n[e]))return this;if(i===t||i.listener===t)0==--this._eventsCount?this._events=r(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(a=-1,s=i.length-1;s>=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<n;i+=1,r+=1){e[i]=e[r];}e.pop();}(i,a),1===i.length&&(n[e]=i[0]),n.removeListener&&this.emit("removeListener",e,o||t);}return this;},s.prototype.removeAllListeners=function(e){var t,i,a;if(!(i=this._events))return this;if(!i.removeListener)return 0===arguments.length?(this._events=r(null),this._eventsCount=0):i[e]&&(0==--this._eventsCount?this._events=r(null):delete i[e]),this;if(0===arguments.length){var s,o=n(i);for(a=0;a<o.length;++a){"removeListener"!==(s=o[a])&&this.removeAllListeners(s);}return this.removeAllListeners("removeListener"),this._events=r(null),this._eventsCount=0,this;}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(t)for(a=t.length-1;a>=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(c<f.length&&a>0){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;a<this._blockSize;){i[a++]=e[n++];}this._update(),this._blockOffset=0;}for(;n<e.length;){i[this._blockOffset++]=e[n++];}for(var s=0,o=8*e.length;o>0;++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<e.length;n+=this._delta32){this._update(e,n,n+this._delta32);}}return this;},a.prototype.digest=function(e){return this.update(this._pad()),n(null===this.pending),this._digest(e);},a.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,i=t-(e+this.padLength)%t,r=new Array(i+this.padLength);r[0]=128;for(var n=1;n<i;n++){r[n]=0;}if(e<<=3,"big"===this.endian){for(var a=8;a<this.padLength;a++){r[n++]=0;}r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=e>>>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;a<this.padLength;a++){r[n++]=0;}return r;};},{"./utils":133,"minimalistic-assert":142}],124:[function(e,t,i){"use strict";var r=e("./utils"),n=e("minimalistic-assert");function a(e,t,i){if(!(this instanceof a))return new a(e,t,i);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(t,i));}t.exports=a,a.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),n(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++){e.push(0);}for(t=0;t<e.length;t++){e[t]^=54;}for(this.inner=new this.Hash().update(e),t=0;t<e.length;t++){e[t]^=106;}this.outer=new this.Hash().update(e);},a.prototype.update=function(e,t){return this.inner.update(e,t),this;},a.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e);};},{"./utils":133,"minimalistic-assert":142}],125:[function(e,t,i){"use strict";var r=e("./utils"),n=e("./common"),a=r.rotl32,s=r.sum32,o=r.sum32_3,l=r.sum32_4,f=n.BlockHash;function u(){if(!(this instanceof u))return new u();f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little";}function c(e,t,i,r){return e<=15?t^i^r:e<=31?t&i|~t&r:e<=47?(t|~i)^r:e<=63?t&r|i&~r:t^(i|~r);}function h(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838;}function d(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0;}r.inherits(u,f),i.ripemd160=u,u.blockSize=512,u.outSize=160,u.hmacStrength=192,u.padLength=64,u.prototype._update=function(e,t){for(var i=this.h[0],r=this.h[1],n=this.h[2],f=this.h[3],u=this.h[4],v=i,y=r,g=n,w=f,E=u,C=0;C<80;C++){var S=s(a(l(i,c(C,r,n,f),e[_[C]+t],h(C)),m[C]),u);i=u,u=f,f=a(n,10),n=r,r=S,S=s(a(l(v,c(79-C,y,g,w),e[p[C]+t],d(C)),b[C]),E),v=E,E=w,w=a(g,10),g=y,y=S;}S=o(this.h[1],n,w),this.h[1]=o(this.h[2],f,E),this.h[2]=o(this.h[3],u,v),this.h[3]=o(this.h[4],i,y),this.h[4]=o(this.h[0],r,g),this.h[0]=S;},u.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"little"):r.split32(this.h,"little");};var _=[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],p=[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],m=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],b=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];},{"./common":123,"./utils":133}],126:[function(e,t,i){"use strict";i.sha1=e("./sha/1"),i.sha224=e("./sha/224"),i.sha256=e("./sha/256"),i.sha384=e("./sha/384"),i.sha512=e("./sha/512");},{"./sha/1":127,"./sha/224":128,"./sha/256":129,"./sha/384":130,"./sha/512":131}],127:[function(e,t,i){"use strict";var r=e("../utils"),n=e("../common"),a=e("./common"),s=r.rotl32,o=r.sum32,l=r.sum32_5,f=a.ft_1,u=n.BlockHash,c=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h();u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80);}r.inherits(h,u),t.exports=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(e,t){for(var i=this.W,r=0;r<16;r++){i[r]=e[t+r];}for(;r<i.length;r++){i[r]=s(i[r-3]^i[r-8]^i[r-14]^i[r-16],1);}var n=this.h[0],a=this.h[1],u=this.h[2],h=this.h[3],d=this.h[4];for(r=0;r<i.length;r++){var _=~~(r/20),p=l(s(n,5),f(_,a,u,h),d,i[r],c[_]);d=h,h=u,u=s(a,30),a=n,n=p;}this.h[0]=o(this.h[0],n),this.h[1]=o(this.h[1],a),this.h[2]=o(this.h[2],u),this.h[3]=o(this.h[3],h),this.h[4]=o(this.h[4],d);},h.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big");};},{"../common":123,"../utils":133,"./common":132}],128:[function(e,t,i){"use strict";var r=e("../utils"),n=e("./256");function a(){if(!(this instanceof a))return new a();n.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428];}r.inherits(a,n),t.exports=a,a.blockSize=512,a.outSize=224,a.hmacStrength=192,a.padLength=64,a.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big");};},{"../utils":133,"./256":129}],129:[function(e,t,i){"use strict";var r=e("../utils"),n=e("../common"),a=e("./common"),s=e("minimalistic-assert"),o=r.sum32,l=r.sum32_4,f=r.sum32_5,u=a.ch32,c=a.maj32,h=a.s0_256,d=a.s1_256,_=a.g0_256,p=a.g1_256,m=n.BlockHash,b=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function v(){if(!(this instanceof v))return new v();m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=b,this.W=new Array(64);}r.inherits(v,m),t.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(e,t){for(var i=this.W,r=0;r<16;r++){i[r]=e[t+r];}for(;r<i.length;r++){i[r]=l(p(i[r-2]),i[r-7],_(i[r-15]),i[r-16]);}var n=this.h[0],a=this.h[1],m=this.h[2],b=this.h[3],v=this.h[4],y=this.h[5],g=this.h[6],w=this.h[7];for(s(this.k.length===i.length),r=0;r<i.length;r++){var E=f(w,d(v),u(v,y,g),this.k[r],i[r]),C=o(h(n),c(n,a,m));w=g,g=y,y=v,v=o(b,E),b=m,m=a,a=n,n=o(E,C);}this.h[0]=o(this.h[0],n),this.h[1]=o(this.h[1],a),this.h[2]=o(this.h[2],m),this.h[3]=o(this.h[3],b),this.h[4]=o(this.h[4],v),this.h[5]=o(this.h[5],y),this.h[6]=o(this.h[6],g),this.h[7]=o(this.h[7],w);},v.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big");};},{"../common":123,"../utils":133,"./common":132,"minimalistic-assert":142}],130:[function(e,t,i){"use strict";var r=e("../utils"),n=e("./512");function a(){if(!(this instanceof a))return new a();n.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428];}r.inherits(a,n),t.exports=a,a.blockSize=1024,a.outSize=384,a.hmacStrength=192,a.padLength=128,a.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big");};},{"../utils":133,"./512":131}],131:[function(e,t,i){"use strict";var r=e("../utils"),n=e("../common"),a=e("minimalistic-assert"),s=r.rotr64_hi,o=r.rotr64_lo,l=r.shr64_hi,f=r.shr64_lo,u=r.sum64,c=r.sum64_hi,h=r.sum64_lo,d=r.sum64_4_hi,_=r.sum64_4_lo,p=r.sum64_5_hi,m=r.sum64_5_lo,b=n.BlockHash,v=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function y(){if(!(this instanceof y))return new y();b.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=v,this.W=new Array(160);}function g(e,t,i,r,n){var a=e&i^~e&n;return a<0&&(a+=4294967296),a;}function w(e,t,i,r,n,a){var s=t&r^~t&a;return s<0&&(s+=4294967296),s;}function E(e,t,i,r,n){var a=e&i^e&n^i&n;return a<0&&(a+=4294967296),a;}function C(e,t,i,r,n,a){var s=t&r^t&a^r&a;return s<0&&(s+=4294967296),s;}function S(e,t){var i=s(e,t,28)^s(t,e,2)^s(t,e,7);return i<0&&(i+=4294967296),i;}function j(e,t){var i=o(e,t,28)^o(t,e,2)^o(t,e,7);return i<0&&(i+=4294967296),i;}function T(e,t){var i=s(e,t,14)^s(e,t,18)^s(t,e,9);return i<0&&(i+=4294967296),i;}function A(e,t){var i=o(e,t,14)^o(e,t,18)^o(t,e,9);return i<0&&(i+=4294967296),i;}function x(e,t){var i=s(e,t,1)^s(e,t,8)^l(e,t,7);return i<0&&(i+=4294967296),i;}function M(e,t){var i=o(e,t,1)^o(e,t,8)^f(e,t,7);return i<0&&(i+=4294967296),i;}function k(e,t){var i=s(e,t,19)^s(t,e,29)^l(e,t,6);return i<0&&(i+=4294967296),i;}function P(e,t){var i=o(e,t,19)^o(t,e,29)^f(e,t,6);return i<0&&(i+=4294967296),i;}r.inherits(y,b),t.exports=y,y.blockSize=1024,y.outSize=512,y.hmacStrength=192,y.padLength=128,y.prototype._prepareBlock=function(e,t){for(var i=this.W,r=0;r<32;r++){i[r]=e[t+r];}for(;r<i.length;r+=2){var n=k(i[r-4],i[r-3]),a=P(i[r-4],i[r-3]),s=i[r-14],o=i[r-13],l=x(i[r-30],i[r-29]),f=M(i[r-30],i[r-29]),u=i[r-32],c=i[r-31];i[r]=d(n,a,s,o,l,f,u,c),i[r+1]=_(n,a,s,o,l,f,u,c);}},y.prototype._update=function(e,t){this._prepareBlock(e,t);var i=this.W,r=this.h[0],n=this.h[1],s=this.h[2],o=this.h[3],l=this.h[4],f=this.h[5],d=this.h[6],_=this.h[7],b=this.h[8],v=this.h[9],y=this.h[10],x=this.h[11],M=this.h[12],k=this.h[13],P=this.h[14],I=this.h[15];a(this.k.length===i.length);for(var U=0;U<i.length;U+=2){var R=P,D=I,O=T(b,v),F=A(b,v),B=g(b,v,y,x,M),L=w(b,v,y,x,M,k),N=this.k[U],z=this.k[U+1],H=i[U],V=i[U+1],Y=p(R,D,O,F,B,L,N,z,H,V),q=m(R,D,O,F,B,L,N,z,H,V);R=S(r,n),D=j(r,n),O=E(r,n,s,o,l),F=C(r,n,s,o,l,f);var X=c(R,D,O,F),W=h(R,D,O,F);P=M,I=k,M=y,k=x,y=b,x=v,b=c(d,_,Y,q),v=h(_,_,Y,q),d=l,_=f,l=s,f=o,s=r,o=n,r=c(Y,q,X,W),n=h(Y,q,X,W);}u(this.h,0,r,n),u(this.h,2,s,o),u(this.h,4,l,f),u(this.h,6,d,_),u(this.h,8,b,v),u(this.h,10,y,x),u(this.h,12,M,k),u(this.h,14,P,I);},y.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big");};},{"../common":123,"../utils":133,"minimalistic-assert":142}],132:[function(e,t,i){"use strict";var r=e("../utils").rotr32;function n(e,t,i){return e&t^~e&i;}function a(e,t,i){return e&t^e&i^t&i;}function s(e,t,i){return e^t^i;}i.ft_1=function(e,t,i,r){return 0===e?n(t,i,r):1===e||3===e?s(t,i,r):2===e?a(t,i,r):void 0;},i.ch32=n,i.maj32=a,i.p32=s,i.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22);},i.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25);},i.g0_256=function(e){return r(e,7)^r(e,18)^e>>>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<e.length;n+=2){i.push(parseInt(e[n]+e[n+1],16));}}else for(var r=0,n=0;n<e.length;n++){var s=e.charCodeAt(n);s<128?i[r++]=s:s<2048?(i[r++]=s>>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<e.length;n++){i[n]=0|e[n];}return i;},i.toHex=function(e){for(var t="",i=0;i<e.length;i++){t+=o(e[i].toString(16));}return t;},i.htonl=s,i.toHex32=function(e,t){for(var i="",r=0;r<e.length;r++){var n=e[r];"little"===t&&(n=s(n)),i+=l(n.toString(16));}return i;},i.zero2=o,i.zero8=l,i.join32=function(e,t,i,n){var a=i-t;r(a%4==0);for(var s=new Array(a/4),o=0,l=t;o<s.length;o++,l+=4){var f;f="big"===n?e[l]<<24|e[l+1]<<16|e[l+2]<<8|e[l+3]:e[l+3]<<24|e[l+2]<<16|e[l+1]<<8|e[l],s[o]=f>>>0;}return s;},i.split32=function(e,t){for(var i=new Array(4*e.length),r=0,n=0;r<e.length;r++,n+=4){var a=e[r];"big"===t?(i[n]=a>>>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<<t|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<r?1:0)+i+n;e[t]=s>>>0,e[t+1]=a;},i.sum64_hi=function(e,t,i,r){return(t+r>>>0<t?1:0)+e+i>>>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)<t?1:0,l+=(f=f+a>>>0)<a?1:0,e+i+n+s+(l+=(f=f+o>>>0)<o?1: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)<t?1:0,u+=(c=c+a>>>0)<a?1:0,u+=(c=c+o>>>0)<o?1:0,e+i+n+s+l+(u+=(c=c+f>>>0)<f?1: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.V.length;n++){this.K[n]=0,this.V[n]=1;}this._update(r),this._reseed=1,this.reseedInterval=281474976710656;},s.prototype._hmac=function(){return new r.hmac(this.hash,this.K);},s.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest());},s.prototype.reseed=function(e,t,i,r){"string"!=typeof t&&(r=i,i=t,t=null),e=n.toArray(e,t),i=n.toArray(i,r),a(e.length>=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<e;){this.V=this._hmac().update(this.V).digest(),a=a.concat(this.V);}var s=a.slice(0,e);return this._update(i),this._reseed++,n.encode(s,t);};},{"hash.js":122,"minimalistic-assert":142,"minimalistic-crypto-utils":143}],135:[function(e,t,i){i.read=function(e,t,i,r,n){var a,s,o=8*n-r-1,l=(1<<o)-1,f=l>>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<<f)-1,c=u>>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<<n|o,f+=n;f>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 <https://feross.org>
* @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<<t|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;d<l;d++){if(0===(h=h.redSqr()).cmp(s))return!1;if(0===h.cmp(u))break;}if(d===l)return!1;}}return!0;},a.prototype.getDivisor=function(e,t){var i=e.bitLength(),n=r.mont(e),a=new r(1).toRed(n);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),o=0;!s.testn(o);o++){;}for(var l=e.shrn(o),f=s.toRed(n);t>0;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<o;d++){if(0===(h=h.redSqr()).cmp(a))return h.fromRed().subn(1).gcd(e);if(0===h.cmp(f))break;}if(d===o)return(h=h.redSqr()).fromRed().subn(1).gcd(e);}}return!1;};},{"bn.js":141,brorand:19}],141:[function(e,t,i){arguments[4][16][0].apply(i,arguments);},{buffer:20,dup:16}],142:[function(e,t,i){function r(e,t){if(!e)throw new Error(t||"Assertion failed");}t.exports=r,r.equal=function(e,t,i){if(e!=t)throw new Error(i||"Assertion failed: "+e+" != "+t);};},{}],143:[function(e,t,i){"use strict";var r=i;function n(e){return 1===e.length?"0"+e:e;}function a(e){for(var t="",i=0;i<e.length;i++){t+=n(e[i].toString(16));}return t;}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var i=[];if("string"!=typeof e){for(var r=0;r<e.length;r++){i[r]=0|e[r];}return i;}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(r=0;r<e.length;r+=2){i.push(parseInt(e[r]+e[r+1],16));}}else for(r=0;r<e.length;r++){var n=e.charCodeAt(r),a=n>>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].length<t;){i[0]="0"+i[0];}return i.join(".");}e<0?(i=!0,e=-e):i=!1;var n=e/(t||1),a=Math.floor(n/3600);n-=3600*a;var s=Math.floor(n/60),o=1e3*(n-=60*s);return o-=1e3*(n=Math.floor(n)),o=Math.floor(o),(i?"-":"")+a+":"+r(s,2)+":"+r(n,2)+"."+r(o,3);},a.printRanges=function(e){var t=e.length;if(t>0){for(var i="",r=0;r<t;r++){r>0&&(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;i<e;i++){t+=String.fromCharCode(this.readUint8());}return t;}throw"Not enough bytes in buffer";},s.prototype.readCString=function(){for(var e=[];;){var t=this.readUint8();if(0===t)break;e.push(t);}return String.fromCharCode.apply(null,e);},s.prototype.readInt8=function(){return this.readAnyInt(1,!0);},s.prototype.readInt16=function(){return this.readAnyInt(2,!0);},s.prototype.readInt32=function(){return this.readAnyInt(4,!0);},s.prototype.readInt64=function(){return this.readAnyInt(8,!1);},s.prototype.readUint8Array=function(e){for(var t=new Uint8Array(e),i=0;i<e;i++){t[i]=this.readUint8();}return t;},s.prototype.readInt16Array=function(e){for(var t=new Int16Array(e),i=0;i<e;i++){t[i]=this.readInt16();}return t;},s.prototype.readUint16Array=function(e){for(var t=new Int16Array(e),i=0;i<e;i++){t[i]=this.readUint16();}return t;},s.prototype.readUint32Array=function(e){for(var t=new Uint32Array(e),i=0;i<e;i++){t[i]=this.readUint32();}return t;},s.prototype.readInt32Array=function(e){for(var t=new Int32Array(e),i=0;i<e;i++){t[i]=this.readInt32();}return t;},void 0!==i&&(i.MP4BoxStream=s);var o=function o(e,t,i){this._byteOffset=t||0,e instanceof ArrayBuffer?this.buffer=e:"object"==_typeof(e)?(this.dataView=e,t&&(this._byteOffset+=t)):this.buffer=new ArrayBuffer(e||0),this.position=0,this.endianness=null==i?o.LITTLE_ENDIAN:i;};o.prototype={},o.prototype.getPosition=function(){return this.position;},o.prototype._realloc=function(e){if(this._dynamicSize){var t=this._byteOffset+this.position+e,i=this._buffer.byteLength;if(t<=i)t>this._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;i<e.byteLength;i+=e.BYTES_PER_ELEMENT){for(var r=i+e.BYTES_PER_ELEMENT-1,n=i;r>n;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<e.length;i++){t[i]=e[i];}return String.fromCharCode.apply(null,t);},o.prototype.readString=function(e,t){return null==t||"ASCII"==t?String.fromCharCodeUint8.apply(null,[this.mapUint8Array(null==e?this.byteLength-this.position:e)]):new TextDecoder(t).decode(this.mapUint8Array(e));},o.prototype.readCString=function(e){var t=this.byteLength-this.position,i=new Uint8Array(this._buffer,this._byteOffset+this.position),r=t;null!=e&&(r=Math.min(e,t));for(var n=0;n<r&&0!==i[n];n++){;}var a=String.fromCharCodeUint8.apply(null,[this.mapUint8Array(n)]);return null!=e?this.position+=r-n:n!=t&&(this.position+=1),a;};var l=Math.pow(2,32);o.prototype.readInt64=function(){return this.readInt32()*l+this.readUint32();},o.prototype.readUint64=function(){return this.readUint32()*l+this.readUint32();},o.prototype.readInt64=function(){return this.readUint32()*l+this.readUint32();},o.prototype.readUint24=function(){return(this.readUint8()<<16)+(this.readUint8()<<8)+this.readUint8();},void 0!==i&&(i.DataStream=o),o.prototype.save=function(e){var t=new Blob([this.buffer]);if(!window.URL||!URL.createObjectURL)throw"DataStream.save: Can't create object URL.";var i=window.URL.createObjectURL(t),r=document.createElement("a");document.body.appendChild(r),r.setAttribute("href",i),r.setAttribute("download",e),r.setAttribute("target","_self"),r.click(),window.URL.revokeObjectURL(i);},o.prototype._dynamicSize=!0,Object.defineProperty(o.prototype,"dynamicSize",{get:function get(){return this._dynamicSize;},set:function set(e){e||this._trimAlloc(),this._dynamicSize=e;}}),o.prototype.shift=function(e){var t=new ArrayBuffer(this._byteLength-e),i=new Uint8Array(t),r=new Uint8Array(this._buffer,e,i.length);i.set(r),this.buffer=t,this.position-=e;},o.prototype.writeInt32Array=function(e,t){if(this._realloc(4*e.length),e instanceof Int32Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)o.memcpy(this._buffer,this.byteOffset+this.position,e.buffer,0,e.byteLength),this.mapInt32Array(e.length,t);else for(var i=0;i<e.length;i++){this.writeInt32(e[i],t);}},o.prototype.writeInt16Array=function(e,t){if(this._realloc(2*e.length),e instanceof Int16Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)o.memcpy(this._buffer,this.byteOffset+this.position,e.buffer,0,e.byteLength),this.mapInt16Array(e.length,t);else for(var i=0;i<e.length;i++){this.writeInt16(e[i],t);}},o.prototype.writeInt8Array=function(e){if(this._realloc(1*e.length),e instanceof Int8Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)o.memcpy(this._buffer,this.byteOffset+this.position,e.buffer,0,e.byteLength),this.mapInt8Array(e.length);else for(var t=0;t<e.length;t++){this.writeInt8(e[t]);}},o.prototype.writeUint32Array=function(e,t){if(this._realloc(4*e.length),e instanceof Uint32Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)o.memcpy(this._buffer,this.byteOffset+this.position,e.buffer,0,e.byteLength),this.mapUint32Array(e.length,t);else for(var i=0;i<e.length;i++){this.writeUint32(e[i],t);}},o.prototype.writeUint16Array=function(e,t){if(this._realloc(2*e.length),e instanceof Uint16Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)o.memcpy(this._buffer,this.byteOffset+this.position,e.buffer,0,e.byteLength),this.mapUint16Array(e.length,t);else for(var i=0;i<e.length;i++){this.writeUint16(e[i],t);}},o.prototype.writeUint8Array=function(e){if(this._realloc(1*e.length),e instanceof Uint8Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)o.memcpy(this._buffer,this.byteOffset+this.position,e.buffer,0,e.byteLength),this.mapUint8Array(e.length);else for(var t=0;t<e.length;t++){this.writeUint8(e[t]);}},o.prototype.writeFloat64Array=function(e,t){if(this._realloc(8*e.length),e instanceof Float64Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)o.memcpy(this._buffer,this.byteOffset+this.position,e.buffer,0,e.byteLength),this.mapFloat64Array(e.length,t);else for(var i=0;i<e.length;i++){this.writeFloat64(e[i],t);}},o.prototype.writeFloat32Array=function(e,t){if(this._realloc(4*e.length),e instanceof Float32Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)o.memcpy(this._buffer,this.byteOffset+this.position,e.buffer,0,e.byteLength),this.mapFloat32Array(e.length,t);else for(var i=0;i<e.length;i++){this.writeFloat32(e[i],t);}},o.prototype.writeInt32=function(e,t){this._realloc(4),this._dataView.setInt32(this.position,e,null==t?this.endianness:t),this.position+=4;},o.prototype.writeInt16=function(e,t){this._realloc(2),this._dataView.setInt16(this.position,e,null==t?this.endianness:t),this.position+=2;},o.prototype.writeInt8=function(e){this._realloc(1),this._dataView.setInt8(this.position,e),this.position+=1;},o.prototype.writeUint32=function(e,t){this._realloc(4),this._dataView.setUint32(this.position,e,null==t?this.endianness:t),this.position+=4;},o.prototype.writeUint16=function(e,t){this._realloc(2),this._dataView.setUint16(this.position,e,null==t?this.endianness:t),this.position+=2;},o.prototype.writeUint8=function(e){this._realloc(1),this._dataView.setUint8(this.position,e),this.position+=1;},o.prototype.writeFloat32=function(e,t){this._realloc(4),this._dataView.setFloat32(this.position,e,null==t?this.endianness:t),this.position+=4;},o.prototype.writeFloat64=function(e,t){this._realloc(8),this._dataView.setFloat64(this.position,e,null==t?this.endianness:t),this.position+=8;},o.prototype.writeUCS2String=function(e,t,i){null==i&&(i=e.length);for(var r=0;r<e.length&&r<i;r++){this.writeUint16(e.charCodeAt(r),t);}for(;r<i;r++){this.writeUint16(0);}},o.prototype.writeString=function(e,t,i){var r=0;if(null==t||"ASCII"==t){if(null!=i){var n=Math.min(e.length,i);for(r=0;r<n;r++){this.writeUint8(e.charCodeAt(r));}for(;r<i;r++){this.writeUint8(0);}}else for(r=0;r<e.length;r++){this.writeUint8(e.charCodeAt(r));}}else this.writeUint8Array(new TextEncoder(t).encode(e.substring(0,i)));},o.prototype.writeCString=function(e,t){var i=0;if(null!=t){var r=Math.min(e.length,t);for(i=0;i<r;i++){this.writeUint8(e.charCodeAt(i));}for(;i<t;i++){this.writeUint8(0);}}else{for(i=0;i<e.length;i++){this.writeUint8(e.charCodeAt(i));}this.writeUint8(0);}},o.prototype.writeStruct=function(e,t){for(var i=0;i<e.length;i+=2){var r=e[i+1];this.writeType(r,t[e[i]],t);}},o.prototype.writeType=function(e,t,i){var r;if("function"==typeof e)return e(this,t);if("object"==_typeof(e)&&!(e instanceof Array))return e.set(this,t,i);var n=null,a="ASCII",s=this.position;switch("string"==typeof e&&/:/.test(e)&&(r=e.split(":"),e=r[0],n=parseInt(r[1])),"string"==typeof e&&/,/.test(e)&&(r=e.split(","),e=r[0],a=parseInt(r[1])),e){case"uint8":this.writeUint8(t);break;case"int8":this.writeInt8(t);break;case"uint16":this.writeUint16(t,this.endianness);break;case"int16":this.writeInt16(t,this.endianness);break;case"uint32":this.writeUint32(t,this.endianness);break;case"int32":this.writeInt32(t,this.endianness);break;case"float32":this.writeFloat32(t,this.endianness);break;case"float64":this.writeFloat64(t,this.endianness);break;case"uint16be":this.writeUint16(t,o.BIG_ENDIAN);break;case"int16be":this.writeInt16(t,o.BIG_ENDIAN);break;case"uint32be":this.writeUint32(t,o.BIG_ENDIAN);break;case"int32be":this.writeInt32(t,o.BIG_ENDIAN);break;case"float32be":this.writeFloat32(t,o.BIG_ENDIAN);break;case"float64be":this.writeFloat64(t,o.BIG_ENDIAN);break;case"uint16le":this.writeUint16(t,o.LITTLE_ENDIAN);break;case"int16le":this.writeInt16(t,o.LITTLE_ENDIAN);break;case"uint32le":this.writeUint32(t,o.LITTLE_ENDIAN);break;case"int32le":this.writeInt32(t,o.LITTLE_ENDIAN);break;case"float32le":this.writeFloat32(t,o.LITTLE_ENDIAN);break;case"float64le":this.writeFloat64(t,o.LITTLE_ENDIAN);break;case"cstring":this.writeCString(t,n);break;case"string":this.writeString(t,a,n);break;case"u16string":this.writeUCS2String(t,this.endianness,n);break;case"u16stringle":this.writeUCS2String(t,o.LITTLE_ENDIAN,n);break;case"u16stringbe":this.writeUCS2String(t,o.BIG_ENDIAN,n);break;default:if(3==e.length){for(var l=e[1],f=0;f<t.length;f++){this.writeType(l,t[f]);}break;}this.writeStruct(e,t);}null!=n&&(this.position=s,this._realloc(n),this.position=s+n);},o.prototype.writeUint64=function(e){var t=Math.floor(e/l);this.writeUint32(t),this.writeUint32(4294967295&e);},o.prototype.writeUint24=function(e){this.writeUint8((16711680&e)>>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;i<this.buffers.length;i++){var r=this.buffers[i];if(e.fileStart<=r.fileStart){if(e.fileStart===r.fileStart){if(e.byteLength>r.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.fileStart<r.fileStart+r.byteLength){var n=r.fileStart+r.byteLength-e.fileStart,s=e.byteLength-n;if(!(s>0)){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;t<this.buffers.length;t++){i=this.buffers[t],0===t?(s={},o.push(s),s.start=i.fileStart,s.end=i.fileStart+i.byteLength,l+="["+s.start+"-"):s.end===i.fileStart?s.end=i.fileStart+i.byteLength:((s={}).start=i.fileStart,l+=o[o.length-1].end-1+"], ["+s.start+"-",s.end=i.fileStart+i.byteLength,o.push(s)),r+=i.usedBytes,n+=i.byteLength;}o.length>0&&(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.buffers.length;e++){(t=this.buffers[e]).usedBytes===t.byteLength&&(a.debug("MultiBufferStream","Removing buffer #"+e),this.buffers.splice(e,1),e--);}},f.prototype.mergeNextBuffer=function(){var e;if(this.bufferIndex+1<this.buffers.length){if((e=this.buffers[this.bufferIndex+1]).fileStart===this.buffer.fileStart+this.buffer.byteLength){var t=this.buffer.byteLength,i=this.buffer.usedBytes,r=this.buffer.fileStart;return this.buffers[this.bufferIndex]=ArrayBuffer.concat(this.buffer,e),this.buffer=this.buffers[this.bufferIndex],this.buffers.splice(this.bufferIndex+1,1),this.buffer.usedBytes=i,this.buffer.fileStart=r,a.debug("ISOFile","Concatenating buffer for box parsing (length: "+t+"->"+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<this.buffers.length&&(n=this.buffers[r]).fileStart<=t;){s=r,i&&(n.fileStart+n.byteLength<=t?n.usedBytes=n.byteLength:n.usedBytes=t-n.fileStart,this.logBufferLevel()),r++;}return-1!==s&&(n=this.buffers[s]).fileStart+n.byteLength>=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<this.buffers.length&&(r=this.buffers[t]).fileStart===i.fileStart+i.byteLength;t++){i=r;}return i.fileStart+i.byteLength;},f.prototype.getEndFilePositionAfter=function(e){var t=this.findPosition(!0,e,!1);return-1!==t?this.findEndContiguousBuf(t):e;},f.prototype.addUsedBytes=function(e){this.buffer.usedBytes+=e,this.logBufferLevel();},f.prototype.setAllUsedBytes=function(){this.buffer.usedBytes=this.buffer.byteLength,this.logBufferLevel();},f.prototype.seek=function(e,t,i){var r;return-1!==(r=this.findPosition(t,e,i))?(this.buffer=this.buffers[r],this.bufferIndex=r,this.position=e-this.buffer.fileStart,a.debug("MultiBufferStream","Repositioning parser at buffer position: "+this.position),!0):(a.debug("MultiBufferStream","Position "+e+" not found in buffered data"),!1);},f.prototype.getPosition=function(){if(-1===this.bufferIndex||null===this.buffers[this.bufferIndex])throw"Error accessing position in the MultiBufferStream";return this.buffers[this.bufferIndex].fileStart+this.position;},f.prototype.getLength=function(){return this.byteLength;},f.prototype.getEndPosition=function(){if(-1===this.bufferIndex||null===this.buffers[this.bufferIndex])throw"Error accessing position in the MultiBufferStream";return this.buffers[this.bufferIndex].fileStart+this.byteLength;},void 0!==i&&(i.MultiBufferStream=f);var u=function u(){var e=[];e[3]="ES_Descriptor",e[4]="DecoderConfigDescriptor",e[5]="DecoderSpecificInfo",e[6]="SLConfigDescriptor",this.getDescriptorName=function(t){return e[t];};var t=this,i={};return this.parseOneDescriptor=function(t){var r,n,s,o=0;for(r=t.readUint8(),s=t.readUint8();128&s;){o=(127&s)<<7,s=t.readUint8();}return o+=127&s,a.debug("MPEG4DescriptorParser","Found "+(e[r]||"Descriptor "+r)+", size "+o+" at position "+t.getPosition()),(n=e[r]?new i[e[r]](o):new i.Descriptor(o)).parse(t),n;},i.Descriptor=function(e,t){this.tag=e,this.size=t,this.descs=[];},i.Descriptor.prototype.parse=function(e){this.data=e.readUint8Array(this.size);},i.Descriptor.prototype.findDescriptor=function(e){for(var t=0;t<this.descs.length;t++){if(this.descs[t].tag==e)return this.descs[t];}return null;},i.Descriptor.prototype.parseRemainingDescriptors=function(e){for(var i=e.position;e.position<i+this.size;){var r=t.parseOneDescriptor(e);this.descs.push(r);}},i.ES_Descriptor=function(e){i.Descriptor.call(this,3,e);},i.ES_Descriptor.prototype=new i.Descriptor(),i.ES_Descriptor.prototype.parse=function(e){if(this.ES_ID=e.readUint16(),this.flags=e.readUint8(),this.size-=3,128&this.flags?(this.dependsOn_ES_ID=e.readUint16(),this.size-=2):this.dependsOn_ES_ID=0,64&this.flags){var t=e.readUint8();this.URL=e.readString(t),this.size-=t+1;}else this.URL="";32&this.flags?(this.OCR_ES_ID=e.readUint16(),this.size-=2):this.OCR_ES_ID=0,this.parseRemainingDescriptors(e);},i.ES_Descriptor.prototype.getOTI=function(e){var t=this.findDescriptor(4);return t?t.oti:0;},i.ES_Descriptor.prototype.getAudioConfig=function(e){var t=this.findDescriptor(4);if(!t)return null;var i=t.findDescriptor(5);if(i&&i.data){var r=(248&i.data[0])>>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;i<t;i++){this[e[i]+"s"]=[];}}},createContainerBoxCtor:function createContainerBoxCtor(e,t,i){c[e+"Box"]=function(t){c.ContainerBox.call(this,e,t),c.addSubBoxArrays.call(this,i);},c[e+"Box"].prototype=new c.ContainerBox(),t&&(c[e+"Box"].prototype.parse=t);},createMediaSampleEntryCtor:function createMediaSampleEntryCtor(e,t,i){c.sampleEntryCodes[e]=[],c[e+"SampleEntry"]=function(e,t){c.SampleEntry.call(this,e,t),c.addSubBoxArrays.call(this,i);},c[e+"SampleEntry"].prototype=new c.SampleEntry(),t&&(c[e+"SampleEntry"].prototype.parse=t);},createSampleEntryCtor:function createSampleEntryCtor(e,t,i,r){c.sampleEntryCodes[e].push(t),c[t+"SampleEntry"]=function(i){c[e+"SampleEntry"].call(this,t,i),c.addSubBoxArrays.call(this,r);},c[t+"SampleEntry"].prototype=new c[e+"SampleEntry"](),i&&(c[t+"SampleEntry"].prototype.parse=i);},createEncryptedSampleEntryCtor:function createEncryptedSampleEntryCtor(e,t,i){c.createSampleEntryCtor.call(this,e,t,i,["sinf"]);},createSampleGroupCtor:function createSampleGroupCtor(e,t){c[e+"SampleGroupEntry"]=function(t){c.SampleGroupEntry.call(this,e,t);},c[e+"SampleGroupEntry"].prototype=new c.SampleGroupEntry(),t&&(c[e+"SampleGroupEntry"].prototype.parse=t);},createTrackGroupCtor:function createTrackGroupCtor(e,t){c[e+"TrackGroupTypeBox"]=function(t){c.TrackGroupTypeBox.call(this,e,t);},c[e+"TrackGroupTypeBox"].prototype=new c.TrackGroupTypeBox(),t&&(c[e+"TrackGroupTypeBox"].prototype.parse=t);},createUUIDBox:function createUUIDBox(e,t,i,r){c.UUIDs.push(e),c.UUIDBoxes[e]=function(r){t?c.FullBox.call(this,"uuid",r,e):i?c.ContainerBox.call(this,"uuid",r,e):c.Box.call(this,"uuid",r,e);},c.UUIDBoxes[e].prototype=t?new c.FullBox():i?new c.ContainerBox():new c.Box(),r&&(c.UUIDBoxes[e].prototype.parse=t?function(e){this.parseFullHeader(e),r&&r.call(this,e);}:r);}};c.initialize(),c.TKHD_FLAG_ENABLED=1,c.TKHD_FLAG_IN_MOVIE=2,c.TKHD_FLAG_IN_PREVIEW=4,c.TFHD_FLAG_BASE_DATA_OFFSET=1,c.TFHD_FLAG_SAMPLE_DESC=2,c.TFHD_FLAG_SAMPLE_DUR=8,c.TFHD_FLAG_SAMPLE_SIZE=16,c.TFHD_FLAG_SAMPLE_FLAGS=32,c.TFHD_FLAG_DUR_EMPTY=65536,c.TFHD_FLAG_DEFAULT_BASE_IS_MOOF=131072,c.TRUN_FLAGS_DATA_OFFSET=1,c.TRUN_FLAGS_FIRST_FLAG=4,c.TRUN_FLAGS_DURATION=256,c.TRUN_FLAGS_SIZE=512,c.TRUN_FLAGS_FLAGS=1024,c.TRUN_FLAGS_CTS_OFFSET=2048,c.Box.prototype.add=function(e){return this.addBox(new c[e+"Box"]());},c.Box.prototype.addBox=function(e){return this.boxes.push(e),this[e.type+"s"]?this[e.type+"s"].push(e):this[e.type]=e,e;},c.Box.prototype.set=function(e,t){return this[e]=t,this;},c.Box.prototype.addEntry=function(e,t){var i=t||"entries";return this[i]||(this[i]=[]),this[i].push(e),this;},void 0!==i&&(i.BoxParser=c),c.parseUUID=function(e){return c.parseHex16(e);},c.parseHex16=function(e){for(var t="",i=0;i<16;i++){var r=e.readUint8().toString(16);t+=1===r.length?"0"+r:r;}return t;},c.parseOneBox=function(e,t,i){var r,n,s,o=e.getPosition(),l=0;if(e.getEndPosition()-o<8)return a.debug("BoxParser","Not enough data in stream to parse the type and size of the box"),{code:c.ERR_NOT_ENOUGH_DATA};if(i&&i<8)return a.debug("BoxParser","Not enough bytes left in the parent box to parse a new box"),{code:c.ERR_NOT_ENOUGH_DATA};var f=e.readUint32(),u=e.readString(4),h=u;if(a.debug("BoxParser","Found box of type '"+u+"' and size "+f+" at position "+o),l=8,"uuid"==u){if(e.getEndPosition()-e.getPosition()<16||i-l<16)return e.seek(o),a.debug("BoxParser","Not enough bytes left in the parent box to parse a UUID box"),{code:c.ERR_NOT_ENOUGH_DATA};l+=16,h=s=c.parseUUID(e);}if(1==f){if(e.getEndPosition()-e.getPosition()<8||i&&i-l<8)return e.seek(o),a.warn("BoxParser",'Not enough data in stream to parse the extended size of the "'+u+'" box'),{code:c.ERR_NOT_ENOUGH_DATA};f=e.readUint64(),l+=8;}else if(0===f)if(i)f=i;else if("mdat"!==u)return a.error("BoxParser","Unlimited box size not supported for type: '"+u+"'"),r=new c.Box(u,f),{code:c.OK,box:r,size:r.size};return f<l?(a.error("BoxParser","Box of type "+u+" has an invalid size "+f+" (too small to be a box)"),{code:c.ERR_NOT_ENOUGH_DATA,type:u,size:f,hdr_size:l,start:o}):i&&f>i?(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()<this.start+this.size;){if((t=c.parseOneBox(e,!1,this.size-(e.getPosition()-this.start))).code!==c.OK)return;if(i=t.box,this.boxes.push(i),this.subBoxNames&&-1!=this.subBoxNames.indexOf(i.type))this[this.subBoxNames[this.subBoxNames.indexOf(i.type)]+"s"].push(i);else{var r="uuid"!==i.type?i.type:i.uuid;this[r]?a.warn("Box of type "+r+" already stored in field of this type"):this[r]=i;}}},c.Box.prototype.parseLanguage=function(e){this.language=e.readUint16();var t=[];t[0]=this.language>>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;t<this.nb_SPS_nalus;t++){this.SPS[t]={},this.SPS[t].length=e.readUint16(),this.SPS[t].nalu=e.readUint8Array(this.SPS[t].length),i-=2+this.SPS[t].length;}for(this.nb_PPS_nalus=e.readUint8(),i--,this.PPS=[],t=0;t<this.nb_PPS_nalus;t++){this.PPS[t]={},this.PPS[t].length=e.readUint16(),this.PPS[t].nalu=e.readUint8Array(this.PPS[t].length),i-=2+this.PPS[t].length;}i>0&&(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<t;i++){this.chunk_offsets.push(e.readUint64());}}),c.createFullBoxCtor("CoLL",function(e){this.maxCLL=e.readUint16(),this.maxFALL=e.readUint16();}),c.createBoxCtor("colr",function(e){if(this.colour_type=e.readString(4),"nclx"===this.colour_type){this.colour_primaries=e.readUint16(),this.transfer_characteristics=e.readUint16(),this.matrix_coefficients=e.readUint16();var t=e.readUint8();this.full_range_flag=t>>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<t;i++){this.sample_counts.push(e.readUint32());var r=e.readInt32();r<0&&a.warn("BoxParser","ctts box uses negative values without using version 1"),this.sample_offsets.push(r);}else if(1==this.version)for(i=0;i<t;i++){this.sample_counts.push(e.readUint32()),this.sample_offsets.push(e.readInt32());}}),c.createBoxCtor("dac3",function(e){var t=e.readUint8(),i=e.readUint8(),r=e.readUint8();this.fscod=t>>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<this.num_ind_sub+1;i++){var r={};this.ind_subs.push(r);var n=e.readUint8(),a=e.readUint8(),s=e.readUint8();r.fscod=n>>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<r;n++){if((t=c.parseOneBox(e,!1,this.size-(e.getPosition()-this.start))).code!==c.OK)return;i=t.box,this.entries.push(i);}}),c.createBoxCtor("drep",function(e){this.bytessent=e.readUint64();}),c.createFullBoxCtor("elng",function(e){this.extended_language=e.readString(this.size-this.hdr_size);}),c.createFullBoxCtor("elst",function(e){this.entries=[];for(var t=e.readUint32(),i=0;i<t;i++){var r={};this.entries.push(r),1===this.version?(r.segment_duration=e.readUint64(),r.media_time=e.readInt64()):(r.segment_duration=e.readUint32(),r.media_time=e.readInt32()),r.media_rate_integer=e.readInt16(),r.media_rate_fraction=e.readInt16();}}),c.createFullBoxCtor("emsg",function(e){1==this.version?(this.timescale=e.readUint32(),this.presentation_time=e.readUint64(),this.event_duration=e.readUint32(),this.id=e.readUint32(),this.scheme_id_uri=e.readCString(),this.value=e.readCString()):(this.scheme_id_uri=e.readCString(),this.value=e.readCString(),this.timescale=e.readUint32(),this.presentation_time_delta=e.readUint32(),this.event_duration=e.readUint32(),this.id=e.readUint32());var t=this.size-this.hdr_size-(16+(this.scheme_id_uri.length+1)+(this.value.length+1));1==this.version&&(t-=4),this.message_data=e.readUint8Array(t);}),c.createFullBoxCtor("esds",function(e){var t=e.readUint8Array(this.size-this.hdr_size);if(void 0!==u){var i=new u();this.esd=i.parseOneDescriptor(new o(t.buffer,0,o.BIG_ENDIAN));}}),c.createBoxCtor("fiel",function(e){this.fieldCount=e.readUint8(),this.fieldOrdering=e.readUint8();}),c.createBoxCtor("frma",function(e){this.data_format=e.readString(4);}),c.createBoxCtor("ftyp",function(e){var t=this.size-this.hdr_size;this.major_brand=e.readString(4),this.minor_version=e.readUint32(),t-=8,this.compatible_brands=[];for(var i=0;t>=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<a;t++){var s=[];this.nalu_arrays.push(s),n=e.readUint8(),s.completeness=(128&n)>>7,s.nalu_type=63&n;var o=e.readUint16();for(i=0;i<o;i++){var l={};s.push(l),r=e.readUint16(),l.data=e.readUint8Array(r);}}}),c.createFullBoxCtor("iinf",function(e){var t;0===this.version?this.entry_count=e.readUint16():this.entry_count=e.readUint32(),this.item_infos=[];for(var i=0;i<this.entry_count;i++){if((t=c.parseOneBox(e,!1,this.size-(e.getPosition()-this.start))).code!==c.OK)return;"infe"!==t.box.type&&a.error("BoxParser","Expected 'infe' box, got "+t.box.type),this.item_infos[i]=t.box;}}),c.createFullBoxCtor("iloc",function(e){var t;t=e.readUint8(),this.offset_size=t>>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<i;r++){var n={};if(this.items.push(n),this.version<2)n.item_ID=e.readUint16();else{if(2!==this.version)throw"version of iloc box not supported";n.item_ID=e.readUint16();}switch(1===this.version||2===this.version?n.construction_method=15&e.readUint16():n.construction_method=0,n.data_reference_index=e.readUint16(),this.base_offset_size){case 0:n.base_offset=0;break;case 4:n.base_offset=e.readUint32();break;case 8:n.base_offset=e.readUint64();break;default:throw"Error reading base offset size";}var a=e.readUint16();n.extents=[];for(var s=0;s<a;s++){var o={};if(n.extents.push(o),1===this.version||2===this.version)switch(this.index_size){case 0:o.extent_index=0;break;case 4:o.extent_index=e.readUint32();break;case 8:o.extent_index=e.readUint64();break;default:throw"Error reading extent index";}switch(this.offset_size){case 0:o.extent_offset=0;break;case 4:o.extent_offset=e.readUint32();break;case 8:o.extent_offset=e.readUint64();break;default:throw"Error reading extent index";}switch(this.length_size){case 0:o.extent_length=0;break;case 4:o.extent_length=e.readUint32();break;case 8:o.extent_length=e.readUint64();break;default:throw"Error reading extent index";}}}}),c.createFullBoxCtor("infe",function(e){if(0!==this.version&&1!==this.version||(this.item_ID=e.readUint16(),this.item_protection_index=e.readUint16(),this.item_name=e.readCString(),this.content_type=e.readCString(),this.content_encoding=e.readCString()),1===this.version)return this.extension_type=e.readString(4),a.warn("BoxParser","Cannot parse extension type"),void e.seek(this.start+this.size);this.version>=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<entry_count;t++){var r={};this.associations.push(r),this.version<1?r.id=e.readUint16():r.id=e.readUint32();var n=e.readUint8();for(r.props=[],i=0;i<n;i++){var a=e.readUint8(),s={};r.props.push(s),s.essential=(128&a)>>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()<this.start+this.size;){if((t=c.parseOneBox(e,!0,this.size-(e.getPosition()-this.start))).code!==c.OK)return;(i=0===this.version?new c.SingleItemTypeReferenceBox(t.type,t.size,t.hdr_size,t.start):new c.SingleItemTypeReferenceBoxLarge(t.type,t.size,t.hdr_size,t.start)).write===c.Box.prototype.write&&"mdat"!==i.type&&(a.warn("BoxParser",i.type+" box writing not yet implemented, keeping unparsed data in memory for later write"),i.parseDataAndRewind(e)),i.parse(e),this.references.push(i);}}),c.createBoxCtor("irot",function(e){this.angle=3&e.readUint8();}),c.createFullBoxCtor("ispe",function(e){this.image_width=e.readUint32(),this.image_height=e.readUint32();}),c.createFullBoxCtor("kind",function(e){this.schemeURI=e.readCString(),this.value=e.readCString();}),c.createFullBoxCtor("leva",function(e){var t=e.readUint8();this.levels=[];for(var i=0;i<t;i++){var r={};this.levels[i]=r,r.track_ID=e.readUint32();var n=e.readUint8();switch(r.padding_flag=n>>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;i<Math.floor((t+1)/2);i++){this.padbits=e.readUint8();}}),c.createBoxCtor("pasp",function(e){this.hSpacing=e.readUint32(),this.vSpacing=e.readUint32();}),c.createBoxCtor("payl",function(e){this.text=e.readString(this.size-this.hdr_size);}),c.createBoxCtor("payt",function(e){this.payloadID=e.readUint32();var t=e.readUint8();this.rtpmap_string=e.readString(t);}),c.createFullBoxCtor("pdin",function(e){var t=(this.size-this.hdr_size)/8;this.rate=[],this.initial_delay=[];for(var i=0;i<t;i++){this.rate[i]=e.readUint32(),this.initial_delay[i]=e.readUint32();}}),c.createFullBoxCtor("pitm",function(e){0===this.version?this.item_id=e.readUint16():this.item_id=e.readUint32();}),c.createFullBoxCtor("pixi",function(e){var t;for(this.num_channels=e.readUint8(),this.bits_per_channels=[],t=0;t<this.num_channels;t++){this.bits_per_channels[t]=e.readUint8();}}),c.createBoxCtor("pmax",function(e){this.bytes=e.readUint32();}),c.createFullBoxCtor("prft",function(e){this.ref_track_id=e.readUint32(),this.ntp_timestamp=e.readUint64(),0===this.version?this.media_time=e.readUint32():this.media_time=e.readUint64();}),c.createFullBoxCtor("pssh",function(e){if(this.system_id=c.parseHex16(e),this.version>0){var t=e.readUint32();this.kid=[];for(var i=0;i<t;i++){this.kid[i]=c.parseHex16(e);}}var r=e.readUint32();r>0&&(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<t;i++){0===this.version?this.offset[i]=e.readUint32():this.offset[i]=e.readUint64();}}),c.createFullBoxCtor("saiz",function(e){1&this.flags&&(this.aux_info_type=e.readUint32(),this.aux_info_type_parameter=e.readUint32()),this.default_sample_info_size=e.readUint8();var t=e.readUint32();if(this.sample_info_size=[],0===this.default_sample_info_size)for(var i=0;i<t;i++){this.sample_info_size[i]=e.readUint8();}}),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_METADATA,"mett",function(e){this.parseHeader(e),this.content_encoding=e.readCString(),this.mime_format=e.readCString(),this.parseFooter(e);}),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_METADATA,"metx",function(e){this.parseHeader(e),this.content_encoding=e.readCString(),this.namespace=e.readCString(),this.schema_location=e.readCString(),this.parseFooter(e);}),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SUBTITLE,"sbtt",function(e){this.parseHeader(e),this.content_encoding=e.readCString(),this.mime_format=e.readCString(),this.parseFooter(e);}),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SUBTITLE,"stpp",function(e){this.parseHeader(e),this.namespace=e.readCString(),this.schema_location=e.readCString(),this.auxiliary_mime_types=e.readCString(),this.parseFooter(e);}),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SUBTITLE,"stxt",function(e){this.parseHeader(e),this.content_encoding=e.readCString(),this.mime_format=e.readCString(),this.parseFooter(e);}),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SUBTITLE,"tx3g",function(e){this.parseHeader(e),this.displayFlags=e.readUint32(),this.horizontal_justification=e.readInt8(),this.vertical_justification=e.readInt8(),this.bg_color_rgba=e.readUint8Array(4),this.box_record=e.readInt16Array(4),this.style_record=e.readUint8Array(12),this.parseFooter(e);}),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_METADATA,"wvtt",function(e){this.parseHeader(e),this.parseFooter(e);}),c.createSampleGroupCtor("alst",function(e){var t,i=e.readUint16();for(this.first_output_sample=e.readUint16(),this.sample_offset=[],t=0;t<i;t++){this.sample_offset[t]=e.readUint32();}var r=this.description_length-4-4*i;for(this.num_output_samples=[],this.num_total_samples=[],t=0;t<r/4;t++){this.num_output_samples[t]=e.readUint16(),this.num_total_samples[t]=e.readUint16();}}),c.createSampleGroupCtor("avll",function(e){this.layerNumber=e.readUint8(),this.accurateStatisticsFlag=e.readUint8(),this.avgBitRate=e.readUint16(),this.avgFrameRate=e.readUint16();}),c.createSampleGroupCtor("avss",function(e){this.subSequenceIdentifier=e.readUint16(),this.layerNumber=e.readUint8();var t=e.readUint8();this.durationFlag=t>>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<i;r++){var n={};this.dependency.push(n),n.subSeqDirectionFlag=e.readUint8(),n.layerNumber=e.readUint8(),n.subSequenceIdentifier=e.readUint16();}}),c.createSampleGroupCtor("dtrt",function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed");}),c.createSampleGroupCtor("mvif",function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed");}),c.createSampleGroupCtor("prol",function(e){this.roll_distance=e.readInt16();}),c.createSampleGroupCtor("rap ",function(e){var t=e.readUint8();this.num_leading_samples_known=t>>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<this.operation_point_count;t++){this.available_bitrate[t]=e.readUint32(),this.target_rate_share[t]=e.readUint16();}}this.maximum_bitrate=e.readUint32(),this.minimum_bitrate=e.readUint32(),this.discard_priority=e.readUint8();}}),c.createSampleGroupCtor("roll",function(e){this.roll_distance=e.readInt16();}),c.SampleGroupEntry.prototype.parse=function(e){a.warn("BoxParser","Unknown Sample Group type: "+this.grouping_type),this.data=e.readUint8Array(this.description_length);},c.createSampleGroupCtor("scif",function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed");}),c.createSampleGroupCtor("scnm",function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed");}),c.createSampleGroupCtor("seig",function(e){this.reserved=e.readUint8();var t=e.readUint8();this.crypt_byte_block=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<t;i++){var r={};this.entries.push(r),r.sample_count=e.readInt32(),r.group_description_index=e.readInt32();}}),c.createFullBoxCtor("schm",function(e){this.scheme_type=e.readString(4),this.scheme_version=e.readUint32(),1&this.flags&&(this.scheme_uri=e.readString(this.size-this.hdr_size-8));}),c.createBoxCtor("sdp ",function(e){this.sdptext=e.readString(this.size-this.hdr_size);}),c.createFullBoxCtor("sdtp",function(e){var t,i=this.size-this.hdr_size;this.is_leading=[],this.sample_depends_on=[],this.sample_is_depended_on=[],this.sample_has_redundancy=[];for(var r=0;r<i;r++){t=e.readUint8(),this.is_leading[r]=t>>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<t;i++){var r;r=c[this.grouping_type+"SampleGroupEntry"]?new c[this.grouping_type+"SampleGroupEntry"](this.grouping_type):new c.SampleGroupEntry(this.grouping_type),this.entries.push(r),1===this.version&&0===this.default_length?r.description_length=e.readUint32():r.description_length=this.default_length,r.write===c.SampleGroupEntry.prototype.write&&(a.info("BoxParser","SampleGroup for type "+this.grouping_type+" writing not yet implemented, keeping unparsed data in memory for later write"),r.data=e.readUint8Array(r.description_length),e.position-=r.description_length),r.parse(e);}}),c.createFullBoxCtor("sidx",function(e){this.reference_ID=e.readUint32(),this.timescale=e.readUint32(),0===this.version?(this.earliest_presentation_time=e.readUint32(),this.first_offset=e.readUint32()):(this.earliest_presentation_time=e.readUint64(),this.first_offset=e.readUint64()),e.readUint16(),this.references=[];for(var t=e.readUint16(),i=0;i<t;i++){var r={};this.references.push(r);var n=e.readUint32();r.reference_type=n>>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<t;i++){this.references[i]=e.readUint16();}},c.SingleItemTypeReferenceBoxLarge=function(e,t,i,r){c.Box.call(this,e,t),this.hdr_size=i,this.start=r;},c.SingleItemTypeReferenceBoxLarge.prototype=new c.Box(),c.SingleItemTypeReferenceBoxLarge.prototype.parse=function(e){this.from_item_ID=e.readUint32();var t=e.readUint16();this.references=[];for(var i=0;i<t;i++){this.references[i]=e.readUint32();}},c.createFullBoxCtor("SmDm",function(e){this.primaryRChromaticity_x=e.readUint16(),this.primaryRChromaticity_y=e.readUint16(),this.primaryGChromaticity_x=e.readUint16(),this.primaryGChromaticity_y=e.readUint16(),this.primaryBChromaticity_x=e.readUint16(),this.primaryBChromaticity_y=e.readUint16(),this.whitePointChromaticity_x=e.readUint16(),this.whitePointChromaticity_y=e.readUint16(),this.luminanceMax=e.readUint32(),this.luminanceMin=e.readUint32();}),c.createFullBoxCtor("smhd",function(e){this.balance=e.readUint16(),e.readUint16();}),c.createFullBoxCtor("ssix",function(e){this.subsegments=[];for(var t=e.readUint32(),i=0;i<t;i++){var r={};this.subsegments.push(r),r.ranges=[];for(var n=e.readUint32(),a=0;a<n;a++){var s={};r.ranges.push(s),s.level=e.readUint8(),s.range_size=e.readUint24();}}}),c.createFullBoxCtor("stco",function(e){var t;if(t=e.readUint32(),this.chunk_offsets=[],0===this.version)for(var i=0;i<t;i++){this.chunk_offsets.push(e.readUint32());}}),c.createFullBoxCtor("stdp",function(e){var t=(this.size-this.hdr_size)/2;this.priority=[];for(var i=0;i<t;i++){this.priority[i]=e.readUint16();}}),c.createFullBoxCtor("sthd"),c.createFullBoxCtor("stri",function(e){this.switch_group=e.readUint16(),this.alternate_group=e.readUint16(),this.sub_track_id=e.readUint32();var t=(this.size-this.hdr_size-8)/4;this.attribute_list=[];for(var i=0;i<t;i++){this.attribute_list[i]=e.readUint32();}}),c.createFullBoxCtor("stsc",function(e){var t,i;if(t=e.readUint32(),this.first_chunk=[],this.samples_per_chunk=[],this.sample_description_index=[],0===this.version)for(i=0;i<t;i++){this.first_chunk.push(e.readUint32()),this.samples_per_chunk.push(e.readUint32()),this.sample_description_index.push(e.readUint32());}}),c.createFullBoxCtor("stsd",function(e){var t,i,r,n;for(this.entries=[],r=e.readUint32(),t=1;t<=r;t++){if((i=c.parseOneBox(e,!0,this.size-(e.getPosition()-this.start))).code!==c.OK)return;c[i.type+"SampleEntry"]?((n=new c[i.type+"SampleEntry"](i.size)).hdr_size=i.hdr_size,n.start=i.start):(a.warn("BoxParser","Unknown sample entry type: "+i.type),n=new c.SampleEntry(i.type,i.size,i.hdr_size,i.start)),n.write===c.SampleEntry.prototype.write&&(a.info("BoxParser","SampleEntry "+n.type+" box writing not yet implemented, keeping unparsed data in memory for later write"),n.parseDataAndRewind(e)),n.parse(e),this.entries.push(n);}}),c.createFullBoxCtor("stsg",function(e){this.grouping_type=e.readUint32();var t=e.readUint16();this.group_description_index=[];for(var i=0;i<t;i++){this.group_description_index[i]=e.readUint32();}}),c.createFullBoxCtor("stsh",function(e){var t,i;if(t=e.readUint32(),this.shadowed_sample_numbers=[],this.sync_sample_numbers=[],0===this.version)for(i=0;i<t;i++){this.shadowed_sample_numbers.push(e.readUint32()),this.sync_sample_numbers.push(e.readUint32());}}),c.createFullBoxCtor("stss",function(e){var t,i;if(i=e.readUint32(),0===this.version)for(this.sample_numbers=[],t=0;t<i;t++){this.sample_numbers.push(e.readUint32());}}),c.createFullBoxCtor("stsz",function(e){var t;if(this.sample_sizes=[],0===this.version)for(this.sample_size=e.readUint32(),this.sample_count=e.readUint32(),t=0;t<this.sample_count;t++){0===this.sample_size?this.sample_sizes.push(e.readUint32()):this.sample_sizes[t]=this.sample_size;}}),c.createFullBoxCtor("stts",function(e){var t,i,r;if(t=e.readUint32(),this.sample_counts=[],this.sample_deltas=[],0===this.version)for(i=0;i<t;i++){this.sample_counts.push(e.readUint32()),(r=e.readInt32())<0&&(a.warn("BoxParser","File uses negative stts sample delta, using value 1 instead, sync may be lost!"),r=1),this.sample_deltas.push(r);}}),c.createFullBoxCtor("stvi",function(e){var t=e.readUint32();this.single_view_allowed=3&t,this.stereo_scheme=e.readUint32();var i,r,n=e.readUint32();for(this.stereo_indication_type=e.readString(n),this.boxes=[];e.getPosition()<this.start+this.size;){if((i=c.parseOneBox(e,!1,this.size-(e.getPosition()-this.start))).code!==c.OK)return;r=i.box,this.boxes.push(r),this[r.type]=r;}}),c.createBoxCtor("styp",function(e){c.ftypBox.prototype.parse.call(this,e);}),c.createFullBoxCtor("stz2",function(e){var t,i;if(this.sample_sizes=[],0===this.version)if(this.reserved=e.readUint24(),this.field_size=e.readUint8(),i=e.readUint32(),4===this.field_size)for(t=0;t<i;t+=2){var r=e.readUint8();this.sample_sizes[t]=r>>4&15,this.sample_sizes[t+1]=15&r;}else if(8===this.field_size)for(t=0;t<i;t++){this.sample_sizes[t]=e.readUint8();}else if(16===this.field_size)for(t=0;t<i;t++){this.sample_sizes[t]=e.readUint16();}else a.error("BoxParser","Error in length field in stz2 box");}),c.createFullBoxCtor("subs",function(e){var t,i,r,n;for(r=e.readUint32(),this.entries=[],t=0;t<r;t++){var a={};if(this.entries[t]=a,a.sample_delta=e.readUint32(),a.subsamples=[],(n=e.readUint16())>0)for(i=0;i<n;i++){var s={};a.subsamples.push(s),1==this.version?s.size=e.readUint32():s.size=e.readUint16(),s.priority=e.readUint8(),s.discardable=e.readUint8(),s.codec_specific_parameters=e.readUint32();}}}),c.createFullBoxCtor("tenc",function(e){if(e.readUint8(),0===this.version)e.readUint8();else{var t=e.readUint8();this.default_crypt_byte_block=t>>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<i;r++){1===this.version?(this.time=e.readUint64(),this.moof_offset=e.readUint64()):(this.time=e.readUint32(),this.moof_offset=e.readUint32()),this.traf_number=e["readUint"+8*(this.length_size_of_traf_num+1)](),this.trun_number=e["readUint"+8*(this.length_size_of_trun_num+1)](),this.sample_number=e["readUint"+8*(this.length_size_of_sample_num+1)]();}}),c.createFullBoxCtor("tkhd",function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.track_id=e.readUint32(),e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.track_id=e.readUint32(),e.readUint32(),this.duration=e.readUint32()),e.readUint32Array(2),this.layer=e.readInt16(),this.alternate_group=e.readInt16(),this.volume=e.readInt16()>>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()<this.start+this.size;){if((t=c.parseOneBox(e,!0,this.size-(e.getPosition()-this.start))).code!==c.OK)return;(i=new c.TrackReferenceTypeBox(t.type,t.size,t.hdr_size,t.start)).write===c.Box.prototype.write&&"mdat"!==i.type&&(a.info("BoxParser","TrackReference "+i.type+" box writing not yet implemented, keeping unparsed data in memory for later write"),i.parseDataAndRewind(e)),i.parse(e),this.boxes.push(i);}},c.createFullBoxCtor("trep",function(e){for(this.track_ID=e.readUint32(),this.boxes=[];e.getPosition()<this.start+this.size;){if(ret=c.parseOneBox(e,!1,this.size-(e.getPosition()-this.start)),ret.code!==c.OK)return;box=ret.box,this.boxes.push(box);}}),c.createFullBoxCtor("trex",function(e){this.track_id=e.readUint32(),this.default_sample_description_index=e.readUint32(),this.default_sample_duration=e.readUint32(),this.default_sample_size=e.readUint32(),this.default_sample_flags=e.readUint32();}),c.createBoxCtor("trpy",function(e){this.bytessent=e.readUint64();}),c.createFullBoxCtor("trun",function(e){var t=0;if(this.sample_count=e.readUint32(),t+=4,this.size-this.hdr_size>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;i<this.sample_count;i++){this.flags&c.TRUN_FLAGS_DURATION&&(this.sample_duration[i]=e.readUint32()),this.flags&c.TRUN_FLAGS_SIZE&&(this.sample_size[i]=e.readUint32()),this.flags&c.TRUN_FLAGS_FLAGS&&(this.sample_flags[i]=e.readUint32()),this.flags&c.TRUN_FLAGS_CTS_OFFSET&&(0===this.version?this.sample_composition_time_offset[i]=e.readUint32():this.sample_composition_time_offset[i]=e.readInt32());}}),c.createFullBoxCtor("tsel",function(e){this.switch_group=e.readUint32();var t=(this.size-this.hdr_size-4)/4;this.attribute_list=[];for(var i=0;i<t;i++){this.attribute_list[i]=e.readUint32();}}),c.createFullBoxCtor("txtC",function(e){this.config=e.readCString();}),c.createFullBoxCtor("url ",function(e){1!==this.flags&&(this.location=e.readCString());}),c.createFullBoxCtor("urn ",function(e){this.name=e.readCString(),this.size-this.hdr_size-this.name.length-1>0&&(this.location=e.readCString());}),c.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,function(e){this.LiveServerManifest=e.readString(this.size-this.hdr_size).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");}),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<this.fragment_count;t++){var i={},r=0,n=0;1===this.version?(r=e.readUint64(),n=e.readUint64()):(r=e.readUint32(),n=e.readUint32()),i.absolute_time=r,i.absolute_duration=n,this.entries.push(i);}}),c.createUUIDBox("6d1d9b0542d544e680e2141daff757b2",!0,!1,function(e){1===this.version?(this.absolute_time=e.readUint64(),this.duration=e.readUint64()):(this.absolute_time=e.readUint32(),this.duration=e.readUint32());}),c.createFullBoxCtor("vmhd",function(e){this.graphicsmode=e.readUint16(),this.opcolor=e.readUint16Array(3);}),c.createFullBoxCtor("vpcC",function(e){var t;1===this.version?(this.profile=e.readUint8(),this.level=e.readUint8(),t=e.readUint8(),this.bitDepth=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<t;){i="0"+i;}return i;},c.avc1SampleEntry.prototype.getCodec=c.avc2SampleEntry.prototype.getCodec=c.avc3SampleEntry.prototype.getCodec=c.avc4SampleEntry.prototype.getCodec=function(){var e=c.SampleEntry.prototype.getCodec.call(this);return this.avcC?e+"."+c.decimalToHex(this.avcC.AVCProfileIndication)+c.decimalToHex(this.avcC.profile_compatibility)+c.decimalToHex(this.avcC.AVCLevelIndication):e;},c.hev1SampleEntry.prototype.getCodec=c.hvc1SampleEntry.prototype.getCodec=function(){var e,t=c.SampleEntry.prototype.getCodec.call(this);if(this.hvcC){switch(t+=".",this.hvcC.general_profile_space){case 0:t+="";break;case 1:t+="A";break;case 2:t+="B";break;case 3:t+="C";}t+=this.hvcC.general_profile_idc,t+=".";var i=this.hvcC.general_profile_compatibility,r=0;for(e=0;e<32&&(r|=1&i,31!=e);e++){r<<=1,i>>=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<this.boxes.length;t++){this.boxes[t]&&(this.boxes[t].write(e),this.size+=this.boxes[t].size);}a.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size);},c.TrackReferenceTypeBox.prototype.write=function(e){this.size=4*this.track_ids.length,this.writeHeader(e),e.writeUint32Array(this.track_ids);},c.avcCBox.prototype.write=function(e){var t;for(this.size=7,t=0;t<this.SPS.length;t++){this.size+=2+this.SPS[t].length;}for(t=0;t<this.PPS.length;t++){this.size+=2+this.PPS[t].length;}for(this.ext&&(this.size+=this.ext.length),this.writeHeader(e),e.writeUint8(this.configurationVersion),e.writeUint8(this.AVCProfileIndication),e.writeUint8(this.profile_compatibility),e.writeUint8(this.AVCLevelIndication),e.writeUint8(this.lengthSizeMinusOne+252),e.writeUint8(this.SPS.length+224),t=0;t<this.SPS.length;t++){e.writeUint16(this.SPS[t].length),e.writeUint8Array(this.SPS[t].nalu);}for(e.writeUint8(this.PPS.length),t=0;t<this.PPS.length;t++){e.writeUint16(this.PPS[t].length),e.writeUint8Array(this.PPS[t].nalu);}this.ext&&e.writeUint8Array(this.ext);},c.co64Box.prototype.write=function(e){var t;for(this.version=0,this.flags=0,this.size=4+8*this.chunk_offsets.length,this.writeHeader(e),e.writeUint32(this.chunk_offsets.length),t=0;t<this.chunk_offsets.length;t++){e.writeUint64(this.chunk_offsets[t]);}},c.cslgBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=20,this.writeHeader(e),e.writeInt32(this.compositionToDTSShift),e.writeInt32(this.leastDecodeToDisplayDelta),e.writeInt32(this.greatestDecodeToDisplayDelta),e.writeInt32(this.compositionStartTime),e.writeInt32(this.compositionEndTime);},c.cttsBox.prototype.write=function(e){var t;for(this.version=0,this.flags=0,this.size=4+8*this.sample_counts.length,this.writeHeader(e),e.writeUint32(this.sample_counts.length),t=0;t<this.sample_counts.length;t++){e.writeUint32(this.sample_counts[t]),1===this.version?e.writeInt32(this.sample_offsets[t]):e.writeUint32(this.sample_offsets[t]);}},c.drefBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=4,this.writeHeader(e),e.writeUint32(this.entries.length);for(var t=0;t<this.entries.length;t++){this.entries[t].write(e),this.size+=this.entries[t].size;}a.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size);},c.elngBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=this.extended_language.length,this.writeHeader(e),e.writeString(this.extended_language);},c.elstBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=4+12*this.entries.length,this.writeHeader(e),e.writeUint32(this.entries.length);for(var t=0;t<this.entries.length;t++){var i=this.entries[t];e.writeUint32(i.segment_duration),e.writeInt32(i.media_time),e.writeInt16(i.media_rate_integer),e.writeInt16(i.media_rate_fraction);}},c.emsgBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=16+this.message_data.length+(this.scheme_id_uri.length+1)+(this.value.length+1),this.writeHeader(e),e.writeCString(this.scheme_id_uri),e.writeCString(this.value),e.writeUint32(this.timescale),e.writeUint32(this.presentation_time_delta),e.writeUint32(this.event_duration),e.writeUint32(this.id),e.writeUint8Array(this.message_data);},c.ftypBox.prototype.write=function(e){this.size=8+4*this.compatible_brands.length,this.writeHeader(e),e.writeString(this.major_brand,null,4),e.writeUint32(this.minor_version);for(var t=0;t<this.compatible_brands.length;t++){e.writeString(this.compatible_brands[t],null,4);}},c.hdlrBox.prototype.write=function(e){this.size=20+this.name.length+1,this.version=0,this.flags=0,this.writeHeader(e),e.writeUint32(0),e.writeString(this.handler,null,4),e.writeUint32(0),e.writeUint32(0),e.writeUint32(0),e.writeCString(this.name);},c.kindBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=this.schemeURI.length+1+(this.value.length+1),this.writeHeader(e),e.writeCString(this.schemeURI),e.writeCString(this.value);},c.mdhdBox.prototype.write=function(e){this.size=20,this.flags=0,this.version=0,this.writeHeader(e),e.writeUint32(this.creation_time),e.writeUint32(this.modification_time),e.writeUint32(this.timescale),e.writeUint32(this.duration),e.writeUint16(this.language),e.writeUint16(0);},c.mehdBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=4,this.writeHeader(e),e.writeUint32(this.fragment_duration);},c.mfhdBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=4,this.writeHeader(e),e.writeUint32(this.sequence_number);},c.mvhdBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=96,this.writeHeader(e),e.writeUint32(this.creation_time),e.writeUint32(this.modification_time),e.writeUint32(this.timescale),e.writeUint32(this.duration),e.writeUint32(this.rate),e.writeUint16(this.volume<<8),e.writeUint16(0),e.writeUint32(0),e.writeUint32(0),e.writeUint32Array(this.matrix),e.writeUint32(0),e.writeUint32(0),e.writeUint32(0),e.writeUint32(0),e.writeUint32(0),e.writeUint32(0),e.writeUint32(this.next_track_id);},c.SampleEntry.prototype.writeHeader=function(e){this.size=8,c.Box.prototype.writeHeader.call(this,e),e.writeUint8(0),e.writeUint8(0),e.writeUint8(0),e.writeUint8(0),e.writeUint8(0),e.writeUint8(0),e.writeUint16(this.data_reference_index);},c.SampleEntry.prototype.writeFooter=function(e){for(var t=0;t<this.boxes.length;t++){this.boxes[t].write(e),this.size+=this.boxes[t].size;}a.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size);},c.SampleEntry.prototype.write=function(e){this.writeHeader(e),e.writeUint8Array(this.data),this.size+=this.data.length,a.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size);},c.VisualSampleEntry.prototype.write=function(e){this.writeHeader(e),this.size+=70,e.writeUint16(0),e.writeUint16(0),e.writeUint32(0),e.writeUint32(0),e.writeUint32(0),e.writeUint16(this.width),e.writeUint16(this.height),e.writeUint32(this.horizresolution),e.writeUint32(this.vertresolution),e.writeUint32(0),e.writeUint16(this.frame_count),e.writeUint8(Math.min(31,this.compressorname.length)),e.writeString(this.compressorname,null,31),e.writeUint16(this.depth),e.writeInt16(-1),this.writeFooter(e);},c.AudioSampleEntry.prototype.write=function(e){this.writeHeader(e),this.size+=20,e.writeUint32(0),e.writeUint32(0),e.writeUint16(this.channel_count),e.writeUint16(this.samplesize),e.writeUint16(0),e.writeUint16(0),e.writeUint32(this.samplerate<<16),this.writeFooter(e);},c.stppSampleEntry.prototype.write=function(e){this.writeHeader(e),this.size+=this.namespace.length+1+this.schema_location.length+1+this.auxiliary_mime_types.length+1,e.writeCString(this.namespace),e.writeCString(this.schema_location),e.writeCString(this.auxiliary_mime_types),this.writeFooter(e);},c.SampleGroupEntry.prototype.write=function(e){e.writeUint8Array(this.data);},c.sbgpBox.prototype.write=function(e){this.version=1,this.flags=0,this.size=12+8*this.entries.length,this.writeHeader(e),e.writeString(this.grouping_type,null,4),e.writeUint32(this.grouping_type_parameter),e.writeUint32(this.entries.length);for(var t=0;t<this.entries.length;t++){var i=this.entries[t];e.writeInt32(i.sample_count),e.writeInt32(i.group_description_index);}},c.sgpdBox.prototype.write=function(e){var t,i;for(this.flags=0,this.size=12,t=0;t<this.entries.length;t++){i=this.entries[t],1===this.version&&(0===this.default_length&&(this.size+=4),this.size+=i.data.length);}for(this.writeHeader(e),e.writeString(this.grouping_type,null,4),1===this.version&&e.writeUint32(this.default_length),this.version>=2&&e.writeUint32(this.default_sample_description_index),e.writeUint32(this.entries.length),t=0;t<this.entries.length;t++){i=this.entries[t],1===this.version&&0===this.default_length&&e.writeUint32(i.description_length),i.write(e);}},c.sidxBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=20+12*this.references.length,this.writeHeader(e),e.writeUint32(this.reference_ID),e.writeUint32(this.timescale),e.writeUint32(this.earliest_presentation_time),e.writeUint32(this.first_offset),e.writeUint16(0),e.writeUint16(this.references.length);for(var t=0;t<this.references.length;t++){var i=this.references[t];e.writeUint32(i.reference_type<<31|i.referenced_size),e.writeUint32(i.subsegment_duration),e.writeUint32(i.starts_with_SAP<<31|i.SAP_type<<28|i.SAP_delta_time);}},c.stcoBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=4+4*this.chunk_offsets.length,this.writeHeader(e),e.writeUint32(this.chunk_offsets.length),e.writeUint32Array(this.chunk_offsets);},c.stscBox.prototype.write=function(e){var t;for(this.version=0,this.flags=0,this.size=4+12*this.first_chunk.length,this.writeHeader(e),e.writeUint32(this.first_chunk.length),t=0;t<this.first_chunk.length;t++){e.writeUint32(this.first_chunk[t]),e.writeUint32(this.samples_per_chunk[t]),e.writeUint32(this.sample_description_index[t]);}},c.stsdBox.prototype.write=function(e){var t;for(this.version=0,this.flags=0,this.size=0,this.writeHeader(e),e.writeUint32(this.entries.length),this.size+=4,t=0;t<this.entries.length;t++){this.entries[t].write(e),this.size+=this.entries[t].size;}a.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size);},c.stshBox.prototype.write=function(e){var t;for(this.version=0,this.flags=0,this.size=4+8*this.shadowed_sample_numbers.length,this.writeHeader(e),e.writeUint32(this.shadowed_sample_numbers.length),t=0;t<this.shadowed_sample_numbers.length;t++){e.writeUint32(this.shadowed_sample_numbers[t]),e.writeUint32(this.sync_sample_numbers[t]);}},c.stssBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=4+4*this.sample_numbers.length,this.writeHeader(e),e.writeUint32(this.sample_numbers.length),e.writeUint32Array(this.sample_numbers);},c.stszBox.prototype.write=function(e){var t,i=!0;if(this.version=0,this.flags=0,this.sample_sizes.length>0)for(t=0;t+1<this.sample_sizes.length;){if(this.sample_sizes[t+1]!==this.sample_sizes[0]){i=!1;break;}t++;}else i=!1;this.size=8,i||(this.size+=4*this.sample_sizes.length),this.writeHeader(e),i?e.writeUint32(this.sample_sizes[0]):e.writeUint32(0),e.writeUint32(this.sample_sizes.length),i||e.writeUint32Array(this.sample_sizes);},c.sttsBox.prototype.write=function(e){var t;for(this.version=0,this.flags=0,this.size=4+8*this.sample_counts.length,this.writeHeader(e),e.writeUint32(this.sample_counts.length),t=0;t<this.sample_counts.length;t++){e.writeUint32(this.sample_counts[t]),e.writeUint32(this.sample_deltas[t]);}},c.tfdtBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=4,1===this.version&&(this.size+=4),this.writeHeader(e),1===this.version?e.writeUint64(this.baseMediaDecodeTime):e.writeUint32(this.baseMediaDecodeTime);},c.tfhdBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&c.TFHD_FLAG_BASE_DATA_OFFSET&&(this.size+=8),this.flags&c.TFHD_FLAG_SAMPLE_DESC&&(this.size+=4),this.flags&c.TFHD_FLAG_SAMPLE_DUR&&(this.size+=4),this.flags&c.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&c.TFHD_FLAG_SAMPLE_FLAGS&&(this.size+=4),this.writeHeader(e),e.writeUint32(this.track_id),this.flags&c.TFHD_FLAG_BASE_DATA_OFFSET&&e.writeUint64(this.base_data_offset),this.flags&c.TFHD_FLAG_SAMPLE_DESC&&e.writeUint32(this.default_sample_description_index),this.flags&c.TFHD_FLAG_SAMPLE_DUR&&e.writeUint32(this.default_sample_duration),this.flags&c.TFHD_FLAG_SAMPLE_SIZE&&e.writeUint32(this.default_sample_size),this.flags&c.TFHD_FLAG_SAMPLE_FLAGS&&e.writeUint32(this.default_sample_flags);},c.tkhdBox.prototype.write=function(e){this.version=0,this.size=80,this.writeHeader(e),e.writeUint32(this.creation_time),e.writeUint32(this.modification_time),e.writeUint32(this.track_id),e.writeUint32(0),e.writeUint32(this.duration),e.writeUint32(0),e.writeUint32(0),e.writeInt16(this.layer),e.writeInt16(this.alternate_group),e.writeInt16(this.volume<<8),e.writeUint16(0),e.writeInt32Array(this.matrix),e.writeUint32(this.width),e.writeUint32(this.height);},c.trexBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=20,this.writeHeader(e),e.writeUint32(this.track_id),e.writeUint32(this.default_sample_description_index),e.writeUint32(this.default_sample_duration),e.writeUint32(this.default_sample_size),e.writeUint32(this.default_sample_flags);},c.trunBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&c.TRUN_FLAGS_DATA_OFFSET&&(this.size+=4),this.flags&c.TRUN_FLAGS_FIRST_FLAG&&(this.size+=4),this.flags&c.TRUN_FLAGS_DURATION&&(this.size+=4*this.sample_duration.length),this.flags&c.TRUN_FLAGS_SIZE&&(this.size+=4*this.sample_size.length),this.flags&c.TRUN_FLAGS_FLAGS&&(this.size+=4*this.sample_flags.length),this.flags&c.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(e),e.writeUint32(this.sample_count),this.flags&c.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=e.getPosition(),e.writeInt32(this.data_offset)),this.flags&c.TRUN_FLAGS_FIRST_FLAG&&e.writeUint32(this.first_sample_flags);for(var t=0;t<this.sample_count;t++){this.flags&c.TRUN_FLAGS_DURATION&&e.writeUint32(this.sample_duration[t]),this.flags&c.TRUN_FLAGS_SIZE&&e.writeUint32(this.sample_size[t]),this.flags&c.TRUN_FLAGS_FLAGS&&e.writeUint32(this.sample_flags[t]),this.flags&c.TRUN_FLAGS_CTS_OFFSET&&(0===this.version?e.writeUint32(this.sample_composition_time_offset[t]):e.writeInt32(this.sample_composition_time_offset[t]));}},c["url Box"].prototype.write=function(e){this.version=0,this.location?(this.flags=0,this.size=this.location.length+1):(this.flags=1,this.size=0),this.writeHeader(e),this.location&&e.writeCString(this.location);},c["urn Box"].prototype.write=function(e){this.version=0,this.flags=0,this.size=this.name.length+1+(this.location?this.location.length+1:0),this.writeHeader(e),e.writeCString(this.name),this.location&&e.writeCString(this.location);},c.vmhdBox.prototype.write=function(e){this.version=0,this.flags=1,this.size=8,this.writeHeader(e),e.writeUint16(this.graphicsmode),e.writeUint16Array(this.opcolor);},c.cttsBox.prototype.unpack=function(e){var t,i,r;for(r=0,t=0;t<this.sample_counts.length;t++){for(i=0;i<this.sample_counts[t];i++){e[r].pts=e[r].dts+this.sample_offsets[t],r++;}}},c.sttsBox.prototype.unpack=function(e){var t,i,r;for(r=0,t=0;t<this.sample_counts.length;t++){for(i=0;i<this.sample_counts[t];i++){e[r].dts=0===r?0:e[r-1].dts+this.sample_deltas[t],r++;}}},c.stcoBox.prototype.unpack=function(e){var t;for(t=0;t<this.chunk_offsets.length;t++){e[t].offset=this.chunk_offsets[t];}},c.stscBox.prototype.unpack=function(e){var t,i,r,n,a;for(n=0,a=0,t=0;t<this.first_chunk.length;t++){for(i=0;i<(t+1<this.first_chunk.length?this.first_chunk[t+1]:1/0);i++){for(a++,r=0;r<this.samples_per_chunk[t];r++){if(!e[n])return;e[n].description_index=this.sample_description_index[t],e[n].chunk_index=a,n++;}}}},c.stszBox.prototype.unpack=function(e){var t;for(t=0;t<this.sample_sizes.length;t++){e[t].size=this.sample_sizes[t];}},c.DIFF_BOXES_PROP_NAMES=["boxes","entries","references","subsamples","items","item_infos","extents","associations","subsegments","ranges","seekLists","seekPoints","esd","levels"],c.DIFF_PRIMITIVE_ARRAY_PROP_NAMES=["compatible_brands","matrix","opcolor","sample_counts","sample_counts","sample_deltas","first_chunk","samples_per_chunk","sample_sizes","chunk_offsets","sample_offsets","sample_description_index","sample_duration"],c.boxEqualFields=function(e,t){if(e&&!t)return!1;var i;for(i in e){if(!(c.DIFF_BOXES_PROP_NAMES.indexOf(i)>-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<c.DIFF_BOXES_PROP_NAMES.length;i++){var r=c.DIFF_BOXES_PROP_NAMES[i];if(e[r]&&t[r]&&!c.boxEqual(e[r],t[r]))return!1;}return!0;};var h=function h(){};h.prototype.parseSample=function(e){var t,i,r=new s(e.buffer);for(t=[];!r.isEos();){(i=c.parseOneBox(r,!1)).code===c.OK&&"vttc"===i.box.type&&t.push(i.box);}return t;},h.prototype.getText=function(e,t,i){function r(e,t,i){return i=i||"0",(e+="").length>=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;o<a.length;o++){var l=a[o];s+=n(e)+" --\x3e "+n(t)+"\r\n",s+=l.payl.text;}return s;};var d=function d(){};d.prototype.parseSample=function(e){var t,i={};i.resources=[];var r=new s(e.data.buffer);if(e.subsamples&&0!==e.subsamples.length){if(i.documentString=r.readString(e.subsamples[0].size),e.subsamples.length>1)for(t=1;t<e.subsamples.length;t++){i.resources[t]=r.readUint8Array(e.subsamples[t].size);}}else i.documentString=r.readString(e.data.length);return"undefined"!=typeof DOMParser&&(i.document=new DOMParser().parseFromString(i.documentString,"application/xml")),i;};var _=function _(){};_.prototype.parseSample=function(e){return new s(e.data.buffer).readString(e.data.length);},_.prototype.parseConfig=function(e){var t=new s(e.buffer);return t.readUint32(),t.readCString();},void 0!==i&&(i.XMLSubtitlein4Parser=d,i.Textin4Parser=_);var p=function p(e){this.stream=e||new f(),this.boxes=[],this.mdats=[],this.moofs=[],this.isProgressive=!1,this.moovStartFound=!1,this.onMoovStart=null,this.moovStartSent=!1,this.onReady=null,this.readySent=!1,this.onSegment=null,this.onSamples=null,this.onError=null,this.sampleListBuilt=!1,this.fragmentedTracks=[],this.extractedTracks=[],this.isFragmentationInitialized=!1,this.sampleProcessingStarted=!1,this.nextMoofNumber=0,this.itemListBuilt=!1,this.onSidx=null,this.sidxSent=!1;};p.prototype.setSegmentOptions=function(e,t,i){var r=this.getTrackById(e);if(r){var n={};this.fragmentedTracks.push(n),n.id=e,n.user=t,n.trak=r,r.nextSample=0,n.segmentStream=null,n.nb_samples=1e3,n.rapAlignement=!0,i&&(i.nbSamples&&(n.nb_samples=i.nbSamples),i.rapAlignement&&(n.rapAlignement=i.rapAlignement));}},p.prototype.unsetSegmentOptions=function(e){for(var t=-1,i=0;i<this.fragmentedTracks.length;i++){this.fragmentedTracks[i].id==e&&(t=i);}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<this.extractedTracks.length;i++){this.extractedTracks[i].id==e&&(t=i);}t>-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;e<this.moov.traks.length;e++){if(n=(i=this.moov.traks[e]).mdia.minf.stbl.stsd.entries[0],r={},a.tracks.push(r),r.id=i.tkhd.track_id,r.name=i.mdia.hdlr.name,r.references=[],i.tref)for(t=0;t<i.tref.boxes.length;t++){ref={},r.references.push(ref),ref.type=i.tref.boxes[t].type,ref.track_ids=i.tref.boxes[t].track_ids;}i.edts&&(r.edits=i.edts.elst.entries),r.created=new Date(s+1e3*i.tkhd.creation_time),r.modified=new Date(s+1e3*i.tkhd.modification_time),r.movie_duration=i.tkhd.duration,r.movie_timescale=a.timescale,r.layer=i.tkhd.layer,r.alternate_group=i.tkhd.alternate_group,r.volume=i.tkhd.volume,r.matrix=i.tkhd.matrix,r.track_width=i.tkhd.width/65536,r.track_height=i.tkhd.height/65536,r.timescale=i.mdia.mdhd.timescale,r.cts_shift=i.mdia.minf.stbl.cslg,r.duration=i.mdia.mdhd.duration,r.samples_duration=i.samples_duration,r.codec=n.getCodec(),r.kind=i.udta&&i.udta.kinds.length?i.udta.kinds[0]:{schemeURI:"",value:""},r.language=i.mdia.elng?i.mdia.elng.extended_language:i.mdia.mdhd.languageString,r.nb_samples=i.samples.length,r.size=i.samples_size,r.bitrate=8*r.size*r.timescale/r.samples_duration,n.isAudio()?(r.type="audio",a.audioTracks.push(r),r.audio={},r.audio.sample_rate=n.getSampleRate(),r.audio.channel_count=n.getChannelCount(),r.audio.sample_size=n.getSampleSize()):n.isVideo()?(r.type="video",a.videoTracks.push(r),r.video={},r.video.width=n.getWidth(),r.video.height=n.getHeight()):n.isSubtitle()?(r.type="subtitles",a.subtitleTracks.push(r)):n.isHint()?(r.type="metadata",a.hintTracks.push(r)):n.isMetadata()?(r.type="metadata",a.metadataTracks.push(r)):(r.type="metadata",a.otherTracks.push(r));}else a.hasMoov=!1;if(a.mime="",a.hasMoov&&a.tracks){for(a.videoTracks&&a.videoTracks.length>0?a.mime+='video/mp4; codecs="':a.audioTracks&&a.audioTracks.length>0?a.mime+='audio/mp4; codecs="':a.mime+='application/mp4; codecs="',e=0;e<a.tracks.length;e++){0!==e&&(a.mime+=","),a.mime+=a.tracks[e].codec;}a.mime+='"; profiles="',a.mime+=this.ftyp.compatible_brands.join(),a.mime+='"';}return a;},p.prototype.processSamples=function(e){var t,i;if(this.sampleProcessingStarted){if(this.isFragmentationInitialized&&null!==this.onSegment)for(t=0;t<this.fragmentedTracks.length;t++){var r=this.fragmentedTracks[t];for(i=r.trak;i.nextSample<i.samples.length&&this.sampleProcessingStarted;){a.debug("ISOFile","Creating media fragment on track #"+r.id+" for sample "+i.nextSample);var n=this.createFragment(r.id,i.nextSample,r.segmentStream);if(!n)break;if(r.segmentStream=n,i.nextSample++,(i.nextSample%r.nb_samples==0||e||i.nextSample>=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<this.extractedTracks.length;t++){var s=this.extractedTracks[t];for(i=s.trak;i.nextSample<i.samples.length&&this.sampleProcessingStarted;){a.debug("ISOFile","Exporting on track #"+s.id+" sample #"+i.nextSample);var o=this.getSample(i,i.nextSample);if(!o)break;if(i.nextSample++,s.samples.push(o),(i.nextSample%s.nb_samples==0||i.nextSample>=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;n<t;n++){i+=this.releaseSample(r,n);}a.info("ISOFile","Track #"+e+" released samples up to "+t+" (released size: "+i+", remaining: "+this.samplesDataSize+")"),r.lastValidSample=t;},p.prototype.start=function(){this.sampleProcessingStarted=!0,this.processSamples(!1);},p.prototype.stop=function(){this.sampleProcessingStarted=!1;},p.prototype.flush=function(){a.info("ISOFile","Flushing remaining samples"),this.updateSampleLists(),this.processSamples(!0),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0);},p.prototype.seekTrack=function(e,t,i){var r,n,s,o,l=0,f=0;if(0===i.samples.length)return a.info("ISOFile","No sample in track, cannot seek! Using time "+a.getDurationString(0,1)+" and offset: 0"),{offset:0,time:0};for(r=0;r<i.samples.length;r++){if(n=i.samples[r],0===r)f=0,o=n.timescale;else if(n.cts>e*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<s.traks.length;n++){i=s.traks[n],(r=this.seekTrack(e,t,i)).offset<o.offset&&(o.offset=r.offset),r.time<o.time&&(o.time=r.time);}return a.info("ISOFile","Seeking at time "+a.getDurationString(o.time,1)+" needs a buffer with a fileStart position of "+o.offset),o.offset===1/0?o={offset:this.nextParsePosition,time:0}:o.offset=this.stream.getEndFilePositionAfter(o.offset),a.info("ISOFile","Adjusted seek position (after checking data already in buffer): "+o.offset),o;}throw"Cannot seek: moov not received!";},p.prototype.equal=function(e){for(var t=0;t<this.boxes.length&&t<e.boxes.length;){var i=this.boxes[t],r=e.boxes[t];if(!c.boxEqual(i,r))return!1;t++;}return!0;},void 0!==i&&(i.ISOFile=p),p.prototype.lastBoxStartPosition=0,p.prototype.parsingMdat=null,p.prototype.nextParsePosition=0,p.prototype.discardMdatData=!1,p.prototype.processIncompleteBox=function(e){var t;return"mdat"===e.type?(t=new c[e.type+"Box"](e.size),this.parsingMdat=t,this.boxes.push(t),this.mdats.push(t),t.start=e.start,t.hdr_size=e.hdr_size,this.stream.addUsedBytes(t.hdr_size),this.lastBoxStartPosition=t.start+t.size,this.stream.seek(t.start+t.size,!1,this.discardMdatData)?(this.parsingMdat=null,!0):(this.moovStartFound?this.nextParsePosition=this.stream.findEndContiguousBuf():this.nextParsePosition=t.start+t.size,!1)):("moov"===e.type&&(this.moovStartFound=!0,0===this.mdats.length&&(this.isProgressive=!0)),!!this.stream.mergeNextBuffer&&this.stream.mergeNextBuffer()?(this.nextParsePosition=this.stream.getEndPosition(),!0):(e.type?this.moovStartFound?this.nextParsePosition=this.stream.getEndPosition():this.nextParsePosition=this.stream.getPosition()+e.size:this.nextParsePosition=this.stream.getEndPosition(),!1));},p.prototype.hasIncompleteMdat=function(){return null!==this.parsingMdat;},p.prototype.processIncompleteMdat=function(){var e;return e=this.parsingMdat,this.stream.seek(e.start+e.size,!1,this.discardMdatData)?(a.debug("ISOFile","Found 'mdat' end in buffered data"),this.parsingMdat=null,!0):(this.nextParsePosition=this.stream.findEndContiguousBuf(),!1);},p.prototype.restoreParsePosition=function(){return this.stream.seek(this.lastBoxStartPosition,!0,this.discardMdatData);},p.prototype.saveParsePosition=function(){this.lastBoxStartPosition=this.stream.getPosition();},p.prototype.updateUsedBytes=function(e,t){this.stream.addUsedBytes&&("mdat"===e.type?(this.stream.addUsedBytes(e.hdr_size),this.discardMdatData&&this.stream.addUsedBytes(e.size-e.hdr_size)):this.stream.addUsedBytes(e.size));},p.prototype.add=c.Box.prototype.add,p.prototype.addBox=c.Box.prototype.addBox,p.prototype.init=function(e){var t=e||{},i=(this.add("ftyp").set("major_brand",t.brands&&t.brands[0]||"iso4").set("minor_version",0).set("compatible_brands",t.brands||["iso4"]),this.add("moov"));return i.add("mvhd").set("timescale",t.timescale||600).set("rate",t.rate||1).set("creation_time",0).set("modification_time",0).set("duration",t.duration||0).set("volume",1).set("matrix",[0,0,0,0,0,0,0,0,0]).set("next_track_id",1),i.add("mvex"),this;},p.prototype.addTrack=function(e){this.moov||this.init(e);var t=e||{};t.width=t.width||320,t.height=t.height||320,t.id=t.id||this.moov.mvhd.next_track_id,t.type=t.type||"avc1";var i=this.moov.add("trak");this.moov.mvhd.next_track_id=t.id+1,i.add("tkhd").set("flags",c.TKHD_FLAG_ENABLED|c.TKHD_FLAG_IN_MOVIE|c.TKHD_FLAG_IN_PREVIEW).set("creation_time",0).set("modification_time",0).set("track_id",t.id).set("duration",t.duration||0).set("layer",t.layer||0).set("alternate_group",0).set("volume",1).set("matrix",[0,0,0,0,0,0,0,0,0]).set("width",t.width).set("height",t.height);var r=i.add("mdia");r.add("mdhd").set("creation_time",0).set("modification_time",0).set("timescale",t.timescale||1).set("duration",t.media_duration||0).set("language",t.language||0),r.add("hdlr").set("handler",t.hdlr||"vide").set("name",t.name||"Track created with MP4Box.js"),r.add("elng").set("extended_language",t.language||"fr-FR");var n=r.add("minf");if(void 0!==c[t.type+"SampleEntry"]){var a=new c[t.type+"SampleEntry"]();a.data_reference_index=1;var s="";for(var o in c.sampleEntryCodes){for(var l=c.sampleEntryCodes[o],f=0;f<l.length;f++){if(l.indexOf(t.type)>-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<this.moov.traks.length;e++){(t=this.moov.traks[e]).tkhd.duration=0,t.mdia.mdhd.duration=0,(t.mdia.minf.stbl.stco||t.mdia.minf.stbl.co64).chunk_offsets=[],(i=t.mdia.minf.stbl.stsc).first_chunk=[],i.samples_per_chunk=[],i.sample_description_index=[],(t.mdia.minf.stbl.stsz||t.mdia.minf.stbl.stz2).sample_sizes=[],(r=t.mdia.minf.stbl.stts).sample_counts=[],r.sample_deltas=[],(n=t.mdia.minf.stbl.ctts)&&(n.sample_counts=[],n.sample_offsets=[]),a=t.mdia.minf.stbl.stss;var s=t.mdia.minf.stbl.boxes.indexOf(a);-1!=s&&(t.mdia.minf.stbl.boxes[s]=null);}},p.initSampleGroups=function(e,t,i,r,n){var a,s,o,l;function f(e,t,i){this.grouping_type=e,this.grouping_type_parameter=t,this.sbgp=i,this.last_sample_in_run=-1,this.entry_index=-1;}for(t&&(t.sample_groups_info=[]),e.sample_groups_info||(e.sample_groups_info=[]),s=0;s<i.length;s++){for(l=i[s].grouping_type+"/"+i[s].grouping_type_parameter,o=new f(i[s].grouping_type,i[s].grouping_type_parameter,i[s]),t&&(t.sample_groups_info[l]=o),e.sample_groups_info[l]||(e.sample_groups_info[l]=o),a=0;a<r.length;a++){r[a].grouping_type===i[s].grouping_type&&(o.description=r[a],o.description.used=!0);}if(n)for(a=0;a<n.length;a++){n[a].grouping_type===i[s].grouping_type&&(o.fragment_description=n[a],o.fragment_description.used=!0,o.is_fragment=!0);}}if(t){if(n)for(s=0;s<n.length;s++){!n[s].used&&n[s].version>=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<r.length;s++){!r[s].used&&r[s].version>=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;e<this.moov.traks.length;e++){t=this.moov.traks[e],this.buildTrakSampleLists(t);}},p.prototype.buildTrakSampleLists=function(e){var t,i,r,n,a,s,o,l,f,u,c,h,d,_,m,b,v,y,g,w,E,C,S,j;if(e.samples=[],e.samples_duration=0,e.samples_size=0,i=e.mdia.minf.stbl.stco||e.mdia.minf.stbl.co64,r=e.mdia.minf.stbl.stsc,n=e.mdia.minf.stbl.stsz||e.mdia.minf.stbl.stz2,a=e.mdia.minf.stbl.stts,s=e.mdia.minf.stbl.ctts,o=e.mdia.minf.stbl.stss,l=e.mdia.minf.stbl.stsd,f=e.mdia.minf.stbl.subs,h=e.mdia.minf.stbl.stdp,u=e.mdia.minf.stbl.sbgps,c=e.mdia.minf.stbl.sgpds,y=-1,g=-1,w=-1,E=-1,C=0,S=0,j=0,p.initSampleGroups(e,null,u,c),void 0!==n){for(t=0;t<n.sample_sizes.length;t++){var T={};T.number=t,T.track_id=e.tkhd.track_id,T.timescale=e.mdia.mdhd.timescale,T.alreadyRead=0,e.samples[t]=T,T.size=n.sample_sizes[t],e.samples_size+=T.size,0===t?(_=1,d=0,T.chunk_index=_,T.chunk_run_index=d,v=r.samples_per_chunk[d],b=0,m=d+1<r.first_chunk.length?r.first_chunk[d+1]-1:1/0):t<v?(T.chunk_index=_,T.chunk_run_index=d):(_++,T.chunk_index=_,b=0,_<=m||(m=++d+1<r.first_chunk.length?r.first_chunk[d+1]-1:1/0),T.chunk_run_index=d,v+=r.samples_per_chunk[d]),T.description_index=r.sample_description_index[T.chunk_run_index]-1,T.description=l.entries[T.description_index],T.offset=i.chunk_offsets[T.chunk_index-1]+b,b+=T.size,t>y&&(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.lastMoofIndex<this.moofs.length;){if(l=this.moofs[this.lastMoofIndex],this.lastMoofIndex++,"moof"==l.type)for(f=l,e=0;e<f.trafs.length;e++){for(u=f.trafs[e],h=this.getTrackById(u.tfhd.track_id),d=this.getTrexById(u.tfhd.track_id),r=u.tfhd.flags&c.TFHD_FLAG_SAMPLE_DESC?u.tfhd.default_sample_description_index:d?d.default_sample_description_index:1,n=u.tfhd.flags&c.TFHD_FLAG_SAMPLE_DUR?u.tfhd.default_sample_duration:d?d.default_sample_duration:0,a=u.tfhd.flags&c.TFHD_FLAG_SAMPLE_SIZE?u.tfhd.default_sample_size:d?d.default_sample_size:0,s=u.tfhd.flags&c.TFHD_FLAG_SAMPLE_FLAGS?u.tfhd.default_sample_flags:d?d.default_sample_flags:0,u.sample_number=0,u.sbgps.length>0&&p.initSampleGroups(h,u,u.sbgps,h.mdia.minf.stbl.sgpds,u.sgpds),t=0;t<u.truns.length;t++){var b=u.truns[t];for(i=0;i<b.sample_count;i++){(_={}).moof_number=this.lastMoofIndex,_.number_in_traf=u.sample_number,u.sample_number++,_.number=h.samples.length,u.first_sample_index=h.samples.length,h.samples.push(_),_.track_id=h.tkhd.track_id,_.timescale=h.mdia.mdhd.timescale,_.description_index=r-1,_.description=h.mdia.minf.stbl.stsd.entries[_.description_index],_.size=a,b.flags&c.TRUN_FLAGS_SIZE&&(_.size=b.sample_size[i]),h.samples_size+=_.size,_.duration=n,b.flags&c.TRUN_FLAGS_DURATION&&(_.duration=b.sample_duration[i]),h.samples_duration+=_.duration,h.first_traf_merged||i>0?_.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<u.subs.entries.length;t++){E+=u.subs.entries[t].sample_delta,(_=h.samples[E-1]).subsamples=u.subs.entries[t].subsamples;}}}}},p.prototype.getSample=function(e,t){var i,r=e.samples[t];if(!this.moov)return null;if(r.data){if(r.alreadyRead==r.size)return r;}else r.data=new Uint8Array(r.size),r.alreadyRead=0,this.samplesDataSize+=r.size,a.debug("ISOFile","Allocating sample #"+t+" on track #"+e.tkhd.track_id+" of size "+r.size+" (total: "+this.samplesDataSize+")");for(;;){var n=this.stream.findPosition(!0,r.offset+r.alreadyRead,!1);if(!(n>-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;e<this.moov.traks.length;e++){e>0&&(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;t<this.moov.mvex.trexs.length;t++){var i=this.moov.mvex.trexs[t];if(i.track_id==e)return i;}return null;},p.prototype.getTrackById=function(e){if(void 0===this.moov)return null;for(var t=0;t<this.moov.traks.length;t++){var i=this.moov.traks[t];if(i.tkhd.track_id==e)return i;}return null;},p.prototype.items=[],p.prototype.itemsDataSize=0,p.prototype.flattenItemInfo=function(){var e,t,i,r=this.items,n=this.meta;if(null!=n&&void 0!==n.hdlr&&void 0!==n.iinf){for(e=0;e<n.iinf.item_infos.length;e++){(i={}).id=n.iinf.item_infos[e].item_ID,r[i.id]=i,i.ref_to=[],i.name=n.iinf.item_infos[e].item_name,n.iinf.item_infos[e].protection_index>0&&(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;e<n.iloc.items.length;e++){var s=n.iloc.items[e];switch(i=r[s.item_ID],0!==s.data_reference_index&&(a.warn("Item storage with reference to other files: not supported"),i.source=n.dinf.boxes[s.data_reference_index-1]),s.construction_method){case 0:break;case 1:case 2:a.warn("Item storage with construction_method : not supported");}for(i.extents=[],i.size=0,t=0;t<s.extents.length;t++){i.extents[t]={},i.extents[t].offset=s.extents[t].extent_offset+s.base_offset,i.extents[t].length=s.extents[t].extent_length,i.extents[t].alreadyRead=0,i.size+=i.extents[t].length;}}if(n.pitm&&(r[n.pitm.item_id].primary=!0),n.iref)for(e=0;e<n.iref.references.length;e++){var o=n.iref.references[e];for(t=0;t<o.references.length;t++){r[o.from_item_ID].ref_to.push({type:o.type,id:o.references[t]});}}if(n.iprp)for(var l=0;l<n.iprp.ipmas.length;l++){var f=n.iprp.ipmas[l];for(e=0;e<f.associations.length;e++){var u=f.associations[e];for(void 0===(i=r[u.id]).properties&&(i.properties={},i.properties.boxes=[]),t=0;t<u.props.length;t++){var c=u.props[t];if(c.property_index>0){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<i.extents.length;r++){var n=i.extents[r];if(n.alreadyRead!==n.length){var s=this.stream.findPosition(!0,n.offset+n.alreadyRead,!1);if(!(s>-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;i<t.extents.length;i++){t.extents[i].alreadyRead=0;}return t.size;}return 0;},p.prototype.processItems=function(e){for(var t in this.items){var i=this.items[t];this.getItem(i.id),e&&!i.sent&&(e(i),i.sent=!0,i.data=null);}},p.prototype.hasItem=function(e){for(var t in this.items){var i=this.items[t];if(i.name===e)return i.id;}return-1;},p.prototype.getMetaHandler=function(){return this.meta?this.meta.hdlr.handler:null;},p.prototype.getPrimaryItem=function(){return this.meta&&this.meta.pitm?this.getItem(this.meta.pitm.item_id):null;},p.prototype.itemToFragmentedTrackFile=function(e){var t=e||{},i=null;if(null==(i=t.itemId?this.getItem(t.itemId):this.getPrimaryItem()))return null;var r=new p();r.discardMdatData=!1;var n={type:i.type,description_boxes:i.properties.boxes};i.properties.ispe&&(n.width=i.properties.ispe.image_width,n.height=i.properties.ispe.image_height);var a=r.addTrack(n);return a?(r.addSample(a,i.data),r):null;},p.prototype.write=function(e){for(var t=0;t<this.boxes.length;t++){this.boxes[t].write(e);}},p.prototype.createFragment=function(e,t,i){var r=this.getTrackById(e),n=this.getSample(r,t);if(null==n)return n=r.samples[t],this.nextSeekPosition?this.nextSeekPosition=Math.min(n.offset+n.alreadyRead,this.nextSeekPosition):this.nextSeekPosition=r.samples[t].offset+n.alreadyRead,null;var s=i||new o();s.endianness=o.BIG_ENDIAN;var l=p.createSingleSampleMoof(n);l.write(s),l.trafs[0].truns[0].data_offset=l.size+8,a.debug("MP4Box","Adjusting data_offset with new value "+l.trafs[0].truns[0].data_offset),s.adjustUint32(l.trafs[0].truns[0].data_offset_position,l.trafs[0].truns[0].data_offset);var f=new c.mdatBox();return f.data=n.data,f.write(s),s;},p.writeInitializationSegment=function(e,t,i,r){var n;a.debug("ISOFile","Generating initialization segment");var s=new o();s.endianness=o.BIG_ENDIAN,e.write(s);var l=t.add("mvex");for(i&&l.add("mehd").set("fragment_duration",i),n=0;n<t.traks.length;n++){l.add("trex").set("track_id",t.traks[n].tkhd.track_id).set("default_sample_description_index",1).set("default_sample_duration",r).set("default_sample_size",0).set("default_sample_flags",65536);}return t.write(s),s.buffer;},p.prototype.save=function(e){var t=new o();t.endianness=o.BIG_ENDIAN,this.write(t),t.save(e);},p.prototype.getBuffer=function(){var e=new o();return e.endianness=o.BIG_ENDIAN,this.write(e),e.buffer;},p.prototype.initializeSegmentation=function(){var e,t,i,r;for(null===this.onSegment&&a.warn("MP4Box","No segmentation callback set!"),this.isFragmentationInitialized||(this.isFragmentationInitialized=!0,this.nextMoofNumber=0,this.resetTables()),t=[],e=0;e<this.fragmentedTracks.length;e++){var n=new c.moovBox();n.mvhd=this.moov.mvhd,n.boxes.push(n.mvhd),i=this.getTrackById(this.fragmentedTracks[e].id),n.boxes.push(i),n.traks.push(i),(r={}).id=i.tkhd.track_id,r.user=this.fragmentedTracks[e].user,r.buffer=p.writeInitializationSegment(this.ftyp,n,this.moov.mvex&&this.moov.mvex.mehd?this.moov.mvex.mehd.fragment_duration:void 0,this.moov.traks[e].samples.length>0?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<this.boxes.length;t++){if(this.boxes[t]){var i=e.indent;e.indent+=" ",this.boxes[t].print(e),e.indent=i;}}},p.prototype.print=function(e){e.indent="";for(var t=0;t<this.boxes.length;t++){this.boxes[t]&&this.boxes[t].print(e);}},c.mvhdBox.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+"timescale: "+this.timescale),e.log(e.indent+"duration: "+this.duration),e.log(e.indent+"rate: "+this.rate),e.log(e.indent+"volume: "+(this.volume>>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<e.length;r++){t(e[r],r,e)&&i.push(e[r]);}return i;}i.resolve=function(){for(var i="",n=!1,a=arguments.length-1;a>=-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<e.length&&""===e[t];t++){;}for(var i=e.length-1;i>=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<s;l++){if(n[l]!==a[l]){o=l;break;}}var f=[];for(l=o;l<n.length;l++){f.push("..");}return(f=f.concat(a.slice(o))).join("/");},i.sep="/",i.delimiter=":",i.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),i=47===t,r=-1,n=!0,a=e.length-1;a>=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.length<l&&(t=s.concat([t,u],l));for(var f=s.allocUnsafe(l+c[e]),h=s.allocUnsafe(l+c[e]),d=0;d<l;d++){f[d]=54^t[d],h[d]=92^t[d];}var _=s.allocUnsafe(l+i+4);f.copy(_,0,0,l),this.ipad1=_,this.ipad2=f,this.opad=h,this.alg=e,this.blocksize=l,this.hash=o,this.size=c[e];}h.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad);},t.exports=function(e,t,i,r,n){o(i,r);var a=new h(n=n||"sha1",e=f(e,l,"Password"),(t=f(t,l,"Salt")).length),u=s.allocUnsafe(r),d=s.allocUnsafe(t.length+4);t.copy(d,0,0,t.length);for(var _=0,p=c[n],m=Math.ceil(r/p),b=1;b<=m;b++){d.writeUInt32BE(b,t.length);for(var v=a.run(d,a.ipad1),y=v,g=1;g<i;g++){y=a.run(y,a.ipad2);for(var w=0;w<p;w++){v[w]^=y[w];}}v.copy(u,_),_+=p;}return u;};},{"./default-encoding":153,"./precondition":154,"./to-buffer":156,"create-hash/md5":72,ripemd160:183,"safe-buffer":184,"sha.js":187}],156:[function(e,t,i){var r=e("safe-buffer").Buffer;t.exports=function(e,t,i){if(r.isBuffer(e))return e;if("string"==typeof e)return r.from(e,t);if(ArrayBuffer.isView(e))return r.from(e.buffer);throw new TypeError(i+" must be a string, a Buffer, a typed array or a DataView");};},{"safe-buffer":184}],157:[function(e,t,i){(function(e){"use strict";void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function nextTick(t,i,r,n){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var a,s,o=arguments.length;switch(o){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,i);});case 3:return e.nextTick(function(){t.call(null,i,r);});case 4:return e.nextTick(function(){t.call(null,i,r,n);});default:for(a=new Array(o-1),s=0;s<a.length;){a[s++]=arguments[s];}return e.nextTick(function(){t.apply(null,a);});}}}:t.exports=e;}).call(this,e("_process"));},{_process:158}],158:[function(e,t,i){var r,n,a=t.exports={};function s(){throw new Error("setTimeout has not been defined");}function o(){throw new Error("clearTimeout has not been defined");}function l(e){if(r===setTimeout)return setTimeout(e,0);if((r===s||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0);}catch(t){try{return r.call(null,e,0);}catch(t){return r.call(this,e,0);}}}!function(){try{r="function"==typeof setTimeout?setTimeout:s;}catch(e){r=s;}try{n="function"==typeof clearTimeout?clearTimeout:o;}catch(e){n=o;}}();var f,u=[],c=!1,h=-1;function d(){c&&f&&(c=!1,f.length?u=f.concat(u):h=-1,u.length&&_());}function _(){if(!c){var e=l(d);c=!0;for(var t=u.length;t;){for(f=u,u=[];++h<t;){f&&f[h].run();}h=-1,t=u.length;}f=null,c=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e);}catch(t){try{return n.call(null,e);}catch(t){return n.call(this,e);}}}(e);}}function p(e,t){this.fun=e,this.array=t;}function m(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++){t[i-1]=arguments[i];}u.push(new p(e,t)),1!==u.length||c||l(_);},p.prototype.run=function(){this.fun.apply(null,this.array);},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=m,a.addListener=m,a.once=m,a.off=m,a.removeListener=m,a.removeAllListeners=m,a.emit=m,a.prependListener=m,a.prependOnceListener=m,a.listeners=function(e){return[];},a.binding=function(e){throw new Error("process.binding is not supported");},a.cwd=function(){return"/";},a.chdir=function(e){throw new Error("process.chdir is not supported");},a.umask=function(){return 0;};},{}],159:[function(e,t,i){i.publicEncrypt=e("./publicEncrypt"),i.privateDecrypt=e("./privateDecrypt"),i.privateEncrypt=function(e,t){return i.publicEncrypt(e,t,!0);},i.publicDecrypt=function(e,t){return i.privateDecrypt(e,t,!0);};},{"./privateDecrypt":162,"./publicEncrypt":163}],160:[function(e,t,i){var r=e("create-hash"),n=e("safe-buffer").Buffer;function a(e){var t=n.allocUnsafe(4);return t.writeUInt32BE(e,0),t;}t.exports=function(e,t){for(var i,s=n.alloc(0),o=0;s.length<t;){i=a(o++),s=n.concat([s,r("sha1").update(e).update(i).digest()]);}return s.slice(0,t);};},{"create-hash":71,"safe-buffer":184}],161:[function(e,t,i){arguments[4][16][0].apply(i,arguments);},{buffer:20,dup:16}],162:[function(e,t,i){var r=e("parse-asn1"),n=e("./mgf"),a=e("./xor"),s=e("bn.js"),o=e("browserify-rsa"),l=e("create-hash"),f=e("./withPublic"),u=e("safe-buffer").Buffer;t.exports=function(e,t,i){var c;c=e.padding?e.padding:i?1:4;var h,d=r(e),_=d.modulus.byteLength();if(t.length>_||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<r;){i+=e[n]^t[n];}return i;}(r,h.slice(0,s)))throw new Error("decryption error");var d=s;for(;0===h[d];){d++;}if(1!==h[d++])throw new Error("decryption error");return h.slice(d);}(d,h);if(1===c)return function(e,t,i){var r=t.slice(0,2),n=2,a=0;for(;0!==t[n++];){if(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<e;){s===a.length&&(a=n(2*e),s=0),(t=a[s++])&&(i[r++]=t);}return i;}(s-a-3);return new l(c.concat([c.from([0,i?1:2]),r,c.alloc(1),t],s));}(_,t,i);else{if(3!==h)throw new Error("unknown padding");if((d=new l(t)).cmp(_.modulus)>=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;++r<i;){e[r]^=t[r];}return e;};},{}],166:[function(e,t,i){(function(i,r){"use strict";var n=e("safe-buffer").Buffer,a=r.crypto||r.msCrypto;a&&a.getRandomValues?t.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var r=n.allocUnsafe(e);if(e>0)if(e>65536)for(var s=0;s<e;s+=65536){a.getRandomValues(r.slice(s,s+65536));}else a.getRandomValues(r);if("function"==typeof t)return i.nextTick(function(){t(null,r);});return r;}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11");};}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});},{_process:158,"safe-buffer":184}],167:[function(e,t,i){(function(t,r){"use strict";function n(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11");}var a=e("safe-buffer"),s=e("randombytes"),o=a.Buffer,l=a.kMaxLength,f=r.crypto||r.msCrypto,u=Math.pow(2,32)-1;function c(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>u||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;f<l.length;f++){var u=l[f];c.prototype[u]||(c.prototype[u]=o.prototype[u]);}function c(e){if(!(this instanceof c))return new c(e);s.call(this,e),o.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h);}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(d,this);}function d(e){e.end();}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function get(){return this._writableState.highWaterMark;}}),Object.defineProperty(c.prototype,"destroyed",{get:function get(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed;},set:function set(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e);}}),c.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e);};},{"./_stream_readable":171,"./_stream_writable":173,"core-util-is":68,inherits:136,"process-nextick-args":157}],170:[function(e,t,i){"use strict";t.exports=a;var r=e("./_stream_transform"),n=Object.create(e("core-util-is"));function a(e){if(!(this instanceof a))return new a(e);r.call(this,e);}n.inherits=e("inherits"),n.inherits(a,r),a.prototype._transform=function(e,t,i){i(null,e);};},{"./_stream_transform":172,"core-util-is":68,inherits:136}],171:[function(e,t,i){(function(i,r){"use strict";var n=e("process-nextick-args");t.exports=y;var a,s=e("isarray");y.ReadableState=v;e("events").EventEmitter;var o=function o(e,t){return e.listeners(t).length;},l=e("./internal/streams/stream"),f=e("safe-buffer").Buffer,u=r.Uint8Array||function(){};var c=Object.create(e("core-util-is"));c.inherits=e("inherits");var h=e("util"),d=void 0;d=h&&h.debuglog?h.debuglog("stream"):function(){};var _,p=e("./internal/streams/BufferList"),m=e("./internal/streams/destroy");c.inherits(y,l);var b=["error","close","destroy","pause","resume"];function v(t,i){t=t||{};var r=i instanceof(a=a||e("./_stream_duplex"));this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,s=t.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r&&(s||0===s)?s:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new p(),this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(_||(_=e("string_decoder/").StringDecoder),this.decoder=new _(t.encoding),this.encoding=t.encoding);}function y(t){if(a=a||e("./_stream_duplex"),!(this instanceof y))return new y(t);this._readableState=new v(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),l.call(this);}function g(e,t,i,r,n){var a,s=e._readableState;null===t?(s.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var i=t.decoder.end();i&&i.length&&(t.buffer.push(i),t.length+=t.objectMode?1:i.length);}t.ended=!0,C(e);}(e,s)):(n||(a=function(e,t){var i;r=t,f.isBuffer(r)||r instanceof u||"string"==typeof t||void 0===t||e.objectMode||(i=new TypeError("Invalid non-string/buffer chunk"));var r;return i;}(s,t)),a?e.emit("error",a):s.objectMode||t&&t.length>0?("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.length<e.highWaterMark||0===e.length);}(s);}function w(e,t,i,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",i),e.read(0)):(t.length+=t.objectMode?1:i.length,r?t.buffer.unshift(i):t.buffer.push(i),t.needReadable&&C(e)),j(e,t);}Object.defineProperty(y.prototype,"destroyed",{get:function get(){return void 0!==this._readableState&&this._readableState.destroyed;},set:function set(e){this._readableState&&(this._readableState.destroyed=e);}}),y.prototype.destroy=m.destroy,y.prototype._undestroy=m.undestroy,y.prototype._destroy=function(e,t){this.push(null),t(e);},y.prototype.push=function(e,t){var i,r=this._readableState;return r.objectMode?i=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=f.from(e,t),t=""),i=!0),g(this,e,t,!1,i);},y.prototype.unshift=function(e){return g(this,e,null,!0,!1);},y.prototype.isPaused=function(){return!1===this._readableState.flowing;},y.prototype.setEncoding=function(t){return _||(_=e("string_decoder/").StringDecoder),this._readableState.decoder=new _(t),this._readableState.encoding=t,this;};function E(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=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.highWaterMark&&(d("maybeReadMore read 0"),e.read(0),i!==t.length);){i=t.length;}t.readingMore=!1;}function A(e){d("readable nexttick read 0"),e.read(0);}function x(e,t){t.reading||(d("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),M(e),t.flowing&&!t.reading&&e.read(0);}function M(e){var t=e._readableState;for(d("flow",t.flowing);t.flowing&&null!==e.read();){;}}function k(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.head.data:t.buffer.concat(t.length),t.buffer.clear()):i=function(e,t,i){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():i?function(e,t){var i=t.head,r=1,n=i.data;e-=n.length;for(;i=i.next;){var a=i.data,s=e>a.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 U(e,t){for(var i=0,r=e.length;i<r;i++){if(e[i]===t)return i;}return-1;}y.prototype.read=function(e){d("read",e),e=parseInt(e,10);var t=this._readableState,i=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=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-e<t.highWaterMark)&&d("length less than watermark",n=!0),t.ended||t.reading?d("reading or ended",n=!1):n&&(d("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=E(i,t))),null===(r=e>0?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!==U(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<n;a++){r[a].emit("unpipe",this,i);}return this;}var s=U(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,i)),this;},y.prototype.on=function(e,t){var i=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&C(this):n.nextTick(A,this));}return i;},y.prototype.addListener=y.prototype.on,y.prototype.resume=function(){var e=this._readableState;return e.flowing||(d("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(x,e,t));}(this,e)),this;},y.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this;},y.prototype.wrap=function(e){var t=this,i=this._readableState,r=!1;for(var n in e.on("end",function(){if(d("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){(d("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<b.length;a++){e.on(b[a],this.emit.bind(this,b[a]));}return this._read=function(t){d("wrapped _read",t),r&&(r=!1,e.resume());},this;},Object.defineProperty(y.prototype,"readableHighWaterMark",{enumerable:!1,get:function get(){return this._readableState.highWaterMark;}}),y._fromList=k;}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});},{"./_stream_duplex":169,"./internal/streams/BufferList":174,"./internal/streams/destroy":175,"./internal/streams/stream":176,_process:158,"core-util-is":68,events:104,inherits:136,isarray:138,"process-nextick-args":157,"safe-buffer":177,"string_decoder/":178,util:20}],172:[function(e,t,i){"use strict";t.exports=s;var r=e("./_stream_duplex"),n=Object.create(e("core-util-is"));function a(e,t){var i=this._transformState;i.transforming=!1;var r=i.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));i.writechunk=null,i.writecb=null,null!=t&&this.push(t),r(e);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark);}function s(e){if(!(this instanceof s))return new s(e);r.call(this,e),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",o);}function o(){var e=this;"function"==typeof this._flush?this._flush(function(t,i){l(e,t,i);}):l(this,null,null);}function l(e,t,i){if(t)return e.emit("error",t);if(null!=i&&e.push(i),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null);}n.inherits=e("inherits"),n.inherits(s,r),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t);},s.prototype._transform=function(e,t,i){throw new Error("_transform() is not implemented");},s.prototype._write=function(e,t,i){var r=this._transformState;if(r.writecb=i,r.writechunk=e,r.writeencoding=t,!r.transforming){var n=this._readableState;(r.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark);}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0;},s.prototype._destroy=function(e,t){var i=this;r.prototype._destroy.call(this,e,function(e){t(e),i.emit("close");});};},{"./_stream_duplex":169,"core-util-is":68,inherits:136}],173:[function(e,t,i){(function(i,r,n){"use strict";var a=e("process-nextick-args");function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,i){var r=e.entry;e.entry=null;for(;r;){var n=r.callback;t.pendingcb--,n(i),r=r.next;}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e;}(t,e);};}t.exports=v;var o,l=!i.browser&&["v0.10","v0.9."].indexOf(i.version.slice(0,5))>-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<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:n,isBuf:i,callback:a,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1;}else y(e,t,!1,o,r,n,a);return l;}(this,n,o,e,t,i)),s;},v.prototype.cork=function(){this._writableState.corked++;},v.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||w(this,e));},v.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this;},Object.defineProperty(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,"<22>";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"<22>";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"<22>";}}(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<e.length?t?t+this.text(e,i):this.text(e,i):t||"";},a.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"<22>":t;},a.prototype.text=function(e,t){var i=function(e,t,i){var r=t.length-1;if(r<i)return 0;var n=s(t[r]);if(n>=0)return n>0&&(e.lastNeed=n-1),n;if(--r<i||-2===n)return 0;if((n=s(t[r]))>=0)return n>0&&(e.lastNeed=n-2),n;if(--r<i||-2===n)return 0;if((n=s(t[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<<t|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 <https://feross.org/opensource> */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<a;){for(var l=s%n,f=Math.min(a-o,n-l),u=0;u<f;u++){i[l+u]=e[o+u];}o+=f,(s+=f)%n==0&&this._update(i);}return this._len+=a,this;},n.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var 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<t>>>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),U=p(M=t[x-4],k=t[x-4+1]),R=m(k,M),D=t[x-14],O=t[x-14+1],F=t[x-32],B=t[x-32+1],L=I+O|0,N=P+D+b(L,I)|0;N=(N=N+U+b(L=L+R|0,R)|0)+F+b(L=L+B|0,B)|0,t[x]=N,t[x+1]=L;}for(var z=0;z<160;z+=2){N=t[z],L=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+L|0,L)|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.length<n.DEFAULT_CONSU_SAMPLE_LEN)){t.nextBuffer={data:null,pts:-1};for(var e=null,i=0;i<n.DEFAULT_CONSU_SAMPLE_LEN;i++){e=t.sampleQueue.shift();var r=null;if(r=t.options.appendType==n.APPEND_TYPE_STREAM?e:e.data,t.nextBuffer.pts<0&&(t.nextBuffer.pts=e.pts),null==t.nextBuffer.data)t.nextBuffer.data=new Uint8Array(r);else{var a=new Uint8Array(r.length+t.nextBuffer.data.length);a.set(t.nextBuffer.data,0),a.set(r,t.nextBuffer.data.length),t.nextBuffer.data=a;}if(t.sampleQueue.length<=0)break;e=null;}}},10);},decodeSample:function decodeSample(){var e=arguments.length>0&&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].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();try{t.audioCtx.decodeAudioData(r,function(i){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<t.sampleQueue.length;a++){r=t.sampleQueue.shift();var s=null;if(s=t.options.appendType==n.APPEND_TYPE_STREAM?r:r.data,null==i)i=new Uint8Array(s);else{var o=new Uint8Array(s.length+i.length);o.set(i,0),o.set(s,i.length),i=o;}if(t.sampleQueue.length<=0)break;r=null;}var l=i;if(null==l||l.length<1)return t.sourceList[e].connect(t.gainNode),t.sourceList[e].start(),t.sourceList[e].stop(),1;var f=l.buffer;try{t.audioCtx.decodeAudioData(f,function(i){t.sourceList[e].buffer=i,t.sourceList[e].connect(t.gainNode),t.sourceList[e].start(),t.sourceList[e].startState=!0;},function(e){e.err;});}catch(e){return alert("Crash[brower]! Please refresh your page"),-3;}return 0;},play:function play(){if(0==t.startStatus){t.startStatus=!0;-2==(t.options.playMode==n.AUDIO_MODE_ONCE?t.decodeWholeSamples(0):t.swapSource(0,1))&&t.pause();}},pause:function pause(){t.startStatus=!1;for(var e=0;e<t.sourceList.length;e++){if(null!=t.sourceList[e])try{t.sourceList[e].stop(),t.sourceList[e].disconnect(t.gainNode),t.sourceList[e]=null;}catch(e){}}},stop:function stop(){t.pause(),t.cleanQueue(),t.nextBuffer=null,t.sourceChannel=-1;},cleanQueue:function cleanQueue(){t.sampleQueue.length=0;for(var e=0;e<t.sourceList.length;e++){try{t.sourceList[e].stop(),t.sourceList[e].disconnect(t.gainNode),t.sourceList[e]=null;}catch(e){}}}};return t.sourceList.push(t.audioCtx.createBufferSource()),t.sourceList.push(t.audioCtx.createBufferSource()),t.sourceList[0].onended=function(){t.swapSource(0,1);},t.sourceList[1].onended=function(){t.swapSource(1,0);},t.gainNode=t.audioCtx.createGain(),t.gainNode.gain.value=t.voice,t.gainNode.connect(t.audioCtx.destination),t.options,t.runNextBuffer(),t;};},{"../consts":198}],200:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r);}}var n=window.AudioContext||window.webkitAudioContext,a=e("../consts"),s=function s(){return new Date().getTime();},o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this._sample_rate=t.sampleRate||a.DEFAULT_SAMPLERATE,this._seg_dur=t.segDur||2,this._channels=t.channels||a.DEFAULT_CHANNELS,this._swapStartPlay=!0,this._start_time=-1,this._now_seg_dur=-1,this._push_start_idx=0,this._pcm_array_buf=null,this._once_pop_len=this._sample_rate*this._seg_dur,this._active_node=null,this._ctx=new n(),this._gain=this._ctx.createGain(),this._gain.gain.value=1,this._gain.connect(this._ctx.destination);}var t,i,o;return t=e,(i=[{key:"setVoice",value:function value(e){this._gain.gain.value=e;}},{key:"pushBuffer",value:function value(e){var t=e.buffer,i=null,r=t.byteLength%4;if(0!==r){var n=new Uint8Array(t.byteLength+r);n.set(new Uint8Array(t),0),i=new Float32Array(n.buffer);}else i=new Float32Array(t);var a=null;if(this._channels>=2){var s=i.length/2;a=new Float32Array(s);for(var o=0,l=0;l<i.length;l+=2){a[o]=i[l],o++;}}else a=new Float32Array(i);if(null===this._pcm_array_buf)this._pcm_array_buf=new Float32Array(a);else{var f=new Float32Array(this._pcm_array_buf.length+a.length);f.set(this._pcm_array_buf,0),f.set(a,this._pcm_array_buf.length),this._pcm_array_buf=f;}this._pcm_array_buf.length;}},{key:"readingLoopWithF32",value:function value(){if(this._start_time>0&&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";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<n;p++){u.set(a.subarray(p*e,d),p*n);}for(var m=0;m<n/2;m++){c.set(s.subarray(m*t,_),m*n/2);}for(var b=0;b<n/2;b++){h.set(o.subarray(b*i,_),b*n/2);}return[u,c,h];}};},{}],202:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r);}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}var a=e("./missile.js"),s=e("../demuxer/bufferFrame"),o=e("../demuxer/buffer"),l=(e("./cache"),e("./cacheYuv"),e("../render-engine/webgl-420p")),f=(e("./av-common"),e("./audio-native-core"),e("./audio-core")),u=e("../consts"),c=e("../version"),h=function h(){return new Date().getTime();},d=function e(t,i,r,a,s,o,l,f,u){n(this,e),this.pts=u,this.data_y=t,this.data_u=i,this.data_v=r,this.line1=a,this.line2=s,this.line3=o,this.width=l,this.height=f,this.byteAlignIncr=this.line1-this.width;},_=function(){function e(t){n(this,e),this.config={width:t.width||u.DEFAULT_WIDTH,height:t.height||u.DEFAULT_HEIGHT,fps:t.fps||u.DEFAULT_FPS,sampleRate:t.sampleRate||u.DEFAULT_SAMPLERATE,playerId:t.playerId||u.DEFAILT_WEBGL_PLAY_ID,token:t.token||null,readyShow:t.readyShow||!1,checkProbe:t.checkProbe,ignoreAudio:t.ignoreAudio,playMode:t.playMode||u.PLAYER_MODE_VOD},this.probeSize=4524611,this.audioWAudio=null,this.audioVoice=1,this.frameCallTag=0,this.seekTarget=0,this.avSeekVState=!1,this.isNewSeek=!1,this.openFrameCall=!0,this.bufRecvStat=!1,this.bufObject=o(),this.bufLastVDTS=0,this.bufLastADTS=0,this.yuvMaxTime=0,this.playVPipe=[],this._videoQueue=[],this.duration=-1,this.channels=-1,this.width=-1,this.height=-1,this.isPlaying=!1,this.isCheckDisplay=!1,this.frameTime=1e3/this.config.fps,this.vCodecID=u.V_CODEC_NAME_UNKN,this.audioIdx=-1,this.audioNone=!1,this.frameDur=0,this.canvasBox=null,this.canvas=null,this.yuv=null,this.retryAuSampleNo=0,this.cacheStatus=!1,this.showScreen=!1,this.playPTS=0,this.vCachePTS=0,this.aCachePTS=0,this.avRecvInterval=null,this.avFeedVideoInterval=null,this.avFeedAudioInterval=null,this.decVFrameInterval=null,this.playFrameInterval=null,this.onProbeFinish=null,this.onPlayingTime=null,this.onPlayingFinish=null,this.onSeekFinish=null,this.onLoadCache=null,this.onLoadCacheFinshed=null,this.onRender=null,this.onCacheProcess=null,this.corePtr=a.cwrap("AVSniffStreamInit","number",["string","string"])(this.config.token,c.PLAYER_VERSION),this.corePtr;var i=a.addFunction(this._probeFinCallback.bind(this)),r=a.addFunction(this._frameCallback.bind(this)),s=a.addFunction(this._naluCallback.bind(this)),l=a.addFunction(this._samplesCallback.bind(this)),f=a.addFunction(this._aacFrameCallback.bind(this)),h=this.config.playMode===u.PLAYER_MODE_NOTIME_LIVE?1:0;this.config.ignoreAudio,this.config.playMode;a.cwrap("initializeSniffStreamModuleWithAOpt","number",["number","number","number","number","number"])(this.corePtr,i,r,s,l,f,this.config.ignoreAudio,h);}var t,i,_;return t=e,(i=[{key:"release",value:function value(){var e=a.cwrap("releaseSniffStream","number",["number"])(this.corePtr);return this.audioWAudio&&this.audioWAudio.stop(),this.audioWAudio=null,this.bufRecvStat=!1,this.bufObject.cleanPipeline(),this.playVPipe.length=0,this._clearDecInterval(),e;}},{key:"setScreen",value:function value(){var e=arguments.length>0&&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.playPTS<this.frameDur)||(this.pause(),this._clearDecInterval(),this.onPlayingTime&&this.onPlayingTime(this.duration),this.onLoadCacheFinshed&&this.onLoadCacheFinshed(),this.onPlayingFinish&&this.onPlayingFinish(),0));}},{key:"play",value:function value(){var e=this;if(!this.playFrameInterval&&null===this.playFrameInterval&&null==this.playFrameInterval){this._videoQueue.length>0&&(this.isPlaying=!0);var t=0,i=0,r=0;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()),n.pts,e.audioWAudio.getAlignVPTS(),e.playPTS=Math.max(e.audioWAudio.getAlignVPTS(),e.playPTS)),t=i,h(),n.pts,e.seekTarget,e.isNewSeek,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),n.pts,e.showScreen?e.onRender&&e.onRender(n.line1,n.height,n.data_y,n.data_u,n.data_v):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,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:"_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(){for(this.canvasBox=document.querySelector("#"+this.config.playerId),this.canvasBox.style.overflow="hidden";this.canvasBox.hasChildNodes();){this.canvasBox.removeChild(this.canvasBox.lastChild);}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);}},{key:"_avCheckRecvFinish",value:function value(){this.config.playMode===u.PLAYER_MODE_VOD&&this.duration-this.getMaxPTS()<this.frameDur&&(this.bufRecvStat=!0,null!==this.avRecvInterval&&(window.clearInterval(this.avRecvInterval),this.avRecvInterval=null));}},{key:"_afterAvFeedSeekToStart",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),t.play(),window.clearInterval(i),i=null);},10);}},{key:"_avFeedData",value:function value(e){var t=this;if(this.playVPipe.length=0,this.audioWAudio&&this.audioWAudio.cleanQueue(),e<=0){var i=0;if(this.avFeedVideoInterval=window.setInterval(function(){var e=t.bufObject.videoBuffer.length;if(e-1>i||t.duration-t.getMaxPTS()<t.frameDur&&e-1==i){var r=t.bufObject.videoBuffer[i].length;if(r>0){for(var n=0;n<r;n++){t.playVPipe.push(s.ConstructWithDts(t.bufObject.videoBuffer[i][n].pts,t.bufObject.videoBuffer[i][n].dts,t.bufObject.videoBuffer[i][n].isKey,t.bufObject.videoBuffer[i][n].data,!0));}i+=1;}t.config.playMode===u.PLAYER_MODE_VOD&&t.duration-t.getMaxPTS()<t.frameDur&&t.playVPipe.length>0&&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);}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);},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()<t.frameDur&&e-1==r){for(var i=t.bufObject.audioBuffer[r].length,n=0;n<i;n++){t.audioWAudio.addSample(new s.BufferFrame(t.bufObject.audioBuffer[r][n].pts,t.bufObject.audioBuffer[r][n].isKey,t.bufObject.audioBuffer[r][n].data,!1));}r+=1,t.config.playMode===u.PLAYER_MODE_VOD&&t.duration-t.getMaxPTS()<t.frameDur&&t.audioWAudio.sampleQueue.length>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()<t.frameDur&&i-1==o){var r=t.bufObject.videoBuffer[o].length;if(r>0){for(var n=0;n<r;n++){t.playVPipe.push(s.ConstructWithDts(t.bufObject.videoBuffer[o][n].pts,t.bufObject.videoBuffer[o][n].dts,t.bufObject.videoBuffer[o][n].isKey,t.bufObject.videoBuffer[o][n].data,!0));}o+=1;}t.config.playMode===u.PLAYER_MODE_VOD&&t.duration-t.getMaxPTS()<t.frameDur&&t.playVPipe.length>0&&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.config.playMode===u.PLAYER_MODE_VOD&&(t._afterAvFeedSeekToStart(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()<t.frameDur&&e-1==l){for(var i=t.bufObject.audioBuffer[l].length,r=0;r<i;r++){t.bufObject.audioBuffer[l][r].pts<t.seekTarget||t.audioWAudio.addSample(new s.BufferFrame(t.bufObject.audioBuffer[l][r].pts,t.bufObject.audioBuffer[l][r].isKey,t.bufObject.audioBuffer[l][r].data,!1));}l+=1,t.config.playMode===u.PLAYER_MODE_VOD&&t.duration-t.getMaxPTS()<t.frameDur&&t.audioWAudio.sampleQueue.length>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;for(var d=a.HEAPU8.subarray(c,c+10),_=0;_<d.length;_++){String.fromCharCode(d[_]);}u.V_CODEC_NAME_HEVC===this.vCodecID&&(n>=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(!(!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(!(h>0&&u-this._videoQueue[h-1].pts>1||(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);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(u<this._videoQueue[0].pts)this._videoQueue.splice(0,0,g);else if(u<this._videoQueue[h-1].pts)for(var w=0;w<h;w++){if(u>this._videoQueue[w].pts&&w+1<h&&u<this._videoQueue[w+1].pts){this._videoQueue.splice(w+1,0,g);break;}}this.vCachePTS=Math.max(u,this.vCachePTS),this.onCacheProcess&&this.onCacheProcess(this.getCachePTS());}}}},{key:"setProbeSize",value:function value(e){this.probeSize=e;}},{key:"pushBuffer",value:function value(e){var t=a._malloc(e.length);a.HEAP8.set(e,t);var i=a.cwrap("pushSniffStreamData","number",["number","number","number","number"])(this.corePtr,t,e.length,this.probeSize);return i;}}])&&r(t.prototype,i),_&&r(t,_),e;}();i.CNativeCore=_;},{"../consts":198,"../demuxer/buffer":208,"../demuxer/bufferFrame":209,"../render-engine/webgl-420p":219,"../version":222,"./audio-core":199,"./audio-native-core":200,"./av-common":201,"./cache":203,"./cacheYuv":204,"./missile.js":1}],203:[function(e,t,i){(function(i){"use strict";e("./cacheYuv");i.CACHE_APPEND_STATUS_CODE={FAILED:-1,OVERFLOW:-2,OK:0,NOT_FULL:1,FULL:2,NULL:3},t.exports=function(){var e=arguments.length>0&&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<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r);}}var n=function(){function e(t,i,r,n,a,s){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.pts=t,this.width=i,this.height=r,this.imageBufferY=n,this.imageBufferB=a,this.imageBufferR=s;}var t,i,n;return t=e,(i=[{key:"setYuv",value:function value(e,t,i,r,n,a){this.pts=e,this.width=t,this.height=i,this.imageBufferY=r,this.imageBufferB=n,this.imageBufferR=a;}}])&&r(t.prototype,i),n&&r(t,n),e;}();i.CacheYuvStruct=n;},{}],205:[function(e,t,i){"use strict";t.exports={HEVC_NAL_TRAIL_N:0,HEVC_NAL_TRAIL_R:1,HEVC_NAL_TSA_N:2,HEVC_NAL_TSA_R:3,HEVC_NAL_STSA_N:4,HEVC_NAL_STSA_R:5,HEVC_NAL_RADL_N:6,HEVC_NAL_RADL_R:7,HEVC_NAL_RASL_N:8,HEVC_NAL_RASL_R:9,HEVC_NAL_VCL_N10:10,HEVC_NAL_VCL_R11:11,HEVC_NAL_VCL_N12:12,HEVC_NAL_VCL_R13:13,HEVC_NAL_VCL_N14:14,HEVC_NAL_VCL_R15:15,HEVC_NAL_BLA_W_LP:16,HEVC_NAL_BLA_W_RADL:17,HEVC_NAL_BLA_N_LP:18,HEVC_NAL_IDR_W_RADL:19,HEVC_NAL_IDR_N_LP:20,HEVC_NAL_CRA_NUT:21,HEVC_NAL_IRAP_VCL22:22,HEVC_NAL_IRAP_VCL23:23,HEVC_NAL_RSV_VCL24:24,HEVC_NAL_RSV_VCL25:25,HEVC_NAL_RSV_VCL26:26,HEVC_NAL_RSV_VCL27:27,HEVC_NAL_RSV_VCL28:28,HEVC_NAL_RSV_VCL29:29,HEVC_NAL_RSV_VCL30:30,HEVC_NAL_RSV_VCL31:31,HEVC_NAL_VPS:32,HEVC_NAL_SPS:33,HEVC_NAL_PPS:34,HEVC_NAL_AUD:35,HEVC_NAL_EOS_NUT:36,HEVC_NAL_EOB_NUT:37,HEVC_NAL_FD_NUT:38,HEVC_NAL_SEI_PREFIX:39,HEVC_NAL_SEI_SUFFIX:40,HEVC_NAL_RSV_NVCL41:41,HEVC_NAL_RSV_NVCL42:42,HEVC_NAL_RSV_NVCL43:43,HEVC_NAL_RSV_NVCL44:44,HEVC_NAL_RSV_NVCL45:45,HEVC_NAL_RSV_NVCL46:46,HEVC_NAL_RSV_NVCL47:47,HEVC_NAL_UNSPEC48:48,HEVC_NAL_UNSPEC49:49,HEVC_NAL_UNSPEC50:50,HEVC_NAL_UNSPEC51:51,HEVC_NAL_UNSPEC52:52,HEVC_NAL_UNSPEC53:53,HEVC_NAL_UNSPEC54:54,HEVC_NAL_UNSPEC55:55,HEVC_NAL_UNSPEC56:56,HEVC_NAL_UNSPEC57:57,HEVC_NAL_UNSPEC58:58,HEVC_NAL_UNSPEC59:59,HEVC_NAL_UNSPEC60:60,HEVC_NAL_UNSPEC61:61,HEVC_NAL_UNSPEC62:62,HEVC_NAL_UNSPEC63:63,SOURCE_CODE_VPS:64,SOURCE_CODE_SPS:66,SOURCE_CODE_PPS:68,SOURCE_CODE_SEI:78,SOURCE_CODE_IDR:38,SOURCE_CODE_P:2,SOURCE_CODE_SEI_END:128,DEFINE_STARTCODE:new Uint8Array([0,0,0,1]),DEFINE_KEY_FRAME:21,DEFINE_P_FRAME:9,DEFINE_OTHERS_FRAME:153};},{}],206:[function(e,t,i){"use strict";var r=e("./hevc-header"),n=[r.HEVC_NAL_VPS,r.HEVC_NAL_SPS,r.HEVC_NAL_PPS,r.HEVC_NAL_SEI_PREFIX];t.exports={IS_HEV_PS_INFO_CHAR:function IS_HEV_PS_INFO_CHAR(e){var t=(126&e)>>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);t<e.length;t++){i[t]=e[t];}return i;}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e);}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance");}();}var n=e("./missile.js"),a=e("./audio-core"),s=e("./cache"),o=e("./cacheYuv"),l=e("../render-engine/webgl-420p"),f=e("../consts"),u=e("../version"),c=function c(){return new Date().getTime();};t.exports=function(e){var t={config:{width:e.width||f.DEFAULT_WIDTH,height:e.height||f.DEFAULT_HEIGHT,fps:e.fps||f.DEFAULT_FPS,fixed:e.fixed||f.DEFAULT_FIXED,sampleRate:e.sampleRate||f.DEFAULT_SAMPLERATE,appendHevcType:e.appendHevcType||f.APPEND_TYPE_STREAM,frameDurMs:e.frameDur||f.DEFAULT_FRAME_DUR,playerId:e.playerId||f.DEFAILT_WEBGL_PLAY_ID,audioNone:e.audioNone||!1,token:e.token||null,videoCodec:e.videoCodec||f.CODEC_H265},vcodecerPtr:null,frameList:[],cacheYuvBuf:s(30),nowPacket:null,stream:new Uint8Array(),audio:null,liveStartMs:-1,durationMs:-1,videoPTS:0,loop:null,debugYUVSwitch:!1,debugID:null,cacheLoop:null,playParams:{seekPos:-1,mode:f.PLAYER_MODE_VOD,accurateSeek:!0,seekEvent:!1,realPlay:!0},calcuteStartTime:-1,fix_poc_err_skip:0,frameTime:0,frameTimeSec:0,preCostTime:0,realVolume:1,isPlaying:!1,isCaching:f.CACHE_NO_LOADCACHE,isNewSeek:!1,isCheckDisplay:!1,isPlayLoadingFinish:0,vCachePTS:0,aCachePTS:0,showScreen:!1,noCacheFrame:0,onPlayingTime:null,onPlayingFinish:null,onSeekFinish:null,onLoadCache:null,onLoadCacheFinshed:null,onRender:null,setScreen:function setScreen(){var e=arguments.length>0&&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=[]);},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);},seek:function seek(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.isPlaying;t.nowPacket=null,t.vCachePTS=0,t.aCachePTS=0,t.pause(),t.cleanSample(),t.cleanVideoQueue(),t.cleanCacheYUV(),e&&e(),t.isNewSeek=!0,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.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"])(t.vcodecerPtr,r,e.length,a);return 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);},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,r=window.setInterval(function(){t.cacheYuvBuf.yuvCache.length>=i&&(null!=t.onLoadCacheFinshed&&t.onLoadCacheFinshed(),window.clearInterval(r),r=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<n;a++){t.playFrameYUV(!1,t.playParams.accurateSeek);}t.playFrameYUV(!0,t.playParams.accurateSeek);}t.playFrameYUV(i,t.playParams.accurateSeek);}}}return t.playParams.seekEvent&&(t.playParams.seekEvent=!1,t.onSeekFinish(),t.isPlaying||(t.playFrameYUV(!0,t.playParams.accurateSeek),t.pause()),t.config.audioNone||t.audio.setVoice(t.realVolume)),t.onPlayingTime&&t.onPlayingTime(t.videoPTS),t.checkFinished(t.playParams.mode),e;},play:function play(e){if(t.playParams=e,t.calcuteStartTime=c(),t.noCacheFrame=0,t.isPlaying=t.playParams.realPlay,!0===t.config.audioNone&&t.playParams.mode==f.PLAYER_MODE_NOTIME_LIVE){t.liveStartMs=c(),t.frameTime=Math.floor(1e3/t.config.fps),t.frameTimeSec=t.frameTime/1e3;var i=0;t.loop=window.setInterval(function(){(c()-t.liveStartMs)/t.frameTime>=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.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;r++){if(r+5>=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);}else alert("请输入TOKENPlease set token param!");},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,t<0)return null;if(e.idrIdxBuffer.includes(t))return t;for(var i=0;i<e.idrIdxBuffer.length;i++){if(i===e.idrIdxBuffer.length-1||e.idrIdxBuffer[i]<t&&e.idrIdxBuffer[i+1]>t||0===i&&e.idrIdxBuffer[i]>=t){for(var r=1;r>=0;r--){var n=i-r;if(n>=0)return e.idrIdxBuffer[n];}return e.idrIdxBuffer[i];}}}};return e;};},{"./bufferFrame":209}],209:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r);}}var n=function(){function e(t,i,r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.pts=t,this.dts=t,this.isKey=i,this.data=r,this.video=n;}var t,i,n;return t=e,(i=[{key:"setFrame",value:function value(e,t,i,r){this.pts=e,this.isKey=t,this.data=i,this.video=r;}}])&&r(t.prototype,i),n&&r(t,n),e;}();i.BufferFrame=n,i.ConstructWithDts=function(e,t,i,r,a){var s=new n(e,i,r,a);return s.dts=t,s;};},{}],210:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r);}}var n=e("./m3u8base"),a=e("./mpegts/mpeg.js"),s=e("./bufferFrame"),o=e("./buffer"),l=e("../decoder/hevc-imp"),f=e("../consts"),u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.hls=new n.M3u8Base(),this.mpegTsObj=new a.MPEG_JS({}),this.mpegTsWasmState=!1,this.mpegTsWasmRetryLoadTimes=0,this.tsList=[],this.vStartTime=0,this.aStartTime=0,this.lockWait={state:!1,lockMember:{dur:0}},this.timerFeed=null,this.timerTsWasm=null,this.seekPos=-1,this.vPreFramePTS=0,this.aPreFramePTS=0,this.audioNone=!1,this.aCodec=!1,this.aChannel=0,this.durationMs=-1,this.bufObject=o(),this.fps=-1,this.sampleRate=-1,this.size={width:-1,height:-1},this.mediaInfo=null,this.extensionInfo=null,this.onReadyOBJ=null,this.onFinished=null,this.onDemuxed=null,this.onSamples=null,this.onCacheProcess=null;}var t,i,u;return t=e,(i=[{key:"getCachePTS",value:function value(){return Math.max(this.vPreFramePTS,this.aPreFramePTS);}},{key:"demux",value:function value(e){var t=this,i=this;this.vPreFramePTS=0,this.aPreFramePTS=0,this.hls.onTransportStream=function(e,t){i.tsList.push({streamURI:e,streamDur:t});},this.hls.onFinished=function(e){e.type==f.PLAYER_IN_TYPE_M3U8_VOD?i.durationMs=1e3*e.duration:i.durationMs=-1,null!=i.onFinished&&i.onFinished(i.onReadyOBJ,e);},this.mpegTsObj.onDemuxed=function(){null==i.mediaInfo&&(i.mediaInfo=i.mpegTsObj.readMediaInfo(),i.mediaInfo,i.aCodec=i.mediaInfo.aCodec,i.aChannel=i.mediaInfo.sampleChannel,i.fps=i.mediaInfo.vFps,i.sampleRate=i.mediaInfo.sampleRate,(null===i.aCodec||""===i.aCodec||i.aChannel<=0)&&(i.audioNone=!0)),null==i.extensionInfo&&(i.extensionInfo=i.mpegTsObj.readExtensionInfo(),i.extensionInfo.vWidth>0&&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<c.length;h++){var d=c[h],_=1==e?d.ptime+i.vStartTime:n,p=new s.BufferFrame(_,!0,d.data,!1);i.bufObject.appendFrameByBufferFrame(p),i.aPreFramePTS=_,null!=i.onSamples&&i.onSamples(i.onReadyOBJ,p);}else{var m=1==e?n+i.vStartTime:n,b=new s.BufferFrame(m,!0,r.data,!1);i.bufObject.appendFrameByBufferFrame(b),i.aPreFramePTS=m,null!=i.onSamples&&i.onSamples(i.onReadyOBJ,b);}t.onCacheProcess&&t.onCacheProcess(t.getCachePTS());}}i.vStartTime+=parseFloat(i.lockWait.lockMember.dur),i.aStartTime+=parseFloat(i.lockWait.lockMember.dur),i.vStartTime,i.lockWait.state=!1;},this.mpegTsObj.onReady=function(){i._onTsReady(e);},i.mpegTsObj.initDemuxer(),this.timerTsWasm=window.setInterval(function(){i.mpegTsWasmState?(window.clearInterval(i.timerTsWasm),i.timerTsWasm=null):i.mpegTsWasmRetryLoadTimes>=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){var e=t.tsList.shift(),i=e.streamURI,r=e.streamDur;t.lockWait.state=!0,t.lockWait.lockMember.dur=r,t.mpegTsObj.demuxURL(i);}},50);}},{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?this.bufObject.vFrame(t):2==e?this.bufObject.aFrame(t):void 0;}},{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.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r);}}var n=e("../consts"),a={lineDelimiter:/\r?\n/,extensionHeader:"#EXTM3U",tagPrefix:"#EXT",segmentPrefix:"#EXTINF",segmentParse:/^#EXTINF: *([0-9.]+)(, *(.+?)?)?$/,tagParse:/^#EXT-X-([A-Z-]+)(:(.+))?$/,version:"VERSION",allowCache:"ALLOW-CACHE",combined:"COMBINED",endList:"ENDLIST",targetDuration:"TARGETDURATION",mediaSequence:"MEDIA-SEQUENCE",discontinuity:"DISCONTINUITY",streamInf:"STREAM-INF",isComment:function isComment(e){return e&&"#"===e[0]&&!e.startsWith(a.tagPrefix);},isBlank:function isBlank(e){return""===e;},canStrip:function canStrip(e){return a.isBlank(e)||a.isComment(e);},defaultMinDur:99999,hlsSliceLimit:100},s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this._slices=[],this._type=n.PLAYER_IN_TYPE_M3U8_LIVE,this._preURI="",this.duration=-1,this.onTransportStream=null,this.onFinished=null;}var t,i,s;return t=e,(i=[{key:"fetchM3u8",value:function value(e){var t=this,i=this;fetch(e).then(function(e){return e.text();}).then(function(t){return 1==i._uriParse(e)?i._m3u8Parse(t):null;}).then(function(r){null!=r&&!1!==r&&!0!==r&&t._type==n.PLAYER_IN_TYPE_M3U8_LIVE&&setTimeout(function(){i.fetchM3u8(e);},500*r);});}},{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<r.length-1;n++){this._preURI+=r[n]+"/";}return!0;}},{key:"_m3u8Parse",value:function value(e){for(var t=e.split(a.lineDelimiter),i=a.defaultMinDur,r="",s=0;s<t.length;s++){var o=t[s];if(!(o.length<1)){if(null!=r&&""!==r)switch(r){case a.version:case a.mediaSequence:case a.allowCache:case a.discontinuity:case a.targetDuration:case a.combined:break;case a.streamInf:return this.fetchM3u8(o),null;}var l=this._readTag(o);if(null!=l)switch(r=l.key,l.key){case a.version:case a.mediaSequence:case a.allowCache:case a.discontinuity:case a.targetDuration:case a.combined:case a.streamInf:break;case a.endList:if(this._type=n.PLAYER_IN_TYPE_M3U8_VOD,null!=this.onFinished){var f={type:this._type,duration:this.duration};this.onFinished(f);}return!0;default:l.key;}var u=a.segmentParse.exec(o);if(null!=u){var c=u[1];this.duration+=parseFloat(u[1]),i>c&&(i=c);var h=t[s+=1],d=this._preURI+h;this._slices.indexOf(d)<0&&(this._slices.push(d),null!=this.onTransportStream&&this.onTransportStream(d,c));}}}if(this._slices.length>a.hlsSliceLimit&&this._type==n.PLAYER_IN_TYPE_M3U8_LIVE&&(this._slices=this._slices.slice(-1*a.hlsSliceLimit)),null!=this.onFinished){var _={type:this._type,duration:-1};this.onFinished(_);}return i;}},{key:"_readTag",value:function value(e){var t=a.tagParse.exec(e);return null!==t?{key:t[1],value:t[3]}:null;}}])&&r(t.prototype,i),s&&r(t,s),e;}();i.M3u8Base=s;},{"../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;i<e.length;i++){t.push(e[i].toString(16));}return t;};function u(){}u.prototype.setStartCode=function(e){var t=arguments.length>1&&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;i<r.length;i++){var l=r[i],u=l.data,c=null;if(!(null==u||u.length<4)&&u){var h=l.dts/l.timescale;if(1===t){var d=null,_=l.is_sync;if(e.videoCodec===o.CODEC_H265){d=l.description.hvcC;var p=a.GET_NALU_TYPE(u[4]);_||(_=p==n.DEFINE_KEY_FRAME||l.is_sync);}else e.videoCodec===o.CODEC_H264&&(d=l.description.avcC);if(_){if(e.videoCodec==o.CODEC_H265){var m=d.nalu_arrays;e.naluHeader.vps=e.setStartCode(m[0][0].data,!1),e.naluHeader.sps=e.setStartCode(m[1][0].data,!1),e.naluHeader.pps=e.setStartCode(m[2][0].data,!1),m.length>3?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;E<u.length;E++){if(u[E]===n.SOURCE_CODE_SEI_END&&a.GET_NALU_TYPE(u[E+5])===n.DEFINE_KEY_FRAME){w=E;break;}}u[3]=1,u[v-1]=1,u[y-1]=1,u[g-1]=1,u[2]=0,u[v-2]=0,u[y-2]=0,u[g-2]=0,u[1]=0,u[v-3]=0,u[y-3]=0,u[g-3]=0,u[w+1]=0,u[w+2]=0,u[w+3]=0,u[w+4]=1,e.naluHeader.vps=null,e.naluHeader.sps=null,e.naluHeader.pps=null,e.naluHeader.vps=new Uint8Array(),e.naluHeader.sps=new Uint8Array(),e.naluHeader.pps=new Uint8Array();}else u[4].toString(16),e.naluHeader.vps[4].toString(16),f(e.naluHeader.vps),f(u),u=u.subarray(e.naluHeader.vps.length+e.naluHeader.sps.length+e.naluHeader.pps.length+e.naluHeader.sei.length);}else if(e.naluHeader.sei.length>4&&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;T<u.length;T++){if(u[T]===n.SOURCE_CODE_SEI_END&&a.GET_NALU_TYPE(u[T+5])===n.DEFINE_KEY_FRAME){j=T;break;}}e.naluHeader.sei=u.subarray(0,j+1),u=new Uint8Array(u.subarray(j+1)),e.naluHeader.sei;}f(e.naluHeader.vps),f(e.naluHeader.sps),f(e.naluHeader.pps),f(e.naluHeader.sei),f(u),(c=new Uint8Array(e.naluHeader.vps.length+e.naluHeader.sps.length+e.naluHeader.pps.length+e.naluHeader.sei.length+u.length)).set(e.naluHeader.vps,0),c.set(e.naluHeader.sps,e.naluHeader.vps.length),c.set(e.naluHeader.pps,e.naluHeader.vps.length+e.naluHeader.sps.length),c.set(e.naluHeader.sei,e.naluHeader.vps.length+e.naluHeader.sps.length+e.naluHeader.pps.length),c.set(e.setStartCode(u,!0),e.naluHeader.vps.length+e.naluHeader.sps.length+e.naluHeader.pps.length+e.naluHeader.sei.length);}else c=e.setStartCode(u,!0);e.bufObject.appendFrame(h,c,!0,_);}else 2==t&&(c=e.setAACAdts(u),e.bufObject.appendFrame(h,c,!1,!0));}}window.clearInterval(s),s=null;},0);};},u.prototype.appendBufferData=function(e){var t=arguments.length>1&&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<e.tracks.length;t++){var i=e.tracks[t];this.addBuffer(i);}this.initializeSourceBuffers();}},u.prototype.onInitAppended=function(e){var t=e.target;"open"===t.ms.readyState&&(t.sampleNum=0,t.removeEventListener("updateend",this.onInitAppended),t.ms.pendingInits--,0===t.ms.pendingInits&&this.mp4boxfile.start());},u.prototype.initializeSourceBuffers=function(){for(var e=this.mp4boxfile.initializeSegmentation(),t=0;t<e.length;t++){var i=e[t].user;0===t&&(i.ms.pendingInits=0),i.addEventListener("updateend",this.onInitAppended),i.appendBuffer(e[t].buffer),i.segmentIndex=0,i.ms.pendingInits++;}},t.exports=u;},{"../consts":198,"../decoder/hevc-header":205,"../decoder/hevc-imp":206,"./buffer":208,mp4box:144}],213:[function(e,t,i){"use strict";t.exports={DEFAULT_SAMPLERATE:44100,DEFAULT_CHANNEL:1,H264AUD:[0,0,0,1,9,224],H265AUD:[0,0,0,1,70,1,80],DEF_AAC:"aac",DEF_MP3:"mp3",DEF_H265:"h265",DEF_HEVC:"hevc",DEF_H264:"h264",DEF_AVC:"avc",CODEC_OFFSET_TABLE:["hevc","h265","avc","h264","aac","mp3"]};},{}],214:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r);}}var n=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.sampleRate=t.sampleRate,this.frameDurMs=Math.floor(1024e3/this.sampleRate),this.frameDurSec=this.frameDurMs/1e3;}var t,i,n;return t=e,(i=[{key:"updateConfig",value:function value(e){this.sampleRate=e.sampleRate,this.frameDurMs=1024e3/this.sampleRate,this.frameDurSec=this.frameDurMs/1e3;}},{key:"_getPktLen",value:function value(e,t,i){return((3&e)<<11)+(t<<3)+((224&i)>>5);}},{key:"sliceAACFrames",value:function value(e,t){for(var i=[],r=e,n=0;n<t.length-1;){if(255==t[n]&&t[n+1]>>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<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r);}}var n=e("../../decoder/missile.js"),a=e("./decoder/aac"),s=e("./consts"),o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.configFormat={},this.mediaAttr={sampleRate:0,sampleChannel:0,vFps:0,vGop:0,vDuration:0,aDuration:0,duration:0,aCodec:"",vCodec:"",audioNone:!1},this.extensionInfo={vWidth:0,vHeight:0},this.wasmState=0,this.onReady=null,this.onDemuxed=null,this.aacDec=null;}var i,o,l;return i=e,(o=[{key:"initDemuxer",value:function value(){var e=this;if(window.WebAssembly)n.run(),1===t.STATIC_MEM_wasmDecoderState?(e.wasmState=1,e.onReady()):(n.onRuntimeInitialized=function(){null!=e.onReady&&0==e.wasmState&&(e.wasmState=1,e.onReady());},n.postRun=function(){null!=e.onReady&&0==e.wasmState&&(e.wasmState=1,e.onReady());});else{var i="unsupport WASM!";/iPhone|iPad/.test(window.navigator.userAgent)&&(i+=" ios:min-version 11"),alert(i),alert("Please check your browers, it not support wasm! See:https://www.caniuse.com/#search=wasm");}return!0;}},{key:"demuxURL",value:function value(e){this._demuxerTsInit(e);}},{key:"demuxUint8Buf",value:function value(e){this._demuxCore(e);}},{key:"_demuxerTsInit",value:function value(e){var t=this;fetch(e).then(function(e){return e.arrayBuffer();}).then(function(e){e.fileStart=0;var i=new Uint8Array(e);t._demuxCore(i);});}},{key:"_demuxCore",value:function value(e){this._refreshDemuxer();var t=n._malloc(e.length);n.HEAP8.set(e,t);var i=n.cwrap("demuxBox","number",["number","number"])(t,e.length);i>=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;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r);}}var n=e("./mpegts/mpeg.js"),a=e("./buffer"),s=e("../decoder/hevc-imp"),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.seekPos=-1,this.durationMs=-1,this.fps=-1,this.sampleRate=-1,this.aCodec="",this.size={width:-1,height:-1},this.bufObject=a(),this.mpegTsObj=null,this.bufObject=a(),this.mediaInfo={},this.extensionInfo={},this.onReady=null,this.onDemuxed=null,this.onReadyOBJ=null;}var t,i,o;return t=e,(i=[{key:"initMPEG",value:function value(){var e=this;this.mpegTsObj=new n.MPEG_JS({}),this.mpegTsObj.onDemuxed=function(){e.mediaInfo=e.mpegTsObj.readMediaInfo(),e.mediaInfo,e.extensionInfo=e.mpegTsObj.readExtensionInfo(),e.extensionInfo,e.aCodec=e.mediaInfo.aCodec,e.durationMs=1e3*e.mediaInfo.duration,e.fps=e.mediaInfo.vFps,e.sampleRate=e.mediaInfo.sampleRate,e.extensionInfo.vWidth>0&&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;o<a.length;o++){var l=a[o];e.bufObject.appendFrame(l.ptime,l.data,!1,!0);}else e.bufObject.appendFrame(i,t.data,!1,!0);}e.bufObject.videoBuffer,e.bufObject.audioBuffer,null!=e.onDemuxed&&e.onDemuxed(e.onReadyOBJ);},this.mpegTsObj.onReady=function(){null!=e.onReady&&e.onReady(e.onReadyOBJ);},this.mpegTsObj.initDemuxer();}},{key:"bindReady",value:function value(e){this.onReadyOBJ=e;}},{key:"demux",value:function value(e){this.mpegTsObj.demuxUint8Buf(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?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;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r);}}var n=e("./decoder/player-core"),a=e("./native/mp4-player"),s=e("./decoder/c-native-core"),o=(e("./demuxer/mpegts/mpeg.js"),e("./demuxer/mp4")),l=e("./demuxer/ts"),f=e("./demuxer/m3u8"),u=e("./consts"),c=(e("./utils/static-mem"),e("./utils/ui/ui")),h=(e("./decoder/cache"),e("./decoder/missile.js")),d={moovStartFlag:!1,readyShow:!1,rawFps:24,autoCrop:!1,core:u.PLAYER_CORE_TYPE_DEFAULT,coreProbePart:1,checkProbe:!0,ignoreAudio:0},_=function _(e,t){return t-1e3/e;};h.onRuntimeInitialized=function(){t.STATIC_MEM_wasmDecoderState=1,t.STATIC_MEM_wasmDecoderState;};var p=function(){function e(i,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),t.STATICE_MEM_playerCount+=1,this.playerIndex=t.STATICE_MEM_playerCount,this.mp4Obj=null,this.mpegTsObj=null,this.hlsObj=null,this.hlsConf={hlsType:u.PLAYER_IN_TYPE_M3U8_VOD},this.videoURL=i,this.configFormat={playerId:r.player||u.DEFAILT_WEBGL_PLAY_ID,playerW:r.width||u.DEFAULT_WIDTH,playerH:r.height||u.DEFAULT_HEIGHT,type:r.type||u.PLAYER_IN_TYPE_MP4,accurateSeek:r.accurateSeek||!1,playIcon:r.playIcon||"assets/icon-play@300.png",loadIcon:r.loadIcon||"assets/icon-loading.gif",token:r.token||null,extInfo:r.extInfo||d},null!=this.configFormat.token){this.playMode=u.PLAYER_MODE_VOD,this.seekTarget=0,this.playParam=null,this.timerFeed=null,this.player=null,this.volume=1,this.rawModePts=0,this.autoScreenClose=!0,this.feedMP4Data=null,this.onPlayTime=null,this.onLoadFinish=null,this.onSeekStart=null,this.onSeekFinish=null,this.onRender=null,this.onLoadCache=null,this.onLoadCacheFinshed=null,this.onPlayFinish=null,this.onCacheProcess=null,this.onReadyShowDone=null,this.onOpenFullScreen=null,this.onCloseFullScreen=null,this.filterConfigParams(),this.configFormat;var n=this;document.addEventListener("fullscreenchange",function(e){n._isFullScreen()?n.onOpenFullScreen&&n.onOpenFullScreen():(!0===n.autoScreenClose&&n.closeFullScreen(!0),n.onCloseFullScreen&&n.onCloseFullScreen());}),this.screenW=window.screen.width,this.screenH=window.screen.height;}else alert("请输入TOKENPlease set token param!");}var i,h,p;return i=e,(h=[{key:"filterConfigParams",value:function value(){void 0!==this.configFormat.extInfo.checkProbe&&null!==this.configFormat.extInfo.checkProbe||(this.configFormat.extInfo.checkProbe=!0),this.configFormat.type===u.PLAYER_IN_TYPE_FLV?(this.configFormat.extInfo.core=u.PLAYER_CORE_TYPE_CNATIVE,this.configFormat.type=u.PLAYER_IN_TYPE_MP4):this.configFormat.type===u.PLAYER_IN_TYPE_HTTPFLV&&(this.configFormat.extInfo.core=u.PLAYER_CORE_TYPE_CNATIVE,this.configFormat.type=u.PLAYER_IN_TYPE_MP4,this.playMode=u.PLAYER_MODE_NOTIME_LIVE);}},{key:"do",value:function value(){var e=this,i=!1;this.configFormat.type===u.PLAYER_IN_TYPE_RAW_265&&(i=!0,this.playMode=u.PLAYER_MODE_NOTIME_LIVE),this.playParam={durationMs:0,fps:0,sampleRate:0,size:{width:0,height:0},audioNone:i,videoCodec:u.CODEC_H265},c.UI.createPlayerRender(this.configFormat.playerId,this.configFormat.playerW,this.configFormat.playerH);var r=window.setInterval(function(){if(t.STATICE_MEM_playerIndexPtr===e.playerIndex)if(t.STATICE_MEM_playerIndexPtr,e.playerIndex,window.WebAssembly)t.STATIC_MEM_wasmDecoderState,1==t.STATIC_MEM_wasmDecoderState&&(e._makeMP4Player(),t.STATICE_MEM_playerIndexPtr+=1,window.clearInterval(r),r=null);else{var i="unsupport WASM!";/iPhone|iPad/.test(window.navigator.userAgent)&&(i+=" ios:min-version 11"),alert(i),alert("Please check your browers, it not support wasm! See:https://www.caniuse.com/#search=wasm"),t.STATICE_MEM_playerIndexPtr+=1,window.clearInterval(r),r=null;}},500);}},{key:"release",value:function value(){this.player,this.playParam.videoCodec===u.CODEC_H265&&this.player&&this.player.release();}},{key:"debugYUV",value:function value(e){this.player.debugYUV(e);}},{key:"setRenderScreen",value:function value(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.player.setScreen(e);}},{key:"play",value:function value(){if(this.playParam.videoCodec===u.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:"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===u.CODEC_H264&&this.configFormat.type==u.PLAYER_IN_TYPE_MP4?(this.player.seek(e),this.onSeekFinish&&this.onSeekFinish()):this.configFormat.extInfo.core===u.PLAYER_CORE_TYPE_CNATIVE?this.player.seek(function(){},{seekTime:i,mode:t.playMode,accurateSeek:t.configFormat.accurateSeek}):this.player.seek(function(){t.configFormat.type==u.PLAYER_IN_TYPE_MP4?t.mp4Obj.seek(e):t.configFormat.type==u.PLAYER_IN_TYPE_TS||t.configFormat.type==u.PLAYER_IN_TYPE_MPEGTS?t.mpegTsObj.seek(e):t.configFormat.type==u.PLAYER_IN_TYPE_M3U8&&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==u.PLAYER_IN_TYPE_MP4?this.mp4Obj.seekPos:this.configFormat.type==u.PLAYER_IN_TYPE_TS||this.configFormat.type==u.PLAYER_IN_TYPE_MPEGTS?this.mpegTsObj.seekPos:this.configFormat.type==u.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.timerFeed=window.setInterval(function(){var a=null,s=null;if(e.configFormat.type==u.PLAYER_IN_TYPE_MP4?(a=e.mp4Obj.popBuffer(1,t),s=e.mp4Obj.audioNone?null:e.mp4Obj.popBuffer(2,i)):e.configFormat.type==u.PLAYER_IN_TYPE_TS||e.configFormat.type==u.PLAYER_IN_TYPE_MPEGTS?(e.mpegTsObj,a=e.mpegTsObj.popBuffer(1,t),s=e.mpegTsObj.getAudioNone()?null:e.mpegTsObj.popBuffer(2,i)):e.configFormat.type==u.PLAYER_IN_TYPE_M3U8&&(e.hlsObj,a=e.hlsObj.popBuffer(1,t),s=e.hlsObj.audioNone?null:e.hlsObj.popBuffer(2,i)),null!=a)for(var o=0;o<a.length;o++){e.player.appendHevcFrame(a[o]);}if(null!=s)for(var l=0;l<s.length;l++){e.player.appendAACFrame(s[l]);}if(e.playMode!==u.PLAYER_MODE_NOTIME_LIVE&&e.onCacheProcess&&e.onCacheProcess(e.player.getCachePTS()),null!=a&&(e.configFormat.extInfo.readyShow&&e.player.cacheYuvBuf.getState()!=CACHE_APPEND_STATUS_CODE.NULL&&(e.player.playFrameYUV(!0,!0),e.configFormat.extInfo.readyShow=!1,e.onReadyShowDone&&e.onReadyShowDone()),t++),null!=s&&i++,t>n)return window.clearInterval(e.timerFeed),e.timerFeed=null,e.player.vCachePTS,e.player.aCachePTS,void(null!=r&&r());},5);}},{key:"_makeMP4Player",value:function value(){this.configFormat.type,null!=this.configFormat.extInfo.core&&null!==this.configFormat.extInfo.core&&this.configFormat.extInfo.core===u.PLAYER_CORE_TYPE_CNATIVE?this._cDemuxDecoderEntry():this.configFormat.type==u.PLAYER_IN_TYPE_MP4?this.configFormat.extInfo.moovStartFlag?this._mp4EntryVodStream():this._mp4Entry():this.configFormat.type==u.PLAYER_IN_TYPE_TS||this.configFormat.type==u.PLAYER_IN_TYPE_MPEGTS?this._mpegTsEntry():this.configFormat.type==u.PLAYER_IN_TYPE_M3U8?this._m3u8Entry():this.configFormat.type===u.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||u.CODEC_H265,this.playParam,(this.configFormat.type==u.PLAYER_IN_TYPE_M3U8&&this.hlsConf.hlsType==u.PLAYER_IN_TYPE_M3U8_LIVE||this.configFormat.type==u.PLAYER_IN_TYPE_RAW_265)&&(this.playMode=u.PLAYER_MODE_NOTIME_LIVE),l.configFormat.extInfo.autoCrop){var f=document.querySelector("#"+this.configFormat.playerId),c=r.width/r.height,h=this.configFormat.playerW/this.configFormat.playerH;c>h?f.style.height=this.configFormat.playerW/c+"px":c<h&&(f.style.width=this.configFormat.playerH*c+"px");}this.player=n({width:this.configFormat.playerW,height:this.configFormat.playerH,sampleRate:i,fps:t,appendHevcType:u.APPEND_TYPE_FRAME,fixed:!1,playerId:this.configFormat.playerId,audioNone:s,token:this.configFormat.token,videoCodec:o}),this.player.onPlayingTime=function(t){l._durationText(t),l._durationText(e/1e3),null!=l.onPlayTime&&l.onPlayTime(t);},this.player.onPlayingFinish=function(){a.pause(),a.seek(0),null!=a.onPlayFinish&&a.onPlayFinish();},this.player.onSeekFinish=function(){null!=l.onSeekFinish&&l.onSeekFinish();},this.player.onRender=function(e,t,i,r,n){null!=a.onRender&&a.onRender(e,t,i,r,n);},this.player.onLoadCache=function(){null!=a.onLoadCache&&a.onLoadCache();},this.player.onLoadCacheFinshed=function(){null!=a.onLoadCacheFinshed&&a.onLoadCacheFinshed();},l.player.setDurationMs(e),l.player.setFrameRate(t),null!=l.onLoadFinish&&l.onLoadFinish();}},{key:"_makeNativePlayer",value:function value(e,t,i,r,n,s){var o=this,l=this;this.playParam.durationMs=e,this.playParam.fps=t,this.playParam.sampleRate=i,this.playParam.size=r,this.playParam.audioNone=n,this.playParam.videoCodec=s||u.CODEC_H264,this.configFormat.type==u.PLAYER_IN_TYPE_M3U8&&this.hlsConf.hlsType==u.PLAYER_IN_TYPE_M3U8_LIVE&&(this.playMode=u.PLAYER_MODE_NOTIME_LIVE),this.player=new a.Mp4Player({width:this.configFormat.playerW,height:this.configFormat.playerH,sampleRate:i,fps:t,appendHevcType:u.APPEND_TYPE_FRAME,fixed:!1,playerId:this.configFormat.playerId,audioNone:n,token:this.configFormat.token,videoCodec:s}),this.player.makeIt(this.videoURL),this.player.onPlayingTime=function(t){l._durationText(t),l._durationText(e/1e3),null!=l.onPlayTime&&l.onPlayTime(t);},this.player.onPlayingFinish=function(){null!=o.onPlayFinish&&o.onPlayFinish();},null!=this.onLoadFinish&&this.onLoadFinish();}},{key:"_initMp4BoxObject",value:function value(){var e=this;this.timerFeed=null,this.mp4Obj=new o(),this.mp4Obj.onMp4BoxReady=function(t){var i=e.mp4Obj.getFPS(),r=_(i,e.mp4Obj.getDurationMs()),n=e.mp4Obj.getSampleRate(),a=e.mp4Obj.getSize(),s=e.mp4Obj.getVideoCoder();t===u.CODEC_H265?(e._makeMP4PlayerViewEvent(r,i,n,a,e.mp4Obj.audioNone,s),parseInt(r/1e3),e._avFeedMP4Data(0,0)):e._makeNativePlayer(r,i,n,a,e.mp4Obj.audioNone,s);};}},{key:"_mp4Entry",value:function value(){var e=this,t=this;fetch(this.videoURL).then(function(e){return e.arrayBuffer();}).then(function(i){t._initMp4BoxObject(),e.mp4Obj.demux(),e.mp4Obj.appendBufferData(i,0),e.mp4Obj.finishBuffer(),e.mp4Obj.seek(-1);});}},{key:"_mp4EntryVodStream",value:function value(){var e=this,t=this;this.timerFeed=null,this.mp4Obj=new o(),this._initMp4BoxObject(),this.mp4Obj.demux();var i=0,r=!1,n=window.setInterval(function(){r||(r=!0,fetch(e.videoURL).then(function(e){return function e(r){return r.read().then(function(a){if(a.done)return t.mp4Obj.finishBuffer(),t.mp4Obj.seek(-1),void window.clearInterval(n);var s=a.value;return t.mp4Obj.appendBufferData(s.buffer,i),i+=s.byteLength,e(r);});}(e.body.getReader());})["catch"](function(e){}));},1);}},{key:"_cDemuxDecoderEntry",value:function value(){var e=this,t=this;this.player=new s.CNativeCore({width:this.configFormat.playerW,height:this.configFormat.playerH,playerId:this.configFormat.playerId,token:this.configFormat.token,readyShow:this.configFormat.extInfo.readyShow,checkProbe:this.configFormat.extInfo.checkProbe,ignoreAudio:this.configFormat.extInfo.ignoreAudio,playMode:this.playMode}),this.player.onProbeFinish=function(){t.playParam.fps=t.player.config.fps,t.playParam.durationMs=_(t.playParam.fps,1e3*t.player.duration),t.playParam.sampleRate=t.player.config.sampleRate,t.playParam.size={width:t.player.width,height:t.player.height},t.playParam.audioNone=t.player.audioNone,t.player.vCodecID===u.V_CODEC_NAME_HEVC?(t.playParam.audioIdx<0&&(t.playParam.audioNone=!0),t.playParam.videoCodec=u.CODEC_H265,t.onLoadFinish&&t.onLoadFinish()):(t.playParam.videoCodec=u.CODEC_H264,t.player.release(),t.player=null,t._makeNativePlayer(t.playParam.durationMs,t.playParam.fps,t.playParam.sampleRate,t.playParam.size,!1,t.playParam.videoCodec));},this.player.onPlayingTime=function(e){t._durationText(e),t._durationText(t.player.duration),null!=t.onPlayTime&&t.onPlayTime(e);},this.player.onPlayingFinish=function(){t.pause(),null!=t.onPlayTime&&t.onPlayTime(0),t.onPlayFinish&&t.onPlayFinish(),t.player.release(),e.player=null,e._cDemuxDecoderEntry();},this.player.onCacheProcess=function(t){e.onCacheProcess&&e.onCacheProcess(t);},this.player.onLoadCache=function(){null!=e.onLoadCache&&e.onLoadCache();},this.player.onLoadCacheFinshed=function(){null!=e.onLoadCacheFinshed&&e.onLoadCacheFinshed();},this.player.onRender=function(t,i,r,n,a){null!=e.onRender&&e.onRender(t,i,r,n,a);},this.player.onSeekFinish=function(){null!=e.onSeekFinish&&e.onSeekFinish();};var i=0;fetch(this.videoURL).then(function(e){return e.headers.has("Content-Length")&&(i=e.headers.get("Content-Length"),t.player&&t.player.setProbeSize(i*t.configFormat.extInfo.coreProbePart)),e.headers.get("Content-Length"),function e(i){return i.read().then(function(r){if(!r.done){r.value.buffer;var n=new Uint8Array(r.value.buffer);return t.player&&t.player.pushBuffer(n)<0?(t.player.release(),t.player=null,t._mp4EntryVodStream(),!1):e(i);}t.player&&t.player.pushDone();});}(e.body.getReader());})["catch"](function(e){});}},{key:"_mpegTsEntry",value:function value(){var e=this;this.timerFeed=null,this.mpegTsObj=new l.MpegTs(),this.mpegTsObj.bindReady(e),this.mpegTsObj.onDemuxed=this._mpegTsEntryReady,this.mpegTsObj.onReady=function(){fetch(e.videoURL).then(function(e){return e.arrayBuffer();}).then(function(t){t.fileStart=0;var i=new Uint8Array(t);e.mpegTsObj.demux(i);});},this.mpegTsObj.initMPEG();}},{key:"_mpegTsEntryReady",value:function value(e){var t=e,i=t.mpegTsObj.getACodec(),r=t.mpegTsObj.getDurationMs(),n=t.mpegTsObj.getFPS(),a=t.mpegTsObj.getSampleRate(),s=t.mpegTsObj.getSize();t._makeMP4PlayerViewEvent(r,n,a,s,""==i),parseInt(r/1e3),t._avFeedMP4Data(0,0);}},{key:"_m3u8Entry",value:function value(){var e=this,t=this,i=!1,r=0;this.hlsObj=new f.M3u8(),this.hlsObj.bindReady(t),this.hlsObj.onFinished=function(e,n){0==i&&(r=t.hlsObj.getDurationMs(),t.hlsConf.hlsType=n.type,i=!0);},this.hlsObj.onCacheProcess=function(t){e.playMode!==u.PLAYER_MODE_NOTIME_LIVE&&e.onCacheProcess&&e.onCacheProcess(t);},this.hlsObj.onDemuxed=function(e){if(null==t.player){var i=t.hlsObj.getACodec(),n=t.hlsObj.getFPS(),a=t.hlsObj.getSampleRate(),s=t.hlsObj.getSize(),o=!1;o=t.hlsObj.getSampleChannel()<=0||""===i,t._makeMP4PlayerViewEvent(r,n,a,s,o);}},this.hlsObj.onSamples=function(t,i){var r=e;e.hlsObj,1==i.video?r.player.appendHevcFrame(i):!1===e.hlsObj.audioNone&&r.player.appendAACFrame(i);},this.hlsObj.demux(this.videoURL);}},{key:"_raw265Entry",value:function value(){this._makeMP4PlayerViewEvent(-1,this.configFormat.extInfo.rawFps,-1,{width:this.configFormat.playerW,height:this.configFormat.playerH},!0,u.CODEC_H265),this.timerFeed&&(window.clearInterval(this.timerFeed),this.timerFeed=null);}},{key:"append265NaluFrame",value:function value(e){var t={data:e,pts:this.rawModePts};this.player.appendHevcFrame(t),this.configFormat.extInfo.readyShow&&this.player.cacheYuvBuf.getState()!=CACHE_APPEND_STATUS_CODE.NULL&&(this.player.playFrameYUV(!0,!0),this.configFormat.extInfo.readyShow=!1,this.onReadyShowDone&&this.onReadyShowDone()),this.rawModePts+=1/this.configFormat.extInfo.rawFps;}}])&&r(i.prototype,h),p&&r(i,p),e;}();i.H265webjs=p,t.new265webjs=function(e,t){return new p(e,t);};}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});},{"./consts":198,"./decoder/c-native-core":202,"./decoder/cache":203,"./decoder/missile.js":1,"./decoder/player-core":207,"./demuxer/m3u8":210,"./demuxer/mp4":212,"./demuxer/mpegts/mpeg.js":215,"./demuxer/ts":216,"./native/mp4-player":218,"./utils/static-mem":220,"./utils/ui/ui":221}],218:[function(e,t,i){"use strict";function r(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r);}}var n=e("../consts"),a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e),this.configFormat={width:t.width||n.DEFAULT_WIDTH,height:t.height||n.DEFAULT_HEIGHT,fps:t.fps||n.DEFAULT_FPS,fixed:t.fixed||n.DEFAULT_FIXED,sampleRate:t.sampleRate||n.DEFAULT_SAMPLERATE,appendHevcType:t.appendHevcType||n.APPEND_TYPE_STREAM,frameDurMs:t.frameDur||n.DEFAULT_FRAME_DUR,playerId:t.playerId||n.DEFAILT_WEBGL_PLAY_ID,audioNone:t.audioNone||!1,token:t.token||null,videoCodec:t.videoCodec||n.CODEC_H265},this.video=null,this.isPlaying=!1,this.onPlayingTime=null,this.onPlayingFinish=null;}var t,i,a;return t=e,(i=[{key:"makeIt",value:function value(e){var t=this,i=document.querySelector("div#"+this.configFormat.playerId);this.video=document.createElement("video"),this.video.src=e,this.video.style.width="100%",this.video.style.height="100%",i.appendChild(this.video),this.video.ontimeupdate=function(){t.onPlayingTime&&t.onPlayingTime(t.video.currentTime);},this.video.onended=function(){t.onPlayingFinish&&t.onPlayingFinish();};}},{key:"play",value:function value(){this.video.play();}},{key:"seek",value:function value(e){this.video.currentTime=e;}},{key:"pause",value:function value(){this.video.pause();}},{key:"setVoice",value:function value(e){this.video.volume=e;}},{key:"isPlayingState",value:function value(){return!this.video.paused;}}])&&r(t.prototype,i),a&&r(t,a),e;}();i.Mp4Player=a;},{"../consts":198}],219:[function(e,t,i){"use strict";function r(e){this.gl=e,this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);}r.prototype.bind=function(e,t,i){var r=this.gl;r.activeTexture([r.TEXTURE0,r.TEXTURE1,r.TEXTURE2][e]),r.bindTexture(r.TEXTURE_2D,this.texture),r.uniform1i(r.getUniformLocation(t,i),e);},r.prototype.fill=function(e,t,i){var r=this.gl;r.bindTexture(r.TEXTURE_2D,this.texture),r.texImage2D(r.TEXTURE_2D,0,r.LUMINANCE,e,t,0,r.LUMINANCE,r.UNSIGNED_BYTE,i);},t.exports={renderFrame:function renderFrame(e,t,i,r,n,a){e.viewport(0,0,e.canvas.width,e.canvas.height),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.y.fill(n,a,t),e.u.fill(n>>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<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r);}}var n=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}(this,e);}var t,i,n;return t=e,n=[{key:"createPlayerRender",value:function value(e,t,i){var r=document.querySelector("div#"+e);return r.style.position="relative",r.style.backgroundColor="black",r.style.width=t+"px",r.style.height=i+"px",r;}}],(i=null)&&r(t.prototype,i),n&&r(t,n),e;}();i.UI=n;},{}],222:[function(e,t,i){"use strict";t.exports={PLAYER_VERSION:"3.2.0"};},{}]},{},[217]);
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],2:[function(require,module,exports){
(function (global){
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
/*********************************************************
* LICENSE: GPL-3.0 https://www.gnu.org/licenses/gpl-3.0.txt
*
* Author: Numberwolf - ChangYanlong
* QQ: 531365872
* QQ Group:925466059
* Wechat: numberwolf11
* Discord: numberwolf#8694
* E-Mail: porschegt23@foxmail.com
* Github: https://github.com/numberwolf/h265web.js
*
* 作者: 小老虎(Numberwolf)(常炎隆)
* QQ: 531365872
* QQ群: 531365872
* 微信: numberwolf11
* Discord: numberwolf#8694
* 邮箱: porschegt23@foxmail.com
* 博客: https://www.jianshu.com/u/9c09c1e00fd1
* Github: https://github.com/numberwolf/h265web.js
*
**********************************************************/
require('./h265webjs-v20210718');
var h265webjs = exports["default"] = /*#__PURE__*/function () {
function h265webjs() {
_classCallCheck(this, h265webjs);
}
_createClass(h265webjs, null, [{
key: "createPlayer",
value: function createPlayer(videoURL, config) {
return window.new265webjs(videoURL, config);
}
}, {
key: "clear",
value: function clear() {
global.STATICE_MEM_playerCount = -1;
global.STATICE_MEM_playerIndexPtr = 0;
}
}]);
return h265webjs;
}();
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"./h265webjs-v20210718":1}],3:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
/*********************************************************
* LICENSE: GPL-3.0 https://www.gnu.org/licenses/gpl-3.0.txt
*
* Author: Numberwolf - ChangYanlong
* QQ: 531365872
* QQ Group:925466059
* Wechat: numberwolf11
* Discord: numberwolf#8694
* E-Mail: porschegt23@foxmail.com
* Github: https://github.com/numberwolf/h265web.js
*
* 作者: 小老虎(Numberwolf)(常炎隆)
* QQ: 531365872
* QQ群: 531365872
* 微信: numberwolf11
* Discord: numberwolf#8694
* 邮箱: porschegt23@foxmail.com
* 博客: https://www.jianshu.com/u/9c09c1e00fd1
* Github: https://github.com/numberwolf/h265web.js
*
**********************************************************/
/**
* codecImp Obj
* Video Raw 265 264 Parser
*/
var AfterGetNalThenMvLen = 3;
var RawParserModule = exports["default"] = /*#__PURE__*/function () {
function RawParserModule() {
_classCallCheck(this, RawParserModule);
this.frameList = null;
this.stream = null;
}
/*
*****************************************************
* *
* *
* HEVC Frames *
* *
* *
*****************************************************
*/
_createClass(RawParserModule, [{
key: "pushFrameRet",
value: function pushFrameRet(streamPushInput) {
if (!streamPushInput || streamPushInput == undefined || streamPushInput == null) {
return false;
}
if (!this.frameList || this.frameList == undefined || this.frameList == null) {
this.frameList = [];
this.frameList.push(streamPushInput);
} else {
this.frameList.push(streamPushInput);
}
return true;
}
}, {
key: "nextFrame",
value: function nextFrame() {
if (!this.frameList && this.frameList == undefined || this.frameList == null && this.frameList.length < 1) {
return null;
}
return this.frameList.shift();
}
}, {
key: "clearFrameRet",
value: function clearFrameRet() {
this.frameList = null;
}
/*
*****************************************************
* *
* *
* HEVC stream *
* *
* *
*****************************************************
*/
}, {
key: "setStreamRet",
value: function setStreamRet(streamBufInput) {
this.stream = streamBufInput;
}
}, {
key: "getStreamRet",
value: function getStreamRet() {
return this.stream;
}
/**
* push stream nalu, for live, not vod
* @param Uint8Array
* @return bool
*/
}, {
key: "appendStreamRet",
value: function appendStreamRet(input) {
if (!input || input === undefined || input == null) {
return false;
}
if (!this.stream || this.stream === undefined || this.stream == null) {
this.stream = input;
return true;
}
var lenOld = this.stream.length;
var lenPush = input.length;
var mergeStream = new Uint8Array(lenOld + lenPush);
mergeStream.set(this.stream, 0);
mergeStream.set(input, lenOld);
this.stream = mergeStream;
return true;
}
/**
* sub nalu stream, and get Nalu unit
*/
}, {
key: "subBuf",
value: function subBuf(startOpen, endOpen) {
// sub block [m,n]
// nal
var returnBuf = new Uint8Array(this.stream.subarray(startOpen, endOpen + 1));
// streamBuf sub
this.stream = new Uint8Array(this.stream.subarray(endOpen + 1));
return returnBuf;
}
/**
* @param onceGetNalCount: once use get nal count, defult 1
* @return uint8array OR false
*/
}, {
key: "nextNalu",
value: function nextNalu() {
var onceGetNalCount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
// check params
if (this.stream == null || this.stream.length <= 4) {
return false;
}
// start nal pos
var startTag = -1;
// return nalBuf
var returnNalBuf = null;
for (var i = 0; i < this.stream.length; i++) {
if (i + 5 >= this.stream.length) {
if (startTag == -1) {
return false;
} else {
// 如果结尾不到判断的字节位置 就直接全量输出最后一个nal
returnNalBuf = this.subBuf(startTag, this.stream.length - 1);
return returnNalBuf;
}
}
// find nal
if (
// 0x00 00 01
this.stream[i] == 0 && this.stream[i + 1] == 0 && this.stream[i + 2] == 1 ||
// 0x00 00 00 01
this.stream[i] == 0 && this.stream[i + 1] == 0 && this.stream[i + 2] == 0 && this.stream[i + 3] == 1) {
// console.log(
// "enter find nal , now startTag:" + startTag
// + ", now pos:" + i
// );
var nowPos = i;
i += AfterGetNalThenMvLen; // 移出去
// begin pos
if (startTag == -1) {
startTag = nowPos;
} else {
if (onceGetNalCount <= 1) {
// startCode - End
// [startTag,nowPos)
// console.log("[===>] last code hex is :" + this.stream[nowPos-1].toString(16))
returnNalBuf = this.subBuf(startTag, nowPos - 1);
return returnNalBuf;
} else {
onceGetNalCount -= 1;
}
}
}
} // end for
return false;
}
}, {
key: "nextNalu2",
value: function nextNalu2() {
var onceGetNalCount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
// check params
if (this.stream == null || this.stream.length <= 4) {
return false;
}
// start nal pos
var startTag = -1;
// return nalBuf
var returnNalBuf = null;
for (var i = 0; i < this.stream.length; i++) {
if (i + 5 >= this.stream.length) {
if (startTag == -1) {
return false;
} else {
// 如果结尾不到判断的字节位置 就直接全量输出最后一个nal
returnNalBuf = this.subBuf(startTag, this.stream.length - 1);
return returnNalBuf;
}
}
// find nal
var is3BitHeader = this.stream.slice(i, i + 3).join(' ') == '0 0 1';
var is4BitHeader = this.stream.slice(i, i + 4).join(' ') == '0 0 0 1';
if (is3BitHeader || is4BitHeader) {
var nowPos = i;
i += AfterGetNalThenMvLen; // 移出去
// begin pos
if (startTag == -1) {
startTag = nowPos;
} else {
if (onceGetNalCount <= 1) {
// startCode - End
// [startTag,nowPos)
// console.log("[===>] last code hex is :" + this.stream[nowPos-1].toString(16))
returnNalBuf = this.subBuf(startTag, nowPos - 1);
return returnNalBuf;
} else {
onceGetNalCount -= 1;
}
}
}
} // end for
return false;
}
/**
* @brief sub nalu stream, and get Nalu unit
* to parse:
* typedef struct {
* uint32_t width;
* uint32_t height;
* uint8_t *dataY;
* uint8_t *dataChromaB;
* uint8_t *dataChromaR;
* } ImageData;
* @params struct_ptr: Module.cwrap('getFrame', 'number', [])
* @return Dict
*/
}, {
key: "parseYUVFrameStruct",
value: function parseYUVFrameStruct() {
var struct_ptr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
// sub block [m,n]
if (struct_ptr == null || !struct_ptr || struct_ptr == undefined) {
return null;
}
var width = Module.HEAPU32[struct_ptr / 4];
var height = Module.HEAPU32[struct_ptr / 4 + 1];
// let imgBufferPtr = Module.HEAPU32[ptr / 4 + 2];
// let imageBuffer = Module.HEAPU8.subarray(imgBufferPtr, imgBufferPtr + width * height * 3);
// console.log("width:",width," height:",height);
var sizeWH = width * height;
// let imgBufferYPtr = Module.HEAPU32[ptr / 4 + 2];
// let imageBufferY = Module.HEAPU8.subarray(imgBufferYPtr, imgBufferYPtr + sizeWH);
// let imgBufferBPtr = Module.HEAPU32[ptr/4+ 2 + sizeWH/4 + 1];
// let imageBufferB = Module.HEAPU8.subarray(
// imgBufferBPtr,
// imgBufferBPtr + sizeWH/4
// );
// console.log(imageBufferB);
// let imgBufferRPtr = Module.HEAPU32[imgBufferBPtr + sizeWH/16 + 1];
// let imageBufferR = Module.HEAPU8.subarray(
// imgBufferRPtr,
// imgBufferRPtr + sizeWH/4
// );
var imgBufferPtr = Module.HEAPU32[struct_ptr / 4 + 1 + 1];
var imageBufferY = Module.HEAPU8.subarray(imgBufferPtr, imgBufferPtr + sizeWH);
var imageBufferB = Module.HEAPU8.subarray(imgBufferPtr + sizeWH + 8, imgBufferPtr + sizeWH + 8 + sizeWH / 4);
var imageBufferR = Module.HEAPU8.subarray(imgBufferPtr + sizeWH + 8 + sizeWH / 4 + 8, imgBufferPtr + sizeWH + 8 + sizeWH / 2 + 8);
return {
width: width,
height: height,
sizeWH: sizeWH,
imageBufferY: imageBufferY,
imageBufferB: imageBufferB,
imageBufferR: imageBufferR
};
}
}]);
return RawParserModule;
}();
},{}],4:[function(require,module,exports){
(function (global){
"use strict";
var _index = _interopRequireDefault(require("./dist/index"));
var _rawParser = _interopRequireDefault(require("./dist/raw-parser.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var SHOW_LOADING = "loading...";
var SHOW_DONE = "done.";
function durationFormatSubVal(val) {
var valStr = val.toString();
if (valStr.length < 2) {
return '0' + valStr;
}
return valStr;
}
function durationText(duration) {
if (duration < 0) {
return "Play";
}
var durationSecInt = Math.round(duration);
return durationFormatSubVal(Math.floor(durationSecInt / 3600)) + ":" + durationFormatSubVal(Math.floor(durationSecInt % 3600 / 60)) + ":" + durationFormatSubVal(Math.floor(durationSecInt % 60));
}
var getMsTime = function getMsTime() {
return new Date().getTime();
};
/*************************************************
*
*
* Build Player
*
*
**************************************************/
// clear cache count
_index["default"].clear();
global.makeH265webjs = function (videoURL, config) {
var playerId = config.player;
var playerObj = _index["default"].createPlayer(videoURL, config);
var playerDom = document.querySelector('#' + playerId);
var playerCont = document.querySelector('#player-container');
var controllerCont = document.querySelector('#controller');
var progressCont = document.querySelector('#progress-contaniner');
var progressContW = progressCont.offsetWidth;
var cachePts = progressCont.querySelector('#cachePts');
var progressPts = progressCont.querySelector('#progressPts');
var progressVoice = document.querySelector('#progressVoice');
var playBar = document.querySelector('#playBar');
var playBtn = playBar.getElementsByTagName('a')[0];
var showLabel = document.querySelector('#showLabel');
var ptsLabel = document.querySelector('#ptsLabel');
var coverToast = document.querySelector('#coverLayer');
var coverBtn = document.querySelector('#coverLayerBtn');
var muteBtn = document.querySelector('#muteBtn');
// let debugYUVBtn = document.querySelector('#debugYUVBtn');
// let debugYUVATag = document.querySelector('#debugYUVUrl');
var fullScreenBtn = document.querySelector('#fullScreenBtn');
var mediaInfo = null;
playBtn.disabled = true;
// playBar.textContent = '>';
showLabel.textContent = SHOW_LOADING;
playerCont.style.width = config.width + 'px';
playerCont.style.height = config.height + 'px';
controllerCont.style.width = config.width + 'px';
var muteState = false;
// controllerCont.style.left = playerContainer.clientLeft;
// controllerCont.style.bottom = playerContainer.clientBottom;
// alert(playerContainer.clientLeft);
var playAction = function playAction() {
console.log("is playing:", playerObj.isPlaying());
if (playerObj.isPlaying()) {
console.log("bar pause============>");
// playBar.textContent = '>';
playBar.setAttribute('class', 'playBtn');
playerObj.pause();
} else {
// playBar.textContent = '||';
playBar.setAttribute('class', 'pauseBtn');
playerObj.play();
}
};
playerCont.onmouseover = function () {
controllerCont.hidden = false;
};
playerCont.onmouseout = function () {
controllerCont.hidden = true;
};
playerDom.onmouseup = function () {
playAction();
};
playBtn.onclick = function () {
playAction();
};
muteBtn.onclick = function () {
console.log(playerObj.getVolume());
if (muteState === true) {
playerObj.setVoice(1.0);
progressVoice.value = 100;
} else {
playerObj.setVoice(0.0);
progressVoice.value = 0;
}
muteState = !muteState;
};
fullScreenBtn.onclick = function () {
playerObj.fullScreen();
// setTimeout(() => {
// playerObj.closeFullScreen();
// }, 2000);
};
progressCont.addEventListener('click', function (e) {
showLabel.textContent = SHOW_LOADING;
var x = e.pageX - progressCont.getBoundingClientRect().left; // or e.offsetX (less support, though)
var y = e.pageY - progressCont.getBoundingClientRect().top; // or e.offsetY
var clickedValue = x * progressCont.max / progressCont.offsetWidth;
// alert(clickedValue);
playerObj.seek(clickedValue);
});
progressVoice.addEventListener('click', function (e) {
var x = e.pageX - progressVoice.getBoundingClientRect().left; // or e.offsetX (less support, though)
var y = e.pageY - progressVoice.getBoundingClientRect().top; // or e.offsetY
var clickedValue = x * progressVoice.max / progressVoice.offsetWidth;
progressVoice.value = clickedValue;
var volume = clickedValue / 100;
// alert(volume);
// console.log(
// progressVoice.offsetLeft, // 209
// x, y, // 324 584
// progressVoice.max, progressVoice.offsetWidth);
playerObj.setVoice(volume);
});
playerObj.onSeekStart = function (pts) {
showLabel.textContent = SHOW_LOADING + " seek to:" + parseInt(pts);
};
playerObj.onSeekFinish = function () {
showLabel.textContent = SHOW_DONE;
};
playerObj.onPlayFinish = function () {
console.log("============= FINISHED ===============");
// playBar.textContent = '>';
playBar.setAttribute('class', 'playBtn');
// playerObj.release();
// console.log("=========> release ok");
};
playerObj.onRender = function (width, height, imageBufferY, imageBufferB, imageBufferR) {
console.log("on render");
};
playerObj.onOpenFullScreen = function () {
console.log("onOpenFullScreen");
};
playerObj.onCloseFullScreen = function () {
console.log("onCloseFullScreen");
};
playerObj.onSeekFinish = function () {
showLabel.textContent = SHOW_DONE;
};
playerObj.onLoadCache = function () {
showLabel.textContent = "Caching...";
};
playerObj.onLoadCacheFinshed = function () {
showLabel.textContent = SHOW_DONE;
};
playerObj.onReadyShowDone = function () {
console.log("onReadyShowDone");
showLabel.textContent = "Cover Img OK";
};
playerObj.onLoadFinish = function () {
playerObj.setVoice(1.0);
mediaInfo = playerObj.mediaInfo();
console.log("mediaInfo===========>", mediaInfo);
/*
meta:
durationMs: 144400
fps: 25
sampleRate: 44100
size: {
width: 864,
height: 480
},
audioNone : false
videoType: "vod"
*/
playBtn.disabled = false;
if (mediaInfo.meta.audioNone) {
progressVoice.value = 0;
progressVoice.style.display = 'none';
} else {
playerObj.setVoice(0.5);
}
if (mediaInfo.videoType == "vod") {
cachePts.max = mediaInfo.meta.durationMs / 1000;
progressCont.max = mediaInfo.meta.durationMs / 1000;
ptsLabel.textContent = durationText(0) + '/' + durationText(progressCont.max);
} else {
cachePts.hidden = true;
progressCont.hidden = true;
ptsLabel.textContent = 'LIVE';
if (mediaInfo.meta.audioNone === true) {
playBar.textContent = '||';
playerObj.play();
} else {
coverToast.removeAttribute('hidden');
coverBtn.onclick = function () {
playBar.textContent = '||';
playerObj.play();
coverToast.setAttribute('hidden', 'hidden');
};
}
}
showLabel.textContent = SHOW_DONE;
};
playerObj.onCacheProcess = function (cPts) {
// console.log("onCacheProcess => ", cPts);
try {
// cachePts.value = cPts;
var precent = cPts / progressCont.max;
var cacheWidth = precent * progressContW;
// console.log(precent, precent * progressCont.offsetWidth);
cachePts.style.width = cacheWidth + 'px';
} catch (err) {
console.log(err);
}
};
playerObj.onPlayTime = function (videoPTS) {
if (mediaInfo.videoType == "vod") {
// progressPts.value = videoPTS;
var precent = videoPTS / progressCont.max;
var progWidth = precent * progressContW;
// console.log(precent, precent * progressCont.offsetWidth);
progressPts.style.width = progWidth + 'px';
ptsLabel.textContent = durationText(videoPTS) + '/' + durationText(progressCont.max);
} else {
// ptsLabel.textContent = durationText(videoPTS) + '/LIVE';
ptsLabel.textContent = '/LIVE';
}
};
playerObj["do"]();
return playerObj;
};
/*
* 创建265流播放器
*/
global.makeH265webjsRaw = function (url265, config) {
var screenView = new ScreenModule.Screen();
var h265webjs = _index["default"].createPlayer(null, config);
var progressPts = document.querySelector('#progressPts');
var progressVoice = document.querySelector('#progressVoice');
var playBar = document.querySelector('#playBtn');
var fullScreenBtn = document.querySelector('#fullScreenBtn');
var mediaInfo = null;
playBar.disabled = true;
playBar.textContent = '>';
playBar.onclick = function () {
if (h265webjs.isPlaying()) {
console.log("bar pause============>");
playBar.textContent = '>';
h265webjs.pause();
} else {
playBar.textContent = '||';
h265webjs.play();
}
};
fullScreenBtn.onclick = function () {
screenView.open();
h265webjs.setRenderScreen(true);
};
screenView.onClose = function () {
h265webjs.setRenderScreen(false);
};
h265webjs.onRender = function (width, height, imageBufferY, imageBufferB, imageBufferR) {
screenView.render(width, height, imageBufferY, imageBufferB, imageBufferR);
console.log("on render");
};
h265webjs.onPlayTime = function (videoPTS) {
if (mediaInfo.videoType == "vod") {
progressPts.value = videoPTS;
ptsLabel.textContent = durationText(videoPTS) + '/' + durationText(progressPts.max);
} else {
ptsLabel.textContent = durationText(videoPTS) + '/LIVE';
}
};
h265webjs.onLoadFinish = function () {
/*
* fetch 265
* you can use your code to fetch vod stream
* only need `h265webjs.append265NaluFrame(nalBuf);` to append 265 frame
*/
var rawParser = new _rawParser["default"]();
/*
* fetch 265
*/
var fetchFinished = false;
var startFetch = false;
var networkInterval = window.setInterval(function () {
if (!startFetch) {
startFetch = true;
fetch(url265).then(function (response) {
var pump = function pump(reader) {
return reader.read().then(function (result) {
if (result.done) {
// console.log("========== RESULT DONE ===========");
fetchFinished = true;
window.clearInterval(networkInterval);
networkInterval = null;
return;
}
var chunk = result.value;
rawParser.appendStreamRet(chunk);
return pump(reader);
});
};
return pump(response.body.getReader());
})["catch"](function (error) {
console.log(error);
});
}
}, 1);
// fps>=30 play else cache
var naluParseInterval = window.setInterval(function () {
var test1time = getMsTime();
var nalBuf = rawParser.nextNalu(); // nal
var preCostTime = getMsTime() - test1time;
console.log("rawParser.nextNalu() => ", nalBuf, " usage => ", preCostTime);
if (nalBuf != false) {
// require
h265webjs.append265NaluFrame(nalBuf);
} else if (fetchFinished) {
window.clearInterval(naluParseInterval);
naluParseInterval = null;
}
}, 1);
h265webjs.setVoice(0.0);
mediaInfo = h265webjs.mediaInfo();
console.log("mediaInfo===========>", mediaInfo);
/*
meta:
durationMs: 144400
fps: 25
sampleRate: 44100
size: {
width: 864,
height: 480
},
audioNone : false
videoType: "vod"
*/
playBar.disabled = false;
if (mediaInfo.meta.audioNone) {
progressVoice.value = 0;
progressVoice.style.display = 'none';
}
if (mediaInfo.videoType == "vod") {
progressPts.max = mediaInfo.meta.durationMs / 1000;
ptsLabel.textContent = '0:0:0/' + durationText(progressPts.max);
} else {
progressPts.hidden = true;
ptsLabel.textContent = '0:0:0/LIVE';
}
showLabel.textContent = SHOW_DONE;
};
h265webjs["do"]();
return h265webjs;
};
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"./dist/index":2,"./dist/raw-parser.js":3}]},{},[4]);