From c74ea3df6ad67d73c5bd2f51250a5215bb76a2ad Mon Sep 17 00:00:00 2001 From: "zhuangpeng.li" <908349383@qq.com> Date: Thu, 11 Jul 2024 15:40:30 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BB=A3=E7=A0=81=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- springboot/fastbee-server/pom.xml | 1 + vue/public/index.html | 1 + vue/public/js/jessibuca/decoder.js | 1 + vue/public/js/jessibuca/decoder.wasm | Bin 0 -> 1050314 bytes vue/public/js/jessibuca/jessibuca.d.ts | 637 ++++++++++++++++++ vue/public/js/jessibuca/jessibuca.js | 1 + .../views/components/player/DeviceTree.vue | 183 ----- .../views/components/player/deviceVideo.vue | 291 -------- vue/src/views/components/player/jessibuca.vue | 363 ---------- vue/src/views/components/player/player.vue | 2 +- .../player/public/jessibuca-pro-multi.js | 1 - .../player/public/jessibuca-pro-talk.js | 1 - .../player/public/web-player-pro-multi.js | 1 - .../player/public/web-player-pro-talk.js | 1 - .../player/public/web-player-pro.js | 1 - vue/src/views/iot/device/device-edit.vue | 2 - vue/src/views/iot/sip/splitview.vue | 221 ------ 17 files changed, 642 insertions(+), 1066 deletions(-) create mode 100644 vue/public/js/jessibuca/decoder.js create mode 100644 vue/public/js/jessibuca/decoder.wasm create mode 100644 vue/public/js/jessibuca/jessibuca.d.ts create mode 100644 vue/public/js/jessibuca/jessibuca.js delete mode 100644 vue/src/views/components/player/DeviceTree.vue delete mode 100644 vue/src/views/components/player/deviceVideo.vue delete mode 100644 vue/src/views/components/player/jessibuca.vue delete mode 100644 vue/src/views/components/player/public/jessibuca-pro-multi.js delete mode 100644 vue/src/views/components/player/public/jessibuca-pro-talk.js delete mode 100644 vue/src/views/components/player/public/web-player-pro-multi.js delete mode 100644 vue/src/views/components/player/public/web-player-pro-talk.js delete mode 100644 vue/src/views/components/player/public/web-player-pro.js delete mode 100644 vue/src/views/iot/sip/splitview.vue diff --git a/springboot/fastbee-server/pom.xml b/springboot/fastbee-server/pom.xml index 3dd9f4da..521144e4 100644 --- a/springboot/fastbee-server/pom.xml +++ b/springboot/fastbee-server/pom.xml @@ -21,6 +21,7 @@ mqtt-broker iot-server-core + sip-server diff --git a/vue/public/index.html b/vue/public/index.html index a9d8327c..dff1813c 100644 --- a/vue/public/index.html +++ b/vue/public/index.html @@ -7,6 +7,7 @@ + <%= webpackConfig.name %> diff --git a/vue/public/js/jessibuca/decoder.js b/vue/public/js/jessibuca/decoder.js new file mode 100644 index 00000000..7813b9b2 --- /dev/null +++ b/vue/public/js/jessibuca/decoder.js @@ -0,0 +1 @@ +!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(require("path"),require("fs"),require("crypto")):"function"==typeof define&&define.amd?define(["path","fs","crypto"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).path,e.fs,e.crypto$1)}(this,(function(e,r,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(e),i=n(r),a=n(t);function s(e,r){return e(r={exports:{}},r.exports),r.exports}var l=s((function(e){var r=void 0!==r?r:{},t=(r={print:function(e){console.log("Jessibuca: [worker]:",e)},printErr:function(e){console.warn("Jessibuca: [worker]:",e),postMessage({cmd:"wasmError",message:e})}},Object.assign({},r)),n="./this.program",s="object"==typeof window,l="function"==typeof importScripts,u="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,c=!s&&!u&&!l;if(r.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");var d,f,p,m,h,g,v="";if(u){if("object"!=typeof process)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");v=l?o.default.dirname(v)+"/":__dirname+"/",g=()=>{h||(m=i.default,h=o.default)},d=function(e,r){return g(),e=h.normalize(e),m.readFileSync(e,r?void 0:"utf8")},p=e=>{var r=d(e,!0);return r.buffer||(r=new Uint8Array(r)),F(r.buffer),r},f=(e,r,t)=>{g(),e=h.normalize(e),m.readFile(e,(function(e,n){e?t(e):r(n.buffer)}))},process.argv.length>1&&(n=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),e.exports=r,process.on("uncaughtException",(function(e){if(!(e instanceof St))throw e})),process.on("unhandledRejection",(function(e){throw e})),r.inspect=function(){return"[Emscripten Module object]"}}else if(c){if("object"==typeof process||"object"==typeof window||"function"==typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");"undefined"!=typeof read&&(d=function(e){return read(e)}),p=function(e){let r;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(r=read(e,"binary"),F("object"==typeof r),r)},f=function(e,r,t){setTimeout((()=>r(p(e))),0)},"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!s&&!l)throw new Error("environment detection error");if(l?v=self.location.href:"undefined"!=typeof document&&document.currentScript&&(v=document.currentScript.src),v=0!==v.indexOf("blob:")?v.substr(0,v.replace(/[?#].*/,"").lastIndexOf("/")+1):"","object"!=typeof window&&"function"!=typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");d=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},l&&(p=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),f=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)}}var y,E,w,b=r.print||console.log.bind(console),_=r.printErr||console.warn.bind(console);function T(e){T.shown||(T.shown={}),T.shown[e]||(T.shown[e]=1,_(e))}function k(e,t){Object.getOwnPropertyDescriptor(r,e)||Object.defineProperty(r,e,{configurable:!0,get:function(){ge("Module."+e+" has been replaced with plain "+t+" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}})}function S(e,r){var t="'"+e+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)";return r&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),t}function C(e,t){Object.getOwnPropertyDescriptor(r,e)||Object.defineProperty(r,e,{configurable:!0,get:function(){ge(S(e,t))}})}function P(e,t){Object.getOwnPropertyDescriptor(r,e)||(r[e]=()=>ge(S(e,t)))}Object.assign(r,t),t=null,y="fetchSettings",Object.getOwnPropertyDescriptor(r,y)&&ge("`Module."+y+"` was supplied but `"+y+"` not included in INCOMING_MODULE_JS_API"),r.arguments,k("arguments","arguments_"),r.thisProgram&&(n=r.thisProgram),k("thisProgram","thisProgram"),r.quit,k("quit","quit_"),F(void 0===r.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),F(void 0===r.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),F(void 0===r.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),F(void 0===r.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),F(void 0===r.read,"Module.read option was removed (modify read_ in JS)"),F(void 0===r.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),F(void 0===r.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),F(void 0===r.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),F(void 0===r.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),k("read","read_"),k("readAsync","readAsync"),k("readBinary","readBinary"),k("setWindowTitle","setWindowTitle"),F(!c,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable."),r.wasmBinary&&(E=r.wasmBinary),k("wasmBinary","wasmBinary"),r.noExitRuntime,k("noExitRuntime","noExitRuntime"),"object"!=typeof WebAssembly&&ge("no native wasm support detected");var A=!1;function F(e,r){e||ge("Assertion failed"+(r?": "+r:""))}var D="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function O(e,r,t){for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&D)return D.decode(e.subarray(r,o));for(var i="";r<o;){var a=e[r++];if(128&a){var s=63&e[r++];if(192!=(224&a)){var l=63&e[r++];if(224==(240&a)?a=(15&a)<<12|s<<6|l:(240!=(248&a)&&T("Invalid UTF-8 leading byte 0x"+a.toString(16)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),a=(7&a)<<18|s<<12|l<<6|63&e[r++]),a<65536)i+=String.fromCharCode(a);else{var u=a-65536;i+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function R(e,r){return e?O(U,e,r):""}function M(e,r,t,n){if(!(n>0))return 0;for(var o=t,i=t+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a);if(s<=127){if(t>=i)break;r[t++]=s}else if(s<=2047){if(t+1>=i)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=i)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=i)break;s>1114111&&T("Invalid Unicode code point 0x"+s.toString(16)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o}function N(e,r,t){return F("number"==typeof t,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),M(e,U,r,t)}function I(e){for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++t)),n<=127?++r:r+=n<=2047?2:n<=65535?3:4}return r}var L,x,U,B,j,$,W,z,H,G="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function V(e,r){F(e%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var t=e,n=t>>1,o=n+r/2;!(n>=o)&&j[n];)++n;if((t=n<<1)-e>32&&G)return G.decode(U.subarray(e,t));for(var i="",a=0;!(a>=r/2);++a){var s=B[e+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function Y(e,r,t){if(F(r%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),F("number"==typeof t,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===t&&(t=2147483647),t<2)return 0;for(var n=r,o=(t-=2)<2*e.length?t/2:e.length,i=0;i<o;++i){var a=e.charCodeAt(i);B[r>>1]=a,r+=2}return B[r>>1]=0,r-n}function q(e){return 2*e.length}function X(e,r){F(e%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var t=0,n="";!(t>=r/4);){var o=$[e+4*t>>2];if(0==o)break;if(++t,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function K(e,r,t){if(F(r%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),F("number"==typeof t,"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,o=n+t-4,i=0;i<e.length;++i){var a=e.charCodeAt(i);if(a>=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i);if($[r>>2]=a,(r+=4)+4>o)break}return $[r>>2]=0,r-n}function J(e){for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&++t,r+=4}return r}function Q(e){var r=I(e)+1,t=gt(r);return t&&M(e,x,t,r),t}function Z(e){L=e,r.HEAP8=x=new Int8Array(e),r.HEAP16=B=new Int16Array(e),r.HEAP32=$=new Int32Array(e),r.HEAPU8=U=new Uint8Array(e),r.HEAPU16=j=new Uint16Array(e),r.HEAPU32=W=new Uint32Array(e),r.HEAPF32=z=new Float32Array(e),r.HEAPF64=H=new Float64Array(e)}var ee=5242880;r.TOTAL_STACK&&F(ee===r.TOTAL_STACK,"the stack size can no longer be determined at runtime");var re,te=r.INITIAL_MEMORY||67108864;function ne(){var e=kt();F(0==(3&e)),$[e>>2]=34821223,$[e+4>>2]=2310721022,$[0]=1668509029}function oe(){if(!A){var e=kt(),r=W[e>>2],t=W[e+4>>2];34821223==r&&2310721022==t||ge("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+t.toString(16)+" 0x"+r.toString(16)),1668509029!==$[0]&&ge("Runtime error: The application has corrupted its heap memory area (address zero)!")}}k("INITIAL_MEMORY","INITIAL_MEMORY"),F(te>=ee,"INITIAL_MEMORY should be larger than TOTAL_STACK, was "+te+"! (TOTAL_STACK="+"5242880)"),F("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support"),F(!r.wasmMemory,"Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally"),F(67108864==te,"Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically"),function(){var e=new Int16Array(1),r=new Int8Array(e.buffer);if(e[0]=25459,115!==r[0]||99!==r[1])throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"}();var ie=[],ae=[],se=[],le=!1;F(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),F(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),F(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),F(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 ue=0,ce=null,de=null,fe={};function pe(e){for(var r=e;;){if(!fe[e])return e;e=r+Math.random()}}function me(e){ue++,r.monitorRunDependencies&&r.monitorRunDependencies(ue),e?(F(!fe[e]),fe[e]=1,null===ce&&"undefined"!=typeof setInterval&&(ce=setInterval((function(){if(A)return clearInterval(ce),void(ce=null);var e=!1;for(var r in fe)e||(e=!0,_("still waiting on run dependencies:")),_("dependency: "+r);e&&_("(end of list)")}),1e4))):_("warning: run dependency added without ID")}function he(e){if(ue--,r.monitorRunDependencies&&r.monitorRunDependencies(ue),e?(F(fe[e]),delete fe[e]):_("warning: run dependency removed without ID"),0==ue&&(null!==ce&&(clearInterval(ce),ce=null),de)){var t=de;de=null,t()}}function ge(e){throw r.onAbort&&r.onAbort(e),_(e="Aborted("+e+")"),A=!0,new WebAssembly.RuntimeError(e)}var ve,ye,Ee;function we(e){return e.startsWith("data:application/octet-stream;base64,")}function be(e){return e.startsWith("file://")}function _e(e,t){return function(){var n=e,o=t;return t||(o=r.asm),F(le,"native function `"+n+"` called before runtime initialization"),o[e]||F(o[e],"exported native function `"+n+"` not found"),o[e].apply(null,arguments)}}function Te(e){try{if(e==ve&&E)return new Uint8Array(E);if(p)return p(e);throw"both async and sync fetching of the wasm failed"}catch(e){ge(e)}}function ke(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var n=t.func;"number"==typeof n?void 0===t.arg?Ce(n)():Ce(n)(t.arg):n(void 0===t.arg?null:t.arg)}else t(r)}}function Se(e){return e.replace(/\b_Z[\w\d_]+/g,(function(e){var r,t=(r=e,T("warning: build with -sDEMANGLE_SUPPORT to link in libcxxabi demangling"),r);return e===t?e:t+" ["+e+"]"}))}function Ce(e){return re.get(e)}function Pe(){var e=new Error;if(!e.stack){try{throw new Error}catch(r){e=r}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}we(ve="decoder.wasm")||(ve=function(e){return r.locateFile?r.locateFile(e,v):v+e}(ve));var Ae={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=Ae.isAbs(e),t="/"===e.substr(-1);return(e=Ae.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=Ae.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=Ae.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments,0);return Ae.normalize(e.join("/"))},join2:(e,r)=>Ae.normalize(e+"/"+r)};var Fe={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:Ie.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=Ae.isAbs(n)}return(r?"/":"")+(e=Ae.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=Fe.resolve(e).substr(1),r=Fe.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var l=[];for(s=a;s<n.length;s++)l.push("..");return(l=l.concat(o.slice(a))).join("/")}},De={ttys:[],init:function(){},shutdown:function(){},register:function(e,r){De.ttys[e]={input:[],output:[],ops:r},Ie.registerDevice(e,De.stream_ops)},stream_ops:{open:function(e){var r=De.ttys[e.node.rdev];if(!r)throw new Ie.ErrnoError(43);e.tty=r,e.seekable=!1},close:function(e){e.tty.ops.flush(e.tty)},flush:function(e){e.tty.ops.flush(e.tty)},read:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new Ie.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new Ie.ErrnoError(29)}if(void 0===s&&0===i)throw new Ie.ErrnoError(6);if(null==s)break;i++,r[t+a]=s}return i&&(e.node.timestamp=Date.now()),i},write:function(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new Ie.ErrnoError(60);try{for(var i=0;i<n;i++)e.tty.ops.put_char(e.tty,r[t+i])}catch(e){throw new Ie.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(e){if(!e.input.length){var r=null;if(u){var t=Buffer.alloc(256),n=0;try{n=m.readSync(process.stdin.fd,t,0,256,-1)}catch(e){if(!e.toString().includes("EOF"))throw e;n=0}r=n>0?t.slice(0,n).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(r=window.prompt("Input: "))&&(r+="\n"):"function"==typeof readline&&null!==(r=readline())&&(r+="\n");if(!r)return null;e.input=pt(r,!0)}return e.input.shift()},put_char:function(e,r){null===r||10===r?(b(O(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},flush:function(e){e.output&&e.output.length>0&&(b(O(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,r){null===r||10===r?(_(O(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},flush:function(e){e.output&&e.output.length>0&&(_(O(e.output,0)),e.output=[])}}};function Oe(e){e=function(e,r){return F(r,"alignment argument is required"),Math.ceil(e/r)*r}(e,65536);var r=bt(65536,e);return r?(function(e,r){U.fill(0,e,e+r)}(r,e),r):0}var Re={ops_table:null,mount:function(e){return Re.createNode(null,"/",16895,0)},createNode:function(e,r,t,n){if(Ie.isBlkdev(t)||Ie.isFIFO(t))throw new Ie.ErrnoError(63);Re.ops_table||(Re.ops_table={dir:{node:{getattr:Re.node_ops.getattr,setattr:Re.node_ops.setattr,lookup:Re.node_ops.lookup,mknod:Re.node_ops.mknod,rename:Re.node_ops.rename,unlink:Re.node_ops.unlink,rmdir:Re.node_ops.rmdir,readdir:Re.node_ops.readdir,symlink:Re.node_ops.symlink},stream:{llseek:Re.stream_ops.llseek}},file:{node:{getattr:Re.node_ops.getattr,setattr:Re.node_ops.setattr},stream:{llseek:Re.stream_ops.llseek,read:Re.stream_ops.read,write:Re.stream_ops.write,allocate:Re.stream_ops.allocate,mmap:Re.stream_ops.mmap,msync:Re.stream_ops.msync}},link:{node:{getattr:Re.node_ops.getattr,setattr:Re.node_ops.setattr,readlink:Re.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Re.node_ops.getattr,setattr:Re.node_ops.setattr},stream:Ie.chrdev_stream_ops}});var o=Ie.createNode(e,r,t,n);return Ie.isDir(o.mode)?(o.node_ops=Re.ops_table.dir.node,o.stream_ops=Re.ops_table.dir.stream,o.contents={}):Ie.isFile(o.mode)?(o.node_ops=Re.ops_table.file.node,o.stream_ops=Re.ops_table.file.stream,o.usedBytes=0,o.contents=null):Ie.isLink(o.mode)?(o.node_ops=Re.ops_table.link.node,o.stream_ops=Re.ops_table.link.stream):Ie.isChrdev(o.mode)&&(o.node_ops=Re.ops_table.chrdev.node,o.stream_ops=Re.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr:function(e){var r={};return r.dev=Ie.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,Ie.isDir(e.mode)?r.size=4096:Ie.isFile(e.mode)?r.size=e.usedBytes:Ie.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr:function(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&Re.resizeFileStorage(e,r.size)},lookup:function(e,r){throw Ie.genericErrors[44]},mknod:function(e,r,t,n){return Re.createNode(e,r,t,n)},rename:function(e,r,t){if(Ie.isDir(e.mode)){var n;try{n=Ie.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new Ie.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink:function(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir:function(e,r){var t=Ie.lookupNode(e,r);for(var n in t.contents)throw new Ie.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir:function(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink:function(e,r,t){var n=Re.createNode(e,r,41471,0);return n.link=t,n},readlink:function(e){if(!Ie.isLink(e.mode))throw new Ie.ErrnoError(28);return e.link}},stream_ops:{read:function(e,r,t,n,o){var i=e.node.contents;if(o>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-o,n);if(F(a>=0),a>8&&i.subarray)r.set(i.subarray(o,o+a),t);else for(var s=0;s<a;s++)r[t+s]=i[o+s];return a},write:function(e,r,t,n,o,i){if(F(!(r instanceof ArrayBuffer)),r.buffer===x.buffer&&(i=!1),!n)return 0;var a=e.node;if(a.timestamp=Date.now(),r.subarray&&(!a.contents||a.contents.subarray)){if(i)return F(0===o,"canOwn must imply no weird position inside the file"),a.contents=r.subarray(t,t+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=r.slice(t,t+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(r.subarray(t,t+n),o),n}if(Re.expandFileStorage(a,o+n),a.contents.subarray&&r.subarray)a.contents.set(r.subarray(t,t+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=r[t+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&Ie.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new Ie.ErrnoError(28);return n},allocate:function(e,r,t){Re.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap:function(e,r,t,n,o,i){if(0!==r)throw new Ie.ErrnoError(28);if(!Ie.isFile(e.node.mode))throw new Ie.ErrnoError(43);var a,s,l=e.node.contents;if(2&i||l.buffer!==L){if((n>0||n+t<l.length)&&(l=l.subarray?l.subarray(n,n+t):Array.prototype.slice.call(l,n,n+t)),s=!0,!(a=Oe(t)))throw new Ie.ErrnoError(48);x.set(l,a)}else s=!1,a=l.byteOffset;return{ptr:a,allocated:s}},msync:function(e,r,t,n,o){if(!Ie.isFile(e.node.mode))throw new Ie.ErrnoError(43);return 2&o||Re.stream_ops.write(e,r,0,n,t,!1),0}}};var Me={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"},Ne={},Ie={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=Fe.resolve(Ie.cwd(),e)))return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};if(r=Object.assign(t,r),r.recurse_count>8)throw new Ie.ErrnoError(32);for(var n=Ae.normalizeArray(e.split("/").filter((e=>!!e)),!1),o=Ie.root,i="/",a=0;a<n.length;a++){var s=a===n.length-1;if(s&&r.parent)break;if(o=Ie.lookupNode(o,n[a]),i=Ae.join2(i,n[a]),Ie.isMountpoint(o)&&(!s||s&&r.follow_mount)&&(o=o.mounted.root),!s||r.follow)for(var l=0;Ie.isLink(o.mode);){var u=Ie.readlink(i);i=Fe.resolve(Ae.dirname(i),u);var c=Ie.lookupPath(i,{recurse_count:r.recurse_count+1});if(o=c.node,l++>40)throw new Ie.ErrnoError(32)}}return{path:i,node:o}},getPath:e=>{for(var r;;){if(Ie.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?t+"/"+r:t+r:t}r=r?e.name+"/"+r:e.name,e=e.parent}},hashName:(e,r)=>{for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%Ie.nameTable.length},hashAddNode:e=>{var r=Ie.hashName(e.parent.id,e.name);e.name_next=Ie.nameTable[r],Ie.nameTable[r]=e},hashRemoveNode:e=>{var r=Ie.hashName(e.parent.id,e.name);if(Ie.nameTable[r]===e)Ie.nameTable[r]=e.name_next;else for(var t=Ie.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode:(e,r)=>{var t=Ie.mayLookup(e);if(t)throw new Ie.ErrnoError(t,e);for(var n=Ie.hashName(e.id,r),o=Ie.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===e.id&&i===r)return o}return Ie.lookup(e,r)},createNode:(e,r,t,n)=>{F("object"==typeof e);var o=new Ie.FSNode(e,r,t,n);return Ie.hashAddNode(o),o},destroyNode:e=>{Ie.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var r=Ie.flagModes[e];if(void 0===r)throw new Error("Unknown file open mode: "+e);return r},flagsToPermissionString:e=>{var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>Ie.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup:e=>{var r=Ie.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate:(e,r)=>{try{Ie.lookupNode(e,r);return 20}catch(e){}return Ie.nodePermissions(e,"wx")},mayDelete:(e,r,t)=>{var n;try{n=Ie.lookupNode(e,r)}catch(e){return e.errno}var o=Ie.nodePermissions(e,"wx");if(o)return o;if(t){if(!Ie.isDir(n.mode))return 54;if(Ie.isRoot(n)||Ie.getPath(n)===Ie.cwd())return 10}else if(Ie.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?Ie.isLink(e.mode)?32:Ie.isDir(e.mode)&&("r"!==Ie.flagsToPermissionString(r)||512&r)?31:Ie.nodePermissions(e,Ie.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ie.MAX_OPEN_FDS;for(var t=e;t<=r;t++)if(!Ie.streams[t])return t;throw new Ie.ErrnoError(33)},getStream:e=>Ie.streams[e],createStream:(e,r,t)=>{Ie.FSStream||(Ie.FSStream=function(){this.shared={}},Ie.FSStream.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get function(){return this.shared.position},set:function(e){this.shared.position=e}}}),e=Object.assign(new Ie.FSStream,e);var n=Ie.nextfd(r,t);return e.fd=n,Ie.streams[n]=e,e},closeStream:e=>{Ie.streams[e]=null},chrdev_stream_ops:{open:e=>{var r=Ie.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new Ie.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice:(e,r)=>{Ie.devices[e]={stream_ops:r}},getDevice:e=>Ie.devices[e],getMounts:e=>{for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs:(e,r)=>{"function"==typeof e&&(r=e,e=!1),Ie.syncFSRequests++,Ie.syncFSRequests>1&&_("warning: "+Ie.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var t=Ie.getMounts(Ie.root.mount),n=0;function o(e){return F(Ie.syncFSRequests>0),Ie.syncFSRequests--,r(e)}function i(e){if(e)return i.errored?void 0:(i.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((r=>{if(!r.type.syncfs)return i(null);r.type.syncfs(r,e,i)}))},mount:(e,r,t)=>{if("string"==typeof e)throw e;var n,o="/"===t,i=!t;if(o&&Ie.root)throw new Ie.ErrnoError(10);if(!o&&!i){var a=Ie.lookupPath(t,{follow_mount:!1});if(t=a.path,n=a.node,Ie.isMountpoint(n))throw new Ie.ErrnoError(10);if(!Ie.isDir(n.mode))throw new Ie.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,o?Ie.root=l:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),l},unmount:e=>{var r=Ie.lookupPath(e,{follow_mount:!1});if(!Ie.isMountpoint(r.node))throw new Ie.ErrnoError(28);var t=r.node,n=t.mounted,o=Ie.getMounts(n);Object.keys(Ie.nameTable).forEach((e=>{for(var r=Ie.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&Ie.destroyNode(r),r=t}})),t.mounted=null;var i=t.mount.mounts.indexOf(n);F(-1!==i),t.mount.mounts.splice(i,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod:(e,r,t)=>{var n=Ie.lookupPath(e,{parent:!0}).node,o=Ae.basename(e);if(!o||"."===o||".."===o)throw new Ie.ErrnoError(28);var i=Ie.mayCreate(n,o);if(i)throw new Ie.ErrnoError(i);if(!n.node_ops.mknod)throw new Ie.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,Ie.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,Ie.mknod(e,r,0)),mkdirTree:(e,r)=>{for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{Ie.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,Ie.mknod(e,r,t)),symlink:(e,r)=>{if(!Fe.resolve(e))throw new Ie.ErrnoError(44);var t=Ie.lookupPath(r,{parent:!0}).node;if(!t)throw new Ie.ErrnoError(44);var n=Ae.basename(r),o=Ie.mayCreate(t,n);if(o)throw new Ie.ErrnoError(o);if(!t.node_ops.symlink)throw new Ie.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename:(e,r)=>{var t,n,o=Ae.dirname(e),i=Ae.dirname(r),a=Ae.basename(e),s=Ae.basename(r);if(t=Ie.lookupPath(e,{parent:!0}).node,n=Ie.lookupPath(r,{parent:!0}).node,!t||!n)throw new Ie.ErrnoError(44);if(t.mount!==n.mount)throw new Ie.ErrnoError(75);var l,u=Ie.lookupNode(t,a),c=Fe.relative(e,i);if("."!==c.charAt(0))throw new Ie.ErrnoError(28);if("."!==(c=Fe.relative(r,o)).charAt(0))throw new Ie.ErrnoError(55);try{l=Ie.lookupNode(n,s)}catch(e){}if(u!==l){var d=Ie.isDir(u.mode),f=Ie.mayDelete(t,a,d);if(f)throw new Ie.ErrnoError(f);if(f=l?Ie.mayDelete(n,s,d):Ie.mayCreate(n,s))throw new Ie.ErrnoError(f);if(!t.node_ops.rename)throw new Ie.ErrnoError(63);if(Ie.isMountpoint(u)||l&&Ie.isMountpoint(l))throw new Ie.ErrnoError(10);if(n!==t&&(f=Ie.nodePermissions(t,"w")))throw new Ie.ErrnoError(f);Ie.hashRemoveNode(u);try{t.node_ops.rename(u,n,s)}catch(e){throw e}finally{Ie.hashAddNode(u)}}},rmdir:e=>{var r=Ie.lookupPath(e,{parent:!0}).node,t=Ae.basename(e),n=Ie.lookupNode(r,t),o=Ie.mayDelete(r,t,!0);if(o)throw new Ie.ErrnoError(o);if(!r.node_ops.rmdir)throw new Ie.ErrnoError(63);if(Ie.isMountpoint(n))throw new Ie.ErrnoError(10);r.node_ops.rmdir(r,t),Ie.destroyNode(n)},readdir:e=>{var r=Ie.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new Ie.ErrnoError(54);return r.node_ops.readdir(r)},unlink:e=>{var r=Ie.lookupPath(e,{parent:!0}).node;if(!r)throw new Ie.ErrnoError(44);var t=Ae.basename(e),n=Ie.lookupNode(r,t),o=Ie.mayDelete(r,t,!1);if(o)throw new Ie.ErrnoError(o);if(!r.node_ops.unlink)throw new Ie.ErrnoError(63);if(Ie.isMountpoint(n))throw new Ie.ErrnoError(10);r.node_ops.unlink(r,t),Ie.destroyNode(n)},readlink:e=>{var r=Ie.lookupPath(e).node;if(!r)throw new Ie.ErrnoError(44);if(!r.node_ops.readlink)throw new Ie.ErrnoError(28);return Fe.resolve(Ie.getPath(r.parent),r.node_ops.readlink(r))},stat:(e,r)=>{var t=Ie.lookupPath(e,{follow:!r}).node;if(!t)throw new Ie.ErrnoError(44);if(!t.node_ops.getattr)throw new Ie.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>Ie.stat(e,!0),chmod:(e,r,t)=>{var n;"string"==typeof e?n=Ie.lookupPath(e,{follow:!t}).node:n=e;if(!n.node_ops.setattr)throw new Ie.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,r)=>{Ie.chmod(e,r,!0)},fchmod:(e,r)=>{var t=Ie.getStream(e);if(!t)throw new Ie.ErrnoError(8);Ie.chmod(t.node,r)},chown:(e,r,t,n)=>{var o;"string"==typeof e?o=Ie.lookupPath(e,{follow:!n}).node:o=e;if(!o.node_ops.setattr)throw new Ie.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(e,r,t)=>{Ie.chown(e,r,t,!0)},fchown:(e,r,t)=>{var n=Ie.getStream(e);if(!n)throw new Ie.ErrnoError(8);Ie.chown(n.node,r,t)},truncate:(e,r)=>{if(r<0)throw new Ie.ErrnoError(28);var t;"string"==typeof e?t=Ie.lookupPath(e,{follow:!0}).node:t=e;if(!t.node_ops.setattr)throw new Ie.ErrnoError(63);if(Ie.isDir(t.mode))throw new Ie.ErrnoError(31);if(!Ie.isFile(t.mode))throw new Ie.ErrnoError(28);var n=Ie.nodePermissions(t,"w");if(n)throw new Ie.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate:(e,r)=>{var t=Ie.getStream(e);if(!t)throw new Ie.ErrnoError(8);if(0==(2097155&t.flags))throw new Ie.ErrnoError(28);Ie.truncate(t.node,r)},utime:(e,r,t)=>{var n=Ie.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open:(e,t,n,o,i)=>{if(""===e)throw new Ie.ErrnoError(44);var a;if(n=void 0===n?438:n,n=64&(t="string"==typeof t?Ie.modeStringToFlags(t):t)?4095&n|32768:0,"object"==typeof e)a=e;else{e=Ae.normalize(e);try{a=Ie.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(a){if(128&t)throw new Ie.ErrnoError(20)}else a=Ie.mknod(e,n,0),s=!0;if(!a)throw new Ie.ErrnoError(44);if(Ie.isChrdev(a.mode)&&(t&=-513),65536&t&&!Ie.isDir(a.mode))throw new Ie.ErrnoError(54);if(!s){var l=Ie.mayOpen(a,t);if(l)throw new Ie.ErrnoError(l)}512&t&&Ie.truncate(a,0),t&=-131713;var u=Ie.createStream({node:a,path:Ie.getPath(a),flags:t,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1},o,i);return u.stream_ops.open&&u.stream_ops.open(u),!r.logReadFiles||1&t||(Ie.readFiles||(Ie.readFiles={}),e in Ie.readFiles||(Ie.readFiles[e]=1)),u},close:e=>{if(Ie.isClosed(e))throw new Ie.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Ie.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,r,t)=>{if(Ie.isClosed(e))throw new Ie.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Ie.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Ie.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read:(e,r,t,n,o)=>{if(n<0||o<0)throw new Ie.ErrnoError(28);if(Ie.isClosed(e))throw new Ie.ErrnoError(8);if(1==(2097155&e.flags))throw new Ie.ErrnoError(8);if(Ie.isDir(e.node.mode))throw new Ie.ErrnoError(31);if(!e.stream_ops.read)throw new Ie.ErrnoError(28);var i=void 0!==o;if(i){if(!e.seekable)throw new Ie.ErrnoError(70)}else o=e.position;var a=e.stream_ops.read(e,r,t,n,o);return i||(e.position+=a),a},write:(e,r,t,n,o,i)=>{if(n<0||o<0)throw new Ie.ErrnoError(28);if(Ie.isClosed(e))throw new Ie.ErrnoError(8);if(0==(2097155&e.flags))throw new Ie.ErrnoError(8);if(Ie.isDir(e.node.mode))throw new Ie.ErrnoError(31);if(!e.stream_ops.write)throw new Ie.ErrnoError(28);e.seekable&&1024&e.flags&&Ie.llseek(e,0,2);var a=void 0!==o;if(a){if(!e.seekable)throw new Ie.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,i);return a||(e.position+=s),s},allocate:(e,r,t)=>{if(Ie.isClosed(e))throw new Ie.ErrnoError(8);if(r<0||t<=0)throw new Ie.ErrnoError(28);if(0==(2097155&e.flags))throw new Ie.ErrnoError(8);if(!Ie.isFile(e.node.mode)&&!Ie.isDir(e.node.mode))throw new Ie.ErrnoError(43);if(!e.stream_ops.allocate)throw new Ie.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap:(e,r,t,n,o,i)=>{if(0!=(2&o)&&0==(2&i)&&2!=(2097155&e.flags))throw new Ie.ErrnoError(2);if(1==(2097155&e.flags))throw new Ie.ErrnoError(2);if(!e.stream_ops.mmap)throw new Ie.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o,i)},msync:(e,r,t,n,o)=>e&&e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl:(e,r,t)=>{if(!e.stream_ops.ioctl)throw new Ie.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error('Invalid encoding type "'+r.encoding+'"');var t,n=Ie.open(e,r.flags),o=Ie.stat(e),i=o.size,a=new Uint8Array(i);return Ie.read(n,a,0,i,0),"utf8"===r.encoding?t=O(a,0):"binary"===r.encoding&&(t=a),Ie.close(n),t},writeFile:function(e,r){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t.flags=t.flags||577;var n=Ie.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(I(r)+1),i=M(r,o,0,o.length);Ie.write(n,o,0,i,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");Ie.write(n,r,0,r.byteLength,void 0,t.canOwn)}Ie.close(n)},cwd:()=>Ie.currentPath,chdir:e=>{var r=Ie.lookupPath(e,{follow:!0});if(null===r.node)throw new Ie.ErrnoError(44);if(!Ie.isDir(r.node.mode))throw new Ie.ErrnoError(54);var t=Ie.nodePermissions(r.node,"x");if(t)throw new Ie.ErrnoError(t);Ie.currentPath=r.path},createDefaultDirectories:()=>{Ie.mkdir("/tmp"),Ie.mkdir("/home"),Ie.mkdir("/home/web_user")},createDefaultDevices:()=>{Ie.mkdir("/dev"),Ie.registerDevice(Ie.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),Ie.mkdev("/dev/null",Ie.makedev(1,3)),De.register(Ie.makedev(5,0),De.default_tty_ops),De.register(Ie.makedev(6,0),De.default_tty1_ops),Ie.mkdev("/dev/tty",Ie.makedev(5,0)),Ie.mkdev("/dev/tty1",Ie.makedev(6,0));var e=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}if(u)try{var r=a.default;return function(){return r.randomBytes(1)[0]}}catch(e){}return function(){ge("no cryptographic support found for randomDevice. 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 } };")}}();Ie.createDevice("/dev","random",e),Ie.createDevice("/dev","urandom",e),Ie.mkdir("/dev/shm"),Ie.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{Ie.mkdir("/proc");var e=Ie.mkdir("/proc/self");Ie.mkdir("/proc/self/fd"),Ie.mount({mount:()=>{var r=Ie.createNode(e,"fd",16895,73);return r.node_ops={lookup:(e,r)=>{var t=+r,n=Ie.getStream(t);if(!n)throw new Ie.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams:()=>{r.stdin?Ie.createDevice("/dev","stdin",r.stdin):Ie.symlink("/dev/tty","/dev/stdin"),r.stdout?Ie.createDevice("/dev","stdout",null,r.stdout):Ie.symlink("/dev/tty","/dev/stdout"),r.stderr?Ie.createDevice("/dev","stderr",null,r.stderr):Ie.symlink("/dev/tty1","/dev/stderr");var e=Ie.open("/dev/stdin",0),t=Ie.open("/dev/stdout",1),n=Ie.open("/dev/stderr",1);F(0===e.fd,"invalid handle for stdin ("+e.fd+")"),F(1===t.fd,"invalid handle for stdout ("+t.fd+")"),F(2===n.fd,"invalid handle for stderr ("+n.fd+")")},ensureErrnoError:()=>{Ie.ErrnoError||(Ie.ErrnoError=function(e,r){this.node=r,this.setErrno=function(e){for(var r in this.errno=e,Ne)if(Ne[r]===e){this.code=r;break}},this.setErrno(e),this.message=Me[e],this.stack&&(Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0}),this.stack=Se(this.stack))},Ie.ErrnoError.prototype=new Error,Ie.ErrnoError.prototype.constructor=Ie.ErrnoError,[44].forEach((e=>{Ie.genericErrors[e]=new Ie.ErrnoError(e),Ie.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:()=>{Ie.ensureErrnoError(),Ie.nameTable=new Array(4096),Ie.mount(Re,{},"/"),Ie.createDefaultDirectories(),Ie.createDefaultDevices(),Ie.createSpecialDirectories(),Ie.filesystems={MEMFS:Re}},init:(e,t,n)=>{F(!Ie.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)"),Ie.init.initialized=!0,Ie.ensureErrnoError(),r.stdin=e||r.stdin,r.stdout=t||r.stdout,r.stderr=n||r.stderr,Ie.createStandardStreams()},quit:()=>{Ie.init.initialized=!1,wt();for(var e=0;e<Ie.streams.length;e++){var r=Ie.streams[e];r&&Ie.close(r)}},getMode:(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},findObject:(e,r)=>{var t=Ie.analyzePath(e,r);return t.exists?t.object:null},analyzePath:(e,r)=>{try{e=(n=Ie.lookupPath(e,{follow:!r})).path}catch(e){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=Ie.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=Ae.basename(e),n=Ie.lookupPath(e,{follow:!r}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(e){t.error=e.errno}return t},createPath:(e,r,t,n)=>{e="string"==typeof e?e:Ie.getPath(e);for(var o=r.split("/").reverse();o.length;){var i=o.pop();if(i){var a=Ae.join2(e,i);try{Ie.mkdir(a)}catch(e){}e=a}}return a},createFile:(e,r,t,n,o)=>{var i=Ae.join2("string"==typeof e?e:Ie.getPath(e),r),a=Ie.getMode(n,o);return Ie.create(i,a)},createDataFile:(e,r,t,n,o,i)=>{var a=r;e&&(e="string"==typeof e?e:Ie.getPath(e),a=r?Ae.join2(e,r):e);var s=Ie.getMode(n,o),l=Ie.create(a,s);if(t){if("string"==typeof t){for(var u=new Array(t.length),c=0,d=t.length;c<d;++c)u[c]=t.charCodeAt(c);t=u}Ie.chmod(l,146|s);var f=Ie.open(l,577);Ie.write(f,t,0,t.length,0,i),Ie.close(f),Ie.chmod(l,s)}return l},createDevice:(e,r,t,n)=>{var o=Ae.join2("string"==typeof e?e:Ie.getPath(e),r),i=Ie.getMode(!!t,!!n);Ie.createDevice.major||(Ie.createDevice.major=64);var a=Ie.makedev(Ie.createDevice.major++,0);return Ie.registerDevice(a,{open:e=>{e.seekable=!1},close:e=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(e,r,n,o,i)=>{for(var a=0,s=0;s<o;s++){var l;try{l=t()}catch(e){throw new Ie.ErrnoError(29)}if(void 0===l&&0===a)throw new Ie.ErrnoError(6);if(null==l)break;a++,r[n+s]=l}return a&&(e.node.timestamp=Date.now()),a},write:(e,r,t,o,i)=>{for(var a=0;a<o;a++)try{n(r[t+a])}catch(e){throw new Ie.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),a}}),Ie.mkdev(o,i,a)},forceLoadFile:e=>{if(e.isDevice||e.isFolder||e.link||e.contents)return!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(!d)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=pt(d(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new Ie.ErrnoError(29)}},createLazyFile:(e,r,t,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,i=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,a=1048576;o||(a=n);var s=this;s.setDataGetter((e=>{var r=e*a,o=(e+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[e]&&(s.chunks[e]=((e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==a&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):pt(o.responseText||"",!0)})(r,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,b("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!l)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new i;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:a}}else s={isDevice:!1,url:t};var u=Ie.createFile(e,r,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};return Object.keys(u.stream_ops).forEach((e=>{var r=u.stream_ops[e];c[e]=function(){return Ie.forceLoadFile(u),r.apply(null,arguments)}})),c.read=(e,r,t,n,o)=>{Ie.forceLoadFile(u);var i=e.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(F(a>=0),i.slice)for(var s=0;s<a;s++)r[t+s]=i[o+s];else for(s=0;s<a;s++)r[t+s]=i.get(o+s);return a},u.stream_ops=c,u},createPreloadedFile:(e,r,t,n,o,i,a,s,l,u)=>{var c=r?Fe.resolve(Ae.join2(e,r)):e,d=pe("cp "+c);function p(t){function f(t){u&&u(),s||Ie.createDataFile(e,r,t,n,o,l),i&&i(),he(d)}Browser.handledByPreloadPlugin(t,c,f,(()=>{a&&a(),he(d)}))||f(t)}me(d),"string"==typeof t?function(e,r,t,n){var o=n?"":pe("al "+e);f(e,(function(t){F(t,'Loading data file "'+e+'" failed (no arrayBuffer).'),r(new Uint8Array(t)),o&&he(o)}),(function(r){if(!t)throw'Loading data file "'+e+'" failed.';t()})),o&&me(o)}(t,(e=>p(e)),a):p(t)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,r,t)=>{r=r||(()=>{}),t=t||(()=>{});var n=Ie.indexedDB();try{var o=n.open(Ie.DB_NAME(),Ie.DB_VERSION)}catch(e){return t(e)}o.onupgradeneeded=()=>{b("creating db"),o.result.createObjectStore(Ie.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([Ie.DB_STORE_NAME],"readwrite"),i=n.objectStore(Ie.DB_STORE_NAME),a=0,s=0,l=e.length;function u(){0==s?r():t()}e.forEach((e=>{var r=i.put(Ie.analyzePath(e).object.contents,e);r.onsuccess=()=>{++a+s==l&&u()},r.onerror=()=>{s++,a+s==l&&u()}})),n.onerror=t},o.onerror=t},loadFilesFromDB:(e,r,t)=>{r=r||(()=>{}),t=t||(()=>{});var n=Ie.indexedDB();try{var o=n.open(Ie.DB_NAME(),Ie.DB_VERSION)}catch(e){return t(e)}o.onupgradeneeded=t,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([Ie.DB_STORE_NAME],"readonly")}catch(e){return void t(e)}var a=i.objectStore(Ie.DB_STORE_NAME),s=0,l=0,u=e.length;function c(){0==l?r():t()}e.forEach((e=>{var r=a.get(e);r.onsuccess=()=>{Ie.analyzePath(e).exists&&Ie.unlink(e),Ie.createDataFile(Ae.dirname(e),Ae.basename(e),r.result,!0,!0,!0),++s+l==u&&c()},r.onerror=()=>{l++,s+l==u&&c()}})),i.onerror=t},o.onerror=t},absolutePath:()=>{ge("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder:()=>{ge("FS.createFolder has been removed; use FS.mkdir instead")},createLink:()=>{ge("FS.createLink has been removed; use FS.symlink instead")},joinPath:()=>{ge("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc:()=>{ge("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath:()=>{ge("FS.standardizePath has been removed; use PATH.normalize instead")}},Le={DEFAULT_POLLMASK:5,calculateAt:function(e,r,t){if(Ae.isAbs(r))return r;var n;if(-100===e)n=Ie.cwd();else{var o=Ie.getStream(e);if(!o)throw new Ie.ErrnoError(8);n=o.path}if(0==r.length){if(!t)throw new Ie.ErrnoError(44);return n}return Ae.join2(n,r)},doStat:function(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&Ae.normalize(r)!==Ae.normalize(Ie.getPath(e.node)))return-54;throw e}return $[t>>2]=n.dev,$[t+4>>2]=0,$[t+8>>2]=n.ino,$[t+12>>2]=n.mode,$[t+16>>2]=n.nlink,$[t+20>>2]=n.uid,$[t+24>>2]=n.gid,$[t+28>>2]=n.rdev,$[t+32>>2]=0,Ee=[n.size>>>0,(ye=n.size,+Math.abs(ye)>=1?ye>0?(0|Math.min(+Math.floor(ye/4294967296),4294967295))>>>0:~~+Math.ceil((ye-+(~~ye>>>0))/4294967296)>>>0:0)],$[t+40>>2]=Ee[0],$[t+44>>2]=Ee[1],$[t+48>>2]=4096,$[t+52>>2]=n.blocks,$[t+56>>2]=n.atime.getTime()/1e3|0,$[t+60>>2]=0,$[t+64>>2]=n.mtime.getTime()/1e3|0,$[t+68>>2]=0,$[t+72>>2]=n.ctime.getTime()/1e3|0,$[t+76>>2]=0,Ee=[n.ino>>>0,(ye=n.ino,+Math.abs(ye)>=1?ye>0?(0|Math.min(+Math.floor(ye/4294967296),4294967295))>>>0:~~+Math.ceil((ye-+(~~ye>>>0))/4294967296)>>>0:0)],$[t+80>>2]=Ee[0],$[t+84>>2]=Ee[1],0},doMsync:function(e,r,t,n,o){var i=U.slice(e,e+t);Ie.msync(r,i,o,t,n)},doMknod:function(e,r,t){switch(61440&r){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return Ie.mknod(e,r,t),0},doReadlink:function(e,r,t){if(t<=0)return-28;var n=Ie.readlink(e),o=Math.min(t,I(n)),i=x[r+o];return N(n,r,t+1),x[r+o]=i,o},doAccess:function(e,r){if(-8&r)return-28;var t=Ie.lookupPath(e,{follow:!0}).node;if(!t)return-44;var n="";return 4&r&&(n+="r"),2&r&&(n+="w"),1&r&&(n+="x"),n&&Ie.nodePermissions(t,n)?-2:0},doReadv:function(e,r,t,n){for(var o=0,i=0;i<t;i++){var a=$[r>>2],s=$[r+4>>2];r+=8;var l=Ie.read(e,x,a,s,n);if(l<0)return-1;if(o+=l,l<s)break}return o},doWritev:function(e,r,t,n){for(var o=0,i=0;i<t;i++){var a=$[r>>2],s=$[r+4>>2];r+=8;var l=Ie.write(e,x,a,s,n);if(l<0)return-1;o+=l}return o},varargs:void 0,get:function(){return F(null!=Le.varargs),Le.varargs+=4,$[Le.varargs-4>>2]},getStr:function(e){return R(e)},getStreamFromFD:function(e){var r=Ie.getStream(e);if(!r)throw new Ie.ErrnoError(8);return r}};function xe(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}var Ue=void 0;function Be(e){for(var r="",t=e;U[t];)r+=Ue[U[t++]];return r}var je={},$e={},We={};function ze(e){if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=48&&r<=57?"_"+e:e}function He(e,r){return e=ze(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(r)}function Ge(e,r){var t=He(r,(function(e){this.name=r,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},t}var Ve=void 0;function Ye(e){throw new Ve(e)}var qe=void 0;function Xe(e){throw new qe(e)}function Ke(e,r,t){function n(r){var n=t(r);n.length!==e.length&&Xe("Mismatched type converter count");for(var o=0;o<e.length;++o)Je(e[o],n[o])}e.forEach((function(e){We[e]=r}));var o=new Array(r.length),i=[],a=0;r.forEach(((e,r)=>{$e.hasOwnProperty(e)?o[r]=$e[e]:(i.push(e),je.hasOwnProperty(e)||(je[e]=[]),je[e].push((()=>{o[r]=$e[e],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function Je(e,r){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=r.name;if(e||Ye('type "'+n+'" must have a positive integer typeid pointer'),$e.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;Ye("Cannot register type '"+n+"' twice")}if($e[e]=r,delete We[e],je.hasOwnProperty(e)){var o=je[e];delete je[e],o.forEach((e=>e()))}}function Qe(e){if(!(this instanceof wr))return!1;if(!(e instanceof wr))return!1;for(var r=this.$$.ptrType.registeredClass,t=this.$$.ptr,n=e.$$.ptrType.registeredClass,o=e.$$.ptr;r.baseClass;)t=r.upcast(t),r=r.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return r===n&&t===o}function Ze(e){Ye(e.$$.ptrType.registeredClass.name+" instance already deleted")}var er=!1;function rr(e){}function tr(e){e.count.value-=1,0===e.count.value&&function(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}(e)}function nr(e,r,t){if(r===t)return e;if(void 0===t.baseClass)return null;var n=nr(e,r,t.baseClass);return null===n?null:t.downcast(n)}var or={};function ir(){return Object.keys(dr).length}function ar(){var e=[];for(var r in dr)dr.hasOwnProperty(r)&&e.push(dr[r]);return e}var sr=[];function lr(){for(;sr.length;){var e=sr.pop();e.$$.deleteScheduled=!1,e.delete()}}var ur=void 0;function cr(e){ur=e,sr.length&&ur&&ur(lr)}var dr={};function fr(e,r){return r=function(e,r){for(void 0===r&&Ye("ptr should not be undefined");e.baseClass;)r=e.upcast(r),e=e.baseClass;return r}(e,r),dr[r]}function pr(e,r){return r.ptrType&&r.ptr||Xe("makeClassHandle requires ptr and ptrType"),!!r.smartPtrType!==!!r.smartPtr&&Xe("Both smartPtrType and smartPtr must be specified"),r.count={value:1},hr(Object.create(e,{$$:{value:r}}))}function mr(e){var r=this.getPointee(e);if(!r)return this.destructor(e),null;var t=fr(this.registeredClass,r);if(void 0!==t){if(0===t.$$.count.value)return t.$$.ptr=r,t.$$.smartPtr=e,t.clone();var n=t.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?pr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:r,smartPtrType:this,smartPtr:e}):pr(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var i,a=this.registeredClass.getActualType(r),s=or[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var l=nr(r,this.registeredClass,i.registeredClass);return null===l?o.call(this):this.isSmartPointer?pr(i.registeredClass.instancePrototype,{ptrType:i,ptr:l,smartPtrType:this,smartPtr:e}):pr(i.registeredClass.instancePrototype,{ptrType:i,ptr:l})}function hr(e){return"undefined"==typeof FinalizationRegistry?(hr=e=>e,e):(er=new FinalizationRegistry((e=>{console.warn(e.leakWarning.stack.replace(/^Error: /,"")),tr(e.$$)})),hr=e=>{var r=e.$$;if(!!r.smartPtr){var t={$$:r},n=r.ptrType.registeredClass;t.leakWarning=new Error("Embind found a leaked C++ instance "+n.name+" <0x"+r.ptr.toString(16)+">.\nWe'll free it automatically in this case, but this functionality is not reliable across various environments.\nMake sure to invoke .delete() manually once you're done with the instance instead.\nOriginally allocated"),"captureStackTrace"in Error&&Error.captureStackTrace(t.leakWarning,mr),er.register(e,t,e)}return e},rr=e=>er.unregister(e),hr(e))}function gr(){if(this.$$.ptr||Ze(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,r=hr(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return r.$$.count.value+=1,r.$$.deleteScheduled=!1,r}function vr(){this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ye("Object already scheduled for deletion"),rr(this),tr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function yr(){return!this.$$.ptr}function Er(){return this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ye("Object already scheduled for deletion"),sr.push(this),1===sr.length&&ur&&ur(lr),this.$$.deleteScheduled=!0,this}function wr(){}function br(e,r,t){if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||Ye("Function '"+t+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[r].overloadTable+")!"),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}}function _r(e,r,t,n,o,i,a,s){this.name=e,this.constructor=r,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function Tr(e,r,t){for(;r!==t;)r.upcast||Ye("Expected null or instance of "+t.name+", got an instance of "+r.name),e=r.upcast(e),r=r.baseClass;return e}function kr(e,r){if(null===r)return this.isReference&&Ye("null is not a valid "+this.name),0;r.$$||Ye('Cannot pass "'+qr(r)+'" as a '+this.name),r.$$.ptr||Ye("Cannot pass deleted object as a pointer of type "+this.name);var t=r.$$.ptrType.registeredClass;return Tr(r.$$.ptr,t,this.registeredClass)}function Sr(e,r){var t;if(null===r)return this.isReference&&Ye("null is not a valid "+this.name),this.isSmartPointer?(t=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,t),t):0;r.$$||Ye('Cannot pass "'+qr(r)+'" as a '+this.name),r.$$.ptr||Ye("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&r.$$.ptrType.isConst&&Ye("Cannot convert argument of type "+(r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name)+" to parameter type "+this.name);var n=r.$$.ptrType.registeredClass;if(t=Tr(r.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===r.$$.smartPtr&&Ye("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:r.$$.smartPtrType===this?t=r.$$.smartPtr:Ye("Cannot convert argument of type "+(r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:t=r.$$.smartPtr;break;case 2:if(r.$$.smartPtrType===this)t=r.$$.smartPtr;else{var o=r.clone();t=this.rawShare(t,Yr.toHandle((function(){o.delete()}))),null!==e&&e.push(this.rawDestructor,t)}break;default:Ye("Unsupporting sharing policy")}return t}function Cr(e,r){if(null===r)return this.isReference&&Ye("null is not a valid "+this.name),0;r.$$||Ye('Cannot pass "'+qr(r)+'" as a '+this.name),r.$$.ptr||Ye("Cannot pass deleted object as a pointer of type "+this.name),r.$$.ptrType.isConst&&Ye("Cannot convert argument of type "+r.$$.ptrType.name+" to parameter type "+this.name);var t=r.$$.ptrType.registeredClass;return Tr(r.$$.ptr,t,this.registeredClass)}function Pr(e){return this.fromWireType(W[e>>2])}function Ar(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Fr(e){this.rawDestructor&&this.rawDestructor(e)}function Dr(e){null!==e&&e.delete()}function Or(e,r,t,n,o,i,a,s,l,u,c){this.name=e,this.registeredClass=r,this.isReference=t,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=u,this.rawDestructor=c,o||void 0!==r.baseClass?this.toWireType=Sr:n?(this.toWireType=kr,this.destructorFunction=null):(this.toWireType=Cr,this.destructorFunction=null)}function Rr(e,t,n){return e.includes("j")?function(e,t,n){F("dynCall_"+e in r,"bad function pointer type - no table for sig '"+e+"'"),n&&n.length?F(n.length===e.substring(1).replace(/j/g,"--").length):F(1==e.length);var o=r["dynCall_"+e];return n&&n.length?o.apply(null,[t].concat(n)):o.call(null,t)}(e,t,n):(F(Ce(t),"missing table entry in dynCall: "+t),Ce(t).apply(null,n))}function Mr(e,r){var t=(e=Be(e)).includes("j")?function(e,r){F(e.includes("j"),"getDynCaller should only be called with i64 sigs");var t=[];return function(){return t.length=0,Object.assign(t,arguments),Rr(e,r,t)}}(e,r):Ce(r);return"function"!=typeof t&&Ye("unknown function pointer with signature "+e+": "+r),t}var Nr=void 0;function Ir(e){var r=Et(e),t=Be(r);return ht(r),t}function Lr(e,r){var t=[],n={};throw r.forEach((function e(r){n[r]||$e[r]||(We[r]?We[r].forEach(e):(t.push(r),n[r]=!0))})),new Nr(e+": "+t.map(Ir).join([", "]))}function xr(e,r){for(var t=[],n=0;n<e;n++)t.push($[(r>>2)+n]);return t}function Ur(e){for(;e.length;){var r=e.pop();e.pop()(r)}}function Br(e,r){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var t=He(e.name||"unknownFunctionName",(function(){}));t.prototype=e.prototype;var n=new t,o=e.apply(n,r);return o instanceof Object?o:n}function jr(e,r,t,n,o){var i=r.length;i<2&&Ye("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==r[1]&&null!==t,s=!1,l=1;l<r.length;++l)if(null!==r[l]&&void 0===r[l].destructorFunction){s=!0;break}var u="void"!==r[0].name,c="",d="";for(l=0;l<i-2;++l)c+=(0!==l?", ":"")+"arg"+l,d+=(0!==l?", ":"")+"arg"+l+"Wired";var f="return function "+ze(e)+"("+c+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+e+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(f+="var destructors = [];\n");var p=s?"destructors":"null",m=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],h=[Ye,n,o,Ur,r[0],r[1]];a&&(f+="var thisWired = classParam.toWireType("+p+", this);\n");for(l=0;l<i-2;++l)f+="var arg"+l+"Wired = argType"+l+".toWireType("+p+", arg"+l+"); // "+r[l+2].name+"\n",m.push("argType"+l),h.push(r[l+2]);if(a&&(d="thisWired"+(d.length>0?", ":"")+d),f+=(u?"var rv = ":"")+"invoker(fn"+(d.length>0?", ":"")+d+");\n",s)f+="runDestructors(destructors);\n";else for(l=a?1:2;l<r.length;++l){var g=1===l?"thisWired":"arg"+(l-2)+"Wired";null!==r[l].destructorFunction&&(f+=g+"_dtor("+g+"); // "+r[l].name+"\n",m.push(g+"_dtor"),h.push(r[l].destructorFunction))}return u&&(f+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),f+="}\n",m.push(f),Br(Function,m).apply(null,h)}function $r(e,r,t){return e instanceof Object||Ye(t+' with invalid "this": '+e),e instanceof r.registeredClass.constructor||Ye(t+' incompatible with "this" of type '+e.constructor.name),e.$$.ptr||Ye("cannot call emscripten binding method "+t+" on deleted object"),Tr(e.$$.ptr,e.$$.ptrType.registeredClass,r.registeredClass)}var Wr=[],zr=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Hr(e){e>4&&0==--zr[e].refcount&&(zr[e]=void 0,Wr.push(e))}function Gr(){for(var e=0,r=5;r<zr.length;++r)void 0!==zr[r]&&++e;return e}function Vr(){for(var e=5;e<zr.length;++e)if(void 0!==zr[e])return zr[e];return null}var Yr={toValue:e=>(e||Ye("Cannot use deleted val. handle = "+e),zr[e].value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var r=Wr.length?Wr.pop():zr.length;return zr[r]={refcount:1,value:e},r}}};function qr(e){if(null===e)return"null";var r=typeof e;return"object"===r||"array"===r||"function"===r?e.toString():""+e}function Xr(e,r){switch(r){case 2:return function(e){return this.fromWireType(z[e>>2])};case 3:return function(e){return this.fromWireType(H[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function Kr(e,r,t){switch(r){case 0:return t?function(e){return x[e]}:function(e){return U[e]};case 1:return t?function(e){return B[e>>1]}:function(e){return j[e>>1]};case 2:return t?function(e){return $[e>>2]}:function(e){return W[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function Jr(e,r){var t=$e[e];return void 0===t&&Ye(r+" has unknown type "+Ir(e)),t}var Qr={};var Zr=[];var et=[];function rt(e,r){return F(r===(0|r)),(e>>>0)+4294967296*r}function tt(e,r){if(e<=0)return e;var t=r<=32?Math.abs(1<<r-1):Math.pow(2,r-1);return e>=t&&(r<=32||e>t)&&(e=-2*t+e),e}function nt(e,r){return e>=0?e:r<=32?2*Math.abs(1<<r-1)+e:Math.pow(2,r)+e}function ot(e,r){F(0==(3&r));var t=e,n=r;function o(e){var r;return n=function(e,r){return"double"===r||"i64"===r?7&e&&(F(4==(7&e)),e+=4):F(0==(3&e)),e}(n,e),"double"===e?(r=Number(H[n>>3]),n+=8):"i64"==e?(r=[$[n>>2],$[n+4>>2]],n+=8):(F(0==(3&n)),e="i32",r=$[n>>2],n+=4),r}for(var i,a,s,l,u,c,d=[];;){var f=t;if(0===(i=x[t>>0]))break;if(a=x[t+1>>0],37==i){var p=!1,m=!1,h=!1,g=!1,v=!1;e:for(;;){switch(a){case 43:p=!0;break;case 45:m=!0;break;case 35:h=!0;break;case 48:if(g)break e;g=!0;break;case 32:v=!0;break;default:break e}t++,a=x[t+1>>0]}var y=0;if(42==a)y=o("i32"),t++,a=x[t+1>>0];else for(;a>=48&&a<=57;)y=10*y+(a-48),t++,a=x[t+1>>0];var E,w=!1,b=-1;if(46==a){if(b=0,w=!0,t++,42==(a=x[t+1>>0]))b=o("i32"),t++;else for(;;){var _=x[t+1>>0];if(_<48||_>57)break;b=10*b+(_-48),t++}a=x[t+1>>0]}switch(b<0&&(b=6,w=!1),String.fromCharCode(a)){case"h":104==x[t+2>>0]?(t++,E=1):E=2;break;case"l":108==x[t+2>>0]?(t++,E=8):E=4;break;case"L":case"q":case"j":E=8;break;case"z":case"t":case"I":E=4;break;default:E=null}switch(E&&t++,a=x[t+1>>0],String.fromCharCode(a)){case"d":case"i":case"u":case"o":case"x":case"X":case"p":var T=100==a||105==a;if(s=o("i"+8*(E=E||4)),8==E&&(s=117==a?(u=s[0],c=s[1],(u>>>0)+4294967296*(c>>>0)):rt(s[0],s[1])),E<=4)s=(T?tt:nt)(s&Math.pow(256,E)-1,8*E);var k=Math.abs(s),S="";if(100==a||105==a)A=tt(s,8*E).toString(10);else if(117==a)A=nt(s,8*E).toString(10),s=Math.abs(s);else if(111==a)A=(h?"0":"")+k.toString(8);else if(120==a||88==a){if(S=h&&0!=s?"0x":"",s<0){s=-s,A=(k-1).toString(16);for(var C=[],P=0;P<A.length;P++)C.push((15-parseInt(A[P],16)).toString(16));for(A=C.join("");A.length<2*E;)A="f"+A}else A=k.toString(16);88==a&&(S=S.toUpperCase(),A=A.toUpperCase())}else 112==a&&(0===k?A="(nil)":(S="0x",A=k.toString(16)));if(w)for(;A.length<b;)A="0"+A;for(s>=0&&(p?S="+"+S:v&&(S=" "+S)),"-"==A.charAt(0)&&(S="-"+S,A=A.substr(1));S.length+A.length<y;)m?A+=" ":g?A="0"+A:S=" "+S;(A=S+A).split("").forEach((function(e){d.push(e.charCodeAt(0))}));break;case"f":case"F":case"e":case"E":case"g":case"G":var A;if(s=o("double"),isNaN(s))A="nan",g=!1;else if(isFinite(s)){var D=!1,O=Math.min(b,20);if(103==a||71==a){D=!0,b=b||1;var R=parseInt(s.toExponential(O).split("e")[1],10);b>R&&R>=-4?(a=(103==a?"f":"F").charCodeAt(0),b-=R+1):(a=(103==a?"e":"E").charCodeAt(0),b--),O=Math.min(b,20)}101==a||69==a?(A=s.toExponential(O),/[eE][-+]\d$/.test(A)&&(A=A.slice(0,-1)+"0"+A.slice(-1))):102!=a&&70!=a||(A=s.toFixed(O),0===s&&((l=s)<0||0===l&&1/l==-1/0)&&(A="-"+A));var M=A.split("e");if(D&&!h)for(;M[0].length>1&&M[0].includes(".")&&("0"==M[0].slice(-1)||"."==M[0].slice(-1));)M[0]=M[0].slice(0,-1);else for(h&&-1==A.indexOf(".")&&(M[0]+=".");b>O++;)M[0]+="0";A=M[0]+(M.length>1?"e"+M[1]:""),69==a&&(A=A.toUpperCase()),s>=0&&(p?A="+"+A:v&&(A=" "+A))}else A=(s<0?"-":"")+"inf",g=!1;for(;A.length<y;)m?A+=" ":A=!g||"-"!=A[0]&&"+"!=A[0]?(g?"0":" ")+A:A[0]+"0"+A.slice(1);a<97&&(A=A.toUpperCase()),A.split("").forEach((function(e){d.push(e.charCodeAt(0))}));break;case"s":var N=o("i8*"),I=N?vt(N):"(null)".length;if(w&&(I=Math.min(I,b)),!m)for(;I<y--;)d.push(32);if(N)for(P=0;P<I;P++)d.push(U[N++>>0]);else d=d.concat(pt("(null)".substr(0,I),!0));if(m)for(;I<y--;)d.push(32);break;case"c":for(m&&d.push(o("i8"));--y>0;)d.push(32);m||d.push(o("i8"));break;case"n":var L=o("i32*");$[L>>2]=d.length;break;case"%":d.push(i);break;default:for(P=f;P<t+2;P++)d.push(x[P>>0])}t+=2}else d.push(i),t+=1}return d}function it(e){if(!e||!e.callee||!e.callee.name)return[null,"",""];e.callee.toString();var r=e.callee.name,t="(",n=!0;for(var o in e){var i=e[o];n||(t+=", "),n=!1,t+="number"==typeof i||"string"==typeof i?i:"("+typeof i+")"}t+=")";var a=e.callee.caller;return n&&(t=""),[e=a?a.arguments:[],r,t]}function at(e,r){24&e&&(r=r.replace(/\s+$/,""),r+=(r.length>0?"\n":"")+function(e){var r=Pe(),t=r.lastIndexOf("_emscripten_log"),n=r.lastIndexOf("_emscripten_get_callstack"),o=r.indexOf("\n",Math.max(t,n))+1;r=r.slice(o),32&e&&T("EM_LOG_DEMANGLE is deprecated; ignoring"),8&e&&"undefined"==typeof emscripten_source_map&&(T('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'),e^=8,e|=16);var i=null;if(128&e)for(i=it(arguments);i[1].includes("_emscripten_");)i=it(i[0]);var a=r.split("\n");r="";var s=new RegExp("\\s*(.*?)@(.*?):([0-9]+):([0-9]+)"),l=new RegExp("\\s*(.*?)@(.*):(.*)(:(.*))?"),u=new RegExp("\\s*at (.*?) \\((.*):(.*):(.*)\\)");for(var c in a){var d=a[c],f="",p="",m=0,h=0,g=u.exec(d);if(g&&5==g.length)f=g[1],p=g[2],m=g[3],h=g[4];else{if((g=s.exec(d))||(g=l.exec(d)),!(g&&g.length>=4)){r+=d+"\n";continue}f=g[1],p=g[2],m=g[3],h=0|g[4]}var v=!1;if(8&e){var y=emscripten_source_map.originalPositionFor({line:m,column:h});(v=y&&y.source)&&(64&e&&(y.source=y.source.substring(y.source.replace(/\\/g,"/").lastIndexOf("/")+1)),r+=" at "+f+" ("+y.source+":"+y.line+":"+y.column+")\n")}(16&e||!v)&&(64&e&&(p=p.substring(p.replace(/\\/g,"/").lastIndexOf("/")+1)),r+=(v?" = "+f:" at "+f)+" ("+p+":"+m+":"+h+")\n"),128&e&&i[0]&&(i[1]==f&&i[2].length>0&&(r=r.replace(/\s+$/,""),r+=" with values: "+i[1]+i[2]+"\n"),i=it(i[0]))}return r.replace(/\s+$/,"")}(e)),1&e?4&e?console.error(r):2&e?console.warn(r):512&e?console.info(r):256&e?console.debug(r):console.log(r):6&e?_(r):b(r)}function st(e){try{return w.grow(e-L.byteLength+65535>>>16),Z(w.buffer),1}catch(r){_("emscripten_realloc_buffer: Attempted to grow heap from "+L.byteLength+" bytes to "+e+" bytes, but got error: "+r)}}var lt={};function ut(){if(!ut.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:n||"./this.program"};for(var r in lt)void 0===lt[r]?delete e[r]:e[r]=lt[r];var t=[];for(var r in e)t.push(r+"="+e[r]);ut.strings=t}return ut.strings}var ct=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Ie.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},dt=365,ft=146;function pt(e,r,t){var n=t>0?t:I(e)+1,o=new Array(n),i=M(e,o,0,o.length);return r&&(o.length=i),o}Object.defineProperties(ct.prototype,{read:{get:function(){return(this.mode&dt)===dt},set:function(e){e?this.mode|=dt:this.mode&=-366}},write:{get:function(){return(this.mode&ft)===ft},set:function(e){e?this.mode|=ft:this.mode&=-147}},isFolder:{get:function(){return Ie.isDir(this.mode)}},isDevice:{get:function(){return Ie.isChrdev(this.mode)}}}),Ie.FSNode=ct,Ie.staticInit(),Ne={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},function(){for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);Ue=e}(),Ve=r.BindingError=Ge(Error,"BindingError"),qe=r.InternalError=Ge(Error,"InternalError"),wr.prototype.isAliasOf=Qe,wr.prototype.clone=gr,wr.prototype.delete=vr,wr.prototype.isDeleted=yr,wr.prototype.deleteLater=Er,r.getInheritedInstanceCount=ir,r.getLiveInheritedInstances=ar,r.flushPendingDeletes=lr,r.setDelayFunction=cr,Or.prototype.getPointee=Ar,Or.prototype.destructor=Fr,Or.prototype.argPackAdvance=8,Or.prototype.readValueFromPointer=Pr,Or.prototype.deleteObject=Dr,Or.prototype.fromWireType=mr,Nr=r.UnboundTypeError=Ge(Error,"UnboundTypeError"),r.count_emval_handles=Gr,r.get_first_emval=Vr;var mt={__syscall_fcntl64:function(e,r,t){Le.varargs=t;try{var n=Le.getStreamFromFD(e);switch(r){case 0:return(o=Le.get())<0?-28:Ie.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=Le.get();return n.flags|=o,0;case 5:o=Le.get();return B[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return i=28,$[yt()>>2]=i,-1}}catch(e){if(void 0===Ie||!(e instanceof Ie.ErrnoError))throw e;return-e.errno}var i},__syscall_openat:function(e,r,t,n){Le.varargs=n;try{r=Le.getStr(r),r=Le.calculateAt(e,r);var o=n?Le.get():0;return Ie.open(r,t,o).fd}catch(e){if(void 0===Ie||!(e instanceof Ie.ErrnoError))throw e;return-e.errno}},_embind_register_bigint:function(e,r,t,n,o){},_embind_register_bool:function(e,r,t,n,o){var i=xe(t);Je(e,{name:r=Be(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?n:o},argPackAdvance:8,readValueFromPointer:function(e){var n;if(1===t)n=x;else if(2===t)n=B;else{if(4!==t)throw new TypeError("Unknown boolean type size: "+r);n=$}return this.fromWireType(n[e>>i])},destructorFunction:null})},_embind_register_class:function(e,t,n,o,i,a,s,l,u,c,d,f,p){d=Be(d),a=Mr(i,a),l&&(l=Mr(s,l)),c&&(c=Mr(u,c)),p=Mr(f,p);var m=ze(d);!function(e,t,n){r.hasOwnProperty(e)?((void 0===n||void 0!==r[e].overloadTable&&void 0!==r[e].overloadTable[n])&&Ye("Cannot register public name '"+e+"' twice"),br(r,e,e),r.hasOwnProperty(n)&&Ye("Cannot register multiple overloads of a function with the same number of arguments ("+n+")!"),r[e].overloadTable[n]=t):(r[e]=t,void 0!==n&&(r[e].numArguments=n))}(m,(function(){Lr("Cannot construct "+d+" due to unbound types",[o])})),Ke([e,t,n],o?[o]:[],(function(t){var n,i;t=t[0],i=o?(n=t.registeredClass).instancePrototype:wr.prototype;var s=He(m,(function(){if(Object.getPrototypeOf(this)!==u)throw new Ve("Use 'new' to construct "+d);if(void 0===f.constructor_body)throw new Ve(d+" has no accessible constructor");var e=f.constructor_body[arguments.length];if(void 0===e)throw new Ve("Tried to invoke ctor of "+d+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(f.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),u=Object.create(i,{constructor:{value:s}});s.prototype=u;var f=new _r(d,s,u,p,n,a,l,c),h=new Or(d,f,!0,!1,!1),g=new Or(d+"*",f,!1,!1,!1),v=new Or(d+" const*",f,!1,!0,!1);return or[e]={pointerType:g,constPointerType:v},function(e,t,n){r.hasOwnProperty(e)||Xe("Replacing nonexistant public symbol"),void 0!==r[e].overloadTable&&void 0!==n?r[e].overloadTable[n]=t:(r[e]=t,r[e].argCount=n)}(m,s),[h,g,v]}))},_embind_register_class_constructor:function(e,r,t,n,o,i){F(r>0);var a=xr(r,t);o=Mr(n,o),Ke([],[e],(function(e){var t="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[r-1])throw new Ve("Cannot register multiple constructors with identical number of parameters ("+(r-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[r-1]=()=>{Lr("Cannot construct "+e.name+" due to unbound types",a)},Ke([],a,(function(n){return n.splice(1,0,null),e.registeredClass.constructor_body[r-1]=jr(t,n,null,o,i),[]})),[]}))},_embind_register_class_function:function(e,r,t,n,o,i,a,s){var l=xr(t,n);r=Be(r),i=Mr(o,i),Ke([],[e],(function(e){var n=(e=e[0]).name+"."+r;function o(){Lr("Cannot call "+n+" due to unbound types",l)}r.startsWith("@@")&&(r=Symbol[r.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(r);var u=e.registeredClass.instancePrototype,c=u[r];return void 0===c||void 0===c.overloadTable&&c.className!==e.name&&c.argCount===t-2?(o.argCount=t-2,o.className=e.name,u[r]=o):(br(u,r,n),u[r].overloadTable[t-2]=o),Ke([],l,(function(o){var s=jr(n,o,e,i,a);return void 0===u[r].overloadTable?(s.argCount=t-2,u[r]=s):u[r].overloadTable[t-2]=s,[]})),[]}))},_embind_register_class_property:function(e,r,t,n,o,i,a,s,l,u){r=Be(r),o=Mr(n,o),Ke([],[e],(function(e){var n=(e=e[0]).name+"."+r,c={get:function(){Lr("Cannot access "+n+" due to unbound types",[t,a])},enumerable:!0,configurable:!0};return c.set=l?()=>{Lr("Cannot access "+n+" due to unbound types",[t,a])}:e=>{Ye(n+" is a read-only property")},Object.defineProperty(e.registeredClass.instancePrototype,r,c),Ke([],l?[t,a]:[t],(function(t){var a=t[0],c={get:function(){var r=$r(this,e,n+" getter");return a.fromWireType(o(i,r))},enumerable:!0};if(l){l=Mr(s,l);var d=t[1];c.set=function(r){var t=$r(this,e,n+" setter"),o=[];l(u,t,d.toWireType(o,r)),Ur(o)}}return Object.defineProperty(e.registeredClass.instancePrototype,r,c),[]})),[]}))},_embind_register_emval:function(e,r){Je(e,{name:r=Be(r),fromWireType:function(e){var r=Yr.toValue(e);return Hr(e),r},toWireType:function(e,r){return Yr.toHandle(r)},argPackAdvance:8,readValueFromPointer:Pr,destructorFunction:null})},_embind_register_float:function(e,r,t){var n=xe(t);Je(e,{name:r=Be(r),fromWireType:function(e){return e},toWireType:function(e,r){if("number"!=typeof r&&"boolean"!=typeof r)throw new TypeError('Cannot convert "'+qr(r)+'" to '+this.name);return r},argPackAdvance:8,readValueFromPointer:Xr(r,n),destructorFunction:null})},_embind_register_integer:function(e,r,t,n,o){r=Be(r),-1===o&&(o=4294967295);var i=xe(t),a=e=>e;if(0===n){var s=32-8*t;a=e=>e<<s>>>s}var l=r.includes("unsigned"),u=(e,t)=>{if("number"!=typeof e&&"boolean"!=typeof e)throw new TypeError('Cannot convert "'+qr(e)+'" to '+t);if(e<n||e>o)throw new TypeError('Passing a number "'+qr(e)+'" from JS side to C/C++ side to an argument of type "'+r+'", which is outside the valid range ['+n+", "+o+"]!")};Je(e,{name:r,fromWireType:a,toWireType:l?function(e,r){return u(r,this.name),r>>>0}:function(e,r){return u(r,this.name),r},argPackAdvance:8,readValueFromPointer:Kr(r,i,0!==n),destructorFunction:null})},_embind_register_memory_view:function(e,r,t){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=W,t=r[e>>=2],o=r[e+1];return new n(L,o,t)}Je(e,{name:t=Be(t),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},_embind_register_std_string:function(e,r){var t="std::string"===(r=Be(r));Je(e,{name:r,fromWireType:function(e){var r,n=W[e>>2];if(t)for(var o=e+4,i=0;i<=n;++i){var a=e+4+i;if(i==n||0==U[a]){var s=R(o,a-o);void 0===r?r=s:(r+=String.fromCharCode(0),r+=s),o=a+1}}else{var l=new Array(n);for(i=0;i<n;++i)l[i]=String.fromCharCode(U[e+4+i]);r=l.join("")}return ht(e),r},toWireType:function(e,r){r instanceof ArrayBuffer&&(r=new Uint8Array(r));var n="string"==typeof r;n||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||Ye("Cannot pass non-string to std::string");var o=(t&&n?()=>I(r):()=>r.length)(),i=gt(4+o+1);if(W[i>>2]=o,t&&n)N(r,i+4,o+1);else if(n)for(var a=0;a<o;++a){var s=r.charCodeAt(a);s>255&&(ht(i),Ye("String has UTF-16 code units that do not fit in 8 bits")),U[i+4+a]=s}else for(a=0;a<o;++a)U[i+4+a]=r[a];return null!==e&&e.push(ht,i),i},argPackAdvance:8,readValueFromPointer:Pr,destructorFunction:function(e){ht(e)}})},_embind_register_std_wstring:function(e,r,t){var n,o,i,a,s;t=Be(t),2===r?(n=V,o=Y,a=q,i=()=>j,s=1):4===r&&(n=X,o=K,a=J,i=()=>W,s=2),Je(e,{name:t,fromWireType:function(e){for(var t,o=W[e>>2],a=i(),l=e+4,u=0;u<=o;++u){var c=e+4+u*r;if(u==o||0==a[c>>s]){var d=n(l,c-l);void 0===t?t=d:(t+=String.fromCharCode(0),t+=d),l=c+r}}return ht(e),t},toWireType:function(e,n){"string"!=typeof n&&Ye("Cannot pass non-string to C++ string type "+t);var i=a(n),l=gt(4+i+r);return W[l>>2]=i>>s,o(n,l+4,i+r),null!==e&&e.push(ht,l),l},argPackAdvance:8,readValueFromPointer:Pr,destructorFunction:function(e){ht(e)}})},_embind_register_void:function(e,r){Je(e,{isVoid:!0,name:r=Be(r),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,r){}})},_emscripten_date_now:function(){return Date.now()},_emval_as:function(e,r,t){e=Yr.toValue(e),r=Jr(r,"emval::as");var n=[],o=Yr.toHandle(n);return $[t>>2]=o,r.toWireType(n,e)},_emval_call_void_method:function(e,r,t,n){var o,i;(e=Zr[e])(r=Yr.toValue(r),t=void 0===(i=Qr[o=t])?Be(o):i,null,n)},_emval_decref:Hr,_emval_get_method_caller:function(e,r){var t=function(e,r){for(var t=new Array(e),n=0;n<e;++n)t[n]=Jr($[(r>>2)+n],"parameter "+n);return t}(e,r),n=t[0],o=n.name+"_$"+t.slice(1).map((function(e){return e.name})).join("_")+"$",i=et[o];if(void 0!==i)return i;for(var a=["retType"],s=[n],l="",u=0;u<e-1;++u)l+=(0!==u?", ":"")+"arg"+u,a.push("argType"+u),s.push(t[1+u]);var c="return function "+ze("methodCaller_"+o)+"(handle, name, destructors, args) {\n",d=0;for(u=0;u<e-1;++u)c+=" var arg"+u+" = argType"+u+".readValueFromPointer(args"+(d?"+"+d:"")+");\n",d+=t[u+1].argPackAdvance;for(c+=" var rv = handle[name]("+l+");\n",u=0;u<e-1;++u)t[u+1].deleteObject&&(c+=" argType"+u+".deleteObject(arg"+u+");\n");n.isVoid||(c+=" return retType.toWireType(destructors, rv);\n"),c+="};\n",a.push(c);var f,p,m=Br(Function,a).apply(null,s);return f=m,p=Zr.length,Zr.push(f),i=p,et[o]=i,i},_emval_incref:function(e){e>4&&(zr[e].refcount+=1)},_emval_run_destructors:function(e){Ur(Yr.toValue(e)),Hr(e)},_emval_take_value:function(e,r){var t=(e=Jr(e,"_emval_take_value")).readValueFromPointer(r);return Yr.toHandle(t)},_gmtime_js:function(e,r){var t=new Date(1e3*$[e>>2]);$[r>>2]=t.getUTCSeconds(),$[r+4>>2]=t.getUTCMinutes(),$[r+8>>2]=t.getUTCHours(),$[r+12>>2]=t.getUTCDate(),$[r+16>>2]=t.getUTCMonth(),$[r+20>>2]=t.getUTCFullYear()-1900,$[r+24>>2]=t.getUTCDay();var n=Date.UTC(t.getUTCFullYear(),0,1,0,0,0,0),o=(t.getTime()-n)/864e5|0;$[r+28>>2]=o},_localtime_js:function(e,r){var t=new Date(1e3*$[e>>2]);$[r>>2]=t.getSeconds(),$[r+4>>2]=t.getMinutes(),$[r+8>>2]=t.getHours(),$[r+12>>2]=t.getDate(),$[r+16>>2]=t.getMonth(),$[r+20>>2]=t.getFullYear()-1900,$[r+24>>2]=t.getDay();var n=new Date(t.getFullYear(),0,1),o=(t.getTime()-n.getTime())/864e5|0;$[r+28>>2]=o,$[r+36>>2]=-60*t.getTimezoneOffset();var i=new Date(t.getFullYear(),6,1).getTimezoneOffset(),a=n.getTimezoneOffset(),s=0|(i!=a&&t.getTimezoneOffset()==Math.min(a,i));$[r+32>>2]=s},_mktime_js:function(e){var r=new Date($[e+20>>2]+1900,$[e+16>>2],$[e+12>>2],$[e+8>>2],$[e+4>>2],$[e>>2],0),t=$[e+32>>2],n=r.getTimezoneOffset(),o=new Date(r.getFullYear(),0,1),i=new Date(r.getFullYear(),6,1).getTimezoneOffset(),a=o.getTimezoneOffset(),s=Math.min(a,i);if(t<0)$[e+32>>2]=Number(i!=a&&s==n);else if(t>0!=(s==n)){var l=Math.max(a,i),u=t>0?s:l;r.setTime(r.getTime()+6e4*(u-n))}$[e+24>>2]=r.getDay();var c=(r.getTime()-o.getTime())/864e5|0;return $[e+28>>2]=c,$[e>>2]=r.getSeconds(),$[e+4>>2]=r.getMinutes(),$[e+8>>2]=r.getHours(),$[e+12>>2]=r.getDate(),$[e+16>>2]=r.getMonth(),r.getTime()/1e3|0},_tzset_js:function e(r,t,n){e.called||(e.called=!0,function(e,r,t){var n=(new Date).getFullYear(),o=new Date(n,0,1),i=new Date(n,6,1),a=o.getTimezoneOffset(),s=i.getTimezoneOffset(),l=Math.max(a,s);function u(e){var r=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return r?r[1]:"GMT"}$[e>>2]=60*l,$[r>>2]=Number(a!=s);var c=u(o),d=u(i),f=Q(c),p=Q(d);s<a?($[t>>2]=f,$[t+4>>2]=p):($[t>>2]=p,$[t+4>>2]=f)}(r,t,n))},abort:function(){ge("native code called abort()")},emscripten_log:function(e,r,t){at(e,O(ot(r,t),0))},emscripten_resize_heap:function(e){var r=U.length;F((e>>>=0)>r);var t,n,o=2147483648;if(e>o)return _("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is "+"2147483648 bytes!"),!1;for(var i=1;i<=4;i*=2){var a=r*(1+.2/i);a=Math.min(a,e+100663296);var s=Math.min(o,(t=Math.max(e,a))+((n=65536)-t%n)%n);if(st(s))return!0}return _("Failed to grow the heap from "+r+" bytes to "+s+" bytes, not enough memory!"),!1},environ_get:function(e,r){var t=0;return ut().forEach((function(n,o){var i=r+t;$[e+4*o>>2]=i,function(e,r,t){for(var n=0;n<e.length;++n)F(e.charCodeAt(n)===(255&e.charCodeAt(n))),x[r++>>0]=e.charCodeAt(n);t||(x[r>>0]=0)}(n,i),t+=n.length+1})),0},environ_sizes_get:function(e,r){var t=ut();$[e>>2]=t.length;var n=0;return t.forEach((function(e){n+=e.length+1})),$[r>>2]=n,0},fd_close:function(e){try{var r=Le.getStreamFromFD(e);return Ie.close(r),0}catch(e){if(void 0===Ie||!(e instanceof Ie.ErrnoError))throw e;return e.errno}},fd_fdstat_get:function(e,r){try{var t=Le.getStreamFromFD(e),n=t.tty?2:Ie.isDir(t.mode)?3:Ie.isLink(t.mode)?7:4;return x[r>>0]=n,0}catch(e){if(void 0===Ie||!(e instanceof Ie.ErrnoError))throw e;return e.errno}},fd_read:function(e,r,t,n){try{var o=Le.getStreamFromFD(e),i=Le.doReadv(o,r,t);return $[n>>2]=i,0}catch(e){if(void 0===Ie||!(e instanceof Ie.ErrnoError))throw e;return e.errno}},fd_seek:function(e,r,t,n,o){try{var i=Le.getStreamFromFD(e),a=4294967296*t+(r>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(Ie.llseek(i,a,n),Ee=[i.position>>>0,(ye=i.position,+Math.abs(ye)>=1?ye>0?(0|Math.min(+Math.floor(ye/4294967296),4294967295))>>>0:~~+Math.ceil((ye-+(~~ye>>>0))/4294967296)>>>0:0)],$[o>>2]=Ee[0],$[o+4>>2]=Ee[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(e){if(void 0===Ie||!(e instanceof Ie.ErrnoError))throw e;return e.errno}},fd_write:function(e,r,t,n){try{var o=Le.getStreamFromFD(e),i=Le.doWritev(o,r,t);return $[n>>2]=i,0}catch(e){if(void 0===Ie||!(e instanceof Ie.ErrnoError))throw e;return e.errno}},setTempRet0:function(e){}};!function(){var e={env:mt,wasi_snapshot_preview1:mt};function t(e,t){var n,o=e.exports;r.asm=o,F(w=r.asm.memory,"memory not found in wasm exports"),Z(w.buffer),F(re=r.asm.__indirect_function_table,"table not found in wasm exports"),n=r.asm.__wasm_call_ctors,ae.unshift(n),he("wasm-instantiate")}me("wasm-instantiate");var n=r;function o(e){F(r===n,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),n=null,t(e.instance)}function i(r){return function(){if(!E&&(s||l)){if("function"==typeof fetch&&!be(ve))return fetch(ve,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+ve+"'";return e.arrayBuffer()})).catch((function(){return Te(ve)}));if(f)return new Promise((function(e,r){f(ve,(function(r){e(new Uint8Array(r))}),r)}))}return Promise.resolve().then((function(){return Te(ve)}))}().then((function(r){return WebAssembly.instantiate(r,e)})).then((function(e){return e})).then(r,(function(e){_("failed to asynchronously prepare wasm: "+e),be(ve)&&_("warning: Loading from a file URI ("+ve+") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing"),ge(e)}))}if(r.instantiateWasm)try{return r.instantiateWasm(e,t)}catch(e){return _("Module.instantiateWasm callback failed with error: "+e),!1}E||"function"!=typeof WebAssembly.instantiateStreaming||we(ve)||be(ve)||"function"!=typeof fetch?i(o):fetch(ve,{credentials:"same-origin"}).then((function(r){return WebAssembly.instantiateStreaming(r,e).then(o,(function(e){return _("wasm streaming compile failed: "+e),_("falling back to ArrayBuffer instantiation"),i(o)}))}))}(),r.___wasm_call_ctors=_e("__wasm_call_ctors");var ht=r._free=_e("free"),gt=r._malloc=_e("malloc"),vt=r._strlen=_e("strlen"),yt=r.___errno_location=_e("__errno_location"),Et=r.___getTypeName=_e("__getTypeName");r.___embind_register_native_and_builtin_types=_e("__embind_register_native_and_builtin_types");var wt=r.___stdio_exit=_e("__stdio_exit"),bt=r._emscripten_builtin_memalign=_e("emscripten_builtin_memalign"),_t=r._emscripten_stack_init=function(){return(_t=r._emscripten_stack_init=r.asm.emscripten_stack_init).apply(null,arguments)};r._emscripten_stack_get_free=function(){return(r._emscripten_stack_get_free=r.asm.emscripten_stack_get_free).apply(null,arguments)},r._emscripten_stack_get_base=function(){return(r._emscripten_stack_get_base=r.asm.emscripten_stack_get_base).apply(null,arguments)};var Tt,kt=r._emscripten_stack_get_end=function(){return(kt=r._emscripten_stack_get_end=r.asm.emscripten_stack_get_end).apply(null,arguments)};function St(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function Ct(e){function t(){Tt||(Tt=!0,r.calledRun=!0,A||(oe(),F(!le),le=!0,r.noFSInit||Ie.init.initialized||Ie.init(),Ie.ignorePermissions=!1,ke(ae),r.onRuntimeInitialized&&r.onRuntimeInitialized(),F(!r._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),function(){if(oe(),r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)e=r.postRun.shift(),se.unshift(e);var e;ke(se)}()))}ue>0||(_t(),ne(),function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)e=r.preRun.shift(),ie.unshift(e);var e;ke(ie)}(),ue>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),t()}),1)):t(),oe()))}if(r.stackSave=_e("stackSave"),r.stackRestore=_e("stackRestore"),r.stackAlloc=_e("stackAlloc"),r.dynCall_ijiii=_e("dynCall_ijiii"),r.dynCall_viiijj=_e("dynCall_viiijj"),r.dynCall_jij=_e("dynCall_jij"),r.dynCall_jii=_e("dynCall_jii"),r.dynCall_jiji=_e("dynCall_jiji"),r._ff_h264_cabac_tables=112940,P("intArrayFromString",!1),P("intArrayToString",!1),P("ccall",!1),P("cwrap",!1),P("setValue",!1),P("getValue",!1),P("allocate",!1),P("UTF8ArrayToString",!1),P("UTF8ToString",!1),P("stringToUTF8Array",!1),P("stringToUTF8",!1),P("lengthBytesUTF8",!1),P("stackTrace",!1),P("addOnPreRun",!1),P("addOnInit",!1),P("addOnPreMain",!1),P("addOnExit",!1),P("addOnPostRun",!1),P("writeStringToMemory",!1),P("writeArrayToMemory",!1),P("writeAsciiToMemory",!1),P("addRunDependency",!0),P("removeRunDependency",!0),P("FS_createFolder",!1),P("FS_createPath",!0),P("FS_createDataFile",!0),P("FS_createPreloadedFile",!0),P("FS_createLazyFile",!0),P("FS_createLink",!1),P("FS_createDevice",!0),P("FS_unlink",!0),P("getLEB",!1),P("getFunctionTables",!1),P("alignFunctionTables",!1),P("registerFunctions",!1),P("addFunction",!1),P("removeFunction",!1),P("prettyPrint",!1),P("dynCall",!1),P("getCompilerSetting",!1),P("print",!1),P("printErr",!1),P("getTempRet0",!1),P("setTempRet0",!1),P("callMain",!1),P("abort",!1),P("keepRuntimeAlive",!1),P("ptrToString",!1),P("zeroMemory",!1),P("stringToNewUTF8",!1),P("emscripten_realloc_buffer",!1),P("ENV",!1),P("ERRNO_CODES",!1),P("ERRNO_MESSAGES",!1),P("setErrNo",!1),P("inetPton4",!1),P("inetNtop4",!1),P("inetPton6",!1),P("inetNtop6",!1),P("readSockaddr",!1),P("writeSockaddr",!1),P("DNS",!1),P("getHostByName",!1),P("Protocols",!1),P("Sockets",!1),P("getRandomDevice",!1),P("traverseStack",!1),P("UNWIND_CACHE",!1),P("convertPCtoSourceLocation",!1),P("readAsmConstArgsArray",!1),P("readAsmConstArgs",!1),P("mainThreadEM_ASM",!1),P("jstoi_q",!1),P("jstoi_s",!1),P("getExecutableName",!1),P("listenOnce",!1),P("autoResumeAudioContext",!1),P("dynCallLegacy",!1),P("getDynCaller",!1),P("dynCall",!1),P("setWasmTableEntry",!1),P("getWasmTableEntry",!1),P("handleException",!1),P("runtimeKeepalivePush",!1),P("runtimeKeepalivePop",!1),P("callUserCallback",!1),P("maybeExit",!1),P("safeSetTimeout",!1),P("asmjsMangle",!1),P("asyncLoad",!1),P("alignMemory",!1),P("mmapAlloc",!1),P("reallyNegative",!1),P("unSign",!1),P("reSign",!1),P("formatString",!1),P("PATH",!1),P("PATH_FS",!1),P("SYSCALLS",!1),P("getSocketFromFD",!1),P("getSocketAddress",!1),P("JSEvents",!1),P("registerKeyEventCallback",!1),P("specialHTMLTargets",!1),P("maybeCStringToJsString",!1),P("findEventTarget",!1),P("findCanvasEventTarget",!1),P("getBoundingClientRect",!1),P("fillMouseEventData",!1),P("registerMouseEventCallback",!1),P("registerWheelEventCallback",!1),P("registerUiEventCallback",!1),P("registerFocusEventCallback",!1),P("fillDeviceOrientationEventData",!1),P("registerDeviceOrientationEventCallback",!1),P("fillDeviceMotionEventData",!1),P("registerDeviceMotionEventCallback",!1),P("screenOrientation",!1),P("fillOrientationChangeEventData",!1),P("registerOrientationChangeEventCallback",!1),P("fillFullscreenChangeEventData",!1),P("registerFullscreenChangeEventCallback",!1),P("registerRestoreOldStyle",!1),P("hideEverythingExceptGivenElement",!1),P("restoreHiddenElements",!1),P("setLetterbox",!1),P("currentFullscreenStrategy",!1),P("restoreOldWindowedStyle",!1),P("softFullscreenResizeWebGLRenderTarget",!1),P("doRequestFullscreen",!1),P("fillPointerlockChangeEventData",!1),P("registerPointerlockChangeEventCallback",!1),P("registerPointerlockErrorEventCallback",!1),P("requestPointerLock",!1),P("fillVisibilityChangeEventData",!1),P("registerVisibilityChangeEventCallback",!1),P("registerTouchEventCallback",!1),P("fillGamepadEventData",!1),P("registerGamepadEventCallback",!1),P("registerBeforeUnloadEventCallback",!1),P("fillBatteryEventData",!1),P("battery",!1),P("registerBatteryEventCallback",!1),P("setCanvasElementSize",!1),P("getCanvasElementSize",!1),P("demangle",!1),P("demangleAll",!1),P("jsStackTrace",!1),P("stackTrace",!1),P("getEnvStrings",!1),P("checkWasiClock",!1),P("writeI53ToI64",!1),P("writeI53ToI64Clamped",!1),P("writeI53ToI64Signaling",!1),P("writeI53ToU64Clamped",!1),P("writeI53ToU64Signaling",!1),P("readI53FromI64",!1),P("readI53FromU64",!1),P("convertI32PairToI53",!1),P("convertU32PairToI53",!1),P("dlopenMissingError",!1),P("setImmediateWrapped",!1),P("clearImmediateWrapped",!1),P("polyfillSetImmediate",!1),P("uncaughtExceptionCount",!1),P("exceptionLast",!1),P("exceptionCaught",!1),P("ExceptionInfo",!1),P("exception_addRef",!1),P("exception_decRef",!1),P("Browser",!1),P("setMainLoop",!1),P("wget",!1),P("FS",!1),P("MEMFS",!1),P("TTY",!1),P("PIPEFS",!1),P("SOCKFS",!1),P("_setNetworkCallback",!1),P("tempFixedLengthArray",!1),P("miniTempWebGLFloatBuffers",!1),P("heapObjectForWebGLType",!1),P("heapAccessShiftForWebGLHeap",!1),P("GL",!1),P("emscriptenWebGLGet",!1),P("computeUnpackAlignedImageSize",!1),P("emscriptenWebGLGetTexPixelData",!1),P("emscriptenWebGLGetUniform",!1),P("webglGetUniformLocation",!1),P("webglPrepareUniformLocationsBeforeFirstUse",!1),P("webglGetLeftBracePos",!1),P("emscriptenWebGLGetVertexAttrib",!1),P("writeGLArray",!1),P("AL",!1),P("SDL_unicode",!1),P("SDL_ttfContext",!1),P("SDL_audio",!1),P("SDL",!1),P("SDL_gfx",!1),P("GLUT",!1),P("EGL",!1),P("GLFW_Window",!1),P("GLFW",!1),P("GLEW",!1),P("IDBStore",!1),P("runAndAbortIfError",!1),P("InternalError",!1),P("BindingError",!1),P("UnboundTypeError",!1),P("PureVirtualError",!1),P("init_embind",!1),P("throwInternalError",!1),P("throwBindingError",!1),P("throwUnboundTypeError",!1),P("ensureOverloadTable",!1),P("exposePublicSymbol",!1),P("replacePublicSymbol",!1),P("extendError",!1),P("createNamedFunction",!1),P("registeredInstances",!1),P("getBasestPointer",!1),P("registerInheritedInstance",!1),P("unregisterInheritedInstance",!1),P("getInheritedInstance",!1),P("getInheritedInstanceCount",!1),P("getLiveInheritedInstances",!1),P("registeredTypes",!1),P("awaitingDependencies",!1),P("typeDependencies",!1),P("registeredPointers",!1),P("registerType",!1),P("whenDependentTypesAreResolved",!1),P("embind_charCodes",!1),P("embind_init_charCodes",!1),P("readLatin1String",!1),P("getTypeName",!1),P("heap32VectorToArray",!1),P("requireRegisteredType",!1),P("getShiftFromSize",!1),P("integerReadValueFromPointer",!1),P("enumReadValueFromPointer",!1),P("floatReadValueFromPointer",!1),P("simpleReadValueFromPointer",!1),P("runDestructors",!1),P("new_",!1),P("craftInvokerFunction",!1),P("embind__requireFunction",!1),P("tupleRegistrations",!1),P("structRegistrations",!1),P("genericPointerToWireType",!1),P("constNoSmartPtrRawPointerToWireType",!1),P("nonConstNoSmartPtrRawPointerToWireType",!1),P("init_RegisteredPointer",!1),P("RegisteredPointer",!1),P("RegisteredPointer_getPointee",!1),P("RegisteredPointer_destructor",!1),P("RegisteredPointer_deleteObject",!1),P("RegisteredPointer_fromWireType",!1),P("runDestructor",!1),P("releaseClassHandle",!1),P("finalizationRegistry",!1),P("detachFinalizer_deps",!1),P("detachFinalizer",!1),P("attachFinalizer",!1),P("makeClassHandle",!1),P("init_ClassHandle",!1),P("ClassHandle",!1),P("ClassHandle_isAliasOf",!1),P("throwInstanceAlreadyDeleted",!1),P("ClassHandle_clone",!1),P("ClassHandle_delete",!1),P("deletionQueue",!1),P("ClassHandle_isDeleted",!1),P("ClassHandle_deleteLater",!1),P("flushPendingDeletes",!1),P("delayFunction",!1),P("setDelayFunction",!1),P("RegisteredClass",!1),P("shallowCopyInternalPointer",!1),P("downcastPointer",!1),P("upcastPointer",!1),P("validateThis",!1),P("char_0",!1),P("char_9",!1),P("makeLegalFunctionName",!1),P("emval_handle_array",!1),P("emval_free_list",!1),P("emval_symbols",!1),P("init_emval",!1),P("count_emval_handles",!1),P("get_first_emval",!1),P("getStringOrSymbol",!1),P("Emval",!1),P("emval_newers",!1),P("craftEmvalAllocator",!1),P("emval_get_global",!1),P("emval_methodCallers",!1),P("emval_registeredMethods",!1),P("warnOnce",!1),P("stackSave",!1),P("stackRestore",!1),P("stackAlloc",!1),P("AsciiToString",!1),P("stringToAscii",!1),P("UTF16ToString",!1),P("stringToUTF16",!1),P("lengthBytesUTF16",!1),P("UTF32ToString",!1),P("stringToUTF32",!1),P("lengthBytesUTF32",!1),P("allocateUTF8",!1),P("allocateUTF8OnStack",!1),r.writeStackCookie=ne,r.checkStackCookie=oe,C("ALLOC_NORMAL",!1),C("ALLOC_STACK",!1),de=function e(){Tt||Ct(),Tt||(de=e)},r.run=Ct,r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();Ct(),e.exports=r}));const u=1e3,c=1e3,d=!1,f=!1,p=!1,m=!1,h="initVideo",g="render",v="playAudio",y="initAudio",E="audioCode",w="videoCode",b=1,_=2,T="init",k="decode",S="audioDecode",C="videoDecode",P="close",A="updateConfig",F="key",D="delta";s((function(e){!function(){var r="undefined"!=typeof window&&void 0!==window.document?window.document:{},t=e.exports,n=function(){for(var e,t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n=0,o=t.length,i={};n<o;n++)if((e=t[n])&&e[1]in r){for(n=0;n<e.length;n++)i[t[0][n]]=e[n];return i}return!1}(),o={change:n.fullscreenchange,error:n.fullscreenerror},i={request:function(e,t){return new Promise(function(o,i){var a=function(){this.off("change",a),o()}.bind(this);this.on("change",a);var s=(e=e||r.documentElement)[n.requestFullscreen](t);s instanceof Promise&&s.then(a).catch(i)}.bind(this))},exit:function(){return new Promise(function(e,t){if(this.isFullscreen){var o=function(){this.off("change",o),e()}.bind(this);this.on("change",o);var i=r[n.exitFullscreen]();i instanceof Promise&&i.then(o).catch(t)}else e()}.bind(this))},toggle:function(e,r){return this.isFullscreen?this.exit():this.request(e,r)},onchange:function(e){this.on("change",e)},onerror:function(e){this.on("error",e)},on:function(e,t){var n=o[e];n&&r.addEventListener(n,t,!1)},off:function(e,t){var n=o[e];n&&r.removeEventListener(n,t,!1)},raw:n};n?(Object.defineProperties(i,{isFullscreen:{get:function(){return Boolean(r[n.fullscreenElement])}},element:{enumerable:!0,get:function(){return r[n.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(r[n.fullscreenEnabled])}}}),t?e.exports=i:window.screenfull=i):t?e.exports={isEnabled:!1}:window.screenfull={isEnabled:!1}}()})).isEnabled,(()=>{try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch(e){}})(),Date.now||(Date.now=function(){return(new Date).getTime()}),l.postRun=function(){var e=[],r=[],t={};"VideoEncoder"in self&&(t={hasInit:!1,isEmitInfo:!1,offscreenCanvas:null,offscreenCanvasCtx:null,decoder:new VideoDecoder({output:function(e){t.isEmitInfo||(n.opt.debug&&console.log("Jessibuca: [worker] Webcodecs Video Decoder initSize"),postMessage({cmd:h,w:e.codedWidth,h:e.codedHeight}),t.isEmitInfo=!0,t.offscreenCanvas=new OffscreenCanvas(e.codedWidth,e.codedHeight),t.offscreenCanvasCtx=t.offscreenCanvas.getContext("2d")),t.offscreenCanvasCtx.drawImage(e,0,0,e.codedWidth,e.codedHeight);let r=t.offscreenCanvas.transferToImageBitmap();postMessage({cmd:g,buffer:r,delay:n.delay,ts:0},[r]),setTimeout((function(){e.close?e.close():e.destroy()}),100)},error:function(e){console.error(e)}}),decode:function(e,r){const o=e[0]>>4==1;if(t.hasInit){const n=new EncodedVideoChunk({data:e.slice(5),timestamp:r,type:o?F:D});t.decoder.decode(n)}else if(o&&0===e[1]){const r=15&e[0];n.setVideoCodec(r);const o=function(e){let r=e.subarray(1,4),t="avc1.";for(let e=0;e<3;e++){let n=r[e].toString(16);n.length<2&&(n="0"+n),t+=n}return{codec:t,description:e}}(e.slice(5));t.decoder.configure(o),t.hasInit=!0}},reset(){t.hasInit=!1,t.isEmitInfo=!1,t.offscreenCanvas=null,t.offscreenCanvasCtx=null}});var n={opt:{debug:d,useOffscreen:p,useWCS:f,videoBuffer:u,openWebglAlignment:m,videoBufferDelay:c},useOffscreen:function(){return n.opt.useOffscreen&&"undefined"!=typeof OffscreenCanvas},initAudioPlanar:function(e,t){postMessage({cmd:y,sampleRate:t,channels:e});var n=[],o=0;this.playAudioPlanar=function(t,i,a){for(var s=i,u=[],c=0,d=0;d<2;d++){var f=l.HEAPU32[(t>>2)+d]>>2;u[d]=l.HEAPF32.subarray(f,f+s)}if(o){if(!(s>=(i=1024-o)))return o+=s,r[0]=Float32Array.of(...r[0],...u[0]),void(2==e&&(r[1]=Float32Array.of(...r[1],...u[1])));n[0]=Float32Array.of(...r[0],...u[0].subarray(0,i)),2==e&&(n[1]=Float32Array.of(...r[1],...u[1].subarray(0,i))),postMessage({cmd:v,buffer:n,ts:a},n.map((e=>e.buffer))),c=i,s-=i}for(o=s;o>=1024;o-=1024)n[0]=u[0].slice(c,c+=1024),2==e&&(n[1]=u[1].slice(c-1024,c)),postMessage({cmd:v,buffer:n,ts:a},n.map((e=>e.buffer)));o&&(r[0]=u[0].slice(c),2==e&&(r[1]=u[1].slice(c)))}},setVideoCodec:function(e){postMessage({cmd:w,code:e})},setAudioCodec:function(e){postMessage({cmd:E,code:e})},setVideoSize:function(e,r){postMessage({cmd:h,w:e,h:r});var t=e*r,o=t>>2;n.useOffscreen()?(this.offscreenCanvas=new OffscreenCanvas(e,r),this.offscreenCanvasGL=this.offscreenCanvas.getContext("webgl"),this.webglObj=((e,r)=>{var t=["attribute vec4 vertexPos;","attribute vec4 texturePos;","varying vec2 textureCoord;","void main()","{","gl_Position = vertexPos;","textureCoord = texturePos.xy;","}"].join("\n"),n=["precision highp float;","varying highp vec2 textureCoord;","uniform sampler2D ySampler;","uniform sampler2D uSampler;","uniform sampler2D vSampler;","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) {","highp float y = texture2D(ySampler, textureCoord).r;","highp float u = texture2D(uSampler, textureCoord).r;","highp float v = texture2D(vSampler, textureCoord).r;","gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;","}"].join("\n");r&&e.pixelStorei(e.UNPACK_ALIGNMENT,1);var o=e.createShader(e.VERTEX_SHADER);e.shaderSource(o,t),e.compileShader(o),e.getShaderParameter(o,e.COMPILE_STATUS)||console.log("Vertex shader failed to compile: "+e.getShaderInfoLog(o));var i=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(i,n),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS)||console.log("Fragment shader failed to compile: "+e.getShaderInfoLog(i));var a=e.createProgram();e.attachShader(a,o),e.attachShader(a,i),e.linkProgram(a),e.getProgramParameter(a,e.LINK_STATUS)||console.log("Program failed to compile: "+e.getProgramInfoLog(a)),e.useProgram(a);var s=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,s),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,1,-1,1,1,-1,-1,-1]),e.STATIC_DRAW);var l=e.getAttribLocation(a,"vertexPos");e.enableVertexAttribArray(l),e.vertexAttribPointer(l,2,e.FLOAT,!1,0,0);var u=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,u),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),e.STATIC_DRAW);var c=e.getAttribLocation(a,"texturePos");function d(r,t){var n=e.createTexture();return e.bindTexture(e.TEXTURE_2D,n),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),e.bindTexture(e.TEXTURE_2D,null),e.uniform1i(e.getUniformLocation(a,r),t),n}e.enableVertexAttribArray(c),e.vertexAttribPointer(c,2,e.FLOAT,!1,0,0);var f=d("ySampler",0),p=d("uSampler",1),m=d("vSampler",2);return{render:function(r,t,n,o,i){e.viewport(0,0,r,t),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,f),e.texImage2D(e.TEXTURE_2D,0,e.LUMINANCE,r,t,0,e.LUMINANCE,e.UNSIGNED_BYTE,n),e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,p),e.texImage2D(e.TEXTURE_2D,0,e.LUMINANCE,r/2,t/2,0,e.LUMINANCE,e.UNSIGNED_BYTE,o),e.activeTexture(e.TEXTURE2),e.bindTexture(e.TEXTURE_2D,m),e.texImage2D(e.TEXTURE_2D,0,e.LUMINANCE,r/2,t/2,0,e.LUMINANCE,e.UNSIGNED_BYTE,i),e.drawArrays(e.TRIANGLE_STRIP,0,4)},destroy:function(){try{e.deleteProgram(a),e.deleteBuffer(s),e.deleteBuffer(u),e.deleteTexture(f),e.deleteTexture(p),e.deleteTexture(m)}catch(e){}}}})(this.offscreenCanvasGL,n.opt.openWebglAlignment),this.draw=function(n,i,a,s){const u=l.HEAPU8.subarray(i,i+t),c=l.HEAPU8.subarray(a,a+o),d=l.HEAPU8.subarray(s,s+o);this.webglObj.render(e,r,u,c,d);let f=this.offscreenCanvas.transferToImageBitmap();postMessage({cmd:g,buffer:f,delay:this.delay,ts:n},[f])}):this.draw=function(e,r,n,i){const a=[Uint8Array.from(l.HEAPU8.subarray(r,r+t)),Uint8Array.from(l.HEAPU8.subarray(n,n+o)),Uint8Array.from(l.HEAPU8.subarray(i,i+o))];postMessage({cmd:g,output:a,delay:this.delay,ts:e},a.map((e=>e.buffer)))}},getDelay:function(e){if(!e)return-1;if(this.firstTimestamp){if(e){const r=Date.now()-this.startTimestamp,t=e-this.firstTimestamp;this.delay=r>=t?r-t:t-r}}else this.firstTimestamp=e,this.startTimestamp=Date.now(),this.delay=-1;return this.delay},resetDelay:function(){this.firstTimestamp=null,this.startTimestamp=null,this.delay=-1},init:function(){n.opt.debug&&console.log("Jessibuca: [worker] init");const r=e=>{n.opt.useWCS&&n.useOffscreen()&&e.type===_&&t.decode?t.decode(e.payload,e.ts):e.decoder.decode(e.payload,e.ts)};this.stopId=setInterval((()=>{if(e.length)if(this.dropping){for((t=e.shift()).type===b&&0===t.payload[1]&&r(t);!t.isIFrame&&e.length;)(t=e.shift()).type===b&&0===t.payload[1]&&r(t);t.isIFrame&&(this.dropping=!1,r(t))}else{var t=e[0];if(-1===this.getDelay(t.ts))e.shift(),r(t);else if(this.delay>n.opt.videoBuffer+n.opt.videoBufferDelay)this.resetDelay(),this.dropping=!0;else for(;e.length&&(t=e[0],this.getDelay(t.ts)>n.opt.videoBuffer);)e.shift(),r(t)}}),10)},close:function(){n.opt.debug&&console.log("Jessibuca: [worker]: close"),clearInterval(this.stopId),this.stopId=null,o.clear&&o.clear(),i.clear&&i.clear(),t.reset&&t.reset(),this.firstTimestamp=null,this.startTimestamp=null,this.delay=-1,this.dropping=!1,this.webglObj&&(this.webglObj.destroy(),this.offscreenCanvas=null,this.offscreenCanvasGL=null,this.offscreenCanvasCtx=null),e=[],r=[],delete this.playAudioPlanar,delete this.draw},pushBuffer:function(r,t){t.type===b?e.push({ts:t.ts,payload:r,decoder:o,type:b}):t.type===_&&e.push({ts:t.ts,payload:r,decoder:i,type:_,isIFrame:t.isIFrame})}},o=new l.AudioDecoder(n),i=new l.VideoDecoder(n);postMessage({cmd:T}),self.onmessage=function(e){var r=e.data;switch(r.cmd){case T:try{n.opt=Object.assign(n.opt,JSON.parse(r.opt))}catch(e){}o.sample_rate=r.sampleRate,n.init();break;case k:n.pushBuffer(r.buffer,r.options);break;case S:o.decode(r.buffer,r.ts);break;case C:i.decode(r.buffer,r.ts);break;case P:n.close();break;case A:n.opt[r.key]=r.value}}}})); diff --git a/vue/public/js/jessibuca/decoder.wasm b/vue/public/js/jessibuca/decoder.wasm new file mode 100644 index 0000000000000000000000000000000000000000..89c8185a762511791d27ae17b4f8acb6bd243629 GIT binary patch literal 1050314 zcmdqK37i$xnebivt*Tpfm+l4{8nNybla^@4OdK?c2^4O`Y)&TQB=4w*f{||ApyMPN zv0Fh!Ma8C3+!0(*Q4vv5T-qHqDjFBuamO8Z+`s>GPTlScVlwah{oe2Q%Xgt~ojP@v z=RD`x&pCCC@ly{n4Z|=m^N-lq?(FO|_I3G|tD`TLq&<~K!t69V`7-t;o0Qbx;_Ju# zwaLq6dB(nB?P*`DJP!IYjeQG!X_YYc&DUiZ`$o09Y18O!+P+2~JhWpTVII+6LP`SU zG$~aF14%|RjYn?hk$jAO8)|L#UyXf>{WmIQ>>F>8W7GyZZJI`tw4_ilO)lIBR;DS; zQ35c4??}F^BLqron&3*Im#2*zG_7y?I#5`3jwDx_kT#{|BkAQxxj2l1!Khi0L<Z&& zot;PUCml|czH2y^foD@BNi{Q|5^#?^lGbX)bf@&G26BX=fFq<74}iW?%Gz|m4Oj;x zmGnC4QdRAnMwusa6jG$L!Cznhl08j<m(4Oa0!v0OGIbe1dbYvWv`)#bBO~q<8U?q4 z1h7F0<Oqn&G}q1z$}1!uQNxo!$46BWgfMqUa3cgSSEh_s084tcJJp3bI1+Se<jW*b z970la!c{QCY)KiK5KdAvF0dT|-V~$A1*oO8+-uBAn&B!Gs?HTGU>n>rjcVYM1vMQ( z>yXrupmUns=~))aV7>%)1%-@DL#iQEo#{ShwvW*0$+(<~B`T<oo-{RWeN-=bf&@J` zLTR>4N~iTku4+#_`0#<_CLXlkq=P4nn=<kDlcsh|oHB0z$>XO^H8zunn{WEzxI?EL za_Gb<9e*++DOIM_;o~Qd>loiYaU6+1Of+(mA7uICry65wT}inqe>iyDgo#r-ru<?5 zjzgwQH9UD({f4ggKjh$ANyCwXan|aDiTh8Pcz~`vD9hV_{N%~w4nJhlgmDK=>^Sg{ z35F##nzN_BpV*P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GL1fO8y3I8Xc|`U(AvE&vP&@CyeLMu<mI2K|c00Cx4@tG|&5 z@1vE!lY0?eLgVPN)Iovg4-zR7Td$D&CzALtGnTaIZ&Wmu?YEF0-GE9^DJnzdr~=JK zm1qu<=gk|5=b`|bhk|H6x(O}dgH&q2&wJL>&};NU{O=2tDQ4t|4<0h|d34gZVh{K| ziowgt@8Nh0`QqVDUc=+!<jZ3~_y|7;GtpA=XYz;fRiv$Y{iJ09!VWY4K!gl}@EKHH zV({v5$u*vOCI6tAA7sg531Ua`*OnT5n0tZ*D?elA&%%$K`5k2jACi}d1dFdOH|;pu ze}(c><gX^S+CPJ|<gcyB%@;d6=+`OoxfG^ie7xd22N#Gv3px8c-|~6Aix`S3v@^-W c>mG9C#Y8XhG#Nk%e17L}YD;8_3J=}&FM@LGlmGw# literal 0 HcmV?d00001 diff --git a/vue/public/js/jessibuca/jessibuca.d.ts b/vue/public/js/jessibuca/jessibuca.d.ts new file mode 100644 index 00000000..b6823735 --- /dev/null +++ b/vue/public/js/jessibuca/jessibuca.d.ts @@ -0,0 +1,637 @@ +declare namespace Jessibuca { + + /** 超时信息 */ + enum TIMEOUT { + /** 当play()的时候,如果没有数据返回 */ + loadingTimeout = 'loadingTimeout', + /** 当播放过程中,如果超过timeout之后没有数据渲染 */ + delayTimeout = 'delayTimeout', + } + + /** 错误信息 */ + enum ERROR { + /** 播放错误,url 为空的时候,调用 play 方法 */ + playError = 'playError', + /** http 请求失败 */ + fetchError = 'fetchError', + /** websocket 请求失败 */ + websocketError = 'websocketError', + /** webcodecs 解码 h265 失败 */ + webcodecsH265NotSupport = 'webcodecsH265NotSupport', + /** mediaSource 解码 h265 失败 */ + mediaSourceH265NotSupport = 'mediaSourceH265NotSupport', + /** wasm 解码失败 */ + wasmDecodeError = 'wasmDecodeError', + } + + interface Config { + /** + * 播放器容器 + * * 若为 string ,则底层调用的是 document.getElementById('id') + * */ + container: HTMLElement | string; + /** + * 设置最大缓冲时长,单位秒,播放器会自动消除延迟 + */ + videoBuffer?: number; + /** + * worker地址 + * * 默认引用的是根目录下面的decoder.js文件 ,decoder.js 与 decoder.wasm文件必须是放在同一个目录下面。 */ + decoder?: string; + /** + * 是否不使用离屏模式(提升渲染能力) + */ + forceNoOffscreen?: boolean; + /** + * 是否开启当页面的'visibilityState'变为'hidden'的时候,自动暂停播放。 + */ + hiddenAutoPause?: boolean; + /** + * 是否有音频,如果设置`false`,则不对音频数据解码,提升性能。 + */ + hasAudio?: boolean; + /** + * 设置旋转角度,只支持,0(默认),180,270 三个值 + */ + rotate?: boolean; + /** + * 1. 当为`true`的时候:视频画面做等比缩放后,高或宽对齐canvas区域,画面不被拉伸,但有黑边。 等同于 `setScaleMode(1)` + * 2. 当为`false`的时候:视频画面完全填充canvas区域,画面会被拉伸。等同于 `setScaleMode(0)` + */ + isResize?: boolean; + /** + * 1. 当为`true`的时候:视频画面做等比缩放后,完全填充canvas区域,画面不被拉伸,没有黑边,但画面显示不全。等同于 `setScaleMode(2)` + */ + isFullResize?: boolean; + /** + * 1. 当为`true`的时候:ws协议不检验是否以.flv为依据,进行协议解析。 + */ + isFlv?: boolean; + /** + * 是否开启控制台调试打 + */ + debug?: boolean; + /** + * 1. 设置超时时长, 单位秒 + * 2. 在连接成功之前(loading)和播放中途(heart),如果超过设定时长无数据返回,则回调timeout事件 + */ + timeout?: number; + /** + * 1. 设置超时时长, 单位秒 + * 2. 在连接成功之前,如果超过设定时长无数据返回,则回调timeout事件 + */ + heartTimeout?: number; + /** + * 1. 设置超时时长, 单位秒 + * 2. 在连接成功之前,如果超过设定时长无数据返回,则回调timeout事件 + */ + loadingTimeout?: number; + /** + * 是否支持屏幕的双击事件,触发全屏,取消全屏事件 + */ + supportDblclickFullscreen?: boolean; + /** + * 是否显示网 + */ + showBandwidth?: boolean; + /** + * 配置操作按钮 + */ + operateBtns?: { + /** 是否显示全屏按钮 */ + fullscreen?: boolean; + /** 是否显示截图按钮 */ + screenshot?: boolean; + /** 是否显示播放暂停按钮 */ + play?: boolean; + /** 是否显示声音按钮 */ + audio?: boolean; + /** 是否显示录制按 */ + record?: boolean; + }; + /** + * 开启屏幕常亮,在手机浏览器上, canvas标签渲染视频并不会像video标签那样保持屏幕常亮 + */ + keepScreenOn?: boolean; + /** + * 是否开启声音,默认是关闭声音播放的 + */ + isNotMute?: boolean; + /** + * 加载过程中文案 + */ + loadingText?: string; + /** + * 背景图片 + */ + background?: string; + /** + * 是否开启MediaSource硬解码 + * * 视频编码只支持H.264视频(Safari on iOS不支持) + * * 不支持 forceNoOffscreen 为 false (开启离屏渲染) + */ + useMSE?: boolean; + /** + * 是否开启Webcodecs硬解码 + * * 视频编码只支持H.264视频 (需在chrome 94版本以上,需要https或者localhost环境) + * * 支持 forceNoOffscreen 为 false (开启离屏渲染) + * */ + useWCS?: boolean; + /** + * 是否开启键盘快捷键 + * 目前支持的键盘快捷键有:esc -> 退出全屏;arrowUp -> 声音增加;arrowDown -> 声音减少; + */ + hotKey?: boolean; + /** + * 在使用MSE或者Webcodecs 播放H265的时候,是否自动降级到wasm模式。 + * 设置为false 则直接关闭播放,抛出Error 异常,设置为true 则会自动切换成wasm模式播放。 + */ + autoWasm?: boolean; + /** + * heartTimeout 心跳超时之后自动再播放,不再抛出异常,而直接重新播放视频地址。 + */ + heartTimeoutReplay?: boolean, + /** + * heartTimeoutReplay 从试次数,超过之后,不再自动播放 + */ + heartTimeoutReplayTimes?: number, + /** + * loadingTimeout loading之后自动再播放,不再抛出异常,而直接重新播放视频地址。 + */ + loadingTimeoutReplay?: boolean, + /** + * heartTimeoutReplay 从试次数,超过之后,不再自动播放 + */ + loadingTimeoutReplayTimes?: number + /** + * wasm解码报错之后,不再抛出异常,而是直接重新播放视频地址。 + */ + wasmDecodeErrorReplay?: boolean, + /** + * https://github.com/langhuihui/jessibuca/issues/152 解决方案 + * 例如:WebGL图像预处理默认每次取4字节的数据,但是540x960分辨率下的U、V分量宽度是540/2=270不能被4整除,导致绿屏。 + */ + openWebglAlignment?: boolean + } +} + + +declare class Jessibuca { + + constructor(config?: Jessibuca.Config); + + /** + * 是否开启控制台调试打印 + @example + // 开启 + jessibuca.setDebug(true) + // 关闭 + jessibuca.setDebug(false) + */ + setDebug(flag: boolean): void; + + /** + * 静音 + @example + jessibuca.mute() + */ + mute(): void; + + /** + * 取消静音 + @example + jessibuca.cancelMute() + */ + cancelMute(): void; + + /** + * 留给上层用户操作来触发音频恢复的方法。 + * + * iPhone,chrome等要求自动播放时,音频必须静音,需要由一个真实的用户交互操作来恢复,不能使用代码。 + * + * https://developers.google.com/web/updates/2017/09/autoplay-policy-changes + */ + audioResume(): void; + + /** + * + * 设置超时时长, 单位秒 + * 在连接成功之前和播放中途,如果超过设定时长无数据返回,则回调timeout事件 + + @example + jessibuca.setTimeout(10) + + jessibuca.on('timeout',function(){ + // + }); + */ + setTimeout(): void; + + /** + * @param mode + * 0 视频画面完全填充canvas区域,画面会被拉伸 等同于参数 `isResize` 为false + * + * 1 视频画面做等比缩放后,高或宽对齐canvas区域,画面不被拉伸,但有黑边 等同于参数 `isResize` 为true + * + * 2 视频画面做等比缩放后,完全填充canvas区域,画面不被拉伸,没有黑边,但画面显示不全 等同于参数 `isFullResize` 为true + @example + jessibuca.setScaleMode(0) + + jessibuca.setScaleMode(1) + + jessibuca.setScaleMode(2) + */ + setScaleMode(mode: number): void; + + /** + * 暂停播放 + * + * 可以在pause 之后,再调用 `play()`方法就继续播放之前的流。 + @example + jessibuca.pause().then(()=>{ + console.log('pause success') + + jessibuca.play().then(()=>{ + + }).catch((e)=>{ + + }) + + }).catch((e)=>{ + console.log('pause error',e); + }) + */ + pause(): Promise<void>; + + /** + * 关闭视频,不释放底层资源 + @example + jessibuca.close(); + */ + close(): void; + + /** + * 关闭视频,释放底层资源 + @example + jessibuca.destroy() + */ + destroy(): void; + + /** + * 清理画布为黑色背景 + @example + jessibuca.clearView() + */ + clearView(): void; + + /** + * 播放视频 + @example + + jessibuca.play('url').then(()=>{ + console.log('play success') + }).catch((e)=>{ + console.log('play error',e) + }) + // + jessibuca.play() + */ + play(url?: string): Promise<void>; + + /** + * 重新调整视图大小 + */ + resize(): void; + + /** + * 设置最大缓冲时长,单位秒,播放器会自动消除延迟。 + * + * 等同于 `videoBuffer` 参数。 + * + @example + // 设置 200ms 缓冲 + jessibuca.setBufferTime(0.2) + */ + setBufferTime(time: number): void; + + /** + * 设置旋转角度,只支持,0(默认) ,180,270 三个值。 + * + * > 可用于实现监控画面小窗和全屏效果,由于iOS没有全屏API,此方法可以模拟页面内全屏效果而且多端效果一致。 * + @example + jessibuca.setRotate(0) + + jessibuca.setRotate(90) + + jessibuca.setRotate(270) + */ + setRotate(deg: number): void; + + /** + * + * 设置音量大小,取值0 — 1 + * + * > 区别于 mute 和 cancelMute 方法,虽然设置setVolume(0) 也能达到 mute方法,但是mute 方法是不调用底层播放音频的,能提高性能。而setVolume(0)只是把声音设置为0 ,以达到效果。 + * @param volume 当为0时,完全无声;当为1时,最大音量,默认值 + @example + jessibuca.setVolume(0.2) + + jessibuca.setVolume(0) + + jessibuca.setVolume(1) + */ + setVolume(volume: number): void; + + /** + * 返回是否加载完毕 + @example + var result = jessibuca.hasLoaded() + console.log(result) // true + */ + hasLoaded(): boolean; + + /** + * 开启屏幕常亮,在手机浏览器上, canvas标签渲染视频并不会像video标签那样保持屏幕常亮。 + * H5目前在chrome\edge 84, android chrome 84及以上有原生亮屏API, 需要是https页面 + * 其余平台为模拟实现,此时为兼容实现,并不保证所有浏览器都支持 + @example + jessibuca.setKeepScreenOn() + */ + setKeepScreenOn(): boolean; + + /** + * 全屏(取消全屏)播放视频 + @example + jessibuca.setFullscreen(true) + // + jessibuca.setFullscreen(false) + */ + setFullscreen(flag: boolean): void; + + /** + * + * 截图,调用后弹出下载框保存截图 + * @param filename 可选参数, 保存的文件名, 默认 `时间戳` + * @param format 可选参数, 截图的格式,可选png或jpeg或者webp ,默认 `png` + * @param quality 可选参数, 当格式是jpeg或者webp时,压缩质量,取值0 ~ 1 ,默认 `0.92` + * @param type 可选参数, 可选download或者base64或者blob,默认`download` + + @example + + jessibuca.screenshot("test","png",0.5) + + const base64 = jessibuca.screenshot("test","png",0.5,'base64') + + const fileBlob = jessibuca.screenshot("test",'blob') + */ + screenshot(filename?: string, format?: string, quality?: number, type?: string): void; + + /** + * 开始录制。 + * @param fileName 可选,默认时间戳 + * @param fileType 可选,默认webm,支持webm 和mp4 格式 + + @example + jessibuca.startRecord('xxx','webm') + */ + startRecord(fileName: string, fileType: string): void; + + /** + * 暂停录制并下载。 + @example + jessibuca.stopRecordAndSave() + */ + stopRecordAndSave(): void; + + /** + * 返回是否正在播放中状态。 + @example + var result = jessibuca.isPlaying() + console.log(result) // true + */ + isPlaying(): boolean; + + /** + * 返回是否静音。 + @example + var result = jessibuca.isMute() + console.log(result) // true + */ + isMute(): boolean; + + /** + * 返回是否正在录制。 + @example + var result = jessibuca.isRecording() + console.log(result) // true + */ + isRecording(): boolean; + + + /** + * 监听 jessibuca 初始化事件 + * @example + * jessibuca.on("load",function(){console.log('load')}) + */ + on(event: 'load', callback: () => void): void; + + /** + * 视频播放持续时间,单位ms + * @example + * jessibuca.on('timeUpdate',function (ts) {console.log('timeUpdate',ts);}) + */ + on(event: 'timeUpdate', callback: () => void): void; + + /** + * 当解析出视频信息时回调,2个回调参数 + * @example + * jessibuca.on("videoInfo",function(data){console.log('width:',data.width,'height:',data.width)}) + */ + on(event: 'videoInfo', callback: (data: { + /** 视频宽 */ + width: number; + /** 视频高 */ + height: number; + }) => void): void; + + /** + * 当解析出音频信息时回调,2个回调参数 + * @example + * jessibuca.on("audioInfo",function(data){console.log('numOfChannels:',data.numOfChannels,'sampleRate',data.sampleRate)}) + */ + on(event: 'audioInfo', callback: (data: { + /** 声频通道 */ + numOfChannels: number; + /** 采样率 */ + sampleRate: number; + }) => void): void; + + /** + * 信息,包含错误信息 + * @example + * jessibuca.on("log",function(data){console.log('data:',data)}) + */ + on(event: 'log', callback: () => void): void; + + /** + * 错误信息 + * @example + * jessibuca.on("error",function(error){ + if(error === Jessibuca.ERROR.fetchError){ + // + } + else if(error === Jessibuca.ERROR.webcodecsH265NotSupport){ + // + } + console.log('error:',error) + }) + */ + on(event: 'error', callback: (err: Jessibuca.ERROR) => void): void; + + /** + * 当前网速, 单位KB 每秒1次, + * @example + * jessibuca.on("kBps",function(data){console.log('kBps:',data)}) + */ + on(event: 'kBps', callback: (value: number) => void): void; + + /** + * 渲染开始 + * @example + * jessibuca.on("start",function(){console.log('start render')}) + */ + on(event: 'start', callback: () => void): void; + + /** + * 当设定的超时时间内无数据返回,则回调 + * @example + * jessibuca.on("timeout",function(error){console.log('timeout:',error)}) + */ + on(event: 'timeout', callback: (error: Jessibuca.TIMEOUT) => void): void; + + /** + * 当play()的时候,如果没有数据返回,则回调 + * @example + * jessibuca.on("loadingTimeout",function(){console.log('timeout')}) + */ + on(event: 'loadingTimeout', callback: () => void): void; + + /** + * 当播放过程中,如果超过timeout之后没有数据渲染,则抛出异常。 + * @example + * jessibuca.on("delayTimeout",function(){console.log('timeout')}) + */ + on(event: 'delayTimeout', callback: () => void): void; + + /** + * 当前是否全屏 + * @example + * jessibuca.on("fullscreen",function(flag){console.log('is fullscreen',flag)}) + */ + on(event: 'fullscreen', callback: () => void): void; + + /** + * 触发播放事件 + * @example + * jessibuca.on("play",function(flag){console.log('play')}) + */ + on(event: 'play', callback: () => void): void; + + /** + * 触发暂停事件 + * @example + * jessibuca.on("pause",function(flag){console.log('pause')}) + */ + on(event: 'pause', callback: () => void): void; + + /** + * 触发声音事件,返回boolean值 + * @example + * jessibuca.on("mute",function(flag){console.log('is mute',flag)}) + */ + on(event: 'mute', callback: () => void): void; + + /** + * 流状态统计,流开始播放后回调,每秒1次。 + * @example + * jessibuca.on("stats",function(s){console.log("stats is",s)}) + */ + on(event: 'stats', callback: (stats: { + /** 当前缓冲区时长,单位毫秒 */ + buf: number; + /** 当前视频帧率 */ + fps: number; + /** 当前音频码率,单位byte */ + abps: number; + /** 当前视频码率,单位byte */ + vbps: number; + /** 当前视频帧pts,单位毫秒 */ + ts: number; + }) => void): void; + + /** + * 渲染性能统计,流开始播放后回调,每秒1次。 + * @param performance 0: 表示卡顿,1: 表示流畅,2: 表示非常流程 + * @example + * jessibuca.on("performance",function(performance){console.log("performance is",performance)}) + */ + on(event: 'performance', callback: (performance: 0 | 1 | 2) => void): void; + + /** + * 录制开始的事件 + + * @example + * jessibuca.on("recordStart",function(){console.log("record start")}) + */ + on(event: 'recordStart', callback: () => void): void; + + /** + * 录制结束的事件 + + * @example + * jessibuca.on("recordEnd",function(){console.log("record end")}) + */ + on(event: 'recordEnd', callback: () => void): void; + + /** + * 录制的时候,返回的录制时长,1s一次 + + * @example + * jessibuca.on("recordingTimestamp",function(timestamp){console.log("recordingTimestamp is",timestamp)}) + */ + on(event: 'recordingTimestamp', callback: (timestamp: number) => void): void; + + /** + * 监听调用play方法 经过 初始化-> 网络请求-> 解封装 -> 解码 -> 渲染 一系列过程的时间消耗 + * @param event + * @param callback + */ + on(event: 'playToRenderTimes', callback: (times: { + playInitStart: number, // 1 初始化 + playStart: number, // 2 初始化 + streamStart: number, // 3 网络请求 + streamResponse: number, // 4 网络请求 + demuxStart: number, // 5 解封装 + decodeStart: number, // 6 解码 + videoStart: number, // 7 渲染 + playTimestamp: number,// playStart- playInitStart + streamTimestamp: number,// streamStart - playStart + streamResponseTimestamp: number,// streamResponse - streamStart + demuxTimestamp: number, // demuxStart - streamResponse + decodeTimestamp: number, // decodeStart - demuxStart + videoTimestamp: number,// videoStart - decodeStart + allTimestamp: number // videoStart - playInitStart + }) => void): void + + /** + * 监听方法 + * + @example + + jessibuca.on("load",function(){console.log('load')}) + */ + on(event: string, callback: Function): void; + +} + +export default Jessibuca; diff --git a/vue/public/js/jessibuca/jessibuca.js b/vue/public/js/jessibuca/jessibuca.js new file mode 100644 index 00000000..ba730b91 --- /dev/null +++ b/vue/public/js/jessibuca/jessibuca.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).jessibuca=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e,t){return e(t={exports:{}},t.exports),t.exports}var i,o=t((function(e){e.exports=function(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e},e.exports.__esModule=!0,e.exports.default=e.exports})),r=(i=o)&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i;const s=0,a=1,n="flv",A="m7s",d="mp4",c="webm",l={videoBuffer:1e3,videoBufferDelay:1e3,isResize:!0,isFullResize:!1,isFlv:!1,debug:!1,hotKey:!1,loadingTimeout:10,heartTimeout:5,timeout:10,loadingTimeoutReplay:!0,heartTimeoutReplay:!0,loadingTimeoutReplayTimes:3,heartTimeoutReplayTimes:3,supportDblclickFullscreen:!1,showBandwidth:!1,keepScreenOn:!1,isNotMute:!1,hasAudio:!0,hasVideo:!0,operateBtns:{fullscreen:!1,screenshot:!1,play:!1,audio:!1,record:!1},controlAutoHide:!1,hasControl:!1,loadingText:"",background:"",decoder:"decoder.js",url:"",rotate:0,forceNoOffscreen:!0,hiddenAutoPause:!1,protocol:a,demuxType:n,useWCS:!1,wcsUseVideoRender:!0,useMSE:!1,useOffscreen:!1,autoWasm:!0,wasmDecodeErrorReplay:!0,openWebglAlignment:!1,wasmDecodeAudioSyncVideo:!1,recordType:c,useWebFullScreen:!1},u="init",h="initVideo",p="render",m="playAudio",g="initAudio",f="audioCode",b="videoCode",y="wasmError",v="Invalid NAL unit size",w=1,S=2,E=8,B=9,C="init",R="decode",k="audioDecode",T="close",I="updateConfig",x={fullscreen:"fullscreen$2",webFullscreen:"webFullscreen",decoderWorkerInit:"decoderWorkerInit",play:"play",playing:"playing",pause:"pause",mute:"mute",load:"load",loading:"loading",videoInfo:"videoInfo",timeUpdate:"timeUpdate",audioInfo:"audioInfo",log:"log",error:"error",kBps:"kBps",timeout:"timeout",delayTimeout:"delayTimeout",loadingTimeout:"loadingTimeout",stats:"stats",performance:"performance",record:"record",recording:"recording",recordingTimestamp:"recordingTimestamp",recordStart:"recordStart",recordEnd:"recordEnd",recordCreateError:"recordCreateError",buffer:"buffer",videoFrame:"videoFrame",start:"start",metadata:"metadata",resize:"resize",streamEnd:"streamEnd",streamSuccess:"streamSuccess",streamMessage:"streamMessage",streamError:"streamError",volumechange:"volumechange",destroy:"destroy",mseSourceOpen:"mseSourceOpen",mseSourceClose:"mseSourceClose",mseSourceBufferError:"mseSourceBufferError",mseSourceBufferBusy:"mseSourceBufferBusy",mseSourceBufferFull:"mseSourceBufferFull",videoWaiting:"videoWaiting",videoTimeUpdate:"videoTimeUpdate",videoSyncAudio:"videoSyncAudio",playToRenderTimes:"playToRenderTimes"},D={load:x.load,timeUpdate:x.timeUpdate,videoInfo:x.videoInfo,audioInfo:x.audioInfo,error:x.error,kBps:x.kBps,log:x.log,start:x.start,timeout:x.timeout,loadingTimeout:x.loadingTimeout,delayTimeout:x.delayTimeout,fullscreen:"fullscreen",webFullscreen:x.webFullscreen,play:x.play,pause:x.pause,mute:x.mute,stats:x.stats,volumechange:x.volumechange,performance:x.performance,recordingTimestamp:x.recordingTimestamp,recordStart:x.recordStart,recordEnd:x.recordEnd,playToRenderTimes:x.playToRenderTimes},j={playError:"playIsNotPauseOrUrlIsNull",fetchError:"fetchError",websocketError:"websocketError",webcodecsH265NotSupport:"webcodecsH265NotSupport",webcodecsDecodeError:"webcodecsDecodeError",webcodecsWidthOrHeightChange:"webcodecsWidthOrHeightChange",mediaSourceH265NotSupport:"mediaSourceH265NotSupport",mediaSourceFull:x.mseSourceBufferFull,mseSourceBufferError:x.mseSourceBufferError,mediaSourceAppendBufferError:"mediaSourceAppendBufferError",mediaSourceBufferListLarge:"mediaSourceBufferListLarge",mediaSourceAppendBufferEndTimeout:"mediaSourceAppendBufferEndTimeout",wasmDecodeError:"wasmDecodeError",webglAlignmentError:"webglAlignmentError"},L="notConnect",F="open",O="close",V="error",M={download:"download",base64:"base64",blob:"blob"},U={7:"H264(AVC)",12:"H265(HEVC)"},Q=12,W={10:"AAC",7:"ALAW",8:"MULAW"},J=38,P=0,G=1,N=2,H="webcodecs",z="webgl",Y="offscreen",X="key",q="delta",Z='video/mp4; codecs="avc1.64002A"',K="ended",_="open",$="closed",ee=1e3,te=27,ie=38,oe=40,re="A key frame is required after configure() or flush()",se="Cannot call 'decode' on a closed codec",ae="The user aborted a request",ne="AbortError",Ae="AbortError",de=0,ce=1,le=3,ue=16;class he{constructor(e){this.log=function(t){if(e._opt.debug){for(var i=arguments.length,o=new Array(i>1?i-1:0),r=1;r<i;r++)o[r-1]=arguments[r];console.log(`Jessibuca: [${t}]`,...o)}},this.warn=function(t){if(e._opt.debug){for(var i=arguments.length,o=new Array(i>1?i-1:0),r=1;r<i;r++)o[r-1]=arguments[r];console.warn(`Jessibuca: [${t}]`,...o)}},this.error=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),o=1;o<t;o++)i[o-1]=arguments[o];console.error(`Jessibuca: [${e}]`,...i)}}}class pe{constructor(e){this.destroys=[],this.proxy=this.proxy.bind(this),this.master=e}proxy(e,t,i){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!e)return;if(Array.isArray(t))return t.map((t=>this.proxy(e,t,i,o)));e.addEventListener(t,i,o);const r=()=>e.removeEventListener(t,i,o);return this.destroys.push(r),r}destroy(){this.master.debug&&this.master.debug.log("Events","destroy"),this.destroys.forEach((e=>e()))}}var me=t((function(e){!function(){var t="undefined"!=typeof window&&void 0!==window.document?window.document:{},i=e.exports,o=function(){for(var e,i=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],o=0,r=i.length,s={};o<r;o++)if((e=i[o])&&e[1]in t){for(o=0;o<e.length;o++)s[i[0][o]]=e[o];return s}return!1}(),r={change:o.fullscreenchange,error:o.fullscreenerror},s={request:function(e,i){return new Promise(function(r,s){var a=function(){this.off("change",a),r()}.bind(this);this.on("change",a);var n=(e=e||t.documentElement)[o.requestFullscreen](i);n instanceof Promise&&n.then(a).catch(s)}.bind(this))},exit:function(){return new Promise(function(e,i){if(this.isFullscreen){var r=function(){this.off("change",r),e()}.bind(this);this.on("change",r);var s=t[o.exitFullscreen]();s instanceof Promise&&s.then(r).catch(i)}else e()}.bind(this))},toggle:function(e,t){return this.isFullscreen?this.exit():this.request(e,t)},onchange:function(e){this.on("change",e)},onerror:function(e){this.on("error",e)},on:function(e,i){var o=r[e];o&&t.addEventListener(o,i,!1)},off:function(e,i){var o=r[e];o&&t.removeEventListener(o,i,!1)},raw:o};o?(Object.defineProperties(s,{isFullscreen:{get:function(){return Boolean(t[o.fullscreenElement])}},element:{enumerable:!0,get:function(){return t[o.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(t[o.fullscreenEnabled])}}}),i?e.exports=s:window.screenfull=s):i?e.exports={isEnabled:!1}:window.screenfull={isEnabled:!1}}()}));function ge(){}function fe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=e.split(","),i=atob(t[1]),o=t[0].replace("data:","").replace(";base64","");let r=i.length,s=new Uint8Array(r);for(;r--;)s[r]=i.charCodeAt(r);return new File([s],"file",{type:o})}function be(){return(new Date).getTime()}function ye(e,t,i){return Math.max(Math.min(e,Math.max(t,i)),Math.min(t,i))}function ve(e,t,i){if(e)return"object"==typeof t&&Object.keys(t).forEach((i=>{ve(e,i,t[i])})),e.style[t]=i,e}function we(e,t){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e)return 0;const o=getComputedStyle(e,null).getPropertyValue(t);return i?parseFloat(o):o}function Se(){return performance&&"function"==typeof performance.now?performance.now():Date.now()}function Ee(e){let t=0,i=Se();return o=>{t+=o;const r=Se(),s=r-i;s>=1e3&&(e(t/s*1e3),i=r,t=0)}}function Be(){return/iphone|ipod|android.*mobile|windows.*phone|blackberry.*mobile/i.test(window.navigator.userAgent.toLowerCase())}function Ce(e){if(null==e||""===e||0===parseInt(e)||isNaN(parseInt(e)))return"0KB/s";let t=parseFloat(e);return t=t.toFixed(2),t+"KB/s"}function Re(e){return null==e}function ke(e){return!Re(e)}function Te(e){const t=e||window.event;return t.target||t.srcElement}function Ie(e){let t=!1;return e&&e.parentNode&&(e.parentNode.removeChild(e),t=!0),t}function xe(e,t){let i=[];i[0]=t?28:44,i[1]=1,i[2]=0,i[3]=0,i[4]=0;const o=new Uint8Array(i.length+e.byteLength);return o.set(i,0),o.set(e,i.length),o}me.isEnabled,(()=>{try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch(e){}})();class De{on(e,t,i){const o=this.e||(this.e={});return(o[e]||(o[e]=[])).push({fn:t,ctx:i}),this}once(e,t,i){const o=this;function r(){o.off(e,r);for(var s=arguments.length,a=new Array(s),n=0;n<s;n++)a[n]=arguments[n];t.apply(i,a)}return r._=t,this.on(e,r,i)}emit(e){const t=((this.e||(this.e={}))[e]||[]).slice();for(var i=arguments.length,o=new Array(i>1?i-1:0),r=1;r<i;r++)o[r-1]=arguments[r];for(let e=0;e<t.length;e+=1)t[e].fn.apply(t[e].ctx,o);return this}off(e,t){const i=this.e||(this.e={});if(!e)return Object.keys(i).forEach((e=>{delete i[e]})),void delete this.e;const o=i[e],r=[];if(o&&t)for(let e=0,i=o.length;e<i;e+=1)o[e].fn!==t&&o[e].fn._!==t&&r.push(o[e]);return r.length?i[e]=r:delete i[e],this}}class je extends De{constructor(){super(),this.init=!1}resetInit(){this.init=!1,this.videoInfo={width:"",height:"",encType:"",encTypeCode:""}}destroy(){this.resetInit(),this.player.$container.removeChild(this.$videoElement),this.off()}updateVideoInfo(e){e.encTypeCode&&(this.videoInfo.encType=U[e.encTypeCode],this.videoInfo.encTypeCode=e.encTypeCode),e.width&&(this.videoInfo.width=e.width),e.height&&(this.videoInfo.height=e.height),this.videoInfo.encType&&this.videoInfo.height&&this.videoInfo.width&&!this.init&&(this.player.emit(x.videoInfo,this.videoInfo),this.init=!0)}play(){}pause(){}clearView(){}}var Le="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0;function Fe(e,t,i){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){Ue(o.response,t,i)},o.onerror=function(){console.error("could not download file")},o.send()}function Oe(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return t.status>=200&&t.status<=299}function Ve(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(i){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var Me=Le.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),Ue="object"!=typeof window||window!==Le?function(){}:"download"in HTMLAnchorElement.prototype&&!Me?function(e,t,i){var o=Le.URL||Le.webkitURL,r=document.createElementNS("http://www.w3.org/1999/xhtml","a");t=t||e.name||"download",r.download=t,r.rel="noopener","string"==typeof e?(r.href=e,r.origin!==location.origin?Oe(r.href)?Fe(e,t,i):Ve(r,r.target="_blank"):Ve(r)):(r.href=o.createObjectURL(e),setTimeout((function(){o.revokeObjectURL(r.href)}),4e4),setTimeout((function(){Ve(r)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,t,i){if(t=t||e.name||"download","string"==typeof e)if(Oe(e))Fe(e,t,i);else{var o=document.createElement("a");o.href=e,o.target="_blank",setTimeout((function(){Ve(o)}))}else navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}(e,i),t)}:function(e,t,i,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return Fe(e,t,i);var r="application/octet-stream"===e.type,s=/constructor/i.test(Le.HTMLElement)||Le.safari,a=/CriOS\/[\d]+/.test(navigator.userAgent);if((a||r&&s||Me)&&"undefined"!=typeof FileReader){var n=new FileReader;n.onloadend=function(){var e=n.result;e=a?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},n.readAsDataURL(e)}else{var A=Le.URL||Le.webkitURL,d=A.createObjectURL(e);o?o.location=d:location.href=d,o=null,setTimeout((function(){A.revokeObjectURL(d)}),4e4)}};class Qe extends je{constructor(e){super(),this.player=e;const t=document.createElement("canvas");t.style.position="absolute",t.style.top=0,t.style.left=0,this.$videoElement=t,e.$container.appendChild(this.$videoElement),this.context2D=null,this.contextGl=null,this.contextGlRender=null,this.contextGlDestroy=null,this.bitmaprenderer=null,this.renderType=null,this.videoInfo={width:"",height:"",encType:""},this._initCanvasRender(),this.player.debug.log("CanvasVideo","init")}destroy(){super.destroy(),this.contextGl&&(this.contextGl=null),this.context2D&&(this.context2D=null),this.contextGlRender&&(this.contextGlDestroy&&this.contextGlDestroy(),this.contextGlDestroy=null,this.contextGlRender=null),this.bitmaprenderer&&(this.bitmaprenderer=null),this.renderType=null,this.player.debug.log("CanvasVideoLoader","destroy")}_initContextGl(){if(this.contextGl=function(e){let t=null;const i=["webgl","experimental-webgl","moz-webgl","webkit-3d"];let o=0;for(;!t&&o<i.length;){const r=i[o];try{let i={preserveDrawingBuffer:!0};t=e.getContext(r,i)}catch(e){t=null}t&&"function"==typeof t.getParameter||(t=null),++o}return t}(this.$videoElement),this.contextGl){const e=((e,t)=>{var i=["attribute vec4 vertexPos;","attribute vec4 texturePos;","varying vec2 textureCoord;","void main()","{","gl_Position = vertexPos;","textureCoord = texturePos.xy;","}"].join("\n"),o=["precision highp float;","varying highp vec2 textureCoord;","uniform sampler2D ySampler;","uniform sampler2D uSampler;","uniform sampler2D vSampler;","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) {","highp float y = texture2D(ySampler, textureCoord).r;","highp float u = texture2D(uSampler, textureCoord).r;","highp float v = texture2D(vSampler, textureCoord).r;","gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;","}"].join("\n");t&&e.pixelStorei(e.UNPACK_ALIGNMENT,1);var r=e.createShader(e.VERTEX_SHADER);e.shaderSource(r,i),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS)||console.log("Vertex shader failed to compile: "+e.getShaderInfoLog(r));var s=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(s,o),e.compileShader(s),e.getShaderParameter(s,e.COMPILE_STATUS)||console.log("Fragment shader failed to compile: "+e.getShaderInfoLog(s));var a=e.createProgram();e.attachShader(a,r),e.attachShader(a,s),e.linkProgram(a),e.getProgramParameter(a,e.LINK_STATUS)||console.log("Program failed to compile: "+e.getProgramInfoLog(a)),e.useProgram(a);var n=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,n),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,1,-1,1,1,-1,-1,-1]),e.STATIC_DRAW);var A=e.getAttribLocation(a,"vertexPos");e.enableVertexAttribArray(A),e.vertexAttribPointer(A,2,e.FLOAT,!1,0,0);var d=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,d),e.bufferData(e.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),e.STATIC_DRAW);var c=e.getAttribLocation(a,"texturePos");function l(t,i){var o=e.createTexture();return e.bindTexture(e.TEXTURE_2D,o),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),e.bindTexture(e.TEXTURE_2D,null),e.uniform1i(e.getUniformLocation(a,t),i),o}e.enableVertexAttribArray(c),e.vertexAttribPointer(c,2,e.FLOAT,!1,0,0);var u=l("ySampler",0),h=l("uSampler",1),p=l("vSampler",2);return{render:function(t,i,o,r,s){e.viewport(0,0,t,i),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,u),e.texImage2D(e.TEXTURE_2D,0,e.LUMINANCE,t,i,0,e.LUMINANCE,e.UNSIGNED_BYTE,o),e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,h),e.texImage2D(e.TEXTURE_2D,0,e.LUMINANCE,t/2,i/2,0,e.LUMINANCE,e.UNSIGNED_BYTE,r),e.activeTexture(e.TEXTURE2),e.bindTexture(e.TEXTURE_2D,p),e.texImage2D(e.TEXTURE_2D,0,e.LUMINANCE,t/2,i/2,0,e.LUMINANCE,e.UNSIGNED_BYTE,s),e.drawArrays(e.TRIANGLE_STRIP,0,4)},destroy:function(){try{e.deleteProgram(a),e.deleteBuffer(n),e.deleteBuffer(d),e.deleteTexture(u),e.deleteTexture(h),e.deleteTexture(p)}catch(e){}}}})(this.contextGl,this.player._opt.openWebglAlignment);this.contextGlRender=e.render,this.contextGlDestroy=e.destroy}else this.player.debug.error("CanvasVideoLoader","init webgl fail")}_initContext2D(){this.context2D=this.$videoElement.getContext("2d")}_initCanvasRender(){this.player._opt.useWCS&&!this._supportOffscreen()?(this.renderType=H,this._initContext2D()):this._supportOffscreen()?(this.renderType=Y,this._bindOffscreen()):(this.renderType=z,this._initContextGl())}_supportOffscreen(){return"function"==typeof this.$videoElement.transferControlToOffscreen&&this.player._opt.useOffscreen}_bindOffscreen(){this.bitmaprenderer=this.$videoElement.getContext("bitmaprenderer")}initCanvasViewSize(){this.$videoElement.width=this.videoInfo.width,this.$videoElement.height=this.videoInfo.height,this.resize()}render(e){switch(this.player.videoTimestamp=e.ts,this.renderType){case Y:this.bitmaprenderer.transferFromImageBitmap(e.buffer);break;case z:this.contextGlRender(this.$videoElement.width,this.$videoElement.height,e.output[0],e.output[1],e.output[2]);break;case H:this.context2D.drawImage(e.videoFrame,0,0,this.$videoElement.width,this.$videoElement.height),(t=e.videoFrame).close?t.close():t.destroy&&t.destroy()}var t}screenshot(e,t,i,o){e=e||be(),o=o||M.download;const r={png:"image/png",jpeg:"image/jpeg",webp:"image/webp"};let s=.92;!r[t]&&M[t]&&(o=t,t="png",i=void 0),"string"==typeof i&&(o=i,i=void 0),void 0!==i&&(s=Number(i));const a=this.$videoElement.toDataURL(r[t]||r.png,s);if(o===M.base64)return a;{const t=fe(a);if(o===M.blob)return t;o===M.download&&Ue(t,e)}}clearView(){switch(this.renderType){case Y:(function(e,t){const i=document.createElement("canvas");return i.width=e,i.height=t,window.createImageBitmap(i,0,0,e,t)})(this.$videoElement.width,this.$videoElement.height).then((e=>{this.bitmaprenderer.transferFromImageBitmap(e)}));break;case z:this.contextGl.clear(this.contextGl.COLOR_BUFFER_BIT);break;case H:this.context2D.clearRect(0,0,this.$videoElement.width,this.$videoElement.height)}}resize(){this.player.debug.log("canvasVideo","resize");const e=this.player._opt;let t=this.player.width,i=this.player.height;e.hasControl&&!e.controlAutoHide&&(Be()&&this.player.fullscreen&&e.useWebFullScreen?t-=J:i-=J);let o=this.$videoElement.width,r=this.$videoElement.height;const s=e.rotate;let a=(t-o)/2,n=(i-r)/2;270!==s&&90!==s||(o=this.$videoElement.height,r=this.$videoElement.width);const A=t/o,d=i/r;let c=A>d?d:A;e.isResize||A!==d&&(c=A+","+d),e.isFullResize&&(c=A>d?A:d);let l="scale("+c+")";s&&(l+=" rotate("+s+"deg)"),this.$videoElement.style.transform=l,this.$videoElement.style.left=a+"px",this.$videoElement.style.top=n+"px"}}class We extends je{constructor(e){super(),this.player=e;const t=document.createElement("video"),i=document.createElement("canvas");t.muted=!0,t.style.position="absolute",t.style.top=0,t.style.left=0,this._delayPlay=!1,e.$container.appendChild(t),this.videoInfo={width:"",height:"",encType:""};const o=this.player._opt;o.useWCS&&o.wcsUseVideoRender&&(this.trackGenerator=new MediaStreamTrackGenerator({kind:"video"}),t.srcObject=new MediaStream([this.trackGenerator]),this.vwriter=this.trackGenerator.writable.getWriter()),this.$videoElement=t,this.$canvasElement=i,this.canvasContext=i.getContext("2d"),this.fixChromeVideoFlashBug(),this.resize();const{proxy:r}=this.player.events;r(this.$videoElement,"canplay",(()=>{this.player.debug.log("Video",`canplay and _delayPlay is ${this._delayPlay}`),this._delayPlay&&this._play()})),r(this.$videoElement,"waiting",(()=>{this.player.emit(x.videoWaiting)})),r(this.$videoElement,"timeupdate",(e=>{const t=parseInt(e.timeStamp,10);this.player.emit(x.timeUpdate,t),!this.isPlaying()&&this.init&&(this.player.debug.log("Video","timeupdate and this.isPlaying is false and retry play"),this.$videoElement.play())})),this.player.debug.log("Video","init")}destroy(){super.destroy(),this.$canvasElement=null,this.canvasContext=null,this.$videoElement&&(this.$videoElement.pause(),this.$videoElement.currentTime=0,this.$videoElement.src="",this.$videoElement.removeAttribute("src"),this.$videoElement=null),this.trackGenerator&&(this.trackGenerator.stop(),this.trackGenerator=null),this.vwriter&&(this.vwriter.close(),this.vwriter=null),this.player.debug.log("Video","destroy")}fixChromeVideoFlashBug(){const e=function(){const e=navigator.userAgent.toLowerCase(),t={},i={IE:window.ActiveXObject||"ActiveXObject"in window,Chrome:e.indexOf("chrome")>-1&&e.indexOf("safari")>-1,Firefox:e.indexOf("firefox")>-1,Opera:e.indexOf("opera")>-1,Safari:e.indexOf("safari")>-1&&-1==e.indexOf("chrome"),Edge:e.indexOf("edge")>-1,QQBrowser:/qqbrowser/.test(e),WeixinBrowser:/MicroMessenger/i.test(e)};for(let o in i)if(i[o]){let i="";if("IE"===o)i=e.match(/(msie\s|trident.*rv:)([\w.]+)/)[2];else if("Chrome"===o){for(let e in navigator.mimeTypes)"application/360softmgrplugin"===navigator.mimeTypes[e].type&&(o="360");i=e.match(/chrome\/([\d.]+)/)[1]}else"Firefox"===o?i=e.match(/firefox\/([\d.]+)/)[1]:"Opera"===o?i=e.match(/opera\/([\d.]+)/)[1]:"Safari"===o?i=e.match(/version\/([\d.]+)/)[1]:"Edge"===o?i=e.match(/edge\/([\d.]+)/)[1]:"QQBrowser"===o&&(i=e.match(/qqbrowser\/([\d.]+)/)[1]);t.type=o,t.version=parseInt(i)}return t}().type.toLowerCase();if("chrome"===e||"edge"===e){const e=this.player.$container;e.style.backdropFilter="blur(0px)",e.style.translateZ="0"}}play(){if(this.$videoElement){const e=this._getVideoReadyState();if(this.player.debug.log("Video",`play and readyState: ${e}`),0===e)return this.player.debug.warn("Video","readyState is 0 and set _delayPlay to true"),void(this._delayPlay=!0);this._play()}}_getVideoReadyState(){let e=0;return this.$videoElement&&(e=this.$videoElement.readyState),e}_play(){this.$videoElement&&this.$videoElement.play().then((()=>{this._delayPlay=!1,this.player.debug.log("Video","_play success"),setTimeout((()=>{this.isPlaying()||(this.player.debug.warn("Video","play failed and retry play"),this._play())}),100)})).catch((e=>{this.player.debug.error("Video","_play error",e)}))}pause(e){e?this.$videoElement&&this.$videoElement.pause():setTimeout((()=>{this.$videoElement&&this.$videoElement.pause()}),100)}clearView(){}screenshot(e,t,i,o){e=e||be(),o=o||M.download;const r={png:"image/png",jpeg:"image/jpeg",webp:"image/webp"};let s=.92;!r[t]&&M[t]&&(o=t,t="png",i=void 0),"string"==typeof i&&(o=i,i=void 0),void 0!==i&&(s=Number(i));const a=this.$videoElement;let n=this.$canvasElement;n.width=a.videoWidth,n.height=a.videoHeight,this.canvasContext.drawImage(a,0,0,n.width,n.height);const A=n.toDataURL(r[t]||r.png,s);if(this.canvasContext.clearRect(0,0,n.width,n.height),n.width=0,n.height=0,o===M.base64)return A;{const t=fe(A);if(o===M.blob)return t;o===M.download&&Ue(t,e)}}initCanvasViewSize(){this.resize()}render(e){this.vwriter&&this.vwriter.write(e.videoFrame)}resize(){let e=this.player.width,t=this.player.height;const i=this.player._opt,o=i.rotate;i.hasControl&&!i.controlAutoHide&&(Be()&&this.player.fullscreen&&i.useWebFullScreen?e-=J:t-=J),this.$videoElement.width=e,this.$videoElement.height=t,270!==o&&90!==o||(this.$videoElement.width=t,this.$videoElement.height=e);let r=(e-this.$videoElement.width)/2,s=(t-this.$videoElement.height)/2,a="contain";i.isResize||(a="fill"),i.isFullResize&&(a="none"),this.$videoElement.style.objectFit=a,this.$videoElement.style.transform="rotate("+o+"deg)",this.$videoElement.style.left=r+"px",this.$videoElement.style.top=s+"px"}isPlaying(){return this.$videoElement&&!this.$videoElement.paused}}class Je{constructor(e){return new(Je.getLoaderFactory(e._opt))(e)}static getLoaderFactory(e){return e.useMSE||e.useWCS&&!e.useOffscreen&&e.wcsUseVideoRender?We:Qe}}class Pe extends De{constructor(e){super(),this.bufferList=[],this.player=e,this.scriptNode=null,this.hasInitScriptNode=!1,this.audioContextChannel=null,this.audioContext=new(window.AudioContext||window.webkitAudioContext),this.gainNode=this.audioContext.createGain();const t=this.audioContext.createBufferSource();t.buffer=this.audioContext.createBuffer(1,1,22050),t.connect(this.audioContext.destination),t.noteOn?t.noteOn(0):t.start(0),this.audioBufferSourceNode=t,this.mediaStreamAudioDestinationNode=this.audioContext.createMediaStreamDestination(),this.audioEnabled(!0),this.gainNode.gain.value=0,this.playing=!1,this.audioSyncVideoOption={diff:null},this.audioInfo={encType:"",channels:"",sampleRate:""},this.init=!1,this.hasAudio=!1,this.on(x.videoSyncAudio,(e=>{this.audioSyncVideoOption=e})),this.player.debug.log("AudioContext","init")}resetInit(){this.init=!1,this.audioInfo={encType:"",channels:"",sampleRate:""}}destroy(){this.closeAudio(),this.resetInit(),this.audioContext.close(),this.audioContext=null,this.gainNode=null,this.hasAudio=!1,this.playing=!1,this.scriptNode&&(this.scriptNode.onaudioprocess=ge,this.scriptNode=null),this.audioBufferSourceNode=null,this.mediaStreamAudioDestinationNode=null,this.hasInitScriptNode=!1,this.audioSyncVideoOption={diff:null},this.off(),this.player.debug.log("AudioContext","destroy")}updateAudioInfo(e){e.encTypeCode&&(this.audioInfo.encType=W[e.encTypeCode],this.audioInfo.encTypeCode=e.encTypeCode),e.channels&&(this.audioInfo.channels=e.channels),e.sampleRate&&(this.audioInfo.sampleRate=e.sampleRate),this.audioInfo.sampleRate&&this.audioInfo.channels&&this.audioInfo.encType&&!this.init&&(this.player.emit(x.audioInfo,this.audioInfo),this.init=!0)}get isPlaying(){return this.playing}get isMute(){return 0===this.gainNode.gain.value}get volume(){return this.gainNode.gain.value}get bufferSize(){return this.bufferList.length}initScriptNode(){if(this.playing=!0,this.hasInitScriptNode)return;const e=this.audioInfo.channels,t=this.audioContext.createScriptProcessor(1024,0,e);t.onaudioprocess=t=>{const i=t.outputBuffer;if(this.bufferList.length&&this.playing){if(!this.player._opt.useWCS&&!this.player._opt.useMSE&&this.player._opt.wasmDecodeAudioSyncVideo){if(this.audioSyncVideoOption.diff>ee)return void this.player.debug.warn("AudioContext",`audioSyncVideoOption more than diff :${this.audioSyncVideoOption.diff}, waiting`);if(this.audioSyncVideoOption.diff<-1e3){this.player.debug.warn("AudioContext",`audioSyncVideoOption less than diff :${this.audioSyncVideoOption.diff}, dropping`);let e=this.bufferList.shift();for(;e.ts-this.player.videoTimestamp<-1e3&&this.bufferList.length>0;)e=this.bufferList.shift();if(0===this.bufferList.length)return}}if(0===this.bufferList.length)return;const t=this.bufferList.shift();t&&t.ts&&(this.player.audioTimestamp=t.ts);for(let o=0;o<e;o++){const e=t.buffer[o],r=i.getChannelData(o);for(let t=0;t<1024;t++)r[t]=e[t]||0}}},t.connect(this.gainNode),this.scriptNode=t,this.gainNode.connect(this.audioContext.destination),this.gainNode.connect(this.mediaStreamAudioDestinationNode),this.hasInitScriptNode=!0}mute(e){e?(this.isMute||this.player.emit(x.mute,e),this.setVolume(0),this.clear()):(this.isMute&&this.player.emit(x.mute,e),this.setVolume(.5))}setVolume(e){e=parseFloat(e).toFixed(2),isNaN(e)||(this.audioEnabled(!0),e=ye(e,0,1),this.gainNode.gain.value=e,this.gainNode.gain.setValueAtTime(e,this.audioContext.currentTime),this.player.emit(x.volumechange,this.player.volume))}closeAudio(){this.hasInitScriptNode&&(this.scriptNode&&this.scriptNode.disconnect(this.gainNode),this.gainNode&&this.gainNode.disconnect(this.audioContext.destination),this.gainNode&&this.gainNode.disconnect(this.mediaStreamAudioDestinationNode)),this.clear()}audioEnabled(e){e?"suspended"===this.audioContext.state&&this.audioContext.resume():"running"===this.audioContext.state&&this.audioContext.suspend()}isStateRunning(){return"running"===this.audioContext.state}isStateSuspended(){return"suspended"===this.audioContext.state}clear(){this.bufferList=[]}play(e,t){this.isMute||(this.hasAudio=!0,this.bufferList.push({buffer:e,ts:t}),this.bufferList.length>20&&(this.player.debug.warn("AudioContext",`bufferList is large: ${this.bufferList.length}`),this.bufferList.length>50&&this.bufferList.shift()))}pause(){this.audioSyncVideoOption={diff:null},this.playing=!1,this.clear()}resume(){this.playing=!0}}class Ge{constructor(e){return new(Ge.getLoaderFactory())(e)}static getLoaderFactory(){return Pe}}class Ne extends De{constructor(e){super(),this.player=e,this.playing=!1,this.abortController=new AbortController,this.streamRate=Ee((t=>{e.emit(x.kBps,(t/1024).toFixed(2))})),e.debug.log("FetchStream","init")}destroy(){this.abort(),this.off(),this.streamRate=null,this.player.debug.log("FetchStream","destroy")}fetchStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{demux:i}=this.player;this.player.debug.log("FetchStream","fetchStream",e,JSON.stringify(t)),this.player._times.streamStart=be();const o=Object.assign({signal:this.abortController.signal},{headers:t.headers||{}});fetch(e,o).then((e=>{const t=e.body.getReader();this.emit(x.streamSuccess);const o=()=>{t.read().then((e=>{let{done:t,value:r}=e;t?i.close():(this.streamRate&&this.streamRate(r.byteLength),i.dispatch(r),o())})).catch((e=>{i.close();const t=e.toString();-1===t.indexOf(ae)&&-1===t.indexOf(ne)&&e.name!==Ae&&(this.abort(),this.emit(j.fetchError,e),this.player.emit(x.error,j.fetchError))}))};o()})).catch((e=>{"AbortError"!==e.name&&(i.close(),this.abort(),this.emit(j.fetchError,e),this.player.emit(x.error,j.fetchError))}))}abort(){this.abortController&&(this.abortController.abort(),this.abortController=null)}}class He extends De{constructor(e){super(),this.player=e,this.socket=null,this.socketStatus=L,this.wsUrl=null,this.streamRate=Ee((t=>{e.emit(x.kBps,(t/1024).toFixed(2))})),e.debug.log("WebsocketLoader","init")}destroy(){this.socket&&(this.socket.close(1e3,"Client disconnecting"),this.socket=null),this.socketStatus=L,this.streamRate=null,this.wsUrl=null,this.off(),this.player.debug.log("websocketLoader","destroy")}_createWebSocket(){const e=this.player,{debug:t,events:{proxy:i},demux:o}=e;this.socket=new WebSocket(this.wsUrl),this.socket.binaryType="arraybuffer",i(this.socket,"open",(()=>{this.emit(x.streamSuccess),t.log("websocketLoader","socket open"),this.socketStatus=F})),i(this.socket,"message",(e=>{this.streamRate&&this.streamRate(e.data.byteLength),this._handleMessage(e.data)})),i(this.socket,"close",(()=>{t.log("websocketLoader","socket close"),this.emit(x.streamEnd),this.socketStatus=O})),i(this.socket,"error",(e=>{t.log("websocketLoader","socket error"),this.emit(j.websocketError,e),this.player.emit(x.error,j.websocketError),this.socketStatus=V,o.close(),t.log("websocketLoader","socket error:",e)}))}_handleMessage(e){const{demux:t}=this.player;t?t.dispatch(e):this.player.debug.warn("websocketLoader","websocket handle message demux is null")}fetchStream(e,t){this.player._times.streamStart=be(),this.wsUrl=e,this._createWebSocket()}}class ze{constructor(e){return new(ze.getLoaderFactory(e._opt.protocol))(e)}static getLoaderFactory(e){return e===a?Ne:e===s?He:void 0}}var Ye=t((function(t){function i(e,t){if(!e)throw"First parameter is required.";t=new o(e,t=t||{type:"video"});var s=this;function a(i){i&&(t.initCallback=function(){i(),i=t.initCallback=null});var o=new r(e,t);(h=new o(e,t)).record(),u("recording"),t.disableLogs||console.log("Initialized recorderType:",h.constructor.name,"for output-type:",t.type)}function n(e){if(e=e||function(){},h){if("paused"===s.state)return s.resumeRecording(),void setTimeout((function(){n(e)}),1);"recording"===s.state||t.disableLogs||console.warn('Recording state should be: "recording", however current state is: ',s.state),t.disableLogs||console.log("Stopped recording "+t.type+" stream."),"gif"!==t.type?h.stop(i):(h.stop(),i()),u("stopped")}else m();function i(i){if(h){Object.keys(h).forEach((function(e){"function"!=typeof h[e]&&(s[e]=h[e])}));var o=h.blob;if(!o){if(!i)throw"Recording failed.";h.blob=o=i}if(o&&!t.disableLogs&&console.log(o.type,"->",b(o.size)),e){var r;try{r=l.createObjectURL(o)}catch(e){}"function"==typeof e.call?e.call(s,r):e(r)}t.autoWriteToDisk&&d((function(e){var i={};i[t.type+"Blob"]=e,x.Store(i)}))}else"function"==typeof e.call?e.call(s,""):e("")}}function A(e){postMessage((new FileReaderSync).readAsDataURL(e))}function d(e,i){if(!e)throw"Pass a callback function over getDataURL.";var o=i?i.blob:(h||{}).blob;if(!o)return t.disableLogs||console.warn("Blob encoder did not finish its job yet."),void setTimeout((function(){d(e,i)}),1e3);if("undefined"==typeof Worker||navigator.mozGetUserMedia){var r=new FileReader;r.readAsDataURL(o),r.onload=function(t){e(t.target.result)}}else{var s=function(e){try{var t=l.createObjectURL(new Blob([e.toString(),"this.onmessage = function (eee) {"+e.name+"(eee.data);}"],{type:"application/javascript"})),i=new Worker(t);return l.revokeObjectURL(t),i}catch(e){}}(A);s.onmessage=function(t){e(t.data)},s.postMessage(o)}}function c(e){e=e||0,"paused"!==s.state?"stopped"!==s.state&&(e>=s.recordingDuration?n(s.onRecordingStopped):(e+=1e3,setTimeout((function(){c(e)}),1e3))):setTimeout((function(){c(e)}),1e3)}function u(e){s&&(s.state=e,"function"==typeof s.onStateChanged.call?s.onStateChanged.call(s,e):s.onStateChanged(e))}var h,p='It seems that recorder is destroyed or "startRecording" is not invoked for '+t.type+" recorder.";function m(){!0!==t.disableLogs&&console.warn(p)}var g={startRecording:function(i){return t.disableLogs||console.log("RecordRTC version: ",s.version),i&&(t=new o(e,i)),t.disableLogs||console.log("started recording "+t.type+" stream."),h?(h.clearRecordedData(),h.record(),u("recording"),s.recordingDuration&&c(),s):(a((function(){s.recordingDuration&&c()})),s)},stopRecording:n,pauseRecording:function(){h?"recording"===s.state?(u("paused"),h.pause(),t.disableLogs||console.log("Paused recording.")):t.disableLogs||console.warn("Unable to pause the recording. Recording state: ",s.state):m()},resumeRecording:function(){h?"paused"===s.state?(u("recording"),h.resume(),t.disableLogs||console.log("Resumed recording.")):t.disableLogs||console.warn("Unable to resume the recording. Recording state: ",s.state):m()},initRecorder:a,setRecordingDuration:function(e,t){if(void 0===e)throw"recordingDuration is required.";if("number"!=typeof e)throw"recordingDuration must be a number.";return s.recordingDuration=e,s.onRecordingStopped=t||function(){},{onRecordingStopped:function(e){s.onRecordingStopped=e}}},clearRecordedData:function(){h?(h.clearRecordedData(),t.disableLogs||console.log("Cleared old recorded data.")):m()},getBlob:function(){if(h)return h.blob;m()},getDataURL:d,toURL:function(){if(h)return l.createObjectURL(h.blob);m()},getInternalRecorder:function(){return h},save:function(e){h?y(h.blob,e):m()},getFromDisk:function(e){h?i.getFromDisk(t.type,e):m()},setAdvertisementArray:function(e){t.advertisement=[];for(var i=e.length,o=0;o<i;o++)t.advertisement.push({duration:o,image:e[o]})},blob:null,bufferSize:0,sampleRate:0,buffer:null,reset:function(){"recording"!==s.state||t.disableLogs||console.warn("Stop an active recorder."),h&&"function"==typeof h.clearRecordedData&&h.clearRecordedData(),h=null,u("inactive"),s.blob=null},onStateChanged:function(e){t.disableLogs||console.log("Recorder state changed:",e)},state:"inactive",getState:function(){return s.state},destroy:function(){var e=t.disableLogs;t={disableLogs:!0},s.reset(),u("destroyed"),g=s=null,E.AudioContextConstructor&&(E.AudioContextConstructor.close(),E.AudioContextConstructor=null),t.disableLogs=e,t.disableLogs||console.log("RecordRTC is destroyed.")},version:"5.6.2"};if(!this)return s=g,g;for(var f in g)this[f]=g[f];return s=this,g}function o(e,t){return t.recorderType||t.type||(t.audio&&t.video?t.type="video":t.audio&&!t.video&&(t.type="audio")),t.recorderType&&!t.type&&(t.recorderType===T||t.recorderType===k||t.recorderType===F?t.type="video":t.recorderType===D?t.type="gif":t.recorderType===R?t.type="audio":t.recorderType===C&&(w(e,"audio").length&&w(e,"video").length||!w(e,"audio").length&&w(e,"video").length?t.type="video":w(e,"audio").length&&!w(e,"video").length&&(t.type="audio"))),"undefined"!=typeof MediaRecorder&&"requestData"in MediaRecorder.prototype&&(t.mimeType||(t.mimeType="video/webm"),t.type||(t.type=t.mimeType.split("/")[0]),t.bitsPerSecond),t.type||(t.mimeType&&(t.type=t.mimeType.split("/")[0]),t.type||(t.type="audio")),t}function r(e,t){var i;return(m||u||h)&&(i=R),"undefined"!=typeof MediaRecorder&&"requestData"in MediaRecorder.prototype&&!m&&(i=C),"video"===t.type&&(m||h)&&(i=T,"undefined"!=typeof ReadableStream&&(i=F)),"gif"===t.type&&(i=D),"canvas"===t.type&&(i=k),B()&&i!==k&&i!==D&&"undefined"!=typeof MediaRecorder&&"requestData"in MediaRecorder.prototype&&(w(e,"video").length||w(e,"audio").length)&&("audio"===t.type?"function"==typeof MediaRecorder.isTypeSupported&&MediaRecorder.isTypeSupported("audio/webm")&&(i=C):"function"==typeof MediaRecorder.isTypeSupported&&MediaRecorder.isTypeSupported("video/webm")&&(i=C)),e instanceof Array&&e.length&&(i=L),t.recorderType&&(i=t.recorderType),!t.disableLogs&&i&&i.name&&console.log("Using recorderType:",i.name||i.constructor.name),!i&&g&&(i=C),i}function s(e){this.addStream=function(t){t&&(e=t)},this.mediaType={audio:!0,video:!0},this.startRecording=function(){var t,o=this.mediaType,r=this.mimeType||{audio:null,video:null,gif:null};if("function"!=typeof o.audio&&B()&&!w(e,"audio").length&&(o.audio=!1),"function"!=typeof o.video&&B()&&!w(e,"video").length&&(o.video=!1),"function"!=typeof o.gif&&B()&&!w(e,"video").length&&(o.gif=!1),!o.audio&&!o.video&&!o.gif)throw"MediaStream must have either audio or video tracks.";if(o.audio&&(t=null,"function"==typeof o.audio&&(t=o.audio),this.audioRecorder=new i(e,{type:"audio",bufferSize:this.bufferSize,sampleRate:this.sampleRate,numberOfAudioChannels:this.numberOfAudioChannels||2,disableLogs:this.disableLogs,recorderType:t,mimeType:r.audio,timeSlice:this.timeSlice,onTimeStamp:this.onTimeStamp}),o.video||this.audioRecorder.startRecording()),o.video){t=null,"function"==typeof o.video&&(t=o.video);var s=e;if(B()&&o.audio&&"function"==typeof o.audio){var a=w(e,"video")[0];p?((s=new f).addTrack(a),t&&t===T&&(t=C)):(s=new f).addTrack(a)}this.videoRecorder=new i(s,{type:"video",video:this.video,canvas:this.canvas,frameInterval:this.frameInterval||10,disableLogs:this.disableLogs,recorderType:t,mimeType:r.video,timeSlice:this.timeSlice,onTimeStamp:this.onTimeStamp,workerPath:this.workerPath,webAssemblyPath:this.webAssemblyPath,frameRate:this.frameRate,bitrate:this.bitrate}),o.audio||this.videoRecorder.startRecording()}if(o.audio&&o.video){var n=this,A=!0===B();(o.audio instanceof R&&o.video||!0!==o.audio&&!0!==o.video&&o.audio!==o.video)&&(A=!1),!0===A?(n.audioRecorder=null,n.videoRecorder.startRecording()):n.videoRecorder.initRecorder((function(){n.audioRecorder.initRecorder((function(){n.videoRecorder.startRecording(),n.audioRecorder.startRecording()}))}))}o.gif&&(t=null,"function"==typeof o.gif&&(t=o.gif),this.gifRecorder=new i(e,{type:"gif",frameRate:this.frameRate||200,quality:this.quality||10,disableLogs:this.disableLogs,recorderType:t,mimeType:r.gif}),this.gifRecorder.startRecording())},this.stopRecording=function(e){e=e||function(){},this.audioRecorder&&this.audioRecorder.stopRecording((function(t){e(t,"audio")})),this.videoRecorder&&this.videoRecorder.stopRecording((function(t){e(t,"video")})),this.gifRecorder&&this.gifRecorder.stopRecording((function(t){e(t,"gif")}))},this.pauseRecording=function(){this.audioRecorder&&this.audioRecorder.pauseRecording(),this.videoRecorder&&this.videoRecorder.pauseRecording(),this.gifRecorder&&this.gifRecorder.pauseRecording()},this.resumeRecording=function(){this.audioRecorder&&this.audioRecorder.resumeRecording(),this.videoRecorder&&this.videoRecorder.resumeRecording(),this.gifRecorder&&this.gifRecorder.resumeRecording()},this.getBlob=function(e){var t={};return this.audioRecorder&&(t.audio=this.audioRecorder.getBlob()),this.videoRecorder&&(t.video=this.videoRecorder.getBlob()),this.gifRecorder&&(t.gif=this.gifRecorder.getBlob()),e&&e(t),t},this.destroy=function(){this.audioRecorder&&(this.audioRecorder.destroy(),this.audioRecorder=null),this.videoRecorder&&(this.videoRecorder.destroy(),this.videoRecorder=null),this.gifRecorder&&(this.gifRecorder.destroy(),this.gifRecorder=null)},this.getDataURL=function(e){function t(e,t){if("undefined"!=typeof Worker){var i=function(e){var t,i=l.createObjectURL(new Blob([e.toString(),"this.onmessage = function (eee) {"+e.name+"(eee.data);}"],{type:"application/javascript"})),o=new Worker(i);if(void 0!==l)t=l;else{if("undefined"==typeof webkitURL)throw"Neither URL nor webkitURL detected.";t=webkitURL}return t.revokeObjectURL(i),o}((function(e){postMessage((new FileReaderSync).readAsDataURL(e))}));i.onmessage=function(e){t(e.data)},i.postMessage(e)}else{var o=new FileReader;o.readAsDataURL(e),o.onload=function(e){t(e.target.result)}}}this.getBlob((function(i){i.audio&&i.video?t(i.audio,(function(o){t(i.video,(function(t){e({audio:o,video:t})}))})):i.audio?t(i.audio,(function(t){e({audio:t})})):i.video&&t(i.video,(function(t){e({video:t})}))}))},this.writeToDisk=function(){i.writeToDisk({audio:this.audioRecorder,video:this.videoRecorder,gif:this.gifRecorder})},this.save=function(e){(e=e||{audio:!0,video:!0,gif:!0}).audio&&this.audioRecorder&&this.audioRecorder.save("string"==typeof e.audio?e.audio:""),e.video&&this.videoRecorder&&this.videoRecorder.save("string"==typeof e.video?e.video:""),e.gif&&this.gifRecorder&&this.gifRecorder.save("string"==typeof e.gif?e.gif:"")}}i.version="5.6.2",t.exports=i,i.getFromDisk=function(e,t){if(!t)throw"callback is mandatory.";console.log("Getting recorded "+("all"===e?"blobs":e+" blob ")+" from disk!"),x.Fetch((function(i,o){"all"!==e&&o===e+"Blob"&&t&&t(i),"all"===e&&t&&t(i,o.replace("Blob",""))}))},i.writeToDisk=function(e){console.log("Writing recorded blob(s) to disk!"),(e=e||{}).audio&&e.video&&e.gif?e.audio.getDataURL((function(t){e.video.getDataURL((function(i){e.gif.getDataURL((function(e){x.Store({audioBlob:t,videoBlob:i,gifBlob:e})}))}))})):e.audio&&e.video?e.audio.getDataURL((function(t){e.video.getDataURL((function(e){x.Store({audioBlob:t,videoBlob:e})}))})):e.audio&&e.gif?e.audio.getDataURL((function(t){e.gif.getDataURL((function(e){x.Store({audioBlob:t,gifBlob:e})}))})):e.video&&e.gif?e.video.getDataURL((function(t){e.gif.getDataURL((function(e){x.Store({videoBlob:t,gifBlob:e})}))})):e.audio?e.audio.getDataURL((function(e){x.Store({audioBlob:e})})):e.video?e.video.getDataURL((function(e){x.Store({videoBlob:e})})):e.gif&&e.gif.getDataURL((function(e){x.Store({gifBlob:e})}))},s.getFromDisk=i.getFromDisk,s.writeToDisk=i.writeToDisk,i.MRecordRTC=s;var a;(a=void 0!==e?e:null)&&"undefined"==typeof window&&void 0!==e&&(e.navigator={userAgent:"Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45",getUserMedia:function(){}},e.console||(e.console={}),void 0!==e.console.log&&void 0!==e.console.error||(e.console.error=e.console.log=e.console.log||function(){console.log(arguments)}),"undefined"==typeof document&&(a.document={documentElement:{appendChild:function(){return""}}},document.createElement=document.captureStream=document.mozCaptureStream=function(){var e={getContext:function(){return e},play:function(){},pause:function(){},drawImage:function(){},toDataURL:function(){return""},style:{}};return e},a.HTMLVideoElement=function(){}),"undefined"==typeof location&&(a.location={protocol:"file:",href:"",hash:""}),"undefined"==typeof screen&&(a.screen={width:0,height:0}),void 0===l&&(a.URL={createObjectURL:function(){return""},revokeObjectURL:function(){return""}}),a.window=e);var n=window.requestAnimationFrame;if(void 0===n)if("undefined"!=typeof webkitRequestAnimationFrame)n=webkitRequestAnimationFrame;else if("undefined"!=typeof mozRequestAnimationFrame)n=mozRequestAnimationFrame;else if("undefined"!=typeof msRequestAnimationFrame)n=msRequestAnimationFrame;else if(void 0===n){var A=0;n=function(e,t){var i=(new Date).getTime(),o=Math.max(0,16-(i-A)),r=setTimeout((function(){e(i+o)}),o);return A=i+o,r}}var d=window.cancelAnimationFrame;void 0===d&&("undefined"!=typeof webkitCancelAnimationFrame?d=webkitCancelAnimationFrame:"undefined"!=typeof mozCancelAnimationFrame?d=mozCancelAnimationFrame:"undefined"!=typeof msCancelAnimationFrame?d=msCancelAnimationFrame:void 0===d&&(d=function(e){clearTimeout(e)}));var c=window.AudioContext;void 0===c&&("undefined"!=typeof webkitAudioContext&&(c=webkitAudioContext),"undefined"!=typeof mozAudioContext&&(c=mozAudioContext));var l=window.URL;void 0===l&&"undefined"!=typeof webkitURL&&(l=webkitURL),"undefined"!=typeof navigator&&void 0===navigator.getUserMedia&&(void 0!==navigator.webkitGetUserMedia&&(navigator.getUserMedia=navigator.webkitGetUserMedia),void 0!==navigator.mozGetUserMedia&&(navigator.getUserMedia=navigator.mozGetUserMedia));var u=!(-1===navigator.userAgent.indexOf("Edge")||!navigator.msSaveBlob&&!navigator.msSaveOrOpenBlob),h=!!window.opera||-1!==navigator.userAgent.indexOf("OPR/"),p=navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&"netscape"in window&&/ rv:/.test(navigator.userAgent),m=!h&&!u&&!!navigator.webkitGetUserMedia||v()||-1!==navigator.userAgent.toLowerCase().indexOf("chrome/"),g=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);g&&!m&&-1!==navigator.userAgent.indexOf("CriOS")&&(g=!1,m=!0);var f=window.MediaStream;function b(e){if(0===e)return"0 Bytes";var t=parseInt(Math.floor(Math.log(e)/Math.log(1e3)),10);return(e/Math.pow(1e3,t)).toPrecision(3)+" "+["Bytes","KB","MB","GB","TB"][t]}function y(e,t){if(!e)throw"Blob object is required.";if(!e.type)try{e.type="video/webm"}catch(e){}var i=(e.type||"video/webm").split("/")[1];if(-1!==i.indexOf(";")&&(i=i.split(";")[0]),t&&-1!==t.indexOf(".")){var o=t.split(".");t=o[0],i=o[1]}var r=(t||Math.round(9999999999*Math.random())+888888888)+"."+i;if(void 0!==navigator.msSaveOrOpenBlob)return navigator.msSaveOrOpenBlob(e,r);if(void 0!==navigator.msSaveBlob)return navigator.msSaveBlob(e,r);var s=document.createElement("a");s.href=l.createObjectURL(e),s.download=r,s.style="display:none;opacity:0;color:transparent;",(document.body||document.documentElement).appendChild(s),"function"==typeof s.click?s.click():(s.target="_blank",s.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0}))),l.revokeObjectURL(s.href)}function v(){return"undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type||(!("undefined"==typeof process||"object"!=typeof process.versions||!process.versions.electron)||"object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Electron")>=0)}function w(e,t){return e&&e.getTracks?e.getTracks().filter((function(e){return e.kind===(t||"audio")})):[]}function S(e,t){"srcObject"in t?t.srcObject=e:"mozSrcObject"in t?t.mozSrcObject=e:t.srcObject=e}void 0===f&&"undefined"!=typeof webkitMediaStream&&(f=webkitMediaStream),void 0!==f&&void 0===f.prototype.stop&&(f.prototype.stop=function(){this.getTracks().forEach((function(e){e.stop()}))}),i.invokeSaveAsDialog=y,i.getTracks=w,i.getSeekableBlob=function(e,t){if("undefined"==typeof EBML)throw new Error("Please link: https://www.webrtc-experiment.com/EBML.js");var i=new EBML.Reader,o=new EBML.Decoder,r=EBML.tools,s=new FileReader;s.onload=function(e){o.decode(this.result).forEach((function(e){i.read(e)})),i.stop();var s=r.makeMetadataSeekable(i.metadatas,i.duration,i.cues),a=this.result.slice(i.metadataSize),n=new Blob([s,a],{type:"video/webm"});t(n)},s.readAsArrayBuffer(e)},i.bytesToSize=b,i.isElectron=v;var E={};function B(){if(p||g||u)return!0;var e,t,i=navigator.userAgent,o=""+parseFloat(navigator.appVersion),r=parseInt(navigator.appVersion,10);return(m||h)&&(e=i.indexOf("Chrome"),o=i.substring(e+7)),-1!==(t=o.indexOf(";"))&&(o=o.substring(0,t)),-1!==(t=o.indexOf(" "))&&(o=o.substring(0,t)),r=parseInt(""+o,10),isNaN(r)&&(o=""+parseFloat(navigator.appVersion),r=parseInt(navigator.appVersion,10)),r>=49}function C(e,t){var i=this;if(void 0===e)throw'First argument "MediaStream" is required.';if("undefined"==typeof MediaRecorder)throw"Your browser does not support the Media Recorder API. Please try other modules e.g. WhammyRecorder or StereoAudioRecorder.";if("audio"===(t=t||{mimeType:"video/webm"}).type){var o;if(w(e,"video").length&&w(e,"audio").length)navigator.mozGetUserMedia?(o=new f).addTrack(w(e,"audio")[0]):o=new f(w(e,"audio")),e=o;t.mimeType&&-1!==t.mimeType.toString().toLowerCase().indexOf("audio")||(t.mimeType=m?"audio/webm":"audio/ogg"),t.mimeType&&"audio/ogg"!==t.mimeType.toString().toLowerCase()&&navigator.mozGetUserMedia&&(t.mimeType="audio/ogg")}var r,s=[];function a(){i.timestamps.push((new Date).getTime()),"function"==typeof t.onTimeStamp&&t.onTimeStamp(i.timestamps[i.timestamps.length-1],i.timestamps)}function n(e){return r&&r.mimeType?r.mimeType:e.mimeType||"video/webm"}function A(){s=[],r=null,i.timestamps=[]}this.getArrayOfBlobs=function(){return s},this.record=function(){i.blob=null,i.clearRecordedData(),i.timestamps=[],d=[],s=[];var o=t;t.disableLogs||console.log("Passing following config over MediaRecorder API.",o),r&&(r=null),m&&!B()&&(o="video/vp8"),"function"==typeof MediaRecorder.isTypeSupported&&o.mimeType&&(MediaRecorder.isTypeSupported(o.mimeType)||(t.disableLogs||console.warn("MediaRecorder API seems unable to record mimeType:",o.mimeType),o.mimeType="audio"===t.type?"audio/webm":"video/webm"));try{r=new MediaRecorder(e,o),t.mimeType=o.mimeType}catch(t){r=new MediaRecorder(e)}o.mimeType&&!MediaRecorder.isTypeSupported&&"canRecordMimeType"in r&&!1===r.canRecordMimeType(o.mimeType)&&(t.disableLogs||console.warn("MediaRecorder API seems unable to record mimeType:",o.mimeType)),r.ondataavailable=function(e){if(e.data&&d.push("ondataavailable: "+b(e.data.size)),"number"!=typeof t.timeSlice)!e.data||!e.data.size||e.data.size<100||i.blob?i.recordingCallback&&(i.recordingCallback(new Blob([],{type:n(o)})),i.recordingCallback=null):(i.blob=t.getNativeBlob?e.data:new Blob([e.data],{type:n(o)}),i.recordingCallback&&(i.recordingCallback(i.blob),i.recordingCallback=null));else if(e.data&&e.data.size&&(s.push(e.data),a(),"function"==typeof t.ondataavailable)){var r=t.getNativeBlob?e.data:new Blob([e.data],{type:n(o)});t.ondataavailable(r)}},r.onstart=function(){d.push("started")},r.onpause=function(){d.push("paused")},r.onresume=function(){d.push("resumed")},r.onstop=function(){d.push("stopped")},r.onerror=function(e){e&&(e.name||(e.name="UnknownError"),d.push("error: "+e),t.disableLogs||(-1!==e.name.toString().toLowerCase().indexOf("invalidstate")?console.error("The MediaRecorder is not in a state in which the proposed operation is allowed to be executed.",e):-1!==e.name.toString().toLowerCase().indexOf("notsupported")?console.error("MIME type (",o.mimeType,") is not supported.",e):-1!==e.name.toString().toLowerCase().indexOf("security")?console.error("MediaRecorder security error",e):"OutOfMemory"===e.name?console.error("The UA has exhaused the available memory. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"IllegalStreamModification"===e.name?console.error("A modification to the stream has occurred that makes it impossible to continue recording. An example would be the addition of a Track while recording is occurring. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"OtherRecordingError"===e.name?console.error("Used for an fatal error other than those listed above. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"GenericError"===e.name?console.error("The UA cannot provide the codec or recording option that has been requested.",e):console.error("MediaRecorder Error",e)),function(e){if(!i.manuallyStopped&&r&&"inactive"===r.state)return delete t.timeslice,void r.start(6e5);setTimeout(void 0,1e3)}(),"inactive"!==r.state&&"stopped"!==r.state&&r.stop())},"number"==typeof t.timeSlice?(a(),r.start(t.timeSlice)):r.start(36e5),t.initCallback&&t.initCallback()},this.timestamps=[],this.stop=function(e){e=e||function(){},i.manuallyStopped=!0,r&&(this.recordingCallback=e,"recording"===r.state&&r.stop(),"number"==typeof t.timeSlice&&setTimeout((function(){i.blob=new Blob(s,{type:n(t)}),i.recordingCallback(i.blob)}),100))},this.pause=function(){r&&"recording"===r.state&&r.pause()},this.resume=function(){r&&"paused"===r.state&&r.resume()},this.clearRecordedData=function(){r&&"recording"===r.state&&i.stop(A),A()},this.getInternalRecorder=function(){return r},this.blob=null,this.getState=function(){return r&&r.state||"inactive"};var d=[];this.getAllStates=function(){return d},void 0===t.checkForInactiveTracks&&(t.checkForInactiveTracks=!1);i=this;!function o(){if(r&&!1!==t.checkForInactiveTracks)return!1===function(){if("active"in e){if(!e.active)return!1}else if("ended"in e&&e.ended)return!1;return!0}()?(t.disableLogs||console.log("MediaStream seems stopped."),void i.stop()):void setTimeout(o,1e3)}(),this.name="MediaStreamRecorder",this.toString=function(){return this.name}}function R(e,t){if(!w(e,"audio").length)throw"Your stream has no audio tracks.";var o,r=this,s=[],a=[],n=!1,A=0,d=2,c=(t=t||{}).desiredSampRate;function u(){if(!1===t.checkForInactiveTracks)return!0;if("active"in e){if(!e.active)return!1}else if("ended"in e&&e.ended)return!1;return!0}function h(e,t){function i(e,t){var i,o=e.numberOfAudioChannels,r=e.leftBuffers.slice(0),s=e.rightBuffers.slice(0),a=e.sampleRate,n=e.internalInterleavedLength,A=e.desiredSampRate;function d(e,t,i){var o=Math.round(e.length*(t/i)),r=[],s=Number((e.length-1)/(o-1));r[0]=e[0];for(var a=1;a<o-1;a++){var n=a*s,A=Number(Math.floor(n)).toFixed(),d=Number(Math.ceil(n)).toFixed(),l=n-A;r[a]=c(e[A],e[d],l)}return r[o-1]=e[e.length-1],r}function c(e,t,i){return e+(t-e)*i}function l(e,t){for(var i=new Float64Array(t),o=0,r=e.length,s=0;s<r;s++){var a=e[s];i.set(a,o),o+=a.length}return i}function u(e,t,i){for(var o=i.length,r=0;r<o;r++)e.setUint8(t+r,i.charCodeAt(r))}2===o&&(r=l(r,n),s=l(s,n),A&&(r=d(r,A,a),s=d(s,A,a))),1===o&&(r=l(r,n),A&&(r=d(r,A,a))),A&&(a=A),2===o&&(i=function(e,t){for(var i=e.length+t.length,o=new Float64Array(i),r=0,s=0;s<i;)o[s++]=e[r],o[s++]=t[r],r++;return o}(r,s)),1===o&&(i=r);var h=i.length,p=new ArrayBuffer(44+2*h),m=new DataView(p);u(m,0,"RIFF"),m.setUint32(4,36+2*h,!0),u(m,8,"WAVE"),u(m,12,"fmt "),m.setUint32(16,16,!0),m.setUint16(20,1,!0),m.setUint16(22,o,!0),m.setUint32(24,a,!0),m.setUint32(28,a*o*2,!0),m.setUint16(32,2*o,!0),m.setUint16(34,16,!0),u(m,36,"data"),m.setUint32(40,2*h,!0);for(var g=h,f=44,b=0;b<g;b++)m.setInt16(f,32767*i[b],!0),f+=2;if(t)return t({buffer:p,view:m});postMessage({buffer:p,view:m})}if(e.noWorker)i(e,(function(e){t(e.buffer,e.view)}));else{var o,r,s,a=(o=i,r=l.createObjectURL(new Blob([o.toString(),";this.onmessage = function (eee) {"+o.name+"(eee.data);}"],{type:"application/javascript"})),(s=new Worker(r)).workerURL=r,s);a.onmessage=function(e){t(e.data.buffer,e.data.view),l.revokeObjectURL(a.workerURL),a.terminate()},a.postMessage(e)}}!0===t.leftChannel&&(d=1),1===t.numberOfAudioChannels&&(d=1),(!d||d<1)&&(d=2),t.disableLogs||console.log("StereoAudioRecorder is set to record number of channels: "+d),void 0===t.checkForInactiveTracks&&(t.checkForInactiveTracks=!0),this.record=function(){if(!1===u())throw"Please make sure MediaStream is active.";v(),E=y=!1,n=!0,void 0!==t.timeSlice&&C()},this.stop=function(e){e=e||function(){},n=!1,h({desiredSampRate:c,sampleRate:b,numberOfAudioChannels:d,internalInterleavedLength:A,leftBuffers:s,rightBuffers:1===d?[]:a,noWorker:t.noWorker},(function(t,i){r.blob=new Blob([i],{type:"audio/wav"}),r.buffer=new ArrayBuffer(i.buffer.byteLength),r.view=i,r.sampleRate=c||b,r.bufferSize=f,r.length=A,E=!1,e&&e(r.blob)}))},void 0===i.Storage&&(i.Storage={AudioContextConstructor:null,AudioContext:window.AudioContext||window.webkitAudioContext}),i.Storage.AudioContextConstructor&&"closed"!==i.Storage.AudioContextConstructor.state||(i.Storage.AudioContextConstructor=new i.Storage.AudioContext);var p=i.Storage.AudioContextConstructor,m=p.createMediaStreamSource(e),g=[0,256,512,1024,2048,4096,8192,16384],f=void 0===t.bufferSize?4096:t.bufferSize;if(-1===g.indexOf(f)&&(t.disableLogs||console.log("Legal values for buffer-size are "+JSON.stringify(g,null,"\t"))),p.createJavaScriptNode)o=p.createJavaScriptNode(f,d,d);else{if(!p.createScriptProcessor)throw"WebAudio API has no support on this browser.";o=p.createScriptProcessor(f,d,d)}m.connect(o),t.bufferSize||(f=o.bufferSize);var b=void 0!==t.sampleRate?t.sampleRate:p.sampleRate||44100;(b<22050||b>96e3)&&(t.disableLogs||console.log("sample-rate must be under range 22050 and 96000.")),t.disableLogs||t.desiredSampRate&&console.log("Desired sample-rate: "+t.desiredSampRate);var y=!1;function v(){s=[],a=[],A=0,E=!1,n=!1,y=!1,p=null,r.leftchannel=s,r.rightchannel=a,r.numberOfAudioChannels=d,r.desiredSampRate=c,r.sampleRate=b,r.recordingLength=A,B={left:[],right:[],recordingLength:0}}function S(){o&&(o.onaudioprocess=null,o.disconnect(),o=null),m&&(m.disconnect(),m=null),v()}this.pause=function(){y=!0},this.resume=function(){if(!1===u())throw"Please make sure MediaStream is active.";if(!n)return t.disableLogs||console.log("Seems recording has been restarted."),void this.record();y=!1},this.clearRecordedData=function(){t.checkForInactiveTracks=!1,n&&this.stop(S),S()},this.name="StereoAudioRecorder",this.toString=function(){return this.name};var E=!1;o.onaudioprocess=function(e){if(!y)if(!1===u()&&(t.disableLogs||console.log("MediaStream seems stopped."),o.disconnect(),n=!1),n){E||(E=!0,t.onAudioProcessStarted&&t.onAudioProcessStarted(),t.initCallback&&t.initCallback());var i=e.inputBuffer.getChannelData(0),c=new Float32Array(i);if(s.push(c),2===d){var l=e.inputBuffer.getChannelData(1),h=new Float32Array(l);a.push(h)}A+=f,r.recordingLength=A,void 0!==t.timeSlice&&(B.recordingLength+=f,B.left.push(c),2===d&&B.right.push(h))}else m&&(m.disconnect(),m=null)},p.createMediaStreamDestination?o.connect(p.createMediaStreamDestination()):o.connect(p.destination),this.leftchannel=s,this.rightchannel=a,this.numberOfAudioChannels=d,this.desiredSampRate=c,this.sampleRate=b,r.recordingLength=A;var B={left:[],right:[],recordingLength:0};function C(){n&&"function"==typeof t.ondataavailable&&void 0!==t.timeSlice&&(B.left.length?(h({desiredSampRate:c,sampleRate:b,numberOfAudioChannels:d,internalInterleavedLength:B.recordingLength,leftBuffers:B.left,rightBuffers:1===d?[]:B.right},(function(e,i){var o=new Blob([i],{type:"audio/wav"});t.ondataavailable(o),setTimeout(C,t.timeSlice)})),B={left:[],right:[],recordingLength:0}):setTimeout(C,t.timeSlice))}}function k(e,t){if("undefined"==typeof html2canvas)throw"Please link: https://www.webrtc-experiment.com/screenshot.js";(t=t||{}).frameInterval||(t.frameInterval=10);var i=!1;["captureStream","mozCaptureStream","webkitCaptureStream"].forEach((function(e){e in document.createElement("canvas")&&(i=!0)}));var o,r,s,a=!(!window.webkitRTCPeerConnection&&!window.webkitGetUserMedia||!window.chrome),n=50,A=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);if(a&&A&&A[2]&&(n=parseInt(A[2],10)),a&&n<52&&(i=!1),t.useWhammyRecorder&&(i=!1),i)if(t.disableLogs||console.log("Your browser supports both MediRecorder API and canvas.captureStream!"),e instanceof HTMLCanvasElement)o=e;else{if(!(e instanceof CanvasRenderingContext2D))throw"Please pass either HTMLCanvasElement or CanvasRenderingContext2D.";o=e.canvas}else navigator.mozGetUserMedia&&(t.disableLogs||console.error("Canvas recording is NOT supported in Firefox."));this.record=function(){if(s=!0,i&&!t.useWhammyRecorder){var e;"captureStream"in o?e=o.captureStream(25):"mozCaptureStream"in o?e=o.mozCaptureStream(25):"webkitCaptureStream"in o&&(e=o.webkitCaptureStream(25));try{var a=new f;a.addTrack(w(e,"video")[0]),e=a}catch(e){}if(!e)throw"captureStream API are NOT available.";(r=new C(e,{mimeType:t.mimeType||"video/webm"})).record()}else h.frames=[],u=(new Date).getTime(),l();t.initCallback&&t.initCallback()},this.getWebPImages=function(i){if("canvas"===e.nodeName.toLowerCase()){var o=h.frames.length;h.frames.forEach((function(e,i){var r=o-i;t.disableLogs||console.log(r+"/"+o+" frames remaining"),t.onEncodingCallback&&t.onEncodingCallback(r,o);var s=e.image.toDataURL("image/webp",1);h.frames[i].image=s})),t.disableLogs||console.log("Generating WebM"),i()}else i()},this.stop=function(e){s=!1;var o=this;i&&r?r.stop(e):this.getWebPImages((function(){h.compile((function(i){t.disableLogs||console.log("Recording finished!"),o.blob=i,o.blob.forEach&&(o.blob=new Blob([],{type:"video/webm"})),e&&e(o.blob),h.frames=[]}))}))};var d=!1;function c(){h.frames=[],s=!1,d=!1}function l(){if(d)return u=(new Date).getTime(),setTimeout(l,500);if("canvas"===e.nodeName.toLowerCase()){var i=(new Date).getTime()-u;return u=(new Date).getTime(),h.frames.push({image:(o=document.createElement("canvas"),r=o.getContext("2d"),o.width=e.width,o.height=e.height,r.drawImage(e,0,0),o),duration:i}),void(s&&setTimeout(l,t.frameInterval))}var o,r;html2canvas(e,{grabMouse:void 0===t.showMousePointer||t.showMousePointer,onrendered:function(e){var i=(new Date).getTime()-u;if(!i)return setTimeout(l,t.frameInterval);u=(new Date).getTime(),h.frames.push({image:e.toDataURL("image/webp",1),duration:i}),s&&setTimeout(l,t.frameInterval)}})}this.pause=function(){d=!0,r instanceof C&&r.pause()},this.resume=function(){d=!1,r instanceof C?r.resume():s||this.record()},this.clearRecordedData=function(){s&&this.stop(c),c()},this.name="CanvasRecorder",this.toString=function(){return this.name};var u=(new Date).getTime(),h=new I.Video(100)}function T(e,t){function i(e){e=void 0!==e?e:10;var t=(new Date).getTime()-A;return t?s?(A=(new Date).getTime(),setTimeout(i,100)):(A=(new Date).getTime(),n.paused&&n.play(),l.drawImage(n,0,0,c.width,c.height),d.frames.push({duration:t,image:c.toDataURL("image/webp")}),void(r||setTimeout(i,e,e))):setTimeout(i,e,e)}function o(e,t,i,o,r){var s=document.createElement("canvas");s.width=c.width,s.height=c.height;var a,n,A,d=s.getContext("2d"),l=[],u=-1===t,h=t&&t>0&&t<=e.length?t:e.length,p=0,m=0,g=0,f=Math.sqrt(Math.pow(255,2)+Math.pow(255,2)+Math.pow(255,2)),b=i&&i>=0&&i<=1?i:0,y=o&&o>=0&&o<=1?o:0,v=!1;n=-1,A=(a={length:h,functionToLoop:function(t,i){var o,r,s,a=function(){!v&&s-o<=s*y||(u&&(v=!0),l.push(e[i])),t()};if(v)a();else{var n=new Image;n.onload=function(){d.drawImage(n,0,0,c.width,c.height);var e=d.getImageData(0,0,c.width,c.height);o=0,r=e.data.length,s=e.data.length/4;for(var t=0;t<r;t+=4){var i={r:e.data[t],g:e.data[t+1],b:e.data[t+2]};Math.sqrt(Math.pow(i.r-p,2)+Math.pow(i.g-m,2)+Math.pow(i.b-g,2))<=f*b&&o++}a()},n.src=e[i].image}},callback:function(){(l=l.concat(e.slice(h))).length<=0&&l.push(e[e.length-1]),r(l)}}).length,function e(){++n!==A?setTimeout((function(){a.functionToLoop(e,n)}),1):a.callback()}()}(t=t||{}).frameInterval||(t.frameInterval=10),t.disableLogs||console.log("Using frames-interval:",t.frameInterval),this.record=function(){t.width||(t.width=320),t.height||(t.height=240),t.video||(t.video={width:t.width,height:t.height}),t.canvas||(t.canvas={width:t.width,height:t.height}),c.width=t.canvas.width||320,c.height=t.canvas.height||240,l=c.getContext("2d"),t.video&&t.video instanceof HTMLVideoElement?(n=t.video.cloneNode(),t.initCallback&&t.initCallback()):(n=document.createElement("video"),S(e,n),n.onloadedmetadata=function(){t.initCallback&&t.initCallback()},n.width=t.video.width,n.height=t.video.height),n.muted=!0,n.play(),A=(new Date).getTime(),d=new I.Video,t.disableLogs||(console.log("canvas resolutions",c.width,"*",c.height),console.log("video width/height",n.width||c.width,"*",n.height||c.height)),i(t.frameInterval)};var r=!1;this.stop=function(e){e=e||function(){},r=!0;var i=this;setTimeout((function(){o(d.frames,-1,null,null,(function(o){d.frames=o,t.advertisement&&t.advertisement.length&&(d.frames=t.advertisement.concat(d.frames)),d.compile((function(t){i.blob=t,i.blob.forEach&&(i.blob=new Blob([],{type:"video/webm"})),e&&e(i.blob)}))}))}),10)};var s=!1;function a(){d.frames=[],r=!0,s=!1}this.pause=function(){s=!0},this.resume=function(){s=!1,r&&this.record()},this.clearRecordedData=function(){r||this.stop(a),a()},this.name="WhammyRecorder",this.toString=function(){return this.name};var n,A,d,c=document.createElement("canvas"),l=c.getContext("2d")}void 0!==c?E.AudioContext=c:"undefined"!=typeof webkitAudioContext&&(E.AudioContext=webkitAudioContext),i.Storage=E,i.MediaStreamRecorder=C,i.StereoAudioRecorder=R,i.CanvasRecorder=k,i.WhammyRecorder=T;var I=function(){function e(e){this.frames=[],this.duration=e||1,this.quality=.8}function t(e){function t(e,t,i){return[{data:e,id:231}].concat(i.map((function(e){var i=function(e){var t=0;e.keyframe&&(t|=128);e.invisible&&(t|=8);e.lacing&&(t|=e.lacing<<1);e.discardable&&(t|=1);if(e.trackNum>127)throw"TrackNumber > 127 not supported";return[128|e.trackNum,e.timecode>>8,255&e.timecode,t].map((function(e){return String.fromCharCode(e)})).join("")+e.frame}({discardable:0,frame:e.data.slice(4),invisible:0,keyframe:1,lacing:0,trackNum:1,timecode:Math.round(t)});return t+=e.duration,{data:i,id:163}})))}function i(e){for(var t=[];e>0;)t.push(255&e),e>>=8;return new Uint8Array(t.reverse())}function o(e){var t=[];e=(e.length%8?new Array(9-e.length%8).join("0"):"")+e;for(var i=0;i<e.length;i+=8)t.push(parseInt(e.substr(i,8),2));return new Uint8Array(t)}function r(e){for(var t=[],s=0;s<e.length;s++){var a=e[s].data;"object"==typeof a&&(a=r(a)),"number"==typeof a&&(a=o(a.toString(2))),"string"==typeof a&&(a=new Uint8Array(a.split("").map((function(e){return e.charCodeAt(0)}))));var n=a.size||a.byteLength||a.length,A=Math.ceil(Math.ceil(Math.log(n)/Math.log(2))/8),d=n.toString(2),c=new Array(7*A+7+1-d.length).join("0")+d,l=new Array(A).join("0")+"1"+c;t.push(i(e[s].id)),t.push(o(l)),t.push(a)}return new Blob(t,{type:"video/webm"})}function s(e,t){return parseInt(e.substr(t+4,4).split("").map((function(e){var t=e.charCodeAt(0).toString(2);return new Array(8-t.length+1).join("0")+t})).join(""),2)}function a(e){for(var t=0,i={};t<e.length;){var o=e.substr(t,4),r=s(e,t),n=e.substr(t+4+4,r);t+=8+r,i[o]=i[o]||[],"RIFF"===o||"LIST"===o?i[o].push(a(n)):i[o].push(n)}return i}var n=new function(e){var i=function(e){if(!e[0])return void postMessage({error:"Something went wrong. Maybe WebP format is not supported in the current browser."});for(var t=e[0].width,i=e[0].height,o=e[0].duration,r=1;r<e.length;r++)o+=e[r].duration;return{duration:o,width:t,height:i}}(e);if(!i)return[];for(var o,s=[{id:440786851,data:[{data:1,id:17030},{data:1,id:17143},{data:4,id:17138},{data:8,id:17139},{data:"webm",id:17026},{data:2,id:17031},{data:2,id:17029}]},{id:408125543,data:[{id:357149030,data:[{data:1e6,id:2807729},{data:"whammy",id:19840},{data:"whammy",id:22337},{data:(o=i.duration,[].slice.call(new Uint8Array(new Float64Array([o]).buffer),0).map((function(e){return String.fromCharCode(e)})).reverse().join("")),id:17545}]},{id:374648427,data:[{id:174,data:[{data:1,id:215},{data:1,id:29637},{data:0,id:156},{data:"und",id:2274716},{data:"V_VP8",id:134},{data:"VP8",id:2459272},{data:1,id:131},{id:224,data:[{data:i.width,id:176},{data:i.height,id:186}]}]}]}]}],a=0,n=0;a<e.length;){var A=[],d=0;do{A.push(e[a]),d+=e[a].duration,a++}while(a<e.length&&d<3e4);var c={id:524531317,data:t(n,0,A)};s[1].data.push(c),n+=d}return r(s)}(e.map((function(e){var t=function(e){for(var t=e.RIFF[0].WEBP[0],i=t.indexOf("*"),o=0,r=[];o<4;o++)r[o]=t.charCodeAt(i+3+o);return{width:16383&(r[1]<<8|r[0]),height:16383&(r[3]<<8|r[2]),data:t,riff:e}}(a(atob(e.image.slice(23))));return t.duration=e.duration,t})));postMessage(n)}return e.prototype.add=function(e,t){if("canvas"in e&&(e=e.canvas),"toDataURL"in e&&(e=e.toDataURL("image/webp",this.quality)),!/^data:image\/webp;base64,/gi.test(e))throw"Input must be formatted properly as a base64 encoded DataURI of type image/webp";this.frames.push({image:e,duration:t||this.duration})},e.prototype.compile=function(e){var i,o,r,s=(i=t,o=l.createObjectURL(new Blob([i.toString(),"this.onmessage = function (eee) {"+i.name+"(eee.data);}"],{type:"application/javascript"})),r=new Worker(o),l.revokeObjectURL(o),r);s.onmessage=function(t){t.data.error?console.error(t.data.error):e(t.data)},s.postMessage(this.frames)},{Video:e}}();i.Whammy=I;var x={init:function(){var e=this;if("undefined"!=typeof indexedDB&&void 0!==indexedDB.open){var t,i=this.dbName||location.href.replace(/\/|:|#|%|\.|\[|\]/g,""),o=indexedDB.open(i,1);o.onerror=e.onError,o.onsuccess=function(){((t=o.result).onerror=e.onError,t.setVersion)?1!==t.version?t.setVersion(1).onsuccess=function(){r(t),s()}:s():s()},o.onupgradeneeded=function(e){r(e.target.result)}}else console.error("IndexedDB API are not available in this browser.");function r(t){t.createObjectStore(e.dataStoreName)}function s(){var i=t.transaction([e.dataStoreName],"readwrite");function o(t){i.objectStore(e.dataStoreName).get(t).onsuccess=function(i){e.callback&&e.callback(i.target.result,t)}}e.videoBlob&&i.objectStore(e.dataStoreName).put(e.videoBlob,"videoBlob"),e.gifBlob&&i.objectStore(e.dataStoreName).put(e.gifBlob,"gifBlob"),e.audioBlob&&i.objectStore(e.dataStoreName).put(e.audioBlob,"audioBlob"),o("audioBlob"),o("videoBlob"),o("gifBlob")}},Fetch:function(e){return this.callback=e,this.init(),this},Store:function(e){return this.audioBlob=e.audioBlob,this.videoBlob=e.videoBlob,this.gifBlob=e.gifBlob,this.init(),this},onError:function(e){console.error(JSON.stringify(e,null,"\t"))},dataStoreName:"recordRTC",dbName:null};function D(e,t){if("undefined"==typeof GIFEncoder){var i=document.createElement("script");i.src="https://www.webrtc-experiment.com/gif-recorder.js",(document.body||document.documentElement).appendChild(i)}t=t||{};var o=e instanceof CanvasRenderingContext2D||e instanceof HTMLCanvasElement;this.record=function(){"undefined"!=typeof GIFEncoder&&A?(o||(t.width||(t.width=c.offsetWidth||320),t.height||(t.height=c.offsetHeight||240),t.video||(t.video={width:t.width,height:t.height}),t.canvas||(t.canvas={width:t.width,height:t.height}),s.width=t.canvas.width||320,s.height=t.canvas.height||240,c.width=t.video.width||320,c.height=t.video.height||240),(u=new GIFEncoder).setRepeat(0),u.setDelay(t.frameRate||200),u.setQuality(t.quality||10),u.start(),"function"==typeof t.onGifRecordingStarted&&t.onGifRecordingStarted(),h=n((function e(i){if(!0!==p.clearedRecordedData){if(r)return setTimeout((function(){e(i)}),100);h=n(e),void 0===typeof l&&(l=i),i-l<90||(!o&&c.paused&&c.play(),o||a.drawImage(c,0,0,s.width,s.height),t.onGifPreview&&t.onGifPreview(s.toDataURL("image/png")),u.addFrame(a),l=i)}})),t.initCallback&&t.initCallback()):setTimeout(p.record,1e3)},this.stop=function(e){e=e||function(){},h&&d(h),this.blob=new Blob([new Uint8Array(u.stream().bin)],{type:"image/gif"}),e(this.blob),u.stream().bin=[]};var r=!1;this.pause=function(){r=!0},this.resume=function(){r=!1},this.clearRecordedData=function(){p.clearedRecordedData=!0,u&&(u.stream().bin=[])},this.name="GifRecorder",this.toString=function(){return this.name};var s=document.createElement("canvas"),a=s.getContext("2d");o&&(e instanceof CanvasRenderingContext2D?s=(a=e).canvas:e instanceof HTMLCanvasElement&&(a=e.getContext("2d"),s=e));var A=!0;if(!o){var c=document.createElement("video");c.muted=!0,c.autoplay=!0,c.playsInline=!0,A=!1,c.onloadedmetadata=function(){A=!0},S(e,c),c.play()}var l,u,h=null,p=this}function j(e,t){t=t||"multi-streams-mixer";var i=[],o=!1,r=document.createElement("canvas"),s=r.getContext("2d");r.style.opacity=0,r.style.position="absolute",r.style.zIndex=-1,r.style.top="-1000em",r.style.left="-1000em",r.className=t,(document.body||document.documentElement).appendChild(r),this.disableLogs=!1,this.frameInterval=10,this.width=360,this.height=240,this.useGainNode=!0;var a=this,n=window.AudioContext;void 0===n&&("undefined"!=typeof webkitAudioContext&&(n=webkitAudioContext),"undefined"!=typeof mozAudioContext&&(n=mozAudioContext));var A=window.URL;void 0===A&&"undefined"!=typeof webkitURL&&(A=webkitURL),"undefined"!=typeof navigator&&void 0===navigator.getUserMedia&&(void 0!==navigator.webkitGetUserMedia&&(navigator.getUserMedia=navigator.webkitGetUserMedia),void 0!==navigator.mozGetUserMedia&&(navigator.getUserMedia=navigator.mozGetUserMedia));var d=window.MediaStream;void 0===d&&"undefined"!=typeof webkitMediaStream&&(d=webkitMediaStream),void 0!==d&&void 0===d.prototype.stop&&(d.prototype.stop=function(){this.getTracks().forEach((function(e){e.stop()}))});var c={};function l(){if(!o){var e=i.length,t=!1,s=[];if(i.forEach((function(e){e.stream||(e.stream={}),e.stream.fullcanvas?t=e:s.push(e)})),t)r.width=t.stream.width,r.height=t.stream.height;else if(s.length){r.width=e>1?2*s[0].width:s[0].width;var n=1;3!==e&&4!==e||(n=2),5!==e&&6!==e||(n=3),7!==e&&8!==e||(n=4),9!==e&&10!==e||(n=5),r.height=s[0].height*n}else r.width=a.width||360,r.height=a.height||240;t&&t instanceof HTMLVideoElement&&u(t),s.forEach((function(e,t){u(e,t)})),setTimeout(l,a.frameInterval)}}function u(e,t){if(!o){var i=0,r=0,a=e.width,n=e.height;1===t&&(i=e.width),2===t&&(r=e.height),3===t&&(i=e.width,r=e.height),4===t&&(r=2*e.height),5===t&&(i=e.width,r=2*e.height),6===t&&(r=3*e.height),7===t&&(i=e.width,r=3*e.height),void 0!==e.stream.left&&(i=e.stream.left),void 0!==e.stream.top&&(r=e.stream.top),void 0!==e.stream.width&&(a=e.stream.width),void 0!==e.stream.height&&(n=e.stream.height),s.drawImage(e,i,r,a,n),"function"==typeof e.stream.onRender&&e.stream.onRender(s,i,r,a,n,t)}}function h(e){var i=document.createElement("video");return function(e,t){"srcObject"in t?t.srcObject=e:"mozSrcObject"in t?t.mozSrcObject=e:t.srcObject=e}(e,i),i.className=t,i.muted=!0,i.volume=0,i.width=e.width||a.width||360,i.height=e.height||a.height||240,i.play(),i}function p(t){i=[],(t=t||e).forEach((function(e){if(e.getTracks().filter((function(e){return"video"===e.kind})).length){var t=h(e);t.stream=e,i.push(t)}}))}void 0!==n?c.AudioContext=n:"undefined"!=typeof webkitAudioContext&&(c.AudioContext=webkitAudioContext),this.startDrawingFrames=function(){l()},this.appendStreams=function(t){if(!t)throw"First parameter is required.";t instanceof Array||(t=[t]),t.forEach((function(t){var o=new d;if(t.getTracks().filter((function(e){return"video"===e.kind})).length){var r=h(t);r.stream=t,i.push(r),o.addTrack(t.getTracks().filter((function(e){return"video"===e.kind}))[0])}if(t.getTracks().filter((function(e){return"audio"===e.kind})).length){var s=a.audioContext.createMediaStreamSource(t);a.audioDestination=a.audioContext.createMediaStreamDestination(),s.connect(a.audioDestination),o.addTrack(a.audioDestination.stream.getTracks().filter((function(e){return"audio"===e.kind}))[0])}e.push(o)}))},this.releaseStreams=function(){i=[],o=!0,a.gainNode&&(a.gainNode.disconnect(),a.gainNode=null),a.audioSources.length&&(a.audioSources.forEach((function(e){e.disconnect()})),a.audioSources=[]),a.audioDestination&&(a.audioDestination.disconnect(),a.audioDestination=null),a.audioContext&&a.audioContext.close(),a.audioContext=null,s.clearRect(0,0,r.width,r.height),r.stream&&(r.stream.stop(),r.stream=null)},this.resetVideoStreams=function(e){!e||e instanceof Array||(e=[e]),p(e)},this.name="MultiStreamsMixer",this.toString=function(){return this.name},this.getMixedStream=function(){o=!1;var t=function(){var e;p(),"captureStream"in r?e=r.captureStream():"mozCaptureStream"in r?e=r.mozCaptureStream():a.disableLogs||console.error("Upgrade to latest Chrome or otherwise enable this flag: chrome://flags/#enable-experimental-web-platform-features");var t=new d;return e.getTracks().filter((function(e){return"video"===e.kind})).forEach((function(e){t.addTrack(e)})),r.stream=t,t}(),i=function(){c.AudioContextConstructor||(c.AudioContextConstructor=new c.AudioContext);a.audioContext=c.AudioContextConstructor,a.audioSources=[],!0===a.useGainNode&&(a.gainNode=a.audioContext.createGain(),a.gainNode.connect(a.audioContext.destination),a.gainNode.gain.value=0);var t=0;if(e.forEach((function(e){if(e.getTracks().filter((function(e){return"audio"===e.kind})).length){t++;var i=a.audioContext.createMediaStreamSource(e);!0===a.useGainNode&&i.connect(a.gainNode),a.audioSources.push(i)}})),!t)return;return a.audioDestination=a.audioContext.createMediaStreamDestination(),a.audioSources.forEach((function(e){e.connect(a.audioDestination)})),a.audioDestination.stream}();return i&&i.getTracks().filter((function(e){return"audio"===e.kind})).forEach((function(e){t.addTrack(e)})),e.forEach((function(e){e.fullcanvas})),t}}function L(e,t){e=e||[];var i,o,r=this;(t=t||{elementClass:"multi-streams-mixer",mimeType:"video/webm",video:{width:360,height:240}}).frameInterval||(t.frameInterval=10),t.video||(t.video={}),t.video.width||(t.video.width=360),t.video.height||(t.video.height=240),this.record=function(){var r;i=new j(e,t.elementClass||"multi-streams-mixer"),(r=[],e.forEach((function(e){w(e,"video").forEach((function(e){r.push(e)}))})),r).length&&(i.frameInterval=t.frameInterval||10,i.width=t.video.width||360,i.height=t.video.height||240,i.startDrawingFrames()),t.previewStream&&"function"==typeof t.previewStream&&t.previewStream(i.getMixedStream()),(o=new C(i.getMixedStream(),t)).record()},this.stop=function(e){o&&o.stop((function(t){r.blob=t,e(t),r.clearRecordedData()}))},this.pause=function(){o&&o.pause()},this.resume=function(){o&&o.resume()},this.clearRecordedData=function(){o&&(o.clearRecordedData(),o=null),i&&(i.releaseStreams(),i=null)},this.addStreams=function(r){if(!r)throw"First parameter is required.";r instanceof Array||(r=[r]),e.concat(r),o&&i&&(i.appendStreams(r),t.previewStream&&"function"==typeof t.previewStream&&t.previewStream(i.getMixedStream()))},this.resetVideoStreams=function(e){i&&(!e||e instanceof Array||(e=[e]),i.resetVideoStreams(e))},this.getMixer=function(){return i},this.name="MultiStreamRecorder",this.toString=function(){return this.name}}function F(e,t){var i,o,r;function s(){return new ReadableStream({start:function(o){var r=document.createElement("canvas"),s=document.createElement("video"),a=!0;s.srcObject=e,s.muted=!0,s.height=t.height,s.width=t.width,s.volume=0,s.onplaying=function(){r.width=t.width,r.height=t.height;var e=r.getContext("2d"),n=1e3/t.frameRate,A=setInterval((function(){if(i&&(clearInterval(A),o.close()),a&&(a=!1,t.onVideoProcessStarted&&t.onVideoProcessStarted()),e.drawImage(s,0,0),"closed"!==o._controlledReadableStream.state)try{o.enqueue(e.getImageData(0,0,t.width,t.height))}catch(e){}}),n)},s.play()}})}function a(e,A){if(!t.workerPath&&!A)return i=!1,void fetch("https://unpkg.com/webm-wasm@latest/dist/webm-worker.js").then((function(t){t.arrayBuffer().then((function(t){a(e,t)}))}));if(!t.workerPath&&A instanceof ArrayBuffer){var d=new Blob([A],{type:"text/javascript"});t.workerPath=l.createObjectURL(d)}t.workerPath||console.error("workerPath parameter is missing."),(o=new Worker(t.workerPath)).postMessage(t.webAssemblyPath||"https://unpkg.com/webm-wasm@latest/dist/webm-wasm.wasm"),o.addEventListener("message",(function(e){"READY"===e.data?(o.postMessage({width:t.width,height:t.height,bitrate:t.bitrate||1200,timebaseDen:t.frameRate||30,realtime:t.realtime}),s().pipeTo(new WritableStream({write:function(e){i?console.error("Got image, but recorder is finished!"):o.postMessage(e.data.buffer,[e.data.buffer])}}))):e.data&&(r||n.push(e.data))}))}"undefined"!=typeof ReadableStream&&"undefined"!=typeof WritableStream||console.error("Following polyfill is strongly recommended: https://unpkg.com/@mattiasbuelens/web-streams-polyfill/dist/polyfill.min.js"),(t=t||{}).width=t.width||640,t.height=t.height||480,t.frameRate=t.frameRate||30,t.bitrate=t.bitrate||1200,t.realtime=t.realtime||!0,this.record=function(){n=[],r=!1,this.blob=null,a(e),"function"==typeof t.initCallback&&t.initCallback()},this.pause=function(){r=!0},this.resume=function(){r=!1};var n=[];this.stop=function(e){i=!0;var t=this;!function(e){o?(o.addEventListener("message",(function(t){null===t.data&&(o.terminate(),o=null,e&&e())})),o.postMessage(null)):e&&e()}((function(){t.blob=new Blob(n,{type:"video/webm"}),e(t.blob)}))},this.name="WebAssemblyRecorder",this.toString=function(){return this.name},this.clearRecordedData=function(){n=[],r=!1,this.blob=null},this.blob=null}i.DiskStorage=x,i.GifRecorder=D,i.MultiStreamRecorder=L,i.RecordRTCPromisesHandler=function(e,t){if(!this)throw'Use "new RecordRTCPromisesHandler()"';if(void 0===e)throw'First argument "MediaStream" is required.';var o=this;o.recordRTC=new i(e,t),this.startRecording=function(){return new Promise((function(e,t){try{o.recordRTC.startRecording(),e()}catch(e){t(e)}}))},this.stopRecording=function(){return new Promise((function(e,t){try{o.recordRTC.stopRecording((function(i){o.blob=o.recordRTC.getBlob(),o.blob&&o.blob.size?e(i):t("Empty blob.",o.blob)}))}catch(e){t(e)}}))},this.pauseRecording=function(){return new Promise((function(e,t){try{o.recordRTC.pauseRecording(),e()}catch(e){t(e)}}))},this.resumeRecording=function(){return new Promise((function(e,t){try{o.recordRTC.resumeRecording(),e()}catch(e){t(e)}}))},this.getDataURL=function(e){return new Promise((function(e,t){try{o.recordRTC.getDataURL((function(t){e(t)}))}catch(e){t(e)}}))},this.getBlob=function(){return new Promise((function(e,t){try{e(o.recordRTC.getBlob())}catch(e){t(e)}}))},this.getInternalRecorder=function(){return new Promise((function(e,t){try{e(o.recordRTC.getInternalRecorder())}catch(e){t(e)}}))},this.reset=function(){return new Promise((function(e,t){try{e(o.recordRTC.reset())}catch(e){t(e)}}))},this.destroy=function(){return new Promise((function(e,t){try{e(o.recordRTC.destroy())}catch(e){t(e)}}))},this.getState=function(){return new Promise((function(e,t){try{e(o.recordRTC.getState())}catch(e){t(e)}}))},this.blob=null,this.version="5.6.2"},i.WebAssemblyRecorder=F}));class Xe extends De{constructor(e){super(),this.player=e,this.fileName="",this.fileType=e._opt.recordType||c,this.isRecording=!1,this.recordingTimestamp=0,this.recordingInterval=null,e.debug.log("Recorder","init")}destroy(){this._reset(),this.player.debug.log("Recorder","destroy")}setFileName(e,t){this.fileName=e,d!==t&&c!==t||(this.fileType=t)}get recording(){return this.isRecording}get recordTime(){return this.recordingTimestamp}startRecord(){const e=this.player.debug,t={type:"video",mimeType:"video/webm;codecs=h264",onTimeStamp:t=>{e.log("Recorder","record timestamp :"+t)},disableLogs:!this.player._opt.debug};try{const e=this.player.video.$videoElement.captureStream(25);if(this.player.audio&&this.player.audio.mediaStreamAudioDestinationNode&&this.player.audio.mediaStreamAudioDestinationNode.stream&&!this.player.audio.isStateSuspended()&&this.player.audio.hasAudio&&this.player._opt.hasAudio){const t=this.player.audio.mediaStreamAudioDestinationNode.stream;if(t.getAudioTracks().length>0){const i=t.getAudioTracks()[0];i&&i.enabled&&e.addTrack(i)}}this.recorder=Ye(e,t)}catch(t){e.error("Recorder","startRecord error",t),this.emit(x.recordCreateError)}this.recorder&&(this.isRecording=!0,this.player.emit(x.recording,!0),this.recorder.startRecording(),e.log("Recorder","start recording"),this.player.emit(x.recordStart),this.recordingInterval=window.setInterval((()=>{this.recordingTimestamp+=1,this.player.emit(x.recordingTimestamp,this.recordingTimestamp)}),1e3))}stopRecordAndSave(){this.recorder&&this.isRecording&&this.recorder.stopRecording((()=>{this.player.debug.log("Recorder","stop recording"),this.player.emit(x.recordEnd);const e=(this.fileName||be())+"."+(this.fileType||c);Ue(this.recorder.getBlob(),e),this._reset(),this.player.emit(x.recording,!1)}))}_reset(){this.isRecording=!1,this.recordingTimestamp=0,this.recorder&&(this.recorder.destroy(),this.recorder=null),this.fileName=null,this.recordingInterval&&clearInterval(this.recordingInterval),this.recordingInterval=null}}class qe{constructor(e){return new(qe.getLoaderFactory())(e)}static getLoaderFactory(){return Xe}}class Ze{constructor(e){this.player=e,this.decoderWorker=new Worker(e._opt.decoder),this._initDecoderWorker(),e.debug.log("decoderWorker","init")}destroy(){this.decoderWorker.postMessage({cmd:T}),this.decoderWorker.terminate(),this.decoderWorker=null,this.player.debug.log("decoderWorker","destroy")}_initDecoderWorker(){const{debug:e,events:{proxy:t}}=this.player;this.decoderWorker.onmessage=t=>{const i=t.data;switch(i.cmd){case u:e.log("decoderWorker","onmessage:",u),this.player.loaded||this.player.emit(x.load),this.player.emit(x.decoderWorkerInit),this._initWork();break;case b:e.log("decoderWorker","onmessage:",b,i.code),this.player._times.decodeStart||(this.player._times.decodeStart=be()),this.player.video.updateVideoInfo({encTypeCode:i.code});break;case f:e.log("decoderWorker","onmessage:",f,i.code),this.player.audio&&this.player.audio.updateAudioInfo({encTypeCode:i.code});break;case h:if(e.log("decoderWorker","onmessage:",h,`width:${i.w},height:${i.h}`),this.player.video.updateVideoInfo({width:i.w,height:i.h}),!this.player._opt.openWebglAlignment&&i.w/2%4!=0)return void this.player.emit(j.webglAlignmentError);this.player.video.initCanvasViewSize();break;case g:e.log("decoderWorker","onmessage:",g,`channels:${i.channels},sampleRate:${i.sampleRate}`),this.player.audio&&(this.player.audio.updateAudioInfo(i),this.player.audio.initScriptNode(i));break;case p:this.player.handleRender(),this.player.video.render(i),this.player.emit(x.timeUpdate,i.ts),this.player.updateStats({fps:!0,ts:i.ts,buf:i.delay}),this.player._times.videoStart||(this.player._times.videoStart=be(),this.player.handlePlayToRenderTimes());break;case m:this.player.playing&&this.player.audio&&this.player.audio.play(i.buffer,i.ts);break;case y:i.message&&-1!==i.message.indexOf(v)&&this.player.emitError(j.wasmDecodeError);break;default:this.player[i.cmd]&&this.player[i.cmd](i)}}}_initWork(){const e={debug:this.player._opt.debug,useOffscreen:this.player._opt.useOffscreen,useWCS:this.player._opt.useWCS,videoBuffer:this.player._opt.videoBuffer,videoBufferDelay:this.player._opt.videoBufferDelay,openWebglAlignment:this.player._opt.openWebglAlignment};this.decoderWorker.postMessage({cmd:C,opt:JSON.stringify(e),sampleRate:this.player.audio&&this.player.audio.audioContext.sampleRate||0})}decodeVideo(e,t,i){const o={type:S,ts:Math.max(t,0),isIFrame:i};this.decoderWorker.postMessage({cmd:R,buffer:e,options:o},[e.buffer])}decodeAudio(e,t){this.player._opt.useWCS||this.player._opt.useMSE?this._decodeAudioNoDelay(e,t):this._decodeAudio(e,t)}_decodeAudio(e,t){const i={type:w,ts:Math.max(t,0)};this.decoderWorker.postMessage({cmd:R,buffer:e,options:i},[e.buffer])}_decodeAudioNoDelay(e,t){this.decoderWorker.postMessage({cmd:k,buffer:e,ts:Math.max(t,0)},[e.buffer])}updateWorkConfig(e){this.decoderWorker.postMessage({cmd:I,key:e.key,value:e.value})}}class Ke extends De{constructor(e){super(),this.player=e,this.stopId=null,this.firstTimestamp=null,this.startTimestamp=null,this.delay=-1,this.bufferList=[],this.dropping=!1,this.initInterval()}destroy(){this.stopId&&(clearInterval(this.stopId),this.stopId=null),this.firstTimestamp=null,this.startTimestamp=null,this.delay=-1,this.bufferList=[],this.dropping=!1,this.off(),this.player.debug.log("CommonDemux","destroy")}getDelay(e){if(!e)return-1;if(this.firstTimestamp){if(e){const t=Date.now()-this.startTimestamp,i=e-this.firstTimestamp;this.delay=t>=i?t-i:i-t}}else this.firstTimestamp=e,this.startTimestamp=Date.now(),this.delay=-1;return this.delay}resetDelay(){this.firstTimestamp=null,this.startTimestamp=null,this.delay=-1,this.dropping=!1}initInterval(){this.player.debug.log("common dumex","init Interval");let e=()=>{let e;const t=this.player._opt.videoBuffer,i=this.player._opt.videoBufferDelay;if(this.player._opt.useMSE&&this.player.mseDecoder&&this.player.mseDecoder.getSourceBufferUpdating())this.player.debug.warn("CommonDemux",`_loop getSourceBufferUpdating is true and bufferList length is ${this.bufferList.length}`);else if(this.bufferList.length)if(this.dropping){for(e=this.bufferList.shift(),e.type===w&&0===e.payload[1]&&this._doDecoderDecode(e);!e.isIFrame&&this.bufferList.length;)e=this.bufferList.shift(),e.type===w&&0===e.payload[1]&&this._doDecoderDecode(e);e.isIFrame&&this.getDelay(e.ts)<=Math.min(t,200)&&(this.dropping=!1,this._doDecoderDecode(e))}else e=this.bufferList[0],-1===this.getDelay(e.ts)?(this.bufferList.shift(),this._doDecoderDecode(e)):this.delay>t+i?(this.resetDelay(),this.dropping=!0):(e=this.bufferList[0],this.getDelay(e.ts)>t&&(this.bufferList.shift(),this._doDecoderDecode(e)))};e(),this.stopId=setInterval(e,10)}_doDecode(e,t,i,o,r){const s=this.player;let a={ts:i,cts:r,type:t,isIFrame:!1};s._opt.useWCS&&!s._opt.useOffscreen||s._opt.useMSE?(t===S&&(a.isIFrame=o),this.pushBuffer(e,a)):t===S?s.decoderWorker&&s.decoderWorker.decodeVideo(e,i,o):t===w&&s._opt.hasAudio&&s.decoderWorker&&s.decoderWorker.decodeAudio(e,i)}_doDecoderDecode(e){const t=this.player,{webcodecsDecoder:i,mseDecoder:o}=t;e.type===w?t._opt.hasAudio&&t.decoderWorker&&t.decoderWorker.decodeAudio(e.payload,e.ts):e.type===S&&(t._opt.useWCS&&!t._opt.useOffscreen?i.decodeVideo(e.payload,e.ts,e.isIFrame):t._opt.useMSE&&o.decodeVideo(e.payload,e.ts,e.isIFrame,e.cts))}pushBuffer(e,t){t.type===w?this.bufferList.push({ts:t.ts,payload:e,type:w}):t.type===S&&this.bufferList.push({ts:t.ts,cts:t.cts,payload:e,type:S,isIFrame:t.isIFrame})}close(){}_decodeEnhancedH265Video(e,t){const i=e[0],o=48&i,r=15&i,s=e.slice(1,5),a=new ArrayBuffer(4),n=new Uint32Array(a),A="a"==String.fromCharCode(s[0]);if(r===de){if(o===ue){const t=e.slice(5);if(!A){const e=new Uint8Array(5+t.length);e.set([28,0,0,0,0],0),e.set(t,5),this._doDecode(e,S,0,!0,0)}}}else if(r===ce){let i=e,r=0;const s=o===ue;if(!A){n[0]=e[4],n[1]=e[3],n[2]=e[2],n[3]=0,r=n[0];i=xe(e.slice(8),s),this._doDecode(i,S,t,s,r)}}else if(r===le){const i=o===ue;let r=xe(e.slice(5),i);this._doDecode(r,S,t,i,0)}}_isEnhancedH265Header(e){return 128==(128&e)}}class _e extends Ke{constructor(e){super(e),this.input=this._inputFlv(),this.flvDemux=this.dispatchFlvData(this.input),e.debug.log("FlvDemux","init")}destroy(){super.destroy(),this.input=null,this.flvDemux=null,this.player.debug.log("FlvDemux","destroy")}dispatch(e){this.flvDemux(e)}*_inputFlv(){yield 9;const e=new ArrayBuffer(4),t=new Uint8Array(e),i=new Uint32Array(e),o=this.player;for(;;){t[3]=0;const e=yield 15,r=e[4];t[0]=e[7],t[1]=e[6],t[2]=e[5];const s=i[0];t[0]=e[10],t[1]=e[9],t[2]=e[8];let a=i[0];16777215===a&&(t[3]=e[11],a=i[0]);const n=yield s;switch(r){case E:o._opt.hasAudio&&(o.updateStats({abps:n.byteLength}),n.byteLength>0&&this._doDecode(n,w,a));break;case B:if(o._times.demuxStart||(o._times.demuxStart=be()),o._opt.hasVideo){o.updateStats({vbps:n.byteLength});const e=n[0];if(this._isEnhancedH265Header(e))this._decodeEnhancedH265Video(n,a);else{const e=n[0]>>4==1;if(n.byteLength>0){i[0]=n[4],i[1]=n[3],i[2]=n[2],i[3]=0;let t=i[0];this._doDecode(n,S,a,e,t)}}}}}}dispatchFlvData(e){let t=e.next(),i=null;return o=>{let r=new Uint8Array(o);if(i){let e=new Uint8Array(i.length+r.length);e.set(i),e.set(r,i.length),r=e,i=null}for(;r.length>=t.value;){let i=r.slice(t.value);t=e.next(r.slice(0,t.value)),r=i}r.length>0&&(i=r)}}close(){this.input&&this.input.return(null)}}class $e extends Ke{constructor(e){super(e),e.debug.log("M7sDemux","init")}destroy(){super.destroy(),this.player.debug.log("M7sDemux","destroy"),this.player=null}dispatch(e){const t=this.player,i=new DataView(e),o=i.getUint8(0),r=i.getUint32(1,!1),s=new ArrayBuffer(4),a=new Uint32Array(s);switch(o){case w:if(t._opt.hasAudio){const i=new Uint8Array(e,5);t.updateStats({abps:i.byteLength}),i.byteLength>0&&this._doDecode(i,o,r)}break;case S:if(t._opt.hasVideo)if(t._times.demuxStart||(t._times.demuxStart=be()),i.byteLength>5){const s=new Uint8Array(e,5),n=s[0];if(this._isEnhancedH265Header(n))this._decodeEnhancedH265Video(s,r);else{const e=i.getUint8(5)>>4==1;t.updateStats({vbps:s.byteLength}),a[0]=s[4],a[1]=s[3],a[2]=s[2],a[3]=0;let n=a[0];this._doDecode(s,o,r,e,n)}}else this.player.debug.warn("M7sDemux","dispatch","dv byteLength is",i.byteLength)}}}class et{constructor(e){return new(et.getLoaderFactory(e._opt.demuxType))(e)}static getLoaderFactory(e){return e===A?$e:e===n?_e:void 0}}class tt{constructor(e){this.TAG="ExpGolomb",this._buffer=e,this._buffer_index=0,this._total_bytes=e.byteLength,this._total_bits=8*e.byteLength,this._current_word=0,this._current_word_bits_left=0}destroy(){this._buffer=null}_fillCurrentWord(){let e=this._total_bytes-this._buffer_index,t=Math.min(4,e),i=new Uint8Array(4);i.set(this._buffer.subarray(this._buffer_index,this._buffer_index+t)),this._current_word=new DataView(i.buffer).getUint32(0,!1),this._buffer_index+=t,this._current_word_bits_left=8*t}readBits(e){if(e<=this._current_word_bits_left){let t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}let t=this._current_word_bits_left?this._current_word:0;t>>>=32-this._current_word_bits_left;let i=e-this._current_word_bits_left;this._fillCurrentWord();let o=Math.min(i,this._current_word_bits_left),r=this._current_word>>>32-o;return this._current_word<<=o,this._current_word_bits_left-=o,t=t<<o|r,t}readBool(){return 1===this.readBits(1)}readByte(){return this.readBits(8)}_skipLeadingZero(){let e;for(e=0;e<this._current_word_bits_left;e++)if(0!=(this._current_word&2147483648>>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}readUEG(){let e=this._skipLeadingZero();return this.readBits(e+1)-1}readSEG(){let e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}class it{static _ebsp2rbsp(e){let t=e,i=t.byteLength,o=new Uint8Array(i),r=0;for(let e=0;e<i;e++)e>=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(o[r]=t[e],r++);return new Uint8Array(o.buffer,0,r)}static parseSPS(e){let t=it._ebsp2rbsp(e),i=new tt(t);i.readByte();let o=i.readByte();i.readByte();let r=i.readByte();i.readUEG();let s=it.getProfileString(o),a=it.getLevelString(r),n=1,A=420,d=[0,420,422,444],c=8;if((100===o||110===o||122===o||244===o||44===o||83===o||86===o||118===o||128===o||138===o||144===o)&&(n=i.readUEG(),3===n&&i.readBits(1),n<=3&&(A=d[n]),c=i.readUEG()+8,i.readUEG(),i.readBits(1),i.readBool())){let e=3!==n?8:12;for(let t=0;t<e;t++)i.readBool()&&(t<6?it._skipScalingList(i,16):it._skipScalingList(i,64))}i.readUEG();let l=i.readUEG();if(0===l)i.readUEG();else if(1===l){i.readBits(1),i.readSEG(),i.readSEG();let e=i.readUEG();for(let t=0;t<e;t++)i.readSEG()}let u=i.readUEG();i.readBits(1);let h=i.readUEG(),p=i.readUEG(),m=i.readBits(1);0===m&&i.readBits(1),i.readBits(1);let g=0,f=0,b=0,y=0;i.readBool()&&(g=i.readUEG(),f=i.readUEG(),b=i.readUEG(),y=i.readUEG());let v=1,w=1,S=0,E=!0,B=0,C=0;if(i.readBool()){if(i.readBool()){let e=i.readByte(),t=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],o=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];e>0&&e<16?(v=t[e-1],w=o[e-1]):255===e&&(v=i.readByte()<<8|i.readByte(),w=i.readByte()<<8|i.readByte())}if(i.readBool()&&i.readBool(),i.readBool()&&(i.readBits(4),i.readBool()&&i.readBits(24)),i.readBool()&&(i.readUEG(),i.readUEG()),i.readBool()){let e=i.readBits(32),t=i.readBits(32);E=i.readBool(),B=t,C=2*e,S=B/C}}let R=1;1===v&&1===w||(R=v/w);let k=0,T=0;if(0===n)k=1,T=2-m;else{k=3===n?1:2,T=(1===n?2:1)*(2-m)}let I=16*(h+1),x=16*(p+1)*(2-m);I-=(g+f)*k,x-=(b+y)*T;let D=Math.ceil(I*R);return i.destroy(),i=null,{profile_string:s,level_string:a,bit_depth:c,ref_frames:u,chroma_format:A,chroma_format_string:it.getChromaFormatString(A),frame_rate:{fixed:E,fps:S,fps_den:C,fps_num:B},sar_ratio:{width:v,height:w},codec_size:{width:I,height:x},present_size:{width:D,height:x}}}static _skipScalingList(e,t){let i=8,o=8,r=0;for(let s=0;s<t;s++)0!==o&&(r=e.readSEG(),o=(i+r+256)%256),i=0===o?i:o}static getProfileString(e){switch(e){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}static getLevelString(e){return(e/10).toFixed(1)}static getChromaFormatString(e){switch(e){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}function ot(e){const t={},i=new DataView(e.buffer);let o=i.getUint8(0),r=i.getUint8(1);if(i.getUint8(2),i.getUint8(3),1!==o||0===r)return t;const s=1+(3&i.getUint8(4));if(3!==s&&4!==s)return t;let a=31&i.getUint8(5);if(0===a)return;let n=6;for(let o=0;o<a;o++){let r=i.getUint16(n,!1);if(n+=2,0===r)continue;let s=new Uint8Array(e.buffer,n,r);n+=r;let a=it.parseSPS(s);if(0!==o)continue;t.codecWidth=a.codec_size.width,t.codecHeight=a.codec_size.height,t.presentWidth=a.present_size.width,t.presentHeight=a.present_size.height,t.profile=a.profile_string,t.level=a.level_string,t.bitDepth=a.bit_depth,t.chromaFormat=a.chroma_format,t.sarRatio=a.sar_ratio,t.frameRate=a.frame_rate,!1!==a.frame_rate.fixed&&0!==a.frame_rate.fps_num&&0!==a.frame_rate.fps_den||(t.frameRate={});let A=t.frameRate.fps_den,d=t.frameRate.fps_num;t.refSampleDuration=t.timescale*(A/d);let c=s.subarray(1,4),l="avc1.";for(let e=0;e<3;e++){let t=c[e].toString(16);t.length<2&&(t="0"+t),l+=t}t.codec=l}let A=i.getUint8(n);if(0===A)return t;n++;for(let t=0;t<A;t++){let t=i.getUint16(n,!1);n+=2,0!==t&&(new Uint8Array(e.buffer,n,t),n+=t)}return t.videoType="avc",t}class rt extends De{constructor(e){super(),this.player=e,this.hasInit=!1,this.isDecodeFirstIIframe=!1,this.isInitInfo=!1,this.decoder=null,this.initDecoder(),e.debug.log("Webcodecs","init")}destroy(){this.decoder&&("closed"!==this.decoder.state&&this.decoder.close(),this.decoder=null),this.hasInit=!1,this.isInitInfo=!1,this.isDecodeFirstIIframe=!1,this.off(),this.player.debug.log("Webcodecs","destroy")}initDecoder(){const e=this;this.decoder=new VideoDecoder({output(t){e.handleDecode(t)},error(t){e.handleError(t)}})}handleDecode(e){this.isInitInfo||(this.player.video.updateVideoInfo({width:e.codedWidth,height:e.codedHeight}),this.player.video.initCanvasViewSize(),this.isInitInfo=!0),this.player._times.videoStart||(this.player._times.videoStart=be(),this.player.handlePlayToRenderTimes()),this.player.handleRender(),this.player.video.render({videoFrame:e}),this.player.updateStats({fps:!0,ts:0,buf:this.player.demux.delay})}handleError(e){this.player.debug.error("Webcodecs","VideoDecoder handleError",e)}decodeVideo(e,t,i){if(this.hasInit){if(i&&0===e[1]){const t=ot(e.slice(5)),i=this.player.video.videoInfo;if(t.codecWidth!==i.width||t.codecHeight!==i.height)return this.player.debug.log("Webcodecs",`width or height is update, width ${i.width}-> ${t.codecWidth}, height ${i.height}-> ${t.codecHeight}`),void this.player.emit(j.webcodecsWidthOrHeightChange)}if(!this.isDecodeFirstIIframe&&i&&(this.isDecodeFirstIIframe=!0),this.isDecodeFirstIIframe){const o=new EncodedVideoChunk({data:e.slice(5),timestamp:t,type:i?X:q});this.player.emit(x.timeUpdate,t);try{if(this.isDecodeStateClosed())return void this.player.debug.warn("Webcodecs","VideoDecoder isDecodeStateClosed true");this.decoder.decode(o)}catch(e){this.player.debug.error("Webcodecs","VideoDecoder",e),(-1!==e.toString().indexOf(re)||-1!==e.toString().indexOf(se))&&this.player.emitError(j.webcodecsDecodeError)}}else this.player.debug.warn("Webcodecs","VideoDecoder isDecodeFirstIIframe false")}else if(i&&0===e[1]){const t=15&e[0];if(this.player.video.updateVideoInfo({encTypeCode:t}),t===Q)return void this.emit(j.webcodecsH265NotSupport);this.player._times.decodeStart||(this.player._times.decodeStart=be());const i=function(e){let t=e.subarray(1,4),i="avc1.";for(let e=0;e<3;e++){let o=t[e].toString(16);o.length<2&&(o="0"+o),i+=o}return{codec:i,description:e}}(e.slice(5));this.decoder.configure(i),this.hasInit=!0}}isDecodeStateClosed(){return"closed"===this.decoder.state}}const st={play:"播放",pause:"暂停",audio:"",mute:"",screenshot:"截图",loading:"加载",fullscreen:"全屏",fullscreenExit:"退出全屏",record:"录制",recordStop:"停止录制"};var at=Object.keys(st).reduce(((e,t)=>(e[t]=`\n <i class="jessibuca-icon jessibuca-icon-${t}"></i>\n ${st[t]?`<span class="icon-title-tips"><span class="icon-title">${st[t]}</span></span>`:""}\n`,e)),{}),nt=(e,t)=>{const{events:{proxy:i}}=e,o=document.createElement("object");o.setAttribute("aria-hidden","true"),o.setAttribute("tabindex",-1),o.type="text/html",o.data="about:blank",ve(o,{display:"block",position:"absolute",top:"0",left:"0",height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:"-1"});let r=e.width,s=e.height;i(o,"load",(()=>{i(o.contentDocument.defaultView,"resize",(()=>{e.width===r&&e.height===s||(r=e.width,s=e.height,e.emit(x.resize),n())}))})),e.$container.appendChild(o),e.on(x.destroy,(()=>{e.$container.removeChild(o)})),e.on(x.volumechange,(()=>{!function(e){if(0===e)ve(t.$volumeOn,"display","none"),ve(t.$volumeOff,"display","flex"),ve(t.$volumeHandle,"top","48px");else if(t.$volumeHandle&&t.$volumePanel){const i=we(t.$volumePanel,"height")||60,o=we(t.$volumeHandle,"height"),r=i-(i-o)*e-o;ve(t.$volumeHandle,"top",`${r}px`),ve(t.$volumeOn,"display","flex"),ve(t.$volumeOff,"display","none")}t.$volumePanelText&&(t.$volumePanelText.innerHTML=parseInt(100*e))}(e.volume)})),e.on(x.loading,(e=>{ve(t.$loading,"display",e?"flex":"none"),ve(t.$poster,"display","none"),e&&ve(t.$playBig,"display","none")}));const a=i=>{let o=!0===(r=i)||!1===r?i:e.fullscreen;var r;ve(t.$fullscreenExit,"display",o?"flex":"none"),ve(t.$fullscreen,"display",o?"none":"flex")},n=()=>{Be()&&t.$controls&&e._opt.useWebFullScreen&&setTimeout((()=>{if(e.fullscreen){let i=e.height/2-e.width+19,o=e.height/2-19;t.$controls.style.transform=`translateX(${-i}px) translateY(-${o}px) rotate(-90deg)`}else t.$controls.style.transform="translateX(0) translateY(0) rotate(0)"}),10)};try{me.on("change",a),e.events.destroys.push((()=>{me.off("change",a)}))}catch(e){}e.on(x.webFullscreen,(e=>{a(e),n()})),e.on(x.recording,(()=>{ve(t.$record,"display",e.recording?"none":"flex"),ve(t.$recordStop,"display",e.recording?"flex":"none"),ve(t.$recording,"display",e.recording?"flex":"none")})),e.on(x.recordingTimestamp,(e=>{t.$recordingTime&&(t.$recordingTime.innerHTML=function(e){var t;if(e>-1){var i=Math.floor(e/3600),o=Math.floor(e/60)%60,r=e%60;t=i<10?"0"+i+":":i+":",o<10&&(t+="0"),t+=o+":",(r=Math.round(r))<10&&(t+="0"),t+=r.toFixed(0)}return t}(e))})),e.on(x.playing,(e=>{ve(t.$play,"display",e?"none":"flex"),ve(t.$playBig,"display",e?"none":"block"),ve(t.$pause,"display",e?"flex":"none"),ve(t.$screenshot,"display",e?"flex":"none"),ve(t.$record,"display",e?"flex":"none"),ve(t.$qualityMenu,"display",e?"flex":"none"),ve(t.$volume,"display",e?"flex":"none"),a(),e||t.$speed&&(t.$speed.innerHTML=Ce(""))})),e.on(x.kBps,(e=>{const i=Ce(e);t.$speed&&(t.$speed.innerHTML=i)}))};function At(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}At('@keyframes rotation{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes magentaPulse{0%{background-color:#630030;-webkit-box-shadow:0 0 9px #333}50%{background-color:#a9014b;-webkit-box-shadow:0 0 18px #a9014b}to{background-color:#630030;-webkit-box-shadow:0 0 9px #333}}.jessibuca-container .jessibuca-icon{cursor:pointer;width:16px;height:16px}.jessibuca-container .jessibuca-poster{position:absolute;z-index:10;left:0;top:0;right:0;bottom:0;height:100%;width:100%;background-position:50%;background-repeat:no-repeat;background-size:contain;pointer-events:none}.jessibuca-container .jessibuca-play-big{position:absolute;display:none;height:100%;width:100%;background:rgba(0,0,0,.4)}.jessibuca-container .jessibuca-play-big:after{cursor:pointer;content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;width:48px;height:48px;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACgklEQVRoQ+3ZPYsTQRjA8eeZZCFlWttAwCIkZOaZJt8hlvkeHrlccuAFT6wEG0FQOeQQLCIWih6chQgKgkkKIyqKCVYip54IWmiQkTmyYhFvd3Zn3yDb7szu/7cv7GaDkPEFM94PK0DSZ9DzDAyHw7uI2HRDlVJX5/N5r9FoHCYdr/fvCRiNRmpJ6AEidoUQ15NG+AH8BgD2n9AHANAmohdJQfwAfgGA4xF4bjabnW21Whob62ILoKNfAsAGEd2PU2ATcNSNiDf0/cE5/xAHxDpgEf0NADaJ6HLUiKgAbvcjpdSGlPJZVJCoAUfdSqkLxWLxTLlc/mkbEgtgET1TSnWklLdtIuIEuN23crlcp16vv7cBSQKgu38AwBYRXQyLSArg3hsjRDxNRE+CQhIF/BN9qVAobFYqle+mkLQAdLd+8K0T0U0TRJoAbvc9fVkJId75gaQRoLv1C2STiPTb7rFLWgE6+g0RncwyYEJEtawCvjDGmpzzp5kD6NfxfD7frtVqB17xen2a7oG3ALBm+oMoFQBEPD+dTvtBfpImDXjIGFvjnD/3c7ksG5MU4HDxWeZa0HB3XhKAXcdxOn5vUi9gnIDXSqm2lHLPK8pkfVyAbSLqm4T5HRs1YB8RO0KIid8g03FRAT4rpbpSyh3TINPxUQB2GGM9zvkn05gg420CJovLZT9ISNA5tgB9ItoOGhFmnh/AcZ/X9xhj65zzV2Eiwsz1A1j2B8dHAOgS0W6YnduY6wkYj8d3lFKn/j66Ea84jtOrVqtfbQSE3YYnYDAY5Eql0hYAnNDv6kKIx2F3anO+J8DmzqLY1goQxVE12ebqDJgcrSjGrs5AFEfVZJt/AF0m+jHzUTtnAAAAAElFTkSuQmCC");background-repeat:no-repeat;background-position:50%}.jessibuca-container .jessibuca-play-big:hover:after{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACEElEQVRoQ+2ZXStEQRjH/3/yIXwDdz7J+i7kvdisXCk3SiFJW27kglBcSFFKbqwQSa4krykuKB09Naf2Yndn5jgzc06d53Znd36/mWfeniVyHsw5PwqB0DOonYEoijYBlOpAFwCMkHwLDS/9mwhEDUCfAAyTXA4tYSLwC6CtCegegH6S56FETAR+AHRoACcBTJAUWa+RloBAXwAYIrnt0yBNgZi7qtbHgw8RFwLC/QFglOScawlXAjH3gUqrE1cirgVi7mkAYyS/0xbxJSDcdwAGSa6nKeFTIOZeUyL3aYiEEBDuLwDjJGf+KxFKIOY+BdBL8iipSGiBmHtWbbuftiJZERBuOfgGSK7aSGRJIObeUml1ayKSRQHhlgtkiaTcdltGVgUE+ppkV54FaiS78yrwqlLoOI8Cch2XV548W7WRpTVwA6DP9kGUFYEpAOUkT9LQAvtq1M+0udKkQSgBqSlJWWYxKXj8vRACK+o6bbRIdYI+Ba7U7rKjg7L53JdAhWTZBsy0rWuBXZUuNVMg23auBF7UIl2yBbJt70JAoKV6/WwLk6R9mgKSJlJ1kLTxFmkJyCla8UZd15GJQKvyumyJ8gy8DAEvfZoINPqD41EtUjmUgoaJwAaAnjrKebVI34OSq85NBNqlCAWgE0CV5GEWwI3vQlmCbcSinYFCwPEIFDPgeIC1P1/MgHaIHDf4Aydx2TF7wnKeAAAAAElFTkSuQmCC")}.jessibuca-container .jessibuca-recording{display:none;position:absolute;left:50%;top:0;padding:0 3px;transform:translateX(-50%);justify-content:space-around;align-items:center;width:95px;height:20px;background:#000;opacity:1;border-radius:0 0 8px 8px;z-index:1}.jessibuca-container .jessibuca-recording .jessibuca-recording-red-point{width:8px;height:8px;background:#ff1f1f;border-radius:50%;animation:magentaPulse 1s linear infinite}.jessibuca-container .jessibuca-recording .jessibuca-recording-time{font-size:14px;font-weight:500;color:#ddd}.jessibuca-container .jessibuca-recording .jessibuca-icon-recordStop{width:16px;height:16px;cursor:pointer}.jessibuca-container .jessibuca-loading{display:none;flex-direction:column;justify-content:center;align-items:center;position:absolute;z-index:20;left:0;top:0;right:0;bottom:0;width:100%;height:100%;pointer-events:none}.jessibuca-container .jessibuca-loading-text{line-height:20px;font-size:13px;color:#fff;margin-top:10px}.jessibuca-container .jessibuca-controls{background-color:#161616;box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-end;position:absolute;z-index:40;left:0;right:0;bottom:0;height:38px;width:100%;padding-left:13px;padding-right:13px;font-size:14px;color:#fff;opacity:0;visibility:hidden;transition:all .2s ease-in-out;-webkit-user-select:none;user-select:none;transition:width .5s ease-in}.jessibuca-container .jessibuca-controls .jessibuca-controls-item{position:relative;display:flex;justify-content:center;padding:0 8px}.jessibuca-container .jessibuca-controls .jessibuca-controls-item:hover .icon-title-tips{visibility:visible;opacity:1}.jessibuca-container .jessibuca-controls .jessibuca-fullscreen,.jessibuca-container .jessibuca-controls .jessibuca-fullscreen-exit,.jessibuca-container .jessibuca-controls .jessibuca-icon-audio,.jessibuca-container .jessibuca-controls .jessibuca-microphone-close,.jessibuca-container .jessibuca-controls .jessibuca-pause,.jessibuca-container .jessibuca-controls .jessibuca-play,.jessibuca-container .jessibuca-controls .jessibuca-record,.jessibuca-container .jessibuca-controls .jessibuca-record-stop,.jessibuca-container .jessibuca-controls .jessibuca-screenshot{display:none}.jessibuca-container .jessibuca-controls .jessibuca-icon-audio,.jessibuca-container .jessibuca-controls .jessibuca-icon-mute{z-index:1}.jessibuca-container .jessibuca-controls .jessibuca-controls-bottom{display:flex;justify-content:space-between;height:100%}.jessibuca-container .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-left,.jessibuca-container .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-right{display:flex;align-items:center}.jessibuca-container.jessibuca-controls-show .jessibuca-controls{opacity:1;visibility:visible}.jessibuca-container.jessibuca-controls-show-auto-hide .jessibuca-controls{opacity:.8;visibility:visible;display:none}.jessibuca-container.jessibuca-hide-cursor *{cursor:none!important}.jessibuca-container .jessibuca-icon-loading{width:50px;height:50px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAHH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t8+TAR6YT3j0ql8rtBC70HZb1gwmooDMO3eu+vJaKTBjXc6rfPe39ho9H41SL15O4+EOFWiGv5n2sViz83t8VuwWW9pRyY8Dxu59zJIqJVAhcP+JPHI8y8bL8SLJrwPHH9jYeI3kFEF+Ssmp/rqjN7HMe6lV2WVhjhdrRhGJ7a+lFrPYDXAtB667Q/X5723p+tNwLLwrbf1rIIEBryxpgTkyQZA6DlFccS0fMA6G84d6RVvBZht5eO/wEB1Kvsoc6vtAAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%;animation:rotation 1s linear infinite}.jessibuca-container .jessibuca-icon-screenshot{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAE5UlEQVRoQ+1YW2sdVRT+1s7JxbsoVkEUrIIX0ouz15zYNA+N1RdtQfCltlUfvLbqL/BCwZ8grbHtizQqPojgBSr0JkiMmT2nxgapqBURtPVCq7HxJCeZJVPmxDlzZubMmXOSEsnAvOy917fXt9e39tp7E5b4R0vcfywTuNgRbBgBx3HuJqLVzPzmYjprjHkcwAlmLqXNm4XAISLaSESPaq2HF4OE67rbRGRYRA7btn1fbgLGmKsA/Azg0gBkGzO/vZAkHMd5hIiqc5wHcCMz/5k0Z2oExsfHV1QqldPAf8lORNu11m8tBAljzFYAYWxRSl1vWdZvuQj4RsYYF4AVBlgIOVVlE55HRIxt23ZuCfmGjuOsJ6LPoiAistW27XfaEYmIbOYhPc9bXywWR1oiEJDYQkR1zrYjEjGyqfqbKd8a7kJVtLgQ+30i8pht2wfyRKIdmJkJBPkQTbILfudJ7CTZNBvVpggEcgpvc/ML38zESbLJsxBNE/A9biX0rdjGyTQXgbxyapdsarb0PMlXtWnGoXbKpm0Essqp3bJpK4E0OXmed3+hUBDP8w5FI91M0rdcyLLILElOCbaZilSWeXMncRx4klTCY1spfG3dhZJWx3GcDUR0EEB3ZMw0ET2gtT6SZWWzjmlrBIJCl0hAKfWgZVmHszqXZVxbCSxpCS2JJ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EdtkaQv65yy/QVweuwPY0+T9FuNQ8cAXwHHxf7wdHiypN9r7BfEl8GjYv9+SceXJLQ/mSDYTh2Baog3SHq0pYT2STqno4RWSnqhBn8l8FzSN4bfJol/jkn8bXUS228DFyfft0paVyCwFbg9sQkSDEkctueZZju8iO+tJPEYfo7A0piYKd73wP3xnB+20cvjNnphxdmlkj4sEMjhfwY8COyOY0fb6Bkl/K6FLKxS+M1KpDhJY8mvrG5doRwlf66QZfGbjhLh4pEt35kV3iUp/IvTunU8qtTil/7gaHOY2yjpntaez9b5RmBDYewmSXfX2RRvZLYvbThOh+NuqMa9Ww1+yLnXgO2SwkZR24oEens2oYHzBCa00PMSOtQL/f+NwH+Hg8hAnbrYgQAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-play{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACgklEQVRoQ+3ZPYsTQRjA8eeZZCFlWttAwCIkZOaZJt8hlvkeHrlccuAFT6wEG0FQOeQQLCIWih6chQgKgkkKIyqKCVYip54IWmiQkTmyYhFvd3Zn3yDb7szu/7cv7GaDkPEFM94PK0DSZ9DzDAyHw7uI2HRDlVJX5/N5r9FoHCYdr/fvCRiNRmpJ6AEidoUQ15NG+AH8BgD2n9AHANAmohdJQfwAfgGA4xF4bjabnW21Whob62ILoKNfAsAGEd2PU2ATcNSNiDf0/cE5/xAHxDpgEf0NADaJ6HLUiKgAbvcjpdSGlPJZVJCoAUfdSqkLxWLxTLlc/mkbEgtgET1TSnWklLdtIuIEuN23crlcp16vv7cBSQKgu38AwBYRXQyLSArg3hsjRDxNRE+CQhIF/BN9qVAobFYqle+mkLQAdLd+8K0T0U0TRJoAbvc9fVkJId75gaQRoLv1C2STiPTb7rFLWgE6+g0RncwyYEJEtawCvjDGmpzzp5kD6NfxfD7frtVqB17xen2a7oG3ALBm+oMoFQBEPD+dTvtBfpImDXjIGFvjnD/3c7ksG5MU4HDxWeZa0HB3XhKAXcdxOn5vUi9gnIDXSqm2lHLPK8pkfVyAbSLqm4T5HRs1YB8RO0KIid8g03FRAT4rpbpSyh3TINPxUQB2GGM9zvkn05gg420CJovLZT9ISNA5tgB9ItoOGhFmnh/AcZ/X9xhj65zzV2Eiwsz1A1j2B8dHAOgS0W6YnduY6wkYj8d3lFKn/j66Ea84jtOrVqtfbQSE3YYnYDAY5Eql0hYAnNDv6kKIx2F3anO+J8DmzqLY1goQxVE12ebqDJgcrSjGrs5AFEfVZJt/AF0m+jHzUTtnAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-play:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACEElEQVRoQ+2ZXStEQRjH/3/yIXwDdz7J+i7kvdisXCk3SiFJW27kglBcSFFKbqwQSa4krykuKB09Naf2Yndn5jgzc06d53Znd36/mWfeniVyHsw5PwqB0DOonYEoijYBlOpAFwCMkHwLDS/9mwhEDUCfAAyTXA4tYSLwC6CtCegegH6S56FETAR+AHRoACcBTJAUWa+RloBAXwAYIrnt0yBNgZi7qtbHgw8RFwLC/QFglOScawlXAjH3gUqrE1cirgVi7mkAYyS/0xbxJSDcdwAGSa6nKeFTIOZeUyL3aYiEEBDuLwDjJGf+KxFKIOY+BdBL8iipSGiBmHtWbbuftiJZERBuOfgGSK7aSGRJIObeUml1ayKSRQHhlgtkiaTcdltGVgUE+ppkV54FaiS78yrwqlLoOI8Cch2XV548W7WRpTVwA6DP9kGUFYEpAOUkT9LQAvtq1M+0udKkQSgBqSlJWWYxKXj8vRACK+o6bbRIdYI+Ba7U7rKjg7L53JdAhWTZBsy0rWuBXZUuNVMg23auBF7UIl2yBbJt70JAoKV6/WwLk6R9mgKSJlJ1kLTxFmkJyCla8UZd15GJQKvyumyJ8gy8DAEvfZoINPqD41EtUjmUgoaJwAaAnjrKebVI34OSq85NBNqlCAWgE0CV5GEWwI3vQlmCbcSinYFCwPEIFDPgeIC1P1/MgHaIHDf4Aydx2TF7wnKeAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-pause{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABA0lEQVRoQ+1YwQqCUBAcfWXXsLr2AXWTPXno8yVB8AP6Aa3oHI+kCDqYaawJljSe133uzO44bx0M/HEG/v1gAd9mkAyQgY4I/F8LJUlyrQFtD2AtIkcNoFEU+Z7n7QD4DfFHEVlocrVmgAUAIAOl3mILPcDgEFcUhyrUKMGUUcroc3NQRimj9XJBGaWMvvPydKN0o6/9QTdKN6rZANxj6EbpRulGuZnjYqs8BbyR8Ub2Izeys+u6yyAIDpo/ehzHM2NMDsA0xFsRmWhyfTIDWSXxCEBmrd2EYXjSHJqm6bQoii2AOYBL5Z0xgFxEVppcrQvQJO0zhgX0iXbdWWSADHRE4AZQ731AhEUeNwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-pause:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAA7klEQVRoQ+2YSwrCQBBEX6HiVvxsPYDewfN7By/gD9ciQkvERQwJdBSiYs0mEDo96aruombEjy/9+P/jAj7NoBkwA28i8H8tFBFRA9oeWEo6ZgCNiDGwAYpn3TpKmmVytWbABQBmoNRbbqEHGB7iiuJYhRol2DJqGX1uDsuoZdRmLuNZSzGWUcuoZdRHSp/IylNgK2ErYSthK3FHwLcSvpXIjoLt9Jfa6TMwl3TIMBkRE2AH9BriL5KGmVyvWIltJXEfKN6tJJ0ym0bECFgDU+Ba+WZQFCdpkcnVuoBM0i5jXECXaNftZQbMwJsI3AAPN3dAQflHegAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-record{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD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ibuca-container .jessibuca-icon-record:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACfUlEQVRoQ+2ZSYsUQRCFvycK4nJXXEbHBdwO4kn/gv9CD467ICIutxEFkREdFUU86T/xojcPntyQcT2INw+uISFVkD1Wd2dWlU7nUHlqisiX+fJFZGREi8yHMt8/HYG5VrBToFOg4QnMPxcyM2t4KE2nT0i6EwvylwIjQOCFpE1tEPgGfI0FamC3AFgazP8IrJL0KwZzkAI3gLMxIA1ttgCPA4w3wHpJP2NwBxG4KOlcDEgTGzNbA8wEGP57vA0CU5JONtlczFwz2wY8HUbAzBYCB4CtwCVJb33OIAXmioC70LoyBsxsEXAQOApsLIhelnS6FgEzW+5BBvwA/FS+SPJFa40KBZ5L2mxmS4AJ4IjHxCzwaUnHkgmY2V7gLrAyAPwOXJN0qg6DCgIvgQfAPsDjo2pcKddLciEz+wCs6AO6W9KjVBIVBGIgahN4BvRLMjslPYlZPbT53wR2AbeBtcUmXEFPdh5U06mbd/shBBzbr/Jx4FCAX0+BEsDMFocEYrNmFcE+BD4XsXZL0oyZnQCutkagzkn3m1NBwDe/Q9L74MAuFEqUn5op8I8JvJO0elacTALnc1HAH3Njkvwx+WeYWUegTa/pwaqIgexdyIN4uyRPmqULZRXEvulPwD3gpr+zcrtGQxfzRHYG2AAczuUWiom3kc4D2RN4BdwH9gM9CS0XFyoLGu9UuN974eIFVDiuSzruH5LqgRhtU20q8kBPV8LMlhVVmVdnYwX+SMdAZVeieAF7eeltmElJr4cpkH1bJfvGVvatxdR4bMu+teZuWxtKxWncXn8I7EldtQV7vz79fp9KwZp//9CksB8F206BuVahU6BToOEJ/Ab7+KdABdTt8AAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-recordStop{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAGDElEQVRoQ82ZaahVVRTHf//moKKggQaw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NYEkxGin/fFVSWg/VglgPAF4BDqwYs8QAFgDnVP78SJIzbJbWAwBXC9VRzgIDcLVXjfm/AP0kuR/NhbY+uwMR4e7QDf6WFaOmGYBHJbcnlh7USvPSlycQEXYdu1CVxhiARxzPJwsXSarrTbux9TEAh3qH/CqtKSU2Az5NZpsPSTqxBRdy49/SfWki60NJ2WFXTUXqwdmAsphbCJxZUeIGfltJvg8NKSIMfPcc0Mx6tpiLiK2AH4qeoxS3UNJZJYC6emicpJkZAOOAGT0EcLmkmzvQM8oz1BLAxsX8vjqBWynJ86FcJDoLGO4OC8jOMgthnrX696Qkn35Oh+dB21aYfgJ2kLSqqzCKiGuAaxNJkyRNzSlYl+sNmq2pkiZZbxWAJ8g/Aj6NksI+3kplui5AFL2271m1AvVJb1fmqXSsMhGYkhjznqSeNi0d4YsIz3/SCNXNK+omcy5ZPVKv0r2STu3Iig431dRolrRCkvuCLqoD4BlM3Th7nqTzOrSnrW0RcSdQp+tASX4gbAzAK8Ub2KwarQ8Cp0vy20CvU5FUFwN1SfRSSbemSpu9D9wCXFZjpacDoyU925sIIuIw4K5k8lCqmCWpzpbmb2QRMRc4t4GhfiOYJunLngCJiF2Aq4ELG8iZL6mRDflHvohwpnXGrSM/VM8DFkt6rh0gxRd3K3s24BBeRzMkpaP+bnzZR77iTvgLuOR29mxEDnmer7rk9dPT98CvBbNreGdSD8s8WT4i81rpjD5G0vzcR2kJQAHCs5ubgKZjwERhednrHvAa2eaPMFaSm6UstQyglBQRDm92qWwJnNXencGnZpdp67W+bQAVIKOLCz6sTUNTdjdTcyW5N2+bOgZQAeLHQLuV5/UeM6ZZPDXKfa1nqs/4QUXSG21bXdnQYwBV5RHhy2rXcmh0E+5GxOTGyCWwp34fSCovd09sX7P3X2uzPXCoLsVMAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-recordStop:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvm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yH8XbjyUMEXkR2lXKqWS2R11/CxHO9+ABtjiQryMNRWN8u3piOka5cs9rX+KQA7Fod4wM2a8RySBIyGU768TcgtdUieJrEbvjxczKX+2oqQ8REPrrLfAzAvri8h24p2Klrqj+wvTXhNO95GjqXcqp45KUcF3CfAAaEcN+H/25e2/wb2BkfmezAWUrgEgtWEfDnhtVJD0O3mzAeS6CW+UlYArMLwCoj6JYCGZcCIw8pij3vAq8dtH6g3udn2Q0nkg/amBVTA0gXveopsaea9txkCkzZynOC2Vl/rWxYwMSN5b8PoAifWtkY0Yi14CcT9rm0Gd/OWvykLqHjq7Bu5QIm6QkQuAbG85hSPUiKGIDhM8s+a+tnB7ra/t8w61GHaAsLOl+2W+WVdPpfaWCzBE63BM0fbfTlF4KQo/0RKpY71b+To4p6J73/tXyc1fevA3AAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-fullscreen{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAHTElEQVRoQ+1Zb4xcVRX/nZl5u2/LrrO0EFKoBYpVaRu3u/e+3WlDZJdIRLQhNLIiEggxqURIjGmqTTAmWiRpjH4wghq+KIQYupYQEvEDmEVdyu7OfbPbzQaEYqtSwTb4Z3aV7s6b9445mzvm7XRm3oy7oanZ82ny5txzz++ec8+/S7jIiS5y/bEG4EJbcJkFpqenryqXy6cbKBUB+AeANIBuAG8AuAzAn06ePOkNDw+H9dZOTU11h2H4EwB7ALwL4FIA7wFw7O9aSxkAE9H9SqnHazGc50LGGFFQlGuW/pbNZq/aunXrYtICY8xmAD8C8HEAnUn8sf9/oLX+SiKAQqFweRRFvwewvgbzmwA+BOAkgEsAZAG85rpubseOHaVmlTHGfBTAYwA6gKU7WCaiOWaWPT9mv1eLO6S1/mYiAGPMddYtUtXMRPRVx3F+FkXRup07d/7FGDMEYExrHTSrfIVvfHx8Uy6XO22MWae1fu/IkSPpbdu2pRcWFmpakYgeVEo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3XL3fim1kVfAHB9/Dsz3+95nkztlsgClYr1BgBRKpW6oa+v75VEAMJgjDkrNbj8jndCzXZSSXfU930l/bRtWyvsC+KKAEYq98kYIzy3W4abtNajiQCsBQTAByzzsNZ6ZLWUrygwOTl5YyqVEgXjriQjzVcdx9nb09Nz1vf9F5j5EzK5Y+ZBz/NeTgRw7Nixjra2NpkLycBW5jK3OY7zUq2hU6NmJMkK8r/v+3uYWXrsZdMOAM86jnN3EAS/BjAgjgDgy1rrHycCsBNkCZ9X2DtwIxGNVS9cqfLWPalQKNzFzN8GcK2dQCxtRUTSxPQx827L+13P876WCMA27W8BOG82Wlm8GsrHZNHIyEhqy5YtvwTwyXqWI6KHlFKPJAKwYVSiULVZl9aupvJxZexIU+J8TRBE9B2l1DcSAdjLKneg1nh9fzabfbRYLG4qlUpvd3R0bCqXy7tOnTr1VKOHjVqb2jC5j4gmwzAM0+l0OgzDVCqVkvGhuO8yYuZHPM97KBGA7/vXM/O0TBpqMMvo+x17waWGkhLgMrGK1vrJpCRWkRcrD+STvCvIXiJLhgNdddzoAa21vCmcR8uKOWPMRgBSPrRSpcpY8T6l1FNJ0UfeBTKZjNyxlqg60cUXL1PUupBsIO9XMkqX96v4mFvcS0Z+Mg86TUTtzCxvCh1E9BmllPxXk+zrzxQRzTBzJxG5zCzuIjJ32DG+WCOuk1hFqoKlfNSMBWSU5zDzFnEPInqLmSWpbZANARzRWr8jQHt6ev4tAuX34uLi+iiKiknjdskzlepzdna2s729PSgWi24YhuszmYxn99sYRdHSGx0RnUmlUqf7+vqO1zuYVlylJbO/X8xrAN6vk15zoQt90v+3FvgPXUePXrKTg9MAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-fullscreen:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAFvklEQVRoQ+2ZaaiVVRSGn9fS0iabCNO0eSaosAmplKJRxMiygSQCixQipBKMoDRBon5EI/0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A94ArTnd7S6oyf0TsC3yZ+oFLJD1SCyAVWp8Cnvxy6oRcXm+Winp+DXClK9S6fiAiXKrYPYu0jYu128tzI6LRD7gzPFPS8zkAXAGaHXDF6InTi41Ei2akablbAm8XfQ44rKSMmTezdn2SgLpinQK4nJ8i6fVaAGmyS2nX4JbNnVBuJ1V3RyPCzZD7abetDdmYXNFsRx/PFBEeMzMNmCbJRMIAqWpoDGDnNNIlb89gKV844VMSiKIrmdL8ILEdayPCljotMXeOQq/lADDdZ17IhK1daAbgTqiKdGrajNRZIZ2wSV732GW2w9HGbMcL7kvSJb5a0n05AEzqOnw69hqAT2pVxcSOlE8AbP2LgVvMfiQGorGVm5hjgJPSP26TdH0OADft3wJV3GhjfsfKF1zJILzX08AZLSy3SNLSHACOPnaXslkHXfmiMqnZd5xvBuJWSTfmAHCC8h2ootfdYJshnpASkX+eCKxo9bBRtWkKk3OBt5KrmgO1JUwf2n3LslTSohwAjs/vmmmoGGyGYnW64Da9SwBfdlOBLieyGOtCeeAt/K7gvbyWyQEnuiqZJ8l0zAAph9FxgMuHdqpUx23XTivqoo/fBdIdqxta/r5foit+WQZgF/IlNgFlxfx+VaS57V5O8eaD/Jbmu2Lqw+H3XEn+rlLS6887iTz285ILOruL1zwyrWFrFHWyVXwv+/JRjgVM5Vnp/ZN7GIyTmgsvb/iopNVObJL+8IIpyfnOrK+j2yNidKP6jAiD8CF5Xc+fnA7PXtB4o3Od1SvpvWYH046rtGv2rTK+C2CrHHOLTboW6FqgwxP4Hz4mJ0+J869tAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-fullscreenExit{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAADd0lEQVRoQ+2Zz2sdVRTHv+fJBDW6anDVXen6wZszYxYBiYgtFGst3VSDunKjpS0GpUlqfjVpsVVs6aaL0or4YxMVFCJZ2ZLdPUP+gq5bQnTxtNAkfTnlhnnlkmQy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K5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-fullscreenExit:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAC/ElEQVRoQ+2Zy49NQRCHvx+ReK6IlZ34E7CUiCAR4xEbTLCyQRATYswwb2IQZDYWgojHZpCQECts+ResiQwLj0RClNSkb9Lu3HtPz7mZc8+V6eXt6tP1VVV3VdcVbT7U5vozC9BqD/7/HjCzlZLet9rS9fbP9ICZvQPWSfqRAmFmS4ClMHm+JiR9S1mXVyYFwIBXwEZJv7I2MrPjQH8A6JN0OWtNM/OpAL7HS0mbsjYzswGgN8gNS+rJWtPM/HQAfJ9nkrY22tDMTgMjQaZH0nAzCmatTQE4ClyNPvQU2CbJQ2vKKB2Aa2hmR4DrkbbPgQ5Jv6sJSgkQILqA0dgTkjraBiBAxPHtPz2UtDuGKK0HKkqamd8qg5HS9yXtjebLdYjrHNRqiAeS9gQvnQGGSnML1bvGzOwc0BfN35PUaWYHgRulBwjW9ju+O4JwqM/AWFsABIgLwKkIYgJY1jYAAeJQuGIXVIVcKTKxh8WfBin9J+AVpx/eFWUEqFkyNACKp0rhgWYArkg6kQibSyylmPOklQdibijBX+fSLHFRJkDid+qKmdlaYENOI0zeEcBNSZ9qbVIEQHWuyGOTNZLetgrAz8ClPFpHa1ZL8rf5lFGEB2oBfAxQi4D5DeDmAP7mGJPka0oD4LnDr9imH/xFe8AP4vLIjBclxWXItCOtaIBjwOKo3HaFRyWdnLbmYUHhAJKumdkt4ECk9JCkSitmWixFAwxKOjt5uZvdBvZH2vZLit8XSSBFA/yjpJndAfY1A9FSgOCJu0BnBNErqfIkzfRCywECxCNgR6Rtt6TzmdqHBmyKXG4ZM4sTWc04NzNPWE+AuG3ZlZInSuGBinXMbBzYGVkrE6JUACGcHgPbUyGKAIj7REmZ18y897o5ghiQ5E/bltRChwE/kF7Xj0jyLkbDYWbzgBfA+iA4LmlXqwD8LydvszjAF0lfswBCKC0E3gBeP22p186f8RBKUbaejJmtAr5L+lBPptQAKfCzAClWmkmZWQ/MpHVTvv0X9iFAQGQyevIAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-audio{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACrUlEQVRoQ+2ZPYgTURCAZzbBXJnCeL2Cnb87b9MEtPBUrrMQFAtrtT5/ClGs9LBWWz0RtbBUFCF4oJDsbO68wsLA2YqQSmLlvpEHu7IuMdlLcus+yUKKhJfZ+ebnvZl5CJY/aLn+MAP41x7M1QPMfFtr/crzvHfTAs8FoNPp1LTWzwHgqIg0lFLvrQHwfX8BER8DwC6jNCIecF13wwoA3/dvIuKNpLJa60Oe560XGoCZd4rICiKeTCtaeABmPg4AJmRqg6xcaABmvg4At4aFRyEBhoVM4UMoCplHADCfJTEL5YEsIVNID5iQAYCHALCYxeq5b6PMfF5EBAAEESthGK7W6/XPRpFWq7W3VCqtZg2ZcT3g+/6i4zjzIlLSWn/yPO/DIGMNLCWY2Sj/+xGRK0qpZfNDEASnROTFVi0fr8+aA8z8Ld6KEfGt67oLYwMAwEUium8EREn7OgeAjwCwPyo/nrque3YSgAtE9GDaAM1mc65arc4Zuf1+P2w0Gt9jJZl5DQAORt+fENG5wgEw8zUAMB/zbBBRwyqAIAjuiMjlSOlNItpjFUCqWl0josMzgChR/9hGAWBbknjmAdPhDdqa0gfZzAMJKyVP4v8hhJYRcSni+0JEu63ahZj5anyQici6UuqIVQDdbrfS6/UqRulyufyTiH5sF8AlIro37VpoWEHIzGZ2tM+sEZFnSqkzk9RCS0R01wjIsZz+mug53hDRia0AnI4bGgDYISItz/M2jYC8Gpp2u30MEWuO4zha665Sqp0ZYFStX/iWchRAItFGzoHSsrJ2ZFl1mHg6bfVYJeGJv85CC++BpIJZ5kSFC6G0ha0e7mYJqcJ7IOkRay84UhD2XjHFIFZf8iW9YcYoYRi+tO6aNeupOs66iU/icV46zf/MAKZpzXFk/QL+JG1PUPhRiQAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-audio:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACSElEQVRoQ+2Zu4sUQRCHf5+C+gf4yBXMfMYHGvjCzEBQDIzV+HwEohipGKupD0QNDE8UEwUFTe68wEDhTMVUMFJ+0tArzbjs9u3Ojt0wBR0M9MzUV1XdXVWNKhcq1189wP/2YKcesH1d0nPgdVvgnQDY3iTpqaT9kuaAt9UA2D4o6aGkzVHpXcByFQC2r0q60lB2D7BUNIDtjZIeSDoyRNGyAWwfiiET4n6YlAtg+7Kka2PCozyAMSHT5CkLIIbMfUlbMhdmOQCZIVOeB2LI3JN0NNPq6bTZe8D2aUmOY72kN8DnoIXt7eF5FSEzkQdsB+OEsFwr6RPwbpixhqYStoPyqVwAbkaAY5KeTWD5wStZHrD9XdJgK34FhBP9H8kFOAvciQBhn3/RAcBHSTvjfx4DJ6cBOAPcbRvA9gZJYQT5DfwYKGl7UdLu+PwIOFUiwCVJYQRZBuZqA7gh6XxUegXYVhtAmq0uAnt7gLhQm9vorBZx74Hcc6D3QLKH/z2JGyVnlYs4pCfzEe4rsLW2XehicpAtAftqAwiZbhhBfgE/ZwVwDrjddi40KiG0HXpHO+KcJ8CJaXKheeBWBOgqnf6W1BwvgcOrATieFDTrJL0HViJAVwXNgVgPrJH0BfiQDTDKtREiNK7KLSnHASQLLacP1PxcVkWWq8PU3emq2yqJJ0b1Qsv2QKpdZp+orBBqmrfq5m5mSJXtgUZI1XnB0YCo94opCal6L/ka3ghtlIXqrllzT9VJ5k19Ek/y0zbf6QHatOYk3/oDujC8QMWgjf4AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-mute{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAKYklE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ySEyhMqm81yBKSpu4VMiMgOVaX0YCOcva4yxjw/3x0ZmcjlcrxnI5Ps+mtUdYTgwzD8sLwqXTEGSqtUfX09PR/aKIxldvAGOt0A3nHOvRwEwfEdO3ZMz1UbR0ZGlp0/f/4WEam31vL+4by19hQ7dPnNzhUHEG9qYGBgVRAEd0UNj2YYWThjjHmrUChk2tvbKfDmfHjX7Pt+te/7nAnYUKcqhd1VA8Dkrq+vXxcxQdnAewbOAb1BEAwtBCAq16azs3N2j5TalSTFVQMw3+leyd996wH8BxA4v3x6wGifAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-mute:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAHsUlEQVRoQ+2Z969VVRCFv7H33nvvvfcSe2+xxJgY4z9j/Bs0/mABFQXBhl1sgNjQSCyoiL2BDaxs873MJsfDuZd7gfeQxJ3cvAfv3HP22rNmzZo5wRq+Yg3fP/8DWN0RXCYCpZSzgM2Br4GPgW8j4s9hNlpKWQfYETgUOB44GtgMmA1MBF4BFkdEGea+Xdd2AbgF2B2YD0wHZkbEZ4M+qJSyIbArcARwMnAUsC/wO/AscCfwQkT8Meg9+13XBeBx4EjgZ+ClPLGXI+KbfjcqpXivLYA9gWOA0/PnDsDGwOeA977bCAwb1V7P7gIwDpBG2wJfAg/nZ3oXiFLK2sD6ef0+uWlp48kbSddfwAfAVOB+YNZoRuBG4CLgbGDLpNLTwIPAjDaIUsomwM7A4cCJyfm9ga0Bwbn+Bt4fKwDyV+5eAZyayWgkHgGmmBdNEKUUk/U44DzgNGA/YN1WyBWBucATwH3Aq6MZgbXyRAVxMXABsFUrEi9GxILkvbQ5JwGfABiR9ho7APXJpRSTzxO9CjgF2ClBPJrJ+JYSm/Io2Mvyeq+r1Km3G3sAPrmUsktu3pyQItskiFkpiS8CnybfBXl+5sBu8K8qP3YASik+/DdgEaBWbw+cCVwHnJRF7gd5nJEww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sDwAUsND8aQtYvJeu2Ak9EZq/7SIEJTqdHCOdewjTHjtx8AReCP7XBsVT8gC45BLWfNUmg3N8jZe/24E5Lb38nAEoPrIfYE9VaOd0w6jZHGTbh9EhNcMDODWDKeKIPIvsh/Qo1+Ykqf5ks+DLtXG++lwjazfdRRzbgOENcIaYGLrar1GN/prRPj9gQHIP2lkuNVuGwzlzBOxU7LntSvTCph4gyyHAwLQF1mRPVGpaERteOq0w0hI26UTQGdP/abYXS2lmzWZlkSE6iEnvc7S76alkP2q2q2LtGrK1X6rjlWsATZJWguHZfYCqlvtCeoE0Eg4AbSx6rsGfkNTSnGTqo+8tYsyUsqdPt+mpV9iVwBWWVvEEXuccyersEWrTgAtdkZipHOLCOtEzzUwgHqHdJImtRs3Cs5F7bYsRBa4rnu2B1uO10ckszE8U+Xs3FSnnrPYNpKhATQoZUNu+bcyGwk/5ong2vdtA5DjTXqqSnUo1o5E51S8AlkhAI1oSBsfrm6b4OaGvyuDTZUSQHMyt8z7gVYk6lTc4uaoRoXSTiyMiF+aUVgpABkNtdpCZ16Y4OaGUbHLqnkxCABzzHFkOxLSyeT31dTciLCOLF0rDaARDVVKVXJq4Rsac0PV0ke57LOVUe207906B1sZCXPBnDDHlGpP325tTu0lVgmF2glVSlGlPEUT3Eg4DFbvBVdfVzl56PmOLNXOg/D7RtQa4YxW8PPaqrTKItBSKR8qCLksJWzgLWbaaOvASxFhgexcpRQrsAehSCgWTsOdj/7YfrOzygE0gFjgfN0kDaSVUbAaa6N9xaTB67nyXbP0UQxUrEVdtBtNACa3Rc9ISCOLne5Tdzt7eQBSIEzsukedwTIvxkcNQL/TXZV/W+MB/AMANfVPjBGemwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-text{font-size:14px;width:30px}.jessibuca-container .jessibuca-speed{font-size:14px;color:#fff}.jessibuca-container .jessibuca-quality-menu-list{position:absolute;left:50%;bottom:100%;visibility:hidden;opacity:0;transform:translateX(-50%);transition:visibility .3s,opacity .3s;background-color:rgba(0,0,0,.5);border-radius:4px}.jessibuca-container .jessibuca-quality-menu-list.jessibuca-quality-menu-shown{visibility:visible;opacity:1}.jessibuca-container .icon-title-tips{pointer-events:none;position:absolute;left:50%;bottom:100%;visibility:hidden;opacity:0;transform:translateX(-50%);transition:visibility .3s ease 0s,opacity .3s ease 0s;background-color:rgba(0,0,0,.5);border-radius:4px}.jessibuca-container .icon-title{display:inline-block;padding:5px 10px;font-size:12px;white-space:nowrap;color:#fff}.jessibuca-container .jessibuca-quality-menu{padding:8px 0}.jessibuca-container .jessibuca-quality-menu-item{display:block;height:25px;margin:0;padding:0 10px;cursor:pointer;font-size:14px;text-align:center;width:50px;color:hsla(0,0%,100%,.5);transition:color .3s,background-color .3s}.jessibuca-container .jessibuca-quality-menu-item:hover{background-color:hsla(0,0%,100%,.2)}.jessibuca-container .jessibuca-quality-menu-item:focus{outline:none}.jessibuca-container .jessibuca-quality-menu-item.jessibuca-quality-menu-item-active{color:#2298fc}.jessibuca-container .jessibuca-volume-panel-wrap{position:absolute;left:50%;bottom:100%;visibility:hidden;opacity:0;transform:translateX(-50%) translateY(22%);transition:visibility .3s,opacity .3s;background-color:rgba(0,0,0,.5);border-radius:4px;height:120px;width:50px;overflow:hidden}.jessibuca-container .jessibuca-volume-panel-wrap.jessibuca-volume-panel-wrap-show{visibility:visible;opacity:1}.jessibuca-container .jessibuca-volume-panel{cursor:pointer;position:absolute;top:21px;height:60px;width:50px;overflow:hidden}.jessibuca-container .jessibuca-volume-panel-text{position:absolute;left:0;top:0;width:50px;height:20px;line-height:20px;text-align:center;color:#fff;font-size:12px}.jessibuca-container .jessibuca-volume-panel-handle{position:absolute;top:48px;left:50%;width:12px;height:12px;border-radius:12px;margin-left:-6px;background:#fff}.jessibuca-container .jessibuca-volume-panel-handle:before{bottom:-54px;background:#fff}.jessibuca-container .jessibuca-volume-panel-handle:after{bottom:6px;background:hsla(0,0%,100%,.2)}.jessibuca-container .jessibuca-volume-panel-handle:after,.jessibuca-container .jessibuca-volume-panel-handle:before{content:"";position:absolute;display:block;left:50%;width:3px;margin-left:-1px;height:60px}.jessibuca-container.jessibuca-fullscreen-web .jessibuca-controls{width:100vh}.jessibuca-container.jessibuca-fullscreen-web .jessibuca-play-big:after{transform:translate(-50%,-50%) rotate(270deg)}.jessibuca-container.jessibuca-fullscreen-web .jessibuca-loading{flex-direction:row}.jessibuca-container.jessibuca-fullscreen-web .jessibuca-loading-text{transform:rotate(270deg)}');class dt{constructor(e){var t;this.player=e,((e,t)=>{e._opt.hasControl&&e._opt.controlAutoHide?e.$container.classList.add("jessibuca-controls-show-auto-hide"):e.$container.classList.add("jessibuca-controls-show");const i=e._opt,o=i.operateBtns;e.$container.insertAdjacentHTML("beforeend",`\n ${i.background?`<div class="jessibuca-poster" style="background-image: url(${i.background})"></div>`:""}\n <div class="jessibuca-loading">\n ${at.loading}\n ${i.loadingText?`<div class="jessibuca-loading-text">${i.loadingText}</div>`:""}\n </div>\n ${i.hasControl&&o.play?'<div class="jessibuca-play-big"></div>':""}\n ${i.hasControl?`\n <div class="jessibuca-recording">\n <div class="jessibuca-recording-red-point"></div>\n <div class="jessibuca-recording-time">00:00:01</div>\n <div class="jessibuca-icon-recordStop jessibuca-recording-stop">${at.recordStop}</div>\n </div>\n `:""}\n ${i.hasControl?`\n <div class="jessibuca-controls">\n <div class="jessibuca-controls-bottom">\n <div class="jessibuca-controls-left">\n ${i.showBandwidth?'<div class="jessibuca-controls-item jessibuca-speed"></div>':""}\n </div>\n <div class="jessibuca-controls-right">\n ${o.audio?`\n <div class="jessibuca-controls-item jessibuca-volume">\n ${at.audio}\n ${at.mute}\n <div class="jessibuca-volume-panel-wrap">\n <div class="jessibuca-volume-panel">\n <div class="jessibuca-volume-panel-handle"></div>\n </div>\n <div class="jessibuca-volume-panel-text"></div>\n </div>\n </div>\n `:""}\n ${o.play?`<div class="jessibuca-controls-item jessibuca-play">${at.play}</div><div class="jessibuca-controls-item jessibuca-pause">${at.pause}</div>`:""}\n ${o.screenshot?`<div class="jessibuca-controls-item jessibuca-screenshot">${at.screenshot}</div>`:""}\n ${o.record?` <div class="jessibuca-controls-item jessibuca-record">${at.record}</div><div class="jessibuca-controls-item jessibuca-record-stop">${at.recordStop}</div>`:""}\n ${o.fullscreen?`<div class="jessibuca-controls-item jessibuca-fullscreen">${at.fullscreen}</div><div class="jessibuca-controls-item jessibuca-fullscreen-exit">${at.fullscreenExit}</div>`:""}\n </div>\n </div>\n </div>\n `:""}\n\n `),Object.defineProperty(t,"$poster",{value:e.$container.querySelector(".jessibuca-poster")}),Object.defineProperty(t,"$loading",{value:e.$container.querySelector(".jessibuca-loading")}),Object.defineProperty(t,"$play",{value:e.$container.querySelector(".jessibuca-play")}),Object.defineProperty(t,"$playBig",{value:e.$container.querySelector(".jessibuca-play-big")}),Object.defineProperty(t,"$recording",{value:e.$container.querySelector(".jessibuca-recording")}),Object.defineProperty(t,"$recordingTime",{value:e.$container.querySelector(".jessibuca-recording-time")}),Object.defineProperty(t,"$recordingStop",{value:e.$container.querySelector(".jessibuca-recording-stop")}),Object.defineProperty(t,"$pause",{value:e.$container.querySelector(".jessibuca-pause")}),Object.defineProperty(t,"$controls",{value:e.$container.querySelector(".jessibuca-controls")}),Object.defineProperty(t,"$fullscreen",{value:e.$container.querySelector(".jessibuca-fullscreen")}),Object.defineProperty(t,"$fullscreen",{value:e.$container.querySelector(".jessibuca-fullscreen")}),Object.defineProperty(t,"$volume",{value:e.$container.querySelector(".jessibuca-volume")}),Object.defineProperty(t,"$volumePanelWrap",{value:e.$container.querySelector(".jessibuca-volume-panel-wrap")}),Object.defineProperty(t,"$volumePanelText",{value:e.$container.querySelector(".jessibuca-volume-panel-text")}),Object.defineProperty(t,"$volumePanel",{value:e.$container.querySelector(".jessibuca-volume-panel")}),Object.defineProperty(t,"$volumeHandle",{value:e.$container.querySelector(".jessibuca-volume-panel-handle")}),Object.defineProperty(t,"$volumeOn",{value:e.$container.querySelector(".jessibuca-icon-audio")}),Object.defineProperty(t,"$volumeOff",{value:e.$container.querySelector(".jessibuca-icon-mute")}),Object.defineProperty(t,"$fullscreen",{value:e.$container.querySelector(".jessibuca-fullscreen")}),Object.defineProperty(t,"$fullscreenExit",{value:e.$container.querySelector(".jessibuca-fullscreen-exit")}),Object.defineProperty(t,"$record",{value:e.$container.querySelector(".jessibuca-record")}),Object.defineProperty(t,"$recordStop",{value:e.$container.querySelector(".jessibuca-record-stop")}),Object.defineProperty(t,"$screenshot",{value:e.$container.querySelector(".jessibuca-screenshot")}),Object.defineProperty(t,"$speed",{value:e.$container.querySelector(".jessibuca-speed")})})(e,this),t=this,Object.defineProperty(t,"controlsRect",{get:()=>t.$controls.getBoundingClientRect()}),nt(e,this),((e,t)=>{const{events:{proxy:i},debug:o}=e;function r(e){const{bottom:i,height:o}=t.$volumePanel.getBoundingClientRect(),{height:r}=t.$volumeHandle.getBoundingClientRect();return ye(i-e.y-r/2,0,o-r/2)/(o-r)}if(i(window,["click","contextmenu"],(i=>{i.composedPath().indexOf(e.$container)>-1?t.isFocus=!0:t.isFocus=!1})),i(window,"orientationchange",(()=>{setTimeout((()=>{e.resize()}),300)})),i(t.$controls,"click",(e=>{e.stopPropagation()})),i(t.$pause,"click",(t=>{e.pause()})),i(t.$play,"click",(t=>{e.play(),e.resumeAudioAfterPause()})),i(t.$playBig,"click",(t=>{e.play(),e.resumeAudioAfterPause()})),i(t.$volume,"mouseover",(()=>{t.$volumePanelWrap.classList.add("jessibuca-volume-panel-wrap-show")})),i(t.$volume,"mouseout",(()=>{t.$volumePanelWrap.classList.remove("jessibuca-volume-panel-wrap-show")})),i(t.$volumeOn,"click",(i=>{i.stopPropagation(),ve(t.$volumeOn,"display","none"),ve(t.$volumeOff,"display","block");const o=e.volume;e.volume=0,e._lastVolume=o})),i(t.$volumeOff,"click",(i=>{i.stopPropagation(),ve(t.$volumeOn,"display","block"),ve(t.$volumeOff,"display","none"),e.volume=e.lastVolume||.5})),i(t.$screenshot,"click",(t=>{t.stopPropagation(),e.video.screenshot()})),i(t.$volumePanel,"click",(t=>{t.stopPropagation(),e.volume=r(t)})),i(t.$volumeHandle,"mousedown",(()=>{t.isVolumeDroging=!0})),i(t.$volumeHandle,"mousemove",(i=>{t.isVolumeDroging&&(e.volume=r(i))})),i(document,"mouseup",(()=>{t.isVolumeDroging&&(t.isVolumeDroging=!1)})),i(t.$record,"click",(t=>{t.stopPropagation(),e.recording=!0})),i(t.$recordStop,"click",(t=>{t.stopPropagation(),e.recording=!1})),i(t.$recordingStop,"click",(t=>{t.stopPropagation(),e.recording=!1})),i(t.$fullscreen,"click",(t=>{t.stopPropagation(),e.fullscreen=!0})),i(t.$fullscreenExit,"click",(t=>{t.stopPropagation(),e.fullscreen=!1})),e._opt.hasControl&&e._opt.controlAutoHide){i(e.$container,"mouseover",(()=>{e.fullscreen||(ve(t.$controls,"display","block"),r())})),i(e.$container,"mousemove",(()=>{e.$container&&t.$controls&&(e.fullscreen,"none"===t.$controls.style.display&&(ve(t.$controls,"display","block"),r()))})),i(e.$container,"mouseout",(()=>{s(),ve(t.$controls,"display","none")}));let o=null;const r=()=>{s(),o=setTimeout((()=>{ve(t.$controls,"display","none")}),5e3)},s=()=>{o&&(clearTimeout(o),o=null)}}})(e,this),e._opt.hotKey&&((e,t)=>{const{events:{proxy:i}}=e,o={};function r(e,t){o[e]?o[e].push(t):o[e]=[t]}r(te,(()=>{e.fullscreen&&(e.fullscreen=!1)})),r(ie,(()=>{e.volume+=.05})),r(oe,(()=>{e.volume-=.05})),i(window,"keydown",(e=>{if(t.isFocus){const t=document.activeElement.tagName.toUpperCase(),i=document.activeElement.getAttribute("contenteditable");if("INPUT"!==t&&"TEXTAREA"!==t&&""!==i&&"true"!==i){const t=o[e.keyCode];t&&(e.preventDefault(),t.forEach((e=>e())))}}}))})(e,this),this.player.debug.log("Control","init")}destroy(){if(this.$poster){if(!Ie(this.$poster)){const e=this.player.$container.querySelector(".jessibuca-poster");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$loading){if(!Ie(this.$loading)){const e=this.player.$container.querySelector(".jessibuca-loading");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$controls){if(!Ie(this.$controls)){const e=this.player.$container.querySelector(".jessibuca-controls");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$recording){if(!Ie(this.$recording)){const e=this.player.$container.querySelector(".jessibuca-recording");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$playBig){if(!Ie(this.$playBig)){const e=this.player.$container.querySelector(".jessibuca-play-big");e&&this.player.$container&&this.player.$container.removeChild(e)}}this.player.debug.log("control","destroy")}autoSize(){const e=this.player;e.$container.style.padding="0 0";const t=e.width,i=e.height,o=t/i,r=e.video.$videoElement.width/e.video.$videoElement.height;if(o>r){const o=(t-i*r)/2;e.$container.style.padding=`0 ${o}px`}else{const o=(i-t/r)/2;e.$container.style.padding=`${o}px 0`}}}At(".jessibuca-container{position:relative;display:block;width:100%;height:100%;overflow:hidden}.jessibuca-container.jessibuca-fullscreen-web{position:fixed;z-index:9999;left:0;top:0;right:0;bottom:0;width:100vw!important;height:100vh!important;background:#000}");class ct{static init(){ct.types={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};for(let e in ct.types)ct.types.hasOwnProperty(e)&&(ct.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);let e=ct.constants={};e.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),e.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),e.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSC=e.STCO=e.STTS,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),e.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),e.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(e){let t=8,i=null,o=Array.prototype.slice.call(arguments,1),r=o.length;for(let e=0;e<r;e++)t+=o[e].byteLength;i=new Uint8Array(t),i[0]=t>>>24&255,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i.set(e,4);let s=8;for(let e=0;e<r;e++)i.set(o[e],s),s+=o[e].byteLength;return i}static generateInitSegment(e){let t=ct.box(ct.types.ftyp,ct.constants.FTYP),i=ct.moov(e),o=new Uint8Array(t.byteLength+i.byteLength);return o.set(t,0),o.set(i,t.byteLength),o}static moov(e){let t=ct.mvhd(e.timescale,e.duration),i=ct.trak(e),o=ct.mvex(e);return ct.box(ct.types.moov,t,i,o)}static mvhd(e,t){return ct.box(ct.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static trak(e){return ct.box(ct.types.trak,ct.tkhd(e),ct.mdia(e))}static tkhd(e){let t=e.id,i=e.duration,o=e.presentWidth,r=e.presentHeight;return ct.box(ct.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,o>>>8&255,255&o,0,0,r>>>8&255,255&r,0,0]))}static mdia(e){return ct.box(ct.types.mdia,ct.mdhd(e),ct.hdlr(e),ct.minf(e))}static mdhd(e){let t=e.timescale,i=e.duration;return ct.box(ct.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,i>>>24&255,i>>>16&255,i>>>8&255,255&i,85,196,0,0]))}static hdlr(e){let t=null;return t="audio"===e.type?ct.constants.HDLR_AUDIO:ct.constants.HDLR_VIDEO,ct.box(ct.types.hdlr,t)}static minf(e){let t=null;return t="audio"===e.type?ct.box(ct.types.smhd,ct.constants.SMHD):ct.box(ct.types.vmhd,ct.constants.VMHD),ct.box(ct.types.minf,t,ct.dinf(),ct.stbl(e))}static dinf(){return ct.box(ct.types.dinf,ct.box(ct.types.dref,ct.constants.DREF))}static stbl(e){return ct.box(ct.types.stbl,ct.stsd(e),ct.box(ct.types.stts,ct.constants.STTS),ct.box(ct.types.stsc,ct.constants.STSC),ct.box(ct.types.stsz,ct.constants.STSZ),ct.box(ct.types.stco,ct.constants.STCO))}static stsd(e){return"audio"===e.type?ct.box(ct.types.stsd,ct.constants.STSD_PREFIX,ct.mp4a(e)):"avc"===e.videoType?ct.box(ct.types.stsd,ct.constants.STSD_PREFIX,ct.avc1(e)):ct.box(ct.types.stsd,ct.constants.STSD_PREFIX,ct.hvc1(e))}static mp4a(e){let t=e.channelCount,i=e.audioSampleRate,o=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return ct.box(ct.types.mp4a,o,ct.esds(e))}static esds(e){let t=e.config||[],i=t.length,o=new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(t).concat([6,1,2]));return ct.box(ct.types.esds,o)}static avc1(e){let t=e.avcc;const i=e.codecWidth,o=e.codecHeight;let r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,o>>>8&255,255&o,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return ct.box(ct.types.avc1,r,ct.box(ct.types.avcC,t))}static hvc1(e){let t=e.avcc;const i=e.codecWidth,o=e.codecHeight;let r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,o>>>8&255,255&o,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return ct.box(ct.types.hvc1,r,ct.box(ct.types.hvcC,t))}static mvex(e){return ct.box(ct.types.mvex,ct.trex(e))}static trex(e){let t=e.id,i=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return ct.box(ct.types.trex,i)}static moof(e,t){return ct.box(ct.types.moof,ct.mfhd(e.sequenceNumber),ct.traf(e,t))}static mfhd(e){let t=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return ct.box(ct.types.mfhd,t)}static traf(e,t){let i=e.id,o=ct.box(ct.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),r=ct.box(ct.types.tfdt,new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),s=ct.sdtp(e),a=ct.trun(e,s.byteLength+16+16+8+16+8+8);return ct.box(ct.types.traf,o,r,a,s)}static sdtp(e){let t=new Uint8Array(5),i=e.flags;return t[4]=i.isLeading<<6|i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy,ct.box(ct.types.sdtp,t)}static trun(e,t){let i=new Uint8Array(28);t+=36,i.set([0,0,15,1,0,0,0,1,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0);let o=e.duration,r=e.size,s=e.flags,a=e.cts;return i.set([o>>>24&255,o>>>16&255,o>>>8&255,255&o,r>>>24&255,r>>>16&255,r>>>8&255,255&r,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.isNonSync,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a],12),ct.box(ct.types.trun,i)}static mdat(e){return ct.box(ct.types.mdat,e)}}ct.init();class lt extends De{constructor(e){super(),this.player=e,this.isAvc=!0,this.mediaSource=new window.MediaSource,this.sourceBuffer=null,this.hasInit=!1,this.isInitInfo=!1,this.cacheTrack={},this.timeInit=!1,this.sequenceNumber=0,this.mediaSourceOpen=!1,this.dropping=!1,this.firstRenderTime=null,this.mediaSourceAppendBufferError=!1,this.mediaSourceAppendBufferFull=!1,this.isDecodeFirstIIframe=!1,this.player.video.$videoElement.src=window.URL.createObjectURL(this.mediaSource);const{debug:t,events:{proxy:i}}=e;i(this.mediaSource,"sourceopen",(()=>{this.mediaSourceOpen=!0,this.player.emit(x.mseSourceOpen)})),i(this.mediaSource,"sourceclose",(()=>{this.player.emit(x.mseSourceClose)})),e.debug.log("MediaSource","init")}destroy(){this.stop(),this.mediaSource=null,this.mediaSourceOpen=!1,this.sourceBuffer=null,this.hasInit=!1,this.isInitInfo=!1,this.sequenceNumber=0,this.cacheTrack=null,this.timeInit=!1,this.mediaSourceAppendBufferError=!1,this.mediaSourceAppendBufferFull=!1,this.isDecodeFirstIIframe=!1,this.off(),this.player.debug.log("MediaSource","destroy")}get state(){return this.mediaSource&&this.mediaSource.readyState}get isStateOpen(){return this.state===_}get isStateClosed(){return this.state===$}get isStateEnded(){return this.state===K}get duration(){return this.mediaSource&&this.mediaSource.duration}set duration(e){this.mediaSource.duration=e}decodeVideo(e,t,i,o){const r=this.player;if(r)if(this.hasInit){if(i&&0===e[1]){let t=ot(e.slice(5));const i=this.player.video.videoInfo;i&&i.width&&i.height&&t&&t.codecWidth&&t.codecHeight&&(t.codecWidth!==i.width||t.codecHeight!==i.height)&&(this.player.debug.warn("MediaSource",`width or height is update, width ${i.width}-> ${t.codecWidth}, height ${i.height}-> ${t.codecHeight}`),this.isInitInfo=!1,this.player.video.init=!1)}if(!this.isDecodeFirstIIframe&&i&&(this.isDecodeFirstIIframe=!0),this.isDecodeFirstIIframe){null===this.firstRenderTime&&(this.firstRenderTime=t);const r=t-this.firstRenderTime;this._decodeVideo(e,r,i,o)}else this.player.debug.warn("MediaSource","decodeVideo isDecodeFirstIIframe false")}else if(i&&0===e[1]){const o=15&e[0];if(r.video.updateVideoInfo({encTypeCode:o}),o===Q)return void this.emit(j.mediaSourceH265NotSupport);r._times.decodeStart||(r._times.decodeStart=be()),this._decodeConfigurationRecord(e,t,i,o),this.hasInit=!0}}_decodeConfigurationRecord(e,t,i,o){let r=e.slice(5),s={};s=ot(r);const a={id:1,type:"video",timescale:1e3,duration:0,avcc:r,codecWidth:s.codecWidth,codecHeight:s.codecHeight,videoType:s.videoType},n=ct.generateInitSegment(a);this.isAvc=!0,this.appendBuffer(n.buffer),this.sequenceNumber=0,this.cacheTrack=null,this.timeInit=!1}_decodeVideo(e,t,i,o){const r=this.player;let s=e.slice(5),a=s.byteLength;const n=r.video.$videoElement,A=r._opt.videoBufferDelay;if(n.buffered.length>1&&(this.removeBuffer(n.buffered.start(0),n.buffered.end(0)),this.timeInit=!1),this.dropping&&t-this.cacheTrack.dts>A)this.dropping=!1,this.cacheTrack={};else if(this.cacheTrack&&t>=this.cacheTrack.dts){let e=8+this.cacheTrack.size,i=new Uint8Array(e);i[0]=e>>>24&255,i[1]=e>>>16&255,i[2]=e>>>8&255,i[3]=255&e,i.set(ct.types.mdat,4),i.set(this.cacheTrack.data,8),this.cacheTrack.duration=t-this.cacheTrack.dts;let o=ct.moof(this.cacheTrack,this.cacheTrack.dts),s=new Uint8Array(o.byteLength+i.byteLength);s.set(o,0),s.set(i,o.byteLength),this.appendBuffer(s.buffer),r.handleRender(),r.updateStats({fps:!0,ts:t,buf:r.demux&&r.demux.delay||0}),r._times.videoStart||(r._times.videoStart=be(),r.handlePlayToRenderTimes())}else r.debug.log("MediaSource","timeInit set false , cacheTrack = {}"),this.timeInit=!1,this.cacheTrack={};this.cacheTrack||(this.cacheTrack={}),this.cacheTrack.id=1,this.cacheTrack.sequenceNumber=++this.sequenceNumber,this.cacheTrack.size=a,this.cacheTrack.dts=t,this.cacheTrack.cts=o,this.cacheTrack.isKeyframe=i,this.cacheTrack.data=s,this.cacheTrack.flags={isLeading:0,dependsOn:i?2:1,isDependedOn:i?1:0,hasRedundancy:0,isNonSync:i?0:1},this.timeInit||1!==n.buffered.length||(r.debug.log("MediaSource","timeInit set true"),this.timeInit=!0,n.currentTime=n.buffered.end(0)),!this.isInitInfo&&n.videoWidth>0&&n.videoHeight>0&&(r.debug.log("MediaSource",`updateVideoInfo: ${n.videoWidth},${n.videoHeight}`),r.video.updateVideoInfo({width:n.videoWidth,height:n.videoHeight}),r.video.initCanvasViewSize(),this.isInitInfo=!0)}appendBuffer(e){const{debug:t,events:{proxy:i}}=this.player;if(null===this.sourceBuffer&&(this.sourceBuffer=this.mediaSource.addSourceBuffer(Z),i(this.sourceBuffer,"error",(e=>{this.player.emit(x.mseSourceBufferError,e)}))),this.mediaSourceAppendBufferError)t.error("MediaSource","this.mediaSourceAppendBufferError is true");else if(this.mediaSourceAppendBufferFull)t.error("MediaSource","this.mediaSourceAppendBufferFull is true");else if(!1===this.sourceBuffer.updating&&this.isStateOpen)try{this.sourceBuffer.appendBuffer(e)}catch(e){t.warn("MediaSource","this.sourceBuffer.appendBuffer()",e.code,e),22===e.code?(this.stop(),this.mediaSourceAppendBufferFull=!0,this.emit(j.mediaSourceFull)):11===e.code?(this.stop(),this.mediaSourceAppendBufferError=!0,this.emit(j.mediaSourceAppendBufferError)):(t.error("MediaSource","appendBuffer error",e),this.player.emit(x.mseSourceBufferError,e))}else this.isStateClosed?this.player.emitError(j.mseSourceBufferError,"mediaSource is not attached to video or mediaSource is closed"):this.isStateEnded?this.player.emitError(j.mseSourceBufferError,"mediaSource is closed"):!0===this.sourceBuffer.updating&&this.player.emit(x.mseSourceBufferBusy)}stop(){this.abortSourceBuffer(),this.removeSourceBuffer(),this.endOfStream()}dropSourceBuffer(e){const t=this.player.video.$videoElement;this.dropping=e,t.buffered.length>0&&t.buffered.end(0)-t.currentTime>1&&(this.player.debug.warn("MediaSource","dropSourceBuffer",`$video.buffered.end(0) is ${t.buffered.end(0)} - $video.currentTime ${t.currentTime}`),t.currentTime=t.buffered.end(0))}removeBuffer(e,t){if(this.isStateOpen&&!1===this.sourceBuffer.updating)try{this.sourceBuffer.remove(e,t)}catch(e){this.player.debug.warn("MediaSource","removeBuffer() error",e)}else this.player.debug.warn("MediaSource","removeBuffer() this.isStateOpen is",this.isStateOpen,"this.sourceBuffer.updating",this.sourceBuffer.updating)}endOfStream(){const e=this.player.video&&this.player.video.$videoElement;if(this.isStateOpen&&e&&e.readyState>=1)try{this.mediaSource.endOfStream()}catch(e){this.player.debug.warn("MediaSource","endOfStream() error",e)}}abortSourceBuffer(){this.isStateOpen&&this.sourceBuffer&&(this.sourceBuffer.abort(),this.sourceBuffer=null)}removeSourceBuffer(){if(!this.isStateClosed&&this.mediaSource&&this.sourceBuffer)try{this.mediaSource.removeSourceBuffer(this.sourceBuffer)}catch(e){this.player.debug.warn("MediaSource","removeSourceBuffer() error",e)}}getSourceBufferUpdating(){return this.sourceBuffer&&this.sourceBuffer.updating}}const ut=()=>"undefined"!=typeof navigator&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream,ht=()=>"wakeLock"in navigator;class pt{constructor(e){if(this.player=e,this.enabled=!1,ht()){this._wakeLock=null;const e=()=>{null!==this._wakeLock&&"visible"===document.visibilityState&&this.enable()};document.addEventListener("visibilitychange",e),document.addEventListener("fullscreenchange",e)}else ut()?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm","data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsghV17AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU1LjMzLjEwMFdBjUxhdmY1NS4zMy4xMDBzpJBlrrXf3DCDVB8KcgbMpcr+RImIQJBgAAAAAAAWVK5rAQAAAAAAD++uAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDiDgQEj44OEAmJaAOABAAAA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CgAhtWRzgpGgssNGQlAJABAEAYg5BCCCFlEEIKIYSUUggJAAAYcAAACDChDBQashIASAUAAIyx1lprrbXWQGettdZaa62AzFprrbXWWmuttdZaa6211lJrrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmstpZRSSimllFJKKaWUUkoppZRSSgUA+lU4APg/2LA6wknRWGChISsBgHAAAMAYpRhzDEIppVQIMeacdFRai7FCiDHnJKTUWmzFc85BKCGV1mIsnnMOQikpxVZjUSmEUlJKLbZYi0qho5JSSq3VWIwxqaTWWoutxmKMSSm01FqLMRYjbE2ptdhqq7EYY2sqLbQYY4zFCF9kbC2m2moNxggjWywt1VprMMYY3VuLpbaaizE++NpSLDHWXAAAd4MDAESCjTOsJJ0VjgYXGrISAAgJACAQUooxxhhzzjnnpFKMOeaccw5CCKFUijHGnHMOQgghlIwx5pxzEEIIIYRSSsaccxBCCCGEkFLqnHMQQgghhBBKKZ1zDkIIIYQQQimlgxBCCCGEEEoopaQUQgghhBBCCKmklEIIIYRSQighlZRSCCGEEEIpJaSUUgohhFJCCKGElFJKKYUQQgillJJSSimlEkoJJYQSUikppRRKCCGUUkpKKaVUSgmhhBJKKSWllFJKIYQQSikFAAAcOAAABBhBJxlVFmGjCRcegEJDVgIAZAAAkKKUUiktRYIipRikGEtGFXNQWoqocgxSzalSziDmJJaIMYSUk1Qy5hRCDELqHHVMKQYtlRhCxhik2HJLoXMOAAAAQQCAgJAAAAMEBTMAwOAA4XMQdAIERxsAgCBEZohEw0JweFAJEBFTAUBigkIuAFRYXKRdXECXAS7o4q4DIQQhCEEsDqCABByccMMTb3jCDU7QKSp1IAAAAAAADADwAACQXAAREdHMYWRobHB0eHyAhIiMkAgAAAAAABcAfAAAJCVAREQ0cxgZGhscHR4fICEiIyQBAIAAAgAAAAAggAAEBAQAAAAAAAIAAAAEBB9DtnUBAAAAAAAEPueBAKOFggAAgACjzoEAA4BwBwCdASqwAJAAAEcIhYWIhYSIAgIAB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wAAAAAAAAAbAAAAAQAAAAEAAAABAAAAAgAAAAIAAAABAAAAAwAAAAEAAAABAAAABAAAAAIAAAABAAAABgAAAAEAAAABAAAABwAAAAIAAAABAAAACAAAAAEAAAABAAAACQAAAAIAAAABAAAACgAAAAEAAAABAAAACwAAAAIAAAABAAAADQAAAAEAAAABAAAADgAAAAIAAAABAAAADwAAAAEAAAABAAAAEAAAAAIAAAABAAAAEQAAAAEAAAABAAAAEgAAAAIAAAABAAAAFAAAAAEAAAABAAAAFQAAAAIAAAABAAAAFgAAAAEAAAABAAAAFwAAAAIAAAABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAAAGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAAABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANyAAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHoAAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQAABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"),this.noSleepVideo.addEventListener("loadedmetadata",(()=>{this.noSleepVideo.duration<=1?this.noSleepVideo.setAttribute("loop",""):this.noSleepVideo.addEventListener("timeupdate",(()=>{this.noSleepVideo.currentTime>.5&&(this.noSleepVideo.currentTime=Math.random())}))})))}_addSourceToVideo(e,t,i){var o=document.createElement("source");o.src=i,o.type=`video/${t}`,e.appendChild(o)}get isEnabled(){return this.enabled}enable(){const e=this.player.debug;if(ht())return navigator.wakeLock.request("screen").then((t=>{this._wakeLock=t,this.enabled=!0,e.log("wakeLock","Wake Lock active."),this._wakeLock.addEventListener("release",(()=>{e.log("wakeLock","Wake Lock released.")}))})).catch((t=>{throw this.enabled=!1,e.error("wakeLock",`${t.name}, ${t.message}`),t}));if(ut())return this.disable(),this.noSleepTimer=window.setInterval((()=>{document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))}),15e3),this.enabled=!0,Promise.resolve();return this.noSleepVideo.play().then((e=>(this.enabled=!0,e))).catch((e=>{throw this.enabled=!1,e}))}disable(){const e=this.player.debug;ht()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):ut()?this.noSleepTimer&&(e.warn("wakeLock","NoSleep now disabled for older iOS devices."),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause(),this.enabled=!1}}class mt extends De{constructor(e,t){var i;super(),this.$container=e,this._opt=Object.assign({},l,t),this.debug=new he(this),this._opt.useWCS&&(this._opt.useWCS="VideoEncoder"in window),this._opt.useMSE&&(this._opt.useMSE=window.MediaSource&&window.MediaSource.isTypeSupported(Z)),this._opt.wcsUseVideoRender&&(this._opt.wcsUseVideoRender=window.MediaStreamTrackGenerator&&"function"==typeof window.MediaStreamTrackGenerator),this._opt.useMSE&&(this._opt.useWCS&&this.debug.log("Player","useWCS set true->false"),this._opt.forceNoOffscreen||this.debug.log("Player","forceNoOffscreen set false->true"),this._opt.useWCS=!1,this._opt.forceNoOffscreen=!0),this._opt.forceNoOffscreen||("undefined"==typeof OffscreenCanvas?(this._opt.forceNoOffscreen=!0,this._opt.useOffscreen=!1):this._opt.useOffscreen=!0),this._opt.hasAudio||(this._opt.operateBtns.audio=!1),this._opt.hasControl=this._hasControl(),this._loading=!1,this._playing=!1,this._hasLoaded=!1,this._checkHeartTimeout=null,this._checkLoadingTimeout=null,this._checkStatsInterval=null,this._startBpsTime=null,this._isPlayingBeforePageHidden=!1,this._stats={buf:0,fps:0,abps:0,vbps:0,ts:0},this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},this._videoTimestamp=0,this._audioTimestamp=0,i=this,Object.defineProperty(i,"rect",{get:()=>{const e=i.$container.getBoundingClientRect();return e.width=Math.max(e.width,i.$container.clientWidth),e.height=Math.max(e.height,i.$container.clientHeight),e}}),["bottom","height","left","right","top","width"].forEach((e=>{Object.defineProperty(i,e,{get:()=>i.rect[e]})})),this.events=new pe(this),this.video=new Je(this),this._opt.hasAudio&&(this.audio=new Ge(this)),this.recorder=new qe(this),this._onlyMseOrWcsVideo()?this.loaded=!0:this.decoderWorker=new Ze(this),this.stream=null,this.demux=null,this._lastVolume=null,this._opt.useWCS&&(this.webcodecsDecoder=new rt(this),this.loaded=!0),this._opt.useMSE&&(this.mseDecoder=new lt(this),this.loaded=!0),this.control=new dt(this),Be()&&(this.keepScreenOn=new pt(this)),(e=>{try{const t=t=>{Te(t)===e.$container&&(e.emit(D.fullscreen,e.fullscreen),e.fullscreen?e._opt.useMSE&&e.resize():e.resize())};me.on("change",t),e.events.destroys.push((()=>{me.off("change",t)}))}catch(e){}if(e.on(x.decoderWorkerInit,(()=>{e.debug.log("player","has loaded"),e.loaded=!0})),e.on(x.play,(()=>{e.loading=!1})),e.on(x.fullscreen,(t=>{if(t)try{me.request(e.$container).then((()=>{})).catch((t=>{Be()&&e._opt.useWebFullScreen&&(e.webFullscreen=!0)}))}catch(t){Be()&&e._opt.useWebFullScreen&&(e.webFullscreen=!0)}else try{me.exit().then((()=>{e.webFullscreen&&(e.webFullscreen=!1)})).catch((()=>{e.webFullscreen=!1}))}catch(t){e.webFullscreen=!1}})),Be()&&e.on(x.webFullscreen,(t=>{t?e.$container.classList.add("jessibuca-fullscreen-web"):e.$container.classList.remove("jessibuca-fullscreen-web"),e.emit(D.fullscreen,e.fullscreen)})),e.on(x.resize,(()=>{e.video&&e.video.resize()})),e._opt.debug){const t=[x.timeUpdate];Object.keys(x).forEach((i=>{e.on(x[i],(o=>{t.includes(i)||e.debug.log("player events",x[i],o)}))})),Object.keys(j).forEach((t=>{e.on(j[t],(i=>{e.debug.log("player event error",j[t],i)}))}))}})(this),(e=>{const{_opt:t,debug:i,events:{proxy:o}}=e;t.supportDblclickFullscreen&&o(e.$container,"dblclick",(t=>{const i=Te(t).nodeName.toLowerCase();"canvas"!==i&&"video"!==i||(e.fullscreen=!e.fullscreen)})),o(document,"visibilitychange",(()=>{t.hiddenAutoPause&&(i.log("visibilitychange",document.visibilityState,e._isPlayingBeforePageHidden),"visible"===document.visibilityState?e._isPlayingBeforePageHidden&&e.play():(e._isPlayingBeforePageHidden=e.playing,e.playing&&e.pause()))})),o(window,"fullscreenchange",(()=>{null!==e.keepScreenOn&&"visible"===document.visibilityState&&e.enableWakeLock()}))})(this),this._opt.useWCS&&this.debug.log("Player","use WCS"),this._opt.useMSE&&this.debug.log("Player","use MSE"),this._opt.useOffscreen&&this.debug.log("Player","use offscreen"),this.debug.log("Player options",this._opt)}destroy(){this._loading=!1,this._playing=!1,this._hasLoaded=!1,this._lastVolume=null,this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},this.decoderWorker&&(this.decoderWorker.destroy(),this.decoderWorker=null),this.video&&(this.video.destroy(),this.video=null),this.audio&&(this.audio.destroy(),this.audio=null),this.stream&&(this.stream.destroy(),this.stream=null),this.recorder&&(this.recorder.destroy(),this.recorder=null),this.control&&(this.control.destroy(),this.control=null),this.webcodecsDecoder&&(this.webcodecsDecoder.destroy(),this.webcodecsDecoder=null),this.mseDecoder&&(this.mseDecoder.destroy(),this.mseDecoder=null),this.demux&&(this.demux.destroy(),this.demux=null),this.events&&(this.events.destroy(),this.events=null),this.clearCheckHeartTimeout(),this.clearCheckLoadingTimeout(),this.clearStatsInterval(),this.releaseWakeLock(),this.keepScreenOn=null,this.resetStats(),this._audioTimestamp=0,this._videoTimestamp=0,this.emit("destroy"),this.off(),this.debug.log("play","destroy end")}set fullscreen(e){Be()&&this._opt.useWebFullScreen?(this.emit(x.webFullscreen,e),setTimeout((()=>{this.updateOption({rotate:e?270:0}),this.resize()}),10)):this.emit(x.fullscreen,e)}get fullscreen(){return me.isFullscreen||this.webFullscreen}set webFullscreen(e){this.emit(x.webFullscreen,e)}get webFullscreen(){return this.$container.classList.contains("jessibuca-fullscreen-web")}set loaded(e){this._hasLoaded=e}get loaded(){return this._hasLoaded}set playing(e){e&&(this.loading=!1),this.playing!==e&&(this._playing=e,this.emit(x.playing,e),this.emit(x.volumechange,this.volume),e?this.emit(x.play):this.emit(x.pause))}get playing(){return this._playing}get volume(){return this.audio&&this.audio.volume||0}set volume(e){e!==this.volume&&(this.audio&&this.audio.setVolume(e),this._lastVolume=e)}get lastVolume(){return this._lastVolume}set loading(e){this.loading!==e&&(this._loading=e,this.emit(x.loading,this._loading))}get loading(){return this._loading}set recording(e){e?this.playing&&this.recorder&&this.recorder.startRecord():this.recorder&&this.recorder.stopRecordAndSave()}get recording(){return!!this.recorder&&this.recorder.recording}set audioTimestamp(e){null!==e&&(this._audioTimestamp=e)}get audioTimestamp(){return this._audioTimestamp}set videoTimestamp(e){null!==e&&(this._videoTimestamp=e,this._opt.useWCS||this._opt.useMSE||this.audioTimestamp&&this.videoTimestamp&&this.audio&&this.audio.emit(x.videoSyncAudio,{audioTimestamp:this.audioTimestamp,videoTimestamp:this.videoTimestamp,diff:this.audioTimestamp-this.videoTimestamp}))}get videoTimestamp(){return this._videoTimestamp}get isDebug(){return!0===this._opt.debug}updateOption(e){this._opt=Object.assign({},this._opt,e)}init(){return new Promise(((e,t)=>{this.stream||(this.stream=new ze(this)),this.audio||this._opt.hasAudio&&(this.audio=new Ge(this)),this.demux||(this.demux=new et(this)),this._opt.useWCS&&(this.webcodecsDecoder||(this.webcodecsDecoder=new rt(this))),this._opt.useMSE&&(this.mseDecoder||(this.mseDecoder=new lt(this))),this.decoderWorker||this._onlyMseOrWcsVideo()?e():(this.decoderWorker=new Ze(this),this.once(x.decoderWorkerInit,(()=>{e()})))}))}play(e,t){return new Promise(((i,o)=>{if(!e&&!this._opt.url)return o();this.loading=!0,this.playing=!1,this._times.playInitStart=be(),e||(e=this._opt.url),this._opt.url=e,this.clearCheckHeartTimeout(),this.init().then((()=>{this._times.playStart=be(),this._opt.isNotMute&&this.mute(!1),this.webcodecsDecoder&&this.webcodecsDecoder.once(j.webcodecsH265NotSupport,(()=>{this.emit(j.webcodecsH265NotSupport),this._opt.autoWasm||this.emit(x.error,j.webcodecsH265NotSupport)})),this.mseDecoder&&(this.mseDecoder.once(j.mediaSourceH265NotSupport,(()=>{this.emit(j.mediaSourceH265NotSupport),this._opt.autoWasm||this.emit(x.error,j.mediaSourceH265NotSupport)})),this.mseDecoder.once(j.mediaSourceFull,(()=>{this.emitError(j.mediaSourceFull)})),this.mseDecoder.once(j.mediaSourceAppendBufferError,(()=>{this.emitError(j.mediaSourceAppendBufferError)})),this.mseDecoder.once(j.mediaSourceBufferListLarge,(()=>{this.emitError(j.mediaSourceBufferListLarge)})),this.mseDecoder.once(j.mediaSourceAppendBufferEndTimeout,(()=>{this.emitError(j.mediaSourceAppendBufferEndTimeout)}))),this.enableWakeLock(),this.stream.fetchStream(e,t),this.checkLoadingTimeout(),this.stream.once(j.fetchError,(e=>{o(e)})),this.stream.once(j.websocketError,(e=>{o(e)})),this.stream.once(x.streamEnd,(()=>{o()})),this.stream.once(x.streamSuccess,(()=>{i(),this._times.streamResponse=be(),this.video.play(),this.checkStatsInterval()}))})).catch((e=>{o(e)}))}))}close(){return new Promise(((e,t)=>{this._close().then((()=>{this.video&&this.video.clearView(),e()}))}))}resumeAudioAfterPause(){this.lastVolume&&(this.volume=this.lastVolume)}_close(){return new Promise(((e,t)=>{this.stream&&(this.stream.destroy(),this.stream=null),this.demux&&(this.demux.destroy(),this.demux=null),this.decoderWorker&&(this.decoderWorker.destroy(),this.decoderWorker=null),this.webcodecsDecoder&&(this.webcodecsDecoder.destroy(),this.webcodecsDecoder=null),this.mseDecoder&&(this.mseDecoder.destroy(),this.mseDecoder=null),this.audio&&(this.audio.destroy(),this.audio=null),this.clearCheckHeartTimeout(),this.clearCheckLoadingTimeout(),this.clearStatsInterval(),this.playing=!1,this.loading=!1,this.recording=!1,this.video&&(this.video.resetInit(),this.video.pause(!0)),this.releaseWakeLock(),this.resetStats(),this._audioTimestamp=0,this._videoTimestamp=0,this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},setTimeout((()=>{e()}),0)}))}pause(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?this.close():this._close()}mute(e){this.audio&&this.audio.mute(e)}resize(){this.video.resize()}startRecord(e,t){this.recording||(this.recorder.setFileName(e,t),this.recording=!0)}stopRecordAndSave(){this.recording&&(this.recording=!1)}_hasControl(){let e=!1,t=!1;return Object.keys(this._opt.operateBtns).forEach((e=>{this._opt.operateBtns[e]&&(t=!0)})),(this._opt.showBandwidth||this._opt.text||t)&&(e=!0),e}_onlyMseOrWcsVideo(){return!1===this._opt.hasAudio&&(this._opt.useMSE||this._opt.useWCS&&!this._opt.useOffscreen)}checkHeart(){this.clearCheckHeartTimeout(),this.checkHeartTimeout()}checkHeartTimeout(){this._checkHeartTimeout=setTimeout((()=>{if(this.playing){if(0!==this._stats.fps)return;this.pause().then((()=>{this.emit(x.timeout,x.delayTimeout),this.emit(x.delayTimeout)}))}}),1e3*this._opt.heartTimeout)}checkStatsInterval(){this._checkStatsInterval=setInterval((()=>{this.updateStats()}),1e3)}clearCheckHeartTimeout(){this._checkHeartTimeout&&(clearTimeout(this._checkHeartTimeout),this._checkHeartTimeout=null)}checkLoadingTimeout(){this._checkLoadingTimeout=setTimeout((()=>{this.playing||this.pause().then((()=>{this.emit(x.timeout,x.loadingTimeout),this.emit(x.loadingTimeout)}))}),1e3*this._opt.loadingTimeout)}clearCheckLoadingTimeout(){this._checkLoadingTimeout&&(clearTimeout(this._checkLoadingTimeout),this._checkLoadingTimeout=null)}clearStatsInterval(){this._checkStatsInterval&&(clearInterval(this._checkStatsInterval),this._checkStatsInterval=null)}handleRender(){this.loading&&(this.emit(x.start),this.loading=!1,this.clearCheckLoadingTimeout()),this.playing||(this.playing=!0),this.checkHeart()}updateStats(e){e=e||{},this._startBpsTime||(this._startBpsTime=be()),ke(e.ts)&&(this._stats.ts=e.ts),ke(e.buf)&&(this._stats.buf=e.buf),e.fps&&(this._stats.fps+=1),e.abps&&(this._stats.abps+=e.abps),e.vbps&&(this._stats.vbps+=e.vbps);const t=be();t-this._startBpsTime<1e3||(this.emit(x.stats,this._stats),this.emit(x.performance,function(e){let t=0;return e>=24?t=2:e>=15&&(t=1),t}(this._stats.fps)),this._stats.fps=0,this._stats.abps=0,this._stats.vbps=0,this._startBpsTime=t)}resetStats(){this._startBpsTime=null,this._stats={buf:0,fps:0,abps:0,vbps:0,ts:0}}enableWakeLock(){this._opt.keepScreenOn&&this.keepScreenOn&&this.keepScreenOn.enable()}releaseWakeLock(){this._opt.keepScreenOn&&this.keepScreenOn&&this.keepScreenOn.disable()}handlePlayToRenderTimes(){const e=this._times;e.playTimestamp=e.playStart-e.playInitStart,e.streamTimestamp=e.streamStart-e.playStart,e.streamResponseTimestamp=e.streamResponse-e.streamStart,e.demuxTimestamp=e.demuxStart-e.streamResponse,e.decodeTimestamp=e.decodeStart-e.demuxStart,e.videoTimestamp=e.videoStart-e.decodeStart,e.allTimestamp=e.videoStart-e.playInitStart,this.emit(x.playToRenderTimes,e)}getOption(){return this._opt}emitError(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.emit(x.error,e,t),this.emit(e,t)}}class gt extends De{constructor(e){super();let t=e,i=e.container;if("string"==typeof e.container&&(i=document.querySelector(e.container)),!i)throw new Error("Jessibuca need container option");if("CANVAS"===i.nodeName||"VIDEO"===i.nodeName)throw new Error(`Jessibuca container type can not be ${i.nodeName} type`);if(t.videoBuffer>=t.heartTimeout)throw new Error(`Jessibuca videoBuffer ${t.videoBuffer}s must be less than heartTimeout ${t.heartTimeout}s`);i.classList.add("jessibuca-container"),delete t.container,t.forceNoOffscreen=!0,Be()&&(t.controlAutoHide=!1),ke(t.videoBuffer)&&(t.videoBuffer=1e3*Number(t.videoBuffer)),ke(t.timeout)&&(Re(t.loadingTimeout)&&(t.loadingTimeout=t.timeout),Re(t.heartTimeout)&&(t.heartTimeout=t.timeout)),this._opt=t,this.$container=i,this._loadingTimeoutReplayTimes=0,this._heartTimeoutReplayTimes=0,this.events=new pe(this),this.debug=new he(this),this._initPlayer(i,t)}destroy(){this.events&&(this.events.destroy(),this.events=null),this.player&&(this.player.destroy(),this.player=null),this.$container=null,this._opt=null,this._loadingTimeoutReplayTimes=0,this._heartTimeoutReplayTimes=0,this.off()}_initPlayer(e,t){this.player=new mt(e,t),this.debug.log("jessibuca","_initPlayer",this.player.getOption()),this._bindEvents()}_resetPlayer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.player.destroy(),this.player=null,this._opt=Object.assign(this._opt,e),this._opt.url="",this._initPlayer(this.$container,this._opt)}_bindEvents(){Object.keys(D).forEach((e=>{this.player.on(D[e],(t=>{this.emit(e,t)}))}))}setDebug(e){this.player.updateOption({debug:!!e})}mute(){this.player.mute(!0)}cancelMute(){this.player.mute(!1)}setVolume(e){this.player.volume=e}audioResume(){this.player.audio&&this.player.audio.audioEnabled(!0)}setTimeout(e){e=Number(e),this.player.updateOption({timeout:e,loadingTimeout:e,heartTimeout:e})}setScaleMode(e){let t={isFullResize:!1,isResize:!1};switch(e=Number(e)){case P:t.isFullResize=!1,t.isResize=!1;break;case G:t.isFullResize=!1,t.isResize=!0;break;case N:t.isFullResize=!0,t.isResize=!0}this.player.updateOption(t),this.resize()}pause(){return new Promise(((e,t)=>{this.player?this.player.pause().then((()=>{e()})).catch((e=>{t(e)})):t("player is null")}))}close(){return this._opt.url="",this._opt.playOptions={},this.player.close()}clearView(){this.player.video.clearView()}play(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,o)=>{if(!e&&!this._opt.url)return this.emit(x.error,j.playError),void o("play url is empty");e?this._opt.url?e===this._opt.url?this.player.playing?i():(this.clearView(),this.player.play(this._opt.url,this._opt.playOptions).then((()=>{i(),this.player.resumeAudioAfterPause()})).catch((e=>{this.debug.warn("jessibuca","pause -> play and play error",e),this.player.pause().then((()=>{o(e)}))}))):this.player.pause().then((()=>{this.clearView(),this._play(e,t).then((()=>{i()})).catch((e=>{this.debug.warn("jessibuca","this._play error",e),o(e)}))})).catch((e=>{this.debug.warn("jessibuca","this._opt.url is null and pause error",e),o(e)})):this._play(e,t).then((()=>{i()})).catch((e=>{this.debug.warn("jessibuca","this._play error",e),o(e)})):this.player.play(this._opt.url,this._opt.playOptions).then((()=>{i(),this.player.resumeAudioAfterPause()})).catch((e=>{this.debug.warn("jessibuca","url is null and play error",e),this.player.pause().then((()=>{o(e)}))}))}))}_play(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,o)=>{this._opt.url=e,this._opt.playOptions=t;const r=0===e.indexOf("http"),d=r?a:s,c=r||-1!==e.indexOf(".flv")||this._opt.isFlv?n:A;this.player.updateOption({protocol:d,demuxType:c}),this.player.once(j.webglAlignmentError,(()=>{this.pause().then((()=>{this.debug.log("Jessibuca","webglAlignmentError"),this._resetPlayer({openWebglAlignment:!0}),this.play(e,t).then((()=>{this.debug.log("Jessibuca","webglAlignmentError and play success")})).catch((()=>{this.debug.log("Jessibuca","webglAlignmentError and play error")}))}))})),this.player.once(j.mediaSourceH265NotSupport,(()=>{this.pause().then((()=>{this.player._opt.autoWasm&&(this.debug.log("Jessibuca","auto wasm [mse-> wasm] reset player and play"),this._resetPlayer({useMSE:!1}),this.play(e,t).then((()=>{this.debug.log("Jessibuca","auto wasm [mse-> wasm] reset player and play success")})).catch((()=>{this.debug.log("Jessibuca","auto wasm [mse-> wasm] reset player and play error")})))}))})),this.player.once(j.mediaSourceFull,(()=>{this.pause().then((()=>{this.debug.log("Jessibuca","media source full"),this._resetPlayer(),this.play(e,t).then((()=>{this.debug.log("Jessibuca","media source full and reset player and play success")})).catch((()=>{this.debug.warn("Jessibuca","media source full and reset player and play error")}))}))})),this.player.once(j.mediaSourceAppendBufferError,(()=>{this.pause().then((()=>{this.debug.log("Jessibuca","media source append buffer error"),this._resetPlayer(),this.play(e,t).then((()=>{this.debug.log("Jessibuca","media source append buffer error and reset player and play success")})).catch((()=>{this.debug.warn("Jessibuca","media source append buffer error and reset player and play error")}))}))})),this.player.once(j.mediaSourceBufferListLarge,(()=>{this.pause().then((()=>{this.debug.log("Jessibuca","media source buffer list large"),this._resetPlayer(),this.play(e,t).then((()=>{this.debug.log("Jessibuca","media source buffer list large and reset player and play success")})).catch((()=>{this.debug.warn("Jessibuca","media source buffer list large and reset player and play error")}))}))})),this.player.once(j.mediaSourceAppendBufferEndTimeout,(()=>{this.pause().then((()=>{this.debug.log("Jessibuca","media source append buffer end timeout"),this._resetPlayer(),this.play(e,t).then((()=>{this.debug.log("Jessibuca","media source append buffer end timeout and reset player and play success")})).catch((()=>{this.debug.warn("Jessibuca","media source append buffer end timeout and reset player and play error")}))}))})),this.player.once(j.mseSourceBufferError,(()=>{this.pause().then((()=>{this.player._opt.autoWasm&&(this.debug.log("Jessibuca","auto wasm [mse-> wasm] reset player and play"),this._resetPlayer({useMSE:!1}),this.play(e,t).then((()=>{this.debug.log("Jessibuca","auto wasm [mse-> wasm] reset player and play success")})).catch((()=>{this.debug.warn("Jessibuca","auto wasm [mse-> wasm] reset player and play error")})))}))})),this.player.once(j.webcodecsH265NotSupport,(()=>{this.pause().then((()=>{this.player._opt.autoWasm&&(this.debug.log("Jessibuca","auto wasm [wcs-> wasm] reset player and play"),this._resetPlayer({useWCS:!1}),this.play(e,t).then((()=>{this.debug.log("Jessibuca","auto wasm [wcs-> wasm] reset player and play success")})).catch((()=>{this.debug.warn("Jessibuca","auto wasm [wcs-> wasm] reset player and play error")})))}))})),this.player.once(j.webcodecsWidthOrHeightChange,(()=>{this.pause().then((()=>{this.debug.log("Jessibuca","webcodecs Width Or Height Change reset player and play"),this._resetPlayer({useWCS:!0}),this.play(e,t).then((()=>{this.debug.log("Jessibuca","webcodecs Width Or Height Change reset player and play success")})).catch((()=>{this.debug.warn("Jessibuca","webcodecs Width Or Height Change reset player and play error")}))}))})),this.player.once(j.webcodecsDecodeError,(()=>{this.pause().then((()=>{this.player._opt.autoWasm&&(this.debug.log("Jessibuca","webcodecs decode error reset player and play"),this._resetPlayer({useWCS:!1}),this.play(e,t).then((()=>{this.debug.log("Jessibuca","webcodecs decode error reset player and play success")})).catch((()=>{this.debug.warn("Jessibuca","webcodecs decode error reset player and play error")})))}))})),this.player.once(j.wasmDecodeError,(()=>{this.player._opt.wasmDecodeErrorReplay&&this.pause().then((()=>{this.debug.log("Jessibuca","wasm decode error and reset player and play"),this._resetPlayer({useWCS:!1}),this.play(e,t).then((()=>{this.debug.log("Jessibuca","wasm decode error and reset player and play success")})).catch((()=>{this.debug.warn("Jessibuca","wasm decode error and reset player and play error")}))}))})),this.player.on(x.delayTimeout,(()=>{this.player._opt.heartTimeoutReplay&&(this._heartTimeoutReplayTimes<this.player._opt.heartTimeoutReplayTimes||-1===this.player._opt.heartTimeoutReplayTimes)&&(this.debug.log("Jessibuca",`delay timeout replay time is ${this._heartTimeoutReplayTimes}`),this._heartTimeoutReplayTimes+=1,this.play(e,t).then((()=>{this._heartTimeoutReplayTimes=0})).catch((()=>{})))})),this.player.on(x.loadingTimeout,(()=>{this.player._opt.loadingTimeoutReplay&&(this._loadingTimeoutReplayTimes<this.player._opt.loadingTimeoutReplayTimes||-1===this.player._opt.loadingTimeoutReplayTimes)&&(this.debug.log("Jessibuca",`loading timeout replay time is ${this._loadingTimeoutReplayTimes}`),this._loadingTimeoutReplayTimes+=1,this.play(e,t).then((()=>{this._loadingTimeoutReplayTimes=0})).catch((()=>{})))})),this.hasLoaded()?this.player.play(e,t).then((()=>{i()})).catch((e=>{this.debug.warn("Jessibuca","hasLoaded and play error",e),this.player&&this.player.pause().then((()=>{o(e)}))})):this.player.once(x.decoderWorkerInit,(()=>{this.player.play(e,t).then((()=>{i()})).catch((e=>{this.debug.warn("Jessibuca","decoderWorkerInit and play error",e),this.player&&this.player.pause().then((()=>{o(e)}))}))}))}))}resize(){this.player.resize()}setBufferTime(e){e=Number(e),this.player.updateOption({videoBuffer:1e3*e}),this.player.decoderWorker&&this.player.decoderWorker.updateWorkConfig({key:"videoBuffer",value:1e3*e})}setRotate(e){e=parseInt(e,10);this._opt.rotate!==e&&-1!==[0,90,180,270].indexOf(e)&&(this.player.updateOption({rotate:e}),this.resize())}hasLoaded(){return this.player.loaded}setKeepScreenOn(){this.player.updateOption({keepScreenOn:!0})}setFullscreen(e){const t=!!e;this.player.fullscreen!==t&&(this.player.fullscreen=t)}screenshot(e,t,i,o){return this.player.video?this.player.video.screenshot(e,t,i,o):""}startRecord(e,t){return new Promise(((i,o)=>{this.player.playing?(this.player.startRecord(e,t),i()):o()}))}stopRecordAndSave(){this.player.recording&&this.player.stopRecordAndSave()}isPlaying(){return!!this.player&&this.player.playing}isMute(){return!this.player.audio||this.player.audio.isMute}isRecording(){return this.player.recorder.recording}}return r(gt,"ERROR",j),r(gt,"TIMEOUT",{loadingTimeout:x.loadingTimeout,delayTimeout:x.delayTimeout}),window.Jessibuca=gt,gt})); diff --git a/vue/src/views/components/player/DeviceTree.vue b/vue/src/views/components/player/DeviceTree.vue deleted file mode 100644 index ef586f01..00000000 --- a/vue/src/views/components/player/DeviceTree.vue +++ /dev/null @@ -1,183 +0,0 @@ -<template> - <div id="DeviceTree" style="width: 100%; height: 100%; background-color: #ffffff; overflow: auto"> - <div style="line-height: 3vh;margin-bottom: 10px;font-size: 17px;">设备列表</div> - <el-tree ref="tree" :props="defaultProps" :current-node-key="selectchannelId" :default-expanded-keys="expandIds" - :highlight-current="true" @node-click="handleNodeClick" :load="loadNode" lazy node-key="id" - style="min-width: 100%; display: inline-block !important"> - <span class="custom-tree-node" slot-scope="{ node, data }" style="width: 100%"> - <span v-if="node.data.type === 0 && node.data.online" title="在线设备" - class="device-online iconfont icon-jiedianleizhukongzhongxin2"></span> - <span v-if="node.data.type === 0 && !node.data.online" title="离线设备" - class="device-offline iconfont icon-jiedianleizhukongzhongxin2"></span> - <span v-if="node.data.type === 3 && node.data.online" title="在线通道" - class="device-online iconfont icon-shebeileijiankongdian"></span> - <span v-if="node.data.type === 3 && !node.data.online" title="离线通道" - class="device-offline iconfont icon-shebeileijiankongdian"></span> - <span v-if="node.data.type === 4 && node.data.online" title="在线通道-球机" - class="device-online iconfont icon-shebeileiqiuji"></span> - <span v-if="node.data.type === 4 && !node.data.online" title="离线通道-球机" - class="device-offline iconfont icon-shebeileiqiuji"></span> - <span v-if="node.data.type === 5 && node.data.online" title="在线通道-半球" - class="device-online iconfont icon-shebeileibanqiu"></span> - <span v-if="node.data.type === 5 && !node.data.online" title="离线通道-半球" - class="device-offline iconfont icon-shebeileibanqiu"></span> - <span v-if="node.data.type === 6 && node.data.online" title="在线通道-枪机" - class="device-online iconfont icon-shebeileiqiangjitongdao"></span> - <span v-if="node.data.type === 6 && !node.data.online" title="离线通道-枪机" - class="device-offline iconfont icon-shebeileiqiangjitongdao"></span> - <span v-if="node.data.online" style="padding-left: 1px" class="device-online">{{ node.label }}</span> - <span v-if="!node.data.online" style="padding-left: 1px" class="device-offline">{{ node.label }}</span> - </span> - </el-tree> - </div> -</template> - -<script> -import { listSipDeviceChannel } from '@/api/iot/sipdevice'; -import { listDeviceShort } from '@/api/iot/device'; - -export default { - name: 'DeviceTree', - data() { - return { - // 总条数 - total: 0, - // 监控设备通道信息表格数据 - channelList: [], - DeviceData: [], - expandIds: [], - selectData: {}, - selectchannelId: '', - defaultProps: { - children: 'children', - label: 'name', - isLeaf: 'isLeaf', - }, - queryParams: { - pageNum: 1, - pageSize: 100, - status: 3, - deviceType: 3, - }, - }; - }, - props: ['onlyCatalog', 'clickEvent'], - mounted() { - this.selectchannelId = ''; - this.expandIds = ['0']; - }, - methods: { - handleNodeClick(data, node, element) { - this.selectData = node.data; - this.selectchannelId = node.data.value; - if (node.level !== 0) { - let deviceNode = this.$refs.tree.getNode(data.userData.channelSipId); - if (typeof this.clickEvent == 'function' && node.level > 1) { - this.clickEvent(deviceNode.data.userData); - } - } - }, - loadNode: function (node, resolve) { - if (node.level === 0) { - listDeviceShort(this.queryParams).then((response) => { - const data = response.rows; - if (data.length > 0) { - let nodeList = []; - for (let i = 0; i < data.length; i++) { - let node = { - name: data[i].deviceName, - isLeaf: false, - id: data[i].serialNumber, - type: 0, - online: data[i].status === 3, - userData: data[i], - }; - nodeList.push(node); - } - resolve(nodeList); - } else { - resolve([]); - } - }); - } else { - let channelArray = []; - listSipDeviceChannel(node.data.userData.serialNumber).then((res) => { - if (res.data != null) { - channelArray = channelArray.concat(res.data); - this.channelDataHandler(channelArray, resolve); - } else { - resolve([]); - } - }); - } - }, - channelDataHandler: function (data, resolve) { - if (data.length > 0) { - let nodeList = []; - for (let i = 0; i < data.length; i++) { - let item = data[i]; - let channelType = item.id.substring(10, 13); - console.log('channelType: ' + channelType); - let type = 3; - if (item.id.length <= 10) { - type = 2; - } else { - if (item.id.length > 14) { - let channelType = item.id.substring(10, 13); - // 111-DVR编码;112-视频服务器编码;118-网络视频录像机(NVR)编码;131-摄像机编码;132-网络摄像机(IPC)编码 - if (channelType !== '111' && channelType !== '112' && channelType !== '118' && channelType !== '131' && channelType !== '132') { - type = -1; - // 1-球机;2-半球;3-固定枪机;4-遥控枪机 - } else if (item.basicData.ptztype === 1) { - type = 4; - } else if (item.basicData.ptztype === 2) { - type = 5; - } else if (item.basicData.ptztype === 3 || item.basicData.ptztype === 4) { - type = 6; - } - } else { - if (item.basicData.subCount > 0 || item.basicData.parental === 1) { - type = 2; - } - } - } - let node = { - name: item.name || item.id, - isLeaf: true, - id: item.id, - deviceId: item.deviceId, - type: type, - online: item.status === 2, - userData: item.basicData, - }; - - if (channelType === '111' || channelType === '112' || channelType === '118' || channelType === '131' || channelType === '132') { - nodeList.push(node); - } - } - resolve(nodeList); - } else { - resolve([]); - } - }, - reset: function () { - this.$forceUpdate(); - }, - }, - destroyed() { }, -}; -</script> - -<style> -.device-tree-main-box { - text-align: left; -} - -.device-online { - color: #252525; -} - -.device-offline { - color: #727272; -} -</style> diff --git a/vue/src/views/components/player/deviceVideo.vue b/vue/src/views/components/player/deviceVideo.vue deleted file mode 100644 index 4faa507b..00000000 --- a/vue/src/views/components/player/deviceVideo.vue +++ /dev/null @@ -1,291 +0,0 @@ -<template> - <div style="display: block; width: 1000px"> - <div style="display: flex"> - <el-row> - <span style="margin-left: 10px" prop="channelName">通道:</span> - <el-select v-model="channelId" placeholder="请选择" @change="changeChannel" style="width: 200px; margin-right: 10px" size="small"> - <el-option v-for="option in channelList" :key="option.value" :label="option.label" :value="option.value"></el-option> - </el-select> - <span style="overflow: auto; margin-left: 10px">日期:</span> - <el-date-picker v-model="queryDate" type="date" size="small" value-format="yyyy-MM-dd" clearable placeholder="选择日期" style="width: 180px; margin-right: 10px" /> - <el-button-group style="margin: 0"> - <el-button size="mini" type="success" title="查看录像" @click="loadDevRecord()" :disabled="channelId === '' || !queryDate"> - <i class="el-icon-video-camera" /> - 查看 - </el-button> - </el-button-group> - - <span style="margin-left: 82px; overflow: auto">时间:</span> - <el-button-group> - <el-time-picker - size="small" - is-range - align="left" - v-model="timeRange" - value-format="yyyy-MM-dd HH:mm:ss" - range-separator="至" - start-placeholder="开始时间" - end-placeholder="结束时间" - placeholder="选择时间范围" - @change="timePickerChange" - style="width: 200px" - :disabled="channelId === '' || !queryDate" - ></el-time-picker> - </el-button-group> - <el-button-group style="margin: 0 0 0 10px"> - <el-button size="mini" type="primary" title="下载选定录像" @click="downloadRecord()" :disabled="channelId === '' || !timeRange"> - <i class="el-icon-download" /> - 转存 - </el-button> - </el-button-group> - </el-row> - </div> - <player ref="playbacker" :playerinfo="playinfo" class="components-container"></player> - </div> -</template> -<script> -import player from '@/views/components/player/player.vue'; -import { listChannel, playback, closeStream, playbackSeek } from '@/api/iot/channel'; -import { getDevRecord, startDownloadRecord } from '@/api/iot/record'; - -export default { - name: 'DeviceVideo', - components: { - player, - }, - data() { - return { - deviceId: '', - channelId: '', - streamId: '', - ssrc: '', - playurl: '', - queryDate: '', - playing: false, - vodData: {}, - hisData: [], - playinfo: {}, - channelList: [], - playbackinfo: {}, - timeRange: null, - startTime: null, - endTime: null, - // 查询参数 - queryParams: { - pageNum: 1, - pageSize: 10, - deviceSipId: null, - channelSipId: null, - }, - }; - }, - props: { - device: { - type: Object, - default: null, - }, - }, - watch: { - // 获取到父组件传递的device后 - device: function (newVal, oldVal) { - this.deviceInfo = newVal; - if (this.deviceInfo && this.deviceInfo.deviceId !== 0) { - this.queryParams.deviceSipId = this.deviceInfo.serialNumber; - this.deviceId = this.device.serialNumber; - } - }, - }, - created() { - this.queryParams.deviceSipId = this.device.serialNumber; - this.deviceId = this.device.serialNumber; - this.getList(); - this.playinfo = { - playtype: 'playback', - deviceId: this.device.serialNumber, - }; - }, - beforeDestroy() {}, - destroyed() { - this.closeStream(); - }, - methods: { - /** 查询监控设备通道信息列表 */ - getList() { - this.loading = true; - listChannel(this.queryParams).then((response) => { - this.channelList = response.rows.map((item) => { - return { value: item.channelSipId, label: item.channelName }; - }); - }); - }, - // 改变通道 - changeChannel() { - this.playinfo.channelId = this.channelId; - }, - initUrl(data) { - if (data) { - this.streamId = data.ssrc; - this.ssrc = data.ssrc; - this.playurl = data.playurl; - } else { - this.streamId = ''; - this.ssrc = ''; - this.playurl = ''; - } - }, - getBeijingTime(queryDate) { - // 计算与UTC的时区差,对于北京时间来说是8小时 - let offset = 8 * 60 * 60 * 1000; - // 加上时区差,得到北京时间 - let beijingTime = new Date(new Date(queryDate).getTime() - offset); - return beijingTime.getTime(); - }, - // 录像控制 - loadDevRecord() { - this.$refs.playbacker.registercallback('playbackSeek', this.seekPlay); - if (this.queryDate === '' || this.queryDate === null){ - this.$message.error('请选择日期'); - return; - } - if (this.deviceId && this.channelId) { - const date = this.getBeijingTime(this.queryDate); - const start = date / 1000; - const end = Math.floor((date + 24 * 60 * 60 * 1000 - 1) / 1000); - const query = { - start: start, - end: end, - }; - this.vodData = { - start: start, - end: end, - base: start, - }; - this.setTime(this.queryDate + ' 00:00:00', this.queryDate + ' 23:59:59'); - getDevRecord(this.deviceId, this.channelId, query).then((res) => { - this.hisData = res.data.recordItems; - if (res.data.recordItems) { - const len = this.hisData.length; - if (len > 0) { - if (this.hisData[0].start < start) { - this.hisData[0].start = start; - this.vodData.start = start; - } else { - this.vodData.start = this.hisData[0].start; - } - if (this.hisData[0].end !== 0 &&this.hisData[0].end < end) { - this.vodData.end = this.hisData[0].end; - } - this.playback(); - } else { - this.$message({ - type: 'warning', - message: '请确认设备是否支持录像,或者设备SD卡是否正确插入!', - }); - } - } else { - this.$message({ - type: 'warning', - message: '请确认设备是否支持录像,或者设备SD卡是否正确插入!', - }); - } - }); - } - }, - /**录像播放*/ - playback() { - const query = { - start: this.vodData.start, - end: this.vodData.end, - }; - if (this.ssrc) { - closeStream(this.deviceId, this.channelId, this.ssrc).then((res) => { - playback(this.deviceId, this.channelId, query) - .then((res) => { - this.initUrl(res.data); - }) - .finally(() => { - this.triggerPlay(this.hisData); - }); - }); - } else { - playback(this.deviceId, this.channelId, query) - .then((res) => { - this.initUrl(res.data); - }) - .finally(() => { - this.triggerPlay(this.hisData); - }); - } - }, - /**触发播放*/ - triggerPlay(playTimes) { - this.$refs.playbacker.playback(this.playurl, playTimes); - this.playing = true; - }, - /**录像播放*/ - seekPlay(s) { - const curTime = this.vodData.base + s.hour * 3600 + s.min * 60 + s.second; - const seekRange = curTime - this.vodData.start; - if (this.ssrc) { - const query = { - seek: seekRange, - }; - const _this = this; - playbackSeek(this.deviceId, this.channelId, this.streamId, query).then((res) => { - _this.$refs.playbacker.setPlaybackStartTime(curTime); - }); - } - }, - /**关闭播放流*/ - closeStream() { - if (this.playing && this.streamId) { - closeStream(this.deviceId, this.channelId, this.streamId).then((res) => { - this.streamId = ''; - this.ssrc = ''; - this.playurl = ''; - this.playing = false; - }); - // this.$refs.playbacker.destroy(); - } - }, - /**销毁录像播放器*/ - destroy() { - if (this.playing && this.streamId) { - this.$refs.playbacker.destroy(); - } - }, - closeDestroy() { - this.closeStream(); - this.destroy(); - }, - /**设置时间*/ - timePickerChange: function (val) { - this.setTime(val[0], val[1]); - }, - setTime: function (startTime, endTime) { - this.startTime = startTime; - this.endTime = endTime; - this.timeRange = [startTime, endTime]; - }, - /**下载录像*/ - downloadRecord: function () { - const start = new Date(this.startTime).getTime() / 1000; - const end = new Date(this.endTime).getTime() / 1000; - const query = { - startTime: start, - endTime: end, - speed: '4', - }; - startDownloadRecord(this.deviceId, this.channelId, query).then((res) => { - console.log('开始转存到流服务器:' + this.deviceId + ' : ' + this.channelId); - if (res.code === 200 ) { - this.$message({ - type: 'success', - message: '转存到流服务器,请前往视频中心->录像管理查看!', - }); - } - }); - }, - }, -}; -</script> diff --git a/vue/src/views/components/player/jessibuca.vue b/vue/src/views/components/player/jessibuca.vue deleted file mode 100644 index cf909326..00000000 --- a/vue/src/views/components/player/jessibuca.vue +++ /dev/null @@ -1,363 +0,0 @@ -<template> - <div ref="container" @dblclick="fullscreenSwich" - style="width:100%;height:100%;background-color: #000000;margin:0 auto;"> - <div class="buttons-box" id="buttonsBox"> - <div class="buttons-box-left"> - <i v-if="!playing" class="iconfont icon-play jessibuca-btn" @click="playBtnClick"></i> - <i v-if="playing" class="iconfont icon-pause jessibuca-btn" @click="pause"></i> - <i class="iconfont icon-stop jessibuca-btn" @click="destroy"></i> - <i v-if="isNotMute" class="iconfont icon-audio-high jessibuca-btn" @click="mute()"></i> - <i v-if="!isNotMute" class="iconfont icon-audio-mute jessibuca-btn" @click="cancelMute()"></i> - </div> - <div class="buttons-box-right"> - <span class="jessibuca-btn">{{ kBps }} kb/s</span> - <i class="iconfont icon-camera1196054easyiconnet jessibuca-btn" @click="screenshot" - style="font-size: 1rem !important"></i> - <i class="iconfont icon-shuaxin11 jessibuca-btn" @click="playBtnClick"></i> - <i v-if="!fullscreen" class="iconfont icon-weibiaoti10 jessibuca-btn" @click="fullscreenSwich"></i> - <i v-if="fullscreen" class="iconfont icon-weibiaoti11 jessibuca-btn" @click="fullscreenSwich"></i> - </div> - </div> - </div> -</template> - -<script> -let jessibucaPlayer = {}; -export default { - name: 'jessibuca', - data() { - return { - playing: false, - isNotMute: false, - quieting: false, - fullscreen: false, - loaded: false, // mute - speed: 0, - performance: "", // 工作情况 - kBps: 0, - btnDom: null, - videoInfo: null, - volume: 1, - rotate: 0, - vod: true, // 点播 - forceNoOffscreen: false, - }; - }, - props: ['videoUrl', 'error', 'hasAudio', 'height'], - mounted() { - window.onerror = (msg) => { - // console.error(msg) - }; - console.log(this._uid) - let paramUrl = decodeURIComponent(this.$route.params.url) - this.$nextTick(() => { - this.updatePlayerDomSize() - window.onresize = () => { - this.updatePlayerDomSize() - } - if (typeof (this.videoUrl) == "undefined") { - this.videoUrl = paramUrl; - } - this.btnDom = document.getElementById("buttonsBox"); - console.log("初始化时的地址为: " + this.videoUrl) - this.play(this.videoUrl) - }) - }, - watch: { - videoUrl(newData, oldData) { - this.play(newData) - }, - immediate: true - }, - methods: { - updatePlayerDomSize() { - let dom = this.$refs.container; - let width = dom.parentNode.clientWidth - let height = (9 / 16) * width - - const clientHeight = Math.min(document.body.clientHeight, document.documentElement.clientHeight) - if (height > clientHeight) { - height = clientHeight - width = (16 / 9) * height - } - - dom.style.width = width + 'px'; - dom.style.height = height + "px"; - }, - create() { - let options = {}; - console.log("hasAudio " + this.hasAudio) - - jessibucaPlayer[this._uid] = new window.JessibucaPro(Object.assign( - { - container: this.$refs.container, - autoWasm: true, - background: "", - controlAutoHide: false, - debug: false, - decoder: "/js/jessibuca-pro/decoder-pro.js", - forceNoOffscreen: true, - hasAudio: typeof (this.hasAudio) == "undefined" ? true : this.hasAudio, - hasVideo: true, - heartTimeout: 5, - heartTimeoutReplay: true, - heartTimeoutReplayTimes: 3, - hiddenAutoPause: false, - hotKey: false, - isFlv: false, - isFullResize: false, - isNotMute: this.isNotMute, - isResize: false, - keepScreenOn: false, - loadingText: "请稍等, 视频加载中......", - loadingTimeout: 10, - loadingTimeoutReplay: true, - loadingTimeoutReplayTimes: 3, - openWebglAlignment: false, - operateBtns: { - fullscreen: false, - screenshot: false, - play: false, - audio: false, - record: false - }, - recordType: "webm", - rotate: 0, - showBandwidth: false, - supportDblclickFullscreen: false, - timeout: 10, - useMSE: location.hostname !== "localhost" && location.protocol !== "https:", - useOffscreen: false, - useWCS: location.hostname === "localhost" || location.protocol === "https", - useWebFullScreen: false, - videoBuffer: 0, - wasmDecodeAudioSyncVideo: true, - wasmDecodeErrorReplay: true, - wcsUseVideoRender: true - }, - options - )); - let jessibuca = jessibucaPlayer[this._uid]; - let _this = this; - jessibuca.on("load", function () { - console.log("on load init"); - }); - - jessibuca.on("log", function (msg) { - console.log("on log", msg); - }); - jessibuca.on("record", function (msg) { - console.log("on record:", msg); - }); - jessibuca.on("pause", function () { - _this.playing = false; - }); - jessibuca.on("play", function () { - _this.playing = true; - }); - jessibuca.on("fullscreen", function (msg) { - console.log("on fullscreen", msg); - _this.fullscreen = msg - }); - - jessibuca.on("mute", function (msg) { - console.log("on mute", msg); - _this.isNotMute = !msg; - }); - jessibuca.on("audioInfo", function (msg) { - console.log("audioInfo", msg); - }); - - jessibuca.on("bps", function (bps) { - // console.log('bps', bps); - - }); - let _ts = 0; - jessibuca.on("timeUpdate", function (ts) { - // console.log('timeUpdate,old,new,timestamp', _ts, ts, ts - _ts); - _ts = ts; - }); - - jessibuca.on("videoInfo", function (info) { - console.log("videoInfo", info); - }); - - jessibuca.on("error", function (error) { - console.log("error", error); - }); - - jessibuca.on("timeout", function () { - console.log("timeout"); - }); - - jessibuca.on('start', function () { - console.log('start'); - }) - - jessibuca.on("performance", function (performance) { - let show = "卡顿"; - if (performance === 2) { - show = "非常流畅"; - } else if (performance === 1) { - show = "流畅"; - } - _this.performance = show; - }); - jessibuca.on('buffer', function (buffer) { - // console.log('buffer', buffer); - }) - - jessibuca.on('stats', function (stats) { - // console.log('stats', stats); - }) - - jessibuca.on('kBps', function (kBps) { - _this.kBps = Math.round(kBps); - }); - - // 显示时间戳 PTS - jessibuca.on('videoFrame', function () { - - }) - - // - jessibuca.on('metadata', function () { - - }); - }, - playBtnClick: function (event) { - this.play(this.videoUrl) - }, - play: function (url) { - if (jessibucaPlayer[this._uid]) { - this.destroy().then(() => { - jessibucaPlayer[this._uid].on("play", () => { - this.playing = true; - this.loaded = true; - }); - if (jessibucaPlayer[this._uid].hasLoaded()) { - jessibucaPlayer[this._uid].play(url); - } else { - jessibucaPlayer[this._uid].on("load", () => { - console.log("load 播放") - jessibucaPlayer[this._uid].play(url); - }); - } - }); - } else { - this.create(); - jessibucaPlayer[this._uid].on("play", () => { - this.playing = true; - this.loaded = true; - }); - if (jessibucaPlayer[this._uid].hasLoaded()) { - jessibucaPlayer[this._uid].play(url); - } else { - jessibucaPlayer[this._uid].on("load", () => { - console.log("load 播放") - jessibucaPlayer[this._uid].play(url); - }); - } - } - }, - pause: function () { - if (jessibucaPlayer[this._uid]) { - jessibucaPlayer[this._uid].pause(); - } - this.playing = false; - this.err = ""; - this.performance = ""; - }, - screenshot: function () { - if (jessibucaPlayer[this._uid]) { - jessibucaPlayer[this._uid].screenshot(); - } - }, - mute: function () { - if (jessibucaPlayer[this._uid]) { - jessibucaPlayer[this._uid].mute(); - } - }, - cancelMute: function () { - if (jessibucaPlayer[this._uid]) { - jessibucaPlayer[this._uid].cancelMute(); - } - }, - destroy: async function () { - if (jessibucaPlayer[this._uid]) { - await jessibucaPlayer[this._uid].destroy().then(() => { - this.create(); - }); - } else { - this.create(); - } - if (document.getElementById("buttonsBox") == null) { - this.$refs.container.appendChild(this.btnDom) - } - jessibucaPlayer[this._uid] = null; - this.playing = false; - this.err = ""; - this.performance = ""; - - }, - eventcallbacK: function (type, message) { - // console.log("player 事件回调") - // console.log(type) - // console.log(message) - }, - fullscreenSwich: function () { - let isFull = this.isFullscreen() - jessibucaPlayer[this._uid].setFullscreen(!isFull) - this.fullscreen = !isFull; - }, - isFullscreen: function () { - return document.fullscreenElement || - document.msFullscreenElement || - document.mozFullScreenElement || - document.webkitFullscreenElement || false; - } - }, - destroyed() { - if (jessibucaPlayer[this._uid]) { - jessibucaPlayer[this._uid].destroy(); - } - this.playing = false; - this.loaded = false; - this.performance = ""; - }, -} -</script> - -<style> -@import '../css/iconfont.css'; -.buttons-box { - width: 100%; - height: 28px; - background-color: rgba(43, 51, 63, 0.7); - position: absolute; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - left: 0; - bottom: 0; - user-select: none; - z-index: 10; -} - -.jessibuca-btn { - width: 20px; - color: rgb(255, 255, 255); - line-height: 27px; - margin: 0px 10px; - padding: 0px 2px; - cursor: pointer; - text-align: center; - font-size: 0.8rem !important; -} - -.buttons-box-right { - position: absolute; - right: 0; -} - -</style> diff --git a/vue/src/views/components/player/player.vue b/vue/src/views/components/player/player.vue index 99baa96e..9ac0d2fe 100644 --- a/vue/src/views/components/player/player.vue +++ b/vue/src/views/components/player/player.vue @@ -70,7 +70,7 @@ export default { initplayer() { this.isPlaybackPause = false; this.initconf(); - jessibucaPlayer[this._uid] = new window.JessibucaPro({ + jessibucaPlayer[this._uid] = new window.Jessibuca({ container: this.$refs.container, decoder: '/js/jessibuca-pro/decoder-pro.js', videoBuffer: Number(0.2), // 缓存时长 diff --git a/vue/src/views/components/player/public/jessibuca-pro-multi.js b/vue/src/views/components/player/public/jessibuca-pro-multi.js deleted file mode 100644 index 8003464f..00000000 --- a/vue/src/views/components/player/public/jessibuca-pro-multi.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("crypto")):"function"==typeof define&&define.amd?define(["crypto"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["jessibuca-pro-multi"]=t(e.crypto$1)}(this,(function(t){"use strict";function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=s(t);class a{on(e,t,i){const s=this.e||(this.e={});return(s[e]||(s[e]=[])).push({fn:t,ctx:i}),this}once(e,t,i){const s=this;function r(){s.off(e,r);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];t.apply(i,o)}return r._=t,this.on(e,r,i)}emit(e){const t=((this.e||(this.e={}))[e]||[]).slice();for(var i=arguments.length,s=new Array(i>1?i-1:0),r=1;r<i;r++)s[r-1]=arguments[r];for(let e=0;e<t.length;e+=1)t[e].fn.apply(t[e].ctx,s);return this}off(e,t){const i=this.e||(this.e={});if(!e)return Object.keys(i).forEach((e=>{delete i[e]})),void delete this.e;const s=i[e],r=[];if(s&&t)for(let e=0,i=s.length;e<i;e+=1)s[e].fn!==t&&s[e].fn._!==t&&r.push(s[e]);return r.length?i[e]=r:delete i[e],this}}const o=1,n=2,l=3,d=4,h=5,c=6,u=["","websocket","fetch","hls","webrtc","webTransport","aliyunRtc","ts"],p="fetch",f="hls",m="websocket",g="webrtc",y="webTransport",A="worker",b="aliyunRtc",_="player",v="playerAudio",w="playbackTF",S="mp4",T="webm",E="flv",k="flv",C="m7s",x="hls",R="webrtc",D="webTransport",L="nakedFlow",I="fmp4",P="mpeg4",B="aliyunRtc",M="ts",U={flv:"FLV",m7s:"M7S",hls:"HLS",fmp4:"FMP4",mpeg4:"MPEG4",webrtc:"Webrtc",webTransport:"WebTransport",nakedFlow:"裸流",aliyunRtc:"AliyunRtc",ts:"TS"},F="mse",O="wcs",N="offscreen",j="wasm",G="simd",z="mt",$="webrtc",H="hls",V="aliyunRtc",W="canvas",J="video",q="debug",K="warn",Y="click",Q="mouseDownAndUp",X={normal:"normal",simple:"simple"},Z=36e5,ee="/crypto/",te="jbprov",ie=1e4,se={url:"",playbackConfig:{},fullscreenWatermarkConfig:{},playType:_,playbackForwardMaxRateDecodeIFrame:4,playOptions:{},isLive:!0,isMulti:!0,isM7sCrypto:!1,supportHls265:!1,playFailedUseLastFrameShow:!0,playFailedAndPausedShowMessage:!1,pauseAndNextPlayUseLastFrameShow:!1,widthOrHeightChangeReplayDelayTime:0,isUseNewFullscreenWatermark:!1,websocket1006ErrorReplay:!1,websocket1006ErrorReplayDelayTime:1,streamErrorReplay:!1,streamErrorReplayDelayTime:1,streamEndReplay:!1,streamEndReplayDelayTime:1,networkDisconnectReplay:!1},re={playType:_,container:"",videoBuffer:1e3,videoBufferDelay:1e3,networkDelay:1e4,isResize:!0,isFullResize:!1,isFlv:!1,isHls:!1,isFmp4:!1,isFmp4Private:!1,isWebrtc:!1,isWebrtcForZLM:!1,isWebrtcForSRS:!1,isWebrtcForOthers:!1,isNakedFlow:!1,isMpeg4:!1,isAliyunRtc:!1,isTs:!1,debug:!1,debugLevel:K,debugUuid:"",isMulti:!0,multiIndex:-1,hotKey:!1,loadingTimeout:10,heartTimeout:10,timeout:10,pageVisibilityHiddenTimeout:300,loadingTimeoutReplay:!0,heartTimeoutReplay:!0,loadingTimeoutReplayTimes:3,heartTimeoutReplayTimes:3,heartTimeoutReplayUseLastFrameShow:!0,replayUseLastFrameShow:!0,replayShowLoadingIcon:!1,supportDblclickFullscreen:!1,showBandwidth:!1,showPerformance:!1,mseCorrectTimeDuration:20,mseCorrectAudioTimeDuration:20,keepScreenOn:!0,isNotMute:!1,muted:!0,hasAudio:!0,hasVideo:!0,operateBtns:{fullscreen:!1,screenshot:!1,play:!1,audio:!1,record:!1,ptz:!1,quality:!1,zoom:!1,close:!1,scale:!1,performance:!1,logSave:!1,aiFace:!1,aiObject:!1,aiOcclusion:!1,fullscreenFn:null,fullscreenExitFn:null,screenshotFn:null,playFn:null,pauseFn:null,recordFn:null,recordStopFn:null},extendOperateBtns:[],contextmenuBtns:[],watermarkConfig:{},controlAutoHide:!1,hasControl:!1,loadingIcon:!0,loadingIconStyle:{},loadingText:"",background:"",poster:"",backgroundLoadingShow:!0,loadingBackground:"",loadingBackgroundWidth:0,loadingBackgroundHeight:0,decoder:"decoder-pro.js",decoderAudio:"decoder-pro-audio.js",decoderHard:"decoder-pro-hard.js",decoderHardNotWasm:"decoder-pro-hard-not-wasm.js",wasmMp4RecorderDecoder:"jessibuca-pro-mp4-recorder-decoder.js",decoderWASM:"",isDecoderUseCDN:!1,url:"",rotate:0,mirrorRotate:"none",aspectRatio:"default",playbackConfig:{playList:[],fps:"",showControl:!0,controlType:X.normal,duration:0,startTime:"",showRateBtn:!1,rateConfig:[],showPrecision:"",showPrecisionBtn:!0,isCacheBeforeDecodeForFpsRender:!1,uiUsePlaybackPause:!1,isPlaybackPauseClearCache:!0,isUseFpsRender:!1,isUseLocalCalculateTime:!1,localOneFrameTimestamp:40,supportWheel:!1,useWCS:!1,useMSE:!1},qualityConfig:[],defaultStreamQuality:"",scaleConfig:["拉伸","缩放","正常"],forceNoOffscreen:!0,hiddenAutoPause:!1,protocol:n,demuxType:k,useWasm:!1,useMSE:!1,useWCS:!1,useSIMD:!0,useMThreading:!1,wcsUseVideoRender:!0,wcsUseWebgl2Render:!0,wasmUseVideoRender:!0,mseUseCanvasRender:!1,hlsUseCanvasRender:!1,webrtcUseCanvasRender:!1,useOffscreen:!1,useWebGPU:!1,mseDecodeErrorReplay:!0,wcsDecodeErrorReplay:!0,wasmDecodeErrorReplay:!0,simdDecodeErrorReplay:!0,simdDecodeErrorReplayType:j,autoWasm:!0,decoderErrorAutoWasm:!0,hardDecodingNotSupportAutoWasm:!0,webglAlignmentErrorReplay:!0,webglContextLostErrorReplay:!0,openWebglAlignment:!1,syncAudioAndVideo:!1,syncAudioAndVideoDiff:500,playbackDelayTime:1e3,playbackFps:25,playbackForwardMaxRateDecodeIFrame:4,playbackCurrentTimeMove:!0,useVideoRender:!0,useCanvasRender:!1,networkDelayTimeoutReplay:!1,recordType:S,checkFirstIFrame:!0,nakedFlowFps:25,audioEngine:null,isShowRecordingUI:!0,isShowZoomingUI:!0,useFaceDetector:!1,useObjectDetector:!1,useImageDetector:!1,useOcclusionDetector:!1,ptzPositionConfig:{},ptzShowType:"vertical",ptzClickType:Y,ptzStopEmitDelay:.3,ptzZoomShow:!1,ptzApertureShow:!1,ptzFocusShow:!1,ptzMoreArrowShow:!1,ptzCruiseShow:!1,ptzFogShow:!1,ptzWiperShow:!1,ptzSupportDraggable:!1,weiXinInAndroidAudioBufferSize:4800,isM7sCrypto:!1,m7sCryptoAudio:!1,isSm4Crypto:!1,isXorCrypto:!1,sm4CryptoKey:"",m7sCryptoKey:"",xorCryptoKey:"",cryptoKey:"",cryptoIV:"",cryptoKeyUrl:"",autoResize:!1,useWebFullScreen:!1,ptsMaxDiff:3600,aiFaceDetectLevel:2,aiFaceDetectWidth:240,aiFaceDetectShowRect:!0,aiFaceDetectInterval:1e3,aiFaceDetectRectConfig:{},aiObjectDetectLevel:2,aiObjectDetectWidth:240,aiObjectDetectShowRect:!0,aiObjectDetectInterval:1e3,aiObjectDetectRectConfig:{},aiOcclusionDetectInterval:1e3,aiImageDetectDrop:!1,aiImageDetectActive:!1,videoRenderSupportScale:!0,mediaSourceTsIsMaxDiffReplay:!0,controlHtml:"",isH265:!1,isWebrtcH265:!1,supportLockScreenPlayAudio:!0,supportHls265:!1,isEmitSEI:!1,pauseAndNextPlayUseLastFrameShow:!1,demuxUseWorker:!0,playFailedAndReplay:!0,showMessageConfig:{webglAlignmentError:"Webgl 渲染失败",webglContextLostError:"webgl 上下文丢失",mediaSourceH265NotSupport:"不支持硬解码H265",mediaSourceFull:"缓冲区已满",mediaSourceAppendBufferError:"初始化解码器失败",mseSourceBufferError:"解码失败",mseAddSourceBufferError:"初始化解码器失败",mediaSourceDecoderConfigurationError:"初始化解码器失败",mediaSourceTsIsMaxDiff:"流异常",mseWidthOrHeightChange:"流异常",mediaSourceAudioG711NotSupport:"硬解码不支持G711a/u音频格式",mediaSourceUseCanvasRenderPlayFailed:"MediaSource解码使用canvas渲染失败",webcodecsH265NotSupport:"不支持硬解码H265",webcodecsUnsupportedConfigurationError:"初始化解码器失败",webcodecsDecodeConfigureError:"初始化解码器失败",webcodecsDecodeError:"解码失败",wcsWidthOrHeightChange:"解码失败",wasmDecodeError:"解码失败",simdDecodeError:"解码失败",wasmWidthOrHeightChange:"流异常",wasmUseVideoRenderError:"video自动渲染失败",videoElementPlayingFailed:"video自动渲染失败",simdH264DecodeVideoWidthIsTooLarge:"不支持该分辨率的视频",networkDelayTimeout:"网络超时重播失败",fetchError:"请求失败",streamEnd:"请求结束",websocketError:"请求失败",webrtcError:"请求失败",hlsError:"请求失败",decoderWorkerInitError:"初始化worker失败",videoElementPlayingFailedForWebrtc:"video自动渲染失败",videoInfoError:"解析视频分辨率失败",webrtcStreamH265:"webrtc不支持H265",delayTimeout:"播放超时重播失败",loadingTimeout:"加载超时重播失败",loadingTimeoutRetryEnd:"加载超时重播失败",delayTimeoutRetryEnd:"播放超时重播失败"},videoElementPlayingFailedReplay:!0,mp4RecordUseWasm:!0,mseAutoCleanupSourceBuffer:!0,mseAutoCleanupMaxBackwardDuration:30,mseAutoCleanupMinBackwardDuration:10,widthOrHeightChangeReplay:!0,simdH264DecodeVideoWidthIsTooLargeReplay:!0,mediaSourceAudioG711NotSupportReplay:!0,mediaSourceAudioInitTimeoutReplay:!0,mediaSourceUseCanvasRenderPlayFailedReplay:!0,mediaSourceUseCanvasRenderPlayFailedReplayType:J,widthOrHeightChangeReplayDelayTime:0,ghostWatermarkConfig:{on:5,off:5,content:"",fontSize:12,color:"white",opacity:.15,speed:.2},dynamicWatermarkConfig:{content:"",speed:.2,fontSize:12,color:"white",opacity:.15},isDropSameTimestampGop:!1,mseDecodeAudio:!1,nakedFlowH265DemuxUseNew:!0,extendDomConfig:{html:"",showBeforePlay:!1,showAfterLoading:!0},disableContextmenu:!1,mseDecoderUseWorker:!1,openMemoryLog:!1,mainThreadFetchUseWorker:!0,playFailedAndPausedShowPlayBtn:!0,mseCorrectionTimestamp:!0,flvDemuxBufferSizeTooLargeReplay:!1,flvDemuxBufferSizeTooLargeEmitFailed:!1,flvDemuxBufferSizeMaxLarge:1048576,isCheckInView:!1,hiddenControl:!1},ae="init",oe="initVideo",ne="render",le="playAudio",de="initAudio",he="audioCode",ce="audioNalu",ue="audioAACSequenceHeader",pe="videoCode",fe="videoCodec",me="videoNalu",ge="videoPayload",ye="audioPayload",Ae="wasmError",be="workerFetch",_e="iframeIntervalTs",ve="isDropping",we="workerEnd",Se="playbackStreamVideoFps",Te="wasmDecodeVideoNoResponseError",Ee="wasmWidthOrHeightChange",ke="simdDecodeError",Ce="simdH264DecodeVideoWidthIsTooLarge",xe="closeEnd",Re="tempStream",De="videoSEI",Le="flvScriptData",Ie="aacSequenceHeader",Pe="videoSequenceHeader",Be="flvBufferData",Me="checkFirstIFrame",Ue="mseHandle",Fe="mseFirstRenderTime",Oe="mseError",Ne="Invalid NAL unit size",je=1,Ge=2,ze=8,$e=9,He=18,Ve="init",We="decode",Je="audioDecode",qe="videoDecode",Ke="close",Ye="updateConfig",Qe="clearBuffer",Xe="fetchStream",Ze="sendWsMessage",et="mseUpdateVideoTimestamp",tt="fetch",it="destroy",st="destroyEnd",rt="buffer",at="fetchError",ot="fetchClose",nt="fetchSuccess",lt={fullscreen:"fullscreen$2",webFullscreen:"webFullscreen",decoderWorkerInit:"decoderWorkerInit",play:"play",playing:"playing",pause:"pause",mute:"mute",load:"load",loading:"loading",zooming:"zooming",videoInfo:"videoInfo",timeUpdate:"timeUpdate",audioInfo:"audioInfo",log:"log",error:"error",kBps:"kBps",timeout:"timeout",delayTimeout:"delayTimeout",delayTimeoutRetryEnd:"delayTimeoutRetryEnd",loadingTimeout:"loadingTimeout",loadingTimeoutRetryEnd:"loadingTimeoutRetryEnd",stats:"stats",performance:"performance",videoSmooth:"videoSmooth",faceDetectActive:"faceDetectActive",objectDetectActive:"objectDetectActive",occlusionDetectActive:"occlusionDetectActive",imageDetectActive:"imageDetectActive",record:"record",recording:"recording",recordingTimestamp:"recordingTimestamp",recordStart:"recordStart",recordEnd:"recordEnd",recordCreateError:"recordCreateError",recordBlob:"recordBlob",buffer:"buffer",videoFrame:"videoFrame",videoSEI:"videoSEI",start:"start",metadata:"metadata",resize:"resize",volumechange:"volumechange",volume:"volume",destroy:"destroy",beforeDestroy:"beforeDestroy",streamEnd:"streamEnd",streamRate:"streamRate",streamAbps:"streamAbps",streamVbps:"streamVbps",streamDts:"streamDts",streamSuccess:"streamSuccess",streamMessage:"streamMessage",streamError:"streamError",streamStats:"streamStats",mseSourceOpen:"mseSourceOpen",mseSourceClose:"mseSourceClose",mseSourceended:"mseSourceended",mseSourceStartStreaming:"mseSourceStartStreaming",mseSourceEndStreaming:"mseSourceEndStreaming",mseSourceBufferError:"mseSourceBufferError",mseAddSourceBufferError:"mseAddSourceBufferError",mseSourceBufferBusy:"mseSourceBufferBusy",mseSourceBufferFull:"mseSourceBufferFull",videoWaiting:"videoWaiting",videoTimeUpdate:"videoTimeUpdate",videoSyncAudio:"videoSyncAudio",playToRenderTimes:"playToRenderTimes",playbackTime:"playbackTime",playbackTimestamp:"playbackTimestamp",playbackTimeScroll:"playbackTimeScroll",playbackPrecision:"playbackPrecision",playbackShowPrecisionChange:"playbackShowPrecisionChange",playbackJustTime:"playbackJustTime",playbackStats:"playbackStats",playbackSeek:"playbackSeek",playbackPause:"playbackPause",playbackPauseOrResume:"playbackPauseOrResume",playbackRateChange:"playbackRateChange",playbackPreRateChange:"playbackPreRateChange",ptz:"ptz",streamQualityChange:"streamQualityChange",visibilityChange:"visibilityChange",netBuf:"netBuf",close:"close",networkDelayTimeout:"networkDelayTimeout",togglePerformancePanel:"togglePerformancePanel",viewResizeChange:"viewResizeChange",flvDemuxBufferSizeTooLarge:"flvDemuxBufferSizeTooLarge",talkGetUserMediaSuccess:"talkGetUserMediaSuccess",talkGetUserMediaFail:"talkGetUserMediaFail",talkGetUserMediaTimeout:"talkGetUserMediaTimeout",talkStreamStart:"talkStreamStart",talkStreamOpen:"talkStreamOpen",talkStreamClose:"talkStreamClose",talkStreamError:"talkStreamError",talkStreamInactive:"talkStreamInactive",webrtcDisconnect:"webrtcDisconnect",webrtcFailed:"webrtcFailed",webrtcClosed:"webrtcClosed",webrtcOnConnectionStateChange:"webrtcOnConnectionStateChange",webrtcOnIceConnectionStateChange:"webrtcOnIceConnectionStateChange",crashLog:"crashLog",focus:"focus",blur:"blur",inView:"inView",visibilityHiddenTimeout:"visibilityHiddenTimeout",websocketOpen:"websocketOpen",websocketClose:"websocketClose",websocketError:"websocketError",websocketMessage:"websocketMessage",aiObjectDetectorInfo:"aiObjectDetectorInfo",aiFaceDetectorInfo:"aiFaceDetectorInfo",aiOcclusionDetectResult:"aiOcclusionDetectResult",aiImageDetectResult:"aiImageDetectResult",playFailedAndPaused:"playFailedAndPaused",audioResumeState:"audioResumeState",webrtcStreamH265:"webrtcStreamH265",flvMetaData:"flvMetaData",talkFailedAndStop:"talkFailedAndStop",removeLoadingBgImage:"removeLoadingBgImage",memoryLog:"memoryLog",downloadMemoryLog:"downloadMemoryLog",pressureObserverCpu:"pressureObserverCpu",currentPts:"currentPts",online:"online",offline:"offline",networkState:"networkState"},dt={load:lt.load,timeUpdate:lt.timeUpdate,videoInfo:lt.videoInfo,audioInfo:lt.audioInfo,error:lt.error,kBps:lt.kBps,start:lt.start,timeout:lt.timeout,loadingTimeout:lt.loadingTimeout,loadingTimeoutRetryEnd:lt.loadingTimeoutRetryEnd,delayTimeout:lt.delayTimeout,delayTimeoutRetryEnd:lt.delayTimeoutRetryEnd,fullscreen:"fullscreen",webFullscreen:lt.webFullscreen,play:lt.play,pause:lt.pause,mute:lt.mute,stats:lt.stats,performance:lt.performance,recordingTimestamp:lt.recordingTimestamp,recordStart:lt.recordStart,recordCreateError:lt.recordCreateError,recordEnd:lt.recordEnd,recordBlob:lt.recordBlob,playToRenderTimes:lt.playToRenderTimes,playbackSeek:lt.playbackSeek,playbackStats:lt.playbackStats,playbackTimestamp:lt.playbackTimestamp,playbackPauseOrResume:lt.playbackPauseOrResume,playbackPreRateChange:lt.playbackPreRateChange,playbackRateChange:lt.playbackRateChange,playbackShowPrecisionChange:lt.playbackShowPrecisionChange,ptz:lt.ptz,streamQualityChange:lt.streamQualityChange,zooming:lt.zooming,crashLog:lt.crashLog,focus:lt.focus,blur:lt.blur,visibilityHiddenTimeout:lt.visibilityHiddenTimeout,visibilityChange:lt.visibilityChange,websocketOpen:lt.websocketOpen,websocketClose:lt.websocketClose,networkDelayTimeout:lt.networkDelayTimeout,aiObjectDetectorInfo:lt.aiObjectDetectorInfo,aiFaceDetectorInfo:lt.aiFaceDetectorInfo,aiOcclusionDetectResult:lt.aiOcclusionDetectResult,aiImageDetectResult:lt.aiImageDetectResult,playFailedAndPaused:lt.playFailedAndPaused,streamEnd:lt.streamEnd,audioResumeState:lt.audioResumeState,videoSEI:lt.videoSEI,flvMetaData:lt.flvMetaData,webrtcOnConnectionStateChange:lt.webrtcOnConnectionStateChange,webrtcOnIceConnectionStateChange:lt.webrtcOnIceConnectionStateChange,currentPts:lt.currentPts,videoSmooth:lt.videoSmooth,networkState:lt.networkState,volume:lt.volume},ht={talkStreamClose:lt.talkStreamClose,talkStreamError:lt.talkStreamError,talkStreamInactive:lt.talkStreamInactive,talkGetUserMediaTimeout:lt.talkGetUserMediaTimeout,talkFailedAndStop:lt.talkFailedAndStop},ct={talkStreamError:lt.talkStreamError,talkStreamClose:lt.talkStreamClose},ut={playError:"playIsNotPauseOrUrlIsNull",fetchError:"fetchError",websocketError:"websocketError",webcodecsH265NotSupport:"webcodecsH265NotSupport",webcodecsDecodeError:"webcodecsDecodeError",webcodecsUnsupportedConfigurationError:"webcodecsUnsupportedConfigurationError",webcodecsDecodeConfigureError:"webcodecsDecodeConfigureError",mediaSourceH265NotSupport:"mediaSourceH265NotSupport",mediaSourceAudioG711NotSupport:"mediaSourceAudioG711NotSupport",mediaSourceAudioInitTimeout:"mediaSourceAudioInitTimeout",mediaSourceAudioNoDataTimeout:"mediaSourceAudioNoDataTimeout",mediaSourceDecoderConfigurationError:"mediaSourceDecoderConfigurationError",mediaSourceFull:lt.mseSourceBufferFull,mseSourceBufferError:lt.mseSourceBufferError,mseAddSourceBufferError:lt.mseAddSourceBufferError,mediaSourceAppendBufferError:"mediaSourceAppendBufferError",mediaSourceTsIsMaxDiff:"mediaSourceTsIsMaxDiff",mediaSourceUseCanvasRenderPlayFailed:"mediaSourceUseCanvasRenderPlayFailed",mediaSourceBufferedIsZeroError:"mediaSourceBufferedIsZeroError",wasmDecodeError:"wasmDecodeError",wasmUseVideoRenderError:"wasmUseVideoRenderError",hlsError:"hlsError",webrtcError:"webrtcError",webrtcClosed:lt.webrtcClosed,webrtcIceCandidateError:"webrtcIceCandidateError",webglAlignmentError:"webglAlignmentError",wasmWidthOrHeightChange:"wasmWidthOrHeightChange",mseWidthOrHeightChange:"mseWidthOrHeightChange",wcsWidthOrHeightChange:"wcsWidthOrHeightChange",widthOrHeightChange:"widthOrHeightChange",tallWebsocketClosedByError:"tallWebsocketClosedByError",flvDemuxBufferSizeTooLarge:lt.flvDemuxBufferSizeTooLarge,wasmDecodeVideoNoResponseError:"wasmDecodeVideoNoResponseError",audioChannelError:"audioChannelError",simdH264DecodeVideoWidthIsTooLarge:"simdH264DecodeVideoWidthIsTooLarge",simdDecodeError:"simdDecodeError",webglContextLostError:"webglContextLostError",videoElementPlayingFailed:"videoElementPlayingFailed",videoElementPlayingFailedForWebrtc:"videoElementPlayingFailedForWebrtc",decoderWorkerInitError:"decoderWorkerInitError",videoInfoError:"videoInfoError",videoCodecIdError:"videoCodecIdError",streamEnd:lt.streamEnd,websocket1006Error:"websocket1006Error",delayTimeout:lt.delayTimeout,loadingTimeout:lt.loadingTimeout,networkDelayTimeout:lt.networkDelayTimeout,aliyunRtcError:"aliyunRtcError",...ct},pt="notConnect",ft="open",mt="close",gt="error",yt={download:"download",base64:"base64",blob:"blob"},At="download",bt="blob",_t={7:"H264(AVC)",12:"H265(HEVC)",99:"MPEG4"},vt=7,wt=12,St="H264(AVC)",Tt="H265(HEVC)",Et=10,kt=2,Ct={AAC:"AAC",ALAW:"ALAW(g711a)",MULAW:"MULAW(g711u)",MP3:"MP3"},xt={10:"AAC",7:"ALAW",8:"MULAW",2:"MP3"},Rt=7,Dt=8,Lt=5,It=1,Pt=5,Bt=6,Mt=7,Ut=8,Ft=14,Ot=19,Nt=20,jt=21,Gt=32,zt=32,$t=33,Ht=33,Vt=34,Wt=34,Jt=39,qt=39,Kt=40,Yt=38,Qt=48,Xt=0,Zt=1,ei=2,ti="webcodecs",ii="webgl",si="webgl2",ri="webgpu",ai="offscreen",oi="mse",ni="hls",li="webrtc",di="key",hi="delta",ci='video/mp4; codecs="avc1.64002A"',ui='video/mp4; codecs="hev1.1.6.L123.b0"',pi='video/mp4;codecs="hev1.1.6.L120.90"',fi='video/mp4;codecs="hev1.2.4.L120.90"',mi='video/mp4;codecs="hev1.3.E.L120.90"',gi='video/mp4;codecs="hev1.4.10.L120.90"',yi="ended",Ai="open",bi="closed",_i=27,vi=38,wi=40,Si="oneHour",Ti="halfHour",Ei="tenMin",ki="fiveMin",Ci={oneHour:"one-hour",halfHour:"half-hour",tenMin:"ten-min",fiveMin:"five-min"},xi=["oneHour","halfHour","tenMin","fiveMin"],Ri=["up","right","down","left","left-up","right-up","left-down","right-down"],Di="stop",Li="fiStop",Ii="zoomExpand",Pi="zoomNarrow",Bi="apertureFar",Mi="apertureNear",Ui="focusFar",Fi="focusNear",Oi="cruiseStart",Ni="cruiseStop",ji="fogOpen",Gi="fogClose",zi="wiperOpen",$i="wiperClose",Hi="g711a",Vi="g711u",Wi="pcm",Ji="opus",qi={png:"image/png",jpeg:"image/jpeg",webp:"image/webp"},Ki="sourceclose",Yi="sourceopen",Qi="sourceended",Xi="startstreaming",Zi="endstreaming",es="qualitychange",ts="canplay",is="waiting",ss="timeupdate",rs="ratechange",as="avc",os="hevc",ns="A key frame is required after configure() or flush()",ls="Cannot call 'decode' on a closed codec",ds="Unsupported configuration",hs="Decoder failure",cs="Decoding error",us="Decoder error",ps="HEVC decoding is not supported",fs="The user aborted a request",ms="AbortError",gs="AbortError",ys="loading",As="playing",bs="paused",_s="destroy",vs=0,ws=1,Ss=8,Ts=0,Es=98,ks="empty",Cs="rtp",xs="tcp",Rs="open",Ds="close",Ls="error",Is="message",Ps="worklet",Bs="script",Ms={encType:Hi,packetType:Cs,packetTcpSendType:xs,rtpSsrc:"0000000000",numberChannels:1,sampleRate:8e3,sampleBitsWidth:16,sendInterval:20,debug:!1,debugLevel:K,testMicrophone:!1,saveToTempFile:!1,audioBufferLength:160,engine:Ps,checkGetUserMediaTimeout:!1,getUserMediaTimeout:1e4,audioConstraints:{latency:!0,noiseSuppression:!0,autoGainControl:!0,echoCancellation:!0,sampleRate:48e3,channelCount:1}},Us="worklet",Fs="script",Os="active",Ns={name:"",index:0,icon:"",iconHover:"",iconTitle:"",activeIcon:"",activeIconHover:"",activeIconTitle:"",click:null,activeClick:null},js={content:"",click:null,index:0},Gs={container:"",maxSplit:4,split:1,draggable:!1,showSelectedBorder:!0,supportDblclickContainerFullscreen:!1,supportMousemoveEvent:!1,style:{border:"#343434",borderSelect:"#FFCC00",background:"#000"}},zs={multiFullscreen:"multiFullscreen",dblSelected:"multiDblSelected",selected:"multiSelected",mouseover:"multiMouseover",mouseout:"multiMouseout",mouseup:"multiMouseup",mousedown:"multiMousedown",mousemove:"multiMousemove",dragstart:"multiDragstart",dragenter:"multiDragenter",dragleave:"multiDragleave",drop:"multiDrop"},$s="3-1",Hs="4-1",Vs=1,Ws="subtitle-segments",Js="hls-manifest-loaded",qs="hls-level-loaded",Ks="demuxed-track",Ys="flv-script-data",Qs="metadata-parsed",Xs="ttfb",Zs="load-retry",er="load-start",tr="speed",ir="load-complete",sr="load-response-headers",rr="sei",ar="sei-in-time",or="switch-url-failed",nr="switch-url-success",lr="subtitle-playlist",dr="stream-parsed",hr="error",cr=[0,160,240,320,480,640],ur=[0,160,240,320,480,640],pr=["轻松","正常","较高","高"],fr="idle",mr="buffering",gr="complete",yr={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"},Ar="video decoder initialization failed",br="audio packet",_r=1,vr=2,wr=0,Sr=1,Tr=3,Er=16,kr="candidate-pair",Cr="inbound-rtp",xr="local-candidate",Rr="remote-candidate",Dr="track",Lr=9e4,Ir=45e4,Pr=9e4,Br="ws1006",Mr="mseDecodeError",Ur="wcsDecodeError";class Fr{constructor(e){this.log=function(t){if(e._opt.debug&&e._opt.debugLevel==q){const a=e._opt.debugUuid?`[${e._opt.debugUuid}]`:"";for(var i=arguments.length,s=new Array(i>1?i-1:0),r=1;r<i;r++)s[r-1]=arguments[r];console.log(`JbPro${a}[✅✅✅][${t}]`,...s)}},this.warn=function(t){if(e._opt.debug&&(e._opt.debugLevel==q||e._opt.debugLevel==K)){const a=e._opt.debugUuid?`[${e._opt.debugUuid}]`:"";for(var i=arguments.length,s=new Array(i>1?i-1:0),r=1;r<i;r++)s[r-1]=arguments[r];console.log(`JbPro${a}[❗❗❗][${t}]`,...s)}},this.error=function(t){const i=e._opt.debugUuid?`[${e._opt.debugUuid}]`:"";for(var s=arguments.length,r=new Array(s>1?s-1:0),a=1;a<s;a++)r[a-1]=arguments[a];console.error(`JbPro${i}[❌❌❌][${t}]`,...r)}}}var Or="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Nr(e,t){return e(t={exports:{}},t.exports),t.exports}var jr=Nr((function(e){!function(){var t="undefined"!=typeof window&&void 0!==window.document?window.document:{},i=e.exports,s=function(){for(var e,i=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],s=0,r=i.length,a={};s<r;s++)if((e=i[s])&&e[1]in t){for(s=0;s<e.length;s++)a[i[0][s]]=e[s];return a}return!1}(),r={change:s.fullscreenchange,error:s.fullscreenerror},a={request:function(e,i){return new Promise(function(r,a){var o=function(){this.off("change",o),r()}.bind(this);this.on("change",o);var n=(e=e||t.documentElement)[s.requestFullscreen](i);n instanceof Promise&&n.then(o).catch(a)}.bind(this))},exit:function(){return new Promise(function(e,i){if(this.isFullscreen){var r=function(){this.off("change",r),e()}.bind(this);this.on("change",r);var a=t[s.exitFullscreen]();a instanceof Promise&&a.then(r).catch(i)}else e()}.bind(this))},toggle:function(e,t){return this.isFullscreen?this.exit():this.request(e,t)},onchange:function(e){this.on("change",e)},onerror:function(e){this.on("error",e)},on:function(e,i){var s=r[e];s&&t.addEventListener(s,i,!1)},off:function(e,i){var s=r[e];s&&t.removeEventListener(s,i,!1)},raw:s};s?(Object.defineProperties(a,{isFullscreen:{get:function(){return Boolean(t[s.fullscreenElement])}},element:{enumerable:!0,get:function(){return t[s.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(t[s.fullscreenEnabled])}}}),i?e.exports=a:window.screenfull=a):i?e.exports={isEnabled:!1}:window.screenfull={isEnabled:!1}}()}));jr.isEnabled;class Gr{constructor(e){this._buffer=e,this._buffer_index=0,this._total_bytes=e.byteLength,this._total_bits=8*e.byteLength,this._current_word=0,this._current_word_bits_left=0}destroy(){this._buffer=null}_fillCurrentWord(){let e=this._total_bytes-this._buffer_index;if(e<=0)return void console.error("ExpGolomb: _fillCurrentWord() but no bytes available",this._total_bytes,this._buffer_index);let t=Math.min(4,e),i=new Uint8Array(4);i.set(this._buffer.subarray(this._buffer_index,this._buffer_index+t)),this._current_word=new DataView(i.buffer).getUint32(0,!1),this._buffer_index+=t,this._current_word_bits_left=8*t}readBits(e){if(e>32&&console.error("ExpGolomb: readBits() bits exceeded max 32bits!"),e<=this._current_word_bits_left){let t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}let t=this._current_word_bits_left?this._current_word:0;t>>>=32-this._current_word_bits_left;let i=e-this._current_word_bits_left;this._fillCurrentWord();let s=Math.min(i,this._current_word_bits_left),r=this._current_word>>>32-s;return this._current_word<<=s,this._current_word_bits_left-=s,t=t<<s|r,t}readBool(){return 1===this.readBits(1)}readByte(){return this.readBits(8)}_skipLeadingZero(){let e;for(e=0;e<this._current_word_bits_left;e++)if(0!=(this._current_word&2147483648>>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}readUEG(){let e=this._skipLeadingZero();return this.readBits(e+1)-1}readSEG(){let e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}const zr=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,-1,-1,-1],$r=zr,Hr=zr;function Vr(e){let{profile:t,sampleRate:i,channel:s}=e;return new Uint8Array([175,0,t<<3|(14&i)>>1,(1&i)<<7|s<<3])}function Wr(e){return Jr(e)&&e[1]===vs}function Jr(e){return e[0]>>4===Et}function qr(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}}function Kr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4;return 1024*t/e}const Yr=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];class Qr{constructor(e){this.buffer=e,this.buflen=e.length,this.bufpos=0,this.bufoff=0,this.iserro=!1}read(e){let t=0,i=0;for(;e;){if(e<0||this.bufpos>=this.buflen)return this.iserro=!0,0;this.iserro=!1,i=this.bufoff+e>8?8-this.bufoff:e,t<<=i,t+=this.buffer[this.bufpos]>>8-this.bufoff-i&255>>8-i,this.bufoff+=i,e-=i,8==this.bufoff&&(this.bufpos++,this.bufoff=0)}return t}look(e){let t=this.bufpos,i=this.bufoff,s=this.read(e);return this.bufpos=t,this.bufoff=i,s}read_golomb(){let e;for(e=0;0==this.read(1)&&!this.iserro;e++);return(1<<e)+this.read(e)-1}}function Xr(e){let t=e.read(5);return 31===t&&(t=e.read(6)+32),t}function Zr(e,t){return t.sampling_index=e.read(4),15==t.sampling_index?e.read(24):ea[t.sampling_index]}const ea=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,0,0,0],ta=[0,1,2,3,4,5,6,8];class ia{constructor(e){this.data_=e,this.eof_flag_=!1,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&console.error("Could not found ADTS syncword until payload end")}findNextSyncwordOffset(e){let t=e,i=this.data_;for(;;){if(t+7>=i.byteLength)return this.eof_flag_=!0,i.byteLength;if(4095===(i[t+0]<<8|i[t+1])>>>4)return t;t++}}readNextAACFrame(){let e=this.data_,t=null;for(;null==t&&!this.eof_flag_;){let i=this.current_syncword_offset_,s=(8&e[i+1])>>>3,r=(6&e[i+1])>>>1,a=1&e[i+1],o=(192&e[i+2])>>>6,n=(60&e[i+2])>>>2,l=(1&e[i+2])<<2|(192&e[i+3])>>>6,d=(3&e[i+3])<<11|e[i+4]<<3|(224&e[i+5])>>>5;if(e[i+6],i+d>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}let h=1===a?7:9,c=d-h;i+=h;let u=this.findNextSyncwordOffset(i+c);if(this.current_syncword_offset_=u,0!==s&&1!==s||0!==r)continue;let p=e.subarray(i,i+c);t={},t.audio_object_type=o+1,t.sampling_freq_index=n,t.sampling_frequency=$r[n],t.channel_config=l,t.data=p}return t}hasIncompleteData(){return this.has_last_incomplete_data}getIncompleteData(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null}}class sa{constructor(e){this.data_=e,this.eof_flag_=!1,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&console.error("Could not found ADTS syncword until payload end")}findNextSyncwordOffset(e){let t=e,i=this.data_;for(;;){if(t+1>=i.byteLength)return this.eof_flag_=!0,i.byteLength;if(695===(i[t+0]<<3|i[t+1]>>>5))return t;t++}}getLATMValue(e){let t=e.readBits(2),i=0;for(let s=0;s<=t;s++)i<<=8,i|=e.readByte();return i}readNextAACFrame(e){let t=this.data_,i=null;for(;null==i&&!this.eof_flag_;){let s=this.current_syncword_offset_,r=(31&t[s+1])<<8|t[s+2];if(s+3+r>=this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}let a=new Gr(t.subarray(s+3,s+3+r)),o=null;if(a.readBool()){if(null==e){console.warn("StreamMuxConfig Missing"),this.current_syncword_offset_=this.findNextSyncwordOffset(s+3+r),a.destroy();continue}o=e}else{let e=a.readBool();if(e&&a.readBool()){console.error("audioMuxVersionA is Not Supported"),a.destroy();break}if(e&&this.getLATMValue(a),!a.readBool()){console.error("allStreamsSameTimeFraming zero is Not Supported"),a.destroy();break}if(0!==a.readBits(6)){console.error("more than 2 numSubFrames Not Supported"),a.destroy();break}if(0!==a.readBits(4)){console.error("more than 2 numProgram Not Supported"),a.destroy();break}if(0!==a.readBits(3)){console.error("more than 2 numLayer Not Supported"),a.destroy();break}let t=e?this.getLATMValue(a):0,i=a.readBits(5);t-=5;let s=a.readBits(4);t-=4;let r=a.readBits(4);t-=4,a.readBits(3),t-=3,t>0&&a.readBits(t);let n=a.readBits(3);if(0!==n){console.error(`frameLengthType = ${n}. Only frameLengthType = 0 Supported`),a.destroy();break}a.readByte();let l=a.readBool();if(l)if(e)this.getLATMValue(a);else{let e=0;for(;;){e<<=8;let t=a.readBool();if(e+=a.readByte(),!t)break}console.log(e)}a.readBool()&&a.readByte(),o={},o.audio_object_type=i,o.sampling_freq_index=s,o.sampling_frequency=$r[o.sampling_freq_index],o.channel_config=r,o.other_data_present=l}let n=0;for(;;){let e=a.readByte();if(n+=e,255!==e)break}let l=new Uint8Array(n);for(let e=0;e<n;e++)l[e]=a.readByte();i={},i.audio_object_type=o.audio_object_type,i.sampling_freq_index=o.sampling_freq_index,i.sampling_frequency=$r[o.sampling_freq_index],i.channel_config=o.channel_config,i.other_data_present=o.other_data_present,i.data=l,this.current_syncword_offset_=this.findNextSyncwordOffset(s+3+r)}return i}hasIncompleteData(){return this.has_last_incomplete_data}getIncompleteData(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null}}function ra(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}function aa(e){const t=e.byteLength,i=new Uint8Array(4);i[0]=t>>>24&255,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t;const s=new Uint8Array(t+4);return s.set(i,0),s.set(e,4),s}function oa(){}function na(e){let t=null;const i=["webgl","experimental-webgl","moz-webgl","webkit-3d"];let s=0;for(;!t&&s<i.length;){const r=i[s];try{let i={preserveDrawingBuffer:!0};t=e.getContext(r,i)}catch(e){console.error(e),t=null}t&&"function"==typeof t.getParameter||(t=null),++s}return t}function la(e){let t=null;return t=e.getContext("webgl2"),t}function da(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=e.split(","),i=atob(t[1]),s=t[0].replace("data:","").replace(";base64","");let r=i.length,a=new Uint8Array(r);for(;r--;)a[r]=i.charCodeAt(r);return new File([a],"file",{type:s})}function ha(){return(new Date).getTime()}function ca(e,t,i){return Math.max(Math.min(e,Math.max(t,i)),Math.min(t,i))}function ua(e,t,i){if(e)return"object"==typeof t&&Object.keys(t).forEach((i=>{ua(e,i,t[i])})),e.style[t]=i,e}function pa(e,t){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e)return 0;const s=getComputedStyle(e,null).getPropertyValue(t);return i?parseFloat(s):s}function fa(){return performance&&"function"==typeof performance.now?performance.now():Date.now()}function ma(e){let t=0,i=fa();return s=>{if(!Da(s))return;t+=s;const r=fa(),a=r-i;a>=1e3&&(e(t/a*1e3),i=r,t=0)}}(()=>{try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch(e){}})();const ga='"4-1-2024"';function ya(){return/iphone|ipod|android.*mobile|windows.*phone|blackberry.*mobile/i.test(window.navigator.userAgent.toLowerCase())}function Aa(){return!(ya()||/ipad|android(?!.*mobile)|tablet|kindle|silk/i.test(window.navigator.userAgent.toLowerCase()))}function ba(){const e=window.navigator.userAgent.toLowerCase();return/android/i.test(e)}function _a(){const e=window.navigator.userAgent.toLowerCase();return/firefox/i.test(e)}function va(){const e=window.navigator.userAgent.toLowerCase()||"",t={type:"",version:""},i={IE:window.ActiveXObject||"ActiveXObject"in window,Chrome:e.indexOf("chrome")>-1&&e.indexOf("safari")>-1,Firefox:e.indexOf("firefox")>-1,Opera:e.indexOf("opera")>-1,Safari:e.indexOf("safari")>-1&&-1==e.indexOf("chrome"),Edge:e.indexOf("edge")>-1,QQBrowser:/qqbrowser/.test(e),WeixinBrowser:/MicroMessenger/i.test(e)};for(let s in i)if(i[s]){let i="";if("IE"===s){const t=e.match(/(msie\s|trident.*rv:)([\w.]+)/);t&&t.length>2&&(i=e.match(/(msie\s|trident.*rv:)([\w.]+)/)[2])}else if("Chrome"===s){for(let e in navigator.mimeTypes)"application/360softmgrplugin"===navigator.mimeTypes[e].type&&(s="360");const t=e.match(/chrome\/([\d.]+)/);t&&t.length>1&&(i=t[1])}else if("Firefox"===s){const t=e.match(/firefox\/([\d.]+)/);t&&t.length>1&&(i=t[1])}else if("Opera"===s){const t=e.match(/opera\/([\d.]+)/);t&&t.length>1&&(i=t[1])}else if("Safari"===s){const t=e.match(/version\/([\d.]+)/);t&&t.length>1&&(i=t[1])}else if("Edge"===s){const t=e.match(/edge\/([\d.]+)/);t&&t.length>1&&(i=t[1])}else if("QQBrowser"===s){const t=e.match(/qqbrowser\/([\d.]+)/);t&&t.length>1&&(i=t[1])}t.type=s,t.version=parseInt(i)}return t}function wa(){const e=window.navigator.userAgent.toLowerCase();return e&&/iphone|ipad|ipod|ios/.test(e)}function Sa(){const e=window.navigator.userAgent;return!e.match(/Chrome/gi)&&!!e.match(/Safari/gi)}function Ta(e,t){if(0===arguments.length)return null;var i,s=t||"{y}-{m}-{d} {h}:{i}:{s}";"object"==typeof e?i=e:(10===(""+e).length&&(e=1e3*parseInt(e)),e=+e,i=new Date(e));var r={y:i.getFullYear(),m:i.getMonth()+1,d:i.getDate(),h:i.getHours(),i:i.getMinutes(),s:i.getSeconds(),a:i.getDay()},a=s.replace(/{(y|m|d|h|i|s|a)+}/g,((e,t)=>{var i=r[t];return"a"===t?["一","二","三","四","五","六","日"][i-1]:(e.length>0&&i<10&&(i="0"+i),i||0)}));return a}function Ea(){return"VideoFrame"in window}function ka(e){if("string"!=typeof e)return e;var t=Number(e);return isNaN(t)?e:t}function Ca(){return"xxxxxxxxxxxx4xxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}function xa(e,t){let i,s,r=!1;return function a(){for(var o=arguments.length,n=new Array(o),l=0;l<o;l++)n[l]=arguments[l];if(r)return i=n,void(s=this);r=!0,e.apply(this,n),setTimeout((()=>{r=!1,i&&(a.apply(s,i),i=null,s=null)}),t)}}function Ra(e){if(null==e||""==e)return"0 Bytes";const t=new Array("Bytes","KB","MB","GB","TB","PB","EB","ZB","YB");let i=0;const s=parseFloat(e);i=Math.floor(Math.log(s)/Math.log(1024));var r=s/Math.pow(1024,i);return(r=r.toFixed(2))+t[i]}function Da(e){return"[object Number]"===Object.prototype.toString.call(e)}function La(){let e=!1;return"MediaSource"in self&&(self.MediaSource.isTypeSupported(ui)||self.MediaSource.isTypeSupported(pi)||self.MediaSource.isTypeSupported(fi)||self.MediaSource.isTypeSupported(mi)||self.MediaSource.isTypeSupported(gi))&&(e=!0),e}function Ia(){const e=va();return"chrome"===e.type.toLowerCase()&&e.version>=107}function Pa(){let e=!1;return"MediaStreamTrackGenerator"in window&&(e=!0),e}function Ba(){let e=!1;return"MediaStream"in window&&(e=!0),e}function Ma(e,t){let i=window.URL.createObjectURL(t),s=window.document.createElement("a");s.download=e,s.href=i;let r=window.document.createEvent("MouseEvents");r.initEvent("click",!0,!0),s.dispatchEvent(r),setTimeout((()=>{window.URL.revokeObjectURL(i)}),wa()?1e3:0)}function Ua(e){return null==e}function Fa(e){return!0===e||!1===e}function Oa(e){return!Ua(e)}function Na(e){let t={left:"",right:"",top:"",bottom:"",opacity:1,backgroundColor:"",image:{src:"",width:"100",height:"60"},text:{content:"",fontSize:"14",color:"#000",width:"",height:""},rect:{color:"green",lineWidth:2,width:"",height:"",fill:"",fillOpacity:.2},line:{x1:"",y1:"",x2:"",y2:"",color:"green",lineWidth:2},polygon:{color:"green",lineWidth:2,list:[],fill:"",fillOpacity:.2},html:""};const i=Object.assign(t.image,e.image||{}),s=Object.assign(t.text,e.text||{}),r=Object.assign(t.rect,e.rect||{}),a=Object.assign(t.line,e.line||{});return t=Object.assign(t,e,{image:i,text:s,rect:r,line:a}),t}function ja(e,t){let i={container:e||"",text:"",opacity:"",angle:"",color:"",fontSize:"",fontFamily:""};return i=Object.assign(i,t),{watermark_parent_node:i.container,watermark_alpha:i.opacity,watermark_angle:i.angle,watermark_fontsize:i.fontSize,watermark_color:i.color,watermark_font:i.fontFamily,watermark_txt:i.text}}function Ga(e,t){return new Promise(((i,s)=>{let r=Na(t);if(!r.image.src&&!r.text.content)return i(e);let a=document.createElement("canvas");a.width=t.width,a.height=t.height;let o=a.getContext("2d"),n=0,l=0;Da(r.left)?n=r.left:Da(r.right)&&(n=a.width-r.right),Da(r.top)?l=r.top:Da(r.bottom)&&(l=a.height-r.bottom);const d=new Image;d.src=e,d.onload=()=>{if(o.drawImage(d,0,0),r.image&&r.image.src){const e=new Image;e.src=r.image.src,e.setAttribute("crossOrigin","Anonymous"),e.onload=()=>{n-=r.image.width,o.drawImage(e,n,l,r.image.width,r.image.height),i(a.toDataURL(t.format,t.quality))},e.onerror=e=>{s()}}else r.text&&r.text.content&&(o.font=r.text.fontSize+"px 宋体",o.fillStyle=r.text.color,o.textAlign="right",o.fillText(r.text.content,n,l),i(a.toDataURL(t.format,t.quality)))},d.onerror=e=>{s(e)}}))}function za(e){var t;if(e>-1){var i=Math.floor(e/3600),s=Math.floor(e/60)%60,r=e%60;t=i<10?"0"+i+":":i+":",s<10&&(t+="0"),t+=s+":",(r=Math.round(r))<10&&(t+="0"),t+=r.toFixed(0)}return t}function $a(e,t){let i="";if(e>-1){const s=Math.floor(e/60)%60;let r=e%60;r=Math.round(r),i=s<10?"0"+s+":":s+":",r<10&&(i+="0"),i+=r,Ua(t)||(t<10&&(t="0"+t),i+=":"+t)}return i}function Ha(e){let t="";if(e>-1){const i=Math.floor(e/60/60)%60;let s=Math.floor(e/60)%60,r=e%60;s=Math.round(s),t=i<10?"0"+i+":":i+":",s<10&&(t+="0"),t+=s+":",r<10&&(t+="0"),t+=r}return t}function Va(e,t){const i=Math.floor(t/60)%60,s=Math.floor(t%60);return new Date(e).setHours(i,s,0,0)}function Wa(e,t){const i=Math.floor(t/60/60)%60,s=Math.floor(t/60)%60,r=t%60;return new Date(e).setHours(i,s,r,0)}function Ja(e){return(""+e).length}function qa(e){return e&&0===Object.keys(e).length}function Ka(e){return!qa(e)}function Ya(e){return"string"==typeof e}const Qa=()=>{const e=window.navigator.userAgent;return/MicroMessenger/i.test(e)},Xa=()=>{const e=window.navigator.userAgent;return/Chrome/i.test(e)};function Za(e){const t=e||window.event;return t.target||t.srcElement}function eo(){return _a()&&function(){const e=navigator.userAgent.toLowerCase();return/macintosh|mac os x/i.test(e)}()}function to(e){return"function"==typeof e}function io(e){if(ya()){let t=0,i=0;if(1===e.touches.length){let s=e.touches[0];t=s.clientX,i=s.clientY}return{posX:t,posY:i}}let t=0,i=0;const s=e||window.event;return s.pageX||s.pageY?(t=s.pageX,i=s.pageY):(s.clientX||s.clientY)&&(t=e.clientX+document.documentElement.scrollLeft+document.body.scrollLeft,i=e.clientY+document.documentElement.scrollTop+document.body.scrollTop),{posX:t,posY:i}}function so(){let e=document.createElement("video"),t=e.canPlayType("application/vnd.apple.mpegurl");return e=null,t}function ro(e){let t=Ao(e.hasAudio)&&(e.useMSE||e.useWCS&&!e.useOffscreen)&&Ao(e.demuxUseWorker);return!!(Ao(t)&&e.useMSE&&e.mseDecodeAudio&&Ao(e.demuxUseWorker))||t}function ao(e){const t=e.toString().trim().match(/^function\s*\w*\s*\([\w\s,]*\)\s*{([\w\W]*?)}$/)[1];const i=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(i)}function oo(e){e.close()}function no(){return"https:"===window.location.protocol||"localhost"===window.location.hostname}function lo(e){const t=Object.prototype.toString;return function(e){switch(t.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:try{return e instanceof Error}catch(e){return!1}}}(e)?e.message:null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function ho(e,t){t&&(e=e.filter((e=>e.type&&e.type===t)));let i=e[0],s=null,r=1;if(e.length>0){let t=e[1];t&&t.ts-i.ts>1e5&&(i=t,r=2)}if(i)for(let a=r;a<e.length;a++){let r=e[a];if(t&&r.type&&r.type!==t&&(r=null),r){if(r.ts-i.ts>=1e3){e[a-1].ts-i.ts<1e3&&(s=a+1)}}}return s}function co(e){for(var t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),i=window.atob(t),s=new Uint8Array(i.length),r=0;r<i.length;++r)s[r]=i.charCodeAt(r);return s}function uo(e){const t=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");let s=e;return t&&(i.setAttribute("href",s),s=i.href),i.setAttribute("href",s),{origin:i.origin,href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}function po(e){let t="";if("object"==typeof e)try{t=JSON.stringify(e),t=JSON.parse(t)}catch(i){t=e}else t=e;return t}function fo(){return po(se)}function mo(){return po(re)}function go(e){return e[0]>>4===ws&&e[1]===vs}function yo(e){return!0===e||"true"===e}function Ao(e){return!0!==e&&"true"!==e}function bo(e,t,i){e&&(e.dataset?e.dataset[t]=i:e.setAttribute("data-"+t,i))}function _o(e,t){return e?e.dataset?e.dataset[t]:e.getAttribute("data-"+t):""}function vo(e){return e.replace(/-([a-z])/g,(function(e,t){return t.toUpperCase()}))}function wo(){return/iphone/i.test(navigator.userAgent)}function So(){return window.performance&&window.performance.memory?window.performance.memory:null}function To(){try{var e=document.createElement("canvas");return!(!window.WebGL2RenderingContext||!e.getContext("webgl2"))}catch(e){return!1}}function Eo(e){return e.trim().match(/^function\s*\w*\s*\([\w\s,]*\)\s*{([\w\W]*?)}$/)[1]}function ko(){let e=!1;return"requestVideoFrameCallback"in HTMLVideoElement.prototype&&(e=!0),e}function Co(){let e=!1;return"PressureObserver"in window&&(e=!0),e}class xo{constructor(e){this.destroys=[],this.proxy=this.proxy.bind(this),this.master=e}proxy(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!e)return;if(Array.isArray(t))return t.map((t=>this.proxy(e,t,i,s)));e.addEventListener(t,i,s);const r=()=>{to(e.removeEventListener)&&e.removeEventListener(t,i,s)};return this.destroys.push(r),r}destroy(){this.master.debug&&this.master.debug.log("Events","destroy"),this.destroys.forEach((e=>e())),this.destroys=[]}}var Ro=1e-6,Do="undefined"!=typeof Float32Array?Float32Array:Array;function Lo(){var e=new Do(16);return Do!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function Io(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var Po,Bo=function(e,t,i,s,r,a,o){var n=1/(t-i),l=1/(s-r),d=1/(a-o);return e[0]=-2*n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*d,e[11]=0,e[12]=(t+i)*n,e[13]=(r+s)*l,e[14]=(o+a)*d,e[15]=1,e};function Mo(e,t,i){var s=new Do(3);return s[0]=e,s[1]=t,s[2]=i,s}Po=new Do(3),Do!=Float32Array&&(Po[0]=0,Po[1]=0,Po[2]=0);class Uo{constructor(e,t){this.gl=e,t&&this.gl.pixelStorei(this.gl.UNPACK_ALIGNMENT,1);const i=this._initShaderProgram();this._programInfo={program:i,attribLocations:{vertexPosition:e.getAttribLocation(i,"aVertexPosition"),texturePosition:e.getAttribLocation(i,"aTexturePosition")},uniformLocations:{projectionMatrix:e.getUniformLocation(i,"uProjectionMatrix"),modelMatrix:e.getUniformLocation(i,"uModelMatrix"),viewMatrix:e.getUniformLocation(i,"uViewMatrix"),rgbatexture:e.getUniformLocation(i,"rgbaTexture"),ytexture:e.getUniformLocation(i,"yTexture"),utexture:e.getUniformLocation(i,"uTexture"),vtexture:e.getUniformLocation(i,"vTexture"),isyuv:e.getUniformLocation(i,"isyuv")}},this._buffers=this._initBuffers(),this._rgbatexture=this._createTexture(),this._ytexture=this._createTexture(),this._utexture=this._createTexture(),this._vtexture=this._createTexture()}destroy(){this.gl.deleteProgram(this._programInfo.program),this.gl.deleteBuffer(this._buffers.position),this.gl.deleteBuffer(this._buffers.texPosition),this.gl.deleteBuffer(this._buffers.indices),this.gl.deleteTexture(this._rgbatexture),this.gl.deleteTexture(this._ytexture),this.gl.deleteTexture(this._utexture),this.gl.deleteTexture(this._vtexture),this._programInfo=null,this._buffers=null,this._rgbatexture=null,this._ytexture=null,this._utexture=null,this._vtexture=null}_initShaderProgram(){const e=this._loadShader(this.gl.VERTEX_SHADER,"\n attribute vec4 aVertexPosition;\n attribute vec2 aTexturePosition;\n varying lowp vec2 vTexturePosition;\n void main(void) {\n gl_Position = aVertexPosition;\n vTexturePosition = aTexturePosition;\n }\n "),t=this._loadShader(this.gl.FRAGMENT_SHADER,"\n precision highp float;\n varying highp vec2 vTexturePosition;\n uniform int isyuv;\n uniform sampler2D rgbaTexture;\n uniform sampler2D yTexture;\n uniform sampler2D uTexture;\n uniform sampler2D vTexture;\n\n const mat4 YUV2RGB = mat4( 1.1643828125, 0, 1.59602734375, -.87078515625,\n 1.1643828125, -.39176171875, -.81296875, .52959375,\n 1.1643828125, 2.017234375, 0, -1.081390625,\n 0, 0, 0, 1);\n\n\n void main(void) {\n\n if (isyuv>0) {\n\n highp float y = texture2D(yTexture, vTexturePosition).r;\n highp float u = texture2D(uTexture, vTexturePosition).r;\n highp float v = texture2D(vTexture, vTexturePosition).r;\n gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;\n\n } else {\n gl_FragColor = texture2D(rgbaTexture, vTexturePosition);\n }\n }\n "),i=this.gl.createProgram();return this.gl.attachShader(i,e),this.gl.attachShader(i,t),this.gl.linkProgram(i),this.gl.getProgramParameter(i,this.gl.LINK_STATUS)?i:(console.log("Unable to initialize the shader program: "+this.gl.getProgramInfoLog(i)),null)}_loadShader(e,t){const i=this.gl,s=i.createShader(e);return i.shaderSource(s,t),i.compileShader(s),i.getShaderParameter(s,i.COMPILE_STATUS)?s:(console.log("An error occurred compiling the shaders: "+i.getShaderInfoLog(s)),i.deleteShader(s),null)}_initBuffers(){const e=this.gl,t=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,t);const i=[-1,-1,1,-1,1,1,-1,1];e.bufferData(e.ARRAY_BUFFER,new Float32Array(i),e.STATIC_DRAW);var s=[];s=s.concat([0,1],[1,1],[1,0],[0,0]);const r=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,r),e.bufferData(e.ARRAY_BUFFER,new Float32Array(s),e.STATIC_DRAW);const a=e.createBuffer();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a);return e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,0,2,3]),e.STATIC_DRAW),{positions:i,position:t,texPosition:r,indices:a}}_createTexture(){let e=this.gl.createTexture();return this.gl.bindTexture(this.gl.TEXTURE_2D,e),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),e}_drawScene(e,t,i){this.gl.viewport(0,0,e,t),this.gl.enable(this.gl.BLEND),this.gl.blendFunc(this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this._buffers.position),this.gl.bufferData(this.gl.ARRAY_BUFFER,new Float32Array(this._buffers.positions),this.gl.STATIC_DRAW),this.gl.vertexAttribPointer(this._programInfo.attribLocations.vertexPosition,2,this.gl.FLOAT,!1,0,0),this.gl.enableVertexAttribArray(this._programInfo.attribLocations.vertexPosition),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this._buffers.texPosition),this.gl.vertexAttribPointer(this._programInfo.attribLocations.texturePosition,2,this.gl.FLOAT,!1,0,0),this.gl.enableVertexAttribArray(this._programInfo.attribLocations.texturePosition),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this._buffers.indices);i?(this.gl.activeTexture(this.gl.TEXTURE0+3),this.gl.bindTexture(this.gl.TEXTURE_2D,this._ytexture),this.gl.activeTexture(this.gl.TEXTURE0+4),this.gl.bindTexture(this.gl.TEXTURE_2D,this._utexture),this.gl.activeTexture(this.gl.TEXTURE0+5),this.gl.bindTexture(this.gl.TEXTURE_2D,this._vtexture)):(this.gl.activeTexture(this.gl.TEXTURE0+2),this.gl.bindTexture(this.gl.TEXTURE_2D,this._rgbatexture)),this.gl.useProgram(this._programInfo.program),this.gl.uniform1i(this._programInfo.uniformLocations.rgbatexture,2),this.gl.uniform1i(this._programInfo.uniformLocations.ytexture,3),this.gl.uniform1i(this._programInfo.uniformLocations.utexture,4),this.gl.uniform1i(this._programInfo.uniformLocations.vtexture,5),this.gl.uniform1i(this._programInfo.uniformLocations.isyuv,i?1:0),this.gl.drawElements(this.gl.TRIANGLES,6,this.gl.UNSIGNED_SHORT,0)}_calRect(e,t,i,s,r,a){let o=2*e/r-1,n=2*(a-t-s)/a-1,l=2*(e+i)/r-1,d=2*(a-t)/a-1;return[o,n,l,n,l,d,o,d]}_clear(){this.gl.clearColor(0,0,0,1),this.gl.clearDepth(1),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}render(e,t,i,s,r){const a=this.gl;this._clear(),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,this._ytexture),a.texImage2D(a.TEXTURE_2D,0,a.LUMINANCE,e,t,0,a.LUMINANCE,a.UNSIGNED_BYTE,i),a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,this._utexture),a.texImage2D(a.TEXTURE_2D,0,a.LUMINANCE,e/2,t/2,0,a.LUMINANCE,a.UNSIGNED_BYTE,s),a.activeTexture(a.TEXTURE2),a.bindTexture(a.TEXTURE_2D,this._vtexture),a.texImage2D(a.TEXTURE_2D,0,a.LUMINANCE,e/2,t/2,0,a.LUMINANCE,a.UNSIGNED_BYTE,r),this._buffers.positions=[-1,-1,1,-1,1,1,-1,1],this._drawScene(e,t,!0)}renderYUV(e,t,i){let s=i.slice(0,e*t),r=i.slice(e*t,e*t*5/4),a=i.slice(e*t*5/4,e*t*3/2);const o=this.gl;this._clear(),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,this._ytexture),o.texImage2D(o.TEXTURE_2D,0,o.LUMINANCE,e,t,0,o.LUMINANCE,o.UNSIGNED_BYTE,s),o.activeTexture(o.TEXTURE1),o.bindTexture(o.TEXTURE_2D,this._utexture),o.texImage2D(o.TEXTURE_2D,0,o.LUMINANCE,e/2,t/2,0,o.LUMINANCE,o.UNSIGNED_BYTE,r),o.activeTexture(o.TEXTURE2),o.bindTexture(o.TEXTURE_2D,this._vtexture),o.texImage2D(o.TEXTURE_2D,0,o.LUMINANCE,e/2,t/2,0,o.LUMINANCE,o.UNSIGNED_BYTE,a),this._buffers.positions=[-1,-1,1,-1,1,1,-1,1],this._drawScene(e,t,!0)}drawDom(e,t,i,s,r){const a=this.gl;a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,this._rgbatexture),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,r),this._buffers.positions=this._calRect(i,s,r.width,r.height,e,t),this._drawScene(e,t,!1)}}class Fo{constructor(e){this.gpu=e,this.pipeline=null,this.matrixGroupInfo=null,this.depthTexture=null,this.textureGroupInfo=null,this.hasInited=!1,this.buffers=this._initBuffer(),this._initPipeline().then((e=>{this.pipeline=e,this.matrixGroupInfo=this._initMatrixGroupInfo(),this.hasInited=!0}))}destroy(){this.gpu&&(this.gpu.device.destroy(),this.gpu=null),this.hasInited=!1,this.pipeline=null,this.matrixGroupInfo=null,this.depthTexture=null,this.textureGroupInfo=null}_initBuffer(){const e=this.gpu.device,t=new Float32Array([-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1]),i=e.createBuffer({size:t.byteLength,usage:window.GPUBufferUsage.VERTEX|window.GPUBufferUsage.COPY_DST});e.queue.writeBuffer(i,0,t);const s=new Float32Array([0,1,1,1,1,0,0,0]),r=e.createBuffer({size:s.byteLength,usage:window.GPUBufferUsage.VERTEX|window.GPUBufferUsage.COPY_DST});e.queue.writeBuffer(r,0,s);const a=new Uint16Array([0,1,2,0,2,3]),o=e.createBuffer({size:a.byteLength,usage:window.GPUBufferUsage.INDEX|window.GPUBufferUsage.COPY_DST});return e.queue.writeBuffer(o,0,a),{positionBuffer:i,texpositionBuffer:r,indexBuffer:o}}_initPipeline(){return new Promise(((e,t)=>{const i=this.gpu.device,s=this.gpu.format,r={layout:"auto",vertex:{module:i.createShaderModule({code:"\n\n @binding(0) @group(0) var<uniform> uModelMatrix : mat4x4<f32>;\n @binding(1) @group(0) var<uniform> uViewMatrix : mat4x4<f32>;\n @binding(2) @group(0) var<uniform> uProjectionMatrix : mat4x4<f32>;\n\n struct VertexOutput {\n @builtin(position) Position : vec4<f32>,\n @location(0) vTexturePosition : vec2<f32>,\n }\n\n @vertex\n fn main(\n @location(0) aVertexPosition : vec4<f32>,\n @location(1) aTexturePosition : vec2<f32>\n ) -> VertexOutput {\n var output : VertexOutput;\n var tmppos : vec4<f32> = uProjectionMatrix * uViewMatrix * uModelMatrix * aVertexPosition;\n output.Position = vec4<f32>(tmppos.x, tmppos.y, (tmppos.z+1.)/2., tmppos.w); // webgl z [-1, 1], webgpu z [0, 1], 这里z做下调整 z-webgpu = (z-webgl+1)/2\n output.vTexturePosition = aTexturePosition;\n return output;\n }\n\n "}),entryPoint:"main",buffers:[{arrayStride:12,attributes:[{shaderLocation:0,offset:0,format:"float32x3"}]},{arrayStride:8,attributes:[{shaderLocation:1,offset:0,format:"float32x2"}]}]},primitive:{topology:"triangle-list"},fragment:{module:i.createShaderModule({code:"\n @group(1) @binding(0) var mySampler: sampler;\n @group(1) @binding(1) var yTexture: texture_2d<f32>;\n @group(1) @binding(2) var uTexture: texture_2d<f32>;\n @group(1) @binding(3) var vTexture: texture_2d<f32>;\n\n const YUV2RGB : mat4x4<f32> = mat4x4<f32>( 1.1643828125, 0, 1.59602734375, -.87078515625,\n 1.1643828125, -.39176171875, -.81296875, .52959375,\n 1.1643828125, 2.017234375, 0, -1.081390625,\n 0, 0, 0, 1);\n\n @fragment\n fn main(\n @location(0) vTexturePosition: vec2<f32>\n ) -> @location(0) vec4<f32> {\n\n var y : f32= textureSample(yTexture, mySampler, vTexturePosition).r;\n var u : f32 = textureSample(uTexture, mySampler, vTexturePosition).r;\n var v : f32 = textureSample(vTexture, mySampler, vTexturePosition).r;\n\n return vec4<f32>(y, u, v, 1.0)*YUV2RGB;\n }\n\n "}),entryPoint:"main",targets:[{format:s}]},depthStencil:{depthWriteEnabled:!0,depthCompare:"less",format:"depth24plus"}};i.createRenderPipelineAsync(r).then((t=>{e(t)})).catch((e=>{t(e)}))}))}_initMatrixGroupInfo(){const e=this.gpu.device,t=this.pipeline,i=Lo();Bo(i,-1,1,-1,1,.1,100);const s=Lo();Io(s);const r=Lo();!function(e,t,i,s){var r,a,o,n,l,d,h,c,u,p,f=t[0],m=t[1],g=t[2],y=s[0],A=s[1],b=s[2],_=i[0],v=i[1],w=i[2];Math.abs(f-_)<Ro&&Math.abs(m-v)<Ro&&Math.abs(g-w)<Ro?Io(e):(h=f-_,c=m-v,u=g-w,r=A*(u*=p=1/Math.hypot(h,c,u))-b*(c*=p),a=b*(h*=p)-y*u,o=y*c-A*h,(p=Math.hypot(r,a,o))?(r*=p=1/p,a*=p,o*=p):(r=0,a=0,o=0),n=c*o-u*a,l=u*r-h*o,d=h*a-c*r,(p=Math.hypot(n,l,d))?(n*=p=1/p,l*=p,d*=p):(n=0,l=0,d=0),e[0]=r,e[1]=n,e[2]=h,e[3]=0,e[4]=a,e[5]=l,e[6]=c,e[7]=0,e[8]=o,e[9]=d,e[10]=u,e[11]=0,e[12]=-(r*f+a*m+o*g),e[13]=-(n*f+l*m+d*g),e[14]=-(h*f+c*m+u*g),e[15]=1)}(r,Mo(0,0,0),Mo(0,0,-1),Mo(0,1,0));const a=e.createBuffer({size:64,usage:window.GPUBufferUsage.UNIFORM|window.GPUBufferUsage.COPY_DST});e.queue.writeBuffer(a,0,s);const o=e.createBuffer({size:64,usage:window.GPUBufferUsage.UNIFORM|window.GPUBufferUsage.COPY_DST});e.queue.writeBuffer(o,0,r);const n=e.createBuffer({size:64,usage:window.GPUBufferUsage.UNIFORM|window.GPUBufferUsage.COPY_DST});e.queue.writeBuffer(n,0,i);return{modelMatrixBuffer:a,viewMatrixBuffer:o,projectMatrixBuffer:n,group:e.createBindGroup({label:"group0",layout:t.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:a}},{binding:1,resource:{buffer:o}},{binding:2,resource:{buffer:n}}]})}}_initTextureGroupInfo(e,t){const i=this.gpu.device,s=this.pipeline,r=i.createTexture({size:[e,t],format:"r8unorm",usage:window.GPUTextureUsage.TEXTURE_BINDING|window.GPUTextureUsage.COPY_DST|window.GPUTextureUsage.RENDER_ATTACHMENT}),a=i.createTexture({size:[e/2,t/2],format:"r8unorm",usage:window.GPUTextureUsage.TEXTURE_BINDING|window.GPUTextureUsage.COPY_DST|window.GPUTextureUsage.RENDER_ATTACHMENT}),o=i.createTexture({size:[e/2,t/2],format:"r8unorm",usage:window.GPUTextureUsage.TEXTURE_BINDING|window.GPUTextureUsage.COPY_DST|window.GPUTextureUsage.RENDER_ATTACHMENT}),n=i.createSampler({magFilter:"linear",minFilter:"linear"}),l=i.createBindGroup({label:"group1",layout:s.getBindGroupLayout(1),entries:[{binding:0,resource:n},{binding:1,resource:r.createView()},{binding:2,resource:a.createView()},{binding:3,resource:o.createView()}]});return{yTexture:r,uTexture:a,vTexture:o,group:l}}_drawScene(){const e=this.gpu.device,t=this.gpu.context,i=e.createCommandEncoder(),s={colorAttachments:[{view:t.getCurrentTexture().createView(),clearValue:{r:0,g:0,b:0,a:0},loadOp:"clear",storeOp:"store"}],depthStencilAttachment:{view:this.depthTexture.createView(),depthClearValue:1,depthLoadOp:"clear",depthStoreOp:"store"}},r=i.beginRenderPass(s);r.setPipeline(this.pipeline),r.setBindGroup(0,this.matrixGroupInfo.group),r.setBindGroup(1,this.textureGroupInfo.group),r.setVertexBuffer(0,this.buffers.positionBuffer),r.setVertexBuffer(1,this.buffers.texpositionBuffer),r.setIndexBuffer(this.buffers.indexBuffer,"uint16"),r.drawIndexed(6),r.end(),e.queue.submit([i.finish()])}renderYUV(e,t,i){if(!this.hasInited)return;let s=i.slice(0,e*t),r=i.slice(e*t,e*t*5/4),a=i.slice(e*t*5/4,e*t*3/2);const o=this.gpu.device;this.depthTexture||(this.depthTexture=this.gpu.device.createTexture({size:[e,t],format:"depth24plus",usage:window.GPUTextureUsage.RENDER_ATTACHMENT})),this.textureGroupInfo||(this.textureGroupInfo=this._initTextureGroupInfo(e,t)),o.queue.writeTexture({texture:this.textureGroupInfo.yTexture},s,{bytesPerRow:e,rowsPerImage:t},[e,t]),o.queue.writeTexture({texture:this.textureGroupInfo.uTexture},r,{bytesPerRow:e/2,rowsPerImage:t/2},[e/2,t/2]),o.queue.writeTexture({texture:this.textureGroupInfo.vTexture},a,{bytesPerRow:e/2,rowsPerImage:t/2},[e/2,t/2]),this._drawScene()}clear(){}}class Oo{constructor(e){this.player=e,this.TAG_NAME="SingleWatermark",this.configList=[],this.shadowRoot=null,this.shadowRootRealDom=null,this.shadowRootInnerDom=null,this.scale=1,this.isDynamic=!1,this._initDom(),this.player.debug.log(this.TAG_NAME,"int")}destroy(){this.configList=[],this.shadowRootInnerDom=null,this.isDynamic=!1,this.scale=1,this.shadowRoot&&(this.player.$container.removeChild(this.shadowRootRealDom),this.shadowRoot=null,this.shadowRootRealDom=null),this.player.debug.log(this.TAG_NAME,"destroy")}resize(){this.player.debug.log(this.TAG_NAME,"resize()"),"default"===this.player._opt.aspectRatio||ya()?this.player.getRenderType()===W?this._resizeDomForCanvas():this.player.getRenderType()===J&&this._resizeDomForVideo():this._resizeDomRatio()}_initDom(){const e=this.player.$container;let t=null;const i=document.createElement("div");i.setAttribute("style","pointer-events: none !important;display: block !important;"),t="function"==typeof i.attachShadow?i.attachShadow({mode:"open"}):i.shadowRoot?i.shadowRoot:i;const s=document.createElement("div");s.setAttribute("style","position: absolute; top: 0; left: 0; width: 0; height: 0;display: none;"),t.appendChild(s);const r=e.children,a=Math.floor(Math.random()*(r.length-1))+1;r[a]?e.insertBefore(i,r[a]):e.appendChild(i),this.shadowRootInnerDom=s,this.shadowRootRealDom=i,this.shadowRoot=t}update(e){this._removeDom();let t=[];Array.isArray(e)?t=e:Ka(e)&&t.push(e);let i=t.map((e=>Na(e)));this.configList=i,this._updateDom()}_resizeDomForVideo(){const e=this.player.width,t=this.player.height,i=this.player.getVideoInfo();if(!(i&&i.height>0&&i.width>0))return;let s=i.width,r=i.height;const a=this.player._opt;let o=t,n=e;if(a.hasControl&&!a.controlAutoHide){const e=a.playType===w?Qt:Yt;ya()&&this.player.fullscreen&&a.useWebFullScreen?n-=e:o-=e}const l=a.rotate;let d=(n-s)/2,h=(o-r)/2;270!==l&&90!==l||(s=i.height,r=i.width);const c=n/s,u=o/r;let p=c>u?u:c;a.isResize||c!==u&&(p=c+","+u),a.isFullResize&&(p=c>u?c:u);let f="scale("+p+")";"none"===a.mirrorRotate&&l&&(f+=" rotate("+l+"deg)"),"level"===a.mirrorRotate?f+=" rotateY(180deg)":"vertical"===a.mirrorRotate&&(f+=" rotateX(180deg)"),this.scale=-1!==(""+p).indexOf(",")?c:p,this.shadowRootInnerDom.style.transform=f,this.shadowRootInnerDom.style.left=d+"px",this.shadowRootInnerDom.style.top=h+"px",this.shadowRootInnerDom.style.width=i.width+"px",this.shadowRootInnerDom.style.height=i.height+"px",this.shadowRootInnerDom.style.display="block"}_resizeDomForCanvas(){const e=this.player.getVideoInfo();if(!(e&&e.height>0&&e.width>0))return;const t=this.player._opt;let i=this.player.width,s=this.player.height;if(t.hasControl&&!t.controlAutoHide){const e=t.playType===w?Qt:Yt;ya()&&this.player.fullscreen&&t.useWebFullScreen?i-=e:s-=e}let r=e.width,a=e.height;const o=t.rotate;let n=(i-r)/2,l=(s-a)/2;270!==o&&90!==o||(r=e.height,a=e.width);const d=i/r,h=s/a;let c=d>h?h:d;t.isResize||d!==h&&(c=d+","+h),t.isFullResize&&(c=d>h?d:h);let u="scale("+c+")";"none"===t.mirrorRotate&&o&&(u+=" rotate("+o+"deg)"),"level"===t.mirrorRotate?u+=" rotateY(180deg)":"vertical"===t.mirrorRotate&&(u+=" rotateX(180deg)"),this.shadowRootInnerDom.style.height=e.height+"px",this.shadowRootInnerDom.style.width=e.width+"px",this.shadowRootInnerDom.style.padding="0",this.shadowRootInnerDom.style.transform=u,this.shadowRootInnerDom.style.left=n+"px",this.shadowRootInnerDom.style.top=l+"px",this.shadowRootInnerDom.style.display="block"}_resizeDomRatio(){const e=this.player.getVideoInfo();if(!(e&&e.height>0&&e.width>0))return;const t=this.player._opt.aspectRatio.split(":").map(Number);let i=this.player.width,s=this.player.height;const r=this.player._opt;let a=0;r.hasControl&&!r.controlAutoHide&&(a=r.playType===w?Qt:Yt,s-=a);const o=e.width/e.height,n=t[0]/t[1];if(o>n){const t=n*e.height/e.width;this.shadowRootInnerDom.style.width=100*t+"%",this.shadowRootInnerDom.style.height=`calc(100% - ${a}px)`,this.shadowRootInnerDom.style.padding=`0 ${(i-i*t)/2}px`}else{const t=e.width/n/e.height;this.shadowRootInnerDom.style.width="100%",this.shadowRootInnerDom.style.height=`calc(${100*t}% - ${a}px)`,this.shadowRootInnerDom.style.padding=(s-s*t)/2+"px 0"}this.shadowRootInnerDom.style.display="block"}_updateDom(){this.shadowRoot&&this.configList.forEach((e=>{const t=document.createElement("div");let i=null;if(e.image&&e.image.src?(i=document.createElement("img"),i.style.height="100%",i.style.width="100%",i.style.objectFit="contain",i.src=e.image.src):e.text&&e.text.content?i=document.createTextNode(e.text.content):(e.rect&&e.rect.color&&e.rect.width||e.html||e.line&&e.line.x1&&e.line.y1&&e.line.x2&&e.line.y2||e.polygon&&e.polygon.list&&e.polygon.list.length>=3)&&(i=document.createElement("div")),i){if(t.appendChild(i),t.style.visibility="",t.style.position="absolute",t.style.display="block",t.style["-ms-user-select"]="none",t.style["-moz-user-select"]="none",t.style["-webkit-user-select"]="none",t.style["-o-user-select"]="none",t.style["user-select"]="none",t.style["-webkit-touch-callout"]="none",t.style["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",t.style["-webkit-text-size-adjust"]="none",t.style["-webkit-touch-callout"]="none",t.style.opacity=e.opacity,Oa(e.left)&&(Da(e.left)?t.style.left=e.left+"px":t.style.left=e.left),Oa(e.right)&&(Da(e.right)?t.style.right=e.right+"px":t.style.right=e.right),Oa(e.top)&&(Da(e.top)?t.style.top=e.top+"px":t.style.top=e.top),Oa(e.bottom)&&(Da(e.bottom)?t.style.bottom=e.bottom+"px":t.style.bottom=e.bottom),e.backgroundColor&&(t.style.backgroundColor=e.backgroundColor),t.style.overflow="hidden",t.style.zIndex="9999999",e.image&&e.image.src)t.style.width=e.image.width+"px",t.style.height=e.image.height+"px";else if(e.text&&e.text.content)t.style.fontSize=e.text.fontSize+"px",t.style.color=e.text.color,e.text.width&&(t.style.width=e.text.width+"px"),e.text.height&&(t.style.height=e.text.height+"px");else if(e.rect&&e.rect.color&&e.rect.width){if(t.style.width=e.rect.width+"px",t.style.height=e.rect.height+"px",t.style.borderWidth=e.rect.lineWidth+"px",t.style.borderStyle="solid",t.style.borderColor=e.rect.color,e.rect.fill){const i=document.createElement("div");i.style.position="absolute",i.style.width="100%",i.style.height="100%",i.style.backgroundColor=e.rect.fill,e.rect.fillOpacity&&(i.style.opacity=e.rect.fillOpacity),t.appendChild(i)}}else if(e.html)t.style.width="100%",t.style.height="100%",t.innerHTML=e.html;else if(e.line&&e.line.x1&&e.line.y1&&e.line.x2&&e.line.y2)this.settingLine(t,e.line);else if(e.polygon&&e.polygon.list&&e.polygon.list.length>=3){t.style.width="100%",t.style.height="100%";let i=e.polygon.list;const s=e.polygon.color,r=e.polygon.lineWidth;if(i=i.sort(((e,t)=>(e.index||0)-(t.index||0))),e.polygon.fill){const s=document.createElement("div");s.style.position="absolute",s.style.width="100%",s.style.height="100%";const r="polygon("+i.map((e=>`${e.x}px ${e.y}px`)).join(", ")+")";s.style.clipPath=r,s.style.backgroundColor=e.polygon.fill,e.polygon.fillOpacity&&(s.style.opacity=e.polygon.fillOpacity),t.appendChild(s)}i.forEach(((e,a)=>{const o=document.createElement("div");if(a===i.length-1){const a=i[0],n={x1:e.x,y1:e.y,x2:a.x,y2:a.y,color:s,lineWidth:r};return this.settingLine(o,n),void t.appendChild(o)}const n=i[a+1],l={x1:e.x,y1:e.y,x2:n.x,y2:n.y,color:s,lineWidth:r};this.settingLine(o,l),t.appendChild(o)}))}this.isDynamic&&(this.shadowRootDynamicDom=t),this.shadowRootInnerDom.appendChild(t)}}))}settingLine(e,t){const i=t.x1,s=t.y1,r=t.x2,a=t.y2;var o=Math.sqrt((i-r)**2+(s-a)**2),n=180*Math.atan2(a-s,r-i)/Math.PI;e.style.backgroundColor=t.color,e.style.width=o+"px",e.style.height=t.lineWidth+"px",e.style.position="absolute",e.style.top=s+"px",e.style.left=i+"px",e.style.transform="rotate("+n+"deg)",e.style.transformOrigin="0 0"}remove(){this._removeDom()}_removeDom(){this.shadowRootInnerDom&&(this.shadowRootInnerDom.innerHTML="")}}class No extends a{constructor(){super(),this.videoInfo={width:null,height:null,encType:null,encTypeCode:null},this.init=!1,this.prevAiFaceDetectTime=null,this.prevAiObjectDetectTime=null,this.prevOcclusionDetectTime=null,this.contentWatermark=null,this.aiContentWatermark=null,this.tempContentList=[],this.tempAiContentList=[],this.streamFps=0}destroy(){this.resetInit(),this.contentWatermark&&(this.contentWatermark.destroy(),this.contentWatermark=null),this.tempContentList=[],this.aiContentWatermark&&(this.aiContentWatermark.destroy(),this.aiContentWatermark=null),this.tempAiContentList=[],this.prevAiFaceDetectTime=null,this.prevAiObjectDetectTime=null,this.streamFps=0,this.off()}resetInit(){this.videoInfo={width:null,height:null,encType:null,encTypeCode:null},this.init=!1}getHasInit(){return this.init}updateVideoInfo(e){Oa(e.encTypeCode)&&(this.videoInfo.encType=_t[e.encTypeCode],this.videoInfo.encTypeCode=e.encTypeCode),Oa(e.encType)&&(this.videoInfo.encType=e.encType),Oa(e.width)&&(this.videoInfo.width=e.width),Oa(e.height)&&(this.videoInfo.height=e.height),Oa(this.videoInfo.encType)&&Oa(this.videoInfo.height)&&Oa(this.videoInfo.width)&&!this.init&&(this.player.emit(lt.videoInfo,this.videoInfo),this.init=!0)}getVideoInfo(){return this.videoInfo}clearView(){this.tempContentList=[],this.tempAiContentList=[]}resize(){if(this.player.debug.log("CommonVideo","resize()"),"default"===this.player._opt.aspectRatio||ya()?this._resize():this._resizeRatio(),this.contentWatermark&&this.contentWatermark.resize(),this.aiContentWatermark&&this.aiContentWatermark.resize(),this.player.singleWatermark&&this.player.singleWatermark.resize(),this.player.ghostWatermark&&this.player.ghostWatermark.resize(),this.player.dynamicWatermark&&this.player.dynamicWatermark.resize(),this.player.zoom&&this.player.zooming){const e=this._getStyleScale();this.player.zoom.updatePrevVideoElementStyleScale(e),this.player.zoom.updateVideoElementScale()}}_resizeRatio(){this.player.debug.log("CommonVideo","_resizeRatio()");const e=this.player._opt.aspectRatio.split(":").map(Number);let t=this.player.width,i=this.player.height;const s=this.player._opt;let r=0;s.hasControl&&!s.controlAutoHide&&(r=s.playType===w?Qt:Yt,i-=r);const a=this.videoInfo,o=a.width/a.height,n=e[0]/e[1];if(this.getType()===W&&(this.$videoElement.style.left="0",this.$videoElement.style.top="0",this.$videoElement.style.transform="none"),this.getType()===J&&this.player._opt.videoRenderSupportScale&&(this.$videoElement.style.objectFit="fill"),o>n){const e=n*a.height/a.width;this.$videoElement.style.width=100*e+"%",this.$videoElement.style.height=`calc(100% - ${r}px)`,this.$videoElement.style.padding=`0 ${(t-t*e)/2}px`}else{const e=a.width/n/a.height;this.$videoElement.style.width="100%",this.$videoElement.style.height=`calc(${100*e}% - ${r}px)`,this.$videoElement.style.padding=(i-i*e)/2+"px 0"}}play(){}pause(){}setRate(e){}getType(){return""}getCanvasType(){return""}getCurrentTime(){return 0}getStreamFps(){return this.streamFps}isPlaying(){return!0}getPlaybackQuality(){return null}setStreamFps(e){this.player.debug.log("CommonVideo","setStreamFps",e),this.streamFps=e}addContentToCanvas(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.tempContentList=e}addAiContentToCanvas(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.tempAiContentList=e}doAddContentToWatermark(){if(this.tempContentList.length>0){this.contentWatermark||(this.contentWatermark=new Oo(this.player),this.contentWatermark.resize());const e=[];this.tempContentList.forEach((t=>{let i={left:t.x||0,top:t.y||0};"text"===t.type?i.text={content:t.text,fontSize:t.fontSize||"14",color:t.color||"#000"}:"rect"===t.type?i.rect={width:t.width,height:t.height,color:t.color||"green",lineWidth:t.lineWidth||2,fill:t.fill||"",fillOpacity:t.fillOpacity||.2}:"polygon"===t.type?i.polygon={list:t.list,color:t.color||"green",lineWidth:t.lineWidth||2,fill:t.fill,fillOpacity:t.fillOpacity||.2}:"line"===t.type&&(i.line={color:t.color||"green",lineWidth:t.lineWidth||2,x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}),e.push(i)})),this.contentWatermark.update(e)}else this.contentWatermark&&this.contentWatermark.remove()}doAddAiContentToWatermark(){if(this.tempAiContentList.length>0){this.aiContentWatermark||(this.aiContentWatermark=new Oo(this.player),this.aiContentWatermark.resize());const e=this.tempAiContentList.map((e=>{let t={left:e.x,top:e.y};return"text"===e.type?t.text={content:e.text,fontSize:e.fontSize,color:e.color}:"rect"===e.type&&(t.rect={width:e.width,height:e.height,color:e.color,lineWidth:e.lineWidth}),t}));this.aiContentWatermark.update(e)}else this.aiContentWatermark&&this.aiContentWatermark.remove()}_getStyleScale(){let e=this.$videoElement.style.transform.match(/scale\([0-9., ]*\)/g),t="";if(e&&e[0]){t=e[0].replace("scale(","").replace(")","").split(",")}return t}getReadyStateInited(){return!0}}var jo="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0;function Go(e,t,i){var s=new XMLHttpRequest;s.open("GET",e),s.responseType="blob",s.onload=function(){Vo(s.response,t,i)},s.onerror=function(){console.error("could not download file")},s.send()}function zo(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return t.status>=200&&t.status<=299}function $o(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(i){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var Ho=jo.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),Vo="object"!=typeof window||window!==jo?function(){}:"download"in HTMLAnchorElement.prototype&&!Ho?function(e,t,i){var s=jo.URL||jo.webkitURL,r=document.createElementNS("http://www.w3.org/1999/xhtml","a");t=t||e.name||"download",r.download=t,r.rel="noopener","string"==typeof e?(r.href=e,r.origin!==location.origin?zo(r.href)?Go(e,t,i):$o(r,r.target="_blank"):$o(r)):(r.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(r.href)}),4e4),setTimeout((function(){$o(r)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,t,i){if(t=t||e.name||"download","string"==typeof e)if(zo(e))Go(e,t,i);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){$o(s)}))}else navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}(e,i),t)}:function(e,t,i,s){if((s=s||open("","_blank"))&&(s.document.title=s.document.body.innerText="downloading..."),"string"==typeof e)return Go(e,t,i);var r="application/octet-stream"===e.type,a=/constructor/i.test(jo.HTMLElement)||jo.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||r&&a||Ho)&&"undefined"!=typeof FileReader){var n=new FileReader;n.onloadend=function(){var e=n.result;e=o?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),s?s.location.href=e:location=e,s=null},n.readAsDataURL(e)}else{var l=jo.URL||jo.webkitURL,d=l.createObjectURL(e);s?s.location=d:location.href=d,s=null,setTimeout((function(){l.revokeObjectURL(d)}),4e4)}};class Wo{constructor(e,t){this.canvas=e,this.gl=t;const i=t.createShader(t.VERTEX_SHADER);if(t.shaderSource(i,"\n attribute vec2 xy;\n varying highp vec2 uv;\n void main(void) {\n gl_Position = vec4(xy, 0.0, 1.0);\n // Map vertex coordinates (-1 to +1) to UV coordinates (0 to 1).\n // UV coordinates are Y-flipped relative to vertex coordinates.\n uv = vec2((1.0 + xy.x) / 2.0, (1.0 - xy.y) / 2.0);\n }\n "),t.compileShader(i),!t.getShaderParameter(i,t.COMPILE_STATUS))throw t.getShaderInfoLog(i);const s=t.createShader(t.FRAGMENT_SHADER);if(t.shaderSource(s,"\n varying highp vec2 uv;\n uniform sampler2D texture;\n void main(void) {\n gl_FragColor = texture2D(texture, uv);\n }\n "),t.compileShader(s),!t.getShaderParameter(s,t.COMPILE_STATUS))throw t.getShaderInfoLog(s);const r=t.createProgram();if(t.attachShader(r,i),t.attachShader(r,s),t.linkProgram(r),!t.getProgramParameter(r,t.LINK_STATUS))throw t.getProgramInfoLog(r);t.useProgram(r);const a=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,a),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),t.STATIC_DRAW);const o=t.getAttribLocation(r,"xy");t.vertexAttribPointer(o,2,t.FLOAT,!1,0,0),t.enableVertexAttribArray(o);const n=t.createTexture();t.bindTexture(t.TEXTURE_2D,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),this.program=r,this.buffer=a,this.vertexShader=i,this.fragmentShader=s,this.texture=n}destroy(){this.gl.deleteProgram(this.program),this.gl.deleteBuffer(this.buffer),this.gl.deleteTexture(this.texture),this.gl.deleteShader(this.vertexShader),this.gl.deleteShader(this.fragmentShader),this.program=null,this.buffer=null,this.vertexShader=null,this.fragmentShader=null,this.texture=null}render(e){this.canvas.width=e.displayWidth,this.canvas.height=e.displayHeight;const t=this.gl;t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e),t.viewport(0,0,t.drawingBufferWidth,t.drawingBufferHeight),t.clearColor(1,0,0,1),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4)}}class Jo extends No{constructor(e){super(),this.player=e;const t=document.createElement("canvas");t.style.position="absolute",t.style.top=0,t.style.left=0,this.$videoElement=t,e.$container.appendChild(this.$videoElement),this.context2D=null,this.contextGl=null,this.webglRender=null,this.webglRectRender=null,this.webGPURender=null,this.isWebglContextLost=!1,this.isWcsWebgl2=!1,this.bitmaprenderer=null,this.renderType=null,this.controlHeight=0,this.proxyDestroyList=[],this._initCanvasRender()}destroy(){super.destroy(),this.proxyDestroyList.length>0&&(this.proxyDestroyList.forEach((e=>{e&&e()})),this.proxyDestroyList=[]),this.contextGl&&(this.contextGl=null),this.context2D&&(this.context2D=null),this.webglRender&&(this.webglRender.destroy(),this.webglRender=null),this.webglRectRender&&(this.webglRectRender.destroy(),this.webglRectRender=null),this.webGPURender&&(this.webGPURender.destroy(),this.webGPURender=null),this.bitmaprenderer&&(this.bitmaprenderer=null),this.renderType=null,this.isWebglContextLost=!1,this.videoInfo={width:"",height:"",encType:""},this.player.$container.removeChild(this.$videoElement),this.init=!1,this.off()}_initContext2D(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.context2D=this.$videoElement.getContext("2d",e)}_initContextGl(){if(this.player.events,this.contextGl=na(this.$videoElement),!this.contextGl)throw this.player.debug.error("CommonCanvasLoader","_initContextGl() createContextGL error"),new Error("CommonCanvasLoader and _initContextGl createContextGL error");this._bindContextGlEvents(),this.webglRender=new Uo(this.contextGl,this.player._opt.openWebglAlignment)}_initContextGl2(){if(this.contextGl=la(this.$videoElement),this.contextGl){this._bindContextGlEvents(2);try{this.webglRender=new Wo(this.$videoElement,this.contextGl)}catch(e){this.player.debug.error("CommonCanvasLoader",`create webgl2Render error is ${e} and next use context2d.draw render`),this.contextGl=null,this.webglRender=null,this._initContext2D()}}else this.player.debug.error("CommonCanvasLoader","_initContextGl2() createContextGL2 error")}_bindContextGlEvents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;const{proxy:t}=this.player.events,i=t(this.$videoElement,"webglcontextlost",(t=>{t.preventDefault(),this.player.debug.error("canvasVideo","webglcontextlost error",t),this.isWebglContextLost=!0,this.webglRender&&(this.player.debug.log("CommonCanvasLoader","webglcontextlost error and destroy webglRender"),this.webglRender.destroy(),this.webglRender=null),this.webglRectRender&&(this.player.debug.log("CommonCanvasLoader","webglcontextlost error and destroy webglRectRender"),this.webglRectRender.destroy(),this.webglRectRender=null),this.contextGl=null,setTimeout((()=>{if(this.player.debug.log("CommonCanvasLoader",`createContextGL() version ${e}`),1===e?this.contextGl=na(this.$videoElement):2===e&&(this.contextGl=la(this.$videoElement)),this.player.debug.log("CommonCanvasLoader","createContextGL success"),this.contextGl&&this.contextGl.getContextAttributes){const t=this.contextGl.getContextAttributes();t&&t.stencil?(1===e?this.webglRender=new Uo(this.contextGl,this.player._opt.openWebglAlignment):2===e&&(this.webglRender=new Wo(this.$videoElement,this.contextGl)),this.isWebglContextLost=!1,this.player.debug.log("CommonCanvasLoader","webglcontextlost error reset and getContextAttributes().stencil is true")):(this.player.debug.error("CommonCanvasLoader","webglcontextlost error, getContextAttributes().stencil is false"),this.player.emitError(ut.webglContextLostError))}else this.player.debug.error("CommonCanvasLoader","webglcontextlost error, getContextAttributes().stencil is false"),this.player.emitError(ut.webglContextLostError)}),500)})),s=t(this.$videoElement,"webglcontextrestored",(e=>{e.preventDefault(),this.player.debug.log("CommonCanvasLoader","webglcontextrestored ",e)}));this.proxyDestroyList.push(i,s)}_initContextGPU(){var t;(t=this.$videoElement,new Promise(((e,i)=>{navigator.gpu?navigator.gpu.requestAdapter().then((s=>{s?s.requestDevice().then((r=>{if(r){const a=t.getContext("webgpu");if(a){const t=navigator.gpu.getPreferredCanvasFormat();a.configure({device:r,format:t,alphaMode:"opaque"}),e({adapter:s,device:r,context:a,format:t})}else i('WebGPU "context" create fail')}else i('WebGPU "device" request fail')})).catch((e=>{i('WebGPU "adapter.requestDevice()" fail')})):i('WebGPU "adapter" request fail is empty')})).catch((e=>{i('WebGPU "navigator.gpu.requestAdapter()" fail')})):i("WebGPU not support!!")}))).then((t=>{t?(this.webGPURender=new Fo(t),this.player.debug.log("CommonCanvasLoader","webGPURender init success")):(this.player.debug.warn("CommonCanvasLoader",`createWebGPUContext error is ${e} and next use webgl render`),this.renderType=ii,this._initContextGl())})).catch((e=>{this.player.debug.warn("CommonCanvasLoader",`createWebGPUContext error is ${e} and next use webgl render`),this.renderType=ii,this._initContextGl()}))}initCanvasViewSize(){this.$videoElement.width=this.videoInfo.width,this.$videoElement.height=this.videoInfo.height,this.resize()}screenshot(e,t,i,s){e=e||ha(),s=s||yt.download;let r=.92;!qi[t]&&yt[t]&&(s=t,t="png",i=void 0),"string"==typeof i&&(s=i,i=void 0),void 0!==i&&(r=Number(i));const a=qi[t]||qi.png,o=this.$videoElement.toDataURL(a,r);if(s===yt.base64)return o;{const t=da(o);if(s===yt.blob)return t;if(s===yt.download){const i=a.split("/")[1];Vo(t,e+"."+i)}}}screenshotWatermark(e){return new Promise(((t,i)=>{Ya(e)&&(e={filename:e}),(e=e||{}).width=this.videoInfo.width,e.height=this.videoInfo.height,e.filename=e.filename||ha(),e.format=e.format?qi[e.format]:qi.png,e.quality=Number(e.quality)||.92,e.type=e.type||yt.download;const s=this.$videoElement.toDataURL(e.format,e.quality);Ga(s,e).then((i=>{if(e.type===yt.base64)t(s);else{const s=da(i);if(e.type===yt.blob)t(s);else if(e.type===yt.download){t();const i=e.format.split("/")[1];Vo(s,e.filename+"."+i)}}})).catch((e=>{i(e)}))}))}render(){}clearView(){super.clearView()}play(){}pause(){}_resize(){this.player.debug.log("canvasVideo","_resize()");const e=this.player._opt;let t=this.player.width,i=this.player.height;if(e.hasControl&&!e.controlAutoHide){const s=this.controlHeight;ya()&&this.player.fullscreen&&e.useWebFullScreen?t-=s:i-=s}let s=this.$videoElement.width,r=this.$videoElement.height;const a=e.rotate;let o=(t-s)/2,n=(i-r)/2;270!==a&&90!==a||(s=this.$videoElement.height,r=this.$videoElement.width);const l=t/s,d=i/r;let h=l>d?d:l;Ao(e.isResize)&&l!==d&&(h=l+","+d),e.isFullResize&&(h=l>d?l:d);let c="scale("+h+")";"none"===e.mirrorRotate&&a&&(c+=" rotate("+a+"deg)"),"level"===e.mirrorRotate?c+=" rotateY(180deg)":"vertical"===e.mirrorRotate&&(c+=" rotateX(180deg)"),this.$videoElement.style.height=this.videoInfo.height+"px",this.$videoElement.style.width=this.videoInfo.width+"px",this.$videoElement.style.padding="0",this.$videoElement.style.transform=c,this.$videoElement.style.left=o+"px",this.$videoElement.style.top=n+"px"}initFps(){}setStreamFps(e){}getStreamFps(){return 25}getType(){return W}getCanvasType(){let e=this.renderType===ri?ri:ii;return this.isWcsWebgl2&&(e=si),e}}class qo extends Jo{constructor(e){super(e),this.yuvList=[],this.controlHeight=Yt,this.tempTextCanvas=null,this.tempTextCanvasCtx=null,this.player.debug.log("CanvasVideo","init")}async destroy(){super.destroy(),this.yuvList=[],this.tempTextCanvas&&(this.tempTextCanvasCtx.clearRect(0,0,this.tempTextCanvas.width,this.tempTextCanvas.height),this.tempTextCanvas.width=0,this.tempTextCanvas.height=0,this.tempTextCanvas=null),this.player.debug.log("CanvasVideoLoader","destroy")}_initCanvasRender(){this.player._opt.useWCS&&!this._supportOffscreen()?(this.renderType=ti,To()&&this.player._opt.wcsUseWebgl2Render?(this._initContextGl2(),this.webglRender&&(this.isWcsWebgl2=!0)):this._initContext2D()):this.player._opt.useMSE&&this.player._opt.mseUseCanvasRender?(this.renderType=oi,this._initContext2D()):this.player.isOldHls()&&this.player._opt.useCanvasRender?(this.renderType=ni,this._initContext2D()):this.player.isWebrtcH264()&&this.player._opt.webrtcUseCanvasRender?(this.renderType=li,this._initContext2D()):this._supportOffscreen()?(this.renderType=ai,this._bindOffscreen()):this.player._opt.useWebGPU?(this.renderType=ri,this._initContextGPU()):(this.renderType=ii,this._initContextGl())}_supportOffscreen(){return"function"==typeof this.$videoElement.transferControlToOffscreen&&this.player._opt.useOffscreen}_bindOffscreen(){this.bitmaprenderer=this.$videoElement.getContext("bitmaprenderer")}render(e){this.yuvList.push(e),this.startRender()}startRender(){for(;!(this.yuvList.length<=0);){const e=this.yuvList.shift();this.doRender(e)}}doRender(e){if(this.renderType!==oi){const t={ts:e.ts||0,fps:!0};this.player.updateStats(t)}switch(this.renderType){case ai:this.bitmaprenderer.transferFromImageBitmap(e.buffer);break;case ii:case ri:if(this.isWebglContextLost)return void this.player.debug.warn("CanvasVideoLoader","doRender() and webgl context is lost");let t=e.output;if(this.player.faceDetectActive&&this.player.ai&&this.player.ai.faceDetector){null===this.prevAiFaceDetectTime&&(this.prevAiFaceDetectTime=ha());const i=ha();i-this.prevAiFaceDetectTime>=this.player._opt.aiFaceDetectInterval&&(t=this.player.ai.faceDetector.detect({width:this.$videoElement.width,height:this.$videoElement.height,data:e.output,ts:e.ts||0}),this.prevAiFaceDetectTime=i)}if(this.player.objectDetectActive&&this.player.ai&&this.player.ai.objectDetector){null===this.prevAiObjectDetectTime&&(this.prevAiObjectDetectTime=ha());const i=ha();i-this.prevAiObjectDetectTime>=this.player._opt.aiObjectDetectInterval&&(t=this.player.ai.objectDetector.detect({width:this.$videoElement.width,height:this.$videoElement.height,data:e.output,ts:e.ts||0}),this.prevAiObjectDetectTime=i)}if(this.player.occlusionDetectActive&&this.player.ai&&this.player.ai.occlusionDetector){null===this.prevAiOcclusionDetectTime&&(this.prevAiOcclusionDetectTime=ha());const t=ha();if(t-this.prevAiOcclusionDetectTime>=this.player._opt.aiOcclusionDetectInterval){const i=this.player.ai.occlusionDetector.check({width:this.$videoElement.width,height:this.$videoElement.height,data:e.output});this.prevAiOcclusionDetectTime=t,i&&this.player.emit(lt.aiOcclusionDetectResult,{ts:e.ts||0})}}if(this.player.imageDetectActive&&this.player.ai&&this.player.ai.imageDetector){const t=this.player.ai.imageDetector.check({width:this.$videoElement.width,height:this.$videoElement.height,data:e.output});if(t&&t.data&&(this.player.emit(lt.aiOcclusionDetectResult,{type:t.type,ts:e.ts||0}),this.player._opt.aiImageDetectDrop))return void this.player.debug.log("CanvasVideoLoader",`doRender() and ai image detect result type is ${t.type} and drop`)}if(this.renderType===ri)try{if(!this.webGPURender)return void this.player.debug.warn("CanvasVideoLoader","doRender webgpu render is not init");this.webGPURender.renderYUV(this.$videoElement.width,this.$videoElement.height,t)}catch(e){this.player.debug.error("CanvasVideoLoader",`doRender webgpu render and error: ${e.toString()}`)}else if(this.renderType===ii)try{this.webglRender.renderYUV(this.$videoElement.width,this.$videoElement.height,t)}catch(e){this.player.debug.error("CanvasVideoLoader",`doRender webgl render context is lost ${this.contextGl&&this.contextGl.isContextLost()} and error: ${e.toString()}`)}break;case ti:if(this.webglRender)this.webglRender.render(e.videoFrame),oo(e.videoFrame);else if(this.context2D)if(to(e.videoFrame.createImageBitmap))try{e.videoFrame.createImageBitmap().then((t=>{this.context2D.drawImage(t,0,0,this.$videoElement.width,this.$videoElement.height),oo(e.videoFrame)}))}catch(e){}else this.context2D.drawImage(e.videoFrame,0,0,this.$videoElement.width,this.$videoElement.height),oo(e.videoFrame);else this.player.debug.warn("CanvasVideoLoader","doRender() and webcodecs context is lost");break;case oi:case ni:case li:this.context2D.drawImage(e.$video,0,0,this.$videoElement.width,this.$videoElement.height)}let t=e.ts||0;this.renderType===oi&&(t=parseInt(1e3*e.$video.currentTime,10)+(this.player.mseDecoder.firstRenderTime||0)),this.player.updateCurrentPts(t),this.doAddContentToWatermark(),this.doAddAiContentToWatermark()}clearView(){switch(super.clearView(),this.renderType){case ai:(function(e,t){const i=document.createElement("canvas");i.width=e,i.height=t;const s=window.createImageBitmap(i,0,0,e,t);return i.width=0,i.height=0,s})(this.$videoElement.width,this.$videoElement.height).then((e=>{this.bitmaprenderer.transferFromImageBitmap(e)}));break;case ii:this.contextGl.clear(this.contextGl.COLOR_BUFFER_BIT);break;case ri:this.webGPURender.clear();break;case ti:this.contextGl?this.contextGl.clear(this.contextGl.COLOR_BUFFER_BIT):this.context2D&&this.context2D.clearRect(0,0,this.$videoElement.width,this.$videoElement.height);break;case oi:case ni:case li:this.context2D.clearRect(0,0,this.$videoElement.width,this.$videoElement.height)}}_initTempTextCanvas(){this.tempTextCanvas=document.createElement("canvas"),this.tempTextCanvasCtx=this.tempTextCanvas.getContext("2d"),this.tempTextCanvas.width=600,this.tempTextCanvas.height=20}doAddContentToCanvas(){this.tempContentList.length>0&&this.context2D&&function(e){let{ctx:t,list:i}=e;t.save(),(i||[]).forEach((e=>{"text"===e.type?(t.font=`${e.fontSize||12}px Arial`,t.fillStyle=e.color||"green",t.fillText(e.text,e.x,e.y)):"rect"===e.type&&(t.strokeStyle=e.color||"green",t.lineWidth=e.lineWidth||2,t.strokeRect(e.x,e.y,e.width,e.height))})),t.restore()}({ctx:this.context2D,list:this.tempContentList})}doAddContentToWebGlCanvas(){this.tempContentList.length>0&&this.contextGl&&this.webglRectRender&&this.tempContentList.forEach((e=>{const t=e.x,i=e.y;if("rect"===e.type){const r=e.width,a=e.height,o=(s=e.color||"#008000",[parseInt(s.substring(1,3),16)/255,parseInt(s.substring(3,5),16)/255,parseInt(s.substring(5,7),16)/255,1]),n=e.lineWidth||4;if(!r||!a)return;this.webglRectRender.drawBox({x:t,y:i,width:r,height:a,lineColor:o,lineWidth:n,canvasWidth:this.$videoElement.width,canvasHeight:this.$videoElement.height})}else if("text"===e.type){const s=e.text||"";if(!s)return;const r=e.fontSize||20,a=e.color||"#008000";this.tempTextCanvas||this._initTempTextCanvas(),this.tempTextCanvasCtx.clearRect(0,0,this.tempTextCanvas.width,this.tempTextCanvas.height),this.tempTextCanvasCtx.font=`${r}px Arial`,this.tempTextCanvasCtx.fillStyle=a,this.tempTextCanvasCtx.textBaseline="top",this.tempTextCanvasCtx.fillText(s,0,0),this.webglRender.drawDom(this.$videoElement.width,this.$videoElement.height,t,i,this.tempTextCanvas)}var s}))}}class Ko extends No{constructor(e){super(),this.player=e,this.TAG_NAME="Video";const t=document.createElement("video"),i=document.createElement("canvas");t.muted=!0,t.style.position="absolute",t.style.top=0,t.style.left=0,this._delayPlay=!1,e.$container.appendChild(t),this.$videoElement=t,this.$canvasElement=i,this.canvasContext=i.getContext("2d"),this.mediaStream=null,this.vwriter=null,e.canVideoTrackWritter()&&Pa()&&Ba()&&(this.trackGenerator=new MediaStreamTrackGenerator({kind:"video"}),this.mediaStream=new MediaStream([this.trackGenerator]),t.srcObject=this.mediaStream,this.vwriter=this.trackGenerator.writable.getWriter()),this.fixChromeVideoFlashBug(),this.fixMobileAutoFullscreen(),this.resize(),this.eventListenList=[],this.isRenderRetryPlaying=!1,this.isRenderRetryPlayingTimes=0,this.isRetryPlaying=!1,this.isRetryPlayingTimes=0,this.canplayReceived=!1,this.progressProxyDestroy=null,this.checkVideoCanplayTimeout=null;const s=ko();this.supportVideoFrameCallbackHandle=null;const{proxy:r}=this.player.events,a=r(this.$videoElement,"canplay",(()=>{this.player.debug.log("Video","canplay"),this.player.isDestroyedOrClosed()||(this.canplayReceived=!0,this._delayPlay?(this.clearCheckVideoCanplayTimeout(),this._play(),ko()?this.supportVideoFrameCallbackHandle||(this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this))):this.player.debug.warn("Video","not support requestVideoFrameCallback and use timeupdate event to update stats")):this.$videoElement.paused&&this.player.isMSEPlaybackRateChangePause&&(this.player.debug.log("Video",`canplay and video is paused and isMSEPlaybackRateChangePause is ${this.player.isMSEPlaybackRateChangePause} so next try to play`),this.player.isMSEPlaybackRateChangePause=!1,this.$videoElement.play()))})),o=r(this.$videoElement,"waiting",(()=>{this.player.debug.log("Video","waiting")})),n=r(this.$videoElement,"loadedmetadata",(()=>{this.player.debug.log("Video","loadedmetadata")})),l=r(this.$videoElement,"timeupdate",(t=>{if(!this.player.isDestroyedOrClosed()){if(Ao(s)){const t=parseInt(1e3*this.getCurrentTime(),10);(e.isWebrtcH264()||this.player.isOldHls()||this.player.isAliyunRtc())&&(this.player.emit(lt.timeUpdate,t),e.handleRender(),e.updateStats({fps:!0,ts:t,dts:t}))}this.player.isMseDecoderUseWorker()&&(this.player.decoderWorker.updateVideoTimestamp(this.getCurrentTime()),this._handleUpdatePlaybackRate())}})),d=r(this.$videoElement,"error",(()=>{let e={};if(this.player.isUseMSE()&&(e=this.player.getMseMineType()),this.player.debug.error("Video","Error Code "+this.$videoElement.error.code+" "+yr[this.$videoElement.error.code]+"; Details: "+this.$videoElement.error.message+"; Video Info: "+JSON.stringify(this.videoInfo)+"; Mse Mine Type: "+e.video+"; "),this.player.isUseMSE()){this.$videoElement.error.code;const e=this.$videoElement.error.message;-1!==e.indexOf(Ar)&&(this.player.isMSEVideoDecoderInitializationFailedNotSupportHevc=!0),-1!==e.indexOf(br)&&(this.player.isMSEAudioDecoderError=!0)}this.player.isHlsCanVideoPlay()})),h=r(this.$videoElement,"stalled",(()=>{this._detectAndFixStuckPlayback(!0)}));if(this.progressProxyDestroy=r(this.$videoElement,"progress",(()=>{this._detectAndFixStuckPlayback()})),this.eventListenList.push(a,o,l,d,n,h),this.player.isUseMSE()){const e=r(this.$videoElement,rs,(()=>{this.player.debug.log(this.TAG_NAME,"video playback Rate change",this.$videoElement&&this.$videoElement.playbackRate),this.$videoElement&&this.$videoElement.paused&&(this.player.debug.warn(this.TAG_NAME,"ratechange and video is paused and sent isMSEPlaybackRateChangePause true"),this.player.isMSEPlaybackRateChangePause=!0)}));this.eventListenList.push(e),this.player.on(lt.visibilityChange,(e=>{e&&setTimeout((()=>{if(this.player.isPlaying()&&this.$videoElement){const e=this.getVideoBufferLastTime();e-this.$videoElement.currentTime>this.getBufferMaxDelayTime()&&(this.player.debug.log(this.TAG_NAME,`visibilityChange is true and lastTime is ${e} and currentTime is ${this.$videoElement.currentTime} so set currentTime to lastTime`),this.$videoElement.currentTime=e)}}),300)}))}this.player.debug.log("Video","init")}async destroy(){if(super.destroy(),this.clearCheckVideoCanplayTimeout(),this._cancelVideoFrameCallback(),this._removeProgressProxyDestroy(),this.eventListenList.length&&(this.eventListenList.forEach((e=>{e()})),this.eventListenList=[]),this.isRenderRetryPlaying=!1,this.isRenderRetryPlayingTimes=0,this.isRetryPlaying=!1,this.isRetryPlayingTimes=0,this.canplayReceived=!1,this.player._opt.videoRenderSupportScale&&this._isNeedAddBackDropFilter()){const e=this.player.$container;e.style.backdropFilter="none",e.style.transform="none"}if(this.$canvasElement.height=0,this.$canvasElement.width=0,this.$canvasElement=null,this.canvasContext=null,this.$videoElement){this.$videoElement.pause(),this.$videoElement.currentTime=0,this.$videoElement.srcObject&&(this.$videoElement.srcObject=null,this.$videoElement.removeAttribute("srcObject")),this.$videoElement.src&&(this.$videoElement.src="",this.$videoElement.removeAttribute("src"));try{this.$videoElement.load()}catch(e){}this.player.$container.removeChild(this.$videoElement),this.$videoElement=null}this.trackGenerator&&(this.trackGenerator.stop(),this.trackGenerator=null),this.vwriter&&(await this.vwriter.close(),this.vwriter=null),this._delayPlay=!1,this.mediaStream&&(this.mediaStream.getTracks().forEach((e=>e.stop())),this.mediaStream=null),this.off(),this.player.debug.log("Video","destroy")}videoFrameCallback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.player.isDestroyedOrClosed())return void this.player.debug.log("Video","videoFrameCallback() and isDestroyedOrClosed and return");this.player.handleRender();const i=parseInt(1e3*Math.max(t.mediaTime,this.getCurrentTime()),10)||0;if(this.player.isUseHls265UseMse())this.player.updateStats({fps:!0,ts:i});else if(this.player.isMseDecoderUseWorker()){this.player._times.videoStart||(this.player._times.videoStart=ha(),this.player.handlePlayToRenderTimes());const e=i+(this.player._mseWorkerData.firstRenderTime||0);if(this.player.updateStats({fps:!0,dfps:!0,ts:e,mseTs:i}),this.player.emit(lt.timeUpdate,e),Ao(this.getHasInit())&&t.width&&t.height){const e={width:t.width,height:t.height};this.updateVideoInfo(e),this.initCanvasViewSize()}}if(this.player.isWebrtcH264()||this.player.isOldHls()||this.player.isAliyunRtc()){if(this.player.emit(lt.timeUpdate,i),Ao(this.getHasInit())&&t.width&&t.height){const e={width:t.width,height:t.height};this.videoInfo.encTypeCode||this.player.isOldHls()||(e.encTypeCode=vt),this.updateVideoInfo(e)}this.player.updateStats({fps:!0,ts:i,dts:i}),this.player.updateCurrentPts(i),this.doAddContentToWatermark()}else if(yo(this.player._opt.useMSE)&&Ao(this.player._opt.mseUseCanvasRender)){if(this.player.mseDecoder){let e=parseInt(1e3*Math.max(t.mediaTime,this.getCurrentTime()),10)+(this.player.mseDecoder.firstRenderTime||0);this.player.updateCurrentPts(e)}else if(this.player._opt.mseDecoderUseWorker){let e=parseInt(1e3*Math.max(t.mediaTime,this.getCurrentTime()),10)+(this.player._mseWorkerData.firstRenderTime||0);this.player.updateCurrentPts(e)}this.doAddContentToWatermark()}this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this))}fixChromeVideoFlashBug(){if(this.player._opt.videoRenderSupportScale&&this._isNeedAddBackDropFilter()){const e=this.player.$container;e.style.backdropFilter="blur(0px)",e.style.transform="translateZ(0)"}}fixMobileAutoFullscreen(){const e=wa(),t=ba();(e||t)&&(this.player.debug.log("Video",`fixMobileAutoFullscreen and isIOS ${e} and isAndroid ${t}`),this.$videoElement.setAttribute("webkit-playsinline","true"),this.$videoElement.setAttribute("playsinline","true"),this.$videoElement.setAttribute("x5-video-player-type","h5-page"))}_detectAndFixStuckPlayback(e){const t=this.$videoElement,i=t.buffered,s=t.readyState;this.player.debug.log(this.TAG_NAME,`_detectAndFixStuckPlayback() and isStalled is ${e} ,canplayReceived is ${this.canplayReceived} ,videoReadyState is ${s}`),e||Ao(this.canplayReceived)||s<2?i.length>0&&t.currentTime<i.start(0)&&(this.player.debug.warn(this.TAG_NAME,`_detectAndFixStuckPlayback() and video is stuck and currentTime is ${t.currentTime} ,seek to ${i.start(0)}`),t.currentTime=i.start(0),this._removeProgressProxyDestroy()):this._removeProgressProxyDestroy()}_removeProgressProxyDestroy(){this.progressProxyDestroy&&(this.player.debug.log(this.TAG_NAME,"_removeProgressProxyDestroy()"),this.progressProxyDestroy(),this.progressProxyDestroy=null)}_isNeedAddBackDropFilter(){const e=va().type.toLowerCase();return"chrome"===e||"edge"===e}isPaused(){let e=!0;return this.$videoElement&&(e=this.$videoElement.paused),e}isPause(){return this.isPaused()}_getVideoReadyState(){let e=0;return this.$videoElement&&(e=this.$videoElement.readyState),e}_getVideoCurrentTime(){let e=0;return this.$videoElement&&(e=this.$videoElement.currentTime),e}play(){if(this.$videoElement){const e=this._getVideoReadyState();if(this.player.debug.log("Video",`play and readyState: ${e}`),0===e)return this.player.debug.log("Video","readyState is 0 and set _delayPlay to true and listen canplay event to play"),this._delayPlay=!0,void(null===this.checkVideoCanplayTimeout&&(this.checkVideoCanplayTimeout=setTimeout((()=>{if(this.clearCheckVideoCanplayTimeout(),!this.player.isDestroyedOrClosed()&&Ao(this.isPlaying())){const e=this._getBufferStore();this.player.debug.warn("Video",`checkVideoCanplayTimeout and video is not playing and buffer store is ${e} and retry play`),this.$videoElement.currentTime=e,this._replay()}}),1e3)));this._play()}}_play(){this.$videoElement&&this.$videoElement.play().then((()=>{this._delayPlay=!1,this.player.debug.log("Video","_play success"),this.isPlaying()?(this.player.emit(lt.removeLoadingBgImage),this.isRetryPlayingTimes=0,this.isRetryPlaying=!1):setTimeout((()=>{this._replay()}),100)})).catch((e=>{this.player.isDestroyedOrClosed()?this.player.debug.log("Video","_play error and player is isDestroyedOrClosed and return"):(this.player.debug.error("Video","_play error",e),this.isRetryPlaying=!1,setTimeout((()=>{this._replay()}),100))}))}_replay(){if(!this.isPlaying()&&Ao(this.player.isDestroyedOrClosed())&&Ao(this.isRetryPlaying)){if(this.isRetryPlaying=!0,this.isRetryPlayingTimes>=3)return void(this.player.isWebrtcH264()?(this.player.debug.error("Video",`_replay(webrtc H264) then but not playing and retry play times is ${this.isRetryPlayingTimes} and emit error`),this.player.emitError(ut.videoElementPlayingFailedForWebrtc)):(this.player.debug.error("Video",`_replay then but not playing and retry play times is ${this.isRetryPlayingTimes} and emit error to use canvas render`),this.player.emitError(ut.videoElementPlayingFailed)));this.player.debug.warn("Video",`_play then but not playing and retry play and isRetryPlayingTimes is ${this.isRetryPlayingTimes}`),this._play(),this.isRetryPlayingTimes++}else this.player.debug.log("Video",`_replay() and isPlaying is ${this.isPlaying()} and isRetryPlaying is ${this.isRetryPlaying} and isDestroyedOrClosed is ${this.player.isDestroyedOrClosed()} and return;`)}pause(e){this.player.debug.log(this.TAG_NAME,"pause and isNow is "+e),this.isPlaying()&&(e?(this.$videoElement&&this.$videoElement.pause(),this._cancelVideoFrameCallback()):setTimeout((()=>{this.$videoElement&&this.$videoElement.pause(),this._cancelVideoFrameCallback()}),100))}clearView(){super.clearView(),this.$videoElement&&(this.$videoElement.pause(),this.$videoElement.currentTime=0,this.$videoElement.src&&(this.$videoElement.src="",this.$videoElement.removeAttribute("src")),this.$videoElement.srcObject&&(this.$videoElement.srcObject=null,this.$videoElement.removeAttribute("srcObject")))}screenshot(e,t,i,s){if(!this._canScreenshot())return this.player.debug.warn("Video",`screenshot failed, video is not ready and stats is ${this._getVideoReadyState()}`),null;e=e||ha(),s=s||yt.download;let r=.92;!qi[t]&&yt[t]&&(s=t,t="png",i=void 0),"string"==typeof i&&(s=i,i=void 0),void 0!==i&&(r=Number(i));const a=this.$videoElement;let o=this.$canvasElement;o.width=a.videoWidth,o.height=a.videoHeight,this.canvasContext.drawImage(a,0,0,o.width,o.height);const n=qi[t]||qi.png,l=o.toDataURL(n,r);if(this.canvasContext.clearRect(0,0,o.width,o.height),o.width=0,o.height=0,s===yt.base64)return l;{const t=da(l);if(s===yt.blob)return t;if(s===yt.download){const i=n.split("/")[1];Vo(t,e+"."+i)}}}screenshotWatermark(e){return new Promise(((t,i)=>{if(Ya(e)&&(e={filename:e}),!this._canScreenshot())return this.player.debug.warn("Video","screenshot failed, video is not ready"),i("screenshot failed, video is not ready");const s=this.$videoElement;(e=e||{}).width=s.videoWidth,e.height=s.videoHeight,e.filename=e.filename||ha(),e.format=e.format?qi[e.format]:qi.png,e.quality=Number(e.quality)||.92,e.type=e.type||yt.download;let r=this.$canvasElement;r.width=s.videoWidth,r.height=s.videoHeight,this.canvasContext.drawImage(s,0,0,r.width,r.height);const a=r.toDataURL(e.format,e.quality);this.canvasContext.clearRect(0,0,r.width,r.height),r.width=0,r.height=0,Ga(a,e).then((i=>{if(e.type===yt.base64)t(a);else{const s=da(i);if(e.type===yt.blob)t(s);else if(e.type===yt.download){t();const i=e.format.split("/")[1];Vo(s,e.filename+"."+i)}}})).catch((e=>{i(e)}))}))}initCanvasViewSize(){this.resize()}clear(){const e=this.$videoElement,t=e.buffered,i=t.length?t.end(t.length-1):0;e.currentTime=i}render(e){if(this.vwriter){if(this.$videoElement.srcObject||(this.$videoElement.srcObject=this.mediaStream),this.isPaused()){const e=this._getVideoReadyState();if(this.player.debug.warn("Video","render() error, video is paused and readyState is "+e),4===e&&Ao(this.isRenderRetryPlaying)){if(this.isRenderRetryPlaying=!0,this.isRenderRetryPlayingTimes>3)return this.player.debug.error("Video","render() error, video is paused and readyState is "+e+", retry times is "+this.isRenderRetryPlayingTimes+", emit error and use canvas render"),void this.player.emitError(ut.videoElementPlayingFailed);this.$videoElement.play().then((()=>{this.isRenderRetryPlayingTimes=0,this.isRenderRetryPlaying=!1,this.player.debug.log("Video","render() video is paused and replay success")})).catch((e=>{this.isRenderRetryPlaying=!1,this.isRenderRetryPlayingTimes++,this.player.debug.warn("Video","render() error, video is paused and replay error ",e)}))}}if(this.player.updateStats({fps:!0,ts:e.ts||0}),e.videoFrame)this.vwriter.write(e.videoFrame),oo(e.videoFrame);else if(e.output){let s=e.output;if(this.player.faceDetectActive&&this.player.ai&&this.player.ai.faceDetector){null===this.prevAiFaceDetectTime&&(this.prevAiFaceDetectTime=ha());const t=ha();t-this.prevAiFaceDetectTime>this.player._opt.aiFaceDetectInterval&&(s=this.player.ai.faceDetector.detect({width:this.videoInfo.width,height:this.videoInfo.height,data:e.output,ts:e.ts||0}),this.prevAiFaceDetectTime=t)}if(this.player.objectDetectActive&&this.player.ai&&this.player.ai.objectDetector){null===this.prevAiObjectDetectTime&&(this.prevAiObjectDetectTime=ha());const t=ha();t-this.prevAiObjectDetectTime>this.player._opt.aiObjectDetectInterval&&(s=this.player.ai.objectDetector.detect({width:this.videoInfo.width,height:this.videoInfo.height,data:e.output,ts:e.ts||0}),this.prevAiObjectDetectTime=t)}if(this.player.occlusionDetectActive&&this.player.ai&&this.player.ai.occlusionDetector){null===this.prevAiOcclusionDetectTime&&(this.prevAiOcclusionDetectTime=ha());const t=ha();if(t-this.prevAiOcclusionDetectTime>=this.player._opt.aiOcclusionDetectInterval){const i=this.player.ai.occlusionDetector.check({width:this.videoInfo.width,height:this.videoInfo.height,data:e.output,ts:e.ts||0});this.prevAiOcclusionDetectTime=t,i&&(this.player.debug.log("Video","render() and ai occlusion detect result is true"),this.player.emit(lt.aiOcclusionDetectResult,{ts:e.ts||0}))}}if(this.player.imageDetectActive&&this.player.ai&&this.player.ai.imageDetector){const t=this.player.ai.imageDetector.check({width:this.videoInfo.width,height:this.videoInfo.height,data:e.output,ts:e.ts||0});if(t&&t.data&&(this.player.emit(lt.aiOcclusionDetectResult,{type:t.type,ts:e.ts||0}),this.player._opt.aiImageDetectDrop))return void this.player.debug.log("Video",`render() and ai image detect result type is ${t.type} and drop`)}try{const r=(t=s,i={format:"I420",codedWidth:this.videoInfo.width,codedHeight:this.videoInfo.height,timestamp:e.ts},new VideoFrame(t,i));this.vwriter.write(r),oo(r)}catch(e){this.player.debug.error("Video","render error",e),this.player.emitError(ut.wasmUseVideoRenderError,e)}}this.player.updateCurrentPts(e.ts||0),this.doAddContentToWatermark(),this.doAddAiContentToWatermark()}else this.player.debug.warn("Video","render and this.vwriter is null");var t,i}_resize(){this.player.debug.log("Video","_resize()");let e=this.player.width,t=this.player.height;const i=this.player._opt,s=i.rotate;if(i.hasControl&&!i.controlAutoHide){const s=i.playType===w?Qt:Yt;ya()&&this.player.fullscreen&&i.useWebFullScreen?e-=s:t-=s}this.$videoElement.width=e,this.$videoElement.height=t,this.$videoElement.style.width=e+"px",this.$videoElement.style.height=t+"px",270!==s&&90!==s||(this.$videoElement.width=t,this.$videoElement.height=e,this.$videoElement.style.width=t+"px",this.$videoElement.style.height=e+"px");let r=(e-this.$videoElement.width)/2,a=(t-this.$videoElement.height)/2,o="contain";Ao(i.isResize)&&(o="fill"),i.isFullResize&&(o="none");let n="";"none"===i.mirrorRotate&&s&&(n+=" rotate("+s+"deg)"),"level"===i.mirrorRotate?n+=" rotateY(180deg)":"vertical"===i.mirrorRotate&&(n+=" rotateX(180deg)"),this.player._opt.videoRenderSupportScale&&(this.$videoElement.style.objectFit=o),this.$videoElement.style.transform=n,this.$videoElement.style.padding="0",this.$videoElement.style.left=r+"px",this.$videoElement.style.top=a+"px"}getType(){return J}getCurrentTime(){return this.$videoElement.currentTime}isPlaying(){return this.$videoElement&&Ao(this.$videoElement.paused)&&Ao(this.$videoElement.ended)&&0!==this.$videoElement.playbackRate&&0!==this.$videoElement.readyState}_canScreenshot(){return this.$videoElement&&this.$videoElement.readyState>=1}getPlaybackQuality(){let e=null;if(this.$videoElement){if(to(this.$videoElement.getVideoPlaybackQuality)){const t=this.$videoElement.getVideoPlaybackQuality();e={droppedVideoFrames:t.droppedVideoFrames||t.corruptedVideoFrames,totalVideoFrames:t.totalVideoFrames,creationTime:t.creationTime}}else e={droppedVideoFrames:this.$videoElement.webkitDroppedFrameCount,totalVideoFrames:this.$videoElement.webkitDecodedFrameCount,creationTime:ha()};e&&(e.renderedVideoFrames=e.totalVideoFrames-e.droppedVideoFrames)}return e}setRate(e){this.$videoElement&&(this.$videoElement.playbackRate=e)}get rate(){let e=1;return this.$videoElement&&(e=this.$videoElement.playbackRate),e}clearCheckVideoCanplayTimeout(){this.checkVideoCanplayTimeout&&(clearTimeout(this.checkVideoCanplayTimeout),this.checkVideoCanplayTimeout=null)}_cancelVideoFrameCallback(){this.supportVideoFrameCallbackHandle&&this.$videoElement&&(this.$videoElement.cancelVideoFrameCallback(this.supportVideoFrameCallbackHandle),this.supportVideoFrameCallbackHandle=null)}_getBufferStore(){const e=this.$videoElement;let t=0;return e.buffered.length>0&&(t=e.buffered.start(0)),t}_handleUpdatePlaybackRate(){const e=this.$videoElement,t=e.buffered;t.length&&t.start(0);const i=t.length?t.end(t.length-1):0;let s=e.currentTime;const r=i-s,a=this.getBufferMaxDelayTime();if(this.player.updateStats({mseVideoBufferDelayTime:r}),r>a)this.player.debug.log(this.TAG_NAME,`handleUpdatePlaybackRate and buffered is ${i} and current is ${s} , delay buffer is more than ${a} is ${r} and new time is ${i}`),e.currentTime=i,s=e.currentTime;else if(r<0){if(this.player.debug.warn(this.TAG_NAME,`handleUpdatePlaybackRate and delay buffer is ${i} - current is ${s} = ${r} < 0 and check video is paused : ${e.paused} `),0===i)return void this.player.emit(ut.mediaSourceBufferedIsZeroError,"video.buffered is empty");e.paused&&e.play()}const o=this._getPlaybackRate(i-s);e.playbackRate!==o&&(this.player.debug.log(this.TAG_NAME,`handleUpdatePlaybackRate and buffered is ${i} and current time is ${s} and delay is ${i-s} set playbackRate is ${o} `),e.playbackRate=o)}_getPlaybackRate(e){const t=this.$videoElement;let i=this.player._opt.videoBufferDelay+this.player._opt.videoBuffer;const s=Math.max(i,1e3),r=s/2;return e*=1e3,1===t.playbackRate?e>s?1.2:1:e<=r?1:t.playbackRate}getVideoCurrentTime(){let e=0;return this.$videoElement&&(e=this.$videoElement.currentTime),e}getVideoBufferLastTime(){const e=this.$videoElement;let t=0;if(e){const i=e.buffered;i.length&&i.start(0);t=i.length?i.end(i.length-1):0}return t}getVideoBufferDelayTime(){const e=this.$videoElement;const t=this.getVideoBufferLastTime()-e.currentTime;return t>0?t:0}checkSourceBufferDelay(){const e=this.$videoElement;let t=0,i=0;return e.buffered.length>0&&(i=e.buffered.end(e.buffered.length-1),t=i-e.currentTime),t<0&&(this.player.debug.warn(this.TAG_NAME,`checkVideoSourceBufferDelay ${t} < 0, and buffered is ${i} ,currentTime is ${e.currentTime} , try to seek ${e.currentTime} to ${i}`),e.currentTime=i,t=0),t}checkSourceBufferStore(){const e=this.$videoElement;let t=0;return e.buffered.length>0&&(t=e.currentTime-e.buffered.start(0)),t}getDecodePlaybackRate(){let e=0;const t=this.$videoElement;return t&&(e=t.playbackRate),e}getBufferMaxDelayTime(){let e=(this.player._opt.videoBuffer+this.player._opt.videoBufferDelay)/1e3;return Math.max(5,e+3)}getReadyStateInited(){return this._getVideoReadyState()>=1}}class Yo extends Jo{constructor(e){super(e),this.controlHeight=Qt,this.bufferList=[],this.playing=!1,this.playInterval=null,this.fps=1,this.preFps=1,this.streamFps=0,this.playbackRate=1,this._firstTimestamp=null,this._renderFps=0,this._startfpsTime=null,this._startFpsTimestamp=null,this._hasCalcFps=!1,this.player.on(lt.playbackPause,(e=>{e?(this.pause(),this.player.playback.isPlaybackPauseClearCache&&this.clear()):this.resume()})),this.player.debug.log("CanvasPlaybackLoader","init")}async destroy(){this._stopSync(),this._firstTimestamp=null,this.playing=!1,this.playbackRate=1,this.fps=1,this.preFps=1,this.bufferList=[],this._renderFps=0,this._startfpsTime=null,this._startFpsTimestamp=null,this._hasCalcFps=!1,super.destroy(),this.player.debug.log("CanvasPlaybackLoader","destroy")}_initCanvasRender(){this.player._opt.useWCS?(this.renderType=ti,To()&&this.player._opt.wcsUseWebgl2Render?(this._initContextGl2(),this.webglRender&&(this.isWcsWebgl2=!0)):this._initContext2D()):this.player._opt.useWebGPU?(this.renderType=ri,this._initContextGPU()):(this.renderType=ii,this._initContextGl())}_sync(){this._stopSync(),this._doPlay(),this.playInterval=setInterval((()=>{this._doPlay()}),this.fragDuration)}_doPlay(){if(this.bufferList.length>0&&!this.player.seeking){const e=this.bufferList.shift();e&&e.buffer&&(this._doRender(e.buffer),this.player.handleRender(),this.player.playback.updateStats({ts:e.ts,tfTs:e.tfTs}))}}_stopSync(){this.playInterval&&(clearInterval(this.playInterval),this.playInterval=null)}_doRender(e){if(this.player._opt.useWCS)if(this.webglRender)this.webglRender.render(e),oo(e);else if(to(e.createImageBitmap))try{e.createImageBitmap().then((t=>{this.context2D.drawImage(t,0,0,this.$videoElement.width,this.$videoElement.height),oo(e)}))}catch(e){}else this.context2D.drawImage(e,0,0,this.$videoElement.width,this.$videoElement.height),oo(e);else if(this.getCanvasType()===ii)try{this.webglRender.renderYUV(this.$videoElement.width,this.$videoElement.height,e)}catch(e){this.player.debug.error("CanvasPlaybackLoader",`doRender webgl render context is lost ${this.contextGl&&this.contextGl.isContextLost()} and error: ${e.toString()}`)}else if(this.getCanvasType()===ri)try{if(!this.webGPURender)return void this.player.debug.warn("CanvasVideoLoader","doRender webgpu render is not init");this.webGPURender.renderYUV(this.$videoElement.width,this.$videoElement.height,e)}catch(e){this.player.debug.error("CanvasPlaybackLoader",`doRender webgpu render and error: ${e.toString()}`)}}get rate(){return this.playbackRate}get fragDuration(){return Math.ceil(1e3/(this.fps*this.playbackRate))}get bufferSize(){return this.bufferList.length}getStreamFps(){return this.streamFps}initFps(){this._hasCalcFps?this.player.debug.log("CanvasPlaybackLoader","initFps, has calc fps"):(this.preFps=ca(this.player.playback.fps,1,100),this.fps=this.preFps)}setFps(e){e!==this.fps?(e>100&&this.player.debug.warn("CanvasPlaybackLoader","setFps max",e),e<0&&this.player.debug.warn("CanvasPlaybackLoader","setFps min",e),this.fps=ca(e,1,100),this.player.debug.log("CanvasPlaybackLoader",`setFps ${this.preFps} -> ${this.fps}`),this.player.playback.isUseFpsRender&&this._sync()):this.player.debug.log("CanvasPlaybackLoader",`setFps, same fps ${e}`)}setStreamFps(e){this.player.debug.log("CanvasPlaybackLoader","setStreamFps",e),this._hasCalcFps=!0,this.streamFps=e,this.preFps=e,this.setFps(e)}setRate(e){e!==this.playbackRate&&(this.playbackRate=e,this.player.playback.isUseFpsRender&&this._sync())}render$2(e){null===this._firstTimestamp&&(this._firstTimestamp=e.ts);const t={tfTs:e.ts-this._firstTimestamp,ts:e.ts};e.videoFrame?t.buffer=e.videoFrame:t.buffer=e.output,this.bufferList.push(t),this.startRender(),this.player.handleRender(),this.player.playback.updateStats({ts:e.ts,tfTs:t.tfTs})}startRender(){for(;!(this.bufferList.length<=0);){const e=this.bufferList.shift();this._doRender(e.buffer)}}pushData(e){null===this._firstTimestamp&&(this._firstTimestamp=e.ts);const t={tfTs:e.ts-this._firstTimestamp,ts:e.ts};e.videoFrame?t.buffer=e.videoFrame:t.buffer=e.output;const i=this.player._opt.playbackConfig.isCacheBeforeDecodeForFpsRender;if(i||this.bufferSize>this.fps*this.playbackRate*2&&(this.player.debug.warn("CanvasPlaybackLoader",`buffer size is ${this.bufferSize}`),this._doPlay()),this.bufferList.push(t),!this._hasCalcFps){const e=ho(this.bufferList);null!==e&&e!==this.preFps&&(this.player.debug.log("CanvasPlaybackLoader",`calc fps is ${e} pre fps is ${this.preFps} and updatePreFps`),this.setStreamFps(e))}if(!i){const e=this.bufferList.length,t=e/(this.fps*this.playbackRate);this.player.debug.log("CanvasPlaybackLoader","rate is",t),t<=1?this.setFps(this.preFps):(this.setFps(this.fps+Math.floor(t*this.playbackRate)),this.player.debug.warn("CanvasPlaybackLoader","rate is",t,"fps is",this.fps,"bufferListLength is",e))}}initVideo(){this.player.playback&&this.player.playback.isUseFpsRender&&this._sync(),this.playing=!0}initVideoDelay(){const e=this.player._opt.playbackDelayTime;e>0?this.delayTimeout=setTimeout((()=>{this.initVideo()}),e):this.initVideo()}clearView(){super.clearView(),this.contextGl.clear(this.contextGl.COLOR_BUFFER_BIT)}clear(){this.player._opt.useWCS&&this.bufferList.forEach((e=>{e.buffer&&oo(e.buffer)})),this.bufferList=[]}resume(){this.player.playback.isUseFpsRender&&this._sync(),this.playing=!0}pause(){this.player.playback.isUseFpsRender&&this._stopSync(),this.playing=!1}}class Qo{constructor(e){return new(Qo.getLoaderFactory(e._opt))(e)}static getLoaderFactory(e){return e.useMSE?e.mseUseCanvasRender?qo:Ko:e.isHls&&Ao(e.supportHls265)||e.isWebrtc&&Ao(e.isWebrtcH265)?e.useCanvasRender?qo:Ko:e.isAliyunRtc?Ko:e.useWCS?e.playType===w?Yo:!e.useOffscreen&&e.wcsUseVideoRender?Ko:qo:e.playType===w?Yo:e.wasmUseVideoRender&&!e.useOffscreen?Ko:qo}}class Xo extends a{constructor(e){super(),this.bufferList=[],this.player=e,this.$audio=null,this.scriptNode=null,this.workletProcessorNode=null,this.workletWorkerCloseTimeout=null,this.hasInitScriptNode=!1,this.audioContext=new(window.AudioContext||window.webkitAudioContext)({sampleRate:48e3}),this.gainNode=this.audioContext.createGain();const t=this.audioContext.createBufferSource();t.buffer=this.audioContext.createBuffer(1,1,22050),t.connect(this.audioContext.destination),t.noteOn?t.noteOn(0):t.start(0),this.audioBufferSourceNode=t,this.mediaStreamAudioDestinationNode=this.audioContext.createMediaStreamDestination(),this.gainNode.gain.value=0,this._prevVolume=null,this.playing=!1,this.audioInfo={encTypeCode:"",encType:"",channels:"",sampleRate:"",depth:""},this.init=!1,this.hasAudio=!1,this.audioResumeStateTimeout=null}async destroy(){return this.closeAudio(),this.resetInit(),this.clearAudioResumeStateTimeout(),this.audioContext&&(await this.audioContext.close(),this.audioContext=null),this.gainNode&&(this.gainNode.disconnect(),this.gainNode=null),this.hasAudio=!1,this.playing=!1,this.scriptNode&&(this.scriptNode.disconnect(),this.scriptNode.onaudioprocess=oa,this.scriptNode=null),await this._destroyWorklet(),this.workletProcessorNode&&(this.workletProcessorNode.disconnect(),this.workletProcessorNode.port.onmessage=oa,this.workletProcessorNode=null),this.audioBufferSourceNode&&(this.audioBufferSourceNode.stop(),this.audioBufferSourceNode=null),this.mediaStreamAudioDestinationNode&&(this.mediaStreamAudioDestinationNode.disconnect(),this.mediaStreamAudioDestinationNode=null),this.hasInitScriptNode=!1,this._prevVolume=null,this.off(),!0}_destroyWorklet(){return new Promise(((e,t)=>{this.workletProcessorNode?(this.workletProcessorNode.port.postMessage({type:"destroy"}),this.workletWorkerCloseTimeout=setTimeout((()=>{this.player.debug.log(this.TAG_NAME,"send close and wait 10ms destroy directly"),this.workletWorkerCloseTimeout&&(clearTimeout(this.workletWorkerCloseTimeout),this.workletWorkerCloseTimeout=null),e()}),10)):e()}))}resetInit(){this.audioInfo={encTypeCode:"",encType:"",channels:"",sampleRate:"",depth:""},this.init=!1}getAudioInfo(){return this.audioInfo}updateAudioInfo(e){e.encTypeCode&&(this.audioInfo.encTypeCode=e.encTypeCode,this.audioInfo.encType=xt[e.encTypeCode]),e.channels&&(this.audioInfo.channels=e.channels),e.sampleRate&&(this.audioInfo.sampleRate=e.sampleRate),e.depth&&(this.audioInfo.depth=e.depth),this.audioInfo.sampleRate&&this.audioInfo.channels&&this.audioInfo.encType&&!this.init&&(this.player.emit(lt.audioInfo,this.audioInfo),this.init=!0)}get isPlaying(){return this.playing}get isMute(){return 0===this.gainNode.gain.value}get volume(){return this.gainNode.gain.value}get bufferSize(){return this.bufferList.length}get audioContextState(){let e=null;return this.audioContext&&(e=this.audioContext.state),e}initScriptNode(){}initMobileScriptNode(){}initWorkletScriptNode(){}getEngineType(){return""}mute(e){e?(this.setVolume(0),this.clear()):this.setVolume(this.player.lastVolume||.5)}setVolume(e){e=parseFloat(e).toFixed(2),isNaN(e)||(this.audioEnabled(!0),e=ca(e,0,1),null===this._prevVolume?this.player.emit(lt.mute,0===e):0===this._prevVolume&&e>0?this.player.emit(lt.mute,!1):this._prevVolume>0&&0===e&&this.player.emit(lt.mute,!0),this.gainNode.gain.value=e,this.player.emit(lt.volumechange,this.player.volume),this.player.emit(lt.volume,this.player.volume),this._prevVolume=e)}closeAudio(){this.hasInitScriptNode&&(this.scriptNode&&this.scriptNode.disconnect(this.gainNode),this.workletProcessorNode&&this.workletProcessorNode.disconnect(this.gainNode),this.gainNode&&(this.gainNode.disconnect(this.mediaStreamAudioDestinationNode),this.$audio||this.gainNode.disconnect(this.audioContext.destination))),this.clear()}audioEnabled(e){e?this.isStateSuspended()&&(this.audioContext.resume().then((()=>{this.player.emit(lt.audioResumeState,{state:this.audioContextState,isRunning:this.isStateRunning()})})),this.audioResumeStateTimeout=setTimeout((()=>{this.clearAudioResumeStateTimeout(),this.isStateSuspended()&&this.player.emit(lt.audioResumeState,{state:this.audioContextState,isRunning:this.isStateRunning()})}),1e3)):this.isStateRunning()&&this.audioContext.suspend()}isStateRunning(){return"running"===this.audioContextState}isStateSuspended(){return"suspended"===this.audioContextState}clearAudioResumeStateTimeout(){this.audioResumeStateTimeout&&(clearTimeout(this.audioResumeStateTimeout),this.audioResumeStateTimeout=null)}clear(){this.bufferList=[]}play(e,t){}pause(){this.playing=!1}resume(){this.playing=!0}setRate(e){}getAudioBufferSize(){return 0}}class Zo{constructor(e,t,i,s){this.player=e,this.audio=t,this.channel=i,this.bufferSize=s}destroy(){this.buffer=null,this.channel=null}extract(e,t){let i=this.provide(t);for(let t=0;t<i.size;t++)e[2*t]=i.left[t],e[2*t+1]=i.right[t];return this.audio.tempAudioTimestamp=i.ts,i.size}provide(e){let t=new Float32Array(e),i=new Float32Array(e),s=0,r=0,a=0,o=e/this.bufferSize;const n=this.audio.bufferList;if(o&&n.length>=o){try{for(let e=0;e<o;e++){const e=n.shift();2===this.channel?(t.set(e.buffer[0],a),i.set(e.buffer[1],a)):(t.set(e.buffer[0],a),i.set(e.buffer[0],a)),a+=this.bufferSize,r=e.ts}}catch(e){this.player.debug.warn("Processor","provide()",e),t=new Float32Array(0),i=new Float32Array(0)}s=t.length}return{size:s,ts:r,left:t,right:i}}}class en{constructor(){this._vector=new Float32Array,this._position=0,this._frameCount=0}destroy(){this.clear(),this._vector=null}get vector(){return this._vector}get position(){return this._position}get startIndex(){return 2*this._position}get frameCount(){return this._frameCount}get endIndex(){return 2*(this._position+this._frameCount)}clear(){this.receive(this._frameCount),this.rewind()}put(e){this._frameCount+=e}putSamples(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s=2*(t=t||0);i>=0||(i=(e.length-s)/2);const r=2*i;this.ensureCapacity(i+this._frameCount);const a=this.endIndex;this.vector.set(e.subarray(s,s+r),a),this._frameCount+=i}putBuffer(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t=t||0,i>=0||(i=e.frameCount-t),this.putSamples(e.vector,e.position+t,i)}receive(e){e>=0&&!(e>this._frameCount)||(e=this.frameCount),this._frameCount-=e,this._position+=e}receiveSamples(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const i=2*t,s=this.startIndex;e.set(this._vector.subarray(s,s+i)),this.receive(t)}extract(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s=this.startIndex+2*t,r=2*i;e.set(this._vector.subarray(s,s+r))}ensureCapacity(){const e=parseInt(2*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0));if(this._vector.length<e){const t=new Float32Array(e);t.set(this._vector.subarray(this.startIndex,this.endIndex)),this._vector=t,this._position=0}else this.rewind()}ensureAdditionalCapacity(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.ensureCapacity(this._frameCount+e)}rewind(){this._position>0&&(this._vector.set(this._vector.subarray(this.startIndex,this.endIndex)),this._position=0)}}class tn{constructor(e){e?(this._inputBuffer=new en,this._outputBuffer=new en):this._inputBuffer=this._outputBuffer=null}destroy(){this.clear(),this._outputBuffer&&(this._outputBuffer.destroy(),this._outputBuffer=null),this._inputBuffer&&(this._inputBuffer.destroy(),this._inputBuffer=null)}get inputBuffer(){return this._inputBuffer}set inputBuffer(e){this._inputBuffer=e}get outputBuffer(){return this._outputBuffer}set outputBuffer(e){this._outputBuffer=e}clear(){this._inputBuffer.clear(),this._outputBuffer.clear()}}class sn extends tn{constructor(e){super(e),this.reset(),this._rate=1}destroy(){super.destroy()}set rate(e){this._rate=e}reset(){this.slopeCount=0,this.prevSampleL=0,this.prevSampleR=0}clone(){const e=new sn;return e.rate=this._rate,e}process(){const e=this._inputBuffer.frameCount;this._outputBuffer.ensureAdditionalCapacity(e/this._rate+1);const t=this.transpose(e);this._inputBuffer.receive(),this._outputBuffer.put(t)}transpose(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(0===e)return 0;const t=this._inputBuffer.vector,i=this._inputBuffer.startIndex,s=this._outputBuffer.vector,r=this._outputBuffer.endIndex;let a=0,o=0;for(;this.slopeCount<1;)s[r+2*o]=(1-this.slopeCount)*this.prevSampleL+this.slopeCount*t[i],s[r+2*o+1]=(1-this.slopeCount)*this.prevSampleR+this.slopeCount*t[i+1],o+=1,this.slopeCount+=this._rate;if(this.slopeCount-=1,1!==e)e:for(;;){for(;this.slopeCount>1;)if(this.slopeCount-=1,a+=1,a>=e-1)break e;const n=i+2*a;s[r+2*o]=(1-this.slopeCount)*t[n]+this.slopeCount*t[n+2],s[r+2*o+1]=(1-this.slopeCount)*t[n+1]+this.slopeCount*t[n+3],o+=1,this.slopeCount+=this._rate}return this.prevSampleL=t[i+2*e-2],this.prevSampleR=t[i+2*e-1],o}}class rn{constructor(e){this._pipe=e}destroy(){}get pipe(){return this._pipe}get inputBuffer(){return this._pipe.inputBuffer}get outputBuffer(){return this._pipe.outputBuffer}fillInputBuffer(){throw new Error("fillInputBuffer() not overridden")}fillOutputBuffer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;for(;this.outputBuffer.frameCount<e;){const e=16384-this.inputBuffer.frameCount;if(this.fillInputBuffer(e),this.inputBuffer.frameCount<16384)break;this._pipe.process()}}clear(){this._pipe.clear()}}const an=function(){};class on extends rn{constructor(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:an;super(t),this.callback=i,this.sourceSound=e,this.historyBufferSize=22050,this._sourcePosition=0,this.outputBufferPosition=0,this._position=0}destroy(){this.clear(),this.sourceSound.destroy(),this.sourceSound=null,this._sourcePosition=0,this.outputBufferPosition=0,this._position=0}get position(){return this._position}set position(e){if(e>this._position)throw new RangeError("New position may not be greater than current position");const t=this.outputBufferPosition-(this._position-e);if(t<0)throw new RangeError("New position falls outside of history buffer");this.outputBufferPosition=t,this._position=e}get sourcePosition(){return this._sourcePosition}set sourcePosition(e){this.clear(),this._sourcePosition=e}onEnd(){this.callback()}fillInputBuffer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const t=new Float32Array(2*e),i=this.sourceSound.extract(t,e,this._sourcePosition);this._sourcePosition+=i,this.inputBuffer.putSamples(t,0,i)}extract(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.fillOutputBuffer(this.outputBufferPosition+t);const i=Math.min(t,this.outputBuffer.frameCount-this.outputBufferPosition);this.outputBuffer.extract(e,this.outputBufferPosition,i);const s=this.outputBufferPosition+i;return this.outputBufferPosition=Math.min(this.historyBufferSize,s),this.outputBuffer.receive(Math.max(s-this.historyBufferSize,0)),this._position+=i,i}handleSampleData(e){this.extract(e.data,4096)}clear(){super.clear(),this.outputBufferPosition=0}}const nn=[[124,186,248,310,372,434,496,558,620,682,744,806,868,930,992,1054,1116,1178,1240,1302,1364,1426,1488,0],[-100,-75,-50,-25,25,50,75,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-20,-15,-10,-5,5,10,15,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-4,-3,-2,-1,1,2,3,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],ln=-10/1.5;class dn extends tn{constructor(e){super(e),this._quickSeek=!0,this.midBufferDirty=!1,this.midBuffer=null,this.refMidBuffer=null,this.overlapLength=0,this.autoSeqSetting=!0,this.autoSeekSetting=!0,this._tempo=1,this.setParameters(44100,0,0,8)}destroy(){this.clear(),super.destroy()}clear(){super.clear(),this.clearMidBuffer(),this.refMidBuffer=null}clearMidBuffer(){this.midBufferDirty&&(this.midBufferDirty=!1),this.midBuffer=null}setParameters(e,t,i,s){e>0&&(this.sampleRate=e),s>0&&(this.overlapMs=s),t>0?(this.sequenceMs=t,this.autoSeqSetting=!1):this.autoSeqSetting=!0,i>0?(this.seekWindowMs=i,this.autoSeekSetting=!1):this.autoSeekSetting=!0,this.calculateSequenceParameters(),this.calculateOverlapLength(this.overlapMs),this.tempo=this._tempo}set tempo(e){let t;this._tempo=e,this.calculateSequenceParameters(),this.nominalSkip=this._tempo*(this.seekWindowLength-this.overlapLength),this.skipFract=0,t=Math.floor(this.nominalSkip+.5),this.sampleReq=Math.max(t+this.overlapLength,this.seekWindowLength)+this.seekLength}get tempo(){return this._tempo}get inputChunkSize(){return this.sampleReq}get outputChunkSize(){return this.overlapLength+Math.max(0,this.seekWindowLength-2*this.overlapLength)}calculateOverlapLength(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;e=this.sampleRate*t/1e3,e=e<16?16:e,e-=e%8,this.overlapLength=e,this.refMidBuffer=new Float32Array(2*this.overlapLength),this.midBuffer=new Float32Array(2*this.overlapLength)}checkLimits(e,t,i){return e<t?t:e>i?i:e}calculateSequenceParameters(){let e,t;this.autoSeqSetting&&(e=150+-50*this._tempo,e=this.checkLimits(e,50,125),this.sequenceMs=Math.floor(e+.5)),this.autoSeekSetting&&(t=28.333333333333332+ln*this._tempo,t=this.checkLimits(t,15,25),this.seekWindowMs=Math.floor(t+.5)),this.seekWindowLength=Math.floor(this.sampleRate*this.sequenceMs/1e3),this.seekLength=Math.floor(this.sampleRate*this.seekWindowMs/1e3)}set quickSeek(e){this._quickSeek=e}clone(){const e=new dn;return e.tempo=this._tempo,e.setParameters(this.sampleRate,this.sequenceMs,this.seekWindowMs,this.overlapMs),e}seekBestOverlapPosition(){return this._quickSeek?this.seekBestOverlapPositionStereoQuick():this.seekBestOverlapPositionStereo()}seekBestOverlapPositionStereo(){let e,t,i,s=0;for(this.preCalculateCorrelationReferenceStereo(),e=0,t=Number.MIN_VALUE;s<this.seekLength;s+=1)i=this.calculateCrossCorrelationStereo(2*s,this.refMidBuffer),i>t&&(t=i,e=s);return e}seekBestOverlapPositionStereoQuick(){let e,t,i,s,r,a=0;for(this.preCalculateCorrelationReferenceStereo(),t=Number.MIN_VALUE,e=0,s=0,r=0;a<4;a+=1){let o=0;for(;nn[a][o]&&(r=s+nn[a][o],!(r>=this.seekLength));)i=this.calculateCrossCorrelationStereo(2*r,this.refMidBuffer),i>t&&(t=i,e=r),o+=1;s=e}return e}preCalculateCorrelationReferenceStereo(){let e,t,i=0;for(;i<this.overlapLength;i+=1)t=i*(this.overlapLength-i),e=2*i,this.refMidBuffer[e]=this.midBuffer[e]*t,this.refMidBuffer[e+1]=this.midBuffer[e+1]*t}calculateCrossCorrelationStereo(e,t){const i=this._inputBuffer.vector;e+=this._inputBuffer.startIndex;let s=0,r=2;const a=2*this.overlapLength;let o;for(;r<a;r+=2)o=r+e,s+=i[o]*t[r]+i[o+1]*t[r+1];return s}overlap(e){this.overlapStereo(2*e)}overlapStereo(e){const t=this._inputBuffer.vector;e+=this._inputBuffer.startIndex;const i=this._outputBuffer.vector,s=this._outputBuffer.endIndex;let r,a,o=0;const n=1/this.overlapLength;let l,d,h;for(;o<this.overlapLength;o+=1)a=(this.overlapLength-o)*n,l=o*n,r=2*o,d=r+e,h=r+s,i[h+0]=t[d+0]*l+this.midBuffer[r+0]*a,i[h+1]=t[d+1]*l+this.midBuffer[r+1]*a}process(){let e,t,i;if(null===this.midBuffer){if(this._inputBuffer.frameCount<this.overlapLength)return;this.midBuffer=new Float32Array(2*this.overlapLength),this._inputBuffer.receiveSamples(this.midBuffer,this.overlapLength)}for(;this._inputBuffer.frameCount>=this.sampleReq;){e=this.seekBestOverlapPosition(),this._outputBuffer.ensureAdditionalCapacity(this.overlapLength),this.overlap(Math.floor(e)),this._outputBuffer.put(this.overlapLength),t=this.seekWindowLength-2*this.overlapLength,t>0&&this._outputBuffer.putBuffer(this._inputBuffer,e+this.overlapLength,t);const s=this._inputBuffer.startIndex+2*(e+this.seekWindowLength-this.overlapLength);this.midBuffer.set(this._inputBuffer.vector.subarray(s,s+2*this.overlapLength)),this.skipFract+=this.nominalSkip,i=Math.floor(this.skipFract),this.skipFract-=i,this._inputBuffer.receive(i)}}}const hn=function(e,t){return(e>t?e-t:t-e)>1e-10};class cn{constructor(){this.transposer=new sn(!1),this.stretch=new dn(!1),this._inputBuffer=new en,this._intermediateBuffer=new en,this._outputBuffer=new en,this._rate=0,this._tempo=0,this.virtualPitch=1,this.virtualRate=1,this.virtualTempo=1,this.calculateEffectiveRateAndTempo()}destroy(){this.clear(),this._inputBuffer.destroy(),this._intermediateBuffer.destroy(),this._outputBuffer.destroy(),this._inputBuffer=null,this._intermediateBuffer=null,this._outputBuffer=null}clear(){this.transposer.clear(),this.stretch.clear()}clone(){const e=new cn;return e.rate=this.rate,e.tempo=this.tempo,e}get rate(){return this._rate}set rate(e){this.virtualRate=e,this.calculateEffectiveRateAndTempo()}set rateChange(e){this._rate=1+.01*e}get tempo(){return this._tempo}set tempo(e){this.virtualTempo=e,this.calculateEffectiveRateAndTempo()}set tempoChange(e){this.tempo=1+.01*e}set pitch(e){this.virtualPitch=e,this.calculateEffectiveRateAndTempo()}set pitchOctaves(e){this.pitch=Math.exp(.69314718056*e),this.calculateEffectiveRateAndTempo()}set pitchSemitones(e){this.pitchOctaves=e/12}get inputBuffer(){return this._inputBuffer}get outputBuffer(){return this._outputBuffer}calculateEffectiveRateAndTempo(){const e=this._tempo,t=this._rate;this._tempo=this.virtualTempo/this.virtualPitch,this._rate=this.virtualRate*this.virtualPitch,hn(this._tempo,e)&&(this.stretch.tempo=this._tempo),hn(this._rate,t)&&(this.transposer.rate=this._rate),this._rate>1?this._outputBuffer!=this.transposer.outputBuffer&&(this.stretch.inputBuffer=this._inputBuffer,this.stretch.outputBuffer=this._intermediateBuffer,this.transposer.inputBuffer=this._intermediateBuffer,this.transposer.outputBuffer=this._outputBuffer):this._outputBuffer!=this.stretch.outputBuffer&&(this.transposer.inputBuffer=this._inputBuffer,this.transposer.outputBuffer=this._intermediateBuffer,this.stretch.inputBuffer=this._intermediateBuffer,this.stretch.outputBuffer=this._outputBuffer)}process(){this._rate>1?(this.stretch.process(),this.transposer.process()):(this.transposer.process(),this.stretch.process())}}class un{constructor(e,t,i){this.player=e,this.audio=t,this.soundTouch=new cn,this.soundTouch.tempo=1,this.soundTouch.rate=1,this.filter=new on(i,this.soundTouch)}destroy(){this.filter&&(this.filter.destroy(),this.filter=null),this.soundTouch&&(this.soundTouch.destroy(),this.soundTouch=null)}setRate(e){e!==this.soundTouch.rate&&(this.soundTouch.tempo=e)}provide(e){let t=new Float32Array(2*e),i=this.filter.extract(t,e),s=new Float32Array(i),r=new Float32Array(i);for(let e=0;e<i;e++)s[e]=t[2*e],r[e]=t[2*e+1];return{size:i,left:s,right:r,ts:this.audio.tempAudioTimestamp||0}}}class pn extends Xo{constructor(e){super(e),this.defaultPlaybackRate=1,this.playbackRate=1,this.rateProcessor=null,this.processor=null,this.scriptNodeInterval=null,this.engineType=this.getAutoAudioEngineType(),this.audioBufferSize=this.getAudioBufferSizeByType(),this.$audio=null,this._delayPlay=!1,this.eventListenList=[],this.workletUrl=null,this.clearWorkletUrlTimeout=null,this.player._opt.supportLockScreenPlayAudio&&wa()&&(this.$audio=document.createElement("audio"),Object.assign(this.$audio.style,{position:"absolute",left:"-100%",top:"-100%"}),e.$container?e.$container.appendChild(this.$audio):document.body.appendChild(this.$audio),this._bindAudioProxy(),this.player.debug.log("AudioContext","create audio element")),this.scriptStartTime=0,this.player.debug.log("AudioContext","init",`engineType: ${this.engineType}, audioBufferSize: ${this.audioBufferSize}`)}async destroy(){return await super.destroy(),this.workletUrl&&(URL.revokeObjectURL(this.workletUrl),this.workletUrl=null),this.clearWorkletUrlTimeout&&(clearTimeout(this.clearWorkletUrlTimeout),this.clearWorkletUrlTimeout=null),this.eventListenList.length&&(this.eventListenList.forEach((e=>{e()})),this.eventListenList=[]),this.$audio&&(this.$audio.pause(),this.$audio.srcObject=null,this.$audio.parentNode&&this.$audio.parentNode.removeChild(this.$audio),this.$audio=null),this.processor&&(this.processor.destroy(),this.processor=null),this.rateProcessor&&(this.rateProcessor.destroy(),this.rateProcessor=null),this.scriptNodeInterval&&(clearInterval(this.scriptNodeInterval),this.scriptNodeInterval=null),this.defaultPlaybackRate=1,this.playbackRate=1,this.scriptStartTime=0,this.audioBufferSize=0,this.engineType=Fs,this.player.debug.log("AudioContext","destroy"),!0}isAudioPlaying(){return this.$audio&&Ao(this.$audio.paused)&&Ao(this.$audio.ended)&&0!==this.$audio.playbackRate&&0!==this.$audio.readyState}_bindAudioProxy(){const{proxy:e}=this.player.events,t=e(this.$audio,"canplay",(()=>{this.player.debug.log("AudioContext","canplay"),this._delayPlay&&this._audioElementPlay()}));this.eventListenList.push(t)}_getAudioElementReadyState(){let e=0;return this.$audio&&(e=this.$audio.readyState),e}audioElementPlay(){if(this.$audio){const e=this._getAudioElementReadyState();if(this.player.debug.log("AudioContext",`play and readyState: ${e}`),!(0!==e||Qa()&&wa()))return this.player.debug.warn("AudioContext","readyState is 0 and set _delayPlay to true"),void(this._delayPlay=!0);this._audioElementPlay()}}_audioElementPlay(){this.$audio&&this.$audio.play().then((()=>{this._delayPlay=!1,this.player.debug.log("AudioContext","_audioElementPlay success"),setTimeout((()=>{this.isAudioPlaying()||(this.player.debug.warn("AudioContext","play failed and retry play"),this._audioElementPlay())}),100),this.isAudioPlaying()&&(this.player.debug.log("AudioContext","play success and remove document click event listener"),document.removeEventListener("click",this._audioElementPlay.bind(this)))})).catch((e=>{this.player.debug.error("AudioContext","_audioElementPlay error",e),document.addEventListener("click",this._audioElementPlay.bind(this))}))}getAudioBufferSize(){return this.audioBufferSize}get oneBufferDuration(){return this.audioBufferSize/this.audioContext.sampleRate*1e3}get isActiveEngineType(){return this.engineType===Os}getBufferListDuration(){return this.bufferList.length*this.oneBufferDuration}isMoreThanMinBufferDuration(){return this.getBufferListDuration()>=100*this.playbackRate}initProcessor(){this.processor=new Zo(this.player,this,this.audioInfo.channels,this.audioBufferSize),this.rateProcessor=new un(this.player,this,this.processor)}getAutoAudioEngineType(){let e=this.player._opt.audioEngine||Fs;const t=()=>{e=Qa()&&ba()?Os:(wa()&&this.player._opt.supportLockScreenPlayAudio||no()&&this.supportAudioWorklet(),Fs)};return this.player._opt.audioEngine?this.player._opt.audioEngine===Us&&no()&&this.supportAudioWorklet()?e=Us:this.player._opt.audioEngine===Os?e=Os:this.player._opt.audioEngine===Fs?e=Fs:t():t(),e}getAudioBufferSizeByType(){const e=this.engineType;this.player._opt.hasVideo;const t=this.player._opt.weiXinInAndroidAudioBufferSize;return e===Us?1024:e===Os?t||4800:1024}supportAudioWorklet(){return this.audioContext&&this.audioContext.audioWorklet}initScriptNode(){this.playing=!0,this.hasInitScriptNode||(this.initProcessor(),this.engineType===Us?this.initWorkletScriptNode():this.engineType===Os?this.initIntervalScriptNode():this.engineType===Fs&&this.initProcessScriptNode(),this.audioElementPlay())}getEngineType(){return this.engineType}isPlaybackRateSpeed(){return this.playbackRate>this.defaultPlaybackRate}initProcessScriptNode(){const e=this.audioContext.createScriptProcessor(this.audioBufferSize,0,this.audioInfo.channels);e.onaudioprocess=e=>{const t=e.outputBuffer;this.handleScriptNodeCallback(t)},e.connect(this.gainNode),this.scriptNode=e,this.gainNode.connect(this.mediaStreamAudioDestinationNode),this.$audio?this.$audio.srcObject=this.mediaStreamAudioDestinationNode.stream:this.gainNode.connect(this.audioContext.destination),this.hasInitScriptNode=!0}initIntervalScriptNode(){this.scriptStartTime=0;const e=1e3*this.audioBufferSize/this.audioContext.sampleRate;this.scriptNodeInterval=setInterval((()=>{if(0===this.bufferList.length||Ao(this.playing)||this.isMute)return void(this.playing&&Ao(this.isMute)&&this.player.debug.log("AudioContext",`interval script node and bufferList is ${this.bufferList.length} or playing is ${this.playing}`));const e=this.audioContext.createBufferSource(),t=this.audioContext.createBuffer(this.audioInfo.channels,this.audioBufferSize,this.audioContext.sampleRate);this.handleScriptNodeCallback(t,(()=>{this.scriptStartTime<this.audioContext.currentTime&&(this.player.debug.log("AudioContext",`script start time ${this.scriptStartTime} is less than current time ${this.audioContext.currentTime}`),this.scriptStartTime=this.audioContext.currentTime),e.buffer=t,e.connect(this.gainNode),e.start(this.scriptStartTime),this.scriptStartTime+=t.duration}))}),e),this.gainNode.connect(this.mediaStreamAudioDestinationNode),this.$audio?this.$audio.srcObject=this.mediaStreamAudioDestinationNode.stream:this.gainNode.connect(this.audioContext.destination),this.hasInitScriptNode=!0}initWorkletScriptNode(){let e=ao((function(){class e extends AudioWorkletProcessor{constructor(){super(),this.audioBufferSize=1024,this.start=!1,this.channels=1,this.samplesArray=[],this.offset=0,this.state=0,this.port.onmessage=e=>{"init"===e.data.message?(this.audioBufferSize=e.data.audioBufferSize,this.start=e.data.start,this.channels=e.data.channels,this.state=0,this.offset=0,this.samplesArray=[]):"stop"===e.data.message?(this.state=0,this.start=!1,this.offset=0,this.samplesArray=[]):"data"===e.data.message?this.samplesArray.push(e.data.buffer):"zero"===e.data.message&&this.samplesArray.push({left:new Float32Array(this.audioBufferSize).fill(0),right:new Float32Array(this.audioBufferSize).fill(0)})}}process(e,t,i){const s=t[0][0],r=t[0][1];if(0===this.offset&&this.port.postMessage({message:"beep"}),0===this.state)this.state=1;else if(1===this.state&&this.samplesArray.length>=4)this.state=2;else if(2===this.state){const e=this.samplesArray[0];for(let t=0;t<s.length;t++)1===this.channels?s[t]=e.left[t+this.offset]:2===this.channels&&(s[t]=e.left[t+this.offset],r&&(r[t]=e.right[t+this.offset]))}else 1===this.channels?s.fill(0):2===this.channels&&(s.fill(0),r&&r.fill(0));return this.offset+=128,this.offset===this.audioBufferSize&&(this.offset=0,2===this.state&&this.samplesArray.shift(),0===this.samplesArray.length&&(this.state=0)),this.start}}registerProcessor("worklet-processor",e)}));this.workletUrl=e,this.audioContext.audioWorklet.addModule(e).then((()=>{if(this.player.isDestroyedOrClosed())return void this.player.debug.log("AudioContext","initWorkletScriptNode() player is destroyed");if(!this.audioContext)return void this.player.debug.warn("AudioContext","initWorkletScriptNode audioContext is null");let e=[1];2===this.audioInfo.channels&&(e=[1,1]);try{this.workletProcessorNode=new AudioWorkletNode(this.audioContext,"worklet-processor",{numberOfOutputs:this.audioInfo.channels,outputChannelCount:e})}catch(e){this.player.debug.error("AudioContext","initWorkletScriptNode error",e),this.workletProcessorNode=null,this.tierDownToProcessScript()}this.workletProcessorNode&&(this.workletProcessorNode.connect(this.gainNode),this.gainNode.connect(this.mediaStreamAudioDestinationNode),this.$audio?this.$audio.srcObject=this.mediaStreamAudioDestinationNode.stream:this.gainNode.connect(this.audioContext.destination),this.hasInitScriptNode=!0,this.workletProcessorNode.port.postMessage({message:"init",audioBufferSize:this.audioBufferSize,start:!0,channels:this.audioInfo.channels}),this.workletProcessorNode.port.onmessage=e=>{this.workletProcessorNode?this.audioContext?this.handleScriptNodeCallback(this.workletProcessorNode,null,!0):this.workletProcessorNode.port.postMessage({message:"zero"}):this.player.debug.error("AudioContext","workletProcessorNode is null")})})),this.clearWorkletUrlTimeout=setTimeout((()=>{URL.revokeObjectURL(this.workletUrl),this.workletUrl=null,this.clearWorkletUrlTimeout=null}),ie)}tierDownToProcessScript(){this.player.debug.log("AudioContext","tierDownToProcessScript"),this.engineType=Fs,this.audioBufferSize=this.getAudioBufferSizeByType(),this.initProcessScriptNode(),this.audioElementPlay()}handleScriptNodeCallback(e,t){let i,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=t||oa;let r=e.length;s&&(i=e,r=this.audioBufferSize);const a=this.audioInfo.channels;if(this.playing&&this.isMoreThanMinBufferDuration()){if(this.player._opt,this.player.openSyncAudioAndVideo()&&yo(this.player.visibility)){this.calcPlaybackRateBySync();const r=this.player.getAudioSyncVideoDiff();if(r>this.player._opt.syncAudioAndVideoDiff)return this.player.debug.warn("AudioContext",`audioSyncVideoOption more than diff :${r}, waiting and bufferList is ${this.bufferList.length}`),s?i.port.postMessage({message:"zero"}):this.fillScriptNodeOutputBuffer(e,a),void t()}let o=this._provide(r);if(0===o.size)return Ao(this.player.isPlaybackOnlyDecodeIFrame())&&this.player.debug.warn("AudioContext",`bufferList size is ${this.bufferList.length} outputBufferLength is ${r},and bufferItem.size is 0`),s?i.port.postMessage({message:"zero"}):this.fillScriptNodeOutputBuffer(e,a),void t();o&&o.ts&&(this.player.audioTimestamp=o.ts),s?i.port.postMessage({message:"data",buffer:o}):this.fillScriptNodeOutputBuffer(e,a,o),t()}else 0===this.bufferList.length&&this.playing&&Ao(this.isMute)&&Ao(this.player.isPlaybackOnlyDecodeIFrame())&&this.player.debug.warn("AudioContext",`bufferList size is 0 and outputBufferLength is ${r}`),s?i.port.postMessage({message:"zero"}):this.fillScriptNodeOutputBuffer(e,a),t()}fillScriptNodeOutputBuffer(e,t,i){if(1===t){const t=e.getChannelData(0);i?0===i.size?t.fill(0):t.set(i.left):t.fill(0)}else if(2===t){const t=e.getChannelData(0),s=e.getChannelData(1);i?0===i.size?(t.fill(0),s.fill(0)):(t.set(i.left),s.set(i.right)):(t.fill(0),s.fill(0))}}play(e,t){this.isMute||(this.hasInitScriptNode?(this.hasAudio=!0,this.player.latestAudioTimestamp=t,this.bufferList.push({buffer:e,ts:t}),Ao(this.player.openSyncAudioAndVideo())&&this.calcPlaybackRateByBuffer()):this.player.debug.warn("AudioContext","play has not init script node"))}calcPlaybackRateBySync(){if(this.isMute)return;if(!this.playing)return;const e=Math.floor(2e3/this.oneBufferDuration);if(this.bufferList.length>e)return this.player.debug.warn("AudioContext",`bufferList length ${this.bufferList.length} more than ${e}, and drop`),void this.clear();const t=this.player.getAudioSyncVideoDiff();if(this.getEngineType()===Os){if(t<-this.player._opt.syncAudioAndVideoDiff){this.player.debug.warn("AudioContext",`engine active , audioSyncVideoOption ${-this.player._opt.syncAudioAndVideoDiff} less than diff :${t},\n and bufferlist is ${this.bufferList.length}`);const e=this.player.getRenderCurrentPts();for(;this.bufferList.length>0;){const t=this.bufferList[0],i=t.ts-e;if(i>-this.player._opt.syncAudioAndVideoDiff/2){this.player.audioTimestamp=t.ts,this.player.debug.log("AudioContext",`engine active , audioSyncVideoOption\n item.ts is ${t.ts} and currentVideoTimestamp is ${e}, diff is ${i} > -${this.player._opt.syncAudioAndVideoDiff/2} and end`);break}this.bufferList.shift(),this.player.audioTimestamp=t.ts}}}else{let e=this.playbackRate;t<-this.player._opt.syncAudioAndVideoDiff?e===this.defaultPlaybackRate&&(this.player.debug.log("AudioContext",`audioSyncVideoOption ${-this.player._opt.syncAudioAndVideoDiff} less than diff :${t},\n speed up, playbackRate is ${e},\n and bufferList is ${this.bufferList.length}`),e=this.defaultPlaybackRate+.2):t>-this.player._opt.syncAudioAndVideoDiff/2&&e!==this.defaultPlaybackRate&&(this.player.debug.log("AudioContext",`diff is ${t} > -${this.player._opt.syncAudioAndVideoDiff/2} and speed to 1`),e=this.defaultPlaybackRate),this.updatePlaybackRate(e)}}calcPlaybackRateByBuffer(){if(this.isMute)return;if(!this.playing)return;let e=this.playbackRate,t=1e3,i=5e3;this.isAudioPlayer&&(t=this.player._opt.videoBufferDelay,i=this.player._opt.videoBufferMax);const s=Math.floor(t/this.oneBufferDuration),r=Math.floor(i/this.oneBufferDuration);if(this.bufferList.length>r)return this.player.debug.warn("AudioContext",`bufferList length ${this.bufferList.length} more than ${r}, and drop`),void this.clear();this.getEngineType()!==Os&&(this.bufferList.length>s?(e=this.defaultPlaybackRate+.2,this.player.debug.log("AudioContext",`bufferList length ${this.bufferList.length} more than ${s}, speed up, playbackRate is ${e}`)):this.bufferList.length<s/2&&(e=this.defaultPlaybackRate),this.updatePlaybackRate(e))}updatePlaybackRate(e){this.rateProcessor&&(this.playbackRate=e,this.rateProcessor.setRate(this.playbackRate))}_provide(e){return(1===this.playbackRate?this.processor:this.rateProcessor).provide(e)}}class fn extends a{constructor(e){super(),this.player=e,this.$video=e.video.$videoElement,this.init=!1,this.player._opt.hlsUseCanvasRender&&(this.$video=this.player.hlsDecoder.$videoElement),this.player._opt.webrtcUseCanvasRender&&(this.$video=this.player.webrtc.$videoElement),this.audioInfo={encTypeCode:"",encType:"",channels:"",sampleRate:"",depth:""},this._prevVolume=null,this.player.debug.log("Audio","init")}async destroy(){return this.resetInit(),this.off(),this._prevVolume=null,this.player.debug.log("Audio","destroy"),!0}resetInit(){this.init=!1,this.audioInfo={encTypeCode:"",encType:"",channels:"",sampleRate:"",depth:""}}getAudioInfo(){return this.audioInfo}updateAudioInfo(e){e.encTypeCode&&(this.audioInfo.encTypeCode=e.encTypeCode,this.audioInfo.encType=xt[e.encTypeCode]),e.encType&&(this.audioInfo.encType=e.encType),e.channels&&(this.audioInfo.channels=e.channels),e.sampleRate&&(this.audioInfo.sampleRate=e.sampleRate),e.depth&&(this.audioInfo.depth=e.depth),this.audioInfo.sampleRate&&this.audioInfo.channels&&this.audioInfo.encType&&!this.init&&(this.player.debug.log("Audio","audioInfo",JSON.stringify(this.audioInfo)),this.player.emit(lt.audioInfo,this.audioInfo),this.init=!0)}get isPlaying(){return!0}get volume(){return yo(this.$video.muted)?0:this.$video.volume}get isMute(){return 0===this.$video.volume||yo(this.$video.muted)}mute(e){this.setVolume(e?0:this.player.lastVolume||.5)}setVolume(e){e=parseFloat(e),isNaN(e)||(e=ca(e,0,1),this.$video.muted&&(this.$video.muted=!1),wa()&&(this.$video.muted=0===e),this.player.isAliyunRtc()&&this.player.aliyunRtcDecoder&&this.player.aliyunRtcDecoder.aliyunRtcRemoteStream&&(this.player.aliyunRtcDecoder.aliyunRtcRemoteStream.muted=0===e),null===this._prevVolume?this.player.emit(lt.mute,0===e):0===this._prevVolume&&e>0?this.player.emit(lt.mute,!1):this._prevVolume>0&&0===e&&this.player.emit(lt.mute,!0),this.$video.volume=e,this.player.emit(lt.volumechange,this.player.volume),this.player.emit(lt.volume,this.player.volume),this._prevVolume=e)}clear(){}play(){}pause(){}resume(){}getEngineType(){return"audio"}isPlaybackRateSpeed(){return!1}getAudioBufferSize(){return 0}setRate(){}initScriptNode(){}initScriptNodeDelay(){}audioEnabled(){this.mute(!1)}}class mn extends pn{constructor(e){super(e),this.delayTimeout=null,this.player.on(lt.playbackPause,(e=>{this.listenPlaybackPause(e)})),this.player.debug.log("AudioPlaybackContext","init")}async destroy(){return this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null),await super.destroy(),this.player.debug.log("AudioPlaybackLoader","destroy"),!0}listenPlaybackPause(e){e?(this.pause(),this.player.playback.isPlaybackPauseClearCache&&this.clear()):this.resume()}initScriptNodeDelay(){const e=this.player._opt.playbackDelayTime;e>0?this.delayTimeout=setTimeout((()=>{this.initScriptNode()}),e):this.initScriptNode()}setRate(e){e!==this.defaultPlaybackRate&&this.rateProcessor&&(this.player.debug.log("AudioPlaybackContext","setRate",e),this.defaultPlaybackRate=e,this.updatePlaybackRate(e))}}class gn extends pn{constructor(e){super(e),this.TAG_NAME="AudioPlayerLoader",this.isAudioPlayer=!0,this.player.debug.log(this.TAG_NAME,"init")}async destroy(){return await super.destroy(),this.player.debug.log(this.TAG_NAME,"destroy"),!0}play(e,t){Ao(this.playing)||super.play(e,t)}pause(){this.player.debug.log(this.TAG_NAME,"pause"),this.playing=!1,this.clear()}resume(){this.player.debug.log(this.TAG_NAME,"resume"),this.playing=!0}}class yn{constructor(e){return new(yn.getLoaderFactory(e._opt))(e)}static getLoaderFactory(e){return e.playType===w?e.useMSE&&e.mseDecodeAudio?fn:mn:e.playType===v?gn:e.isHls&&Ao(e.supportHls265)||e.isWebrtc&&Ao(e.isWebrtcH265)||e.useMSE&&e.mseDecodeAudio||e.isAliyunRtc?fn:pn}}class An extends a{constructor(e){super(),this.player=e,this.playing=!1,this._requestAbort=!1,this._status=fr,this.writableStream=null,this.abortController=new AbortController,this.streamRate=ma((t=>{e.emit(lt.kBps,(t/1024).toFixed(2))})),this.streamRateInterval=null,e.debug.log("FetchStream","init")}async destroy(){return this.abort(),this.writableStream&&Ao(this.writableStream.locked)&&this.writableStream.close().catch((e=>{this.player.debug.log("FetchStream","destroy and writableStream.close()",e)})),this.writableStream=null,this.off(),this._status=fr,this.streamRate=null,this.stopStreamRateInterval(),this.player.debug.log("FetchStream","destroy"),!0}startStreamRateInterval(){this.stopStreamRateInterval(),this.streamRateInterval=setInterval((()=>{this.streamRate&&this.streamRate(0)}),1e3)}stopStreamRateInterval(){this.streamRateInterval&&(clearInterval(this.streamRateInterval),this.streamRateInterval=null)}fetchStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{demux:i}=this.player;this.player._times.streamStart=ha();const s=Object.assign({signal:this.abortController.signal},{headers:t.headers||{}});fetch(e,s).then((e=>{if(this._requestAbort)return this._status=fr,void e.body.cancel();if(!function(e){return e.ok&&e.status>=200&&e.status<=299}(e))return this.player.debug.error("FetchStream",`fetch response status is ${e.status} and ok is ${e.ok} and emit error and next abort()`),this.abort(),void this.emit(ut.fetchError,`fetch response status is ${e.status} and ok is ${e.ok}`);if(this.emit(lt.streamSuccess),this.startStreamRateInterval(),"undefined"!=typeof WritableStream)this.player.debug.log("FetchStream","use WritableStream() to read stream"),this.writableStream=new WritableStream({write:e=>this.abortController&&this.abortController.signal&&this.abortController.signal.aborted?(this.player.debug.log("FetchStream","writableStream.write() and this.abortController.signal.aborted so return"),void(this._status=gr)):yo(this._requestAbort)?(this.player.debug.log("FetchStream","writableStream.write() and this._requestAbort is true so return"),void(this._status=gr)):"string"!=typeof e?(this._status=mr,this.streamRate&&this.streamRate(e.byteLength),i.dispatch(e)):void this.player.debug.warn("FetchStream",`writableStream.write() and value is "${e}" string so return`),close:()=>{this._status=gr,i.close(),this.emit(lt.streamEnd,"fetch done")},abort:e=>{if(this.abortController&&this.abortController.signal&&this.abortController.signal.aborted)return this.player.debug.log("FetchStream","writableStream.abort() and this.abortController.signal.aborted so return"),void(this._status=gr);i.close();const t=e.toString();-1===t.indexOf(fs)&&-1===t.indexOf(ms)&&e.name!==gs&&(this.abort(),this.emit(ut.fetchError,e))}}),e.body.pipeTo(this.writableStream);else{this.player.debug.log("FetchStream","not support WritableStream and use getReader() to read stream");const t=e.body.getReader(),s=()=>{t.read().then((e=>{let{done:t,value:r}=e;return t?(this._status=gr,i.close(),void this.emit(lt.streamEnd,"fetch done")):this.abortController&&this.abortController.signal&&this.abortController.signal.aborted?(this.player.debug.log("FetchStream","reader.read() and this.abortController.signal.aborted so return"),void(this._status=gr)):yo(this._requestAbort)?(this.player.debug.log("FetchStream","reader.read() and this._requestAbort is true so return"),void(this._status=gr)):void("string"!=typeof r?(this._status=mr,this.streamRate&&this.streamRate(r.byteLength),i.dispatch(r),s()):this.player.debug.warn("FetchStream",`reader.read() and value is "${r}" string so return`))})).catch((e=>{if(this.abortController&&this.abortController.signal&&this.abortController.signal.aborted)return this.player.debug.log("FetchStream","reader.read().catch() and this.abortController.signal.aborted so return"),void(this._status=gr);i.close();const t=e.toString();-1===t.indexOf(fs)&&-1===t.indexOf(ms)&&e.name!==gs&&(this.abort(),this.emit(ut.fetchError,e))}))};s()}})).catch((e=>{this.abortController&&this.abortController.signal&&this.abortController.signal.aborted||"AbortError"!==e.name&&(i.close(),this.abort(),this.emit(ut.fetchError,e))}))}abort(){this._requestAbort=!0;const e=Xa();if(this._status!==mr||Ao(e)){if(this.abortController){try{this.abortController.abort()}catch(e){}this.abortController=null}}else this.abortController=null,this.player.debug.log("FetchStream",`abort() and not abortController.abort() _status is ${this._status} and _isChrome is ${e}`)}getStreamType(){return p}}class bn extends a{constructor(e){super(),this.TAG_NAME="FetchWorkerLoader",this.player=e,this.playing=!1,this.fetchWorker=null,this.workerClearTimeout=null,this.workerUrl=null,this.destroyResolve=null,this.decoderWorkerCloseTimeout=null,this.abortController=new AbortController,this.streamRate=ma((t=>{e.emit(lt.kBps,(t/1024).toFixed(2))})),this.streamRateInterval=null,this._initFetchWorker(),e.debug.log(this.TAG_NAME,"init")}destroy(){return new Promise(((e,t)=>{this.fetchWorker?(this.player.debug.log(this.TAG_NAME,"send destroy"),this.fetchWorker.postMessage({cmd:it}),this.destroyResolve=e,this.decoderWorkerCloseTimeout=setTimeout((()=>{this.player.debug.warn(this.TAG_NAME,"send close but not response and destroy directly"),this.decoderWorkerCloseTimeout&&(clearTimeout(this.decoderWorkerCloseTimeout),this.decoderWorkerCloseTimeout=null),this._destroy(),setTimeout((()=>{e()}),0)}),2e3)):(this._destroy(),setTimeout((()=>{e()}),0))}))}_destroy(){this.off(),this.decoderWorkerCloseTimeout&&(clearTimeout(this.decoderWorkerCloseTimeout),this.decoderWorkerCloseTimeout=null),this.workerUrl&&(window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null),this.workerClearTimeout&&(clearTimeout(this.workerClearTimeout),this.workerClearTimeout=null),this._stopStreamRateInterval(),this.streamRate=null,this.fetchWorker&&(this.fetchWorker.terminate(),this.fetchWorker.onmessage=null,this.fetchWorker=null),this.destroyResolve&&(this.destroyResolve(),this.destroyResolve=null),this.player.debug.log(this.TAG_NAME,"destroy")}_initFetchWorker(){const e=Eo(function(){function e(e){return!0===e||"true"===e}function t(e){return!1===e||"false"===e}const i="The user aborted a request",s="AbortError",r="AbortError",a="fetch",o="destroy",n="destroyEnd",l="buffer",d="fetchError",h="fetchClose",c="fetchSuccess",u="idle",p="buffering",f="complete";let m=new class{constructor(){this._requestAbort=!1,this._status=u,this.writableStream=null,this.isChrome=!1,this.abortController=new AbortController}destroy(){this.abort(),this.writableStream&&t(this.writableStream.locked)&&this.writableStream.close().catch((e=>{})),this.writableStream=null,this._status=u}fetchStream(t){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=Object.assign({signal:this.abortController.signal},{headers:a.headers||{}});fetch(t,o).then((t=>{if(this._requestAbort)return this._status=u,void t.body.cancel();if(!function(e){return e.ok&&e.status>=200&&e.status<=299}(t))return this.abort(),void postMessage({cmd:d,message:`fetch response status is ${t.status} and ok is ${t.ok}`});if(postMessage({cmd:c}),"undefined"!=typeof WritableStream)this.writableStream=new WritableStream({write:t=>{this.abortController&&this.abortController.signal&&this.abortController.signal.aborted||e(this._requestAbort)?this._status=f:"string"!=typeof t&&(this._status=p,postMessage({cmd:l,buffer:t},[t.buffer]))},close:()=>{this._status=f,postMessage({cmd:h})},abort:e=>{if(this.abortController&&this.abortController.signal&&this.abortController.signal.aborted)return void(this._status=f);const t=e.toString();-1===t.indexOf(i)&&-1===t.indexOf(s)&&e.name!==r&&(this.abort(),postMessage({cmd:d,message:e.toString()}))}}),t.body.pipeTo(this.writableStream);else{const a=t.body.getReader(),o=()=>{a.read().then((t=>{let{done:i,value:s}=t;if(i)return this._status=f,void postMessage({cmd:h});this.abortController&&this.abortController.signal&&this.abortController.signal.aborted||e(this._requestAbort)?this._status=f:"string"!=typeof s&&(this._status=p,postMessage({cmd:l,buffer:s},[s.buffer]),o())})).catch((e=>{if(this.abortController&&this.abortController.signal&&this.abortController.signal.aborted)return void(this._status=f);const t=e.toString();-1===t.indexOf(i)&&-1===t.indexOf(s)&&e.name!==r&&(this.abort(),postMessage({cmd:d,message:e.toString()}))}))};o()}})).catch((e=>{this.abortController&&this.abortController.signal&&this.abortController.signal.aborted||"AbortError"!==e.name&&(this.abort(),postMessage({cmd:d,message:e.toString()}))}))}abort(){if(this._requestAbort=!0,this._status!==p||t(m.isChrome)){if(this.abortController){try{this.abortController.abort()}catch(e){}this.abortController=null}}else this.abortController=null}};self.onmessage=t=>{const i=t.data;switch(i.cmd){case a:m.isChrome=e(i.isChrome),m.fetchStream(i.url,JSON.parse(i.options));break;case o:m.destroy(),m=null,postMessage({cmd:n})}}}.toString()),t=new Blob([e],{type:"text/javascript"});let i=URL.createObjectURL(t);const s=new Worker(i);this.workerUrl=i,this.workerClearTimeout=setTimeout((()=>{window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null,this.workerClearTimeout=null}),ie),s.onmessage=e=>{const{demux:t}=this.player,i=e.data;switch(i.cmd){case rt:this.streamRate&&this.streamRate(i.buffer.byteLength),t.dispatch(i.buffer);break;case nt:this.emit(lt.streamSuccess),this._startStreamRateInterval();break;case ot:t.close(),this.emit(lt.streamEnd,"fetch done");break;case at:t.close(),this.emit(ut.fetchError,i.message);break;case st:this._destroy()}},this.fetchWorker=s}_startStreamRateInterval(){this._stopStreamRateInterval(),this.streamRateInterval=setInterval((()=>{this.streamRate&&this.streamRate(0)}),1e3)}_stopStreamRateInterval(){this.streamRateInterval&&(clearInterval(this.streamRateInterval),this.streamRateInterval=null)}fetchStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.player._times.streamStart=ha(),this.fetchWorker.postMessage({cmd:tt,url:e,isChrome:Xa(),options:JSON.stringify(t)})}getStreamType(){return p}}class _n extends a{constructor(e){super(),this.player=e,this.socket=null,this.socketStatus=pt,this.wsUrl=null,this.requestAbort=!1,this.socketDestroyFnList=[],this.streamRate=ma((t=>{e.emit(lt.kBps,(t/1024).toFixed(2))})),this.streamRateInterval=null,e.debug.log("WebsocketStream","init")}async destroy(){this._closeWebSocket(),this.stopStreamRateInterval(),this.wsUrl=null,this.off(),this.player.debug.log("WebsocketStream","destroy")}startStreamRateInterval(){this.stopStreamRateInterval(),this.streamRateInterval=setInterval((()=>{this.streamRate&&this.streamRate(0)}),1e3)}stopStreamRateInterval(){this.streamRateInterval&&(clearInterval(this.streamRateInterval),this.streamRateInterval=null)}_createWebSocket(){const e=this.player,{debug:t,events:{proxy:i},demux:s}=e;this.socket=new WebSocket(this.wsUrl),this.socket.binaryType="arraybuffer";const r=i(this.socket,"open",(()=>{t.log("WebsocketStream","socket open"),this.socketStatus=ft,this.emit(lt.streamSuccess),this.player.emit(lt.websocketOpen),this.startStreamRateInterval()})),a=i(this.socket,"message",(e=>{"string"!=typeof e.data?(this.streamRate&&this.streamRate(e.data.byteLength),this._handleMessage(e.data)):this.player.debug.warn("WebsocketStream",`websocket handle message message is "${e.data}" string so return`)})),o=i(this.socket,"close",(e=>{if(this.socketStatus!==gt){if(t.log("WebsocketStream",`socket close and code is ${e.code}`),1006===e.code&&t.error("WebsocketStream",`socket close abnormally and code is ${e.code}`),yo(this.requestAbort))return this.requestAbort=!1,void t.log("WebsocketStream","socket close and requestAbort is true");s.close(),this.socketStatus=mt,this.player.emit(lt.websocketClose,e.code),this.emit(lt.streamEnd,e.code)}else t.log("WebsocketStream","socket close and status is error, so return")})),n=i(this.socket,"error",(e=>{t.error("WebsocketStream","socket error",e),this.socketStatus=gt,this.emit(ut.websocketError,e),s.close(),t.log("WebsocketStream","socket error:",e.isTrusted?"websocket user aborted":"websocket error")}));this.socketDestroyFnList.push(r,a,o,n)}_closeWebSocket(){this.socketDestroyFnList.forEach((e=>e())),!this.socket||0!==this.socket.readyState&&1!==this.socket.readyState?this.socket&&this.player.debug.log("WebsocketStream",`_closeWebSocket() socket is null or socket status is ${this.socket&&this.socket.readyState}`):(this.requestAbort=!0,this.socket.close(1e3,"Client disconnecting")),this.socket=null,this.socketStatus=pt,this.streamRate=null}_handleMessage(e){const{demux:t}=this.player;t?t.dispatch(e):this.player.debug.warn("WebsocketStream","websocket handle message demux is null so return")}fetchStream(e,t){this.player._times.streamStart=ha(),this.wsUrl=e,this._createWebSocket()}sendMessage(e){this.socket?this.socketStatus===ft?this.socket.send(e):this.player.debug.error("WebsocketStream",`websocket send message error and socket status is ${this.socketStatus}`):this.player.debug.error("WebsocketStream","websocket send message socket is null")}resetFetchStream(){this._closeWebSocket(),this._createWebSocket()}getStreamType(){return m}}class vn extends a{constructor(e){super(),this.player=e,e.debug.log("HlsStream","init")}async destroy(){return this.off(),this.player.debug.log("HlsStream","destroy"),!0}fetchStream(e){const{hlsDecoder:t,debug:i}=this.player;this.player._times.streamStart=ha(),t.loadSource(e).then((()=>{this.player.debug.log("HlsStream","loadSource success"),this.emit(lt.streamSuccess)})).catch((e=>{this.emit(ut.hlsError,e)}))}getStreamType(){return f}}class wn extends a{constructor(e){super(),this.player=e,this.webrctUrl=null,e.debug.log("WebrtcStream","init")}async destroy(){return this.webrctUrl=null,this.off(),this.player.debug.log("WebrtcStream","destroy"),!0}fetchStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{webrtc:i,debug:s}=this.player;if(this.player._times.streamStart=ha(),this.webrctUrl=e.replace("webrtc:",window.location.protocol),-1===this.webrctUrl.indexOf("/webrtc/play")&&this.player.isWebrtcForM7S()){const t=new URL(this.webrctUrl),i="/webrtc/play"+t.pathname;this.webrctUrl=t.origin+i+t.search,this.player.debug.log("WebrtcStream",`original url is ${e}, and new url is: ${this.webrctUrl}`)}i.loadSource(this.webrctUrl,t).then((()=>{this.player.debug.log("WebrtcStream","loadSource success"),this.emit(lt.streamSuccess)})).catch((e=>{this.player.debug.error("WebrtcStream","loadSource error",e),this.emit(ut.webrtcError,e)}))}getStreamType(){return g}}class Sn extends a{constructor(e){super(),this.player=e,this.transport=null,this.wtUrl=null,this.streamRate=ma((t=>{e.emit(lt.kBps,(t/1024).toFixed(2))})),this.streamRateInterval=null,e.debug.log("WebTransportLoader","init")}async destroy(){return this.abort(),this.off(),this.player.debug.log("WebTransportLoader","destroy"),!0}startStreamRateInterval(){this.stopStreamRateInterval(),this.streamRateInterval=setInterval((()=>{this.streamRate&&this.streamRate(0)}),1e3)}stopStreamRateInterval(){this.streamRateInterval&&(clearInterval(this.streamRateInterval),this.streamRateInterval=null)}_createWebTransport(){const e=this.player,{debug:t,events:{proxy:i},demux:s}=e;try{this.transport=new WebTransport(this.wtUrl),this.transport.ready.then((()=>{this.emit(lt.streamSuccess),this.startStreamRateInterval(),this.transport.createBidirectionalStream().then((e=>{e.readable.pipeTo(new WritableStream(s.input))}))})).catch((e=>{this.player.debug.warn("WebTransportLoader","_createWebTransport-ready",e)}))}catch(e){this.player.debug.warn("WebTransportLoader","_createWebTransport",e)}}fetchStream(e){this.player._times.streamStart=ha(),this.wtUrl=e.replace(/^wt:/,"https:"),this._createWebTransport()}abort(){if(this.transport)try{this.transport.close(),this.transport=null}catch(e){this.transport=null}}getStreamType(){return y}}class Tn extends a{constructor(e){super(),this.player=e,this.workUrl=null,e.debug.log("WorkerStream","init")}async destroy(){return this.workUrl=null,this.off(),this.player.debug.log("WorkerStream","destroy"),!0}sendMessage(e){this.player.decoderWorker.workerSendMessage(e)}fetchStream(e){this.workUrl=e,this.player._times.streamStart=ha(),this.player.decoderWorker.workerFetchStream(e)}getStreamType(){const e=this.player._opt.protocol;return A+" "+(e===n?p:m)}}class En extends a{constructor(e){super(),this.TAG_NAME="AliyunRtcLoader",this.player=e,e.debug.log(this.TAG_NAME,"init")}async destroy(){return this.off(),this.player.debug.log(this.TAG_NAME,"destroy"),!0}fetchStream(e){const{aliyunRtcDecoder:t}=this.player;this.player._times.streamStart=ha(),t.loadSource(e).then((()=>{this.player.debug.log(this.TAG_NAME,"loadSource success"),this.emit(lt.streamSuccess)})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource error",e),this.emit(ut.aliyunRtcError,e)}))}getStreamType(){return b}}class kn{constructor(e){return new(kn.getLoaderFactory(e._opt))(e)}static getLoaderFactory(e){const{protocol:t,useWasm:i,playType:s,useWCS:r,useMSE:a,demuxUseWorker:u,mainThreadFetchUseWorker:p}=e;return t===n?s===v?Tn:s===_?i&&!ro(e)||u?Tn:p?bn:An:r||a?u?Tn:p?bn:An:Tn:t===o?s===v?Tn:s===_?i&&!ro(e)||u?Tn:_n:r||a?u?Tn:_n:Tn:t===l?vn:t===d?wn:t===h?Sn:t===c?En:void 0}}var Cn=Nr((function(e){function t(e,r){if(!e)throw"First parameter is required.";r=new i(e,r=r||{type:"video"});var a=this;function o(t){t&&(r.initCallback=function(){t(),t=r.initCallback=null});var i=new s(e,r);(p=new i(e,r)).record(),u("recording"),r.disableLogs||console.log("Initialized recorderType:",p.constructor.name,"for output-type:",r.type)}function n(e){if(e=e||function(){},p){if("paused"===a.state)return a.resumeRecording(),void setTimeout((function(){n(e)}),1);"recording"===a.state||r.disableLogs||console.warn('Recording state should be: "recording", however current state is: ',a.state),r.disableLogs||console.log("Stopped recording "+r.type+" stream."),"gif"!==r.type?p.stop(t):(p.stop(),t()),u("stopped")}else m();function t(t){if(p){Object.keys(p).forEach((function(e){"function"!=typeof p[e]&&(a[e]=p[e])}));var i=p.blob;if(!i){if(!t)throw"Recording failed.";p.blob=i=t}if(i&&!r.disableLogs&&console.log(i.type,"->",y(i.size)),e){var s;try{s=h.createObjectURL(i)}catch(e){}"function"==typeof e.call?e.call(a,s):e(s)}r.autoWriteToDisk&&d((function(e){var t={};t[r.type+"Blob"]=e,R.Store(t)}))}else"function"==typeof e.call?e.call(a,""):e("")}}function l(e){postMessage((new FileReaderSync).readAsDataURL(e))}function d(e,t){if(!e)throw"Pass a callback function over getDataURL.";var i=t?t.blob:(p||{}).blob;if(!i)return r.disableLogs||console.warn("Blob encoder did not finish its job yet."),void setTimeout((function(){d(e,t)}),1e3);if("undefined"==typeof Worker||navigator.mozGetUserMedia){var s=new FileReader;s.readAsDataURL(i),s.onload=function(t){e(t.target.result)}}else{var a=function(e){try{var t=h.createObjectURL(new Blob([e.toString(),"this.onmessage = function (eee) {"+e.name+"(eee.data);}"],{type:"application/javascript"})),i=new Worker(t);return h.revokeObjectURL(t),i}catch(e){}}(l);a.onmessage=function(t){e(t.data)},a.postMessage(i)}}function c(e){e=e||0,"paused"!==a.state?"stopped"!==a.state&&(e>=a.recordingDuration?n(a.onRecordingStopped):(e+=1e3,setTimeout((function(){c(e)}),1e3))):setTimeout((function(){c(e)}),1e3)}function u(e){a&&(a.state=e,"function"==typeof a.onStateChanged.call?a.onStateChanged.call(a,e):a.onStateChanged(e))}var p,f='It seems that recorder is destroyed or "startRecording" is not invoked for '+r.type+" recorder.";function m(){!0!==r.disableLogs&&console.warn(f)}var g={startRecording:function(t){return r.disableLogs||console.log("RecordRTC version: ",a.version),t&&(r=new i(e,t)),r.disableLogs||console.log("started recording "+r.type+" stream."),p?(p.clearRecordedData(),p.record(),u("recording"),a.recordingDuration&&c(),a):(o((function(){a.recordingDuration&&c()})),a)},stopRecording:n,pauseRecording:function(){p?"recording"===a.state?(u("paused"),p.pause(),r.disableLogs||console.log("Paused recording.")):r.disableLogs||console.warn("Unable to pause the recording. Recording state: ",a.state):m()},resumeRecording:function(){p?"paused"===a.state?(u("recording"),p.resume(),r.disableLogs||console.log("Resumed recording.")):r.disableLogs||console.warn("Unable to resume the recording. Recording state: ",a.state):m()},initRecorder:o,setRecordingDuration:function(e,t){if(void 0===e)throw"recordingDuration is required.";if("number"!=typeof e)throw"recordingDuration must be a number.";return a.recordingDuration=e,a.onRecordingStopped=t||function(){},{onRecordingStopped:function(e){a.onRecordingStopped=e}}},clearRecordedData:function(){p?(p.clearRecordedData(),r.disableLogs||console.log("Cleared old recorded data.")):m()},getBlob:function(){if(p)return p.blob;m()},getDataURL:d,toURL:function(){if(p)return h.createObjectURL(p.blob);m()},getInternalRecorder:function(){return p},save:function(e){p?A(p.blob,e):m()},getFromDisk:function(e){p?t.getFromDisk(r.type,e):m()},setAdvertisementArray:function(e){r.advertisement=[];for(var t=e.length,i=0;i<t;i++)r.advertisement.push({duration:i,image:e[i]})},blob:null,bufferSize:0,sampleRate:0,buffer:null,reset:function(){"recording"!==a.state||r.disableLogs||console.warn("Stop an active recorder."),p&&"function"==typeof p.clearRecordedData&&p.clearRecordedData(),p=null,u("inactive"),a.blob=null},onStateChanged:function(e){r.disableLogs||console.log("Recorder state changed:",e)},state:"inactive",getState:function(){return a.state},destroy:function(){var e=r.disableLogs;r={disableLogs:!0},a.reset(),u("destroyed"),g=a=null,w.AudioContextConstructor&&(w.AudioContextConstructor.close(),w.AudioContextConstructor=null),r.disableLogs=e,r.disableLogs||console.log("RecordRTC is destroyed.")},version:"5.6.2"};if(!this)return a=g,g;for(var b in g)this[b]=g[b];return a=this,g}function i(e,t){return t.recorderType||t.type||(t.audio&&t.video?t.type="video":t.audio&&!t.video&&(t.type="audio")),t.recorderType&&!t.type&&(t.recorderType===C||t.recorderType===k||t.recorderType===P?t.type="video":t.recorderType===D?t.type="gif":t.recorderType===E?t.type="audio":t.recorderType===T&&(_(e,"audio").length&&_(e,"video").length||!_(e,"audio").length&&_(e,"video").length?t.type="video":_(e,"audio").length&&!_(e,"video").length&&(t.type="audio"))),"undefined"!=typeof MediaRecorder&&"requestData"in MediaRecorder.prototype&&(t.mimeType||(t.mimeType="video/webm"),t.type||(t.type=t.mimeType.split("/")[0]),t.bitsPerSecond),t.type||(t.mimeType&&(t.type=t.mimeType.split("/")[0]),t.type||(t.type="audio")),t}function s(e,t){var i;return(f||c||u)&&(i=E),"undefined"!=typeof MediaRecorder&&"requestData"in MediaRecorder.prototype&&!f&&(i=T),"video"===t.type&&(f||u)&&(i=C,"undefined"!=typeof ReadableStream&&(i=P)),"gif"===t.type&&(i=D),"canvas"===t.type&&(i=k),S()&&i!==k&&i!==D&&"undefined"!=typeof MediaRecorder&&"requestData"in MediaRecorder.prototype&&(_(e,"video").length||_(e,"audio").length)&&("audio"===t.type?"function"==typeof MediaRecorder.isTypeSupported&&MediaRecorder.isTypeSupported("audio/webm")&&(i=T):"function"==typeof MediaRecorder.isTypeSupported&&MediaRecorder.isTypeSupported("video/webm")&&(i=T)),e instanceof Array&&e.length&&(i=I),t.recorderType&&(i=t.recorderType),!t.disableLogs&&i&&i.name&&console.log("Using recorderType:",i.name||i.constructor.name),!i&&m&&(i=T),i}function r(e){this.addStream=function(t){t&&(e=t)},this.mediaType={audio:!0,video:!0},this.startRecording=function(){var i,s=this.mediaType,r=this.mimeType||{audio:null,video:null,gif:null};if("function"!=typeof s.audio&&S()&&!_(e,"audio").length&&(s.audio=!1),"function"!=typeof s.video&&S()&&!_(e,"video").length&&(s.video=!1),"function"!=typeof s.gif&&S()&&!_(e,"video").length&&(s.gif=!1),!s.audio&&!s.video&&!s.gif)throw"MediaStream must have either audio or video tracks.";if(s.audio&&(i=null,"function"==typeof s.audio&&(i=s.audio),this.audioRecorder=new t(e,{type:"audio",bufferSize:this.bufferSize,sampleRate:this.sampleRate,numberOfAudioChannels:this.numberOfAudioChannels||2,disableLogs:this.disableLogs,recorderType:i,mimeType:r.audio,timeSlice:this.timeSlice,onTimeStamp:this.onTimeStamp}),s.video||this.audioRecorder.startRecording()),s.video){i=null,"function"==typeof s.video&&(i=s.video);var a=e;if(S()&&s.audio&&"function"==typeof s.audio){var o=_(e,"video")[0];p?((a=new g).addTrack(o),i&&i===C&&(i=T)):(a=new g).addTrack(o)}this.videoRecorder=new t(a,{type:"video",video:this.video,canvas:this.canvas,frameInterval:this.frameInterval||10,disableLogs:this.disableLogs,recorderType:i,mimeType:r.video,timeSlice:this.timeSlice,onTimeStamp:this.onTimeStamp,workerPath:this.workerPath,webAssemblyPath:this.webAssemblyPath,frameRate:this.frameRate,bitrate:this.bitrate}),s.audio||this.videoRecorder.startRecording()}if(s.audio&&s.video){var n=this,l=!0===S();(s.audio instanceof E&&s.video||!0!==s.audio&&!0!==s.video&&s.audio!==s.video)&&(l=!1),!0===l?(n.audioRecorder=null,n.videoRecorder.startRecording()):n.videoRecorder.initRecorder((function(){n.audioRecorder.initRecorder((function(){n.videoRecorder.startRecording(),n.audioRecorder.startRecording()}))}))}s.gif&&(i=null,"function"==typeof s.gif&&(i=s.gif),this.gifRecorder=new t(e,{type:"gif",frameRate:this.frameRate||200,quality:this.quality||10,disableLogs:this.disableLogs,recorderType:i,mimeType:r.gif}),this.gifRecorder.startRecording())},this.stopRecording=function(e){e=e||function(){},this.audioRecorder&&this.audioRecorder.stopRecording((function(t){e(t,"audio")})),this.videoRecorder&&this.videoRecorder.stopRecording((function(t){e(t,"video")})),this.gifRecorder&&this.gifRecorder.stopRecording((function(t){e(t,"gif")}))},this.pauseRecording=function(){this.audioRecorder&&this.audioRecorder.pauseRecording(),this.videoRecorder&&this.videoRecorder.pauseRecording(),this.gifRecorder&&this.gifRecorder.pauseRecording()},this.resumeRecording=function(){this.audioRecorder&&this.audioRecorder.resumeRecording(),this.videoRecorder&&this.videoRecorder.resumeRecording(),this.gifRecorder&&this.gifRecorder.resumeRecording()},this.getBlob=function(e){var t={};return this.audioRecorder&&(t.audio=this.audioRecorder.getBlob()),this.videoRecorder&&(t.video=this.videoRecorder.getBlob()),this.gifRecorder&&(t.gif=this.gifRecorder.getBlob()),e&&e(t),t},this.destroy=function(){this.audioRecorder&&(this.audioRecorder.destroy(),this.audioRecorder=null),this.videoRecorder&&(this.videoRecorder.destroy(),this.videoRecorder=null),this.gifRecorder&&(this.gifRecorder.destroy(),this.gifRecorder=null)},this.getDataURL=function(e){function t(e,t){if("undefined"!=typeof Worker){var i=function(e){var t,i=h.createObjectURL(new Blob([e.toString(),"this.onmessage = function (eee) {"+e.name+"(eee.data);}"],{type:"application/javascript"})),s=new Worker(i);if(void 0!==h)t=h;else{if("undefined"==typeof webkitURL)throw"Neither URL nor webkitURL detected.";t=webkitURL}return t.revokeObjectURL(i),s}((function(e){postMessage((new FileReaderSync).readAsDataURL(e))}));i.onmessage=function(e){t(e.data)},i.postMessage(e)}else{var s=new FileReader;s.readAsDataURL(e),s.onload=function(e){t(e.target.result)}}}this.getBlob((function(i){i.audio&&i.video?t(i.audio,(function(s){t(i.video,(function(t){e({audio:s,video:t})}))})):i.audio?t(i.audio,(function(t){e({audio:t})})):i.video&&t(i.video,(function(t){e({video:t})}))}))},this.writeToDisk=function(){t.writeToDisk({audio:this.audioRecorder,video:this.videoRecorder,gif:this.gifRecorder})},this.save=function(e){(e=e||{audio:!0,video:!0,gif:!0}).audio&&this.audioRecorder&&this.audioRecorder.save("string"==typeof e.audio?e.audio:""),e.video&&this.videoRecorder&&this.videoRecorder.save("string"==typeof e.video?e.video:""),e.gif&&this.gifRecorder&&this.gifRecorder.save("string"==typeof e.gif?e.gif:"")}}t.version="5.6.2",e.exports=t,t.getFromDisk=function(e,t){if(!t)throw"callback is mandatory.";console.log("Getting recorded "+("all"===e?"blobs":e+" blob ")+" from disk!"),R.Fetch((function(i,s){"all"!==e&&s===e+"Blob"&&t&&t(i),"all"===e&&t&&t(i,s.replace("Blob",""))}))},t.writeToDisk=function(e){console.log("Writing recorded blob(s) to disk!"),(e=e||{}).audio&&e.video&&e.gif?e.audio.getDataURL((function(t){e.video.getDataURL((function(i){e.gif.getDataURL((function(e){R.Store({audioBlob:t,videoBlob:i,gifBlob:e})}))}))})):e.audio&&e.video?e.audio.getDataURL((function(t){e.video.getDataURL((function(e){R.Store({audioBlob:t,videoBlob:e})}))})):e.audio&&e.gif?e.audio.getDataURL((function(t){e.gif.getDataURL((function(e){R.Store({audioBlob:t,gifBlob:e})}))})):e.video&&e.gif?e.video.getDataURL((function(t){e.gif.getDataURL((function(e){R.Store({videoBlob:t,gifBlob:e})}))})):e.audio?e.audio.getDataURL((function(e){R.Store({audioBlob:e})})):e.video?e.video.getDataURL((function(e){R.Store({videoBlob:e})})):e.gif&&e.gif.getDataURL((function(e){R.Store({gifBlob:e})}))},r.getFromDisk=t.getFromDisk,r.writeToDisk=t.writeToDisk,t.MRecordRTC=r;var a;(a=void 0!==Or?Or:null)&&"undefined"==typeof window&&void 0!==Or&&(Or.navigator={userAgent:"Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45",getUserMedia:function(){}},Or.console||(Or.console={}),void 0!==Or.console.log&&void 0!==Or.console.error||(Or.console.error=Or.console.log=Or.console.log||function(){console.log(arguments)}),"undefined"==typeof document&&(a.document={documentElement:{appendChild:function(){return""}}},document.createElement=document.captureStream=document.mozCaptureStream=function(){var e={getContext:function(){return e},play:function(){},pause:function(){},drawImage:function(){},toDataURL:function(){return""},style:{}};return e},a.HTMLVideoElement=function(){}),"undefined"==typeof location&&(a.location={protocol:"file:",href:"",hash:""}),"undefined"==typeof screen&&(a.screen={width:0,height:0}),void 0===h&&(a.URL={createObjectURL:function(){return""},revokeObjectURL:function(){return""}}),a.window=Or);var o=window.requestAnimationFrame;if(void 0===o)if("undefined"!=typeof webkitRequestAnimationFrame)o=webkitRequestAnimationFrame;else if("undefined"!=typeof mozRequestAnimationFrame)o=mozRequestAnimationFrame;else if("undefined"!=typeof msRequestAnimationFrame)o=msRequestAnimationFrame;else if(void 0===o){var n=0;o=function(e,t){var i=(new Date).getTime(),s=Math.max(0,16-(i-n)),r=setTimeout((function(){e(i+s)}),s);return n=i+s,r}}var l=window.cancelAnimationFrame;void 0===l&&("undefined"!=typeof webkitCancelAnimationFrame?l=webkitCancelAnimationFrame:"undefined"!=typeof mozCancelAnimationFrame?l=mozCancelAnimationFrame:"undefined"!=typeof msCancelAnimationFrame?l=msCancelAnimationFrame:void 0===l&&(l=function(e){clearTimeout(e)}));var d=window.AudioContext;void 0===d&&("undefined"!=typeof webkitAudioContext&&(d=webkitAudioContext),"undefined"!=typeof mozAudioContext&&(d=mozAudioContext));var h=window.URL;void 0===h&&"undefined"!=typeof webkitURL&&(h=webkitURL),"undefined"!=typeof navigator&&void 0===navigator.getUserMedia&&(void 0!==navigator.webkitGetUserMedia&&(navigator.getUserMedia=navigator.webkitGetUserMedia),void 0!==navigator.mozGetUserMedia&&(navigator.getUserMedia=navigator.mozGetUserMedia));var c=!(-1===navigator.userAgent.indexOf("Edge")||!navigator.msSaveBlob&&!navigator.msSaveOrOpenBlob),u=!!window.opera||-1!==navigator.userAgent.indexOf("OPR/"),p=navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&"netscape"in window&&/ rv:/.test(navigator.userAgent),f=!u&&!c&&!!navigator.webkitGetUserMedia||b()||-1!==navigator.userAgent.toLowerCase().indexOf("chrome/"),m=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);m&&!f&&-1!==navigator.userAgent.indexOf("CriOS")&&(m=!1,f=!0);var g=window.MediaStream;function y(e){if(0===e)return"0 Bytes";var t=parseInt(Math.floor(Math.log(e)/Math.log(1e3)),10);return(e/Math.pow(1e3,t)).toPrecision(3)+" "+["Bytes","KB","MB","GB","TB"][t]}function A(e,t){if(!e)throw"Blob object is required.";if(!e.type)try{e.type="video/webm"}catch(e){}var i=(e.type||"video/webm").split("/")[1];if(-1!==i.indexOf(";")&&(i=i.split(";")[0]),t&&-1!==t.indexOf(".")){var s=t.split(".");t=s[0],i=s[1]}var r=(t||Math.round(9999999999*Math.random())+888888888)+"."+i;if(void 0!==navigator.msSaveOrOpenBlob)return navigator.msSaveOrOpenBlob(e,r);if(void 0!==navigator.msSaveBlob)return navigator.msSaveBlob(e,r);var a=document.createElement("a");a.href=h.createObjectURL(e),a.download=r,a.style="display:none;opacity:0;color:transparent;",(document.body||document.documentElement).appendChild(a),"function"==typeof a.click?a.click():(a.target="_blank",a.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0}))),h.revokeObjectURL(a.href)}function b(){return"undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type||(!("undefined"==typeof process||"object"!=typeof process.versions||!process.versions.electron)||"object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Electron")>=0)}function _(e,t){return e&&e.getTracks?e.getTracks().filter((function(e){return e.kind===(t||"audio")})):[]}function v(e,t){"srcObject"in t?t.srcObject=e:"mozSrcObject"in t?t.mozSrcObject=e:t.srcObject=e}void 0===g&&"undefined"!=typeof webkitMediaStream&&(g=webkitMediaStream),void 0!==g&&void 0===g.prototype.stop&&(g.prototype.stop=function(){this.getTracks().forEach((function(e){e.stop()}))}),t.invokeSaveAsDialog=A,t.getTracks=_,t.getSeekableBlob=function(e,t){if("undefined"==typeof EBML)throw new Error("Please link: https://www.webrtc-experiment.com/EBML.js");var i=new EBML.Reader,s=new EBML.Decoder,r=EBML.tools,a=new FileReader;a.onload=function(e){s.decode(this.result).forEach((function(e){i.read(e)})),i.stop();var a=r.makeMetadataSeekable(i.metadatas,i.duration,i.cues),o=this.result.slice(i.metadataSize),n=new Blob([a,o],{type:"video/webm"});t(n)},a.readAsArrayBuffer(e)},t.bytesToSize=y,t.isElectron=b;var w={};function S(){if(p||m||c)return!0;var e,t,i=navigator.userAgent,s=""+parseFloat(navigator.appVersion),r=parseInt(navigator.appVersion,10);return(f||u)&&(e=i.indexOf("Chrome"),s=i.substring(e+7)),-1!==(t=s.indexOf(";"))&&(s=s.substring(0,t)),-1!==(t=s.indexOf(" "))&&(s=s.substring(0,t)),r=parseInt(""+s,10),isNaN(r)&&(s=""+parseFloat(navigator.appVersion),r=parseInt(navigator.appVersion,10)),r>=49}function T(e,t){var i=this;if(void 0===e)throw'First argument "MediaStream" is required.';if("undefined"==typeof MediaRecorder)throw"Your browser does not support the Media Recorder API. Please try other modules e.g. WhammyRecorder or StereoAudioRecorder.";if("audio"===(t=t||{mimeType:"video/webm"}).type){var s;if(_(e,"video").length&&_(e,"audio").length)navigator.mozGetUserMedia?(s=new g).addTrack(_(e,"audio")[0]):s=new g(_(e,"audio")),e=s;t.mimeType&&-1!==t.mimeType.toString().toLowerCase().indexOf("audio")||(t.mimeType=f?"audio/webm":"audio/ogg"),t.mimeType&&"audio/ogg"!==t.mimeType.toString().toLowerCase()&&navigator.mozGetUserMedia&&(t.mimeType="audio/ogg")}var r,a=[];function o(){i.timestamps.push((new Date).getTime()),"function"==typeof t.onTimeStamp&&t.onTimeStamp(i.timestamps[i.timestamps.length-1],i.timestamps)}function n(e){return r&&r.mimeType?r.mimeType:e.mimeType||"video/webm"}function l(){a=[],r=null,i.timestamps=[]}this.getArrayOfBlobs=function(){return a},this.record=function(){i.blob=null,i.clearRecordedData(),i.timestamps=[],d=[],a=[];var s=t;t.disableLogs||console.log("Passing following config over MediaRecorder API.",s),r&&(r=null),f&&!S()&&(s="video/vp8"),"function"==typeof MediaRecorder.isTypeSupported&&s.mimeType&&(MediaRecorder.isTypeSupported(s.mimeType)||(t.disableLogs||console.warn("MediaRecorder API seems unable to record mimeType:",s.mimeType),s.mimeType="audio"===t.type?"audio/webm":"video/webm"));try{r=new MediaRecorder(e,s),t.mimeType=s.mimeType}catch(t){r=new MediaRecorder(e)}s.mimeType&&!MediaRecorder.isTypeSupported&&"canRecordMimeType"in r&&!1===r.canRecordMimeType(s.mimeType)&&(t.disableLogs||console.warn("MediaRecorder API seems unable to record mimeType:",s.mimeType)),r.ondataavailable=function(e){if(e.data&&d.push("ondataavailable: "+y(e.data.size)),"number"!=typeof t.timeSlice)!e.data||!e.data.size||e.data.size<100||i.blob?i.recordingCallback&&(i.recordingCallback(new Blob([],{type:n(s)})),i.recordingCallback=null):(i.blob=t.getNativeBlob?e.data:new Blob([e.data],{type:n(s)}),i.recordingCallback&&(i.recordingCallback(i.blob),i.recordingCallback=null));else if(e.data&&e.data.size&&(a.push(e.data),o(),"function"==typeof t.ondataavailable)){var r=t.getNativeBlob?e.data:new Blob([e.data],{type:n(s)});t.ondataavailable(r)}},r.onstart=function(){d.push("started")},r.onpause=function(){d.push("paused")},r.onresume=function(){d.push("resumed")},r.onstop=function(){d.push("stopped")},r.onerror=function(e){e&&(e.name||(e.name="UnknownError"),d.push("error: "+e),t.disableLogs||(-1!==e.name.toString().toLowerCase().indexOf("invalidstate")?console.error("The MediaRecorder is not in a state in which the proposed operation is allowed to be executed.",e):-1!==e.name.toString().toLowerCase().indexOf("notsupported")?console.error("MIME type (",s.mimeType,") is not supported.",e):-1!==e.name.toString().toLowerCase().indexOf("security")?console.error("MediaRecorder security error",e):"OutOfMemory"===e.name?console.error("The UA has exhaused the available memory. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"IllegalStreamModification"===e.name?console.error("A modification to the stream has occurred that makes it impossible to continue recording. An example would be the addition of a Track while recording is occurring. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"OtherRecordingError"===e.name?console.error("Used for an fatal error other than those listed above. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"GenericError"===e.name?console.error("The UA cannot provide the codec or recording option that has been requested.",e):console.error("MediaRecorder Error",e)),function(e){if(!i.manuallyStopped&&r&&"inactive"===r.state)return delete t.timeslice,void r.start(6e5);setTimeout(void 0,1e3)}(),"inactive"!==r.state&&"stopped"!==r.state&&r.stop())},"number"==typeof t.timeSlice?(o(),r.start(t.timeSlice)):r.start(36e5),t.initCallback&&t.initCallback()},this.timestamps=[],this.stop=function(e){e=e||function(){},i.manuallyStopped=!0,r&&(this.recordingCallback=e,"recording"===r.state&&r.stop(),"number"==typeof t.timeSlice&&setTimeout((function(){i.blob=new Blob(a,{type:n(t)}),i.recordingCallback(i.blob)}),100))},this.pause=function(){r&&"recording"===r.state&&r.pause()},this.resume=function(){r&&"paused"===r.state&&r.resume()},this.clearRecordedData=function(){r&&"recording"===r.state&&i.stop(l),l()},this.getInternalRecorder=function(){return r},this.blob=null,this.getState=function(){return r&&r.state||"inactive"};var d=[];this.getAllStates=function(){return d},void 0===t.checkForInactiveTracks&&(t.checkForInactiveTracks=!1);i=this;!function s(){if(r&&!1!==t.checkForInactiveTracks)return!1===function(){if("active"in e){if(!e.active)return!1}else if("ended"in e&&e.ended)return!1;return!0}()?(t.disableLogs||console.log("MediaStream seems stopped."),void i.stop()):void setTimeout(s,1e3)}(),this.name="MediaStreamRecorder",this.toString=function(){return this.name}}function E(e,i){if(!_(e,"audio").length)throw"Your stream has no audio tracks.";var s,r=this,a=[],o=[],n=!1,l=0,d=2,c=(i=i||{}).desiredSampRate;function u(){if(!1===i.checkForInactiveTracks)return!0;if("active"in e){if(!e.active)return!1}else if("ended"in e&&e.ended)return!1;return!0}function p(e,t){function i(e,t){var i,s=e.numberOfAudioChannels,r=e.leftBuffers.slice(0),a=e.rightBuffers.slice(0),o=e.sampleRate,n=e.internalInterleavedLength,l=e.desiredSampRate;function d(e,t,i){var s=Math.round(e.length*(t/i)),r=[],a=Number((e.length-1)/(s-1));r[0]=e[0];for(var o=1;o<s-1;o++){var n=o*a,l=Number(Math.floor(n)).toFixed(),d=Number(Math.ceil(n)).toFixed(),c=n-l;r[o]=h(e[l],e[d],c)}return r[s-1]=e[e.length-1],r}function h(e,t,i){return e+(t-e)*i}function c(e,t){for(var i=new Float64Array(t),s=0,r=e.length,a=0;a<r;a++){var o=e[a];i.set(o,s),s+=o.length}return i}function u(e,t,i){for(var s=i.length,r=0;r<s;r++)e.setUint8(t+r,i.charCodeAt(r))}2===s&&(r=c(r,n),a=c(a,n),l&&(r=d(r,l,o),a=d(a,l,o))),1===s&&(r=c(r,n),l&&(r=d(r,l,o))),l&&(o=l),2===s&&(i=function(e,t){for(var i=e.length+t.length,s=new Float64Array(i),r=0,a=0;a<i;)s[a++]=e[r],s[a++]=t[r],r++;return s}(r,a)),1===s&&(i=r);var p=i.length,f=new ArrayBuffer(44+2*p),m=new DataView(f);u(m,0,"RIFF"),m.setUint32(4,36+2*p,!0),u(m,8,"WAVE"),u(m,12,"fmt "),m.setUint32(16,16,!0),m.setUint16(20,1,!0),m.setUint16(22,s,!0),m.setUint32(24,o,!0),m.setUint32(28,o*s*2,!0),m.setUint16(32,2*s,!0),m.setUint16(34,16,!0),u(m,36,"data"),m.setUint32(40,2*p,!0);for(var g=p,y=44,A=0;A<g;A++)m.setInt16(y,32767*i[A],!0),y+=2;if(t)return t({buffer:f,view:m});postMessage({buffer:f,view:m})}if(e.noWorker)i(e,(function(e){t(e.buffer,e.view)}));else{var s,r,a,o=(s=i,r=h.createObjectURL(new Blob([s.toString(),";this.onmessage = function (eee) {"+s.name+"(eee.data);}"],{type:"application/javascript"})),(a=new Worker(r)).workerURL=r,a);o.onmessage=function(e){t(e.data.buffer,e.data.view),h.revokeObjectURL(o.workerURL),o.terminate()},o.postMessage(e)}}!0===i.leftChannel&&(d=1),1===i.numberOfAudioChannels&&(d=1),(!d||d<1)&&(d=2),i.disableLogs||console.log("StereoAudioRecorder is set to record number of channels: "+d),void 0===i.checkForInactiveTracks&&(i.checkForInactiveTracks=!0),this.record=function(){if(!1===u())throw"Please make sure MediaStream is active.";v(),S=b=!1,n=!0,void 0!==i.timeSlice&&E()},this.stop=function(e){e=e||function(){},n=!1,p({desiredSampRate:c,sampleRate:A,numberOfAudioChannels:d,internalInterleavedLength:l,leftBuffers:a,rightBuffers:1===d?[]:o,noWorker:i.noWorker},(function(t,i){r.blob=new Blob([i],{type:"audio/wav"}),r.buffer=new ArrayBuffer(i.buffer.byteLength),r.view=i,r.sampleRate=c||A,r.bufferSize=y,r.length=l,S=!1,e&&e(r.blob)}))},void 0===t.Storage&&(t.Storage={AudioContextConstructor:null,AudioContext:window.AudioContext||window.webkitAudioContext}),t.Storage.AudioContextConstructor&&"closed"!==t.Storage.AudioContextConstructor.state||(t.Storage.AudioContextConstructor=new t.Storage.AudioContext);var f=t.Storage.AudioContextConstructor,m=f.createMediaStreamSource(e),g=[0,256,512,1024,2048,4096,8192,16384],y=void 0===i.bufferSize?4096:i.bufferSize;if(-1===g.indexOf(y)&&(i.disableLogs||console.log("Legal values for buffer-size are "+JSON.stringify(g,null,"\t"))),f.createJavaScriptNode)s=f.createJavaScriptNode(y,d,d);else{if(!f.createScriptProcessor)throw"WebAudio API has no support on this browser.";s=f.createScriptProcessor(y,d,d)}m.connect(s),i.bufferSize||(y=s.bufferSize);var A=void 0!==i.sampleRate?i.sampleRate:f.sampleRate||44100;(A<22050||A>96e3)&&(i.disableLogs||console.log("sample-rate must be under range 22050 and 96000.")),i.disableLogs||i.desiredSampRate&&console.log("Desired sample-rate: "+i.desiredSampRate);var b=!1;function v(){a=[],o=[],l=0,S=!1,n=!1,b=!1,f=null,r.leftchannel=a,r.rightchannel=o,r.numberOfAudioChannels=d,r.desiredSampRate=c,r.sampleRate=A,r.recordingLength=l,T={left:[],right:[],recordingLength:0}}function w(){s&&(s.onaudioprocess=null,s.disconnect(),s=null),m&&(m.disconnect(),m=null),v()}this.pause=function(){b=!0},this.resume=function(){if(!1===u())throw"Please make sure MediaStream is active.";if(!n)return i.disableLogs||console.log("Seems recording has been restarted."),void this.record();b=!1},this.clearRecordedData=function(){i.checkForInactiveTracks=!1,n&&this.stop(w),w()},this.name="StereoAudioRecorder",this.toString=function(){return this.name};var S=!1;s.onaudioprocess=function(e){if(!b)if(!1===u()&&(i.disableLogs||console.log("MediaStream seems stopped."),s.disconnect(),n=!1),n){S||(S=!0,i.onAudioProcessStarted&&i.onAudioProcessStarted(),i.initCallback&&i.initCallback());var t=e.inputBuffer.getChannelData(0),h=new Float32Array(t);if(a.push(h),2===d){var c=e.inputBuffer.getChannelData(1),p=new Float32Array(c);o.push(p)}l+=y,r.recordingLength=l,void 0!==i.timeSlice&&(T.recordingLength+=y,T.left.push(h),2===d&&T.right.push(p))}else m&&(m.disconnect(),m=null)},f.createMediaStreamDestination?s.connect(f.createMediaStreamDestination()):s.connect(f.destination),this.leftchannel=a,this.rightchannel=o,this.numberOfAudioChannels=d,this.desiredSampRate=c,this.sampleRate=A,r.recordingLength=l;var T={left:[],right:[],recordingLength:0};function E(){n&&"function"==typeof i.ondataavailable&&void 0!==i.timeSlice&&(T.left.length?(p({desiredSampRate:c,sampleRate:A,numberOfAudioChannels:d,internalInterleavedLength:T.recordingLength,leftBuffers:T.left,rightBuffers:1===d?[]:T.right},(function(e,t){var s=new Blob([t],{type:"audio/wav"});i.ondataavailable(s),setTimeout(E,i.timeSlice)})),T={left:[],right:[],recordingLength:0}):setTimeout(E,i.timeSlice))}}function k(e,t){if("undefined"==typeof html2canvas)throw"Please link: https://www.webrtc-experiment.com/screenshot.js";(t=t||{}).frameInterval||(t.frameInterval=10);var i=!1;["captureStream","mozCaptureStream","webkitCaptureStream"].forEach((function(e){e in document.createElement("canvas")&&(i=!0)}));var s,r,a,o=!(!window.webkitRTCPeerConnection&&!window.webkitGetUserMedia||!window.chrome),n=50,l=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);if(o&&l&&l[2]&&(n=parseInt(l[2],10)),o&&n<52&&(i=!1),t.useWhammyRecorder&&(i=!1),i)if(t.disableLogs||console.log("Your browser supports both MediRecorder API and canvas.captureStream!"),e instanceof HTMLCanvasElement)s=e;else{if(!(e instanceof CanvasRenderingContext2D))throw"Please pass either HTMLCanvasElement or CanvasRenderingContext2D.";s=e.canvas}else navigator.mozGetUserMedia&&(t.disableLogs||console.error("Canvas recording is NOT supported in Firefox."));this.record=function(){if(a=!0,i&&!t.useWhammyRecorder){var e;"captureStream"in s?e=s.captureStream(25):"mozCaptureStream"in s?e=s.mozCaptureStream(25):"webkitCaptureStream"in s&&(e=s.webkitCaptureStream(25));try{var o=new g;o.addTrack(_(e,"video")[0]),e=o}catch(e){}if(!e)throw"captureStream API are NOT available.";(r=new T(e,{mimeType:t.mimeType||"video/webm"})).record()}else p.frames=[],u=(new Date).getTime(),c();t.initCallback&&t.initCallback()},this.getWebPImages=function(i){if("canvas"===e.nodeName.toLowerCase()){var s=p.frames.length;p.frames.forEach((function(e,i){var r=s-i;t.disableLogs||console.log(r+"/"+s+" frames remaining"),t.onEncodingCallback&&t.onEncodingCallback(r,s);var a=e.image.toDataURL("image/webp",1);p.frames[i].image=a})),t.disableLogs||console.log("Generating WebM"),i()}else i()},this.stop=function(e){a=!1;var s=this;i&&r?r.stop(e):this.getWebPImages((function(){p.compile((function(i){t.disableLogs||console.log("Recording finished!"),s.blob=i,s.blob.forEach&&(s.blob=new Blob([],{type:"video/webm"})),e&&e(s.blob),p.frames=[]}))}))};var d=!1;function h(){p.frames=[],a=!1,d=!1}function c(){if(d)return u=(new Date).getTime(),setTimeout(c,500);if("canvas"===e.nodeName.toLowerCase()){var i=(new Date).getTime()-u;return u=(new Date).getTime(),p.frames.push({image:(s=document.createElement("canvas"),r=s.getContext("2d"),s.width=e.width,s.height=e.height,r.drawImage(e,0,0),s),duration:i}),void(a&&setTimeout(c,t.frameInterval))}var s,r;html2canvas(e,{grabMouse:void 0===t.showMousePointer||t.showMousePointer,onrendered:function(e){var i=(new Date).getTime()-u;if(!i)return setTimeout(c,t.frameInterval);u=(new Date).getTime(),p.frames.push({image:e.toDataURL("image/webp",1),duration:i}),a&&setTimeout(c,t.frameInterval)}})}this.pause=function(){d=!0,r instanceof T&&r.pause()},this.resume=function(){d=!1,r instanceof T?r.resume():a||this.record()},this.clearRecordedData=function(){a&&this.stop(h),h()},this.name="CanvasRecorder",this.toString=function(){return this.name};var u=(new Date).getTime(),p=new x.Video(100)}function C(e,t){function i(e){e=void 0!==e?e:10;var t=(new Date).getTime()-l;return t?a?(l=(new Date).getTime(),setTimeout(i,100)):(l=(new Date).getTime(),n.paused&&n.play(),c.drawImage(n,0,0,h.width,h.height),d.frames.push({duration:t,image:h.toDataURL("image/webp")}),void(r||setTimeout(i,e,e))):setTimeout(i,e,e)}function s(e,t,i,s,r){var a=document.createElement("canvas");a.width=h.width,a.height=h.height;var o=a.getContext("2d"),n=[],l=-1===t,d=t&&t>0&&t<=e.length?t:e.length,c=0,u=0,p=0,f=Math.sqrt(Math.pow(255,2)+Math.pow(255,2)+Math.pow(255,2)),m=i&&i>=0&&i<=1?i:0,g=s&&s>=0&&s<=1?s:0,y=!1;!function(e){var t=-1,i=e.length;!function s(){++t!==i?setTimeout((function(){e.functionToLoop(s,t)}),1):e.callback()}()}({length:d,functionToLoop:function(t,i){var s,r,a,d=function(){!y&&a-s<=a*g||(l&&(y=!0),n.push(e[i])),t()};if(y)d();else{var A=new Image;A.onload=function(){o.drawImage(A,0,0,h.width,h.height);var e=o.getImageData(0,0,h.width,h.height);s=0,r=e.data.length,a=e.data.length/4;for(var t=0;t<r;t+=4){var i={r:e.data[t],g:e.data[t+1],b:e.data[t+2]};Math.sqrt(Math.pow(i.r-c,2)+Math.pow(i.g-u,2)+Math.pow(i.b-p,2))<=f*m&&s++}d()},A.src=e[i].image}},callback:function(){(n=n.concat(e.slice(d))).length<=0&&n.push(e[e.length-1]),r(n)}})}(t=t||{}).frameInterval||(t.frameInterval=10),t.disableLogs||console.log("Using frames-interval:",t.frameInterval),this.record=function(){t.width||(t.width=320),t.height||(t.height=240),t.video||(t.video={width:t.width,height:t.height}),t.canvas||(t.canvas={width:t.width,height:t.height}),h.width=t.canvas.width||320,h.height=t.canvas.height||240,c=h.getContext("2d"),t.video&&t.video instanceof HTMLVideoElement?(n=t.video.cloneNode(),t.initCallback&&t.initCallback()):(n=document.createElement("video"),v(e,n),n.onloadedmetadata=function(){t.initCallback&&t.initCallback()},n.width=t.video.width,n.height=t.video.height),n.muted=!0,n.play(),l=(new Date).getTime(),d=new x.Video,t.disableLogs||(console.log("canvas resolutions",h.width,"*",h.height),console.log("video width/height",n.width||h.width,"*",n.height||h.height)),i(t.frameInterval)};var r=!1;this.stop=function(e){e=e||function(){},r=!0;var i=this;setTimeout((function(){s(d.frames,-1,null,null,(function(s){d.frames=s,t.advertisement&&t.advertisement.length&&(d.frames=t.advertisement.concat(d.frames)),d.compile((function(t){i.blob=t,i.blob.forEach&&(i.blob=new Blob([],{type:"video/webm"})),e&&e(i.blob)}))}))}),10)};var a=!1;function o(){d.frames=[],r=!0,a=!1}this.pause=function(){a=!0},this.resume=function(){a=!1,r&&this.record()},this.clearRecordedData=function(){r||this.stop(o),o()},this.name="WhammyRecorder",this.toString=function(){return this.name};var n,l,d,h=document.createElement("canvas"),c=h.getContext("2d")}void 0!==d?w.AudioContext=d:"undefined"!=typeof webkitAudioContext&&(w.AudioContext=webkitAudioContext),t.Storage=w,t.MediaStreamRecorder=T,t.StereoAudioRecorder=E,t.CanvasRecorder=k,t.WhammyRecorder=C;var x=function(){function e(e){this.frames=[],this.duration=e||1,this.quality=.8}function t(e){function t(e,t,i){return[{data:e,id:231}].concat(i.map((function(e){var i=function(e){var t=0;e.keyframe&&(t|=128);e.invisible&&(t|=8);e.lacing&&(t|=e.lacing<<1);e.discardable&&(t|=1);if(e.trackNum>127)throw"TrackNumber > 127 not supported";return[128|e.trackNum,e.timecode>>8,255&e.timecode,t].map((function(e){return String.fromCharCode(e)})).join("")+e.frame}({discardable:0,frame:e.data.slice(4),invisible:0,keyframe:1,lacing:0,trackNum:1,timecode:Math.round(t)});return t+=e.duration,{data:i,id:163}})))}function i(e){for(var t=[];e>0;)t.push(255&e),e>>=8;return new Uint8Array(t.reverse())}function s(e){var t=[];e=(e.length%8?new Array(9-e.length%8).join("0"):"")+e;for(var i=0;i<e.length;i+=8)t.push(parseInt(e.substr(i,8),2));return new Uint8Array(t)}function r(e){for(var t=[],a=0;a<e.length;a++){var o=e[a].data;"object"==typeof o&&(o=r(o)),"number"==typeof o&&(o=s(o.toString(2))),"string"==typeof o&&(o=new Uint8Array(o.split("").map((function(e){return e.charCodeAt(0)}))));var n=o.size||o.byteLength||o.length,l=Math.ceil(Math.ceil(Math.log(n)/Math.log(2))/8),d=n.toString(2),h=new Array(7*l+7+1-d.length).join("0")+d,c=new Array(l).join("0")+"1"+h;t.push(i(e[a].id)),t.push(s(c)),t.push(o)}return new Blob(t,{type:"video/webm"})}function a(e,t){return parseInt(e.substr(t+4,4).split("").map((function(e){var t=e.charCodeAt(0).toString(2);return new Array(8-t.length+1).join("0")+t})).join(""),2)}function o(e){for(var t=0,i={};t<e.length;){var s=e.substr(t,4),r=a(e,t),n=e.substr(t+4+4,r);t+=8+r,i[s]=i[s]||[],"RIFF"===s||"LIST"===s?i[s].push(o(n)):i[s].push(n)}return i}var n=new function(e){var i=function(e){if(!e[0])return void postMessage({error:"Something went wrong. Maybe WebP format is not supported in the current browser."});for(var t=e[0].width,i=e[0].height,s=e[0].duration,r=1;r<e.length;r++)s+=e[r].duration;return{duration:s,width:t,height:i}}(e);if(!i)return[];for(var s,a=[{id:440786851,data:[{data:1,id:17030},{data:1,id:17143},{data:4,id:17138},{data:8,id:17139},{data:"webm",id:17026},{data:2,id:17031},{data:2,id:17029}]},{id:408125543,data:[{id:357149030,data:[{data:1e6,id:2807729},{data:"whammy",id:19840},{data:"whammy",id:22337},{data:(s=i.duration,[].slice.call(new Uint8Array(new Float64Array([s]).buffer),0).map((function(e){return String.fromCharCode(e)})).reverse().join("")),id:17545}]},{id:374648427,data:[{id:174,data:[{data:1,id:215},{data:1,id:29637},{data:0,id:156},{data:"und",id:2274716},{data:"V_VP8",id:134},{data:"VP8",id:2459272},{data:1,id:131},{id:224,data:[{data:i.width,id:176},{data:i.height,id:186}]}]}]}]}],o=0,n=0;o<e.length;){var l=[],d=0;do{l.push(e[o]),d+=e[o].duration,o++}while(o<e.length&&d<3e4);var h={id:524531317,data:t(n,0,l)};a[1].data.push(h),n+=d}return r(a)}(e.map((function(e){var t=function(e){for(var t=e.RIFF[0].WEBP[0],i=t.indexOf("*"),s=0,r=[];s<4;s++)r[s]=t.charCodeAt(i+3+s);return{width:16383&(r[1]<<8|r[0]),height:16383&(r[3]<<8|r[2]),data:t,riff:e}}(o(atob(e.image.slice(23))));return t.duration=e.duration,t})));postMessage(n)}return e.prototype.add=function(e,t){if("canvas"in e&&(e=e.canvas),"toDataURL"in e&&(e=e.toDataURL("image/webp",this.quality)),!/^data:image\/webp;base64,/gi.test(e))throw"Input must be formatted properly as a base64 encoded DataURI of type image/webp";this.frames.push({image:e,duration:t||this.duration})},e.prototype.compile=function(e){var i,s,r,a=(i=t,s=h.createObjectURL(new Blob([i.toString(),"this.onmessage = function (eee) {"+i.name+"(eee.data);}"],{type:"application/javascript"})),r=new Worker(s),h.revokeObjectURL(s),r);a.onmessage=function(t){t.data.error?console.error(t.data.error):e(t.data)},a.postMessage(this.frames)},{Video:e}}();t.Whammy=x;var R={init:function(){var e=this;if("undefined"!=typeof indexedDB&&void 0!==indexedDB.open){var t,i=this.dbName||location.href.replace(/\/|:|#|%|\.|\[|\]/g,""),s=indexedDB.open(i,1);s.onerror=e.onError,s.onsuccess=function(){((t=s.result).onerror=e.onError,t.setVersion)?1!==t.version?t.setVersion(1).onsuccess=function(){r(t),a()}:a():a()},s.onupgradeneeded=function(e){r(e.target.result)}}else console.error("IndexedDB API are not available in this browser.");function r(t){t.createObjectStore(e.dataStoreName)}function a(){var i=t.transaction([e.dataStoreName],"readwrite");function s(t){i.objectStore(e.dataStoreName).get(t).onsuccess=function(i){e.callback&&e.callback(i.target.result,t)}}e.videoBlob&&i.objectStore(e.dataStoreName).put(e.videoBlob,"videoBlob"),e.gifBlob&&i.objectStore(e.dataStoreName).put(e.gifBlob,"gifBlob"),e.audioBlob&&i.objectStore(e.dataStoreName).put(e.audioBlob,"audioBlob"),s("audioBlob"),s("videoBlob"),s("gifBlob")}},Fetch:function(e){return this.callback=e,this.init(),this},Store:function(e){return this.audioBlob=e.audioBlob,this.videoBlob=e.videoBlob,this.gifBlob=e.gifBlob,this.init(),this},onError:function(e){console.error(JSON.stringify(e,null,"\t"))},dataStoreName:"recordRTC",dbName:null};function D(e,t){if("undefined"==typeof GIFEncoder){var i=document.createElement("script");i.src="https://www.webrtc-experiment.com/gif-recorder.js",(document.body||document.documentElement).appendChild(i)}t=t||{};var s=e instanceof CanvasRenderingContext2D||e instanceof HTMLCanvasElement;this.record=function(){"undefined"!=typeof GIFEncoder&&d?(s||(t.width||(t.width=h.offsetWidth||320),t.height||(t.height=h.offsetHeight||240),t.video||(t.video={width:t.width,height:t.height}),t.canvas||(t.canvas={width:t.width,height:t.height}),a.width=t.canvas.width||320,a.height=t.canvas.height||240,h.width=t.video.width||320,h.height=t.video.height||240),(u=new GIFEncoder).setRepeat(0),u.setDelay(t.frameRate||200),u.setQuality(t.quality||10),u.start(),"function"==typeof t.onGifRecordingStarted&&t.onGifRecordingStarted(),p=o((function e(i){if(!0!==f.clearedRecordedData){if(r)return setTimeout((function(){e(i)}),100);p=o(e),void 0===typeof c&&(c=i),i-c<90||(!s&&h.paused&&h.play(),s||n.drawImage(h,0,0,a.width,a.height),t.onGifPreview&&t.onGifPreview(a.toDataURL("image/png")),u.addFrame(n),c=i)}})),t.initCallback&&t.initCallback()):setTimeout(f.record,1e3)},this.stop=function(e){e=e||function(){},p&&l(p),this.blob=new Blob([new Uint8Array(u.stream().bin)],{type:"image/gif"}),e(this.blob),u.stream().bin=[]};var r=!1;this.pause=function(){r=!0},this.resume=function(){r=!1},this.clearRecordedData=function(){f.clearedRecordedData=!0,u&&(u.stream().bin=[])},this.name="GifRecorder",this.toString=function(){return this.name};var a=document.createElement("canvas"),n=a.getContext("2d");s&&(e instanceof CanvasRenderingContext2D?a=(n=e).canvas:e instanceof HTMLCanvasElement&&(n=e.getContext("2d"),a=e));var d=!0;if(!s){var h=document.createElement("video");h.muted=!0,h.autoplay=!0,h.playsInline=!0,d=!1,h.onloadedmetadata=function(){d=!0},v(e,h),h.play()}var c,u,p=null,f=this}function L(e,t){t=t||"multi-streams-mixer";var i=[],s=!1,r=document.createElement("canvas"),a=r.getContext("2d");r.style.opacity=0,r.style.position="absolute",r.style.zIndex=-1,r.style.top="-1000em",r.style.left="-1000em",r.className=t,(document.body||document.documentElement).appendChild(r),this.disableLogs=!1,this.frameInterval=10,this.width=360,this.height=240,this.useGainNode=!0;var o=this,n=window.AudioContext;void 0===n&&("undefined"!=typeof webkitAudioContext&&(n=webkitAudioContext),"undefined"!=typeof mozAudioContext&&(n=mozAudioContext));var l=window.URL;void 0===l&&"undefined"!=typeof webkitURL&&(l=webkitURL),"undefined"!=typeof navigator&&void 0===navigator.getUserMedia&&(void 0!==navigator.webkitGetUserMedia&&(navigator.getUserMedia=navigator.webkitGetUserMedia),void 0!==navigator.mozGetUserMedia&&(navigator.getUserMedia=navigator.mozGetUserMedia));var d=window.MediaStream;void 0===d&&"undefined"!=typeof webkitMediaStream&&(d=webkitMediaStream),void 0!==d&&void 0===d.prototype.stop&&(d.prototype.stop=function(){this.getTracks().forEach((function(e){e.stop()}))});var h={};function c(){if(!s){var e=i.length,t=!1,a=[];if(i.forEach((function(e){e.stream||(e.stream={}),e.stream.fullcanvas?t=e:a.push(e)})),t)r.width=t.stream.width,r.height=t.stream.height;else if(a.length){r.width=e>1?2*a[0].width:a[0].width;var n=1;3!==e&&4!==e||(n=2),5!==e&&6!==e||(n=3),7!==e&&8!==e||(n=4),9!==e&&10!==e||(n=5),r.height=a[0].height*n}else r.width=o.width||360,r.height=o.height||240;t&&t instanceof HTMLVideoElement&&u(t),a.forEach((function(e,t){u(e,t)})),setTimeout(c,o.frameInterval)}}function u(e,t){if(!s){var i=0,r=0,o=e.width,n=e.height;1===t&&(i=e.width),2===t&&(r=e.height),3===t&&(i=e.width,r=e.height),4===t&&(r=2*e.height),5===t&&(i=e.width,r=2*e.height),6===t&&(r=3*e.height),7===t&&(i=e.width,r=3*e.height),void 0!==e.stream.left&&(i=e.stream.left),void 0!==e.stream.top&&(r=e.stream.top),void 0!==e.stream.width&&(o=e.stream.width),void 0!==e.stream.height&&(n=e.stream.height),a.drawImage(e,i,r,o,n),"function"==typeof e.stream.onRender&&e.stream.onRender(a,i,r,o,n,t)}}function p(e){var i=document.createElement("video");return function(e,t){"srcObject"in t?t.srcObject=e:"mozSrcObject"in t?t.mozSrcObject=e:t.srcObject=e}(e,i),i.className=t,i.muted=!0,i.volume=0,i.width=e.width||o.width||360,i.height=e.height||o.height||240,i.play(),i}function f(t){i=[],(t=t||e).forEach((function(e){if(e.getTracks().filter((function(e){return"video"===e.kind})).length){var t=p(e);t.stream=e,i.push(t)}}))}void 0!==n?h.AudioContext=n:"undefined"!=typeof webkitAudioContext&&(h.AudioContext=webkitAudioContext),this.startDrawingFrames=function(){c()},this.appendStreams=function(t){if(!t)throw"First parameter is required.";t instanceof Array||(t=[t]),t.forEach((function(t){var s=new d;if(t.getTracks().filter((function(e){return"video"===e.kind})).length){var r=p(t);r.stream=t,i.push(r),s.addTrack(t.getTracks().filter((function(e){return"video"===e.kind}))[0])}if(t.getTracks().filter((function(e){return"audio"===e.kind})).length){var a=o.audioContext.createMediaStreamSource(t);o.audioDestination=o.audioContext.createMediaStreamDestination(),a.connect(o.audioDestination),s.addTrack(o.audioDestination.stream.getTracks().filter((function(e){return"audio"===e.kind}))[0])}e.push(s)}))},this.releaseStreams=function(){i=[],s=!0,o.gainNode&&(o.gainNode.disconnect(),o.gainNode=null),o.audioSources.length&&(o.audioSources.forEach((function(e){e.disconnect()})),o.audioSources=[]),o.audioDestination&&(o.audioDestination.disconnect(),o.audioDestination=null),o.audioContext&&o.audioContext.close(),o.audioContext=null,a.clearRect(0,0,r.width,r.height),r.stream&&(r.stream.stop(),r.stream=null)},this.resetVideoStreams=function(e){!e||e instanceof Array||(e=[e]),f(e)},this.name="MultiStreamsMixer",this.toString=function(){return this.name},this.getMixedStream=function(){s=!1;var t=function(){var e;f(),"captureStream"in r?e=r.captureStream():"mozCaptureStream"in r?e=r.mozCaptureStream():o.disableLogs||console.error("Upgrade to latest Chrome or otherwise enable this flag: chrome://flags/#enable-experimental-web-platform-features");var t=new d;return e.getTracks().filter((function(e){return"video"===e.kind})).forEach((function(e){t.addTrack(e)})),r.stream=t,t}(),i=function(){h.AudioContextConstructor||(h.AudioContextConstructor=new h.AudioContext);o.audioContext=h.AudioContextConstructor,o.audioSources=[],!0===o.useGainNode&&(o.gainNode=o.audioContext.createGain(),o.gainNode.connect(o.audioContext.destination),o.gainNode.gain.value=0);var t=0;if(e.forEach((function(e){if(e.getTracks().filter((function(e){return"audio"===e.kind})).length){t++;var i=o.audioContext.createMediaStreamSource(e);!0===o.useGainNode&&i.connect(o.gainNode),o.audioSources.push(i)}})),!t)return;return o.audioDestination=o.audioContext.createMediaStreamDestination(),o.audioSources.forEach((function(e){e.connect(o.audioDestination)})),o.audioDestination.stream}();return i&&i.getTracks().filter((function(e){return"audio"===e.kind})).forEach((function(e){t.addTrack(e)})),e.forEach((function(e){e.fullcanvas})),t}}function I(e,t){e=e||[];var i,s,r=this;(t=t||{elementClass:"multi-streams-mixer",mimeType:"video/webm",video:{width:360,height:240}}).frameInterval||(t.frameInterval=10),t.video||(t.video={}),t.video.width||(t.video.width=360),t.video.height||(t.video.height=240),this.record=function(){var r;i=new L(e,t.elementClass||"multi-streams-mixer"),(r=[],e.forEach((function(e){_(e,"video").forEach((function(e){r.push(e)}))})),r).length&&(i.frameInterval=t.frameInterval||10,i.width=t.video.width||360,i.height=t.video.height||240,i.startDrawingFrames()),t.previewStream&&"function"==typeof t.previewStream&&t.previewStream(i.getMixedStream()),(s=new T(i.getMixedStream(),t)).record()},this.stop=function(e){s&&s.stop((function(t){r.blob=t,e(t),r.clearRecordedData()}))},this.pause=function(){s&&s.pause()},this.resume=function(){s&&s.resume()},this.clearRecordedData=function(){s&&(s.clearRecordedData(),s=null),i&&(i.releaseStreams(),i=null)},this.addStreams=function(r){if(!r)throw"First parameter is required.";r instanceof Array||(r=[r]),e.concat(r),s&&i&&(i.appendStreams(r),t.previewStream&&"function"==typeof t.previewStream&&t.previewStream(i.getMixedStream()))},this.resetVideoStreams=function(e){i&&(!e||e instanceof Array||(e=[e]),i.resetVideoStreams(e))},this.getMixer=function(){return i},this.name="MultiStreamRecorder",this.toString=function(){return this.name}}function P(e,t){var i,s,r;function a(){return new ReadableStream({start:function(s){var r=document.createElement("canvas"),a=document.createElement("video"),o=!0;a.srcObject=e,a.muted=!0,a.height=t.height,a.width=t.width,a.volume=0,a.onplaying=function(){r.width=t.width,r.height=t.height;var e=r.getContext("2d"),n=1e3/t.frameRate,l=setInterval((function(){if(i&&(clearInterval(l),s.close()),o&&(o=!1,t.onVideoProcessStarted&&t.onVideoProcessStarted()),e.drawImage(a,0,0),"closed"!==s._controlledReadableStream.state)try{s.enqueue(e.getImageData(0,0,t.width,t.height))}catch(e){}}),n)},a.play()}})}function o(e,l){if(!t.workerPath&&!l)return i=!1,void fetch("https://unpkg.com/webm-wasm@latest/dist/webm-worker.js").then((function(t){t.arrayBuffer().then((function(t){o(e,t)}))}));if(!t.workerPath&&l instanceof ArrayBuffer){var d=new Blob([l],{type:"text/javascript"});t.workerPath=h.createObjectURL(d)}t.workerPath||console.error("workerPath parameter is missing."),(s=new Worker(t.workerPath)).postMessage(t.webAssemblyPath||"https://unpkg.com/webm-wasm@latest/dist/webm-wasm.wasm"),s.addEventListener("message",(function(e){"READY"===e.data?(s.postMessage({width:t.width,height:t.height,bitrate:t.bitrate||1200,timebaseDen:t.frameRate||30,realtime:t.realtime}),a().pipeTo(new WritableStream({write:function(e){i?console.error("Got image, but recorder is finished!"):s.postMessage(e.data.buffer,[e.data.buffer])}}))):e.data&&(r||n.push(e.data))}))}"undefined"!=typeof ReadableStream&&"undefined"!=typeof WritableStream||console.error("Following polyfill is strongly recommended: https://unpkg.com/@mattiasbuelens/web-streams-polyfill/dist/polyfill.min.js"),(t=t||{}).width=t.width||640,t.height=t.height||480,t.frameRate=t.frameRate||30,t.bitrate=t.bitrate||1200,t.realtime=t.realtime||!0,this.record=function(){n=[],r=!1,this.blob=null,o(e),"function"==typeof t.initCallback&&t.initCallback()},this.pause=function(){r=!0},this.resume=function(){r=!1};var n=[];this.stop=function(e){i=!0;var t=this;!function(e){s?(s.addEventListener("message",(function(t){null===t.data&&(s.terminate(),s=null,e&&e())})),s.postMessage(null)):e&&e()}((function(){t.blob=new Blob(n,{type:"video/webm"}),e(t.blob)}))},this.name="WebAssemblyRecorder",this.toString=function(){return this.name},this.clearRecordedData=function(){n=[],r=!1,this.blob=null},this.blob=null}t.DiskStorage=R,t.GifRecorder=D,t.MultiStreamRecorder=I,t.RecordRTCPromisesHandler=function(e,i){if(!this)throw'Use "new RecordRTCPromisesHandler()"';if(void 0===e)throw'First argument "MediaStream" is required.';var s=this;s.recordRTC=new t(e,i),this.startRecording=function(){return new Promise((function(e,t){try{s.recordRTC.startRecording(),e()}catch(e){t(e)}}))},this.stopRecording=function(){return new Promise((function(e,t){try{s.recordRTC.stopRecording((function(i){s.blob=s.recordRTC.getBlob(),s.blob&&s.blob.size?e(i):t("Empty blob.",s.blob)}))}catch(e){t(e)}}))},this.pauseRecording=function(){return new Promise((function(e,t){try{s.recordRTC.pauseRecording(),e()}catch(e){t(e)}}))},this.resumeRecording=function(){return new Promise((function(e,t){try{s.recordRTC.resumeRecording(),e()}catch(e){t(e)}}))},this.getDataURL=function(e){return new Promise((function(e,t){try{s.recordRTC.getDataURL((function(t){e(t)}))}catch(e){t(e)}}))},this.getBlob=function(){return new Promise((function(e,t){try{e(s.recordRTC.getBlob())}catch(e){t(e)}}))},this.getInternalRecorder=function(){return new Promise((function(e,t){try{e(s.recordRTC.getInternalRecorder())}catch(e){t(e)}}))},this.reset=function(){return new Promise((function(e,t){try{e(s.recordRTC.reset())}catch(e){t(e)}}))},this.destroy=function(){return new Promise((function(e,t){try{e(s.recordRTC.destroy())}catch(e){t(e)}}))},this.getState=function(){return new Promise((function(e,t){try{e(s.recordRTC.getState())}catch(e){t(e)}}))},this.blob=null,this.version="5.6.2"},t.WebAssemblyRecorder=P}));class xn{static _ebsp2rbsp(e){let t=e,i=t.byteLength,s=new Uint8Array(i),r=0;for(let e=0;e<i;e++)e>=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(s[r]=t[e],r++);return new Uint8Array(s.buffer,0,r)}static parseSPS(e){let t=xn._ebsp2rbsp(e),i=new Gr(t);i.readByte();let s=i.readByte();i.readByte();let r=i.readByte();i.readUEG();let a=xn.getProfileString(s),o=xn.getLevelString(r),n=1,l=420,d=[0,420,422,444],h=8;if((100===s||110===s||122===s||244===s||44===s||83===s||86===s||118===s||128===s||138===s||144===s)&&(n=i.readUEG(),3===n&&i.readBits(1),n<=3&&(l=d[n]),h=i.readUEG()+8,i.readUEG(),i.readBits(1),i.readBool())){let e=3!==n?8:12;for(let t=0;t<e;t++)i.readBool()&&(t<6?xn._skipScalingList(i,16):xn._skipScalingList(i,64))}i.readUEG();let c=i.readUEG();if(0===c)i.readUEG();else if(1===c){i.readBits(1),i.readSEG(),i.readSEG();let e=i.readUEG();for(let t=0;t<e;t++)i.readSEG()}let u=i.readUEG();i.readBits(1);let p=i.readUEG(),f=i.readUEG(),m=i.readBits(1);0===m&&i.readBits(1),i.readBits(1);let g=0,y=0,A=0,b=0;i.readBool()&&(g=i.readUEG(),y=i.readUEG(),A=i.readUEG(),b=i.readUEG());let _=1,v=1,w=0,S=!0,T=0,E=0;if(i.readBool()){if(i.readBool()){let e=i.readByte(),t=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],s=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];e>0&&e<16?(_=t[e-1],v=s[e-1]):255===e&&(_=i.readByte()<<8|i.readByte(),v=i.readByte()<<8|i.readByte())}if(i.readBool()&&i.readBool(),i.readBool()&&(i.readBits(4),i.readBool()&&i.readBits(24)),i.readBool()&&(i.readUEG(),i.readUEG()),i.readBool()){let e=i.readBits(32),t=i.readBits(32);S=i.readBool(),T=t,E=2*e,w=T/E}}let k=1;1===_&&1===v||(k=_/v);let C=0,x=0;if(0===n)C=1,x=2-m;else{C=3===n?1:2,x=(1===n?2:1)*(2-m)}let R=16*(p+1),D=16*(f+1)*(2-m);R-=(g+y)*C,D-=(A+b)*x;let L=Math.ceil(R*k);return i.destroy(),i=null,{profile_string:a,level_string:o,bit_depth:h,ref_frames:u,chroma_format:l,chroma_format_string:xn.getChromaFormatString(l),frame_rate:{fixed:S,fps:w,fps_den:E,fps_num:T},sar_ratio:{width:_,height:v},codec_size:{width:R,height:D},present_size:{width:L,height:D}}}static parseSPS$2(e){let t=e.subarray(1,4),i="avc1.";for(let e=0;e<3;e++){let s=t[e].toString(16);s.length<2&&(s="0"+s),i+=s}let s=xn._ebsp2rbsp(e),r=new Gr(s);r.readByte();let a=r.readByte();r.readByte();let o=r.readByte();r.readUEG();let n=xn.getProfileString(a),l=xn.getLevelString(o),d=1,h=420,c=[0,420,422,444],u=8,p=8;if((100===a||110===a||122===a||244===a||44===a||83===a||86===a||118===a||128===a||138===a||144===a)&&(d=r.readUEG(),3===d&&r.readBits(1),d<=3&&(h=c[d]),u=r.readUEG()+8,p=r.readUEG()+8,r.readBits(1),r.readBool())){let e=3!==d?8:12;for(let t=0;t<e;t++)r.readBool()&&(t<6?xn._skipScalingList(r,16):xn._skipScalingList(r,64))}r.readUEG();let f=r.readUEG();if(0===f)r.readUEG();else if(1===f){r.readBits(1),r.readSEG(),r.readSEG();let e=r.readUEG();for(let t=0;t<e;t++)r.readSEG()}let m=r.readUEG();r.readBits(1);let g=r.readUEG(),y=r.readUEG(),A=r.readBits(1);0===A&&r.readBits(1),r.readBits(1);let b=0,_=0,v=0,w=0;r.readBool()&&(b=r.readUEG(),_=r.readUEG(),v=r.readUEG(),w=r.readUEG());let S=1,T=1,E=0,k=!0,C=0,x=0;if(r.readBool()){if(r.readBool()){let e=r.readByte(),t=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],i=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];e>0&&e<16?(S=t[e-1],T=i[e-1]):255===e&&(S=r.readByte()<<8|r.readByte(),T=r.readByte()<<8|r.readByte())}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(4),r.readBool()&&r.readBits(24)),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool()){let e=r.readBits(32),t=r.readBits(32);k=r.readBool(),C=t,x=2*e,E=C/x}}let R=1;1===S&&1===T||(R=S/T);let D=0,L=0;if(0===d)D=1,L=2-A;else{D=3===d?1:2,L=(1===d?2:1)*(2-A)}let I=16*(g+1),P=16*(y+1)*(2-A);I-=(b+_)*D,P-=(v+w)*L;let B=Math.ceil(I*R);return r.destroy(),r=null,{codec_mimetype:i,profile_idc:a,level_idc:o,profile_string:n,level_string:l,chroma_format_idc:d,bit_depth:u,bit_depth_luma:u,bit_depth_chroma:p,ref_frames:m,chroma_format:h,chroma_format_string:xn.getChromaFormatString(h),frame_rate:{fixed:k,fps:E,fps_den:x,fps_num:C},sar_ratio:{width:S,height:T},codec_size:{width:I,height:P},present_size:{width:B,height:P}}}static _skipScalingList(e,t){let i=8,s=8,r=0;for(let a=0;a<t;a++)0!==s&&(r=e.readSEG(),s=(i+r+256)%256),i=0===s?i:s}static getProfileString(e){switch(e){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}static getLevelString(e){return(e/10).toFixed(1)}static getChromaFormatString(e){switch(e){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}class Rn{constructor(e){this.buffer=e,this.buflen=e.length,this.bufpos=0,this.bufoff=0,this.iserro=!1}read(e){let t=0,i=0;for(;e;){if(e<0||this.bufpos>=this.buflen)return this.iserro=!0,0;this.iserro=!1,i=this.bufoff+e>8?8-this.bufoff:e,t<<=i,t+=this.buffer[this.bufpos]>>8-this.bufoff-i&255>>8-i,this.bufoff+=i,e-=i,8==this.bufoff&&(this.bufpos++,this.bufoff=0)}return t}look(e){let t=this.bufpos,i=this.bufoff,s=this.read(e);return this.bufpos=t,this.bufoff=i,s}read_golomb(){let e;for(e=0;0===this.read(1)&&!this.iserro;e++);return(1<<e)+this.read(e)-1}}function Dn(e){const t={};let i=function(){let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}();const s=new DataView(e.buffer);let r=s.getUint8(0),a=s.getUint8(1);if(s.getUint8(2),s.getUint8(3),1!==r||0===a)return{};const o=1+(3&s.getUint8(4));if(3!==o&&4!==o)return{};let n=31&s.getUint8(5);if(0===n)return{};let l=6;for(let r=0;r<n;r++){let a=s.getUint16(l,!i);if(l+=2,0===a)continue;let o=new Uint8Array(e.buffer,l,a);l+=a;let n=xn.parseSPS(o);if(0!==r)continue;t.sps=o,t.timescale=1e3,t.codecWidth=n.codec_size.width,t.codecHeight=n.codec_size.height,t.presentWidth=n.present_size.width,t.presentHeight=n.present_size.height,t.profile=n.profile_string,t.level=n.level_string,t.bitDepth=n.bit_depth,t.chromaFormat=n.chroma_format,t.sarRatio=n.sar_ratio,t.frameRate=n.frame_rate,!1!==n.frame_rate.fixed&&0!==n.frame_rate.fps_num&&0!==n.frame_rate.fps_den||(t.frameRate={fixed:!0,fps:25,fps_num:25e3,fps_den:1e3});let d=t.frameRate.fps_den,h=t.frameRate.fps_num;t.refSampleDuration=t.timescale*(d/h);let c=o.subarray(1,4),u="avc1.";for(let e=0;e<3;e++){let t=c[e].toString(16);t.length<2&&(t="0"+t),u+=t}t.codec=u}let d=s.getUint8(l);if(0===d)return{};l++;for(let r=0;r<d;r++){let r=s.getUint16(l,!i);if(l+=2,0===r)continue;let a=new Uint8Array(e.buffer,l,r);l+=r,t.pps=a}if(t.videoType=as,t.sps){const e=t.sps.byteLength,i=new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e]),s=new Uint8Array(e+4);s.set(i,0),s.set(t.sps,4),t.sps=s}if(t.pps){const e=t.pps.byteLength,i=new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e]),s=new Uint8Array(e+4);s.set(i,0),s.set(t.pps,4),t.pps=s}return t}function Ln(e){let{sps:t,pps:i}=e,s=8+t.byteLength+1+2+i.byteLength,r=!1;const a=xn.parseSPS$2(t);66!==t[3]&&77!==t[3]&&88!==t[3]&&(r=!0,s+=4);let o=new Uint8Array(s);o[0]=1,o[1]=t[1],o[2]=t[2],o[3]=t[3],o[4]=255,o[5]=225;let n=t.byteLength;o[6]=n>>>8,o[7]=255&n;let l=8;o.set(t,8),l+=n,o[l]=1;let d=i.byteLength;o[l+1]=d>>>8,o[l+2]=255&d,o.set(i,l+3),l+=3+d,r&&(o[l]=252|a.chroma_format_idc,o[l+1]=248|a.bit_depth_luma-8,o[l+2]=248|a.bit_depth_chroma-8,o[l+3]=0,l+=4);const h=[23,0,0,0,0],c=new Uint8Array(h.length+o.byteLength);return c.set(h,0),c.set(o,h.length),c}function In(e,t){let i=[];i[0]=t?23:39,i[1]=1,i[2]=0,i[3]=0,i[4]=0;const s=new Uint8Array(i.length+e.byteLength);return s.set(i,0),s.set(e,i.length),s}function Pn(e){return 31&e[0]}function Bn(e){return e===Bt}function Mn(e){return!function(e){return e===Rt||e===Dt}(e)&&!Bn(e)}function Un(e){return e===Lt}class Fn{constructor(e){this.data=e,this.eofFlag=!1,this.currentStartcodeOffset=this.findNextStartCodeOffset(0),this.eofFlag&&console.error("Could not find H264 startcode until payload end!")}findNextStartCodeOffset(e){let t=e,i=this.data;for(;;){if(t+3>=i.byteLength)return this.eofFlag=!0,i.byteLength;let e=i[t+0]<<24|i[t+1]<<16|i[t+2]<<8|i[t+3],s=i[t+0]<<16|i[t+1]<<8|i[t+2];if(1===e||1===s)return t;t++}}readNextNaluPayload(){let e=this.data,t=null;for(;null==t&&!this.eofFlag;){let i=this.currentStartcodeOffset;i+=1===(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3])?4:3;let s=31&e[i],r=(128&e[i])>>>7,a=this.findNextStartCodeOffset(i);this.currentStartcodeOffset=a,s>=Ft||0===r&&(t={type:s,data:e.subarray(i,a)})}return t}}class On{constructor(e){let t=e.data.byteLength;this.type=e.type,this.data=new Uint8Array(4+t),new DataView(this.data.buffer).setUint32(0,t),this.data.set(e.data,4)}}const Nn=e=>{let t=e,i=t.byteLength,s=new Uint8Array(i),r=0;for(let e=0;e<i;e++)e>=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(s[r]=t[e],r++);return new Uint8Array(s.buffer,0,r)},jn=e=>{switch(e){case 0:return"4:0:0";case 1:return"4:2:0";case 2:return"4:2:2";case 3:return"4:4:4";default:return"Unknown"}};class Gn{static _ebsp2rbsp(e){let t=e,i=t.byteLength,s=new Uint8Array(i),r=0;for(let e=0;e<i;e++)e>=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(s[r]=t[e],r++);return new Uint8Array(s.buffer,0,r)}static parseVPS(e){let t=Gn._ebsp2rbsp(e),i=new Gr(t);return i.readByte(),i.readByte(),i.readBits(4),i.readBits(2),i.readBits(6),{num_temporal_layers:i.readBits(3)+1,temporal_id_nested:i.readBool()}}static parseSPS(e){let t=Gn._ebsp2rbsp(e),i=new Gr(t);i.readByte(),i.readByte();let s=0,r=0,a=0,o=0;i.readBits(4);let n=i.readBits(3);i.readBool();let l=i.readBits(2),d=i.readBool(),h=i.readBits(5),c=i.readByte(),u=i.readByte(),p=i.readByte(),f=i.readByte(),m=i.readByte(),g=i.readByte(),y=i.readByte(),A=i.readByte(),b=i.readByte(),_=i.readByte(),v=i.readByte(),w=[],S=[];for(let e=0;e<n;e++)w.push(i.readBool()),S.push(i.readBool());if(n>0)for(let e=n;e<8;e++)i.readBits(2);for(let e=0;e<n;e++)w[e]&&(i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte()),S[e]&&i.readByte();i.readUEG();let T=i.readUEG();3==T&&i.readBits(1);let E=i.readUEG(),k=i.readUEG();i.readBool()&&(s+=i.readUEG(),r+=i.readUEG(),a+=i.readUEG(),o+=i.readUEG());let C=i.readUEG(),x=i.readUEG(),R=i.readUEG();for(let e=i.readBool()?0:n;e<=n;e++)i.readUEG(),i.readUEG(),i.readUEG();if(i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readBool()){if(i.readBool())for(let e=0;e<4;e++)for(let t=0;t<(3===e?2:6);t++){if(i.readBool()){let t=Math.min(64,1<<4+(e<<1));e>1&&i.readSEG();for(let e=0;e<t;e++)i.readSEG()}else i.readUEG()}}i.readBool(),i.readBool(),i.readBool()&&(i.readByte(),i.readUEG(),i.readUEG(),i.readBool());let D=i.readUEG(),L=0;for(let e=0;e<D;e++){let t=!1;if(0!==e&&(t=i.readBool()),t){e===D&&i.readUEG(),i.readBool(),i.readUEG();let t=0;for(let e=0;e<=L;e++){let e=i.readBool(),s=!1;e||(s=i.readBool()),(e||s)&&t++}L=t}else{let e=i.readUEG(),t=i.readUEG();L=e+t;for(let t=0;t<e;t++)i.readUEG(),i.readBool();for(let e=0;e<t;e++)i.readUEG(),i.readBool()}}if(i.readBool()){let e=i.readUEG();for(let t=0;t<e;t++){for(let e=0;e<R+4;e++)i.readBits(1);i.readBits(1)}}let I=!1,P=0,B=1,M=1,U=!1,F=1,O=1;if(i.readBool(),i.readBool(),i.readBool()){if(i.readBool()){let e=i.readByte(),t=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],s=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];e>0&&e<=16?(B=t[e-1],M=s[e-1]):255===e&&(B=i.readBits(16),M=i.readBits(16))}if(i.readBool()&&i.readBool(),i.readBool()){i.readBits(3),i.readBool(),i.readBool()&&(i.readByte(),i.readByte(),i.readByte())}if(i.readBool()&&(i.readUEG(),i.readUEG()),i.readBool(),i.readBool(),i.readBool(),I=i.readBool(),I&&(i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG()),i.readBool()){if(F=i.readBits(32),O=i.readBits(32),i.readBool()&&i.readUEG(),i.readBool()){let e=!1,t=!1,s=!1;e=i.readBool(),t=i.readBool(),(e||t)&&(s=i.readBool(),s&&(i.readByte(),i.readBits(5),i.readBool(),i.readBits(5)),i.readBits(4),i.readBits(4),s&&i.readBits(4),i.readBits(5),i.readBits(5),i.readBits(5));for(let r=0;r<=n;r++){let r=i.readBool();U=r;let a=!0,o=1;r||(a=i.readBool());let n=!1;if(a?i.readUEG():n=i.readBool(),n||(o=i.readUEG()+1),e){for(let e=0;e<o;e++)i.readUEG(),i.readUEG(),s&&(i.readUEG(),i.readUEG());i.readBool()}if(t){for(let e=0;e<o;e++)i.readUEG(),i.readUEG(),s&&(i.readUEG(),i.readUEG());i.readBool()}}}}i.readBool()&&(i.readBool(),i.readBool(),i.readBool(),P=i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG())}i.readBool();let N=`hvc1.${h}.1.L${v}.B0`,j=E-(s+r)*(1===T||2===T?2:1),G=k-(a+o)*(1===T?2:1),z=1;return 1!==B&&1!==M&&(z=B/M),i.destroy(),i=null,{codec_mimetype:N,profile_string:Gn.getProfileString(h),level_string:Gn.getLevelString(v),profile_idc:h,bit_depth:C+8,ref_frames:1,chroma_format:T,chroma_format_string:Gn.getChromaFormatString(T),general_level_idc:v,general_profile_space:l,general_tier_flag:d,general_profile_idc:h,general_profile_compatibility_flags_1:c,general_profile_compatibility_flags_2:u,general_profile_compatibility_flags_3:p,general_profile_compatibility_flags_4:f,general_constraint_indicator_flags_1:m,general_constraint_indicator_flags_2:g,general_constraint_indicator_flags_3:y,general_constraint_indicator_flags_4:A,general_constraint_indicator_flags_5:b,general_constraint_indicator_flags_6:_,min_spatial_segmentation_idc:P,constant_frame_rate:0,chroma_format_idc:T,bit_depth_luma_minus8:C,bit_depth_chroma_minus8:x,frame_rate:{fixed:U,fps:O/F,fps_den:F,fps_num:O},sar_ratio:{width:B,height:M},codec_size:{width:j,height:G},present_size:{width:j*z,height:G}}}static parsePPS(e){let t=Gn._ebsp2rbsp(e),i=new Gr(t);i.readByte(),i.readByte(),i.readUEG(),i.readUEG(),i.readBool(),i.readBool(),i.readBits(3),i.readBool(),i.readBool(),i.readUEG(),i.readUEG(),i.readSEG(),i.readBool(),i.readBool(),i.readBool()&&i.readUEG(),i.readSEG(),i.readSEG(),i.readBool(),i.readBool(),i.readBool(),i.readBool();let s=i.readBool(),r=i.readBool(),a=1;return r&&s?a=0:r?a=3:s&&(a=2),{parallelismType:a}}static getChromaFormatString(e){switch(e){case 0:return"4:0:0";case 1:return"4:2:0";case 2:return"4:2:2";case 3:return"4:4:4";default:return"Unknown"}}static getProfileString(e){switch(e){case 1:return"Main";case 2:return"Main10";case 3:return"MainSP";case 4:return"Rext";case 9:return"SCC";default:return"Unknown"}}static getLevelString(e){return(e/30).toFixed(1)}}function zn(e){let t={codecWidth:0,codecHeight:0,videoType:os,width:0,height:0,profile:0,level:0};e=e.slice(5);do{let i={};if(e.length<23){console.warn("parseHEVCDecoderConfigurationRecord$2",`arrayBuffer.length ${e.length} < 23`);break}if(i.configurationVersion=e[0],1!=i.configurationVersion)break;i.general_profile_space=e[1]>>6&3,i.general_tier_flag=e[1]>>5&1,i.general_profile_idc=31&e[1],i.general_profile_compatibility_flags=e[2]<<24|e[3]<<16|e[4]<<8|e[5],i.general_constraint_indicator_flags=e[6]<<24|e[7]<<16|e[8]<<8|e[9],i.general_constraint_indicator_flags=i.general_constraint_indicator_flags<<16|e[10]<<8|e[11],i.general_level_idc=e[12],i.min_spatial_segmentation_idc=(15&e[13])<<8|e[14],i.parallelismType=3&e[15],i.chromaFormat=3&e[16],i.bitDepthLumaMinus8=7&e[17],i.bitDepthChromaMinus8=7&e[18],i.avgFrameRate=e[19]<<8|e[20],i.constantFrameRate=e[21]>>6&3,i.numTemporalLayers=e[21]>>3&7,i.temporalIdNested=e[21]>>2&1,i.lengthSizeMinusOne=3&e[21];let s=e[22],r=e.slice(23);for(let e=0;e<s&&!(r.length<3);e++){let e=63&r[0],s=r[1]<<8|r[2];r=r.slice(3);for(let a=0;a<s&&!(r.length<2);a++){let s=r[0]<<8|r[1];if(r.length<2+s)break;if(r=r.slice(2),33==e){let e=new Uint8Array(s);e.set(r.slice(0,s),0),i.psps=Hn(e,i),t.profile=i.general_profile_idc,t.level=i.general_level_idc/30,t.width=i.psps.pic_width_in_luma_samples-(i.psps.conf_win_left_offset+i.psps.conf_win_right_offset),t.height=i.psps.pic_height_in_luma_samples-(i.psps.conf_win_top_offset+i.psps.conf_win_bottom_offset)}r=r.slice(s)}}}while(0);return t.codecWidth=t.width||1920,t.codecHeight=t.height||1080,t.presentHeight=t.codecHeight,t.presentWidth=t.codecWidth,t.timescale=1e3,t.refSampleDuration=1e3/23976*1e3,t}function $n(e){const t=e;if(t.length<22)return console.error(`Invalid HEVCDecoderConfigurationRecord, lack of data! ${t.length} < 22`),{};let i={codecWidth:0,codecHeight:0,videoType:os},s=function(){let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}(),r=new DataView(t.buffer),a=r.getUint8(0),o=31&r.getUint8(1);if(1!==a||0===o)return console.error(`Invalid HEVCDecoderConfigurationRecord,version is ${a}, hevcProfile is ${o}`),{};let n=1+(3&r.getUint8(21));if(3!==n&&4!==n)return console.error("Invalid HEVCDecoderConfigurationRecord, Strange NaluLengthSizeMinusOne: "+(n-1)),{};let l=r.getUint8(22);for(let e=0,a=23;e<l;e++){let e=63&r.getUint8(a+0),o=r.getUint16(a+1,!s);a+=3;for(let n=0;n<o;n++){let o=r.getUint16(a+0,!s);if(0===n)if(33===e){a+=2;let e=new Uint8Array(t.buffer,a,o),s=Gn.parseSPS(e);i.codecWidth=s.codec_size.width,i.codecHeight=s.codec_size.height,i.presentWidth=s.present_size.width,i.presentHeight=s.present_size.height,i.profile=s.profile_string,i.level=s.level_string,i.bitDepth=s.bit_depth,i.chromaFormat=s.chroma_format,i.sarRatio=s.sar_ratio,i.frameRate=s.frame_rate,!1!==s.frame_rate.fixed&&0!==s.frame_rate.fps_num&&0!==s.frame_rate.fps_den||(i.frameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3}),i.frameRate.fps_den,i.frameRate.fps_num,i.codec=s.codec_mimetype,a+=o}else a+=2+o;else a+=2+o}}return i.hvcc=new Uint8Array(t),i}function Hn(e,t){let i={},s=e.length,r=[],a=new Rn(e);a.read(1),a.read(6),a.read(6),a.read(3);for(let e=2;e<s;e++)e+2<s&&3==a.look(24)?(r.push(a.read(8)),r.push(a.read(8)),e+=2,a.read(8)):r.push(a.read(8));let o=new Uint8Array(r),n=new Rn(o);if(i.sps_video_parameter_set_id=n.read(4),i.sps_max_sub_layers_minus1=n.read(3),i.sps_temporal_id_nesting_flag=n.read(1),i.profile_tier_level=function(e,t,i){let s={};s.profile_space=e.read(2),s.tier_flag=e.read(1),s.profile_idc=e.read(5),s.profile_compatibility_flags=e.read(32),s.general_progressive_source_flag=e.read(1),s.general_interlaced_source_flag=e.read(1),s.general_non_packed_constraint_flag=e.read(1),s.general_frame_only_constraint_flag=e.read(1),e.read(32),e.read(12),s.level_idc=e.read(8),s.sub_layer_profile_present_flag=[],s.sub_layer_level_present_flag=[];for(let t=0;t<i;t++)s.sub_layer_profile_present_flag[t]=e.read(1),s.sub_layer_level_present_flag[t]=e.read(1);if(i>0)for(let t=i;t<8;t++)e.read(2);s.sub_layer_profile_space=[],s.sub_layer_tier_flag=[],s.sub_layer_profile_idc=[],s.sub_layer_profile_compatibility_flag=[],s.sub_layer_progressive_source_flag=[],s.sub_layer_interlaced_source_flag=[],s.sub_layer_non_packed_constraint_flag=[],s.sub_layer_frame_only_constraint_flag=[],s.sub_layer_level_idc=[];for(let t=0;t<i;t++)s.sub_layer_profile_present_flag[t]&&(s.sub_layer_profile_space[t]=e.read(2),s.sub_layer_tier_flag[t]=e.read(1),s.sub_layer_profile_idc[t]=e.read(5),s.sub_layer_profile_compatibility_flag[t]=e.read(32),s.sub_layer_progressive_source_flag[t]=e.read(1),s.sub_layer_interlaced_source_flag[t]=e.read(1),s.sub_layer_non_packed_constraint_flag[t]=e.read(1),s.sub_layer_frame_only_constraint_flag[t]=e.read(1),e.read(32),e.read(12)),s.sub_layer_level_present_flag[t]?s.sub_layer_level_idc[t]=e.read(8):s.sub_layer_level_idc[t]=1;return s}(n,0,i.sps_max_sub_layers_minus1),i.sps_seq_parameter_set_id=n.read_golomb(),i.chroma_format_idc=n.read_golomb(),3==i.chroma_format_idc?i.separate_colour_plane_flag=n.read(1):i.separate_colour_plane_flag=0,i.pic_width_in_luma_samples=n.read_golomb(),i.pic_height_in_luma_samples=n.read_golomb(),i.conformance_window_flag=n.read(1),i.conformance_window_flag){let e=1+(i.chroma_format_idc<2),t=1+(i.chroma_format_idc<3);i.conf_win_left_offset=n.read_golomb()*t,i.conf_win_right_offset=n.read_golomb()*t,i.conf_win_top_offset=n.read_golomb()*e,i.conf_win_bottom_offset=n.read_golomb()*e}else i.conf_win_left_offset=0,i.conf_win_right_offset=0,i.conf_win_top_offset=0,i.conf_win_bottom_offset=0;return i}function Vn(e){let{vps:t,pps:i,sps:s}=e,r={configurationVersion:1};const a=(e=>{let t=Nn(e),i=new Gr(t);return i.readByte(),i.readByte(),i.readBits(4),i.readBits(2),i.readBits(6),{num_temporal_layers:i.readBits(3)+1,temporal_id_nested:i.readBool()}})(t),o=(e=>{let t=Nn(e),i=new Gr(t);i.readByte(),i.readByte();let s=0,r=0,a=0,o=0;i.readBits(4);let n=i.readBits(3);i.readBool();let l=i.readBits(2),d=i.readBool(),h=i.readBits(5),c=i.readByte(),u=i.readByte(),p=i.readByte(),f=i.readByte(),m=i.readByte(),g=i.readByte(),y=i.readByte(),A=i.readByte(),b=i.readByte(),_=i.readByte(),v=i.readByte(),w=[],S=[];for(let e=0;e<n;e++)w.push(i.readBool()),S.push(i.readBool());if(n>0)for(let e=n;e<8;e++)i.readBits(2);for(let e=0;e<n;e++)w[e]&&(i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte()),w[e]&&i.readByte();i.readUEG();let T=i.readUEG();3==T&&i.readBits(1);let E=i.readUEG(),k=i.readUEG();i.readBool()&&(s+=i.readUEG(),r+=i.readUEG(),a+=i.readUEG(),o+=i.readUEG());let C=i.readUEG(),x=i.readUEG(),R=i.readUEG();for(let e=i.readBool()?0:n;e<=n;e++)i.readUEG(),i.readUEG(),i.readUEG();if(i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readBool()&&i.readBool())for(let e=0;e<4;e++)for(let t=0;t<(3===e?2:6);t++)if(i.readBool()){let t=Math.min(64,1<<4+(e<<1));e>1&&i.readSEG();for(let e=0;e<t;e++)i.readSEG()}else i.readUEG();i.readBool(),i.readBool(),i.readBool()&&(i.readByte(),i.readUEG(),i.readUEG(),i.readBool());let D=i.readUEG(),L=0;for(let e=0;e<D;e++){let t=!1;if(0!==e&&(t=i.readBool()),t){e===D&&i.readUEG(),i.readBool(),i.readUEG();let t=0;for(let e=0;e<=L;e++){let e=i.readBool(),s=!1;e||(s=i.readBool()),(e||s)&&t++}L=t}else{let e=i.readUEG(),t=i.readUEG();L=e+t;for(let t=0;t<e;t++)i.readUEG(),i.readBool();for(let e=0;e<t;e++)i.readUEG(),i.readBool()}}if(i.readBool()){let e=i.readUEG();for(let t=0;t<e;t++){for(let e=0;e<R+4;e++)i.readBits(1);i.readBits(1)}}let I=!1,P=0,B=1,M=1,U=!1,F=1,O=1;if(i.readBool(),i.readBool(),i.readBool()){if(i.readBool()){let e=i.readByte(),t=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],s=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];e>0&&e<16?(B=t[e-1],M=s[e-1]):255===e&&(B=i.readBits(16),M=i.readBits(16))}if(i.readBool()&&i.readBool(),i.readBool()&&(i.readBits(3),i.readBool(),i.readBool()&&(i.readByte(),i.readByte(),i.readByte())),i.readBool()&&(i.readUEG(),i.readUEG()),i.readBool(),i.readBool(),i.readBool(),I=i.readBool(),I&&(s+=i.readUEG(),r+=i.readUEG(),a+=i.readUEG(),o+=i.readUEG()),i.readBool()&&(F=i.readBits(32),O=i.readBits(32),i.readBool()&&(i.readUEG(),i.readBool()))){let e=!1,t=!1,s=!1;e=i.readBool(),t=i.readBool(),(e||t)&&(s=i.readBool(),s&&(i.readByte(),i.readBits(5),i.readBool(),i.readBits(5)),i.readBits(4),i.readBits(4),s&&i.readBits(4),i.readBits(5),i.readBits(5),i.readBits(5));for(let r=0;r<=n;r++){let r=i.readBool();U=r;let a=!1,o=1;r||(a=i.readBool());let n=!1;if(a?i.readSEG():n=i.readBool(),n||(cpbcnt=i.readUEG()+1),e)for(let e=0;e<o;e++)i.readUEG(),i.readUEG(),s&&(i.readUEG(),i.readUEG());if(t)for(let e=0;e<o;e++)i.readUEG(),i.readUEG(),s&&(i.readUEG(),i.readUEG())}}i.readBool()&&(i.readBool(),i.readBool(),i.readBool(),P=i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG())}i.readBool();let N=`hvc1.${h}.1.L${v}.B0`,j=E,G=k,z=1;return 1!==B&&1!==M&&(z=B/M),i.destroy(),i=null,{codec_mimetype:N,level_string:($=v,($/30).toFixed(1)),profile_idc:h,bit_depth:C+8,ref_frames:1,chroma_format:T,chroma_format_string:jn(T),general_level_idc:v,general_profile_space:l,general_tier_flag:d,general_profile_idc:h,general_profile_compatibility_flags_1:c,general_profile_compatibility_flags_2:u,general_profile_compatibility_flags_3:p,general_profile_compatibility_flags_4:f,general_constraint_indicator_flags_1:m,general_constraint_indicator_flags_2:g,general_constraint_indicator_flags_3:y,general_constraint_indicator_flags_4:A,general_constraint_indicator_flags_5:b,general_constraint_indicator_flags_6:_,min_spatial_segmentation_idc:P,constant_frame_rate:0,chroma_format_idc:T,bit_depth_luma_minus8:C,bit_depth_chroma_minus8:x,frame_rate:{fixed:U,fps:O/F,fps_den:F,fps_num:O},sar_ratio:{width:B,height:M},codec_size:{width:j,height:G},present_size:{width:j*z,height:G}};var $})(s),n=(e=>{let t=Nn(e),i=new Gr(t);i.readByte(),i.readByte(),i.readUEG(),i.readUEG(),i.readBool(),i.readBool(),i.readBits(3),i.readBool(),i.readBool(),i.readUEG(),i.readUEG(),i.readSEG(),i.readBool(),i.readBool(),i.readBool()&&i.readUEG(),i.readSEG(),i.readSEG(),i.readBool(),i.readBool(),i.readBool(),i.readBool();let s=i.readBool(),r=i.readBool(),a=1;return r&&s?a=0:r?a=3:s&&(a=2),{parallelismType:a}})(i);r=Object.assign(r,a,o,n);let l=23+(5+t.byteLength)+(5+s.byteLength)+(5+i.byteLength),d=new Uint8Array(l);d[0]=1,d[1]=(3&r.general_profile_space)<<6|(r.general_tier_flag?1:0)<<5|31&r.general_profile_idc,d[2]=r.general_profile_compatibility_flags_1||0,d[3]=r.general_profile_compatibility_flags_2||0,d[4]=r.general_profile_compatibility_flags_3||0,d[5]=r.general_profile_compatibility_flags_4||0,d[6]=r.general_constraint_indicator_flags_1||0,d[7]=r.general_constraint_indicator_flags_2||0,d[8]=r.general_constraint_indicator_flags_3||0,d[9]=r.general_constraint_indicator_flags_4||0,d[10]=r.general_constraint_indicator_flags_5||0,d[11]=r.general_constraint_indicator_flags_6||0,d[12]=60,d[13]=240|(3840&r.min_spatial_segmentation_idc)>>8,d[14]=255&r.min_spatial_segmentation_idc,d[15]=252|3&r.parallelismType,d[16]=252|3&r.chroma_format_idc,d[17]=248|7&r.bit_depth_luma_minus8,d[18]=248|7&r.bit_depth_chroma_minus8,d[19]=0,d[20]=0,d[21]=(3&r.constant_frame_rate)<<6|(7&r.num_temporal_layers)<<3|(r.temporal_id_nested?1:0)<<2|3,d[22]=3,d[23]=128|Gt,d[24]=0,d[25]=1,d[26]=(65280&t.byteLength)>>8,d[27]=(255&t.byteLength)>>0,d.set(t,28),d[23+(5+t.byteLength)+0]=128|$t,d[23+(5+t.byteLength)+1]=0,d[23+(5+t.byteLength)+2]=1,d[23+(5+t.byteLength)+3]=(65280&s.byteLength)>>8,d[23+(5+t.byteLength)+4]=(255&s.byteLength)>>0,d.set(s,23+(5+t.byteLength)+5),d[23+(5+t.byteLength+5+s.byteLength)+0]=128|Vt,d[23+(5+t.byteLength+5+s.byteLength)+1]=0,d[23+(5+t.byteLength+5+s.byteLength)+2]=1,d[23+(5+t.byteLength+5+s.byteLength)+3]=(65280&i.byteLength)>>8,d[23+(5+t.byteLength+5+s.byteLength)+4]=(255&i.byteLength)>>0,d.set(i,23+(5+t.byteLength+5+s.byteLength)+5);const h=[28,0,0,0,0],c=new Uint8Array(h.length+d.byteLength);return c.set(h,0),c.set(d,h.length),c}function Wn(e,t){let i=[];i[0]=t?28:44,i[1]=1,i[2]=0,i[3]=0,i[4]=0;const s=new Uint8Array(i.length+e.byteLength);return s.set(i,0),s.set(e,i.length),s}function Jn(e){return(126&e[0])>>1}function qn(e){return!function(e){return e>=32&&e<=40}(e)}function Kn(e){return e>=16&&e<=21}class Yn{constructor(e){this.data=e,this.eofFlag=!1,this.currentStartcodeOffset=this.findNextStartCodeOffset(0),this.eofFlag&&console.error("Could not find H265 startcode until payload end!")}findNextStartCodeOffset(e){let t=e,i=this.data;for(;;){if(t+3>=i.byteLength)return this.eofFlag=!0,i.byteLength;let e=i[t+0]<<24|i[t+1]<<16|i[t+2]<<8|i[t+3],s=i[t+0]<<16|i[t+1]<<8|i[t+2];if(1===e||1===s)return t;t++}}readNextNaluPayload(){let e=this.data,t=null;for(;null==t&&!this.eofFlag;){let i=this.currentStartcodeOffset;i+=1===(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3])?4:3;let s=e[i]>>1&63,r=(128&e[i])>>>7,a=this.findNextStartCodeOffset(i);this.currentStartcodeOffset=a,0===r&&(t={type:s,data:e.subarray(i,a)})}return t}}class Qn{constructor(e){let t=e.data.byteLength;this.type=e.type,this.data=new Uint8Array(4+t),new DataView(this.data.buffer).setUint32(0,t),this.data.set(e.data,4)}}class Xn extends a{constructor(e){super(),this.TAG_NAME="recorderCommon",this.player=e,this.fileName="",this._isRecording=!1,this._recordingTimestamp=0,this.recordingInterval=null,this.sps=null,this.pps=null,this.vps=null,this.codecId=null,this.audioCodeId=null,this.metaInfo={codecWidth:0,codecHeight:0,presentWidth:0,presentHeight:0,refSampleDuration:0,timescale:1e3,avcc:null,videoType:""},this.audioMetaInfo={timescale:1e3,sampleRate:0,refSampleDuration:0,channelCount:0,codec:"",originalCodec:"",audioType:"",extraData:new Uint8Array(0)}}destroy(){this._reset(),this.sps=null,this.pps=null,this.vps=null,this.codecId=null,this.audioCodeId=null,this.metaInfo=null,this.audioMetaInfo=null}get isH264(){return this.codecId===vt}get isH265(){return this.codecId===wt}setFileName(e){this.fileName=e}get isRecording(){return this._isRecording}get recording(){return this._isRecording}get recordTime(){return this._recordingTimestamp}startRecord(){}handleAddNaluTrack(e,t,i,s){}handleAddAudioTrack(e,t){}handleAddTrack(e){}stopRecordAndSave(){}startRecordingInterval(){}isWasmMp4(){return!1}stopRecordingInterval(){this.recordingInterval&&clearInterval(this.recordingInterval),this.recordingInterval=null}getToTalByteLength(){return 0}_reset(){this.fileName="",this._isRecording=!1,this._recordingTimestamp=0,this.stopRecordingInterval()}initMetaData(e,t){let i;const s=e.slice(5);if(this.codecId=t,this.metaInfo.avcc=s,t===vt)i=Dn(s);else if(t===wt){i=function(e){let t=23;const i=e[t];if((63&i)!==Gt)return console.warn(`parseHEVCDecoderVPSAndSPSAndPPS and vpsTag is ${i}`),{};t+=2,t+=1;const s=e[t+1]|e[t]<<8;t+=2;const r=e.slice(t,t+s);t+=s;const a=e[t];if((63&a)!==$t)return console.warn(`parseHEVCDecoderVPSAndSPSAndPPS and sps tag is ${a}`),{};t+=2,t+=1;const o=e[t+1]|e[t]<<8;t+=2;const n=e.slice(t,t+o);t+=o;const l=e[t];if((63&l)!==Vt)return console.warn(`parseHEVCDecoderVPSAndSPSAndPPS and pps tag is ${l}`),{};t+=2,t+=1;const d=e[t+1]|e[t]<<8;t+=2;const h=e.slice(t,t+d),c=new Uint8Array([o>>>24&255,o>>>16&255,o>>>8&255,255&o]),u=new Uint8Array([d>>>24&255,d>>>16&255,d>>>8&255,255&d]),p=new Uint8Array([s>>>24&255,s>>>16&255,s>>>8&255,255&s]),f=new Uint8Array(o+4);f.set(c,0),f.set(n,4);const m=new Uint8Array(d+4);m.set(u,0),m.set(h,4);const g=new Uint8Array(s+4);return g.set(p,0),g.set(r,4),{sps:f,pps:m,vps:g}}(s);const t=zn(e);i=Object.assign(i,t)}i&&(i.vps&&(this.vps=i.vps),i.pps&&(this.pps=i.pps),i.sps&&(this.sps=i.sps),i.presentWidth&&(this.metaInfo.presentWidth=i.presentWidth),i.presentHeight&&(this.metaInfo.presentHeight=i.presentHeight),i.codecWidth&&(this.metaInfo.codecWidth=i.codecWidth),i.codecHeight&&(this.metaInfo.codecHeight=i.codecHeight),i.timescale&&(this.metaInfo.timescale=i.timescale),i.refSampleDuration&&(this.metaInfo.refSampleDuration=i.refSampleDuration),i.videoType&&(this.metaInfo.videoType=i.videoType))}initAudioMetaData(e,t){this.audioCodeId=t;const i=e[0]>>1&1;let s=null;t===Et?(s=function(e){let t={},i=new Qr(e);return i.read(16),t.object_type=Xr(i),t.sample_rate=Zr(i,t),t.chan_config=i.read(4),t.chan_config<ta.length&&(t.channels=ta[t.chan_config]),t.sbr=-1,t.ps=-1,5!=t.object_type&&29!=t.object_type||(29==t.object_type&&(t.ps=1),t.ext_object_type=5,t.sbr=1,t.sample_rate=Zr(i,t),t.object_type=Xr(i)),{...t,channelCount:t.channels,sampleRate:t.sample_rate}}(e),s&&(s.channelCount&&(this.audioMetaInfo.channelCount=s.channelCount),s.codec&&(this.audioMetaInfo.codec=s.codec),s.originalCodec&&(this.audioMetaInfo.originalCodec=s.originalCodec),s.config&&(this.audioMetaInfo.config=s.config),s.sampleRate&&(this.audioMetaInfo.sampleRate=s.sampleRate),this.audioMetaInfo.sampleRate&&this.audioMetaInfo.timescale&&(this.audioMetaInfo.refSampleDuration=1024/this.audioMetaInfo.sampleRate*this.audioMetaInfo.timescale)),this.audioMetaInfo.depth=i?16:8,this.audioMetaInfo.extraData=e.slice(2)):this.audioMetaInfo.depth=0===i?8:16}initAudioAacExtraData(e){this.audioMetaInfo.extraData=new Uint8Array(e)}}class Zn extends Xn{constructor(e){super(e),this.totalByteLength=0,this._startRecordingTimestamp=null,e.debug.log("RecorderRTC","init")}destroy(){super.destroy(),this._reset(),this.player.debug.log("RecorderRTC","destroy")}_reset(){super._reset(),this.totalByteLength=0,this._startRecordingTimestamp=null,this.recorder&&(this.recorder.destroy(),this.recorder=null)}getSeekableBlob(e){const t=new EBML.Reader,i=new EBML.Decoder,s=EBML.tools,r=new FileReader;return new Promise(((a,o)=>{r.onload=function(e){i.decode(this.result).forEach((function(e){t.read(e)})),t.stop();const r=s.makeMetadataSeekable(t.metadatas,t.duration,t.cues),o=this.result.slice(t.metadataSize),n=new Blob([r,o],{type:"video/webm"});a(n)},r.readAsArrayBuffer(e)}))}startRecord(){const e=this.player.debug,t={type:"video",mimeType:"video/webm;codecs=h264",timeSlice:1e3,onTimeStamp:t=>{e.log("RecorderRTC","record timestamp :"+t),null===this._startRecordingTimestamp&&(this._startRecordingTimestamp=t),this._recordingTimestamp=(t-this._startRecordingTimestamp)/1e3},ondataavailable:t=>{this.totalByteLength+=t.size,e.log("RecorderRTC","ondataavailable",t.size)},disableLogs:!this.player._opt.debug};try{let i=null;if(this.player.getRenderType()===W?i=this.player.video.$videoElement.captureStream(25):this.player.video.mediaStream?i=this.player.video.mediaStream:this.player.isOldHls()||this.player._opt.useMSE||this.player._opt.useWCS?i=this.player.video.$videoElement.captureStream(25):this.player.isWebrtcH264()?i=this.player.webrtc.videoStream:this.player.isAliyunRtc()&&(i=this.player.video.$videoElement.captureStream(25)),!i)return e.error("RecorderRTC","startRecord error and can not create stream"),void this.player.emitError(lt.recordCreateError,"can not create stream");if(this.player.audio&&this.player.audio.mediaStreamAudioDestinationNode&&this.player.audio.mediaStreamAudioDestinationNode.stream&&!this.player.audio.isStateSuspended()&&this.player.audio.hasAudio&&this.player._opt.hasAudio){const e=this.player.audio.mediaStreamAudioDestinationNode.stream;if(e.getAudioTracks().length>0){const t=e.getAudioTracks()[0];t&&t.enabled&&i.addTrack(t)}}this.recorder=Cn(i,t)}catch(t){return e.error("RecorderRTC","startRecord error",t),void this.player.emitError(lt.recordCreateError,t)}this.recorder&&(this._isRecording=!0,this.player.emit(lt.recording,!0),this.recorder.startRecording(),e.log("RecorderRTC","start recording"),this.player.emit(lt.recordStart),this.startRecordingInterval())}startRecordingInterval(){this.stopRecordingInterval(),this.recordingInterval=window.setInterval((()=>{this.player.emit(lt.recordingTimestamp,this._recordingTimestamp)}),1e3)}stopRecordAndSave(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:At,t=arguments.length>1?arguments[1]:void 0;return new Promise(((i,s)=>{this.recorder&&this._isRecording||s("recorder is not ready"),t&&this.setFileName(t),this.recorder.stopRecording((()=>{this.player.debug.log("RecorderRTC","stop recording");const t=(this.fileName||ha())+"."+T;if(this.recorder.getBlob(),e===bt){const e=this.recorder.getBlob();i(e),this.player.emit(lt.recordBlob,e)}else i(),this.recorder.save(t);this.player.emit(lt.recordEnd),this._reset(),this.player.emit(lt.recording,!1)}))}))}getToTalByteLength(){return this.totalByteLength}getTotalDuration(){return this.recordTime}getType(){return T}initMetaData(){}}class el{static init(){el.types={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[],free:[],edts:[],elst:[],stss:[]};for(let e in el.types)el.types.hasOwnProperty(e)&&(el.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);let e=el.constants={};e.FTYP=new Uint8Array([105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,97,118,99,49,109,112,52,49,0,0,0,0]),e.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),e.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSC=e.STCO=e.STTS,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),e.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),e.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(e){let t=8,i=null,s=Array.prototype.slice.call(arguments,1),r=s.length;for(let e=0;e<r;e++)t+=s[e].byteLength;i=new Uint8Array(t),i[0]=t>>>24&255,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i.set(e,4);let a=8;for(let e=0;e<r;e++)i.set(s[e],a),a+=s[e].byteLength;return i}static generateInitSegment(e,t,i){let s=el.box(el.types.ftyp,el.constants.FTYP),r=el.box(el.types.free),a=8,o=new Uint8Array;i+a>=Math.pow(2,32)-1?(a=16,o=new Uint8Array(i+a),o.set(new Uint8Array([0,0,0,1]),0),o.set(el.types.mdat,4),o.set(new Uint8Array([i+8>>>56&255,i+8>>>48&255,i+8>>>40&255,i+8>>>32&255,i+8>>>24&255,i+8>>>16&255,i+8>>>8&255,i+8&255]),8)):(o=new Uint8Array(i+a),o[0]=i+8>>>24&255,o[1]=i+8>>>16&255,o[2]=i+8>>>8&255,o[3]=i+8&255,o.set(el.types.mdat,4));for(let e=0;e<t.length;e++){let i=t[e];i.duration=i.refSampleDuration*i.sequenceNumber;for(let e=0;e<i.sequenceNumber;e++){let t=i.samples[e];t.chunkOffset=s.byteLength+r.byteLength+a;let n=t.data;o.set(n,a),a+=n.byteLength}}let n=el.moov(e,t),l=new Uint8Array(s.byteLength+n.byteLength+o.byteLength+r.byteLength);return l.set(s,0),l.set(r,s.byteLength),l.set(o,s.byteLength+r.byteLength),l.set(n,s.byteLength+o.byteLength+r.byteLength),l}static moov(e,t){let i=e.timescale,s=e.duration,r=t.length,a=el.mvhd(i,s),o=new Uint8Array;for(let e=0;e<r;e++){let i=el.trak(t[e]),s=new Uint8Array(i.byteLength+o.byteLength);s.set(o,0),s.set(i,o.byteLength),o=new Uint8Array(s.byteLength),o.set(s,0)}return el.box(el.types.moov,a,o)}static mvhd(e,t){return el.box(el.types.mvhd,new Uint8Array([0,0,0,0,206,186,253,168,206,186,253,168,e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3]))}static trak(e){return el.box(el.types.trak,el.tkhd(e),el.mdia(e))}static tkhd(e){let t=e.id,i=e.duration,s=e.presentWidth,r=e.presentHeight;return el.box(el.types.tkhd,new Uint8Array([0,0,0,15,206,186,253,168,206,186,253,168,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,s>>>8&255,255&s,0,0,r>>>8&255,255&r,0,0]))}static edts(e,t){return el.box(el.types.edts,el.elst(e,t))}static elst(e,t){let i=0;for(let s=0;s<t;s++)"video"===e[s].type&&(i+=e[s].duration);let s=e[t].duration;return 0===i&&(i=e[t].refSampleDuration),el.box(el.types.elst,new Uint8Array([0,0,0,0,0,0,0,2,i>>>24&255,i>>>16&255,i>>>8&255,255&i,255,255,255,255,0,1,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s,0,0,0,0,0,1,0,0]))}static mdia(e){return el.box(el.types.mdia,el.mdhd(e),el.hdlr(e),el.minf(e))}static mdhd(e){let t=e.timescale/e.refSampleDuration,i=t*e.duration/e.timescale;return el.box(el.types.mdhd,new Uint8Array([0,0,0,0,206,186,253,168,206,186,253,168,t>>>24&255,t>>>16&255,t>>>8&255,255&t,i>>>24&255,i>>>16&255,i>>>8&255,255&i,85,196,0,0]))}static hdlr(e){let t=null;return t=el.constants.HDLR_VIDEO,el.box(el.types.hdlr,t)}static minf(e){let t=null;return t=el.box(el.types.vmhd,el.constants.VMHD),el.box(el.types.minf,t,el.dinf(),el.stbl(e))}static dinf(){return el.box(el.types.dinf,el.box(el.types.dref,el.constants.DREF))}static stbl(e){let t=e.samples,i=[{No:1,num:0,sampleDelte:1,chunkNo:1,duration:t[0].duration}],s=[t[0].duration],r=t.length;for(let e=0;e<r;e++)for(let r=0;r<i.length;r++)t[e].duration===i[r].duration?i[r].num++:s.indexOf(t[e].duration)<0&&(s.push(t[e].duration),i.push({No:2,num:0,sampleDelte:1,chunkNo:e+1,duration:t[e].duration}));return el.box(el.types.stbl,el.stsd(e),el.stts(i),el.stss(t),el.stsc(i),el.stsz(t),el.stco(i,t))}static stts(e){let t=e.length,i=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]),s=i.byteLength,r=new Uint8Array(s+8*t);r.set(i,0);for(let i=0;i<t;i++)r.set(new Uint8Array([e[i].num>>>24&255,e[i].num>>>16&255,e[i].num>>>8&255,255&e[i].num,e[i].sampleDelte>>>24&255,e[i].sampleDelte>>>16&255,e[i].sampleDelte>>>8&255,255&e[i].sampleDelte]),s),s+=8;return el.box(el.types.stts,r)}static stss(e){let t=[],i=e.length;for(let s=0;s<i;s++)!0===e[s].isKeyframe&&t.push(s+1);let s=t.length,r=new Uint8Array([0,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s]),a=r.byteLength,o=new Uint8Array(a+4*s);o.set(r,0);for(let e=0;e<s;e++)o.set(new Uint8Array([t[e]>>>24&255,t[e]>>>16&255,t[e]>>>8&255,255&t[e]]),a),a+=4;return el.box(el.types.stss,o)}static stsc(e){let t=e.length,i=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]),s=i.byteLength,r=new Uint8Array(s+12*t);r.set(i,0);for(let i=0;i<t;i++){let t=e[i].chunkNo,a=e[i].num,o=e[i].sampleDelte;r.set(new Uint8Array([t>>>24&255,t>>>16&255,t>>>8&255,255&t,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o]),s),s+=12}return el.box(el.types.stsc,r)}static stsz(e){let t=e.length,i=new Uint8Array([0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]),s=i.byteLength,r=new Uint8Array(s+4*t);r.set(i,0);for(let i=0;i<t;i++){let t=e[i].data.byteLength;r.set(new Uint8Array([t>>>24&255,t>>>16&255,t>>>8&255,255&t]),s),s+=4}return el.box(el.types.stsz,r)}static stco(e,t){let i=t[0].chunkOffset;return el.box(el.types.stco,new Uint8Array([0,0,0,0,0,0,0,1,i>>>24&255,i>>>16&255,i>>>8&255,255&i]))}static stsd(e){return"audio"===e.type?"mp3"===e.codec?el.box(el.types.stsd,el.constants.STSD_PREFIX,el.mp3(e)):el.box(el.types.stsd,el.constants.STSD_PREFIX,el.mp4a(e)):"avc"===e.videoType?el.box(el.types.stsd,el.constants.STSD_PREFIX,el.avc1(e)):el.box(el.types.stsd,el.constants.STSD_PREFIX,el.hvc1(e))}static mp3(e){let t=e.channelCount,i=e.sampleRate,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return el.box(el.types[".mp3"],s)}static mp4a(e){let t=e.channelCount,i=e.sampleRate,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return el.box(el.types.mp4a,s,el.esds(e))}static esds(e){let t=e.config||[],i=t.length,s=new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(t).concat([6,1,2]));return el.box(el.types.esds,s)}static avc1(e){let t=e.avcc,i=e.codecWidth,s=e.codecHeight,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,s>>>8&255,255&s,0,72,0,0,0,72,0,0,0,0,0,0,0,1,13,106,101,115,115,105,98,117,99,97,45,112,114,111,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return el.box(el.types.avc1,r,el.box(el.types.avcC,t))}static hvc1(e){let t=e.avcc;const i=e.codecWidth,s=e.codecHeight;let r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,s>>>8&255,255&s,0,72,0,0,0,72,0,0,0,0,0,0,0,1,13,106,101,115,115,105,98,117,99,97,45,112,114,111,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return el.box(el.types.hvc1,r,el.box(el.types.hvcC,t))}static mvex(e){return el.box(el.types.mvex,el.trex(e))}static trex(e){let t=e.id,i=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return el.box(el.types.trex,i)}static moof(e,t){return el.box(el.types.moof,el.mfhd(e.sequenceNumber),el.traf(e,t))}static mfhd(e){let t=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return el.box(el.types.mfhd,t)}static traf(e,t){let i=e.id,s=el.box(el.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),r=el.box(el.types.tfdt,new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),a=el.sdtp(e),o=el.trun(e,a.byteLength+16+16+8+16+8+8);return el.box(el.types.traf,s,r,o,a)}static sdtp(e){let t=e.samples||[],i=t.length,s=new Uint8Array(4+i);for(let e=0;e<i;e++){let i=t[e].flags;s[e+4]=i.isLeading<<6|i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy}return el.box(el.types.sdtp,s)}static trun(e,t){let i=e.samples||[],s=i.length,r=12+16*s,a=new Uint8Array(r);t+=8+r,a.set([0,0,15,1,s>>>24&255,s>>>16&255,s>>>8&255,255&s,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0);for(let e=0;e<s;e++){let t=i[e].duration,s=i[e].size,r=i[e].flags,o=i[e].cts;a.set([t>>>24&255,t>>>16&255,t>>>8&255,255&t,s>>>24&255,s>>>16&255,s>>>8&255,255&s,r.isLeading<<2|r.dependsOn,r.isDependedOn<<6|r.hasRedundancy<<4|r.isNonSync,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o],12+16*e)}return el.box(el.types.trun,a)}static mdat(e){return el.box(el.types.mdat,e)}}el.init();class tl extends Xn{constructor(e){super(e),this.TAG_NAME="recorderMP4",this._reset(),e.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this._reset(),this.player.debug.log(this.TAG_NAME,"destroy")}_reset(){super._reset(),this.totalDuration=0,this.totalAudioDuration=0,this.totalByteLength=0,this.totalAudioByteLength=0,this.bufferList=[],this.audioBufferList=[],this.cacheTrack={},this.audioCacheTrack={},this.sequenceNumber=0,this.audioSequenceNumber=0}startRecord(){const e=this.player.debug;this._isRecording=!0,this.player.emit(lt.recording,!0),e.log(this.TAG_NAME,"start recording"),this.player.emit(lt.recordStart),this.startRecordingInterval()}startRecordingInterval(){this.stopRecordingInterval(),this.recordingInterval=window.setInterval((()=>{this.player.emit(lt.recordingTimestamp,this.getTotalDuration())}),1e3)}formatFmp4Track(e,t,i,s){return{id:1,sequenceNumber:++this.sequenceNumber,size:e.byteLength,dts:i,cts:s,isKeyframe:t,data:e,duration:0,flags:{isLeading:0,dependsOn:t?2:1,isDependedOn:t?1:0,hasRedundancy:0,isNonSync:t?0:1}}}formatAudioFmp4Track(e,t){return{id:2,sequenceNumber:++this.audioSequenceNumber,size:e.byteLength,dts:t,pts:t,cts:0,data:new Uint8Array(e),duration:0,originalDts:t,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}}handleAddNaluTrack(e,t,i,s){this.cacheTrack.id&&i>=this.cacheTrack.dts?(this.cacheTrack.duration=i-this.cacheTrack.dts,this.handleAddFmp4Track(this.cacheTrack)):this.cacheTrack={},this.cacheTrack=this.formatFmp4Track(e,t,i,s)}handleAddAudioTrack(e,t){}handleAddFmp4Track(e){if(!this.isRecording)return void this.player.debug.error(this.TAG_NAME,"handleAddFmp4Track, isRecording is false ");if((null===this.sps||null===this.pps)&&this.isH264)return void this.player.debug.error(this.TAG_NAME,"handleAddFmp4Track, is h264 and this.sps or this.pps is null ");if((null===this.sps||null===this.pps||null===this.vps)&&this.isH265)return void this.player.debug.error(this.TAG_NAME,"handleAddFmp4Track, is h265 and this.sps or this.pps or this.vps is null ");const t=Object.assign({},e);t.pts=t.dts+t.cts;const i=t.data;if(t.isKeyframe)if(this.isH264){const e=new Uint8Array(this.sps.byteLength+this.pps.byteLength);e.set(this.sps,0),e.set(this.pps,this.sps.byteLength);const s=new Uint8Array(e.byteLength+i.byteLength);s.set(e,0),s.set(i,e.byteLength),t.data=s}else if(this.isH265){const e=new Uint8Array(this.sps.byteLength+this.pps.byteLength+this.vps.byteLength);e.set(this.vps,0),e.set(this.sps,this.vps.byteLength),e.set(this.pps,this.vps.byteLength+this.sps.byteLength);const s=new Uint8Array(e.byteLength+i.byteLength);s.set(e,0),s.set(i,e.byteLength),t.data=s}t.size=t.data.byteLength,this.totalDuration+=t.duration,this.totalByteLength+=t.data.byteLength,t.duration=0,t.originalDts=t.dts,delete t.id,delete t.sequenceNumber,this.bufferList.push(t)}handleAddFmp4AudioTrack(e){const t=Object.assign({},e);t.pts=t.dts+t.cts,t.size=t.data.byteLength,this.totalAudioDuration+=t.duration,this.totalAudioByteLength+=t.data.byteLength,t.duration=0,t.originalDts=t.dts,delete t.id,delete t.sequenceNumber,this.audioBufferList.push(t)}getTotalDuration(){return this.totalDuration/1e3}getType(){return S}getToTalByteLength(){return this.totalByteLength+this.totalAudioByteLength}stopRecordAndSave(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:At,t=arguments.length>1?arguments[1]:void 0;return new Promise(((i,s)=>{if(!this.isRecording)return this.player.debug.error(this.TAG_NAME,"stop recording fail, isRecording is false "),s("stop recording fail, isRecording is false ");if(0===this.bufferList.length)return this.player.debug.error(this.TAG_NAME,"stop recording fail, this.bufferList.length is 0 "),s("stop recording fail, this.bufferList.length is 0 ");t&&this.setFileName(t);const r={id:1,type:"video",sps:this.sps,pps:this.pps,samples:this.bufferList,sequenceNumber:this.bufferList.length,length:0,addSampleNum:1,duration:0,...this.metaInfo},a={id:2,type:"audio",sequenceNumber:this.audioBufferList.length,samples:this.audioBufferList,...this.audioMetaInfo},o=[r];a.samples.length>0&&o.push(a),this.player.debug.log(this.TAG_NAME,`trackList length is ${o.length}`);const n=el.generateInitSegment({timescale:1e3,duration:this.totalDuration},o,this.totalByteLength+this.totalAudioByteLength);this.player.debug.log(this.TAG_NAME,"stop recording");const l=new Blob([n],{type:"application/octet-stream"});if(e===bt)i(l),this.player.emit(lt.recordBlob,l);else{i();Ma((this.fileName||ha())+"."+S,l)}this._reset(),this.player.emit(lt.recording,!1)}))}}class il extends Xn{constructor(e){super(e),this.TAG_NAME="FlvRecorderLoader",this.player=e,this._init(),this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this._init(),this.player.debug.log(this.TAG_NAME,"destroy")}_init(){this.hasAudio=!1,this.hasVideo=!1,this.startTime=null,this.currentTime=0,this.prevTimestamp=0,this.totalByteLength=0,this.totalDuration=0,this.flvMetaData=null,this.aacSequenceHeader=null,this.videoSequenceHeader=null,this.bufferList=[]}_reset(){super._reset(),this._init()}startRecord(){const e=this.player.debug;this._isRecording=!0,this.player.emit(lt.recording,!0),e.log(this.TAG_NAME,"start recording"),this.player.emit(lt.recordStart),this.startRecordingInterval()}startRecordingInterval(){this.stopRecordingInterval(),this.recordingInterval=window.setInterval((()=>{this.player.emit(lt.recordingTimestamp,this.getTotalDuration())}),1e3)}addMetaData(e){this.flvMetaData=e}addAACSequenceHeader(e){this.aacSequenceHeader=e}addVideoSequenceHeader(e){this.videoSequenceHeader=e}addVideo(e,t){this._setStartTime(t);const i=this._getBufferTs(t);this.hasVideo=!0,this._createBufferItem(e,$e,i)}addAudio(e,t){this._setStartTime(t);const i=this._getBufferTs(t);this.hasAudio=!0,this._createBufferItem(e,ze,i)}_setStartTime(e){null===this.startTime&&this._isRecording&&(this.startTime=e,this.player.debug.log(this.TAG_NAME,`_setStartTime is ${e}`))}_getBufferTs(e){e>this.currentTime&&(this.currentTime=e);let t=0;return this.startTime&&e>=this.startTime&&(t=e-this.startTime),t>this.prevTimestamp?this.prevTimestamp=t:t=this.prevTimestamp,t}_createBufferItem(e,t,i){const s=this._createFlvPacket(e,t,i),r=this._createFlvTag(s);this.totalByteLength+=r.byteLength,this.bufferList.push(r)}_createFlvTag(e){let t=11+e.header.length,i=new Uint8Array(t+4);i[0]=e.header.type;let s=new DataView(i.buffer);return i[1]=e.header.length>>16&255,i[2]=e.header.length>>8&255,i[3]=255&e.header.length,i[4]=e.header.timestamp>>16&255,i[5]=e.header.timestamp>>8&255,i[6]=255&e.header.timestamp,i[7]=e.header.timestamp>>24&255,i[8]=0,i[9]=0,i[10]=0,s.setUint32(t,t),i.set(e.payload.subarray(0,e.header.length),11),i}_createFlvPacket(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{header:{length:e?e.length:0,timestamp:i,type:t},payload:e}}stopRecordAndSave(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:At,t=arguments.length>1?arguments[1]:void 0;return new Promise(((i,s)=>{if(!this.isRecording)return this.player.debug.error(this.TAG_NAME,"stop recording fail, isRecording is false "),s("stop recording fail, isRecording is false ");if(0===this.bufferList.length)return this.player.debug.error(this.TAG_NAME,"stop recording fail, this.bufferList.length is 0 "),s("stop recording fail, this.bufferList.length is 0 ");t&&this.setFileName(t);const r=new Uint8Array([70,76,86,1,0,0,0,0,9,0,0,0,0]);this.hasVideo&&(r[4]|=1),this.hasAudio&&(r[4]|=4);let a=[r];if(this.flvMetaData){const e=this._createFlvPacket(this.flvMetaData,He),t=this._createFlvTag(e);a.push(t)}if(this.videoSequenceHeader){const e=this._createFlvPacket(this.videoSequenceHeader,$e),t=this._createFlvTag(e);a.push(t)}if(this.aacSequenceHeader){const e=this._createFlvPacket(this.aacSequenceHeader,ze),t=this._createFlvTag(e);a.push(t)}const o=function(e){const t=e[0].constructor;return e.reduce(((e,i)=>{const s=new t((0|e.byteLength)+(0|i.byteLength));return s.set(e,0),s.set(i,0|e.byteLength),s}),new t)}(a.concat(this.bufferList));this.player.debug.log(this.TAG_NAME,"stop recording");const n=new Blob([o],{type:"application/octet-stream"});if(e===bt)i(n),this.player.emit(lt.recordBlob,n);else{i();Ma((this.fileName||ha())+"."+E,n)}this._reset(),this.player.emit(lt.recording,!1)}))}getTotalDuration(){let e=0;return null!==this.startTime&&null!==this.currentTime&&(e=this.currentTime-this.startTime),Math.round(e/1e3)}getType(){return E}getToTalByteLength(){return this.totalByteLength}}const sl={init:0,findFirstStartCode:1,findSecondStartCode:2};class rl extends a{constructor(e){super(),this.player=e,this.isDestroyed=!1,this.reset()}destroy(){this.isDestroyed=!1,this.off(),this.reset()}reset(){this.stats=sl.init,this.tempBuffer=new Uint8Array(0),this.parsedOffset=0,this.versionLayer=0}dispatch(e,t){let i=new Uint8Array(this.tempBuffer.length+e.length);for(i.set(this.tempBuffer,0),i.set(e,this.tempBuffer.length),this.tempBuffer=i;!this.isDestroyed;){if(this.state==sl.Init){let e=!1;for(;this.tempBuffer.length-this.parsedOffset>=2&&!this.isDestroyed;)if(255==this.tempBuffer[this.parsedOffset]){if(!(!1&this.tempBuffer[this.parsedOffset+1])){this.versionLayer=this.tempBuffer[this.parsedOffset+1],this.state=sl.findFirstStartCode,this.fisrtStartCodeOffset=this.parsedOffset,this.parsedOffset+=2,e=!0;break}this.parsedOffset++}else this.parsedOffset++;if(e)continue;break}if(this.state==sl.findFirstStartCode){let e=!1;for(;this.tempBuffer.length-this.parsedOffset>=2&&!this.isDestroyed;)if(255==this.tempBuffer[this.parsedOffset]){if(this.tempBuffer[this.parsedOffset+1]==this.versionLayer){this.state=sl.findSecondStartCode,this.secondStartCodeOffset=this.parsedOffset,this.parsedOffset+=2,e=!0;break}this.parsedOffset++}else this.parsedOffset++;if(e)continue;break}if(this.state==sl.findSecondStartCode){let e=this.tempBuffer.slice(this.fisrtStartCodeOffset,this.secondStartCodeOffset);this.emit("data",e,t),this.tempBuffer=this.tempBuffer.slice(this.secondStartCodeOffset),this.fisrtStartCodeOffset=0,this.parsedOffset=2,this.state=sl.findFirstStartCode}}}}class al extends Xn{constructor(e){super(e),this.TAG_NAME="recorderWasmMP4",this._reset(),this.wasmMp4Recorder=new window.JessibucaProMp4Recorder({debug:e._opt.debug,debugLevel:e._opt.debugLevel,debugUuid:e._opt.debugUuid,decoder:e._opt.wasmMp4RecorderDecoder}),this.wasmMp4Recorder.on("recordingTimestamp",(e=>{this._recordingTimestamp=e/1e3})),this.mp3Demuxer=null,e.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.mp3Demuxer&&(this.mp3Demuxer.destroy(),this.mp3Demuxer=null),this._reset(),this.player.debug.log(this.TAG_NAME,"destroy")}_reset(){super._reset(),this.cacheTrack={},this.audioCacheTrack={},this.totalDuration=0,this.totalAudioDuration=0,this.totalByteLength=0,this.totalAudioByteLength=0,this.hasAudio=!1,this.hasVideo=!1}getType(){return S}isWasmMp4(){return!0}getTotalDuration(){return this.totalDuration/1e3}getToTalByteLength(){return this.totalByteLength+this.totalAudioByteLength}startRecord(){const e=this.player.debug,t=this.player.getAudioInfo(),i=this.player.getVideoInfo(),s={};if(this.codecId){const e={type:this.codecId,width:i.width,height:i.height,extraData:this.metaInfo.avcc};s.video=e,this.hasVideo=!0}if(t.encTypeCode){const e={type:t.encTypeCode,sampleRate:t.sampleRate,channels:t.channels,extraData:this.audioMetaInfo.extraData,depth:t.depth};this.audioCodeId=t.encTypeCode,s.audio=e,this.hasAudio=!0}this.wasmMp4Recorder.startRecord(s).then((()=>{this._isRecording=!0,this.player.emit(lt.recording,!0),e.log(this.TAG_NAME,"start recording"),this.player.emit(lt.recordStart),this.startRecordingInterval()})).catch((t=>{e.error(this.TAG_NAME,"startRecord error",t),this.player.emitError(lt.recordCreateError,t)}))}startRecordingInterval(){this.stopRecordingInterval(),this.recordingInterval=window.setInterval((()=>{this.player.emit(lt.recordingTimestamp,this.recordTime)}),1e3)}stopRecordAndSave(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:At,t=arguments.length>1?arguments[1]:void 0;return new Promise(((i,s)=>this.isRecording?0===this.totalDuration?(this.player.debug.error(this.TAG_NAME,"stop recording fail, totalDuration is 0 "),s("stop recording fail, totalDuration is 0 ")):(t&&this.setFileName(t),void this.wasmMp4Recorder.stopRecord().then((t=>{if(e===bt)i(t),this.player.emit(lt.recordBlob,t);else{i();Ma((this.fileName||ha())+"."+S,t)}})).catch((e=>{this.player.debug.error(this.TAG_NAME,"stopRecord error",e),s(e)})).finally((()=>{this._reset(),this.player.emit(lt.recording,!1)}))):(this.player.debug.error(this.TAG_NAME,"stop recording fail, isRecording is false "),s("stop recording fail, isRecording is false "))))}handleAddAudioTrack(e,t){this.audioCodeId===kt?(this.mp3Demuxer||(this.mp3Demuxer=new rl(this.player),this.mp3Demuxer.on("data",((e,t)=>{this._handleAddAudioTrack(e,t)}))),this.mp3Demuxer.dispatch(e,t)):this._handleAddAudioTrack(e,t)}_handleAddAudioTrack(e,t){Ao(this.hasAudio)||(this.audioCacheTrack.id&&t>=this.audioCacheTrack.dts?(this.audioCacheTrack.duration=t-this.audioCacheTrack.dts,this.totalAudioDuration+=this.audioCacheTrack.duration,this.totalAudioByteLength+=this.audioCacheTrack.payload.byteLength,this.wasmMp4Recorder.sendAudioFrame(this.audioCacheTrack.payload,this.audioCacheTrack.dts)):this.audioCacheTrack={},this.audioCacheTrack={id:2,payload:e,dts:t})}handleAddNaluTrack(e,t,i,s){Ao(this.hasVideo)||(this.cacheTrack.id&&i>=this.cacheTrack.dts?(this.cacheTrack.duration=i-this.cacheTrack.dts,this.totalDuration+=this.cacheTrack.duration,this.totalByteLength+=this.cacheTrack.payload.byteLength,this.wasmMp4Recorder.sendVideoFrame(this.cacheTrack.payload,this.cacheTrack.isIFrame,this.cacheTrack.dts,this.cacheTrack.cts)):this.cacheTrack={},this.cacheTrack={id:1,payload:e,isIFrame:t,dts:i,cts:s})}}class ol{constructor(e){return new(ol.getLoaderFactory(e._opt))(e)}static getLoaderFactory(e){if(e.recordType===S){if(e.useWasm||e.useMSE||e.useWCS)return window.JessibucaProMp4Recorder&&e.mp4RecordUseWasm?al:tl}else if(e.recordType===E)return il;return Zn}}function nl(e,t,i){let s=e;if(t+i<s.length){for(;i--;)if(128!=(192&s[++t]))return!1;return!0}return!1}function ll(e){let t=[],i=e,s=0,r=e.length;for(;s<r;)if(i[s]<128)t.push(String.fromCharCode(i[s])),++s;else{if(i[s]<192);else if(i[s]<224){if(nl(i,s,1)){let e=(31&i[s])<<6|63&i[s+1];if(e>=128){t.push(String.fromCharCode(65535&e)),s+=2;continue}}}else if(i[s]<240){if(nl(i,s,2)){let e=(15&i[s])<<12|(63&i[s+1])<<6|63&i[s+2];if(e>=2048&&55296!=(63488&e)){t.push(String.fromCharCode(65535&e)),s+=3;continue}}}else if(i[s]<248&&nl(i,s,3)){let e=(7&i[s])<<18|(63&i[s+1])<<12|(63&i[s+2])<<6|63&i[s+3];if(e>65536&&e<1114112){e-=65536,t.push(String.fromCharCode(e>>>10|55296)),t.push(String.fromCharCode(1023&e|56320)),s+=4;continue}}t.push(String.fromCharCode(65533)),++s}return t.join("")}let dl=function(){let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}();class hl{static parseScriptData(e,t,i){let s={};try{let r=hl.parseValue(e,t,i),a=hl.parseValue(e,t+r.size,i-r.size);s[r.data]=a.data}catch(e){console.error("AMF",e.toString())}return s}static parseObject(e,t,i){let s=hl.parseString(e,t,i),r=hl.parseValue(e,t+s.size,i-s.size),a=r.objectEnd;return{data:{name:s.data,value:r.data},size:s.size+r.size,objectEnd:a}}static parseVariable(e,t,i){return hl.parseObject(e,t,i)}static parseString(e,t,i){let s,r=new DataView(e,t,i).getUint16(0,!dl);return s=r>0?ll(new Uint8Array(e,t+2,r)):"",{data:s,size:2+r}}static parseLongString(e,t,i){let s,r=new DataView(e,t,i).getUint32(0,!dl);return s=r>0?ll(new Uint8Array(e,t+4,r)):"",{data:s,size:4+r}}static parseDate(e,t,i){let s=new DataView(e,t,i),r=s.getFloat64(0,!dl);return r+=60*s.getInt16(8,!dl)*1e3,{data:new Date(r),size:10}}static parseValue(e,t,i){let s,r=new DataView(e,t,i),a=1,o=r.getUint8(0),n=!1;try{switch(o){case 0:s=r.getFloat64(1,!dl),a+=8;break;case 1:s=!!r.getUint8(1),a+=1;break;case 2:{let r=hl.parseString(e,t+1,i-1);s=r.data,a+=r.size;break}case 3:{s={};let o=0;for(9==(16777215&r.getUint32(i-4,!dl))&&(o=3);a<i-4;){let r=hl.parseObject(e,t+a,i-a-o);if(r.objectEnd)break;s[r.data.name]=r.data.value,a+=r.size}if(a<=i-3){9===(16777215&r.getUint32(a-1,!dl))&&(a+=3)}break}case 8:{s={},a+=4;let o=0;for(9==(16777215&r.getUint32(i-4,!dl))&&(o=3);a<i-8;){let r=hl.parseVariable(e,t+a,i-a-o);if(r.objectEnd)break;s[r.data.name]=r.data.value,a+=r.size}if(a<=i-3){9===(16777215&r.getUint32(a-1,!dl))&&(a+=3)}break}case 9:s=void 0,a=1,n=!0;break;case 10:{s=[];let o=r.getUint32(1,!dl);a+=4;for(let r=0;r<o;r++){let r=hl.parseValue(e,t+a,i-a);s.push(r.data),a+=r.size}break}case 11:{let r=hl.parseDate(e,t+1,i-1);s=r.data,a+=r.size;break}case 12:{let r=hl.parseString(e,t+1,i-1);s=r.data,a+=r.size;break}default:a=i,console.warn("AMF","Unsupported AMF value type "+o)}}catch(e){console.error("AMF",e.toString())}return{data:s,size:a,objectEnd:n}}}function cl(e){return hl.parseScriptData(e.buffer,e.byteOffset,e.byteLength)}class ul{constructor(e){this.player=e,this.destroyResolve=null,this.workerClearTimeout=null,this.workerUrl=null;let t=e._opt.decoder;if(this.decoderWorkerCloseTimeout=null,Ao(this.player._opt.useWasm)&&(t=this.player._opt.demuxUseWorker?this.player._opt.mseDecodeAudio||Ao(this.player._opt.hasAudio)?e._opt.decoderHardNotWasm:e._opt.decoderHard:e._opt.decoderAudio),0===t.indexOf("http")&&this.player._opt.isDecoderUseCDN){const e=new Blob([`importScripts("${t}")`],{type:"application/javascript"});t=window.URL.createObjectURL(e),this.workerUrl=t,this.workerClearTimeout=setTimeout((()=>{window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null,this.workerClearTimeout=null}),ie)}this.decoderWorker=new Worker(t),this._initDecoderWorker(),e.debug.log("decoderWorker",`init and decoder url is ${t}`),e.on(lt.visibilityChange,(()=>{this.updateWorkConfig({key:"visibility",value:e.visibility})}))}destroy(){return new Promise(((e,t)=>{if(this.player.loaded)if(this.player.debug.log("decoderWorker","has loaded and post message to destroy"),this.decoderWorker){const t={};this.player.isMseDecoderUseWorker()&&(t.isVideoInited=this.player.isMseVideoStateInited()),this.decoderWorker.postMessage({cmd:Ke,options:t}),this.destroyResolve=e,this.decoderWorkerCloseTimeout=setTimeout((()=>{this.player.debug.warn("decoderWorker","send close but not response and destroy directly"),this.decoderWorkerCloseTimeout&&(clearTimeout(this.decoderWorkerCloseTimeout),this.decoderWorkerCloseTimeout=null),this._destroy(),setTimeout((()=>{e()}),0)}),2e3)}else this.player.debug.warn("decoderWorker","has loaded but decoderWorker is null and destroy directly"),this._destroy(),setTimeout((()=>{e()}),0);else this.player.debug.log("decoderWorker","has not loaded and destroy directly"),this._destroy(),setTimeout((()=>{e()}),0)}))}_destroy(){this.decoderWorkerCloseTimeout&&(clearTimeout(this.decoderWorkerCloseTimeout),this.decoderWorkerCloseTimeout=null),this.workerUrl&&(window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null),this.workerClearTimeout&&(clearTimeout(this.workerClearTimeout),this.workerClearTimeout=null),this.decoderWorker&&(this.decoderWorker.terminate(),this.decoderWorker.onerror=null,this.decoderWorker.onmessageerror=null,this.decoderWorker.onmessage=null,this.decoderWorker=null),this.player.debug.log("decoderWorker","destroy"),this.destroyResolve&&(this.destroyResolve(),this.destroyResolve=null)}_initDecoderWorker(){const{debug:e,events:{proxy:t}}=this.player;this.decoderWorker.onerror=e=>{this.player.debug.error("decoderWorker","onerror",e),this.player.emitError(ut.decoderWorkerInitError,e)},this.decoderWorker.onmessageerror=e=>{this.player.debug.error("decoderWorker","onmessageerror",e)},this.decoderWorker.onmessage=t=>{const i=t.data;switch(i.cmd){case ae:e.log("decoderWorker","onmessage:",ae),this.decoderWorker&&this._initWork(),this.player.loaded||this.player.emit(lt.load),this.player.emit(lt.decoderWorkerInit);break;case pe:e.log("decoderWorker","onmessage:",pe,i.code),this.player._times.decodeStart||(this.player._times.decodeStart=ha()),this.player.video.updateVideoInfo({encTypeCode:i.code});break;case fe:e.log("decoderWorker","onmessage:",fe,i.codecId),this.player.recorder&&this.player.recorder.initMetaData(i.buffer,i.codecId),this.player.video.updateVideoInfo({encTypeCode:i.codecId});break;case he:e.log("decoderWorker","onmessage:",he,i.code),this.player.audio&&this.player.audio.updateAudioInfo({encTypeCode:i.code});break;case ue:e.log("decoderWorker","onmessage:",ue),this.player.recorder&&this.player.recorder.initAudioAacExtraData(i.buffer);break;case oe:if(e.log("decoderWorker","onmessage:",oe,`width:${i.w},height:${i.h}`),Ua(i.w)||Ua(i.h))return void this.player.emitError(ut.videoInfoError,`video width ${i.w} or height ${i.h} is empty`);if(this.player.video.updateVideoInfo({width:i.w,height:i.h}),!this.player._opt.openWebglAlignment&&i.w/2%4!=0&&this.player.getRenderType()===W)return void this.player.emitError(ut.webglAlignmentError);this.player.video.initCanvasViewSize(),this.player._opt.playType===w&&(this.player.video.initFps(),this.player.video.initVideoDelay());break;case de:if(e.log("decoderWorker","onmessage:",de,`channels:${i.channels},sampleRate:${i.sampleRate}`),i.channels>2)return void this.player.emitError(ut.audioChannelError,`audio channel is ${i.channels}, max is 2`);this.player.audio&&(this.player.audio.updateAudioInfo(i),this.player._opt.playType===_?this.player.audio.initScriptNode():this.player._opt.playType===w&&this.player.audio.initScriptNodeDelay());break;case ne:if(!this.player.video)return void e.warn("decoderWorker","onmessage render but video is null");if(this.player.isPlayer()){if(Ao(this.player.video.getHasInit()))return void e.warn("decoderWorker","onmessage render but video has not init");this.player.video.render(i),this.player.handleRender(),this.player.emit(lt.timeUpdate,i.ts),this.player.updateStats({dfps:!0,buf:i.delay}),this.player._times.videoStart||(this.player._times.videoStart=ha(),this.player.handlePlayToRenderTimes())}else this.player.isPlayback()&&(this.player.updateStats({dfps:!0}),Ao(this.player.playbackPause)?(this.player.playback.isUseLocalCalculateTime&&this.player.playback.increaseLocalTimestamp(),this.player.playback.isUseFpsRender?this.player.video.pushData(i):this.player.video.render$2(i)):!this.player.playback.isPlaybackPauseClearCache&&this.player.playback.isCacheBeforeDecodeForFpsRender&&this.player.playback.isUseFpsRender&&this.player.video.pushData(i));break;case me:this.player.recorder&&this.player.recorder.isRecording&&this.player._opt.recordType===S&&this.player.recorder.handleAddNaluTrack(i.buffer,i.isIFrame,i.ts,i.cts);break;case ce:this.player.recorder&&this.player.recorder.isRecording&&this.player._opt.recordType===S&&this.player.recorder.isWasmMp4()&&this.player.recorder.handleAddAudioTrack(i.buffer,i.ts);break;case ge:const{webcodecsDecoder:t,mseDecoder:s}=this.player;this.player.updateStats({buf:i.delay});const r=new Uint8Array(i.payload);this.player._opt.useWCS&&!this.player._opt.useOffscreen?t.decodeVideo(r,i.ts,i.isIFrame,i.cts):this.player._opt.useMSE&&s.decodeVideo(r,i.ts,i.isIFrame,i.cts);break;case ye:if(this.player._opt.useMSE){const e=new Uint8Array(i.payload);this.player.mseDecoder.decodeAudio(e,i.ts,i.cts)}break;case le:if(!this.player.audio)return void e.warn("decoderWorker","onmessage playAudio but audio is null");(this.player.playing&&this.player.audio||!this.player.video)&&(this.player._opt.hasVideo||this.player.handleRender(),(this.player._opt.playType===_||this.player._opt.playType===w&&(Ao(this.player.playbackPause)||!this.player.playback.isPlaybackPauseClearCache&&this.player.playback.isCacheBeforeDecodeForFpsRender&&this.player.playback.isUseFpsRender))&&this.player.audio.play(i.buffer,i.ts));break;case be:if(i.type===lt.streamSuccess)this.player.stream?this.player.stream.emit(lt.streamSuccess):e.warn("decoderWorker","onmessage and workerFetch response stream success but stream is null");else if(i.type===lt.streamRate)this.player.emit(lt.kBps,(i.value/1024).toFixed(2));else if(i.type===lt.streamEnd)this.player?(i.value===m&&this.player.emit(lt.websocketClose,i.msg),this.player.stream?this.player.stream.emit(lt.streamEnd,i.msg):e&&e.warn("decoderWorker","onmessage and workerFetch response stream end but player.stream is null")):e&&e.warn("decoderWorker","onmessage and workerFetch response stream end but player is null");else if(i.type===ut.websocketError)this.player&&this.player.stream?this.player.stream.emit(ut.websocketError,i.value):e&&e.warn("decoderWorker","onmessage and workerFetch response websocket error but stream is null");else if(i.type===ut.fetchError)this.player&&this.player.stream?this.player.stream.emit(ut.fetchError,i.value):e&&e.warn("decoderWorker","onmessage and workerFetch response fetch error but stream is null");else if(i.type===lt.streamAbps)this.player.updateStats({abps:i.value});else if(i.type===lt.streamVbps)this.player._times.demuxStart||(this.player._times.demuxStart=ha()),this.player.updateStats({vbps:i.value});else if(i.type===lt.streamDts)this.player.updateStats({dts:i.value});else if(i.type===lt.netBuf)this.player.updateStats({netBuf:i.value});else if(i.type===lt.networkDelayTimeout)this.player.emit(lt.networkDelayTimeout,i.value);else if(i.type===lt.streamStats){const e=JSON.parse(i.value);this.player.updateStats({workerStats:e})}else i.type===lt.websocketOpen&&this.player.emit(lt.websocketOpen);break;case _e:this.player&&(this.player.videoIframeIntervalTs=i.value);break;case ve:this.player&&this.player.updateStats({isDropping:!0});break;case Me:this.player.decoderCheckFirstIFrame();break;case Se:this.player&&this.player.video&&this.player.video.setStreamFps(i.value);break;case Ae:i.message&&-1!==i.message.indexOf(Ne)&&this.player.emitError(ut.wasmDecodeError,"");break;case Te:this.player.emitError(ut.wasmDecodeVideoNoResponseError);break;case Ce:this.player.emitError(ut.simdH264DecodeVideoWidthIsTooLarge);break;case Ee:this.player.emitError(ut.wasmWidthOrHeightChange);break;case ke:this.player.emitError(ut.simdDecodeError);break;case we:e.log("decoderWorker","onmessage:",we);break;case xe:e.log("decoderWorker","onmessage:",xe),this._destroy();break;case Re:this.player&&this.player.pushTempStream(i.buffer);break;case De:this.player&&this.player.emit(lt.videoSEI,{ts:i.ts,data:new Uint8Array(i.buffer)});break;case Le:if(this.player){if(this.player.isRecordTypeFlv()){const e=new Uint8Array(i.buffer);this.player.recorder.addMetaData(e)}const e=cl(new Uint8Array(i.buffer));e&&e.onMetaData&&this.player.updateMetaData(e.onMetaData)}break;case Ie:if(this.player&&this.player.isRecordTypeFlv()){const e=new Uint8Array(i.buffer);this.player.recorder.addAACSequenceHeader(e,i.ts)}break;case Pe:if(this.player&&this.player.isRecordTypeFlv()){const e=new Uint8Array(i.buffer);this.player.recorder.addVideoSequenceHeader(e,i.ts)}break;case Be:if(this.player&&this.player.isRecordTypeFlv()&&this.player.recording){const e=new Uint8Array(i.buffer);i.type===Ge?this.player.recorder.addVideo(e,i.ts):i.type===je&&this.player.recorder.addAudio(e,i.ts)}break;case Ue:this.player&&(this.player.debug.log("decoderWorker","onmessage:",Ue),this.player.video.$videoElement.srcObject=i.mseHandle);break;case Fe:this.player&&(this.player.debug.log("decoderWorker","onmessage:",Fe,i.value),this.player._mseWorkerData.firstRenderTime=Number(i.value));break;case Oe:this.player&&(this.player.debug.log("decoderWorker","onmessage:",Oe,i.value,i.msg),this.player.emitError(i.value,i.msg));break;default:this.player[i.cmd]&&this.player[i.cmd](i)}}}_initWork(){const e={debug:this.player._opt.debug,debugLevel:this.player._opt.debugLevel,debugUuid:this.player._opt.debugUuid,useOffscreen:this.player._opt.useOffscreen,useWCS:this.player._opt.useWCS,useMSE:this.player._opt.useMSE,videoBuffer:this.player._opt.videoBuffer,videoBufferDelay:this.player._opt.videoBufferDelay,openWebglAlignment:this.player._opt.openWebglAlignment,playType:this.player._opt.playType,hasAudio:this.player._opt.hasAudio,hasVideo:this.player._opt.hasVideo,playbackRate:1,playbackForwardMaxRateDecodeIFrame:this.player._opt.playbackForwardMaxRateDecodeIFrame,playbackIsCacheBeforeDecodeForFpsRender:this.player._opt.playbackConfig.isCacheBeforeDecodeForFpsRender,sampleRate:this.player.audio&&this.player.audio.audioContext&&this.player.audio.audioContext.sampleRate||0,audioBufferSize:this.player.audio&&this.player.audio.getAudioBufferSize()||1024,networkDelay:this.player._opt.networkDelay,visibility:this.player.visibility,useSIMD:this.player._opt.useSIMD,recordType:this.player._opt.recordType,checkFirstIFrame:this.player._opt.checkFirstIFrame,isM7sCrypto:this.player._opt.isM7sCrypto,isXorCrypto:this.player._opt.isXorCrypto,isSm4Crypto:this.player._opt.isSm4Crypto,sm4CryptoKey:this.player._opt.sm4CryptoKey,m7sCryptoAudio:this.player._opt.m7sCryptoAudio,isFlv:this.player._opt.isFlv,isFmp4:this.player._opt.isFmp4,isMpeg4:this.player._opt.isMpeg4,isTs:this.player._opt.isTs,isNakedFlow:this.player._opt.isNakedFlow,isHls265:this.player.isUseHls265(),isFmp4Private:this.player._opt.isFmp4Private,isEmitSEI:this.player._opt.isEmitSEI,isRecordTypeFlv:this.player.isRecordTypeFlv(),isWasmMp4:this.player.recorder&&this.player.recorder.isWasmMp4()||!1,isChrome:Xa(),isDropSameTimestampGop:this.player._opt.isDropSameTimestampGop,mseDecodeAudio:this.player._opt.mseDecodeAudio,nakedFlowH265DemuxUseNew:this.player._opt.nakedFlowH265DemuxUseNew,mseDecoderUseWorker:this.player._opt.mseDecoderUseWorker,mseAutoCleanupMinBackwardDuration:this.player._opt.mseAutoCleanupMinBackwardDuration,mseAutoCleanupMaxBackwardDuration:this.player._opt.mseAutoCleanupMaxBackwardDuration,mseCorrectTimeDuration:this.player._opt.mseCorrectTimeDuration,mseCorrectAudioTimeDuration:this.player._opt.mseCorrectAudioTimeDuration};this.decoderWorker.postMessage({cmd:Ve,opt:JSON.stringify(e)}),this.player._opt.isM7sCrypto&&(this.updateWorkConfig({key:"cryptoKey",value:this.player._opt.cryptoKey}),this.updateWorkConfig({key:"cryptoIV",value:this.player._opt.cryptoIV}))}decodeVideo(e,t,i){this.player._opt.playType===_?this.player.isUseHls265()?this._decodeVideoNoDelay(e,t,i):this._decodeVideo(e,t,i):this.player._opt.playType===w&&(this.player.video.rate>=this.player._opt.playbackForwardMaxRateDecodeIFrame?i&&(this.player.debug.log("decoderWorker",`current rate is ${this.player.video.rate},only decode i frame`),this._decodeVideoNoDelay(e,t,i)):1===this.player.video.rate?this._decodeVideo(e,t,i):this._decodeVideoNoDelay(e,t,i))}_decodeVideo(e,t,i){const s={type:Ge,ts:Math.max(t,0),isIFrame:i};this.decoderWorker.postMessage({cmd:We,buffer:e,options:s},[e.buffer])}_decodeVideoNoDelay(e,t,i){this.decoderWorker.postMessage({cmd:qe,buffer:e,ts:Math.max(t,0),isIFrame:i},[e.buffer])}decodeAudio(e,t){this.player._opt.playType===_?this.player._opt.useWCS||this.player._opt.useMSE||this.player.isUseHls265()?this._decodeAudioNoDelay(e,t):this._decodeAudio(e,t):this.player._opt.playType===w&&(1===this.player.video.rate?this._decodeAudio(e,t):this._decodeAudioNoDelay(e,t))}_decodeAudio(e,t){const i={type:je,ts:Math.max(t,0)};this.decoderWorker.postMessage({cmd:We,buffer:e,options:i},[e.buffer])}_decodeAudioNoDelay(e,t){this.decoderWorker.postMessage({cmd:Je,buffer:e,ts:Math.max(t,0)},[e.buffer])}updateWorkConfig(e){this.decoderWorker&&this.decoderWorker.postMessage({cmd:Ye,key:e.key,value:e.value})}workerFetchStream(e){const{_opt:t}=this.player,i={protocol:t.protocol,isFlv:t.isFlv,isFmp4:t.isFmp4,isMpeg4:t.isMpeg4,isNakedFlow:t.isNakedFlow,isTs:t.isTs};this.decoderWorker.postMessage({cmd:Xe,url:e,opt:JSON.stringify(i)})}clearWorkBuffer(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.decoderWorker.postMessage({cmd:Qe,needClear:e})}workerSendMessage(e){this.decoderWorker.postMessage({cmd:Ze,message:e})}updateVideoTimestamp(e){this.decoderWorker.postMessage({cmd:et,message:e})}}var pl,fl="application/json, text/javascript",ml="text/html",gl=/^(?:text|application)\/xml/i,yl=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Al=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,bl=/^\s*$/,_l={},vl={},wl="",Sl={type:"GET",beforeSend:Tl,success:Tl,error:Tl,complete:Tl,context:null,xhr:function(){return new window.XMLHttpRequest},accepts:{json:fl,xml:"application/xml, text/xml",html:ml,text:"text/plain","*":"*/".concat("*")},crossDomain:!1,timeout:0,username:null,password:null,processData:!0,promise:Tl,contentType:"application/x-www-form-urlencoded; charset=UTF-8"};function Tl(){}var El=function(e,t){"object"==typeof e&&(t=e,e=void 0);var i=Pl({},t=t||{});for(var s in Sl)void 0===i[s]&&(i[s]=Sl[s]);try{var r={},a=new Promise((function(e,t){r.resolve=e,r.reject=t}));a.resolve=r.resolve,a.reject=r.reject,i.promise=a}catch(e){i.promise={resolve:Tl,reject:Tl}}var o=Al.exec(window.location.href.toLowerCase())||[];i.url=((e||i.url||window.location.href)+"").replace(/#.*$/,"").replace(/^\/\//,o[1]+"//");var n=i.url;i.crossDomain||(i.crossDomain=/^([\w-]+:)?\/\/([^\/]+)/.test(i.url)&&RegExp.$2!==window.location.href);var l=i.dataType;if("jsonp"===l){if(!/=\?/.test(i.url)){var d=(i.jsonp||"callback")+"=?";i.url=Dl(i.url,d)}return function(e){var t,i=e.jsonpCallback||"jsonp"+Ul(),s=window.document.createElement("script"),r={abort:function(){i in window&&(window[i]=Tl)}},a=window.document.getElementsByTagName("head")[0]||window.document.documentElement;function o(i){window.clearTimeout(t),r.abort(),xl(i.type,r,i.type,e),n()}s.onerror=function(e){o(e)},window[i]=function(i){window.clearTimeout(t),kl(i,r,e),n()},Ll(e),s.src=e.url.replace(/=\?/,"="+i),s.src=Dl(s.src,"_="+(new Date).getTime()),s.async=!0,e.scriptCharset&&(s.charset=e.scriptCharset);a.insertBefore(s,a.firstChild),e.timeout>0&&(t=window.setTimeout((function(){r.abort(),xl("timeout",r,"timeout",e),n()}),e.timeout));function n(){s.clearAttributes?s.clearAttributes():s.onload=s.onreadystatechange=s.onerror=null,s.parentNode&&s.parentNode.removeChild(s),s=null,delete window[i]}return e.promise.abort=function(){r.abort()},e.promise.xhr=r,e.promise}(i)}Ll(i);var h=i.accepts[l]||i.accepts["*"],c={};/^([\w-]+:)\/\//.test(i.url)?RegExp.$1:window.location.protocol;var u,p=Sl.xhr();i.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest"),i.ifModified&&(_l[n]&&(c["If-Modified-Since"]=_l[n]),vl[n]&&(c["If-None-Match"]=vl[n])),h&&(c.Accept=h,h.indexOf(",")>-1&&(h=h.split(",",2)[0]),p.overrideMimeType&&p.overrideMimeType(h));var f=!/^(?:GET|HEAD)$/.test(i.type.toUpperCase());if((i.data&&f&&!1!==i.contentType||t.contentType)&&(c["Content-Type"]=i.contentType),!1===i.cache&&!f){var m=/([?&])_=[^&]*/;i.url=m.test(n)?n.replace(m,"$1_="+Ul()):n+(/\?/.test(n)?"&":"?")+"_="+Ul()}i.headers=Pl(c,i.headers||{}),p.onreadystatechange=function(){if(4===p.readyState){var e;clearTimeout(u);var t=!1;if(p.status>=200&&p.status<300||304===p.status){if(wl=p.getAllResponseHeaders(),i.ifModified){var s=Rl("Last-Modified");s&&(_l[n]=s),(s=Rl("etag"))&&(vl[n]=s)}l=l||function(e){return e&&(e===ml?"html":e===fl?"json":gl.test(e)&&"xml")||"text"}(p.getResponseHeader("content-type")),e=p.responseText;try{"xml"===l?e=p.responseXML:"json"===l&&(e=bl.test(e)?null:JSON.parse(e))}catch(e){t=e}t?xl(t,"parseerror",p,i):kl(e,p,i)}else xl(null,"error",p,i)}};var g=!("async"in i)||i.async;if(p.open(i.type,i.url,g,i.username,i.password),i.xhrFields)for(var y in i.xhrFields)p[y]=i.xhrFields[y];for(var y in i.mimeType&&p.overrideMimeType&&p.overrideMimeType(i.mimeType),i.headers)void 0!==i.headers[y]&&p.setRequestHeader(y,i.headers[y]+"");return!1===function(e,t){var i=t.context;if(!1===t.beforeSend.call(i,e,t))return!1}(p,i)?(p.abort(),!1):(i.timeout>0&&(u=window.setTimeout((function(){p.onreadystatechange=Tl,p.abort(),xl(null,"timeout",p,i)}),i.timeout)),p.send(i.data?i.data:null),i.promise.abort=function(){p.abort()},i.promise)};function kl(e,t,i){var s=i.context,r="success";i.success.call(s,e,r,t),i.promise.resolve(e,r,t),Cl(r,t,i)}function Cl(e,t,i){var s=i.context;i.complete.call(s,t,e)}function xl(e,t,i,s){var r=s.context;s.error.call(r,i,t,e),s.promise.reject(i,t,e),Cl(t,i,s)}function Rl(e){var t;if(!pl){for(pl={};t=yl.exec(wl);)pl[t[1].toLowerCase()]=t[2];t=pl[e.toLowerCase()]}return null===t?null:t}function Dl(e,t){return(e+"&"+t).replace(/[&?]{1,2}/,"?")}function Ll(e){!Bl(e)||e.data instanceof FormData||!e.processData||(e.data=function(e,t){var i=[];return i.add=function(e,t){this.push(encodeURIComponent(e)+"="+encodeURIComponent(t))},Il(i,e,t),i.join("&").replace("%20","+")}(e.data)),!e.data||e.type&&"GET"!==e.type.toUpperCase()||(e.url=Dl(e.url,e.data))}function Il(e,t,i,s){var r=function(e){return"[object Array]"===Object.prototype.toString.call(e)}(t);for(var a in t){var o=t[a];s&&(a=i?s:s+"["+(r?"":a)+"]"),!s&&r?e.add(o.name,o.value):(i?r(o):Bl(o))?Il(e,o,i,a):e.add(a,o)}}function Pl(e){for(var t=Array.prototype.slice,i=t.call(arguments,1),s=0,r=i.length;s<r;s++){var a=i[s]||{};for(var o in a)a.hasOwnProperty(o)&&void 0!==a[o]&&(e[o]=a[o])}return e}function Bl(e){var t=typeof e;return"function"===t||"object"===t&&!!e}function Ml(e){return"function"==typeof e}function Ul(){return(new Date).getTime()}function Fl(e){return parseInt(e)===e}function Ol(e){if(!Fl(e.length))return!1;for(var t=0;t<e.length;t++)if(!Fl(e[t])||e[t]<0||e[t]>255)return!1;return!0}function Nl(e,t){if(e.buffer&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!Ol(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(Fl(e.length)&&Ol(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function jl(e){return new Uint8Array(e)}function Gl(e,t,i,s,r){null==s&&null==r||(e=e.slice?e.slice(s,r):Array.prototype.slice.call(e,s,r)),t.set(e,i)}El.get=function(e,t,i,s){return Ml(t)&&(s=s||i,i=t,t=void 0),El({url:e,data:t,success:i,dataType:s})},El.post=function(e,t,i,s){return Ml(t)&&(s=s||i,i=t,t=void 0),El({type:"POST",url:e,data:t,success:i,dataType:s})},El.getJSON=function(e,t,i){return Ml(t)&&(i=t,t=void 0),El({url:e,data:t,success:i,dataType:"json"})},El.ajaxSetup=function(e,t){return t?Pl(Pl(e,Sl),t):Pl(Sl,e)};var zl={toBytes:function(e){var t=[],i=0;for(e=encodeURI(e);i<e.length;){var s=e.charCodeAt(i++);37===s?(t.push(parseInt(e.substr(i,2),16)),i+=2):t.push(s)}return Nl(t)},fromBytes:function(e){for(var t=[],i=0;i<e.length;){var s=e[i];s<128?(t.push(String.fromCharCode(s)),i++):s>191&&s<224?(t.push(String.fromCharCode((31&s)<<6|63&e[i+1])),i+=2):(t.push(String.fromCharCode((15&s)<<12|(63&e[i+1])<<6|63&e[i+2])),i+=3)}return t.join("")}},$l=function(){var e="0123456789abcdef";return{toBytes:function(e){for(var t=[],i=0;i<e.length;i+=2)t.push(parseInt(e.substr(i,2),16));return t},fromBytes:function(t){for(var i=[],s=0;s<t.length;s++){var r=t[s];i.push(e[(240&r)>>4]+e[15&r])}return i.join("")}}}(),Hl={16:10,24:12,32:14},Vl=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],Wl=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],Jl=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],ql=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],Kl=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],Yl=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],Ql=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],Xl=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],Zl=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],ed=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],td=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],id=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],sd=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],rd=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],ad=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function od(e){for(var t=[],i=0;i<e.length;i+=4)t.push(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]);return t}var nd=function(e){if(!(this instanceof nd))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:Nl(e,!0)}),this._prepare()};nd.prototype._prepare=function(){var e=Hl[this.key.length];if(null==e)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var t=0;t<=e;t++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);var i,s=4*(e+1),r=this.key.length/4,a=od(this.key);for(t=0;t<r;t++)i=t>>2,this._Ke[i][t%4]=a[t],this._Kd[e-i][t%4]=a[t];for(var o,n=0,l=r;l<s;){if(o=a[r-1],a[0]^=Wl[o>>16&255]<<24^Wl[o>>8&255]<<16^Wl[255&o]<<8^Wl[o>>24&255]^Vl[n]<<24,n+=1,8!=r)for(t=1;t<r;t++)a[t]^=a[t-1];else{for(t=1;t<r/2;t++)a[t]^=a[t-1];o=a[r/2-1],a[r/2]^=Wl[255&o]^Wl[o>>8&255]<<8^Wl[o>>16&255]<<16^Wl[o>>24&255]<<24;for(t=r/2+1;t<r;t++)a[t]^=a[t-1]}for(t=0;t<r&&l<s;)d=l>>2,h=l%4,this._Ke[d][h]=a[t],this._Kd[e-d][h]=a[t++],l++}for(var d=1;d<e;d++)for(var h=0;h<4;h++)o=this._Kd[d][h],this._Kd[d][h]=id[o>>24&255]^sd[o>>16&255]^rd[o>>8&255]^ad[255&o]},nd.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,i=[0,0,0,0],s=od(e),r=0;r<4;r++)s[r]^=this._Ke[0][r];for(var a=1;a<t;a++){for(r=0;r<4;r++)i[r]=ql[s[r]>>24&255]^Kl[s[(r+1)%4]>>16&255]^Yl[s[(r+2)%4]>>8&255]^Ql[255&s[(r+3)%4]]^this._Ke[a][r];s=i.slice()}var o,n=jl(16);for(r=0;r<4;r++)o=this._Ke[t][r],n[4*r]=255&(Wl[s[r]>>24&255]^o>>24),n[4*r+1]=255&(Wl[s[(r+1)%4]>>16&255]^o>>16),n[4*r+2]=255&(Wl[s[(r+2)%4]>>8&255]^o>>8),n[4*r+3]=255&(Wl[255&s[(r+3)%4]]^o);return n},nd.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,i=[0,0,0,0],s=od(e),r=0;r<4;r++)s[r]^=this._Kd[0][r];for(var a=1;a<t;a++){for(r=0;r<4;r++)i[r]=Xl[s[r]>>24&255]^Zl[s[(r+3)%4]>>16&255]^ed[s[(r+2)%4]>>8&255]^td[255&s[(r+1)%4]]^this._Kd[a][r];s=i.slice()}var o,n=jl(16);for(r=0;r<4;r++)o=this._Kd[t][r],n[4*r]=255&(Jl[s[r]>>24&255]^o>>24),n[4*r+1]=255&(Jl[s[(r+3)%4]>>16&255]^o>>16),n[4*r+2]=255&(Jl[s[(r+2)%4]>>8&255]^o>>8),n[4*r+3]=255&(Jl[255&s[(r+1)%4]]^o);return n};var ld=function(e){if(!(this instanceof ld))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new nd(e)};ld.prototype.encrypt=function(e){if((e=Nl(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=jl(e.length),i=jl(16),s=0;s<e.length;s+=16)Gl(e,i,0,s,s+16),Gl(i=this._aes.encrypt(i),t,s);return t},ld.prototype.decrypt=function(e){if((e=Nl(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=jl(e.length),i=jl(16),s=0;s<e.length;s+=16)Gl(e,i,0,s,s+16),Gl(i=this._aes.decrypt(i),t,s);return t};var dd=function(e,t){if(!(this instanceof dd))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else t=jl(16);this._lastCipherblock=Nl(t,!0),this._aes=new nd(e)};dd.prototype.encrypt=function(e){if((e=Nl(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=jl(e.length),i=jl(16),s=0;s<e.length;s+=16){Gl(e,i,0,s,s+16);for(var r=0;r<16;r++)i[r]^=this._lastCipherblock[r];this._lastCipherblock=this._aes.encrypt(i),Gl(this._lastCipherblock,t,s)}return t},dd.prototype.decrypt=function(e){if((e=Nl(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=jl(e.length),i=jl(16),s=0;s<e.length;s+=16){Gl(e,i,0,s,s+16),i=this._aes.decrypt(i);for(var r=0;r<16;r++)t[s+r]=i[r]^this._lastCipherblock[r];Gl(e,this._lastCipherblock,0,s,s+16)}return t};var hd=function(e,t,i){if(!(this instanceof hd))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 size)")}else t=jl(16);i||(i=1),this.segmentSize=i,this._shiftRegister=Nl(t,!0),this._aes=new nd(e)};hd.prototype.encrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var t,i=Nl(e,!0),s=0;s<i.length;s+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var r=0;r<this.segmentSize;r++)i[s+r]^=t[r];Gl(this._shiftRegister,this._shiftRegister,0,this.segmentSize),Gl(i,this._shiftRegister,16-this.segmentSize,s,s+this.segmentSize)}return i},hd.prototype.decrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var t,i=Nl(e,!0),s=0;s<i.length;s+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var r=0;r<this.segmentSize;r++)i[s+r]^=t[r];Gl(this._shiftRegister,this._shiftRegister,0,this.segmentSize),Gl(e,this._shiftRegister,16-this.segmentSize,s,s+this.segmentSize)}return i};var cd=function(e,t){if(!(this instanceof cd))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else t=jl(16);this._lastPrecipher=Nl(t,!0),this._lastPrecipherIndex=16,this._aes=new nd(e)};cd.prototype.encrypt=function(e){for(var t=Nl(e,!0),i=0;i<t.length;i++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),t[i]^=this._lastPrecipher[this._lastPrecipherIndex++];return t},cd.prototype.decrypt=cd.prototype.encrypt;var ud=function(e){if(!(this instanceof ud))throw Error("Counter must be instanitated with `new`");0===e||e||(e=1),"number"==typeof e?(this._counter=jl(16),this.setValue(e)):this.setBytes(e)};ud.prototype.setValue=function(e){if("number"!=typeof e||parseInt(e)!=e)throw new Error("invalid counter value (must be an integer)");if(e>Number.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var t=15;t>=0;--t)this._counter[t]=e%256,e=parseInt(e/256)},ud.prototype.setBytes=function(e){if(16!=(e=Nl(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},ud.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var pd=function(e,t){if(!(this instanceof pd))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof ud||(t=new ud(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new nd(e)};pd.prototype.encrypt=function(e){for(var t=Nl(e,!0),i=0;i<t.length;i++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),t[i]^=this._remainingCounter[this._remainingCounterIndex++];return t},pd.prototype.decrypt=pd.prototype.encrypt;const fd={AES:nd,Counter:ud,ModeOfOperation:{ecb:ld,cbc:dd,cfb:hd,ofb:cd,ctr:pd},utils:{hex:$l,utf8:zl},padding:{pkcs7:{pad:function(e){var t=16-(e=Nl(e,!0)).length%16,i=jl(e.length+t);Gl(e,i);for(var s=e.length;s<i.length;s++)i[s]=t;return i},strip:function(e){if((e=Nl(e,!0)).length<16)throw new Error("PKCS#7 invalid length");var t=e[e.length-1];if(t>16)throw new Error("PKCS#7 padding byte out of range");for(var i=e.length-t,s=0;s<t;s++)if(e[i+s]!==t)throw new Error("PKCS#7 invalid padding byte");var r=jl(i);return Gl(e,r,0,0,i),r}}},_arrayTest:{coerceArray:Nl,createArray:jl,copyArray:Gl}};var md=Nr((function(e,t){var i;e.exports=(i=i||function(e,t){var i;if("undefined"!=typeof window&&window.crypto&&(i=window.crypto),"undefined"!=typeof self&&self.crypto&&(i=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(i=globalThis.crypto),!i&&"undefined"!=typeof window&&window.msCrypto&&(i=window.msCrypto),!i&&void 0!==Or&&Or.crypto&&(i=Or.crypto),!i)try{i=r.default}catch(e){}var s=function(){if(i){if("function"==typeof i.getRandomValues)try{return i.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof i.randomBytes)try{return i.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function e(){}return function(t){var i;return e.prototype=t,i=new e,e.prototype=null,i}}(),o={},n=o.lib={},l=n.Base={extend:function(e){var t=a(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},d=n.WordArray=l.extend({init:function(e,i){e=this.words=e||[],this.sigBytes=i!=t?i:4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,i=e.words,s=this.sigBytes,r=e.sigBytes;if(this.clamp(),s%4)for(var a=0;a<r;a++){var o=i[a>>>2]>>>24-a%4*8&255;t[s+a>>>2]|=o<<24-(s+a)%4*8}else for(var n=0;n<r;n+=4)t[s+n>>>2]=i[n>>>2];return this.sigBytes+=r,this},clamp:function(){var t=this.words,i=this.sigBytes;t[i>>>2]&=4294967295<<32-i%4*8,t.length=e.ceil(i/4)},clone:function(){var e=l.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],i=0;i<e;i+=4)t.push(s());return new d.init(t,e)}}),h=o.enc={},c=h.Hex={stringify:function(e){for(var t=e.words,i=e.sigBytes,s=[],r=0;r<i;r++){var a=t[r>>>2]>>>24-r%4*8&255;s.push((a>>>4).toString(16)),s.push((15&a).toString(16))}return s.join("")},parse:function(e){for(var t=e.length,i=[],s=0;s<t;s+=2)i[s>>>3]|=parseInt(e.substr(s,2),16)<<24-s%8*4;return new d.init(i,t/2)}},u=h.Latin1={stringify:function(e){for(var t=e.words,i=e.sigBytes,s=[],r=0;r<i;r++){var a=t[r>>>2]>>>24-r%4*8&255;s.push(String.fromCharCode(a))}return s.join("")},parse:function(e){for(var t=e.length,i=[],s=0;s<t;s++)i[s>>>2]|=(255&e.charCodeAt(s))<<24-s%4*8;return new d.init(i,t)}},p=h.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},f=n.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new d.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var i,s=this._data,r=s.words,a=s.sigBytes,o=this.blockSize,n=a/(4*o),l=(n=t?e.ceil(n):e.max((0|n)-this._minBufferSize,0))*o,h=e.min(4*l,a);if(l){for(var c=0;c<l;c+=o)this._doProcessBlock(r,c);i=r.splice(0,l),s.sigBytes-=h}return new d.init(i,h)},clone:function(){var e=l.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});n.Hasher=f.extend({cfg:l.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,i){return new e.init(i).finalize(t)}},_createHmacHelper:function(e){return function(t,i){return new m.HMAC.init(e,i).finalize(t)}}});var m=o.algo={};return o}(Math),i)})),gd=(Nr((function(e,t){var i,s,r,a,o,n,l;e.exports=(r=(s=l=md).lib,a=r.Base,o=r.WordArray,(n=s.x64={}).Word=a.extend({init:function(e,t){this.high=e,this.low=t}}),n.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=t!=i?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,i=[],s=0;s<t;s++){var r=e[s];i.push(r.high),i.push(r.low)}return o.create(i,this.sigBytes)},clone:function(){for(var e=a.clone.call(this),t=e.words=this.words.slice(0),i=t.length,s=0;s<i;s++)t[s]=t[s].clone();return e}}),l)})),Nr((function(e,t){var i;e.exports=(i=md,function(){if("function"==typeof ArrayBuffer){var e=i.lib.WordArray,t=e.init,s=e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var i=e.byteLength,s=[],r=0;r<i;r++)s[r>>>2]|=e[r]<<24-r%4*8;t.call(this,s,i)}else t.apply(this,arguments)};s.prototype=e}}(),i.lib.WordArray)})),Nr((function(e,t){var i;e.exports=(i=md,function(){var e=i,t=e.lib.WordArray,s=e.enc;function r(e){return e<<8&4278255360|e>>>8&16711935}s.Utf16=s.Utf16BE={stringify:function(e){for(var t=e.words,i=e.sigBytes,s=[],r=0;r<i;r+=2){var a=t[r>>>2]>>>16-r%4*8&65535;s.push(String.fromCharCode(a))}return s.join("")},parse:function(e){for(var i=e.length,s=[],r=0;r<i;r++)s[r>>>1]|=e.charCodeAt(r)<<16-r%2*16;return t.create(s,2*i)}},s.Utf16LE={stringify:function(e){for(var t=e.words,i=e.sigBytes,s=[],a=0;a<i;a+=2){var o=r(t[a>>>2]>>>16-a%4*8&65535);s.push(String.fromCharCode(o))}return s.join("")},parse:function(e){for(var i=e.length,s=[],a=0;a<i;a++)s[a>>>1]|=r(e.charCodeAt(a)<<16-a%2*16);return t.create(s,2*i)}}}(),i.enc.Utf16)})),Nr((function(e,t){var i;e.exports=(i=md,function(){var e=i,t=e.lib.WordArray;function s(e,i,s){for(var r=[],a=0,o=0;o<i;o++)if(o%4){var n=s[e.charCodeAt(o-1)]<<o%4*2|s[e.charCodeAt(o)]>>>6-o%4*2;r[a>>>2]|=n<<24-a%4*8,a++}return t.create(r,a)}e.enc.Base64={stringify:function(e){var t=e.words,i=e.sigBytes,s=this._map;e.clamp();for(var r=[],a=0;a<i;a+=3)for(var o=(t[a>>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,n=0;n<4&&a+.75*n<i;n++)r.push(s.charAt(o>>>6*(3-n)&63));var l=s.charAt(64);if(l)for(;r.length%4;)r.push(l);return r.join("")},parse:function(e){var t=e.length,i=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var a=0;a<i.length;a++)r[i.charCodeAt(a)]=a}var o=i.charAt(64);if(o){var n=e.indexOf(o);-1!==n&&(t=n)}return s(e,t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),i.enc.Base64)})),Nr((function(e,t){var i;e.exports=(i=md,function(){var e=i,t=e.lib.WordArray;function s(e,i,s){for(var r=[],a=0,o=0;o<i;o++)if(o%4){var n=s[e.charCodeAt(o-1)]<<o%4*2|s[e.charCodeAt(o)]>>>6-o%4*2;r[a>>>2]|=n<<24-a%4*8,a++}return t.create(r,a)}e.enc.Base64url={stringify:function(e,t){void 0===t&&(t=!0);var i=e.words,s=e.sigBytes,r=t?this._safe_map:this._map;e.clamp();for(var a=[],o=0;o<s;o+=3)for(var n=(i[o>>>2]>>>24-o%4*8&255)<<16|(i[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|i[o+2>>>2]>>>24-(o+2)%4*8&255,l=0;l<4&&o+.75*l<s;l++)a.push(r.charAt(n>>>6*(3-l)&63));var d=r.charAt(64);if(d)for(;a.length%4;)a.push(d);return a.join("")},parse:function(e,t){void 0===t&&(t=!0);var i=e.length,r=t?this._safe_map:this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var o=0;o<r.length;o++)a[r.charCodeAt(o)]=o}var n=r.charAt(64);if(n){var l=e.indexOf(n);-1!==l&&(i=l)}return s(e,i,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),i.enc.Base64url)})),Nr((function(e,t){var i;e.exports=(i=md,function(e){var t=i,s=t.lib,r=s.WordArray,a=s.Hasher,o=t.algo,n=[];!function(){for(var t=0;t<64;t++)n[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=o.MD5=a.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var i=0;i<16;i++){var s=t+i,r=e[s];e[s]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var a=this._hash.words,o=e[t+0],l=e[t+1],p=e[t+2],f=e[t+3],m=e[t+4],g=e[t+5],y=e[t+6],A=e[t+7],b=e[t+8],_=e[t+9],v=e[t+10],w=e[t+11],S=e[t+12],T=e[t+13],E=e[t+14],k=e[t+15],C=a[0],x=a[1],R=a[2],D=a[3];C=d(C,x,R,D,o,7,n[0]),D=d(D,C,x,R,l,12,n[1]),R=d(R,D,C,x,p,17,n[2]),x=d(x,R,D,C,f,22,n[3]),C=d(C,x,R,D,m,7,n[4]),D=d(D,C,x,R,g,12,n[5]),R=d(R,D,C,x,y,17,n[6]),x=d(x,R,D,C,A,22,n[7]),C=d(C,x,R,D,b,7,n[8]),D=d(D,C,x,R,_,12,n[9]),R=d(R,D,C,x,v,17,n[10]),x=d(x,R,D,C,w,22,n[11]),C=d(C,x,R,D,S,7,n[12]),D=d(D,C,x,R,T,12,n[13]),R=d(R,D,C,x,E,17,n[14]),C=h(C,x=d(x,R,D,C,k,22,n[15]),R,D,l,5,n[16]),D=h(D,C,x,R,y,9,n[17]),R=h(R,D,C,x,w,14,n[18]),x=h(x,R,D,C,o,20,n[19]),C=h(C,x,R,D,g,5,n[20]),D=h(D,C,x,R,v,9,n[21]),R=h(R,D,C,x,k,14,n[22]),x=h(x,R,D,C,m,20,n[23]),C=h(C,x,R,D,_,5,n[24]),D=h(D,C,x,R,E,9,n[25]),R=h(R,D,C,x,f,14,n[26]),x=h(x,R,D,C,b,20,n[27]),C=h(C,x,R,D,T,5,n[28]),D=h(D,C,x,R,p,9,n[29]),R=h(R,D,C,x,A,14,n[30]),C=c(C,x=h(x,R,D,C,S,20,n[31]),R,D,g,4,n[32]),D=c(D,C,x,R,b,11,n[33]),R=c(R,D,C,x,w,16,n[34]),x=c(x,R,D,C,E,23,n[35]),C=c(C,x,R,D,l,4,n[36]),D=c(D,C,x,R,m,11,n[37]),R=c(R,D,C,x,A,16,n[38]),x=c(x,R,D,C,v,23,n[39]),C=c(C,x,R,D,T,4,n[40]),D=c(D,C,x,R,o,11,n[41]),R=c(R,D,C,x,f,16,n[42]),x=c(x,R,D,C,y,23,n[43]),C=c(C,x,R,D,_,4,n[44]),D=c(D,C,x,R,S,11,n[45]),R=c(R,D,C,x,k,16,n[46]),C=u(C,x=c(x,R,D,C,p,23,n[47]),R,D,o,6,n[48]),D=u(D,C,x,R,A,10,n[49]),R=u(R,D,C,x,E,15,n[50]),x=u(x,R,D,C,g,21,n[51]),C=u(C,x,R,D,S,6,n[52]),D=u(D,C,x,R,f,10,n[53]),R=u(R,D,C,x,v,15,n[54]),x=u(x,R,D,C,l,21,n[55]),C=u(C,x,R,D,b,6,n[56]),D=u(D,C,x,R,k,10,n[57]),R=u(R,D,C,x,y,15,n[58]),x=u(x,R,D,C,T,21,n[59]),C=u(C,x,R,D,m,6,n[60]),D=u(D,C,x,R,w,10,n[61]),R=u(R,D,C,x,p,15,n[62]),x=u(x,R,D,C,_,21,n[63]),a[0]=a[0]+C|0,a[1]=a[1]+x|0,a[2]=a[2]+R|0,a[3]=a[3]+D|0},_doFinalize:function(){var t=this._data,i=t.words,s=8*this._nDataBytes,r=8*t.sigBytes;i[r>>>5]|=128<<24-r%32;var a=e.floor(s/4294967296),o=s;i[15+(r+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),i[14+(r+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(i.length+1),this._process();for(var n=this._hash,l=n.words,d=0;d<4;d++){var h=l[d];l[d]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}return n},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function d(e,t,i,s,r,a,o){var n=e+(t&i|~t&s)+r+o;return(n<<a|n>>>32-a)+t}function h(e,t,i,s,r,a,o){var n=e+(t&s|i&~s)+r+o;return(n<<a|n>>>32-a)+t}function c(e,t,i,s,r,a,o){var n=e+(t^i^s)+r+o;return(n<<a|n>>>32-a)+t}function u(e,t,i,s,r,a,o){var n=e+(i^(t|~s))+r+o;return(n<<a|n>>>32-a)+t}t.MD5=a._createHelper(l),t.HmacMD5=a._createHmacHelper(l)}(Math),i.MD5)})),Nr((function(e,t){var i,s,r,a,o,n,l,d;e.exports=(s=(i=d=md).lib,r=s.WordArray,a=s.Hasher,o=i.algo,n=[],l=o.SHA1=a.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var i=this._hash.words,s=i[0],r=i[1],a=i[2],o=i[3],l=i[4],d=0;d<80;d++){if(d<16)n[d]=0|e[t+d];else{var h=n[d-3]^n[d-8]^n[d-14]^n[d-16];n[d]=h<<1|h>>>31}var c=(s<<5|s>>>27)+l+n[d];c+=d<20?1518500249+(r&a|~r&o):d<40?1859775393+(r^a^o):d<60?(r&a|r&o|a&o)-1894007588:(r^a^o)-899497514,l=o,o=a,a=r<<30|r>>>2,r=s,s=c}i[0]=i[0]+s|0,i[1]=i[1]+r|0,i[2]=i[2]+a|0,i[3]=i[3]+o|0,i[4]=i[4]+l|0},_doFinalize:function(){var e=this._data,t=e.words,i=8*this._nDataBytes,s=8*e.sigBytes;return t[s>>>5]|=128<<24-s%32,t[14+(s+64>>>9<<4)]=Math.floor(i/4294967296),t[15+(s+64>>>9<<4)]=i,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}}),i.SHA1=a._createHelper(l),i.HmacSHA1=a._createHmacHelper(l),d.SHA1)})),Nr((function(e,t){var i;e.exports=(i=md,function(e){var t=i,s=t.lib,r=s.WordArray,a=s.Hasher,o=t.algo,n=[],l=[];!function(){function t(t){for(var i=e.sqrt(t),s=2;s<=i;s++)if(!(t%s))return!1;return!0}function i(e){return 4294967296*(e-(0|e))|0}for(var s=2,r=0;r<64;)t(s)&&(r<8&&(n[r]=i(e.pow(s,.5))),l[r]=i(e.pow(s,1/3)),r++),s++}();var d=[],h=o.SHA256=a.extend({_doReset:function(){this._hash=new r.init(n.slice(0))},_doProcessBlock:function(e,t){for(var i=this._hash.words,s=i[0],r=i[1],a=i[2],o=i[3],n=i[4],h=i[5],c=i[6],u=i[7],p=0;p<64;p++){if(p<16)d[p]=0|e[t+p];else{var f=d[p-15],m=(f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3,g=d[p-2],y=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;d[p]=m+d[p-7]+y+d[p-16]}var A=s&r^s&a^r&a,b=(s<<30|s>>>2)^(s<<19|s>>>13)^(s<<10|s>>>22),_=u+((n<<26|n>>>6)^(n<<21|n>>>11)^(n<<7|n>>>25))+(n&h^~n&c)+l[p]+d[p];u=c,c=h,h=n,n=o+_|0,o=a,a=r,r=s,s=_+(b+A)|0}i[0]=i[0]+s|0,i[1]=i[1]+r|0,i[2]=i[2]+a|0,i[3]=i[3]+o|0,i[4]=i[4]+n|0,i[5]=i[5]+h|0,i[6]=i[6]+c|0,i[7]=i[7]+u|0},_doFinalize:function(){var t=this._data,i=t.words,s=8*this._nDataBytes,r=8*t.sigBytes;return i[r>>>5]|=128<<24-r%32,i[14+(r+64>>>9<<4)]=e.floor(s/4294967296),i[15+(r+64>>>9<<4)]=s,t.sigBytes=4*i.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=a._createHelper(h),t.HmacSHA256=a._createHmacHelper(h)}(Math),i.SHA256)})),Nr((function(e,t){var i,s,r,a,o,n;e.exports=(s=(i=n=md).lib.WordArray,r=i.algo,a=r.SHA256,o=r.SHA224=a.extend({_doReset:function(){this._hash=new s.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=4,e}}),i.SHA224=a._createHelper(o),i.HmacSHA224=a._createHmacHelper(o),n.SHA224)})),Nr((function(e,t){var i;e.exports=(i=md,function(){var e=i,t=e.lib.Hasher,s=e.x64,r=s.Word,a=s.WordArray,o=e.algo;function n(){return r.create.apply(r,arguments)}var l=[n(1116352408,3609767458),n(1899447441,602891725),n(3049323471,3964484399),n(3921009573,2173295548),n(961987163,4081628472),n(1508970993,3053834265),n(2453635748,2937671579),n(2870763221,3664609560),n(3624381080,2734883394),n(310598401,1164996542),n(607225278,1323610764),n(1426881987,3590304994),n(1925078388,4068182383),n(2162078206,991336113),n(2614888103,633803317),n(3248222580,3479774868),n(3835390401,2666613458),n(4022224774,944711139),n(264347078,2341262773),n(604807628,2007800933),n(770255983,1495990901),n(1249150122,1856431235),n(1555081692,3175218132),n(1996064986,2198950837),n(2554220882,3999719339),n(2821834349,766784016),n(2952996808,2566594879),n(3210313671,3203337956),n(3336571891,1034457026),n(3584528711,2466948901),n(113926993,3758326383),n(338241895,168717936),n(666307205,1188179964),n(773529912,1546045734),n(1294757372,1522805485),n(1396182291,2643833823),n(1695183700,2343527390),n(1986661051,1014477480),n(2177026350,1206759142),n(2456956037,344077627),n(2730485921,1290863460),n(2820302411,3158454273),n(3259730800,3505952657),n(3345764771,106217008),n(3516065817,3606008344),n(3600352804,1432725776),n(4094571909,1467031594),n(275423344,851169720),n(430227734,3100823752),n(506948616,1363258195),n(659060556,3750685593),n(883997877,3785050280),n(958139571,3318307427),n(1322822218,3812723403),n(1537002063,2003034995),n(1747873779,3602036899),n(1955562222,1575990012),n(2024104815,1125592928),n(2227730452,2716904306),n(2361852424,442776044),n(2428436474,593698344),n(2756734187,3733110249),n(3204031479,2999351573),n(3329325298,3815920427),n(3391569614,3928383900),n(3515267271,566280711),n(3940187606,3454069534),n(4118630271,4000239992),n(116418474,1914138554),n(174292421,2731055270),n(289380356,3203993006),n(460393269,320620315),n(685471733,587496836),n(852142971,1086792851),n(1017036298,365543100),n(1126000580,2618297676),n(1288033470,3409855158),n(1501505948,4234509866),n(1607167915,987167468),n(1816402316,1246189591)],d=[];!function(){for(var e=0;e<80;e++)d[e]=n()}();var h=o.SHA512=t.extend({_doReset:function(){this._hash=new a.init([new r.init(1779033703,4089235720),new r.init(3144134277,2227873595),new r.init(1013904242,4271175723),new r.init(2773480762,1595750129),new r.init(1359893119,2917565137),new r.init(2600822924,725511199),new r.init(528734635,4215389547),new r.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var i=this._hash.words,s=i[0],r=i[1],a=i[2],o=i[3],n=i[4],h=i[5],c=i[6],u=i[7],p=s.high,f=s.low,m=r.high,g=r.low,y=a.high,A=a.low,b=o.high,_=o.low,v=n.high,w=n.low,S=h.high,T=h.low,E=c.high,k=c.low,C=u.high,x=u.low,R=p,D=f,L=m,I=g,P=y,B=A,M=b,U=_,F=v,O=w,N=S,j=T,G=E,z=k,$=C,H=x,V=0;V<80;V++){var W,J,q=d[V];if(V<16)J=q.high=0|e[t+2*V],W=q.low=0|e[t+2*V+1];else{var K=d[V-15],Y=K.high,Q=K.low,X=(Y>>>1|Q<<31)^(Y>>>8|Q<<24)^Y>>>7,Z=(Q>>>1|Y<<31)^(Q>>>8|Y<<24)^(Q>>>7|Y<<25),ee=d[V-2],te=ee.high,ie=ee.low,se=(te>>>19|ie<<13)^(te<<3|ie>>>29)^te>>>6,re=(ie>>>19|te<<13)^(ie<<3|te>>>29)^(ie>>>6|te<<26),ae=d[V-7],oe=ae.high,ne=ae.low,le=d[V-16],de=le.high,he=le.low;J=(J=(J=X+oe+((W=Z+ne)>>>0<Z>>>0?1:0))+se+((W+=re)>>>0<re>>>0?1:0))+de+((W+=he)>>>0<he>>>0?1:0),q.high=J,q.low=W}var ce,ue=F&N^~F&G,pe=O&j^~O&z,fe=R&L^R&P^L&P,me=D&I^D&B^I&B,ge=(R>>>28|D<<4)^(R<<30|D>>>2)^(R<<25|D>>>7),ye=(D>>>28|R<<4)^(D<<30|R>>>2)^(D<<25|R>>>7),Ae=(F>>>14|O<<18)^(F>>>18|O<<14)^(F<<23|O>>>9),be=(O>>>14|F<<18)^(O>>>18|F<<14)^(O<<23|F>>>9),_e=l[V],ve=_e.high,we=_e.low,Se=$+Ae+((ce=H+be)>>>0<H>>>0?1:0),Te=ye+me;$=G,H=z,G=N,z=j,N=F,j=O,F=M+(Se=(Se=(Se=Se+ue+((ce+=pe)>>>0<pe>>>0?1:0))+ve+((ce+=we)>>>0<we>>>0?1:0))+J+((ce+=W)>>>0<W>>>0?1:0))+((O=U+ce|0)>>>0<U>>>0?1:0)|0,M=P,U=B,P=L,B=I,L=R,I=D,R=Se+(ge+fe+(Te>>>0<ye>>>0?1:0))+((D=ce+Te|0)>>>0<ce>>>0?1:0)|0}f=s.low=f+D,s.high=p+R+(f>>>0<D>>>0?1:0),g=r.low=g+I,r.high=m+L+(g>>>0<I>>>0?1:0),A=a.low=A+B,a.high=y+P+(A>>>0<B>>>0?1:0),_=o.low=_+U,o.high=b+M+(_>>>0<U>>>0?1:0),w=n.low=w+O,n.high=v+F+(w>>>0<O>>>0?1:0),T=h.low=T+j,h.high=S+N+(T>>>0<j>>>0?1:0),k=c.low=k+z,c.high=E+G+(k>>>0<z>>>0?1:0),x=u.low=x+H,u.high=C+$+(x>>>0<H>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,i=8*this._nDataBytes,s=8*e.sigBytes;return t[s>>>5]|=128<<24-s%32,t[30+(s+128>>>10<<5)]=Math.floor(i/4294967296),t[31+(s+128>>>10<<5)]=i,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(h),e.HmacSHA512=t._createHmacHelper(h)}(),i.SHA512)})),Nr((function(e,t){var i,s,r,a,o,n,l,d;e.exports=(s=(i=d=md).x64,r=s.Word,a=s.WordArray,o=i.algo,n=o.SHA512,l=o.SHA384=n.extend({_doReset:function(){this._hash=new a.init([new r.init(3418070365,3238371032),new r.init(1654270250,914150663),new r.init(2438529370,812702999),new r.init(355462360,4144912697),new r.init(1731405415,4290775857),new r.init(2394180231,1750603025),new r.init(3675008525,1694076839),new r.init(1203062813,3204075428)])},_doFinalize:function(){var e=n._doFinalize.call(this);return e.sigBytes-=16,e}}),i.SHA384=n._createHelper(l),i.HmacSHA384=n._createHmacHelper(l),d.SHA384)})),Nr((function(e,t){var i;e.exports=(i=md,function(e){var t=i,s=t.lib,r=s.WordArray,a=s.Hasher,o=t.x64.Word,n=t.algo,l=[],d=[],h=[];!function(){for(var e=1,t=0,i=0;i<24;i++){l[e+5*t]=(i+1)*(i+2)/2%64;var s=(2*e+3*t)%5;e=t%5,t=s}for(e=0;e<5;e++)for(t=0;t<5;t++)d[e+5*t]=t+(2*e+3*t)%5*5;for(var r=1,a=0;a<24;a++){for(var n=0,c=0,u=0;u<7;u++){if(1&r){var p=(1<<u)-1;p<32?c^=1<<p:n^=1<<p-32}128&r?r=r<<1^113:r<<=1}h[a]=o.create(n,c)}}();var c=[];!function(){for(var e=0;e<25;e++)c[e]=o.create()}();var u=n.SHA3=a.extend({cfg:a.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new o.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var i=this._state,s=this.blockSize/2,r=0;r<s;r++){var a=e[t+2*r],o=e[t+2*r+1];a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),(x=i[r]).high^=o,x.low^=a}for(var n=0;n<24;n++){for(var u=0;u<5;u++){for(var p=0,f=0,m=0;m<5;m++)p^=(x=i[u+5*m]).high,f^=x.low;var g=c[u];g.high=p,g.low=f}for(u=0;u<5;u++){var y=c[(u+4)%5],A=c[(u+1)%5],b=A.high,_=A.low;for(p=y.high^(b<<1|_>>>31),f=y.low^(_<<1|b>>>31),m=0;m<5;m++)(x=i[u+5*m]).high^=p,x.low^=f}for(var v=1;v<25;v++){var w=(x=i[v]).high,S=x.low,T=l[v];T<32?(p=w<<T|S>>>32-T,f=S<<T|w>>>32-T):(p=S<<T-32|w>>>64-T,f=w<<T-32|S>>>64-T);var E=c[d[v]];E.high=p,E.low=f}var k=c[0],C=i[0];for(k.high=C.high,k.low=C.low,u=0;u<5;u++)for(m=0;m<5;m++){var x=i[v=u+5*m],R=c[v],D=c[(u+1)%5+5*m],L=c[(u+2)%5+5*m];x.high=R.high^~D.high&L.high,x.low=R.low^~D.low&L.low}x=i[0];var I=h[n];x.high^=I.high,x.low^=I.low}},_doFinalize:function(){var t=this._data,i=t.words;this._nDataBytes;var s=8*t.sigBytes,a=32*this.blockSize;i[s>>>5]|=1<<24-s%32,i[(e.ceil((s+1)/a)*a>>>5)-1]|=128,t.sigBytes=4*i.length,this._process();for(var o=this._state,n=this.cfg.outputLength/8,l=n/8,d=[],h=0;h<l;h++){var c=o[h],u=c.high,p=c.low;u=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),d.push(p),d.push(u)}return new r.init(d,n)},clone:function(){for(var e=a.clone.call(this),t=e._state=this._state.slice(0),i=0;i<25;i++)t[i]=t[i].clone();return e}});t.SHA3=a._createHelper(u),t.HmacSHA3=a._createHmacHelper(u)}(Math),i.SHA3)})),Nr((function(e,t){var i;e.exports=(i=md,function(e){var t=i,s=t.lib,r=s.WordArray,a=s.Hasher,o=t.algo,n=r.create([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=r.create([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]),d=r.create([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]),h=r.create([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=r.create([0,1518500249,1859775393,2400959708,2840853838]),u=r.create([1352829926,1548603684,1836072691,2053994217,0]),p=o.RIPEMD160=a.extend({_doReset:function(){this._hash=r.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var i=0;i<16;i++){var s=t+i,r=e[s];e[s]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var a,o,p,_,v,w,S,T,E,k,C,x=this._hash.words,R=c.words,D=u.words,L=n.words,I=l.words,P=d.words,B=h.words;for(w=a=x[0],S=o=x[1],T=p=x[2],E=_=x[3],k=v=x[4],i=0;i<80;i+=1)C=a+e[t+L[i]]|0,C+=i<16?f(o,p,_)+R[0]:i<32?m(o,p,_)+R[1]:i<48?g(o,p,_)+R[2]:i<64?y(o,p,_)+R[3]:A(o,p,_)+R[4],C=(C=b(C|=0,P[i]))+v|0,a=v,v=_,_=b(p,10),p=o,o=C,C=w+e[t+I[i]]|0,C+=i<16?A(S,T,E)+D[0]:i<32?y(S,T,E)+D[1]:i<48?g(S,T,E)+D[2]:i<64?m(S,T,E)+D[3]:f(S,T,E)+D[4],C=(C=b(C|=0,B[i]))+k|0,w=k,k=E,E=b(T,10),T=S,S=C;C=x[1]+p+E|0,x[1]=x[2]+_+k|0,x[2]=x[3]+v+w|0,x[3]=x[4]+a+S|0,x[4]=x[0]+o+T|0,x[0]=C},_doFinalize:function(){var e=this._data,t=e.words,i=8*this._nDataBytes,s=8*e.sigBytes;t[s>>>5]|=128<<24-s%32,t[14+(s+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),e.sigBytes=4*(t.length+1),this._process();for(var r=this._hash,a=r.words,o=0;o<5;o++){var n=a[o];a[o]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}return r},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function f(e,t,i){return e^t^i}function m(e,t,i){return e&t|~e&i}function g(e,t,i){return(e|~t)^i}function y(e,t,i){return e&i|t&~i}function A(e,t,i){return e^(t|~i)}function b(e,t){return e<<t|e>>>32-t}t.RIPEMD160=a._createHelper(p),t.HmacRIPEMD160=a._createHmacHelper(p)}(),i.RIPEMD160)})),Nr((function(e,t){var i,s,r;e.exports=(s=(i=md).lib.Base,r=i.enc.Utf8,void(i.algo.HMAC=s.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var i=e.blockSize,s=4*i;t.sigBytes>s&&(t=e.finalize(t)),t.clamp();for(var a=this._oKey=t.clone(),o=this._iKey=t.clone(),n=a.words,l=o.words,d=0;d<i;d++)n[d]^=1549556828,l[d]^=909522486;a.sigBytes=o.sigBytes=s,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,i=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(i))}})))})),Nr((function(e,t){var i,s,r,a,o,n,l,d,h;e.exports=(s=(i=h=md).lib,r=s.Base,a=s.WordArray,o=i.algo,n=o.SHA256,l=o.HMAC,d=o.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:n,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var i=this.cfg,s=l.create(i.hasher,e),r=a.create(),o=a.create([1]),n=r.words,d=o.words,h=i.keySize,c=i.iterations;n.length<h;){var u=s.update(t).finalize(o);s.reset();for(var p=u.words,f=p.length,m=u,g=1;g<c;g++){m=s.finalize(m),s.reset();for(var y=m.words,A=0;A<f;A++)p[A]^=y[A]}r.concat(u),d[0]++}return r.sigBytes=4*h,r}}),i.PBKDF2=function(e,t,i){return d.create(i).compute(e,t)},h.PBKDF2)})),Nr((function(e,t){var i,s,r,a,o,n,l,d;e.exports=(s=(i=d=md).lib,r=s.Base,a=s.WordArray,o=i.algo,n=o.MD5,l=o.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:n,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var i,s=this.cfg,r=s.hasher.create(),o=a.create(),n=o.words,l=s.keySize,d=s.iterations;n.length<l;){i&&r.update(i),i=r.update(e).finalize(t),r.reset();for(var h=1;h<d;h++)i=r.finalize(i),r.reset();o.concat(i)}return o.sigBytes=4*l,o}}),i.EvpKDF=function(e,t,i){return l.create(i).compute(e,t)},d.EvpKDF)})),Nr((function(e,t){var i;e.exports=void((i=md).lib.Cipher||function(e){var t=i,s=t.lib,r=s.Base,a=s.WordArray,o=s.BufferedBlockAlgorithm,n=t.enc;n.Utf8;var l=n.Base64,d=t.algo.EvpKDF,h=s.Cipher=o.extend({cfg:r.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,i){this.cfg=this.cfg.extend(i),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?b:y}return function(t){return{encrypt:function(i,s,r){return e(s).encrypt(t,i,s,r)},decrypt:function(i,s,r){return e(s).decrypt(t,i,s,r)}}}}()});s.StreamCipher=h.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var c=t.mode={},u=s.BlockCipherMode=r.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=c.CBC=function(){var t=u.extend();function i(t,i,s){var r,a=this._iv;a?(r=a,this._iv=e):r=this._prevBlock;for(var o=0;o<s;o++)t[i+o]^=r[o]}return t.Encryptor=t.extend({processBlock:function(e,t){var s=this._cipher,r=s.blockSize;i.call(this,e,t,r),s.encryptBlock(e,t),this._prevBlock=e.slice(t,t+r)}}),t.Decryptor=t.extend({processBlock:function(e,t){var s=this._cipher,r=s.blockSize,a=e.slice(t,t+r);s.decryptBlock(e,t),i.call(this,e,t,r),this._prevBlock=a}}),t}(),f=(t.pad={}).Pkcs7={pad:function(e,t){for(var i=4*t,s=i-e.sigBytes%i,r=s<<24|s<<16|s<<8|s,o=[],n=0;n<s;n+=4)o.push(r);var l=a.create(o,s);e.concat(l)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};s.BlockCipher=h.extend({cfg:h.cfg.extend({mode:p,padding:f}),reset:function(){var e;h.reset.call(this);var t=this.cfg,i=t.iv,s=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=s.createEncryptor:(e=s.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,i&&i.words):(this._mode=e.call(s,this,i&&i.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var m=s.CipherParams=r.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,i=e.salt;return(i?a.create([1398893684,1701076831]).concat(i).concat(t):t).toString(l)},parse:function(e){var t,i=l.parse(e),s=i.words;return 1398893684==s[0]&&1701076831==s[1]&&(t=a.create(s.slice(2,4)),s.splice(0,4),i.sigBytes-=16),m.create({ciphertext:i,salt:t})}},y=s.SerializableCipher=r.extend({cfg:r.extend({format:g}),encrypt:function(e,t,i,s){s=this.cfg.extend(s);var r=e.createEncryptor(i,s),a=r.finalize(t),o=r.cfg;return m.create({ciphertext:a,key:i,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:s.format})},decrypt:function(e,t,i,s){return s=this.cfg.extend(s),t=this._parse(t,s.format),e.createDecryptor(i,s).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),A=(t.kdf={}).OpenSSL={execute:function(e,t,i,s,r){if(s||(s=a.random(8)),r)o=d.create({keySize:t+i,hasher:r}).compute(e,s);else var o=d.create({keySize:t+i}).compute(e,s);var n=a.create(o.words.slice(t),4*i);return o.sigBytes=4*t,m.create({key:o,iv:n,salt:s})}},b=s.PasswordBasedCipher=y.extend({cfg:y.cfg.extend({kdf:A}),encrypt:function(e,t,i,s){var r=(s=this.cfg.extend(s)).kdf.execute(i,e.keySize,e.ivSize,s.salt,s.hasher);s.iv=r.iv;var a=y.encrypt.call(this,e,t,r.key,s);return a.mixIn(r),a},decrypt:function(e,t,i,s){s=this.cfg.extend(s),t=this._parse(t,s.format);var r=s.kdf.execute(i,e.keySize,e.ivSize,t.salt,s.hasher);return s.iv=r.iv,y.decrypt.call(this,e,t,r.key,s)}})}())})),Nr((function(e,t){var i;e.exports=((i=md).mode.CFB=function(){var e=i.lib.BlockCipherMode.extend();function t(e,t,i,s){var r,a=this._iv;a?(r=a.slice(0),this._iv=void 0):r=this._prevBlock,s.encryptBlock(r,0);for(var o=0;o<i;o++)e[t+o]^=r[o]}return e.Encryptor=e.extend({processBlock:function(e,i){var s=this._cipher,r=s.blockSize;t.call(this,e,i,r,s),this._prevBlock=e.slice(i,i+r)}}),e.Decryptor=e.extend({processBlock:function(e,i){var s=this._cipher,r=s.blockSize,a=e.slice(i,i+r);t.call(this,e,i,r,s),this._prevBlock=a}}),e}(),i.mode.CFB)})),Nr((function(e,t){var i,s,r;e.exports=((r=md).mode.CTR=(i=r.lib.BlockCipherMode.extend(),s=i.Encryptor=i.extend({processBlock:function(e,t){var i=this._cipher,s=i.blockSize,r=this._iv,a=this._counter;r&&(a=this._counter=r.slice(0),this._iv=void 0);var o=a.slice(0);i.encryptBlock(o,0),a[s-1]=a[s-1]+1|0;for(var n=0;n<s;n++)e[t+n]^=o[n]}}),i.Decryptor=s,i),r.mode.CTR)})),Nr((function(e,t){var i;e.exports=((i=md).mode.CTRGladman=function(){var e=i.lib.BlockCipherMode.extend();function t(e){if(255==(e>>24&255)){var t=e>>16&255,i=e>>8&255,s=255&e;255===t?(t=0,255===i?(i=0,255===s?s=0:++s):++i):++t,e=0,e+=t<<16,e+=i<<8,e+=s}else e+=1<<24;return e}function s(e){return 0===(e[0]=t(e[0]))&&(e[1]=t(e[1])),e}var r=e.Encryptor=e.extend({processBlock:function(e,t){var i=this._cipher,r=i.blockSize,a=this._iv,o=this._counter;a&&(o=this._counter=a.slice(0),this._iv=void 0),s(o);var n=o.slice(0);i.encryptBlock(n,0);for(var l=0;l<r;l++)e[t+l]^=n[l]}});return e.Decryptor=r,e}(),i.mode.CTRGladman)})),Nr((function(e,t){var i,s,r;e.exports=((r=md).mode.OFB=(i=r.lib.BlockCipherMode.extend(),s=i.Encryptor=i.extend({processBlock:function(e,t){var i=this._cipher,s=i.blockSize,r=this._iv,a=this._keystream;r&&(a=this._keystream=r.slice(0),this._iv=void 0),i.encryptBlock(a,0);for(var o=0;o<s;o++)e[t+o]^=a[o]}}),i.Decryptor=s,i),r.mode.OFB)})),Nr((function(e,t){var i,s;e.exports=((s=md).mode.ECB=((i=s.lib.BlockCipherMode.extend()).Encryptor=i.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),i.Decryptor=i.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),i),s.mode.ECB)})),Nr((function(e,t){var i;e.exports=((i=md).pad.AnsiX923={pad:function(e,t){var i=e.sigBytes,s=4*t,r=s-i%s,a=i+r-1;e.clamp(),e.words[a>>>2]|=r<<24-a%4*8,e.sigBytes+=r},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},i.pad.Ansix923)})),Nr((function(e,t){var i;e.exports=((i=md).pad.Iso10126={pad:function(e,t){var s=4*t,r=s-e.sigBytes%s;e.concat(i.lib.WordArray.random(r-1)).concat(i.lib.WordArray.create([r<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},i.pad.Iso10126)})),Nr((function(e,t){var i;e.exports=((i=md).pad.Iso97971={pad:function(e,t){e.concat(i.lib.WordArray.create([2147483648],1)),i.pad.ZeroPadding.pad(e,t)},unpad:function(e){i.pad.ZeroPadding.unpad(e),e.sigBytes--}},i.pad.Iso97971)})),Nr((function(e,t){var i;e.exports=((i=md).pad.ZeroPadding={pad:function(e,t){var i=4*t;e.clamp(),e.sigBytes+=i-(e.sigBytes%i||i)},unpad:function(e){var t=e.words,i=e.sigBytes-1;for(i=e.sigBytes-1;i>=0;i--)if(t[i>>>2]>>>24-i%4*8&255){e.sigBytes=i+1;break}}},i.pad.ZeroPadding)})),Nr((function(e,t){var i;e.exports=((i=md).pad.NoPadding={pad:function(){},unpad:function(){}},i.pad.NoPadding)})),Nr((function(e,t){var i;e.exports=(i=md,function(e){var t=i,s=t.lib.CipherParams,r=t.enc.Hex;t.format.Hex={stringify:function(e){return e.ciphertext.toString(r)},parse:function(e){var t=r.parse(e);return s.create({ciphertext:t})}}}(),i.format.Hex)})),Nr((function(e,t){var i;e.exports=(i=md,function(){var e=i,t=e.lib.BlockCipher,s=e.algo,r=[],a=[],o=[],n=[],l=[],d=[],h=[],c=[],u=[],p=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var i=0,s=0;for(t=0;t<256;t++){var f=s^s<<1^s<<2^s<<3^s<<4;f=f>>>8^255&f^99,r[i]=f,a[f]=i;var m=e[i],g=e[m],y=e[g],A=257*e[f]^16843008*f;o[i]=A<<24|A>>>8,n[i]=A<<16|A>>>16,l[i]=A<<8|A>>>24,d[i]=A,A=16843009*y^65537*g^257*m^16843008*i,h[f]=A<<24|A>>>8,c[f]=A<<16|A>>>16,u[f]=A<<8|A>>>24,p[f]=A,i?(i=m^e[e[e[y^m]]],s^=e[e[s]]):i=s=1}}();var f=[0,1,2,4,8,16,32,64,128,27,54],m=s.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,i=e.sigBytes/4,s=4*((this._nRounds=i+6)+1),a=this._keySchedule=[],o=0;o<s;o++)o<i?a[o]=t[o]:(d=a[o-1],o%i?i>6&&o%i==4&&(d=r[d>>>24]<<24|r[d>>>16&255]<<16|r[d>>>8&255]<<8|r[255&d]):(d=r[(d=d<<8|d>>>24)>>>24]<<24|r[d>>>16&255]<<16|r[d>>>8&255]<<8|r[255&d],d^=f[o/i|0]<<24),a[o]=a[o-i]^d);for(var n=this._invKeySchedule=[],l=0;l<s;l++){if(o=s-l,l%4)var d=a[o];else d=a[o-4];n[l]=l<4||o<=4?d:h[r[d>>>24]]^c[r[d>>>16&255]]^u[r[d>>>8&255]]^p[r[255&d]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,n,l,d,r)},decryptBlock:function(e,t){var i=e[t+1];e[t+1]=e[t+3],e[t+3]=i,this._doCryptBlock(e,t,this._invKeySchedule,h,c,u,p,a),i=e[t+1],e[t+1]=e[t+3],e[t+3]=i},_doCryptBlock:function(e,t,i,s,r,a,o,n){for(var l=this._nRounds,d=e[t]^i[0],h=e[t+1]^i[1],c=e[t+2]^i[2],u=e[t+3]^i[3],p=4,f=1;f<l;f++){var m=s[d>>>24]^r[h>>>16&255]^a[c>>>8&255]^o[255&u]^i[p++],g=s[h>>>24]^r[c>>>16&255]^a[u>>>8&255]^o[255&d]^i[p++],y=s[c>>>24]^r[u>>>16&255]^a[d>>>8&255]^o[255&h]^i[p++],A=s[u>>>24]^r[d>>>16&255]^a[h>>>8&255]^o[255&c]^i[p++];d=m,h=g,c=y,u=A}m=(n[d>>>24]<<24|n[h>>>16&255]<<16|n[c>>>8&255]<<8|n[255&u])^i[p++],g=(n[h>>>24]<<24|n[c>>>16&255]<<16|n[u>>>8&255]<<8|n[255&d])^i[p++],y=(n[c>>>24]<<24|n[u>>>16&255]<<16|n[d>>>8&255]<<8|n[255&h])^i[p++],A=(n[u>>>24]<<24|n[d>>>16&255]<<16|n[h>>>8&255]<<8|n[255&c])^i[p++],e[t]=m,e[t+1]=g,e[t+2]=y,e[t+3]=A},keySize:8});e.AES=t._createHelper(m)}(),i.AES)})),Nr((function(e,t){var i;e.exports=(i=md,function(){var e=i,t=e.lib,s=t.WordArray,r=t.BlockCipher,a=e.algo,o=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],n=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],d=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],h=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],c=a.DES=r.extend({_doReset:function(){for(var e=this._key.words,t=[],i=0;i<56;i++){var s=o[i]-1;t[i]=e[s>>>5]>>>31-s%32&1}for(var r=this._subKeys=[],a=0;a<16;a++){var d=r[a]=[],h=l[a];for(i=0;i<24;i++)d[i/6|0]|=t[(n[i]-1+h)%28]<<31-i%6,d[4+(i/6|0)]|=t[28+(n[i+24]-1+h)%28]<<31-i%6;for(d[0]=d[0]<<1|d[0]>>>31,i=1;i<7;i++)d[i]=d[i]>>>4*(i-1)+3;d[7]=d[7]<<5|d[7]>>>27}var c=this._invSubKeys=[];for(i=0;i<16;i++)c[i]=r[15-i]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,i){this._lBlock=e[t],this._rBlock=e[t+1],u.call(this,4,252645135),u.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),u.call(this,1,1431655765);for(var s=0;s<16;s++){for(var r=i[s],a=this._lBlock,o=this._rBlock,n=0,l=0;l<8;l++)n|=d[l][((o^r[l])&h[l])>>>0];this._lBlock=o,this._rBlock=a^n}var c=this._lBlock;this._lBlock=this._rBlock,this._rBlock=c,u.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),u.call(this,16,65535),u.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function u(e,t){var i=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=i,this._lBlock^=i<<e}function p(e,t){var i=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=i,this._rBlock^=i<<e}e.DES=r._createHelper(c);var f=a.TripleDES=r.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),i=e.length<4?e.slice(0,2):e.slice(2,4),r=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=c.createEncryptor(s.create(t)),this._des2=c.createEncryptor(s.create(i)),this._des3=c.createEncryptor(s.create(r))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=r._createHelper(f)}(),i.TripleDES)})),Nr((function(e,t){var i;e.exports=(i=md,function(){var e=i,t=e.lib.StreamCipher,s=e.algo,r=s.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,i=e.sigBytes,s=this._S=[],r=0;r<256;r++)s[r]=r;r=0;for(var a=0;r<256;r++){var o=r%i,n=t[o>>>2]>>>24-o%4*8&255;a=(a+s[r]+n)%256;var l=s[r];s[r]=s[a],s[a]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=a.call(this)},keySize:8,ivSize:0});function a(){for(var e=this._S,t=this._i,i=this._j,s=0,r=0;r<4;r++){i=(i+e[t=(t+1)%256])%256;var a=e[t];e[t]=e[i],e[i]=a,s|=e[(e[t]+e[i])%256]<<24-8*r}return this._i=t,this._j=i,s}e.RC4=t._createHelper(r);var o=s.RC4Drop=r.extend({cfg:r.cfg.extend({drop:192}),_doReset:function(){r._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)a.call(this)}});e.RC4Drop=t._createHelper(o)}(),i.RC4)})),Nr((function(e,t){var i;e.exports=(i=md,function(){var e=i,t=e.lib.StreamCipher,s=e.algo,r=[],a=[],o=[],n=s.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,i=0;i<4;i++)e[i]=16711935&(e[i]<<8|e[i]>>>24)|4278255360&(e[i]<<24|e[i]>>>8);var s=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,i=0;i<4;i++)l.call(this);for(i=0;i<8;i++)r[i]^=s[i+4&7];if(t){var a=t.words,o=a[0],n=a[1],d=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),h=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),c=d>>>16|4294901760&h,u=h<<16|65535&d;for(r[0]^=d,r[1]^=c,r[2]^=h,r[3]^=u,r[4]^=d,r[5]^=c,r[6]^=h,r[7]^=u,i=0;i<4;i++)l.call(this)}},_doProcessBlock:function(e,t){var i=this._X;l.call(this),r[0]=i[0]^i[5]>>>16^i[3]<<16,r[1]=i[2]^i[7]>>>16^i[5]<<16,r[2]=i[4]^i[1]>>>16^i[7]<<16,r[3]=i[6]^i[3]>>>16^i[1]<<16;for(var s=0;s<4;s++)r[s]=16711935&(r[s]<<8|r[s]>>>24)|4278255360&(r[s]<<24|r[s]>>>8),e[t+s]^=r[s]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,i=0;i<8;i++)a[i]=t[i];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<a[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<a[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<a[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<a[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<a[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<a[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<a[6]>>>0?1:0)|0,this._b=t[7]>>>0<a[7]>>>0?1:0,i=0;i<8;i++){var s=e[i]+t[i],r=65535&s,n=s>>>16,l=((r*r>>>17)+r*n>>>15)+n*n,d=((4294901760&s)*s|0)+((65535&s)*s|0);o[i]=l^d}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}e.Rabbit=t._createHelper(n)}(),i.Rabbit)})),Nr((function(e,t){var i;e.exports=(i=md,function(){var e=i,t=e.lib.StreamCipher,s=e.algo,r=[],a=[],o=[],n=s.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,i=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],s=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var r=0;r<4;r++)l.call(this);for(r=0;r<8;r++)s[r]^=i[r+4&7];if(t){var a=t.words,o=a[0],n=a[1],d=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),h=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),c=d>>>16|4294901760&h,u=h<<16|65535&d;for(s[0]^=d,s[1]^=c,s[2]^=h,s[3]^=u,s[4]^=d,s[5]^=c,s[6]^=h,s[7]^=u,r=0;r<4;r++)l.call(this)}},_doProcessBlock:function(e,t){var i=this._X;l.call(this),r[0]=i[0]^i[5]>>>16^i[3]<<16,r[1]=i[2]^i[7]>>>16^i[5]<<16,r[2]=i[4]^i[1]>>>16^i[7]<<16,r[3]=i[6]^i[3]>>>16^i[1]<<16;for(var s=0;s<4;s++)r[s]=16711935&(r[s]<<8|r[s]>>>24)|4278255360&(r[s]<<24|r[s]>>>8),e[t+s]^=r[s]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,i=0;i<8;i++)a[i]=t[i];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<a[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<a[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<a[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<a[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<a[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<a[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<a[6]>>>0?1:0)|0,this._b=t[7]>>>0<a[7]>>>0?1:0,i=0;i<8;i++){var s=e[i]+t[i],r=65535&s,n=s>>>16,l=((r*r>>>17)+r*n>>>15)+n*n,d=((4294901760&s)*s|0)+((65535&s)*s|0);o[i]=l^d}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}e.RabbitLegacy=t._createHelper(n)}(),i.RabbitLegacy)})),Nr((function(e,t){var i;e.exports=(i=md,function(){var e=i,t=e.lib.BlockCipher,s=e.algo;const r=16,a=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],o=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var n={pbox:[],sbox:[]};function l(e,t){let i=t>>24&255,s=t>>16&255,r=t>>8&255,a=255&t,o=e.sbox[0][i]+e.sbox[1][s];return o^=e.sbox[2][r],o+=e.sbox[3][a],o}function d(e,t,i){let s,a=t,o=i;for(let t=0;t<r;++t)a^=e.pbox[t],o=l(e,a)^o,s=a,a=o,o=s;return s=a,a=o,o=s,o^=e.pbox[r],a^=e.pbox[r+1],{left:a,right:o}}function h(e,t,i){let s,a=t,o=i;for(let t=r+1;t>1;--t)a^=e.pbox[t],o=l(e,a)^o,s=a,a=o,o=s;return s=a,a=o,o=s,o^=e.pbox[1],a^=e.pbox[0],{left:a,right:o}}function c(e,t,i){for(let t=0;t<4;t++){e.sbox[t]=[];for(let i=0;i<256;i++)e.sbox[t][i]=o[t][i]}let s=0;for(let o=0;o<r+2;o++)e.pbox[o]=a[o]^t[s],s++,s>=i&&(s=0);let n=0,l=0,h=0;for(let t=0;t<r+2;t+=2)h=d(e,n,l),n=h.left,l=h.right,e.pbox[t]=n,e.pbox[t+1]=l;for(let t=0;t<4;t++)for(let i=0;i<256;i+=2)h=d(e,n,l),n=h.left,l=h.right,e.sbox[t][i]=n,e.sbox[t][i+1]=l;return!0}var u=s.Blowfish=t.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var e=this._keyPriorReset=this._key,t=e.words,i=e.sigBytes/4;c(n,t,i)}},encryptBlock:function(e,t){var i=d(n,e[t],e[t+1]);e[t]=i.left,e[t+1]=i.right},decryptBlock:function(e,t){var i=h(n,e[t],e[t+1]);e[t]=i.left,e[t+1]=i.right},blockSize:2,keySize:4,ivSize:2});e.Blowfish=t._createHelper(u)}(),i.Blowfish)})),Nr((function(e,t){e.exports=md})));function yd(e){return e[3]|e[2]<<8|e[1]<<16|e[0]<<24}function Ad(e){const t=[];for(let i=0;i<e.length;i+=1)t[i>>>2]|=e[i]<<24-i%4*8;return gd.lib.WordArray.create(t,e.length)}const bd=16,_d=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],vd=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function wd(e){const t=[];for(let i=0,s=e.length;i<s;i+=2)t.push(parseInt(e.substr(i,2),16));return t}function Sd(e){return e.map((e=>1===(e=e.toString(16)).length?"0"+e:e)).join("")}function Td(e){const t=[];for(let i=0,s=e.length;i<s;i++){const s=e.codePointAt(i);if(s<=127)t.push(s);else if(s<=2047)t.push(192|s>>>6),t.push(128|63&s);else if(s<=55295||s>=57344&&s<=65535)t.push(224|s>>>12),t.push(128|s>>>6&63),t.push(128|63&s);else{if(!(s>=65536&&s<=1114111))throw t.push(s),new Error("input is not supported");i++,t.push(240|s>>>18&28),t.push(128|s>>>12&63),t.push(128|s>>>6&63),t.push(128|63&s)}}return t}function Ed(e){const t=[];for(let i=0,s=e.length;i<s;i++)e[i]>=240&&e[i]<=247?(t.push(String.fromCodePoint(((7&e[i])<<18)+((63&e[i+1])<<12)+((63&e[i+2])<<6)+(63&e[i+3]))),i+=3):e[i]>=224&&e[i]<=239?(t.push(String.fromCodePoint(((15&e[i])<<12)+((63&e[i+1])<<6)+(63&e[i+2]))),i+=2):e[i]>=192&&e[i]<=223?(t.push(String.fromCodePoint(((31&e[i])<<6)+(63&e[i+1]))),i++):t.push(String.fromCodePoint(e[i]));return t.join("")}function kd(e,t){const i=31&t;return e<<i|e>>>32-i}function Cd(e){return(255&_d[e>>>24&255])<<24|(255&_d[e>>>16&255])<<16|(255&_d[e>>>8&255])<<8|255&_d[255&e]}function xd(e){return e^kd(e,2)^kd(e,10)^kd(e,18)^kd(e,24)}function Rd(e){return e^kd(e,13)^kd(e,23)}function Dd(e,t,i){const s=new Array(4),r=new Array(4);for(let t=0;t<4;t++)r[0]=255&e[4*t],r[1]=255&e[4*t+1],r[2]=255&e[4*t+2],r[3]=255&e[4*t+3],s[t]=r[0]<<24|r[1]<<16|r[2]<<8|r[3];for(let e,t=0;t<32;t+=4)e=s[1]^s[2]^s[3]^i[t+0],s[0]^=xd(Cd(e)),e=s[2]^s[3]^s[0]^i[t+1],s[1]^=xd(Cd(e)),e=s[3]^s[0]^s[1]^i[t+2],s[2]^=xd(Cd(e)),e=s[0]^s[1]^s[2]^i[t+3],s[3]^=xd(Cd(e));for(let e=0;e<16;e+=4)t[e]=s[3-e/4]>>>24&255,t[e+1]=s[3-e/4]>>>16&255,t[e+2]=s[3-e/4]>>>8&255,t[e+3]=255&s[3-e/4]}function Ld(e,t,i){const s=new Array(4),r=new Array(4);for(let t=0;t<4;t++)r[0]=255&e[0+4*t],r[1]=255&e[1+4*t],r[2]=255&e[2+4*t],r[3]=255&e[3+4*t],s[t]=r[0]<<24|r[1]<<16|r[2]<<8|r[3];s[0]^=2746333894,s[1]^=1453994832,s[2]^=1736282519,s[3]^=2993693404;for(let e,i=0;i<32;i+=4)e=s[1]^s[2]^s[3]^vd[i+0],t[i+0]=s[0]^=Rd(Cd(e)),e=s[2]^s[3]^s[0]^vd[i+1],t[i+1]=s[1]^=Rd(Cd(e)),e=s[3]^s[0]^s[1]^vd[i+2],t[i+2]=s[2]^=Rd(Cd(e)),e=s[0]^s[1]^s[2]^vd[i+3],t[i+3]=s[3]^=Rd(Cd(e));if(0===i)for(let e,i=0;i<16;i++)e=t[i],t[i]=t[31-i],t[31-i]=e}function Id(e,t,i){let{padding:s="pkcs#7",mode:r,iv:a=[],output:o="string"}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("cbc"===r&&("string"==typeof a&&(a=wd(a)),16!==a.length))throw new Error("iv is invalid");if("string"==typeof t&&(t=wd(t)),16!==t.length)throw new Error("key is invalid");if(e="string"==typeof e?0!==i?Td(e):wd(e):[...e],("pkcs#5"===s||"pkcs#7"===s)&&0!==i){const t=bd-e.length%bd;for(let i=0;i<t;i++)e.push(t)}const n=new Array(32);Ld(t,n,i);const l=[];let d=a,h=e.length,c=0;for(;h>=bd;){const t=e.slice(c,c+16),s=new Array(16);if("cbc"===r)for(let e=0;e<bd;e++)0!==i&&(t[e]^=d[e]);Dd(t,s,n);for(let e=0;e<bd;e++)"cbc"===r&&0===i&&(s[e]^=d[e]),l[c+e]=s[e];"cbc"===r&&(d=0!==i?s:t),h-=bd,c+=bd}if(("pkcs#5"===s||"pkcs#7"===s)&&0===i){const e=l.length,t=l[e-1];for(let i=1;i<=t;i++)if(l[e-i]!==t)throw new Error("padding is invalid");l.splice(e-t,t)}return"array"!==o?0!==i?Sd(l):Ed(l):l}function Pd(e){return e[3]|e[2]<<8|e[1]<<16|e[0]<<24}function Bd(e,t,i){for(let s=2;s<e.length;++s){const r=s-2,a=t[r%t.length],o=i[r%i.length];e[s]=e[s]^a^o}return e}function Md(e){return e[3]|e[2]<<8|e[1]<<16|e[0]<<24}class Ud extends a{constructor(e){super(),this.TAG_NAME="CommonDemux",this.player=e,this.stopId=null,this.firstTimestamp=null,this.startTimestamp=null,this.preDelayTimestamp=null,this.preLoopTimestamp=null,this.bufferStartDts=null,this.bufferStartLocalTs=null,this.preIframeTs=null,this.preFrameTs=null,this.preTimestamp=null,this.preTimestampDuration=0,this.prevPayloadBufferSize=0,this.isStreamTsMoreThanLocal=!1,this.delay=-1,this.pushLatestDelay=-1,this.bufferList=[],this.historyIntervalDiffTimeList=[],this.playbackStreamFps=null,this.playbackStreamAudioFps=null,this.playbackStreamVideoFps=null,this.dropping=!1,this.isPushDropping=!1,this.nalUnitSize=null,this.initInterval(),this.player.debug.log("CommonDemux","init")}destroy(){this.bufferList=[],this.historyIntervalDiffTimeList=[],this.playbackStreamFps=null,this.playbackStreamAudioFps=null,this.playbackStreamVideoFps=null,this.clearStopInterval(),this.firstTimestamp=null,this.startTimestamp=null,this.bufferStartDts=null,this.bufferStartLocalTs=null,this.preDelayTimestamp=null,this.preLoopTimestamp=null,this.preIframeTs=null,this.preTimestamp=null,this.preTimestampDuration=0,this.prevPayloadBufferSize=0,this.isStreamTsMoreThanLocal=!1,this.delay=-1,this.pushLatestDelay=-1,this.dropping=!1,this.isPushDropping=!1,this.nalUnitSize=null,this.off(),this.player.debug.log("CommonDemux","destroy")}isDropping(){return this.dropping||this.isPushDropping}getDelay(e,t){if(!e||!this.player.isDemuxDecodeFirstIIframeInit())return-1;if(t===je)return this.delay;if(this.preDelayTimestamp&&this.preDelayTimestamp>e)return this.preDelayTimestamp-e>1e3&&this.player.debug.warn("CommonDemux",`getDelay() and preDelayTimestamp is ${this.preDelayTimestamp} > timestamp is ${e} more than ${this.preDelayTimestamp-e}ms and return ${this.delay}`),this.preDelayTimestamp=e,this.delay;if(this.firstTimestamp){if(e){const t=Date.now()-this.startTimestamp,i=e-this.firstTimestamp;t>=i?(this.isStreamTsMoreThanLocal=!1,this.delay=t-i):(this.isStreamTsMoreThanLocal=!0,this.delay=i-t)}}else this.firstTimestamp=e,this.startTimestamp=Date.now(),this.delay=-1;return this.preDelayTimestamp=e,this.delay}getDelayNotUpdateDelay(e,t){if(!e||!this.player.isDemuxDecodeFirstIIframeInit())return-1;if(t===je)return this.pushLatestDelay;if(this.preDelayTimestamp&&this.preDelayTimestamp-e>1e3)return this.player.debug.warn("CommonDemux",`getDelayNotUpdateDelay() and preDelayTimestamp is ${this.preDelayTimestamp} > timestamp is ${e} more than ${this.preDelayTimestamp-e}ms and return -1`),-1;if(this.firstTimestamp){let t=-1;if(e){const i=Date.now()-this.startTimestamp,s=e-this.firstTimestamp;t=i>=s?i-s:s-i}return t}return-1}resetDelay(){this.firstTimestamp=null,this.startTimestamp=null,this.delay=-1,this.dropping=!1}resetAllDelay(){this.resetDelay(),this.preDelayTimestamp=null}initInterval(){this.player.isUseHls265()?this.player.debug.log("CommonDemux","initInterval() and is hls and support hls265 so return"):-1===this.player.getStreamType().indexOf(A)?this.player.isPlaybackCacheBeforeDecodeForFpsRender()?this.player.debug.log("CommonDemux","initInterval() and playback and playbackIsCacheBeforeDecodeForFpsRender is true so return"):(this.player.debug.log("CommonDemux","setInterval()"),this._loop(),this.stopId=setInterval((()=>{let e=(new Date).getTime();this.preLoopTimestamp||(this.preLoopTimestamp=e);const t=e-this.preLoopTimestamp;this.updateHistoryIntervalDiffTimeList(t),t>100&&this.player.debug.warn("CommonDemux",`loop demux diff time is ${t}`),this._loop(),this.preLoopTimestamp=(new Date).getTime()}),20)):this.player.debug.log("CommonDemux","initInterval() and is worker stream so return")}clearStopInterval(){this.stopId&&(clearInterval(this.stopId),this.stopId=null)}updateHistoryIntervalDiffTimeList(e){this.historyIntervalDiffTimeList.length>5&&this.historyIntervalDiffTimeList.shift(),this.historyIntervalDiffTimeList.push(e)}isHistoryIntervalDiffTimeAllLarge(){if(this.historyIntervalDiffTimeList.length<5)return!1;for(let e=0;e<this.historyIntervalDiffTimeList.length;e++)if(this.historyIntervalDiffTimeList[e]<900)return!1;return!0}initPlaybackCacheLoop(){this.clearStopInterval();const e=()=>{let e=null;this.bufferList.length&&(e=this.bufferList.shift(),this._doDecoderDecode(e))};e();const t=Math.ceil(1e3/(this.playbackStreamFps*this.player.getPlaybackRate()));this.player.debug.log("CommonDemux",`initPlaybackCacheLoop() and fragDuration is ${t}, playbackStreamFps is ${this.playbackStreamFps}, playbackRate is ${this.player.getPlaybackRate()}`),this.stopId=setInterval(e,t)}_loop(){let e;const t=this.player._opt.videoBuffer,i=this.player._opt.videoBufferDelay,s=this.player._opt.playType===_;if(this.bufferList.length){if(this.isPushDropping)return void this.player.debug.warn("CommonDemux",`_loop isPushDropping is true and bufferList length is ${this.bufferList.length}`);if(this.dropping){for(e=this.bufferList.shift(),this.player.debug.warn("CommonDemux",`_loop is dropping and data.ts is ${e.ts}, data.type is ${e.type}, data.isIFrame is ${e.isIFrame}, delay is ${this.delay} ,buffer list is ${this.bufferList.length}`);!e.isIFrame&&this.bufferList.length;)e=this.bufferList.shift();const t=this.getDelayNotUpdateDelay(e.ts,e.type);e.isIFrame&&t<=this.getNotDroppingDelayTs()&&(this.player.debug.log("CommonDemux",`_loop data isIFrame is true and delay is ${this.delay}`),this.dropping=!1,this._doDecoderDecode(e),this._decodeNext(e))}else if(this.player.isPlayback()||this.player.isPlayUseMSE()||0===t)for(;this.bufferList.length;)e=this.bufferList.shift(),this._doDecoderDecode(e);else if(e=this.bufferList[0],-1===this.getDelay(e.ts,e.type))this.player.debug.log("CommonDemux",`delay is -1 and data.ts is ${e.ts} data.type is ${e.type}`),this.bufferList.shift(),this._doDecoderDecode(e),this._decodeNext(e);else if(this.delay>i+t&&s)this.hasIframeInBufferList()?(this.player.debug.warn("CommonDemux",`_loop delay is ${this.delay}, set dropping is true`),this.resetAllDelay(),this.dropping=!0,this.player.updateStats({isDropping:!0})):(this.bufferList.shift(),this._doDecoderDecode(e),this._decodeNext(e));else for(;this.bufferList.length;){if(e=this.bufferList[0],!(this.getDelay(e.ts,e.type)>t)){this.delay<0&&this.player.debug.warn("CommonDemux",`_loop delay is ${this.delay} bufferList is ${this.bufferList}`);break}this.bufferList.shift(),this._doDecoderDecode(e)}}else-1!==this.delay&&this.player.debug.log("CommonDemux","loop() bufferList is empty and reset delay"),this.resetAllDelay()}_doDecode(e,t,i,s){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;const a=this.player;let o={ts:i,cts:r,type:t,isIFrame:!1};this.player.isPlayer()?(t===Ge&&a._opt.playType===_&&this.calcNetworkDelay(i),a._opt.useWCS&&!a._opt.useOffscreen||a._opt.useMSE?(t===Ge&&(o.isIFrame=s),this.pushBuffer(e,o)):t===Ge?a.decoderWorker&&a.decoderWorker.decodeVideo(e,i,s):t===je&&a._opt.hasAudio&&a.decoderWorker&&a.decoderWorker.decodeAudio(e,i)):this.player.isPlayback()&&(t===Ge&&(o.isIFrame=s),this.player.isPlaybackOnlyDecodeIFrame()?t===Ge&&s&&this.pushBuffer(e,o):this.player.isPlaybackCacheBeforeDecodeForFpsRender()||1===this.player.getPlaybackRate()?this.pushBuffer(e,o):this.pushBuffer(e,o,!1))}_doDecodeByHls(e,t,i,s){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=!1;if(t===je&&Wr(e)&&(this.player.debug.log("CommonDemux",`hls pushBuffer audio ts is ${i}, isAacCodecPacket is true`),a=!0,this.player.isRecordTypeFlv())){const t=new Uint8Array(e);this.player.recorder.addAACSequenceHeader(t,i)}let o=!1;if(t===Ge&&s&&go(e)&&(this.player.debug.log("CommonDemux",`hls pushBuffer video ts is ${i}, isVideoSequenceHeader is true`),o=!0,this.player.isRecordTypeFlv())){const t=new Uint8Array(e);this.player.recorder.addVideoSequenceHeader(t,i)}this.player.recording&&Ao(o)&&Ao(a)&&this.handleRecording(e,t,i,s,r),t===Ge?this._doDecoderDecode({ts:i,cts:r,payload:e,type:Ge,isIFrame:s}):t===je&&this._doDecoderDecode({ts:i,payload:e,type:je})}_doDecodeByFmp4(e,t,i,s){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;this._doDecode(e,t,i,s,r)}_doDecodeByTs(e,t,i,s){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;this._doDecode(e,t,i,s,r)}_doDecodeByPs(e,t,i,s){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;this._doDecode(e,t,i,s,r)}_decodeNext(e){const t=e.ts;if(0===this.bufferList.length)return;let i=this.bufferList[0];const s=i.ts-t,r=e.type===Ge&&i.type===je,a=e.type===Ge&&go(e.payload);(s<=20||r||a)&&(this.player.debug.log("CommonDemux",`decode data type is ${e.type} and\n ts is ${t} next data type is ${i.type} ts is ${i.ts}\n diff is ${s} and isVideoAndNextAudio is ${r} and isVideoSqeHeader is ${a}`),this.bufferList.shift(),this._doDecoderDecode(i))}_doDecoderDecode(e){const t=this.player,{webcodecsDecoder:i,mseDecoder:s}=t;this.player.isPlayer()&&this.player.updateStats({buf:this.delay}),e.type===je?t._opt.hasAudio&&(t._opt.useMSE&&t._opt.mseDecodeAudio?s.decodeAudio(e.payload,e.ts):t.decoderWorker&&t.decoderWorker.decodeAudio(e.payload,e.ts)):e.type===Ge&&(t._opt.isEmitSEI&&this.findSei(e.payload,e.ts),t._opt.useWCS&&!t._opt.useOffscreen?i.decodeVideo(e.payload,e.ts,e.isIFrame,e.cts):t._opt.useMSE?s.decodeVideo(e.payload,e.ts,e.isIFrame,e.cts):t.decoderWorker&&t.decoderWorker.decodeVideo(e.payload,e.ts,e.isIFrame))}pushBuffer(e,t){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=this.player._opt.videoBuffer,r=this.player._opt.videoBufferDelay,a=this.player.isPlayer();if(t.type===je&&Wr(e)){if(this.player.debug.log("CommonDemux",`pushBuffer() audio ts is ${t.ts}, isAacCodecPacket is true`),this.player.isRecordTypeFlv()){const i=new Uint8Array(e);this.player.recorder.addAACSequenceHeader(i,t.ts)}this._doDecoderDecode({ts:t.ts,payload:e,type:je})}else if(t.type===Ge&&t.isIFrame&&go(e)){if(this.player.debug.log("CommonDemux",`pushBuffer() video ts is ${t.ts}, isVideoSequenceHeader is true`),this.player.isRecordTypeFlv()){const i=new Uint8Array(e);this.player.recorder.addVideoSequenceHeader(i,t.ts)}this._doDecoderDecode({ts:t.ts,payload:e,type:Ge,isIFrame:t.isIFrame,cts:t.cts})}else{if(this.player.recording&&this.handleRecording(e,t.type,t.ts,t.isIFrame,t.cts),a){if(this.preTimestampDuration>0&&this.preTimestamp>0&&t.type===Ge){const e=t.ts-this.preTimestamp,i=this.preTimestampDuration+this.preTimestampDuration/2;e>=i&&this.player.debug.log("CommonDemux",`pushBuffer() video\n ts is ${t.ts}, preTimestamp is ${this.preTimestamp},\n diff is ${e} and preTimestampDuration is ${this.preTimestampDuration} and maxDiff is ${i}\n maybe trigger black screen or flower screen`)}if(this.preTimestamp>0&&t.ts<this.preTimestamp&&t.type===Ge&&this.preTimestamp-t.ts>Z&&(this.player.debug.warn("CommonDemux",`pushBuffer() video\n ts is ${t.ts}, preTimestamp is ${this.preTimestamp},\n diff is ${this.preTimestamp-t.ts} more than 3600000\n and resetAllDelay()`),this.resetAllDelay()),t.ts<=this.preTimestamp&&this.preTimestamp>0&&t.type===Ge&&(this.player.debug.warn("CommonDemux",`pushBuffer() video and isIFrame is ${t.isIFrame} and\n ts is ${t.ts} less than (or equal) preTimestamp is ${this.preTimestamp} and\n payloadBufferSize is ${e.byteLength} and prevPayloadBufferSize is ${this.prevPayloadBufferSize}`),this.player._opt.isDropSameTimestampGop&&Ao(t.isIFrame)&&this.player.isDemuxDecodeFirstIIframeInit())){const e=this.hasIframeInBufferList(),t=Ao(this.isPushDropping);return this.player.debug.log("CommonDemux",`pushBuffer(), isDropSameTimestampGop is true and\n hasIframe is ${e} and isNotPushDropping is ${t} and next drop buffer`),void(e&&t?this.dropBuffer$2():this.clearBuffer(!0))}if(this.player.isDemuxDecodeFirstIIframeInit()){let e=this.getDelayNotUpdateDelay(t.ts,t.type);this.pushLatestDelay=e;const i=r+s;this.player._opt.useMSE?e>i&&this.delay<i&&this.delay>0&&this.hasIframeInBufferList()&&!1===this.isPushDropping&&(this.player.debug.warn("CommonDemux",`useMSE, pushLatestDelay is ${e} > ${r+s}, bufferList is ${this.bufferList.length}, delay is ${this.delay} and dropBuffer$2()`),this.dropBuffer$2()):e>i&&this.delay<i&&this.delay>0&&this.hasIframeInBufferList()&&!1===this.isPushDropping&&(this.player.debug.warn("CommonDemux",`useWCS, pushLatestDelay is ${e} > ${r+s},bufferList is ${this.bufferList.length}, delay is ${this.delay} and dropBuffer$2()`),this.dropBuffer$2()),this.isHistoryIntervalDiffTimeAllLarge()&&Ao(this.player.visibility)&&(this.player._opt.useMSE?this.hasIframeInBufferList()&&!1===this.isPushDropping&&(this.player.debug.warn("CommonDemux",`useMSE, page visibility is false and\n history interval diff is ${this.historyIntervalDiffTimeList.join(",")} and\n bufferList is ${this.bufferList.length},\n delay is ${this.delay} and dropBuffer$2()`),this.dropBuffer$2()):this.hasIframeInBufferList()&&!1===this.isPushDropping&&(this.player.debug.warn("CommonDemux",`useWCS, page visibility is false and\n history interval diff is ${this.historyIntervalDiffTimeList.join(",")} and\n bufferList is ${this.bufferList.length},\n delay is ${this.delay} and dropBuffer$2()`),this.dropBuffer$2()))}t.type===Ge&&(this.preTimestamp>0&&(this.preTimestampDuration=t.ts-this.preTimestamp),this.prevPayloadBufferSize=e.byteLength,this.preTimestamp=t.ts)}if(i?t.type===je?this.bufferList.push({ts:t.ts,payload:e,type:je}):t.type===Ge&&this.bufferList.push({ts:t.ts,cts:t.cts,payload:e,type:Ge,isIFrame:t.isIFrame}):t.type===Ge?this._doDecoderDecode({ts:t.ts,cts:t.cts,payload:e,type:Ge,isIFrame:t.isIFrame}):t.type===je&&this._doDecoderDecode({ts:t.ts,payload:e,type:je}),this.player.isPlaybackCacheBeforeDecodeForFpsRender()&&(Ua(this.playbackStreamVideoFps)||Ua(this.playbackStreamAudioFps))){let e=this.playbackStreamVideoFps,t=this.playbackStreamAudioFps;if(Ua(this.playbackStreamVideoFps)&&(e=ho(this.bufferList,Ge),e>0&&(this.playbackStreamVideoFps=e,this.player.video&&this.player.video.setStreamFps(this.playbackStreamVideoFps),this.playbackStreamFps=t?e+t:e,Ao(this.player._opt.hasAudio)&&(this.player.debug.log(this.TAG_NAME,"playbackCacheBeforeDecodeForFpsRender,_opt.hasAudio is false and set streamAudioFps is 0"),this.playbackStreamAudioFps=0),this.initPlaybackCacheLoop())),Ua(this.playbackStreamAudioFps)&&(t=ho(this.bufferList,je),t>0&&(this.playbackStreamAudioFps=t,this.playbackStreamFps=e?e+t:t,this.initPlaybackCacheLoop())),Ua(this.playbackStreamVideoFps)&&Ua(this.playbackStreamAudioFps)){const i=this.bufferList.map((e=>({type:e.type,ts:e.ts})));this.player.debug.log("CommonDemux",`playbackCacheBeforeDecodeForFpsRender, calc streamAudioFps is ${t}, streamVideoFps is ${e}, bufferListLength is ${this.bufferList.length} and ts list is ${JSON.stringify(i)}`)}const i=this.getAudioBufferLength()>0,s=i?60:40;this.bufferList.length>=s&&(this.debug.warn("CommonDemux",`playbackCacheBeforeDecodeForFpsRender, bufferListLength is ${this.bufferList.length} more than ${s}, and hasAudio is ${i} an set streamFps is 25`),this.playbackStreamVideoFps=e,this.player.video&&this.player.video.setStreamFps(this.playbackStreamVideoFps),i?(this.playbackStreamAudioFps=25,this.playbackStreamFps=this.playbackStreamVideoFps+this.playbackStreamAudioFps):this.playbackStreamFps=this.playbackStreamVideoFps,this.initPlaybackCacheLoop())}}}dropBuffer$2(){if(this.bufferList.length>0){let e=this.bufferList.findIndex((e=>yo(e.isIFrame)&&e.type===Ge));if(this.isAllIframeInBufferList())for(let t=0;t<this.bufferList.length;t++){const i=this.bufferList[t],s=this.getDelayNotUpdateDelay(i.ts,i.type);if(s>=this.getNotDroppingDelayTs()){this.player.debug.log("CommonDemux",`dropBuffer$2() isAllIframeInBufferList() is true, and index is ${t} and tempDelay is ${s} and notDroppingDelayTs is ${this.getNotDroppingDelayTs()}`),e=t;break}}if(e>=0){this.isPushDropping=!0,this.player.updateStats({isDropping:!0});const t=this.bufferList.length;this.bufferList=this.bufferList.slice(e);const i=this.bufferList.shift();this.resetAllDelay(),this.getDelay(i.ts,i.type),this._doDecoderDecode(i),this.isPushDropping=!1,this.player.debug.log("CommonDemux",`dropBuffer$2() iFrameIndex is ${e},and old bufferList length is ${t} ,and new bufferList length is ${this.bufferList.length} and new delay is ${this.delay} `)}else this.isPushDropping=!1}0===this.bufferList.length&&(this.isPushDropping=!1)}clearBuffer(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.player.debug.log("CommonDemux",`clearBuffer,buffer length is ${this.bufferList.length}, need clear is ${e} and _opt.checkFirstIFrame is ${this.player._opt.checkFirstIFrame}`),e&&(this.bufferList=[]),this.player.isPlayer()&&(this.resetAllDelay(),yo(this.player._opt.checkFirstIFrame)&&(this.dropping=!0,this.player.updateStats({isDropping:!0}))),this.player.decoderCheckFirstIFrame()}calcNetworkDelay(e){if(!(this.player.isDemuxDecodeFirstIIframeInit()&&e>0))return;null===this.bufferStartDts?(this.bufferStartDts=e,this.bufferStartLocalTs=ha()):e<this.bufferStartDts&&(this.player.debug.warn("CommonDemux",`calcNetworkDelay dts is ${e} and bufferStartDts is ${this.bufferStartDts}`),this.bufferStartDts=e,this.bufferStartLocalTs=ha());let t=e-this.bufferStartDts,i=ha()-this.bufferStartLocalTs,s=i>t?i-t:0;s>this.player._opt.networkDelay&&this.player._opt.playType===_&&(this.player.debug.warn("CommonDemux",`delay is more than networkDelay and now dts:${e},start dts is ${this.bufferStartDts}, vs start is ${t},local diff is ${i} ,delay is ${s}, _opt.networkDelay is ${this.player._opt.networkDelay}`),this.player.emit(lt.networkDelayTimeout,s)),this.player.updateStats({netBuf:s})}calcIframeIntervalTimestamp(e){if(null===this.preIframeTs)this.preIframeTs=e;else if(this.preIframeTs<e){const t=e-this.preIframeTs;this.player&&(this.player.videoIframeIntervalTs=t),this.preIframeTs=e}}calcBufferFps(e){}getNotDroppingDelayTs(){return this.player._opt.videoBuffer+this.player._opt.videoBufferDelay/2}getMaxDelayTs(){return this.player._opt.videoBuffer+this.player._opt.videoBufferDelay}getPushLatestDelay(){return this.pushLatestDelay}getVideoBufferLength(){let e=0;return this.bufferList.forEach((t=>{t.type===Ge&&(e+=1)})),e}getAudioBufferLength(){let e=0;return this.bufferList.forEach((t=>{t.type===je&&(e+=1)})),e}hasIframeInBufferList(){return this.bufferList.some((e=>e.type===Ge&&e.isIFrame))}isAllIframeInBufferList(){const e=this.getVideoBufferLength();let t=0;return this.bufferList.forEach((e=>{e.type===Ge&&e.isIFrame&&(t+=1)})),e===t}getInputByteLength(){return 0}getIsStreamTsMoreThanLocal(){return this.isStreamTsMoreThanLocal}close(){}reset(){}findSei(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=4;Oa(this.nalUnitSize)&&(s=this.nalUnitSize);const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(e.length<4)return;const i=e.length,s=[];let r,a=0;for(;a+t<i;)if(r=ra(e,a),3===t&&(r>>>=8),a+=t,r){if(a+r>i)break;s.push(e.subarray(a,a+r)),a+=r}return s}(e.slice(5),s);if(Ao(i)){const e=this.player.getVideoInfo();e&&e.encType&&(i=e.encType===Tt)}r.forEach((e=>{const s=i?e[0]>>>1&63:31&e[0];(i&&(s===Kt||s===qt)||Ao(i)&&s===Bt)&&this.player.emit(lt.videoSEI,{ts:t,data:e})}))}handleRecording(e,t,i,s,r){if(this.player.isRecordTypeFlv()){const s=new Uint8Array(e);t===Ge?this.player.recorder.addVideo(s,i):t===je&&this.player.recorder.addAudio(s,i)}else if(this.player.isRecordTypeMp4()){const a=new Uint8Array(e);if(this.player.recorder.isWasmMp4()){if(t===Ge)this.player.recorder.handleAddNaluTrack(a.slice(5),s,i,r);else if(t===je){const t=new Uint8Array(e);this.player.recorder.handleAddAudioTrack(Jr(t)?t.slice(2):t.slice(1),i)}}else t===Ge&&this.player.recorder.handleAddNaluTrack(a.slice(5),s,i,r)}}updateNalUnitSize(e){const t=15&e[0];this.player.video.updateVideoInfo({encTypeCode:t});const i=t===wt;this.nalUnitSize=function(e,t){let i=null;return t?e.length>=28&&(i=1+(3&e[26])):e.length>=12&&(i=1+(3&e[9])),i}(e,i),this.player.debug.log(this.TAG_NAME,`demux() isVideoSequenceHeader is true and isHevc is ${i} and nalUnitSize is ${this.nalUnitSize}`)}cryptoPayload(e,t){let i=e,s=this.player;if(s._opt.isM7sCrypto)if(s._opt.cryptoKey&&s._opt.cryptoKey.byteLength>0&&s._opt.cryptoIV&&s._opt.cryptoIV.byteLength>0){const t=this.player.video.getVideoInfo();t.encTypeCode?i=function(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t=new Uint8Array(t),i=new Uint8Array(i);const r=e.byteLength;let a=5;for(;a<r;){let o=yd(e.slice(a,a+4));if(o>r)break;let n=e[a+4],l=!1;if(s?(n=n>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(n)):(n&=31,l=1===n||5===n),l){const s=e.slice(a+4+2,a+4+o);let r=new fd.ModeOfOperation.ctr(t,new fd.Counter(i));const n=r.decrypt(s);r=null,e.set(n,a+4+2)}a=a+4+o}return e}(e,s._opt.cryptoKey,s._opt.cryptoIV,t.encTypeCode===wt):s.debug.warn(this.TAG_NAME,`videoInfo.encTypeCode is ${t.encTypeCode}`)}else s.debug.error(this.TAG_NAME,`isM7sCrypto cryptoKey.length is ${s._opt.cryptoKey&&s._opt.cryptoKey.byteLength} or cryptoIV.length is ${s._opt.cryptoIV&&s._opt.cryptoIV.byteLength} null`);else if(s._opt.isSm4Crypto)s._opt.sm4CryptoKey&&t?i=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=e.byteLength;let r=5;for(;r<s;){let a=Pd(e.slice(r,r+4));if(a>s)break;let o=e[r+4],n=!1;if(i?(o=o>>>1&63,n=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(o)):(o&=31,n=1===o||5===o),n){const i=Id(e.slice(r+4+2,r+4+a),t,0,{padding:"none",output:"array"});e.set(i,r+4+2)}r=r+4+a}return e}(e,s._opt.sm4CryptoKey):s._opt.sm4CryptoKey||s.debug.error(this.TAG_NAME,"isSm4Crypto opt.sm4CryptoKey is null");else if(s._opt.isXorCrypto)if(s._opt.cryptoKey&&s._opt.cryptoKey.byteLength>0&&s._opt.cryptoIV&&s._opt.cryptoIV.byteLength>0){const t=this.player.video.getVideoInfo();i=function(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=e.byteLength;let a=5;for(;a<r;){let o=Md(e.slice(a,a+4));if(o>r)break;let n=e[a+4],l=!1;if(s?(n=n>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(n)):(n&=31,l=1===n||5===n),l){const s=Bd(e.slice(a+4,a+4+o),t,i);e.set(s,a+4)}a=a+4+o}return e}(e,s._opt.cryptoKey,s._opt.cryptoIV,t.encTypeCode===wt)}else s.debug.error(this.TAG_NAME,"isXorCrypto opt.xorCryptoKey is null");return i}cryptoPayloadAudio(e){let t=e,i=this.player;if(i._opt.isM7sCrypto)if(i._opt.cryptoKey&&i._opt.cryptoKey.byteLength>0&&i._opt.cryptoIV&&i._opt.cryptoIV.byteLength>0){e[0]>>4===Et&&(t=function(e,t,i){if(e.byteLength<=30)return e;const s=e.slice(32);let r=new fd.ModeOfOperation.ctr(t,new fd.Counter(i));const a=r.decrypt(s);return r=null,e.set(a,32),e}(e,i._opt.cryptoKey,i._opt.cryptoIV))}else i.debug.error(this.TAG_NAME,`isM7sCrypto cryptoKey.length is ${i._opt.cryptoKey&&i._opt.cryptoKey.byteLength} or cryptoIV.length is ${i._opt.cryptoIV&&i._opt.cryptoIV.byteLength} null`);return t}_decodeEnhancedH265Video(e,t){const i=e[0],s=48&i,r=15&i,a=e.slice(1,5),o=new ArrayBuffer(4),n=new Uint32Array(o),l="a"==String.fromCharCode(a[0]);if(r===wr){if(s===Er){const t=e.slice(5);if(l);else{const e=new Uint8Array(5+t.length);e.set([28,0,0,0,0],0),e.set(t,5),this.updateNalUnitSize(e),this.player.debug.log(this.TAG_NAME,`demux() isVideoSequenceHeader(enhancedH265) is true and nalUnitSize is ${this.nalUnitSize}`),this._doDecode(e,Ge,0,!0,0)}}}else if(r===Sr){let i=e,r=0;const a=s===Er;if(a&&this.calcIframeIntervalTimestamp(t),l);else{n[0]=e[4],n[1]=e[3],n[2]=e[2],n[3]=0,r=n[0];i=Wn(e.slice(8),a),i=this.cryptoPayload(i,a),this._doDecode(i,Ge,t,a,r)}}else if(r===Tr){const i=s===Er,r=e.slice(5);i&&this.calcIframeIntervalTimestamp(t);let a=Wn(r,i);a=this.cryptoPayload(a,i),this._doDecode(a,Ge,t,i,0)}}_isEnhancedH265Header(e){return 128==(128&e)}}var Fd=function(e,t,i,s){return new(i||(i=Promise))((function(r,a){function o(e){try{l(s.next(e))}catch(e){a(e)}}function n(e){try{l(s.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,n)}l((s=s.apply(e,t||[])).next())}))};const Od=Symbol(32),Nd=Symbol(16),jd=Symbol(8);class Gd{constructor(e){this.g=e,this.consumed=0,e&&(this.need=e.next().value)}setG(e){this.g=e,this.demand(e.next().value,!0)}consume(){this.buffer&&this.consumed&&(this.buffer.copyWithin(0,this.consumed),this.buffer=this.buffer.subarray(0,this.buffer.length-this.consumed),this.consumed=0)}demand(e,t){return t&&this.consume(),this.need=e,this.flush()}read(e){return Fd(this,void 0,void 0,(function*(){return this.lastReadPromise&&(yield this.lastReadPromise),this.lastReadPromise=new Promise(((t,i)=>{var s;this.reject=i,this.resolve=e=>{delete this.lastReadPromise,delete this.resolve,delete this.need,t(e)};this.demand(e,!0)||null===(s=this.pull)||void 0===s||s.call(this,e)}))}))}readU32(){return this.read(Od)}readU16(){return this.read(Nd)}readU8(){return this.read(jd)}close(){var e;this.g&&this.g.return(),this.buffer&&this.buffer.subarray(0,0),null===(e=this.reject)||void 0===e||e.call(this,new Error("EOF")),delete this.lastReadPromise}flush(){if(!this.buffer||!this.need)return;let e=null;const t=this.buffer.subarray(this.consumed);let i=0;const s=e=>t.length<(i=e);if("number"==typeof this.need){if(s(this.need))return;e=t.subarray(0,i)}else if(this.need===Od){if(s(4))return;e=t[0]<<24|t[1]<<16|t[2]<<8|t[3]}else if(this.need===Nd){if(s(2))return;e=t[0]<<8|t[1]}else if(this.need===jd){if(s(1))return;e=t[0]}else if("buffer"in this.need){if("byteOffset"in this.need){if(s(this.need.byteLength-this.need.byteOffset))return;new Uint8Array(this.need.buffer,this.need.byteOffset).set(t.subarray(0,i)),e=this.need}else if(this.g)return void this.g.throw(new Error("Unsupported type"))}else{if(s(this.need.byteLength))return;new Uint8Array(this.need).set(t.subarray(0,i)),e=this.need}return this.consumed+=i,this.g?this.demand(this.g.next(e).value,!0):this.resolve&&this.resolve(e),e}write(e){if(e instanceof Uint8Array?this.malloc(e.length).set(e):"buffer"in e?this.malloc(e.byteLength).set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)):this.malloc(e.byteLength).set(new Uint8Array(e)),!this.g&&!this.resolve)return new Promise((e=>this.pull=e));this.flush()}writeU32(e){this.malloc(4).set([e>>24&255,e>>16&255,e>>8&255,255&e]),this.flush()}writeU16(e){this.malloc(2).set([e>>8&255,255&e]),this.flush()}writeU8(e){this.malloc(1)[0]=e,this.flush()}malloc(e){if(this.buffer){const t=this.buffer.length,i=t+e;if(i<=this.buffer.buffer.byteLength-this.buffer.byteOffset)this.buffer=new Uint8Array(this.buffer.buffer,this.buffer.byteOffset,i);else{const e=new Uint8Array(i);e.set(this.buffer),this.buffer=e}return this.buffer.subarray(t,i)}return this.buffer=new Uint8Array(e),this.buffer}}Gd.U32=Od,Gd.U16=Nd,Gd.U8=jd;class zd extends Ud{constructor(e){super(e),this.TAG_NAME="FlvDemux",this.input=new Gd(this.demux()),e.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.input=null,this.player.debug.log(this.TAG_NAME,"destroy")}dispatch(e){this.input?this.input.write(e):this.player&&this.player.debug.warn(this.TAG_NAME,"dispatch() this.input is null")}*demux(){yield 9;const e=new ArrayBuffer(4),t=new Uint8Array(e),i=new Uint32Array(e),s=this.player;for(;;){if(!this.input)return;t[3]=0;const e=yield 15,r=e[4];t[0]=e[7],t[1]=e[6],t[2]=e[5];const a=i[0];t[0]=e[10],t[1]=e[9],t[2]=e[8],t[3]=e[11];let o=i[0];const n=(yield a).slice();if(!s)return;switch(r){case ze:if(s._opt.hasAudio&&(s.updateStats({abps:n.byteLength}),n.byteLength>0)){let e=n;yo(this.player._opt.m7sCryptoAudio)&&(e=this.cryptoPayloadAudio(n)),this._doDecode(e,je,o)}break;case $e:if(s._opt.hasVideo&&n.length>=6){let e=o;s.updateStats({vbps:n.byteLength,dts:e}),s._times.demuxStart||(s._times.demuxStart=ha());const t=n[0];if(this._isEnhancedH265Header(t))this._decodeEnhancedH265Video(n,e);else{const e=15&t;let s=(t>>4&15)===Vs;const r=e===vt;if(Ao(e===wt||r))return void this.player.debug.warn(this.TAG_NAME,`demux() codecId is ${e} and ignore`);s&&(this.calcIframeIntervalTimestamp(o),null===this.nalUnitSize&&go(n)&&this.updateNalUnitSize(n)),i[0]=n[4],i[1]=n[3],i[2]=n[2],i[3]=0;let a=i[0],l=this.cryptoPayload(n,s);this._doDecode(l,Ge,o,s,a)}}else n.length<6&&s.debug.warn(this.TAG_NAME,`payload.length is ${n.length} less than 6 and ignore`);break;case He:if(this.player.isRecordTypeFlv()){const e=new Uint8Array(n);this.player.recorder.addMetaData(e)}const e=cl(n);e&&e.onMetaData&&s.updateMetaData(e.onMetaData);break;default:s.debug.log(this.TAG_NAME,`demux() type is ${r}`)}}}close(){this.input=null}getInputByteLength(){let e=0;return this.input&&this.input.buffer&&(e=this.input.buffer.byteLength),e}}class $d extends Ud{constructor(e){super(e),this.TAG_NAME="M7sDemux",e.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.player.debug.log(this.TAG_NAME,"destroy")}dispatch(e){const t=this.player,i=new DataView(e),s=i.getUint8(0),r=i.getUint32(1,!1),a=new ArrayBuffer(4),o=new Uint32Array(a);switch(s){case je:if(t._opt.hasAudio){const i=new Uint8Array(e,5);t.updateStats({abps:i.byteLength}),i.byteLength>0&&this._doDecode(i,s,r)}break;case Ge:if(t._opt.hasVideo)if(t._times.demuxStart||(t._times.demuxStart=ha()),i.byteLength>=11){const a=new Uint8Array(e,5);let n=r;t.updateStats({vbps:a.byteLength,dts:n});const l=a[0];if(this._isEnhancedH265Header(l))this._decodeEnhancedH265Video(a,r);else{const e=i.getUint8(5)>>4==1;e&&this.calcIframeIntervalTimestamp(r),o[0]=a[4],o[1]=a[3],o[2]=a[2],o[3]=0;let t=o[0],n=this.cryptoPayload(a,e);this._doDecode(n,s,r,e,t)}}else this.player.debug.warn(this.TAG_NAME,"dispatch","dv byteLength is",i.byteLength,"and return")}}}class Hd extends zd{constructor(e){super(e),e.debug.log("WebTransportDemux","init")}destroy(){this.player.debug.log("WebTransportDemux","destroy"),super.destroy()}}var Vd,Wd=Nr((function(e){e.exports=function(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e},e.exports.__esModule=!0,e.exports.default=e.exports})),Jd=(Vd=Wd)&&Vd.__esModule&&Object.prototype.hasOwnProperty.call(Vd,"default")?Vd.default:Vd;class qd extends Ud{constructor(e){super(e),Jd(this,"TAG_NAME","NakedFlowDemux"),this.lastBuf=null,this.vps=null,this.sps=null,this.pps=null,this.streamVideoType=null,this.streamAudioType=null,this.tempNaluBufferList=new Uint8Array(0),this.localDts=0,this.isSendSeqHeader=!1,this.isSendAACSeqHeader=!1,e.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.lastBuf=null,this.vps=null,this.sps=null,this.pps=null,this.streamVideoType=null,this.streamAudioType=null,this.tempNaluBufferList=new Uint8Array(0),this.localDts=0,this.localAudioDts=0,this.isSendSeqHeader=!1,this.isSendAACSeqHeader=!1,this.player.debug.log(this.TAG_NAME,"destroy")}dispatch(e){this.player;const t=new Uint8Array(e);this.extractNALu$2(t)}addNaluToBuffer(e){const t=e.byteLength+this.tempNaluBufferList.byteLength,i=new Uint8Array(t);i.set(this.tempNaluBufferList,0),i.set(e,this.tempNaluBufferList.byteLength),this.tempNaluBufferList=i}downloadNakedFlowFile(){const e=new Blob([this.tempNaluBufferList]);try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=Date.now()+".h264",t.click(),window.URL.revokeObjectURL(t.href)}catch(e){console.error("downloadTempNalu",e)}}getNaluDts(){const e=this.player._opt.nakedFlowFps;return this.localDts=this.localDts+parseInt(1e3/e),this.localDts}getNaluAudioDts(){const e=this.player.audio.audioContext.sampleRate,t=this.player.audio.audioBufferSize;return this.localDts+parseInt(t/e*1e3)}extractNALu(e){let t,i,s=0,r=e.byteLength,a=0,o=[];for(;s<r;)switch(t=e[s++],a){case 0:0===t&&(a=1);break;case 1:a=0===t?2:0;break;case 2:case 3:0===t?a=3:1===t&&s<r?(e[s],i&&o.push(e.subarray(i,s-a-1)),i=s,a=0):a=0}return i&&o.push(e.subarray(i,r)),o}extractNALu$2(e){let t=null;if(!e||e.byteLength<1)return;this.lastBuf?(t=new Uint8Array(e.byteLength+this.lastBuf.length),t.set(this.lastBuf),t.set(new Uint8Array(e),this.lastBuf.length)):t=new Uint8Array(e);let i=0,s=-1,r=-2;const a=new Array;for(let e=0;e<t.length;e+=2){const i=t[e],o=t[e+1];0==s&&0==i&&0==o?a.push(e-1):1==o&&0==i&&0==s&&0==r&&a.push(e-2),r=i,s=o}if(a.length>1)for(let e=0;e<a.length-1;++e){const s=t.subarray(a[e],a[e+1]+1);this.handleNALu(s),i=a[e+1]}else i=a[0];if(0!=i&&i<t.length)this.lastBuf=t.subarray(i);else{this.lastBuf||(this.lastBuf=t);const i=new Uint8Array(this.lastBuf.length+e.byteLength);i.set(this.lastBuf),i.set(new Uint8Array(e),this.lastBuf.length),this.lastBuf=i}}handleNALu(e){e.byteLength<4?this.player.debug.warn(this.TAG_NAME,`handleNALu nalu byteLength is ${e.byteLength} <= 4`):(e=e.slice(4),this.handleVideoNalu(e))}handleVideoNalu(e){const t=new Uint8Array(e);if(this.streamVideoType||(this.streamVideoType=function(e){let t=null,i=31&e[0];return i!==Rt&&i!==Dt||(t=St),t||(i=(126&e[0])>>1,i!==Gt&&i!==$t&&i!==Vt||(t=Tt)),t}(t)),this.streamVideoType===St){const e=this.handleAddNaluStartCode(t),i=this.extractNALu(e);if(0===i.length)return void this.player.debug.warn(this.TAG_NAME,"handleVideoNalu","naluList.length === 0");const s=[];if(i.forEach((e=>{const t=Pn(e);t===Dt||t===Rt?this.handleVideoH264Nalu(e):Mn(t)&&s.push(e)})),1===s.length)this.handleVideoH264Nalu(s[0]);else{const e=function(e){if(0===e.length)return!1;const t=Pn(e[0]);for(let i=1;i<e.length;i++)if(t!==Pn(e[i]))return!1;return!0}(s);if(e){const e=Pn(s[0]),t=Un(e);this.handleVideoH264NaluList(s,t,e)}else s.forEach((e=>{this.handleVideoH264Nalu(e)}))}}else if(this.streamVideoType===Tt)if(this.player._opt.nakedFlowH265DemuxUseNew){const e=this.handleAddNaluStartCode(t),i=this.extractNALu(e);if(0===i.length)return void this.player.debug.warn(this.TAG_NAME,"handleVideoNalu","h265 naluList.length === 0");const s=[];if(i.forEach((e=>{const t=Jn(e);t===Vt||t===$t||t===Gt?this.handleVideoH265Nalu(e):qn(t)&&s.push(e)})),1===s.length)this.handleVideoH265Nalu(s[0]);else{const e=function(e){if(0===e.length)return!1;const t=Jn(e[0]);for(let i=1;i<e.length;i++)if(t!==Jn(e[i]))return!1;return!0}(s);if(e){const e=Jn(s[0]),t=Kn(e);this.handleVideoH265NaluList(s,t,e)}else s.forEach((e=>{this.handleVideoH265Nalu(e)}))}}else{Jn(t)===Vt?this.extractH265PPS(t):this.handleVideoH265Nalu(t)}else this.player.debug.error(this.TAG_NAME," this.streamVideoType is null")}extractH264PPS(e){const t=this.handleAddNaluStartCode(e);this.extractNALu(t).forEach((e=>{Bn(Pn(e))?this.extractH264SEI(e):this.handleVideoH264Nalu(e)}))}extractH265PPS(e){const t=this.handleAddNaluStartCode(e);this.extractNALu(t).forEach((e=>{const t=Jn(e);t===Jt?this.extractH265SEI(e):this.handleVideoH265Nalu(e)}))}extractH264SEI(e){const t=this.handleAddNaluStartCode(e);this.extractNALu(t).forEach((e=>{this.handleVideoH264Nalu(e)}))}extractH265SEI(e){const t=this.handleAddNaluStartCode(e);this.extractNALu(t).forEach((e=>{this.handleVideoH265Nalu(e)}))}handleAddNaluStartCode(e){const t=[0,0,0,1],i=new Uint8Array(e.length+t.length);return i.set(t),i.set(e,t.length),i}handleAudioAACNalu(e){if(!e||e.byteLength<1)return;this.streamAudioType||(this.streamAudioType=Ct.AAC);let t=new Uint8Array(e);const i=t.slice(0,7);if(t=t.slice(7),!this.isSendAACSeqHeader){const e=(192&i[2])>>6,t=(60&i[2])>>2,s=(1&i[2])<<2|(192&i[3])>>6,r=new Uint8Array([175,0,e<<3|(14&t)>>1,(1&t)<<7|s<<3]);this.isSendAACSeqHeader=!0,this._doDecode(r,je,0,!1,0)}const s=this.getNaluAudioDts(),r=new Uint8Array(t.length+2);r.set([175,1],0),r.set(t,2),this._doDecode(r,je,s,!1,0)}handleAudioG711ANalu(e){if(!e||e.byteLength<1)return;this.streamAudioType||(this.streamAudioType=Ct.ALAW);let t=new Uint8Array(e);const i=this.getNaluAudioDts(),s=new Uint8Array(t.length+1);s.set([114],0),s.set(t,1),this._doDecode(s,je,i,!1,0)}handleAudioG711UNalu(e){if(!e||e.byteLength<1)return;this.streamAudioType||(this.streamAudioType=Ct.MULAW);let t=new Uint8Array(e);const i=this.getNaluAudioDts(),s=new Uint8Array(t.length+1);s.set([130],0),s.set(t,1),this._doDecode(s,je,i,!1,0)}handleVideoH264Nalu(e){const t=Pn(e);switch(t){case Rt:this.sps=e;break;case Dt:this.pps=e}if(this.isSendSeqHeader){if(this.sps&&this.pps){const e=Ln({sps:this.sps,pps:this.pps}),t=this.getNaluDts();this._doDecode(e,Ge,t,!0,0),this.sps=null,this.pps=null}if(Mn(t)){this.player._times.demuxStart||(this.player._times.demuxStart=ha());const i=Un(t),s=this.getNaluDts(),r=function(e,t){let i=[];i[0]=t?23:39,i[1]=1,i[2]=0,i[3]=0,i[4]=0,i[5]=e.byteLength>>24&255,i[6]=e.byteLength>>16&255,i[7]=e.byteLength>>8&255,i[8]=255&e.byteLength;const s=new Uint8Array(i.length+e.byteLength);return s.set(i,0),s.set(e,i.length),s}(e,i);this._preDoDecode(r,Ge,s,i,0)}else this.player.debug.warn(this.TAG_NAME,`handleVideoH264Nalu is avc seq head nalType is ${t}`)}else if(this.sps&&this.pps){this.isSendSeqHeader=!0;const e=Ln({sps:this.sps,pps:this.pps});this._doDecode(e,Ge,0,!0,0),this.sps=null,this.pps=null}}handleVideoH264NaluList(e,t,i){if(this.isSendSeqHeader){this.player._times.demuxStart||(this.player._times.demuxStart=ha());const i=this.getNaluDts(),s=In(e.reduce(((e,t)=>{const i=aa(e),s=aa(t),r=new Uint8Array(i.byteLength+s.byteLength);return r.set(i,0),r.set(s,i.byteLength),r})),t);this._preDoDecode(s,Ge,i,t,0)}else this.player.debug.warn(this.TAG_NAME,"handleVideoH264NaluList isSendSeqHeader is false")}handleVideoH265Nalu(e){const t=Jn(e);switch(t){case Gt:this.vps=e;break;case $t:this.sps=e;break;case Vt:this.pps=e}if(this.isSendSeqHeader){if(this.vps&&this.sps&&this.pps){const e=Vn({vps:this.vps,sps:this.sps,pps:this.pps}),t=this.getNaluDts();this._doDecode(e,Ge,t,!0,0),this.vps=null,this.sps=null,this.pps=null}if(qn(t)){this.player._times.demuxStart||(this.player._times.demuxStart=ha());const i=Kn(t),s=this.getNaluDts(),r=function(e,t){let i=[];i[0]=t?28:44,i[1]=1,i[2]=0,i[3]=0,i[4]=0,i[5]=e.byteLength>>24&255,i[6]=e.byteLength>>16&255,i[7]=e.byteLength>>8&255,i[8]=255&e.byteLength;const s=new Uint8Array(i.length+e.byteLength);return s.set(i,0),s.set(e,i.length),s}(e,i);this._preDoDecode(r,Ge,s,i,0)}}else if(this.vps&&this.sps&&this.pps){this.isSendSeqHeader=!0;const e=Vn({vps:this.vps,sps:this.sps,pps:this.pps});this._doDecode(e,Ge,0,!0,0),this.vps=null,this.sps=null,this.pps=null}}handleVideoH265NaluList(e,t,i){if(this.isSendSeqHeader){this.player._times.demuxStart||(this.player._times.demuxStart=ha());const i=this.getNaluDts(),s=Wn(e.reduce(((e,t)=>{const i=aa(e),s=aa(t),r=new Uint8Array(i.byteLength+s.byteLength);return r.set(i,0),r.set(s,i.byteLength),r})),t);this._preDoDecode(s,Ge,i,t,0)}else this.player.debug.warn(this.TAG_NAME,"handleVideoH265NaluList isSendSeqHeader is false")}_preDoDecode(e,t,i,s,r){this.player.updateStats({vbps:e.byteLength,dts:i}),s&&this.calcIframeIntervalTimestamp(i),this._doDecode(e,Ge,i,s,r)}getInputByteLength(){let e=0;return this.lastBuf&&(e=this.lastBuf.byteLength),e}}class Kd extends Ud{constructor(e){super(e),this.player=e,e.debug.log("EmptyDemux","init")}destroy(){super.destroy(),this.player.debug.log("EmptyDemux","destroy")}}var Yd=Nr((function(e,t){var s,r,a,o=(s=new Date,r=4,a={setLogLevel:function(e){r=e==this.debug?1:e==this.info?2:e==this.warn?3:(this.error,4)},debug:function(e,t){void 0===console.debug&&(console.debug=console.log),1>=r&&console.debug("["+o.getDurationString(new Date-s,1e3)+"]","["+e+"]",t)},log:function(e,t){this.debug(e.msg)},info:function(e,t){2>=r&&console.info("["+o.getDurationString(new Date-s,1e3)+"]","["+e+"]",t)},warn:function(e,t){3>=r&&console.warn("["+o.getDurationString(new Date-s,1e3)+"]","["+e+"]",t)},error:function(e,t){4>=r&&console.error("["+o.getDurationString(new Date-s,1e3)+"]","["+e+"]",t)}},a);o.getDurationString=function(e,t){var i;function s(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 r=e/(t||1),a=Math.floor(r/3600);r-=3600*a;var o=Math.floor(r/60),n=1e3*(r-=60*o);return n-=1e3*(r=Math.floor(r)),n=Math.floor(n),(i?"-":"")+a+":"+s(o,2)+":"+s(r,2)+"."+s(n,3)},o.printRanges=function(e){var t=e.length;if(t>0){for(var i="",s=0;s<t;s++)s>0&&(i+=","),i+="["+o.getDurationString(e.start(s))+","+o.getDurationString(e.end(s))+"]";return i}return"(empty)"},t.Log=o;var n=function(e){if(!(e instanceof ArrayBuffer))throw"Needs an array buffer";this.buffer=e,this.dataview=new DataView(e),this.position=0};n.prototype.getPosition=function(){return this.position},n.prototype.getEndPosition=function(){return this.buffer.byteLength},n.prototype.getLength=function(){return this.buffer.byteLength},n.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},n.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()},n.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+1)<<8,i|=this.dataview.getUint8(this.position+2);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+4);break;default:throw"readInt method not implemented for size: "+e}return this.position+=e,i}throw"Not enough bytes in buffer"},n.prototype.readUint8=function(){return this.readAnyInt(1,!1)},n.prototype.readUint16=function(){return this.readAnyInt(2,!1)},n.prototype.readUint24=function(){return this.readAnyInt(3,!1)},n.prototype.readUint32=function(){return this.readAnyInt(4,!1)},n.prototype.readUint64=function(){return this.readAnyInt(8,!1)},n.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"},n.prototype.readCString=function(){for(var e=[];;){var t=this.readUint8();if(0===t)break;e.push(t)}return String.fromCharCode.apply(null,e)},n.prototype.readInt8=function(){return this.readAnyInt(1,!0)},n.prototype.readInt16=function(){return this.readAnyInt(2,!0)},n.prototype.readInt32=function(){return this.readAnyInt(4,!0)},n.prototype.readInt64=function(){return this.readAnyInt(8,!1)},n.prototype.readUint8Array=function(e){for(var t=new Uint8Array(e),i=0;i<e;i++)t[i]=this.readUint8();return t},n.prototype.readInt16Array=function(e){for(var t=new Int16Array(e),i=0;i<e;i++)t[i]=this.readInt16();return t},n.prototype.readUint16Array=function(e){for(var t=new Int16Array(e),i=0;i<e;i++)t[i]=this.readUint16();return t},n.prototype.readUint32Array=function(e){for(var t=new Uint32Array(e),i=0;i<e;i++)t[i]=this.readUint32();return t},n.prototype.readInt32Array=function(e){for(var t=new Int32Array(e),i=0;i<e;i++)t[i]=this.readInt32();return t},t.MP4BoxStream=n;var l=function(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?l.LITTLE_ENDIAN:i};l.prototype={},l.prototype.getPosition=function(){return this.position},l.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 s=new ArrayBuffer(i),r=new Uint8Array(this._buffer);new Uint8Array(s,0,r.length).set(r),this.buffer=s,this._byteLength=t}}},l.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}},l.BIG_ENDIAN=!1,l.LITTLE_ENDIAN=!0,l.prototype._byteLength=0,Object.defineProperty(l.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(l.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(e){this._buffer=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(e){this._byteOffset=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"dataView",{get:function(){return this._dataView},set:function(e){this._byteOffset=e.byteOffset,this._buffer=e.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+e.byteLength}}),l.prototype.seek=function(e){var t=Math.max(0,Math.min(this.byteLength,e));this.position=isNaN(t)||!isFinite(t)?0:t},l.prototype.isEof=function(){return this.position>=this._byteLength},l.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},l.prototype.readInt32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Int32Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readInt16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var i=new Int16Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readInt8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Int8Array(e);return l.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},l.prototype.readUint32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Uint32Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readUint16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var i=new Uint16Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readUint8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Uint8Array(e);return l.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},l.prototype.readFloat64Array=function(e,t){e=null==e?this.byteLength-this.position/8:e;var i=new Float64Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readFloat32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Float32Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readInt32=function(e){var t=this._dataView.getInt32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readInt16=function(e){var t=this._dataView.getInt16(this.position,null==e?this.endianness:e);return this.position+=2,t},l.prototype.readInt8=function(){var e=this._dataView.getInt8(this.position);return this.position+=1,e},l.prototype.readUint32=function(e){var t=this._dataView.getUint32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readUint16=function(e){var t=this._dataView.getUint16(this.position,null==e?this.endianness:e);return this.position+=2,t},l.prototype.readUint8=function(){var e=this._dataView.getUint8(this.position);return this.position+=1,e},l.prototype.readFloat32=function(e){var t=this._dataView.getFloat32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readFloat64=function(e){var t=this._dataView.getFloat64(this.position,null==e?this.endianness:e);return this.position+=8,t},l.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,l.memcpy=function(e,t,i,s,r){var a=new Uint8Array(e,t,r),o=new Uint8Array(i,s,r);a.set(o)},l.arrayToNative=function(e,t){return t==this.endianness?e:this.flipArrayEndianness(e)},l.nativeToEndian=function(e,t){return this.endianness==t?e:this.flipArrayEndianness(e)},l.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 s=i+e.BYTES_PER_ELEMENT-1,r=i;s>r;s--,r++){var a=t[r];t[r]=t[s],t[s]=a}return e},l.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)},l.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))},l.prototype.readCString=function(e){var t=this.byteLength-this.position,i=new Uint8Array(this._buffer,this._byteOffset+this.position),s=t;null!=e&&(s=Math.min(e,t));for(var r=0;r<s&&0!==i[r];r++);var a=String.fromCharCodeUint8.apply(null,[this.mapUint8Array(r)]);return null!=e?this.position+=s-r:r!=t&&(this.position+=1),a};var d=Math.pow(2,32);l.prototype.readInt64=function(){return this.readInt32()*d+this.readUint32()},l.prototype.readUint64=function(){return this.readUint32()*d+this.readUint32()},l.prototype.readInt64=function(){return this.readUint32()*d+this.readUint32()},l.prototype.readUint24=function(){return(this.readUint8()<<16)+(this.readUint8()<<8)+this.readUint8()},t.DataStream=l,l.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),s=document.createElement("a");document.body.appendChild(s),s.setAttribute("href",i),s.setAttribute("download",e),s.setAttribute("target","_self"),s.click(),window.URL.revokeObjectURL(i)},l.prototype._dynamicSize=!0,Object.defineProperty(l.prototype,"dynamicSize",{get:function(){return this._dynamicSize},set:function(e){e||this._trimAlloc(),this._dynamicSize=e}}),l.prototype.shift=function(e){var t=new ArrayBuffer(this._byteLength-e),i=new Uint8Array(t),s=new Uint8Array(this._buffer,e,i.length);i.set(s),this.buffer=t,this.position-=e},l.prototype.writeInt32Array=function(e,t){if(this._realloc(4*e.length),e instanceof Int32Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.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)},l.prototype.writeInt16Array=function(e,t){if(this._realloc(2*e.length),e instanceof Int16Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.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)},l.prototype.writeInt8Array=function(e){if(this._realloc(1*e.length),e instanceof Int8Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.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])},l.prototype.writeUint32Array=function(e,t){if(this._realloc(4*e.length),e instanceof Uint32Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.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)},l.prototype.writeUint16Array=function(e,t){if(this._realloc(2*e.length),e instanceof Uint16Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.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)},l.prototype.writeUint8Array=function(e){if(this._realloc(1*e.length),e instanceof Uint8Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.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])},l.prototype.writeFloat64Array=function(e,t){if(this._realloc(8*e.length),e instanceof Float64Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.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)},l.prototype.writeFloat32Array=function(e,t){if(this._realloc(4*e.length),e instanceof Float32Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.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)},l.prototype.writeInt32=function(e,t){this._realloc(4),this._dataView.setInt32(this.position,e,null==t?this.endianness:t),this.position+=4},l.prototype.writeInt16=function(e,t){this._realloc(2),this._dataView.setInt16(this.position,e,null==t?this.endianness:t),this.position+=2},l.prototype.writeInt8=function(e){this._realloc(1),this._dataView.setInt8(this.position,e),this.position+=1},l.prototype.writeUint32=function(e,t){this._realloc(4),this._dataView.setUint32(this.position,e,null==t?this.endianness:t),this.position+=4},l.prototype.writeUint16=function(e,t){this._realloc(2),this._dataView.setUint16(this.position,e,null==t?this.endianness:t),this.position+=2},l.prototype.writeUint8=function(e){this._realloc(1),this._dataView.setUint8(this.position,e),this.position+=1},l.prototype.writeFloat32=function(e,t){this._realloc(4),this._dataView.setFloat32(this.position,e,null==t?this.endianness:t),this.position+=4},l.prototype.writeFloat64=function(e,t){this._realloc(8),this._dataView.setFloat64(this.position,e,null==t?this.endianness:t),this.position+=8},l.prototype.writeUCS2String=function(e,t,i){null==i&&(i=e.length);for(var s=0;s<e.length&&s<i;s++)this.writeUint16(e.charCodeAt(s),t);for(;s<i;s++)this.writeUint16(0)},l.prototype.writeString=function(e,t,i){var s=0;if(null==t||"ASCII"==t)if(null!=i){var r=Math.min(e.length,i);for(s=0;s<r;s++)this.writeUint8(e.charCodeAt(s));for(;s<i;s++)this.writeUint8(0)}else for(s=0;s<e.length;s++)this.writeUint8(e.charCodeAt(s));else this.writeUint8Array(new TextEncoder(t).encode(e.substring(0,i)))},l.prototype.writeCString=function(e,t){var i=0;if(null!=t){var s=Math.min(e.length,t);for(i=0;i<s;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)}},l.prototype.writeStruct=function(e,t){for(var i=0;i<e.length;i+=2){var s=e[i+1];this.writeType(s,t[e[i]],t)}},l.prototype.writeType=function(e,t,i){var s;if("function"==typeof e)return e(this,t);if("object"==typeof e&&!(e instanceof Array))return e.set(this,t,i);var r=null,a="ASCII",o=this.position;switch("string"==typeof e&&/:/.test(e)&&(s=e.split(":"),e=s[0],r=parseInt(s[1])),"string"==typeof e&&/,/.test(e)&&(s=e.split(","),e=s[0],a=parseInt(s[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,l.BIG_ENDIAN);break;case"int16be":this.writeInt16(t,l.BIG_ENDIAN);break;case"uint32be":this.writeUint32(t,l.BIG_ENDIAN);break;case"int32be":this.writeInt32(t,l.BIG_ENDIAN);break;case"float32be":this.writeFloat32(t,l.BIG_ENDIAN);break;case"float64be":this.writeFloat64(t,l.BIG_ENDIAN);break;case"uint16le":this.writeUint16(t,l.LITTLE_ENDIAN);break;case"int16le":this.writeInt16(t,l.LITTLE_ENDIAN);break;case"uint32le":this.writeUint32(t,l.LITTLE_ENDIAN);break;case"int32le":this.writeInt32(t,l.LITTLE_ENDIAN);break;case"float32le":this.writeFloat32(t,l.LITTLE_ENDIAN);break;case"float64le":this.writeFloat64(t,l.LITTLE_ENDIAN);break;case"cstring":this.writeCString(t,r);break;case"string":this.writeString(t,a,r);break;case"u16string":this.writeUCS2String(t,this.endianness,r);break;case"u16stringle":this.writeUCS2String(t,l.LITTLE_ENDIAN,r);break;case"u16stringbe":this.writeUCS2String(t,l.BIG_ENDIAN,r);break;default:if(3==e.length){for(var n=e[1],d=0;d<t.length;d++)this.writeType(n,t[d]);break}this.writeStruct(e,t)}null!=r&&(this.position=o,this._realloc(r),this.position=o+r)},l.prototype.writeUint64=function(e){var t=Math.floor(e/d);this.writeUint32(t),this.writeUint32(4294967295&e)},l.prototype.writeUint24=function(e){this.writeUint8((16711680&e)>>16),this.writeUint8((65280&e)>>8),this.writeUint8(255&e)},l.prototype.adjustUint32=function(e,t){var i=this.position;this.seek(e),this.writeUint32(t),this.seek(i)},l.prototype.mapInt32Array=function(e,t){this._realloc(4*e);var i=new Int32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i},l.prototype.mapInt16Array=function(e,t){this._realloc(2*e);var i=new Int16Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=2*e,i},l.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},l.prototype.mapUint32Array=function(e,t){this._realloc(4*e);var i=new Uint32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i},l.prototype.mapUint16Array=function(e,t){this._realloc(2*e);var i=new Uint16Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=2*e,i},l.prototype.mapFloat64Array=function(e,t){this._realloc(8*e);var i=new Float64Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=8*e,i},l.prototype.mapFloat32Array=function(e,t){this._realloc(4*e);var i=new Float32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i};var h=function(e){this.buffers=[],this.bufferIndex=-1,e&&(this.insertBuffer(e),this.bufferIndex=0)};(h.prototype=new l(new ArrayBuffer,0,l.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,o.debug("MultiBufferStream","Stream ready for parsing"),!0):(o.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(o.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1))},ArrayBuffer.concat=function(e,t){o.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},h.prototype.reduceBuffer=function(e,t,i){var s;return(s=new Uint8Array(i)).set(new Uint8Array(e,t,i)),s.buffer.fileStart=e.fileStart+t,s.buffer.usedBytes=0,s.buffer},h.prototype.insertBuffer=function(e){for(var t=!0,i=0;i<this.buffers.length;i++){var s=this.buffers[i];if(e.fileStart<=s.fileStart){if(e.fileStart===s.fileStart){if(e.byteLength>s.byteLength){this.buffers.splice(i,1),i--;continue}o.warn("MultiBufferStream","Buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+") already appended, ignoring")}else e.fileStart+e.byteLength<=s.fileStart||(e=this.reduceBuffer(e,0,s.fileStart-e.fileStart)),o.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<s.fileStart+s.byteLength){var r=s.fileStart+s.byteLength-e.fileStart,a=e.byteLength-r;if(!(a>0)){t=!1;break}e=this.reduceBuffer(e,r,a)}}t&&(o.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.push(e),0===i&&(this.buffer=e))},h.prototype.logBufferLevel=function(e){var t,i,s,r,a,n=[],l="";for(s=0,r=0,t=0;t<this.buffers.length;t++)i=this.buffers[t],0===t?(a={},n.push(a),a.start=i.fileStart,a.end=i.fileStart+i.byteLength,l+="["+a.start+"-"):a.end===i.fileStart?a.end=i.fileStart+i.byteLength:((a={}).start=i.fileStart,l+=n[n.length-1].end-1+"], ["+a.start+"-",a.end=i.fileStart+i.byteLength,n.push(a)),s+=i.usedBytes,r+=i.byteLength;n.length>0&&(l+=a.end-1+"]");var d=e?o.info:o.debug;0===this.buffers.length?d("MultiBufferStream","No more buffer in memory"):d("MultiBufferStream",this.buffers.length+" stored buffer(s) ("+s+"/"+r+" bytes), continuous ranges: "+l)},h.prototype.cleanBuffers=function(){var e,t;for(e=0;e<this.buffers.length;e++)(t=this.buffers[e]).usedBytes===t.byteLength&&(o.debug("MultiBufferStream","Removing buffer #"+e),this.buffers.splice(e,1),e--)},h.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,s=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=s,o.debug("ISOFile","Concatenating buffer for box parsing (length: "+t+"->"+this.buffer.byteLength+")"),!0}return!1}return!1},h.prototype.findPosition=function(e,t,i){var s,r=null,a=-1;for(s=!0===e?0:this.bufferIndex;s<this.buffers.length&&(r=this.buffers[s]).fileStart<=t;)a=s,i&&(r.fileStart+r.byteLength<=t?r.usedBytes=r.byteLength:r.usedBytes=t-r.fileStart,this.logBufferLevel()),s++;return-1!==a&&(r=this.buffers[a]).fileStart+r.byteLength>=t?(o.debug("MultiBufferStream","Found position in existing buffer #"+a),a):-1},h.prototype.findEndContiguousBuf=function(e){var t,i,s,r=void 0!==e?e:this.bufferIndex;if(i=this.buffers[r],this.buffers.length>r+1)for(t=r+1;t<this.buffers.length&&(s=this.buffers[t]).fileStart===i.fileStart+i.byteLength;t++)i=s;return i.fileStart+i.byteLength},h.prototype.getEndFilePositionAfter=function(e){var t=this.findPosition(!0,e,!1);return-1!==t?this.findEndContiguousBuf(t):e},h.prototype.addUsedBytes=function(e){this.buffer.usedBytes+=e,this.logBufferLevel()},h.prototype.setAllUsedBytes=function(){this.buffer.usedBytes=this.buffer.byteLength,this.logBufferLevel()},h.prototype.seek=function(e,t,i){var s;return-1!==(s=this.findPosition(t,e,i))?(this.buffer=this.buffers[s],this.bufferIndex=s,this.position=e-this.buffer.fileStart,o.debug("MultiBufferStream","Repositioning parser at buffer position: "+this.position),!0):(o.debug("MultiBufferStream","Position "+e+" not found in buffered data"),!1)},h.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},h.prototype.getLength=function(){return this.byteLength},h.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},h.prototype.destroy=function(){this.buffers=[],this.bufferIndex},t.MultiBufferStream=h;var c=function(){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 s,r,a,n=0;for(s=t.readUint8(),a=t.readUint8();128&a;)n=(127&a)<<7,a=t.readUint8();return n+=127&a,o.debug("MPEG4DescriptorParser","Found "+(e[s]||"Descriptor "+s)+", size "+n+" at position "+t.getPosition()),(r=e[s]?new i[e[s]](n):new i.Descriptor(n)).parse(t),r},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 s=t.parseOneDescriptor(e);this.descs.push(s)}},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 s=(248&i.data[0])>>3;return 31===s&&i.data.length>=2&&(s=32+((7&i.data[0])<<3)+((224&i.data[1])>>5)),s}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.upStream=0!=(this.streamType>>1&1),this.streamType=this.streamType>>>2,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};t.MPEG4DescriptorParser=c;var u={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"],["grpl"],["j2kH"],["etyp",["tyco"]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){u.FullBox.prototype=new u.Box,u.ContainerBox.prototype=new u.Box,u.SampleEntry.prototype=new u.Box,u.TrackGroupTypeBox.prototype=new u.FullBox,u.BASIC_BOXES.forEach((function(e){u.createBoxCtor(e)})),u.FULL_BOXES.forEach((function(e){u.createFullBoxCtor(e)})),u.CONTAINER_BOXES.forEach((function(e){u.createContainerBoxCtor(e[0],null,e[1])}))},Box:function(e,t,i){this.type=e,this.size=t,this.uuid=i},FullBox:function(e,t,i){u.Box.call(this,e,t,i),this.flags=0,this.version=0},ContainerBox:function(e,t,i){u.Box.call(this,e,t,i),this.boxes=[]},SampleEntry:function(e,t,i,s){u.ContainerBox.call(this,e,t),this.hdr_size=i,this.start=s},SampleGroupEntry:function(e){this.grouping_type=e},TrackGroupTypeBox:function(e,t){u.FullBox.call(this,e,t)},createBoxCtor:function(e,t){u.boxCodes.push(e),u[e+"Box"]=function(t){u.Box.call(this,e,t)},u[e+"Box"].prototype=new u.Box,t&&(u[e+"Box"].prototype.parse=t)},createFullBoxCtor:function(e,t){u[e+"Box"]=function(t){u.FullBox.call(this,e,t)},u[e+"Box"].prototype=new u.FullBox,u[e+"Box"].prototype.parse=function(e){this.parseFullHeader(e),t&&t.call(this,e)}},addSubBoxArrays:function(e){if(e){this.subBoxNames=e;for(var t=e.length,i=0;i<t;i++)this[e[i]+"s"]=[]}},createContainerBoxCtor:function(e,t,i){u[e+"Box"]=function(t){u.ContainerBox.call(this,e,t),u.addSubBoxArrays.call(this,i)},u[e+"Box"].prototype=new u.ContainerBox,t&&(u[e+"Box"].prototype.parse=t)},createMediaSampleEntryCtor:function(e,t,i){u.sampleEntryCodes[e]=[],u[e+"SampleEntry"]=function(e,t){u.SampleEntry.call(this,e,t),u.addSubBoxArrays.call(this,i)},u[e+"SampleEntry"].prototype=new u.SampleEntry,t&&(u[e+"SampleEntry"].prototype.parse=t)},createSampleEntryCtor:function(e,t,i,s){u.sampleEntryCodes[e].push(t),u[t+"SampleEntry"]=function(i){u[e+"SampleEntry"].call(this,t,i),u.addSubBoxArrays.call(this,s)},u[t+"SampleEntry"].prototype=new u[e+"SampleEntry"],i&&(u[t+"SampleEntry"].prototype.parse=i)},createEncryptedSampleEntryCtor:function(e,t,i){u.createSampleEntryCtor.call(this,e,t,i,["sinf"])},createSampleGroupCtor:function(e,t){u[e+"SampleGroupEntry"]=function(t){u.SampleGroupEntry.call(this,e,t)},u[e+"SampleGroupEntry"].prototype=new u.SampleGroupEntry,t&&(u[e+"SampleGroupEntry"].prototype.parse=t)},createTrackGroupCtor:function(e,t){u[e+"TrackGroupTypeBox"]=function(t){u.TrackGroupTypeBox.call(this,e,t)},u[e+"TrackGroupTypeBox"].prototype=new u.TrackGroupTypeBox,t&&(u[e+"TrackGroupTypeBox"].prototype.parse=t)},createUUIDBox:function(e,t,i,s){u.UUIDs.push(e),u.UUIDBoxes[e]=function(s){t?u.FullBox.call(this,"uuid",s,e):i?u.ContainerBox.call(this,"uuid",s,e):u.Box.call(this,"uuid",s,e)},u.UUIDBoxes[e].prototype=t?new u.FullBox:i?new u.ContainerBox:new u.Box,s&&(u.UUIDBoxes[e].prototype.parse=t?function(e){this.parseFullHeader(e),s&&s.call(this,e)}:s)}};function p(e,t){this.x=e,this.y=t}function f(e,t){this.bad_pixel_row=e,this.bad_pixel_column=t}u.initialize(),u.TKHD_FLAG_ENABLED=1,u.TKHD_FLAG_IN_MOVIE=2,u.TKHD_FLAG_IN_PREVIEW=4,u.TFHD_FLAG_BASE_DATA_OFFSET=1,u.TFHD_FLAG_SAMPLE_DESC=2,u.TFHD_FLAG_SAMPLE_DUR=8,u.TFHD_FLAG_SAMPLE_SIZE=16,u.TFHD_FLAG_SAMPLE_FLAGS=32,u.TFHD_FLAG_DUR_EMPTY=65536,u.TFHD_FLAG_DEFAULT_BASE_IS_MOOF=131072,u.TRUN_FLAGS_DATA_OFFSET=1,u.TRUN_FLAGS_FIRST_FLAG=4,u.TRUN_FLAGS_DURATION=256,u.TRUN_FLAGS_SIZE=512,u.TRUN_FLAGS_FLAGS=1024,u.TRUN_FLAGS_CTS_OFFSET=2048,u.Box.prototype.add=function(e){return this.addBox(new u[e+"Box"])},u.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},u.Box.prototype.set=function(e,t){return this[e]=t,this},u.Box.prototype.addEntry=function(e,t){var i=t||"entries";return this[i]||(this[i]=[]),this[i].push(e),this},t.BoxParser=u,u.parseUUID=function(e){return u.parseHex16(e)},u.parseHex16=function(e){for(var t="",i=0;i<16;i++){var s=e.readUint8().toString(16);t+=1===s.length?"0"+s:s}return t},u.parseOneBox=function(e,t,i){var s,r,a,n=e.getPosition(),l=0;if(e.getEndPosition()-n<8)return o.debug("BoxParser","Not enough data in stream to parse the type and size of the box"),{code:u.ERR_NOT_ENOUGH_DATA};if(i&&i<8)return o.debug("BoxParser","Not enough bytes left in the parent box to parse a new box"),{code:u.ERR_NOT_ENOUGH_DATA};var d=e.readUint32(),h=e.readString(4),c=h;if(o.debug("BoxParser","Found box of type '"+h+"' and size "+d+" at position "+n),l=8,"uuid"==h){if(e.getEndPosition()-e.getPosition()<16||i-l<16)return e.seek(n),o.debug("BoxParser","Not enough bytes left in the parent box to parse a UUID box"),{code:u.ERR_NOT_ENOUGH_DATA};l+=16,c=a=u.parseUUID(e)}if(1==d){if(e.getEndPosition()-e.getPosition()<8||i&&i-l<8)return e.seek(n),o.warn("BoxParser",'Not enough data in stream to parse the extended size of the "'+h+'" box'),{code:u.ERR_NOT_ENOUGH_DATA};d=e.readUint64(),l+=8}else if(0===d)if(i)d=i;else if("mdat"!==h)return o.error("BoxParser","Unlimited box size not supported for type: '"+h+"'"),s=new u.Box(h,d),{code:u.OK,box:s,size:s.size};return 0!==d&&d<l?(o.error("BoxParser","Box of type "+h+" has an invalid size "+d+" (too small to be a box)"),{code:u.ERR_NOT_ENOUGH_DATA,type:h,size:d,hdr_size:l,start:n}):0!==d&&i&&d>i?(o.error("BoxParser","Box of type '"+h+"' has a size "+d+" greater than its container size "+i),{code:u.ERR_NOT_ENOUGH_DATA,type:h,size:d,hdr_size:l,start:n}):0!==d&&n+d>e.getEndPosition()?(e.seek(n),o.info("BoxParser","Not enough data in stream to parse the entire '"+h+"' box"),{code:u.ERR_NOT_ENOUGH_DATA,type:h,size:d,hdr_size:l,start:n}):t?{code:u.OK,type:h,size:d,hdr_size:l,start:n}:(u[h+"Box"]?s=new u[h+"Box"](d):"uuid"!==h?(o.warn("BoxParser","Unknown box type: '"+h+"'"),(s=new u.Box(h,d)).has_unparsed_data=!0):u.UUIDBoxes[a]?s=new u.UUIDBoxes[a](d):(o.warn("BoxParser","Unknown uuid type: '"+a+"'"),(s=new u.Box(h,d)).uuid=a,s.has_unparsed_data=!0),s.hdr_size=l,s.start=n,s.write===u.Box.prototype.write&&"mdat"!==s.type&&(o.info("BoxParser","'"+c+"' box writing not yet implemented, keeping unparsed data in memory for later write"),s.parseDataAndRewind(e)),s.parse(e),(r=e.getPosition()-(s.start+s.size))<0?(o.warn("BoxParser","Parsing of box '"+c+"' did not read the entire indicated box data size (missing "+-r+" bytes), seeking forward"),e.seek(s.start+s.size)):r>0&&(o.error("BoxParser","Parsing of box '"+c+"' read "+r+" more bytes than the indicated box data size, seeking backwards"),0!==s.size&&e.seek(s.start+s.size)),{code:u.OK,box:s,size:s.size})},u.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)},u.Box.prototype.parseDataAndRewind=function(e){this.data=e.readUint8Array(this.size-this.hdr_size),e.position-=this.size-this.hdr_size},u.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},u.FullBox.prototype.parseFullHeader=function(e){this.version=e.readUint8(),this.flags=e.readUint24(),this.hdr_size+=4},u.FullBox.prototype.parse=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},u.ContainerBox.prototype.parse=function(e){for(var t,i;e.getPosition()<this.start+this.size;){if((t=u.parseOneBox(e,!1,this.size-(e.getPosition()-this.start))).code!==u.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 s="uuid"!==i.type?i.type:i.uuid;this[s]?o.warn("Box of type "+s+" already stored in field of this type"):this[s]=i}}},u.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)},u.SAMPLE_ENTRY_TYPE_VISUAL="Visual",u.SAMPLE_ENTRY_TYPE_AUDIO="Audio",u.SAMPLE_ENTRY_TYPE_HINT="Hint",u.SAMPLE_ENTRY_TYPE_METADATA="Metadata",u.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",u.SAMPLE_ENTRY_TYPE_SYSTEM="System",u.SAMPLE_ENTRY_TYPE_TEXT="Text",u.SampleEntry.prototype.parseHeader=function(e){e.readUint8Array(6),this.data_reference_index=e.readUint16(),this.hdr_size+=8},u.SampleEntry.prototype.parse=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},u.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},u.SampleEntry.prototype.parseFooter=function(e){u.ContainerBox.prototype.parse.call(this,e)},u.createMediaSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_HINT),u.createMediaSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_METADATA),u.createMediaSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_SUBTITLE),u.createMediaSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_SYSTEM),u.createMediaSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_TEXT),u.createMediaSampleEntryCtor(u.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)})),u.createMediaSampleEntryCtor(u.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)})),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"dav1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"hvt1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"lhe1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"dvh1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"dvhe"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"vvc1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"vvi1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"vvs1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"vvcN"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"vp08"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"vp09"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"avs3"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"j2ki"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"mjp2"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"mjpg"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"uncv"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"ac-4"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"Opus"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"mha1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"mha2"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"mhm1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"mhm2"),u.createEncryptedSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),u.createEncryptedSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),u.createEncryptedSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),u.createEncryptedSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),u.createEncryptedSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_TEXT,"enct"),u.createEncryptedSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_METADATA,"encm"),u.createBoxCtor("a1lx",(function(e){var t=16*(1+(1&(1&e.readUint8())));this.layer_size=[];for(var i=0;i<3;i++)this.layer_size[i]=16==t?e.readUint16():e.readUint32()})),u.createBoxCtor("a1op",(function(e){this.op_index=e.readUint8()})),u.createFullBoxCtor("auxC",(function(e){this.aux_type=e.readCString();var t=this.size-this.hdr_size-(this.aux_type.length+1);this.aux_subtype=e.readUint8Array(t)})),u.createBoxCtor("av1C",(function(e){var t=e.readUint8();if(t>>7&!1)o.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 o.error("av1C reserved_2 parsing problem");var i=this.size-this.hdr_size-4;this.configOBUs=e.readUint8Array(i)}else o.error("av1C reserved_1 parsing problem");else o.error("av1C version "+this.version+" not supported")})),u.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))})),u.createBoxCtor("btrt",(function(e){this.bufferSizeDB=e.readUint32(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32()})),u.createFullBoxCtor("ccst",(function(e){var t=e.readUint8();this.all_ref_pics_intra=128==(128&t),this.intra_pred_used=64==(64&t),this.max_ref_per_pic=(63&t)>>2,e.readUint24()})),u.createBoxCtor("cdef",(function(e){var t;for(this.channel_count=e.readUint16(),this.channel_indexes=[],this.channel_types=[],this.channel_associations=[],t=0;t<this.channel_count;t++)this.channel_indexes.push(e.readUint16()),this.channel_types.push(e.readUint16()),this.channel_associations.push(e.readUint16())})),u.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()})),u.createBoxCtor("clli",(function(e){this.max_content_light_level=e.readUint16(),this.max_pic_average_light_level=e.readUint16()})),u.createFullBoxCtor("cmex",(function(e){1&this.flags&&(this.pos_x=e.readInt32()),2&this.flags&&(this.pos_y=e.readInt32()),4&this.flags&&(this.pos_z=e.readInt32()),8&this.flags&&(0==this.version?16&this.flags?(this.quat_x=e.readInt32(),this.quat_y=e.readInt32(),this.quat_z=e.readInt32()):(this.quat_x=e.readInt16(),this.quat_y=e.readInt16(),this.quat_z=e.readInt16()):this.version),32&this.flags&&(this.id=e.readUint32())})),u.createFullBoxCtor("cmin",(function(e){this.focal_length_x=e.readInt32(),this.principal_point_x=e.readInt32(),this.principal_point_y=e.readInt32(),1&this.flags&&(this.focal_length_y=e.readInt32(),this.skew_factor=e.readInt32())})),u.createBoxCtor("cmpd",(function(e){for(this.component_count=e.readUint32(),this.component_types=[],this.component_type_urls=[],i=0;i<this.component_count;i++){var t=e.readUint16();this.component_types.push(t),t>=32768&&this.component_type_urls.push(e.readCString())}})),u.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())})),u.createFullBoxCtor("CoLL",(function(e){this.maxCLL=e.readUint16(),this.maxFALL=e.readUint16()})),u.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))})),u.createFullBoxCtor("cprt",(function(e){this.parseLanguage(e),this.notice=e.readCString()})),u.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())})),u.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 s=e.readInt32();s<0&&o.warn("BoxParser","ctts box uses negative values without using version 1"),this.sample_offsets.push(s)}else if(1==this.version)for(i=0;i<t;i++)this.sample_counts.push(e.readUint32()),this.sample_offsets.push(e.readInt32())})),u.createBoxCtor("dac3",(function(e){var t=e.readUint8(),i=e.readUint8(),s=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|s>>5&7})),u.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 s={};this.ind_subs.push(s);var r=e.readUint8(),a=e.readUint8(),o=e.readUint8();s.fscod=r>>6,s.bsid=r>>1&31,s.bsmod=(1&r)<<4|a>>4&15,s.acmod=a>>1&7,s.lfeon=1&a,s.num_dep_sub=o>>1&15,s.num_dep_sub>0&&(s.chan_loc=(1&o)<<8|e.readUint8())}})),u.createFullBoxCtor("dfLa",(function(e){var t=[],i=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];for(this.parseFullHeader(e);;){var s=e.readUint8(),r=Math.min(127&s,i.length-1);if(r?e.readUint8Array(e.readUint24()):(e.readUint8Array(13),this.samplerate=e.readUint32()>>12,e.readUint8Array(20)),t.push(i[r]),128&s)break}this.numMetadataBlocks=t.length+" ("+t.join(", ")+")"})),u.createBoxCtor("dimm",(function(e){this.bytessent=e.readUint64()})),u.createBoxCtor("dmax",(function(e){this.time=e.readUint32()})),u.createBoxCtor("dmed",(function(e){this.bytessent=e.readUint64()})),u.createBoxCtor("dOps",(function(e){if(this.Version=e.readUint8(),this.OutputChannelCount=e.readUint8(),this.PreSkip=e.readUint16(),this.InputSampleRate=e.readUint32(),this.OutputGain=e.readInt16(),this.ChannelMappingFamily=e.readUint8(),0!==this.ChannelMappingFamily){this.StreamCount=e.readUint8(),this.CoupledCount=e.readUint8(),this.ChannelMapping=[];for(var t=0;t<this.OutputChannelCount;t++)this.ChannelMapping[t]=e.readUint8()}})),u.createFullBoxCtor("dref",(function(e){var t,i;this.entries=[];for(var s=e.readUint32(),r=0;r<s;r++){if((t=u.parseOneBox(e,!1,this.size-(e.getPosition()-this.start))).code!==u.OK)return;i=t.box,this.entries.push(i)}})),u.createBoxCtor("drep",(function(e){this.bytessent=e.readUint64()})),u.createFullBoxCtor("elng",(function(e){this.extended_language=e.readString(this.size-this.hdr_size)})),u.createFullBoxCtor("elst",(function(e){this.entries=[];for(var t=e.readUint32(),i=0;i<t;i++){var s={};this.entries.push(s),1===this.version?(s.segment_duration=e.readUint64(),s.media_time=e.readInt64()):(s.segment_duration=e.readUint32(),s.media_time=e.readInt32()),s.media_rate_integer=e.readInt16(),s.media_rate_fraction=e.readInt16()}})),u.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)})),u.createEntityToGroupCtor=function(e,t){u[e+"Box"]=function(t){u.FullBox.call(this,e,t)},u[e+"Box"].prototype=new u.FullBox,u[e+"Box"].prototype.parse=function(e){if(this.parseFullHeader(e),t)t.call(this,e);else for(this.group_id=e.readUint32(),this.num_entities_in_group=e.readUint32(),this.entity_ids=[],i=0;i<this.num_entities_in_group;i++){var s=e.readUint32();this.entity_ids.push(s)}}},u.createEntityToGroupCtor("aebr"),u.createEntityToGroupCtor("afbr"),u.createEntityToGroupCtor("albc"),u.createEntityToGroupCtor("altr"),u.createEntityToGroupCtor("brst"),u.createEntityToGroupCtor("dobr"),u.createEntityToGroupCtor("eqiv"),u.createEntityToGroupCtor("favc"),u.createEntityToGroupCtor("fobr"),u.createEntityToGroupCtor("iaug"),u.createEntityToGroupCtor("pano"),u.createEntityToGroupCtor("slid"),u.createEntityToGroupCtor("ster"),u.createEntityToGroupCtor("tsyn"),u.createEntityToGroupCtor("wbbr"),u.createEntityToGroupCtor("prgr"),u.createFullBoxCtor("esds",(function(e){var t=e.readUint8Array(this.size-this.hdr_size),i=new c;this.esd=i.parseOneDescriptor(new l(t.buffer,0,l.BIG_ENDIAN))})),u.createBoxCtor("fiel",(function(e){this.fieldCount=e.readUint8(),this.fieldOrdering=e.readUint8()})),u.createBoxCtor("frma",(function(e){this.data_format=e.readString(4)})),u.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++})),u.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)))})),u.createBoxCtor("hvcC",(function(e){var t,i,s,r;this.configurationVersion=e.readUint8(),r=e.readUint8(),this.general_profile_space=r>>6,this.general_tier_flag=(32&r)>>5,this.general_profile_idc=31&r,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(),r=e.readUint8(),this.constantFrameRate=r>>6,this.numTemporalLayers=(13&r)>>3,this.temporalIdNested=(4&r)>>2,this.lengthSizeMinusOne=3&r,this.nalu_arrays=[];var a=e.readUint8();for(t=0;t<a;t++){var o=[];this.nalu_arrays.push(o),r=e.readUint8(),o.completeness=(128&r)>>7,o.nalu_type=63&r;var n=e.readUint16();for(i=0;i<n;i++){var l={};o.push(l),s=e.readUint16(),l.data=e.readUint8Array(s)}}})),u.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=u.parseOneBox(e,!1,this.size-(e.getPosition()-this.start))).code!==u.OK)return;"infe"!==t.box.type&&o.error("BoxParser","Expected 'infe' box, got "+t.box.type),this.item_infos[i]=t.box}})),u.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 s=0;s<i;s++){var r={};if(this.items.push(r),this.version<2)r.item_ID=e.readUint16();else{if(2!==this.version)throw"version of iloc box not supported";r.item_ID=e.readUint32()}switch(1===this.version||2===this.version?r.construction_method=15&e.readUint16():r.construction_method=0,r.data_reference_index=e.readUint16(),this.base_offset_size){case 0:r.base_offset=0;break;case 4:r.base_offset=e.readUint32();break;case 8:r.base_offset=e.readUint64();break;default:throw"Error reading base offset size"}var a=e.readUint16();r.extents=[];for(var o=0;o<a;o++){var n={};if(r.extents.push(n),1===this.version||2===this.version)switch(this.index_size){case 0:n.extent_index=0;break;case 4:n.extent_index=e.readUint32();break;case 8:n.extent_index=e.readUint64();break;default:throw"Error reading extent index"}switch(this.offset_size){case 0:n.extent_offset=0;break;case 4:n.extent_offset=e.readUint32();break;case 8:n.extent_offset=e.readUint64();break;default:throw"Error reading extent index"}switch(this.length_size){case 0:n.extent_length=0;break;case 4:n.extent_length=e.readUint32();break;case 8:n.extent_length=e.readUint64();break;default:throw"Error reading extent index"}}}})),u.createBoxCtor("imir",(function(e){var t=e.readUint8();this.reserved=t>>7,this.axis=1&t})),u.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),o.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()))})),u.createFullBoxCtor("ipma",(function(e){var t,i;for(entry_count=e.readUint32(),this.associations=[],t=0;t<entry_count;t++){var s={};this.associations.push(s),this.version<1?s.id=e.readUint16():s.id=e.readUint32();var r=e.readUint8();for(s.props=[],i=0;i<r;i++){var a=e.readUint8(),o={};s.props.push(o),o.essential=(128&a)>>7==1,1&this.flags?o.property_index=(127&a)<<8|e.readUint8():o.property_index=127&a}}})),u.createFullBoxCtor("iref",(function(e){var t,i;for(this.references=[];e.getPosition()<this.start+this.size;){if((t=u.parseOneBox(e,!0,this.size-(e.getPosition()-this.start))).code!==u.OK)return;(i=0===this.version?new u.SingleItemTypeReferenceBox(t.type,t.size,t.hdr_size,t.start):new u.SingleItemTypeReferenceBoxLarge(t.type,t.size,t.hdr_size,t.start)).write===u.Box.prototype.write&&"mdat"!==i.type&&(o.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)}})),u.createBoxCtor("irot",(function(e){this.angle=3&e.readUint8()})),u.createFullBoxCtor("ispe",(function(e){this.image_width=e.readUint32(),this.image_height=e.readUint32()})),u.createFullBoxCtor("kind",(function(e){this.schemeURI=e.readCString(),this.value=e.readCString()})),u.createFullBoxCtor("leva",(function(e){var t=e.readUint8();this.levels=[];for(var i=0;i<t;i++){var s={};this.levels[i]=s,s.track_ID=e.readUint32();var r=e.readUint8();switch(s.padding_flag=r>>7,s.assignment_type=127&r,s.assignment_type){case 0:s.grouping_type=e.readString(4);break;case 1:s.grouping_type=e.readString(4),s.grouping_type_parameter=e.readUint32();break;case 2:case 3:break;case 4:s.sub_track_id=e.readUint32();break;default:o.warn("BoxParser","Unknown leva assignement type")}}})),u.createBoxCtor("lsel",(function(e){this.layer_id=e.readUint16()})),u.createBoxCtor("maxr",(function(e){this.period=e.readUint32(),this.bytes=e.readUint32()})),p.prototype.toString=function(){return"("+this.x+","+this.y+")"},u.createBoxCtor("mdcv",(function(e){this.display_primaries=[],this.display_primaries[0]=new p(e.readUint16(),e.readUint16()),this.display_primaries[1]=new p(e.readUint16(),e.readUint16()),this.display_primaries[2]=new p(e.readUint16(),e.readUint16()),this.white_point=new p(e.readUint16(),e.readUint16()),this.max_display_mastering_luminance=e.readUint32(),this.min_display_mastering_luminance=e.readUint32()})),u.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()})),u.createFullBoxCtor("mehd",(function(e){1&this.flags&&(o.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()})),u.createFullBoxCtor("meta",(function(e){this.boxes=[],u.ContainerBox.prototype.parse.call(this,e)})),u.createFullBoxCtor("mfhd",(function(e){this.sequence_number=e.readUint32()})),u.createFullBoxCtor("mfro",(function(e){this._size=e.readUint32()})),u.createFullBoxCtor("mskC",(function(e){this.bits_per_pixel=e.readUint8()})),u.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()})),u.createBoxCtor("npck",(function(e){this.packetssent=e.readUint32()})),u.createBoxCtor("nump",(function(e){this.packetssent=e.readUint64()})),u.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()})),u.createBoxCtor("pasp",(function(e){this.hSpacing=e.readUint32(),this.vSpacing=e.readUint32()})),u.createBoxCtor("payl",(function(e){this.text=e.readString(this.size-this.hdr_size)})),u.createBoxCtor("payt",(function(e){this.payloadID=e.readUint32();var t=e.readUint8();this.rtpmap_string=e.readString(t)})),u.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()})),u.createFullBoxCtor("pitm",(function(e){0===this.version?this.item_id=e.readUint16():this.item_id=e.readUint32()})),u.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()})),u.createBoxCtor("pmax",(function(e){this.bytes=e.readUint32()})),u.createFullBoxCtor("prdi",(function(e){if(this.step_count=e.readUint16(),this.item_count=[],2&this.flags)for(var t=0;t<this.step_count;t++)this.item_count[t]=e.readUint16()})),u.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()})),u.createFullBoxCtor("pssh",(function(e){if(this.system_id=u.parseHex16(e),this.version>0){var t=e.readUint32();this.kid=[];for(var i=0;i<t;i++)this.kid[i]=u.parseHex16(e)}var s=e.readUint32();s>0&&(this.data=e.readUint8Array(s))})),u.createFullBoxCtor("clef",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),u.createFullBoxCtor("enof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),u.createFullBoxCtor("prof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),u.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),u.createBoxCtor("rtp ",(function(e){this.descriptionformat=e.readString(4),this.sdptext=e.readString(this.size-this.hdr_size-4)})),u.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()})),u.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()})),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_METADATA,"mett",(function(e){this.parseHeader(e),this.content_encoding=e.readCString(),this.mime_format=e.readCString(),this.parseFooter(e)})),u.createSampleEntryCtor(u.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)})),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_SUBTITLE,"sbtt",(function(e){this.parseHeader(e),this.content_encoding=e.readCString(),this.mime_format=e.readCString(),this.parseFooter(e)})),u.createSampleEntryCtor(u.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)})),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_SUBTITLE,"stxt",(function(e){this.parseHeader(e),this.content_encoding=e.readCString(),this.mime_format=e.readCString(),this.parseFooter(e)})),u.createSampleEntryCtor(u.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)})),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_METADATA,"wvtt",(function(e){this.parseHeader(e),this.parseFooter(e)})),u.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 s=this.description_length-4-4*i;for(this.num_output_samples=[],this.num_total_samples=[],t=0;t<s/4;t++)this.num_output_samples[t]=e.readUint16(),this.num_total_samples[t]=e.readUint16()})),u.createSampleGroupCtor("avll",(function(e){this.layerNumber=e.readUint8(),this.accurateStatisticsFlag=e.readUint8(),this.avgBitRate=e.readUint16(),this.avgFrameRate=e.readUint16()})),u.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(),s=0;s<i;s++){var r={};this.dependency.push(r),r.subSeqDirectionFlag=e.readUint8(),r.layerNumber=e.readUint8(),r.subSequenceIdentifier=e.readUint16()}})),u.createSampleGroupCtor("dtrt",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.createSampleGroupCtor("mvif",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.createSampleGroupCtor("prol",(function(e){this.roll_distance=e.readInt16()})),u.createSampleGroupCtor("rap ",(function(e){var t=e.readUint8();this.num_leading_samples_known=t>>7,this.num_leading_samples=127&t})),u.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)o.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()}})),u.createSampleGroupCtor("roll",(function(e){this.roll_distance=e.readInt16()})),u.SampleGroupEntry.prototype.parse=function(e){o.warn("BoxParser","Unknown Sample Group type: "+this.grouping_type),this.data=e.readUint8Array(this.description_length)},u.createSampleGroupCtor("scif",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.createSampleGroupCtor("scnm",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.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=u.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))})),u.createSampleGroupCtor("stsa",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.createSampleGroupCtor("sync",(function(e){var t=e.readUint8();this.NAL_unit_type=63&t})),u.createSampleGroupCtor("tele",(function(e){var t=e.readUint8();this.level_independently_decodable=t>>7})),u.createSampleGroupCtor("tsas",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.createSampleGroupCtor("tscl",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.createSampleGroupCtor("vipr",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.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 s={};this.entries.push(s),s.sample_count=e.readInt32(),s.group_description_index=e.readInt32()}})),f.prototype.toString=function(){return"[row: "+this.bad_pixel_row+", column: "+this.bad_pixel_column+"]"},u.createFullBoxCtor("sbpm",(function(e){var t;for(this.component_count=e.readUint16(),this.component_index=[],t=0;t<this.component_count;t++)this.component_index.push(e.readUint16());var i=e.readUint8();for(this.correction_applied=128==(128&i),this.num_bad_rows=e.readUint32(),this.num_bad_cols=e.readUint32(),this.num_bad_pixels=e.readUint32(),this.bad_rows=[],this.bad_columns=[],this.bad_pixels=[],t=0;t<this.num_bad_rows;t++)this.bad_rows.push(e.readUint32());for(t=0;t<this.num_bad_cols;t++)this.bad_columns.push(e.readUint32());for(t=0;t<this.num_bad_pixels;t++){var s=e.readUint32(),r=e.readUint32();this.bad_pixels.push(new f(s,r))}})),u.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))})),u.createBoxCtor("sdp ",(function(e){this.sdptext=e.readString(this.size-this.hdr_size)})),u.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 s=0;s<i;s++)t=e.readUint8(),this.is_leading[s]=t>>6,this.sample_depends_on[s]=t>>4&3,this.sample_is_depended_on[s]=t>>2&3,this.sample_has_redundancy[s]=3&t})),u.createFullBoxCtor("senc"),u.createFullBoxCtor("sgpd",(function(e){this.grouping_type=e.readString(4),o.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 s;s=u[this.grouping_type+"SampleGroupEntry"]?new u[this.grouping_type+"SampleGroupEntry"](this.grouping_type):new u.SampleGroupEntry(this.grouping_type),this.entries.push(s),1===this.version&&0===this.default_length?s.description_length=e.readUint32():s.description_length=this.default_length,s.write===u.SampleGroupEntry.prototype.write&&(o.info("BoxParser","SampleGroup for type "+this.grouping_type+" writing not yet implemented, keeping unparsed data in memory for later write"),s.data=e.readUint8Array(s.description_length),e.position-=s.description_length),s.parse(e)}})),u.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 s={};this.references.push(s);var r=e.readUint32();s.reference_type=r>>31&1,s.referenced_size=2147483647&r,s.subsegment_duration=e.readUint32(),r=e.readUint32(),s.starts_with_SAP=r>>31&1,s.SAP_type=r>>28&7,s.SAP_delta_time=268435455&r}})),u.SingleItemTypeReferenceBox=function(e,t,i,s){u.Box.call(this,e,t),this.hdr_size=i,this.start=s},u.SingleItemTypeReferenceBox.prototype=new u.Box,u.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]={},this.references[i].to_item_ID=e.readUint16()},u.SingleItemTypeReferenceBoxLarge=function(e,t,i,s){u.Box.call(this,e,t),this.hdr_size=i,this.start=s},u.SingleItemTypeReferenceBoxLarge.prototype=new u.Box,u.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]={},this.references[i].to_item_ID=e.readUint32()},u.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()})),u.createFullBoxCtor("smhd",(function(e){this.balance=e.readUint16(),e.readUint16()})),u.createFullBoxCtor("ssix",(function(e){this.subsegments=[];for(var t=e.readUint32(),i=0;i<t;i++){var s={};this.subsegments.push(s),s.ranges=[];for(var r=e.readUint32(),a=0;a<r;a++){var o={};s.ranges.push(o),o.level=e.readUint8(),o.range_size=e.readUint24()}}})),u.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())})),u.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()})),u.createFullBoxCtor("sthd"),u.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()})),u.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())})),u.createFullBoxCtor("stsd",(function(e){var t,i,s,r;for(this.entries=[],s=e.readUint32(),t=1;t<=s;t++){if((i=u.parseOneBox(e,!0,this.size-(e.getPosition()-this.start))).code!==u.OK)return;u[i.type+"SampleEntry"]?((r=new u[i.type+"SampleEntry"](i.size)).hdr_size=i.hdr_size,r.start=i.start):(o.warn("BoxParser","Unknown sample entry type: "+i.type),r=new u.SampleEntry(i.type,i.size,i.hdr_size,i.start)),r.write===u.SampleEntry.prototype.write&&(o.info("BoxParser","SampleEntry "+r.type+" box writing not yet implemented, keeping unparsed data in memory for later write"),r.parseDataAndRewind(e)),r.parse(e),this.entries.push(r)}})),u.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()})),u.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())})),u.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())})),u.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})),u.createFullBoxCtor("stts",(function(e){var t,i,s;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()),(s=e.readInt32())<0&&(o.warn("BoxParser","File uses negative stts sample delta, using value 1 instead, sync may be lost!"),s=1),this.sample_deltas.push(s)})),u.createFullBoxCtor("stvi",(function(e){var t=e.readUint32();this.single_view_allowed=3&t,this.stereo_scheme=e.readUint32();var i,s,r=e.readUint32();for(this.stereo_indication_type=e.readString(r),this.boxes=[];e.getPosition()<this.start+this.size;){if((i=u.parseOneBox(e,!1,this.size-(e.getPosition()-this.start))).code!==u.OK)return;s=i.box,this.boxes.push(s),this[s.type]=s}})),u.createBoxCtor("styp",(function(e){u.ftypBox.prototype.parse.call(this,e)})),u.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 s=e.readUint8();this.sample_sizes[t]=s>>4&15,this.sample_sizes[t+1]=15&s}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 o.error("BoxParser","Error in length field in stz2 box")})),u.createFullBoxCtor("subs",(function(e){var t,i,s,r;for(s=e.readUint32(),this.entries=[],t=0;t<s;t++){var a={};if(this.entries[t]=a,a.sample_delta=e.readUint32(),a.subsamples=[],(r=e.readUint16())>0)for(i=0;i<r;i++){var o={};a.subsamples.push(o),1==this.version?o.size=e.readUint32():o.size=e.readUint16(),o.priority=e.readUint8(),o.discardable=e.readUint8(),o.codec_specific_parameters=e.readUint32()}}})),u.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=u.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))})),u.createFullBoxCtor("tfdt",(function(e){1==this.version?this.baseMediaDecodeTime=e.readUint64():this.baseMediaDecodeTime=e.readUint32()})),u.createFullBoxCtor("tfhd",(function(e){var t=0;this.track_id=e.readUint32(),this.size-this.hdr_size>t&&this.flags&u.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&u.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&u.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&u.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&u.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=e.readUint32(),t+=4):this.default_sample_flags=0})),u.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(),s=0;s<i;s++)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)]()})),u.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()})),u.createBoxCtor("tmax",(function(e){this.time=e.readUint32()})),u.createBoxCtor("tmin",(function(e){this.time=e.readUint32()})),u.createBoxCtor("totl",(function(e){this.bytessent=e.readUint32()})),u.createBoxCtor("tpay",(function(e){this.bytessent=e.readUint32()})),u.createBoxCtor("tpyl",(function(e){this.bytessent=e.readUint64()})),u.TrackGroupTypeBox.prototype.parse=function(e){this.parseFullHeader(e),this.track_group_id=e.readUint32()},u.createTrackGroupCtor("msrc"),u.TrackReferenceTypeBox=function(e,t,i,s){u.Box.call(this,e,t),this.hdr_size=i,this.start=s},u.TrackReferenceTypeBox.prototype=new u.Box,u.TrackReferenceTypeBox.prototype.parse=function(e){this.track_ids=e.readUint32Array((this.size-this.hdr_size)/4)},u.trefBox.prototype.parse=function(e){for(var t,i;e.getPosition()<this.start+this.size;){if((t=u.parseOneBox(e,!0,this.size-(e.getPosition()-this.start))).code!==u.OK)return;(i=new u.TrackReferenceTypeBox(t.type,t.size,t.hdr_size,t.start)).write===u.Box.prototype.write&&"mdat"!==i.type&&(o.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)}},u.createFullBoxCtor("trep",(function(e){for(this.track_ID=e.readUint32(),this.boxes=[];e.getPosition()<this.start+this.size;){if(ret=u.parseOneBox(e,!1,this.size-(e.getPosition()-this.start)),ret.code!==u.OK)return;box=ret.box,this.boxes.push(box)}})),u.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()})),u.createBoxCtor("trpy",(function(e){this.bytessent=e.readUint64()})),u.createFullBoxCtor("trun",(function(e){var t=0;if(this.sample_count=e.readUint32(),t+=4,this.size-this.hdr_size>t&&this.flags&u.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=e.readInt32(),t+=4):this.data_offset=0,this.size-this.hdr_size>t&&this.flags&u.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&u.TRUN_FLAGS_DURATION&&(this.sample_duration[i]=e.readUint32()),this.flags&u.TRUN_FLAGS_SIZE&&(this.sample_size[i]=e.readUint32()),this.flags&u.TRUN_FLAGS_FLAGS&&(this.sample_flags[i]=e.readUint32()),this.flags&u.TRUN_FLAGS_CTS_OFFSET&&(0===this.version?this.sample_composition_time_offset[i]=e.readUint32():this.sample_composition_time_offset[i]=e.readInt32())})),u.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()})),u.createFullBoxCtor("txtC",(function(e){this.config=e.readCString()})),u.createBoxCtor("tyco",(function(e){var t=(this.size-this.hdr_size)/4;this.compatible_brands=[];for(var i=0;i<t;i++)this.compatible_brands[i]=e.readString(4)})),u.createFullBoxCtor("udes",(function(e){this.lang=e.readCString(),this.name=e.readCString(),this.description=e.readCString(),this.tags=e.readCString()})),u.createFullBoxCtor("uncC",(function(e){var t;if(this.profile=e.readUint32(),1==this.version);else if(0==this.version){for(this.component_count=e.readUint32(),this.component_index=[],this.component_bit_depth_minus_one=[],this.component_format=[],this.component_align_size=[],t=0;t<this.component_count;t++)this.component_index.push(e.readUint16()),this.component_bit_depth_minus_one.push(e.readUint8()),this.component_format.push(e.readUint8()),this.component_align_size.push(e.readUint8());this.sampling_type=e.readUint8(),this.interleave_type=e.readUint8(),this.block_size=e.readUint8();var i=e.readUint8();this.component_little_endian=i>>7&1,this.block_pad_lsb=i>>6&1,this.block_little_endian=i>>5&1,this.block_reversed=i>>4&1,this.pad_unknown=i>>3&1,this.pixel_size=e.readUint32(),this.row_align_size=e.readUint32(),this.tile_align_size=e.readUint32(),this.num_tile_cols_minus_one=e.readUint32(),this.num_tile_rows_minus_one=e.readUint32()}})),u.createFullBoxCtor("url ",(function(e){1!==this.flags&&(this.location=e.readCString())})),u.createFullBoxCtor("urn ",(function(e){this.name=e.readCString(),this.size-this.hdr_size-this.name.length-1>0&&(this.location=e.readCString())})),u.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,(function(e){this.LiveServerManifest=e.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")})),u.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,(function(e){this.system_id=u.parseHex16(e);var t=e.readUint32();t>0&&(this.data=e.readUint8Array(t))})),u.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),u.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,(function(e){this.default_AlgorithmID=e.readUint24(),this.default_IV_size=e.readUint8(),this.default_KID=u.parseHex16(e)})),u.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,(function(e){this.fragment_count=e.readUint8(),this.entries=[];for(var t=0;t<this.fragment_count;t++){var i={},s=0,r=0;1===this.version?(s=e.readUint64(),r=e.readUint64()):(s=e.readUint32(),r=e.readUint32()),i.absolute_time=s,i.absolute_duration=r,this.entries.push(i)}})),u.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())})),u.createFullBoxCtor("vmhd",(function(e){this.graphicsmode=e.readUint16(),this.opcolor=e.readUint16Array(3)})),u.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))})),u.createBoxCtor("vttC",(function(e){this.text=e.readString(this.size-this.hdr_size)})),u.createFullBoxCtor("vvcC",(function(e){var t,i,s={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(e){this.held_bits=e.readUint8(),this.num_held_bits=8},stream_read_2_bytes:function(e){this.held_bits=e.readUint16(),this.num_held_bits=16},extract_bits:function(e){var t=this.held_bits>>this.num_held_bits-e&(1<<e)-1;return this.num_held_bits-=e,t}};if(s.stream_read_1_bytes(e),s.extract_bits(5),this.lengthSizeMinusOne=s.extract_bits(2),this.ptl_present_flag=s.extract_bits(1),this.ptl_present_flag){if(s.stream_read_2_bytes(e),this.ols_idx=s.extract_bits(9),this.num_sublayers=s.extract_bits(3),this.constant_frame_rate=s.extract_bits(2),this.chroma_format_idc=s.extract_bits(2),s.stream_read_1_bytes(e),this.bit_depth_minus8=s.extract_bits(3),s.extract_bits(5),s.stream_read_2_bytes(e),s.extract_bits(2),this.num_bytes_constraint_info=s.extract_bits(6),this.general_profile_idc=s.extract_bits(7),this.general_tier_flag=s.extract_bits(1),this.general_level_idc=e.readUint8(),s.stream_read_1_bytes(e),this.ptl_frame_only_constraint_flag=s.extract_bits(1),this.ptl_multilayer_enabled_flag=s.extract_bits(1),this.general_constraint_info=new Uint8Array(this.num_bytes_constraint_info),this.num_bytes_constraint_info){for(t=0;t<this.num_bytes_constraint_info-1;t++){var r=s.extract_bits(6);s.stream_read_1_bytes(e);var a=s.extract_bits(2);this.general_constraint_info[t]=r<<2|a}this.general_constraint_info[this.num_bytes_constraint_info-1]=s.extract_bits(6)}else s.extract_bits(6);if(this.num_sublayers>1){for(s.stream_read_1_bytes(e),this.ptl_sublayer_present_mask=0,i=this.num_sublayers-2;i>=0;--i){var o=s.extract_bits(1);this.ptl_sublayer_present_mask|=o<<i}for(i=this.num_sublayers;i<=8&&this.num_sublayers>1;++i)s.extract_bits(1);for(this.sublayer_level_idc=[],i=this.num_sublayers-2;i>=0;--i)this.ptl_sublayer_present_mask&1<<i&&(this.sublayer_level_idc[i]=e.readUint8())}if(this.ptl_num_sub_profiles=e.readUint8(),this.general_sub_profile_idc=[],this.ptl_num_sub_profiles)for(t=0;t<this.ptl_num_sub_profiles;t++)this.general_sub_profile_idc.push(e.readUint32());this.max_picture_width=e.readUint16(),this.max_picture_height=e.readUint16(),this.avg_frame_rate=e.readUint16()}this.nalu_arrays=[];var n=e.readUint8();for(t=0;t<n;t++){var l=[];this.nalu_arrays.push(l),s.stream_read_1_bytes(e),l.completeness=s.extract_bits(1),s.extract_bits(2),l.nalu_type=s.extract_bits(5);var d=1;for(13!=l.nalu_type&&12!=l.nalu_type&&(d=e.readUint16()),i=0;i<d;i++){var h=e.readUint16();l.push({data:e.readUint8Array(h),length:h})}}})),u.createFullBoxCtor("vvnC",(function(e){var t=strm.readUint8();this.lengthSizeMinusOne=3&t})),u.SampleEntry.prototype.isVideo=function(){return!1},u.SampleEntry.prototype.isAudio=function(){return!1},u.SampleEntry.prototype.isSubtitle=function(){return!1},u.SampleEntry.prototype.isMetadata=function(){return!1},u.SampleEntry.prototype.isHint=function(){return!1},u.SampleEntry.prototype.getCodec=function(){return this.type.replace(".","")},u.SampleEntry.prototype.getWidth=function(){return""},u.SampleEntry.prototype.getHeight=function(){return""},u.SampleEntry.prototype.getChannelCount=function(){return""},u.SampleEntry.prototype.getSampleRate=function(){return""},u.SampleEntry.prototype.getSampleSize=function(){return""},u.VisualSampleEntry.prototype.isVideo=function(){return!0},u.VisualSampleEntry.prototype.getWidth=function(){return this.width},u.VisualSampleEntry.prototype.getHeight=function(){return this.height},u.AudioSampleEntry.prototype.isAudio=function(){return!0},u.AudioSampleEntry.prototype.getChannelCount=function(){return this.channel_count},u.AudioSampleEntry.prototype.getSampleRate=function(){return this.samplerate},u.AudioSampleEntry.prototype.getSampleSize=function(){return this.samplesize},u.SubtitleSampleEntry.prototype.isSubtitle=function(){return!0},u.MetadataSampleEntry.prototype.isMetadata=function(){return!0},u.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},u.avc1SampleEntry.prototype.getCodec=u.avc2SampleEntry.prototype.getCodec=u.avc3SampleEntry.prototype.getCodec=u.avc4SampleEntry.prototype.getCodec=function(){var e=u.SampleEntry.prototype.getCodec.call(this);return this.avcC?e+"."+u.decimalToHex(this.avcC.AVCProfileIndication)+u.decimalToHex(this.avcC.profile_compatibility)+u.decimalToHex(this.avcC.AVCLevelIndication):e},u.hev1SampleEntry.prototype.getCodec=u.hvc1SampleEntry.prototype.getCodec=function(){var e,t=u.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,s=0;for(e=0;e<32&&(s|=1&i,31!=e);e++)s<<=1,i>>=1;t+=u.decimalToHex(s,0),t+=".",0===this.hvcC.general_tier_flag?t+="L":t+="H",t+=this.hvcC.general_level_idc;var r=!1,a="";for(e=5;e>=0;e--)(this.hvcC.general_constraint_indicator[e]||r)&&(a="."+u.decimalToHex(this.hvcC.general_constraint_indicator[e],0)+a,r=!0);t+=a}return t},u.vvc1SampleEntry.prototype.getCodec=u.vvi1SampleEntry.prototype.getCodec=function(){var e,t=u.SampleEntry.prototype.getCodec.call(this);if(this.vvcC){t+="."+this.vvcC.general_profile_idc,this.vvcC.general_tier_flag?t+=".H":t+=".L",t+=this.vvcC.general_level_idc;var i="";if(this.vvcC.general_constraint_info){var s,r=[],a=0;for(a|=this.vvcC.ptl_frame_only_constraint<<7,a|=this.vvcC.ptl_multilayer_enabled<<6,e=0;e<this.vvcC.general_constraint_info.length;++e)a|=this.vvcC.general_constraint_info[e]>>2&63,r.push(a),a&&(s=e),a=this.vvcC.general_constraint_info[e]>>2&3;if(void 0===s)i=".CA";else{i=".C";var o="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",n=0,l=0;for(e=0;e<=s;++e)for(n=n<<8|r[e],l+=8;l>=5;){i+=o[n>>l-5&31],n&=(1<<(l-=5))-1}l&&(i+=o[31&(n<<=5-l)])}}t+=i}return t},u.mp4aSampleEntry.prototype.getCodec=function(){var e=u.SampleEntry.prototype.getCodec.call(this);if(this.esds&&this.esds.esd){var t=this.esds.esd.getOTI(),i=this.esds.esd.getAudioConfig();return e+"."+u.decimalToHex(t)+(i?"."+i:"")}return e},u.stxtSampleEntry.prototype.getCodec=function(){var e=u.SampleEntry.prototype.getCodec.call(this);return this.mime_format?e+"."+this.mime_format:e},u.vp08SampleEntry.prototype.getCodec=u.vp09SampleEntry.prototype.getCodec=function(){var e=u.SampleEntry.prototype.getCodec.call(this),t=this.vpcC.level;0==t&&(t="00");var i=this.vpcC.bitDepth;return 8==i&&(i="08"),e+".0"+this.vpcC.profile+"."+t+"."+i},u.av01SampleEntry.prototype.getCodec=function(){var e,t=u.SampleEntry.prototype.getCodec.call(this),i=this.av1C.seq_level_idx_0;return i<10&&(i="0"+i),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+"."+i+(this.av1C.seq_tier_0?"H":"M")+"."+e},u.Box.prototype.writeHeader=function(e,t){this.size+=8,this.size>d&&(this.size+=8),"uuid"===this.type&&(this.size+=16),o.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+e.getPosition()+(t||"")),this.size>d?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>d&&e.writeUint64(this.size)},u.FullBox.prototype.writeHeader=function(e){this.size+=4,u.Box.prototype.writeHeader.call(this,e," v="+this.version+" f="+this.flags),e.writeUint8(this.version),e.writeUint24(this.flags)},u.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))},u.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);o.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size)},u.TrackReferenceTypeBox.prototype.write=function(e){this.size=4*this.track_ids.length,this.writeHeader(e),e.writeUint32Array(this.track_ids)},u.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)},u.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])},u.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)},u.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])},u.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;o.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size)},u.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)},u.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)}},u.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)},u.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)},u.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)},u.hvcCBox.prototype.write=function(e){var t,i;for(this.size=23,t=0;t<this.nalu_arrays.length;t++)for(this.size+=3,i=0;i<this.nalu_arrays[t].length;i++)this.size+=2+this.nalu_arrays[t][i].data.length;for(this.writeHeader(e),e.writeUint8(this.configurationVersion),e.writeUint8(this.general_profile_space<<6+this.general_tier_flag<<5+this.general_profile_idc),e.writeUint32(this.general_profile_compatibility),e.writeUint8Array(this.general_constraint_indicator),e.writeUint8(this.general_level_idc),e.writeUint16(this.min_spatial_segmentation_idc+(15<<24)),e.writeUint8(this.parallelismType+252),e.writeUint8(this.chroma_format_idc+252),e.writeUint8(this.bit_depth_luma_minus8+248),e.writeUint8(this.bit_depth_chroma_minus8+248),e.writeUint16(this.avgFrameRate),e.writeUint8((this.constantFrameRate<<6)+(this.numTemporalLayers<<3)+(this.temporalIdNested<<2)+this.lengthSizeMinusOne),e.writeUint8(this.nalu_arrays.length),t=0;t<this.nalu_arrays.length;t++)for(e.writeUint8((this.nalu_arrays[t].completeness<<7)+this.nalu_arrays[t].nalu_type),e.writeUint16(this.nalu_arrays[t].length),i=0;i<this.nalu_arrays[t].length;i++)e.writeUint16(this.nalu_arrays[t][i].data.length),e.writeUint8Array(this.nalu_arrays[t][i].data)},u.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)},u.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)},u.mehdBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=4,this.writeHeader(e),e.writeUint32(this.fragment_duration)},u.mfhdBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=4,this.writeHeader(e),e.writeUint32(this.sequence_number)},u.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)},u.SampleEntry.prototype.writeHeader=function(e){this.size=8,u.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)},u.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;o.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size)},u.SampleEntry.prototype.write=function(e){this.writeHeader(e),e.writeUint8Array(this.data),this.size+=this.data.length,o.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size)},u.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)},u.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)},u.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)},u.SampleGroupEntry.prototype.write=function(e){e.writeUint8Array(this.data)},u.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)}},u.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)},u.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)}},u.smhdBox.prototype.write=function(e){this.version=0,this.flags=1,this.size=4,this.writeHeader(e),e.writeUint16(this.balance),e.writeUint16(0)},u.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)},u.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])},u.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;o.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size)},u.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])},u.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)},u.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)},u.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])},u.tfdtBox.prototype.write=function(e){var t=Math.pow(2,32)-1;this.version=this.baseMediaDecodeTime>t?1: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)},u.tfhdBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&u.TFHD_FLAG_BASE_DATA_OFFSET&&(this.size+=8),this.flags&u.TFHD_FLAG_SAMPLE_DESC&&(this.size+=4),this.flags&u.TFHD_FLAG_SAMPLE_DUR&&(this.size+=4),this.flags&u.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&u.TFHD_FLAG_SAMPLE_FLAGS&&(this.size+=4),this.writeHeader(e),e.writeUint32(this.track_id),this.flags&u.TFHD_FLAG_BASE_DATA_OFFSET&&e.writeUint64(this.base_data_offset),this.flags&u.TFHD_FLAG_SAMPLE_DESC&&e.writeUint32(this.default_sample_description_index),this.flags&u.TFHD_FLAG_SAMPLE_DUR&&e.writeUint32(this.default_sample_duration),this.flags&u.TFHD_FLAG_SAMPLE_SIZE&&e.writeUint32(this.default_sample_size),this.flags&u.TFHD_FLAG_SAMPLE_FLAGS&&e.writeUint32(this.default_sample_flags)},u.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)},u.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)},u.trunBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&u.TRUN_FLAGS_DATA_OFFSET&&(this.size+=4),this.flags&u.TRUN_FLAGS_FIRST_FLAG&&(this.size+=4),this.flags&u.TRUN_FLAGS_DURATION&&(this.size+=4*this.sample_duration.length),this.flags&u.TRUN_FLAGS_SIZE&&(this.size+=4*this.sample_size.length),this.flags&u.TRUN_FLAGS_FLAGS&&(this.size+=4*this.sample_flags.length),this.flags&u.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(e),e.writeUint32(this.sample_count),this.flags&u.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=e.getPosition(),e.writeInt32(this.data_offset)),this.flags&u.TRUN_FLAGS_FIRST_FLAG&&e.writeUint32(this.first_sample_flags);for(var t=0;t<this.sample_count;t++)this.flags&u.TRUN_FLAGS_DURATION&&e.writeUint32(this.sample_duration[t]),this.flags&u.TRUN_FLAGS_SIZE&&e.writeUint32(this.sample_size[t]),this.flags&u.TRUN_FLAGS_FLAGS&&e.writeUint32(this.sample_flags[t]),this.flags&u.TRUN_FLAGS_CTS_OFFSET&&(0===this.version?e.writeUint32(this.sample_composition_time_offset[t]):e.writeInt32(this.sample_composition_time_offset[t]))},u["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)},u["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)},u.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)},u.cttsBox.prototype.unpack=function(e){var t,i,s;for(s=0,t=0;t<this.sample_counts.length;t++)for(i=0;i<this.sample_counts[t];i++)e[s].pts=e[s].dts+this.sample_offsets[t],s++},u.sttsBox.prototype.unpack=function(e){var t,i,s;for(s=0,t=0;t<this.sample_counts.length;t++)for(i=0;i<this.sample_counts[t];i++)e[s].dts=0===s?0:e[s-1].dts+this.sample_deltas[t],s++},u.stcoBox.prototype.unpack=function(e){var t;for(t=0;t<this.chunk_offsets.length;t++)e[t].offset=this.chunk_offsets[t]},u.stscBox.prototype.unpack=function(e){var t,i,s,r,a;for(r=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++,s=0;s<this.samples_per_chunk[t];s++){if(!e[r])return;e[r].description_index=this.sample_description_index[t],e[r].chunk_index=a,r++}},u.stszBox.prototype.unpack=function(e){var t;for(t=0;t<this.sample_sizes.length;t++)e[t].size=this.sample_sizes[t]},u.DIFF_BOXES_PROP_NAMES=["boxes","entries","references","subsamples","items","item_infos","extents","associations","subsegments","ranges","seekLists","seekPoints","esd","levels"],u.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"],u.boxEqualFields=function(e,t){if(e&&!t)return!1;var i;for(i in e)if(!(u.DIFF_BOXES_PROP_NAMES.indexOf(i)>-1||e[i]instanceof u.Box||t[i]instanceof u.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||u.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(i)>-1||e[i]===t[i]))return!1;return!0},u.boxEqual=function(e,t){if(!u.boxEqualFields(e,t))return!1;for(var i=0;i<u.DIFF_BOXES_PROP_NAMES.length;i++){var s=u.DIFF_BOXES_PROP_NAMES[i];if(e[s]&&t[s]&&!u.boxEqual(e[s],t[s]))return!1}return!0};var m=function(){};m.prototype.parseSample=function(e){var t,i={};i.resources=[];var s=new n(e.data.buffer);if(e.subsamples&&0!==e.subsamples.length){if(i.documentString=s.readString(e.subsamples[0].size),e.subsamples.length>1)for(t=1;t<e.subsamples.length;t++)i.resources[t]=s.readUint8Array(e.subsamples[t].size)}else i.documentString=s.readString(e.data.length);return"undefined"!=typeof DOMParser&&(i.document=(new DOMParser).parseFromString(i.documentString,"application/xml")),i};var g=function(){};g.prototype.parseSample=function(e){return new n(e.data.buffer).readString(e.data.length)},g.prototype.parseConfig=function(e){var t=new n(e.buffer);return t.readUint32(),t.readCString()},t.XMLSubtitlein4Parser=m,t.Textin4Parser=g;var y=function(e){this.stream=e||new h,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};y.prototype.destroy=function(){this.stream&&(this.stream.destroy(),this.stream=null),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},y.prototype.setSegmentOptions=function(e,t,i){var s=this.getTrackById(e);if(s){var r={};this.fragmentedTracks.push(r),r.id=e,r.user=t,r.trak=s,s.nextSample=0,r.segmentStream=null,r.nb_samples=1e3,r.rapAlignement=!0,i&&(i.nbSamples&&(r.nb_samples=i.nbSamples),i.rapAlignement&&(r.rapAlignement=i.rapAlignement))}},y.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)},y.prototype.setExtractionOptions=function(e,t,i){var s=this.getTrackById(e);if(s){var r={};this.extractedTracks.push(r),r.id=e,r.user=t,r.trak=s,s.nextSample=0,r.nb_samples=1e3,r.samples=[],i&&i.nbSamples&&(r.nb_samples=i.nbSamples)}},y.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)},y.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=u.parseOneBox(this.stream,false)).code===u.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]&&o.warn("ISOFile","Duplicate Box of type: "+i+", overriding previous occurrence"),this[i]=t}this.updateUsedBytes&&this.updateUsedBytes(t,e)}},y.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?(o.warn("ISOFile","Ignoring empty buffer (fileStart: "+e.fileStart+")"),this.stream.logBufferLevel(),!1):(o.info("ISOFile","Processing buffer (fileStart: "+e.fileStart+")"),e.usedBytes=0,this.stream.insertBuffer(e),this.stream.logBufferLevel(),!!this.stream.initialized()||(o.warn("ISOFile","Not ready to start parsing"),!1))},y.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&&(o.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),o.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),i},y.prototype.getInfo=function(){var e,t,i,s,r,a,o={},n=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(o.hasMoov=!0,o.duration=this.moov.mvhd.duration,o.timescale=this.moov.mvhd.timescale,o.isFragmented=null!=this.moov.mvex,o.isFragmented&&this.moov.mvex.mehd&&(o.fragment_duration=this.moov.mvex.mehd.fragment_duration),o.isProgressive=this.isProgressive,o.hasIOD=null!=this.moov.iods,o.brands=[],o.brands.push(this.ftyp.major_brand),o.brands=o.brands.concat(this.ftyp.compatible_brands),o.created=new Date(n+1e3*this.moov.mvhd.creation_time),o.modified=new Date(n+1e3*this.moov.mvhd.modification_time),o.tracks=[],o.audioTracks=[],o.videoTracks=[],o.subtitleTracks=[],o.metadataTracks=[],o.hintTracks=[],o.otherTracks=[],e=0;e<this.moov.traks.length;e++){if(a=(i=this.moov.traks[e]).mdia.minf.stbl.stsd.entries[0],s={},o.tracks.push(s),s.id=i.tkhd.track_id,s.name=i.mdia.hdlr.name,s.references=[],i.tref)for(t=0;t<i.tref.boxes.length;t++)r={},s.references.push(r),r.type=i.tref.boxes[t].type,r.track_ids=i.tref.boxes[t].track_ids;i.edts&&(s.edits=i.edts.elst.entries),s.created=new Date(n+1e3*i.tkhd.creation_time),s.modified=new Date(n+1e3*i.tkhd.modification_time),s.movie_duration=i.tkhd.duration,s.movie_timescale=o.timescale,s.layer=i.tkhd.layer,s.alternate_group=i.tkhd.alternate_group,s.volume=i.tkhd.volume,s.matrix=i.tkhd.matrix,s.track_width=i.tkhd.width/65536,s.track_height=i.tkhd.height/65536,s.timescale=i.mdia.mdhd.timescale,s.cts_shift=i.mdia.minf.stbl.cslg,s.duration=i.mdia.mdhd.duration,s.samples_duration=i.samples_duration,s.codec=a.getCodec(),s.kind=i.udta&&i.udta.kinds.length?i.udta.kinds[0]:{schemeURI:"",value:""},s.language=i.mdia.elng?i.mdia.elng.extended_language:i.mdia.mdhd.languageString,s.nb_samples=i.samples.length,s.size=i.samples_size,s.bitrate=8*s.size*s.timescale/s.samples_duration,a.isAudio()?(s.type="audio",o.audioTracks.push(s),s.audio={},s.audio.sample_rate=a.getSampleRate(),s.audio.channel_count=a.getChannelCount(),s.audio.sample_size=a.getSampleSize()):a.isVideo()?(s.type="video",o.videoTracks.push(s),s.video={},s.video.width=a.getWidth(),s.video.height=a.getHeight()):a.isSubtitle()?(s.type="subtitles",o.subtitleTracks.push(s)):a.isHint()?(s.type="metadata",o.hintTracks.push(s)):a.isMetadata()?(s.type="metadata",o.metadataTracks.push(s)):(s.type="metadata",o.otherTracks.push(s))}else o.hasMoov=!1;if(o.mime="",o.hasMoov&&o.tracks){for(o.videoTracks&&o.videoTracks.length>0?o.mime+='video/mp4; codecs="':o.audioTracks&&o.audioTracks.length>0?o.mime+='audio/mp4; codecs="':o.mime+='application/mp4; codecs="',e=0;e<o.tracks.length;e++)0!==e&&(o.mime+=","),o.mime+=o.tracks[e].codec;o.mime+='"; profiles="',o.mime+=this.ftyp.compatible_brands.join(),o.mime+='"'}return o},y.prototype.setNextSeekPositionFromSample=function(e){e&&(this.nextSeekPosition?this.nextSeekPosition=Math.min(e.offset+e.alreadyRead,this.nextSeekPosition):this.nextSeekPosition=e.offset+e.alreadyRead)},y.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 s=this.fragmentedTracks[t];for(i=s.trak;i.nextSample<i.samples.length&&this.sampleProcessingStarted;){o.debug("ISOFile","Creating media fragment on track #"+s.id+" for sample "+i.nextSample);var r=this.createFragment(s.id,i.nextSample,s.segmentStream);if(!r)break;if(s.segmentStream=r,i.nextSample++,(i.nextSample%s.nb_samples==0||e||i.nextSample>=i.samples.length)&&(o.info("ISOFile","Sending fragmented data on track #"+s.id+" for samples ["+Math.max(0,i.nextSample-s.nb_samples)+","+(i.nextSample-1)+"]"),o.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(s.id,s.user,s.segmentStream.buffer,i.nextSample,e||i.nextSample>=i.samples.length),s.segmentStream=null,s!==this.fragmentedTracks[t]))break}}if(null!==this.onSamples)for(t=0;t<this.extractedTracks.length;t++){var a=this.extractedTracks[t];for(i=a.trak;i.nextSample<i.samples.length&&this.sampleProcessingStarted;){o.debug("ISOFile","Exporting on track #"+a.id+" sample #"+i.nextSample);var n=this.getSample(i,i.nextSample);if(!n){this.setNextSeekPositionFromSample(i.samples[i.nextSample]);break}if(i.nextSample++,a.samples.push(n),(i.nextSample%a.nb_samples==0||i.nextSample>=i.samples.length)&&(o.debug("ISOFile","Sending samples on track #"+a.id+" for sample "+i.nextSample),this.onSamples&&this.onSamples(a.id,a.user,a.samples),a.samples=[],a!==this.extractedTracks[t]))break}}}},y.prototype.getBox=function(e){var t=this.getBoxes(e,!0);return t.length?t[0]:null},y.prototype.getBoxes=function(e,t){var i=[];return y._sweep.call(this,e,i,t),i},y._sweep=function(e,t,i){for(var s in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&i)return;y._sweep.call(this.boxes[s],e,t,i)}},y.prototype.getTrackSamplesInfo=function(e){var t=this.getTrackById(e);return t?t.samples:void 0},y.prototype.getTrackSample=function(e,t){var i=this.getTrackById(e);return this.getSample(i,t)},y.prototype.releaseUsedSamples=function(e,t){var i=0,s=this.getTrackById(e);s.lastValidSample||(s.lastValidSample=0);for(var r=s.lastValidSample;r<t;r++)i+=this.releaseSample(s,r);o.info("ISOFile","Track #"+e+" released samples up to "+t+" (released size: "+i+", remaining: "+this.samplesDataSize+")"),s.lastValidSample=t},y.prototype.start=function(){this.sampleProcessingStarted=!0,this.processSamples(!1)},y.prototype.stop=function(){this.sampleProcessingStarted=!1},y.prototype.flush=function(){o.info("ISOFile","Flushing remaining samples"),this.updateSampleLists(),this.processSamples(!0),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0)},y.prototype.seekTrack=function(e,t,i){var s,r,a,n,l=0,d=0;if(0===i.samples.length)return o.info("ISOFile","No sample in track, cannot seek! Using time "+o.getDurationString(0,1)+" and offset: 0"),{offset:0,time:0};for(s=0;s<i.samples.length;s++){if(r=i.samples[s],0===s)d=0,n=r.timescale;else if(r.cts>e*r.timescale){d=s-1;break}t&&r.is_sync&&(l=s)}for(t&&(d=l),e=i.samples[d].cts,i.nextSample=d;i.samples[d].alreadyRead===i.samples[d].size&&i.samples[d+1];)d++;return a=i.samples[d].offset+i.samples[d].alreadyRead,o.info("ISOFile","Seeking to "+(t?"RAP":"")+" sample #"+i.nextSample+" on track "+i.tkhd.track_id+", time "+o.getDurationString(e,n)+" and offset: "+a),{offset:a,time:e/n}},y.prototype.getTrackDuration=function(e){var t;return e.samples?((t=e.samples[e.samples.length-1]).cts+t.duration)/t.timescale:1/0},y.prototype.seek=function(e,t){var i,s,r,a=this.moov,n={offset:1/0,time:1/0};if(this.moov){for(r=0;r<a.traks.length;r++)i=a.traks[r],e>this.getTrackDuration(i)||((s=this.seekTrack(e,t,i)).offset<n.offset&&(n.offset=s.offset),s.time<n.time&&(n.time=s.time));return o.info("ISOFile","Seeking at time "+o.getDurationString(n.time,1)+" needs a buffer with a fileStart position of "+n.offset),n.offset===1/0?n={offset:this.nextParsePosition,time:0}:n.offset=this.stream.getEndFilePositionAfter(n.offset),o.info("ISOFile","Adjusted seek position (after checking data already in buffer): "+n.offset),n}throw"Cannot seek: moov not received!"},y.prototype.equal=function(e){for(var t=0;t<this.boxes.length&&t<e.boxes.length;){var i=this.boxes[t],s=e.boxes[t];if(!u.boxEqual(i,s))return!1;t++}return!0},t.ISOFile=y,y.prototype.lastBoxStartPosition=0,y.prototype.parsingMdat=null,y.prototype.nextParsePosition=0,y.prototype.discardMdatData=!1,y.prototype.processIncompleteBox=function(e){var t;return"mdat"===e.type?(t=new u[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))},y.prototype.hasIncompleteMdat=function(){return null!==this.parsingMdat},y.prototype.processIncompleteMdat=function(){var e;return e=this.parsingMdat,this.stream.seek(e.start+e.size,!1,this.discardMdatData)?(o.debug("ISOFile","Found 'mdat' end in buffered data"),this.parsingMdat=null,!0):(this.nextParsePosition=this.stream.findEndContiguousBuf(),!1)},y.prototype.restoreParsePosition=function(){return this.stream.seek(this.lastBoxStartPosition,!0,this.discardMdatData)},y.prototype.saveParsePosition=function(){this.lastBoxStartPosition=this.stream.getPosition()},y.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))},y.prototype.add=u.Box.prototype.add,y.prototype.addBox=u.Box.prototype.addBox,y.prototype.init=function(e){var t=e||{};this.add("ftyp").set("major_brand",t.brands&&t.brands[0]||"iso4").set("minor_version",0).set("compatible_brands",t.brands||["iso4"]);var i=this.add("moov");return i.add("mvhd").set("timescale",t.timescale||600).set("rate",t.rate||65536).set("creation_time",0).set("modification_time",0).set("duration",t.duration||0).set("volume",t.width?0:256).set("matrix",[65536,0,0,0,65536,0,0,0,1073741824]).set("next_track_id",1),i.add("mvex"),this},y.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",u.TKHD_FLAG_ENABLED|u.TKHD_FLAG_IN_MOVIE|u.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<<16).set("height",t.height<<16);var s=i.add("mdia");s.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||"und"),s.add("hdlr").set("handler",t.hdlr||"vide").set("name",t.name||"Track created with MP4Box.js"),s.add("elng").set("extended_language",t.language||"fr-FR");var r=s.add("minf");if(void 0!==u[t.type+"SampleEntry"]){var a=new u[t.type+"SampleEntry"];a.data_reference_index=1;var o="";for(var l in u.sampleEntryCodes)for(var d=u.sampleEntryCodes[l],h=0;h<d.length;h++)if(d.indexOf(t.type)>-1){o=l;break}switch(o){case"Visual":if(r.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),t.avcDecoderConfigRecord){var c=new u.avcCBox;c.parse(new n(t.avcDecoderConfigRecord)),a.addBox(c)}else if(t.hevcDecoderConfigRecord){var p=new u.hvcCBox;p.parse(new n(t.hevcDecoderConfigRecord)),a.addBox(p)}break;case"Audio":r.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":r.add("hmhd");break;case"Subtitle":if(r.add("sthd"),"stpp"===t.type)a.set("namespace",t.namespace||"nonamespace").set("schema_location",t.schema_location||"").set("auxiliary_mime_types",t.auxiliary_mime_types||"");break;default:r.add("nmhd")}t.description&&a.addBox(t.description),t.description_boxes&&t.description_boxes.forEach((function(e){a.addBox(e)})),r.add("dinf").add("dref").addEntry((new u["url Box"]).set("flags",1));var f=r.add("stbl");return f.add("stsd").addEntry(a),f.add("stts").set("sample_counts",[]).set("sample_deltas",[]),f.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),f.add("stco").set("chunk_offsets",[]),f.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}},u.Box.prototype.computeSize=function(e){var t=e||new l;t.endianness=l.BIG_ENDIAN,this.write(t)},y.prototype.addSample=function(e,t,i){var s=i||{},r={},a=this.getTrackById(e);if(null!==a){r.number=a.samples.length,r.track_id=a.tkhd.track_id,r.timescale=a.mdia.mdhd.timescale,r.description_index=s.sample_description_index?s.sample_description_index-1:0,r.description=a.mdia.minf.stbl.stsd.entries[r.description_index],r.data=t,r.size=t.byteLength,r.alreadyRead=r.size,r.duration=s.duration||1,r.cts=s.cts||0,r.dts=s.dts||0,r.is_sync=s.is_sync||!1,r.is_leading=s.is_leading||0,r.depends_on=s.depends_on||0,r.is_depended_on=s.is_depended_on||0,r.has_redundancy=s.has_redundancy||0,r.degradation_priority=s.degradation_priority||0,r.offset=0,r.subsamples=s.subsamples,a.samples.push(r),a.samples_size+=r.size,a.samples_duration+=r.duration,void 0===a.first_dts&&(a.first_dts=s.dts),this.processSamples();var o=this.createSingleSampleMoof(r);return this.addBox(o),o.computeSize(),o.trafs[0].truns[0].data_offset=o.size+8,this.add("mdat").data=new Uint8Array(t),r}},y.prototype.createSingleSampleMoof=function(e){var t=0;t=e.is_sync?1<<25:65536;var i=new u.moofBox;i.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var s=i.add("traf"),r=this.getTrackById(e.track_id);return s.add("tfhd").set("track_id",e.track_id).set("flags",u.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),s.add("tfdt").set("baseMediaDecodeTime",e.dts-(r.first_dts||0)),s.add("trun").set("flags",u.TRUN_FLAGS_DATA_OFFSET|u.TRUN_FLAGS_DURATION|u.TRUN_FLAGS_SIZE|u.TRUN_FLAGS_FLAGS|u.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",[t]).set("sample_composition_time_offset",[e.cts-e.dts]),i},y.prototype.lastMoofIndex=0,y.prototype.samplesDataSize=0,y.prototype.resetTables=function(){var e,t,i,s,r,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=[],(s=t.mdia.minf.stbl.stts).sample_counts=[],s.sample_deltas=[],(r=t.mdia.minf.stbl.ctts)&&(r.sample_counts=[],r.sample_offsets=[]),a=t.mdia.minf.stbl.stss;var o=t.mdia.minf.stbl.boxes.indexOf(a);-1!=o&&(t.mdia.minf.stbl.boxes[o]=null)}},y.initSampleGroups=function(e,t,i,s,r){var a,o,n,l;function d(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=[]),o=0;o<i.length;o++){for(l=i[o].grouping_type+"/"+i[o].grouping_type_parameter,n=new d(i[o].grouping_type,i[o].grouping_type_parameter,i[o]),t&&(t.sample_groups_info[l]=n),e.sample_groups_info[l]||(e.sample_groups_info[l]=n),a=0;a<s.length;a++)s[a].grouping_type===i[o].grouping_type&&(n.description=s[a],n.description.used=!0);if(r)for(a=0;a<r.length;a++)r[a].grouping_type===i[o].grouping_type&&(n.fragment_description=r[a],n.fragment_description.used=!0,n.is_fragment=!0)}if(t){if(r)for(o=0;o<r.length;o++)!r[o].used&&r[o].version>=2&&(l=r[o].grouping_type+"/0",(n=new d(r[o].grouping_type,0)).is_fragment=!0,t.sample_groups_info[l]||(t.sample_groups_info[l]=n))}else for(o=0;o<s.length;o++)!s[o].used&&s[o].version>=2&&(l=s[o].grouping_type+"/0",n=new d(s[o].grouping_type,0),e.sample_groups_info[l]||(e.sample_groups_info[l]=n))},y.setSampleGroupProperties=function(e,t,i,s){var r,a;for(r in t.sample_groups=[],s){var o;if(t.sample_groups[r]={},t.sample_groups[r].grouping_type=s[r].grouping_type,t.sample_groups[r].grouping_type_parameter=s[r].grouping_type_parameter,i>=s[r].last_sample_in_run&&(s[r].last_sample_in_run<0&&(s[r].last_sample_in_run=0),s[r].entry_index++,s[r].entry_index<=s[r].sbgp.entries.length-1&&(s[r].last_sample_in_run+=s[r].sbgp.entries[s[r].entry_index].sample_count)),s[r].entry_index<=s[r].sbgp.entries.length-1?t.sample_groups[r].group_description_index=s[r].sbgp.entries[s[r].entry_index].group_description_index:t.sample_groups[r].group_description_index=-1,0!==t.sample_groups[r].group_description_index)o=s[r].fragment_description?s[r].fragment_description:s[r].description,t.sample_groups[r].group_description_index>0?(a=t.sample_groups[r].group_description_index>65535?(t.sample_groups[r].group_description_index>>16)-1:t.sample_groups[r].group_description_index-1,o&&a>=0&&(t.sample_groups[r].description=o.entries[a])):o&&o.version>=2&&o.default_group_description_index>0&&(t.sample_groups[r].description=o.entries[o.default_group_description_index-1])}},y.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))},y.prototype.buildSampleLists=function(){var e,t;for(e=0;e<this.moov.traks.length;e++)t=this.moov.traks[e],this.buildTrakSampleLists(t)},y.prototype.buildTrakSampleLists=function(e){var t,i,s,r,a,o,n,l,d,h,c,u,p,f,m,g,A,b,_,v,w,S,T,E;if(e.samples=[],e.samples_duration=0,e.samples_size=0,i=e.mdia.minf.stbl.stco||e.mdia.minf.stbl.co64,s=e.mdia.minf.stbl.stsc,r=e.mdia.minf.stbl.stsz||e.mdia.minf.stbl.stz2,a=e.mdia.minf.stbl.stts,o=e.mdia.minf.stbl.ctts,n=e.mdia.minf.stbl.stss,l=e.mdia.minf.stbl.stsd,d=e.mdia.minf.stbl.subs,u=e.mdia.minf.stbl.stdp,h=e.mdia.minf.stbl.sbgps,c=e.mdia.minf.stbl.sgpds,b=-1,_=-1,v=-1,w=-1,S=0,T=0,E=0,y.initSampleGroups(e,null,h,c),void 0!==r){for(t=0;t<r.sample_sizes.length;t++){var k={};k.number=t,k.track_id=e.tkhd.track_id,k.timescale=e.mdia.mdhd.timescale,k.alreadyRead=0,e.samples[t]=k,k.size=r.sample_sizes[t],e.samples_size+=k.size,0===t?(f=1,p=0,k.chunk_index=f,k.chunk_run_index=p,A=s.samples_per_chunk[p],g=0,m=p+1<s.first_chunk.length?s.first_chunk[p+1]-1:1/0):t<A?(k.chunk_index=f,k.chunk_run_index=p):(f++,k.chunk_index=f,g=0,f<=m||(m=++p+1<s.first_chunk.length?s.first_chunk[p+1]-1:1/0),k.chunk_run_index=p,A+=s.samples_per_chunk[p]),k.description_index=s.sample_description_index[k.chunk_run_index]-1,k.description=l.entries[k.description_index],k.offset=i.chunk_offsets[k.chunk_index-1]+g,g+=k.size,t>b&&(_++,b<0&&(b=0),b+=a.sample_counts[_]),t>0?(e.samples[t-1].duration=a.sample_deltas[_],e.samples_duration+=e.samples[t-1].duration,k.dts=e.samples[t-1].dts+e.samples[t-1].duration):k.dts=0,o?(t>=v&&(w++,v<0&&(v=0),v+=o.sample_counts[w]),k.cts=e.samples[t].dts+o.sample_offsets[w]):k.cts=k.dts,n?(t==n.sample_numbers[S]-1?(k.is_sync=!0,S++):(k.is_sync=!1,k.degradation_priority=0),d&&d.entries[T].sample_delta+E==t+1&&(k.subsamples=d.entries[T].subsamples,E+=d.entries[T].sample_delta,T++)):k.is_sync=!0,y.process_sdtp(e.mdia.minf.stbl.sdtp,k,k.number),k.degradation_priority=u?u.priority[t]:0,d&&d.entries[T].sample_delta+E==t&&(k.subsamples=d.entries[T].subsamples,E+=d.entries[T].sample_delta),(h.length>0||c.length>0)&&y.setSampleGroupProperties(e,k,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)}},y.prototype.updateSampleLists=function(){var e,t,i,s,r,a,o,n,l,d,h,c,p,f,m;if(void 0!==this.moov)for(;this.lastMoofIndex<this.moofs.length;)if(l=this.moofs[this.lastMoofIndex],this.lastMoofIndex++,"moof"==l.type)for(d=l,e=0;e<d.trafs.length;e++){for(h=d.trafs[e],c=this.getTrackById(h.tfhd.track_id),p=this.getTrexById(h.tfhd.track_id),s=h.tfhd.flags&u.TFHD_FLAG_SAMPLE_DESC?h.tfhd.default_sample_description_index:p?p.default_sample_description_index:1,r=h.tfhd.flags&u.TFHD_FLAG_SAMPLE_DUR?h.tfhd.default_sample_duration:p?p.default_sample_duration:0,a=h.tfhd.flags&u.TFHD_FLAG_SAMPLE_SIZE?h.tfhd.default_sample_size:p?p.default_sample_size:0,o=h.tfhd.flags&u.TFHD_FLAG_SAMPLE_FLAGS?h.tfhd.default_sample_flags:p?p.default_sample_flags:0,h.sample_number=0,h.sbgps.length>0&&y.initSampleGroups(c,h,h.sbgps,c.mdia.minf.stbl.sgpds,h.sgpds),t=0;t<h.truns.length;t++){var g=h.truns[t];for(i=0;i<g.sample_count;i++){(f={}).moof_number=this.lastMoofIndex,f.number_in_traf=h.sample_number,h.sample_number++,f.number=c.samples.length,h.first_sample_index=c.samples.length,c.samples.push(f),f.track_id=c.tkhd.track_id,f.timescale=c.mdia.mdhd.timescale,f.description_index=s-1,f.description=c.mdia.minf.stbl.stsd.entries[f.description_index],f.size=a,g.flags&u.TRUN_FLAGS_SIZE&&(f.size=g.sample_size[i]),c.samples_size+=f.size,f.duration=r,g.flags&u.TRUN_FLAGS_DURATION&&(f.duration=g.sample_duration[i]),c.samples_duration+=f.duration,c.first_traf_merged||i>0?f.dts=c.samples[c.samples.length-2].dts+c.samples[c.samples.length-2].duration:(h.tfdt?f.dts=h.tfdt.baseMediaDecodeTime:f.dts=0,c.first_traf_merged=!0),f.cts=f.dts,g.flags&u.TRUN_FLAGS_CTS_OFFSET&&(f.cts=f.dts+g.sample_composition_time_offset[i]),m=o,g.flags&u.TRUN_FLAGS_FLAGS?m=g.sample_flags[i]:0===i&&g.flags&u.TRUN_FLAGS_FIRST_FLAG&&(m=g.first_sample_flags),f.is_sync=!(m>>16&1),f.is_leading=m>>26&3,f.depends_on=m>>24&3,f.is_depended_on=m>>22&3,f.has_redundancy=m>>20&3,f.degradation_priority=65535&m;var A=!!(h.tfhd.flags&u.TFHD_FLAG_BASE_DATA_OFFSET),b=!!(h.tfhd.flags&u.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),_=!!(g.flags&u.TRUN_FLAGS_DATA_OFFSET),v=0;v=A?h.tfhd.base_data_offset:b||0===t?d.start:n,f.offset=0===t&&0===i?_?v+g.data_offset:v:n,n=f.offset+f.size,(h.sbgps.length>0||h.sgpds.length>0||c.mdia.minf.stbl.sbgps.length>0||c.mdia.minf.stbl.sgpds.length>0)&&y.setSampleGroupProperties(c,f,f.number_in_traf,h.sample_groups_info)}}if(h.subs){c.has_fragment_subsamples=!0;var w=h.first_sample_index;for(t=0;t<h.subs.entries.length;t++)w+=h.subs.entries[t].sample_delta,(f=c.samples[w-1]).subsamples=h.subs.entries[t].subsamples}}},y.prototype.getSample=function(e,t){var i,s=e.samples[t];if(!this.moov)return null;if(s.data){if(s.alreadyRead==s.size)return s}else s.data=new Uint8Array(s.size),s.alreadyRead=0,this.samplesDataSize+=s.size,o.debug("ISOFile","Allocating sample #"+t+" on track #"+e.tkhd.track_id+" of size "+s.size+" (total: "+this.samplesDataSize+")");for(;;){var r=this.stream.findPosition(!0,s.offset+s.alreadyRead,!1);if(!(r>-1))return null;var a=(i=this.stream.buffers[r]).byteLength-(s.offset+s.alreadyRead-i.fileStart);if(s.size-s.alreadyRead<=a)return o.debug("ISOFile","Getting sample #"+t+" data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-i.fileStart)+" read size: "+(s.size-s.alreadyRead)+" full size: "+s.size+")"),l.memcpy(s.data.buffer,s.alreadyRead,i,s.offset+s.alreadyRead-i.fileStart,s.size-s.alreadyRead),i.usedBytes+=s.size-s.alreadyRead,this.stream.logBufferLevel(),s.alreadyRead=s.size,s;if(0===a)return null;o.debug("ISOFile","Getting sample #"+t+" partial data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-i.fileStart)+" read size: "+a+" full size: "+s.size+")"),l.memcpy(s.data.buffer,s.alreadyRead,i,s.offset+s.alreadyRead-i.fileStart,a),s.alreadyRead+=a,i.usedBytes+=a,this.stream.logBufferLevel()}},y.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},y.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize},y.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},y.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},y.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},y.prototype.items=[],y.prototype.entity_groups=[],y.prototype.itemsDataSize=0,y.prototype.flattenItemInfo=function(){var e,t,i,s=this.items,r=this.entity_groups,a=this.meta;if(null!=a&&void 0!==a.hdlr&&void 0!==a.iinf){for(e=0;e<a.iinf.item_infos.length;e++)(i={}).id=a.iinf.item_infos[e].item_ID,s[i.id]=i,i.ref_to=[],i.name=a.iinf.item_infos[e].item_name,a.iinf.item_infos[e].protection_index>0&&(i.protection=a.ipro.protections[a.iinf.item_infos[e].protection_index-1]),a.iinf.item_infos[e].item_type?i.type=a.iinf.item_infos[e].item_type:i.type="mime",i.content_type=a.iinf.item_infos[e].content_type,i.content_encoding=a.iinf.item_infos[e].content_encoding;if(a.grpl)for(e=0;e<a.grpl.boxes.length;e++)entity_group={},entity_group.id=a.grpl.boxes[e].group_id,entity_group.entity_ids=a.grpl.boxes[e].entity_ids,entity_group.type=a.grpl.boxes[e].type,r[entity_group.id]=entity_group;if(a.iloc)for(e=0;e<a.iloc.items.length;e++){var n=a.iloc.items[e];switch(i=s[n.item_ID],0!==n.data_reference_index&&(o.warn("Item storage with reference to other files: not supported"),i.source=a.dinf.boxes[n.data_reference_index-1]),n.construction_method){case 0:break;case 1:case 2:o.warn("Item storage with construction_method : not supported")}for(i.extents=[],i.size=0,t=0;t<n.extents.length;t++)i.extents[t]={},i.extents[t].offset=n.extents[t].extent_offset+n.base_offset,i.extents[t].length=n.extents[t].extent_length,i.extents[t].alreadyRead=0,i.size+=i.extents[t].length}if(a.pitm&&(s[a.pitm.item_id].primary=!0),a.iref)for(e=0;e<a.iref.references.length;e++){var l=a.iref.references[e];for(t=0;t<l.references.length;t++)s[l.from_item_ID].ref_to.push({type:l.type,id:l.references[t]})}if(a.iprp)for(var d=0;d<a.iprp.ipmas.length;d++){var h=a.iprp.ipmas[d];for(e=0;e<h.associations.length;e++){var c=h.associations[e];if((i=s[c.id])||(i=r[c.id]),i)for(void 0===i.properties&&(i.properties={},i.properties.boxes=[]),t=0;t<c.props.length;t++){var u=c.props[t];if(u.property_index>0&&u.property_index-1<a.iprp.ipco.boxes.length){var p=a.iprp.ipco.boxes[u.property_index-1];i.properties[p.type]=p,i.properties.boxes.push(p)}}}}}},y.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,o.debug("ISOFile","Allocating item #"+e+" of size "+i.size+" (total: "+this.itemsDataSize+")");else if(i.alreadyRead===i.size)return i;for(var s=0;s<i.extents.length;s++){var r=i.extents[s];if(r.alreadyRead!==r.length){var a=this.stream.findPosition(!0,r.offset+r.alreadyRead,!1);if(!(a>-1))return null;var n=(t=this.stream.buffers[a]).byteLength-(r.offset+r.alreadyRead-t.fileStart);if(!(r.length-r.alreadyRead<=n))return o.debug("ISOFile","Getting item #"+e+" extent #"+s+" partial data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-t.fileStart)+" read size: "+n+" full extent size: "+r.length+" full item size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,t,r.offset+r.alreadyRead-t.fileStart,n),r.alreadyRead+=n,i.alreadyRead+=n,t.usedBytes+=n,this.stream.logBufferLevel(),null;o.debug("ISOFile","Getting item #"+e+" extent #"+s+" data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-t.fileStart)+" read size: "+(r.length-r.alreadyRead)+" full extent size: "+r.length+" full item size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,t,r.offset+r.alreadyRead-t.fileStart,r.length-r.alreadyRead),t.usedBytes+=r.length-r.alreadyRead,this.stream.logBufferLevel(),i.alreadyRead+=r.length-r.alreadyRead,r.alreadyRead=r.length}}return i.alreadyRead===i.size?i:null},y.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},y.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)}},y.prototype.hasItem=function(e){for(var t in this.items){var i=this.items[t];if(i.name===e)return i.id}return-1},y.prototype.getMetaHandler=function(){return this.meta?this.meta.hdlr.handler:null},y.prototype.getPrimaryItem=function(){return this.meta&&this.meta.pitm?this.getItem(this.meta.pitm.item_id):null},y.prototype.itemToFragmentedTrackFile=function(e){var t=e||{},i=null;if(null==(i=t.itemId?this.getItem(t.itemId):this.getPrimaryItem()))return null;var s=new y;s.discardMdatData=!1;var r={type:i.type,description_boxes:i.properties.boxes};i.properties.ispe&&(r.width=i.properties.ispe.image_width,r.height=i.properties.ispe.image_height);var a=s.addTrack(r);return a?(s.addSample(a,i.data),s):null},y.prototype.write=function(e){for(var t=0;t<this.boxes.length;t++)this.boxes[t].write(e)},y.prototype.createFragment=function(e,t,i){var s=this.getTrackById(e),r=this.getSample(s,t);if(null==r)return this.setNextSeekPositionFromSample(s.samples[t]),null;var a=i||new l;a.endianness=l.BIG_ENDIAN;var n=this.createSingleSampleMoof(r);n.write(a),n.trafs[0].truns[0].data_offset=n.size+8,o.debug("MP4Box","Adjusting data_offset with new value "+n.trafs[0].truns[0].data_offset),a.adjustUint32(n.trafs[0].truns[0].data_offset_position,n.trafs[0].truns[0].data_offset);var d=new u.mdatBox;return d.data=r.data,d.write(a),a},y.writeInitializationSegment=function(e,t,i,s){var r;o.debug("ISOFile","Generating initialization segment");var a=new l;a.endianness=l.BIG_ENDIAN,e.write(a);var n=t.add("mvex");for(i&&n.add("mehd").set("fragment_duration",i),r=0;r<t.traks.length;r++)n.add("trex").set("track_id",t.traks[r].tkhd.track_id).set("default_sample_description_index",1).set("default_sample_duration",s).set("default_sample_size",0).set("default_sample_flags",65536);return t.write(a),a.buffer},y.prototype.save=function(e){var t=new l;t.endianness=l.BIG_ENDIAN,this.write(t),t.save(e)},y.prototype.getBuffer=function(){var e=new l;return e.endianness=l.BIG_ENDIAN,this.write(e),e.buffer},y.prototype.initializeSegmentation=function(){var e,t,i,s;for(null===this.onSegment&&o.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 r=new u.moovBox;r.mvhd=this.moov.mvhd,r.boxes.push(r.mvhd),i=this.getTrackById(this.fragmentedTracks[e].id),r.boxes.push(i),r.traks.push(i),(s={}).id=i.tkhd.track_id,s.user=this.fragmentedTracks[e].user,s.buffer=y.writeInitializationSegment(this.ftyp,r,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(s)}return t},u.Box.prototype.printHeader=function(e){this.size+=8,this.size>d&&(this.size+=8),"uuid"===this.type&&(this.size+=16),e.log(e.indent+"size:"+this.size),e.log(e.indent+"type:"+this.type)},u.FullBox.prototype.printHeader=function(e){this.size+=4,u.Box.prototype.printHeader.call(this,e),e.log(e.indent+"version:"+this.version),e.log(e.indent+"flags:"+this.flags)},u.Box.prototype.print=function(e){this.printHeader(e)},u.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}},y.prototype.print=function(e){e.indent="";for(var t=0;t<this.boxes.length;t++)this.boxes[t]&&this.boxes[t].print(e)},u.mvhdBox.prototype.print=function(e){u.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)},u.tkhdBox.prototype.print=function(e){u.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 A={createFile:function(e,t){var i=void 0===e||e,s=new y(t);return s.discardMdatData=!i,s}};t.createFile=A.createFile}));function Qd(e){return e.reduce(((e,t)=>256*e+t))}function Xd(e){const t=[101,103,119,99],i=e.length-28,s=e.slice(i,i+t.length);return t.every(((e,t)=>e===s[t]))}Yd.Log,Yd.MP4BoxStream,Yd.DataStream,Yd.MultiBufferStream,Yd.MPEG4DescriptorParser,Yd.BoxParser,Yd.XMLSubtitlein4Parser,Yd.Textin4Parser,Yd.ISOFile,Yd.createFile;class Zd{constructor(){this.s=null,this.a=null,this.l=0,this.c=0,this.u=1/0,this.A=!1,this.d=!1,this.r=4194304,this.n=new Uint8Array([30,158,90,33,244,57,83,165,2,70,35,87,215,231,226,108]),this.t=this.n.slice().reverse()}destroy(){this.s=null,this.a=null,this.l=0,this.c=0,this.u=1/0,this.A=!1,this.d=!1,this.r=4194304,this.n=null,this.t=null}transport(e){if(!this.s&&this.l>50)return e;if(this.l++,this.d)return e;const t=new Uint8Array(e);if(this.A){if(!(this.c<this.u))return this.a&&this.s?(this.a.set(t,this.r),this.s.parse(null,this.r,t.byteLength),this.a.slice(this.r,this.r+t.byteLength)):(console.error("video_error_2"),this.d=!0,e);Xd(t)&&this.c++}else{const i=function(e,t){const i=function(e,t){for(let i=0;i<e.byteLength-t.length;i++)for(let s=0;s<t.length&&e[i+s]===t[s];s++)if(s===t.length-1)return i;return null}(e,t);if(i){const t=Qd(e.slice(i+16,i+16+8));return[t,Qd(e.slice(i+24,i+24+8)),function(e){return e.map((e=>~e))}(e.slice(i+32,i+32+t))]}return null}(t,this.t);if(!i)return e;const s=function(e){try{if("object"!=typeof WebAssembly||"function"!=typeof WebAssembly.instantiate)throw null;{const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(!(e instanceof WebAssembly.Module&&new WebAssembly.Instance(e)instanceof WebAssembly.Instance))throw null}}catch(e){return new Error("video_error_4")}let t;try{t={env:{__handle_stack_overflow:()=>e(new Error("video_error_1")),memory:new WebAssembly.Memory({initial:256,maximum:256})}}}catch(e){return new Error("video_error_5")}return t}(e);if(s instanceof Error)return console.error(s.message),this.d=!0,e;this.A=!0,this.u=i[1],Xd(t)&&this.c++,WebAssembly.instantiate(i[2],s).then((e=>{if(!function(e){return"function"==typeof e.parse&&"object"==typeof e.memory}(e.instance.exports))return this.d=!0,void console.error("video_error_3");this.s=e.instance.exports,this.a=new Uint8Array(this.s.memory.buffer)})).catch((e=>{this.d=!0,console.error("video_error_6")}))}return e}}class eh extends Ud{constructor(e){super(e),this.TAG_NAME="Fmp4Loader",this.player=e,this.mp4Box=Yd.createFile(),this.tempFmp4List=[],this.offset=0,this.videoTrackId=null,this.audioTrackId=null,this.isHevc=!1,this.transportDescarmber=null,this.player._opt.isFmp4Private&&(this.transportDescarmber=new Zd),this._listenMp4Box(),e.debug.log(this.TAG_NAME,"init")}destroy(){this.mp4Box&&(this.mp4Box.stop(),this.mp4Box.flush(),this.mp4Box.destroy(),this.mp4Box=null),this.transportDescarmber&&(this.transportDescarmber.destroy(),this.transportDescarmber=null),this.tempFmp4List=[],this.offset=0,this.videoTrackId=null,this.audioTrackId=null,this.isHevc=!1,this.player.debug.log(this.TAG_NAME,"destroy")}_listenMp4Box(){this.mp4Box.onReady=this.onReady.bind(this),this.mp4Box.onError=this.onError.bind(this),this.mp4Box.onSamples=this.onSamples.bind(this)}onReady(e){this.player.debug.log(this.TAG_NAME,"onReady",e);const t=e.videoTracks[0],i=e.audioTracks[0];if(t){this.videoTrackId=t.id;const e=this.getSeqHeader(t);e&&(this.player.debug.log(this.TAG_NAME,"seqHeader",e),this._doDecodeByFmp4(e,Ge,0,!0,0)),this.mp4Box.setExtractionOptions(t.id)}if(i&&this.player._opt.hasAudio){this.audioTrackId=i.id;const e=i.audio||{},t=Hr.indexOf(e.sample_rate),s=i.codec.replace("mp4a.40.","");this.mp4Box.setExtractionOptions(i.id);const r={profile:parseInt(s,10),sampleRate:t,channel:e.channel_count},a=Vr(r);this.player.debug.log(this.TAG_NAME,"aacADTSHeader",a,"config",r),this._doDecodeByFmp4(a,je,0,!1,0)}this.mp4Box.start()}onError(e){this.player.debug.error(this.TAG_NAME,"mp4Box onError",e)}onSamples(e,t,i){if(e===this.videoTrackId)for(const t of i){const i=t.data,s=t.is_sync,r=1e3*t.cts/t.timescale;t.duration,t.timescale,this.player.updateStats({vbps:i.byteLength,dts:r}),s&&this.calcIframeIntervalTimestamp(r);let a=null;a=this.isHevc?Wn(i,s):In(i,s);let o=this.cryptoPayload(a,s);this._doDecodeByFmp4(o,Ge,r,s,0),this.mp4Box.releaseUsedSamples(e,t.number)}else if(e===this.audioTrackId){if(this.player._opt.hasAudio)for(const t of i){const i=t.data;this.player.updateStats({abps:i.byteLength});const s=1e3*t.cts/t.timescale;t.duration,t.timescale;const r=new Uint8Array(i.byteLength+2);r.set([175,1],0),r.set(i,2),this._doDecodeByFmp4(r,je,s,!1,0),this.mp4Box.releaseUsedSamples(e,t.number)}}else this.player.debug.warn(this.TAG_NAME,"onSamples() trackId error",e)}getSeqHeader(e){const t=this.mp4Box.getTrackById(e.id);for(const e of t.mdia.minf.stbl.stsd.entries)if(e.avcC||e.hvcC){const t=new Yd.DataStream(void 0,0,Yd.DataStream.BIG_ENDIAN);let i=[];e.avcC?(e.avcC.write(t),i=[23,0,0,0,0]):(this.isHevc=!0,e.hvcC.write(t),i=[28,0,0,0,0]);const s=new Uint8Array(t.buffer,8),r=new Uint8Array(i.length+s.length);return r.set(i,0),r.set(s,i.length),r}return null}dispatch(e){let t=new Uint8Array(e);this.transportDescarmber&&(t=this.transportDescarmber.transport(t)),t.buffer.fileStart=this.offset,this.offset+=t.byteLength,this.mp4Box.appendBuffer(t.buffer)}downloadFmp4File(){const e=new Blob(this.tempFmp4List,{type:'video/mp4; codecs="avc1.640028,mp4a.40.2"'}),t=URL.createObjectURL(e),i=document.createElement("a");i.href=t,i.download=ha()+".fmp4",i.click(),URL.revokeObjectURL(t)}getInputByteLength(){let e=0;return this.mp4Box&&(e=this.mp4Box.getAllocatedSampleDataSize()),e}}class th extends Ud{constructor(e){super(e),Jd(this,"LOG_NAME","Mpeg4Loader"),this.player=e,this.player.debug.log(this.LOG_NAME,"init")}destroy(){super.destroy(),this.player.debug.log(this.LOG_NAME,"destroy")}}function ih(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if((t=t.filter(Boolean)).length<2)return t[0];const s=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let r=0;return t.forEach((e=>{s.set(e,r),r+=e.byteLength})),s}const sh=3,rh=4,ah=6,oh=15,nh=17,lh=129,dh=135,hh=21,ch=134,uh=27,ph=36;class fh{constructor(){this.slices=[],this.total_length=0,this.expected_length=0,this.random_access_indicator=0}}class mh{constructor(){this.pid=null,this.data=null,this.stream_type=null,this.random_access_indicator=null}}class gh{constructor(){this.pid=null,this.stream_id=null,this.len=null,this.data=null,this.pts=null,this.nearest_pts=null,this.dts=null}}const yh=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];class Ah{constructor(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}isComplete(){let e=!1===this.hasAudio||!0===this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,t=!1===this.hasVideo||!0===this.hasVideo&&null!=this.videoCodec&&null!=this.width&&null!=this.height&&null!=this.fps&&null!=this.profile&&null!=this.level&&null!=this.refFrames&&null!=this.chromaFormat&&null!=this.sarNum&&null!=this.sarDen;return null!=this.mimeType&&e&&t}isSeekable(){return!0===this.hasKeyframesIndex}getNearestKeyframe(e){if(null==this.keyframesIndex)return null;let t=this.keyframesIndex,i=this._search(t.times,e);return{index:i,milliseconds:t.times[i],fileposition:t.filepositions[i]}}_search(e,t){let i=0,s=e.length-1,r=0,a=0,o=s;for(t<e[0]&&(i=0,a=o+1);a<=o;){if(r=a+Math.floor((o-a)/2),r===s||t>=e[r]&&t<e[r+1]){i=r;break}e[r]<t?a=r+1:o=r-1}return i}}class bh{constructor(e){let t=null,i=e.audio_object_type,s=e.audio_object_type,r=e.sampling_freq_index,a=e.channel_config,o=0,n=navigator.userAgent.toLowerCase();-1!==n.indexOf("firefox")?r>=6?(s=5,t=new Array(4),o=r-3):(s=2,t=new Array(2),o=r):-1!==n.indexOf("android")?(s=2,t=new Array(2),o=r):(s=5,o=r,t=new Array(4),r>=6?o=r-3:1===a&&(s=2,t=new Array(2),o=r)),t[0]=s<<3,t[0]|=(15&r)>>>1,t[1]=(15&r)<<7,t[1]|=(15&a)<<3,5===s&&(t[1]|=(15&o)>>>1,t[2]=(1&o)<<7,t[2]|=8,t[3]=0),this.config=t,this.sampling_rate=yh[r],this.sampling_index=r,this.channel_count=a,this.object_type=s,this.original_object_type=i,this.codec_mimetype="mp4a.40."+s,this.original_codec_mimetype="mp4a.40."+i}}class _h extends Ud{constructor(e){super(e),this.player=e,this.TAG_NAME="TsLoaderV2",this.first_parse_=!0,this.tsPacketSize=0,this.syncOffset=0,this.pmt_=null,this.config_=null,this.media_info_=new Ah,this.timescale_=90,this.duration_=0,this.pat_={version_number:0,network_pid:0,program_map_pid:{}},this.current_program_=null,this.current_pmt_pid_=-1,this.program_pmt_map_={},this.pes_slice_queues_={},this.section_slice_queues_={},this.video_metadata_={vps:null,sps:null,pps:null,details:null},this.audio_metadata_={codec:null,audio_object_type:null,sampling_freq_index:null,sampling_frequency:null,channel_config:null},this.last_pcr_=null,this.audio_last_sample_pts_=void 0,this.aac_last_incomplete_data_=null,this.has_video_=!1,this.has_audio_=!1,this.video_init_segment_dispatched_=!1,this.audio_init_segment_dispatched_=!1,this.video_metadata_changed_=!1,this.audio_metadata_changed_=!1,this.loas_previous_frame=null,this.video_track_={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this.audio_track_={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._remainingPacketData=null,this.player.debug.log(this.TAG_NAME,"init")}destroy(){this.media_info_=null,this.pes_slice_queues_=null,this.section_slice_queues_=null,this.video_metadata_=null,this.audio_metadata_=null,this.aac_last_incomplete_data_=null,this.video_track_=null,this.audio_track_=null,this._remainingPacketData=null,super.destroy()}probe(e){let t=new Uint8Array(e),i=-1,s=188;if(t.byteLength<=3*s)return{needMoreData:!0};for(;-1===i;){let e=Math.min(1e3,t.byteLength-3*s);for(let r=0;r<e;){if(71===t[r]&&71===t[r+s]&&71===t[r+2*s]){i=r;break}r++}if(-1===i)if(188===s)s=192;else{if(192!==s)break;s=204}}return-1===i?{match:!1}:(192===s&&i>=4&&(i-=4),{match:!0,consumed:0,ts_packet_size:s,sync_offset:i})}_initPmt(){return{program_number:0,version_number:0,pcr_pid:0,pid_stream_type:{},common_pids:{h264:void 0,h265:void 0,adts_aac:void 0,loas_aac:void 0,opus:void 0,ac3:void 0,eac3:void 0,mp3:void 0},pes_private_data_pids:{},timed_id3_pids:{},synchronous_klv_pids:{},asynchronous_klv_pids:{},scte_35_pids:{},smpte2038_pids:{}}}dispatch(e){let t=new Uint8Array(e);this._remainingPacketData&&(t=ih(this._remainingPacketData,t),this._remainingPacketData=null);let i=t.buffer;const s=this.parseChunks(i);s?this._remainingPacketData=t.subarray(s):t.length<this.tsPacketSize&&(this._remainingPacketData=t)}parseChunks(e){let t=0;if(this.first_parse_){this.first_parse_=!1;const i=this.probe(e);i.match&&(this.tsPacketSize=i.ts_packet_size,this.syncOffset=i.sync_offset),t=this.syncOffset,this.player.debug.log(this.TAG_NAME,`isFirstDispatch and tsPacketSize = ${this.tsPacketSize}, syncOffset = ${this.syncOffset}`)}for(;t+this.tsPacketSize<=e.byteLength;){192===this.tsPacketSize&&(t+=4);const i=new Uint8Array(e,t,188);let s=i[0];if(71!==s){this.player.debug.warn(this.TAG_NAME,`parseChunks() sync_byte = ${s}, not start with 0x47, so break`);break}let r=(64&i[1])>>>6;i[1];let a=(31&i[1])<<8|i[2],o=(48&i[3])>>>4,n=15&i[3],l=!(!this.pmt_||this.pmt_.pcr_pid!==a),d={},h=4;if(2==o||3==o){let e=i[4];if(e>0&&(l||3==o)){if(d.discontinuity_indicator=(128&i[5])>>>7,d.random_access_indicator=(64&i[5])>>>6,d.elementary_stream_priority_indicator=(32&i[5])>>>5,(16&i[5])>>>4){let e=300*(i[6]<<25|i[7]<<17|i[8]<<9|i[9]<<1|i[10]>>>7)+((1&i[10])<<8|i[11]);this.last_pcr_=e}}if(2==o||5+e===188){t+=188,204===this.tsPacketSize&&(t+=16);continue}h=5+e}if(1==o||3==o)if(0===a||a===this.current_pmt_pid_||null!=this.pmt_&&this.pmt_.pid_stream_type[a]===ch){let i=188-h;this.handleSectionSlice(e,t+h,i,{pid:a,payload_unit_start_indicator:r,continuity_conunter:n,random_access_indicator:d.random_access_indicator})}else if(null!=this.pmt_&&null!=this.pmt_.pid_stream_type[a]){let i=188-h,s=this.pmt_.pid_stream_type[a];a!==this.pmt_.common_pids.h264&&a!==this.pmt_.common_pids.h265&&a!==this.pmt_.common_pids.adts_aac&&a!==this.pmt_.common_pids.loas_aac&&a!==this.pmt_.common_pids.ac3&&a!==this.pmt_.common_pids.eac3&&a!==this.pmt_.common_pids.opus&&a!==this.pmt_.common_pids.mp3&&!0!==this.pmt_.pes_private_data_pids[a]&&!0!==this.pmt_.timed_id3_pids[a]&&!0!==this.pmt_.synchronous_klv_pids[a]&&!0!==this.pmt_.asynchronous_klv_pids[a]||this.handlePESSlice(e,t+h,i,{pid:a,stream_type:s,payload_unit_start_indicator:r,continuity_conunter:n,random_access_indicator:d.random_access_indicator})}t+=188,204===this.tsPacketSize&&(t+=16)}return this.dispatchAudioVideoMediaSegment(),t}handleSectionSlice(e,t,i,s){let r=new Uint8Array(e,t,i),a=this.section_slice_queues_[s.pid];if(s.payload_unit_start_indicator){let o=r[0];if(null!=a&&0!==a.total_length){let r=new Uint8Array(e,t+1,Math.min(i,o));a.slices.push(r),a.total_length+=r.byteLength,a.total_length===a.expected_length?this.emitSectionSlices(a,s):this.clearSlices(a,s)}for(let n=1+o;n<r.byteLength;){if(255===r[n+0])break;let o=(15&r[n+1])<<8|r[n+2];this.section_slice_queues_[s.pid]=new fh,a=this.section_slice_queues_[s.pid],a.expected_length=o+3,a.random_access_indicator=s.random_access_indicator;let l=new Uint8Array(e,t+n,Math.min(i-n,a.expected_length-a.total_length));a.slices.push(l),a.total_length+=l.byteLength,a.total_length===a.expected_length?this.emitSectionSlices(a,s):a.total_length>=a.expected_length&&this.clearSlices(a,s),n+=l.byteLength}}else if(null!=a&&0!==a.total_length){let r=new Uint8Array(e,t,Math.min(i,a.expected_length-a.total_length));a.slices.push(r),a.total_length+=r.byteLength,a.total_length===a.expected_length?this.emitSectionSlices(a,s):a.total_length>=a.expected_length&&this.clearSlices(a,s)}}handlePESSlice(e,t,i,s){let r=new Uint8Array(e,t,i),a=r[0]<<16|r[1]<<8|r[2];r[3];let o=r[4]<<8|r[5];if(s.payload_unit_start_indicator){if(1!==a)return void this.player.debug.warn(this.TAG_NAME,`handlePESSlice: packet_start_code_prefix should be 1 but with value ${a}`);let e=this.pes_slice_queues_[s.pid];e&&(0===e.expected_length||e.expected_length===e.total_length?this.emitPESSlices(e,s):this.clearSlices(e,s)),this.pes_slice_queues_[s.pid]=new fh,this.pes_slice_queues_[s.pid].random_access_indicator=s.random_access_indicator}if(null==this.pes_slice_queues_[s.pid])return;let n=this.pes_slice_queues_[s.pid];n.slices.push(r),s.payload_unit_start_indicator&&(n.expected_length=0===o?0:o+6),n.total_length+=r.byteLength,n.expected_length>0&&n.expected_length===n.total_length?this.emitPESSlices(n,s):n.expected_length>0&&n.expected_length<n.total_length&&this.clearSlices(n,s)}emitSectionSlices(e,t){let i=new Uint8Array(e.total_length);for(let t=0,s=0;t<e.slices.length;t++){let r=e.slices[t];i.set(r,s),s+=r.byteLength}e.slices=[],e.expected_length=-1,e.total_length=0;let s={};s.pid=t.pid,s.data=i,s.file_position=e.file_position,s.random_access_indicator=e.random_access_indicator,this.parseSection(s)}emitPESSlices(e,t){let i=new Uint8Array(e.total_length);for(let t=0,s=0;t<e.slices.length;t++){let r=e.slices[t];i.set(r,s),s+=r.byteLength}e.slices=[],e.expected_length=-1,e.total_length=0;let s=new mh;s.pid=t.pid,s.data=i,s.stream_type=t.stream_type,s.random_access_indicator=e.random_access_indicator,this.parsePES(s)}clearSlices(e){e.slices=[],e.expected_length=-1,e.total_length=0}parseSection(e){let t=e.data,i=e.pid;0===i?this.parsePAT(t):i===this.current_pmt_pid_?this.parsePMT(t):null!=this.pmt_&&this.pmt_.scte_35_pids[i]&&this.parseSCTE35(t)}parsePES(e){let t=e.data,i=t[0]<<16|t[1]<<8|t[2],s=t[3],r=t[4]<<8|t[5];if(1===i){if(188!==s&&190!==s&&191!==s&&240!==s&&241!==s&&255!==s&&242!==s&&248!==s){t[6];let i,a,o=(192&t[7])>>>6,n=t[8];2!==o&&3!==o||(i=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,a=3===o?536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2:i);let l,d=9+n;if(0!==r){if(r<3+n)return void this.player.debug.warn(this.TAG_NAME,"Malformed PES: PES_packet_length < 3 + PES_header_data_length");l=r-3-n}else l=t.byteLength-d;let h=t.subarray(d,d+l);switch(e.stream_type){case sh:case rh:this.parseMP3Payload(h,i);break;case ah:this.pmt_.common_pids.opus===e.pid?this.parseOpusPayload(h,i):this.pmt_.common_pids.ac3===e.pid?this.parseAC3Payload(h,i):this.pmt_.common_pids.eac3===e.pid?this.parseEAC3Payload(h,i):this.pmt_.asynchronous_klv_pids[e.pid]?this.parseAsynchronousKLVMetadataPayload(h,e.pid,s):this.pmt_.smpte2038_pids[e.pid]?this.parseSMPTE2038MetadataPayload(h,i,a,e.pid,s):this.parsePESPrivateDataPayload(h,i,a,e.pid,s);break;case oh:this.parseADTSAACPayload(h,i);break;case nh:this.parseLOASAACPayload(h,i);break;case lh:this.parseAC3Payload(h,i);break;case dh:this.parseEAC3Payload(h,i);break;case hh:this.pmt_.timed_id3_pids[e.pid]?this.parseTimedID3MetadataPayload(h,i,a,e.pid,s):this.pmt_.synchronous_klv_pids[e.pid]&&this.parseSynchronousKLVMetadataPayload(h,i,a,e.pid,s);break;case uh:this.parseH264Payload(h,i,a,e.random_access_indicator);break;case ph:this.parseH265Payload(h,i,a,e.random_access_indicator)}}else if((188===s||191===s||240===s||241===s||255===s||242===s||248===s)&&e.stream_type===ah){let i,a=6;i=0!==r?r:t.byteLength-a;let o=t.subarray(a,a+i);this.parsePESPrivateDataPayload(o,void 0,void 0,e.pid,s)}}else this.player.debug.error(this.TAG_NAME,`parsePES: packet_start_code_prefix should be 1 but with value ${i}`)}parsePAT(e){let t=e[0];if(0!==t)return void Log.e(this.TAG,`parsePAT: table_id ${t} is not corresponded to PAT!`);let i=(15&e[1])<<8|e[2];e[3],e[4];let s=(62&e[5])>>>1,r=1&e[5],a=e[6];e[7];let o=null;if(1===r&&0===a)o={version_number:0,network_pid:0,program_pmt_pid:{}},o.version_number=s;else if(o=this.pat_,null==o)return;let n=i-5-4,l=-1,d=-1;for(let t=8;t<8+n;t+=4){let i=e[t]<<8|e[t+1],s=(31&e[t+2])<<8|e[t+3];0===i?o.network_pid=s:(o.program_pmt_pid[i]=s,-1===l&&(l=i),-1===d&&(d=s))}1===r&&0===a&&(null==this.pat_&&this.player.debug.log(this.TAG_NAME,`Parsed first PAT: ${JSON.stringify(o)}`),this.pat_=o,this.current_program_=l,this.current_pmt_pid_=d)}parsePMT(e){let t=e[0];if(2!==t)return void this.player.debug.error(this.TAG_NAME,`parsePMT: table_id ${t} is not corresponded to PMT!`);let i,s=(15&e[1])<<8|e[2],r=e[3]<<8|e[4],a=(62&e[5])>>>1,o=1&e[5],n=e[6];if(e[7],1===o&&0===n)i=this._initPmt(),i.program_number=r,i.version_number=a,this.program_pmt_map_[r]=i;else if(i=this.program_pmt_map_[r],null==i)return;i.pcr_pid=(31&e[8])<<8|e[9];let l=(15&e[10])<<8|e[11],d=12+l,h=s-9-l-4;for(let t=d;t<d+h;){let s=e[t],r=(31&e[t+1])<<8|e[t+2],a=(15&e[t+3])<<8|e[t+4];i.pid_stream_type[r]=s;let o=i.common_pids.h264||i.common_pids.h265,n=i.common_pids.adts_aac||i.common_pids.loas_aac||i.common_pids.ac3||i.common_pids.eac3||i.common_pids.opus||i.common_pids.mp3;if(s!==uh||o)if(s!==ph||o)if(s!==oh||n)if(s!==nh||n)if(s!==lh||n)if(s!==dh||n)if(s!==sh&&s!==rh||n)if(s===ah){if(i.pes_private_data_pids[r]=!0,a>0){for(let s=t+5;s<t+5+a;){let t=e[s+0],a=e[s+1];if(5===t){let t=String.fromCharCode(...Array.from(e.subarray(s+2,s+2+a)));"VANC"===t?i.smpte2038_pids[r]=!0:"Opus"===t?i.common_pids.opus=r:"KLVA"===t&&(i.asynchronous_klv_pids[r]=!0)}else if(127===t&&r===i.common_pids.opus){let t=null;if(128===e[s+2]&&(t=e[s+3]),null==t){Log.e(this.TAG,"Not Supported Opus channel count.");continue}const i={codec:"opus",channel_count:0==(15&t)?2:15&t,channel_config_code:t,sample_rate:48e3},r={codec:"opus",meta:i};0==this.audio_init_segment_dispatched_?(this.audio_metadata_=i,this.dispatchAudioInitSegment(r)):this.detectAudioMetadataChange(r)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(r))}s+=2+a}let o=e.subarray(t+5,t+5+a);this.dispatchPESPrivateDataDescriptor(r,s,o)}}else if(s===hh){if(a>0)for(let s=t+5;s<t+5+a;){let t=e[s+0],a=e[s+1];if(38===t){let t=e[s+2]<<8|e[s+3]<<0,a=null;65535===t&&(a=String.fromCharCode(...Array.from(e.subarray(s+4,s+4+4))));let o=null;if(255===e[s+4+(65535===t?4:0)]){let i=4+(65535===t?4:0)+1;o=String.fromCharCode(...Array.from(e.subarray(s+i,s+i+4)))}"ID3 "===a&&"ID3 "===o?i.timed_id3_pids[r]=!0:"KLVA"===o&&(i.synchronous_klv_pids[r]=!0)}s+=2+a}}else s===ch&&(i.scte_35_pids[r]=!0);else i.common_pids.mp3=r;else i.common_pids.eac3=r;else i.common_pids.ac3=r;else i.common_pids.loas_aac=r;else i.common_pids.adts_aac=r;else i.common_pids.h265=r;else i.common_pids.h264=r;t+=5+a}r===this.current_program_&&(null==this.pmt_&&this.player.debug.log(this.TAG_NAME,`Parsed first PMT: ${JSON.stringify(i)}`),this.pmt_=i,(i.common_pids.h264||i.common_pids.h265)&&(this.has_video_=!0),(i.common_pids.adts_aac||i.common_pids.loas_aac||i.common_pids.ac3||i.common_pids.opus||i.common_pids.mp3)&&(this.has_audio_=!0))}parseSCTE35(e){}parseH264Payload(e,t,i,s){let r=new Fn(e),a=null,o=null,n=[],l=0,d=!1;for(;null!=(a=r.readNextNaluPayload());){let e=new On(a);if(e.type===Mt){let t=xn.parseSPS$2(a.data);this.video_init_segment_dispatched_?!0===this.detectVideoMetadataChange(e,t)&&(this.player.debug.log(this.TAG_NAME,"H264: Critical h264 metadata has been changed, attempt to re-generate InitSegment"),this.video_metadata_changed_=!0,this.video_metadata_={vps:void 0,sps:e,pps:void 0,details:t}):(this.video_metadata_.sps=e,this.video_metadata_.details=t)}else e.type===Ut?this.video_init_segment_dispatched_&&!this.video_metadata_changed_||(this.video_metadata_.pps=e,this.video_metadata_.sps&&this.video_metadata_.pps&&(this.video_metadata_changed_&&this.dispatchVideoMediaSegment(),this.dispatchVideoInitSegment())):(e.type===Pt||e.type===It&&1===s)&&(d=!0);this.video_init_segment_dispatched_&&(n.push(e),l+=e.data.byteLength)}let h=Math.floor(t/this.timescale_),c=Math.floor(i/this.timescale_);if(n.length){let e=this.video_track_;for(let e=0;e<n.length;e++){let t=n[e];if(null==o)o=t.data;else{let e=new Uint8Array(o.byteLength+t.data.byteLength);e.set(o,0),e.set(t.data,o.byteLength),o=e}}let t={length:l,isIFrame:d,dts:c,pts:h,cts:h-c,payload:o,type:Ge,isHevc:!1};e.samples.push(t),e.length=o.byteLength}}parseH265Payload(e,t,i,s){let r=new Yn(e),a=null,o=null,n=[],l=0,d=!1;for(;null!=(a=r.readNextNaluPayload());){let e=new Qn(a);if(e.type===zt){if(!this.video_init_segment_dispatched_){let t=Gn.parseVPS(a.data);this.video_metadata_.vps=e,this.video_metadata_.details={...this.video_metadata_.details,...t}}}else if(e.type===Ht){let t=Gn.parseSPS(a.data);this.video_init_segment_dispatched_?!0===this.detectVideoMetadataChange(e,t)&&(this.player.debug.log(this.TAG_NAME,"H265: Critical h265 metadata has been changed, attempt to re-generate InitSegment"),this.video_metadata_changed_=!0,this.video_metadata_={vps:void 0,sps:e,pps:void 0,details:t}):(this.video_metadata_.sps=e,this.video_metadata_.details={...this.video_metadata_.details,...t})}else if(e.type===Wt){if(!this.video_init_segment_dispatched_||this.video_metadata_changed_){let t=Gn.parsePPS(a.data);this.video_metadata_.pps=e,this.video_metadata_.details={...this.video_metadata_.details,...t},this.video_metadata_.vps&&this.video_metadata_.sps&&this.video_metadata_.pps&&(this.video_metadata_changed_&&this.dispatchVideoMediaSegment(),this.dispatchVideoInitSegment())}}else e.type!==Ot&&e.type!==Nt&&e.type!==jt||(d=!0);this.video_init_segment_dispatched_&&(n.push(e),l+=e.data.byteLength)}let h=Math.floor(t/this.timescale_),c=Math.floor(i/this.timescale_);if(n.length){let e=this.video_track_;for(let e=0;e<n.length;e++){let t=n[e];if(null==o)o=t.data;else{let e=new Uint8Array(o.byteLength+t.data.byteLength);e.set(o,0),e.set(t.data,o.byteLength),o=e}}let t={type:Ge,length:l,isIFrame:d,dts:c,pts:h,cts:h-c,payload:o,isHevc:!0};e.samples.push(t),e.length=o.byteLength}}detectVideoMetadataChange(e,t){if(t.codec_mimetype!==this.video_metadata_.details.codec_mimetype)return this.player.debug.log(this.TAG_NAME,`Video: Codec mimeType changed from ${this.video_metadata_.details.codec_mimetype} to ${t.codec_mimetype}`),!0;if(t.codec_size.width!==this.video_metadata_.details.codec_size.width||t.codec_size.height!==this.video_metadata_.details.codec_size.height){let e=this.video_metadata_.details.codec_size,i=t.codec_size;return this.player.debug.log(this.TAG_NAME,`Video: Coded Resolution changed from ${e.width}x${e.height} to ${i.width}x${i.height}`),!0}return t.present_size.width!==this.video_metadata_.details.present_size.width&&(this.player.debug.log(this.TAG_NAME,`Video: Present resolution width changed from ${this.video_metadata_.details.present_size.width} to ${t.present_size.width}`),!0)}isInitSegmentDispatched(){return this.has_video_&&this.has_audio_?this.video_init_segment_dispatched_&&this.audio_init_segment_dispatched_:this.has_video_&&!this.has_audio_?this.video_init_segment_dispatched_:!(this.has_video_||!this.has_audio_)&&this.audio_init_segment_dispatched_}dispatchVideoInitSegment(){let e=this.video_metadata_.details,t={type:"video"};t.id=this.video_track_.id,t.timescale=1e3,t.duration=this.duration_,t.codecWidth=e.codec_size.width,t.codecHeight=e.codec_size.height,t.presentWidth=e.present_size.width,t.presentHeight=e.present_size.height,t.profile=e.profile_string,t.level=e.level_string,t.bitDepth=e.bit_depth,t.chromaFormat=e.chroma_format,t.sarRatio=e.sar_ratio,t.frameRate=e.frame_rate;let i=t.frameRate.fps_den,s=t.frameRate.fps_num;t.refSampleDuration=i/s*1e3,t.codec=e.codec_mimetype;let r=!1;if(this.video_metadata_.vps){r=!0;let e=this.video_metadata_.vps.data.subarray(4),i=this.video_metadata_.sps.data.subarray(4),s=this.video_metadata_.pps.data.subarray(4);t.hvcc=Vn({vps:e,sps:i,pps:s}),0==this.video_init_segment_dispatched_&&this.player.debug.log(this.TAG_NAME,`Generated first HEVCDecoderConfigurationRecord for mimeType: ${t.codec}`),t.hvcc&&this._doDecodeByTs(t.hvcc,Ge,0,!0,0)}else{let e=this.video_metadata_.sps.data.subarray(4),i=this.video_metadata_.pps.data.subarray(4);t.avcc=Ln({sps:e,pps:i}),0==this.video_init_segment_dispatched_&&this.player.debug.log(this.TAG_NAME,`Generated first AVCDecoderConfigurationRecord for mimeType: ${t.codec}`),t.avcc&&this._doDecodeByTs(t.avcc,Ge,0,!0,0)}this.video_init_segment_dispatched_=!0,this.video_metadata_changed_=!1;let a=this.media_info_;a.hasVideo=!0,a.width=t.codecWidth,a.height=t.codecHeight,a.fps=t.frameRate.fps,a.profile=t.profile,a.level=t.level,a.refFrames=e.ref_frames,a.chromaFormat=e.chroma_format_string,a.sarNum=t.sarRatio.width,a.sarDen=t.sarRatio.height,a.videoCodec=t.codec,a.hasAudio&&a.audioCodec?a.mimeType=`video/mp2t; codecs="${a.videoCodec},${a.audioCodec}"`:a.mimeType=`video/mp2t; codecs="${a.videoCodec}"`,this.player.video.updateVideoInfo({width:t.codecWidth,height:t.codecHeight,encTypeCode:r?wt:vt})}dispatchVideoMediaSegment(){this.isInitSegmentDispatched()&&this.video_track_.length&&this._preDoDecode()}dispatchAudioMediaSegment(){this.isInitSegmentDispatched()&&this.audio_track_.length&&this._preDoDecode()}dispatchAudioVideoMediaSegment(){this.isInitSegmentDispatched()&&(this.audio_track_.length||this.video_track_.length)&&this._preDoDecode()}parseADTSAACPayload(e,t){if(this.has_video_&&!this.video_init_segment_dispatched_)return;if(this.aac_last_incomplete_data_){let t=new Uint8Array(e.byteLength+this.aac_last_incomplete_data_.byteLength);t.set(this.aac_last_incomplete_data_,0),t.set(e,this.aac_last_incomplete_data_.byteLength),e=t}let i,s;if(null!=t&&(s=t/this.timescale_),"aac"===this.audio_metadata_.codec){if(null==t&&null!=this.audio_last_sample_pts_)i=1024/this.audio_metadata_.sampling_frequency*1e3,s=this.audio_last_sample_pts_+i;else if(null==t)return void this.player.debug.warn(this.TAG_NAME,"AAC: Unknown pts");if(this.aac_last_incomplete_data_&&this.audio_last_sample_pts_){i=1024/this.audio_metadata_.sampling_frequency*1e3;let e=this.audio_last_sample_pts_+i;Math.abs(e-s)>1&&(this.player.debug.warn(this.TAG_NAME,`AAC: Detected pts overlapped, expected: ${e}ms, PES pts: ${s}ms`),s=e)}}let r,a=new ia(e),o=null,n=s;for(;null!=(o=a.readNextAACFrame());){i=1024/o.sampling_frequency*1e3;const e={codec:"aac",data:o};0==this.audio_init_segment_dispatched_?(this.audio_metadata_={codec:"aac",audio_object_type:o.audio_object_type,sampling_freq_index:o.sampling_freq_index,sampling_frequency:o.sampling_frequency,channel_config:o.channel_config},this.dispatchAudioInitSegment(e)):this.detectAudioMetadataChange(e)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(e)),r=n;let t=Math.floor(n);const s=new Uint8Array(o.data.length+2);s.set([175,1],0),s.set(o.data,2);let a={payload:s,length:s.byteLength,pts:t,dts:t,type:je};this.audio_track_.samples.push(a),this.audio_track_.length+=s.byteLength,n+=i}a.hasIncompleteData()&&(this.aac_last_incomplete_data_=a.getIncompleteData()),r&&(this.audio_last_sample_pts_=r)}parseLOASAACPayload(e,t){if(this.has_video_&&!this.video_init_segment_dispatched_)return;if(this.aac_last_incomplete_data_){let t=new Uint8Array(e.byteLength+this.aac_last_incomplete_data_.byteLength);t.set(this.aac_last_incomplete_data_,0),t.set(e,this.aac_last_incomplete_data_.byteLength),e=t}let i,s;if(null!=t&&(s=t/this.timescale_),"aac"===this.audio_metadata_.codec){if(null==t&&null!=this.audio_last_sample_pts_)i=1024/this.audio_metadata_.sampling_frequency*1e3,s=this.audio_last_sample_pts_+i;else if(null==t)return void this.player.debug.warn(this.TAG_NAME,"AAC: Unknown pts");if(this.aac_last_incomplete_data_&&this.audio_last_sample_pts_){i=1024/this.audio_metadata_.sampling_frequency*1e3;let e=this.audio_last_sample_pts_+i;Math.abs(e-s)>1&&(this.player.debug.warn(this.TAG,`AAC: Detected pts overlapped, expected: ${e}ms, PES pts: ${s}ms`),s=e)}}let r,a=new sa(e),o=null,n=s;for(;null!=(o=a.readNextAACFrame(Ua(this.loas_previous_frame)?void 0:this.loas_previous_frame));){this.loas_previous_frame=o,i=1024/o.sampling_frequency*1e3;const e={codec:"aac",data:o};0==this.audio_init_segment_dispatched_?(this.audio_metadata_={codec:"aac",audio_object_type:o.audio_object_type,sampling_freq_index:o.sampling_freq_index,sampling_frequency:o.sampling_frequency,channel_config:o.channel_config},this.dispatchAudioInitSegment(e)):this.detectAudioMetadataChange(e)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(e)),r=n;let t=Math.floor(n);const s=new Uint8Array(o.data.length+2);s.set([175,1],0),s.set(o.data,2);let a={payload:s,length:s.byteLength,pts:t,dts:t,type:je};this.audio_track_.samples.push(a),this.audio_track_.length+=s.byteLength,n+=i}a.hasIncompleteData()&&(this.aac_last_incomplete_data_=a.getIncompleteData()),r&&(this.audio_last_sample_pts_=r)}parseAC3Payload(e,t){}parseEAC3Payload(e,t){}parseOpusPayload(e,t){}parseMP3Payload(e,t){if(this.has_video_&&!this.video_init_segment_dispatched_)return;let i=[44100,48e3,32e3,0],s=[22050,24e3,16e3,0],r=[11025,12e3,8e3,0],a=e[1]>>>3&3,o=(6&e[1])>>1;e[2];let n=(12&e[2])>>>2,l=3!==(e[3]>>>6&3)?2:1,d=0,h=34;switch(a){case 0:d=r[n];break;case 2:d=s[n];break;case 3:d=i[n]}switch(o){case 1:h=34;break;case 2:h=33;break;case 3:h=32}const c={};c.object_type=h,c.sample_rate=d,c.channel_count=l,c.data=e;const u={codec:"mp3",data:c};0==this.audio_init_segment_dispatched_?(this.audio_metadata_={codec:"mp3",object_type:h,sample_rate:d,channel_count:l},this.dispatchAudioInitSegment(u)):this.detectAudioMetadataChange(u)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(u));let p={payload:e,length:e.byteLength,pts:t/this.timescale_,dts:t/this.timescale_,type:je};this.audio_track_.samples.push(p),this.audio_track_.length+=e.byteLength}detectAudioMetadataChange(e){if(e.codec!==this.audio_metadata_.codec)return this.player.debug.log(this.TAG_NAME,`Audio: Audio Codecs changed from ${this.audio_metadata_.codec} to ${e.codec}`),!0;if("aac"===e.codec&&"aac"===this.audio_metadata_.codec){const t=e.data;if(t.audio_object_type!==this.audio_metadata_.audio_object_type)return this.player.debug.log(this.TAG_NAME,`AAC: AudioObjectType changed from ${this.audio_metadata_.audio_object_type} to ${t.audio_object_type}`),!0;if(t.sampling_freq_index!==this.audio_metadata_.sampling_freq_index)return this.player.debug.log(this.TAG_NAME,`AAC: SamplingFrequencyIndex changed from ${this.audio_metadata_.sampling_freq_index} to ${t.sampling_freq_index}`),!0;if(t.channel_config!==this.audio_metadata_.channel_config)return this.player.debug.log(this.TAG_NAME,`AAC: Channel configuration changed from ${this.audio_metadata_.channel_config} to ${t.channel_config}`),!0}else if("ac-3"===e.codec&&"ac-3"===this.audio_metadata_.codec){const t=e.data;if(t.sampling_frequency!==this.audio_metadata_.sampling_frequency)return this.player.debug.log(this.TAG_NAME,`AC3: Sampling Frequency changed from ${this.audio_metadata_.sampling_frequency} to ${t.sampling_frequency}`),!0;if(t.bit_stream_identification!==this.audio_metadata_.bit_stream_identification)return this.player.debug.log(this.TAG_NAME,`AC3: Bit Stream Identification changed from ${this.audio_metadata_.bit_stream_identification} to ${t.bit_stream_identification}`),!0;if(t.bit_stream_mode!==this.audio_metadata_.bit_stream_mode)return this.player.debug.log(this.TAG_NAME,`AC3: BitStream Mode changed from ${this.audio_metadata_.bit_stream_mode} to ${t.bit_stream_mode}`),!0;if(t.channel_mode!==this.audio_metadata_.channel_mode)return this.player.debug.log(this.TAG_NAME,`AC3: Channel Mode changed from ${this.audio_metadata_.channel_mode} to ${t.channel_mode}`),!0;if(t.low_frequency_effects_channel_on!==this.audio_metadata_.low_frequency_effects_channel_on)return this.player.debug.log(this.TAG_NAME,`AC3: Low Frequency Effects Channel On changed from ${this.audio_metadata_.low_frequency_effects_channel_on} to ${t.low_frequency_effects_channel_on}`),!0}else if("opus"===e.codec&&"opus"===this.audio_metadata_.codec){const t=e.meta;if(t.sample_rate!==this.audio_metadata_.sample_rate)return this.player.debug.log(this.TAG_NAME,`Opus: SamplingFrequencyIndex changed from ${this.audio_metadata_.sample_rate} to ${t.sample_rate}`),!0;if(t.channel_count!==this.audio_metadata_.channel_count)return this.player.debug.log(this.TAG_NAME,`Opus: Channel count changed from ${this.audio_metadata_.channel_count} to ${t.channel_count}`),!0}else if("mp3"===e.codec&&"mp3"===this.audio_metadata_.codec){const t=e.data;if(t.object_type!==this.audio_metadata_.object_type)return this.player.debug.log(this.TAG_NAME,`MP3: AudioObjectType changed from ${this.audio_metadata_.object_type} to ${t.object_type}`),!0;if(t.sample_rate!==this.audio_metadata_.sample_rate)return this.player.debug.log(this.TAG_NAME,`MP3: SamplingFrequencyIndex changed from ${this.audio_metadata_.sample_rate} to ${t.sample_rate}`),!0;if(t.channel_count!==this.audio_metadata_.channel_count)return this.player.debug.log(this.TAG_NAME,`MP3: Channel count changed from ${this.audio_metadata_.channel_count} to ${t.channel_count}`),!0}return!1}dispatchAudioInitSegment(e){let t={type:"audio"};t.id=this.audio_track_.id,t.timescale=1e3,t.duration=this.duration_;let i="";if("aac"===this.audio_metadata_.codec){let s="aac"===e.codec?e.data:null,r=new bh(s);t.audioSampleRate=r.sampling_rate,t.audioSampleRateIndex=r.sampling_index,t.channelCount=r.channel_count,t.codec=r.codec_mimetype,t.originalCodec=r.original_codec_mimetype,t.config=r.config,t.refSampleDuration=1024/t.audioSampleRate*t.timescale,i=Et;const a=Vr({profile:this.player._opt.mseDecodeAudio?r.object_type:r.original_object_type,sampleRate:t.audioSampleRateIndex,channel:t.channelCount});console.error("aacADTSHeader",`profile: ${r.object_type}, sampleRate: ${t.audioSampleRateIndex}, channel: ${t.channelCount}`),this._doDecodeByTs(a,je,0,!1,0)}else"ac-3"===this.audio_metadata_.codec||"ec-3"===this.audio_metadata_.codec||"opus"===this.audio_metadata_.codec||"mp3"===this.audio_metadata_.codec&&(t.audioSampleRate=this.audio_metadata_.sample_rate,t.channelCount=this.audio_metadata_.channel_count,t.codec="mp3",t.originalCodec="mp3",t.config=void 0,i=kt);0==this.audio_init_segment_dispatched_&&this.player.debug.log(this.TAG_NAME,`Generated first AudioSpecificConfig for mimeType: ${t.codec}`),this.audio_init_segment_dispatched_=!0,this.video_metadata_changed_=!1;let s=this.media_info_;s.hasAudio=!0,s.audioCodec=t.originalCodec,s.audioSampleRate=t.audioSampleRate,s.audioChannelCount=t.channelCount,s.hasVideo&&s.videoCodec?s.mimeType=`video/mp2t; codecs="${s.videoCodec},${s.audioCodec}"`:s.mimeType=`video/mp2t; codecs="${s.audioCodec}"`,i&&this.player.audio.updateAudioInfo({encTypeCode:i,channels:t.channelCount,sampleRate:t.audioSampleRate})}dispatchPESPrivateDataDescriptor(e,t,i){}parsePESPrivateDataPayload(e,t,i,s,r){let a=new gh;if(a.pid=s,a.stream_id=r,a.len=e.byteLength,a.data=e,null!=t){let e=Math.floor(t/this.timescale_);a.pts=e}else a.nearest_pts=this.getNearestTimestampMilliseconds();if(null!=i){let e=Math.floor(i/this.timescale_);a.dts=e}}parseTimedID3MetadataPayload(e,t,i,s,r){this.player.debug.log(this.TAG_NAME,`Timed ID3 Metadata: pid=${s}, pts=${t}, dts=${i}, stream_id=${r}`)}parseSynchronousKLVMetadataPayload(e,t,i,s,r){this.player.debug.log(this.TAG_NAME,`Synchronous KLV Metadata: pid=${s}, pts=${t}, dts=${i}, stream_id=${r}`)}parseAsynchronousKLVMetadataPayload(e,t,i){this.player.debug.log(this.TAG_NAME,`Asynchronous KLV Metadata: pid=${t}, stream_id=${i}`)}parseSMPTE2038MetadataPayload(e,t,i,s,r){this.player.debug.log(this.TAG_NAME,`SMPTE 2038 Metadata: pid=${s}, pts=${t}, dts=${i}, stream_id=${r}`)}getNearestTimestampMilliseconds(){if(null!=this.audio_last_sample_pts_)return Math.floor(this.audio_last_sample_pts_);if(null!=this.last_pcr_){return Math.floor(this.last_pcr_/300/this.timescale_)}}_preDoDecode(){const e=this.video_track_,t=this.audio_track_;let i=e.samples;t.samples.length>0&&(i=e.samples.concat(t.samples),i=i.sort(((e,t)=>e.dts-t.dts))),i.forEach((e=>{const t=new Uint8Array(e.payload);delete e.payload,e.type===Ge?this._doDecodeVideo({...e,payload:t}):e.type===je&&this._doDecodeAudio({...e,payload:t})})),e.samples=[],e.length=0,t.samples=[],t.length=0}_doDecodeVideo(e){const t=new Uint8Array(e.payload);let i=null;i=e.isHevc?Wn(t,e.isIFrame):In(t,e.isIFrame),this.player.updateStats({dts:e.dts,vbps:i.byteLength}),e.isIFrame&&this.calcIframeIntervalTimestamp(e.dts);let s=this.cryptoPayload(i,e.isIFrame);this._doDecodeByTs(s,Ge,e.dts,e.isIFrame,e.cts)}_doDecodeAudio(e){const t=new Uint8Array(e.payload);this.player.updateStats({abps:t.byteLength});let i=t;yo(this.player._opt.m7sCryptoAudio)&&(i=this.cryptoPayloadAudio(t)),this._doDecodeByTs(i,je,e.dts,!1,0)}getInputByteLength(){return this._remainingPacketData&&this._remainingPacketData.byteLength||0}}class vh{constructor(e){return new(vh.getLoaderFactory(e))(e)}static getLoaderFactory(e){const t=e._opt.demuxType;return t===C?$d:t===k||e.isWebrtcH265()?zd:t===D?Hd:t===L?qd:t===I?eh:t===P?th:t===M?_h:Kd}}class wh extends a{constructor(e){super(),this.player=e,this.TAG_NAME="Webcodecs",this.hasInit=!1,this.isDecodeFirstIIframe=!!Ao(e._opt.checkFirstIFrame),this.isInitInfo=!1,this.prevTimestamp=null,this.decodeDiffTimestamp=null,this.prevDts=null,this.decoder=null,this.isWidthOrHeightChanged=!1,this.initDecoder(),e.debug.log(this.TAG_NAME,"init")}destroy(){this.decoder&&(Ao(this.isDecodeStateClosed())&&this.decoder.close(),this.decoder=null),this.prevTimestamp=null,this.decodeDiffTimestamp=null,this.prevDts=null,this.hasInit=!1,this.isInitInfo=!1,this.isDecodeFirstIIframe=!1,this.isWidthOrHeightChanged=!1,this.off(),this.player.debug.log(this.TAG_NAME,"destroy")}initDecoder(){const e=this;this.decoder=new VideoDecoder({output(t){e.handleDecode(t)},error(t){e.handleError(t)}})}handleDecode(e){this.isInitInfo||(this.player.video.updateVideoInfo({width:e.codedWidth,height:e.codedHeight}),this.player.video.initCanvasViewSize(),this.isInitInfo=!0),this.player.isPlayer()?(this.player.updateStats({dfps:!0}),this.player._times.videoStart||(this.player._times.videoStart=ha(),this.player.handlePlayToRenderTimes()),this.player.video.render({videoFrame:e,ts:e.timestamp}),this.player.handleRender()):this.player.isPlayback()&&(this.player.updateStats({dfps:!0}),Ao(this.player.playbackPause)?(this.player.playback.isUseLocalCalculateTime&&this.player.playback.increaseLocalTimestamp(),this.player.playback.isUseFpsRender?this.player.video.pushData({videoFrame:e,ts:e.timestamp}):this.player.video.render$2({videoFrame:e,ts:e.timestamp})):Ao(this.player.playback.isPlaybackPauseClearCache)&&this.player.playback.isCacheBeforeDecodeForFpsRender&&this.player.playback.isUseFpsRender&&this.player.video.pushData({videoFrame:e,ts:e.timestamp}))}handleError(e){this.player.debug.error(this.TAG_NAME,"VideoDecoder handleError:",e.code,e);const t=e.toString();-1!==t.indexOf(ds)?this.player.emitError(ut.webcodecsUnsupportedConfigurationError,t):-1!==t.indexOf(hs)||-1!==t.indexOf(cs)||-1!==t.indexOf(us)?this.player.emitError(ut.webcodecsDecodeError,t):-1!==t.indexOf(ps)&&this.player.emitError(ut.webcodecsH265NotSupport)}decodeVideo(e,t,i,s){if(this.player)if(this.player.isDestroyedOrClosed())this.player.debug.warn(this.TAG_NAME,"decodeVideo() player is destroyed");else if(this.hasInit)if(!this.isDecodeFirstIIframe&&i&&(this.isDecodeFirstIIframe=!0),this.isDecodeFirstIIframe){if(this.isDecodeStateClosed())return void this.player.debug.warn(this.TAG_NAME,"VideoDecoder isDecodeStateClosed true");if(i&&0===e[1]){const t=15&e[0];let i={};if(t===vt){i=Dn(e.slice(5))}else t===wt&&(i=zn(e));const s=this.player.video.videoInfo;s&&s.width&&s.height&&i&&i.codecWidth&&i.codecHeight&&(i.codecWidth!==s.width||i.codecHeight!==s.height)&&(this.player.debug.warn(this.TAG_NAME,`decodeVideo: video width or height is changed,\n old width is ${s.width}, old height is ${s.height},\n new width is ${i.codecWidth}, new height is ${i.codecHeight},\n and emit change event`),this.isWidthOrHeightChanged=!0,this.player.emitError(ut.wcsWidthOrHeightChange))}if(this.isWidthOrHeightChanged)return void this.player.debug.warn(this.TAG_NAME,"decodeVideo: video width or height is changed, and return");if(go(e))return void this.player.debug.warn(this.TAG_NAME,"decodeVideo and payload is video sequence header so drop this frame");if(e.byteLength<12)return void this.player.debug.warn(this.TAG_NAME,`decodeVideo and payload is too small , payload length is ${e.byteLength}`);let s=!1,r=(new Date).getTime();this.prevTimestamp||(this.prevTimestamp=r,s=!0);const a=r-this.prevTimestamp;this.decodeDiffTimestamp=a,a>500&&!s&&this.player.isPlayer()&&this.player.debug.warn(this.TAG_NAME,"decodeVideo diff time is ",a);const o=e.slice(5),n=new EncodedVideoChunk({data:o,timestamp:t,type:i?di:hi});this.player.emit(lt.timeUpdate,t);try{this.decoder.decode(n)}catch(e){this.player.debug.error(this.TAG_NAME,"VideoDecoder",e);const t=e.toString();(-1!==t.indexOf(ns)||-1!==t.indexOf(ls))&&this.player.emitError(ut.webcodecsDecodeError)}this.prevTimestamp=(new Date).getTime()}else this.player.debug.log(this.TAG_NAME,"VideoDecoder first frame is not iFrame");else if(i&&e[1]===vs){const t=15&e[0];if(this.player.video.updateVideoInfo({encTypeCode:t}),t===wt&&!Ia()){const e=va();return this.player.debug.warn(this.TAG_NAME,"WebcodecsDecoder not support hevc decode",e.type,e.version),void this.player.emitError(ut.webcodecsH265NotSupport)}this.player._times.decodeStart||(this.player._times.decodeStart=ha());let i=null,s=null;const r=e.slice(5);if(t===vt?(s=Dn(r),i={codec:s.codec,description:r}):t===wt&&(s=$n(r),i={codec:s.codec,description:r}),!i||i&&!i.codec)return this.player.debug.warn(this.TAG_NAME,"decodeVideo and webcodecs configure is",JSON.stringify(i)),void this.player.emitError(ut.webcodecsDecodeConfigureError);s&&s.codecWidth&&s.codecHeight&&(i.codedHeight=s.codecHeight,i.codedWidth=s.codecWidth),this.player.recorder&&this.player._opt.recordType===S&&this.player.recorder.initMetaData(e,t),this.player.debug.log(this.TAG_NAME,`decoder.configure() and codec is ${i.codec}`);try{this.decoder.configure(i),this.hasInit=!0}catch(e){this.player.debug.log(this.TAG_NAME,"configure error",e.code,e);-1!==e.toString().indexOf(ps)?this.player.emitError(ut.webcodecsH265NotSupport):this.player.emitError(ut.webcodecsDecodeConfigureError)}}}getDecodeDiffTimes(){return this.decodeDiffTimestamp}isDecodeStateClosed(){return"closed"===this.decoder.state}isDecodeStateConfigured(){return"configured"===this.decoder.state}isDecodeStateUnConfigured(){return"unconfigured"===this.decoder.state}}const Sh={play:"播放",pause:"暂停",audio:"",mute:"",screenshot:"截图",loading:"",fullscreen:"全屏",fullscreenExit:"退出全屏",record:"录制",recordStop:"停止录制",narrow:"缩小",expand:"放大",ptz:"操作盘",ptzActive:"操作盘激活",zoom:"电子放大",zoomStop:"关闭电子放大",close:"关闭",performance:"性能面板",performanceActive:"性能面板激活",face:"人脸识别",faceActive:"人脸识别激活",object:"物品识别",objectActive:"物品识别激活",occlusion:"遮挡物检查",occlusionActive:"遮挡物检查激活",logSave:"保存日志"};var Th=Object.keys(Sh).reduce(((e,t)=>(e[t]=`\n <i class="jb-pro-icon jb-pro-icon-${t}"></i>\n ${Sh[t]?`<span class="icon-title-tips"><span class="icon-title">${Sh[t]}</span></span>`:""}\n`,e)),{});function Eh(e,t){let i=!1;return e.forEach((e=>{i||e.startTimestamp<=t&&e.endTimestamp>t&&(i=!0)})),i}function kh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;const s=e.length,r=t.length,a=Math.max(s,r),o=2e3,n=Math.ceil(a/o);let l=0,d=0;function h(){let r="",a="";for(let i=0;i<o;i++){const i=e[d];i&&(r+=`\n <div class="jb-pro-playback-time-minute-one${i.hasRecord?" active":""}${i.isStart?" start":""}" data-has-record="${i.hasRecord}"\n data-time="${i.timestamp}" data-type="${i.dataType}">\n <span class="jb-pro-playback-time-title-tips ${d>s-60?"jb-pro-playback-time-title-tips-left":""}"><span class="jb-pro-playback-time-title">${i.title}</span></span>\n </div>\n `);const o=t[d];o&&(a+=`\n <div class="jb-pro-playback-time-hour" data-hour="${o.hour}" data-min="${o.min}" data-second="${o.second}"><span class="jb-pro-playback-time-hour-text">${o.title}</span></div>\n `),d+=1}r&&i.$playbackTimeListOne.insertAdjacentHTML("beforeend",r),a&&i.$playbackTimeListSecond.insertAdjacentHTML("beforeend",a),l+=1,l<n&&(i.rafId=window.requestAnimationFrame(h))}h()}function Ch(e,t){const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];const i=(e[0]||{}).startTimestamp;for(let s=0;s<1440;s++){const r=s%60==0;let a=!1;i&&(a=Eh(e,Va(i,s))),t.push({title:$a(s),timestamp:s,dataType:"min",hasRecord:a,isStart:r})}return t}(e);kh(i,function(){let e=[];for(let t=0;t<24;t++){let i=t+":00";t<10&&(i="0"+i),e.push({title:i,hour:t,min:0,second:0})}return e}(),t)}function xh(e,t){const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];const i=(e[0]||{}).startTimestamp;for(let s=0;s<1440;s++){let r=60*s,a=r%1800==0,o=!1;i&&(o=Eh(e,Wa(i,r))),t.push({title:Ha(r),timestamp:r,dataType:"second",hasRecord:o,isStart:a});let n=60*s+30;a=n%1800==0,i&&(o=Eh(e,Wa(i,n))),t.push({title:Ha(n),timestamp:n,dataType:"second",hasRecord:o,isStart:a})}return t}(e);kh(i,function(){let e=[];for(let t=0;t<24;t++){let i=t+":00",s=t+":30";t<10&&(i="0"+i,s="0"+s),e.push({title:i,hour:t,min:0,second:0}),e.push({title:s,hour:t,min:30,second:0})}return e}(),t)}function Rh(e,t){const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];const i=(e[0]||{}).startTimestamp;for(let s=0;s<144;s++)for(let r=0;r<60;r++){let a=10*r+600*s,o=a%600==0,n=!1;i&&(n=Eh(e,Wa(i,a))),t.push({title:Ha(a),timestamp:a,dataType:"second",isStart:o,hasRecord:n})}return t}(e);kh(i,function(){let e=[];for(let t=0;t<24;t++){let i=t+":00";t<10&&(i="0"+i),e.push({title:i,hour:t,min:0,second:0});for(let s=1;s<6;s++){let r=s+"0";e.push({title:i.replace(":00",":"+r),hour:t,min:10*s,second:0})}}return e}(),t)}function Dh(e,t){const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];const i=(e[0]||{}).startTimestamp;for(let s=0;s<288;s++)for(let r=0;r<60;r++){let a=5*r+300*s,o=a%300==0,n=!1;i&&(n=Eh(e,Wa(i,a))),t.push({title:Ha(a),timestamp:a,dataType:"second",isStart:o,hasRecord:n})}return t}(e);kh(i,function(){let e=[];for(let t=0;t<24;t++){let i=t+":00";t<10&&(i="0"+i),e.push({title:i,hour:t,min:0,second:0}),e.push({title:i.replace(":00",":05"),hour:t,min:5,second:0});for(let s=1;s<6;s++){let r=s+"0",a=s+"5";e.push({title:i.replace(":00",":"+r),hour:t,min:10*s,second:0}),e.push({title:i.replace(":00",":"+a),hour:t,min:10*s+5,second:0})}}return e}(),t)}function Lh(e){const t=Math.floor(e/3600),i=Math.floor((e-3600*t)/60),s=Math.floor(e-3600*t-60*i);return(t>0?[t,i,s]:[i,s]).map((e=>e<10?`0${e}`:String(e))).join(":")}function Ih(e,t,i){const s=e.$playbackProgress,{left:r}=s.getBoundingClientRect(),a=ca((ya()?i.touches[0].clientX:i.pageX)-r,0,s.clientWidth),o=parseInt(a/s.clientWidth*t,10);return{second:o,time:Lh(o),width:a,percentage:ca(a/s.clientWidth,0,1)}}function Ph(e,t){return e.classList.add(t)}function Bh(e,t){return t instanceof Element?e.appendChild(t):e.insertAdjacentHTML("beforeend",String(t)),e.lastElementChild||e.lastChild}function Mh(e,t,i){return e&&e.style&&Oa(t)&&(e.style[t]=i),e}function Uh(e,t){return e.composedPath&&e.composedPath().indexOf(t)>-1}function Fh(e){let t=!1;return e&&e.parentNode&&(e.parentNode.removeChild(e),t=!0),t}var Oh=(e,t)=>{const{events:{proxy:i}}=e,s=document.createElement("object");s.setAttribute("aria-hidden","true"),s.setAttribute("tabindex",-1),s.type="text/html",s.data="about:blank",ua(s,{display:"block",position:"absolute",top:"0",left:"0",height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:"-1"});let r=e.width,a=e.height;const o=xa((()=>{e.width===r&&e.height===a||(r=e.width,a=e.height,e.emit(lt.resize),c())}),500);i(s,"load",(()=>{i(s.contentDocument.defaultView,"resize",(()=>{o()}))})),e.$container.appendChild(s),e.on(lt.destroy,(()=>{e.$container.removeChild(s)})),e.on(lt.volumechange,(()=>{!function(e){if(0===e)ua(t.$volumeOn,"display","none"),ua(t.$volumeOff,"display","flex"),ua(t.$volumeHandle,"top","48px");else if(t.$volumeHandle&&t.$volumePanel){const i=pa(t.$volumePanel,"height")||60,s=pa(t.$volumeHandle,"height"),r=i-(i-s)*e-s;ua(t.$volumeHandle,"top",`${r}px`),ua(t.$volumeOn,"display","flex"),ua(t.$volumeOff,"display","none")}t.$volumePanelText&&(t.$volumePanelText.innerHTML=parseInt(100*e))}(e.volume)})),e.on(lt.loading,(i=>{ua(t.$loading,"display",i?"flex":"none"),(Ao(e._opt.backgroundLoadingShow)&&yo(i)||Ao(i))&&ua(t.$poster,"display","none"),i&&(ua(t.$playBig,"display","none"),ua(t.$tipsMessage,"display","none")),i||e._opt.extendDomConfig.showAfterLoading&&t.$extendDom&&ua(t.$extendDom,"display","block"),i||e.getRenderType()===W&&Ao(e._opt.useMSE)&&n()})),e.on(lt.removeLoadingBgImage,(()=>{n()}));const n=()=>{t.$loadingBgImage&&t.$loadingBg&&t.$loadingBgImage.src&&(e.debug&&e.debug.log("Control","remove loading bg image"),t.$loadingBgImage.width=0,t.$loadingBgImage.height=0,t.$loadingBgImage.src="",ua(t.$loadingBg,"display","none"))},l=t=>{e.fullscreen?Za(t)===e.$container&&d():d()},d=i=>{let s=Fa(i)?i:e.fullscreen;ua(t.$fullscreenExit,"display",s?"flex":"none"),ua(t.$fullscreen,"display",s?"none":"flex")},h=()=>e._opt.playType===w&&e._opt.playbackConfig.showControl,c=i=>{ya()&&t.$controls&&e._opt.useWebFullScreen&&setTimeout((()=>{if(e.fullscreen){const i=h()?Qt:Yt;let s=e.height/2-e.width+i/2,r=e.height/2-i/2;if(t.$controls.style.transform=`translateX(${-s}px) translateY(-${r}px) rotate(-90deg)`,t.$zoomControls){const i=156,s=30,r=e.width/2+i/2-s/2;t.$zoomControls.style.transform=`translateX(${-r}px) translateY(${e.height/2}px) rotate(-90deg)`}if(t.$recording){const i=101,s=20,r=e.width/2+i/2-s/2;t.$recording.style.transform=`translateX(${-r}px) translateY(${e.height/2}px) rotate(-90deg)`}}else t.$controls.style.transform="translateX(0) translateY(0) rotate(0)",t.$zoomControls&&(t.$zoomControls.style.transform="translateX(-50%) translateY(0) rotate(0)"),t.$recording&&(t.$recording.style.transform="translateX(-50%) translateY(0) rotate(0)");i&&i()}),10)};try{jr.on("change",l),e.events.destroys.push((()=>{jr.off("change",l)}))}catch(e){}e.on(lt.webFullscreen,(e=>{ya()&&(d(e),c((()=>{p()})))})),e.on(lt.recording,(()=>{e.playing&&(ua(t.$record,"display",e.recording?"none":"flex"),ua(t.$recordStop,"display",e.recording?"flex":"none"),(e._opt.hasControl||e._opt.isShowRecordingUI)&&(ua(t.$recording,"display",e.recording?"flex":"none"),Ao(e.recording)&&t.$recordingTime&&(t.$recordingTime.innerHTML=za(0))))})),e.on(lt.recordingTimestamp,(e=>{t.$recordingTime&&(t.$recordingTime.innerHTML=za(e))})),e.on(lt.zooming,(()=>{e.playing&&(ua(t.$zoom,"display",e.zooming?"none":"flex"),ua(t.$zoomStop,"display",e.zooming?"flex":"none"),(e._opt.hasControl||e._opt.isShowZoomingUI)&&ua(t.$zoomControls,"display",e.zooming?"flex":"none"))})),e.on(lt.playing,(e=>{u(e)}));const u=i=>{i||e.isPlayFailedAndPaused&&Ao(e._opt.playFailedAndPausedShowPlayBtn)?(ua(t.$play,"display","none"),ua(t.$playBig,"display","none")):(ua(t.$play,"display","flex"),ua(t.$playBig,"display","block")),ua(t.$pause,"display",i?"flex":"none"),ua(t.$screenshot,"display",i?"flex":"none"),ua(t.$record,"display",i?"flex":"none"),ua(t.$qualityMenu,"display",i?"flex":"none"),ua(t.$volume,"display",i?"flex":"none"),ua(t.$ptz,"display",i?"flex":"none"),ua(t.$zoom,"display",i?"flex":"none"),ua(t.$scaleMenu,"display",i?"flex":"none"),ua(t.$faceDetect,"display",i?"flex":"none"),ua(t.$objectDetect,"display",i?"flex":"none"),ua(t.$occlusionDetect,"display",i?"flex":"none"),ua(t.$controlHtml,"display",i?"flex":"none"),e.isPlayback()&&ua(t.$speedMenu,"display",i?"flex":"none"),d(),t.extendBtnList.forEach((e=>{e.$iconWrap&&ua(e.$iconWrap,"display",i?"flex":"none"),e.$activeIconWrap&&ua(e.$activeIconWrap,"display","none")})),e._opt.showPerformance?ua(t.$performanceActive,"display",i?"flex":"none"):(ua(t.$performance,"display",i?"flex":"none"),ua(t.$performanceActive,"display","none")),ua(t.$poster,"display","none"),ua(t.$ptzActive,"display","none"),ua(t.$recordStop,"display","none"),ua(t.$zoomStop,"display","none"),ua(t.$faceDetectActive,"display","none"),ua(t.$objectDetectActive,"display","none"),i||(t.$speed&&(t.$speed.innerHTML=function(e){if(null==e||""===e)return"0 KB/s";let t=parseFloat(e);return t=t.toFixed(2),t+"KB/s"}("")),ua(t.$zoomControls,"display","none"),ua(t.$recording,"display","none"),t.$ptzControl&&t.$ptzControl.classList.remove("jb-pro-ptz-controls-show")),p(),i&&f()};e.on(lt.playbackPause,(e=>{u(!e)})),e.on(lt.kBps,(i=>{const s=function(e){if(null==e||""===e||0===parseFloat(e)||"NaN"===e)return"0 KB/s";const t=["KB/s","MB/s","GB/s","TB/s","PB/s","EB/s","ZB/s","YB/s"];let i=0;const s=parseFloat(e);i=Math.floor(Math.log(s)/Math.log(1024));let r=s/Math.pow(1024,i);return r=r.toFixed(2),r+(t[i]||t[0])}(i);t.kbpsShow=s,e._opt.showBandwidth&&(t.$speed&&(t.$speed.innerHTML=s),p())}));const p=()=>{if(h()&&e._opt.playbackConfig.controlType===X.normal){let i=t.controlsInnerRect.width-t.controlsLeftRect.width-t.controlsRightRect.width-t.controlsPlaybackBtnsRect.width;ya()&&e.webFullscreen&&(i=t.controlsInnerRect.height-t.controlsLeftRect.height-t.controlsRightRect.height-t.controlsPlaybackBtnsRect.height),t.$playbackTimeInner.style.width=i+"px"}},f=()=>{if(!h()||e._opt.playbackConfig.controlType!==X.normal)return;const i=t.$playbackCurrentTime.style.left;let s=parseInt(i,10);const r=t.controlsPlaybackTimeInner.width;s=s-r/2>0?parseInt(s-r/2,10):0,t.$playbackTimeInner.scrollLeft=s};if(h()){const i=()=>{if(h()){let i=0;const s=e.playback&&e.playback.playingTimestamp;if(s){const r=new Date(s),a=r.getHours(),o=r.getMinutes(),n=r.getSeconds();e.playback.is60Min?i=60*a+o:e.playback.is30Min?i=2*(60*a+o)+parseInt(n/30,10):e.playback.is10Min?i=6*(60*a+o)+parseInt(n/10,10):e.playback.is5Min?i=12*(60*a+o)+parseInt(n/5,10):e.playback.is1Min&&(i=60*(60*a+o)+parseInt(n,10)),t.$playbackCurrentTime.style.left=i+"px"}}},s=e=>{t.$playbackNarrow.classList.remove("disabled"),t.$playbackExpand.classList.remove("disabled"),e===Si&&t.$playbackNarrow.classList.add("disabled"),e===ki&&t.$playbackExpand.classList.add("disabled")};e.on(lt.playbackTime,(s=>{if(e._opt.playbackConfig.controlType===X.normal)t.$playbackCurrentTimeText&&(t.$playbackCurrentTimeText.innerText=Ta(s,"{h}:{i}:{s}")),i();else if(e._opt.playbackConfig.controlType===X.simple){const i=(r=s,a=e.playback.totalDuration,ca(r/a,0,1));t.$playbackProgressPlayed.style.width=100*i+"%",t.$playbackProgressIndicator.style.left=`calc(${100*i}% - 7px)`,t.$playbackProgressTime.innerText=`${Lh(s)} / ${Lh(e.playback.totalDuration)}`}var r,a})),e.on(lt.playbackPrecision,((r,a)=>{h()&&e._opt.playbackConfig.controlType===X.normal&&(t.$playbackTimeScroll.classList.remove(Ci.oneHour,Ci.halfHour,Ci.fiveMin,Ci.tenMin),t.$playbackTimeScroll.classList.add(Ci[r]),t.rafId&&(window.cancelAnimationFrame(t.rafId),t.rafId=null),t.changePercisitionInterval&&(clearTimeout(t.changePercisitionInterval),t.changePercisitionInterval=null),t.$playbackTimeListOne.innerHTML="",t.$playbackTimeListSecond.innerHTML="",t.changePercisitionInterval=setTimeout((()=>{switch(t.$playbackTimeListOne.innerHTML="",t.$playbackTimeListSecond.innerHTML="",r){case Si:Ch(a,t);break;case Ti:xh(a,t);break;case Ei:Rh(a,t);break;case ki:Dh(a,t)}i(),e._opt.playbackConfig.showPrecisionBtn&&s(r),f()}),16))})),e.on(lt.resize,(()=>{p()})),e.on(lt.playbackTimeScroll,(()=>{f()})),p()}if(e._opt.operateBtns.quality&&e._opt.qualityConfig.length>0){e.on(lt.streamQualityChange,(e=>{i(e)}));const i=e=>{t.$qualityText.innerText=e,t.$qualityMenuItems.forEach((t=>{const i=t.dataset.quality;t.classList.remove("jb-pro-quality-menu-item-active"),i===e&&t.classList.add("jb-pro-quality-menu-item-active")}))};(()=>{const i=e._opt.qualityConfig||[];let s="";i.forEach((e=>{s+=`\n <div class="jb-pro-quality-menu-item" data-quality="${e}">${e}</div>\n `})),s&&(t.$qualityMenuList.insertAdjacentHTML("beforeend",s),Object.defineProperty(t,"$qualityMenuItems",{value:e.$container.querySelectorAll(".jb-pro-quality-menu-item")}))})(),e.streamQuality&&i(e.streamQuality)}if(e._opt.operateBtns.scale&&e._opt.scaleConfig.length>0){e.on(lt.viewResizeChange,(e=>{i(e)}));const i=i=>{const s=e._opt.scaleConfig[i];t.$scaleText.innerText=s,t.$scaleMenuItems.forEach((e=>{const t=e.dataset.scale;e.classList.remove("jb-pro-scale-menu-item-active"),ka(t)===ka(i)&&e.classList.add("jb-pro-scale-menu-item-active")}))};(()=>{const i=e._opt.scaleConfig||[];let s="";i.forEach(((e,t)=>{s+=`\n <div class="jb-pro-scale-menu-item" data-scale="${t}">${e}</div>\n `})),s&&(t.$scaleMenuList.insertAdjacentHTML("beforeend",s),Object.defineProperty(t,"$scaleMenuItems",{value:e.$container.querySelectorAll(".jb-pro-scale-menu-item")}))})(),i(e.scaleType)}if(e.isPlayback()&&e._opt.playbackConfig.showRateBtn&&e._opt.playbackConfig.rateConfig.length>0){e.on(lt.playbackRateChange,(e=>{i(e)}));const i=i=>{const s=e._opt.playbackConfig.rateConfig.find((e=>ka(e.value)===ka(i)));s&&(t.$speedText.innerText=s.label,t.$speedMenuItems.forEach((e=>{const t=e.dataset.speed;e.classList.remove("jb-pro-speed-menu-item-active"),ka(t)===ka(i)&&e.classList.add("jb-pro-speed-menu-item-active")})))};(()=>{const i=e._opt.playbackConfig.rateConfig;let s="";i.forEach(((e,t)=>{s+=`\n <div class="jb-pro-speed-menu-item" data-speed="${e.value}">${e.label}</div>\n `})),s&&(t.$speedMenuList.insertAdjacentHTML("beforeend",s),Object.defineProperty(t,"$speedMenuItems",{value:e.$container.querySelectorAll(".jb-pro-speed-menu-item")}))})();const s=e.playback?e.playback.playbackRate:1;i(s)}e.on(lt.stats,(function(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e._opt.showPerformance){ua(t.$performancePanel,"display","block"),t.$performancePanel.innerHTML="";const s=ga,r=So(),a=e.getCpuLevel(),o=Oa(a)&&-1!==a?`${pr[a]}`:"",n=e.video&&e.video.videoInfo||{},l=e.audio&&e.audio.audioInfo||{},d=e._times||{},h=e.getRenderType(),c=e.getCanvasRenderType(),u=e.getDecodeType(),p=e.getDemuxType(),f=e.getStreamType(),m=e.getAudioEngineType();let g=e.getRecordingDuration(),y=e.getRecordingByteLength();const A=e.isAudioPlaybackRateSpeed(),b=e.videoIframeIntervalTs;g=za(g),y=Ra(y);const _=e.isPlayback()?"录播":"直播";let v=i.isDropping;const w=e._opt.useMSE&&e._opt.mseDecodeAudio,S=e.control?e.control.kbpsShow:"0 KB/s",T=e.getVideoPlaybackQuality(),E=`\n <div class="jb-pro-performance-item">\n <span>版本 ${s}</span>\n </div>\n ${e._opt.isMulti?`\n <div class="jb-pro-performance-item">\n <span>UUid ${e._opt.debugUuid}</span>\n </div>\n `:""}\n ${e.isInMulti()?`\n <div class="jb-pro-performance-item">\n <span>窗口下标 ${e._opt.multiIndex}</span>\n </div>\n `:""}\n ${r?`\n <div class="jb-pro-performance-item">\n <span>内存大小限制 ${Ra(r.jsHeapSizeLimit)}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>可使用的内存 ${Ra(r.totalJSHeapSize)}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>已使用的内存 ${Ra(r.usedJSHeapSize)}</span>\n </div>\n `:""}\n ${o?`\n <div class="jb-pro-performance-item">\n <span>CPU压力情况 ${o}</span>\n </div>\n `:""}\n\n ${r&&r.usedJSHeapSize>r.totalJSHeapSize?'\n <div class="jb-pro-performance-item">\n <span>可能内存泄漏 是}</span>\n </div>\n ':""}\n <div class="jb-pro-performance-item">\n <span>播放模式 ${_}</span>\n </div>\n ${e.isPlayback()?`\n <div class="jb-pro-performance-item">\n <span>播放倍率 ${e.playback.rate}倍</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>播放模式 ${e.playback.isUseFpsRender?"固定FPS":"动态FPS"}</span>\n </div>\n ${e.playback.isUseFpsRender?`\n <div class="jb-pro-performance-item">\n <span>固定FPS ${e.video.getStreamFps()}</span>\n </div>\n `:""}\n `:""}\n <div class="jb-pro-performance-item">\n <span>解封装模式 ${U[p]}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>解码模式 ${u}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>渲染组件 ${h}</span>\n </div>\n ${h===W?`\n <div class="jb-pro-performance-item">\n <span>渲染引擎 ${c}</span>\n </div>\n `:""}\n <div class="jb-pro-performance-item">\n <span>网络请求组件 ${f}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>视频格式 ${n.encType||"-"}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>视频(宽x高) ${n.width||"-"}x${n.height||"-"}</span>\n </div>\n ${e.isPlayer()?`\n <div class="jb-pro-performance-item">\n <span>视频GOP(ms) ${b||"-"}</span>\n </div>\n `:""}\n <div class="jb-pro-performance-item">\n <span>音频格式 ${Ct[l.encType]||"-"}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>音频引擎 ${m||"-"}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>音频通道 ${l.channels||"-"}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>音频采样率 ${l.sampleRate||"-"}</span>\n </div>\n ${e.isPlayer()?`\n <div class="jb-pro-performance-item">\n <span>播放器初始化(ms) ${d.playTimestamp}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>开始请求地址(ms) ${d.streamTimestamp}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>请求响应(ms) ${d.streamResponseTimestamp}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>解封装(ms) ${d.demuxTimestamp}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>解码(ms) ${d.decodeTimestamp}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>页面开始渲染(ms) ${d.videoTimestamp}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>初始化到页面渲染(ms) ${d.allTimestamp}</span>\n </div>\n ${e.recording?`\n <div class="jb-pro-performance-item">\n <span>视频录制时间 ${g}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>视频录制大小 ${y}</span>\n </div>\n `:""}\n `:""}\n <div class="jb-pro-performance-item">\n <span>音频码率(bit) ${i.abps}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>视频码率(bit) ${i.vbps}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>视频帧率(fps) ${i.fps}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>视频峰值帧率(fps) ${i.maxFps}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>解码帧率(fps) ${i.dfps}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>音频缓冲帧 ${i.audioBuffer}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>音频缓冲时长(ms) ${i.audioBufferDelayTs}</span>\n </div>\n ${e.isPlayer()?`\n <div class="jb-pro-performance-item">\n <span>视频待解码帧 ${i.demuxBuffer}</span>\n </div>\n `:`\n <div class="jb-pro-performance-item">\n <span>缓存时长(ms) ${i.playbackCacheDataDuration}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>视频待渲染帧 ${i.playbackVideoBuffer}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>视频待解码帧 ${i.demuxBuffer}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>音频待解码帧 ${i.audioDemuxBuffer}</span>\n </div>\n `}\n <div class="jb-pro-performance-item">\n <span>待解封装数据(byte) ${i.streamBuffer}</span>\n </div>\n ${e._opt.useMSE?`\n <div class="jb-pro-performance-item">\n <span>MSE缓冲时长(ms) ${i.mseDelay}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>MSE待解码帧 ${i.msePendingBuffer}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>MSE缓存时长(s) ${i.mseStore}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>MSE解码间隔(ms) ${i.mseDecodeDiffTimes}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>MSE解码时间(ms) ${i.mseTs}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>MSE播放模式 ${i.mseDecodePlaybackRate>1?"加速":"正常"}</span>\n </div>\n `:""}\n ${e._opt.useWCS?`\n <div class="jb-pro-performance-item">\n <span>WCS解码间隔(ms) ${i.wcsDecodeDiffTimes}</span>\n </div>\n `:""}\n ${e.isOldHls()?`<div class="jb-pro-performance-item">\n <span>HLS缓冲时长(ms) ${i.hlsDelay}</span>\n </div>\n `:""}\n ${e.isUseHls265()?`<div class="jb-pro-performance-item">\n <span>HLS缓冲时长(ms) ${i.hlsDelay}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>HLS待解码帧 ${i.hlsDemuxLength}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>HLS待解码视频帧 ${i.hlsDemuxVideoLength}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>HLS待解码音频帧 ${i.hlsDemuxAudioLength}</span>\n </div>\n `:""}\n ${e.isPlayer()&&T?`\n <div class="jb-pro-performance-item">\n <span>Video已渲染帧 ${T.renderedVideoFrames}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>Video已丢弃帧 ${T.droppedVideoFrames}</span>\n </div>\n `:""}\n ${e.isPlayer()?`\n <div class="jb-pro-performance-item">\n <span>网络延迟(ms) ${i.netBuf}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>缓冲时长(ms) ${i.buf}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>最新缓冲时长(ms) ${i.pushLatestDelay}</span>\n </div>\n `:""}\n ${e._opt.useMSE||e.isWebrtcH264()||e.isAliyunRtc()?`\n <div class="jb-pro-performance-item">\n <span>video显示时间(s) ${i.videoCurrentTime}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>video间隔时间(s) ${i.videoCurrentTimeDiff}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>videoBuffer缓存时间(ms) ${i.mseVideoBufferDelayTime}</span>\n </div>\n `:""}\n <div class="jb-pro-performance-item">\n <span>视频显示时间(ms) ${i.currentPts||i.ts}</span>\n </div>\n ${e._opt.hasAudio&&e.isAudioNotMute()&&Ao(w)?`\n <div class="jb-pro-performance-item">\n <span>音频显示时间(ms) ${i.audioTs}</span>\n </div>\n ${e._opt.hasVideo?`\n <div class="jb-pro-performance-item">\n <span>音视频同步时间戳(ms) ${i.audioSyncVideo}</span>\n </div>\n `:""}\n <div class="jb-pro-performance-item">\n <span>音频播放模式 ${A?"加速":"正常"}</span>\n </div>\n `:""}\n <div class="jb-pro-performance-item">\n <span>视频解码时间(ms) ${i.dts}</span>\n </div>\n ${e.isPlayer()?`\n <div class="jb-pro-performance-item">\n <span>解码前-解码后延迟(ms) ${i.delayTs}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>总延迟(网络+解码)(ms) ${i.totalDelayTs}</span>\n </div>\n `:""}\n ${e.isPlayer()&&i.isStreamTsMoreThanLocal?'<div class="jb-pro-performance-item">\n <span>是否超过一倍率推流 是</span>\n </div>\n ':""}\n ${e.isPlayer()?`\n <div class="jb-pro-performance-item">\n <span>是否播放流畅 ${i.videoSmooth}</span>\n </div>\n `:""}\n ${e.isPlayer()?`\n <div class="jb-pro-performance-item">\n <span>是否在丢帧 ${v}</span>\n </div>\n `:""}\n <div class="jb-pro-performance-item">\n <span>网速 ${S}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>播放时长(s) ${za(i.pTs)}</span>\n </div>\n <div class="jb-pro-performance-item-block"></div>\n `;t.$performancePanel.insertAdjacentHTML("beforeend",E)}else t.$performancePanel.innerHTML="",ua(t.$performancePanel,"display","none")})),e.on(lt.togglePerformancePanel,(e=>{ua(t.$performance,"display",e?"none":"flex"),ua(t.$performanceActive,"display",e?"flex":"none")})),e.on(lt.faceDetectActive,(e=>{ua(t.$faceDetect,"display",e?"none":"flex"),ua(t.$faceDetectActive,"display",e?"flex":"none")})),e.on(lt.objectDetectActive,(e=>{ua(t.$objectDetect,"display",e?"none":"flex"),ua(t.$objectDetectActive,"display",e?"flex":"none")})),e.on(lt.occlusionDetectActive,(e=>{ua(t.$occlusionDetect,"display",e?"none":"flex"),ua(t.$occlusionDetectActive,"display",e?"flex":"none")}))};function Nh(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&s.firstChild?s.insertBefore(r,s.firstChild):s.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}Nh('@keyframes rotation{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes magentaPulse{0%{background-color:#630030;-webkit-box-shadow:0 0 9px #333}50%{background-color:#a9014b;-webkit-box-shadow:0 0 18px #a9014b}to{background-color:#630030;-webkit-box-shadow:0 0 9px #333}}.jb-pro-container video::-webkit-media-controls{display:none!important}.jb-pro-container .jb-pro-icon{cursor:pointer;width:16px;height:16px;display:inline-block}.jb-pro-container .jb-pro-ptz-controls{position:absolute;width:156px;height:156px;visibility:hidden;opacity:0;border-radius:78px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATgAAAE4BAMAAAA9UfJZAAAAMFBMVEUAAABHcEy0tLRZWVmysrKoqKi1tbWvr6+2traBgYG1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yfn+aP+4MvDpg+tjZ4+K8bKOnr1z/cFTU8rH/g92biFxn2S73AAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%;transition:visibility .3s,opacity .3s;right:43px;bottom:135px}.jb-pro-container .jb-pro-ptz-controls.show-vertical{right:43px}.jb-pro-container .jb-pro-ptz-controls.show-vertical .jb-pro-ptz-btns{left:0;top:156px}.jb-pro-container .jb-pro-ptz-controls.show-level{right:163px}.jb-pro-container .jb-pro-ptz-controls.show-level .jb-pro-ptz-btns{min-height:156px;left:144px;top:0;display:flex;flex-direction:column;justify-content:center}.jb-pro-container .jb-pro-ptz-controls.jb-pro-ptz-controls-show{visibility:visible;opacity:1}.jb-pro-container .jb-pro-ptz-bg-active{visibility:hidden;opacity:0;width:156px;height:156px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATgAAAE4CAMAAAD4oR9YAAAAM1BMVEX///////////////////////////9HcEz///////////////////////////////////85yRS0AAAAEXRSTlO5DCgVgZBxAK2fQDRkBR5XTPLKM/gAABnnSURBVHja7F0Jkqs6DGQPO9z/tD8Jq6WWbCCvIjKfzAGmulrW3ooedr6ui+M4TdP++SXPr1l/SdL3aRrHhv7ZyA5qb9xe0L3Am+DrkzeCL/BeX908MezTuPsfOArdgl3KsZuhq99fk/Tx3waum+ByAHua5QbYilkzY1aP728YhrH5InrfBa57OLAtVjpRbYaumex04dq4APeC7vnVSfo/45bXLe33jGscMx3f0A1vyg3t69e2dRL/NeA6wrgdcCvjyPM2U25mXDt9xVD3f/qN0yi3Mm6P20S54vlXtGPS/R3GPSbYOsC4ZAvmJtiaGiL3Zlzx/Ht+Y/KXTJXbqmaqe9za1VYn3N7YpX/OVGev2qduOLIiB7xqOzGuWCiXFVmWtU3368A5lkqeOJI21I5XXaORxVRnxmUTdNnY/4U3riNvHMJts9XRtdXVUttipdzrK/4x7UyY6sK4Gbo+nU21T1zKcd9AGJetlMvyLKvj3zXVfeqQElMljINx3MK4xVQ3xj2Ry7N/6CiM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hs4hbhgB5iqeaH5IGDWtCazZuhnOXHg5jmdVX9mDte0u9TjAQz9HB6Iu4zPHt2v7kgNe+cb3FbqeVa9qBfw39C1jZw9cMBDmr7jwqHDylzL+5Sfw2V9wcn9Iy5qZFoTaZRV9b7+k1nB55Sr2gEOaysFiFO+tCSrhqsj2yzyjyAu3lYCHnojyap85gAdfV9wu3l+x2V0R36INSvWAUbvuMvzydRprWogTmfVO+AI4uB+XF/JvxK4UHekMZRucHdkQhsQvdqPuwGurV95cl+LhUR3hPfjTN5lkFa78bUH97StdEdcOJC277h0bvgO24ty6RkQV5OtG5Pn0GIy19S8/OCeKofojlu47gjVT+4/EjZvdu9grnq1uVxAB1il1beEzRtBJJQICv1VMeKU93a0OzItbzq5k90RgLhl+XGCqy3ERdYrO0fftXnb2T3VqjfE5aigMbf3YANirN54co93XMjJT20rhWteP5Hrr/NbT+7xjoPMctOzJkqq6/Luk3u84+7vuGUBSzeBweoE3yPTm8Hm444LiA5gyMXuuJU56G3NR07uAXHVwwo5fgBTf1Xo2rjVnzq7r6yK1LwSr5HHHTdt9fy5k5/R7XLcJdX7FbeOy2dP7trPweQ57FRZx7r6+Mndq3ldEzrAY938ysl9uiQ1cJNVa2SO16X6tZP/dj8uDqJW2VfM/O/ftf7FmPkK3OMZ3MAu8G3T6ytiTTU7OK8jxMlfuN1idg/X91/9VUZ81WOVo8P+Bw+0DogP6NDPAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-up{transform:rotate(-90deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-left{transform:rotate(180deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-down{transform:rotate(90deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-left-up{transform:rotate(-135deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-right-up{transform:rotate(-45deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-left-down{transform:rotate(135deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-right-down{transform:rotate(45deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-show{visibility:visible;opacity:1}.jb-pro-container .jb-pro-ptz-control{position:absolute;left:53px;top:53px;width:50px;height:50px;background:#fff;border-radius:50%;transition:left .3s,top .3s}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-left{left:33px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-up{top:33px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-right{left:73px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-down{top:73px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-left-up{top:39px;left:39px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-left-down{left:39px;top:67px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-right-up{top:39px;left:67px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-right-down{top:67px;left:67px}.jb-pro-container .jb-pro-ptz-icon{position:relative}.jb-pro-container .jb-pro-ptz-icon:hover .icon-title-tips{visibility:visible;opacity:1}.jb-pro-container .jb-pro-ptz-btns{display:block;position:absolute;left:0;top:156px;width:156px;box-sizing:border-box;padding:0 30px}.jb-pro-container .jb-pro-ptz-btns .jb-pro-ptz-btn{display:flex;justify-content:space-between}.jb-pro-container .jb-pro-ptz-expand .jb-pro-ptz-expand-icon{display:inline-block;width:28px;height:28px;cursor:pointer;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAANlBMVEVfX19fX19fX19fX19fX19fX19fX19HcExfX19fX19fX1/////Pz8+oqKjCwsKhoaHn5+eWlpaOqTaDAAAAC3RSTlP/3CaKxwJiAELtp4ri/s4AAACuSURBVCjPfZPREoUgCERXBdPRyv7/Z6/Z1aQp9oWJMyYLiKUrOIpAJBdGCldgbzBkPM/QEoTI3jBEPBRDhwEvChe08Q1Ge0ImvIq4Qj8ljrLdH77CyQPWlCdHC0Q1e9rmmuC+oQN9Q4LwcQg40L6eyqm0uEpXSUqe3fKpkkqL+Y/o+07SrahNEO0T0LBsvOitf4xsLqiNTB32wtqaVKosGLO2mhUrS93+PZ4D99wPqzMJVcbEyA8AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-expand:hover .jb-pro-ptz-expand-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAM1BMVEVHcEyZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZn////i4uLZ2dnIyMjExMS8vLy+iXNeAAAACnRSTlMAYomLxwEm9+NCLo6DKwAAALNJREFUKM99k9kWgyAMRIMmEMLm/39tKaVKFJkXl3sYJ4sAXeQ3ZOcYd0+gRYblFBuFLYoS2ot5lpvYn8zJQ65TO2GVNmdCmQq/qczw4gjpejD14BgmhziEIvCjVRlPioftHW6A7xBB1a8CCUMvsuSqEkPM7eZX6h8GrQ67bYpNIbRL6rb4/k2EfVXKsgmqfQrW9qnGq96a28jGQG1ky2HXpVysyYyeDIhWq7le6ua9P36HD6+2GRi8iBZBAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-narrow .jb-pro-ptz-narrow-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAM1BMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX1/9/f2/v7/y8vLUObqxAAAADXRSTlMA3IrE6SZi9wI+y0gNXAn3CgAAAI5JREFUKM+Fk1kOwyAMBQ04bJHT3P+0JVUMNMWv8zvSk1cipfjAKXHwhR7k6KTjYp7dVuWLug1XWB5wz96T/JD2O3Phmv0k5ypL6lVVFIPYpLOka5WKSSFvS0/BloHYlkza5HkMzrvVLo8ZlRr7mtFYWBBsBQ4BjC//GTxcGVw2PpOVHQ6fJj7qS4936OoN2K4e5yE6N1UAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-narrow:hover .jb-pro-ptz-narrow-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcBAMAAACAI8KnAAAAJ1BMVEVHcEyZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZn+/v7X19ckk9ihAAAACnRSTlMA9+NCAsuKJsRiPv/2GwAAAJlJREFUGNNjYAAC5gxFoTYDBijw1FoFBIumQHjsUavAYGkBmGu0CgqUwRqlYNyFIO2Fq+BAnIGBJQrBXerAwLkKCUxgYELmKjBYIXMXM2Qhc5cxdCFzVzBoIXMXMYAcsRsMdgEdgs4FKT4DBqdAitGMQrMIzRkojlRB9wKaB9G8z+CMGjgshjCuMCjoWNxRAxYt2KGRYgJiAQAnZcjElaB/xwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-aperture-far .jb-pro-ptz-aperture-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAASFBMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX1////9fX1+kpKRzc3ODg4PFxcW1tbXW1tbk5OT29vaVlZVmZmZ8vCMFAAAADHRSTlMAxGJ5Mssm9+NCiYtiH91SAAABAklEQVQoz41T7Q6DIAyEJQooUL55/zddhVazzZjdHyqXXo8DhWCYTWqltNyN+MZLuxP69UGti/vAsl6c0e4L+tQ2yv1AEbvecMhO5cXdYhk+6aO3WGrNAMwentlMz/ZAKIlNoRsqY2wtFWu9t8wasc0iYVN0LkQfrG1zbxNyrIBcntOQrH1Ukkb60QcxYF1xMA2dh8zWj6ZDsLCsIrL4Ds5Hm9FMbCEROWUB0COaLXEIZJKV7CKybGO7UuxjxY2C/TkMbxboKBQCxgMN6MCJQ6Ch/QjOZg/B13LGx8FDTe3IFvl+Bc9XBi3UWoex68qeL/vxmdyxyvz3NJ8f9dDef36HN7koIK2LjxB0AAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-aperture-far:hover .jb-pro-ptz-aperture-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAOVBMVEVHcEyZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZn+/v6cnJzr6+u/v7+xsbGlpaXNzc3b29vqh7uRAAAAC3RSTlMAyRjKA59J/3PzPhe1wxwAAAD2SURBVCjPjZPrssMgCIR1mkYtisD7P+zBCyZpM5mzv5hs0M8VnZvaok9BlXzc3FXbO5z0vtifFC5Kn8OL4UfxwVvuHm61d5Z0b6ZGZZwZpQAUosWsjVZntVS1sH3ZFo1IRVYfGXgx+VGwNkkIVbhq9/jm3cAhaNv1Uk3IA8mNn7D3kbQeWK3TLH2jCthrDFcTMwUWaKiClc9mJtJWhS3SF5BpJqMQW1b3xwnkDahMoHYomkeJRgSENA/MFsKML7fgoCBVbGvM+Cx4JcKWbWHKK/h1ZYS1Jy/nK3u8bB3KhzG5deMxtfv3aO7/Heq+9ms8h9fxHP4AHzAWU9zlWNgAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-aperture-near .jb-pro-ptz-aperture-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAQlBMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX1////9fX1+FhYWbm5vz8/Nzc3OwsLDi4uLDw8PW1tZmZmYgm6a+AAAAC3RSTlMAYmOLx4kn9+NCIVJiPGAAAAD+SURBVCjPjVPttoMgDMOJAqOU8uH7v+qKFN2c597lF5LTJg1VqQG3aGuM1bNTV0wWDtjpg3pq+IB+npyzcIE9ejsDXzDCrjccs+tOariF3n2OLyw5xko0vh9MDjNb9Q0hp2GK3cixlIApe4/JD9appR8SFxWAUFLg6n63iB1irnY1Jv0mlrok7nUdcZRa1YeshxBA9iijChlxI6iZEaBgSEL2tkRcymPGGJpqlbZ6uDg0WR/F0DwuMpxDkYwiIXA8hO2uMJdGCCK6teB8RQoY8xGfevQjxYQt25qoRwDT25MRBjZ7GtP/P/afa3LHmrflXa+ruf661Hvv+et3eAF6Fh3v+sSUGgAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-aperture-near:hover .jb-pro-ptz-aperture-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAM1BMVEWZmZmZmZmZmZmZmZmZmZmZmZmZmZlHcEyZmZmZmZn///+qqqq9vb3z8/PMzMzo6Oja2tpXGg+mAAAACnRSTlP/JomLxwJiAONCr+rW2wAAAOtJREFUKM99U9sWhCAInEpLBS///7WLEWy7p9O8qEzCMBIOQ15DAlLYsoegS9yFMKQ93skl4Adh+ZI54Q8pG5nxgKzkgkcsk4zhmQxRyN1OPHqtncjOu5AuppcJ6s1EHTA1YzC3Wgq3YmzGqpsmlwZAo7F8oLEVKoeE6+TbSxK0JJ/3FLOwFnUxzXuoltYDDMLoAlmYXLAWIrkqbdZKs+q4KBfkNV1uwGaBim9TdLWS3R7iGRvCNTPB7JvGlc5EXK8cKbrxooint73RzXh7Msl6Oj/uT/b62O9j8sj6gMXX0Xwf6jP3Zr9DtNAHTYMMXrXSK0YAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-focus-far .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAPFBMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX1////92dnbs7OyFhYWjo6Pe3t7Ly8uxsbG8vLyG+Q0EAAAAC3RSTlMAiWJjx9wm/0Lti7mfpe0AAADaSURBVCjPfVMJDoQgDERFC/bg8P9/XUSO6CqTqA0TptNDpSrMpC2A1btRT8wrNKzzjdo03KC3zhkLD9imbeAFhd3sG2kvZQ2v0NknfGBJZKkhBM9MxOxDKBV1N4iHi0TRHYjN01Qi7/kK2PtyNDU7DAEJgDAAN0u1jsQEFEkcVVmrqjeXrkWRmC67eqbgG7bJyvkQSQkvUvec7szpek6t9ubWJSK/uJVSm+APzHKCh++DWWuH4plQKNYOpfappcjy2VvJn9744cjGwx6uyXjBxqs5Xuqsvf/9Dj8rLhRg+bQ5VAAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-focus-far:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAOVBMVEWZmZmZmZmZmZmZmZmZmZmZmZmZmZlHcEyZmZmZmZmZmZn///+xsbGoqKjt7e309PTExMTQ0NDe3t774OlGAAAAC3RSTlP/itxixwImAELtp8B2gZgAAADmSURBVCjPjZMLjsUgCEVpq60G8Lf/xQ62gvNeOmZuUiWeKHC1cKnC5iJAdFuwJXgmf+xg2g//G54OPuTOCUOEL8WgMMCLwgPP+Abj2aF38CrnBR7whw6Bo4fWUk7MMrQ2OrpAq0GspTLLgKg1wTailNITZA0EaTkZGjIAY5NwlATah5CGRMJYj50tFtlWiapsLvAPRdtL/WOmET7QzZyl5ywzp7NWsjBJ1odsragJqeJ9HGFNZoLaJw71hMTm0O7NeDE1Z6YsU5rGL69sedmXXz0ToW8PzA/oV09T8OJR32fb7+B17Qe3WwtC9PVbHAAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-focus-near .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAARVBMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX1/////t7e2dnZ3W1tbGxsa3t7eDg4Oqqqri4uKTk5NImu/5AAAADXRSTlMAYieJ3MvE/0Lti4oh87zNagAAAOtJREFUKM+NU1sOwyAMY30FtoWS8Lj/UZe2gWpVh2aJH1wcO0mNqbDj4gDc8rLmiscEDdPji3rP8IX5fXLWwQWuaVu4gbKDuyPdsJMz3GLefcIPbJ6PDCEAFDlUAJiORM3NigQFAXAFlqOeRhWJyFFIHxNGvRrN0mp470U++3axGM2RAmXcXqKnkDSN0a9WIk5Sa01MpDXBQAdVtrA8lBhFnnKpsmoo5VBrhszV0KuJ5N2tP92O50iQjpzcctravoihdoi0Q1NrfN56m0VWzFBoje+OrD/s7pr0F0yUr6s5/LvUu/bz+B2ep+IHdMIV2SUZfCsAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-focus-near:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAQlBMVEVHcEyZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZn////c3Nz09PTp6enR0dHFxcW7u7uwsLAUKT0cAAAADXRSTlMA3IrE6WIm9wI+y0gNQZpqdwAAAOdJREFUKM99U9GShCAMQ8BF3Cmlpfz/r15dAe88l8zwQiQkoRrTEa3zIXhno7lhWxcYWNbtN/fa4Q/218VFDzf4of0O8A/h3TQfOGU/ytsOj9gPVyt8warkmYEQQAgABYDxTKROz88koS6AVIB1fRCNbSI1cVUy15Jq27LGjTtyzipPeWw40/IXQkrHyZSRmqw3LaQgctFNKYzYyGACfEXossLMojFEj7J0WfdwJ3dD9uY2X25tL0Hj45mTR87Y66u9IQFsDS1bL57o7JbUDNIofvpk08eej8kTe3Hz0ZwP9UFfv8OgfgBUByCEUZhYtAAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-cruise-play .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJWSURBVHgBtZe/b9pAFMefbSYWMjCjdOtmYEYqXVC3umMlBFRiT7qxkexITcdKSDUSYna2iqX+E/DG6LCQgcETUiR+5Pv8I3Kc+McF5ysZ3x2++9x79/zuLFEG9Xq9s/1+r8my/AnVJq4z/2LZfB0Oh1tFUQxd1+208aQ0GAa7kCTpMgRJk4kJXk+nU5NEoe12W8PM/wrAotIx2Z+w3MkE7XQ6Q3S4otNlY5zPUZdL7wiMBUsRIK/fDeWvhQ92XS0HrQia83cCsqoIyMug8gQ9Ho/DpF7FYpEajQa9VTBoyIZxWeEfv6IndSqVSjQYDKhcLtNqtaLtdkuigmGSZVn/XKiqqr9wqyZ1YEtbrRZVKhX3zvX1ei0Eh7Ufa7Xan8C9VRIUg9lyQZfzO19VOOugkBpAgaXRtnq97oLZ5ZvNJm0YQkBZ8m63E7YyKl5ntrrf77vlJCF/qzLlKLZ4NBqRpmmuF2LBlLOyBFYBchDKlIeWyyWNx+PUtS2Qtx+eJA6i2WzmQtMEA+8KnA+73a6N+jkJil1pGAbN5/PMfRBIZsGn3+LFvSABMYiBgpnJgZEeFHQD4EzQrOsWI4N/nrY2uPg/eeefV8WvAKfALOsWJ3jzA++rcqjhB25OXAd244nA62AjV4LGxWLhIBk/oPiF8pc9mUy+BZVnyQEzueEZUb5yjyvhBiX6BCw2YTGvdZNyAkYPZsprT/rgO/K2vDcdQQH7jes7gPcv/kvqyCcKbEVX6PxVAG76QWPGPZAIDcEZqGECTQyokpe9wp8VfNqzyA2L9M+KRzm19l1i6ZQBAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-cruise-play:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAdCAYAAABWk2cPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJ5SURBVHgBtZe7buJAFIYPjsVFAok3wBUlYcUDLNvQISUSDVVCA0IUYZ8gmzcgBeIiJLwdFau8QToaQKygovI20CJBARKX/Y/jICPAF3B+yRpjZvzNOWfOzLGLLKrZbAaXy+WdKIq32+1WcrlcQe0vZb1e/8XvQT6ff7fyLpdZh0qlEr+5uXne7XZxMpciCIKMSfzGBBSyCwVMAqxpEXYEhzdeAJYtQ2u12h2aJq4gXadSLpf7aQptNBoPm81GJofEsc5ms9/0zwT9j3K5HHUSyEJ4ovV6vXkSyjHEyvxDXyCAHxGy4hEUq+4JjWQ02O/30xV65rTbQ9lKNEWjEYFAgFKpFMViMbpQnOfFPRSKWxnldrtVaDqdpnA4THalefMDinx8sDOYrY7H45RIJOy6PMibjch3F24AJEmSeo3HY+p2u7RYLEzHwNqogOUcpSvFrk4mk5Zcjry9FZCX1+46qj5dzvEOhUKGfQVyWAyPRCLqojsnEYtohpiSE5rP59TpdEhRFMN+Itw7Q3DpGq1WKxqNRurF90YC75+gnXszulBsVbvdpl6vZwpkwasDNWVw9r3BWlu5Op1OVdBkMrEzTD11RO1exmUJytb0+30aDodkV7DyjT2rBpNrG8zg3WwQW9ZqtS4CatASt/sVhAC/GA3glWk1bqcEo+TPwm0P5QeYySt9jRS9UQe54vF4fqEZkMNCdXivrw4PoJlMZoad5IeDYE7F+0KhcPC+syVotVotIQ5PdLm4CD8CGkJZfAIhzlw3SWRdM+T9q9frLbHnTnUwrfBZfPCiecQG8v3MBHj/HvAm4/P55HMwW1C9tG8a/RmsGH1CnNJ/17UakVMOx7kAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-cruise-pause .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHySURBVHgBxZc7bsJAEIbHdprQJAU1ckln3FM4J4jTIkSMRB9uQDhBlBPECIk2yQ1MSeeIxg0KZQoKKpSCR/4xtsXTNmA7v2ThHe/ut7M7O7sIFEOGYdzO5/OSJEn3KGp4ZDy33ucxP6vVqo86H71ez47qT4iCLZfLJ0EQmhuQKNlo89rtdk06FVqtVjV49kZrr86RicG2TdMcx4LWarUWGjzT5Rqjn7tdsJAi8Ch4C4op1TGl75S8GKwCPOWC6FsRNDKAL5SOZER30HcAhbFFEUFTLBapXC5v2fL5/J7tiOCXofHLlVfikRhRrSqVChUKBXIchyaTiWtrNBruYLjM9jB5jlmup4vFQqMYyuVydKE03vsuVBTFR8pIcFD317REGQlRXBJ5PSl+iktCskgZC57eZA5l/Q/Uy4lTykjYq1++p5EHb1LC9rRdKA7dT8pO64yERG/SmVM8m81OqW7yckr8Ztv2r6Io1whnLawF59fhcLiVY0ejkWsfDAYUJfRfB+snOE85J2KRvym9RGF2Op06vwRbhg9YHgmlIz7E235B2vwC1x1VVdl7jZLT3nVF2q0BsJUg+ODFTDpU0wP3PfC5a2wB+BD7CuqLgws/TQQYn7cyxYfxfdc6ViEUujMAHUlER4cKHfhbATvPjBUG8/UH1xXJDxHoYGQAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-cruise-pause:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH/SURBVHgBxVY7bsJAEJ01CAkJKUhUULmiDSnpoKYINyBuQIgi3AA4QZQKIQq4QaChhhuQCxAXSERUSDSIb944axSS+CPA5kn27o7X+2Z2dz6CXKDT6URXq1UqGAw+Hg6HDB4V4qj8rAsh9N1uN9rv971KpTJ2Wk84kW2322csVv1BYr+gEGMo8Foul7uWc6w+NJvNjKIoHXRVOgMg74K8AXLdFWm73a7BujpdDh3rZH8TCw8JLYlPSFutVh7NG10feigUetA0bcEDxZTiDFU0L+QN1M1mc1z7SBoIBGrkcGkSiQQlk8kTWSQS+SP7D3CzJ76c3A/yi61kodOP6XSaYrEYzWYzWi6XhiybzVI8HjfGLLeDNGxoWpohF8C50CXgwMK+r0gNCuQTENnyitQgRT4BQSOlyFvrKsRdCapC/uPuFqR0G1IZExfkH94NSzkHkk+Ap4wNUiTqPvmH74gUDoe7dOYWr9dr13M5sfNxBnjQ7/dXuVwuDGHG7ieOr9Pp9CTGzudzQz6ZTMgJ2FFtMBh8HvMpx0Ro/UEeBQq2slgsatw/uoxMsBp5A64WG+bgxE9LpVIPpUWDrgv7csUE4nEdlWCNPCC0JJXEF5Wg8MchHs11CWpCVvZVkBfckksyrneHVnMEuQRXitiqPBS4lwpEJYmORkc7Qju0IzPxBZ2t+3mW/JtqAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-fog-open .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAdCAYAAABWk2cPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAKgSURBVHgBtZe/jtpAEMYH28WJioIa+URDF8MTkAalO6cH4YIiFbk8QXS8QO6oUlCAkGjDtTRHJBoa4nQ0KBZdJApoEAV/Mp9jkAF7bXPcJ5ndtdf725nZWdYxiijDMBKr1SqhKIqKNpdms9mcRxkjFqZTsVjMy7J8x1WdL9WjC6D97Xb73G63m0HjxULAvnI1T+FlMfxBBPeEwoW73Q6we7pcViwWe8+utwKhDFQZ+IOrGr1eAH9ksOkLdSz8Rd5xu1RzBmfdFkvupwz8dmUgBENeYNAZtFQqGVwY9DZSnTVi6+Decrn8h0JYWSgUKJfLHdrL5ZKm0ykNBgOazWbCd9nNt3CzgoZjpUohlEqlKJPJHN3DJHRdp16vR51Ox/ddTiVkw70NlSTp7rRDMpmkWq1G4/HYvmANSpHghXg8To1Gw/M5W1oGVEZD07TvXNy4O8Btw+GQFouFbV06nabRaGRbhbaf8AzvTiYTr8c32Wz2p8KrSuMgJ7x6IEa4AIuivau9tNlsNGm9XqsBY9gxhOvCCi728wa7OCHhRzQAZl2pVGyXRZEoBAoFCDGs1+v2QooiUfpIHE+LBEL+VatVezVfDcp/whYJhAWBVHFvCEFCfz8op6cpORuxJRokajz98tSRae+97OJnUS/RanQLkwNQ4FrzsA2yyU0Gf/br2e12A90LlwYAkS5Pdrm/wRs+/rh1ChAshuV7wTqAQoTAarVat6gorll8YWvzXBXmbdTUcY3/sK/L+4ppmnPeF/9SCGsvAXIsH8+gDthkMFyepyuJgS0GHh3w5NNOzO0zeMHVD/R64BMDP53d93vBORW+0GVnpvmpS0NBXXDDSacwR9K5kxaPok+NUJ8VDlzlQucJvKNj63G2/U3/E78fZqx/rk0w4ggu8jUAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-fog-open:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAdCAYAAABWk2cPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAK2SURBVHgBtVa9jtpAEB58/EqArqCBBqehorgTVDQxPVJOiD5QAEJUeYLjniBcgRACKeQJQsQDBBoqkIigookraC1BwT+ZcQBBsNd7Ovgk2LV3vd/M7PyZgBPlclnc7XZPFovFv91uRZPJdL9fktfr9W987udyuRbPWSajDUgm3d3dPSOhBMaQUaAXu93eSKVSCryVtFQqPaBWXznJNMlR8zo3aa1W+7zZbIo4vYd3QBCEQjqdfjEkrVarzyhlAa4EvOt6JpNJ6ZJWKpUnHH7A9VHMZrNfLkjJO9Ecv3Aqwg2A1osevFs4vCQP5SF0Op3g9XrPflar1egzut9vCNVHzPS3j8EkcCAcDkMgELh4PxqNoNvtwmw20/tUXC6XSRyLqqZ7LS80CgaDqiY8IEESiQSIoqi7B53qE40qqVYsolTgdrshEokAeh9IkgRGIDPTPhJYC8SD4eg3k52RQNQi7XQ66txms+kepEUcjUah2Wxqrq9Wq6h5Pp8/4CUzD1osFuqPFwfnIsE1IBKbyDqANIzFYhCPx+EtYPmCGQxAppJlGQaDAVwLaFlBgRtAx7T/SNGNZWCg1WqpoeP3+4EX0+kUJpOJNiEqKWA49HGusA6gwPd4PMCLXq+nu4bpsK+6LVV9YMDlcqnkPKD7JyF1oFD+PSSHV9ZB4/EYQqEQGGE4HEK73dZdR+Ua6nh4gWXtD3AkfCL3+XzHZ4pfyrekIQnHApr2A2oqn4YM1TvDWkr3xbozPVAxJ0KaH1MRFllSvQG3gYztz7FtOct/mLqorZDhulD2BVzWJKW2kTZckVjBnviM8IKUQBtQ40ck/w7vAIUhnvGYz+cvwpHZbGNHkcQMwtXGnICs9YrCF/Q2GHb4e3IJBxLgo44ACsY6afbT4XDUWd09N+kpqOhTDT55Jf9/Z0b4C/UJLQCcLGi1AAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-fog-close .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAIjSURBVHgBtZe9UsJAEMc3l1Q0WvAA2NEp1MyInVbGnoE8AVrSqW+gT2CY4QGwpTEFNcaOEqksKKiYcYYP/xsSJoRwx8f5n7nRu9u73+7lbu8waAc5jnM6m81sIcQlqhcoOZTTsHvAZT6fv5um2XZdd6Caz1DBMNm9YRgPMYhKHhx8brVaHu0LrVQqNjx/2wOWlAtnn9MiT4VWq9VHDHii4zXAPFdJsPGPwK1gIwHk7/dC+sXgAsBjroioFZsmpznCuHKLxeIxqqwirdVqvGmcbaOy2SyVSqW1tuFwGJTRaES7CEGd8TJbXOEo4YkjG8BQ27ZT+7rdLrXbbSUcx4+P3oOIVQ4Wr0Cj0aBMJiO1Q6Q1PvsirFzSkeKVqNfrKjM+8xeCybRMbUcrn88HRSasqs2R5kijisWitB+reiKm0+mhaS5VvMwqCdIs1WYKoJZljUmj+NwqobS8D7Wp1+tJ+5EPvkWYD33SIE4S/X5faoOHgCdC+jsdKc5GnJUUGiNIzwrpbjwh76tOpxMAJ5OJyjTwKp7wP/CnvM06LeFzdPwNd4AFihL+Chom/U86/HmiAr4CGOR4M2r0fX9cKBR+8e816deg2WzeRJW15ABPXvgxRXoVPFfiDWbSAhF7iJiXvUyagMmHmZlmGYK/aXn7HPSNAWui3AH4s9EnG8ibiy94DL6l3W8jL3zvetsMpNCEAw4cKGPCc9r8WeGj/YuBMlikP+yn3EGZYjlWAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-fog-close:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAI5SURBVHgBxZZLjtpAEIbLjUFih8QFnBUrJCIOEHOCROIACStALBhOMMwJMlkgBCyYnCDMCUJWrJCQYB+zBwkJFiBe+QvZyEz86IEezSc1dj/w76pyV5dGEnS73cR6vf4SiUQ+HY9HE0MJu5GmaSNcFrvd7hn3vXK5bIU9TwsTw8Oqh8PhzhGRoIf1tSBxX9F2u12FVfVXiL3ksVgs1khWtNVqfcfljm7HgtW5l1Zrbyh4Fo7FYh8LhcLCGRDu2U6nc69YkDG22+0v98DZ0mazaQgh/tLbUUOMHy9E8eH8treDJ8lkkgzDuBibz+c0m81otVqRBAu4+QO7WecerDSDBB3RbDbrOTcej2kwGFAIvNc5dPVTTLHpv9INpNNpyufzBEsC1yF81dOVf8KslCHIEy4SjUYjIxDLDDoGKYAtDrNW13VT7Pf7azOOJ6lUKnAeySLB7jVIIezmMAS9A/igxIIUwns3VBQ+HpFCLMsKnGcjhX0CKLF2MpnQcrkMXIPzuX+KKax9phthtw6Hw7BlVqVSGel25wntqqy02WxOFnLj+xB6/HNTwmdXTqdTGTHmfKA7lhKSxAOCbPr9g90n82X6AcGfTgVxUTngtKlD+J4UAw/2S6VSzulfJAe8SZ3fiNRiQbTgHvgvI0H4Gxb9IAVwTexVmHmmQbiCD1suHy26En7xaDSa86p/A4ttrpuIT3ohpLcTxw/tAWJ9vzUaSWCLm3DXZzS+z7hELFzYjX/i8fiTu9T04x9LgQk+PbvDKQAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-wiper-open .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAALxSURBVHgBtVYrrBpBFJ0FFAqBqCIrUXRBk5QaUleewBBIlwSDoW1CUlzz0CSlaJJHA8FgqMBg4CWIKkpRuEfQCDAYAvSeYYfsLgss6fYkk5ndmXvP/c1HYjaQTqdjbrf7PQ0VarLWgBW1Cdput3tutVrdW7qka5OZTEZ1uVwfaBhj9jDf7/ePzWazwe4hVFVVPhwOT3cQnRFLkvS20WjMzRMuCzKFyH7/AxkAg18oQp/ME24LsgENfcwBkJfvQqHQejqd/jr905HJGpnMHIYW3iHGp5AS2df/QabpfiKHfCdCVCN1qh1hv9/PIpEIi0ajLBgMskAgcDZfKBTMYjJVL8+nh7MeS/8ioFiQbDYbtlgseA/lXq+Xt9lsxrrdLkulUmw8Hp/poLB+JC+rkpa7FysiKEokEpyo3+/zBiIrr2EU1kKmWCxariMvsy46IRJWZFBSLpf5GApgvZUSYLlcstFoxMfwHnKQN4Mi+cYdDoe/IGpmslKpxJV0Oh223W7ZLcTjcb6uVqtxLxFayJtkfSga2Sycy+X4YnhlBzAQhGI9euTRqnhAaNjkKA5Unl0yALlD0SC0Au12m/fIvx5nRxsEYV2lUrHMgxmiYMwGwmiE1qzDrSiKSv0r8QMxF2Wdz+fZer3mhXAJCP9gMOCGAiBJJpM8h6jqXq9nWO+hLfGH9ohiVoTFIEbxwFqECMoQInwLy4V3mEMe0SB7YWtMJJzoVK7fLnkgKg65BVBM8Bj5gjHwDORoGNfrdUMu9SDnfl7d+HqAEArFCYNQYoxtAODfJSIBimTWpV2Swxt8PLwiRAgjGrwXuEVGmBNXw6MxP5KXMWYTCKs4U+2COH6g59tCu6uG7A7AYxteCcypVU+EmgVZbcJxkO4HcmplIEQuMcGOTz8nyT6T7on4Npw0mMBzgDnkqUZWNfyzWujQM/FB79lVQh2xeudbZ0VE36mvipzdRagjjtFtnSBlr9nxuS9uGCidk1HPdFp1xcvsGv4CcbeEIeSIw9MAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-wiper-open:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAM0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jbDCuAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-wiper-close .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAANOSURBVHgBtVc9TCJBFB52r7jYyCXWnhcbO1aru8RErjGXWBxX2BijGG1svNhJo56VhQU2ViQsgdDQYEFDc5rQ0BDoaMgRGhoKaMhdCHDve+6QZVhgMfglm9mdn/e9v3kz6xEusL+/79c0bcvj8fjpc8V6gCY9VXqK3W73MZFIpN3I80wj03X9il79wh2q/X7fJAXvTdNszkQaDAZXaHF0BrIRcvLKERE/OQ3qYwh/06shXg8vRPl8PlEqlZ4nktoIV8QcgBxwItbfitBOvL6+XioWi2XZp8kXIryaN6FNdpSM8spvthRWUmPaJ25vb4vV1VVRqVSGBCwtLYm1tTUeW1hY4KfVak2hFe+J+B+5+QkfnL2Hh4fI1KAq/OLiQlxeXorl5WWxsbEhNjc3RbvdFrVajVvMkcTlclmk02nRaDTGETfJ1Z+wlTxWLP84zQoEAkwEodlslh+QqZDWY36hUGByp3m9Xu88Ho+HNaokfidCCAIh2kgkMlYQAOtyuZy4vb1lBW9ubnidCioa37klkw0nQrgWgpLJJMfXDUAOBbEO66GAAkOS+tSRk5MTXgjr4FIAMXULrIObz87O1CHv8fHxR03thXAkDhbahezt7TlpzkA8sc7uUngIQIhUgNRr70AWQsu7u7uBEPTBdaqboQTcCIUgXL4DUBzjTrHVDcP4BmVlR6fTYVLg9PSU9yC2CIghEG7HHIC2GluJOGYyGR6DYiDCGEKD/iErNS2sU238QnH9rGqDopDP5zm+EIJ3aL6zs8NEUAKCQSiVwxp4BFaHQqGRwkJoRqPRkEZ7tCjGAAJQHED28PDAVkirsX1kUcAc7FEXWc5c7+iQTltnpyMgHNYgUSSZBL5BhqTBHkVMAZnxKsijMbQ6Vf+/FFe/mFLs6/X6IJZ20t3dXXb34uIihwFuTqVSI3Mt0nPia3LtpVLot461V0FWLiiBZwzMWCx2xOSy5+DgIEya/BRvA1xfvlKxr+JjUBwola/Fy81u7iDCX5JwiJSPHNJm3sQWoTnUp06a57XFIrxW+0dug8guutM8EvEHpxPIJRDDH6qFA2UmrSSrg0SO5HJLjhDdUxue+bLtQG7QqR8ggVvC4beCFHumRMSxVJxEJvEfnFm91YrgD/sAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-wiper-close:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAANwSURBVHgBtZa/SyNBFMffboJaKAS10SZ7hXqFegGbCyjmUPTAH3eHlZWmULG6u/Kqi/9BLEQRIdoKigf2l1Q2ChGtBLmtFAQloPgL1HvfRyZuJhuzBvOFzezOj/eZee/NZAzyoMXFxYjf7+99enqK8GNxlZVtyhiGYXOZ5vo/MzMzW17sGaVgPp/vN2DkTbZpmqs8wfloNJqh10AZZjEs8QpYAfzx8TE6Ozub9AQFkGf7l55dWLbYTmxqamruRehbAl8CG5UEOvTNmWSmekHCVAgIJVgB9eHHD1bJSTPp7NXe3k68Hejg4CBvdF1dHTU0NFBVVRVdXl7S/f09nZ+fl2BS4Pb29geXMXyIe5eXlxM6FMaHh4dpY2ODGhsbybIsamlpyUFQog/geE5PT2l3d5eurq6KgTPc7x22kpGN5T+3Xl1dXdTa2ipGDw8P5bm7uyvoB3hTU5P0t22b9vb2ZFIu+smxjSOmEbfW2tpaAcJgMpkUQ25ACG4+Ojqi7e1tqq6uprGxMRmvi8P1BaXJLyE34MjIiBja2dmhzs5O8iLAMUGMw3h4yCkOobDYs+YHfXAkEpGBWJ1KJMTUqzAObh4cHNSbAisrK0FTrw0Gg5I4GKiEBAmHwwUzV2pubpZJOV0KD0EIkS6TlxxwViALMcvx8fGcEdQhKzs6OvIGYxLIcEwIxuFSvEP19fXSjpzQ5RsdHf3M5XtV8fDwIFDs0f7+frq+vpYtAjAMwu3oA/X09MgqEcf9/X1pQ/wBQhuyPZ1O56/SNOO+oaGhMAM+6rM5Ozuj4+NjiS+M4B2ZGQqFBHRyckLd3d2USqWor6+Pbm5uZAySqa2tjdbX1+VbU2Z6evoX3JumIoIBHA6ATUxMyCl1cXEhQOxD1ON9c3NT9qjufl2K5a+pqdliA4liHWEc7kOiwMXOvYpvwJA02KOILwS3FoGuoTTlWDKMJJUQ4qwfDmoyAwMDkkiYIBIOsS2iJH7k7MW1JPu3VpbUyYWVw91u4oWtcjyjOSi0tLQU54bvVBnh+vKJry82PnKHAydFDI1UATFwTgHzoIgtZvPW4Cxw1VlX0YtZFhjT6wvOXrgBK+ZnjcqXimHMrbHUZXuSV43kCpE3IUTzvPfjr75s61pYWAgx/Ctndy9/WlxaCsKPzZs+xc8Ww9IvwZT+A8hTw5fcMmXrAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-arrow{cursor:pointer;position:absolute;width:0;height:0}.jb-pro-container .jb-pro-ptz-arrow-up{left:71px;top:15px;border:7px solid transparent;border-bottom:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-right{top:71px;right:15px;border:7px solid transparent;border-left:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-left{left:15px;top:71px;border:7px solid transparent;border-right:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-down{left:71px;bottom:15px;border:7px solid transparent;border-top:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-left-up{transform:rotate(45deg);left:32px;top:33px;border:7px solid transparent;border-right:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-right-up{transform:rotate(-45deg);right:32px;top:33px;border:7px solid transparent;border-left:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-left-down{transform:rotate(45deg);left:32px;bottom:33px;border:7px solid transparent;border-top:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-right-down{transform:rotate(-45deg);right:32px;bottom:33px;border:7px solid transparent;border-top:10px solid #fff}.jb-pro-container .jb-pro-loading-bg{display:none}.jb-pro-container .jb-pro-loading-bg,.jb-pro-container .jb-pro-poster{position:absolute;z-index:10;left:0;top:0;right:0;bottom:0;height:100%;width:100%;background-position:50%;background-repeat:no-repeat;background-size:contain;pointer-events:none}.jb-pro-container .jb-pro-play-big{position:absolute;display:none;height:100%;width:100%;z-index:1;background:rgba(0,0,0,.4)}.jb-pro-container .jb-pro-play-big:after{cursor:pointer;content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;width:48px;height:48px;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAIVBMVEVHcEzMzMzMzMzNzc3MzMzPz8/Nzc3MzMzMzMzMzMzMzMzLVn6fAAAACnRSTlMA+duduRUwSGSD8toSsAAAAI9JREFUOMvV07ENgzAQhWG3lLSp6MwCViYIRSpG8AiM4FWMaPymDBKESMF/cQ0S136F353vnLuo3gp1kOYEoCXW4LFKIZAnqAXYICeASoAdzgG+cApwgF4EfwF+oDkCqIwA6gnyAKA8AaizQhsBAjzuqUHofInGIQbjRxXjMrTJuHDestR4Bng4eGrN0929PqNfzC6h06weAAAAAElFTkSuQmCC");background-repeat:no-repeat;background-position:50%}.jb-pro-container .jb-pro-play-big:hover:after{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEVHcEz///////////////////////////////////////////8Uel1nAAAAC3RSTlMA+rbVFUecgC7rYhEEz+4AAACbSURBVDjL1dMhDsJAEIXhdeiGpKYWQVKDWc8ReojFc4ReAlPFFQazad7lIGkb0jK/WEPSsZ+YN5mZEP5UrZIP0vgE0Kv3oPlIJlAk8AJM4ASYwAkww2+ABfQg0ImgugPYsfNBVl99kA0AsjOArAPQpRTGHiBB8whxM0y+3skXNltsvMYriIWrpWPA80mFJ5qL3gAfB1/tcAt7rzdiV+HEgs1oBgAAAABJRU5ErkJggg==")}.jb-pro-container .jb-pro-recording{display:none;position:absolute;box-sizing:border-box;left:50%;top:0;padding:0 3px;transform:translateX(-50%);justify-content:space-around;align-items:center;width:101px;height:20px;background:#000;opacity:1;border-radius:0 0 8px 8px;z-index:1}.jb-pro-container .jb-pro-recording .jb-pro-recording-red-point{width:8px;height:8px;background:#ff1f1f;border-radius:50%;animation:magentaPulse 1s linear infinite}.jb-pro-container .jb-pro-recording .jb-pro-recording-time{font-size:14px;font-weight:500;color:#ddd}.jb-pro-container .jb-pro-recording .jb-pro-recording-stop{height:100%}.jb-pro-container .jb-pro-recording .jb-pro-icon-recordStop{width:16px;height:16px;cursor:pointer}.jb-pro-container .jb-pro-zoom-controls{display:none;position:absolute;box-sizing:border-box;left:50%;top:0;padding:0 3px;transform:translateX(-50%);justify-content:space-around;align-items:center;width:156px;height:30px;background:#000;opacity:1;border-radius:0 0 8px 8px;z-index:1}.jb-pro-container .jb-pro-zoom-controls .jb-pro-icon{vertical-align:top}.jb-pro-container .jb-pro-zoom-controls .jb-pro-zoom-narrow{width:16px;height:16px;cursor:pointer}.jb-pro-container .jb-pro-zoom-controls .jb-pro-zoom-tips{font-size:14px;font-weight:500;color:#ddd}.jb-pro-container .jb-pro-zoom-controls .jb-pro-zoom-expand,.jb-pro-container .jb-pro-zoom-controls .jb-pro-zoom-stop2{width:16px;height:16px;cursor:pointer}.jb-pro-container .jb-pro-loading{display:none;flex-direction:column;justify-content:center;align-items:center;position:absolute;z-index:20;left:0;top:0;right:0;bottom:0;width:100%;height:100%;pointer-events:none}.jb-pro-container .jb-pro-loading-text{line-height:20px;font-size:13px;color:#fff;margin-top:10px}.jb-pro-container .jb-pro-controls{background-color:#161616;box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-end;position:absolute;z-index:40;left:0;right:0;bottom:0;height:38px;width:100%;padding-left:13px;padding-right:13px;font-size:14px;color:#fff;opacity:0;visibility:hidden;transition:all .2s ease-in-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:width .5s ease-in}.jb-pro-container .jb-pro-controls .jb-pro-controls-item{position:relative;display:flex;justify-content:center;padding:0 8px}.jb-pro-container .jb-pro-controls .jb-pro-controls-item:hover .icon-title-tips{visibility:visible;opacity:1}.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-face,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-face-active,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-fullscreen,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-fullscreen-exit,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-icon-audio,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-microphone-close,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-object,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-object-active,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-occlusion,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-occlusion-active,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-pause,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-performance,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-performance-active,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-play,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-ptz,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-ptz-active,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-quality-menu,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-record,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-record-stop,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-scale-menu,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-screenshot,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-speed-menu,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-template-menu,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-volume,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-zoom,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-zoom-stop{display:none}.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-speed{padding:0}.jb-pro-container .jb-pro-controls .jb-pro-controls-item-html{position:relative;display:none;justify-content:center}.jb-pro-container .jb-pro-controls .jb-pro-playback-control-time{position:relative;justify-content:center;padding:0 8px}.jb-pro-container .jb-pro-controls .jb-pro-icon-audio,.jb-pro-container .jb-pro-controls .jb-pro-icon-mute{z-index:1}.jb-pro-container .jb-pro-controls .jb-pro-controls-bottom{display:flex;justify-content:space-between;height:100%}.jb-pro-container .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-left,.jb-pro-container .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-right{display:flex;align-items:center}.jb-pro-container.jb-pro-controls-show .jb-pro-controls{opacity:1;visibility:visible}.jb-pro-container.jb-pro-controls-show-auto-hide .jb-pro-controls{opacity:.8;visibility:visible;display:none}.jb-pro-container.jb-pro-hide-cursor *{cursor:none!important}.jb-pro-container .jb-pro-icon-loading{width:50px;height:50px;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8BAMAAADI0sRBAAAAIVBMVEVHcEx4eHh4eHh4eHh4eHh3d3d4eHh4eHh4eHh4eHh4eHiqaCaRAAAACnRSTlMAikwX3CxpwZ7zIGi5xgAAAZ9JREFUOMt9lb9Lw0AUx2Njqm4iGEqmEnBxslKUdhJctFMVcW5wKZ0CLpJJQRw6iVqQbg3FtPdX+l5+XHJ3796bQj557773fe8ujtOI+6jz5p84dHjTkYD4+RhT9CIRZWRPJr1bChnbY532GhT4oUpbI6HEuqvgIH9544dh9J4/rpr0Ms8oV3zMNT7X1MXSmaznzfHjM4n72moe5n8ryYrW9rKRvgf0S93JA7yKa9lbzUg3keJb8OVCtwkrFmoO4MnsAuj5rGqnZg+GZXUXkl9NjEui9n3YA9XgpMgakLXz6ujMTIgrCkPVv0Jil8KgKQN/wRN69hLcb1vrbR2nQkxwiZTGQ5Teb7TO8PUaS8Q03sE+zkjP8qbjzgJtEhRbV4gnlkOFeM7hDYNdxPbiYFvKSHN6L2NmY5WzMYPtplZdTxncRvn2sI+DHIoug22jWMaA12Y7BrXzrG8BX32XPMDKWVzw1bdMOnH1KNqNi8toqn7JGumZnStXLi0e4tcP6R3I635Nc/mzsMxl9aux9b78UVmn2pve8u6eR50j9c0/ywzyVl5+z84AAAAASUVORK5CYII=");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;animation-name:rotation;animation-duration:1s;animation-timing-function:linear;animation-iteration-count:infinite}.jb-pro-container .jb-pro-icon-screenshot{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEVHcEzMzMzMzMzMzMzMzMzNzc3MzMzMzMzNzc3Nzc3MzMzMzMwv5ahDAAAAC3RSTlMAW+8S2UGVwyyZnOTRhEMAAAEfSURBVDjLzZKxbsJADIYdBQpsSCyVMlXAdEuQYGKpWFk6dWHJgsQ7sMDSpUv3PgITAQT0f7ly57ucQ45KXRAZot+/89k+X4ju9KzL4XOhlm3pR0enYrWViSRPXQIQSASkRSkIJEFRimYCuQAHSW89IOv6SH5TCsuAj68Ab1wDzqkAzqoC7AUAPtgsABgkBBgkCJiNHehGok//KRVsHqd+3Dj1/vukt3AH/Jj05s5/AmyZhFVWXDls44iVvfQWkCvgxU6g9ZdJfCLvjJbYaT3GvjOY4mQSG3SJGjhr/Y1Xohp+TGKqqzexZ/1GVGdNCitt6R8zVvb9d+JmKdl8o5sPWbtxT6zFuJcDQtk92MNmYiXHquYlZlVt1j4P6cd7fgHFW7Nhqu29TwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-screenshot:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEVHcEz////////////////////////////////////////////////////////NXt0CAAAADnRSTlMAWe+X2TINXUYZvctoYyuS2NgAAAEVSURBVDjLzZKhDsJADIZLCAsEg8WgEGCWGSwCgZxB4MgEAonB8wQEXoBH4BEWXgPJgEBG0mdgR3u77raRYAgnlq+9+/t3TQF+dKbZcJXSYSnzlViT457lRScKmBqILSFA3GoO8S4E+Ex5JiSJ4CbVdyOQdZNomX9D4dl+ko3NC8vFFmhPy8FIsi0ZlwLBW/LY5BxYYreUSgoFAEmhB5Rc9OCbUoXmTmDadQKTn4y6A/XTaoSKdb6KyGU6RJ7eHgpb3ABinAoil303xB6vQnRahNhXvMdre+fzOgxVrokX4jHAnBh8PALU8Eq8BqgTg/vePF8tpuPy9/NFaalSc273RizarYqfkswjifNMQ/TyTGMv4v87L+ks5gqDbc9OAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-play{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAIVBMVEVHcEzMzMzMzMzNzc3MzMzPz8/Nzc3MzMzMzMzMzMzMzMzLVn6fAAAACnRSTlMA+duduRUwSGSD8toSsAAAAI9JREFUOMvV07ENgzAQhWG3lLSp6MwCViYIRSpG8AiM4FWMaPymDBKESMF/cQ0S136F353vnLuo3gp1kOYEoCXW4LFKIZAnqAXYICeASoAdzgG+cApwgF4EfwF+oDkCqIwA6gnyAKA8AaizQhsBAjzuqUHofInGIQbjRxXjMrTJuHDestR4Bng4eGrN0929PqNfzC6h06weAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-play:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEVHcEz///////////////////////////////////////////8Uel1nAAAAC3RSTlMA+rbVFUecgC7rYhEEz+4AAACbSURBVDjL1dMhDsJAEIXhdeiGpKYWQVKDWc8ReojFc4ReAlPFFQazad7lIGkb0jK/WEPSsZ+YN5mZEP5UrZIP0vgE0Kv3oPlIJlAk8AJM4ASYwAkww2+ABfQg0ImgugPYsfNBVl99kA0AsjOArAPQpRTGHiBB8whxM0y+3skXNltsvMYriIWrpWPA80mFJ5qL3gAfB1/tcAt7rzdiV+HEgs1oBgAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-pause{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEVHcEzMzMzHx8fMzMzMzMzOzs7MzMz4IlKVAAAABnRSTlMA6xIU1hVqIuOVAAAAMUlEQVQ4y2NgGFYgLS3RAEQziQFZoxKjEqMSaBJpEAkgIw1ZQlBQRAEs4QhkDeIMDgAWx1gMHyIL4wAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-pause:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEVHcEz///////////////////////+3ygHaAAAABnRSTlMA7OgSFBXMmAA4AAAAM0lEQVQ4y2NgGFYgLS3JAUQzi6WlJY5KjEqMSqBJpEEkgIw0ZAklJSUDsISikpLQIM7gAJjhWp6XcaOxAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-record{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEVHcEzGxsbMzMzMzMzLy8vMzMzMzMzNzc3MzMzMzMxEZ/aQAAAACXRSTlMADPKKKeBxlV6neZ4mAAAArUlEQVQ4y2NgGDZgJhpowCURAJeYpIQENJEkCgWRgCeShAGyjfgl2EqwS7BFToZJiLg4ICTEImdOh0pwRM6cDJcIjpw5E6aDFeh8B5gECBCUYAkKCoMbNXNSOlyCgUEQ4apJJmxIEkjOVWFgxi4RgEsikGQJnEYp4pLA6VxUDyJLIAUJcRLIwY7qXKSIQvOHWCQODzKIleBPPjgTHM4kijNR48oGkajiYUMykwMAAfmZhUjBISQAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-record:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJ1BMVEVHcEz///////////////////////////////////////////////8NopmKAAAADHRSTlMA8gyMLeRw1x2DBpWGN2QDAAAAt0lEQVQ4y2NgGDbgDBpIwCVRAJc4KIgEZM4EwCU2KSEBHySJCcg29iBJGCBLgHUs24FdYlnNYZiESksDXKJALebMaagES8yZw3CJypgzZ2A6WIHOd4BJgABMgh2XBEtpaBjcqDMHs+ESDFyLEK46aMGGkEB2rgQDJ3aJAFwSUSRL4DQKp+VHcTkXxYMoEkhBQpwEcrCjSCBHFJo/1GIO408MOJMPzgSHM4niTNS4skENqnjYkMzkAEgzyFpeX6L3AAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-recordStop{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAOVBMVEVHcEz///////////////////////////////////////////////////////////////////////99PJZNAAAAEnRSTlMAMPndsnZj1CSYPcmL6wsdoU80pOJLAAABu0lEQVRIx5VV26KEIAhMA++p9f8fezatFDPr8LSrjMxwiWlqzRuMYKW0ENH46c3WuGyVLXEduuO83UyK59fl1jX5EEUXD9DOaSh43XEP5zUIdZ4pAecTofVnWSt3ip4rx7N61vjnY1D30CpH4QQR8vsP+RA5Rs3KpjfMU/pMim/LgbvH7DF2F8sU0owqapKLqgnhuGWwImUagn2zhUX6WQQoYkXG9WxSAJd700/ygsCpAoliaDsPiG48GM1X5Ft/06sfp8DrDE+3DpekWjxM6366fgEcnklC+AIIWYQmPEeAaUmjFOnhCLDfxZRH+w1gU5b/DYjfNcyJ0p7dxX8B+FwxQVtvAGB5ig0d5gFA5KbzS91hI8CenvlHflfN/XvzJQnxbBEko1gbvVnPii+FadSVRUEaYylQfJtpLB+aRG4LY/80yKdUbCraM0lozGR4ewZ0Wtnj1iC7hjWKNnjYmR62W15cLlL3+2pyMR09jccyuyUrHKsvthc5xsY1iWJ0Xk3t+2XP7AnWwrAQmBH6asXubmL1Z5Lz6o992jWiu9lnMSiQsK27FS9NxhCumZgB2fTBPFsFolhZr5B/D3o9sJAI6skAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-recordStop:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEVHcEwimP0imPwimP8imPwimP0imPsimP0imfsimPwimP0imPwimf8imPwimPwimPxLmg1rAAAAD3RSTlMA15sisGUvdz3szYwMT8H+hDJEAAABx0lEQVQ4y3WUO08CQRCADxBQchBiMDE24KswFlw0Wtig/oHzUWglJBZWio3GDjUxlhhrEzT+ABMrO2iptLLVRluDggI+xtmdXW73LkxxNzvfzuzszNwZhhDzdOxqaPGgYrgkOgFczh90ezAJQmpL2v6OHYnqk2aWxOTtAnu/O/Y5XNZXmTZjo3ot7aESwLdFeqAM0MoJkMf9ltwVQJ9PcQN0UFIJogvdJgLQVFMsAlxyBaPmVBDCE8W7qd+2SDsx0q4OwhSrCG134W54jDfKLjDNxaL8/9AAMM/solptRnoALBbwEPWYrOEzLnrZsTGoMW+fBHG2SiLPUNI6KMOH8QS/XsCMBYQekIEv7NGZF/Rht2yqmA4i3UG9O0iTqgMfhirDhRdU8XJZqqEO8tDAqje8IIt1r+I5HmBjfD9AxQ1MgJQRpc6GJRALHOAS1WRlhMs4VaSFzwIWzCUF3op71kdNsNs/FDCuA58YqCQl7IhN3WbDnlLtfjnuON515WM17c7w41QPOuBIzDT5wqi0T4ESGV3gjtTjkuPATwHoX9+cPRlmmvJ57YAir2qKy459QL/UhrS/uAu3xf8KiX3DI+b22t6jc9F/qfaum9E1pJ4AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-fullscreen{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEVHcEzMzMzOzs7Pz8/MzMzMzMzNzc3MzMzMzMzMzMzMzMzMzMzNzc3MzMzMzMxdHBitAAAADnRSTlMA8AwGYt0aUcg+til5kgmZywUAAAGWSURBVDjL1VM9SwNBEB12IcGkMagxNktQSZFCYimIJAqKpZ3Vco3YBYs0NkKQgBg4ECtLFSFVCGgQrERBsLayPE0Ip7n5De73BdKLTrE3ezPvze6+GYDfsAQKy/Rz0i/OZJjY9XREuohTKulS+ZFGiADfyZXU5uHktI44VH5apDx554aXwJqloiIwiEsStAjCAsRNF1jCmGqa4Vc+BvS4JkjwzyPE6xiwzsxxeTbZxqjkANSWZFkoIj5bQBl4aBDfkPDNpeRRialB+SRAFz8UU1sAaEUjSCDoJ7iukZJ1V+c01bFczM1pWaa+a0Rp7MHn4V8Z1R9vLLCv9WjKdVFfk77JP+bZdz35YAfKXx6KhKp93abUYVbrj49g9aAYSuFCLbPUwzdCsYEWTloXgw1oGwQbENeuKwxzXhxwAADRMFd+zzRc6AAASY6RH8VjUHaXTrlOpDgCUP3gelc01e2d+f16cWbnQ46BGCRNVsWAWQJVw2xGfUXVv2k1OsLfazXqblzS99u1FwKFvBJioXBY2+r82U75Ab7O0ypVV0wKAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-fullscreen:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEz///////////////////////////////////////////////////////////////////+GUsxbAAAAEXRSTlMA3clDHfdfDQbsVG00u4Cqkr04dRsAAAGaSURBVEjH7VXLdsQgCPUBAROdjP//s1UTDUxsz3TRTc+wC94bHsLVmP9hkE8LIdvgupt2tFhcpy2CMZyVxNePEoqDp4hwEGz5PTqWoZNzLrmD9riltBEYzzpZQ8bweXy56Qy6Tivsp5JQYtawuMH3eJlSxIJtdSSa4xer4lMB89pK23mKrwjZVpsRzLq35vEE3+r26h6w5EKppcp3fP2lIpTPWJvoXoobeNI1sM3haHvx56tu2sdElJ54GbnPQ7RZ1sCpl8qPEMXBNQ8vN82jNbzLCPzGSDOZj/2Bqd19R1rELIEbDFrUJfKYdlALbDuDMko/hz7t8DqtCfr8h1Vt4rn7eh/6Ph37ch20aW8McsfGCOXzcr+GOlQG1rJ2HSHUDO/4Mu01qVAqTCpCJfgZ3phTS2pKm5aZOMUbs7Q6nk6L8UzRh6W78jH+gD/VRxHokPuNgUGTaPPR+zDR1mrlvcGgwkAVacSbeoN4Z0rb5/6XLrW/2GTLk2NhXHRKzrqAt9cD4rr4ddvae0NAYgOICdZyvPj4UYRf2BdfbB8iWvnTUwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-fullscreenExit{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAG1BMVEVHcEzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxi4XDRAAAACHRSTlMAf3WqJmy+7azWNnMAAADNSURBVDjLxZQ9E4IwDIaLfMzCOTDSOz07OjLir5CR0dmJFVHIzzZtnMzbOzcyZHnuaXpJWmO2ji4GhpAzzZeQzw8FKCj1pMHss9OgpwsGOS0YGOcVUMPsfBVkmJoVCBJW0FFB6SFIaMKAlRGDnEiDkuM00lP3SmL6H5QSh+iIr9ZWVWntUV9Z4qWbHAWrhcUYNLC4Wwm3xb1r2mOQYoVn2EKFAVb81KHiQQq6L3vSUoMBUmSzgCKbVeiL3eTp3Odf8H1sxRAZZNZt/Vt8AHcPQbiQQVF+AAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-fullscreenExit:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJ1BMVEVHcEz///////////////////////////////////////////////8NopmKAAAADHRSTlMAe4Fzh7MZbKPtN8gpX19xAAAA3klEQVQ4y8XUIQ7CQBAF0CWhKQHDGtQKQFcURUgqEARBED0Aoqp3IKnoATAEW8MNOACmhQYKcyi6uyjmr+aLqXj56bSbVoh/J3HBxcw0ZfA2c3FiQLGeQcWh1lOVDDJTAeCbCgAR6QqCDj0xCEU5Bl2BIALKMwhdKjGILRUYfCIOEynlvABANk64M5jabJxHfJY2I76yzYu/ZCc0s1WbNYAQ3jxqwMoGHoqWGHpUQajEgcYYcKWFtjLE4FGJQewoxODRDQOqKPPcHl9sfzSXa/0L349tEDsOsp/8+2/xAY+BZBY9KhM5AAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-audio{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAIVBMVEVHcEzKysrMzMzMzMzMzMzMzMzMzMzMzMzMzMzNzc3MzMz8gU00AAAACnRSTlMAL0jMZKt96hGJsSKv1QAAAJ9JREFUOMvN078KQFAYBfCbJEw2q6SUyWxTnsJT2JTJ6D38Gb6n5PpT6BwbuaNfTnz3fEp9fZwAP7czD0MsGCzBYJcEYsGwBEHQQRB0EII1CMAWdAOzyJUvJ4jyDVyZVHKGpj9guEI2IuhaDFadYnCkIm9I+kPgn8t+kI7kOsT72HcwQnJR9Gofy8DrwwtHK8pLzdeALg5fNb6cdJ1fOjOGYrl5CLFcggAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-audio:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJ1BMVEVHcEz///////////////////////////////////////////////8NopmKAAAADHRSTlMAL0TQf2frEaZYt8E+idL4AAAAnUlEQVQ4y2NgoDdgUcAuzr4Hh4TaGQHsBp3BLsG+BoeE2hnsEkCDsEqADMIqATIImwTYICwSEIPQJFhnBjKInUGSUA2CSPCcOcIwB1ki5xRM4iiDDrKEzQlsEuUF2CVY0jbgkDhjMLQkEkj0IM4gQQ1EHMHOOXMiakRpTiQQtXgTA+7kgzvB4UyiuBM17myAM+Pgzmq4MyfO7EwjAAAEf+BAxqI/agAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-mute{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEVHcEzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMztXryaAAAAD3RSTlMAHd4P7ztyiy1OnKhdx7uY2gyAAAAB8ElEQVQ4y72Uu0vDQBzHE45C3SJFaSGjUEiRpJRCBifXokkpSv0DfOBrEKxUUSoFH9ClFAUfU7c4OARRCs5WjThIsJuDlLo4ldvPe8SYxGyCt1zgw+dev+8vHPcvYybvfCR2OgUv2CoLdI62bUn3gq5UJxOomZofXPUNrIChJRklfcDSiKK2bYQ6PiCaREk0EQoYPFYa3F73F+DGsBJLmAjBAMBKakG15KAxqIhd2KuK5reRccBDNbqGJhfSlnNc/kBh4OY+vaoR5QrRC0afKgxMrKdXNKI8yxRENpyd+i0VA6wMm5IOBmORCwfAFjGwolofevbuPrvpGhRgpVaqiJflrLuUQQFRToS9l894EMDe7q6yL7/G5wMATc5mQCiAvQo3HAbwLtyYHQZgTxhohgGUa/CP12EA16W2/Ou4ZEj1dNG9oPMkZGiwJWQ8j+huPoJy9Z/XHTfUFSbAURveCtE5px5vs7hQDKS25FSDn2KR5Up1/lRmIHne7BvKd82LMRJbSjr5M40lmaYZ5/PRpiCpizjJyk+CwOGOzACLpSdz02QxkiuRhd8dNOwkV7zl2YX1mcySKJrQiPkXY9klSt6rkJPRwIlmzrcWSGyzHuTb11V/N0y/S6SdwdCR4m/47OIN7XOQCfwJwHGp8IcfyRdBLEZK4Uxp6wAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-mute:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAP1BMVEVHcEz///////////////////////////////////////////////////////////////////////////////9KjZoYAAAAFHRSTlMAbk2o8o0P5TsGnVojFi/XHcV9urLaq0oAAAIQSURBVEjH3ZZZkqswDEXxLM8T+1/rkw0BuwM0f131+IvDyZVk6SrL8p88QCHp8UAnWmoWoG8AwQRN4/vOiqwUuwWqiob646MMhEW+KnMLMIXffgiZoODBusb7kCzjByF7OOszkOyp4amJ7fWVPwCN6BpyWRypvANPCvi7u4aTXe13YI+KkYA5bMRTSMlLnSyGwisSH40B0FJOrKVB6iAw2U7sGgPgQ/DTPQjitCOZT4Q6gWCtGwGFbSM34ENUNSpAKTACmC31rnRgJwjDdkFAJpfkAsZcAJvCSVQB2FaWWKdB/ATMAHwIUYL21lRBZRDiC5AnsBHBUqxEyaraFMoz0AnvHNa6xDWS34FGgNf6PYAEZoCt+BroUWFVbeb5HbCqSvB2cToyca+Adjlycdawt0C/HeyScl1W/w3gsU3aAd7JF8AuAN6isr7NAogXAFeq59Ec7ifAm49hF8wCMWfVNXAeCAkjEGuBr6R5ZGJzBrl4gGniBME+w8aMMyCsNZtfaemnmYaAQ6I3Rz0fnDhHJxc93Vrr7sHWjP3XRtTba2L3EkdFVaPC6YmXxKI9DGF1YPLdiwfD2r37cL5nDVw+uKzU5K27hsXCXPtyC2uyyl0D0p2TY7VaIvFYWU0Dm8TdOXmrVp52HG4lU4K/N38PpS/Kw70dbmb/sC0WCcQwNNzzjrzUj7veUyIIyL/4m/EP8V829O8zh5EAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-ptz{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAM1BMVEVHcEzMzMzMzMzMzMzMzMzMzMzNzc3MzMzNzc3MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxDm1AzAAAAEXRSTlMAHqw+E8It/gjxc03jhGDTlgAjE2kAAAI6SURBVEjHpVbZkoQgDBwg3Of/f+12gtfMbK1Yy4NampCju4Ov1y8ruNyyo9fyCibVlNW6vUu29GpWQwTVdPTernqwffHex0WP4Nro3k+PrMKCvew/PcZ95aoNsY9yua+cGxTZsnf2K7ch4CAdGnWwYx/5LgKZCgxGdrhH3BeqNmnwviFXPZbQJmcM25HJ5n7/Pczr2QqksMJfO7BJOHLKLWFdMiL1QXYRwFagMklb4GB1zS7s8Le3fqH7Q28tVLkKdIzeaOJB2OKtY8KfTQCUa4++dNsLbrqpTR7xguHGt8hfg8P+seuaEkNdBjahzOD7g1cHP21SL2LtMNBKMdTRJjffTX1wVgrsEb1ITJU6QknwYJAcQky2cE02NbzPp70KyKggtpu9xM7Ik+CBIqY+8FrYyRUkrs+MEm1TG6tG9LZxNDNFGDue63TYGgIHqUUcuNhvhyZtn5LnlDq3Juxa4noCuX0scErOpNMDCrVcHPCS5rFGuQR9KZpxnB6CQ0ZO+AIBcTPk3UdbTx1L7jLEEHsMW7ZYm8NlIFyxn8+xdL7MURYEhzd5k2N2TabxIAORwC2r00QQfNSgrnqTJfh7cDmDu9ggtV0EZFr7kGu4KAxtNDln406TLwF9iZCIwn9EfjPuncRHYm5x3NfK3cFAS5kWxljSnTFlPHBAUFg5HsCCVOd9cdwXq+027un2QJlMjqISJutCDceRtTTuT4+1Q3HWHR8cu0fh9sGvADTYH9iLah/9nPz5+/MDJnQfoIVoAnQAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-ptz:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAQlBMVEVHcEz////////////////////////////////////////////////////////////////////////////////////1bZCPAAAAFXRSTlMAeVoYDS1pBiPv4/g6lkzO2qSxvoixscijAAACi0lEQVRIx51W2ZLcIAwcLnPf+P9/NS2wp5xkq0ziF3ZRC3R0i/l8fvi04oxx89n+RBi1sqB38TKw7lw7lNzDa3U0e57bHhJ4d567HlqGC08eLAj9Gv8XD4/OwtsdhlfCW2s9LfWtuNrMhG1uLWP17Xh14LF4m8dx1OJ9jkm85YCYch5JzDVy81on3MFYkpTNYGmHHloYI+aqlNhlh5ZSvmH1AyBUwPcMX+u/clW3XYvA2YgRGXyZIZX6PXv0l3GlV9Jp9FKcK7mytJIg8xEeBdaBtV4P8tAixexnp73tY7ZBkrk9WEL8t7ZUDqtIA3jXa8sODSeUVqw5aztT+g4QeNAgM0PGTA0+EmfVeUvU0CEW4hX+lt/zseE7jJKDSmi0EUKBhr7EAMKPvNjOA9Fz4Yk/CFgcGRSdkYOHCLRxQfzKRN5SB/b5Ot8SzzQiKqcb6ipFdCfi1JI84OBdxzarhJ8RkpxHOQszl7bpn0GpmnXq6R4OfTkwwlyUWzeQg7rSLNhNUzEUEqJF3DMHeeXgqRIaYwHimLKipK8hMZOYVfJ5oKtIFSgXk5z4KcNx3GOIPGYfPigh9YGHBNQKVKbZhxMnqq+OHfWBHARZfWm1dnfSXfJuXInplse8wy39zkisdQ5kuLY+Bpc5hwGiH8Mx1rE24DFaLqXkfrNVkjk+8JPTPF0bUw+R9MCVuA8ks/xDyF/9orMqpBQeiob5RbIbmv7/TxvoX1Oqa914TsYg7QUWx8Y7R89JQY8mY6Dat1G5GARuMOgYHY9cbL1vNvc++fk67olLk4nrQSl7457OPqdeKn+vEwm4LPzW87DyXvqIyei9znHS+cZz9SxV+Qf8nNbjn37NkDx4+PmCXzHOLUMtjgmUAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-ptzActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEwgmv8imPwimPwhmP8imP8imPwimPwmmf8imPwimPwhmP0imPwimPwimPwimPsimP0imPoLqfILAAAAEnRSTlMADprCJBnU/gXwh3LiUKxAXjJ/ELXKAAACbklEQVRIx5VW2bbjIAwLa1jM9v8/O7Iht+09MwPlpS2VwLZkJ9f1lxVG1joPdZ0u1ZIxurhv8DH6dMpQI5t439GAEc7xYPgTRnAtV7plReRhd5kDP8+fd+wzt70yPhIJzWT7/6DCJCAYLReZPMIuJC4pClSktHqbNpJO1aTmmAme3cvtWs9NSfq52CPhnJNjlbVHwgmWSWGHeQHcKFjj7fygwidf2fa4mbVOuladcnsoDn9/CKKAWf6HEtpANiJvUp9Fgr0SvocPP/sqjOCK9ktpyCAo4Kt/d4n4/6baseNKAt5XrauPN1A4ZLAd30RUI4kNfELVx+yd3lrXYIg1Bp/B/dGs5N8mPsJoVyiwkofQSlm+K9aiwmoQMDoI4wefoK/rhkESrSuV+BR2i6HZH9juLzxCtBmn6rFmB66gNJQwBOSxncT/N3FAlxAoLQfJDy2+6rMLI3aznl9fhOcGSdZzoNhex2K3TXJEVe3M4Zb6QhHuJc5BWakYIqqietcPw6FK+EHofUHRqtLEQ5X8dKVENXXgEpLOpcjwkFI30YFVHE8fyx2ShZJ/ydTKlZwZ4BCOv/af9uMi0DILe4kieynScgPbhai+DRDckTT6N6zJpI3HMghM3BMg+q9pHmwrbR0Q0D5wc0JHPy0E5Ur7Nf3Rk68LnR0NHfO28/T5P4cNr+uLFR7eEdiNxvMRbd5Onlqsis4iIVdme4di3akWOz+3T0aUnFWHa8QZrO51NO69MeLPafrNuBenxel/3d21j8k/jyxf+75OQabFxOtuT94G3Lpjzb0zBn2Dl0ep/waPidQ/p/XB60Dp7e8F/QO7WSJg4zEzdwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-ptzActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcExru/9ru/9qu/9ru/9ru/9ru/9ru/9svP9ruv9ru/9ru/9ru/9ru/9ru/9ru/9ru/9ru/+3uxEqAAAAEnRSTlMA5q0cR/PC/ggSKtN5OIhaa5izIOiAAAACV0lEQVRIx5VW2ZLjMAiMToNu/f/PboNsJ5PaKWv8kKRkWkDTQF6v/zyUfO+JX9sP1dKKd/v2acQcm992kbo1R4il7iHIif0BRNtCUOozH4cikAdt2YfjRLTnzN15/8I85wFCI2xDzlnyMLO7R0aFoTzbFGB+jIkYLkyePvmW8d2fs2ZfZuv8It9s6zvV5uSr2LmKb9oVh37QvpjYOcf8fcO3Cb1jGqOU0SvTTd6X2KUBLgKdLzaiDtE2n+isTh8/+AX7E6/Vh/NNSyfVm10RXIe1nxXRapmsDQB7SMnkmE0IxgqvUn0jteEf1T2CHXgr0gjZllGk1HoJL7lD7fRpD20CgJcwQ6EdSh3lLK0zVfuqz2WvPlPJh7HqnCQ4MysxoAYQE0vHub/toRuqzRy5pEUvbg62MzlJQn1MHBe1x7WSAddpNDSN1c9wRMhKfi2jrICwAIsQvHkD7Al41bOrBNC1Y7QdmSg15LDokGETJB/imxYJKfmFMDqI3FjUkDS3NSEDjBaxknRYSb+4nj4kC43W2OKrkqGB8jV2Fq03YiWbhHQTpUV1mMHXWYf8HlNX7ZUQRC6iwBAIK0r0ILr1UxqKsPattAkhwSIiMl76bT/Ft/TbTy2jHQoM7Cz9isHVMb6GILl0H4DGivbw7xNc8rAtiJn3O/qvD6JT/wgs7Y370ZSdWmbZWEKiG1lXImldW7Q1jGMbZW9tUVKZmGjjGvf+EXAqzWiX5OfFSHVp/zjbfGPc3whdcbTF67V2N1e79qYMru2/AnzVYFsdWFt/+nOypv8vQvoHou4gOtSrG5EAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-performance{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAnUExURUdwTM7OzszMzM3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3NzW8hQDoAAAAMdFJOUwC/gO8ra6tUQNmVEKtAA1gAAAE4SURBVDjLzZMhT8RAEIWnpS3tXcWdQ6wgOJIKfFdUICv6AyruB5w4EuSJCwRXgUBWkGArLsEi6JVuaZkfxawguSWz/p7azLdtdt97C3ASagp+PpeXPDjHVx7McMWDCBc8qPCZB4m44YFIeOBh+ckCf9z+sCCYqi8WvA/5Nwu26cfA+JRBs4h7WmX/tr9AXcQHAPdgzEPZh5idTQBOZ3zyiModISKQGxZ7dd85E0SKfMGjM7vXeI/5AE5LvrwpcK9IOrQYB5BlCsFIvjzgrkaSjsBZbmC9XsGsAxfn8gKXpL9sSlnQFBwFTTuaKWXgI5Ar+sfHTrW6DUDO+2jEEtCNQ9wL6gNujMvvdFS3eugxGT51fBXxTvF1wLLngbT0BGphKalAy0MQ3Z4Ha2V7UoMFJKkFVAWcvH4B0OJfd9YsTl0AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-performance:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAzUExURUdwTP///////////////////////////////////////////////////////////////8/RimEAAAAQdFJOUwD2qdfrViyAwW2XORBGtSCsD6SyAAABN0lEQVRIx+2VzQ7DIAyDYfxToH7/p10CbQ+T2s33Rb1MijM3/qDG/EurolD9zSNRggBU0hFelMABmenfADhGkJDhGUFGgiX6I1AAQlDgZK/td8ELtQORiTmIq42I2bYdCD8NjzPmYQxO+rbn2S5qzEUF6YjkgcJude56X3s0SoL7LRAeylyaVPiFq0Jyx230mpeXmXVOHssRbhackhCq25Sny++xcBW1n6Snqw6BTgrqRP6kzfDcgmRLGonDWSf2OecwB491dOrEVZpNsxiyiHzWJ0Z+BbBwzaoWVb49HrqVfSkxHen7WNznLhzl8xpQlT3E9oHUtYaufB+7NY9g9ctbjFfj/h1DwXUrzDltMn1Ql9M814EQWPLmEBg4R7JSzpFQxTmSBMkLvJKOhFHfKEEnv3L/+qw3DuMPzAFH9pIAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-performanceActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAtUExURUdwTBGW2xKV2hKW3BKW2xGW3BKW2xGW3BGW2xKW2xKV3RGW2xGW2xGW3BKW2+P2IvgAAAAOdFJOUwC/gCvzq1RAleURc9VmrA9rXAAAAT9JREFUOMvNkzFLw1AUhU+SxtTahnZyC+IsIeAenDuE/oJQcS/FTYTi6hKcHYpDZ/EXBME95BeURpM0Me39Db4Mgk/u23umcL8kvHfOucBBKEr5eW95xoMjeuBBlyY86NOQBwt654HrPPHAca/YuUHrDQsG9eybBWa1+GLBqvS3LJiNX0vGJw/R0N6LJ+/f6x9I3uwG0D+luRU0FnmdCtBy6ZM7KvQdjgXwJYuNZVNrFfqF8IX+nFm/oBvyS2iZ8OWxgH4u1IZmU4kgfoa5E77c0jwhoTYCbTRFGE7QrXFCveCURkK/2cRBCp2gFYiyWk7Jw4AgXOmQZMAqa9uAeCP+JsViihtb9OKIPtBUuvy8jeqyHRpMhvc5X0W6Lvg60HrPg0DREySOoqQJKRbByRWbExaqlSoVwB0rwCLFwesHquttxhcsa64AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-performanceActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAnUExURUdwTH3G63zE6n3G7H3F633G7H3F633G633F7H3F7HvG7H3G7H3F6xOzy+EAAAAMdFJOUwC/hKbvK0BT2XURZct0z00AAAE3SURBVDjLzZMhU8NAEIX3LiSUNqI1qBMMChFRgYxAd07E4CI6HQwzEUXgKjC4CH5ABAKJyA+oaHqBJO3+KPaYYSZh9nyfyuyXu7l77x3ASSgu+flYX/HgHOc8kC4wwikPMnzhQaTueKAiHvi43bFg0m4OLPBM9sWCjyb9ZsHm8NkwPiUQT8MjfSX/fn+F/C3syJf9YB7oLsDkjIaiHix5QCNbGBmAFPve+3lXi/0viLB3ZnmDz5g2ICry5daAvCbZhSE2oIsFeC35ssJljiQbgZitIY7nIGu4wLG+xBnpL5tClxQhCANR1Q5TSmCCQK7YjftOVbYNUOxot0EsHl0uwHdFfcD14PJLG9W9HfpMho81X0V8MnwdcHvkgS4cBcqVo6QKHQ9B1a6XY1zAcSiIFg6QlXDy+gEd714RcAqEowAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-face{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAeUExURUdwTL+/v76+vsDAwL+/v7+/v7+/v8DAwL+/v7+/v96T4QgAAAAJdFJOUwBAgSCbs9hZap+hQJoAAADvSURBVDjLY2AYRkAJCAygbEZBQUEBKJtpJhDAOJpA9kSYxESgKphuIaBuhASqyYzESjC2hDRilQBZ64BFgm2qMLPYNCwSkQpAwlMBWYIRzJsKYrKCxZSRncKSDFYzBSNY2MD2MqRhSFgqgClPAwwJBxwSbAk4jGKZDCKZp2JIsEOcOx0ztjQDYL5ENwsYJKrTsMSvGSgepzVg2pE5qSikPRPT8sopBuDod0ATZ54JsbZyBrJgAVAp1Ax2oPXMykjxYQaLA2CMoERUZQDMrgBUCc8CKIdzAvHJhyQJpLQLSu0TCaV2lPwBSu0KQy+LAwBuJj5UbruNggAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-face:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAnUExURUdwTP///////////////////////////////////////////////w2imYoAAAAMdFJOUwBAgBvfrFmcw4wrbtGliFoAAAD2SURBVDjLY2AYRkAJCAygbEZBQUEBKJvpDBDAODpA9kGYxEGgKphuIaBuhASqyYzESjBu79yIVWIP0NoCLBIsR4WZJY5gkYiZACRqFJAlGMG8EyAmK1hMGdkp7M4gkus4RrCwBIApFwwJmwlgqsYAQ6IAIrEAwygHHEaxngJbfhRDgg0sxHoMM7Z0AmC+RAPsJ4S5NE5gid8VoHg8sgHTDh/PzM60HkzLc44bgKMf3RKuMwoQ+dNIgswJDAycUDPYjhgwMCsjxYcJLA6AMYISUTkBMLsaUCVqEqAcngPEJx+SJJDSLii1HySU2lHyByi1Kwy9LA4AqflRBKNSA88AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-faceActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAhUExURUdwTBCT2xKV2hGY2hKW2xGW2xGW2xGW2xKX3BGX3BKW23povfoAAAAKdFJOUwBAgRybs9hZLG6hrV9tAAAA80lEQVQ4y2NgGEZACQgMoGxGQUFBASibaRUQwDhaQPZCmMRCoCqYbiGgboQEqsmMxEowTgmZiFViFtBaBywSbEuFmcWWYZGIUgASXgrIEoxg3lIQkxUspozsFJZkEMmxBCNY2MD2MqRhSFgpgCkvAwwJBxwSbAk4jGJZAbZ8KYYEO8S5yzFjSysA5kt0s5YKc6guwxK/baB4XDYB045Vi4pCyrMwLa9aYgCOfgc0cY5VEGurViIJMhcAlULNYF9mwMCsjBQfZrA4AMYISkRVBcDsCkCV8CqAcrgWEJ98SJJASrug1L6QUGpHyR+g1K4w9LI4ALk0RHtSETFcAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-faceActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAhUExURUdwTHzD63zE6n7H7H3F7H3F633G63zF7H3G7H3F7H3F68TinBIAAAAKdFJOUwBAgR+Z31ipwW4yAjb9AAAA+UlEQVQ4y2NgGEZACQgMoGxGQUFBASibaRUQwDhaQPZCmMRCoCqYbiGgboQEqsmMxEowTmmZiFViFtBaBywSrMuFmSWWYpGoUgASXgrIEowgHtsKEJMDLKaM7BSWYLCaJRjBwloAploxJKwUwJSXAYYE2KUMVRgSrAFgKhTDKPbFIJJ5OYYEG1iIfRlmbGkVwHyJBlhWCDNrrMASvxageFw6AdOOqKCklrQuTMuzlhiAo98BTZx5FcTarJXIgglApVBr2ZYaMDArI8WHKSwOgDGCElFZBTC7GlAlvBKgHK4FxCcfkiSQ0i4otS8klNpR8gcotSsMvSwOAIs+RIlIrewIAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-object{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA51JREFUaEPtmT1oFEEUx9/bnRALGxE70btkZjcR7QMiRisRbCzEQvxCLGyEhCDRBC/RoNaWFgYLFUSwUBAUDKKFFqIQ3OzNJpfCyspS8HaejNyG87J7t7N3l03gttydefP/vbcz8+YNwhZ/cIvrhx5A3hFMjEAQBDwMwzOmAi3LWhBCLDTr5/t+ycSubdtLnPOncX1iAfQAlmXdNBmkru2RVgBSSspg+5kQ4lRjv1iAIAgqRFTIMIju0i2AWNvrAKSUowDwLqP4tACm9rWmbABCiFxXKimlhu0BtPFHtdc19wj4vn/Wtu3XnPOfWVByA5BSngCAuwCwryb8Hud8EhGNltANB/B9/5BlWXcA4GCMx/8g4jjn/H7aaGwYgOd5BxhjcwCgPd/0QcRVAJhM2l3rO3cdQEq5GxFvEdH5VsLX7aKIH8MwLLmu+zapb9cAFhcXt/f3988AwJip8Jj2L2zbLg0MDHxr/NY1gCAIpohIJ2V2BwC0iUd9fX2lQqFQ6cQvtJbICSGOxHhlVOdKjuPMl8vlqzrxI6IdWUAQ8Um1Wp0ZGhryiYghYrUtgDQionxJT0al1IwGkVJeBAANvieNDQB4joglzvmilHIXAIwrpX67rmuUamfKcxoTvnoQ3/dP27Z9g4j2J4C81KBCiC9LS0suY2yMiC7rttoZuQBEQhsiopfT6wAwUvv+hjE2XSwWP0kpRxBxgohO1kPmDhAHEgTBUaVU1XGc98vLy8eVUhoqbpPLPwIx6/wqEV2ovX8AALzZ/Ng0EWgQGa1iLQ8xPYCUyx8YHjt7EWjm2I7sAy0it7ERqNWEDkeiklIJg8pFWwC1ZC6SM9NYc1oXgcaiVlxVYmVlZW8YhlMAcCnFvOkEQPqqRBqASLTneTsZY3pjapZSpwF4Y1nW7ODg4Ie202kTgGiwSqWyrVqtXgOA6Zj0OhGAiF4R0azrup87dqDJAlA/eLlcnkDESQCI0us4gOdEdNtxnK+tfkHjA027AJEgKeUVANBROVd7p3fixwAwJ4T43kp4nR2zylynAOoE/JuAiPiDcx6kFb5pAEwF5zKJ2xXZrH9uc6BTUD0AAGh639Xo6bjUI+G/NglS+p3Y87wCY+y/2ozJSGkuRDLekQFjbEexWPxVryfpjuxhllKhNtwtAESc55xHx9M1hsR0WlcOlFLHTLyv26Ypi5hesyql5oeHh3VBeN2T6TxgCtXN9j2Abno3je0tH4G/KbtRT7VUKs8AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-object:hover{background:url("data:image/png;base64,iVBORw0K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qsPwZoc3Rj+h55D/wH5CHfQHNA9EUAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-objectActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA9JJREFUaEPtmU+IE1ccx7+/N7O0BwUn24UeRKOd7LalvS+I6HoSwYsH8SCtLf1jEqWoyLJVMfEP6nlNIgi6eFChCB4UChaU0h7aQ1GQrnFSdw9e/JNs9LTFzPvJZI27m8xk5k02m13I3sK+33vfz/u9N+/7fo+wzP9ometHF6DTGfTMQF+mYNqwd6sKlFLcK++P3WsWF8nkUyr9stAeTcXN624xrgDVAUgcVxmk1lbaGPIFyFocou9fSonYzvo4d4BsYQLgaIhB0EYA174bAFaNWpuFhrthxDsxQQCMrKXUPwGbvfr2BSglYh39UjmwXYCwy2kh4jqegd5M/itdaL8+i5vPwwB1DMDIWNuJcBbA545wAs4V4+YIiJQ+oYsOYGTzGwniDIANLjP+hkCHiglzNGg2Fg3AGB3/Ugj9NBO2+4ujSSaMeJ2uc+PbDhC5aK1GhU6CeY+/8IZz9E+CnSomBn7zim0bQF/m4QqbPkgDOKgufH4EAzdZaKny3vUP6vtqG0BvtnCUwY4p01oFcOIZuCJ7elKvvo9OtLyESMN7IzeViA3VC3TshiY4Wkz2j0Uyj3+aMX5shAIhuia4kn6Z+DSPu6xjiCotAQQRMeuXaJJYpqsgOetbcBV8TZA+ANxgotRU3Hz48SWr7800DjHL6VJyQMlqh/I5jYZvFsTI5XcRa0cA/sLDv98iieMv98X++Sj7aEBCPwjwD9W2LNMdAqhJnQMyc5D9DGBwRhzukK4fK/647q9I1hoE6DDAO+ZBdh6gEaQ3V9hi27JS3tf/u3Hhv20kpQPldsgthQw0fOcnpc3fVK2EhosEmE33x9LJwKxM54Lj/Ap0SeoCBPz+qVw7uxnwmdQFOge8R1n0DDg1ISaxqSbJy0oE2pTvqhStbOK5FQy2ka6vOTVkoL6o5VaVWHX+yVoh7KMAvvPbNq1mQNmNBgGoiV55fry3R+jOweRpqQMBMO4wxImp5Cd/tGynVQBqg0UvT3z4eroyDMaxenvdHIBvE/GJYnzgb69MtjUDboMa2ceHCTQCoGqvPQBuSOZT5WT/fb8luOgANUFGxkoQYVja+Lq2iQm4ygKnS3tj//oJf9+PamUuzBJqJsY59Jz/9wh6+iJpFoIKXzIAqoI7solbFdksvmN7YKGgugAMNH3vqp9pN+vhtq5VMqT2PpAbjwrW59VmVAYL8iASCfdGBvm/bpQPrCvP1eP+RpYrXA5XKgTaBkA0Voqb1eupL4DToFo5YLlVZfadtkHKIqrPrFLIsXL8s0k3LaHuA6pQ7WzfBWjn7Abpe9ln4C11Qo9Pmb2aMgAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-objectActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA8hJREFUaEPtmU1oU1kUx//nvthx4cJqX3RgGLsQBNG1tq8Z7axkwM0sxIX4hbhwIygibfPMeyapunY5iymzGAURZjEDAwoVm8SPhSiIKAjtQtAmiooLiyb3yEtNm76+5L37kjQp5C2Te879/+65H+eeS1jlH61y/egCtDuCNSOQyH3cWirNHVIXKO6kYvqdenbxqVlLxS8J8Txp6Ne9bDwBnA5IiIRKJ5W2LDHsB2BmC6zqmxk3UkP6AbedJ4CZfTsNcL9qJ077VgHU8r0MID5V2EsCk2HEBwbIFdT8M/aGBkgaelt3KtOB7QKEnU9NsGt7BMyp2cOa4P8tY3M+DE/bAC7cK+xnxmUwtjvCCXzFHtRHiEhpC11xADOTjwG4BCLDY8S/MvhsyoheDRqNFQMwc292QmppEPb7i6MZgEdqna7V9i0HSNx/95MscRLgo/7CXS0IWS6VrFRs8+1ati0DSEzm18kesgGcURa+3OAfSGklY5ueuP9qGYCZzceZySKC1gQAgPkvXtNjpXatn258CmlYSOSSg/qwW+B8usH9SSM6Ec/lTxM7iR/3hgEh4Jpk2Kkh/UVikiP2MBUbAggiYjFfchajtB0QM/fuOFg64D8H8QHQTQ3CsowNT8cffdLnPn8+KyXPpWKb1FLtYJ0tbbU84asCyRYOEmiMwTtq+P63JJAYH9AfxTOFbUTlNXRyPlmTdpsAKlIXQZyDDJJGGbx7/l++BSHM5EDfg7HMm91CRM6B+fdqyA4AWA5iZd/++hWymDaid+OZ/G8EGgXB65DrhAi4Jw3NsORj5VRC4A8AW+tN2Q6KwKJM54b2HcD3EtMFCLojqVw7uxHwGdVQ992OjkC5JqSJPRXw2qlEsMpFo1OonMx9/7gE211z8iirLC1qeVUlxrLvtwgU4wBO+K2bpgCoVSX8ASqiRx682hgp/jBaL6UOBsC3pMTFdCyaaUI6HRyg0llicnptqWfdeTBMd3pdH4D/kyQupgf7HtaKZIj7gDpAdefxzOw5IjECoJxeewEQ6CZBpmwj+thvCq44QEWQmZ09BYjzLHFk4SQm/C2KIm3/svGZn/AFP+qVucYi4BbmbLnOb5rGr+zB6MugwjsGQFVwWxZxoyLr2bdtDTQLqgsAQt33LvdIe6UenvNaJUQqJ3Hi3ut+KSNLajMqfQV5EAnzRuZoEF8ivfZw74dqPbXeyP4MVSoE0DoAmkgafeXrqS+A08CpHBDTPpXRd9oGKYuoPrNqETlhD/w446Ul1H1AFaqV7bsArRzdIL5XfQS+AaeCtE+rbksUAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-occlusion{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAACCVJREFUaEO9Wn2MXFUVP+e96X5oa9UoYpUszrzzZlqLKDYhgAFaaKU2+M2W9Q8TNUQSQEsiRUjFVaHGNmoBMTUmaPwD2iIhqKR8WEBFGkLFUjbtzDtvpjYrVhpCXAtm1867x5zxvnXm9c28mR13b7LpdO65557fveeez0GYp1Gr1d4VRdF7lL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5ISLHrafUx9QI2uICmFY1RORsx3FmEPE5EXne8zz1mn2Pjiml1d+ekvrmqHO+K3hWvvZJvb2ensoqCwmgq7KK1eGttnuyNqsSvVAAtGINAE9oF6hjYUsB2EaG6vWx2La3U96FAmAt28jU1NTqZOMjtbhrGxovZJXVFwJAXGYHgPPS6lVtS+dxY6PT41wIAFpe79To6Fj7j9PCdmX2TvF6vzYzLqtrgyX2MWk8M5sXcaNDRLQjeft8Vaxj4bQSLSJbEFHjsraNjZg+E4AS2obHTzRb0kxsvirXVm1vBoAT9Xr9y2kNjeQtdAVAF9kQW5PseW+zzszMjCcbGe1UsmsAMYOURveTc62nap1TRNYsSKM7eQIaO7mu+zkAWAsArwPA45oXdPNTAxutaillsTqoKIruW7CfGqRdpRaHReSj2lvo8scezyDiY1qc7dda9axC3W64UD+3+Q/fZENVhTDr2gAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-occlusion:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABphJREFUaEO9WmnIVVUUXSuiuahopOLLIqTBBgtCC01Ty8JmS/sRVESBNgiVJVZaaag0WBlGYNEPrSyiQdTKskEjpNKSCBqlzAqJSAsbYMV67vt13/3uffe+93pvw+Mb7rn77HXOPntY5xEdEkkHAjgk1G8k+VMnpuL/oVTSaQDOBnBmGG3DfwHwXeg/DMC+ADbGZwWAZSRXtTt/ywAk2eDLAIwAsAXAkvjY6O9J/pk2TtLOAA4FYDDnxmdPAG8AeJbkslbANA1A0gkAbgJwKYA5AJaS/KCVySWdCmA0gFsAPAfgIZLrmtFVGYCk3QBMDeNfAjCb5MfNTFY0VtJJAG4FcL5BALiX5B9VdFcCEBPMB7ALgPtIPlNFebNjJI0DcDuAbQCuq7JApQBC6SIAiwFMJPlzs4Y1M17SAQAeBTAWwPiyxWoIQNJdAKbZbUjObcaQdsdKujHcaTpJ25ArhQAkDQ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ywV98rnZURJFdI2huAD1mSaaeSnBHgis7ISpLD2rJ+++L1SWT3RB9ghqwmkgzKjX1WNgMYRnK9pAsAuAxYTNLRxu+5l1hYYGRuBGoWkCQzgu4L7kjOgP3WodRRIAGQGJen33VLch7GJr8HAIdCh8Q8yW3MWwDwWS2EkqvS/YBJ2UsyvehHAPIO3QSSj+VNLMkJzKRUViaTdNHYlgSf+jxJk8R1DY3byQ05GS/vMNaSSvii/VEkaxlUUjr5JMY6gt3QluX/eYZLlJ6k+KvUUkpyqj8+OirH300pALWiLSHAJJnVMK/kusqs9RqSTjptS3C0+S1lrF5TTX266uw0gxf2FTf1McDkUWVapZsAKtEqAcIu4FJhZBkT3S0AwVib4lxCspjYCgC+yLBf+0DXYnuRdBGAI5trK+efuouPInLXodMhtCGt3g0AKZp9YB5f1Yhe923JokaHs0sATK8XXnSUXXAkbWEuzd6oXm83ZkpKaPVpSY7J01l6eZFcdESX5cu3jjDWiXHBRLvpcV1WeLGRjC8FEAfbienx6JZmdZC5tttOBuBkeW3ehUZ2FyoBCBAurWv3ZdEPd/Ka1W5Td5FR5JKVAaS2OHvRbX6mJT41eE5TM52/6M6uQNDxlzvhAdga91gusat81cDVquurPQA4QS3s2lcN8rYyyOGzfLdQ8cseLsiWu7NrN1o17UJVJ+zW123+BfogD+TkdLQFAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-occlusionActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAACItJREFUaEO9Wn+MVNUV/s59+wOqyM7bFaxAsDBvFqnWak0MYhBQUEqUVssi/aNJawg7bxaKScFqqKyt0gip4sK8XUKqjX/IL43RlqBSxLZWYqwWdWNh3oIlFClkebMUaXfZefc0983MMjv7Zt7MLrvvn93MPec753v33HPuPfcRhukZt+3YeCndCQpeCO3kmWVTTg+HKbocoKHWjpnEuBfMd4GgnJ7ADAcCJzx8iUlE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57vYswc99KxKGdDCHaihldB+xWfDDiDNyfNyMqhOu8lD6860+TssbKkI6WuSj3oW0yYSZBnwHxKEc3dtGUbYF5Xg/k6CNHDTB9o4A87zfBHl8P5okfKNLvyDvV+BC6Ho4Uwih7qlVK5bZWRJFBSWyUTw+sJtLCSMC+oEz1SBNIda+xj8J6ijS1FQF1kdLtjVYE6ns3thaZ0pAhkMtvkUdq5OfkXHwWau96FxsdBbfWRIJBts0vCLX79qoKt8+zFRrH2+ogQsGwudtFR/IIjeyws0GYvtl8fajbKttVBaM7WGD/MwMuL7EUHwBuRoqeGq2PdV1C9TjSvBWh1sYuNrHwgAS+9pi88tgIYx0TPDFfnOhO2jwI4Iym13O9CI38WSiLgKe1qrwp1VjePxDVrsq6nOf8io1BIlk4gg5B/0S01emew/VSvz+ny3BG56M5/A6odz6T9kIB5DHwFxtsssbuUTw1IYDEI8wm4koF9xO7LI/apgd9UquYwS74HzHeU+LHHeyToLdWcHWq2KjuESjU4Up/b/B9u0kgtWdqPkwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-occlusionActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAACJpJREFUaEO9WntsW9UZ/33HaZJCX7S5TmhalQ1NaAzGYJUgvk7pe5QKusGa0v0xaZvQkKBbK60BWl/b8XWKaLWtUJg6IcG0P+hrCMHWlcdK2OLrFPFYGdU0ac+q9BHfFPoC2sQ+33SufVPXvfa1kyaWolg+3+t3zznfd87vu4Qx+nQfONc8yF+0KvP1NPHoxjsm9Y+FK7oSRo2+fh0I3AUpFwHUyoxWIv6EiI4o+8w8m5mmE+EowEchxH4g95rZ1myN1v+IAUR6M3eRwCqAFgM4C8ZeZuyFmHDk9OmpH2+7my4UB7fmj9wwderpWZBDs4mwHOoPmAzwn1hiV7I9+NpIwNQMwOjtvwWC1gLUwVJuIfA+s73lnZE4N3pP3M6g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XeAVAjrTKeAKqiVRQItQQgaLng3BI/Jnq8ACjGWlLgTUjeW5HYUgCcRsZgfY9UG7qQ28tN6XgBUJlNCJoj6gcXlDY+PMndwmb5wI9WHw8ALs0O4tu8+KoK9Hq+sVGJXh8PAHl6vXyjo3KDo3AtLEezVzqvjzYbubQ6A3G3xpQ5nlR25TY6iLGF6kRyrBhrNwrFRHNWRpiwvlJjw5WvqvuSb3gEfs2gIAFPjhVznU+VeJTAGSFyP/ZqaJQ+7qoAKCXV+OBTdnw82qw0TYuXNjLKrZOqAbgGShvdLOitkfKpiuckyQvHpdFd+gQUHQ9B3yPGEhDOAfwGS9pT1asGgldCNTgYk5igCtSL4/aqgddUKnIY4G8xc7ialz2IKAXQ64qcHW22qnkJVetwvF63+T9nAHfjRfzL0gAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-logSave{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA1RJREFUaEPtmT1oFEEUx9/bFLFKJzG2WiknZObFxlO8RtFC8SuFWlrYGBtRRNCghV9YmFQWgoVaaAS1ULRRRKvbmYBBQezVYBOIGFMkT0ZuYXPufOxdspuDO7jibmfe/H/z3sy8eYvQ4R/scP3QBSjbg8EemJyc3La4uHgUETcx82YAWNum+N8A8IWZrxLR41ZtBQForUeY+Xarg/j6MfMVIrroa5f13AuglOJWDLfQ56aU8mzefk4ApdR9ADiW12ir7RFxXAgxkqe/FUBrvYeZXzQbY+bh3t7ed5VKZTrPQM2eNHYQ8VGGjTtSypOhtq0AcRyPIeKptCEppTfkbAM3AxhbcRwfyYJg5nEiCvKEVZBS6hUA7EoEIeJ+IcTz0JlpbpcFYNrYIBDxlhDijG88lwd+IGJ/YoCZ1xPRd5/BUA/Mzc31VavVWRcEM18jovOuMV0eWLL7tBM+RoBS6isAbEzERFFUHRwc/JD8dnjishDikg2iSIAJADiU8uhdIjqRFuZYEweI6Gmuc8AWs6EhVK/XR3t6eg4zMyKiEQ/MvOSwQsS3iHhhZmbmY61W++UIp/dSyu2FAmit3zDzTjMoItaFEFuVUt8AYCB0ElLtZqWUfYUCZHlQKXUQAJ60AAC2Nbhia8AWglprAoB7jYQwmGXVACSKzRqJomgLAJjvBh/JqgPwCQ7dRAoPIZ/w5HkXIHQGQlOHvCd56PjdEOpoD6TShT/MfD19OXeFQCPnOYeIaxYWFiaGhoZGQ9Pv5nZthVA6XWjkOsMJRGj+b/IhIURtVQCkIUJvYKUCONLf/+67tjuw+T+rLlTYLmSDCDmwbOIbF6CgC1Vba8B3m3JBuMQXDuC4iGQy+MSXAhAKESK+NAAfRKj4UgFsEHnElw5gBGit9wFAUqy9kbco1vY2Gsfxsha2QrbV1K42gIimAPDvw8zTRLQuy0ZhpcU8AMZ7zPws1ee1lHJ3LoDlLu7mAcioZFuLvYWV130AU1NT/fPz8zuyqtWIuFcI8TKXBxo7QaEvOCyQD6SUx20T4K33F/iKKVOj7yrqBWhsiSv6ki8zNBBPCyHGfKEXBGCMrMBr1mZtPxHxEzN/jqLoYbr07oIIBvDNRFnPuwBlzXwybsd74C95KWhPrxIhsgAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-logSave:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAthJREFUaEPtmTuMTUEYx3//TrWdeLRUJCrReISGUBCvLVAqNGiEiASh8IoClUKyBQqPBAWhsREqnYRE9NgoV0T3yci5m9mzc2bmnHvvOXuTO8ktbs7MN//ffPP45hsx4kUjrp8xQNcezPaAmW0EDgFrgLXA0j7F/wG+AlckPW5qKwvAzE4At5p2ktHusqTzGfUWVEkCmJk1MdygzQ1Jp+u2iwKY2X3gcF2jfdS/I8l5O7tUApjZTuBlwNIk8E7STHYvQMCTzs6jgI27ko7l2o4B3AaO+4YkJadcVcdlAGfLzA5WQGR7IgbwGtjuCdoj6UXuyJTrhQBcnQjETUmnUv3FAH4CyzwDKyX9SBnM9QAwIWk2AXFV0tlYnzGAebtPP9OnEPkNWO2J2STpQ+9/xBOXJF2ogmgT4Amw3xNyT9JRX1gEYq+kZyGIoQGY2UXgAPyPt5x4V8qH1TRwDvgk6XdkOr2XtLltgLfA1qLTj5I2mNl3YEWDdTQraaJtgAVryMz2AU8bAFC1Boc5hYKbgJmtB6aKgDCbZdEAeLuOWyPrit+qFMmiA0gJrjr4yu1an0Ip4Z6Hss6hMUBu6FD3JB9PodwRGGkPeOHCX+CafzmPDUAR85wBlrgwQ5LbUueV3AHsaxGbmR8uOAGTPYga8f+0pG2LBWAOosYNrFOAqith6L5bdQee81optG7nHIjE8DlnVlB8EVa3AxCJ4VMAleJbB2gAERXfCUANiKT4zgAyILLEdwoQgcgW3zlAIWA30EvWXq+bFBvESTzQxFZqSyqdAe7i7xIAvTIjaXnIRmupxZoAznvPvTZvJO2oCzDQ5G5NgPKbRGWyt7X0egrAzFwedktFtnqXpFe1PFAsxLYfOEIaH0g6UjUAyXx/i09MQY2pq2gSoPDEsB/5QuJPSnLrMFqyAAqIQT+zloX9Aj4DX4CHfuo9RpANkBqJrr6PAboa+V6/I++Bf0in3kCazcMZAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-zoom{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAkUExURUdwTMDAwL+/v7+/v7+/v76+vr+/v7+/v7+/v7+/v7+/v7+/vxtcv/AAAAALdFJOUwBVdZCpGdZE7C3B0wnY6AAAAV9JREFUOMt1lDtPwzAQx20ghGwVsHVJhQRDlsywWKqEULsw8FhRJ2iWiglGGJvFCw8xIVVCSEwkKU25L4ftpOHs2Cclsu7v370smxCLecRh+xOH8Ja5kGEs/6dtYf1XONcWZurbwwRCQjYZ9l7uHAPAOBHpI1QC/QSY9g84ldmnAn7Z3htwsfZnvSe54eJd5hlcC7gccxTwSETZEr5+714vLRdfkFraVNtetXLpR7ha+mkHCV1Y/q8ZOW8AgDkecsIaAEIcGbIGyLUq4KcBYl0o7QAB4FZACBMrQKpaJOCZQqyAIhgayYEpgD1DZghXCvBTNJFKmCvgzmhcCEsBwMjSRx6BslYftRX0JLYKrAsLqzDC54EFMwvy58QhMM8hFNq0UpwET+sLC9/4BmEBTytyRCIbDoAEiR1Qp1dbRxfoyv9g3ogaKVuXhVZZbtqX6Ez6H23PxG4CM259QDwt/h8ABfK8nDqSAAAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-zoom:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAzUExURUdwTP///////////////////////////////////////////////////////////////8/RimEAAAAQdFJOUwCCyreU7KZVRCDaZnETLwj6WaYVAAABUUlEQVRIx5WV2Q6EIAxFoVBWxf7/184AOnGUsvTBqDmXrqRCzNou1kwGtyZIQNuiD0P6evWTURFUMtIoPO+iVoGIZPkMqkdKA0jZgoJ6suQc2EoiGBldOoQ9HSDk5+GTs1Fqo9IlcEpvNv3qv0MBhSalIFSv3+MCJCY8fUaCxasycrMu9dp5VTUhubXZ6CqsAvn66ZAsx+e8fON37oT3bZ4aiRU0kDlavGSrQI95HPBZACt8FuCL16IruBVkzBeBW+CLYHvyfiDQd96IpHpOMqP++fAq9VMQ7rwrM5+6gjwG/3y/D/m8ylPYpvpAeqO7DfvwMPO9D6jnBabG56YFZx77fEjD+9AyLdYEhp8nxoNh5wmJtfY8AS+wzIZZrJNcC4h3wV8IH1p87Iyfnc6XVaAd7ICHAsebw97zgDSxZ/yvViiPuYUfTe650knM2+7Ywz9yOCklzohLOwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-zoomStop{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAzUExURUdwTP///////////////////////////////////////////////////////////////8/RimEAAAAQdFJOUwDjmTC6Y0KBVakX8s8iC3JYR1wyAAABVUlEQVRIx62V2baFIAiGcwJRS97/aU/Zbtht0VzrcJOuvl/AAabpXy1RF0F/m2h2PX5mzucEuO9gMon1MY7KlG8w4LImC1XFQmxDGVkm1DYpXi0qS1gXTEGzKoqNS1ajAxPqJDikFLcFS+aukYJffRfXnAj9kYUXFVi86wzzPjuCFRXBwS3KaC/Pt02Ww7uf1jz3BVYtX/OsyDQFDn7yswPXb+Ovs39eJJWwxrOXV4thgC+//QBf/uMAXwAa4AuRBvgdWR58CB2B+eaRG5e8QO7Jn2sIAvzhbdsDnXzev8q0BengGXv8EciH3y1CY5++yI/BRNx82g/La7lc7b0Am/tUC6n3HoZ4SbDyy5BgzSNivV6wbPXeIPOpHlOU+CjkTQKvQOpXdRdJvn+5xttWQa4EZUOzluonT6+q72X6Zb0+T/lNhQd7hg9vm8LWUhW5gT4iN7c/0ZUo8Q3AttYAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-zoomStop:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAqUExURUdwTBKV2hGW2xKW2xKW2xKW2xGV3BGW2xGW3BGX2xKW3BKW2xCX2xKW2yDN61kAAAANdFJOUwCAVKxm3T/DmhrxKw97YQBGAAABaklEQVQ4y2NgIA6wGqCLMCqAqV4HdIm9F0Ek22UMM9hiG4AkVzQDA+cmx+YyJJnDlw8wMNQaNpfevbu0QgxJgrN3JQPD3VvhjU57kESnOZqvvXuJgcEXxVFMEkDt1w11gZYwoVgue3d5SzaQSgCydZG1TMkBU8vBuq9guBcqNBNDgj0GQrMEb0CVYEmA2ViANRQZ795tQPZduADciXcVUNSthGu4hGrAJawagBIXsWoAClzGqgEocRWrBqDIrQNQDTPRXZ8A0cB41wBNQgGiQfbubTQJAagGDB0GIA0OsnevbkCTCADiu4J374ahW34JqAEIbiXMRJOAgkvMKJYgJBx6717AKiF4F4eOu+jxgQCXGHBIKPDgkBC8JYCURJDtQHYWN4oEcvpZiyR+C9lZtkgSKKG1CyGOGrxItleixjrcLFBWRAYcMIkG9NQMiY67N7AlcxAQwMwA6SBxM2xZQ3jtVRPsRQ83sg8ACMIUxzzE8wsAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-close{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAeUExURUdwTM3Nzc7Ozs7Ozs3Nzc3NzcrKys3Nzc3Nzc3NzePZJxkAAAAJdFJOUwCtKdPBGAmNTt3jdDcAAADfSURBVDjL1dOxDoIwEADQgwR07GTCZtI/IGHgAzBhM9EPkMTB0Y3V0ZXIcn/rtRR6pefgSKeSu3ellyvA9lZ/5F9p/3K7PZY8oPG5BD6MpPUSgIITzdIStifAshjRQV1PCFT8TxaicTzzwEwINOEdHVmDmcTAkRhMhMAp7iQRjcMtDhCp8SA1v0ARGIIK/gnkv0p1OBTS4QRUIpE7DiYYXTBrzcld3JIrAarXrps4AVNwRSZgExoJmIyAaAdsShUMn/JF2fh4YEkpAcgvnuwYCIb6EbbbP4PsDfLD2dD6Av1qTvAQlzUTAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-close:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAeUExURUdwTP///////////////////////////////////8kBMKEAAAAJdFJOUwCt0igUwJdJePGbgLgAAADcSURBVDjL1ZMxEoIwFESTCaOWFDapqeicnAALTiANnaWlnVewDTMW/7b+aCAb8jkAVIHN2/lsNkrt73lf8M08nnF1pAYFR/dFmAAx7SIoi4iDbRrWDMAuQFzmmxAGbjjJgjj6dCjMCAND/o8RWQMzUgIRKYE/wsC5TJIRR74rBUZaqqXwLZEXT0WTDGwLW1aavJWQir9qadw++NgykWoMNtcykh8Q5EECgr5C+jjpGjHjPGhPU5eVzyfPJitfnUyhPg6ywMKZ7BygcYcsPCj1Kc8uXYPqpeSLs6PnC4w8S+8OJ9MLAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-narrow{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABm1JREFUaEPVWWuIVVUUXmvfYRosHzUZUUqKjkSXSe5Z+5qJhfawLELCR5ohPhKjjB4EWgkpkopRSWEPS1Mqy7Gkd0iPGaKy6ey9Z3z0opwEQytSMiS5NZ4Ve7j3dubMOfecO96buf/cx17rW+vba52919oH4RQfeIr7DxUjoLW+BhHHAsAAZh5gPwGghpl/TKVSHZ7n7T9+/Ph+ANg/atQo+1mRcUIEtNYzAWAiM09ExLPK8KgNADYw8wYp5Z9l6PUQ7RWBvON3AMClJ2Kcmb9DxAKR33qDVRYBrfUNzLwQESf0xliUDjPvR8T1RLSsXNzEBIwxc5l5fYSBnxGxxfO8bQCwN5VKHc7lcofr6+tzR44cGcTMg4UQgxDRfp8IAJdH4KwlooXlkEhEQGv9EAAsDQF+GwDWEdE75Rg1xlwFADcx83QAOCOg29SvX79ZDQ0NuSSYsQS01h8BwBUBsF45HnTIGHMBM9uFmR2Ya0bEWxzHORBHoiQBY8xmZp4RAFlNRIvigMuZN8asYOb7Azq7hBCTMpnMvlJYkQSMMUuYeblf2fO8ZdlsNiyVyvE3VNZ13XFCiGb/JCK+6D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iS+BIBsQHkkEe2qNAml1HOIeGsA914isqQiR5LL3aMAcHoAYTIR2av0Ex7t7e3ne563mplvDoIh4le2xC+VurEE8pGwh1m3/sBec3ie96iUcndvWLS3t4/o7OycK4SYw8znRKZIDIlEBPIk7IrfGDB01JIAgJZsNtuShIjruplUKmWdtidsMLK2lFmFiPP8fUapSCQmYJ2L6cDsNfh7iLiXme1VjG3GOwFguOd5DYg4HAAa7O/Q3QTRXiavchxnhzHmIgCw3V6xWYoiURYBa9h13atTqdTssJxNEoEImQeJaIV/LimJsgkUjCilLrGXToho33mFrmoMod2I+LLneW9KKb8Nk01CotcE/AaVUmOFENcz8zgAGAIA54Y4dAgADiCifejtjcQnSSIWRgIAniIi+5q3cm/q/c40NzfX9e3bd4gQ4kxEPFhbW3sgnU7/lcThJJHwV8kViUBvHStHz0aCme2qe7W1tasbGxu7rkFPGQKR50Q5q/B/lP0HjgOoT/ydvaYAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-narrow:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABS1JREFUaEPVmgmoVVUUhr+fosKC5ogGSsqIpKQwMqjIBpsICdMGQ7ISo4wGApugJCoxLClssElpNEuaI5okKjOI5onKhEQrSiKiaKA/Vu3zOu+8c88593qvj7fgcO99e6/h33udtdda+4khThri9tM1ALaPAQ4Btso9GwNfAyuBb7JHUnzvCq0XANuTgePSs00bFr0L3BuPpF/b4BswtSMAyfDzgYPXRznweQ7ID53IaguA7ROBGcC4TpRV8IRL3SNpVrtyGwOwfVYoaaHgW2AZsBT4CliXnt+BXYBd02d8D5c7rIWc+ZJigRpTIwC2rwauKZH6NLBA0jONNQK2jwJOAU4FtijwPgpMkRTga6kWgO2XgSMKkjoyvGiN7d3SwpxZGHsVOEPSmjoElQBsPwScVhAyR9LMOsHtjNu+Hri8wPMBMF7SqipZLQHYvgq4tsA8S1K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sbqcxsINLsfJ3REkRjAAlEVQUWbfDncjc0UYz/BewJjCh8lgGNZvJsSctt75MabLUg2gKQQBydSrwyn63dgRYTrpQUdwR91BRE2wAyDbYPSk2nuPOKVW6X4t15EHhS0mdlzE1AdAygsFpxwX0CEJcUuwM7lhgULhW5VRgeHYnXmiBuAeI2SXHN272b+gKgzRKQrYFIBNdI+qOJwQ13oi8/68oOdGpYO3xpJ2LV/45zI/t3hSEDoBXYIQ/gH99H3EBePlczAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-expand{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABvJJREFUaEPVWWmIXEUQrnqzZseYxGM9QBNF4hrJEDfzqieuAY/gFRXPyMYbzUHwQBQUzx+KeBAJKhrRqEhEQWMU75AYXREPlunu3bjxIDGraIwiuJpFkL26pMK84eXtm3lvZieGFAzsTtf1VVd3V9Ug7OOE+7j/0BAAnZ2d2UmTJl2cyWTaAOBA+TDzgYjYDAB/y4eZ5fNjc3Pze7NmzfqlUYEbFwBr7TUAcAEzXwAA2bROIeKnzrkNALBeKWXTysXx1QXAGHMVANwEACePxzgzjyLi057nrczn81vr0VUTAGOMRPtmRDy7HmOVZBDxL+fcyr6+vgc7OjqGatGdGoC19hZmfrKC8t9LafEWAGzLZDL9g4OD/S0tLYM7d+6cyszTPM+biojy97kAcGoFPV8ODw8vbG9v354WRCoAxpiXAUDyPUrvAcAqIno/rUHhs9aeCQALmflyAJgUlkXEf5xzp6U9G4kAjDHcKMejeqy1xzDz/QBwXYyNViL6ISkwVQEYY74AgLkRJcuJ6M4kxbWsW2sfZua7ozJNTU1HtLW1/VFNV0UAxpjlAHBHWNg590ChUJCINZyKxeLpnud1RhSvmzJlyiWtra2DFS+AuAW5bQDg3cja60QkObvHSGstj588fGVi5heVUktqAqC1Xh+5Kj8nolP2mOchxd3d3ec55z6I2JpPROvj7I9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JS6QFIluq5DtlcBJdVy52VglD6nBa6ykLwYbge05wB2JnLckNUqcfuJbDbbS0qJxcJik6NQGhWzfD9yYMI9ucKqkGByXUtVo8ceSOmecpE+6jcB2XsqEiFmS5reSVQVgNNBbeyeMwioxSh8w2Y6GPzJ+2os0+H4OxPtr6rqVzbbtMcBXJZpGkTVf0qedoCjifCSpq4B9WvBoCaISQDC2PQKIN5GPF6MqjCuOsqOpn6bK2R5fKB3K75QpHpPouUAkvrTPaAqiFoACRMxpwuqNniE3WsxrXk++0EQzHr3rwVGSZP+WGTymD3MlrbEdLerzdUDUBtCQaDvSeXyQKPPZTrwpztwuKS1h4tZrgWgbQALkaOCy4hNrn1FHTRTxdmKQ8LKksjdWC0THADK/jtQ/BQhQBwBl7Wi4VNRWoXhMJN6tA7TJTSyQFJ95u/OlPlfEdjzOALI7EIVgzEfb+nyaGSh3p4h+Pd1jV26gjiUHuqe4ibD6eklRqvfQkAHQzABDHsB/7aMVT352GH8AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-menu-icon-text,.jb-pro-container .jb-pro-quality-icon-text,.jb-pro-container .jb-pro-scale-icon-text,.jb-pro-container .jb-pro-speed-icon-text{font-size:14px;min-width:30px;height:20px;line-height:20px;cursor:pointer;text-align:center}.jb-pro-container .jb-pro-speed{box-sizing:border-box;text-align:center;font-size:14px;color:#fff;width:90px}.jb-pro-container .jb-pro-menu-list,.jb-pro-container .jb-pro-quality-menu-list,.jb-pro-container .jb-pro-scale-menu-list,.jb-pro-container .jb-pro-speed-menu-list{position:absolute;left:50%;bottom:100%;visibility:hidden;opacity:0;transform:translateX(-50%);transition:visibility .3s,opacity .3s;background-color:rgba(0,0,0,.5);border-radius:4px;overflow:hidden;width:-moz-max-content;width:max-content}.jb-pro-container .jb-pro-menu-list.jb-pro-menu-shown,.jb-pro-container .jb-pro-menu-list.jb-pro-quality-menu-shown,.jb-pro-container .jb-pro-menu-list.jb-pro-scale-menu-shown,.jb-pro-container .jb-pro-menu-list.jb-pro-speed-menu-shown,.jb-pro-container .jb-pro-quality-menu-list.jb-pro-menu-shown,.jb-pro-container .jb-pro-quality-menu-list.jb-pro-quality-menu-shown,.jb-pro-container .jb-pro-quality-menu-list.jb-pro-scale-menu-shown,.jb-pro-container .jb-pro-quality-menu-list.jb-pro-speed-menu-shown,.jb-pro-container .jb-pro-scale-menu-list.jb-pro-menu-shown,.jb-pro-container .jb-pro-scale-menu-list.jb-pro-quality-menu-shown,.jb-pro-container .jb-pro-scale-menu-list.jb-pro-scale-menu-shown,.jb-pro-container .jb-pro-scale-menu-list.jb-pro-speed-menu-shown,.jb-pro-container .jb-pro-speed-menu-list.jb-pro-menu-shown,.jb-pro-container .jb-pro-speed-menu-list.jb-pro-quality-menu-shown,.jb-pro-container .jb-pro-speed-menu-list.jb-pro-scale-menu-shown,.jb-pro-container .jb-pro-speed-menu-list.jb-pro-speed-menu-shown{visibility:visible;opacity:1}.jb-pro-container .icon-title-tips{pointer-events:none;position:absolute;left:50%;bottom:100%;visibility:hidden;opacity:0;transform:translateX(-50%);transition:visibility .3s ease 0s,opacity .3s ease 0s;background-color:rgba(0,0,0,.5);border-radius:4px}.jb-pro-container .icon-title{display:inline-block;padding:5px 10px;font-size:12px;white-space:nowrap;color:#fff}.jb-pro-container .jb-pro-quality-menu{padding:8px 0}.jb-pro-container .jb-pro-menu-item,.jb-pro-container .jb-pro-quality-menu-item,.jb-pro-container .jb-pro-scale-menu-item,.jb-pro-container .jb-pro-speed-menu-item{display:block;height:25px;line-height:25px;margin:0;padding:0 10px;cursor:pointer;font-size:14px;text-align:center;width:50px;color:hsla(0,0%,100%,.5);transition:color .3s,background-color .3s}.jb-pro-container .jb-pro-menu-item:hover,.jb-pro-container .jb-pro-quality-menu-item:hover,.jb-pro-container .jb-pro-scale-menu-item:hover,.jb-pro-container .jb-pro-speed-menu-item:hover{background-color:hsla(0,0%,100%,.2)}.jb-pro-container .jb-pro-menu-item:focus,.jb-pro-container .jb-pro-quality-menu-item:focus,.jb-pro-container .jb-pro-scale-menu-item:focus,.jb-pro-container .jb-pro-speed-menu-item:focus{outline:none}.jb-pro-container .jb-pro-menu-item.jb-pro-menu-item-active,.jb-pro-container .jb-pro-menu-item.jb-pro-quality-menu-item-active,.jb-pro-container .jb-pro-menu-item.jb-pro-scale-menu-item-active,.jb-pro-container .jb-pro-menu-item.jb-pro-speed-menu-item-active,.jb-pro-container .jb-pro-quality-menu-item.jb-pro-menu-item-active,.jb-pro-container .jb-pro-quality-menu-item.jb-pro-quality-menu-item-active,.jb-pro-container .jb-pro-quality-menu-item.jb-pro-scale-menu-item-active,.jb-pro-container .jb-pro-quality-menu-item.jb-pro-speed-menu-item-active,.jb-pro-container .jb-pro-scale-menu-item.jb-pro-menu-item-active,.jb-pro-container .jb-pro-scale-menu-item.jb-pro-quality-menu-item-active,.jb-pro-container .jb-pro-scale-menu-item.jb-pro-scale-menu-item-active,.jb-pro-container .jb-pro-scale-menu-item.jb-pro-speed-menu-item-active,.jb-pro-container .jb-pro-speed-menu-item.jb-pro-menu-item-active,.jb-pro-container .jb-pro-speed-menu-item.jb-pro-quality-menu-item-active,.jb-pro-container .jb-pro-speed-menu-item.jb-pro-scale-menu-item-active,.jb-pro-container .jb-pro-speed-menu-item.jb-pro-speed-menu-item-active{color:#2298fc}.jb-pro-container .jb-pro-volume-panel-wrap{position:absolute;left:50%;bottom:100%;visibility:hidden;opacity:0;transform:translateX(-50%) translateY(22%);transition:visibility .3s,opacity .3s;background-color:rgba(0,0,0,.5);border-radius:4px;height:120px;width:50px;overflow:hidden}.jb-pro-container .jb-pro-volume-panel-wrap.jb-pro-volume-panel-wrap-show{visibility:visible;opacity:1}.jb-pro-container .jb-pro-volume-panel{cursor:pointer;position:absolute;top:21px;height:60px;width:50px;overflow:hidden}.jb-pro-container .jb-pro-volume-panel-text{position:absolute;left:0;top:0;width:50px;height:20px;line-height:20px;text-align:center;color:#fff;font-size:12px}.jb-pro-container .jb-pro-volume-panel-handle{position:absolute;top:48px;left:50%;width:12px;height:12px;border-radius:12px;margin-left:-6px;background:#fff}.jb-pro-container .jb-pro-volume-panel-handle:before{bottom:-54px;background:#fff}.jb-pro-container .jb-pro-volume-panel-handle:after{bottom:6px;background:hsla(0,0%,100%,.2)}.jb-pro-container .jb-pro-volume-panel-handle:after,.jb-pro-container .jb-pro-volume-panel-handle:before{content:"";position:absolute;display:block;left:50%;width:3px;margin-left:-1px;height:60px}.jb-pro-container.jb-pro-fullscreen-web .jb-pro-controls{width:100vh}.jb-pro-container.jb-pro-fullscreen-web .jb-pro-play-big:after{transform:translate(-50%,-50%) rotate(270deg)}.jb-pro-container.jb-pro-fullscreen-web .jb-pro-loading{flex-direction:row}.jb-pro-container.jb-pro-fullscreen-web .jb-pro-loading-text{transform:rotate(270deg)}.jb-pro-container .jb-pro-contextmenus{display:none;flex-direction:column;position:absolute;z-index:120;left:10px;top:10px;min-width:200px;padding:5px 0;background-color:rgba(0,0,0,.9);border-radius:3px}.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu{cursor:pointer;font-size:12px;display:block;color:#fff;padding:10px 15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 0 2px rgba(0,0,0,.5);border-bottom:1px solid hsla(0,0%,100%,.1)}.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu a{color:#fff;text-decoration:none}.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu span{display:inline-block;padding:0 7px}.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu span.art-current,.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu span:hover{color:var(--theme)}.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu:hover{background-color:hsla(0,0%,100%,.1)}.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu:last-child{border-bottom:none}.jb-pro-container.jb-pro-contextmenus-show .jb-pro-contextmenus{display:flex}.jb-pro-container .jb-pro-extend-dom{display:block;position:relative;width:100%;height:100%;display:none}.jb-pro-container-playback .jb-pro-controls{height:48px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center{flex:1;display:flex;box-sizing:border-box;justify-content:space-between;font-size:12px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time{box-sizing:border-box;flex:1;position:relative;height:100%}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-inner{width:300px;height:100%;overflow-y:hidden;overflow-x:auto}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-current-time{position:absolute;left:0;top:0;height:15px;width:1px;background-color:red;text-align:center;z-index:1}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-current-time-text{position:absolute;box-sizing:border-box;padding:0 5px;width:60px;left:-25px;top:15px;border:1px solid red;height:15px;line-height:15px;cursor:move;background-color:#fff;color:#000;-webkit-user-select:none;-moz-user-select:none;user-select:none}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-scroll{position:relative;width:1440px;margin:0 auto}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-scroll.one-hour{width:1440px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-scroll.half-hour{width:2880px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-scroll.ten-min{width:8640px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-scroll.five-min{width:17280px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-scroll.one-min{width:86400px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-list{position:relative;background-color:#ccc;height:48px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-day{height:100%;overflow:hidden}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-one-wrap{height:8px;z-index:1}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-second-wrap{height:25px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-btns{display:flex;align-items:center}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute-one,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-second-one{float:left;width:1px;height:8px;margin:0;cursor:default;position:relative;z-index:1}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute-one.active,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-second-one.active{background-color:orange;cursor:pointer}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute-one.start,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-second-one.start{background-color:#999}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute-one:hover .jb-pro-playback-time-title-tips,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-second-one:hover .jb-pro-playback-time-title-tips{visibility:visible;opacity:1}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-title-tips{pointer-events:none;position:absolute;left:0;top:100%;visibility:hidden;opacity:0;transform:translateX(13%);transition:visibility .3s ease 0s,opacity .3s ease 0s;background-color:#000;border-radius:4px;z-index:1}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-title-tips.jb-pro-playback-time-title-tips-left{transform:translateX(-100%)}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-title-tips .jb-pro-playback-time-title{display:inline-block;padding:2px 5px;font-size:12px;white-space:nowrap;color:#fff}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-hour,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute{float:left;position:relative;width:60px;box-sizing:border-box;border-top:1px solid #999;-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:left;height:25px;line-height:25px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-hour:first-child,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute:first-child{border-left:0}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-hour:first-child .jb-pro-playback-time-hour-text,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute:first-child .jb-pro-playback-time-hour-text{left:0}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-hour:after,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute:after{content:"";position:absolute;left:0;top:-8px;width:1px;height:14px;background-color:#999}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-hour-text,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute-text{position:absolute;left:-13px}.jb-pro-container-playback .jb-pro-playback-expand.disabled .jb-pro-icon-expand,.jb-pro-container-playback .jb-pro-playback-narrow.disabled .jb-pro-icon-narrow{cursor:no-drop}.jb-pro-container-playback .jb-pro-control-progress-simple{position:absolute;box-sizing:border-box;left:0;top:-2px;width:100%;display:flex;flex-direction:row;align-items:center;height:8px;cursor:pointer}.jb-pro-container-playback .jb-pro-control-progress-simple:hover{top:0;align-items:flex-start}.jb-pro-container-playback .jb-pro-control-progress-simple:hover .jb-pro-control-progress-inner{height:100%}.jb-pro-container-playback .jb-pro-control-progress-simple:hover .jb-pro-control-progress-inner .jb-pro-progress-indicator{transform:scale(1);visibility:visible}.jb-pro-container-playback .jb-pro-control-progress-inner{display:flex;align-items:center;position:relative;height:50%;width:100%;transition:all .2s ease;background:hsla(0,0%,100%,.5)}.jb-pro-container-playback .jb-pro-progress-hover{display:none;width:0}.jb-pro-container-playback .jb-pro-progress-played{position:absolute;left:0;top:0;right:0;bottom:0;height:100%;width:0;background-color:orange}.jb-pro-container-playback .jb-pro-progress-indicator{visibility:hidden;align-items:center;justify-content:center;position:absolute;z-index:40;border-radius:50%;transform:scale(.1);transition:transform .1s ease-in-out}.jb-pro-container-playback .jb-pro-progress-indicator .jb-pro-icon{width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.jb-pro-container-playback .jb-pro-progress-indicator:hover{transform:scale(1.2)!important}.jb-pro-container-playback .jb-pro-progress-tip{display:none;position:absolute;z-index:50;top:-25px;left:0;height:20px;padding:0 5px;line-height:20px;color:#fff;font-size:12px;text-align:center;background:rgba(0,0,0,.7);border-radius:3px;font-weight:700;white-space:nowrap}.jb-pro-container-playback.jb-pro-fullscreen-web .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-playback-time-inner{overflow-y:auto}.jb-pro-zoom-control{cursor:grab}.jb-pro-performance-panel{position:absolute;box-sizing:border-box;z-index:10000;left:0;top:0;padding:5px;font-size:10px;background:rgba(0,0,0,.2);color:#fff;max-height:100%;overflow-y:auto;display:none}.jb-pro-performance-panel .jb-pro-performance-item{display:flex;align-items:center;margin-top:3px;color:#fff}.jb-pro-performance-panel .jb-pro-performance-item-block{height:10px}.jb-pro-tips-message{position:absolute;top:0;left:0;width:100%;height:100%;background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto;box-sizing:content-box;display:none}.jb-pro-tips-message:before{color:hsla(0,0%,100%,.3);content:"X";font-family:Arial,Helvetica,sans-serif;font-size:40px;left:0;line-height:1;margin-top:-20px;position:absolute;text-shadow:2em 2em 4em #000;text-align:center;top:50%;vertical-align:middle;width:100%}.jb-pro-tips-message .jb-pro-tips-message-close{position:absolute;z-index:99999;right:0;top:0;width:40px;height:40px;display:flex;align-items:center;justify-content:center}.jb-pro-tips-message .jb-pro-tips-message-close .jb-pro-tips-message-close-icon{width:20px;height:20px;border-radius:10px;cursor:pointer;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAeUExURUdwTM3Nzc7Ozs7Ozs3Nzc3NzcrKys3Nzc3Nzc3NzePZJxkAAAAJdFJOUwCtKdPBGAmNTt3jdDcAAADfSURBVDjL1dOxDoIwEADQgwR07GTCZtI/IGHgAzBhM9EPkMTB0Y3V0ZXIcn/rtRR6pefgSKeSu3ellyvA9lZ/5F9p/3K7PZY8oPG5BD6MpPUSgIITzdIStifAshjRQV1PCFT8TxaicTzzwEwINOEdHVmDmcTAkRhMhMAp7iQRjcMtDhCp8SA1v0ARGIIK/gnkv0p1OBTS4QRUIpE7DiYYXTBrzcld3JIrAarXrps4AVNwRSZgExoJmIyAaAdsShUMn/JF2fh4YEkpAcgvnuwYCIb6EbbbP4PsDfLD2dD6Av1qTvAQlzUTAAAAAElFTkSuQmCC") no-repeat 50%;background-color:#fff;background-size:100% 100%}.jb-pro-tips-message .jb-pro-tips-message-content{overflow:auto;padding:35px;box-sizing:border-box;width:100%;height:100%}.jb-pro-tips-message .jb-pro-tips-message-content .jb-pro-tips-message-content-item{font-size:14px;color:#fff;text-align:center;line-height:1.5}');class jh{constructor(e){var t;this.player=e,this.TAG_NAME="Control",this.extendBtnList=[],((e,t)=>{e._opt.hasControl&&e._opt.controlAutoHide?e.$container.classList.add("jb-pro-controls-show-auto-hide"):e.$container.classList.add("jb-pro-controls-show");const i=e._opt,s=i.operateBtns,r=`\n <div class="jb-pro-controls-center">\n <div class="jb-pro-controls-playback-time">\n <div class="jb-pro-controls-playback-time-inner">\n <div class="jb-pro-controls-playback-time-scroll">\n <div class="jb-pro-controls-playback-time-list">\n <div class="jb-pro-playback-time-day">\n <div class="jb-pro-playback-time-one-wrap"></div>\n <div class="jb-pro-playback-time-second-wrap"></div>\n </div>\n </div>\n <div class="jb-pro-controls-playback-current-time">\n <div class="jb-pro-controls-playback-current-time-text">00:00:00</div>\n </div>\n </div>\n </div>\n </div>\n ${i.playbackConfig.showPrecisionBtn?`\n <div class="jb-pro-controls-playback-btns">\n <div class="jb-pro-controls-item jb-pro-playback-narrow">${Th.narrow}</div>\n <div class="jb-pro-controls-item jb-pro-playback-expand">${Th.expand}</div>\n </div>\n `:""}\n </div>\n `;e.$container.insertAdjacentHTML("beforeend",`\n ${i.background?`<div class="jb-pro-poster" style="background-image: url(${i.background})"></div>`:""}\n <div class="jb-pro-loading-bg">\n <img class="jb-pro-loading-bg-image" src="" alt="">\n </div>\n ${i.loadingIcon?`\n <div class="jb-pro-loading">\n ${Th.loading}\n <div class="jb-pro-loading-text">${i.loadingText}</div>\n </div>\n `:""}\n ${i.hasControl&&s.play?'<div class="jb-pro-play-big"></div>':""}\n ${i.hasControl&&s.ptz?`\n <div class="jb-pro-ptz-controls show-${i.ptzShowType}">\n <div class="jb-pro-ptz-bg-active"></div>\n <div class="jb-pro-ptz-arrow jb-pro-ptz-arrow-up" data-arrow="up"></div>\n <div class="jb-pro-ptz-arrow jb-pro-ptz-arrow-right" data-arrow="right"></div>\n <div class="jb-pro-ptz-arrow jb-pro-ptz-arrow-down" data-arrow="down"></div>\n <div class="jb-pro-ptz-arrow jb-pro-ptz-arrow-left" data-arrow="left"></div>\n ${i.ptzMoreArrowShow?'\n <div class="jb-pro-ptz-arrow jb-pro-ptz-arrow-left-up" data-arrow="left-up"></div>\n <div class="jb-pro-ptz-arrow jb-pro-ptz-arrow-right-up" data-arrow="right-up"></div>\n <div class="jb-pro-ptz-arrow jb-pro-ptz-arrow-left-down" data-arrow="left-down"></div>\n <div class="jb-pro-ptz-arrow jb-pro-ptz-arrow-right-down" data-arrow="right-down"></div>\n ':""}\n <div class="jb-pro-ptz-control"></div>\n <div class="jb-pro-ptz-btns">\n ${i.ptzZoomShow?'\n <div class="jb-pro-ptz-btn">\n <div class="jb-pro-ptz-expand jb-pro-ptz-icon">\n <i class="jb-pro-ptz-expand-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">缩放+</span>\n </span>\n </div>\n <div class="jb-pro-ptz-narrow jb-pro-ptz-icon">\n <i class="jb-pro-ptz-narrow-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">缩放-</span>\n </span>\n </div>\n </div>\n ':""}\n ${i.ptzApertureShow?'\n <div class="jb-pro-ptz-btn">\n <div class="jb-pro-ptz-aperture-far jb-pro-ptz-icon">\n <i class="jb-pro-ptz-aperture-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">光圈+</span>\n </span>\n </div>\n <div class="jb-pro-ptz-aperture-near jb-pro-ptz-icon">\n <i class="jb-pro-ptz-aperture-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">光圈-</span>\n </span>\n </div>\n </div>\n ':""}\n ${i.ptzFocusShow?'\n <div class="jb-pro-ptz-btn">\n <div class="jb-pro-ptz-focus-far jb-pro-ptz-icon">\n <i class="jb-pro-ptz-focus-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">聚焦+</span>\n </span>\n </div>\n <div class="jb-pro-ptz-focus-near jb-pro-ptz-icon">\n <i class="jb-pro-ptz-focus-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">聚焦-</span>\n </span>\n </div>\n </div>\n ':""}\n ${i.ptzCruiseShow?'\n <div class="jb-pro-ptz-btn">\n <div class="jb-pro-ptz-cruise-play jb-pro-ptz-icon">\n <i class="jb-pro-ptz-focus-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">巡航开</span>\n </span>\n </div>\n <div class="jb-pro-ptz-cruise-pause jb-pro-ptz-icon">\n <i class="jb-pro-ptz-focus-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">巡航关</span>\n </span>\n </div>\n </div>\n ':""}\n ${i.ptzFogShow?'\n <div class="jb-pro-ptz-btn">\n <div class="jb-pro-ptz-fog-open jb-pro-ptz-icon">\n <i class="jb-pro-ptz-focus-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">透雾开</span>\n </span>\n </div>\n <div class="jb-pro-ptz-fog-close jb-pro-ptz-icon">\n <i class="jb-pro-ptz-focus-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">透雾关</span>\n </span>\n </div>\n </div>\n ':""}\n\n ${i.ptzWiperShow?'\n <div class="jb-pro-ptz-btn">\n <div class="jb-pro-ptz-wiper-open jb-pro-ptz-icon">\n <i class="jb-pro-ptz-focus-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">雨刷开</span>\n </span>\n </div>\n <div class="jb-pro-ptz-wiper-close jb-pro-ptz-icon">\n <i class="jb-pro-ptz-focus-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">雨刷关</span>\n </span>\n </div>\n </div>\n ':""}\n </div>\n </div>\n `:""}\n ${i.hasVideo?`\n <div class="jb-pro-zoom-controls">\n <div class="jb-pro-zoom-narrow">${Th.narrow}</div>\n <div class="jb-pro-zoom-tips">电子放大</div>\n <div class="jb-pro-zoom-expand">${Th.expand}</div>\n <div class="jb-pro-zoom-stop2">${Th.zoomStop}</div>\n </div>\n <div class="jb-pro-recording">\n <div class="jb-pro-recording-red-point"></div>\n <div class="jb-pro-recording-time">00:00:00</div>\n <div class="jb-pro-recording-stop">${Th.recordStop}</div>\n </div>\n `:""}\n\n ${i.hasControl?`\n <div class="jb-pro-controls">\n <div class="jb-pro-controls-bottom">\n <div class="jb-pro-controls-left">\n ${i.showBandwidth?'<div class="jb-pro-controls-item jb-pro-speed"></div>':""}\n <div class="jb-pro-playback-control-time"></div>\n <div class="jb-pro-controls-item-html">${i.controlHtml}</div>\n </div>\n ${i.playType===w&&i.playbackConfig.showControl&&i.playbackConfig.controlType===X.normal?r:""}\n ${i.playType===w&&i.playbackConfig.showControl&&i.playbackConfig.controlType===X.simple?'\n <div class="jb-pro-control-progress-simple">\n <div class="jb-pro-control-progress-inner">\n <div class="jb-pro-progress-hover"></div>\n <div class="jb-pro-progress-played"></div>\n <div class="jb-pro-progress-indicator"></div>\n <div class="jb-pro-progress-tip">00:00</div>\n </div>\n </div>\n ':""}\n <div class="jb-pro-controls-right">\n ${i.playType===w&&i.playbackConfig.showRateBtn?'\n <div class="jb-pro-controls-item-wrap">\n <div class="jb-pro-controls-item jb-pro-speed-menu">\n <div class="jb-pro-speed-icon-text"></div>\n <div class="jb-pro-speed-menu-list"></div>\n </div>\n </div>\n ':""}\n ${s.close?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-close">${Th.close}</div></div>`:""}\n ${s.logSave?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-logSave">${Th.logSave}</div></div>`:""}\n ${s.performance?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-performance">${Th.performance}</div><div class="jb-pro-controls-item jb-pro-performance-active">${Th.performanceActive}</div></div>`:""}\n ${s.aiFace?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-face">${Th.face}</div><div class="jb-pro-controls-item jb-pro-face-active">${Th.faceActive}</div></div>`:""}\n ${s.aiObject?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-object">${Th.object}</div><div class="jb-pro-controls-item jb-pro-object-active">${Th.objectActive}</div></div>`:""}\n ${s.aiOcclusion?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-occlusion">${Th.occlusion}</div><div class="jb-pro-controls-item jb-pro-occlusion-active">${Th.occlusionActive}</div></div>`:""}\n ${s.quality?'\n <div class="jb-pro-controls-item-wrap">\n <div class="jb-pro-controls-item jb-pro-quality-menu">\n <div class="jb-pro-quality-icon-text"></div>\n <div class="jb-pro-quality-menu-list"></div>\n </div>\n </div>\n ':""}\n ${s.scale?'\n <div class="jb-pro-controls-item-wrap">\n <div class="jb-pro-controls-item jb-pro-scale-menu">\n <div class="jb-pro-scale-icon-text"></div>\n <div class="jb-pro-scale-menu-list"></div>\n </div>\n </div>\n ':""}\n ${s.audio?`\n <div class="jb-pro-controls-item-wrap">\n <div class="jb-pro-controls-item jb-pro-volume">\n ${Th.audio}\n ${Th.mute}\n <div class="jb-pro-volume-panel-wrap">\n <div class="jb-pro-volume-panel">\n <div class="jb-pro-volume-panel-handle"></div>\n </div>\n <div class="jb-pro-volume-panel-text"></div>\n </div>\n </div>\n </div>\n `:""}\n ${s.play?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-play">${Th.play}</div><div class="jb-pro-controls-item jb-pro-pause">${Th.pause}</div></div>`:""}\n ${s.screenshot?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-screenshot">${Th.screenshot}</div></div>`:""}\n ${s.record?` <div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-record">${Th.record}</div><div class="jb-pro-controls-item jb-pro-record-stop">${Th.recordStop}</div></div>`:""}\n ${s.ptz?` <div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-ptz">${Th.ptz}</div><div class="jb-pro-controls-item jb-pro-ptz-active">${Th.ptzActive}</div></div>`:""}\n ${s.zoom?` <div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-zoom">${Th.zoom}</div><div class="jb-pro-controls-item jb-pro-zoom-stop">${Th.zoomStop}</div></div>`:""}\n ${s.fullscreen?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-fullscreen">${Th.fullscreen}</div><div class="jb-pro-controls-item jb-pro-fullscreen-exit">${Th.fullscreenExit}</div></div>`:""}\n </div>\n </div>\n </div>\n `:""}\n <div class="jb-pro-performance-panel"></div>\n <div class="jb-pro-contextmenus"></div>\n <div class="jb-pro-tips-message">\n <div class="jb-pro-tips-message-close">\n <div class="jb-pro-tips-message-close-icon"></div>\n </div>\n <div class="jb-pro-tips-message-content"></div>\n </div>\n `),Object.defineProperty(t,"$poster",{value:e.$container.querySelector(".jb-pro-poster")}),Object.defineProperty(t,"$loadingBg",{value:e.$container.querySelector(".jb-pro-loading-bg")}),Object.defineProperty(t,"$loadingBgImage",{value:e.$container.querySelector(".jb-pro-loading-bg-image")}),Object.defineProperty(t,"$loading",{value:e.$container.querySelector(".jb-pro-loading")}),Object.defineProperty(t,"$loadingText",{value:e.$container.querySelector(".jb-pro-loading-text")}),Object.defineProperty(t,"$play",{value:e.$container.querySelector(".jb-pro-play")}),Object.defineProperty(t,"$playBig",{value:e.$container.querySelector(".jb-pro-play-big")}),Object.defineProperty(t,"$recording",{value:e.$container.querySelector(".jb-pro-recording")}),Object.defineProperty(t,"$recordingTime",{value:e.$container.querySelector(".jb-pro-recording-time")}),Object.defineProperty(t,"$recordingStop",{value:e.$container.querySelector(".jb-pro-recording-stop")}),Object.defineProperty(t,"$pause",{value:e.$container.querySelector(".jb-pro-pause")}),Object.defineProperty(t,"$controls",{value:e.$container.querySelector(".jb-pro-controls")}),Object.defineProperty(t,"$controlsInner",{value:e.$container.querySelector(".jb-pro-controls-bottom")}),Object.defineProperty(t,"$controlsLeft",{value:e.$container.querySelector(".jb-pro-controls-left")}),Object.defineProperty(t,"$controlsRight",{value:e.$container.querySelector(".jb-pro-controls-right")}),Object.defineProperty(t,"$volume",{value:e.$container.querySelector(".jb-pro-volume")}),Object.defineProperty(t,"$volumePanelWrap",{value:e.$container.querySelector(".jb-pro-volume-panel-wrap")}),Object.defineProperty(t,"$volumePanelText",{value:e.$container.querySelector(".jb-pro-volume-panel-text")}),Object.defineProperty(t,"$volumePanel",{value:e.$container.querySelector(".jb-pro-volume-panel")}),Object.defineProperty(t,"$volumeHandle",{value:e.$container.querySelector(".jb-pro-volume-panel-handle")}),Object.defineProperty(t,"$volumeOn",{value:e.$container.querySelector(".jb-pro-icon-audio")}),Object.defineProperty(t,"$volumeOff",{value:e.$container.querySelector(".jb-pro-icon-mute")}),Object.defineProperty(t,"$fullscreen",{value:e.$container.querySelector(".jb-pro-fullscreen")}),Object.defineProperty(t,"$fullscreenExit",{value:e.$container.querySelector(".jb-pro-fullscreen-exit")}),Object.defineProperty(t,"$record",{value:e.$container.querySelector(".jb-pro-record")}),Object.defineProperty(t,"$recordStop",{value:e.$container.querySelector(".jb-pro-record-stop")}),Object.defineProperty(t,"$screenshot",{value:e.$container.querySelector(".jb-pro-screenshot")}),Object.defineProperty(t,"$speed",{value:e.$container.querySelector(".jb-pro-speed")}),Object.defineProperty(t,"$controlHtml",{value:e.$container.querySelector(".jb-pro-controls-item-html")}),Object.defineProperty(t,"$playbackTime",{value:e.$container.querySelector(".jb-pro-controls-playback-time")}),Object.defineProperty(t,"$playbackTimeInner",{value:e.$container.querySelector(".jb-pro-controls-playback-time-inner")}),Object.defineProperty(t,"$playbackTimeScroll",{value:e.$container.querySelector(".jb-pro-controls-playback-time-scroll")}),Object.defineProperty(t,"$playbackTimeList",{value:e.$container.querySelector(".jb-pro-controls-playback-time-list")}),Object.defineProperty(t,"$playbackTimeListOne",{value:e.$container.querySelector(".jb-pro-playback-time-one-wrap")}),Object.defineProperty(t,"$playbackTimeListSecond",{value:e.$container.querySelector(".jb-pro-playback-time-second-wrap")}),Object.defineProperty(t,"$playbackCurrentTime",{value:e.$container.querySelector(".jb-pro-controls-playback-current-time")}),Object.defineProperty(t,"$playbackCurrentTimeText",{value:e.$container.querySelector(".jb-pro-controls-playback-current-time-text")}),Object.defineProperty(t,"$controlsPlaybackBtns",{value:e.$container.querySelector(".jb-pro-controls-playback-btns")}),Object.defineProperty(t,"$playbackNarrow",{value:e.$container.querySelector(".jb-pro-playback-narrow")}),Object.defineProperty(t,"$playbackExpand",{value:e.$container.querySelector(".jb-pro-playback-expand")}),Object.defineProperty(t,"$ptz",{value:e.$container.querySelector(".jb-pro-ptz")}),Object.defineProperty(t,"$ptzActive",{value:e.$container.querySelector(".jb-pro-ptz-active")}),Object.defineProperty(t,"$ptzControl",{value:e.$container.querySelector(".jb-pro-ptz-controls")}),Object.defineProperty(t,"$ptzBgActive",{value:e.$container.querySelector(".jb-pro-ptz-bg-active")}),Object.defineProperty(t,"$ptzControlCircular",{value:e.$container.querySelector(".jb-pro-ptz-control")}),Object.defineProperty(t,"$ptzArrows",{value:e.$container.querySelectorAll(".jb-pro-ptz-arrow")}),Object.defineProperty(t,"$ptzExpand",{value:e.$container.querySelector(".jb-pro-ptz-expand")}),Object.defineProperty(t,"$ptzNarrow",{value:e.$container.querySelector(".jb-pro-ptz-narrow")}),Object.defineProperty(t,"$ptzApertureFar",{value:e.$container.querySelector(".jb-pro-ptz-aperture-far")}),Object.defineProperty(t,"$ptzApertureNear",{value:e.$container.querySelector(".jb-pro-ptz-aperture-near")}),Object.defineProperty(t,"$ptzFocusFar",{value:e.$container.querySelector(".jb-pro-ptz-focus-far")}),Object.defineProperty(t,"$ptzFocusNear",{value:e.$container.querySelector(".jb-pro-ptz-focus-near")}),Object.defineProperty(t,"$ptzCruisePlay",{value:e.$container.querySelector(".jb-pro-ptz-cruise-play")}),Object.defineProperty(t,"$ptzCruisePause",{value:e.$container.querySelector(".jb-pro-ptz-cruise-pause")}),Object.defineProperty(t,"$ptzFogOpen",{value:e.$container.querySelector(".jb-pro-ptz-fog-open")}),Object.defineProperty(t,"$ptzFogClose",{value:e.$container.querySelector(".jb-pro-ptz-fog-close")}),Object.defineProperty(t,"$ptzWiperOpen",{value:e.$container.querySelector(".jb-pro-ptz-wiper-open")}),Object.defineProperty(t,"$ptzWiperClose",{value:e.$container.querySelector(".jb-pro-ptz-wiper-close")}),Object.defineProperty(t,"$qualityText",{value:e.$container.querySelector(".jb-pro-quality-icon-text")}),Object.defineProperty(t,"$qualityMenu",{value:e.$container.querySelector(".jb-pro-quality-menu")}),Object.defineProperty(t,"$qualityMenuList",{value:e.$container.querySelector(".jb-pro-quality-menu-list")}),Object.defineProperty(t,"$scaleText",{value:e.$container.querySelector(".jb-pro-scale-icon-text")}),Object.defineProperty(t,"$scaleMenu",{value:e.$container.querySelector(".jb-pro-scale-menu")}),Object.defineProperty(t,"$scaleMenuList",{value:e.$container.querySelector(".jb-pro-scale-menu-list")}),Object.defineProperty(t,"$zoom",{value:e.$container.querySelector(".jb-pro-zoom")}),Object.defineProperty(t,"$zoomStop",{value:e.$container.querySelector(".jb-pro-zoom-stop")}),Object.defineProperty(t,"$zoomNarrow",{value:e.$container.querySelector(".jb-pro-zoom-narrow")}),Object.defineProperty(t,"$zoomExpand",{value:e.$container.querySelector(".jb-pro-zoom-expand")}),Object.defineProperty(t,"$zoomStop2",{value:e.$container.querySelector(".jb-pro-zoom-stop2")}),Object.defineProperty(t,"$close",{value:e.$container.querySelector(".jb-pro-close")}),Object.defineProperty(t,"$zoomControls",{value:e.$container.querySelector(".jb-pro-zoom-controls")}),Object.defineProperty(t,"$performancePanel",{value:e.$container.querySelector(".jb-pro-performance-panel")}),Object.defineProperty(t,"$performance",{value:e.$container.querySelector(".jb-pro-performance")}),Object.defineProperty(t,"$performanceActive",{value:e.$container.querySelector(".jb-pro-performance-active")}),Object.defineProperty(t,"$faceDetect",{value:e.$container.querySelector(".jb-pro-face")}),Object.defineProperty(t,"$faceDetectActive",{value:e.$container.querySelector(".jb-pro-face-active")}),Object.defineProperty(t,"$objectDetect",{value:e.$container.querySelector(".jb-pro-object")}),Object.defineProperty(t,"$objectDetectActive",{value:e.$container.querySelector(".jb-pro-object-active")}),Object.defineProperty(t,"$occlusionDetect",{value:e.$container.querySelector(".jb-pro-occlusion")}),Object.defineProperty(t,"$occlusionDetectActive",{value:e.$container.querySelector(".jb-pro-occlusion-active")}),Object.defineProperty(t,"$contextmenus",{value:e.$container.querySelector(".jb-pro-contextmenus")}),Object.defineProperty(t,"$speedText",{value:e.$container.querySelector(".jb-pro-speed-icon-text")}),Object.defineProperty(t,"$speedMenu",{value:e.$container.querySelector(".jb-pro-speed-menu")}),Object.defineProperty(t,"$speedMenuList",{value:e.$container.querySelector(".jb-pro-speed-menu-list")}),Object.defineProperty(t,"$logSave",{value:e.$container.querySelector(".jb-pro-logSave")}),Object.defineProperty(t,"$playbackProgress",{value:e.$container.querySelector(".jb-pro-control-progress-simple")}),Object.defineProperty(t,"$playbackProgressTip",{value:e.$container.querySelector(".jb-pro-progress-tip")}),Object.defineProperty(t,"$playbackProgressHover",{value:e.$container.querySelector(".jb-pro-progress-hover")}),Object.defineProperty(t,"$playbackProgressPlayed",{value:e.$container.querySelector(".jb-pro-progress-played")}),Object.defineProperty(t,"$playbackProgressIndicator",{value:e.$container.querySelector(".jb-pro-progress-indicator")}),Object.defineProperty(t,"$playbackProgressTime",{value:e.$container.querySelector(".jb-pro-playback-control-time")}),Object.defineProperty(t,"$tipsMessage",{value:e.$container.querySelector(".jb-pro-tips-message")}),Object.defineProperty(t,"$tipsMessageClose",{value:e.$container.querySelector(".jb-pro-tips-message-close")}),Object.defineProperty(t,"$tipsMessageContent",{value:e.$container.querySelector(".jb-pro-tips-message-content")})})(e,this),e._opt.extendOperateBtns.length>0&&e._opt.extendOperateBtns.forEach((e=>{this.addExtendBtn(e)})),e._opt.extendDomConfig&&e._opt.extendDomConfig.html&&this.addExtendDom(e._opt.extendDomConfig),t=this,Object.defineProperty(t,"controlsRect",{get:()=>t.$controls.getBoundingClientRect()}),Object.defineProperty(t,"controlsInnerRect",{get:()=>t.$controlsInner.getBoundingClientRect()}),Object.defineProperty(t,"controlsLeftRect",{get:()=>t.$controlsLeft.getBoundingClientRect()}),Object.defineProperty(t,"controlsRightRect",{get:()=>t.$controlsRight.getBoundingClientRect()}),Object.defineProperty(t,"controlsPlaybackTimeInner",{get:()=>t.$playbackTimeInner&&t.$playbackTimeInner.getBoundingClientRect()||{}}),Object.defineProperty(t,"controlsPlaybackBtnsRect",{get:()=>t.$controlsPlaybackBtns&&t.$controlsPlaybackBtns.getBoundingClientRect()||{width:0}}),Oh(e,this),((e,t)=>{const{events:{proxy:i},debug:s}=e,r=e._opt,a=r.operateBtns;function o(e){const{bottom:i,height:s}=t.$volumePanel.getBoundingClientRect(),{height:r}=t.$volumeHandle.getBoundingClientRect();return ca(i-e.y-r/2,0,s-r/2)/(s-r)}if(Aa()&&i(window,["click","contextmenu"],(i=>{i.composedPath().indexOf(e.$container)>-1?t.isFocus=!0:t.isFocus=!1})),i(t.$controls,"click",(e=>{e.stopPropagation()})),a.play&&(i(t.$pause,"click",(t=>{r.playType===w&&r.playbackConfig.uiUsePlaybackPause?e.playbackPause=!0:to(a.pauseFn)?a.pauseFn():e.pauseForControl()})),i(t.$play,"click",(t=>{r.playType===w&&e.playbackPause?e.playbackPause=!1:to(a.playFn)?a.playFn():e.playForControl().then((()=>{e.resumeAudioAfterPause()}))}))),i(t.$playBig,"click",(t=>{r.playType===w&&e.playbackPause?e.playbackPause=!1:to(a.playFn)?a.playFn():e.playForControl().then((()=>{e.resumeAudioAfterPause()}))})),a.screenshot&&i(t.$screenshot,"click",(t=>{t.stopPropagation(),to(a.screenshotFn)?a.screenshotFn():e.video.screenshot()})),a.audio&&(Aa()&&(i(t.$volume,"mouseover",(()=>{t.$volumePanelWrap.classList.add("jb-pro-volume-panel-wrap-show")})),i(t.$volume,"mouseout",(()=>{t.$volumePanelWrap.classList.remove("jb-pro-volume-panel-wrap-show")})),i(t.$volumePanel,"click",(t=>{t.stopPropagation(),e.volume=o(t)})),i(t.$volumeHandle,"mousedown",(e=>{e.stopPropagation(),t.isVolumeDroging=!0})),i(t.$volumeHandle,"mousemove",(i=>{t.isVolumeDroging&&(e.volume=o(i))})),i(document,"mouseup",(()=>{t.isVolumeDroging&&(t.isVolumeDroging=!1)}))),i(t.$volumeOn,"click",(i=>{i.stopPropagation(),ua(t.$volumeOn,"display","none"),ua(t.$volumeOff,"display","block");const s=e.volume;e.volume=0,e._lastVolume=Aa()?s:1})),i(t.$volumeOff,"click",(i=>{i.stopPropagation(),ua(t.$volumeOn,"display","block"),ua(t.$volumeOff,"display","none"),e.volume=Aa()?e.lastVolume||.5:1}))),a.record&&(i(t.$record,"click",(t=>{t.stopPropagation(),to(a.recordFn)?a.recordFn():e.recording=!0})),i(t.$recordStop,"click",(t=>{t.stopPropagation(),to(a.recordStopFn)?a.recordStopFn():e.recording=!1}))),i(t.$recordingStop,"click",(t=>{t.stopPropagation(),to(a.recordStopFn)?a.recordStopFn():e.recording=!1})),a.fullscreen&&(i(t.$fullscreen,"click",(t=>{t.stopPropagation(),to(a.fullscreenFn)?a.fullscreenFn():e.fullscreen=!0})),i(t.$fullscreenExit,"click",(t=>{t.stopPropagation(),to(a.fullscreenExitFn)?a.fullscreenExitFn():e.fullscreen=!1}))),a.ptz){if(i(t.$ptz,"click",(e=>{e.stopPropagation(),ua(t.$ptzActive,"display","flex"),ua(t.$ptz,"display","none"),t.$ptzControl.classList.add("jb-pro-ptz-controls-show")})),i(t.$ptzActive,"click",(e=>{e.stopPropagation(),ua(t.$ptz,"display","flex"),ua(t.$ptzActive,"display","none"),t.$ptzControl.classList.remove("jb-pro-ptz-controls-show")})),t.$ptzArrows.forEach((s=>{if(r.ptzClickType===Y)i(s,"click",(i=>{i.stopPropagation();const s=i.currentTarget.dataset.arrow;t.$ptzBgActive.classList.add("jb-pro-ptz-bg-active-show"),t.$ptzBgActive.classList.add(`jb-pro-ptz-bg-active-${s}`),t.$ptzControlCircular.classList.add(`jb-pro-ptz-control-${s}`),e.emit(lt.ptz,vo(s)),setTimeout((()=>{t.$ptzBgActive.classList.remove("jb-pro-ptz-bg-active-show"),Ri.forEach((e=>{t.$ptzBgActive.classList.remove(`jb-pro-ptz-bg-active-${e}`),t.$ptzControlCircular.classList.remove(`jb-pro-ptz-control-${e}`)})),e.emit(lt.ptz,Di)}),1e3*r.ptzStopEmitDelay)}));else if(r.ptzClickType===Q){let r=!1;i(s,"mousedown",(i=>{i.stopPropagation(),r=!0;const s=i.currentTarget.dataset.arrow;t.$ptzBgActive.classList.add("jb-pro-ptz-bg-active-show"),t.$ptzBgActive.classList.add(`jb-pro-ptz-bg-active-${s}`),t.$ptzControlCircular.classList.add(`jb-pro-ptz-control-${s}`),e.emit(lt.ptz,vo(s))}));const a=()=>{r=!1,t.$ptzBgActive.classList.remove("jb-pro-ptz-bg-active-show"),Ri.forEach((e=>{t.$ptzBgActive.classList.remove(`jb-pro-ptz-bg-active-${e}`),t.$ptzControlCircular.classList.remove(`jb-pro-ptz-control-${e}`)})),e.emit(lt.ptz,Di)};i(s,"mouseup",(e=>{e.stopPropagation(),r&&a()})),i(window,"mouseup",(e=>{e.stopPropagation(),r&&a()}))}})),r.ptzZoomShow)if(r.ptzClickType===Y)i(t.$ptzExpand,"click",(t=>{t.stopPropagation(),e.emit(lt.ptz,Ii),setTimeout((()=>{e.emit(lt.ptz,Di)}),1e3*r.ptzStopEmitDelay)})),i(t.$ptzNarrow,"click",(t=>{t.stopPropagation(),e.emit(lt.ptz,Pi),setTimeout((()=>{e.emit(lt.ptz,Di)}),1e3*r.ptzStopEmitDelay)}));else if(r.ptzClickType===Q){let n=!1,l=!1;i(t.$ptzExpand,"mousedown",(t=>{t.stopPropagation(),n=!0,e.emit(lt.ptz,Ii)})),i(t.$ptzNarrow,"mousedown",(t=>{t.stopPropagation(),l=!0,e.emit(lt.ptz,Pi)}));const d=()=>{n=!1,l=!1,e.emit(lt.ptz,Di)};i(t.$ptzExpand,"mouseup",(e=>{e.stopPropagation(),n&&d()})),i(t.$ptzNarrow,"mouseup",(e=>{e.stopPropagation(),l&&d()})),i(window,"mouseup",(e=>{e.stopPropagation(),(n||l)&&d()}))}if(r.ptzApertureShow)if(r.ptzClickType===Y)i(t.$ptzApertureFar,"click",(t=>{t.stopPropagation(),e.emit(lt.ptz,Bi),setTimeout((()=>{e.emit(lt.ptz,Li)}),1e3*r.ptzStopEmitDelay)})),i(t.$ptzApertureNear,"click",(t=>{t.stopPropagation(),e.emit(lt.ptz,Mi),setTimeout((()=>{e.emit(lt.ptz,Li)}),1e3*r.ptzStopEmitDelay)}));else if(r.ptzClickType===Q){let h=!1,c=!1;i(t.$ptzApertureFar,"mousedown",(t=>{t.stopPropagation(),h=!0,e.emit(lt.ptz,Bi)})),i(t.$ptzApertureNear,"mousedown",(t=>{t.stopPropagation(),c=!0,e.emit(lt.ptz,Mi)}));const u=()=>{h=!1,c=!1,e.emit(lt.ptz,Li)};i(t.$ptzApertureFar,"mouseup",(e=>{e.stopPropagation(),h&&u()})),i(t.$ptzApertureNear,"mouseup",(e=>{e.stopPropagation(),c&&u()})),i(window,"mouseup",(e=>{e.stopPropagation(),(h||c)&&u()}))}if(r.ptzFocusShow)if(r.ptzClickType===Y)i(t.$ptzFocusFar,"click",(t=>{t.stopPropagation(),e.emit(lt.ptz,Ui),setTimeout((()=>{e.emit(lt.ptz,Li)}),1e3*r.ptzStopEmitDelay)})),i(t.$ptzFocusNear,"click",(t=>{t.stopPropagation(),e.emit(lt.ptz,Fi),setTimeout((()=>{e.emit(lt.ptz,Li)}),1e3*r.ptzStopEmitDelay)}));else if(r.ptzClickType===Q){let p=!1,f=!1;i(t.$ptzFocusFar,"mousedown",(t=>{t.stopPropagation(),p=!0,e.emit(lt.ptz,Ui)})),i(t.$ptzFocusNear,"mousedown",(t=>{t.stopPropagation(),f=!0,e.emit(lt.ptz,Fi)}));const m=()=>{p=!1,f=!1,e.emit(lt.ptz,Li)};i(t.$ptzFocusFar,"mouseup",(e=>{e.stopPropagation(),p&&m()})),i(t.$ptzFocusNear,"mouseup",(e=>{e.stopPropagation(),f&&m()})),i(window,"mouseup",(e=>{e.stopPropagation(),(p||f)&&m()}))}if(r.ptzCruiseShow&&(i(t.$ptzCruisePlay,"click",(t=>{t.stopPropagation(),e.emit(lt.ptz,Oi)})),i(t.$ptzCruisePause,"click",(t=>{t.stopPropagation(),e.emit(lt.ptz,Ni)}))),r.ptzFogShow&&(i(t.$ptzFogOpen,"click",(t=>{t.stopPropagation(),e.emit(lt.ptz,ji)})),i(t.$ptzFogClose,"click",(t=>{t.stopPropagation(),e.emit(lt.ptz,Gi)}))),r.ptzWiperShow&&(i(t.$ptzWiperOpen,"click",(t=>{t.stopPropagation(),e.emit(lt.ptz,zi)})),i(t.$ptzWiperClose,"click",(t=>{t.stopPropagation(),e.emit(lt.ptz,$i)}))),r.ptzSupportDraggable){function g(){t.isPtzControlDroging&&(t.isPtzControlDroging=!1,t.$ptzControl.style.cursor="grab",t.tempPtzPosition={x:0,y:0})}t.isPtzControlDroging=!1,t.tempPtzPosition={x:0,y:0},i(t.$ptzControl,ya()?"touchstart":"mousedown",(e=>{e.stopPropagation(),t.isPtzControlDroging=!0,t.$ptzControl.style.cursor="grabbing";const{posX:i,posY:s}=io(e);t.tempPtzPosition={x:i,y:s}})),i(t.$ptzControl,ya()?"touchmove":"mousemove",(e=>{if(t.isPtzControlDroging){e.stopPropagation();const{posX:i,posY:s}=io(e),r=t.tempPtzPosition.x-i,a=t.tempPtzPosition.y-s;t.$ptzControl.style.left=t.$ptzControl.offsetLeft-r+"px",t.$ptzControl.style.top=t.$ptzControl.offsetTop-a+"px",t.tempPtzPosition={x:i,y:s}}})),i(t.$ptzControl,ya()?"touchend":"mouseup",(e=>{e.stopPropagation(),g()})),i(window,ya()?"touchend":"mouseup",(e=>{e.stopPropagation(),g()}))}}if(a.performance&&(i(t.$performance,"click",(t=>{t.stopPropagation(),e.togglePerformancePanel(!0)})),i(t.$performanceActive,"click",(t=>{t.stopPropagation(),e.togglePerformancePanel(!1)}))),a.logSave&&i(t.$logSave,"click",(t=>{t.stopPropagation(),e.downloadMemoryLog()})),a.aiFace&&(i(t.$faceDetect,"click",(t=>{t.stopPropagation(),e.faceDetect(!0)})),i(t.$faceDetectActive,"click",(t=>{t.stopPropagation(),e.faceDetect(!1)}))),a.aiObject&&(i(t.$objectDetect,"click",(t=>{t.stopPropagation(),e.objectDetect(!0)})),i(t.$objectDetectActive,"click",(t=>{t.stopPropagation(),e.objectDetect(!1)}))),a.aiOcclusion&&(i(t.$occlusionDetect,"click",(t=>{t.stopPropagation(),e.occlusionDetect(!0)})),i(t.$occlusionDetectActive,"click",(t=>{t.stopPropagation(),e.occlusionDetect(!1)}))),e._opt.hasControl&&e._opt.controlAutoHide){i(e.$container,"mouseover",(()=>{e.fullscreen||(ua(t.$controls,"display","block"),A())})),i(e.$container,"mousemove",(()=>{e.$container&&t.$controls&&(e.fullscreen,"none"===t.$controls.style.display&&(ua(t.$controls,"display","block"),A()))})),i(e.$container,"mouseout",(()=>{b(),ua(t.$controls,"display","none")}));let y=null;const A=()=>{b(),y=setTimeout((()=>{ua(t.$controls,"display","none")}),5e3)},b=()=>{y&&(clearTimeout(y),y=null)}}if(e._opt.playType===w){let _=e._opt.playbackConfig.controlType;e._opt.playbackConfig.showRateBtn&&(i(t.$speedMenu,"mouseover",(()=>{t.$speedMenuList.classList.add("jb-pro-speed-menu-shown")})),i(t.$speedMenu,"mouseout",(()=>{t.$speedMenuList.classList.remove("jb-pro-speed-menu-shown")})),i(t.$speedMenuList,"click",(t=>{const i=Za(t);if(i.matches("div.jb-pro-speed-menu-item")){const t=i.dataset;e.emit(lt.playbackPreRateChange,t.speed)}}))),_===X.normal?(i(t.$playbackNarrow,"click",(t=>{t.stopPropagation(),e.playback&&e.playback.narrowPrecision()})),i(t.$playbackExpand,"click",(t=>{t.stopPropagation(),e.playback&&e.playback.expandPrecision()})),i(t.$playbackTimeList,"click",(t=>{const i=Za(t);i.matches("div.jb-pro-playback-time-minute-one")&&e.playback&&e.playback.seek(i.dataset)})),e._opt.playbackConfig.supportWheel&&i(t.$playbackTimeInner,"wheel",(t=>{t.preventDefault(),(t.wheelDelta?t.wheelDelta/120:-(t.detail||0)/3)>0?e.playback&&e.playback.expandPrecision():e.playback&&e.playback.narrowPrecision()}))):_===X.simple&&(t.isDroging=!1,i(t.$playbackProgress,"click",(i=>{if(i.target!==t.$playbackProgressIndicator){let s=0,r=0;if(e.isInWebFullscreen())s=i.touches[0].clientY/e.height,r=s*e.playback.totalDuration;else{const a=Ih(t,e.playback.totalDuration,i);s=a.percentage,r=a.second}e.playback&&e.playback.seek({time:r})}})),i(t.$playbackProgress,"mousemove",(i=>{ua(t.$playbackProgressTip,"display","block");const{width:s,time:r}=Ih(t,e.playback.totalDuration,i);t.$playbackProgressTip.innerHTML=r;const a=t.$playbackProgressTip.clientWidth;s<=a/2?ua(t.$playbackProgressTip,"left",0):s>t.$playbackProgress.clientWidth-a/2?ua(t.$playbackProgressTip,"left",t.$playbackProgress-a+"px"):ua(t.$playbackProgressTip,"left",s-a/2+"px")})),i(t.$playbackProgress,"mouseout",(()=>{ua(t.$playbackProgressTip,"display","none")})),i(t.$playbackProgressIndicator,"mousedown",(e=>{t.isDroging=!0})),i(t.$playbackProgress,"mousemove",(i=>{if(t.isDroging){const{second:s,percentage:r}=Ih(t,e.playback.totalDuration,i);e.playback&&e.playback.seek({time:s})}})),i(t.$playbackProgress,"mouseup",(e=>{t.isDroging&&(t.isDroging=!1)})))}a.quality&&(i(t.$qualityMenu,"mouseover",(()=>{t.$qualityMenuList.classList.add("jb-pro-quality-menu-shown")})),i(t.$qualityMenu,"mouseout",(()=>{t.$qualityMenuList.classList.remove("jb-pro-quality-menu-shown")})),i(t.$qualityMenuList,"click",(t=>{const i=Za(t);if(i.matches("div.jb-pro-quality-menu-item")){const t=i.dataset;e.streamQuality=t.quality}}))),a.scale&&(i(t.$scaleMenu,"mouseover",(()=>{t.$scaleMenuList.classList.add("jb-pro-scale-menu-shown")})),i(t.$scaleMenu,"mouseout",(()=>{t.$scaleMenuList.classList.remove("jb-pro-scale-menu-shown")})),i(t.$scaleMenuList,"click",(t=>{const i=Za(t);if(i.matches("div.jb-pro-scale-menu-item")){const t=i.dataset;e.setScaleMode(t.scale)}}))),a.zoom&&(i(t.$zoom,"click",(t=>{t.stopPropagation(),e.zooming=!0})),i(t.$zoomStop,"click",(t=>{t.stopPropagation(),e.zooming=!1}))),i(t.$zoomExpand,"click",(t=>{t.stopPropagation(),e.zoom&&e.zoom.expandPrecision()})),i(t.$zoomNarrow,"click",(t=>{t.stopPropagation(),e.zoom&&e.zoom.narrowPrecision()})),i(t.$zoomStop2,"click",(t=>{t.stopPropagation(),e.zooming=!1})),a.close&&i(t.$close,"click",(t=>{t.stopPropagation(),e.doDestroy()})),i(t.$tipsMessageClose,"click",(e=>{e.stopPropagation(),t.$tipsMessageContent.innerHTML="",ua(t.$tipsMessage,"display","none")}))})(e,this),e._opt.hotKey&&((e,t)=>{const{events:{proxy:i}}=e,s={};function r(e,t){s[e]?s[e].push(t):s[e]=[t]}r(_i,(()=>{e.fullscreen&&(e.fullscreen=!1)})),r(vi,(()=>{e.volume+=.05})),r(wi,(()=>{e.volume-=.05})),i(window,"keydown",(e=>{if(t.isFocus){const t=document.activeElement.tagName.toUpperCase(),i=document.activeElement.getAttribute("contenteditable");if("INPUT"!==t&&"TEXTAREA"!==t&&""!==i&&"true"!==i){const t=s[e.keyCode];t&&(e.preventDefault(),t.forEach((e=>e())))}}}))})(e,this),this.btnIndex=0,this.initLoadingBackground(),Ka(e._opt.loadingIconStyle)&&this.initLoadingIconStyle(e._opt.loadingIconStyle),Ka(e._opt.ptzPositionConfig)&&this.updatePtzPosition(e._opt.ptzPositionConfig),this.kbpsShow="0 KB/s",this.player.debug.log("Control","init")}destroy(){if(this.$performancePanel){this.$performancePanel.innerHTML="";if(!Fh(this.$performancePanel)){const e=this.player.$container.querySelector(".jb-pro-performance-panel");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$poster){if(!Fh(this.$poster)){const e=this.player.$container.querySelector(".jb-pro-poster");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$loading){if(!Fh(this.$loading)){const e=this.player.$container.querySelector(".jb-pro-loading");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$loadingBg){if(!Fh(this.$loadingBg)){const e=this.player.$container.querySelector(".jb-pro-loading-bg");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$controls){if(!Fh(this.$controls)){const e=this.player.$container.querySelector(".jb-pro-controls");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$playBig){if(!Fh(this.$playBig)){const e=this.player.$container.querySelector(".jb-pro-play-big");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$recording){if(!Fh(this.$recording)){const e=this.player.$container.querySelector(".jb-pro-recording");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$ptzControl){if(!Fh(this.$ptzControl)){const e=this.player.$container.querySelector(".jb-pro-ptz-controls");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$zoomControls){if(!Fh(this.$zoomControls)){const e=this.player.$container.querySelector(".jb-pro-zoom-controls");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$contextmenus){this.$contextmenus.innerHTML="";if(!Fh(this.$contextmenus)){const e=this.player.$container.querySelector(".jb-pro-contextmenus");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$tipsMessage){if(!Fh(this.$tipsMessage)){const e=this.player.$container.querySelector(".jb-pro-tips-message");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$extendDom){if(!Fh(this.$extendDom)){const e=this.player.$container.querySelector(".jb-pro-extend-dom");e&&this.player.$container&&this.player.$container.removeChild(e)}}this.btnIndex=0,this.extendBtnList=[],this.kbpsShow="0 KB/s",this.player.$container&&(this.player.$container.classList.remove("jb-pro-controls-show-auto-hide"),this.player.$container.classList.remove("jb-pro-controls-show")),this.player.debug.log("Control","destroy")}getBtnIndex(){return this.btnIndex++}autoSize(){const e=this.player;e.$container.style.padding="0 0";const t=e.width,i=e.height,s=t/i,r=e.video.$videoElement.width/e.video.$videoElement.height;if(s>r){const s=(t-i*r)/2;e.$container.style.padding=`0 ${s}px`}else{const s=(i-t/r)/2;e.$container.style.padding=`${s}px 0`}}initLoadingBackground(){const e=this.player;e._opt.loadingBackground&&e._opt.loadingBackgroundWidth&&e._opt.loadingBackgroundHeight&&(e.debug.log("Control","initLoadingBackground()"),"default"===this.player._opt.aspectRatio||ya()?(e.getRenderType()===W||e.getRenderType()===J)&&this._initLoadingBackground():this._initLoadingBackgroundForRatio(),Mh(this.$loadingBg,"display","block"),e._opt.loadingBackground="",e._opt.loadingBackgroundWidth=0,e._opt.loadingBackgroundHeight=0)}initLoadingIconStyle(e){const t=this.player.$container.querySelector(".jb-pro-icon-loading");t&&(e.width&&Mh(t,"width",`${e.width}px`),e.height&&Mh(t,"height",`${e.height}px`),e.background&&Mh(t,"backgroundImage",`url("${e.background}")`),!1===e.hasAnimation&&(Mh(t,"animationName","none"),Mh(t,"animationDuration",0),Mh(t,"animationTimingFunction","ease"),Mh(t,"animationIterationCount",1)))}_initLoadingBackgroundForRatio(){const e=this.player._opt.aspectRatio.split(":").map(Number);let t=this.player.width,i=this.player.height;const s=this.player._opt;let r=0;s.hasControl&&!s.controlAutoHide&&(r=s.playType===w?Qt:Yt,i-=r);const a=this.player._opt.loadingBackgroundWidth,o=this.player._opt.loadingBackgroundHeight,n=a/o,l=e[0]/e[1];if(this.$loadingBgImage.src=this.player._opt.loadingBackground,n>l){const e=l*o/a;this.$loadingBgImage.style.width=100*e+"%",this.$loadingBgImage.style.height=`calc(100% - ${r}px)`,this.$loadingBgImage.style.padding=`0 ${(t-t*e)/2}px`}else{const e=a/l/o;this.$loadingBgImage.style.width="100%",this.$loadingBgImage.style.height=`calc(${100*e}% - ${r}px)`,this.$loadingBgImage.style.padding=(i-i*e)/2+"px 0"}}_initLoadingBackground(){const e=this.player;let t=e.height;const i=e._opt;if(i.hasControl&&!i.controlAutoHide){t-=i.playType===w?Qt:Yt}let s=e.width,r=t;const a=i.rotate;270!==a&&90!==a||(s=t,r=e.width),this.$loadingBgImage.width=s,this.$loadingBgImage.height=r,this.$loadingBgImage.src=e._opt.loadingBackground;let o=(e.width-s)/2,n=(t-r)/2,l="contain";i.isResize||(l="fill"),i.isFullResize&&(l="none");let d="";"none"===i.mirrorRotate&&a&&(d+=" rotate("+a+"deg)"),"level"===i.mirrorRotate?d+=" rotateY(180deg)":"vertical"===i.mirrorRotate&&(d+=" rotateX(180deg)"),this.player._opt.videoRenderSupportScale&&(this.$loadingBgImage.style.objectFit=l),this.$loadingBgImage.style.transform=d,this.$loadingBgImage.style.padding="0",this.$loadingBgImage.style.left=o+"px",this.$loadingBgImage.style.top=n+"px"}_validateExtendBtn(e){let t=!0;if(e.name||(this.player.debug.warn("Control","extend button name is required"),t=!1),t){-1!==this.extendBtnList.findIndex((t=>t.name===e.name))&&(this.player.debug.warn("Control",`extend button name: ${e.name} is already exist`),t=!1)}return t&&(e.icon||(this.player.debug.warn("Control","extend button icon is required"),t=!1)),t}addExtendBtn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=po(Ns);if(e=Object.assign({},t,e),!this._validateExtendBtn(e))return;const i=e.name||"",s=this.$controlsRight,r=e.activeIcon&&e.activeClick,a=`\n <div class="jb-pro-controls-item-wrap jb-pro-controls-item-wrap-${i}">\n ${e.icon?`<div class="jb-pro-controls-item jb-pro-control-extend-${i}">\n <i class="jb-pro-icon jb-pro-icon-extend-${i}"></i>\n ${e.iconTitle?`\n <span class="icon-title-tips"><span class="icon-title">${e.iconTitle}</span></span>\n `:""}\n </div>`:""}\n ${e.activeIcon?`<div class="jb-pro-controls-item jb-pro-control-extend-${i}-active">\n <i class="jb-pro-icon jb-pro-icon-extend-${i}-active"></i>\n ${e.activeIconTitle?`\n <span class="icon-title-tips"><span class="icon-title">${e.activeIconTitle}</span></span>\n `:""}\n </div>`:""}\n </div>\n `,o=Array.from(s.children)[e.index];o?o.insertAdjacentHTML("beforebegin",a):Bh(s,a);const n=s.querySelector(`.jb-pro-controls-item-wrap-${i}`),l=e.icon?s.querySelector(`.jb-pro-icon-extend-${i}`):null,d=e.icon?s.querySelector(`.jb-pro-control-extend-${i}`):null,h=e.activeIcon?s.querySelector(`.jb-pro-icon-extend-${i}-active`):null,c=e.activeIcon?s.querySelector(`.jb-pro-control-extend-${i}-active`):null,{events:{proxy:u},debug:p}=this.player;e.icon&&(Mh(l,"background",`url(${e.icon}) no-repeat center`),Mh(l,"background-size","100% 100%"),Mh(d,"display","none"),e.iconHover&&(u(l,"mouseover",(()=>{Mh(l,"background",`url(${e.iconHover}) no-repeat center`),Mh(l,"background-size","100% 100%")})),u(l,"mouseout",(()=>{Mh(l,"background",`url(${e.icon}) no-repeat center`),Mh(l,"background-size","100% 100%")})))),e.activeIcon&&(Mh(h,"background",`url(${e.activeIcon}) no-repeat center`),Mh(h,"background-size","100% 100%"),Mh(c,"display","none"),e.activeIconHover&&(u(h,"mouseover",(()=>{Mh(h,"background",`url(${e.activeIconHover}) no-repeat center`),Mh(h,"background-size","100% 100%")})),u(h,"mouseout",(()=>{Mh(h,"background",`url(${e.activeIcon}) no-repeat center`),Mh(h,"background-size","100% 100%")})))),e.click&&l&&u(l,"click",(t=>{t.preventDefault(),r&&(Mh(d,"display","none"),Mh(c,"display","flex")),this.player.isInMulti()?e.click.call(this.player,t,this.player._opt.multiIndex):e.click.call(this.player,t)})),e.activeClick&&h&&u(h,"click",(t=>{t.preventDefault(),Mh(d,"display","flex"),Mh(c,"display","none"),this.player.isInMulti()?e.activeClick.call(this.player,t,this.player._opt.multiIndex):e.activeClick.call(this.player,t)})),this.extendBtnList.push({name:i,$iconContainer:n,$iconWrap:d,$activeIconWrap:c})}addExtendDom(e){if(this.player.debug.log(this.TAG_NAME,"addExtendDom"),e.html){const t=`\n <div class="jb-pro-extend-dom">\n ${e.html}\n </div>\n `;this.player.$container.insertAdjacentHTML("beforeend",t),Object.defineProperty(this,"$extendDom",{value:this.player.$container.querySelector(".jb-pro-extend-dom")}),e.showBeforePlay&&Mh(this.$extendDom,"display","block")}}toggleExtendDom(e){this.$extendDom&&(Fa(e)||(e="none"===this.$extendDom.style.display),Mh(this.$extendDom,"display",e?"block":"none"))}updateExtendDom(e){this.player.debug.log(this.TAG_NAME,"updateExtendDom"),this.$extendDom&&(this.$extendDom.innerHTML=e)}removeExtendDom(){this.player.debug.log(this.TAG_NAME,"removeExtendDom"),this.$extendDom&&(this.$extendDom.innerHTML="")}updateLoadingText(e){this.$loadingText&&(this.$loadingText.innerText=e)}getExtendBtnList(){return this.extendBtnList}showTipsMessage(e,t){const i=this.$tipsMessage,s=this.$tipsMessageContent;if(i){const r=`\n <div class="jb-pro-tips-message-content-item">${e}</div>\n ${t?`<div class="jb-pro-tips-message-content-item">Error Type:${t}</div>`:""}\n `;s.innerHTML=r,Mh(i,"display","block")}}hideTipsMessage(){const e=this.$tipsMessage;e&&($tipsMessageContent.innerHTML="",Mh(e,"display","none"))}updatePtzPosition(e){const t=this.$ptzControl;if(Ka(e)&&t){let i="auto";e.left&&(i=Number(e.left)===e.left?e.left+"px":e.left),Mh(t,"left",i);let s="auto";e.top&&(s=Number(e.top)===e.top?e.top+"px":e.top),Mh(t,"top",s);let r="auto";e.bottom&&(r=Number(e.bottom)===e.bottom?e.bottom+"px":e.bottom),Mh(t,"bottom",r);let a="auto";e.right&&(a=Number(e.right)===e.right?e.right+"px":e.right),Mh(t,"right",a)}}}Nh(".jb-pro-container{position:relative;width:100%;height:100%;overflow:hidden}.jb-pro-container.jb-pro-fullscreen-web{position:fixed;z-index:9999;left:0;top:0;right:0;bottom:0;width:100vw!important;height:100vh!important;background:#000}.jb-pro-container .jb-pro-loading-bg-for-ios{position:absolute;z-index:100;left:0;top:0;right:0;bottom:0;height:100%;width:100%;opacity:0;visibility:hidden;background-position:50%;background-repeat:no-repeat;background-size:contain;pointer-events:none}.jb-pro-container .jb-pro-loading-bg-for-ios.show{opacity:1;visibility:visible}");var Gh=e=>{const{_opt:t,debug:i,events:{proxy:s}}=e;if(t.supportDblclickFullscreen&&s(e.$container,"dblclick",(t=>{const i=Za(t).nodeName.toLowerCase();"canvas"!==i&&"video"!==i||(e.fullscreen=!e.fullscreen)})),s(document,"visibilitychange",(()=>{e.visibility="visible"===document.visibilityState,i.log("visibilitychange",document.visibilityState),t.hiddenAutoPause&&(i.log("visibilitychange","hiddenAutoPause is true ",document.visibilityState,e._isPlayingBeforePageHidden),"visible"===document.visibilityState?e._isPlayingBeforePageHidden&&e.play():(e._isPlayingBeforePageHidden=e.playing,e.playing&&e.pause()))})),Aa()&&s(document,["click","contextmenu"],(t=>{Uh(t,e.$container)?(yo(e._opt.disableContextmenu)&&"contextmenu"===t.type&&t.preventDefault(),e.isInput="INPUT"===t.target.tagName,e.isFocus=!0,e.emit(lt.focus)):(e.isInput=!1,e.isFocus=!1,e.emit(lt.blur))})),t.isCheckInView){const t=xa((()=>{e.emit(lt.inView,function(e){const t=e.getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight,s=window.innerWidth||document.documentElement.clientWidth,r=t.top<=i&&t.top+t.height>=0,a=t.left<=s&&t.left+t.width>=0;return r&&a}(e.$container))}),200);s(window,"scroll",(()=>t()))}if(t.autoResize){const t=xa((()=>{e.resize()}),500);s(window,["resize","orientationchange"],(()=>{t()})),screen&&screen.orientation&&screen.orientation.onchange&&s(screen.orientation,"change",(()=>{t()}))}};class zh{static init(){zh.types={avc1:[],avcC:[],hvc1:[],hvcC:[],av01:[],av1C:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[],Opus:[],dOps:[],"ac-3":[],dac3:[],"ec-3":[],dec3:[]};for(let e in zh.types)zh.types.hasOwnProperty(e)&&(zh.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);let e=zh.constants={};e.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),e.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),e.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSC=e.STCO=e.STTS,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),e.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),e.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(e){let t=8,i=null,s=Array.prototype.slice.call(arguments,1),r=s.length;for(let e=0;e<r;e++)t+=s[e].byteLength;i=new Uint8Array(t),i[0]=t>>>24&255,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i.set(e,4);let a=8;for(let e=0;e<r;e++)i.set(s[e],a),a+=s[e].byteLength;return i}static generateInitSegment(e){let t=zh.box(zh.types.ftyp,zh.constants.FTYP),i=zh.moov(e),s=new Uint8Array(t.byteLength+i.byteLength);return s.set(t,0),s.set(i,t.byteLength),s}static moov(e){let t=zh.mvhd(e.timescale,e.duration),i=zh.trak(e),s=zh.mvex(e);return zh.box(zh.types.moov,t,i,s)}static mvhd(e,t){return zh.box(zh.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static trak(e){return zh.box(zh.types.trak,zh.tkhd(e),zh.mdia(e))}static tkhd(e){let t=e.id,i=e.duration,s=e.presentWidth,r=e.presentHeight;return zh.box(zh.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,s>>>8&255,255&s,0,0,r>>>8&255,255&r,0,0]))}static mdia(e){return zh.box(zh.types.mdia,zh.mdhd(e),zh.hdlr(e),zh.minf(e))}static mdhd(e){let t=e.timescale,i=e.duration;return zh.box(zh.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,i>>>24&255,i>>>16&255,i>>>8&255,255&i,85,196,0,0]))}static hdlr(e){let t=null;return t="audio"===e.type?zh.constants.HDLR_AUDIO:zh.constants.HDLR_VIDEO,zh.box(zh.types.hdlr,t)}static minf(e){let t=null;return t="audio"===e.type?zh.box(zh.types.smhd,zh.constants.SMHD):zh.box(zh.types.vmhd,zh.constants.VMHD),zh.box(zh.types.minf,t,zh.dinf(),zh.stbl(e))}static dinf(){return zh.box(zh.types.dinf,zh.box(zh.types.dref,zh.constants.DREF))}static stbl(e){return zh.box(zh.types.stbl,zh.stsd(e),zh.box(zh.types.stts,zh.constants.STTS),zh.box(zh.types.stsc,zh.constants.STSC),zh.box(zh.types.stsz,zh.constants.STSZ),zh.box(zh.types.stco,zh.constants.STCO))}static stsd(e){return"audio"===e.type?"mp3"===e.audioType?zh.box(zh.types.stsd,zh.constants.STSD_PREFIX,zh.mp3(e)):zh.box(zh.types.stsd,zh.constants.STSD_PREFIX,zh.mp4a(e)):"avc"===e.videoType?zh.box(zh.types.stsd,zh.constants.STSD_PREFIX,zh.avc1(e)):zh.box(zh.types.stsd,zh.constants.STSD_PREFIX,zh.hvc1(e))}static mp3(e){let t=e.channelCount,i=e.audioSampleRate,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return zh.box(zh.types[".mp3"],s)}static mp4a(e){let t=e.channelCount,i=e.audioSampleRate,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return zh.box(zh.types.mp4a,s,zh.esds(e))}static esds(e){let t=e.config||[],i=t.length,s=new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(t).concat([6,1,2]));return zh.box(zh.types.esds,s)}static avc1(e){let t=e.avcc;const i=e.codecWidth,s=e.codecHeight;let r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,s>>>8&255,255&s,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return zh.box(zh.types.avc1,r,zh.box(zh.types.avcC,t))}static hvc1(e){let t=e.avcc;const i=e.codecWidth,s=e.codecHeight;let r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,s>>>8&255,255&s,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return zh.box(zh.types.hvc1,r,zh.box(zh.types.hvcC,t))}static mvex(e){return zh.box(zh.types.mvex,zh.trex(e))}static trex(e){let t=e.id,i=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return zh.box(zh.types.trex,i)}static moof(e,t){return zh.box(zh.types.moof,zh.mfhd(e.sequenceNumber),zh.traf(e,t))}static mfhd(e){let t=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return zh.box(zh.types.mfhd,t)}static traf(e,t){let i=e.id,s=zh.box(zh.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),r=zh.box(zh.types.tfdt,new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),a=zh.sdtp(e),o=zh.trun(e,a.byteLength+16+16+8+16+8+8);return zh.box(zh.types.traf,s,r,o,a)}static sdtp(e){let t=new Uint8Array(5),i=e.flags;return t[4]=i.isLeading<<6|i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy,zh.box(zh.types.sdtp,t)}static trun(e,t){let i=new Uint8Array(28);t+=36,i.set([0,0,15,1,0,0,0,1,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0);let s=e.duration,r=e.size,a=e.flags,o=e.cts;return i.set([s>>>24&255,s>>>16&255,s>>>8&255,255&s,r>>>24&255,r>>>16&255,r>>>8&255,255&r,a.isLeading<<2|a.dependsOn,a.isDependedOn<<6|a.hasRedundancy<<4|a.isNonSync,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o],12),zh.box(zh.types.trun,i)}static mdat(e){return zh.box(zh.types.mdat,e)}}zh.init();const $h=[44100,48e3,32e3,0],Hh=[22050,24e3,16e3,0],Vh=[11025,12e3,8e3,0],Wh=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],Jh=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],qh=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1];class Kh extends a{constructor(e){super(),this.TAG_NAME="MediaSource",this.player=e,this._resetInIt(),this._useManagedMediaSource="ManagedMediaSource"in self&&!("MediaSource"in self),this.mediaSource=this._useManagedMediaSource?new self.ManagedMediaSource:new self.MediaSource,this.isDecodeFirstIIframe=!!Ao(e._opt.checkFirstIFrame),this.mediaSourceObjectURL=null,this._useManagedMediaSource||(this.mediaSourceObjectURL=window.URL.createObjectURL(this.mediaSource)),this.isSupportVideoFrameCallback=ko(),this.canvasRenderInterval=null,e._opt.mseUseCanvasRender?(this.$videoElement=document.createElement("video"),this._useManagedMediaSource?(this.$videoElement.disableRemotePlayback=!0,this.$videoElement.srcObject=this.mediaSource):this.$videoElement.src=this.mediaSourceObjectURL,this.initVideoEvents()):(this._useManagedMediaSource?(this.player.video.$videoElement.disableRemotePlayback=!0,this.player.video.$videoElement.srcObject=this.mediaSource):this.player.video.$videoElement.src=this.mediaSourceObjectURL,this.$videoElement=this.player.video.$videoElement),this._bindMediaSourceEvents(),this.audioSourceBufferCheckTimeout=null,this.audioSourceNoDataCheckTimeout=null,this.hasPendingEos=!1,this.player.isPlayback()&&this.player.on(lt.playbackPause,(t=>{Ao(t)?(yo(e._opt.checkFirstIFrame)&&(this.player.debug.log(this.TAG_NAME,"playbackPause is false and _opt.checkFirstIFrame is true so set isDecodeFirstIIframe = false"),this.isDecodeFirstIIframe=!1),this.clearUpAllSourceBuffer(),this.$videoElement.play()):(this.$videoElement.pause(),this.cacheTrack={})})),this._useManagedMediaSource?this.player.debug.log(this.TAG_NAME,"init and using ManagedMediaSource"):this.player.debug.log(this.TAG_NAME,"init")}destroy(){this.stop(),this._clearAudioSourceBufferCheckTimeout(),this._clearAudioNoDataCheckTimeout(),this._stopCanvasRender(),this.eventListenList.length&&(this.eventListenList.forEach((e=>e())),this.eventListenList=[]),this.supportVideoFrameCallbackHandle&&this.$videoElement&&(this.$videoElement.cancelVideoFrameCallback(this.supportVideoFrameCallbackHandle),this.supportVideoFrameCallbackHandle=null),this.$videoElement&&(this.player._opt.mseUseCanvasRender&&this.$videoElement.src&&(this.$videoElement.src="",this.$videoElement.removeAttribute("src")),this.$videoElement=null),this.mediaSourceObjectURL&&(window.URL.revokeObjectURL(this.mediaSourceObjectURL),this.mediaSourceObjectURL=null),this._resetInIt(),this.mediaSource=null,this.off(),this.player.debug.log(this.TAG_NAME,"destroy")}needInitAudio(){return this.player._opt.hasAudio&&this.player._opt.mseDecodeAudio}_resetInIt(){this.isAvc=null,this.isAAC=null,this.videoMeta={},this.audioMeta={},this.sourceBuffer=null,this.audioSourceBuffer=null,this.hasInit=!1,this.hasAudioInit=!1,this.isInitInfo=!1,this.isAudioInitInfo=!1,this.audioMimeType="",this.videoMimeType="",this.cacheTrack={},this.cacheAudioTrack={},this.sequenceNumber=0,this.audioSequenceNumber=0,this.firstRenderTime=null,this.firstAudioTime=null,this.$videoElement=null,this.mediaSourceAppendBufferFull=!1,this.mediaSourceAppendBufferError=!1,this.mediaSourceAddSourceBufferError=!1,this.mediaSourceBufferError=!1,this.mediaSourceError=!1,this.prevTimestamp=null,this.decodeDiffTimestamp=null,this.prevDts=null,this.prevAudioDts=null,this.prevPayloadBufferSize=0,this.isWidthOrHeightChanged=!1,this.prevTs=null,this.prevAudioTs=null,this.eventListenList=[],this.pendingRemoveRanges=[],this.pendingSegments=[],this.pendingAudioRemoveRanges=[],this.pendingAudioSegments=[],this.supportVideoFrameCallbackHandle=null}get state(){return this.mediaSource&&this.mediaSource.readyState}get isStateOpen(){return this.state===Ai}get isStateClosed(){return this.state===bi}get isStateEnded(){return this.state===yi}get duration(){return this.mediaSource&&this.mediaSource.duration||-1}set duration(e){this.mediaSource.duration=e}_bindMediaSourceEvents(){const{debug:e,events:{proxy:t}}=this.player,i=t(this.mediaSource,Yi,(()=>{this.player.debug.log(this.TAG_NAME,"sourceOpen"),this._onMediaSourceSourceOpen(),this.player.emit(lt.mseSourceOpen)})),s=t(this.mediaSource,Ki,(()=>{this.player.debug.log(this.TAG_NAME,"sourceClose"),this.player.emit(lt.mseSourceClose)})),r=t(this.mediaSource,Qi,(()=>{this.player.debug.log(this.TAG_NAME,"sourceended"),this.player.emit(lt.mseSourceended)}));this.eventListenList.push(i,s,r);const a=t(this.$videoElement,ss,(e=>{if(Ao(this.isSupportVideoFrameCallback))if(this.player.checkIsInRender())this.player.handleRender();else{const t=parseInt(e.timeStamp,10);this.player.debug.log(this.TAG_NAME,`mseUseCanvasRender is ${this.player._opt.mseUseCanvasRender} and\n $videoElement ts is ${t}, but not in render and vbps is ${this.player._stats.vbps} and fps is ${this.player._stats.fps}`)}}));if(this.eventListenList.push(a),this._useManagedMediaSource){const e=t(this.mediaSource,Xi,(()=>{this.player.debug.log(this.TAG_NAME,"ManagedMediaSource startstreaming"),this.player.emit(lt.mseSourceStartStreaming)})),i=t(this.mediaSource,Zi,(()=>{this.player.debug.log(this.TAG_NAME,"ManagedMediaSource endstreaming"),this.player.emit(lt.mseSourceEndStreaming)})),s=t(this.mediaSource,es,(()=>{this.player.debug.log(this.TAG_NAME,"ManagedMediaSource qualitychange")}));this.eventListenList.push(e,i,s)}}_onMediaSourceSourceOpen(){this.sourceBuffer||(this.player.debug.log("MediaSource","onMediaSourceSourceOpen() sourceBuffer is null and next init"),this._initSourceBuffer()),this.audioSourceBuffer||(this.player.debug.log("MediaSource","onMediaSourceSourceOpen() audioSourceBuffer is null and next init"),this._initAudioSourceBuffer()),this._hasPendingSegments()&&this._doAppendSegments()}initVideoEvents(){const{proxy:e}=this.player.events;this.player.on(lt.visibilityChange,(e=>{e&&setTimeout((()=>{if(this.player.isPlaying()&&this.$videoElement){const e=this.getVideoBufferLastTime();e-this.$videoElement.currentTime>this.getMseBufferMaxDelayTime()&&(this.player.debug.log(this.TAG_NAME,`visibilityChange is true and lastTime is ${e} and currentTime is ${this.$videoElement.currentTime} so set currentTime to lastTime`),this.$videoElement.currentTime=e)}}),300)}));const t=e(this.$videoElement,ts,(()=>{this.player.debug.log(this.TAG_NAME,"video canplay"),this.$videoElement.play().then((()=>{this.player.emit(lt.removeLoadingBgImage),ko()?this.supportVideoFrameCallbackHandle||(this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this))):this.player.isUseHls265()&&(this._stopCanvasRender(),this.canvasRenderInterval=setInterval((()=>{this.player.video.render({$video:this.$videoElement,ts:parseInt(1e3*this.$videoElement.currentTime,10)||0})}),40)),this.player.debug.log(this.TAG_NAME,"video play")})).catch((e=>{this.player.debug.error(this.TAG_NAME,"video play error ",e),this.player.emitError(ut.mediaSourceUseCanvasRenderPlayFailed,e)}))})),i=e(this.$videoElement,is,(()=>{this.player.debug.log(this.TAG_NAME,"video waiting")})),s=e(this.$videoElement,ss,(e=>{parseInt(e.timeStamp,10),this.$videoElement.paused&&(this.player.debug.warn(this.TAG_NAME,"video is paused and next try to replay"),this.$videoElement.play().then((()=>{this.player.debug.log(this.TAG_NAME,"video is paused and replay success")})).catch((e=>{this.player.debug.warn(this.TAG_NAME,"video is paused and replay error ",e)})))})),r=e(this.$videoElement,rs,(()=>{this.player.debug.log(this.TAG_NAME,"video playback Rate change",this.$videoElement&&this.$videoElement.playbackRate),this.$videoElement&&this.$videoElement.paused&&this.player.debug.warn(this.TAG_NAME,"ratechange and video is paused")}));this.eventListenList.push(t,i,s,r)}videoFrameCallback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.player.isDestroyedOrClosed())return void this.player.debug.log(this.TAG_NAME,"videoFrameCallback() player is destroyed");const i=parseInt(1e3*Math.max(t.mediaTime,this.$videoElement.currentTime),10)||0;this.player.handleRender(),this.player.video.render({$video:this.$videoElement,ts:i}),this.player.isUseHls265()&&this.player.updateStats({fps:!0,ts:i}),this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this))}decodeVideo(e,t,i,s){const r=this.player;if(r)if(this.player.isDestroyedOrClosed())this.player.debug.warn(this.TAG_NAME,"decodeVideo() player is destroyed");else if(this.hasInit)if(!this.isDecodeFirstIIframe&&i&&(this.isDecodeFirstIIframe=!0),this.isDecodeFirstIIframe){if(i&&0===e[1]){const t=15&e[0];let i={};if(t===vt){i=Dn(e.slice(5))}else t===wt&&(i=zn(e));const s=this.player.video.videoInfo;s&&s.width&&s.height&&i&&i.codecWidth&&i.codecHeight&&(i.codecWidth!==s.width||i.codecHeight!==s.height)&&(this.player.debug.warn(this.TAG_NAME,`\n decodeVideo: video width or height is changed,\n old width is ${s.width}, old height is ${s.height},\n new width is ${i.codecWidth}, new height is ${i.codecHeight},\n and emit change event`),this.isWidthOrHeightChanged=!0,this.player.emitError(ut.mseWidthOrHeightChange))}if(this.isWidthOrHeightChanged)return void this.player.debug.warn(this.TAG_NAME,"decodeVideo: video width or height is changed, and return");if(go(e))return void this.player.debug.warn(this.TAG_NAME,"decodeVideo and payload is video sequence header so drop this frame");if(e.byteLength<12)return void this.player.debug.warn(this.TAG_NAME,`decodeVideo and payload is too small , payload length is ${e.byteLength}`);let r=t;if(this.player.isPlayer()){if(null===this.firstRenderTime&&(this.firstRenderTime=t),r=t-this.firstRenderTime,r<0&&(this.player.debug.warn(this.TAG_NAME,`decodeVideo\n local dts is < 0 , ts is ${t} and prevTs is ${this.prevTs},\n firstRenderTime is ${this.firstRenderTime} and mseCorrectTimeDuration is ${this.player._opt.mseCorrectTimeDuration}`),r=null===this.prevDts?0:this.prevDts+this.player._opt.mseCorrectTimeDuration,this._checkTsIsMaxDiff(t)))return this.player.debug.warn(this.TAG_NAME,`decodeVideo is max diff , ts is ${t} and prevTs is ${this.prevTs}, diff is ${this.prevTs-t} and emit replay`),void this.player.emitError(ut.mediaSourceTsIsMaxDiff,`decodeVideo is max diff, prevTs is ${this.prevTs} and ts is ${t}`);if(null!==this.prevDts&&r<=this.prevDts){if(this.player.debug.warn(this.TAG_NAME,`\n decodeVideo dts is less than(or equal) prev dts ,\n dts is ${r} and prev dts is ${this.prevDts} ,\n and now ts is ${t} and prev ts is ${this.prevTs} ,\n and diff is ${t-this.prevTs} and firstRenderTime is ${this.firstRenderTime} and isIframe is ${i},\n and mseCorrectTimeDuration is ${this.player._opt.mseCorrectTimeDuration},\n and prevPayloadBufferSize is ${this.prevPayloadBufferSize} and payload size is ${e.byteLength}`),r===this.prevDts&&this.prevPayloadBufferSize===e.byteLength)return void this.player.debug.warn(this.TAG_NAME,"decodeVideo dts is equal to prev dts and payload size is equal to prev payload size so drop this frame");if(r=this.prevDts+this.player._opt.mseCorrectTimeDuration,this._checkTsIsMaxDiff(t))return this.player.debug.warn(this.TAG_NAME,`decodeVideo is max diff , ts is ${t} and prevTs is ${this.prevTs}, diff is ${this.prevTs-t} and emit replay`),void this.emit(ut.mediaSourceTsIsMaxDiff,`decodeVideo is max diff, prevTs is ${this.prevTs} and ts is ${t}`)}}this.player.isPlayer()?this._decodeVideo(e,r,i,s,t):this.player.isPlayback()&&Ao(this.player.playbackPause)&&(this.player.playback.isUseLocalCalculateTime&&this.player.playback.increaseLocalTimestamp(),this._decodeVideo(e,r,i,s,t)),this.prevDts=r,this.prevPayloadBufferSize=e.byteLength,this.prevTs=t}else this.player.debug.log(this.TAG_NAME,"decodeVideo first frame is not iFrame");else if(i&&e[1]===vs){const s=15&e[0];if(r.video.updateVideoInfo({encTypeCode:s}),s===wt&&Ao(La()))return void this.player.emitError(ut.mediaSourceH265NotSupport);r._times.decodeStart||(r._times.decodeStart=ha()),this.hasInit=this._decodeConfigurationRecord(e,t,i,s)}else this.player.debug.warn(this.TAG_NAME,`decodeVideo has not init , isIframe is ${i} , payload is ${e[1]}`)}decodeAudio(e,t){if(this.player)if(this.player.isDestroyedOrClosed())this.player.debug.warn(this.TAG_NAME,"decodeAudio() player is destroyed");else if(Ao(this.hasAudioInit))this.hasAudioInit=this._decodeAudioConfigurationRecord(e,t);else{let i=t;if(Wr(e))return void this.player.debug.log(this.TAG_NAME,"decodeAudio and has already initialized and payload is aac codec packet so drop this frame");if(this._clearAudioNoDataCheckTimeout(),this.isDecodeFirstIIframe){if(this.player.isPlayer()){if(null===this.firstAudioTime&&(this.firstAudioTime=t,null!==this.firstRenderTime&&null!==this.prevTs)){const e=Math.abs(this.firstRenderTime-this.prevTs);e>300&&(this.firstAudioTime-=e,this.player.debug.warn(this.TAG_NAME,`video\n firstAudioTime is ${this.firstRenderTime} and current time is ${this.prevTs}\n play time is ${e} and firstAudioTime ${t} - ${e} = ${this.firstAudioTime}`))}if(i=t-this.firstAudioTime,i<0&&(this.player.debug.warn(this.TAG_NAME,`decodeAudio\n local dts is < 0 , ts is ${t} and prevTs is ${this.prevAudioTs},\n firstAudioTime is ${this.firstAudioTime}`),i=null===this.prevAudioDts?0:this.prevAudioDts+this.player._opt.mseCorrectAudioTimeDuration,this._checkAudioTsIsMaxDiff(t)))return this.player.debug.warn(this.TAG_NAME,`decodeAudio is max diff , ts is ${t} and prevTs is ${this.prevAudioDts}, diff is ${this.prevAudioDts-t} and emit replay`),void this.player.emitError(ut.mediaSourceTsIsMaxDiff,`decodeAudio is max diff, prevTs is ${this.prevAudioDts} and ts is ${t}`);null!==this.prevAudioTs&&i<=this.prevAudioDts&&(this.player.debug.warn(this.TAG_NAME,`\n decodeAudio dts is less than(or equal) prev dts ,\n dts is ${i} and prev dts is ${this.prevAudioDts} ,\n and now ts is ${t} and prev ts is ${this.prevAudioTs} ,\n and diff is ${t-this.prevAudioTs}`),i=this.prevAudioDts+this.player._opt.mseCorrectAudioTimeDuration)}(this.player.isPlayer()||this.player.isPlayback()&&Ao(this.player.playbackPause))&&this._decodeAudio(e,i,t),this.prevAudioTs=t,this.prevAudioDts=i}else this.player.debug.log(this.TAG_NAME,"decodeAudio first frame is not iFrame")}}_checkTsIsMaxDiff(e){return this.prevTs>0&&e<this.prevTs&&this.prevTs-e>Z}_checkAudioTsIsMaxDiff(e){return this.prevAudioTs>0&&e<this.prevAudioTs&&this.prevAudioTs-e>Z}_decodeConfigurationRecord(e,t,i,s){let r=e.slice(5),a={};if(s===vt?a=Dn(r):s===wt&&(a=$n(r)),qa(a)||0===a.codecWidth&&0===a.codecHeight)return this.player.debug.warn(this.TAG_NAME,"_decodeConfigurationRecord",a),this.player.emitError(ut.mediaSourceDecoderConfigurationError),!1;this.player.recorder&&this.player._opt.recordType===S&&this.player.recorder.initMetaData(e,s);const o={id:_r,type:"video",timescale:1e3,duration:0,avcc:r,codecWidth:a.codecWidth,codecHeight:a.codecHeight,videoType:a.videoType},n=zh.generateInitSegment(o);this.isAvc=s===vt;let l=a.codec;return this.videoMimeType=l?`video/mp4; codecs="${a.codec}"`:this.isAvc?ci:ui,this._initSourceBuffer(),this.appendBuffer(n.buffer),this.sequenceNumber=0,this.cacheTrack={},!0}_decodeAudioConfigurationRecord(e,t){const i=e[0]>>4,s=i===kt,r=i===Et;if(Ao(r||s))return this.player.debug.warn(this.TAG_NAME,`_decodeAudioConfigurationRecord audio codec is not support , codecId is ${i} ant auto wasm decode`),this.player.emit(ut.mediaSourceAudioG711NotSupport),!1;const a={id:vr,type:"audio",timescale:1e3};let o={};if(Wr(e)){if(o=function(e){let t=new Uint8Array(e),i=null,s=0,r=0,a=0,o=null;if(s=r=t[0]>>>3,a=(7&t[0])<<1|t[1]>>>7,a<0||a>=Yr.length)return void console.error("Flv: AAC invalid sampling frequency index!");let n=Yr[a],l=(120&t[1])>>>3;if(l<0||l>=8)return void console.log("Flv: AAC invalid channel configuration");5===s&&(o=(7&t[1])<<1|t[2]>>>7,t[2]);let d=self.navigator.userAgent.toLowerCase();return-1!==d.indexOf("firefox")?a>=6?(s=5,i=new Array(4),o=a-3):(s=2,i=new Array(2),o=a):-1!==d.indexOf("android")?(s=2,i=new Array(2),o=a):(s=5,o=a,i=new Array(4),a>=6?o=a-3:1===l&&(s=2,i=new Array(2),o=a)),i[0]=s<<3,i[0]|=(15&a)>>>1,i[1]=(15&a)<<7,i[1]|=(15&l)<<3,5===s&&(i[1]|=(15&o)>>>1,i[2]=(1&o)<<7,i[2]|=8,i[3]=0),{audioType:"aac",config:i,sampleRate:n,channelCount:l,objectType:s,codec:"mp4a.40."+s,originalCodec:"mp4a.40."+r}}(e.slice(2)),!o)return!1;a.audioSampleRate=o.sampleRate,a.channelCount=o.channelCount,a.config=o.config,a.refSampleDuration=1024/a.audioSampleRate*a.timescale}else{if(!s)return!1;if(o=function(e){if(e.length<4)return void console.error("Invalid MP3 packet, header missing!");let t=new Uint8Array(e.buffer),i=null;if(255!==t[0])return void console.error("Invalid MP3 packet, first byte != 0xFF ");let s=t[1]>>>3&3,r=(6&t[1])>>1,a=(240&t[2])>>>4,o=(12&t[2])>>>2,n=3!=(t[3]>>>6&3)?2:1,l=0,d=0;switch(s){case 0:l=Vh[o];break;case 2:l=Hh[o];break;case 3:l=$h[o]}switch(r){case 1:a<qh.length&&(d=qh[a]);break;case 2:a<Jh.length&&(d=Jh[a]);break;case 3:a<Wh.length&&(d=Wh[a])}return i={bitRate:d,samplingRate:l,channelCount:n,codec:"mp3",originalCodec:"mp3",audioType:"mp3"},i}(e),!o)return!1;a.audioSampleRate=o.samplingRate,a.channelCount=o.channelCount,a.refSampleDuration=1152/a.audioSampleRate*a.timescale}a.codec=o.codec,a.duration=0;let n="mp4",l=o.codec,d=null;s&&Ao(_a())?(n="mpeg",l="",d=new Uint8Array):d=zh.generateInitSegment(a);let h=`${a.type}/${n}`;return l&&l.length>0&&(h+=`;codecs=${l}`),Ao(this.isAudioInitInfo)&&(this.player.audio.updateAudioInfo({encTypeCode:i,channels:a.channelCount,sampleRate:a.audioSampleRate}),this.isAudioInitInfo=!0),this.audioMimeType=h,this.isAAC=r,this._initAudioSourceBuffer(),this.appendAudioBuffer(d.buffer),!0}_initSourceBuffer(){const{debug:e,events:{proxy:t}}=this.player;if(null===this.sourceBuffer&&null!==this.mediaSource&&this.isStateOpen&&this.videoMimeType){try{this.sourceBuffer=this.mediaSource.addSourceBuffer(this.videoMimeType),e.log(this.TAG_NAME,"_initSourceBuffer() this.mediaSource.addSourceBuffer()",this.videoMimeType)}catch(t){return e.error(this.TAG_NAME,"appendBuffer() this.mediaSource.addSourceBuffer()",t.code,t),this.player.emitError(ut.mseAddSourceBufferError,t),void(this.mediaSourceAddSourceBufferError=!0)}if(this.sourceBuffer){const i=t(this.sourceBuffer,"error",(t=>{this.mediaSourceBufferError=!0,e.error(this.TAG_NAME,"mseSourceBufferError this.sourceBuffer",t),this.player.emitError(ut.mseSourceBufferError,t)})),s=t(this.sourceBuffer,"updateend",(()=>{this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this.hasPendingEos&&(this.player.debug.log(this.TAG_NAME,"videoSourceBuffer updateend and hasPendingEos is true, next endOfStream()"),this.endOfStream())}));this.eventListenList.push(i,s)}}else e.log(this.TAG_NAME,`_initSourceBuffer and this.isStateOpen is ${this.isStateOpen} and this.isAvc === null is ${null===this.isAvc}`)}_initAudioSourceBuffer(){const{debug:e,events:{proxy:t}}=this.player;if(null===this.audioSourceBuffer&&null!==this.mediaSource&&this.isStateOpen&&this.audioMimeType){try{this.audioSourceBuffer=this.mediaSource.addSourceBuffer(this.audioMimeType),this._clearAudioSourceBufferCheckTimeout(),e.log(this.TAG_NAME,"_initAudioSourceBuffer() this.mediaSource.addSourceBuffer()",this.audioMimeType)}catch(t){return e.error(this.TAG_NAME,"appendAudioBuffer() this.mediaSource.addSourceBuffer()",t.code,t),this.player.emitError(ut.mseAddSourceBufferError,t),void(this.mediaSourceAddSourceBufferError=!0)}if(this.audioSourceBuffer){const i=t(this.audioSourceBuffer,"error",(t=>{this.mediaSourceBufferError=!0,e.error(this.TAG_NAME,"mseSourceBufferError this.audioSourceBuffer",t),this.player.emitError(ut.mseSourceBufferError,t)})),s=t(this.audioSourceBuffer,"updateend",(()=>{this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this.hasPendingEos&&(this.player.debug.log(this.TAG_NAME,"audioSourceBuffer updateend and hasPendingEos is true, next endOfStream()"),this.endOfStream())}));this.eventListenList.push(i,s),null===this.audioSourceNoDataCheckTimeout&&(this.audioSourceNoDataCheckTimeout=setTimeout((()=>{this._clearAudioNoDataCheckTimeout(),this.player.emit(ut.mediaSourceAudioNoDataTimeout)}),1e3))}}else e.log(this.TAG_NAME,`_initAudioSourceBuffer and this.isStateOpen is ${this.isStateOpen} and this.audioMimeType is ${this.audioMimeType}`)}_decodeVideo(e,t,i,s,r){const a=this.player;let o=e.slice(5),n=o.byteLength;if(0===n)return void a.debug.warn(this.TAG_NAME,"_decodeVideo payload bytes is 0 and return");let l=(new Date).getTime(),d=!1;this.prevTimestamp||(this.prevTimestamp=l,d=!0);const h=l-this.prevTimestamp;this.decodeDiffTimestamp=h,h>500&&!d&&this.player.isPlayer()&&a.debug.warn(this.TAG_NAME,`_decodeVideo now time is ${l} and prev time is ${this.prevTimestamp}, diff time is ${h} ms`);const c=this.$videoElement;if(this.cacheTrack.id&&t>=this.cacheTrack.dts){let e=8+this.cacheTrack.size,i=new Uint8Array(e);i[0]=e>>>24&255,i[1]=e>>>16&255,i[2]=e>>>8&255,i[3]=255&e,i.set(zh.types.mdat,4),i.set(this.cacheTrack.data,8),this.cacheTrack.duration=t-this.cacheTrack.dts;let s=zh.moof(this.cacheTrack,this.cacheTrack.dts);this.cacheTrack={};let o=new Uint8Array(s.byteLength+i.byteLength);o.set(s,0),o.set(i,s.byteLength),this.appendBuffer(o.buffer),a.emit(lt.timeUpdate,r),a.isPlayer()?a.isUseHls265()?a.updateStats({dfps:!0,mseTs:t}):a.updateStats({fps:!0,dfps:!0,ts:r,mseTs:t}):a.isPlayback()&&a.playback.updateStats({ts:r}),a._times.videoStart||(a._times.videoStart=ha(),a.handlePlayToRenderTimes())}else a.debug.log(this.TAG_NAME,`cacheTrack = {} now dts is ${t}, and ts is ${r} cacheTrack dts is ${this.cacheTrack&&this.cacheTrack.dts}`),this.cacheTrack={};this.cacheTrack||(this.cacheTrack={}),this.cacheTrack.id=_r,this.cacheTrack.sequenceNumber=++this.sequenceNumber,this.cacheTrack.size=n,this.cacheTrack.dts=t,this.cacheTrack.cts=s,this.cacheTrack.isKeyframe=i,this.cacheTrack.data=o,this.cacheTrack.flags={isLeading:0,dependsOn:i?2:1,isDependedOn:i?1:0,hasRedundancy:0,isNonSync:i?0:1},!this.isInitInfo&&c.videoWidth>0&&c.videoHeight>0&&(a.debug.log(this.TAG_NAME,`updateVideoInfo: ${c.videoWidth},${c.videoHeight}`),a.video.updateVideoInfo({width:c.videoWidth,height:c.videoHeight}),a.video.initCanvasViewSize(),this.isInitInfo=!0),a._opt.mseUseCanvasRender&&Ao(this.isSupportVideoFrameCallback)&&Ao(a.isUseHls265())&&a.video.render({$video:c,ts:t}),this.prevTimestamp=(new Date).getTime()}_stopCanvasRender(){this.canvasRenderInterval&&(clearInterval(this.canvasRenderInterval),this.canvasRenderInterval=null)}_decodeAudio(e,t,i){const s=this.player;let r=this.isAAC?e.slice(2):e.slice(1),a=r.byteLength;if(this.cacheAudioTrack.id&&t>=this.cacheAudioTrack.dts){let e=8+this.cacheAudioTrack.size,i=new Uint8Array(e);i[0]=e>>>24&255,i[1]=e>>>16&255,i[2]=e>>>8&255,i[3]=255&e,i.set(zh.types.mdat,4),i.set(this.cacheAudioTrack.data,8),this.cacheAudioTrack.duration=t-this.cacheAudioTrack.dts;let s=zh.moof(this.cacheAudioTrack,this.cacheAudioTrack.dts);this.cacheAudioTrack={};let r=new Uint8Array(s.byteLength+i.byteLength);r.set(s,0),r.set(i,s.byteLength),this.appendAudioBuffer(r.buffer)}else s.debug.log(this.TAG_NAME,`cacheAudioTrack = {} now dts is ${t} cacheAudioTrack dts is ${this.cacheAudioTrack&&this.cacheAudioTrack.dts}`),this.cacheAudioTrack={};this.cacheAudioTrack||(this.cacheAudioTrack={}),this.cacheAudioTrack.id=vr,this.cacheAudioTrack.sequenceNumber=++this.audioSequenceNumber,this.cacheAudioTrack.size=a,this.cacheAudioTrack.dts=t,this.cacheAudioTrack.cts=0,this.cacheAudioTrack.data=r,this.cacheAudioTrack.flags={isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}appendBuffer(e){if(this.player.isDestroyedOrClosed())return void this.player.debug.warn(this.TAG_NAME,"appendBuffer() player is destroyed");const{debug:t,events:{proxy:i}}=this.player;this.mediaSourceAddSourceBufferError?t.warn(this.TAG_NAME,"appendBuffer() this.mediaSourceAddSourceBufferError is true"):this.mediaSourceAppendBufferFull?t.warn(this.TAG_NAME,"appendBuffer() this.mediaSourceAppendBufferFull is true"):this.mediaSourceAppendBufferError?t.warn(this.TAG_NAME,"appendBuffer() this.mediaSourceAppendBufferError is true"):this.mediaSourceBufferError?t.warn(this.TAG_NAME,"appendBuffer() this.mediaSourceBufferError is true"):(this.pendingSegments.push(e),this.sourceBuffer&&(this.player.isPlayer()&&this._handleUpdatePlaybackRate(),this.player.isPlayback()&&(this._handleUpdateBufferDelayTime(),this._checkVideoPlayCurrentTime()),this.player._opt.mseAutoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanUpSourceBuffer(),Ao(this.getSourceBufferUpdating())&&this.isStateOpen&&Ao(this._hasPendingRemoveRanges()))?this._doAppendSegments():this.isStateClosed?(this.mediaSourceBufferError=!0,this.player.emitError(ut.mseSourceBufferError,"mediaSource is not attached to video or mediaSource is closed")):this.isStateEnded?(this.mediaSourceBufferError=!0,this.player.emitError(ut.mseSourceBufferError,"mediaSource is end")):this._hasPendingRemoveRanges()&&t.log(this.TAG_NAME,`video has pending remove ranges and video length is ${this.pendingRemoveRanges.length}, audio length is ${this.pendingAudioRemoveRanges.length}`))}appendAudioBuffer(e){if(this.player.isDestroyedOrClosed())return void this.player.debug.warn(this.TAG_NAME,"appendAudioBuffer() player is destroyed");const{debug:t,events:{proxy:i}}=this.player;this.mediaSourceAddSourceBufferError?t.warn(this.TAG_NAME,"appendAudioBuffer() this.mediaSourceAddSourceBufferError is true"):this.mediaSourceAppendBufferFull?t.warn(this.TAG_NAME,"appendAudioBuffer() this.mediaSourceAppendBufferFull is true"):this.mediaSourceAppendBufferError?t.warn(this.TAG_NAME,"appendAudioBuffer() this.mediaSourceAppendBufferError is true"):this.mediaSourceBufferError?t.warn(this.TAG_NAME,"appendAudioBuffer() this.mediaSourceBufferError is true"):(this.pendingAudioSegments.push(e),this.audioSourceBuffer&&(this.player.isPlayer()&&this._handleUpdatePlaybackRate(),this.player.isPlayback()&&(this._handleUpdateBufferDelayTime(),this._checkVideoPlayCurrentTime()),this.player._opt.mseAutoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanUpSourceBuffer(),Ao(this.getAudioSourceBufferUpdating())&&this.isStateOpen&&Ao(this._hasPendingRemoveRanges()))?this._doAppendSegments():this.isStateClosed?(this.mediaSourceBufferError=!0,this.player.emitError(ut.mseSourceBufferError,"mediaSource is not attached to video or mediaSource is closed")):this.isStateEnded?(this.mediaSourceBufferError=!0,this.player.emitError(ut.mseSourceBufferError,"mediaSource is end")):this._hasPendingRemoveRanges()&&t.log(this.TAG_NAME,`audio has pending remove ranges and video length is ${this.pendingRemoveRanges.length}, audio length is ${this.pendingAudioRemoveRanges.length}`))}getSourceBufferUpdating(){return this.sourceBuffer&&this.sourceBuffer.updating}getAudioSourceBufferUpdating(){return this.audioSourceBuffer&&this.audioSourceBuffer.updating}stop(){this.abortSourceBuffer(),this.removeSourceBuffer(),this.endOfStream()}checkSourceBufferDelay(){const e=this.$videoElement;let t=0,i=0;return e.buffered.length>0&&(i=e.buffered.end(e.buffered.length-1),t=i-e.currentTime),t<0&&(this.player.debug.warn(this.TAG_NAME,`checkMSESourceBufferDelay ${t} < 0, and buffered is ${i} ,currentTime is ${e.currentTime} , try to seek ${e.currentTime} to ${i}`),e.currentTime=i,t=0),t}checkSourceBufferStore(){const e=this.$videoElement;let t=0;return e.buffered.length>0&&(t=e.currentTime-e.buffered.start(0)),t}getDecodeDiffTimes(){return this.decodeDiffTimestamp}removeBuffer(e,t){const i=eo();if(this.player.debug.log(this.TAG_NAME,`removeBuffer() start is ${e} and end is ${t} and _isMacOsFirefox is ${i}`),this.isStateOpen&&Ao(i)){if(Ao(this.getSourceBufferUpdating()))try{this.sourceBuffer.remove(e,t)}catch(e){this.player.debug.warn(this.TAG_NAME,"removeBuffer() sourceBuffer error",e)}if(Ao(this.getAudioSourceBufferUpdating()))try{this.audioSourceBuffer.remove(e,t)}catch(e){this.player.debug.warn(this.TAG_NAME,"removeBuffer() audioSourceBuffer error",e)}}}clearUpAllSourceBuffer(){if(this.sourceBuffer){const e=this.sourceBuffer.buffered;for(let t=0;t<e.length;t++){let i=e.start(t),s=e.end(t);this.pendingRemoveRanges.push({start:i,end:s})}Ao(this.getSourceBufferUpdating())&&this._doRemoveRanges()}if(this.audioSourceBuffer){const e=this.audioSourceBuffer.buffered;for(let t=0;t<e.length;t++){let i=e.start(t),s=e.end(t);this.pendingAudioRemoveRanges.push({start:i,end:s})}Ao(this.getAudioSourceBufferUpdating())&&this._doRemoveRanges()}}endOfStream(){if(this.isStateOpen&&this.$videoElement&&this.$videoElement.readyState>=1)if(this.getSourceBufferUpdating()||this.getAudioSourceBufferUpdating())this.hasPendingEos=!0;else{this.hasPendingEos=!1;try{this.player.debug.log(this.TAG_NAME,"endOfStream()"),this.mediaSource.endOfStream()}catch(e){this.player.debug.warn(this.TAG_NAME,"endOfStream() error",e)}}}abortSourceBuffer(){if(this.isStateOpen){if(this.sourceBuffer){try{this.player.debug.log(this.TAG_NAME,"abortSourceBuffer() abort sourceBuffer"),this.sourceBuffer.abort()}catch(e){}Ao(this.getSourceBufferUpdating())&&this._doRemoveRanges()}if(this.audioSourceBuffer){try{this.player.debug.log(this.TAG_NAME,"abortSourceBuffer() abort audioSourceBuffer"),this.audioSourceBuffer.abort()}catch(e){}Ao(this.getAudioSourceBufferUpdating())&&this._doRemoveRanges()}}this.sourceBuffer=null,this.audioSourceBuffer=null}removeSourceBuffer(){if(!this.isStateClosed&&this.mediaSource){if(this.sourceBuffer)try{this.player.debug.log(this.TAG_NAME,"removeSourceBuffer() sourceBuffer"),this.mediaSource.removeSourceBuffer(this.sourceBuffer)}catch(e){this.player.debug.error(this.TAG_NAME,"removeSourceBuffer() sourceBuffer error",e)}if(this.audioSourceBuffer)try{this.player.debug.log(this.TAG_NAME,"removeSourceBuffer() audioSourceBuffer"),this.mediaSource.removeSourceBuffer(this.audioSourceBuffer)}catch(e){this.player.debug.error(this.TAG_NAME,"removeSourceBuffer() audioSourceBuffer error",e)}}}_hasPendingSegments(){return this.pendingSegments.length>0||this.pendingAudioSegments.length>0}getPendingSegmentsLength(){return this.pendingSegments.length}_handleUpdatePlaybackRate(){if(!this.$videoElement)return;const e=this.$videoElement;this.player._opt.videoBuffer,this.player._opt.videoBufferDelay;const t=e.buffered;t.length&&t.start(0);const i=t.length?t.end(t.length-1):0;let s=e.currentTime;const r=i-s,a=this.getMseBufferMaxDelayTime();if(this.player.updateStats({mseVideoBufferDelayTime:r}),r>a)this.player.debug.log(this.TAG_NAME,`handleUpdatePlaybackRate and buffered is ${i} and current is ${s} , delay buffer is more than ${a} is ${r} and new time is ${i}`),e.currentTime=i,s=e.currentTime;else if(r<0){if(this.player.debug.warn(this.TAG_NAME,`handleUpdatePlaybackRate and delay buffer is ${i} - current is ${s} = ${r} < 0 and check video is paused : ${e.paused} `),0===i)return void this.player.emit(ut.mediaSourceBufferedIsZeroError,"video.buffered is empty");e.paused&&e.play()}const o=this._getPlaybackRate(i-s);e.playbackRate!==o&&(this.player.debug.log(this.TAG_NAME,`handleUpdatePlaybackRate and buffered is ${i} and current time is ${s} and delay is ${i-s} set playbackRate is ${o} `),e.playbackRate=o)}_handleUpdateBufferDelayTime(){const e=this.getVideoBufferDelayTime();this.player.updateStats({mseVideoBufferDelayTime:e})}_checkVideoPlayCurrentTime(){const e=this.checkSourceBufferStore();if(e<0){const t=this.getVideoBufferStartTime();this.player.debug.warn(this.TAG_NAME,`checkVideoPlayCurrentTime store is ${e} < 0 and set currentTime ${this.$videoElement.currentTime} to ${t}`),this.$videoElement.currentTime=t}}_doAppendSegments(){if(this.isStateClosed||this.isStateEnded)this.player.debug.log(this.TAG_NAME,"_doAppendSegments() mediaSource is closed or ended and return");else if(null!==this.sourceBuffer){if(this.needInitAudio()&&null===this.audioSourceBuffer)return this.player.debug.log(this.TAG_NAME,"_doAppendSegments() audioSourceBuffer is null and need init audio source buffer"),void(null===this.audioSourceBufferCheckTimeout&&(this.audioSourceBufferCheckTimeout=setTimeout((()=>{this._clearAudioSourceBufferCheckTimeout(),this.player.emit(ut.mediaSourceAudioInitTimeout)}),1e3)));if(Ao(this.getSourceBufferUpdating())&&this.pendingSegments.length>0){const e=this.pendingSegments.shift();try{this.sourceBuffer.appendBuffer(e)}catch(e){this.player.debug.error(this.TAG_NAME,"this.sourceBuffer.appendBuffer()",e.code,e),22===e.code?(this.stop(),this.mediaSourceAppendBufferFull=!0,this.player.emitError(ut.mediaSourceFull)):11===e.code?(this.stop(),this.mediaSourceAppendBufferError=!0,this.player.emitError(ut.mediaSourceAppendBufferError)):(this.stop(),this.mediaSourceBufferError=!0,this.player.emitError(lt.mseSourceBufferError,e))}}if(Ao(this.getAudioSourceBufferUpdating())&&this.pendingAudioSegments.length>0){const e=this.pendingAudioSegments.shift();try{this.audioSourceBuffer.appendBuffer(e)}catch(e){this.player.debug.error(this.TAG_NAME,"this.audioSourceBuffer.appendBuffer()",e.code,e),22===e.code?(this.stop(),this.mediaSourceAppendBufferFull=!0,this.player.emitError(ut.mediaSourceFull)):11===e.code?(this.stop(),this.mediaSourceAppendBufferError=!0,this.player.emitError(ut.mediaSourceAppendBufferError)):(this.stop(),this.mediaSourceBufferError=!0,this.player.emitError(lt.mseSourceBufferError,e))}}}else this.player.debug.log(this.TAG_NAME,"_doAppendSegments() sourceBuffer is null and wait init and return")}_doCleanUpSourceBuffer(){if(!this.$videoElement)return;const e=this.$videoElement.currentTime;if(this.sourceBuffer){const t=this.sourceBuffer.buffered;let i=!1;for(let s=0;s<t.length;s++){let r=t.start(s),a=t.end(s);if(r<=e&&e<a+3){if(e-r>=this.player._opt.mseAutoCleanupMaxBackwardDuration){i=!0;let t=e-this.player._opt.mseAutoCleanupMinBackwardDuration;this.pendingRemoveRanges.push({start:r,end:t})}}else a<e&&(i=!0,this.pendingRemoveRanges.push({start:r,end:a}))}i&&Ao(this.getSourceBufferUpdating())&&this._doRemoveRanges()}if(this.audioSourceBuffer){const t=this.audioSourceBuffer.buffered;let i=!1;for(let s=0;s<t.length;s++){let r=t.start(s),a=t.end(s);if(r<=e&&e<a+3){if(e-r>=this.player._opt.mseAutoCleanupMaxBackwardDuration){i=!0;let t=e-this.player._opt.mseAutoCleanupMinBackwardDuration;this.pendingAudioRemoveRanges.push({start:r,end:t})}}else a<e&&(i=!0,this.pendingAudioRemoveRanges.push({start:r,end:a}))}i&&Ao(this.getAudioSourceBufferUpdating())&&this._doRemoveRanges()}}_hasPendingRemoveRanges(){return this.pendingRemoveRanges.length>0||this.pendingAudioRemoveRanges.length>0}_doRemoveRanges(){if(this.sourceBuffer&&Ao(this.getSourceBufferUpdating())){let e=this.pendingRemoveRanges;for(;e.length&&Ao(this.getSourceBufferUpdating());){let t=e.shift();try{this.sourceBuffer.remove(t.start,t.end)}catch(e){this.player.debug.warn(this.TAG_NAME,"_doRemoveRanges() sourceBuffer error",e)}}}if(this.audioSourceBuffer&&Ao(this.getAudioSourceBufferUpdating())){let e=this.pendingAudioRemoveRanges;for(;e.length&&Ao(this.getAudioSourceBufferUpdating());){let t=e.shift();try{this.audioSourceBuffer.remove(t.start,t.end)}catch(e){this.player.debug.warn(this.TAG_NAME,"_doRemoveRanges() audioSourceBuffer error",e)}}}}getDecodePlaybackRate(){let e=0;const t=this.$videoElement;return t&&(e=t.playbackRate),e}_getPlaybackRate(e){const t=this.$videoElement;let i=this.player._opt.videoBufferDelay+this.player._opt.videoBuffer;const s=Math.max(i,1e3),r=s/2;return e*=1e3,1===t.playbackRate?e>s?1.2:1:e<=r?1:t.playbackRate}_needCleanupSourceBuffer(){if(Ao(this.player._opt.mseAutoCleanupSourceBuffer)||!this.$videoElement)return!1;const e=this.$videoElement,t=e.buffered,i=e.currentTime;return t.length>=1&&i-t.start(0)>=this.player._opt.mseAutoCleanupMaxBackwardDuration}getVideoCurrentTime(){let e=0;return this.$videoElement&&(e=this.$videoElement.currentTime),e}getVideoBufferLastTime(){const e=this.$videoElement;let t=0;if(e){const i=e.buffered;i.length&&i.start(0);t=i.length?i.end(i.length-1):0}return t}getVideoBufferStartTime(){const e=this.$videoElement;let t=0;if(e){const i=e.buffered;t=i.length?i.start(0):0}return t}getVideoBufferDelayTime(){const e=this.$videoElement;const t=this.getVideoBufferLastTime()-e.currentTime;return t>0?t:0}_clearAudioSourceBufferCheckTimeout(){this.audioSourceBufferCheckTimeout&&(clearTimeout(this.audioSourceBufferCheckTimeout),this.audioSourceBufferCheckTimeout=null)}_clearAudioNoDataCheckTimeout(){this.audioSourceNoDataCheckTimeout&&(clearTimeout(this.audioSourceNoDataCheckTimeout),this.audioSourceNoDataCheckTimeout=null)}getMimeType(){return{video:this.videoMimeType,audio:this.audioMimeType}}getMseBufferMaxDelayTime(){let e=(this.player._opt.videoBuffer+this.player._opt.videoBufferDelay)/1e3;return Math.max(5,e+3)}}const Yh=()=>"wakeLock"in navigator&&-1===window.navigator.userAgent.indexOf("Samsung")&&Ao(wa());class Qh{constructor(e){this.player=e,this.enabled=!1,Yh()?(this.player.debug.log("NoSleep","Native Wake Lock API supported."),this._wakeLock=null,this.handleVisibilityChange=()=>{null!==this._wakeLock&&"visible"===document.visibilityState&&this.enable()},document.addEventListener("visibilitychange",this.handleVisibilityChange),document.addEventListener("fullscreenchange",this.handleVisibilityChange)):(this.player.debug.log("NoSleep","Native Wake Lock API not supported. so use video element."),this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm","data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQRChYECGFOAZwEAAAAAABLfEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHYTbuMU6uEElTDZ1OsggGXTbuMU6uEHFO7a1OsghLJ7AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmsirXsYMPQkBNgI1MYXZmNTguNDUuMTAwV0GNTGF2ZjU4LjQ1LjEwMESJiECzmgAAAAAAFlSua0C5rgEAAAAAAABO14EBc8WI9UhIq9EDJPCcgQAitZyDdW5khoVWX1ZQOIOBASPjg4QF9eEA4AEAAAAAAAAbsIIBQLqB8FSwggElVLqB8FWwiFW3gQFVuIECrgEAAAAAAABZ14ECc8WIUEWPA9J/iJ6cgQAitZyDdW5khoZBX09QVVNWqoNjLqBWu4QExLQAg4EC4ZGfgQG1iEDncAAAAAAAYmSBIGOik09wdXNIZWFkAQE4AYC7AAAAAAASVMNnQcJzcwEAAAAAAACXY8CAZ8gBAAAAAAAAFUWji01BSk9SX0JSQU5ERIeEaXNvbWfIAQAAAAAAABZFo41NSU5PUl9WRVJTSU9ORIeDNTEyZ8gBAAAAAAAAJ0WjkUNPTVBBVElCTEVfQlJBTkRTRIeQaXNvbWlzbzJhdmMxbXA0MWfIAQAAAAAAABpFo4dFTkNPREVSRIeNTGF2ZjU4LjQ1LjEwMHNzAQAAAAAAAIZjwItjxYj1SEir0QMk8GfIAQAAAAAAAB5Fo4xIQU5ETEVSX05BTUVEh4xWaWRlb0hhbmRsZXJnyAEAAAAAAAAhRaOHRU5DT0RFUkSHlExhdmM1OC45MS4xMDAgbGlidnB4Z8iiRaOIRFVSQVRJ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wDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggJtgPj//qOHggKBgPj//qOHggKVgPj//qOHggKpgPj//qOHggK9gPj//qOegQLDANECAAUQEBRgAGFgv9AAIgAQzX61yT5xzAAAo4eCAtGA+P/+o4eCAuWA+P/+o4eCAvmA+P/+o4eCAw2A+P/+o4eCAyGA+P/+o56BAycA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IDNYD4//6jh4IDSYD4//6jh4IDXYD4//6jh4IDcYD4//6jh4IDhYD4//6jnoEDiwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggOZgPj//qOHggOtgPj//qOHggPBgPj//qOHggPVgPj//qOHggPpgPj//qOegQPvANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCA/2A+P/+o4eCBBGA+P/+o4eCBCWA+P/+o4eCBDmA+P/+o4eCBE2A+P/+o56BBFMA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IEiID4//6jh4IEnID4//6jh4IEsID4//6jnoEEtwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggTEgPj//qOHggTYgPj//qOHggTsgPj//qOHggUAgPj//qOHggUUgPj//qOegQUbANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCBSiA+P/+o4eCBTyA+P/+o4eCBVCA+P/+o4eCBWSA+P/+o4eCBXiA+P/+o56BBX8A0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IFjID4//6jh4IFoID4//6jh4IFtID4//6jh4IFyID4//6jh4IF3ID4//6jnoEF4wDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggXwgPj//qOHggYEgPj//qOHggYYgPj//qOHggYsgPj//qOHggZAgPj//qOegQZHANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCBlSA+P/+o4eCBmiA+P/+o4eCBnyA+P/+o4eCBpCA+P/+o4eCBqSA+P/+o56BBqsA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IGuID4//6jh4IGzID4//6jh4IG4ID4//6jh4IG9ID4//6jh4IHCID4//6jnoEHDwDRAgAFEBAUYABhYL/QACIAEM1+tck+ccwAAKOHggccgPj//qOHggcwgPj//qOHggdEgPj//qOHggdYgPj//qOHggdsgPj//qOegQdzANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCB4CA+P/+o4eCB5SA+P/+o4eCB6iA+P/+o4eCB7yA+P/+o4eCB9CA+P/+o56BB9cA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IH5ID4//6jh4IH+ID4//6jh4IIDID4//6jh4IIIID4//6jh4IINID4//6jnoEIOwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHgghIgPj//qOHgghcgPj//qOHgghwgPj//qOHggiEgPj//qOegQifANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCCMCA+P/+o4eCCNSA+P/+o4eCCOiA+P/+o4eCCPyA+P/+o56BCQMA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IJEID4//6jh4IJJID4//6jh4IJOID4//6jh4IJTID4//6jh4IJYID4//6jnoEJZwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggl0gPj//qOHggmIgPj//qOHggmcgPj//qOHggmwgPj//qOHggnEgPj//qOegQnLANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCCdiA+P/+o4eCCeyA+P/+o4eCCgCA+P/+o4eCChSA+P/+o4eCCiiA+P/+o56BCi8A0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IKPID4//6jh4IKUID4//6jh4IKZID4//6jh4IKeID4//6jh4IKjID4//6jnoEKkwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggqggPj//qOHggq0gPj//qOHggrIgPj//qOHggrcgPj//qOHggrwgPj//qOegQr3ANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCCwSA+P/+o4eCCxiA+P/+o4eCCyyA+P/+o4eCC0CA+P/+o4eCC1SA+P/+o56BC1sA0QIABRAQFGAAYWC/0AAiABDNfrXJPnHMAACjh4ILaID4//6jh4ILfID4//6jh4ILkID4//6jh4ILpID4//6jh4ILuID4//6jnoELvwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggvMgPj//qOHggvggPj//qOHggv0gPj//qOHggwIgPj//qOHggwcgPj//qOegQwjANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCDDCA+P/+o4eCDESA+P/+o4eCDFiA+P/+o4eCDGyA+P/+o4eCDICA+P/+o56BDIcA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IMlID4//6jh4IMqID4//6jh4IMvID4//6jh4IM0ID4//6jnoEM6wDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHgg0MgPj//qOHgg0ggPj//qOHgg00gPj//qOHgg1IgPj//qOegQ1PANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCDVyA+P/+o4eCDXCA+P/+o4eCDYSA+P/+o4eCDZiA+P/+o4eCDayA+P/+o56BDbMA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4INwID4//6jh4IN1ID4//6jh4IN6ID4//6jh4IN/ID4//6jh4IOEID4//6jnoEOFwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHgg4kgPj//qOHgg44gPj//qOHgg5MgPj//qOHgg5ggPj//qOHgg50gPj//qOegQ57ANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCDoiA+P/+o4eCDpyA+P/+o4eCDrCA+P/+o4eCDsSA+P/+o4eCDtiA+P/+o56BDt8A0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IO7ID4//6jh4IPAID4//6jh4IPFID4//6jh4IPKID4//6jh4IPPID4//6jnoEPQwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHgg9QgPj//qOHgg9kgPj//qOHgg94gPj//qOHgg+MgPj//qOHgg+ggPj//qOegQ+nANECAAUQEBRgAGFgv9AAIgAQzX61yT5xzAAAo4eCD7SA+P/+o4eCD8iA+P/+o4eCD9yA+P/+o4eCD/CA+P/+o4eCEASA+P/+o56BEAsA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IQGID4//6jh4IQLID4//6jh4IQQID4//6jh4IQVID4//6jh4IQaID4//6jnoEQbwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHghB8gPj//qOHghCQgPj//qOHghCkgPj//qOHghC4gPj//qOHghDMgPj//qOegRDTANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCEOCA+P/+o4eCEPSA+P/+o4eCEQiA+P/+o56BETcA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IRQ4D4//6jh4IRV4D4//6jh4IRa4D4//6jh4IRf4D4//6jh4IRk4D4//6jnoERmwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHghGngPj//qOHghG7gPj//qOHghHPgPj//qOHghHjgPj//qOHghH3gPj//qOegRH/ANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCEguA+P/+o4eCEh+A+P/+o4eCEjOA+P/+o4eCEkeA+P/+o4eCEluA+P/+o56BEmMA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4ISb4D4//6jh4ISg4D4//6jh4ISl4D4//6jh4ISq4D4//6jh4ISv4D4//6jnoESxwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHghLTgPj//qOHghLngPj//qOHghL7gPj//qOHghMPgPj//qOHghMjgPj//qOegRMrANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCEzeA+P/+o4eCE0uA+P/+o4eCE1+A+P/+o4eCE3OA+P/+oAEAAAAAAAAPoYeCE4cA+P/+daKDB/KBHFO7a5G7j7OBB7eK94EB8YIDX/CBDA=="),this._addSourceToVideo(this.noSleepVideo,"mp4","data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACORtZGF03gIATGF2YzU4LjM1LjEwMAACMEAOAAACcQYF//9t3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE2MSByMzAyNyA0MTIxMjc3IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAyMCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTAgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0xIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MCBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0tMiB0aHJlYWRzPTcgbG9va2FoZWFkX3RocmVhZHM9MSBzbGljZWRfdGhyZWFkcz0wIG5yPTAgZGVjaW1hdGU9MSBpbnRlcmxhY2VkPTAgYmx1cmF5X2NvbXBhdD0wIGNvbnN0cmFpbmVkX2ludHJhPTAgYmZyYW1lcz0wIHdlaWdodHA9MCBrZXlpbnQ9MjUwIGtleWludF9taW49MTAgc2NlbmVjdXQ9NDAgaW50cmFfcmVmcmVzaD0wIHJjX2xvb2thaGVhZD00MCByYz1jcmYgbWJ0cmVlPTEgY3JmPTIzLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IGlwX3JhdGlvPTEuNDAgYXE9MToxLjAwAIAAAADvZYiED/JigADD7JycnJycnJycnJycnJycnJycnJ11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111114BGCAHARggBwEYIAcBGCAHARggBwAAAAdBmj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EAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAA3HN0Y28AAAAAAAAAMwAAADAAAAOtAAADzAAAA+cAAAQCAAAEIQAABDwAAARXAAAEdgAABJEAAASsAAAEywAABOIAAAT5AAAFGAAABTMAAAVOAAAFbQAABYgAAAWjAAAFwgAABd0AAAX4AAAGDwAABioAAAZFAAAGZAAABn8AAAaaAAAGuQAABtQAAAbvAAAHDgAABykAAAc8AAAHWwAAB3YAAAeRAAAHsAAAB8sAAAfmAAAIBQAACCAAAAg7AAAIWgAACG0AAAiIAAAIpwAACMIAAAjdAAAI/AAAABpzZ3BkAQAAAHJvbGwAAAACAAAAAf//AAAAHHNiZ3AAAAAAcm9sbAAAAAEAAADSAAAAAQAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTguMjAuMTAw"),Object.assign(this.noSleepVideo.style,{position:"absolute",left:"-100%",top:"-100%"}),document.querySelector("body").append(this.noSleepVideo),this.handleNoSleepVideoTimeUpdate=()=>{this.noSleepVideo&&this.noSleepVideo.currentTime>4&&(this.noSleepVideo.currentTime=1)},this.noSleepVideo.addEventListener("timeupdate",this.handleNoSleepVideoTimeUpdate))}destroy(){if(this._wakeLock&&(this._wakeLock.release(),this._wakeLock=null),this.noSleepVideo){this.handleNoSleepVideoTimeUpdate&&this.noSleepVideo.removeEventListener("timeupdate",this.handleNoSleepVideoTimeUpdate);try{this.noSleepVideo.parentNode&&this.noSleepVideo.parentNode.removeChild(this.noSleepVideo)}catch(e){this.player.debug.warn("NoSleep","Failed to remove noSleepVideo element.")}this.noSleepVideo=null}this.handleVisibilityChange&&(document.removeEventListener("visibilitychange",this.handleVisibilityChange),document.removeEventListener("fullscreenchange",this.handleVisibilityChange))}_addSourceToVideo(e,t,i){var s=document.createElement("source");s.src=i,s.type=`video/${t}`,e.appendChild(s)}get isEnabled(){return this.enabled}enable(){const e=this.player.debug;if(Yh())return navigator.wakeLock.request("screen").then((t=>{this._wakeLock=t,this.enabled=!0,e.log("wakeLock","Wake Lock active."),this._wakeLock.addEventListener("release",(()=>{e.log("wakeLock","Wake Lock released.")}))})).catch((t=>{throw this.enabled=!1,e.warn("wakeLock",`${t.name}, ${t.message}`),t}));return this.noSleepVideo.play().then((t=>(e.log("wakeLock","noSleepVideo Wake Lock active."),this.enabled=!0,t))).catch((t=>{throw e.warn("wakeLock",`noSleepVideo ${t.name}, ${t.message}`),this.enabled=!1,t}))}disable(){Yh()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):this.noSleepVideo&&this.noSleepVideo.pause(),this.enabled=!1,this.player.debug.log("wakeLock","Disabling wake lock.")}}function Xh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Zh={exports:{}};!function(e,t){var i,s,r,a,o;i=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,s=/^(?=([^\/?#]*))\1([^]*)$/,r=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(e,t,i){if(i=i||{},e=e.trim(),!(t=t.trim())){if(!i.alwaysNormalize)return e;var r=o.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=o.normalizePath(r.path),o.buildURLFromParts(r)}var a=o.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return i.alwaysNormalize?(a.path=o.normalizePath(a.path),o.buildURLFromParts(a)):t;var n=o.parseURL(e);if(!n)throw new Error("Error trying to parse base URL.");if(!n.netLoc&&n.path&&"/"!==n.path[0]){var l=s.exec(n.path);n.netLoc=l[1],n.path=l[2]}n.netLoc&&!n.path&&(n.path="/");var d={scheme:n.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(d.netLoc=n.netLoc,"/"!==a.path[0]))if(a.path){var h=n.path,c=h.substring(0,h.lastIndexOf("/")+1)+a.path;d.path=o.normalizePath(c)}else d.path=n.path,a.params||(d.params=n.params,a.query||(d.query=n.query));return null===d.path&&(d.path=i.alwaysNormalize?o.normalizePath(a.path):a.path),o.buildURLFromParts(d)},parseURL:function(e){var t=i.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(r,"");e.length!==(e=e.replace(a,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=o}(Zh);var ec=Zh.exports;function tc(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,s)}return i}function ic(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?tc(Object(i),!0).forEach((function(t){rc(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):tc(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function sc(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var s=i.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function rc(e,t,i){return(t=sc(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function ac(){return ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},ac.apply(this,arguments)}const oc=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},nc=Number.isSafeInteger||function(e){return"number"==typeof e&&Math.abs(e)<=lc},lc=Number.MAX_SAFE_INTEGER||9007199254740991;let dc=function(e){return e.MEDIA_ATTACHING="hlsMediaAttaching",e.MEDIA_ATTACHED="hlsMediaAttached",e.MEDIA_DETACHING="hlsMediaDetaching",e.MEDIA_DETACHED="hlsMediaDetached",e.BUFFER_RESET="hlsBufferReset",e.BUFFER_CODECS="hlsBufferCodecs",e.BUFFER_CREATED="hlsBufferCreated",e.BUFFER_APPENDING="hlsBufferAppending",e.BUFFER_APPENDED="hlsBufferAppended",e.BUFFER_EOS="hlsBufferEos",e.BUFFER_FLUSHING="hlsBufferFlushing",e.BUFFER_FLUSHED="hlsBufferFlushed",e.MANIFEST_LOADING="hlsManifestLoading",e.MANIFEST_LOADED="hlsManifestLoaded",e.MANIFEST_PARSED="hlsManifestParsed",e.LEVEL_SWITCHING="hlsLevelSwitching",e.LEVEL_SWITCHED="hlsLevelSwitched",e.LEVEL_LOADING="hlsLevelLoading",e.LEVEL_LOADED="hlsLevelLoaded",e.LEVEL_UPDATED="hlsLevelUpdated",e.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",e.LEVELS_UPDATED="hlsLevelsUpdated",e.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",e.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",e.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",e.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",e.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",e.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",e.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",e.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",e.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",e.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",e.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",e.CUES_PARSED="hlsCuesParsed",e.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",e.INIT_PTS_FOUND="hlsInitPtsFound",e.FRAG_LOADING="hlsFragLoading",e.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",e.FRAG_LOADED="hlsFragLoaded",e.FRAG_DECRYPTED="hlsFragDecrypted",e.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",e.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",e.FRAG_PARSING_METADATA="hlsFragParsingMetadata",e.FRAG_PARSED="hlsFragParsed",e.FRAG_BUFFERED="hlsFragBuffered",e.FRAG_CHANGED="hlsFragChanged",e.FPS_DROP="hlsFpsDrop",e.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",e.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",e.ERROR="hlsError",e.DESTROYING="hlsDestroying",e.KEY_LOADING="hlsKeyLoading",e.KEY_LOADED="hlsKeyLoaded",e.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",e.BACK_BUFFER_REACHED="hlsBackBufferReached",e.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",e}({}),hc=function(e){return e.NETWORK_ERROR="networkError",e.MEDIA_ERROR="mediaError",e.KEY_SYSTEM_ERROR="keySystemError",e.MUX_ERROR="muxError",e.OTHER_ERROR="otherError",e}({}),cc=function(e){return e.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",e.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",e.KEY_SYSTEM_NO_SESSION="keySystemNoSession",e.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",e.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",e.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",e.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",e.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",e.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",e.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",e.MANIFEST_LOAD_ERROR="manifestLoadError",e.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",e.MANIFEST_PARSING_ERROR="manifestParsingError",e.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",e.LEVEL_EMPTY_ERROR="levelEmptyError",e.LEVEL_LOAD_ERROR="levelLoadError",e.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",e.LEVEL_PARSING_ERROR="levelParsingError",e.LEVEL_SWITCH_ERROR="levelSwitchError",e.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",e.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",e.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",e.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",e.FRAG_LOAD_ERROR="fragLoadError",e.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",e.FRAG_DECRYPT_ERROR="fragDecryptError",e.FRAG_PARSING_ERROR="fragParsingError",e.FRAG_GAP="fragGap",e.REMUX_ALLOC_ERROR="remuxAllocError",e.KEY_LOAD_ERROR="keyLoadError",e.KEY_LOAD_TIMEOUT="keyLoadTimeOut",e.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",e.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",e.BUFFER_APPEND_ERROR="bufferAppendError",e.BUFFER_APPENDING_ERROR="bufferAppendingError",e.BUFFER_STALLED_ERROR="bufferStalledError",e.BUFFER_FULL_ERROR="bufferFullError",e.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",e.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",e.INTERNAL_EXCEPTION="internalException",e.INTERNAL_ABORTED="aborted",e.UNKNOWN="unknown",e}({});const uc=function(){},pc={trace:uc,debug:uc,log:uc,warn:uc,info:uc,error:uc};let fc=pc;function mc(e,...t){t.forEach((function(t){fc[t]=e[t]?e[t].bind(e):function(e){const t=self.console[e];return t?t.bind(self.console,`[${e}] >`):uc}(t)}))}const gc=fc,yc=/^(\d+)x(\d+)$/,Ac=/(.+?)=(".*?"|.*?)(?:,|$)/g;class bc{constructor(e){"string"==typeof e&&(e=bc.parseAttrList(e)),ac(this,e)}get clientAttrs(){return Object.keys(this).filter((e=>"X-"===e.substring(0,2)))}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;const i=new Uint8Array(t.length/2);for(let e=0;e<t.length/2;e++)i[e]=parseInt(t.slice(2*e,2*e+2),16);return i}return null}hexadecimalIntegerAsNumber(e){const t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const i=this[e];return i?parseFloat(i):t}enumeratedString(e){return this[e]}bool(e){return"YES"===this[e]}decimalResolution(e){const t=yc.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e){let t;const i={};for(Ac.lastIndex=0;null!==(t=Ac.exec(e));){let e=t[2];0===e.indexOf('"')&&e.lastIndexOf('"')===e.length-1&&(e=e.slice(1,-1));i[t[1].trim()]=e}return i}}function _c(e){return"SCTE35-OUT"===e||"SCTE35-IN"===e}class vc{constructor(e,t){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,t){const i=t.attr;for(const t in i)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==i[t]){gc.warn(`DATERANGE tag attribute: "${t}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=t;break}e=ac(new bc({}),i,e)}if(this.attr=e,this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const e=new Date(this.attr["END-DATE"]);oc(e.getTime())&&(this._endDate=e)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get startDate(){return this._startDate}get endDate(){if(this._endDate)return this._endDate;const e=this.duration;return null!==e?new Date(this._startDate.getTime()+1e3*e):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(oc(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isValid(){return!!this.id&&!this._badValueForSameId&&oc(this.startDate.getTime())&&(null===this.duration||this.duration>=0)&&(!this.endOnNext||!!this.class)}}class wc{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var Sc="audio",Tc="video",Ec="audiovideo";class kc{constructor(e){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[Sc]:null,[Tc]:null,[Ec]:null},this.baseurl=e}setByteRange(e,t){const i=e.split("@",2);let s;s=1===i.length?(null==t?void 0:t.byteRangeEndOffset)||0:parseInt(i[1]),this._byteRange=[s,parseInt(i[0])+s]}get byteRange(){return this._byteRange?this._byteRange:[]}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=ec.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}}class Cc extends kc{constructor(e,t){super(t),this._decryptdata=null,this.rawProgramDateTime=null,this.programDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.stats=new wc,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const e=this.levelkeys.identity;if(e)this._decryptdata=e.getDecryptData(this.sn);else{const e=Object.keys(this.levelkeys);if(1===e.length)return this._decryptdata=this.levelkeys[e[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(null===this.programDateTime)return null;if(!oc(this.programDateTime))return null;const e=oc(this.duration)?this.duration:0;return this.programDateTime+1e3*e}get encrypted(){var e;if(null!=(e=this._decryptdata)&&e.encrypted)return!0;if(this.levelkeys){const e=Object.keys(this.levelkeys),t=e.length;if(t>1||1===t&&this.levelkeys[e[0]].encrypted)return!0}return!1}setKeyFormat(e){if(this.levelkeys){const t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}}abortRequests(){var e,t;null==(e=this.loader)||e.abort(),null==(t=this.keyLoader)||t.abort()}setElementaryStreamInfo(e,t,i,s,r,a=!1){const{elementaryStreams:o}=this,n=o[e];n?(n.startPTS=Math.min(n.startPTS,t),n.endPTS=Math.max(n.endPTS,i),n.startDTS=Math.min(n.startDTS,s),n.endDTS=Math.max(n.endDTS,r)):o[e]={startPTS:t,endPTS:i,startDTS:s,endDTS:r,partial:a}}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[Sc]=null,e[Tc]=null,e[Ec]=null}}class xc extends kc{constructor(e,t,i,s,r){super(i),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.stats=new wc,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=s;const a=e.enumeratedString("BYTERANGE");a&&this.setByteRange(a,r),r&&(this.fragOffset=r.fragOffset+r.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}class Rc{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e)return this.advanced=!0,void(this.updated=!0);const t=this.lastPartSn-e.lastPartSn,i=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!i||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||0===t&&i>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay}get hasProgramDateTime(){return!!this.fragments.length&&oc(this.fragments[this.fragments.length-1].programDateTime)}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||10}get drift(){const e=this.driftEndTime-this.driftStartTime;if(e>0){return 1e3*(this.driftEnd-this.driftStart)/e}return 1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){var e;return null!=(e=this.fragments)&&e.length?this.fragments[this.fragments.length-1].end:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].index:-1}get lastPartSn(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}function Dc(e){return Uint8Array.from(atob(e),(e=>e.charCodeAt(0)))}function Lc(e){const t=e.split(":");let i=null;if("data"===t[0]&&2===t.length){const e=t[1].split(";"),s=e[e.length-1].split(",");if(2===s.length){const t="base64"===s[0],r=s[1];t?(e.splice(-1,1),i=Dc(r)):i=function(e){const t=Ic(e).subarray(0,16),i=new Uint8Array(16);return i.set(t,16-t.length),i}(r)}}return i}function Ic(e){return Uint8Array.from(unescape(encodeURIComponent(e)),(e=>e.charCodeAt(0)))}const Pc="undefined"!=typeof self?self:void 0;var Bc={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},Mc="org.w3.clearkey",Uc="com.apple.streamingkeydelivery",Fc="com.microsoft.playready",Oc="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";function Nc(e){switch(e){case Uc:return Bc.FAIRPLAY;case Fc:return Bc.PLAYREADY;case Oc:return Bc.WIDEVINE;case Mc:return Bc.CLEARKEY}}var jc="edef8ba979d64acea3c827dcd51d21ed";function Gc(e){switch(e){case Bc.FAIRPLAY:return Uc;case Bc.PLAYREADY:return Fc;case Bc.WIDEVINE:return Oc;case Bc.CLEARKEY:return Mc}}function zc(e){const{drmSystems:t,widevineLicenseUrl:i}=e,s=t?[Bc.FAIRPLAY,Bc.WIDEVINE,Bc.PLAYREADY,Bc.CLEARKEY].filter((e=>!!t[e])):[];return!s[Bc.WIDEVINE]&&i&&s.push(Bc.WIDEVINE),s}const $c=null!=Pc&&null!=(Hc=Pc.navigator)&&Hc.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null;var Hc;function Vc(e,t,i){return Uint8Array.prototype.slice?e.slice(t,i):new Uint8Array(Array.prototype.slice.call(e,t,i))}const Wc=(e,t)=>t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128,Jc=(e,t)=>t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128,qc=(e,t)=>{const i=t;let s=0;for(;Wc(e,t);){s+=10;s+=Kc(e,t+6),Jc(e,t+10)&&(s+=10),t+=s}if(s>0)return e.subarray(i,i+s)},Kc=(e,t)=>{let i=0;return i=(127&e[t])<<21,i|=(127&e[t+1])<<14,i|=(127&e[t+2])<<7,i|=127&e[t+3],i},Yc=(e,t)=>Wc(e,t)&&Kc(e,t+6)+10<=e.length-t,Qc=e=>{const t=eu(e);for(let e=0;e<t.length;e++){const i=t[e];if(Xc(i))return au(i)}},Xc=e=>e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info,Zc=e=>{const t=String.fromCharCode(e[0],e[1],e[2],e[3]),i=Kc(e,4);return{type:t,size:i,data:e.subarray(10,10+i)}},eu=e=>{let t=0;const i=[];for(;Wc(e,t);){const s=Kc(e,t+6);t+=10;const r=t+s;for(;t+8<r;){const s=Zc(e.subarray(t)),r=tu(s);r&&i.push(r),t+=s.size+10}Jc(e,t)&&(t+=10)}return i},tu=e=>"PRIV"===e.type?iu(e):"W"===e.type[0]?ru(e):su(e),iu=e=>{if(e.size<2)return;const t=ou(e.data,!0),i=new Uint8Array(e.data.subarray(t.length+1));return{key:e.type,info:t,data:i.buffer}},su=e=>{if(e.size<2)return;if("TXXX"===e.type){let t=1;const i=ou(e.data.subarray(t),!0);t+=i.length+1;const s=ou(e.data.subarray(t));return{key:e.type,info:i,data:s}}const t=ou(e.data.subarray(1));return{key:e.type,data:t}},ru=e=>{if("WXXX"===e.type){if(e.size<2)return;let t=1;const i=ou(e.data.subarray(t),!0);t+=i.length+1;const s=ou(e.data.subarray(t));return{key:e.type,info:i,data:s}}const t=ou(e.data);return{key:e.type,data:t}},au=e=>{if(8===e.data.byteLength){const t=new Uint8Array(e.data),i=1&t[3];let s=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return s/=45,i&&(s+=47721858.84),Math.round(s)}},ou=(e,t=!1)=>{const i=lu();if(i){const s=i.decode(e);if(t){const e=s.indexOf("\0");return-1!==e?s.substring(0,e):s}return s.replace(/\0/g,"")}const s=e.length;let r,a,o,n="",l=0;for(;l<s;){if(r=e[l++],0===r&&t)return n;if(0!==r&&3!==r)switch(r>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:n+=String.fromCharCode(r);break;case 12:case 13:a=e[l++],n+=String.fromCharCode((31&r)<<6|63&a);break;case 14:a=e[l++],o=e[l++],n+=String.fromCharCode((15&r)<<12|(63&a)<<6|(63&o)<<0)}}return n};let nu;function lu(){if(!navigator.userAgent.includes("PlayStation 4"))return nu||void 0===self.TextDecoder||(nu=new self.TextDecoder("utf-8")),nu}const du=function(e){let t="";for(let i=0;i<e.length;i++){let s=e[i].toString(16);s.length<2&&(s="0"+s),t+=s}return t},hu=Math.pow(2,32)-1,cu=[].push,uu={video:1,audio:2,id3:3,text:4};function pu(e){return String.fromCharCode.apply(null,e)}function fu(e,t){const i=e[t]<<8|e[t+1];return i<0?65536+i:i}function mu(e,t){const i=yu(e,t);return i<0?4294967296+i:i}function gu(e,t){let i=mu(e,t);return i*=Math.pow(2,32),i+=mu(e,t+4),i}function yu(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function Au(e,t,i){e[t]=i>>24,e[t+1]=i>>16&255,e[t+2]=i>>8&255,e[t+3]=255&i}function bu(e,t){const i=[];if(!t.length)return i;const s=e.byteLength;for(let r=0;r<s;){const a=mu(e,r),o=a>1?r+a:s;if(pu(e.subarray(r+4,r+8))===t[0])if(1===t.length)i.push(e.subarray(r+8,o));else{const s=bu(e.subarray(r+8,o),t.slice(1));s.length&&cu.apply(i,s)}r=o}return i}function _u(e){const t=[],i=e[0];let s=8;const r=mu(e,s);s+=4;let a=0,o=0;0===i?(a=mu(e,s),o=mu(e,s+4),s+=8):(a=gu(e,s),o=gu(e,s+8),s+=16),s+=2;let n=e.length+o;const l=fu(e,s);s+=2;for(let i=0;i<l;i++){let i=s;const a=mu(e,i);i+=4;const o=2147483647&a;if(1===(2147483648&a)>>>31)return gc.warn("SIDX has hierarchical references (not supported)"),null;const l=mu(e,i);i+=4,t.push({referenceSize:o,subsegmentDuration:l,info:{duration:l/r,start:n,end:n+o-1}}),n+=o,i+=4,s=i}return{earliestPresentationTime:a,timescale:r,version:i,referencesCount:l,references:t}}function vu(e){const t=[],i=bu(e,["moov","trak"]);for(let e=0;e<i.length;e++){const s=i[e],r=bu(s,["tkhd"])[0];if(r){let e=r[0];const i=mu(r,0===e?12:20),a=bu(s,["mdia","mdhd"])[0];if(a){e=a[0];const r=mu(a,0===e?12:20),o=bu(s,["mdia","hdlr"])[0];if(o){const e=pu(o.subarray(8,12)),a={soun:Sc,vide:Tc}[e];if(a){const e=wu(bu(s,["mdia","minf","stbl","stsd"])[0]);t[i]={timescale:r,type:a},t[a]=ic({timescale:r,id:i},e)}}}}}return bu(e,["moov","mvex","trex"]).forEach((e=>{const i=mu(e,4),s=t[i];s&&(s.default={duration:mu(e,12),flags:mu(e,20)})})),t}function wu(e){const t=e.subarray(8),i=t.subarray(86),s=pu(t.subarray(4,8));let r=s;const a="enca"===s||"encv"===s;if(a){const e=bu(t,[s])[0];bu(e.subarray("enca"===s?28:78),["sinf"]).forEach((e=>{const t=bu(e,["schm"])[0];if(t){const i=pu(t.subarray(4,8));if("cbcs"===i||"cenc"===i){const t=bu(e,["frma"])[0];t&&(r=pu(t))}}}))}switch(r){case"avc1":case"avc2":case"avc3":case"avc4":{const e=bu(i,["avcC"])[0];r+="."+Tu(e[1])+Tu(e[2])+Tu(e[3]);break}case"mp4a":{const e=bu(t,[s])[0],i=bu(e.subarray(28),["esds"])[0];if(i&&i.length>12){let e=4;if(3!==i[e++])break;e=Su(i,e),e+=2;const t=i[e++];if(128&t&&(e+=2),64&t&&(e+=i[e++]),4!==i[e++])break;e=Su(i,e);const s=i[e++];if(64!==s)break;if(r+="."+Tu(s),e+=12,5!==i[e++])break;e=Su(i,e);const a=i[e++];let o=(248&a)>>3;31===o&&(o+=1+((7&a)<<3)+((224&i[e])>>5)),r+="."+o}break}case"hvc1":case"hev1":{const e=bu(i,["hvcC"])[0],t=e[1],s=["","A","B","C"][t>>6],a=31&t,o=mu(e,2),n=(32&t)>>5?"H":"L",l=e[12],d=e.subarray(6,12);r+="."+s+a,r+="."+o.toString(16).toUpperCase(),r+="."+n+l;let h="";for(let e=d.length;e--;){const t=d[e];if(t||h){h="."+t.toString(16).toUpperCase()+h}}r+=h;break}case"dvh1":case"dvhe":{const e=bu(i,["dvcC"])[0],t=e[2]>>1&127,s=e[2]<<5&32|e[3]>>3&31;r+="."+Eu(t)+"."+Eu(s);break}case"vp09":{const e=bu(i,["vpcC"])[0],t=e[4],s=e[5],a=e[6]>>4&15;r+="."+Eu(t)+"."+Eu(s)+"."+Eu(a);break}case"av01":{const e=bu(i,["av1C"])[0],t=e[1]>>>5,s=31&e[1],a=e[2]>>>7?"H":"M",o=(64&e[2])>>6,n=(32&e[2])>>5,l=2===t&&o?n?12:10:o?10:8,d=(16&e[2])>>4,h=(8&e[2])>>3,c=(4&e[2])>>2,u=3&e[2],p=1,f=1,m=1,g=0;r+="."+t+"."+Eu(s)+a+"."+Eu(l)+"."+d+"."+h+c+u+"."+Eu(p)+"."+Eu(f)+"."+Eu(m)+"."+g;break}}return{codec:r,encrypted:a}}function Su(e,t){const i=t+5;for(;128&e[t++]&&t<i;);return t}function Tu(e){return("0"+e.toString(16).toUpperCase()).slice(-2)}function Eu(e){return(e<10?"0":"")+e}function ku(e){const t=bu(e,["schm"])[0];if(t){const i=pu(t.subarray(4,8));if("cbcs"===i||"cenc"===i)return bu(e,["schi","tenc"])[0]}return gc.error("[eme] missing 'schm' box"),null}function Cu(e){const t=mu(e,0);let i=8;1&t&&(i+=4),4&t&&(i+=4);let s=0;const r=mu(e,4);for(let a=0;a<r;a++){if(256&t){s+=mu(e,i),i+=4}512&t&&(i+=4),1024&t&&(i+=4),2048&t&&(i+=4)}return s}function xu(e,t){const i=new Uint8Array(e.length+t.length);return i.set(e),i.set(t,e.length),i}function Ru(e,t){const i=[],s=t.samples,r=t.timescale,a=t.id;let o=!1;return bu(s,["moof"]).map((n=>{const l=n.byteOffset-8;bu(n,["traf"]).map((n=>{const d=bu(n,["tfdt"]).map((e=>{const t=e[0];let i=mu(e,4);return 1===t&&(i*=Math.pow(2,32),i+=mu(e,8)),i/r}))[0];return void 0!==d&&(e=d),bu(n,["tfhd"]).map((d=>{const h=mu(d,4),c=16777215&mu(d,0);let u=0;const p=0!=(16&c);let f=0;const m=0!=(32&c);let g=8;h===a&&(0!=(1&c)&&(g+=8),0!=(2&c)&&(g+=4),0!=(8&c)&&(u=mu(d,g),g+=4),p&&(f=mu(d,g),g+=4),m&&(g+=4),"video"===t.type&&(o=function(e){if(!e)return!1;const t=e.indexOf("."),i=t<0?e:e.substring(0,t);return"hvc1"===i||"hev1"===i||"dvh1"===i||"dvhe"===i}(t.codec)),bu(n,["trun"]).map((a=>{const n=a[0],d=16777215&mu(a,0),h=0!=(1&d);let c=0;const p=0!=(4&d),m=0!=(256&d);let g=0;const y=0!=(512&d);let A=0;const b=0!=(1024&d),_=0!=(2048&d);let v=0;const w=mu(a,4);let S=8;h&&(c=mu(a,S),S+=4),p&&(S+=4);let T=c+l;for(let l=0;l<w;l++){if(m?(g=mu(a,S),S+=4):g=u,y?(A=mu(a,S),S+=4):A=f,b&&(S+=4),_&&(v=0===n?mu(a,S):yu(a,S),S+=4),t.type===Tc){let t=0;for(;t<A;){const a=mu(s,T);if(T+=4,Du(o,s[T])){Lu(s.subarray(T,T+a),o?2:1,e+v/r,i)}T+=a,t+=a+4}}e+=g/r}})))}))}))})),i}function Du(e,t){if(e){const e=t>>1&63;return 39===e||40===e}return 6===(31&t)}function Lu(e,t,i,s){const r=Iu(e);let a=0;a+=t;let o=0,n=0,l=0;for(;a<r.length;){o=0;do{if(a>=r.length)break;l=r[a++],o+=l}while(255===l);n=0;do{if(a>=r.length)break;l=r[a++],n+=l}while(255===l);const e=r.length-a;let t=a;if(n<e)a+=n;else if(n>e){gc.error(`Malformed SEI payload. ${n} is too small, only ${e} bytes left to parse.`);break}if(4===o){if(181===r[t++]){const e=fu(r,t);if(t+=2,49===e){const e=mu(r,t);if(t+=4,1195456820===e){const e=r[t++];if(3===e){const a=r[t++],n=31&a,l=64&a,d=l?2+3*n:0,h=new Uint8Array(d);if(l){h[0]=a;for(let e=1;e<d;e++)h[e]=r[t++]}s.push({type:e,payloadType:o,pts:i,bytes:h})}}}}}else if(5===o&&n>16){const e=[];for(let i=0;i<16;i++){const s=r[t++].toString(16);e.push(1==s.length?"0"+s:s),3!==i&&5!==i&&7!==i&&9!==i||e.push("-")}const a=n-16,l=new Uint8Array(a);for(let e=0;e<a;e++)l[e]=r[t++];s.push({payloadType:o,pts:i,uuid:e.join(""),userData:ou(l),userDataBytes:l})}}}function Iu(e){const t=e.byteLength,i=[];let s=1;for(;s<t-2;)0===e[s]&&0===e[s+1]&&3===e[s+2]?(i.push(s+2),s+=2):s++;if(0===i.length)return e;const r=t-i.length,a=new Uint8Array(r);let o=0;for(s=0;s<r;o++,s++)o===i[0]&&(o++,i.shift()),a[s]=e[o];return a}function Pu(e,t,i){if(16!==e.byteLength)throw new RangeError("Invalid system id");let s,r,a;if(t){s=1,r=new Uint8Array(16*t.length);for(let e=0;e<t.length;e++){const i=t[e];if(16!==i.byteLength)throw new RangeError("Invalid key");r.set(i,16*e)}}else s=0,r=new Uint8Array;s>0?(a=new Uint8Array(4),t.length>0&&new DataView(a.buffer).setUint32(0,t.length,!1)):a=new Uint8Array;const o=new Uint8Array(4);return i&&i.byteLength>0&&new DataView(o.buffer).setUint32(0,i.byteLength,!1),function(e,...t){const i=t.length;let s=8,r=i;for(;r--;)s+=t[r].byteLength;const a=new Uint8Array(s);for(a[0]=s>>24&255,a[1]=s>>16&255,a[2]=s>>8&255,a[3]=255&s,a.set(e,4),r=0,s=8;r<i;r++)a.set(t[r],s),s+=t[r].byteLength;return a}([112,115,115,104],new Uint8Array([s,0,0,0]),e,a,r,o,i||new Uint8Array)}let Bu={};class Mu{static clearKeyUriToKeyIdMap(){Bu={}}constructor(e,t,i,s=[1],r=null){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=i,this.keyFormatVersions=s,this.iv=r,this.encrypted=!!e&&"NONE"!==e,this.isCommonEncryption=this.encrypted&&"AES-128"!==e}isSupported(){if(this.method){if("AES-128"===this.method||"NONE"===this.method)return!0;if("identity"===this.keyFormat)return"SAMPLE-AES"===this.method;switch(this.keyFormat){case Uc:case Oc:case Fc:case Mc:return-1!==["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)}}return!1}getDecryptData(e){if(!this.encrypted||!this.uri)return null;if("AES-128"===this.method&&this.uri&&!this.iv){"number"!=typeof e&&("AES-128"!==this.method||this.iv||gc.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const t=function(e){const t=new Uint8Array(16);for(let i=12;i<16;i++)t[i]=e>>8*(15-i)&255;return t}(e);return new Mu(this.method,this.uri,"identity",this.keyFormatVersions,t)}const t=Lc(this.uri);if(t)switch(this.keyFormat){case Oc:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case Fc:{const e=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=Pu(e,null,t);const i=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2),s=String.fromCharCode.apply(null,Array.from(i)),r=s.substring(s.indexOf("<"),s.length),a=(new DOMParser).parseFromString(r,"text/xml").getElementsByTagName("KID")[0];if(a){const e=a.childNodes[0]?a.childNodes[0].nodeValue:a.getAttribute("VALUE");if(e){const t=Dc(e).subarray(0,16);!function(e){const t=function(e,t,i){const s=e[t];e[t]=e[i],e[i]=s};t(e,0,3),t(e,1,2),t(e,4,5),t(e,6,7)}(t),this.keyId=t}}break}default:{let e=t.subarray(0,16);if(16!==e.length){const t=new Uint8Array(16);t.set(e,16-e.length),e=t}this.keyId=e;break}}if(!this.keyId||16!==this.keyId.byteLength){let e=Bu[this.uri];if(!e){const t=Object.keys(Bu).length%Number.MAX_SAFE_INTEGER;e=new Uint8Array(16);new DataView(e.buffer,12,4).setUint32(0,t),Bu[this.uri]=e}this.keyId=e}return this}}const Uu=/\{\$([a-zA-Z0-9-_]+)\}/g;function Fu(e){return Uu.test(e)}function Ou(e,t,i){if(null!==e.variableList||e.hasVariableRefs)for(let s=i.length;s--;){const r=i[s],a=t[r];a&&(t[r]=Nu(e,a))}}function Nu(e,t){if(null!==e.variableList||e.hasVariableRefs){const i=e.variableList;return t.replace(Uu,(t=>{const s=t.substring(2,t.length-1),r=null==i?void 0:i[s];return void 0===r?(e.playlistParsingError||(e.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${s}"`)),t):r}))}return t}function ju(e,t,i){let s,r,a=e.variableList;if(a||(e.variableList=a={}),"QUERYPARAM"in t){s=t.QUERYPARAM;try{const e=new self.URL(i).searchParams;if(!e.has(s))throw new Error(`"${s}" does not match any query parameter in URI: "${i}"`);r=e.get(s)}catch(t){e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${t.message}`))}}else s=t.NAME,r=t.VALUE;s in a?e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${s}"`)):a[s]=r||""}function Gu(e,t,i){const s=t.IMPORT;if(i&&s in i){let t=e.variableList;t||(e.variableList=t={}),t[s]=i[s]}else e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${s}"`))}function zu(e=!0){if("undefined"==typeof self)return;return(e||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}const $u={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function Hu(e,t,i=!0){return!e.split(",").some((e=>!Vu(e,t,i)))}function Vu(e,t,i=!0){var s;const r=zu(i);return null!=(s=null==r?void 0:r.isTypeSupported(Wu(e,t)))&&s}function Wu(e,t){return`${t}/mp4;codecs="${e}"`}function Ju(e){if(e){const t=e.substring(0,4);return $u.video[t]}return 2}function qu(e){return e.split(",").reduce(((e,t)=>{const i=$u.video[t];return i?(2*i+e)/(e?3:2):($u.audio[t]+e)/(e?2:1)}),0)}const Ku={};const Yu=/flac|opus/i;function Qu(e,t=!0){return e.replace(Yu,(e=>function(e,t=!0){if(Ku[e])return Ku[e];const i={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"]}[e];for(let s=0;s<i.length;s++)if(Vu(i[s],"audio",t))return Ku[e]=i[s],i[s];return e}(e.toLowerCase(),t)))}function Xu(e,t){return e&&"mp4a"!==e?e:t}const Zu=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,ep=/#EXT-X-MEDIA:(.*)/g,tp=/^#EXT(?:INF|-X-TARGETDURATION):/m,ip=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),sp=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class rp{static findGroup(e,t){for(let i=0;i<e.length;i++){const s=e[i];if(s.id===t)return s}}static resolve(e,t){return ec.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return tp.test(e)}static parseMasterPlaylist(e,t){const i={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:Fu(e)},s=[];let r;for(Zu.lastIndex=0;null!=(r=Zu.exec(e));)if(r[1]){var a;const e=new bc(r[1]);Ou(i,e,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);const o=Nu(i,r[2]),n={attrs:e,bitrate:e.decimalInteger("BANDWIDTH")||e.decimalInteger("AVERAGE-BANDWIDTH"),name:e.NAME,url:rp.resolve(o,t)},l=e.decimalResolution("RESOLUTION");l&&(n.width=l.width,n.height=l.height),np(e.CODECS,n),null!=(a=n.unknownCodecs)&&a.length||s.push(n),i.levels.push(n)}else if(r[3]){const e=r[3],s=r[4];switch(e){case"SESSION-DATA":{const e=new bc(s);Ou(i,e,["DATA-ID","LANGUAGE","VALUE","URI"]);const t=e["DATA-ID"];t&&(null===i.sessionData&&(i.sessionData={}),i.sessionData[t]=e);break}case"SESSION-KEY":{const e=ap(s,t,i);e.encrypted&&e.isSupported()?(null===i.sessionKeys&&(i.sessionKeys=[]),i.sessionKeys.push(e)):gc.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${s}"`);break}case"DEFINE":{const e=new bc(s);Ou(i,e,["NAME","VALUE","QUERYPARAM"]),ju(i,e,t)}break;case"CONTENT-STEERING":{const e=new bc(s);Ou(i,e,["SERVER-URI","PATHWAY-ID"]),i.contentSteering={uri:rp.resolve(e["SERVER-URI"],t),pathwayId:e["PATHWAY-ID"]||"."};break}case"START":i.startTimeOffset=op(s)}}const o=s.length>0&&s.length<i.levels.length;return i.levels=o?s:i.levels,0===i.levels.length&&(i.playlistParsingError=new Error("no levels found in manifest")),i}static parseMasterPlaylistMedia(e,t,i){let s;const r={},a=i.levels,o={AUDIO:a.map((e=>({id:e.attrs.AUDIO,audioCodec:e.audioCodec}))),SUBTITLES:a.map((e=>({id:e.attrs.SUBTITLES,textCodec:e.textCodec}))),"CLOSED-CAPTIONS":[]};let n=0;for(ep.lastIndex=0;null!==(s=ep.exec(e));){const e=new bc(s[1]),a=e.TYPE;if(a){const s=o[a],l=r[a]||[];r[a]=l,Ou(i,e,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const d=e.LANGUAGE,h=e["ASSOC-LANGUAGE"],c=e.CHANNELS,u=e.CHARACTERISTICS,p=e["INSTREAM-ID"],f={attrs:e,bitrate:0,id:n++,groupId:e["GROUP-ID"]||"",name:e.NAME||d||"",type:a,default:e.bool("DEFAULT"),autoselect:e.bool("AUTOSELECT"),forced:e.bool("FORCED"),lang:d,url:e.URI?rp.resolve(e.URI,t):""};if(h&&(f.assocLang=h),c&&(f.channels=c),u&&(f.characteristics=u),p&&(f.instreamId=p),null!=s&&s.length){const e=rp.findGroup(s,f.groupId)||s[0];lp(f,e,"audioCodec"),lp(f,e,"textCodec")}l.push(f)}}return r}static parseLevelPlaylist(e,t,i,s,r,a){const o=new Rc(t),n=o.fragments;let l,d,h,c=null,u=0,p=0,f=0,m=0,g=null,y=new Cc(s,t),A=-1,b=!1,_=null;for(ip.lastIndex=0,o.m3u8=e,o.hasVariableRefs=Fu(e);null!==(l=ip.exec(e));){b&&(b=!1,y=new Cc(s,t),y.start=f,y.sn=u,y.cc=m,y.level=i,c&&(y.initSegment=c,y.rawProgramDateTime=c.rawProgramDateTime,c.rawProgramDateTime=null,_&&(y.setByteRange(_),_=null)));const e=l[1];if(e){y.duration=parseFloat(e);const t=(" "+l[2]).slice(1);y.title=t||null,y.tagList.push(t?["INF",e,t]:["INF",e])}else if(l[3]){if(oc(y.duration)){y.start=f,h&&cp(y,h,o),y.sn=u,y.level=i,y.cc=m,n.push(y);const e=(" "+l[3]).slice(1);y.relurl=Nu(o,e),dp(y,g),g=y,f+=y.duration,u++,p=0,b=!0}}else if(l[4]){const e=(" "+l[4]).slice(1);g?y.setByteRange(e,g):y.setByteRange(e)}else if(l[5])y.rawProgramDateTime=(" "+l[5]).slice(1),y.tagList.push(["PROGRAM-DATE-TIME",y.rawProgramDateTime]),-1===A&&(A=n.length);else{if(l=l[0].match(sp),!l){gc.warn("No matches on slow regex match for level playlist!");continue}for(d=1;d<l.length&&void 0===l[d];d++);const e=(" "+l[d]).slice(1),r=(" "+l[d+1]).slice(1),f=l[d+2]?(" "+l[d+2]).slice(1):"";switch(e){case"PLAYLIST-TYPE":o.type=r.toUpperCase();break;case"MEDIA-SEQUENCE":u=o.startSN=parseInt(r);break;case"SKIP":{const e=new bc(r);Ou(o,e,["RECENTLY-REMOVED-DATERANGES"]);const t=e.decimalInteger("SKIPPED-SEGMENTS");if(oc(t)){o.skippedSegments=t;for(let e=t;e--;)n.unshift(null);u+=t}const i=e.enumeratedString("RECENTLY-REMOVED-DATERANGES");i&&(o.recentlyRemovedDateranges=i.split("\t"));break}case"TARGETDURATION":o.targetduration=Math.max(parseInt(r),1);break;case"VERSION":o.version=parseInt(r);break;case"INDEPENDENT-SEGMENTS":case"EXTM3U":break;case"ENDLIST":o.live=!1;break;case"#":(r||f)&&y.tagList.push(f?[r,f]:[r]);break;case"DISCONTINUITY":m++,y.tagList.push(["DIS"]);break;case"GAP":y.gap=!0,y.tagList.push([e]);break;case"BITRATE":y.tagList.push([e,r]);break;case"DATERANGE":{const e=new bc(r);Ou(o,e,["ID","CLASS","START-DATE","END-DATE","SCTE35-CMD","SCTE35-OUT","SCTE35-IN"]),Ou(o,e,e.clientAttrs);const t=new vc(e,o.dateRanges[e.ID]);t.isValid||o.skippedSegments?o.dateRanges[t.id]=t:gc.warn(`Ignoring invalid DATERANGE tag: "${r}"`),y.tagList.push(["EXT-X-DATERANGE",r]);break}case"DEFINE":{const e=new bc(r);Ou(o,e,["NAME","VALUE","IMPORT","QUERYPARAM"]),"IMPORT"in e?Gu(o,e,a):ju(o,e,t)}break;case"DISCONTINUITY-SEQUENCE":m=parseInt(r);break;case"KEY":{const e=ap(r,t,o);if(e.isSupported()){if("NONE"===e.method){h=void 0;break}h||(h={}),h[e.keyFormat]&&(h=ac({},h)),h[e.keyFormat]=e}else gc.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${r}"`);break}case"START":o.startTimeOffset=op(r);break;case"MAP":{const e=new bc(r);if(Ou(o,e,["BYTERANGE","URI"]),y.duration){const r=new Cc(s,t);hp(r,e,i,h),c=r,y.initSegment=c,c.rawProgramDateTime&&!y.rawProgramDateTime&&(y.rawProgramDateTime=c.rawProgramDateTime)}else{const t=y.byteRangeEndOffset;if(t){const e=y.byteRangeStartOffset;_=`${t-e}@${e}`}else _=null;hp(y,e,i,h),c=y,b=!0}break}case"SERVER-CONTROL":{const e=new bc(r);o.canBlockReload=e.bool("CAN-BLOCK-RELOAD"),o.canSkipUntil=e.optionalFloat("CAN-SKIP-UNTIL",0),o.canSkipDateRanges=o.canSkipUntil>0&&e.bool("CAN-SKIP-DATERANGES"),o.partHoldBack=e.optionalFloat("PART-HOLD-BACK",0),o.holdBack=e.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const e=new bc(r);o.partTarget=e.decimalFloatingPoint("PART-TARGET");break}case"PART":{let e=o.partList;e||(e=o.partList=[]);const i=p>0?e[e.length-1]:void 0,s=p++,a=new bc(r);Ou(o,a,["BYTERANGE","URI"]);const n=new xc(a,y,t,s,i);e.push(n),y.duration+=n.duration;break}case"PRELOAD-HINT":{const e=new bc(r);Ou(o,e,["URI"]),o.preloadHint=e;break}case"RENDITION-REPORT":{const e=new bc(r);Ou(o,e,["URI"]),o.renditionReports=o.renditionReports||[],o.renditionReports.push(e);break}default:gc.warn(`line parsed but not handled: ${l}`)}}}g&&!g.relurl?(n.pop(),f-=g.duration,o.partList&&(o.fragmentHint=g)):o.partList&&(dp(y,g),y.cc=m,o.fragmentHint=y,h&&cp(y,h,o));const v=n.length,w=n[0],S=n[v-1];if(f+=o.skippedSegments*o.targetduration,f>0&&v&&S){o.averagetargetduration=f/v;const e=S.sn;o.endSN="initSegment"!==e?e:0,o.live||(S.endList=!0),w&&(o.startCC=w.cc)}else o.endSN=0,o.startCC=0;return o.fragmentHint&&(f+=o.fragmentHint.duration),o.totalduration=f,o.endCC=m,A>0&&function(e,t){let i=e[t];for(let s=t;s--;){const t=e[s];if(!t)return;t.programDateTime=i.programDateTime-1e3*t.duration,i=t}}(n,A),o}}function ap(e,t,i){var s,r;const a=new bc(e);Ou(i,a,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]);const o=null!=(s=a.METHOD)?s:"",n=a.URI,l=a.hexadecimalInteger("IV"),d=a.KEYFORMATVERSIONS,h=null!=(r=a.KEYFORMAT)?r:"identity";n&&a.IV&&!l&&gc.error(`Invalid IV: ${a.IV}`);const c=n?rp.resolve(n,t):"",u=(d||"1").split("/").map(Number).filter(Number.isFinite);return new Mu(o,c,h,u,l)}function op(e){const t=new bc(e).decimalFloatingPoint("TIME-OFFSET");return oc(t)?t:null}function np(e,t){let i=(e||"").split(/[ ,]+/).filter((e=>e));["video","audio","text"].forEach((e=>{const s=i.filter((t=>function(e,t){const i=$u[t];return!!i&&!!i[e.slice(0,4)]}(t,e)));s.length&&(t[`${e}Codec`]=s.join(","),i=i.filter((e=>-1===s.indexOf(e))))})),t.unknownCodecs=i}function lp(e,t,i){const s=t[i];s&&(e[i]=s)}function dp(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),oc(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}function hp(e,t,i,s){e.relurl=t.URI,t.BYTERANGE&&e.setByteRange(t.BYTERANGE),e.level=i,e.sn="initSegment",s&&(e.levelkeys=s),e.initSegment=null}function cp(e,t,i){e.levelkeys=t;const{encryptedFragments:s}=i;s.length&&s[s.length-1].levelkeys===t||!Object.keys(t).some((e=>t[e].isCommonEncryption))||s.push(e)}var up="manifest",pp="level",fp="audioTrack",mp="subtitleTrack",gp="main",yp="audio",Ap="subtitle";function bp(e){const{type:t}=e;switch(t){case fp:return yp;case mp:return Ap;default:return gp}}function _p(e,t){let i=e.url;return void 0!==i&&0!==i.indexOf("data:")||(i=t.url),i}class vp{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.LEVEL_LOADING,this.onLevelLoading,this),e.on(dc.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(dc.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}unregisterListeners(){const{hls:e}=this;e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.LEVEL_LOADING,this.onLevelLoading,this),e.off(dc.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(dc.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}createInternalLoader(e){const t=this.hls.config,i=t.pLoader,s=t.loader,r=new(i||s)(t);return this.loaders[e.type]=r,r}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:i}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:up,url:i,deliveryDirectives:null})}onLevelLoading(e,t){const{id:i,level:s,pathwayId:r,url:a,deliveryDirectives:o}=t;this.load({id:i,level:s,pathwayId:r,responseType:"text",type:pp,url:a,deliveryDirectives:o})}onAudioTrackLoading(e,t){const{id:i,groupId:s,url:r,deliveryDirectives:a}=t;this.load({id:i,groupId:s,level:null,responseType:"text",type:fp,url:r,deliveryDirectives:a})}onSubtitleTrackLoading(e,t){const{id:i,groupId:s,url:r,deliveryDirectives:a}=t;this.load({id:i,groupId:s,level:null,responseType:"text",type:mp,url:r,deliveryDirectives:a})}load(e){var t;const i=this.hls.config;let s,r=this.getInternalLoader(e);if(r){const t=r.context;if(t&&t.url===e.url&&t.level===e.level)return void gc.trace("[playlist-loader]: playlist request ongoing");gc.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),r.abort()}if(s=e.type===up?i.manifestLoadPolicy.default:ac({},i.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),r=this.createInternalLoader(e),oc(null==(t=e.deliveryDirectives)?void 0:t.part)){let t;if(e.type===pp&&null!==e.level?t=this.hls.levels[e.level].details:e.type===fp&&null!==e.id?t=this.hls.audioTracks[e.id].details:e.type===mp&&null!==e.id&&(t=this.hls.subtitleTracks[e.id].details),t){const e=t.partTarget,i=t.targetduration;if(e&&i){const t=1e3*Math.max(3*e,.8*i);s=ac({},s,{maxTimeToFirstByteMs:Math.min(t,s.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(t,s.maxTimeToFirstByteMs)})}}}const a=s.errorRetry||s.timeoutRetry||{},o={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:a.maxNumRetry||0,retryDelay:a.retryDelayMs||0,maxRetryDelay:a.maxRetryDelayMs||0},n={onSuccess:(e,t,i,s)=>{const r=this.getInternalLoader(i);this.resetInternalLoader(i.type);const a=e.data;0===a.indexOf("#EXTM3U")?(t.parsing.start=performance.now(),rp.isMediaPlaylist(a)?this.handleTrackOrLevelPlaylist(e,t,i,s||null,r):this.handleMasterPlaylist(e,t,i,s)):this.handleManifestParsingError(e,i,new Error("no EXTM3U delimiter"),s||null,t)},onError:(e,t,i,s)=>{this.handleNetworkError(t,i,!1,e,s)},onTimeout:(e,t,i)=>{this.handleNetworkError(t,i,!0,void 0,e)}};r.load(e,o,n)}handleMasterPlaylist(e,t,i,s){const r=this.hls,a=e.data,o=_p(e,i),n=rp.parseMasterPlaylist(a,o);if(n.playlistParsingError)return void this.handleManifestParsingError(e,i,n.playlistParsingError,s,t);const{contentSteering:l,levels:d,sessionData:h,sessionKeys:c,startTimeOffset:u,variableList:p}=n;this.variableList=p;const{AUDIO:f=[],SUBTITLES:m,"CLOSED-CAPTIONS":g}=rp.parseMasterPlaylistMedia(a,o,n);if(f.length){f.some((e=>!e.url))||!d[0].audioCodec||d[0].attrs.AUDIO||(gc.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),f.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new bc({}),bitrate:0,url:""}))}r.trigger(dc.MANIFEST_LOADED,{levels:d,audioTracks:f,subtitles:m,captions:g,contentSteering:l,url:o,stats:t,networkDetails:s,sessionData:h,sessionKeys:c,startTimeOffset:u,variableList:p})}handleTrackOrLevelPlaylist(e,t,i,s,r){const a=this.hls,{id:o,level:n,type:l}=i,d=_p(e,i),h=oc(n)?n:oc(o)?o:0,c=bp(i),u=rp.parseLevelPlaylist(e.data,d,h,c,0,this.variableList);if(l===up){const e={attrs:new bc({}),bitrate:0,details:u,name:"",url:d};a.trigger(dc.MANIFEST_LOADED,{levels:[e],audioTracks:[],url:d,stats:t,networkDetails:s,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),i.levelDetails=u,this.handlePlaylistLoaded(u,e,t,i,s,r)}handleManifestParsingError(e,t,i,s,r){this.hls.trigger(dc.ERROR,{type:hc.NETWORK_ERROR,details:cc.MANIFEST_PARSING_ERROR,fatal:t.type===up,url:e.url,err:i,error:i,reason:i.message,response:e,context:t,networkDetails:s,stats:r})}handleNetworkError(e,t,i=!1,s,r){let a=`A network ${i?"timeout":"error"+(s?" (status "+s.code+")":"")} occurred while loading ${e.type}`;e.type===pp?a+=`: ${e.level} id: ${e.id}`:e.type!==fp&&e.type!==mp||(a+=` id: ${e.id} group-id: "${e.groupId}"`);const o=new Error(a);gc.warn(`[playlist-loader]: ${a}`);let n=cc.UNKNOWN,l=!1;const d=this.getInternalLoader(e);switch(e.type){case up:n=i?cc.MANIFEST_LOAD_TIMEOUT:cc.MANIFEST_LOAD_ERROR,l=!0;break;case pp:n=i?cc.LEVEL_LOAD_TIMEOUT:cc.LEVEL_LOAD_ERROR,l=!1;break;case fp:n=i?cc.AUDIO_TRACK_LOAD_TIMEOUT:cc.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case mp:n=i?cc.SUBTITLE_TRACK_LOAD_TIMEOUT:cc.SUBTITLE_LOAD_ERROR,l=!1}d&&this.resetInternalLoader(e.type);const h={type:hc.NETWORK_ERROR,details:n,fatal:l,url:e.url,loader:d,context:e,error:o,networkDetails:t,stats:r};if(s){const i=(null==t?void 0:t.url)||e.url;h.response=ic({url:i,data:void 0},s)}this.hls.trigger(dc.ERROR,h)}handlePlaylistLoaded(e,t,i,s,r,a){const o=this.hls,{type:n,level:l,id:d,groupId:h,deliveryDirectives:c}=s,u=_p(t,s),p=bp(s),f="number"==typeof s.level&&p===gp?l:void 0;if(!e.fragments.length){const e=new Error("No Segments found in Playlist");return void o.trigger(dc.ERROR,{type:hc.NETWORK_ERROR,details:cc.LEVEL_EMPTY_ERROR,fatal:!1,url:u,error:e,reason:e.message,response:t,context:s,level:f,parent:p,networkDetails:r,stats:i})}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const m=e.playlistParsingError;if(m)o.trigger(dc.ERROR,{type:hc.NETWORK_ERROR,details:cc.LEVEL_PARSING_ERROR,fatal:!1,url:u,error:m,reason:m.message,response:t,context:s,level:f,parent:p,networkDetails:r,stats:i});else switch(e.live&&a&&(a.getCacheAge&&(e.ageHeader=a.getCacheAge()||0),a.getCacheAge&&!isNaN(e.ageHeader)||(e.ageHeader=0)),n){case up:case pp:o.trigger(dc.LEVEL_LOADED,{details:e,level:f||0,id:d||0,stats:i,networkDetails:r,deliveryDirectives:c});break;case fp:o.trigger(dc.AUDIO_TRACK_LOADED,{details:e,id:d||0,groupId:h||"",stats:i,networkDetails:r,deliveryDirectives:c});break;case mp:o.trigger(dc.SUBTITLE_TRACK_LOADED,{details:e,id:d||0,groupId:h||"",stats:i,networkDetails:r,deliveryDirectives:c})}}}function wp(e,t){let i;try{i=new Event("addtrack")}catch(e){i=document.createEvent("Event"),i.initEvent("addtrack",!1,!1)}i.track=e,t.dispatchEvent(i)}function Sp(e,t){const i=e.mode;if("disabled"===i&&(e.mode="hidden"),e.cues&&!e.cues.getCueById(t.id))try{if(e.addCue(t),!e.cues.getCueById(t.id))throw new Error(`addCue is failed for: ${t}`)}catch(i){gc.debug(`[texttrack-utils]: ${i}`);try{const i=new self.TextTrackCue(t.startTime,t.endTime,t.text);i.id=t.id,e.addCue(i)}catch(e){gc.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${e}`)}}"disabled"===i&&(e.mode=i)}function Tp(e){const t=e.mode;if("disabled"===t&&(e.mode="hidden"),e.cues)for(let t=e.cues.length;t--;)e.removeCue(e.cues[t]);"disabled"===t&&(e.mode=t)}function Ep(e,t,i,s){const r=e.mode;if("disabled"===r&&(e.mode="hidden"),e.cues&&e.cues.length>0){const r=function(e,t,i){const s=[],r=function(e,t){if(t<e[0].startTime)return 0;const i=e.length-1;if(t>e[i].endTime)return-1;let s=0,r=i;for(;s<=r;){const a=Math.floor((r+s)/2);if(t<e[a].startTime)r=a-1;else{if(!(t>e[a].startTime&&s<i))return a;s=a+1}}return e[s].startTime-t<t-e[r].startTime?s:r}(e,t);if(r>-1)for(let a=r,o=e.length;a<o;a++){const r=e[a];if(r.startTime>=t&&r.endTime<=i)s.push(r);else if(r.startTime>i)return s}return s}(e.cues,t,i);for(let t=0;t<r.length;t++)s&&!s(r[t])||e.removeCue(r[t])}"disabled"===r&&(e.mode=r)}function kp(e){const t=[];for(let i=0;i<e.length;i++){const s=e[i];"subtitles"!==s.kind&&"captions"!==s.kind||!s.label||t.push(e[i])}return t}var Cp="org.id3",xp="com.apple.quicktime.HLS",Rp="https://aomedia.org/emsg/ID3";function Dp(){if("undefined"!=typeof self)return self.VTTCue||self.TextTrackCue}function Lp(e,t,i,s,r){let a=new e(t,i,"");try{a.value=s,r&&(a.type=r)}catch(o){a=new e(t,i,JSON.stringify(r?ic({type:r},s):s))}return a}const Ip=(()=>{const e=Dp();try{e&&new e(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function Pp(e,t){return e.getTime()/1e3-t}class Bp{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null}_registerListeners(){const{hls:e}=this;e.on(dc.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(dc.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(dc.LEVEL_UPDATED,this.onLevelUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(dc.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(dc.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(dc.LEVEL_UPDATED,this.onLevelUpdated,this)}onMediaAttached(e,t){this.media=t.media}onMediaDetaching(){this.id3Track&&(Tp(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;t<e.length;t++){const i=e[t];if("metadata"===i.kind&&"id3"===i.label)return wp(i,this.media),i}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:i,enableID3MetadataCues:s}}}=this;if(!i&&!s)return;const{samples:r}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const a=Dp();if(a)for(let e=0;e<r.length;e++){const t=r[e].type;if(t===Rp&&!i||!s)continue;const o=eu(r[e].data);if(o){const i=r[e].pts;let s=i+r[e].duration;s>Ip&&(s=Ip);s-i<=0&&(s=i+.25);for(let e=0;e<o.length;e++){const r=o[e];if(!Xc(r)){this.updateId3CueEnds(i,t);const e=Lp(a,i,s,r,t);e&&this.id3Track.addCue(e)}}}}}updateId3CueEnds(e,t){var i;const s=null==(i=this.id3Track)?void 0:i.cues;if(s)for(let i=s.length;i--;){const r=s[i];r.type===t&&r.startTime<e&&r.endTime===Ip&&(r.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:i,type:s}){const{id3Track:r,hls:a}=this;if(!a)return;const{config:{enableEmsgMetadataCues:o,enableID3MetadataCues:n}}=a;if(r&&(o||n)){let e;e="audio"===s?e=>e.type===Cp&&n:"video"===s?e=>e.type===Rp&&o:e=>e.type===Cp&&n||e.type===Rp&&o,Ep(r,t,i,e)}}onLevelUpdated(e,{details:t}){if(!this.media||!t.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{dateRangeCuesAppended:i,id3Track:s}=this,{dateRanges:r}=t,a=Object.keys(r);if(s){const e=Object.keys(i).filter((e=>!a.includes(e)));for(let t=e.length;t--;){const r=e[t];Object.keys(i[r].cues).forEach((e=>{s.removeCue(i[r].cues[e])})),delete i[r]}}const o=t.fragments[t.fragments.length-1];if(0===a.length||!oc(null==o?void 0:o.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const n=o.programDateTime/1e3-o.start,l=Dp();for(let e=0;e<a.length;e++){const t=a[e],s=r[t],o=Pp(s.startDate,n),c=i[t],u=(null==c?void 0:c.cues)||{};let p=(null==c?void 0:c.durationKnown)||!1,f=Ip;const m=s.endDate;if(m)f=Pp(m,n),p=!0;else if(s.endOnNext&&!p){const e=a.reduce(((e,t)=>{if(t!==s.id){const i=r[t];if(i.class===s.class&&i.startDate>s.startDate&&(!e||s.startDate<e.startDate))return i}return e}),null);e&&(f=Pp(e.startDate,n),p=!0)}const g=Object.keys(s.attr);for(let e=0;e<g.length;e++){const i=g[e];if("ID"===(h=i)||"CLASS"===h||"START-DATE"===h||"DURATION"===h||"END-DATE"===h||"END-ON-NEXT"===h)continue;const r=u[i];if(r)p&&!c.durationKnown&&(r.endTime=f);else if(l){let e=s.attr[i];_c(i)&&(d=e,e=Uint8Array.from(d.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer);const r=Lp(l,o,f,{key:i,data:e},xp);r&&(r.id=t,this.id3Track.addCue(r),u[i]=r)}}i[t]={cues:u,dateRange:s,durationKnown:p}}var d,h}}class Mp{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=()=>this.timeupdate(),this.hls=e,this.config=e.config,this.registerListeners()}get latency(){return this._latency||0}get maxLatency(){const{config:e,levelDetails:t}=this;return void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const{levelDetails:e}=this;if(null===e)return null;const{holdBack:t,partHoldBack:i,targetduration:s}=e,{liveSyncDuration:r,liveSyncDurationCount:a,lowLatencyMode:o}=this.config,n=this.hls.userConfig;let l=o&&i||t;(n.liveSyncDuration||n.liveSyncDurationCount||0===l)&&(l=void 0!==r?r:a*s);const d=s;return l+Math.min(1*this.stallCount,d)}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency,i=this.levelDetails;if(null===e||null===t||null===i)return null;const s=i.edge,r=e-t-this.edgeStalled,a=s-i.totalduration,o=s-(this.config.lowLatencyMode&&i.partTarget||i.targetduration);return Math.min(Math.max(a,r),o)}get drift(){const{levelDetails:e}=this;return null===e?1:e.drift}get edgeStalled(){const{levelDetails:e}=this;if(null===e)return 0;const t=3*(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e,levelDetails:t}=this;if(!e||!t)return 0;const i=e.buffered.length;return(i?e.buffered.end(i-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null}registerListeners(){this.hls.on(dc.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(dc.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(dc.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(dc.ERROR,this.onError,this)}unregisterListeners(){this.hls.off(dc.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(dc.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(dc.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(dc.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)}onManifestLoading(){this.levelDetails=null,this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){this.levelDetails=t,t.advanced&&this.timeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)}onError(e,t){var i;t.details===cc.BUFFER_STALLED_ERROR&&(this.stallCount++,null!=(i=this.levelDetails)&&i.live&&gc.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))}timeupdate(){const{media:e,levelDetails:t}=this;if(!e||!t)return;this.currentTime=e.currentTime;const i=this.computeLatency();if(null===i)return;this._latency=i;const{lowLatencyMode:s,maxLiveSyncPlaybackRate:r}=this.config;if(!s||1===r||!t.live)return;const a=this.targetLatency;if(null===a)return;const o=i-a;if(o<Math.min(this.maxLatency,a+t.targetduration)&&o>.05&&this.forwardBufferLength>1){const t=Math.min(2,Math.max(1,r)),i=Math.round(2/(1+Math.exp(-.75*o-this.edgeStalled))*20)/20;e.playbackRate=Math.min(t,Math.max(1,i))}else 1!==e.playbackRate&&0!==e.playbackRate&&(e.playbackRate=1)}estimateLiveEdge(){const{levelDetails:e}=this;return null===e?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return null===e?null:e-this.currentTime}}const Up=["NONE","TYPE-0","TYPE-1",null];const Fp=["SDR","PQ","HLG"];var Op="",Np="YES",jp="v2";class Gp{constructor(e,t,i){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=i}addDirectives(e){const t=new self.URL(e);return void 0!==this.msn&&t.searchParams.set("_HLS_msn",this.msn.toString()),void 0!==this.part&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class zp{constructor(e){this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter((e=>!!e)).map((e=>e.substring(0,4))).join(","),this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return $p(this._audioGroups,e)}hasSubtitleGroup(e){return $p(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t)if("audio"===e){let e=this._audioGroups;e||(e=this._audioGroups=[]),-1===e.indexOf(t)&&e.push(t)}else if("text"===e){let e=this._subtitleGroups;e||(e=this._subtitleGroups=[]),-1===e.indexOf(t)&&e.push(t)}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return null==(e=this.audioGroups)?void 0:e[0]}get textGroupId(){var e;return null==(e=this.subtitleGroups)?void 0:e[0]}addFallback(){}}function $p(e,t){return!(!t||!e)&&-1!==e.indexOf(t)}function Hp(e,t){const i=t.startPTS;if(oc(i)){let s,r=0;t.sn>e.sn?(r=i-e.start,s=e):(r=e.start-i,s=t),s.duration!==r&&(s.duration=r)}else if(t.sn>e.sn){e.cc===t.cc&&e.minEndPTS?t.start=e.start+(e.minEndPTS-e.start):t.start=e.start+e.duration}else t.start=Math.max(e.start-t.duration,0)}function Vp(e,t,i,s,r,a){s-i<=0&&(gc.warn("Fragment should have a positive duration",t),s=i+t.duration,a=r+t.duration);let o=i,n=s;const l=t.startPTS,d=t.endPTS;if(oc(l)){const e=Math.abs(l-i);oc(t.deltaPTS)?t.deltaPTS=Math.max(e,t.deltaPTS):t.deltaPTS=e,o=Math.max(i,l),i=Math.min(i,l),r=Math.min(r,t.startDTS),n=Math.min(s,d),s=Math.max(s,d),a=Math.max(a,t.endDTS)}const h=i-t.start;0!==t.start&&(t.start=i),t.duration=s-t.start,t.startPTS=i,t.maxStartPTS=o,t.startDTS=r,t.endPTS=s,t.minEndPTS=n,t.endDTS=a;const c=t.sn;if(!e||c<e.startSN||c>e.endSN)return 0;let u;const p=c-e.startSN,f=e.fragments;for(f[p]=t,u=p;u>0;u--)Hp(f[u],f[u-1]);for(u=p;u<f.length-1;u++)Hp(f[u],f[u+1]);return e.fragmentHint&&Hp(f[f.length-1],e.fragmentHint),e.PTSKnown=e.alignedSliding=!0,h}function Wp(e,t){let i=null;const s=e.fragments;for(let e=s.length-1;e>=0;e--){const t=s[e].initSegment;if(t){i=t;break}}e.fragmentHint&&delete e.fragmentHint.endPTS;let r,a=0;if(function(e,t,i){const s=t.skippedSegments,r=Math.max(e.startSN,t.startSN)-t.startSN,a=(e.fragmentHint?1:0)+(s?t.endSN:Math.min(e.endSN,t.endSN))-t.startSN,o=t.startSN-e.startSN,n=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,l=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments;for(let e=r;e<=a;e++){const r=l[o+e];let a=n[e];s&&!a&&e<s&&(a=t.fragments[e]=r),r&&a&&i(r,a)}}(e,t,((e,s)=>{e.relurl&&(a=e.cc-s.cc),oc(e.startPTS)&&oc(e.endPTS)&&(s.start=s.startPTS=e.startPTS,s.startDTS=e.startDTS,s.maxStartPTS=e.maxStartPTS,s.endPTS=e.endPTS,s.endDTS=e.endDTS,s.minEndPTS=e.minEndPTS,s.duration=e.endPTS-e.startPTS,s.duration&&(r=s),t.PTSKnown=t.alignedSliding=!0),s.elementaryStreams=e.elementaryStreams,s.loader=e.loader,s.stats=e.stats,e.initSegment&&(s.initSegment=e.initSegment,i=e.initSegment)})),i){(t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments).forEach((e=>{var t;!e||e.initSegment&&e.initSegment.relurl!==(null==(t=i)?void 0:t.relurl)||(e.initSegment=i)}))}if(t.skippedSegments)if(t.deltaUpdateFailed=t.fragments.some((e=>!e)),t.deltaUpdateFailed){gc.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let e=t.skippedSegments;e--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}else t.canSkipDateRanges&&(t.dateRanges=function(e,t,i){const s=ac({},e);i&&i.forEach((e=>{delete s[e]}));return Object.keys(t).forEach((e=>{const i=new vc(t[e].attr,s[e]);i.isValid?s[e]=i:gc.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${JSON.stringify(t[e].attr)}"`)})),s}(e.dateRanges,t.dateRanges,t.recentlyRemovedDateranges));const o=t.fragments;if(a){gc.warn("discontinuity sliding from playlist, take drift into account");for(let e=0;e<o.length;e++)o[e].cc+=a}t.skippedSegments&&(t.startCC=t.fragments[0].cc),function(e,t,i){if(e&&t){let s=0;for(let r=0,a=e.length;r<=a;r++){const a=e[r],o=t[r+s];a&&o&&a.index===o.index&&a.fragment.sn===o.fragment.sn?i(a,o):s--}}}(e.partList,t.partList,((e,t)=>{t.elementaryStreams=e.elementaryStreams,t.stats=e.stats})),r?Vp(t,r,r.startPTS,r.endPTS,r.startDTS,r.endDTS):Jp(e,t),o.length&&(t.totalduration=t.edge-o[0].start),t.driftStartTime=e.driftStartTime,t.driftStart=e.driftStart;const n=t.advancedDateTime;if(t.advanced&&n){const e=t.edge;t.driftStart||(t.driftStartTime=n,t.driftStart=e),t.driftEndTime=n,t.driftEnd=e}else t.driftEndTime=e.driftEndTime,t.driftEnd=e.driftEnd,t.advancedDateTime=e.advancedDateTime}function Jp(e,t){const i=t.startSN+t.skippedSegments-e.startSN,s=e.fragments;i<0||i>=s.length||qp(t,s[i].start)}function qp(e,t){if(t){const i=e.fragments;for(let s=e.skippedSegments;s<i.length;s++)i[s].start+=t;e.fragmentHint&&(e.fragmentHint.start+=t)}}function Kp(e,t,i){var s;return null!=e&&e.details?Yp(null==(s=e.details)?void 0:s.partList,t,i):null}function Yp(e,t,i){if(e)for(let s=e.length;s--;){const r=e[s];if(r.index===i&&r.fragment.sn===t)return r}return null}function Qp(e){e.forEach(((e,t)=>{const{details:i}=e;null!=i&&i.fragments&&i.fragments.forEach((e=>{e.level=t}))}))}function Xp(e){switch(e.details){case cc.FRAG_LOAD_TIMEOUT:case cc.KEY_LOAD_TIMEOUT:case cc.LEVEL_LOAD_TIMEOUT:case cc.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function Zp(e,t){const i=Xp(t);return e.default[(i?"timeout":"error")+"Retry"]}function ef(e,t){const i="linear"===e.backoff?1:Math.pow(2,t);return Math.min(i*e.retryDelayMs,e.maxRetryDelayMs)}function tf(e){return ic(ic({},e),{errorRetry:null,timeoutRetry:null})}function sf(e,t,i,s){if(!e)return!1;const r=null==s?void 0:s.code,a=t<e.maxNumRetry&&(function(e){return 0===e&&!1===navigator.onLine||!!e&&(e<400||e>499)}(r)||!!i);return e.shouldRetry?e.shouldRetry(e,t,i,s,a):a}const rf=function(e,t){let i=0,s=e.length-1,r=null,a=null;for(;i<=s;){r=(i+s)/2|0,a=e[r];const o=t(a);if(o>0)i=r+1;else{if(!(o<0))return a;s=r-1}}return null};function af(e,t,i=0,s=0){let r=null;if(e){r=t[e.sn-t[0].sn+1]||null;const s=e.endDTS-i;s>0&&s<15e-7&&(i+=15e-7)}else 0===i&&0===t[0].start&&(r=t[0]);if(r&&(!e||e.level===r.level)&&0===of(i,s,r))return r;const a=rf(t,of.bind(null,i,s));return!a||a===e&&r?r:a}function of(e=0,t=0,i){if(i.start<=e&&i.start+i.duration>e)return 0;const s=Math.min(t,i.duration+(i.deltaPTS?i.deltaPTS:0));return i.start+i.duration-s<=e?1:i.start-s>e&&i.start?-1:0}function nf(e,t,i){const s=1e3*Math.min(t,i.duration+(i.deltaPTS?i.deltaPTS:0));return(i.endProgramDateTime||0)-s>e}var lf=0,df=2,hf=3,cf=5,uf=0,pf=1,ff=2;class mf{constructor(e,t){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.log=void 0,this.warn=void 0,this.log=gc.log.bind(gc,`${t}:`),this.warn=gc.warn.bind(gc,`${t}:`),this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){-1!==this.timer&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.requestScheduled=-1,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t){const i=null==t?void 0:t.renditionReports;if(i){let s=-1;for(let r=0;r<i.length;r++){const a=i[r];let o;try{o=new self.URL(a.URI,t.url).href}catch(e){gc.warn(`Could not construct new URL for Rendition Report: ${e}`),o=a.URI||""}if(o===e){s=r;break}o===e.substring(0,o.length)&&(s=r)}if(-1!==s){const e=i[s],r=parseInt(e["LAST-MSN"])||(null==t?void 0:t.lastPartSn);let a=parseInt(e["LAST-PART"])||(null==t?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){const e=Math.min(t.age-t.partTarget,t.targetduration);a>=0&&e>t.partTarget&&(a+=1)}return new Gp(r,a>=0?a:void 0,Op)}}}loadPlaylist(e){-1===this.requestScheduled&&(this.requestScheduled=self.performance.now())}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}shouldReloadPlaylist(e){return-1===this.timer&&-1===this.requestScheduled&&this.shouldLoadPlaylist(e)}playlistLoaded(e,t,i){const{details:s,stats:r}=t,a=self.performance.now(),o=r.loading.first?Math.max(0,a-r.loading.first):0;if(s.advancedDateTime=Date.now()-o,s.live||null!=i&&i.live){if(s.reloaded(i),i&&this.log(`live playlist ${e} ${s.advanced?"REFRESHED "+s.lastPartSn+"-"+s.lastPartIndex:s.updated?"UPDATED":"MISSED"}`),i&&s.fragments.length>0&&Wp(i,s),!this.canLoad||!s.live)return;let o,n,l;if(s.canBlockReload&&s.endSN&&s.advanced){const e=this.hls.config.lowLatencyMode,r=s.lastPartSn,a=s.endSN,d=s.lastPartIndex,h=r===a,c=e?0:d;-1!==d?(n=h?a+1:r,l=h?c:d+1):n=a+1;const u=s.age,p=u+s.ageHeader;let f=Math.min(p-s.partTarget,1.5*s.targetduration);if(f>0){if(i&&f>i.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${i.tuneInGoal} to: ${f} with playlist age: ${s.age}`),f=0;else{const e=Math.floor(f/s.targetduration);if(n+=e,void 0!==l){l+=Math.round(f%s.targetduration/s.partTarget)}this.log(`CDN Tune-in age: ${s.ageHeader}s last advanced ${u.toFixed(2)}s goal: ${f} skip sn ${e} to part ${l}`)}s.tuneInGoal=f}if(o=this.getDeliveryDirectives(s,t.deliveryDirectives,n,l),e||!h)return void this.loadPlaylist(o)}else(s.canBlockReload||s.canSkipUntil)&&(o=this.getDeliveryDirectives(s,t.deliveryDirectives,n,l));const d=this.hls.mainForwardBufferInfo,h=d?d.end-d.len:0,c=function(e,t=1/0){let i=1e3*e.targetduration;if(e.updated){const s=e.fragments,r=4;if(s.length&&i*r>t){const e=1e3*s[s.length-1].duration;e<i&&(i=e)}}else i/=2;return Math.round(i)}(s,1e3*(s.edge-h));s.updated&&a>this.requestScheduled+c&&(this.requestScheduled=r.loading.start),void 0!==n&&s.canBlockReload?this.requestScheduled=r.loading.first+c-(1e3*s.partTarget||1e3):-1===this.requestScheduled||this.requestScheduled+c<a?this.requestScheduled=a:this.requestScheduled-a<=0&&(this.requestScheduled+=c);let u=this.requestScheduled-a;u=Math.max(0,u),this.log(`reload live playlist ${e} in ${Math.round(u)} ms`),this.timer=self.setTimeout((()=>this.loadPlaylist(o)),u)}else this.clearTimer()}getDeliveryDirectives(e,t,i,s){let r=function(e,t){const{canSkipUntil:i,canSkipDateRanges:s,endSN:r}=e;return i&&(void 0!==t?t-r:0)<i?s?jp:Np:Op}(e,i);return null!=t&&t.skip&&e.deltaUpdateFailed&&(i=t.msn,s=t.part,r=Op),new Gp(i,s,r)}checkRetry(e){const t=e.details,i=Xp(e),s=e.errorAction,{action:r,retryCount:a=0,retryConfig:o}=s||{},n=!!s&&!!o&&(r===cf||!s.resolved&&r===df);if(n){var l;if(this.requestScheduled=-1,a>=o.maxNumRetry)return!1;if(i&&null!=(l=e.context)&&l.deliveryDirectives)this.warn(`Retrying playlist loading ${a+1}/${o.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const e=ef(o,a);this.timer=self.setTimeout((()=>this.loadPlaylist()),e),this.warn(`Retrying playlist loading ${a+1}/${o.maxNumRetry} after "${t}" in ${e}ms`)}e.levelRetry=!0,s.resolved=!0}return n}}class gf{constructor(e,t=0,i=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=i}sample(e,t){const i=Math.pow(this.alpha_,e);this.estimate_=t*(1-i)+i*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class yf{constructor(e,t,i,s=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=i,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new gf(e),this.fast_=new gf(t),this.defaultTTFB_=s,this.ttfb_=new gf(e)}update(e,t){const{slow_:i,fast_:s,ttfb_:r}=this;i.halfLife!==e&&(this.slow_=new gf(e,i.getEstimate(),i.getTotalWeight())),s.halfLife!==t&&(this.fast_=new gf(t,s.getEstimate(),s.getTotalWeight())),r.halfLife!==e&&(this.ttfb_=new gf(e,r.getEstimate(),r.getTotalWeight()))}sample(e,t){const i=(e=Math.max(e,this.minDelayMs_))/1e3,s=8*t/i;this.fast_.sample(i,s),this.slow_.sample(i,s)}sampleTTFB(e){const t=e/1e3,i=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(i,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}destroy(){}}const Af={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]},bf={};function _f(e,t,i,s,r,a){const o=e.audioCodec?e.audioGroups:null,n=null==a?void 0:a.audioCodec,l=null==a?void 0:a.channels,d=l?parseInt(l):n?1/0:2;let h=null;if(null!=o&&o.length)try{h=1===o.length&&o[0]?t.groups[o[0]].channels:o.reduce(((e,i)=>{if(i){const s=t.groups[i];if(!s)throw new Error(`Audio track group ${i} not found`);Object.keys(s.channels).forEach((t=>{e[t]=(e[t]||0)+s.channels[t]}))}return e}),{2:0})}catch(e){return!0}return void 0!==e.videoCodec&&(e.width>1920&&e.height>1088||e.height>1920&&e.width>1088||e.frameRate>Math.max(s,30)||"SDR"!==e.videoRange&&e.videoRange!==i||e.bitrate>Math.max(r,8e6))||!!h&&oc(d)&&Object.keys(h).some((e=>parseInt(e)>d))}function vf(e,t,i){const s=e.videoCodec,r=e.audioCodec;if(!s||!r||!i)return Promise.resolve(Af);const a={width:e.width,height:e.height,bitrate:Math.ceil(Math.max(.9*e.bitrate,e.averageBitrate)),framerate:e.frameRate||30},o=e.videoRange;"SDR"!==o&&(a.transferFunction=o.toLowerCase());const n=s.split(",").map((e=>({type:"media-source",video:ic(ic({},a),{},{contentType:Wu(e,"video")})})));return r&&e.audioGroups&&e.audioGroups.forEach((e=>{var i;e&&(null==(i=t.groups[e])||i.tracks.forEach((t=>{if(t.groupId===e){const e=t.channels||"",i=parseFloat(e);oc(i)&&i>2&&n.push.apply(n,r.split(",").map((e=>({type:"media-source",audio:{contentType:Wu(e,"audio"),channels:""+i}}))))}})))})),Promise.all(n.map((e=>{const t=function(e){const{audio:t,video:i}=e,s=i||t;if(s){const e=s.contentType.split('"')[1];if(i)return`r${i.height}x${i.width}f${Math.ceil(i.framerate)}${i.transferFunction||"sd"}_${e}_${Math.ceil(i.bitrate/1e5)}`;if(t)return`c${t.channels}${t.spatialRendering?"s":"n"}_${e}`}return""}(e);return bf[t]||(bf[t]=i.decodingInfo(e))}))).then((e=>({supported:!e.some((e=>!e.supported)),configurations:n,decodingInfoResults:e}))).catch((e=>({supported:!1,configurations:n,decodingInfoResults:[],error:e})))}function wf(e,t){let i=!1,s=[];return e&&(i="SDR"!==e,s=[e]),t&&(s=t.allowedVideoRanges||Fp.slice(0),i=void 0!==t.preferHDR?t.preferHDR:function(){if("function"==typeof matchMedia){const e=matchMedia("(dynamic-range: high)"),t=matchMedia("bad query");if(e.media!==t.media)return!0===e.matches}return!1}(),s=i?s.filter((e=>"SDR"!==e)):["SDR"]),{preferHDR:i,allowedVideoRanges:s}}function Sf(e,t){gc.log(`[abr] start candidates with "${e}" ignored because ${t}`)}function Tf(e,t,i){if("attrs"in e){const i=t.indexOf(e);if(-1!==i)return i}for(let s=0;s<t.length;s++){if(Ef(e,t[s],i))return s}return-1}function Ef(e,t,i){const{groupId:s,name:r,lang:a,assocLang:o,characteristics:n,default:l}=e,d=e.forced;return(void 0===s||t.groupId===s)&&(void 0===r||t.name===r)&&(void 0===a||t.lang===a)&&(void 0===a||t.assocLang===o)&&(void 0===l||t.default===l)&&(void 0===d||t.forced===d)&&(void 0===n||function(e,t=""){const i=e.split(","),s=t.split(",");return i.length===s.length&&!i.some((e=>-1===s.indexOf(e)))}(n,t.characteristics))&&(void 0===i||i(e,t))}function kf(e,t){const{audioCodec:i,channels:s}=e;return!(void 0!==i&&(t.audioCodec||"").substring(0,4)!==i.substring(0,4)||void 0!==s&&s!==(t.channels||"2"))}function Cf(e,t,i){for(let s=t;s;s--)if(i(e[s]))return s;for(let s=t+1;s<e.length;s++)if(i(e[s]))return s;return-1}class xf{constructor(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}destroy(){this.onHandlerDestroying(),this.onHandlerDestroyed()}onHandlerDestroying(){this.clearNextTick(),this.clearInterval()}onHandlerDestroyed(){}hasInterval(){return!!this._tickInterval}hasNextTick(){return!!this._tickTimer}setInterval(e){return!this._tickInterval&&(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)}clearInterval(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)}clearNextTick(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)}tick(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}var Rf="NOT_LOADED",Df="APPENDING",Lf="PARTIAL",If="OK";class Pf{constructor(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(dc.BUFFER_APPENDED,this.onBufferAppended,this),e.on(dc.FRAG_BUFFERED,this.onFragBuffered,this),e.on(dc.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(dc.BUFFER_APPENDED,this.onBufferAppended,this),e.off(dc.FRAG_BUFFERED,this.onFragBuffered,this),e.off(dc.FRAG_LOADED,this.onFragLoaded,this)}destroy(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const i=this.activePartLists[t];if(i)for(let t=i.length;t--;){const s=i[t];if(!s)break;const r=s.end;if(s.start<=e&&null!==r&&e<=r)return s}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){const{fragments:i}=this,s=Object.keys(i);for(let r=s.length;r--;){const a=i[s[r]];if((null==a?void 0:a.body.type)===t&&a.buffered){const t=a.body;if(t.start<=e&&e<=t.end)return t}}return null}detectEvictedFragments(e,t,i,s){this.timeRanges&&(this.timeRanges[e]=t);const r=(null==s?void 0:s.fragment.sn)||-1;Object.keys(this.fragments).forEach((s=>{const a=this.fragments[s];if(!a)return;if(r>=a.body.sn)return;if(!a.buffered&&!a.loaded)return void(a.body.type===i&&this.removeFragment(a.body));const o=a.range[e];o&&o.time.some((e=>{const i=!this.isTimeBuffered(e.startPTS,e.endPTS,t);return i&&this.removeFragment(a.body),i}))}))}detectPartialFragments(e){const t=this.timeRanges,{frag:i,part:s}=e;if(!t||"initSegment"===i.sn)return;const r=Mf(i),a=this.fragments[r];if(!a||a.buffered&&i.gap)return;const o=!i.relurl;if(Object.keys(t).forEach((e=>{const r=i.elementaryStreams[e];if(!r)return;const n=t[e],l=o||!0===r.partial;a.range[e]=this.getBufferedTimes(i,s,l,n)})),a.loaded=null,Object.keys(a.range).length){a.buffered=!0;(a.body.endList=i.endList||a.body.endList)&&(this.endListFragments[a.body.type]=a),Bf(a)||this.removeParts(i.sn-1,i.type)}else this.removeFragment(a.body)}removeParts(e,t){const i=this.activePartLists[t];i&&(this.activePartLists[t]=i.filter((t=>t.fragment.sn>=e)))}fragBuffered(e,t){const i=Mf(e);let s=this.fragments[i];!s&&t&&(s=this.fragments[i]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),s&&(s.loaded=null,s.buffered=!0)}getBufferedTimes(e,t,i,s){const r={time:[],partial:i},a=e.start,o=e.end,n=e.minEndPTS||o,l=e.maxStartPTS||a;for(let e=0;e<s.length;e++){const t=s.start(e)-this.bufferPadding,i=s.end(e)+this.bufferPadding;if(l>=t&&n<=i){r.time.push({startPTS:Math.max(a,s.start(e)),endPTS:Math.min(o,s.end(e))});break}if(a<i&&o>t){const t=Math.max(a,s.start(e)),i=Math.min(o,s.end(e));i>t&&(r.partial=!0,r.time.push({startPTS:t,endPTS:i}))}else if(o<=t)break}return r}getPartialFragment(e){let t,i,s,r=null,a=0;const{bufferPadding:o,fragments:n}=this;return Object.keys(n).forEach((l=>{const d=n[l];d&&Bf(d)&&(i=d.body.start-o,s=d.body.end+o,e>=i&&e<=s&&(t=Math.min(e-i,s-e),a<=t&&(r=d.body,a=t)))})),r}isEndListAppended(e){const t=this.endListFragments[e];return void 0!==t&&(t.buffered||Bf(t))}getState(e){const t=Mf(e),i=this.fragments[t];return i?i.buffered?Bf(i)?Lf:If:Df:Rf}isTimeBuffered(e,t,i){let s,r;for(let a=0;a<i.length;a++){if(s=i.start(a)-this.bufferPadding,r=i.end(a)+this.bufferPadding,e>=s&&t<=r)return!0;if(t<=s)return!1}return!1}onFragLoaded(e,t){const{frag:i,part:s}=t;if("initSegment"===i.sn||i.bitrateTest)return;const r=s?null:t,a=Mf(i);this.fragments[a]={body:i,appendedPTS:null,loaded:r,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:i,part:s,timeRanges:r}=t;if("initSegment"===i.sn)return;const a=i.type;if(s){let e=this.activePartLists[a];e||(this.activePartLists[a]=e=[]),e.push(s)}this.timeRanges=r,Object.keys(r).forEach((e=>{const t=r[e];this.detectEvictedFragments(e,t,a,s)}))}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=Mf(e);return!!this.fragments[t]}hasParts(e){var t;return!(null==(t=this.activePartLists[e])||!t.length)}removeFragmentsInRange(e,t,i,s,r){s&&!this.hasGaps||Object.keys(this.fragments).forEach((a=>{const o=this.fragments[a];if(!o)return;const n=o.body;n.type!==i||s&&!n.gap||n.start<t&&n.end>e&&(o.buffered||r)&&this.removeFragment(n)}))}removeFragment(e){const t=Mf(e);e.stats.loaded=0,e.clearElementaryStreamInfo();const i=this.activePartLists[e.type];if(i){const t=e.sn;this.activePartLists[e.type]=i.filter((e=>e.fragment.sn!==t))}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1}}function Bf(e){var t,i,s;return e.buffered&&(e.body.gap||(null==(t=e.range.video)?void 0:t.partial)||(null==(i=e.range.audio)?void 0:i.partial)||(null==(s=e.range.audiovideo)?void 0:s.partial))}function Mf(e){return`${e.type}_${e.level}_${e.sn}`}const Uf={length:0,start:()=>0,end:()=>0};class Ff{static isBuffered(e,t){try{if(e){const i=Ff.getBuffered(e);for(let e=0;e<i.length;e++)if(t>=i.start(e)&&t<=i.end(e))return!0}}catch(e){}return!1}static bufferInfo(e,t,i){try{if(e){const s=Ff.getBuffered(e),r=[];let a;for(a=0;a<s.length;a++)r.push({start:s.start(a),end:s.end(a)});return this.bufferedInfo(r,t,i)}}catch(e){}return{len:0,start:t,end:t,nextStart:void 0}}static bufferedInfo(e,t,i){t=Math.max(0,t),e.sort((function(e,t){const i=e.start-t.start;return i||t.end-e.end}));let s=[];if(i)for(let t=0;t<e.length;t++){const r=s.length;if(r){const a=s[r-1].end;e[t].start-a<i?e[t].end>a&&(s[r-1].end=e[t].end):s.push(e[t])}else s.push(e[t])}else s=e;let r,a=0,o=t,n=t;for(let e=0;e<s.length;e++){const l=s[e].start,d=s[e].end;if(t+i>=l&&t<d)o=l,n=d,a=n-t;else if(t+i<l){r=l;break}}return{len:a,start:o||0,end:n||0,nextStart:r}}static getBuffered(e){try{return e.buffered}catch(e){return gc.log("failed to get media.buffered",e),Uf}}}class Of{constructor(e,t,i,s=0,r=-1,a=!1){this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing={start:0,executeStart:0,executeEnd:0,end:0},this.buffering={audio:{start:0,executeStart:0,executeEnd:0,end:0},video:{start:0,executeStart:0,executeEnd:0,end:0},audiovideo:{start:0,executeStart:0,executeEnd:0,end:0}},this.level=e,this.sn=t,this.id=i,this.size=s,this.part=r,this.partial=a}}function Nf(e,t){for(let s=0,r=e.length;s<r;s++){var i;if((null==(i=e[s])?void 0:i.cc)===t)return e[s]}return null}function jf(e,t){if(e){const i=e.start+t;e.start=e.startPTS=i,e.endPTS=i+e.duration}}function Gf(e,t){const i=t.fragments;for(let t=0,s=i.length;t<s;t++)jf(i[t],e);t.fragmentHint&&jf(t.fragmentHint,e),t.alignedSliding=!0}function zf(e,t,i){t&&(!function(e,t,i){if(function(e,t,i){return!(!t||!(i.endCC>i.startCC||e&&e.cc<i.startCC))}(e,i,t)){const e=function(e,t){const i=e.fragments,s=t.fragments;if(!s.length||!i.length)return void gc.log("No fragments to align");const r=Nf(i,s[0].cc);if(r&&(!r||r.startPTS))return r;gc.log("No frag in previous level to align on")}(i,t);e&&oc(e.start)&&(gc.log(`Adjusting PTS using last level due to CC increase within current level ${t.url}`),Gf(e.start,t))}}(e,i,t),!i.alignedSliding&&t&&$f(i,t),i.alignedSliding||!t||i.skippedSegments||Jp(t,i))}function $f(e,t){if(!e.hasProgramDateTime||!t.hasProgramDateTime)return;const i=e.fragments,s=t.fragments;if(!i.length||!s.length)return;let r,a;const o=Math.min(t.endCC,e.endCC);t.startCC<o&&e.startCC<o&&(r=Nf(s,o),a=Nf(i,o)),r&&a||(r=s[Math.floor(s.length/2)],a=Nf(i,r.cc)||i[Math.floor(i.length/2)]);const n=r.programDateTime,l=a.programDateTime;if(!n||!l)return;Gf((l-n)/1e3-(a.start-r.start),e)}const Hf=Math.pow(2,17);class Vf{constructor(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(e,t){const i=e.url;if(!i)return Promise.reject(new qf({type:hc.NETWORK_ERROR,details:cc.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error("Fragment does not have a "+(i?"part list":"url")),networkDetails:null}));this.abort();const s=this.config,r=s.fLoader,a=s.loader;return new Promise(((o,n)=>{if(this.loader&&this.loader.destroy(),e.gap){if(e.tagList.some((e=>"GAP"===e[0])))return void n(Jf(e));e.gap=!1}const l=this.loader=e.loader=r?new r(s):new a(s),d=Wf(e),h=tf(s.fragLoadPolicy.default),c={loadPolicy:h,timeout:h.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:"initSegment"===e.sn?1/0:Hf};e.stats=l.stats,l.load(d,c,{onSuccess:(t,i,s,r)=>{this.resetLoader(e,l);let a=t.data;s.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(a.slice(0,16)),a=a.slice(16)),o({frag:e,part:null,payload:a,networkDetails:r})},onError:(t,s,r,a)=>{this.resetLoader(e,l),n(new qf({type:hc.NETWORK_ERROR,details:cc.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:ic({url:i,data:void 0},t),error:new Error(`HTTP Error ${t.code} ${t.text}`),networkDetails:r,stats:a}))},onAbort:(t,i,s)=>{this.resetLoader(e,l),n(new qf({type:hc.NETWORK_ERROR,details:cc.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:s,stats:t}))},onTimeout:(t,i,s)=>{this.resetLoader(e,l),n(new qf({type:hc.NETWORK_ERROR,details:cc.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${c.timeout}ms`),networkDetails:s,stats:t}))},onProgress:(i,s,r,a)=>{t&&t({frag:e,part:null,payload:r,networkDetails:a})}})}))}loadPart(e,t,i){this.abort();const s=this.config,r=s.fLoader,a=s.loader;return new Promise(((o,n)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap)return void n(Jf(e,t));const l=this.loader=e.loader=r?new r(s):new a(s),d=Wf(e,t),h=tf(s.fragLoadPolicy.default),c={loadPolicy:h,timeout:h.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Hf};t.stats=l.stats,l.load(d,c,{onSuccess:(s,r,a,n)=>{this.resetLoader(e,l),this.updateStatsFromPart(e,t);const d={frag:e,part:t,payload:s.data,networkDetails:n};i(d),o(d)},onError:(i,s,r,a)=>{this.resetLoader(e,l),n(new qf({type:hc.NETWORK_ERROR,details:cc.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:ic({url:d.url,data:void 0},i),error:new Error(`HTTP Error ${i.code} ${i.text}`),networkDetails:r,stats:a}))},onAbort:(i,s,r)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,l),n(new qf({type:hc.NETWORK_ERROR,details:cc.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:r,stats:i}))},onTimeout:(i,s,r)=>{this.resetLoader(e,l),n(new qf({type:hc.NETWORK_ERROR,details:cc.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${c.timeout}ms`),networkDetails:r,stats:i}))}})}))}updateStatsFromPart(e,t){const i=e.stats,s=t.stats,r=s.total;if(i.loaded+=s.loaded,r){const s=Math.round(e.duration/t.duration),a=Math.min(Math.round(i.loaded/r),s),o=(s-a)*Math.round(i.loaded/a);i.total=i.loaded+o}else i.total=Math.max(i.loaded,i.total);const a=i.loading,o=s.loading;a.start?a.first+=o.first-o.start:(a.start=o.start,a.first=o.first),a.end=o.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function Wf(e,t=null){const i=t||e,s={frag:e,part:t,responseType:"arraybuffer",url:i.url,headers:{},rangeStart:0,rangeEnd:0},r=i.byteRangeStartOffset,a=i.byteRangeEndOffset;if(oc(r)&&oc(a)){var o;let t=r,i=a;if("initSegment"===e.sn&&"AES-128"===(null==(o=e.decryptdata)?void 0:o.method)){const e=a-r;e%16&&(i=a+(16-e%16)),0!==r&&(s.resetIV=!0,t=r-16)}s.rangeStart=t,s.rangeEnd=i}return s}function Jf(e,t){const i=new Error(`GAP ${e.gap?"tag":"attribute"} found`),s={type:hc.MEDIA_ERROR,details:cc.FRAG_GAP,fatal:!1,frag:e,error:i,networkDetails:null};return t&&(s.part=t),(t||e).stats.aborted=!0,new qf(s)}class qf extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class Kf{constructor(e,t){this.subtle=void 0,this.aesIV=void 0,this.subtle=e,this.aesIV=t}decrypt(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)}}class Yf{constructor(e,t){this.subtle=void 0,this.key=void 0,this.subtle=e,this.key=t}expandKey(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])}}class Qf{constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(e){const t=new DataView(e),i=new Uint32Array(4);for(let e=0;e<4;e++)i[e]=t.getUint32(4*e);return i}initTable(){const e=this.sBox,t=this.invSBox,i=this.subMix,s=i[0],r=i[1],a=i[2],o=i[3],n=this.invSubMix,l=n[0],d=n[1],h=n[2],c=n[3],u=new Uint32Array(256);let p=0,f=0,m=0;for(m=0;m<256;m++)u[m]=m<128?m<<1:m<<1^283;for(m=0;m<256;m++){let i=f^f<<1^f<<2^f<<3^f<<4;i=i>>>8^255&i^99,e[p]=i,t[i]=p;const n=u[p],m=u[n],g=u[m];let y=257*u[i]^16843008*i;s[p]=y<<24|y>>>8,r[p]=y<<16|y>>>16,a[p]=y<<8|y>>>24,o[p]=y,y=16843009*g^65537*m^257*n^16843008*p,l[i]=y<<24|y>>>8,d[i]=y<<16|y>>>16,h[i]=y<<8|y>>>24,c[i]=y,p?(p=n^u[u[u[g^n]]],f^=u[u[f]]):p=f=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let i=!0,s=0;for(;s<t.length&&i;)i=t[s]===this.key[s],s++;if(i)return;this.key=t;const r=this.keySize=t.length;if(4!==r&&6!==r&&8!==r)throw new Error("Invalid aes key size="+r);const a=this.ksRows=4*(r+6+1);let o,n;const l=this.keySchedule=new Uint32Array(a),d=this.invKeySchedule=new Uint32Array(a),h=this.sBox,c=this.rcon,u=this.invSubMix,p=u[0],f=u[1],m=u[2],g=u[3];let y,A;for(o=0;o<a;o++)o<r?y=l[o]=t[o]:(A=y,o%r==0?(A=A<<8|A>>>24,A=h[A>>>24]<<24|h[A>>>16&255]<<16|h[A>>>8&255]<<8|h[255&A],A^=c[o/r|0]<<24):r>6&&o%r==4&&(A=h[A>>>24]<<24|h[A>>>16&255]<<16|h[A>>>8&255]<<8|h[255&A]),l[o]=y=(l[o-r]^A)>>>0);for(n=0;n<a;n++)o=a-n,A=3&n?l[o]:l[o-4],d[n]=n<4||o<=4?A:p[h[A>>>24]]^f[h[A>>>16&255]]^m[h[A>>>8&255]]^g[h[255&A]],d[n]=d[n]>>>0}networkToHostOrderSwap(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24}decrypt(e,t,i){const s=this.keySize+6,r=this.invKeySchedule,a=this.invSBox,o=this.invSubMix,n=o[0],l=o[1],d=o[2],h=o[3],c=this.uint8ArrayToUint32Array_(i);let u=c[0],p=c[1],f=c[2],m=c[3];const g=new Int32Array(e),y=new Int32Array(g.length);let A,b,_,v,w,S,T,E,k,C,x,R,D,L;const I=this.networkToHostOrderSwap;for(;t<g.length;){for(k=I(g[t]),C=I(g[t+1]),x=I(g[t+2]),R=I(g[t+3]),w=k^r[0],S=R^r[1],T=x^r[2],E=C^r[3],D=4,L=1;L<s;L++)A=n[w>>>24]^l[S>>16&255]^d[T>>8&255]^h[255&E]^r[D],b=n[S>>>24]^l[T>>16&255]^d[E>>8&255]^h[255&w]^r[D+1],_=n[T>>>24]^l[E>>16&255]^d[w>>8&255]^h[255&S]^r[D+2],v=n[E>>>24]^l[w>>16&255]^d[S>>8&255]^h[255&T]^r[D+3],w=A,S=b,T=_,E=v,D+=4;A=a[w>>>24]<<24^a[S>>16&255]<<16^a[T>>8&255]<<8^a[255&E]^r[D],b=a[S>>>24]<<24^a[T>>16&255]<<16^a[E>>8&255]<<8^a[255&w]^r[D+1],_=a[T>>>24]<<24^a[E>>16&255]<<16^a[w>>8&255]<<8^a[255&S]^r[D+2],v=a[E>>>24]<<24^a[w>>16&255]<<16^a[S>>8&255]<<8^a[255&T]^r[D+3],y[t]=I(A^u),y[t+1]=I(v^p),y[t+2]=I(_^f),y[t+3]=I(b^m),u=k,p=C,f=x,m=R,t+=4}return y.buffer}}class Xf{constructor(e,{removePKCS7Padding:t=!0}={}){if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.useSoftware=e.enableSoftwareAES,this.removePKCS7Padding=t,t)try{const e=self.crypto;e&&(this.subtle=e.subtle||e.webkitSubtle)}catch(e){}null===this.subtle&&(this.useSoftware=!0)}destroy(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null}isSync(){return this.useSoftware}flush(){const{currentResult:e,remainderData:t}=this;if(!e||t)return this.reset(),null;const i=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?function(e){const t=e.byteLength,i=t&&new DataView(e.buffer).getUint8(t-1);return i?Vc(e,0,t-i):e}(i):i}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,i){return this.useSoftware?new Promise(((s,r)=>{this.softwareDecrypt(new Uint8Array(e),t,i);const a=this.flush();a?s(a.buffer):r(new Error("[softwareDecrypt] Failed to decrypt data"))})):this.webCryptoDecrypt(new Uint8Array(e),t,i)}softwareDecrypt(e,t,i){const{currentIV:s,currentResult:r,remainderData:a}=this;this.logOnce("JS AES decrypt"),a&&(e=xu(a,e),this.remainderData=null);const o=this.getValidChunk(e);if(!o.length)return null;s&&(i=s);let n=this.softwareDecrypter;n||(n=this.softwareDecrypter=new Qf),n.expandKey(t);const l=r;return this.currentResult=n.decrypt(o.buffer,0,i),this.currentIV=Vc(o,-16).buffer,l||null}webCryptoDecrypt(e,t,i){const s=this.subtle;return this.key===t&&this.fastAesKey||(this.key=t,this.fastAesKey=new Yf(s,t)),this.fastAesKey.expandKey().then((t=>{if(!s)return Promise.reject(new Error("web crypto not initialized"));this.logOnce("WebCrypto AES decrypt");return new Kf(s,new Uint8Array(i)).decrypt(e.buffer,t)})).catch((s=>(gc.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${s.name}: ${s.message}`),this.onWebCryptoError(e,t,i))))}onWebCryptoError(e,t,i){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,i);const s=this.flush();if(s)return s.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")}getValidChunk(e){let t=e;const i=e.length-e.length%16;return i!==e.length&&(t=Vc(e,0,i),this.remainderData=Vc(e,i)),t}logOnce(e){this.logEnabled&&(gc.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const Zf=function(e){let t="";const i=e.length;for(let s=0;s<i;s++)t+=`[${e.start(s).toFixed(3)}-${e.end(s).toFixed(3)}]`;return t},em="STOPPED",tm="IDLE",im="KEY_LOADING",sm="FRAG_LOADING",rm="FRAG_LOADING_WAITING_RETRY",am="WAITING_TRACK",om="PARSING",nm="PARSED",lm="ENDED",dm="ERROR",hm="WAITING_INIT_PTS",cm="WAITING_LEVEL";class um extends xf{constructor(e,t,i,s,r){super(),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=em,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.loadedmetadata=!1,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.onvseeking=null,this.onvended=null,this.logPrefix="",this.log=void 0,this.warn=void 0,this.playlistType=r,this.logPrefix=s,this.log=gc.log.bind(gc,`${s}:`),this.warn=gc.warn.bind(gc,`${s}:`),this.hls=e,this.fragmentLoader=new Vf(e.config),this.keyLoader=i,this.fragmentTracker=t,this.config=e.config,this.decrypter=new Xf(e.config),e.on(dc.MANIFEST_LOADED,this.onManifestLoaded,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);const e=this.fragCurrent;null!=e&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=em}_streamEnded(e,t){if(t.live||e.nextStart||!e.end||!this.media)return!1;const i=t.partList;if(null!=i&&i.length){const e=i[i.length-1];return Ff.isBuffered(this.media,e.start+e.duration/2)}const s=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(s)}getLevelDetails(){var e;if(this.levels&&null!==this.levelLastLoaded)return null==(e=this.levelLastLoaded)?void 0:e.details}onMediaAttached(e,t){const i=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),i.addEventListener("seeking",this.onvseeking),i.addEventListener("ended",this.onvended);const s=this.config;this.levels&&s.autoStartLoad&&this.state===em&&this.startLoad(s.startPosition)}onMediaDetaching(){const e=this.media;null!=e&&e.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&this.onvseeking&&this.onvended&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.keyLoader&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}onMediaSeeking(){const{config:e,fragCurrent:t,media:i,mediaBuffer:s,state:r}=this,a=i?i.currentTime:0,o=Ff.bufferInfo(s||i,a,e.maxBufferHole);if(this.log(`media seeking to ${oc(a)?a.toFixed(3):a}, state: ${r}`),this.state===lm)this.resetLoadingState();else if(t){const i=e.maxFragLookUpTolerance,s=t.start-i,r=t.start+t.duration+i;if(!o.len||r<o.start||s>o.end){const e=a>r;(a<s||e)&&(e&&t.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),t.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}i&&(this.fragmentTracker.removeFragmentsInRange(a,1/0,this.playlistType,!0),this.lastCurrentTime=a),this.loadedmetadata||o.len||(this.nextLoadPosition=this.startPosition=a),this.tickImmediate()}onMediaEnded(){this.startPosition=this.lastCurrentTime=0}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset,this.initPTS=[]}onHandlerDestroying(){this.hls.off(dc.MANIFEST_LOADED,this.onManifestLoaded,this),this.stopLoad(),super.onHandlerDestroying(),this.hls=null}onHandlerDestroyed(){this.state=em,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,super.onHandlerDestroyed()}loadFragment(e,t,i){this._loadFragForPlayback(e,t,i)}_loadFragForPlayback(e,t,i){this._doFragLoad(e,t,i,(t=>{if(this.fragContextChanged(e))return this.warn(`Fragment ${e.sn}${t.part?" p: "+t.part.index:""} of level ${e.level} was dropped during download.`),void this.fragmentTracker.removeFragment(e);e.stats.chunkCount++,this._handleFragmentLoadProgress(t)})).then((t=>{if(!t)return;const i=this.state;this.fragContextChanged(e)?(i===sm||!this.fragCurrent&&i===om)&&(this.fragmentTracker.removeFragment(e),this.state=tm):("payload"in t&&(this.log(`Loaded fragment ${e.sn} of level ${e.level}`),this.hls.trigger(dc.FRAG_LOADED,t)),this._handleFragmentLoadComplete(t))})).catch((t=>{this.state!==em&&this.state!==dm&&(this.warn(t),this.resetFragmentLoading(e))}))}clearTrackerIfNeeded(e){var t;const{fragmentTracker:i}=this;if(i.getState(e)===Df){const t=e.type,s=this.getFwdBufferInfo(this.mediaBuffer,t),r=Math.max(e.duration,s?s.len:this.config.maxBufferLength);this.reduceMaxBufferLength(r)&&i.removeFragment(e)}else 0===(null==(t=this.mediaBuffer)?void 0:t.buffered.length)?i.removeAllFragments():i.hasParts(e.type)&&(i.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),i.getState(e)===Lf&&i.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}flushMainBuffer(e,t,i=null){if(!(e-t))return;const s={startOffset:e,endOffset:t,type:i};this.hls.trigger(dc.BUFFER_FLUSHING,s)}_loadInitSegment(e,t){this._doFragLoad(e,t).then((t=>{if(!t||this.fragContextChanged(e)||!this.levels)throw new Error("init load aborted");return t})).then((t=>{const{hls:i}=this,{payload:s}=t,r=e.decryptdata;if(s&&s.byteLength>0&&null!=r&&r.key&&r.iv&&"AES-128"===r.method){const a=self.performance.now();return this.decrypter.decrypt(new Uint8Array(s),r.key.buffer,r.iv.buffer).catch((t=>{throw i.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.FRAG_DECRYPT_ERROR,fatal:!1,error:t,reason:t.message,frag:e}),t})).then((s=>{const r=self.performance.now();return i.trigger(dc.FRAG_DECRYPTED,{frag:e,payload:s,stats:{tstart:a,tdecrypt:r}}),t.payload=s,this.completeInitSegmentLoad(t)}))}return this.completeInitSegmentLoad(t)})).catch((t=>{this.state!==em&&this.state!==dm&&(this.warn(t),this.resetFragmentLoading(e))}))}completeInitSegmentLoad(e){const{levels:t}=this;if(!t)throw new Error("init load aborted, missing levels");const i=e.frag.stats;this.state=tm,e.frag.data=new Uint8Array(e.payload),i.parsing.start=i.buffering.start=self.performance.now(),i.parsing.end=i.buffering.end=self.performance.now(),this.tick()}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.sn!==t.sn||e.level!==t.level}fragBufferedComplete(e,t){var i,s,r,a;const o=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.playlistType===gp?"level":"track"} ${e.level} (frag:[${(null!=(i=e.startPTS)?i:NaN).toFixed(3)}-${(null!=(s=e.endPTS)?s:NaN).toFixed(3)}] > buffer:${o?Zf(Ff.getBuffered(o)):"(detached)"})`),"initSegment"!==e.sn){var n;if(e.type!==Ap){const t=e.elementaryStreams;if(!Object.keys(t).some((e=>!!t[e])))return void(this.state=tm)}const t=null==(n=this.levels)?void 0:n[e.level];null!=t&&t.fragmentError&&(this.log(`Resetting level fragment error count of ${t.fragmentError} on frag buffered`),t.fragmentError=0)}this.state=tm,o&&(!this.loadedmetadata&&e.type==gp&&o.buffered.length&&(null==(r=this.fragCurrent)?void 0:r.sn)===(null==(a=this.fragPrevious)?void 0:a.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())}seekToStartPos(){}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:i,part:s,partsLoaded:r}=e,a=!r||0===r.length||r.some((e=>!e)),o=new Of(i.level,i.sn,i.stats.chunkCount+1,0,s?s.index:-1,!a);t.flush(o)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,i=null,s){var r;const a=null==t?void 0:t.details;if(!this.levels||!a)throw new Error(`frag load aborted, missing level${a?"":" detail"}s`);let o=null;if(!e.encrypted||null!=(r=e.decryptdata)&&r.key?!e.encrypted&&a.encryptedFragments.length&&this.keyLoader.loadClear(e,a.encryptedFragments):(this.log(`Loading key for ${e.sn} of [${a.startSN}-${a.endSN}], ${"[stream-controller]"===this.logPrefix?"level":"track"} ${e.level}`),this.state=im,this.fragCurrent=e,o=this.keyLoader.load(e).then((e=>{if(!this.fragContextChanged(e.frag))return this.hls.trigger(dc.KEY_LOADED,e),this.state===im&&(this.state=tm),e})),this.hls.trigger(dc.KEY_LOADING,{frag:e}),null===this.fragCurrent&&(o=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))),i=Math.max(e.start,i||0),this.config.lowLatencyMode&&"initSegment"!==e.sn){const r=a.partList;if(r&&s){i>e.end&&a.fragmentHint&&(e=a.fragmentHint);const n=this.getNextPart(r,e,i);if(n>-1){const l=r[n];let d;return this.log(`Loading part sn: ${e.sn} p: ${l.index} cc: ${e.cc} of playlist [${a.startSN}-${a.endSN}] parts [0-${n}-${r.length-1}] ${"[stream-controller]"===this.logPrefix?"level":"track"}: ${e.level}, target: ${parseFloat(i.toFixed(3))}`),this.nextLoadPosition=l.start+l.duration,this.state=sm,d=o?o.then((i=>!i||this.fragContextChanged(i.frag)?null:this.doFragPartsLoad(e,l,t,s))).catch((e=>this.handleFragLoadError(e))):this.doFragPartsLoad(e,l,t,s).catch((e=>this.handleFragLoadError(e))),this.hls.trigger(dc.FRAG_LOADING,{frag:e,part:l,targetBufferTime:i}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):d}if(!e.url||this.loadedEndOfParts(r,i))return Promise.resolve(null)}}this.log(`Loading fragment ${e.sn} cc: ${e.cc} ${a?"of ["+a.startSN+"-"+a.endSN+"] ":""}${"[stream-controller]"===this.logPrefix?"level":"track"}: ${e.level}, target: ${parseFloat(i.toFixed(3))}`),oc(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=sm;const n=this.config.progressive;let l;return l=n&&o?o.then((t=>!t||this.fragContextChanged(null==t?void 0:t.frag)?null:this.fragmentLoader.load(e,s))).catch((e=>this.handleFragLoadError(e))):Promise.all([this.fragmentLoader.load(e,n?s:void 0),o]).then((([e])=>(!n&&e&&s&&s(e),e))).catch((e=>this.handleFragLoadError(e))),this.hls.trigger(dc.FRAG_LOADING,{frag:e,targetBufferTime:i}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):l}doFragPartsLoad(e,t,i,s){return new Promise(((r,a)=>{var o;const n=[],l=null==(o=i.details)?void 0:o.partList,d=t=>{this.fragmentLoader.loadPart(e,t,s).then((s=>{n[t.index]=s;const a=s.part;this.hls.trigger(dc.FRAG_LOADED,s);const o=Kp(i,e.sn,t.index+1)||Yp(l,e.sn,t.index+1);if(!o)return r({frag:e,part:a,partsLoaded:n});d(o)})).catch(a)};d(t)}))}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===cc.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(dc.ERROR,t)}else this.hls.trigger(dc.ERROR,{type:hc.OTHER_ERROR,details:cc.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==om)return void(this.fragCurrent||this.state===em||this.state===dm||(this.state=tm));const{frag:i,part:s,level:r}=t,a=self.performance.now();i.stats.parsing.end=a,s&&(s.stats.parsing.end=a),this.updateLevelTiming(i,s,r,e.partial)}getCurrentContext(e){const{levels:t,fragCurrent:i}=this,{level:s,sn:r,part:a}=e;if(null==t||!t[s])return this.warn(`Levels object was unset while buffering fragment ${r} of level ${s}. The current chunk will not be buffered.`),null;const o=t[s],n=a>-1?Kp(o,r,a):null,l=n?n.fragment:function(e,t,i){if(null==e||!e.details)return null;const s=e.details;let r=s.fragments[t-s.startSN];return r||(r=s.fragmentHint,r&&r.sn===t?r:t<s.startSN&&i&&i.sn===t?i:null)}(o,r,i);return l?(i&&i!==l&&(l.stats=i.stats),{frag:l,part:n,level:o}):null}bufferFragmentData(e,t,i,s,r){var a;if(!e||this.state!==om)return;const{data1:o,data2:n}=e;let l=o;if(o&&n&&(l=xu(o,n)),null==(a=l)||!a.length)return;const d={type:e.type,frag:t,part:i,chunkMeta:s,parent:t.type,data:l};if(this.hls.trigger(dc.BUFFER_APPENDING,d),e.dropped&&e.independent&&!i){if(r)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!Ff.isBuffered(t,t.currentTime))return void this.flushMainBuffer(0,e.start);const i=t.currentTime,s=Ff.bufferInfo(t,i,0),r=e.duration,a=Math.min(2*this.config.maxFragLookUpTolerance,.25*r),o=Math.max(Math.min(e.start-a,s.end-a),i+a);e.start-o>a&&this.flushMainBuffer(o,e.start)}getFwdBufferInfo(e,t){const i=this.getLoadPosition();return oc(i)?this.getFwdBufferInfoAtPos(e,i,t):null}getFwdBufferInfoAtPos(e,t,i){const{config:{maxBufferHole:s}}=this,r=Ff.bufferInfo(e,t,s);if(0===r.len&&void 0!==r.nextStart){const a=this.fragmentTracker.getBufferedFrag(t,i);if(a&&r.nextStart<a.end)return Ff.bufferInfo(e,t,Math.max(r.nextStart,s))}return r}getMaxBufferLength(e){const{config:t}=this;let i;return i=e?Math.max(8*t.maxBufferSize/e,t.maxBufferLength):t.maxBufferLength,Math.min(i,t.maxMaxBufferLength)}reduceMaxBufferLength(e){const t=this.config,i=e||t.maxBufferLength;return t.maxMaxBufferLength>=i&&(t.maxMaxBufferLength/=2,this.warn(`Reduce max buffer length to ${t.maxMaxBufferLength}s`),!0)}getAppendedFrag(e,t=gp){const i=this.fragmentTracker.getAppendedFrag(e,gp);return i&&"fragment"in i?i.fragment:i}getNextFragment(e,t){const i=t.fragments,s=i.length;if(!s)return null;const{config:r}=this,a=i[0].start;let o;if(t.live){const n=r.initialLiveManifestSize;if(s<n)return this.warn(`Not enough fragments to start playback (have: ${s}, need: ${n})`),null;(!t.PTSKnown&&!this.startFragRequested&&-1===this.startPosition||e<a)&&(o=this.getInitialLiveFragment(t,i),this.startPosition=this.nextLoadPosition=o?this.hls.liveSyncPosition||o.start:e)}else e<=a&&(o=i[0]);if(!o){const i=r.lowLatencyMode?t.partEnd:t.fragmentEnd;o=this.getFragmentAtPosition(e,i,t)}return this.mapToInitFragWhenRequired(o)}isLoopLoading(e,t){const i=this.fragmentTracker.getState(e);return(i===If||i===Lf&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,i,s,r){const a=e.gap,o=this.getNextFragment(this.nextLoadPosition,t);if(null===o)return o;if(e=o,a&&e&&!e.gap&&i.nextStart){const t=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,i.nextStart,s);if(null!==t&&i.len+t.len>=r)return this.log(`buffer full after gaps in "${s}" playlist starting at sn: ${e.sn}`),null}return e}mapToInitFragWhenRequired(e){return null==e||!e.initSegment||null!=e&&e.initSegment.data||this.bitrateTest?e:e.initSegment}getNextPart(e,t,i){let s=-1,r=!1,a=!0;for(let o=0,n=e.length;o<n;o++){const n=e[o];if(a=a&&!n.independent,s>-1&&i<n.start)break;const l=n.loaded;l?s=-1:(r||n.independent||a)&&n.fragment===t&&(s=o),r=l}return s}loadedEndOfParts(e,t){const i=e[e.length-1];return i&&t>i.start&&i.loaded}getInitialLiveFragment(e,t){const i=this.fragPrevious;let s=null;if(i){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${i.programDateTime}`),s=function(e,t,i){if(null===t||!Array.isArray(e)||!e.length||!oc(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;i=i||0;for(let s=0;s<e.length;++s){const r=e[s];if(nf(t,i,r))return r}return null}(t,i.endProgramDateTime,this.config.maxFragLookUpTolerance)),!s){const r=i.sn+1;if(r>=e.startSN&&r<=e.endSN){const a=t[r-e.startSN];i.cc===a.cc&&(s=a,this.log(`Live playlist, switching playlist, load frag with next SN: ${s.sn}`))}s||(s=function(e,t){return rf(e,(e=>e.cc<t?1:e.cc>t?-1:0))}(t,i.cc),s&&this.log(`Live playlist, switching playlist, load frag with same CC: ${s.sn}`))}}else{const t=this.hls.liveSyncPosition;null!==t&&(s=this.getFragmentAtPosition(t,this.bitrateTest?e.fragmentEnd:e.edge,e))}return s}getFragmentAtPosition(e,t,i){const{config:s}=this;let{fragPrevious:r}=this,{fragments:a,endSN:o}=i;const{fragmentHint:n}=i,l=s.maxFragLookUpTolerance,d=i.partList,h=!!(s.lowLatencyMode&&null!=d&&d.length&&n);let c;if(h&&n&&!this.bitrateTest&&(a=a.concat(n),o=n.sn),e<t){c=af(r,a,e,e>t-l?0:l)}else c=a[a.length-1];if(c){const e=c.sn-i.startSN,t=this.fragmentTracker.getState(c);if((t===If||t===Lf&&c.gap)&&(r=c),r&&c.sn===r.sn&&(!h||d[0].fragment.sn>c.sn)){if(r&&c.level===r.level){const t=a[e+1];c=c.sn<o&&this.fragmentTracker.getState(t)!==If?t:null}}}return c}synchronizeToLiveEdge(e){const{config:t,media:i}=this;if(!i)return;const s=this.hls.liveSyncPosition,r=i.currentTime,a=e.fragments[0].start,o=e.edge,n=r>=a-t.maxFragLookUpTolerance&&r<=o;if(null!==s&&i.duration>s&&(r<s||!n)){const a=void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!n&&i.readyState<4||r<o-a)&&(this.loadedmetadata||(this.nextLoadPosition=s),i.readyState&&(this.warn(`Playback: ${r.toFixed(3)} is located too far from the end of live sliding playlist: ${o}, reset currentTime to : ${s.toFixed(3)}`),i.currentTime=s))}}alignPlaylists(e,t,i){const s=e.fragments.length;if(!s)return this.warn("No fragments in live playlist"),0;const r=e.fragments[0].start,a=!t,o=e.alignedSliding&&oc(r);if(a||!o&&!r){const{fragPrevious:r}=this;zf(r,i,e);const a=e.fragments[0].start;return this.log(`Live playlist sliding: ${a.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} prev-sn: ${r?r.sn:"na"} fragments: ${s}`),a}return r}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)}setStartPosition(e,t){let i=this.startPosition;if(i<t&&(i=-1),-1===i||-1===this.lastCurrentTime){const s=null!==this.startTimeOffset,r=s?this.startTimeOffset:e.startTimeOffset;null!==r&&oc(r)?(i=t+r,r<0&&(i+=e.totalduration),i=Math.min(Math.max(t,i),t+e.totalduration),this.log(`Start time offset ${r} found in ${s?"multivariant":"media"} playlist, adjust startPosition to ${i}`),this.startPosition=i):e.live?i=this.hls.liveSyncPosition||t:this.startPosition=i=0,this.lastCurrentTime=i}this.nextLoadPosition=i}getLoadPosition(){const{media:e}=this;let t=0;return this.loadedmetadata&&e?t=e.currentTime:this.nextLoadPosition&&(t=this.nextLoadPosition),t}handleFragLoadAborted(e,t){this.transmuxer&&"initSegment"!==e.sn&&e.stats.aborted&&(this.warn(`Fragment ${e.sn}${t?" part "+t.index:""} of level ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){this.fragCurrent&&(this.fragContextChanged(e)||this.state===rm)||(this.state=tm)}onFragmentOrKeyLoadError(e,t){if(t.chunkMeta&&!t.frag){const e=this.getCurrentContext(t.chunkMeta);e&&(t.frag=e.frag)}const i=t.frag;if(!i||i.type!==e||!this.levels)return;var s;if(this.fragContextChanged(i))return void this.warn(`Frag load error must match current frag to retry ${i.url} > ${null==(s=this.fragCurrent)?void 0:s.url}`);const r=t.details===cc.FRAG_GAP;r&&this.fragmentTracker.fragBuffered(i,!0);const a=t.errorAction,{action:o,retryCount:n=0,retryConfig:l}=a||{};if(a&&o===cf&&l){this.resetStartWhenNotLoaded(this.levelLastLoaded);const s=ef(l,n);this.warn(`Fragment ${i.sn} of ${e} ${i.level} errored with ${t.details}, retrying loading ${n+1}/${l.maxNumRetry} in ${s}ms`),a.resolved=!0,this.retryDate=self.performance.now()+s,this.state=rm}else if(l&&a){if(this.resetFragmentErrors(e),!(n<l.maxNumRetry))return void gc.warn(`${t.details} reached or exceeded max retry (${n})`);r||o===hf||(a.resolved=!0)}else(null==a?void 0:a.action)===df?this.state=cm:this.state=dm;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===om||this.state===nm){const t=e.parent,i=this.getFwdBufferInfo(this.mediaBuffer,t),s=i&&i.len>.5;s&&this.reduceMaxBufferLength(i.len);const r=!s;return r&&this.warn(`Buffer full error while media.currentTime is not buffered, flush ${t} buffer`),e.frag&&(this.fragmentTracker.removeFragment(e.frag),this.nextLoadPosition=e.frag.start),this.resetLoadingState(),r}return!1}resetFragmentErrors(e){e===yp&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==em&&(this.state=tm)}afterBufferFlushed(e,t,i){if(!e)return;const s=Ff.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,s,i),this.state===lm&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=tm}resetStartWhenNotLoaded(e){if(!this.loadedmetadata){this.startFragRequested=!1;const t=e?e.details:null;null!=t&&t.live?(this.startPosition=-1,this.setStartPosition(t,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){this.warn(`The loading context changed while buffering fragment ${e.sn} of level ${e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,i,s){var r;const a=i.details;if(!a)return void this.warn("level.details undefined");if(!Object.keys(e.elementaryStreams).reduce(((t,r)=>{const o=e.elementaryStreams[r];if(o){const n=o.endPTS-o.startPTS;if(n<=0)return this.warn(`Could not parse fragment ${e.sn} ${r} duration reliably (${n})`),t||!1;const l=s?0:Vp(a,e,o.startPTS,o.endPTS,o.startDTS,o.endDTS);return this.hls.trigger(dc.LEVEL_PTS_UPDATED,{details:a,level:i,drift:l,type:r,frag:e,start:o.startPTS,end:o.endPTS}),!0}return t}),!1)&&null===(null==(r=this.transmuxer)?void 0:r.error)){const t=new Error(`Found no media in fragment ${e.sn} of level ${e.level} resetting transmuxer to fallback to playlist timing`);if(0===i.fragmentError&&(i.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)),this.warn(t.message),this.hls.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.FRAG_PARSING_ERROR,fatal:!1,error:t,frag:e,reason:`Found no media in msn ${e.sn} of level "${i.url}"`}),!this.hls)return;this.resetTransmuxer()}this.state=nm,this.hls.trigger(dc.FRAG_PARSED,{frag:e,part:t})}resetTransmuxer(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)}recoverWorkerError(e){"demuxerWorker"===e.event&&(this.fragmentTracker.removeAllFragments(),this.resetTransmuxer(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}class pm{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let i;return e.length?(i=1===e.length?e[0]:function(e,t){const i=new Uint8Array(t);let s=0;for(let t=0;t<e.length;t++){const r=e[t];i.set(r,s),s+=r.length}return i}(e,t),this.reset(),i):new Uint8Array(0)}reset(){this.chunks.length=0,this.dataLength=0}}function fm(e="",t=9e4){return{type:e,id:-1,pid:-1,inputTimeScale:t,sequenceNumber:-1,samples:[],dropped:0}}class mm{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(e,t,i,s){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,t){return!1}appendFrame(e,t,i){}demux(e,t){this.cachedData&&(e=xu(this.cachedData,e),this.cachedData=null);let i,s=qc(e,0),r=s?s.length:0;const a=this._audioTrack,o=this._id3Track,n=s?Qc(s):void 0,l=e.length;for((null===this.basePTS||0===this.frameIndex&&oc(n))&&(this.basePTS=gm(n,t,this.initPTS),this.lastPTS=this.basePTS),null===this.lastPTS&&(this.lastPTS=this.basePTS),s&&s.length>0&&o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:s,type:Cp,duration:Number.POSITIVE_INFINITY});r<l;){if(this.canParse(e,r)){const t=this.appendFrame(a,e,r);t?(this.frameIndex++,this.lastPTS=t.sample.pts,r+=t.length,i=r):r=l}else Yc(e,r)?(s=qc(e,r),o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:s,type:Cp,duration:Number.POSITIVE_INFINITY}),r+=s.length,i=r):r++;if(r===l&&i!==l){const t=Vc(e,i);this.cachedData?this.cachedData=xu(this.cachedData,t):this.cachedData=t}}return{audioTrack:a,videoTrack:fm(),id3Track:o,textTrack:fm()}}demuxSampleAes(e,t,i){return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`))}flush(e){const t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:fm(),id3Track:this._id3Track,textTrack:fm()}}destroy(){}}const gm=(e,t,i)=>{if(oc(e))return 90*e;return 9e4*t+(i?9e4*i.baseTime/i.timescale:0)};function ym(e,t){return 255===e[t]&&240==(246&e[t+1])}function Am(e,t){return 1&e[t+1]?7:9}function bm(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function _m(e,t){return t+1<e.length&&ym(e,t)}function vm(e,t){if(_m(e,t)){const i=Am(e,t);if(t+i>=e.length)return!1;const s=bm(e,t);if(s<=i)return!1;const r=t+s;return r===e.length||_m(e,r)}return!1}function wm(e,t,i,s,r){if(!e.samplerate){const a=function(e,t,i,s){let r,a,o,n;const l=navigator.userAgent.toLowerCase(),d=s,h=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];r=1+((192&t[i+2])>>>6);const c=(60&t[i+2])>>>2;if(!(c>h.length-1))return o=(1&t[i+2])<<2,o|=(192&t[i+3])>>>6,gc.log(`manifest codec:${s}, ADTS type:${r}, samplingIndex:${c}`),/firefox/i.test(l)?c>=6?(r=5,n=new Array(4),a=c-3):(r=2,n=new Array(2),a=c):-1!==l.indexOf("android")?(r=2,n=new Array(2),a=c):(r=5,n=new Array(4),s&&(-1!==s.indexOf("mp4a.40.29")||-1!==s.indexOf("mp4a.40.5"))||!s&&c>=6?a=c-3:((s&&-1!==s.indexOf("mp4a.40.2")&&(c>=6&&1===o||/vivaldi/i.test(l))||!s&&1===o)&&(r=2,n=new Array(2)),a=c)),n[0]=r<<3,n[0]|=(14&c)>>1,n[1]|=(1&c)<<7,n[1]|=o<<3,5===r&&(n[1]|=(14&a)>>1,n[2]=(1&a)<<7,n[2]|=8,n[3]=0),{config:n,samplerate:h[c],channelCount:o,codec:"mp4a.40."+r,manifestCodec:d};{const t=new Error(`invalid ADTS sampling index:${c}`);e.emit(dc.ERROR,dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.FRAG_PARSING_ERROR,fatal:!0,error:t,reason:t.message})}}(t,i,s,r);if(!a)return;e.config=a.config,e.samplerate=a.samplerate,e.channelCount=a.channelCount,e.codec=a.codec,e.manifestCodec=a.manifestCodec,gc.log(`parsed codec:${e.codec}, rate:${a.samplerate}, channels:${a.channelCount}`)}}function Sm(e){return 9216e4/e}function Tm(e,t,i,s,r){const a=s+r*Sm(e.samplerate),o=function(e,t){const i=Am(e,t);if(t+i<=e.length){const s=bm(e,t)-i;if(s>0)return{headerLength:i,frameLength:s}}}(t,i);let n;if(o){const{frameLength:s,headerLength:r}=o,l=r+s,d=Math.max(0,i+l-t.length);d?(n=new Uint8Array(l-r),n.set(t.subarray(i+r,t.length),0)):n=t.subarray(i+r,i+l);const h={unit:n,pts:a};return d||e.samples.push(h),{sample:h,length:l,missing:d}}const l=t.length-i;n=new Uint8Array(l),n.set(t.subarray(i,t.length),0);return{sample:{unit:n,pts:a},length:l,missing:-1}}let Em=null;const km=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],Cm=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],xm=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Rm=[0,1,1,4];function Dm(e,t,i,s,r){if(i+24>t.length)return;const a=Lm(t,i);if(a&&i+a.frameLength<=t.length){const o=s+r*(9e4*a.samplesPerFrame/a.sampleRate),n={unit:t.subarray(i,i+a.frameLength),pts:o,dts:o};return e.config=[],e.channelCount=a.channelCount,e.samplerate=a.sampleRate,e.samples.push(n),{sample:n,length:a.frameLength,missing:0}}}function Lm(e,t){const i=e[t+1]>>3&3,s=e[t+1]>>1&3,r=e[t+2]>>4&15,a=e[t+2]>>2&3;if(1!==i&&0!==r&&15!==r&&3!==a){const o=e[t+2]>>1&1,n=e[t+3]>>6,l=1e3*km[14*(3===i?3-s:3===s?3:4)+r-1],d=Cm[3*(3===i?0:2===i?1:2)+a],h=3===n?1:2,c=xm[i][s],u=Rm[s],p=8*c*u,f=Math.floor(c*l/d+o)*u;if(null===Em){const e=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Em=e?parseInt(e[1]):0}return!!Em&&Em<=87&&2===s&&l>=224e3&&0===n&&(e[t+3]=128|e[t+3]),{sampleRate:d,channelCount:h,frameLength:f,samplesPerFrame:p}}}function Im(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function Pm(e,t){return t+1<e.length&&Im(e,t)}function Bm(e,t){if(t+1<e.length&&Im(e,t)){const i=4,s=Lm(e,t);let r=i;null!=s&&s.frameLength&&(r=s.frameLength);const a=t+r;return a===e.length||Pm(e,a)}return!1}const Mm=/\/emsg[-/]ID3/i;const Um=(e,t)=>{let i=0,s=5;t+=s;const r=new Uint32Array(1),a=new Uint32Array(1),o=new Uint8Array(1);for(;s>0;){o[0]=e[t];const n=Math.min(s,8),l=8-n;a[0]=4278190080>>>24+l<<l,r[0]=(o[0]&a[0])>>l,i=i?i<<n|r[0]:r[0],t+=1,s-=n}return i};class Fm extends mm{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,t,i,s){super.resetInitSegment(e,t,i,s),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:s,inputTimeScale:9e4,dropped:0}}canParse(e,t){return t+64<e.length}appendFrame(e,t,i){const s=Om(e,t,i,this.basePTS,this.frameIndex);if(-1!==s){return{sample:e.samples[e.samples.length-1],length:s,missing:0}}}static probe(e){if(!e)return!1;const t=qc(e,0);if(!t)return!1;const i=t.length;return 11===e[i]&&119===e[i+1]&&void 0!==Qc(t)&&Um(e,i)<16}}function Om(e,t,i,s,r){if(i+8>t.length)return-1;if(11!==t[i]||119!==t[i+1])return-1;const a=t[i+4]>>6;if(a>=3)return-1;const o=[48e3,44100,32e3][a],n=63&t[i+4],l=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*n+a];if(i+l>t.length)return-1;const d=t[i+6]>>5;let h=0;2===d?h+=2:(1&d&&1!==d&&(h+=2),4&d&&(h+=2));const c=(t[i+6]<<8|t[i+7])>>12-h&1,u=[2,1,2,3,3,4,4,5][d]+c,p=t[i+5]>>3,f=7&t[i+5],m=new Uint8Array([a<<6|p<<1|f>>2,(3&f)<<6|d<<3|c<<2|n>>4,n<<4&224]),g=s+r*(1536/o*9e4),y=t.subarray(i,i+l);return e.config=m,e.channelCount=u,e.samplerate=o,e.samples.push({unit:y,pts:g}),l}class Nm{constructor(){this.VideoSample=null}createVideoSample(e,t,i,s){return{key:e,frame:!1,pts:t,dts:i,units:[],debug:s,length:0}}getLastNalUnit(e){var t;let i,s=this.VideoSample;if(s&&0!==s.units.length||(s=e[e.length-1]),null!=(t=s)&&t.units){const e=s.units;i=e[e.length-1]}return i}pushAccessUnit(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){const i=t.samples,s=i.length;if(!s)return void t.dropped++;{const t=i[s-1];e.pts=t.pts,e.dts=t.dts}}t.samples.push(e)}e.debug.length&&gc.log(e.pts+"/"+e.dts+":"+e.debug)}}class jm{constructor(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const e=this.data,t=this.bytesAvailable,i=e.byteLength-t,s=new Uint8Array(4),r=Math.min(4,t);if(0===r)throw new Error("no bytes available");s.set(e.subarray(i,i+r)),this.word=new DataView(s.buffer).getUint32(0),this.bitsAvailable=8*r,this.bytesAvailable-=r}skipBits(e){let t;e=Math.min(e,8*this.bytesAvailable+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(t=(e-=this.bitsAvailable)>>3,e-=t<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let t=Math.min(this.bitsAvailable,e);const i=this.word>>>32-t;if(e>32&&gc.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else{if(!(this.bytesAvailable>0))throw new Error("no bits available");this.loadWord()}return t=e-t,t>0&&this.bitsAvailable?i<<t|this.readBits(t):i}skipLZ(){let e;for(e=0;e<this.bitsAvailable;++e)if(0!=(this.word&2147483648>>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return 1===this.readBits(1)}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}skipScalingList(e){let t,i=8,s=8;for(let r=0;r<e;r++)0!==s&&(t=this.readEG(),s=(i+t+256)%256),i=0===s?i:s}readSPS(){let e,t,i,s=0,r=0,a=0,o=0;const n=this.readUByte.bind(this),l=this.readBits.bind(this),d=this.readUEG.bind(this),h=this.readBoolean.bind(this),c=this.skipBits.bind(this),u=this.skipEG.bind(this),p=this.skipUEG.bind(this),f=this.skipScalingList.bind(this);n();const m=n();if(l(5),c(3),n(),p(),100===m||110===m||122===m||244===m||44===m||83===m||86===m||118===m||128===m){const e=d();if(3===e&&c(1),p(),p(),c(1),h())for(t=3!==e?8:12,i=0;i<t;i++)h()&&f(i<6?16:64)}p();const g=d();if(0===g)d();else if(1===g)for(c(1),u(),u(),e=d(),i=0;i<e;i++)u();p(),c(1);const y=d(),A=d(),b=l(1);0===b&&c(1),c(1),h()&&(s=d(),r=d(),a=d(),o=d());let _=[1,1];if(h()&&h()){switch(n()){case 1:_=[1,1];break;case 2:_=[12,11];break;case 3:_=[10,11];break;case 4:_=[16,11];break;case 5:_=[40,33];break;case 6:_=[24,11];break;case 7:_=[20,11];break;case 8:_=[32,11];break;case 9:_=[80,33];break;case 10:_=[18,11];break;case 11:_=[15,11];break;case 12:_=[64,33];break;case 13:_=[160,99];break;case 14:_=[4,3];break;case 15:_=[3,2];break;case 16:_=[2,1];break;case 255:_=[n()<<8|n(),n()<<8|n()]}}return{width:Math.ceil(16*(y+1)-2*s-2*r),height:(2-b)*(A+1)*16-(b?2:4)*(a+o),pixelRatio:_}}readSliceType(){return this.readUByte(),this.readUEG(),this.readUEG()}}class Gm extends Nm{parseAVCPES(e,t,i,s,r){const a=this.parseAVCNALu(e,i.data);let o,n=this.VideoSample,l=!1;i.data=null,n&&a.length&&!e.audFound&&(this.pushAccessUnit(n,e),n=this.VideoSample=this.createVideoSample(!1,i.pts,i.dts,"")),a.forEach((s=>{var a;switch(s.type){case 1:{let t=!1;o=!0;const r=s.data;if(l&&r.length>4){const e=new jm(r).readSliceType();2!==e&&4!==e&&7!==e&&9!==e||(t=!0)}var d;if(t)null!=(d=n)&&d.frame&&!n.key&&(this.pushAccessUnit(n,e),n=this.VideoSample=null);n||(n=this.VideoSample=this.createVideoSample(!0,i.pts,i.dts,"")),n.frame=!0,n.key=t;break}case 5:o=!0,null!=(a=n)&&a.frame&&!n.key&&(this.pushAccessUnit(n,e),n=this.VideoSample=null),n||(n=this.VideoSample=this.createVideoSample(!0,i.pts,i.dts,"")),n.key=!0,n.frame=!0;break;case 6:o=!0,Lu(s.data,1,i.pts,t.samples);break;case 7:{var h,c;o=!0,l=!0;const t=s.data,i=new jm(t).readSPS();if(!e.sps||e.width!==i.width||e.height!==i.height||(null==(h=e.pixelRatio)?void 0:h[0])!==i.pixelRatio[0]||(null==(c=e.pixelRatio)?void 0:c[1])!==i.pixelRatio[1]){e.width=i.width,e.height=i.height,e.pixelRatio=i.pixelRatio,e.sps=[t],e.duration=r;const s=t.subarray(1,4);let a="avc1.";for(let e=0;e<3;e++){let t=s[e].toString(16);t.length<2&&(t="0"+t),a+=t}e.codec=a}break}case 8:o=!0,e.pps=[s.data];break;case 9:o=!0,e.audFound=!0,n&&this.pushAccessUnit(n,e),n=this.VideoSample=this.createVideoSample(!1,i.pts,i.dts,"");break;case 12:o=!0;break;default:o=!1,n&&(n.debug+="unknown NAL "+s.type+" ")}if(n&&o){n.units.push(s)}})),s&&n&&(this.pushAccessUnit(n,e),this.VideoSample=null)}parseAVCNALu(e,t){const i=t.byteLength;let s=e.naluState||0;const r=s,a=[];let o,n,l,d=0,h=-1,c=0;for(-1===s&&(h=0,c=31&t[0],s=0,d=1);d<i;)if(o=t[d++],s)if(1!==s)if(o)if(1===o){if(n=d-s-1,h>=0){const e={data:t.subarray(h,n),type:c};a.push(e)}else{const i=this.getLastNalUnit(e.samples);i&&(r&&d<=4-r&&i.state&&(i.data=i.data.subarray(0,i.data.byteLength-r)),n>0&&(i.data=xu(i.data,t.subarray(0,n)),i.state=0))}d<i?(l=31&t[d],h=d,c=l,s=0):s=-1}else s=0;else s=3;else s=o?0:2;else s=o?0:1;if(h>=0&&s>=0){const e={data:t.subarray(h,i),type:c,state:s};a.push(e)}if(0===a.length){const i=this.getLastNalUnit(e.samples);i&&(i.data=xu(i.data,t))}return e.naluState=s,a}}class zm{constructor(e,t,i){this.keyData=void 0,this.decrypter=void 0,this.keyData=i,this.decrypter=new Xf(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer)}decryptAacSample(e,t,i){const s=e[t].unit;if(s.length<=16)return;const r=s.subarray(16,s.length-s.length%16),a=r.buffer.slice(r.byteOffset,r.byteOffset+r.length);this.decryptBuffer(a).then((r=>{const a=new Uint8Array(r);s.set(a,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,i)}))}decryptAacSamples(e,t,i){for(;;t++){if(t>=e.length)return void i();if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,i),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=16*Math.floor((e.length-48)/160)+16,i=new Int8Array(t);let s=0;for(let t=32;t<e.length-16;t+=160,s+=16)i.set(e.subarray(t,t+16),s);return i}getAvcDecryptedUnit(e,t){const i=new Uint8Array(t);let s=0;for(let t=32;t<e.length-16;t+=160,s+=16)e.set(i.subarray(s,s+16),t);return e}decryptAvcSample(e,t,i,s,r){const a=Iu(r.data),o=this.getAvcEncryptedData(a);this.decryptBuffer(o.buffer).then((o=>{r.data=this.getAvcDecryptedUnit(a,o),this.decrypter.isSync()||this.decryptAvcSamples(e,t,i+1,s)}))}decryptAvcSamples(e,t,i,s){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,i=0){if(t>=e.length)return void s();const r=e[t].units;for(;!(i>=r.length);i++){const a=r[i];if(!(a.data.length<=48||1!==a.type&&5!==a.type||(this.decryptAvcSample(e,t,i,s,a),this.decrypter.isSync())))return}}}}const $m=188;class Hm{constructor(e,t,i){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=t,this.typeSupported=i,this.videoParser=new Gm}static probe(e){const t=Hm.syncOffset(e);return t>0&&gc.warn(`MPEG2-TS detected but first sync word found @ offset ${t}`),-1!==t}static syncOffset(e){const t=e.length;let i=Math.min(940,t-$m)+1,s=0;for(;s<i;){let r=!1,a=-1,o=0;for(let n=s;n<t;n+=$m){if(71!==e[n]||t-n!==$m&&71!==e[n+$m]){if(o)return-1;break}if(o++,-1===a&&(a=n,0!==a&&(i=Math.min(a+18612,e.length-$m)+1)),r||(r=0===Vm(e,n)),r&&o>1&&(0===a&&o>2||n+$m>i))return a}s++}return-1}static createTrack(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:uu[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===e?t:void 0}}resetInitSegment(e,t,i,s){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=Hm.createTrack("video"),this._audioTrack=Hm.createTrack("audio",s),this._id3Track=Hm.createTrack("id3"),this._txtTrack=Hm.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=i,this._duration=s}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:i}=this;e&&(e.pesData=null),t&&(t.pesData=null),i&&(i.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,i=!1,s=!1){let r;i||(this.sampleAes=null);const a=this._videoTrack,o=this._audioTrack,n=this._id3Track,l=this._txtTrack;let d=a.pid,h=a.pesData,c=o.pid,u=n.pid,p=o.pesData,f=n.pesData,m=null,g=this.pmtParsed,y=this._pmtId,A=e.length;if(this.remainderData&&(A=(e=xu(this.remainderData,e)).length,this.remainderData=null),A<$m&&!s)return this.remainderData=e,{audioTrack:o,videoTrack:a,id3Track:n,textTrack:l};const b=Math.max(0,Hm.syncOffset(e));A-=(A-b)%$m,A<e.byteLength&&!s&&(this.remainderData=new Uint8Array(e.buffer,A,e.buffer.byteLength-A));let _=0;for(let t=b;t<A;t+=$m)if(71===e[t]){const s=!!(64&e[t+1]),A=Vm(e,t);let _;if((48&e[t+3])>>4>1){if(_=t+5+e[t+4],_===t+$m)continue}else _=t+4;switch(A){case d:s&&(h&&(r=Km(h))&&this.videoParser.parseAVCPES(a,l,r,!1,this._duration),h={data:[],size:0}),h&&(h.data.push(e.subarray(_,t+$m)),h.size+=t+$m-_);break;case c:if(s){if(p&&(r=Km(p)))switch(o.segmentCodec){case"aac":this.parseAACPES(o,r);break;case"mp3":this.parseMPEGPES(o,r);break;case"ac3":this.parseAC3PES(o,r)}p={data:[],size:0}}p&&(p.data.push(e.subarray(_,t+$m)),p.size+=t+$m-_);break;case u:s&&(f&&(r=Km(f))&&this.parseID3PES(n,r),f={data:[],size:0}),f&&(f.data.push(e.subarray(_,t+$m)),f.size+=t+$m-_);break;case 0:s&&(_+=e[_]+1),y=this._pmtId=Wm(e,_);break;case y:{s&&(_+=e[_]+1);const r=Jm(e,_,this.typeSupported,i);d=r.videoPid,d>0&&(a.pid=d,a.segmentCodec=r.segmentVideoCodec),c=r.audioPid,c>0&&(o.pid=c,o.segmentCodec=r.segmentAudioCodec),u=r.id3Pid,u>0&&(n.pid=u),null===m||g||(gc.warn(`MPEG-TS PMT found at ${t} after unknown PID '${m}'. Backtracking to sync byte @${b} to parse all TS packets.`),m=null,t=b-188),g=this.pmtParsed=!0;break}case 17:case 8191:break;default:m=A}}else _++;if(_>0){const e=new Error(`Found ${_} TS packet/s that do not start with 0x47`);this.observer.emit(dc.ERROR,dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.FRAG_PARSING_ERROR,fatal:!1,error:e,reason:e.message})}a.pesData=h,o.pesData=p,n.pesData=f;const v={audioTrack:o,videoTrack:a,id3Track:n,textTrack:l};return s&&this.extractRemainingSamples(v),v}flush(){const{remainderData:e}=this;let t;return this.remainderData=null,t=e?this.demux(e,-1,!1,!0):{videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t}extractRemainingSamples(e){const{audioTrack:t,videoTrack:i,id3Track:s,textTrack:r}=e,a=i.pesData,o=t.pesData,n=s.pesData;let l;if(a&&(l=Km(a))?(this.videoParser.parseAVCPES(i,r,l,!0,this._duration),i.pesData=null):i.pesData=a,o&&(l=Km(o))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,l);break;case"mp3":this.parseMPEGPES(t,l);break;case"ac3":this.parseAC3PES(t,l)}t.pesData=null}else null!=o&&o.size&&gc.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=o;n&&(l=Km(n))?(this.parseID3PES(s,l),s.pesData=null):s.pesData=n}demuxSampleAes(e,t,i){const s=this.demux(e,i,!0,!this.config.progressive),r=this.sampleAes=new zm(this.observer,this.config,t);return this.decrypt(s,r)}decrypt(e,t){return new Promise((i=>{const{audioTrack:s,videoTrack:r}=e;s.samples&&"aac"===s.segmentCodec?t.decryptAacSamples(s.samples,0,(()=>{r.samples?t.decryptAvcSamples(r.samples,0,0,(()=>{i(e)})):i(e)})):r.samples&&t.decryptAvcSamples(r.samples,0,0,(()=>{i(e)}))}))}destroy(){this._duration=0}parseAACPES(e,t){let i=0;const s=this.aacOverFlow;let r,a,o,n=t.data;if(s){this.aacOverFlow=null;const t=s.missing,r=s.sample.unit.byteLength;if(-1===t)n=xu(s.sample.unit,n);else{const a=r-t;s.sample.unit.set(n.subarray(0,t),a),e.samples.push(s.sample),i=s.missing}}for(r=i,a=n.length;r<a-1&&!_m(n,r);r++);if(r!==i){let e;const t=r<a-1;e=t?`AAC PES did not start with ADTS header,offset:${r}`:"No ADTS header found in AAC PES";const i=new Error(e);if(gc.warn(`parsing error: ${e}`),this.observer.emit(dc.ERROR,dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:i,reason:e}),!t)return}if(wm(e,this.observer,n,r,this.audioCodec),void 0!==t.pts)o=t.pts;else{if(!s)return void gc.warn("[tsdemuxer]: AAC PES unknown PTS");{const t=Sm(e.samplerate);o=s.sample.pts+t}}let l,d=0;for(;r<a;){if(l=Tm(e,n,r,o,d),r+=l.length,l.missing){this.aacOverFlow=l;break}for(d++;r<a-1&&!_m(n,r);r++);}}parseMPEGPES(e,t){const i=t.data,s=i.length;let r=0,a=0;const o=t.pts;if(void 0!==o)for(;a<s;)if(Pm(i,a)){const t=Dm(e,i,a,o,r);if(!t)break;a+=t.length,r++}else a++;else gc.warn("[tsdemuxer]: MPEG PES unknown PTS")}parseAC3PES(e,t){{const i=t.data,s=t.pts;if(void 0===s)return void gc.warn("[tsdemuxer]: AC3 PES unknown PTS");const r=i.length;let a,o=0,n=0;for(;n<r&&(a=Om(e,i,n,s,o++))>0;)n+=a}}parseID3PES(e,t){if(void 0===t.pts)return void gc.warn("[tsdemuxer]: ID3 PES unknown PTS");const i=ac({},t,{type:this._videoTrack?Rp:Cp,duration:Number.POSITIVE_INFINITY});e.samples.push(i)}}function Vm(e,t){return((31&e[t+1])<<8)+e[t+2]}function Wm(e,t){return(31&e[t+10])<<8|e[t+11]}function Jm(e,t,i,s){const r={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},a=t+3+((15&e[t+1])<<8|e[t+2])-4;for(t+=12+((15&e[t+10])<<8|e[t+11]);t<a;){const a=Vm(e,t),o=(15&e[t+3])<<8|e[t+4];switch(e[t]){case 207:if(!s){qm("ADTS AAC");break}case 15:-1===r.audioPid&&(r.audioPid=a);break;case 21:-1===r.id3Pid&&(r.id3Pid=a);break;case 219:if(!s){qm("H.264");break}case 27:-1===r.videoPid&&(r.videoPid=a,r.segmentVideoCodec="avc");break;case 3:case 4:i.mpeg||i.mp3?-1===r.audioPid&&(r.audioPid=a,r.segmentAudioCodec="mp3"):gc.log("MPEG audio found, not supported in this browser");break;case 193:if(!s){qm("AC-3");break}case 129:i.ac3?-1===r.audioPid&&(r.audioPid=a,r.segmentAudioCodec="ac3"):gc.log("AC-3 audio found, not supported in this browser");break;case 6:if(-1===r.audioPid&&o>0){let s=t+5,n=o;for(;n>2;){if(106===e[s])!0!==i.ac3?gc.log("AC-3 audio found, not supported in this browser for now"):(r.audioPid=a,r.segmentAudioCodec="ac3");const t=e[s+1]+2;s+=t,n-=t}}break;case 194:case 135:gc.warn("Unsupported EC-3 in M2TS found");break;case 36:gc.warn("Unsupported HEVC in M2TS found")}t+=o+5}return r}function qm(e){gc.log(`${e} with AES-128-CBC encryption found in unencrypted stream`)}function Km(e){let t,i,s,r,a,o=0;const n=e.data;if(!e||0===e.size)return null;for(;n[0].length<19&&n.length>1;)n[0]=xu(n[0],n[1]),n.splice(1,1);t=n[0];if(1===(t[0]<<16)+(t[1]<<8)+t[2]){if(i=(t[4]<<8)+t[5],i&&i>e.size-6)return null;const l=t[7];192&l&&(r=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&l?(a=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2,r-a>54e5&&(gc.warn(`${Math.round((r-a)/9e4)}s delta between PTS and DTS, align them`),r=a)):a=r),s=t[8];let d=s+9;if(e.size<=d)return null;e.size-=d;const h=new Uint8Array(e.size);for(let e=0,i=n.length;e<i;e++){t=n[e];let i=t.byteLength;if(d){if(d>i){d-=i;continue}t=t.subarray(d),i-=d,d=0}h.set(t,o),o+=i}return i&&(i-=s+3),{data:h,pts:r,dts:a,len:i}}return null}class Ym{static getSilentFrame(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}}}const Qm=Math.pow(2,32)-1;class Xm{static init(){let e;for(e in Xm.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],dac3:[],"ac-3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},Xm.types)Xm.types.hasOwnProperty(e)&&(Xm.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);Xm.HDLR_TYPES={video:t,audio:i};const s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),r=new Uint8Array([0,0,0,0,0,0,0,0]);Xm.STTS=Xm.STSC=Xm.STCO=r,Xm.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Xm.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Xm.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Xm.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const a=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),n=new Uint8Array([0,0,0,1]);Xm.FTYP=Xm.box(Xm.types.ftyp,a,n,a,o),Xm.DINF=Xm.box(Xm.types.dinf,Xm.box(Xm.types.dref,s))}static box(e,...t){let i=8,s=t.length;const r=s;for(;s--;)i+=t[s].byteLength;const a=new Uint8Array(i);for(a[0]=i>>24&255,a[1]=i>>16&255,a[2]=i>>8&255,a[3]=255&i,a.set(e,4),s=0,i=8;s<r;s++)a.set(t[s],i),i+=t[s].byteLength;return a}static hdlr(e){return Xm.box(Xm.types.hdlr,Xm.HDLR_TYPES[e])}static mdat(e){return Xm.box(Xm.types.mdat,e)}static mdhd(e,t){t*=e;const i=Math.floor(t/(Qm+1)),s=Math.floor(t%(Qm+1));return Xm.box(Xm.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,s>>24,s>>16&255,s>>8&255,255&s,85,196,0,0]))}static mdia(e){return Xm.box(Xm.types.mdia,Xm.mdhd(e.timescale,e.duration),Xm.hdlr(e.type),Xm.minf(e))}static mfhd(e){return Xm.box(Xm.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))}static minf(e){return"audio"===e.type?Xm.box(Xm.types.minf,Xm.box(Xm.types.smhd,Xm.SMHD),Xm.DINF,Xm.stbl(e)):Xm.box(Xm.types.minf,Xm.box(Xm.types.vmhd,Xm.VMHD),Xm.DINF,Xm.stbl(e))}static moof(e,t,i){return Xm.box(Xm.types.moof,Xm.mfhd(e),Xm.traf(i,t))}static moov(e){let t=e.length;const i=[];for(;t--;)i[t]=Xm.trak(e[t]);return Xm.box.apply(null,[Xm.types.moov,Xm.mvhd(e[0].timescale,e[0].duration)].concat(i).concat(Xm.mvex(e)))}static mvex(e){let t=e.length;const i=[];for(;t--;)i[t]=Xm.trex(e[t]);return Xm.box.apply(null,[Xm.types.mvex,...i])}static mvhd(e,t){t*=e;const i=Math.floor(t/(Qm+1)),s=Math.floor(t%(Qm+1)),r=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,s>>24,s>>16&255,s>>8&255,255&s,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return Xm.box(Xm.types.mvhd,r)}static sdtp(e){const t=e.samples||[],i=new Uint8Array(4+t.length);let s,r;for(s=0;s<t.length;s++)r=t[s].flags,i[s+4]=r.dependsOn<<4|r.isDependedOn<<2|r.hasRedundancy;return Xm.box(Xm.types.sdtp,i)}static stbl(e){return Xm.box(Xm.types.stbl,Xm.stsd(e),Xm.box(Xm.types.stts,Xm.STTS),Xm.box(Xm.types.stsc,Xm.STSC),Xm.box(Xm.types.stsz,Xm.STSZ),Xm.box(Xm.types.stco,Xm.STCO))}static avc1(e){let t,i,s,r=[],a=[];for(t=0;t<e.sps.length;t++)i=e.sps[t],s=i.byteLength,r.push(s>>>8&255),r.push(255&s),r=r.concat(Array.prototype.slice.call(i));for(t=0;t<e.pps.length;t++)i=e.pps[t],s=i.byteLength,a.push(s>>>8&255),a.push(255&s),a=a.concat(Array.prototype.slice.call(i));const o=Xm.box(Xm.types.avcC,new Uint8Array([1,r[3],r[4],r[5],255,224|e.sps.length].concat(r).concat([e.pps.length]).concat(a))),n=e.width,l=e.height,d=e.pixelRatio[0],h=e.pixelRatio[1];return Xm.box(Xm.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,n>>8&255,255&n,l>>8&255,255&l,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,Xm.box(Xm.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),Xm.box(Xm.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,255&d,h>>24,h>>16&255,h>>8&255,255&h])))}static esds(e){const t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))}static audioStsd(e){const t=e.samplerate;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,t>>8&255,255&t,0,0])}static mp4a(e){return Xm.box(Xm.types.mp4a,Xm.audioStsd(e),Xm.box(Xm.types.esds,Xm.esds(e)))}static mp3(e){return Xm.box(Xm.types[".mp3"],Xm.audioStsd(e))}static ac3(e){return Xm.box(Xm.types["ac-3"],Xm.audioStsd(e),Xm.box(Xm.types.dac3,e.config))}static stsd(e){return"audio"===e.type?"mp3"===e.segmentCodec&&"mp3"===e.codec?Xm.box(Xm.types.stsd,Xm.STSD,Xm.mp3(e)):"ac3"===e.segmentCodec?Xm.box(Xm.types.stsd,Xm.STSD,Xm.ac3(e)):Xm.box(Xm.types.stsd,Xm.STSD,Xm.mp4a(e)):Xm.box(Xm.types.stsd,Xm.STSD,Xm.avc1(e))}static tkhd(e){const t=e.id,i=e.duration*e.timescale,s=e.width,r=e.height,a=Math.floor(i/(Qm+1)),o=Math.floor(i%(Qm+1));return Xm.box(Xm.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,o>>24,o>>16&255,o>>8&255,255&o,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,s>>8&255,255&s,0,0,r>>8&255,255&r,0,0]))}static traf(e,t){const i=Xm.sdtp(e),s=e.id,r=Math.floor(t/(Qm+1)),a=Math.floor(t%(Qm+1));return Xm.box(Xm.types.traf,Xm.box(Xm.types.tfhd,new Uint8Array([0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s])),Xm.box(Xm.types.tfdt,new Uint8Array([1,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,a>>24,a>>16&255,a>>8&255,255&a])),Xm.trun(e,i.length+16+20+8+16+8+8),i)}static trak(e){return e.duration=e.duration||4294967295,Xm.box(Xm.types.trak,Xm.tkhd(e),Xm.mdia(e))}static trex(e){const t=e.id;return Xm.box(Xm.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,t){const i=e.samples||[],s=i.length,r=12+16*s,a=new Uint8Array(r);let o,n,l,d,h,c;for(t+=8+r,a.set(["video"===e.type?1:0,0,15,1,s>>>24&255,s>>>16&255,s>>>8&255,255&s,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0),o=0;o<s;o++)n=i[o],l=n.duration,d=n.size,h=n.flags,c=n.cts,a.set([l>>>24&255,l>>>16&255,l>>>8&255,255&l,d>>>24&255,d>>>16&255,d>>>8&255,255&d,h.isLeading<<2|h.dependsOn,h.isDependedOn<<6|h.hasRedundancy<<4|h.paddingValue<<1|h.isNonSync,61440&h.degradPrio,15&h.degradPrio,c>>>24&255,c>>>16&255,c>>>8&255,255&c],12+16*o);return Xm.box(Xm.types.trun,a)}static initSegment(e){Xm.types||Xm.init();const t=Xm.moov(e);return xu(Xm.FTYP,t)}}Xm.types=void 0,Xm.HDLR_TYPES=void 0,Xm.STTS=void 0,Xm.STSC=void 0,Xm.STCO=void 0,Xm.STSZ=void 0,Xm.VMHD=void 0,Xm.SMHD=void 0,Xm.STSD=void 0,Xm.FTYP=void 0,Xm.DINF=void 0;function Zm(e,t,i=1,s=!1){const r=e*t*i;return s?Math.round(r):r}function eg(e,t=!1){return Zm(e,1e3,1/9e4,t)}let tg,ig=null,sg=null;class rg{constructor(e,t,i,s=""){if(this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=i,this.ISGenerated=!1,null===ig){const e=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);ig=e?parseInt(e[1]):0}if(null===sg){const e=navigator.userAgent.match(/Safari\/(\d+)/i);sg=e?parseInt(e[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){gc.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){gc.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){gc.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let t=!1;const i=e.reduce(((e,i)=>{const s=i.pts-e;return s<-4294967296?(t=!0,ag(e,i.pts)):s>0?e:i.pts}),e[0].pts);return t&&gc.debug("PTS rollover detected"),i}remux(e,t,i,s,r,a,o,n){let l,d,h,c,u,p,f=r,m=r;const g=e.pid>-1,y=t.pid>-1,A=t.samples.length,b=e.samples.length>0,_=o&&A>0||A>1;if((!g||b)&&(!y||_)||this.ISGenerated||o){if(this.ISGenerated){var v,w,S,T;const e=this.videoTrackConfig;!e||t.width===e.width&&t.height===e.height&&(null==(v=t.pixelRatio)?void 0:v[0])===(null==(w=e.pixelRatio)?void 0:w[0])&&(null==(S=t.pixelRatio)?void 0:S[1])===(null==(T=e.pixelRatio)?void 0:T[1])||this.resetInitSegment()}else h=this.generateIS(e,t,r,a);const i=this.isVideoContiguous;let s,o=-1;if(_&&(o=function(e){for(let t=0;t<e.length;t++)if(e[t].key)return t;return-1}(t.samples),!i&&this.config.forceKeyFrameOnDiscontinuity))if(p=!0,o>0){gc.warn(`[mp4-remuxer]: Dropped ${o} out of ${A} video samples due to a missing keyframe`);const e=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(o),t.dropped+=o,m+=(t.samples[0].pts-e)/t.inputTimeScale,s=m}else-1===o&&(gc.warn(`[mp4-remuxer]: No keyframe found out of ${A} video samples`),p=!1);if(this.ISGenerated){if(b&&_){const i=this.getVideoStartPts(t.samples),s=(ag(e.samples[0].pts,i)-i)/t.inputTimeScale;f+=Math.max(0,s),m+=Math.max(0,-s)}if(b){if(e.samplerate||(gc.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),h=this.generateIS(e,t,r,a)),d=this.remuxAudio(e,f,this.isAudioContiguous,a,y||_||n===yp?m:void 0),_){const s=d?d.endPTS-d.startPTS:0;t.inputTimeScale||(gc.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),h=this.generateIS(e,t,r,a)),l=this.remuxVideo(t,m,i,s)}}else _&&(l=this.remuxVideo(t,m,i,0));l&&(l.firstKeyFrame=o,l.independent=-1!==o,l.firstKeyFramePTS=s)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(i.samples.length&&(u=og(i,r,this._initPTS,this._initDTS)),s.samples.length&&(c=ng(s,r,this._initPTS))),{audio:d,video:l,initSegment:h,independent:p,text:c,id3:u}}generateIS(e,t,i,s){const r=e.samples,a=t.samples,o=this.typeSupported,n={},l=this._initPTS;let d,h,c,u=!l||s,p="audio/mp4";if(u&&(d=h=1/0),e.config&&r.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":o.mpeg?(p="audio/mpeg",e.codec=""):o.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3"}n.audio={id:"audio",container:p,codec:e.codec,initSegment:"mp3"===e.segmentCodec&&o.mpeg?new Uint8Array(0):Xm.initSegment([e]),metadata:{channelCount:e.channelCount}},u&&(c=e.inputTimeScale,l&&c===l.timescale?u=!1:d=h=r[0].pts-Math.round(c*i))}if(t.sps&&t.pps&&a.length){if(t.timescale=t.inputTimeScale,n.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:Xm.initSegment([t]),metadata:{width:t.width,height:t.height}},u)if(c=t.inputTimeScale,l&&c===l.timescale)u=!1;else{const e=this.getVideoStartPts(a),t=Math.round(c*i);h=Math.min(h,ag(a[0].dts,e)-t),d=Math.min(d,e-t)}this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(n).length)return this.ISGenerated=!0,u?(this._initPTS={baseTime:d,timescale:c},this._initDTS={baseTime:h,timescale:c}):d=c=void 0,{tracks:n,initPTS:d,timescale:c}}remuxVideo(e,t,i,s){const r=e.inputTimeScale,a=e.samples,o=[],n=a.length,l=this._initPTS;let d,h,c=this.nextAvcDts,u=8,p=this.videoSampleDuration,f=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,g=!1;if(!i||null===c){const e=t*r,s=a[0].pts-ag(a[0].dts,a[0].pts);ig&&null!==c&&Math.abs(e-s-c)<15e3?i=!0:c=e-s}const y=l.baseTime*r/l.timescale;for(let e=0;e<n;e++){const t=a[e];t.pts=ag(t.pts-y,c),t.dts=ag(t.dts-y,c),t.dts<a[e>0?e-1:e].dts&&(g=!0)}g&&a.sort((function(e,t){const i=e.dts-t.dts,s=e.pts-t.pts;return i||s})),d=a[0].dts,h=a[a.length-1].dts;const A=h-d,b=A?Math.round(A/(n-1)):p||e.inputTimeScale/30;if(i){const e=d-c,i=e>b,s=e<-1;if((i||s)&&(i?gc.warn(`AVC: ${eg(e,!0)} ms (${e}dts) hole between fragments detected at ${t.toFixed(3)}`):gc.warn(`AVC: ${eg(-e,!0)} ms (${e}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!s||c>=a[0].pts||ig)){d=c;const t=a[0].pts-e;if(i)a[0].dts=d,a[0].pts=t;else for(let i=0;i<a.length&&!(a[i].dts>t);i++)a[i].dts-=e,a[i].pts-=e;gc.log(`Video: Initial PTS/DTS adjusted: ${eg(t,!0)}/${eg(d,!0)}, delta: ${eg(e,!0)} ms`)}}d=Math.max(0,d);let _=0,v=0,w=d;for(let e=0;e<n;e++){const t=a[e],i=t.units,s=i.length;let r=0;for(let e=0;e<s;e++)r+=i[e].data.length;v+=r,_+=s,t.length=r,t.dts<w?(t.dts=w,w+=b/4|0||1):w=t.dts,f=Math.min(t.pts,f),m=Math.max(t.pts,m)}h=a[n-1].dts;const S=v+4*_+8;let T;try{T=new Uint8Array(S)}catch(e){return void this.observer.emit(dc.ERROR,dc.ERROR,{type:hc.MUX_ERROR,details:cc.REMUX_ALLOC_ERROR,fatal:!1,error:e,bytes:S,reason:`fail allocating video mdat ${S}`})}const E=new DataView(T.buffer);E.setUint32(0,S),T.set(Xm.types.mdat,4);let k=!1,C=Number.POSITIVE_INFINITY,x=Number.POSITIVE_INFINITY,R=Number.NEGATIVE_INFINITY,D=Number.NEGATIVE_INFINITY;for(let e=0;e<n;e++){const t=a[e],i=t.units;let l,d=0;for(let e=0,t=i.length;e<t;e++){const t=i[e],s=t.data,r=t.data.byteLength;E.setUint32(u,r),u+=4,T.set(s,u),u+=r,d+=4+r}if(e<n-1)p=a[e+1].dts-t.dts,l=a[e+1].pts-t.pts;else{const i=this.config,o=e>0?t.dts-a[e-1].dts:b;if(l=e>0?t.pts-a[e-1].pts:b,i.stretchShortVideoTrack&&null!==this.nextAudioPts){const e=Math.floor(i.maxBufferHole*r),a=(s?f+s*r:this.nextAudioPts)-t.pts;a>e?(p=a-o,p<0?p=o:k=!0,gc.log(`[mp4-remuxer]: It is approximately ${a/90} ms to the next segment; using duration ${p/90} ms for the last video frame.`)):p=o}else p=o}const h=Math.round(t.pts-t.dts);C=Math.min(C,p),R=Math.max(R,p),x=Math.min(x,l),D=Math.max(D,l),o.push(new lg(t.key,p,d,h))}if(o.length)if(ig){if(ig<70){const e=o[0].flags;e.dependsOn=2,e.isNonSync=0}}else if(sg&&D-x<R-C&&b/R<.025&&0===o[0].cts){gc.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let e=d;for(let t=0,i=o.length;t<i;t++){const s=e+o[t].duration,r=e+o[t].cts;if(t<i-1){const e=s+o[t+1].cts;o[t].duration=e-r}else o[t].duration=t?o[t-1].duration:b;o[t].cts=0,e=s}}p=k||!p?b:p,this.nextAvcDts=c=h+p,this.videoSampleDuration=p,this.isVideoContiguous=!0;const L={data1:Xm.moof(e.sequenceNumber++,d,ac({},e,{samples:o})),data2:T,startPTS:f/r,endPTS:(m+p)/r,startDTS:d/r,endDTS:c/r,type:"video",hasAudio:!1,hasVideo:!0,nb:o.length,dropped:e.dropped};return e.samples=[],e.dropped=0,L}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return 1152;case"ac3":return 1536;default:return 1024}}remuxAudio(e,t,i,s,r){const a=e.inputTimeScale,o=a/(e.samplerate?e.samplerate:a),n=this.getSamplesPerFrame(e),l=n*o,d=this._initPTS,h="mp3"===e.segmentCodec&&this.typeSupported.mpeg,c=[],u=void 0!==r;let p=e.samples,f=h?0:8,m=this.nextAudioPts||-1;const g=t*a,y=d.baseTime*a/d.timescale;if(this.isAudioContiguous=i=i||p.length&&m>0&&(s&&Math.abs(g-m)<9e3||Math.abs(ag(p[0].pts-y,g)-m)<20*l),p.forEach((function(e){e.pts=ag(e.pts-y,g)})),!i||m<0){if(p=p.filter((e=>e.pts>=0)),!p.length)return;m=0===r?0:s&&!u?Math.max(0,g):p[0].pts}if("aac"===e.segmentCodec){const t=this.config.maxAudioFramesDrift;for(let i=0,s=m;i<p.length;i++){const r=p[i],o=r.pts,n=o-s,d=Math.abs(1e3*n/a);if(n<=-t*l&&u)0===i&&(gc.warn(`Audio frame @ ${(o/a).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*n/a)} ms.`),this.nextAudioPts=m=s=o);else if(n>=t*l&&d<1e4&&u){let t=Math.round(n/l);s=o-t*l,s<0&&(t--,s+=l),0===i&&(this.nextAudioPts=m=s),gc.warn(`[mp4-remuxer]: Injecting ${t} audio frame @ ${(s/a).toFixed(3)}s due to ${Math.round(1e3*n/a)} ms gap.`);for(let a=0;a<t;a++){const t=Math.max(s,0);let a=Ym.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);a||(gc.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),a=r.unit.subarray()),p.splice(i,0,{unit:a,pts:t}),s+=l,i++}}r.pts=s,s+=l}}let A,b=null,_=null,v=0,w=p.length;for(;w--;)v+=p[w].unit.byteLength;for(let t=0,s=p.length;t<s;t++){const s=p[t],r=s.unit;let a=s.pts;if(null!==_){c[t-1].duration=Math.round((a-_)/o)}else{if(i&&"aac"===e.segmentCodec&&(a=m),b=a,!(v>0))return;v+=f;try{A=new Uint8Array(v)}catch(e){return void this.observer.emit(dc.ERROR,dc.ERROR,{type:hc.MUX_ERROR,details:cc.REMUX_ALLOC_ERROR,fatal:!1,error:e,bytes:v,reason:`fail allocating audio mdat ${v}`})}if(!h){new DataView(A.buffer).setUint32(0,v),A.set(Xm.types.mdat,4)}}A.set(r,f);const l=r.byteLength;f+=l,c.push(new lg(!0,n,l,0)),_=a}const S=c.length;if(!S)return;const T=c[c.length-1];this.nextAudioPts=m=_+o*T.duration;const E=h?new Uint8Array(0):Xm.moof(e.sequenceNumber++,b/o,ac({},e,{samples:c}));e.samples=[];const k=b/a,C=m/a,x={data1:E,data2:A,startPTS:k,endPTS:C,startDTS:k,endDTS:C,type:"audio",hasAudio:!0,hasVideo:!1,nb:S};return this.isAudioContiguous=!0,x}remuxEmptyAudio(e,t,i,s){const r=e.inputTimeScale,a=r/(e.samplerate?e.samplerate:r),o=this.nextAudioPts,n=this._initDTS,l=9e4*n.baseTime/n.timescale,d=(null!==o?o:s.startDTS*r)+l,h=s.endDTS*r+l,c=1024*a,u=Math.ceil((h-d)/c),p=Ym.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(gc.warn("[mp4-remuxer]: remux empty Audio"),!p)return void gc.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");const f=[];for(let e=0;e<u;e++){const t=d+e*c;f.push({unit:p,pts:t,dts:t})}return e.samples=f,this.remuxAudio(e,t,i,!1)}}function ag(e,t){let i;if(null===t)return e;for(i=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=i;return e}function og(e,t,i,s){const r=e.samples.length;if(!r)return;const a=e.inputTimeScale;for(let o=0;o<r;o++){const r=e.samples[o];r.pts=ag(r.pts-i.baseTime*a/i.timescale,t*a)/a,r.dts=ag(r.dts-s.baseTime*a/s.timescale,t*a)/a}const o=e.samples;return e.samples=[],{samples:o}}function ng(e,t,i){const s=e.samples.length;if(!s)return;const r=e.inputTimeScale;for(let a=0;a<s;a++){const s=e.samples[a];s.pts=ag(s.pts-i.baseTime*r/i.timescale,t*r)/r}e.samples.sort(((e,t)=>e.pts-t.pts));const a=e.samples;return e.samples=[],{samples:a}}class lg{constructor(e,t,i,s){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=i,this.cts=s,this.flags={isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:e?2:1,isNonSync:e?0:1}}}function dg(e,t){const i=null==e?void 0:e.codec;if(i&&i.length>4)return i;if(t===Sc){if("ec-3"===i||"ac-3"===i||"alac"===i)return i;if("fLaC"===i||"Opus"===i){return Qu(i,!1)}const e="mp4a.40.5";return gc.info(`Parsed audio codec "${i}" or audio object type not handled. Using "${e}"`),e}return gc.warn(`Unhandled video codec "${i}"`),"hvc1"===i||"hev1"===i?"hvc1.1.6.L120.90":"av01"===i?"av01.0.04M.08":"avc1.42e01e"}try{tg=self.performance.now.bind(self.performance)}catch(e){gc.debug("Unable to use Performance API on this environment"),tg=null==Pc?void 0:Pc.Date.now}const hg=[{demux:class{constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,i,s){const r=this.videoTrack=fm("video",1),a=this.audioTrack=fm("audio",1),o=this.txtTrack=fm("text",1);if(this.id3Track=fm("id3",1),this.timeOffset=0,null==e||!e.byteLength)return;const n=vu(e);if(n.video){const{id:e,timescale:t,codec:i}=n.video;r.id=e,r.timescale=o.timescale=t,r.codec=i}if(n.audio){const{id:e,timescale:t,codec:i}=n.audio;a.id=e,a.timescale=t,a.codec=i}o.id=uu.text,r.sampleDuration=0,r.duration=a.duration=s}resetContiguity(){this.remainderData=null}static probe(e){return function(e){const t=e.byteLength;for(let i=0;i<t;){const s=mu(e,i);if(s>8&&109===e[i+4]&&111===e[i+5]&&111===e[i+6]&&102===e[i+7])return!0;i=s>1?i+s:t}return!1}(e)}demux(e,t){this.timeOffset=t;let i=e;const s=this.videoTrack,r=this.txtTrack;if(this.config.progressive){this.remainderData&&(i=xu(this.remainderData,e));const t=function(e){const t={valid:null,remainder:null},i=bu(e,["moof"]);if(i.length<2)return t.remainder=e,t;const s=i[i.length-1];return t.valid=Vc(e,0,s.byteOffset-8),t.remainder=Vc(e,s.byteOffset-8),t}(i);this.remainderData=t.remainder,s.samples=t.valid||new Uint8Array}else s.samples=i;const a=this.extractID3Track(s,t);return r.samples=Ru(t,s),{videoTrack:s,audioTrack:this.audioTrack,id3Track:a,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,i=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const s=this.extractID3Track(t,this.timeOffset);return i.samples=Ru(e,t),{videoTrack:t,audioTrack:fm(),id3Track:s,textTrack:fm()}}extractID3Track(e,t){const i=this.id3Track;if(e.samples.length){const s=bu(e.samples,["emsg"]);s&&s.forEach((e=>{const s=function(e){const t=e[0];let i="",s="",r=0,a=0,o=0,n=0,l=0,d=0;if(0===t){for(;"\0"!==pu(e.subarray(d,d+1));)i+=pu(e.subarray(d,d+1)),d+=1;for(i+=pu(e.subarray(d,d+1)),d+=1;"\0"!==pu(e.subarray(d,d+1));)s+=pu(e.subarray(d,d+1)),d+=1;s+=pu(e.subarray(d,d+1)),d+=1,r=mu(e,12),a=mu(e,16),n=mu(e,20),l=mu(e,24),d=28}else if(1===t){d+=4,r=mu(e,d),d+=4;const t=mu(e,d);d+=4;const a=mu(e,d);for(d+=4,o=2**32*t+a,nc(o)||(o=Number.MAX_SAFE_INTEGER,gc.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),n=mu(e,d),d+=4,l=mu(e,d),d+=4;"\0"!==pu(e.subarray(d,d+1));)i+=pu(e.subarray(d,d+1)),d+=1;for(i+=pu(e.subarray(d,d+1)),d+=1;"\0"!==pu(e.subarray(d,d+1));)s+=pu(e.subarray(d,d+1)),d+=1;s+=pu(e.subarray(d,d+1)),d+=1}return{schemeIdUri:i,value:s,timeScale:r,presentationTime:o,presentationTimeDelta:a,eventDuration:n,id:l,payload:e.subarray(d,e.byteLength)}}(e);if(Mm.test(s.schemeIdUri)){const e=oc(s.presentationTime)?s.presentationTime/s.timeScale:t+s.presentationTimeDelta/s.timeScale;let r=4294967295===s.eventDuration?Number.POSITIVE_INFINITY:s.eventDuration/s.timeScale;r<=.001&&(r=Number.POSITIVE_INFINITY);const a=s.payload;i.samples.push({data:a,len:a.byteLength,dts:e,pts:e,type:Rp,duration:r})}}))}return i}demuxSampleAes(e,t,i){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){}},remux:class{constructor(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null}destroy(){}resetTimeStamp(e){this.initPTS=e,this.lastEndTime=null}resetNextTimestamp(){this.lastEndTime=null}resetInitSegment(e,t,i,s){this.audioCodec=t,this.videoCodec=i,this.generateInitSegment(function(e,t){if(!e||!t)return e;const i=t.keyId;i&&t.isCommonEncryption&&bu(e,["moov","trak"]).forEach((e=>{const t=bu(e,["mdia","minf","stbl","stsd"])[0].subarray(8);let s=bu(t,["enca"]);const r=s.length>0;r||(s=bu(t,["encv"])),s.forEach((e=>{bu(r?e.subarray(28):e.subarray(78),["sinf"]).forEach((e=>{const t=ku(e);if(t){const e=t.subarray(8,24);e.some((e=>0!==e))||(gc.log(`[eme] Patching keyId in 'enc${r?"a":"v"}>sinf>>tenc' box: ${du(e)} -> ${du(i)}`),t.set(i,8))}}))}))}));return e}(e,s)),this.emitInitSegment=!0}generateInitSegment(e){let{audioCodec:t,videoCodec:i}=this;if(null==e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);const s=this.initData=vu(e);s.audio&&(t=dg(s.audio,Sc)),s.video&&(i=dg(s.video,Tc));const r={};s.audio&&s.video?r.audiovideo={container:"video/mp4",codec:t+","+i,initSegment:e,id:"main"}:s.audio?r.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:s.video?r.video={container:"video/mp4",codec:i,initSegment:e,id:"main"}:gc.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=r}remux(e,t,i,s,r,a){var o,n;let{initPTS:l,lastEndTime:d}=this;const h={audio:void 0,video:void 0,text:s,id3:i,initSegment:void 0};oc(d)||(d=this.lastEndTime=r||0);const c=t.samples;if(null==c||!c.length)return h;const u={initPTS:void 0,timescale:1};let p=this.initData;if(null!=(o=p)&&o.length||(this.generateInitSegment(c),p=this.initData),null==(n=p)||!n.length)return gc.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),h;this.emitInitSegment&&(u.tracks=this.initTracks,this.emitInitSegment=!1);const f=function(e,t){let i=0,s=0,r=0;const a=bu(e,["moof","traf"]);for(let e=0;e<a.length;e++){const o=a[e],n=bu(o,["tfhd"])[0],l=t[mu(n,4)];if(!l)continue;const d=l.default,h=mu(n,0)|(null==d?void 0:d.flags);let c=null==d?void 0:d.duration;8&h&&(c=mu(n,2&h?12:8));const u=l.timescale||9e4,p=bu(o,["trun"]);for(let e=0;e<p.length;e++)i=Cu(p[e]),!i&&c&&(i=c*mu(p[e],4)),l.type===Tc?s+=i/u:l.type===Sc&&(r+=i/u)}if(0===s&&0===r){let t=1/0,i=0,s=0;const r=bu(e,["sidx"]);for(let e=0;e<r.length;e++){const a=_u(r[e]);if(null!=a&&a.references){t=Math.min(t,a.earliestPresentationTime/a.timescale);const e=a.references.reduce(((e,t)=>e+t.info.duration||0),0);i=Math.max(i,e+a.earliestPresentationTime/a.timescale),s=i-t}}if(s&&oc(s))return s}return s||r}(c,p),m=function(e,t){return bu(t,["moof","traf"]).reduce(((t,i)=>{const s=bu(i,["tfdt"])[0],r=s[0],a=bu(i,["tfhd"]).reduce(((t,i)=>{const a=mu(i,4),o=e[a];if(o){let e=mu(s,4);if(1===r){if(e===hu)return gc.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),t;e*=hu+1,e+=mu(s,8)}const i=e/(o.timescale||9e4);if(oc(i)&&(null===t||i<t))return i}return t}),null);return null!==a&&oc(a)&&(null===t||a<t)?a:t}),null)}(p,c),g=null===m?r:m;(function(e,t,i,s){if(null===e)return!0;const r=Math.max(s,1),a=t-e.baseTime/e.timescale;return Math.abs(a-i)>r}(l,g,r,f)||u.timescale!==l.timescale&&a)&&(u.initPTS=g-r,l&&1===l.timescale&&gc.warn("Adjusting initPTS by "+(u.initPTS-l.baseTime)),this.initPTS=l={baseTime:u.initPTS,timescale:1});const y=e?g-l.baseTime/l.timescale:d,A=y+f;!function(e,t,i){bu(t,["moof","traf"]).forEach((t=>{bu(t,["tfhd"]).forEach((s=>{const r=mu(s,4),a=e[r];if(!a)return;const o=a.timescale||9e4;bu(t,["tfdt"]).forEach((e=>{const t=e[0],s=i*o;if(s){let i=mu(e,4);if(0===t)i-=s,i=Math.max(i,0),Au(e,4,i);else{i*=Math.pow(2,32),i+=mu(e,8),i-=s,i=Math.max(i,0);const t=Math.floor(i/(hu+1)),r=Math.floor(i%(hu+1));Au(e,4,t),Au(e,8,r)}}}))}))}))}(p,c,l.baseTime/l.timescale),f>0?this.lastEndTime=A:(gc.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const b=!!p.audio,_=!!p.video;let v="";b&&(v+="audio"),_&&(v+="video");const w={data1:c,startPTS:y,startDTS:y,endPTS:A,endDTS:A,type:v,hasAudio:b,hasVideo:_,nb:1,dropped:0};return h.audio="audio"===w.type?w:void 0,h.video="audio"!==w.type?w:void 0,h.initSegment=u,h.id3=og(i,r,l,l),s.samples.length&&(h.text=ng(s,r,l)),h}}},{demux:Hm,remux:rg},{demux:class extends mm{constructor(e,t){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=t}resetInitSegment(e,t,i,s){super.resetInitSegment(e,t,i,s),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:s,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=qc(e,0);let i=(null==t?void 0:t.length)||0;if(Bm(e,i))return!1;for(let t=e.length;i<t;i++)if(vm(e,i))return gc.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return function(e,t){return function(e,t){return t+5<e.length}(e,t)&&ym(e,t)&&bm(e,t)<=e.length-t}(e,t)}appendFrame(e,t,i){wm(e,this.observer,t,i,e.manifestCodec);const s=Tm(e,t,i,this.basePTS,this.frameIndex);if(s&&0===s.missing)return s}},remux:rg},{demux:class extends mm{resetInitSegment(e,t,i,s){super.resetInitSegment(e,t,i,s),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:s,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=qc(e,0);let i=(null==t?void 0:t.length)||0;if(t&&11===e[i]&&119===e[i+1]&&void 0!==Qc(t)&&Um(e,i)<=16)return!1;for(let t=e.length;i<t;i++)if(Bm(e,i))return gc.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return function(e,t){return Im(e,t)&&4<=e.length-t}(e,t)}appendFrame(e,t,i){if(null!==this.basePTS)return Dm(e,t,i,this.basePTS,this.frameIndex)}},remux:rg}];hg.splice(2,0,{demux:Fm,remux:rg});class cg{constructor(e,t,i,s,r){this.async=!1,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=i,this.vendor=s,this.id=r}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,i,s){const r=i.transmuxing;r.executeStart=tg();let a=new Uint8Array(e);const{currentTransmuxState:o,transmuxConfig:n}=this;s&&(this.currentTransmuxState=s);const{contiguous:l,discontinuity:d,trackSwitch:h,accurateTimeOffset:c,timeOffset:u,initSegmentChange:p}=s||o,{audioCodec:f,videoCodec:m,defaultInitPts:g,duration:y,initSegmentData:A}=n,b=function(e,t){let i=null;e.byteLength>0&&null!=(null==t?void 0:t.key)&&null!==t.iv&&null!=t.method&&(i=t);return i}(a,t);if(b&&"AES-128"===b.method){const e=this.getDecrypter();if(!e.isSync())return this.decryptionPromise=e.webCryptoDecrypt(a,b.key.buffer,b.iv.buffer).then((e=>{const t=this.push(e,null,i);return this.decryptionPromise=null,t})),this.decryptionPromise;{let t=e.softwareDecrypt(a,b.key.buffer,b.iv.buffer);if(i.part>-1&&(t=e.flush()),!t)return r.executeEnd=tg(),ug(i);a=new Uint8Array(t)}}const _=this.needsProbing(d,h);if(_){const e=this.configureTransmuxer(a);if(e)return gc.warn(`[transmuxer] ${e.message}`),this.observer.emit(dc.ERROR,dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.FRAG_PARSING_ERROR,fatal:!1,error:e,reason:e.message}),r.executeEnd=tg(),ug(i)}(d||h||p||_)&&this.resetInitSegment(A,f,m,y,t),(d||p||_)&&this.resetInitialTimestamp(g),l||this.resetContiguity();const v=this.transmux(a,b,u,c,i),w=this.currentTransmuxState;return w.contiguous=!0,w.discontinuity=!1,w.trackSwitch=!1,r.executeEnd=tg(),v}flush(e){const t=e.transmuxing;t.executeStart=tg();const{decrypter:i,currentTransmuxState:s,decryptionPromise:r}=this;if(r)return r.then((()=>this.flush(e)));const a=[],{timeOffset:o}=s;if(i){const t=i.flush();t&&a.push(this.push(t,null,e))}const{demuxer:n,remuxer:l}=this;if(!n||!l)return t.executeEnd=tg(),[ug(e)];const d=n.flush(o);return pg(d)?d.then((t=>(this.flushRemux(a,t,e),a))):(this.flushRemux(a,d,e),a)}flushRemux(e,t,i){const{audioTrack:s,videoTrack:r,id3Track:a,textTrack:o}=t,{accurateTimeOffset:n,timeOffset:l}=this.currentTransmuxState;gc.log(`[transmuxer.ts]: Flushed fragment ${i.sn}${i.part>-1?" p: "+i.part:""} of level ${i.level}`);const d=this.remuxer.remux(s,r,a,o,l,n,!0,this.id);e.push({remuxResult:d,chunkMeta:i}),i.transmuxing.executeEnd=tg()}resetInitialTimestamp(e){const{demuxer:t,remuxer:i}=this;t&&i&&(t.resetTimeStamp(e),i.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,i,s,r){const{demuxer:a,remuxer:o}=this;a&&o&&(a.resetInitSegment(e,t,i,s),o.resetInitSegment(e,t,i,r))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,i,s,r){let a;return a=t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,i,s,r):this.transmuxUnencrypted(e,i,s,r),a}transmuxUnencrypted(e,t,i,s){const{audioTrack:r,videoTrack:a,id3Track:o,textTrack:n}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(r,a,o,n,t,i,!1,this.id),chunkMeta:s}}transmuxSampleAes(e,t,i,s,r){return this.demuxer.demuxSampleAes(e,t,i).then((e=>({remuxResult:this.remuxer.remux(e.audioTrack,e.videoTrack,e.id3Track,e.textTrack,i,s,!1,this.id),chunkMeta:r})))}configureTransmuxer(e){const{config:t,observer:i,typeSupported:s,vendor:r}=this;let a;for(let t=0,i=hg.length;t<i;t++){var o;if(null!=(o=hg[t].demux)&&o.probe(e)){a=hg[t];break}}if(!a)return new Error("Failed to find demuxer by probing fragment data");const n=this.demuxer,l=this.remuxer,d=a.remux,h=a.demux;l&&l instanceof d||(this.remuxer=new d(i,t,s,r)),n&&n instanceof h||(this.demuxer=new h(i,t,s),this.probe=h.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new Xf(this.config)),e}}const ug=e=>({remuxResult:{},chunkMeta:e});function pg(e){return"then"in e&&e.then instanceof Function}class fg{constructor(e,t,i,s,r){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=i,this.duration=s,this.defaultInitPts=r||null}}class mg{constructor(e,t,i,s,r,a){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=i,this.trackSwitch=s,this.timeOffset=r,this.initSegmentChange=a}}var gg={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,i="~";function s(){}function r(e,t,i){this.fn=e,this.context=t,this.once=i||!1}function a(e,t,s,a,o){if("function"!=typeof s)throw new TypeError("The listener must be a function");var n=new r(s,a||e,o),l=i?i+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],n]:e._events[l].push(n):(e._events[l]=n,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new s:delete e._events[t]}function n(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(i=!1)),n.prototype.eventNames=function(){var e,s,r=[];if(0===this._eventsCount)return r;for(s in e=this._events)t.call(e,s)&&r.push(i?s.slice(1):s);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},n.prototype.listeners=function(e){var t=i?i+e:e,s=this._events[t];if(!s)return[];if(s.fn)return[s.fn];for(var r=0,a=s.length,o=new Array(a);r<a;r++)o[r]=s[r].fn;return o},n.prototype.listenerCount=function(e){var t=i?i+e:e,s=this._events[t];return s?s.fn?1:s.length:0},n.prototype.emit=function(e,t,s,r,a,o){var n=i?i+e:e;if(!this._events[n])return!1;var l,d,h=this._events[n],c=arguments.length;if(h.fn){switch(h.once&&this.removeListener(e,h.fn,void 0,!0),c){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,t),!0;case 3:return h.fn.call(h.context,t,s),!0;case 4:return h.fn.call(h.context,t,s,r),!0;case 5:return h.fn.call(h.context,t,s,r,a),!0;case 6:return h.fn.call(h.context,t,s,r,a,o),!0}for(d=1,l=new Array(c-1);d<c;d++)l[d-1]=arguments[d];h.fn.apply(h.context,l)}else{var u,p=h.length;for(d=0;d<p;d++)switch(h[d].once&&this.removeListener(e,h[d].fn,void 0,!0),c){case 1:h[d].fn.call(h[d].context);break;case 2:h[d].fn.call(h[d].context,t);break;case 3:h[d].fn.call(h[d].context,t,s);break;case 4:h[d].fn.call(h[d].context,t,s,r);break;default:if(!l)for(u=1,l=new Array(c-1);u<c;u++)l[u-1]=arguments[u];h[d].fn.apply(h[d].context,l)}}return!0},n.prototype.on=function(e,t,i){return a(this,e,t,i,!1)},n.prototype.once=function(e,t,i){return a(this,e,t,i,!0)},n.prototype.removeListener=function(e,t,s,r){var a=i?i+e:e;if(!this._events[a])return this;if(!t)return o(this,a),this;var n=this._events[a];if(n.fn)n.fn!==t||r&&!n.once||s&&n.context!==s||o(this,a);else{for(var l=0,d=[],h=n.length;l<h;l++)(n[l].fn!==t||r&&!n[l].once||s&&n[l].context!==s)&&d.push(n[l]);d.length?this._events[a]=1===d.length?d[0]:d:o(this,a)}return this},n.prototype.removeAllListeners=function(e){var t;return e?(t=i?i+e:e,this._events[t]&&o(this,t)):(this._events=new s,this._eventsCount=0),this},n.prototype.off=n.prototype.removeListener,n.prototype.addListener=n.prototype.on,n.prefixed=i,n.EventEmitter=n,e.exports=n}(gg);var yg=Xh(gg.exports);class Ag{constructor(e,t,i,s){this.error=null,this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0;const r=e.config;this.hls=e,this.id=t,this.useWorker=!!r.enableWorker,this.onTransmuxComplete=i,this.onFlush=s;const a=(e,t)=>{(t=t||{}).frag=this.frag,t.id=this.id,e===dc.ERROR&&(this.error=t.error),this.hls.trigger(e,t)};this.observer=new yg,this.observer.on(dc.FRAG_DECRYPTED,a),this.observer.on(dc.ERROR,a);const o=zu(r.preferManagedMediaSource)||{isTypeSupported:()=>!1},n={mpeg:o.isTypeSupported("audio/mpeg"),mp3:o.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:o.isTypeSupported('audio/mp4; codecs="ac-3"')},l=navigator.vendor;if(this.useWorker&&"undefined"!=typeof Worker){if(r.workerPath||"function"==typeof __HLS_WORKER_BUNDLE__){try{r.workerPath?(gc.log(`loading Web Worker ${r.workerPath} for "${t}"`),this.workerContext=function(e){const t=new self.URL(e,self.location.href).href;return{worker:new self.Worker(t),scriptURL:t}}(r.workerPath)):(gc.log(`injecting Web Worker for "${t}"`),this.workerContext=function(){const e=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),t=self.URL.createObjectURL(e);return{worker:new self.Worker(t),objectURL:t}}()),this.onwmsg=e=>this.onWorkerMessage(e);const{worker:e}=this.workerContext;e.addEventListener("message",this.onwmsg),e.onerror=e=>{const i=new Error(`${e.message} (${e.filename}:${e.lineno})`);r.enableWorker=!1,gc.warn(`Error in "${t}" Web Worker, fallback to inline`),this.hls.trigger(dc.ERROR,{type:hc.OTHER_ERROR,details:cc.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:i})},e.postMessage({cmd:"init",typeSupported:n,vendor:l,id:t,config:JSON.stringify(r)})}catch(e){gc.warn(`Error setting up "${t}" Web Worker, fallback to inline`,e),this.resetWorker(),this.error=null,this.transmuxer=new cg(this.observer,n,r,l,t)}return}}this.transmuxer=new cg(this.observer,n,r,l,t)}resetWorker(){if(this.workerContext){const{worker:e,objectURL:t}=this.workerContext;t&&self.URL.revokeObjectURL(t),e.removeEventListener("message",this.onwmsg),e.onerror=null,e.terminate(),this.workerContext=null}}destroy(){if(this.workerContext)this.resetWorker(),this.onwmsg=void 0;else{const e=this.transmuxer;e&&(e.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null}push(e,t,i,s,r,a,o,n,l,d){var h,c;l.transmuxing.start=self.performance.now();const{transmuxer:u}=this,p=a?a.start:r.start,f=r.decryptdata,m=this.frag,g=!(m&&r.cc===m.cc),y=!(m&&l.level===m.level),A=m?l.sn-m.sn:-1,b=this.part?l.part-this.part.index:-1,_=0===A&&l.id>1&&l.id===(null==m?void 0:m.stats.chunkCount),v=!y&&(1===A||0===A&&(1===b||_&&b<=0)),w=self.performance.now();(y||A||0===r.stats.parsing.start)&&(r.stats.parsing.start=w),!a||!b&&v||(a.stats.parsing.start=w);const S=!(m&&(null==(h=r.initSegment)?void 0:h.url)===(null==(c=m.initSegment)?void 0:c.url)),T=new mg(g,v,n,y,p,S);if(!v||g||S){gc.log(`[transmuxer-interface, ${r.type}]: Starting new transmux session for sn: ${l.sn} p: ${l.part} level: ${l.level} id: ${l.id}\n discontinuity: ${g}\n trackSwitch: ${y}\n contiguous: ${v}\n accurateTimeOffset: ${n}\n timeOffset: ${p}\n initSegmentChange: ${S}`);const e=new fg(i,s,t,o,d);this.configureTransmuxer(e)}if(this.frag=r,this.part=a,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:f,chunkMeta:l,state:T},e instanceof ArrayBuffer?[e]:[]);else if(u){const t=u.push(e,f,l,T);pg(t)?(u.async=!0,t.then((e=>{this.handleTransmuxComplete(e)})).catch((e=>{this.transmuxerError(e,l,"transmuxer-interface push error")}))):(u.async=!1,this.handleTransmuxComplete(t))}}flush(e){e.transmuxing.start=self.performance.now();const{transmuxer:t}=this;if(this.workerContext)this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:e});else if(t){let i=t.flush(e);pg(i)||t.async?(pg(i)||(i=Promise.resolve(i)),i.then((t=>{this.handleFlushResult(t,e)})).catch((t=>{this.transmuxerError(t,e,"transmuxer-interface flush error")}))):this.handleFlushResult(i,e)}}transmuxerError(e,t,i){this.hls&&(this.error=e,this.hls.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.FRAG_PARSING_ERROR,chunkMeta:t,fatal:!1,error:e,err:e,reason:i}))}handleFlushResult(e,t){e.forEach((e=>{this.handleTransmuxComplete(e)})),this.onFlush(t)}onWorkerMessage(e){const t=e.data,i=this.hls;switch(t.event){case"init":{var s;const e=null==(s=this.workerContext)?void 0:s.objectURL;e&&self.URL.revokeObjectURL(e);break}case"transmuxComplete":this.handleTransmuxComplete(t.data);break;case"flush":this.onFlush(t.data);break;case"workerLog":gc[t.data.logType]&&gc[t.data.logType](t.data.message);break;default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,i.trigger(t.event,t.data)}}configureTransmuxer(e){const{transmuxer:t}=this;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:e}):t&&t.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}function bg(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!_g(e[i].attrs,t[i].attrs))return!1;return!0}function _g(e,t,i){const s=e["STABLE-RENDITION-ID"];return s&&!i?s===t["STABLE-RENDITION-ID"]:!(i||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some((i=>e[i]!==t[i]))}function vg(e,t){return t.label.toLowerCase()===e.name.toLowerCase()&&(!t.language||t.language.toLowerCase()===(e.lang||"").toLowerCase())}class wg{constructor(e){this.buffered=void 0;const t=(t,i,s)=>{if((i>>>=0)>s-1)throw new DOMException(`Failed to execute '${t}' on 'TimeRanges': The index provided (${i}) is greater than the maximum bound (${s})`);return e[i][t]};this.buffered={get length(){return e.length},end:i=>t("end",i,e.length),start:i=>t("start",i,e.length)}}}class Sg{constructor(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}append(e,t,i){const s=this.queues[t];s.push(e),1!==s.length||i||this.executeNext(t)}insertAbort(e,t){this.queues[t].unshift(e),this.executeNext(t)}appendBlocker(e){let t;const i=new Promise((e=>{t=e})),s={execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};return this.append(s,e),i}executeNext(e){const t=this.queues[e];if(t.length){const i=t[0];try{i.execute()}catch(t){gc.warn(`[buffer-operation-queue]: Exception executing "${e}" SourceBuffer operation: ${t}`),i.onError(t);const s=this.buffers[e];null!=s&&s.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){this.queues[e].shift(),this.executeNext(e)}current(e){return this.queues[e][0]}}const Tg=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/;function Eg(e){const t=e.querySelectorAll("source");[].slice.call(t).forEach((t=>{e.removeChild(t)}))}const kg={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},Cg=function(e){let t=e;return kg.hasOwnProperty(e)&&(t=kg[e]),String.fromCharCode(t)},xg=15,Rg=100,Dg={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Lg={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Ig={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Pg={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Bg=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class Mg{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const i="function"==typeof t?t():t;gc.log(`${this.time} [${e}] ${i}`)}}}const Ug=function(e){const t=[];for(let i=0;i<e.length;i++)t.push(e[i].toString(16));return t};class Fg{constructor(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const t=["foreground","underline","italics","background","flash"];for(let i=0;i<t.length;i++){const s=t[i];e.hasOwnProperty(s)&&(this[s]=e[s])}}isDefault(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash}equals(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}copy(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}toString(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}class Og{constructor(){this.uchar=" ",this.penState=new Fg}reset(){this.uchar=" ",this.penState.reset()}setChar(e,t){this.uchar=e,this.penState.copy(t)}setPenState(e){this.penState.copy(e)}equals(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)}copy(e){this.uchar=e.uchar,this.penState.copy(e.penState)}isEmpty(){return" "===this.uchar&&this.penState.isDefault()}}class Ng{constructor(e){this.chars=[],this.pos=0,this.currPenState=new Fg,this.cueStartTime=null,this.logger=void 0;for(let e=0;e<Rg;e++)this.chars.push(new Og);this.logger=e}equals(e){for(let t=0;t<Rg;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<Rg;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<Rg;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e}setCursor(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>Rg&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=Rg)}moveCursor(e){const t=this.pos+e;if(e>1)for(let e=this.pos+1;e<t+1;e++)this.chars[e].setPenState(this.currPenState);this.setCursor(t)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const t=Cg(e);this.pos>=Rg?this.logger.log(0,(()=>"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!")):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))}clearFromPos(e){let t;for(t=e;t<Rg;t++)this.chars[t].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let t=!0;for(let i=0;i<Rg;i++){const s=this.chars[i].uchar;" "!==s&&(t=!1),e.push(s)}return t?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e);this.chars[this.pos].setPenState(this.currPenState)}}class jg{constructor(e){this.rows=[],this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<xg;t++)this.rows.push(new Ng(e));this.logger=e}reset(){for(let e=0;e<xg;e++)this.rows[e].clear();this.currRow=14}equals(e){let t=!0;for(let i=0;i<xg;i++)if(!this.rows[i].equals(e.rows[i])){t=!1;break}return t}copy(e){for(let t=0;t<xg;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<xg;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e}backSpace(){this.rows[this.currRow].backSpace()}clearToEndOfRow(){this.rows[this.currRow].clearToEndOfRow()}insertChar(e){this.rows[this.currRow].insertChar(e)}setPen(e){this.rows[this.currRow].setPenStyles(e)}moveCursor(e){this.rows[this.currRow].moveCursor(e)}setCursor(e){this.logger.log(2,"setCursor: "+e);this.rows[this.currRow].setCursor(e)}setPAC(e){this.logger.log(2,(()=>"pacData = "+JSON.stringify(e)));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let e=0;e<xg;e++)this.rows[e].clear();const e=this.currRow+1-this.nrRollUpRows,i=this.lastOutputScreen;if(i){const s=i.rows[e].cueStartTime,r=this.logger.time;if(null!==s&&null!==r&&s<r)for(let s=0;s<this.nrRollUpRows;s++)this.rows[t-this.nrRollUpRows+s+1].copy(i.rows[e+s])}}this.currRow=t;const i=this.rows[this.currRow];if(null!==e.indent){const t=e.indent,s=Math.max(t-1,0);i.setCursor(e.indent),e.color=i.chars[s].penState.foreground}const s={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(s)}setBkgData(e){this.logger.log(2,(()=>"bkgData = "+JSON.stringify(e))),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(null===this.nrRollUpRows)return void this.logger.log(3,"roll_up but nrRollUpRows not set yet");this.logger.log(1,(()=>this.getDisplayText()));const e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const t=[];let i="",s=-1;for(let i=0;i<xg;i++){const r=this.rows[i].getTextString();r&&(s=i+1,e?t.push("Row "+s+": '"+r+"'"):t.push(r.trim()))}return t.length>0&&(i=e?"["+t.join(" | ")+"]":t.join("\n")),i}getTextAndFormat(){return this.rows}}class Gg{constructor(e,t,i){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new jg(i),this.nonDisplayedMemory=new jg(i),this.lastOutputScreen=new jg(i),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=i}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,(()=>"MODE="+e)),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);const t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,(()=>t+": "+this.writeScreen.getDisplayText(!0))),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(1,(()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0))),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,(()=>"DISP: "+this.displayedMemory.getDisplayText()))}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{const i=Math.floor(e/2)-16,s=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=s[i]}this.logger.log(2,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)}outputDataUpdate(e=!1){const t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}}class zg{constructor(e,t,i){this.channels=void 0,this.currentChannel=0,this.cmdHistory={a:null,b:null},this.logger=void 0;const s=this.logger=new Mg;this.channels=[null,new Gg(e,t,s),new Gg(e+1,i,s)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){let i,s,r,a=!1;this.logger.time=e;for(let e=0;e<t.length;e+=2)if(s=127&t[e],r=127&t[e+1],0!==s||0!==r){if(this.logger.log(3,"["+Ug([t[e],t[e+1]])+"] -> ("+Ug([s,r])+")"),i=this.parseCmd(s,r),i||(i=this.parseMidrow(s,r)),i||(i=this.parsePAC(s,r)),i||(i=this.parseBackgroundAttributes(s,r)),!i&&(a=this.parseChars(s,r),a)){const e=this.currentChannel;if(e&&e>0){this.channels[e].insertChars(a)}else this.logger.log(2,"No channel found yet. TEXT-MODE?")}i||a||this.logger.log(2,"Couldn't parse cleaned data "+Ug([s,r])+" orig: "+Ug([t[e],t[e+1]]))}}parseCmd(e,t){const{cmdHistory:i}=this;if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47)&&!((23===e||31===e)&&t>=33&&t<=35))return!1;if(Hg(e,t,i))return $g(null,null,i),this.logger.log(3,"Repeated command ("+Ug([e,t])+") is dropped"),!0;const s=20===e||21===e||23===e?1:2,r=this.channels[s];return 20===e||21===e||28===e||29===e?32===t?r.ccRCL():33===t?r.ccBS():34===t?r.ccAOF():35===t?r.ccAON():36===t?r.ccDER():37===t?r.ccRU(2):38===t?r.ccRU(3):39===t?r.ccRU(4):40===t?r.ccFON():41===t?r.ccRDC():42===t?r.ccTR():43===t?r.ccRTD():44===t?r.ccEDM():45===t?r.ccCR():46===t?r.ccENM():47===t&&r.ccEOC():r.ccTO(t-32),$g(e,t,i),this.currentChannel=s,!0}parseMidrow(e,t){let i=0;if((17===e||25===e)&&t>=32&&t<=47){if(i=17===e?1:2,i!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const s=this.channels[i];return!!s&&(s.ccMIDROW(t),this.logger.log(3,"MIDROW ("+Ug([e,t])+")"),!0)}return!1}parsePAC(e,t){let i;const s=this.cmdHistory;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127)&&!((16===e||24===e)&&t>=64&&t<=95))return!1;if(Hg(e,t,s))return $g(null,null,s),!0;const r=e<=23?1:2;i=t>=64&&t<=95?1===r?Dg[e]:Ig[e]:1===r?Lg[e]:Pg[e];const a=this.channels[r];return!!a&&(a.setPAC(this.interpretPAC(i,t)),$g(e,t,s),this.currentChannel=r,!0)}interpretPAC(e,t){let i;const s={color:null,italics:!1,indent:null,underline:!1,row:e};return i=t>95?t-96:t-64,s.underline=1==(1&i),i<=13?s.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(i/2)]:i<=15?(s.italics=!0,s.color="white"):s.indent=4*Math.floor((i-16)/2),s}parseChars(e,t){let i,s=null,r=null;if(e>=25?(i=2,r=e-8):(i=1,r=e),r>=17&&r<=19){let e;e=17===r?t+80:18===r?t+112:t+144,this.logger.log(2,"Special char '"+Cg(e)+"' in channel "+i),s=[e]}else e>=32&&e<=127&&(s=0===t?[e]:[e,t]);if(s){const i=Ug(s);this.logger.log(3,"Char codes = "+i.join(",")),$g(e,t,this.cmdHistory)}return s}parseBackgroundAttributes(e,t){if(!((16===e||24===e)&&t>=32&&t<=47)&&!((23===e||31===e)&&t>=45&&t<=47))return!1;let i;const s={};16===e||24===e?(i=Math.floor((t-32)/2),s.background=Bg[i],t%2==1&&(s.background=s.background+"_semi")):45===t?s.background="transparent":(s.foreground="black",47===t&&(s.underline=!0));const r=e<=23?1:2;return this.channels[r].setBkgData(s),$g(e,t,this.cmdHistory),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}this.cmdHistory={a:null,b:null}}cueSplitAtTime(e){for(let t=0;t<this.channels.length;t++){const i=this.channels[t];i&&i.cueSplitAtTime(e)}}}function $g(e,t,i){i.a=e,i.b=t}function Hg(e,t,i){return i.a===e&&i.b===t}class Vg{constructor(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}dispatchCue(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}newCue(e,t,i){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=i,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}var Wg=function(){if(null!=Pc&&Pc.VTTCue)return self.VTTCue;const e=["","lr","rl"],t=["start","middle","end","left","right"];function i(e,t){if("string"!=typeof t)return!1;if(!Array.isArray(e))return!1;const i=t.toLowerCase();return!!~e.indexOf(i)&&i}function s(e){return i(t,e)}function r(e,...t){let i=1;for(;i<arguments.length;i++){const t=arguments[i];for(const i in t)e[i]=t[i]}return e}function a(t,a,o){const n=this,l={enumerable:!0};n.hasBeenReset=!1;let d="",h=!1,c=t,u=a,p=o,f=null,m="",g=!0,y="auto",A="start",b=50,_="middle",v=50,w="middle";Object.defineProperty(n,"id",r({},l,{get:function(){return d},set:function(e){d=""+e}})),Object.defineProperty(n,"pauseOnExit",r({},l,{get:function(){return h},set:function(e){h=!!e}})),Object.defineProperty(n,"startTime",r({},l,{get:function(){return c},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");c=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"endTime",r({},l,{get:function(){return u},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");u=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"text",r({},l,{get:function(){return p},set:function(e){p=""+e,this.hasBeenReset=!0}})),Object.defineProperty(n,"region",r({},l,{get:function(){return f},set:function(e){f=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"vertical",r({},l,{get:function(){return m},set:function(t){const s=function(t){return i(e,t)}(t);if(!1===s)throw new SyntaxError("An invalid or illegal string was specified.");m=s,this.hasBeenReset=!0}})),Object.defineProperty(n,"snapToLines",r({},l,{get:function(){return g},set:function(e){g=!!e,this.hasBeenReset=!0}})),Object.defineProperty(n,"line",r({},l,{get:function(){return y},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"lineAlign",r({},l,{get:function(){return A},set:function(e){const t=s(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");A=t,this.hasBeenReset=!0}})),Object.defineProperty(n,"position",r({},l,{get:function(){return b},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"positionAlign",r({},l,{get:function(){return _},set:function(e){const t=s(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");_=t,this.hasBeenReset=!0}})),Object.defineProperty(n,"size",r({},l,{get:function(){return v},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"align",r({},l,{get:function(){return w},set:function(e){const t=s(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");w=t,this.hasBeenReset=!0}})),n.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}();class Jg{decode(e,t){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function qg(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+parseFloat(s||0)}const i=e.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return i?parseFloat(i[2])>59?t(i[2],i[3],0,i[4]):t(i[1],i[2],i[3],i[4]):null}class Kg{constructor(){this.values=Object.create(null)}set(e,t){this.get(e)||""===t||(this.values[e]=t)}get(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,i){for(let s=0;s<i.length;++s)if(t===i[s]){this.set(e,t);break}}integer(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))}percent(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){const i=parseFloat(t);if(i>=0&&i<=100)return this.set(e,i),!0}return!1}}function Yg(e,t,i,s){const r=s?e.split(s):[e];for(const e in r){if("string"!=typeof r[e])continue;const s=r[e].split(i);if(2!==s.length)continue;t(s[0],s[1])}}const Qg=new Wg(0,0,""),Xg="middle"===Qg.align?"middle":"center";function Zg(e,t,i){const s=e;function r(){const t=qg(e);if(null===t)throw new Error("Malformed timestamp: "+s);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function a(){e=e.replace(/^\s+/,"")}if(a(),t.startTime=r(),a(),"--\x3e"!==e.slice(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+s);e=e.slice(3),a(),t.endTime=r(),a(),function(e,t){const s=new Kg;Yg(e,(function(e,t){let r;switch(e){case"region":for(let r=i.length-1;r>=0;r--)if(i[r].id===t){s.set(e,i[r].region);break}break;case"vertical":s.alt(e,t,["rl","lr"]);break;case"line":r=t.split(","),s.integer(e,r[0]),s.percent(e,r[0])&&s.set("snapToLines",!1),s.alt(e,r[0],["auto"]),2===r.length&&s.alt("lineAlign",r[1],["start",Xg,"end"]);break;case"position":r=t.split(","),s.percent(e,r[0]),2===r.length&&s.alt("positionAlign",r[1],["start",Xg,"end","line-left","line-right","auto"]);break;case"size":s.percent(e,t);break;case"align":s.alt(e,t,["start",Xg,"end","left","right"])}}),/:/,/\s/),t.region=s.get("region",null),t.vertical=s.get("vertical","");let r=s.get("line","auto");"auto"===r&&-1===Qg.line&&(r=-1),t.line=r,t.lineAlign=s.get("lineAlign","start"),t.snapToLines=s.get("snapToLines",!0),t.size=s.get("size",100),t.align=s.get("align",Xg);let a=s.get("position","auto");"auto"===a&&50===Qg.position&&(a="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=a}(e,t)}function ey(e){return e.replace(/<br(?: \/)?>/gi,"\n")}class ty{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new Jg,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const t=this;function i(){let e=t.buffer,i=0;for(e=ey(e);i<e.length&&"\r"!==e[i]&&"\n"!==e[i];)++i;const s=e.slice(0,i);return"\r"===e[i]&&++i,"\n"===e[i]&&++i,t.buffer=e.slice(i),s}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{let e="";if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;e=i();const s=e.match(/^()?WEBVTT([ \t].*)?$/);if(null==s||!s[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let s=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(s?s=!1:e=i(),t.state){case"HEADER":/:/.test(e)?Yg(e,(function(e,t){}),/:/):e||(t.state="ID");continue;case"NOTE":e||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(e)){t.state="NOTE";break}if(!e)continue;if(t.cue=new Wg(0,0,""),t.state="CUE",-1===e.indexOf("--\x3e")){t.cue.id=e;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{Zg(e,t.cue,t.regionList)}catch(e){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const i=-1!==e.indexOf("--\x3e");if(!e||i&&(s=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(null===t.cue)continue;t.cue.text&&(t.cue.text+="\n"),t.cue.text+=e}continue;case"BADCUE":e||(t.state="ID")}}}catch(e){"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this}flush(){const e=this;try{if((e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state||"BADWEBVTT"===e.state)throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this}}const iy=/\r\n|\n\r|\n|\r/g,sy=function(e,t,i=0){return e.slice(i,i+t.length)===t},ry=function(e){let t=5381,i=e.length;for(;i;)t=33*t^e.charCodeAt(--i);return(t>>>0).toString()};function ay(e,t,i){return ry(e.toString())+ry(t.toString())+ry(i)}function oy(e,t,i,s,r,a,o){const n=new ty,l=ou(new Uint8Array(e)).trim().replace(iy,"\n").split("\n"),d=[],h=t?function(e,t=1){return Zm(e,9e4,1/t)}(t.baseTime,t.timescale):0;let c,u="00:00.000",p=0,f=0,m=!0;n.oncue=function(e){const a=i[s];let o=i.ccOffset;const n=(p-h)/9e4;if(null!=a&&a.new&&(void 0!==f?o=i.ccOffset=a.start:function(e,t,i){let s=e[t],r=e[s.prevCC];if(!r||!r.new&&s.new)return e.ccOffset=e.presentationOffset=s.start,void(s.new=!1);for(;null!=(a=r)&&a.new;){var a;e.ccOffset+=s.start-r.start,s.new=!1,s=r,r=e[s.prevCC]}e.presentationOffset=i}(i,s,n)),n){if(!t)return void(c=new Error("Missing initPTS for VTT MPEGTS"));o=n-i.presentationOffset}const l=e.endTime-e.startTime,u=ag(9e4*(e.startTime+o-f),9e4*r)/9e4;e.startTime=Math.max(u,0),e.endTime=Math.max(u+l,0);const m=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(m)),e.id||(e.id=ay(e.startTime,e.endTime,m)),e.endTime>0&&d.push(e)},n.onparsingerror=function(e){c=e},n.onflush=function(){c?o(c):a(d)},l.forEach((e=>{if(m){if(sy(e,"X-TIMESTAMP-MAP=")){m=!1,e.slice(16).split(",").forEach((e=>{sy(e,"LOCAL:")?u=e.slice(6):sy(e,"MPEGTS:")&&(p=parseInt(e.slice(7)))}));try{f=function(e){let t=parseInt(e.slice(-3));const i=parseInt(e.slice(-6,-4)),s=parseInt(e.slice(-9,-7)),r=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!(oc(t)&&oc(i)&&oc(s)&&oc(r)))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*i,t+=6e4*s,t+=36e5*r,t}(u)/1e3}catch(e){c=e}return}""===e&&(m=!1)}n.parse(e+"\n")})),n.flush()}const ny="stpp.ttml.im1t",ly=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,dy=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,hy={left:"start",center:"center",right:"end",start:"start",end:"end"};function cy(e,t,i,s){const r=bu(new Uint8Array(e),["mdat"]);if(0===r.length)return void s(new Error("Could not parse IMSC1 mdat"));const a=r.map((e=>ou(e))),o=function(e,t,i=1,s=!1){return Zm(e,t,1/i,s)}(t.baseTime,1,t.timescale);try{a.forEach((e=>i(function(e,t){const i=new DOMParser,s=i.parseFromString(e,"text/xml").getElementsByTagName("tt")[0];if(!s)throw new Error("Invalid ttml");const r={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},a=Object.keys(r).reduce(((e,t)=>(e[t]=s.getAttribute(`ttp:${t}`)||r[t],e)),{}),o="preserve"!==s.getAttribute("xml:space"),n=py(uy(s,"styling","style")),l=py(uy(s,"layout","region")),d=uy(s,"body","[begin]");return[].map.call(d,(e=>{const i=fy(e,o);if(!i||!e.hasAttribute("begin"))return null;const s=yy(e.getAttribute("begin"),a),r=yy(e.getAttribute("dur"),a);let d=yy(e.getAttribute("end"),a);if(null===s)throw gy(e);if(null===d){if(null===r)throw gy(e);d=s+r}const h=new Wg(s-t,d-t,i);h.id=ay(h.startTime,h.endTime,h.text);const c=function(e,t,i){const s="http://www.w3.org/ns/ttml#styling";let r=null;const a=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],o=null!=e&&e.hasAttribute("style")?e.getAttribute("style"):null;o&&i.hasOwnProperty(o)&&(r=i[o]);return a.reduce(((i,a)=>{const o=my(t,s,a)||my(e,s,a)||my(r,s,a);return o&&(i[a]=o),i}),{})}(l[e.getAttribute("region")],n[e.getAttribute("style")],n),{textAlign:u}=c;if(u){const e=hy[u];e&&(h.lineAlign=e),h.align=u}return ac(h,c),h})).filter((e=>null!==e))}(e,o))))}catch(e){s(e)}}function uy(e,t,i){const s=e.getElementsByTagName(t)[0];return s?[].slice.call(s.querySelectorAll(i)):[]}function py(e){return e.reduce(((e,t)=>{const i=t.getAttribute("xml:id");return i&&(e[i]=t),e}),{})}function fy(e,t){return[].slice.call(e.childNodes).reduce(((e,i,s)=>{var r;return"br"===i.nodeName&&s?e+"\n":null!=(r=i.childNodes)&&r.length?fy(i,t):t?e+i.textContent.trim().replace(/\s+/g," "):e+i.textContent}),"")}function my(e,t,i){return e&&e.hasAttributeNS(t,i)?e.getAttributeNS(t,i):null}function gy(e){return new Error(`Could not parse ttml timestamp ${e}`)}function yy(e,t){if(!e)return null;let i=qg(e);return null===i&&(ly.test(e)?i=function(e,t){const i=ly.exec(e),s=(0|i[4])+(0|i[5])/t.subFrameRate;return 3600*(0|i[1])+60*(0|i[2])+(0|i[3])+s/t.frameRate}(e,t):dy.test(e)&&(i=function(e,t){const i=dy.exec(e),s=Number(i[1]);switch(i[2]){case"h":return 3600*s;case"m":return 60*s;case"ms":return 1e3*s;case"f":return s/t.frameRate;case"t":return s/t.tickRate}return s}(e,t))),i}function Ay(e){return e.characteristics&&/transcribes-spoken-dialog/gi.test(e.characteristics)&&/describes-music-and-sound/gi.test(e.characteristics)?"captions":"subtitles"}function by(e,t){return!!e&&e.kind===Ay(t)&&vg(t,e)}class _y{constructor(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}setStreamController(e){this.streamController=e}destroy(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(dc.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(dc.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(dc.MANIFEST_PARSED,this.onManifestParsed,this),e.on(dc.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(dc.BUFFER_CODECS,this.onBufferCodecs,this),e.on(dc.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(dc.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(dc.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(dc.MANIFEST_PARSED,this.onManifestParsed,this),e.off(dc.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(dc.BUFFER_CODECS,this.onBufferCodecs,this),e.off(dc.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const i=this.hls.levels[t.droppedLevel];this.isLevelAllowed(i)&&this.restrictedLevels.push({bitrate:i.bitrate,height:i.height,width:i.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const i=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,i.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&oc(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping()}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0)return void(this.clientRect=null);const e=this.hls.levels;if(e.length){const t=this.hls,i=this.getMaxLevel(e.length-1);i!==this.autoLevelCapping&&gc.log(`Setting autoLevelCapping to ${i}: ${e[i].height}p@${e[i].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=i,t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const i=t.filter(((t,i)=>this.isLevelAllowed(t)&&i<=e));return this.clientRect=null,_y.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,t={width:0,height:0};if(e){const i=e.getBoundingClientRect();t.width=i.width,t.height=i.height,t.width||t.height||(t.width=i.right-i.left||e.width||0,t.height=i.bottom-i.top||e.height||0)}return this.clientRect=t,t}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(e){}return e}isLevelAllowed(e){return!this.restrictedLevels.some((t=>e.bitrate===t.bitrate&&e.width===t.width&&e.height===t.height))}static getMaxLevelByMediaSize(e,t,i){if(null==e||!e.length)return-1;let s=e.length-1;const r=Math.max(t,i);for(let t=0;t<e.length;t+=1){const i=e[t];if((i.width>=r||i.height>=r)&&(a=i,!(o=e[t+1])||a.width!==o.width||a.height!==o.height)){s=t;break}}var a,o;return s}}const vy="[eme]";class wy{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=wy.CDMCleanupPromise?[wy.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=gc.debug.bind(gc,vy),this.log=gc.log.bind(gc,vy),this.warn=gc.warn.bind(gc,vy),this.error=gc.error.bind(gc,vy),this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.unregisterListeners(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.onMediaEncrypted=this.onWaitingForKey=this.keyIdToKeySessionPromise=null,this.config=null}registerListeners(){this.hls.on(dc.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(dc.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(dc.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(dc.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(dc.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(dc.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:i}=this.config,s=t[e];if(s)return s.licenseUrl;if(e===Bc.WIDEVINE&&i)return i;throw new Error(`no license server URL configured for key-system "${e}"`)}getServerCertificateUrl(e){const{drmSystems:t}=this.config,i=t[e];if(i)return i.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,i=(e,t,i)=>!!e&&i.indexOf(e)===t,s=t.map((e=>e.audioCodec)).filter(i),r=t.map((e=>e.videoCodec)).filter(i);return s.length+r.length===0&&r.push("avc1.42e01e"),new Promise(((t,i)=>{const a=e=>{const o=e.shift();this.getMediaKeysPromise(o,s,r).then((e=>t({keySystem:o,mediaKeys:e}))).catch((t=>{e.length?a(e):i(t instanceof Sy?t:new Sy({type:hc.KEY_SYSTEM_ERROR,details:cc.KEY_SYSTEM_NO_ACCESS,error:t,fatal:!0},t.message))}))};a(e)}))}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:i}=this.config;if("function"!=typeof i){let e=`Configured requestMediaKeySystemAccess is not a function ${i}`;return null===$c&&"http:"===self.location.protocol&&(e=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(e))}return i(e,t)}getMediaKeysPromise(e,t,i){const s=function(e,t,i,s){let r;switch(e){case Bc.FAIRPLAY:r=["cenc","sinf"];break;case Bc.WIDEVINE:case Bc.PLAYREADY:r=["cenc"];break;case Bc.CLEARKEY:r=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${e}`)}return function(e,t,i,s){return[{initDataTypes:e,persistentState:s.persistentState||"optional",distinctiveIdentifier:s.distinctiveIdentifier||"optional",sessionTypes:s.sessionTypes||[s.sessionType||"temporary"],audioCapabilities:t.map((e=>({contentType:`audio/mp4; codecs="${e}"`,robustness:s.audioRobustness||"",encryptionScheme:s.audioEncryptionScheme||null}))),videoCapabilities:i.map((e=>({contentType:`video/mp4; codecs="${e}"`,robustness:s.videoRobustness||"",encryptionScheme:s.videoEncryptionScheme||null})))}]}(r,t,i,s)}(e,t,i,this.config.drmSystemOptions),r=this.keySystemAccessPromises[e];let a=null==r?void 0:r.keySystemAccess;if(!a){this.log(`Requesting encrypted media "${e}" key-system access with config: ${JSON.stringify(s)}`),a=this.requestMediaKeySystemAccess(e,s);const t=this.keySystemAccessPromises[e]={keySystemAccess:a};return a.catch((t=>{this.log(`Failed to obtain access to key-system "${e}": ${t}`)})),a.then((i=>{this.log(`Access for key-system "${i.keySystem}" obtained`);const s=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),t.mediaKeys=i.createMediaKeys().then((t=>(this.log(`Media-keys created for "${e}"`),s.then((i=>i?this.setMediaKeysServerCertificate(t,e,i):t))))),t.mediaKeys.catch((t=>{this.error(`Failed to create media-keys for "${e}"}: ${t}`)})),t.mediaKeys}))}return a.then((()=>r.mediaKeys))}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:i}){this.log(`Creating key-system session "${t}" keyId: ${du(e.keyId||[])}`);const s=i.createSession(),r={decryptdata:e,keySystem:t,mediaKeys:i,mediaKeysSession:s,keyStatus:"status-pending"};return this.mediaKeySessions.push(r),r}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const i=this.createMediaKeySessionContext(e),s=this.getKeyIdString(t),r="cenc";this.keyIdToKeySessionPromise[s]=this.generateRequestWithPreferredKeySession(i,r,t.pssh,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}getKeyIdString(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(null===e.keyId)throw new Error("keyId is null");return du(e.keyId)}updateKeySession(e,t){var i;const s=e.mediaKeysSession;return this.log(`Updating key-session "${s.sessionId}" for keyID ${du((null==(i=e.decryptdata)?void 0:i.keyId)||[])}\n } (data length: ${t?t.byteLength:t})`),s.update(t)}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){return new Promise(((t,i)=>{const s=zc(this.config),r=e.map(Nc).filter((e=>!!e&&-1!==s.indexOf(e)));return this.getKeySystemSelectionPromise(r).then((({keySystem:e})=>{const s=Gc(e);s?t(s):i(new Error(`Unable to find format for key-system "${e}"`))})).catch(i)}))}loadKey(e){const t=e.keyInfo.decryptdata,i=this.getKeyIdString(t),s=`(keyId: ${i} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${s}`);let r=this.keyIdToKeySessionPromise[i];return r||(r=this.keyIdToKeySessionPromise[i]=this.getKeySystemForKeyPromise(t).then((({keySystem:i,mediaKeys:r})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${s}`),this.attemptSetMediaKeys(i,r).then((()=>{this.throwIfDestroyed();const e=this.createMediaKeySessionContext({keySystem:i,mediaKeys:r,decryptdata:t});return this.generateRequestWithPreferredKeySession(e,"cenc",t.pssh,"playlist-key")}))))),r.catch((e=>this.handleError(e)))),r}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof Sy?this.hls.trigger(dc.ERROR,e.data):this.hls.trigger(dc.ERROR,{type:hc.KEY_SYSTEM_ERROR,details:cc.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),i=this.keyIdToKeySessionPromise[t];if(!i){const t=Nc(e.keyFormat),i=t?[t]:zc(this.config);return this.attemptKeySystemAccess(i)}return i}getKeySystemSelectionPromise(e){if(e.length||(e=zc(this.config)),0===e.length)throw new Sy({type:hc.KEY_SYSTEM_ERROR,details:cc.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${JSON.stringify({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}_onMediaEncrypted(e){const{initDataType:t,initData:i}=e;if(this.debug(`"${e.type}" event: init data type: "${t}"`),null===i)return;let s,r;if("sinf"===t&&this.config.drmSystems[Bc.FAIRPLAY]){const e=pu(new Uint8Array(i));try{const t=Dc(JSON.parse(e).sinf),i=ku(new Uint8Array(t));if(!i)return;s=i.subarray(8,24),r=Bc.FAIRPLAY}catch(e){return void this.warn('Failed to parse sinf "encrypted" event message initData')}}else{const e=function(e){if(!(e instanceof ArrayBuffer)||e.byteLength<32)return null;const t={version:0,systemId:"",kids:null,data:null},i=new DataView(e),s=i.getUint32(0);if(e.byteLength!==s&&s>44)return null;if(1886614376!==i.getUint32(4))return null;if(t.version=i.getUint32(8)>>>24,t.version>1)return null;t.systemId=du(new Uint8Array(e,12,16));const r=i.getUint32(28);if(0===t.version){if(s-32<r)return null;t.data=new Uint8Array(e,32,r)}else if(1===t.version){t.kids=[];for(let i=0;i<r;i++)t.kids.push(new Uint8Array(e,32+16*i,16))}return t}(i);if(null===e)return;0===e.version&&e.systemId===jc&&e.data&&(s=e.data.subarray(8,24)),r=function(e){if(e===jc)return Bc.WIDEVINE}(e.systemId)}if(!r||!s)return;const a=du(s),{keyIdToKeySessionPromise:o,mediaKeySessions:n}=this;let l=o[a];for(let e=0;e<n.length;e++){const r=n[e],d=r.decryptdata;if(d.pssh||!d.keyId)continue;const h=du(d.keyId);if(a===h||-1!==d.uri.replace(/-/g,"").indexOf(a)){l=o[h],delete o[h],d.pssh=new Uint8Array(i),d.keyId=s,l=o[a]=l.then((()=>this.generateRequestWithPreferredKeySession(r,t,i,"encrypted-event-key-match")));break}}l||(l=o[a]=this.getKeySystemSelectionPromise([r]).then((({keySystem:e,mediaKeys:r})=>{var o;this.throwIfDestroyed();const n=new Mu("ISO-23001-7",a,null!=(o=Gc(e))?o:"");return n.pssh=new Uint8Array(i),n.keyId=s,this.attemptSetMediaKeys(e,r).then((()=>{this.throwIfDestroyed();const s=this.createMediaKeySessionContext({decryptdata:n,keySystem:e,mediaKeys:r});return this.generateRequestWithPreferredKeySession(s,t,i,"encrypted-event-no-match")}))}))),l.catch((e=>this.handleError(e)))}_onWaitingForKey(e){this.log(`"${e.type}" event`)}attemptSetMediaKeys(e,t){const i=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const s=Promise.all(i).then((()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)}));return this.setMediaKeysQueue.push(s),s.then((()=>{this.log(`Media-keys set for "${e}"`),i.push(s),this.setMediaKeysQueue=this.setMediaKeysQueue.filter((e=>-1===i.indexOf(e)))}))}generateRequestWithPreferredKeySession(e,t,i,s){var r,a;const o=null==(r=this.config.drmSystems)||null==(a=r[e.keySystem])?void 0:a.generateRequest;if(o)try{const s=o.call(this.hls,t,i,e);if(!s)throw new Error("Invalid response from configured generateRequest filter");t=s.initDataType,i=e.decryptdata.pssh=s.initData?new Uint8Array(s.initData):null}catch(e){var n;if(this.warn(e.message),null!=(n=this.hls)&&n.config.debug)throw e}if(null===i)return this.log(`Skipping key-session request for "${s}" (no initData)`),Promise.resolve(e);const l=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${s}": ${l} (init data type: ${t} length: ${i?i.byteLength:null})`);const d=new yg,h=e._onmessage=t=>{const i=e.mediaKeysSession;if(!i)return void d.emit("error",new Error("invalid state"));const{messageType:s,message:r}=t;this.log(`"${s}" message event for session "${i.sessionId}" message size: ${r.byteLength}`),"license-request"===s||"license-renewal"===s?this.renewLicense(e,r).catch((e=>{this.handleError(e),d.emit("error",e)})):"license-release"===s?e.keySystem===Bc.FAIRPLAY&&(this.updateKeySession(e,Ic("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${s}"`)},c=e._onkeystatuseschange=t=>{if(!e.mediaKeysSession)return void d.emit("error",new Error("invalid state"));this.onKeyStatusChange(e);const i=e.keyStatus;d.emit("keyStatus",i),"expired"===i&&(this.warn(`${e.keySystem} expired for key ${l}`),this.renewKeySession(e))};e.mediaKeysSession.addEventListener("message",h),e.mediaKeysSession.addEventListener("keystatuseschange",c);const u=new Promise(((e,t)=>{d.on("error",t),d.on("keyStatus",(i=>{i.startsWith("usable")?e():"output-restricted"===i?t(new Sy({type:hc.KEY_SYSTEM_ERROR,details:cc.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):"internal-error"===i?t(new Sy({type:hc.KEY_SYSTEM_ERROR,details:cc.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${i}"`)):"expired"===i?t(new Error("key expired while generating request")):this.warn(`unhandled key status change "${i}"`)}))}));return e.mediaKeysSession.generateRequest(t,i).then((()=>{var t;this.log(`Request generated for key-session "${null==(t=e.mediaKeysSession)?void 0:t.sessionId}" keyId: ${l}`)})).catch((e=>{throw new Sy({type:hc.KEY_SYSTEM_ERROR,details:cc.KEY_SYSTEM_NO_SESSION,error:e,fatal:!1},`Error generating key-session request: ${e}`)})).then((()=>u)).catch((t=>{throw d.removeAllListeners(),this.removeSession(e),t})).then((()=>(d.removeAllListeners(),e)))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach(((t,i)=>{this.log(`key status change "${t}" for keyStatuses keyId: ${du("buffer"in i?new Uint8Array(i.buffer,i.byteOffset,i.byteLength):new Uint8Array(i))} session keyId: ${du(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=t}))}fetchServerCertificate(e){const t=this.config,i=new(0,t.loader)(t),s=this.getServerCertificateUrl(e);return s?(this.log(`Fetching server certificate for "${e}"`),new Promise(((r,a)=>{const o={responseType:"arraybuffer",url:s},n=t.certLoadPolicy.default,l={loadPolicy:n,timeout:n.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(e,t,i,s)=>{r(e.data)},onError:(t,i,r,n)=>{a(new Sy({type:hc.KEY_SYSTEM_ERROR,details:cc.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:r,response:ic({url:o.url,data:void 0},t)},`"${e}" certificate request failed (${s}). Status: ${t.code} (${t.text})`))},onTimeout:(t,i,r)=>{a(new Sy({type:hc.KEY_SYSTEM_ERROR,details:cc.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:r,response:{url:o.url,data:void 0}},`"${e}" certificate request timed out (${s})`))},onAbort:(e,t,i)=>{a(new Error("aborted"))}};i.load(o,l,d)}))):Promise.resolve()}setMediaKeysServerCertificate(e,t,i){return new Promise(((s,r)=>{e.setServerCertificate(i).then((r=>{this.log(`setServerCertificate ${r?"success":"not supported by CDM"} (${null==i?void 0:i.byteLength}) on "${t}"`),s(e)})).catch((e=>{r(new Sy({type:hc.KEY_SYSTEM_ERROR,details:cc.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:e,fatal:!0},e.message))}))}))}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then((t=>this.updateKeySession(e,new Uint8Array(t)).catch((e=>{throw new Sy({type:hc.KEY_SYSTEM_ERROR,details:cc.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:e,fatal:!0},e.message)}))))}unpackPlayReadyKeyMessage(e,t){const i=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!i.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const s=(new DOMParser).parseFromString(i,"application/xml"),r=s.querySelectorAll("HttpHeader");if(r.length>0){let t;for(let i=0,s=r.length;i<s;i++){var a,o;t=r[i];const s=null==(a=t.querySelector("name"))?void 0:a.textContent,n=null==(o=t.querySelector("value"))?void 0:o.textContent;s&&n&&e.setRequestHeader(s,n)}}const n=s.querySelector("Challenge"),l=null==n?void 0:n.textContent;if(!l)throw new Error("Cannot find <Challenge> in key message");return Ic(atob(l))}setupLicenseXHR(e,t,i,s){const r=this.config.licenseXhrSetup;return r?Promise.resolve().then((()=>{if(!i.decryptdata)throw new Error("Key removed");return r.call(this.hls,e,t,i,s)})).catch((a=>{if(!i.decryptdata)throw a;return e.open("POST",t,!0),r.call(this.hls,e,t,i,s)})).then((i=>{e.readyState||e.open("POST",t,!0);return{xhr:e,licenseChallenge:i||s}})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:s}))}requestLicense(e,t){const i=this.config.keyLoadPolicy.default;return new Promise(((s,r)=>{const a=this.getLicenseServerUrl(e.keySystem);this.log(`Sending license request to URL: ${a}`);const o=new XMLHttpRequest;o.responseType="arraybuffer",o.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return r(new Error("invalid state"));if(4===o.readyState)if(200===o.status){this._requestLicenseFailureCount=0;let t=o.response;this.log(`License received ${t instanceof ArrayBuffer?t.byteLength:t}`);const i=this.config.licenseResponseCallback;if(i)try{t=i.call(this.hls,o,a,e)}catch(e){this.error(e)}s(t)}else{const n=i.errorRetry,l=n?n.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>l||o.status>=400&&o.status<500)r(new Sy({type:hc.KEY_SYSTEM_ERROR,details:cc.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:o,response:{url:a,data:void 0,code:o.status,text:o.statusText}},`License Request XHR failed (${a}). Status: ${o.status} (${o.statusText})`));else{const i=l-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${i} attempts left`),this.requestLicense(e,t).then(s,r)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=o,this.setupLicenseXHR(o,a,e,t).then((({xhr:t,licenseChallenge:i})=>{e.keySystem==Bc.PLAYREADY&&(i=this.unpackPlayReadyKeyMessage(t,i)),t.send(i)}))}))}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const i=t.media;this.media=i,i.addEventListener("encrypted",this.onMediaEncrypted),i.addEventListener("waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media,t=this.mediaKeySessions;e&&(e.removeEventListener("encrypted",this.onMediaEncrypted),e.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},Mu.clearKeyUriToKeyIdMap();const i=t.length;wy.CDMCleanupPromise=Promise.all(t.map((e=>this.removeSession(e))).concat(null==e?void 0:e.setMediaKeys(null).catch((e=>{this.log(`Could not clear media keys: ${e}`)})))).then((()=>{i&&(this.log("finished closing key sessions and clearing media keys"),t.length=0)})).catch((e=>{this.log(`Could not close sessions and clear media keys: ${e}`)}))}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(t&&this.config.emeEnabled&&!this.keyFormatPromise){const e=t.reduce(((e,t)=>(-1===e.indexOf(t.keyFormat)&&e.push(t.keyFormat),e)),[]);this.log(`Selecting key-system from session-keys ${e.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(e)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:i}=e;if(t){this.log(`Remove licenses and keys and close session ${t.sessionId}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),i&&i.readyState!==XMLHttpRequest.DONE&&i.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const s=this.mediaKeySessions.indexOf(e);return s>-1&&this.mediaKeySessions.splice(s,1),t.remove().catch((e=>{this.log(`Could not remove session: ${e}`)})).then((()=>t.close())).catch((e=>{this.log(`Could not close session: ${e}`)}))}}}wy.CDMCleanupPromise=void 0;class Sy extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}var Ty,Ey,ky;!function(e){e.MANIFEST="m",e.AUDIO="a",e.VIDEO="v",e.MUXED="av",e.INIT="i",e.CAPTION="c",e.TIMED_TEXT="tt",e.KEY="k",e.OTHER="o"}(Ty||(Ty={})),function(e){e.DASH="d",e.HLS="h",e.SMOOTH="s",e.OTHER="o"}(Ey||(Ey={})),function(e){e.OBJECT="CMCD-Object",e.REQUEST="CMCD-Request",e.SESSION="CMCD-Session",e.STATUS="CMCD-Status"}(ky||(ky={}));const Cy={[ky.OBJECT]:["br","d","ot","tb"],[ky.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[ky.SESSION]:["cid","pr","sf","sid","st","v"],[ky.STATUS]:["bs","rtp"]};class xy{constructor(e,t){this.value=void 0,this.params=void 0,Array.isArray(e)&&(e=e.map((e=>e instanceof xy?e:new xy(e)))),this.value=e,this.params=t}}class Ry{constructor(e){this.description=void 0,this.description=e}}function Dy(e,t,i,s){return new Error(`failed to ${e} "${r=t,Array.isArray(r)?JSON.stringify(r):r instanceof Map?"Map{}":r instanceof Set?"Set{}":"object"==typeof r?JSON.stringify(r):String(r)}" as ${i}`,{cause:s});var r}const Ly="Bare Item";const Iy=/[\x00-\x1f\x7f]+/;function Py(e,t,i){return Dy("serialize",e,t,i)}function By(e){if(!1===ArrayBuffer.isView(e))throw Py(e,"Byte Sequence");return`:${t=e,btoa(String.fromCharCode(...t))}:`;var t}function My(e){if(function(e){return e<-999999999999999||999999999999999<e}(e))throw Py(e,"Integer");return e.toString()}function Uy(e,t){if(e<0)return-Uy(-e,t);const i=Math.pow(10,t);if(Math.abs(e*i%1-.5)<Number.EPSILON){const t=Math.floor(e*i);return(t%2==0?t:t+1)/i}return Math.round(e*i)/i}function Fy(e){const t=Uy(e,3);if(Math.floor(Math.abs(t)).toString().length>12)throw Py(e,"Decimal");const i=t.toString();return i.includes(".")?i:`${i}.0`}function Oy(e){const t=(i=e).description||i.toString().slice(7,-1);var i;if(!1===/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(t))throw Py(t,"Token");return t}function Ny(e){switch(typeof e){case"number":if(!oc(e))throw Py(e,Ly);return Number.isInteger(e)?My(e):Fy(e);case"string":return function(e){if(Iy.test(e))throw Py(e,"String");return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}(e);case"symbol":return Oy(e);case"boolean":return function(e){if("boolean"!=typeof e)throw Py(e,"Boolean");return e?"?1":"?0"}(e);case"object":if(e instanceof Date)return function(e){return`@${My(e.getTime()/1e3)}`}(e);if(e instanceof Uint8Array)return By(e);if(e instanceof Ry)return Oy(e);default:throw Py(e,Ly)}}function jy(e){if(!1===/^[a-z*][a-z0-9\-_.*]*$/.test(e))throw Py(e,"Key");return e}function Gy(e){return null==e?"":Object.entries(e).map((([e,t])=>!0===t?`;${jy(e)}`:`;${jy(e)}=${Ny(t)}`)).join("")}function zy(e){return e instanceof xy?`${Ny(e.value)}${Gy(e.params)}`:Ny(e)}function $y(e,t={whitespace:!0}){if("object"!=typeof e)throw Py(e,"Dict");const i=e instanceof Map?e.entries():Object.entries(e),s=null!=t&&t.whitespace?" ":"";return Array.from(i).map((([e,t])=>{t instanceof xy==!1&&(t=new xy(t));let i=jy(e);var s;return!0===t.value?i+=Gy(t.params):(i+="=",Array.isArray(t.value)?i+=`(${(s=t).value.map(zy).join(" ")})${Gy(s.params)}`:i+=zy(t)),i})).join(`,${s}`)}const Hy=e=>Math.round(e),Vy=e=>100*Hy(e/100),Wy={br:Hy,d:Hy,bl:Vy,dl:Vy,mtp:Vy,nor:(e,t)=>(null!=t&&t.baseUrl&&(e=function(e,t){const i=new URL(e),s=new URL(t);if(i.origin!==s.origin)return e;const r=i.pathname.split("/").slice(1),a=s.pathname.split("/").slice(1,-1);for(;r[0]===a[0];)r.shift(),a.shift();for(;a.length;)a.shift(),r.unshift("..");return r.join("/")}(e,t.baseUrl)),encodeURIComponent(e)),rtp:Vy,tb:Hy};function Jy(e,t){const i={};if(null==e||"object"!=typeof e)return i;const s=Object.keys(e).sort(),r=ac({},Wy,null==t?void 0:t.formatters),a=null==t?void 0:t.filter;return s.forEach((s=>{if(null!=a&&a(s))return;let o=e[s];const n=r[s];n&&(o=n(o,t)),"v"===s&&1===o||"pr"==s&&1===o||(e=>"number"==typeof e?oc(e):null!=e&&""!==e&&!1!==e)(o)&&((e=>"ot"===e||"sf"===e||"st"===e)(s)&&"string"==typeof o&&(o=new Ry(o)),i[s]=o)})),i}function qy(e,t={}){return e?function(e,t){return $y(e,t)}(Jy(e,t),ac({whitespace:!1},t)):""}function Ky(e,t,i){return ac(e,function(e,t={}){if(!e)return{};const i=Object.entries(e),s=Object.entries(Cy).concat(Object.entries((null==t?void 0:t.customHeaderMap)||{})),r=i.reduce(((e,t)=>{var i;const[r,a]=t,o=(null==(i=s.find((e=>e[1].includes(r))))?void 0:i[0])||ky.REQUEST;return null!=e[o]||(e[o]={}),e[o][r]=a,e}),{});return Object.entries(r).reduce(((e,[i,s])=>(e[i]=qy(s,t),e)),{})}(t,i))}const Yy=/CMCD=[^&#]+/;function Qy(e,t,i){const s=function(e,t={}){if(!e)return"";const i=qy(e,t);return`CMCD=${encodeURIComponent(i)}`}(t,i);if(!s)return e;if(Yy.test(e))return e.replace(Yy,s);const r=e.includes("?")?"&":"?";return`${e}${r}${s}`}function Xy(e,t,i,s){e&&Object.keys(t).forEach((r=>{const a=e.filter((e=>e.groupId===r)).map((e=>{const a=ac({},e);return a.details=void 0,a.attrs=new bc(a.attrs),a.url=a.attrs.URI=Zy(e.url,e.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",i),a.groupId=a.attrs["GROUP-ID"]=t[r],a.attrs["PATHWAY-ID"]=s,a}));e.push(...a)}))}function Zy(e,t,i,s){const{HOST:r,PARAMS:a,[i]:o}=s;let n;t&&(n=null==o?void 0:o[t],n&&(e=n));const l=new self.URL(e);return r&&!n&&(l.host=r),a&&Object.keys(a).sort().forEach((e=>{e&&l.searchParams.set(e,a[e])})),l.href}const eA=/^age:\s*[\d.]+\s*$/im;class tA{constructor(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new wc,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null,this.stats=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,i){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=i,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const i=this.loader=new self.XMLHttpRequest,s=this.stats;s.loading.first=0,s.loaded=0,s.aborted=!1;const r=this.xhrSetup;r?Promise.resolve().then((()=>{if(!this.stats.aborted)return r(i,t.url)})).catch((e=>(i.open("GET",t.url,!0),r(i,t.url)))).then((()=>{this.stats.aborted||this.openAndSendXhr(i,t,e)})).catch((e=>{this.callbacks.onError({code:i.status,text:e.message},t,i,s)})):this.openAndSendXhr(i,t,e)}openAndSendXhr(e,t,i){e.readyState||e.open("GET",t.url,!0);const s=t.headers,{maxTimeToFirstByteMs:r,maxLoadTimeMs:a}=i.loadPolicy;if(s)for(const t in s)e.setRequestHeader(t,s[t]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),i.timeout=r&&oc(r)?r:a,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:i}=this;if(!e||!t)return;const s=t.readyState,r=this.config;if(!i.aborted&&s>=2&&(0===i.loading.first&&(i.loading.first=Math.max(self.performance.now(),i.loading.start),r.timeout!==r.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),r.timeout=r.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.loadPolicy.maxLoadTimeMs-(i.loading.first-i.loading.start)))),4===s)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const s=t.status,a="text"!==t.responseType;if(s>=200&&s<300&&(a&&t.response||null!==t.responseText)){i.loading.end=Math.max(self.performance.now(),i.loading.first);const r=a?t.response:t.responseText,o="arraybuffer"===t.responseType?r.byteLength:r.length;if(i.loaded=i.total=o,i.bwEstimate=8e3*i.total/(i.loading.end-i.loading.first),!this.callbacks)return;const n=this.callbacks.onProgress;if(n&&n(i,e,r,t),!this.callbacks)return;const l={url:t.responseURL,data:r,code:s};this.callbacks.onSuccess(l,i,e,t)}else{const a=r.loadPolicy.errorRetry;sf(a,i.retry,!1,{url:e.url,data:void 0,code:s})?this.retry(a):(gc.error(`${s} while loading ${e.url}`),this.callbacks.onError({code:s,text:t.statusText},e,t,i))}}}loadtimeout(){var e;const t=null==(e=this.config)?void 0:e.loadPolicy.timeoutRetry;if(sf(t,this.stats.retry,!0))this.retry(t);else{var i;gc.warn(`timeout while loading ${null==(i=this.context)?void 0:i.url}`);const e=this.callbacks;e&&(this.abortInternal(),e.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:i}=this;this.retryDelay=ef(e,i.retry),i.retry++,gc.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${null==t?void 0:t.url}, retrying ${i.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&eA.test(this.loader.getAllResponseHeaders())){const t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}const iA=/(\d+)-(\d+)\/(\d+)/;class sA{constructor(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=null,this.response=null,this.controller=void 0,this.context=null,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||rA,this.controller=new self.AbortController,this.stats=new wc}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,i){const s=this.stats;if(s.loading.start)throw new Error("Loader can only be used once.");s.loading.start=self.performance.now();const r=function(e,t){const i={method:"GET",mode:"cors",credentials:"same-origin",signal:t,headers:new self.Headers(ac({},e.headers))};e.rangeEnd&&i.headers.set("Range","bytes="+e.rangeStart+"-"+String(e.rangeEnd-1));return i}(e,this.controller.signal),a=i.onProgress,o="arraybuffer"===e.responseType,n=o?"byteLength":"length",{maxTimeToFirstByteMs:l,maxLoadTimeMs:d}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=i,this.request=this.fetchSetup(e,r),self.clearTimeout(this.requestTimeout),t.timeout=l&&oc(l)?l:d,this.requestTimeout=self.setTimeout((()=>{this.abortInternal(),i.onTimeout(s,e,this.response)}),t.timeout),self.fetch(this.request).then((r=>{this.response=this.loader=r;const n=Math.max(self.performance.now(),s.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=d,this.requestTimeout=self.setTimeout((()=>{this.abortInternal(),i.onTimeout(s,e,this.response)}),d-(n-s.loading.start)),!r.ok){const{status:e,statusText:t}=r;throw new aA(t||"fetch, bad network response",e,r)}return s.loading.first=n,s.total=function(e){const t=e.get("Content-Range");if(t){const e=function(e){const t=iA.exec(e);if(t)return parseInt(t[2])-parseInt(t[1])+1}(t);if(oc(e))return e}const i=e.get("Content-Length");if(i)return parseInt(i)}(r.headers)||s.total,a&&oc(t.highWaterMark)?this.loadProgressively(r,s,e,t.highWaterMark,a):o?r.arrayBuffer():"json"===e.responseType?r.json():r.text()})).then((r=>{const o=this.response;if(!o)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),s.loading.end=Math.max(self.performance.now(),s.loading.first);const l=r[n];l&&(s.loaded=s.total=l);const d={url:o.url,data:r,code:o.status};a&&!oc(t.highWaterMark)&&a(s,e,r,o),i.onSuccess(d,s,e,o)})).catch((t=>{if(self.clearTimeout(this.requestTimeout),s.aborted)return;const r=t&&t.code||0,a=t?t.message:null;i.onError({code:r,text:a},e,t?t.details:null,s)}))}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,i,s=0,r){const a=new pm,o=e.body.getReader(),n=()=>o.read().then((o=>{if(o.done)return a.dataLength&&r(t,i,a.flush(),e),Promise.resolve(new ArrayBuffer(0));const l=o.value,d=l.length;return t.loaded+=d,d<s||a.dataLength?(a.push(l),a.dataLength>=s&&r(t,i,a.flush(),e)):r(t,i,l,e),n()})).catch((()=>Promise.reject()));return n()}}function rA(e,t){return new self.Request(e.url,t)}class aA extends Error{constructor(e,t,i){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=i}}const oA=/\s/,nA={newCue(e,t,i,s){const r=[];let a,o,n,l,d;const h=self.VTTCue||self.TextTrackCue;for(let u=0;u<s.rows.length;u++)if(a=s.rows[u],n=!0,l=0,d="",!a.isEmpty()){var c;for(let e=0;e<a.chars.length;e++)oA.test(a.chars[e].uchar)&&n?l++:(d+=a.chars[e].uchar,n=!1);a.cueStartTime=t,t===i&&(i+=1e-4),l>=16?l--:l++;const s=ey(d.trim()),p=ay(t,i,s);null!=e&&null!=(c=e.cues)&&c.getCueById(p)||(o=new h(t,i,s),o.id=p,o.line=u+1,o.align="left",o.position=10+Math.min(80,10*Math.floor(8*l/32)),r.push(o))}return e&&r.length&&(r.sort(((e,t)=>"auto"===e.line||"auto"===t.line?0:e.line>8&&t.line>8?t.line-e.line:e.line-t.line)),r.forEach((t=>Sp(e,t)))),r}},lA=ic(ic({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,maxBufferSize:6e7,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:tA,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:class{constructor(e){this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this._abandonRulesCheck=()=>{const{fragCurrent:e,partCurrent:t,hls:i}=this,{autoLevelEnabled:s,media:r}=i;if(!e||!r)return;const a=performance.now(),o=t?t.stats:e.stats,n=t?t.duration:e.duration,l=a-o.loading.start,d=i.minAutoLevel;if(o.aborted||o.loaded&&o.loaded===o.total||e.level<=d)return this.clearTimer(),void(this._nextAutoLevel=-1);if(!s||r.paused||!r.playbackRate||!r.readyState)return;const h=i.mainForwardBufferInfo;if(null===h)return;const c=this.bwEstimator.getEstimateTTFB(),u=Math.abs(r.playbackRate);if(l<=Math.max(c,n/(2*u)*1e3))return;const p=h.len/u,f=o.loading.first?o.loading.first-o.loading.start:-1,m=o.loaded&&f>-1,g=this.getBwEstimate(),y=i.levels,A=y[e.level],b=o.total||Math.max(o.loaded,Math.round(n*A.averageBitrate/8));let _=m?l-f:l;_<1&&m&&(_=Math.min(l,8*o.loaded/g));const v=m?1e3*o.loaded/_:0,w=v?(b-o.loaded)/v:8*b/g+c/1e3;if(w<=p)return;const S=v?8*v:g;let T,E=Number.POSITIVE_INFINITY;for(T=e.level-1;T>d;T--){const e=y[T].maxBitrate;if(E=this.getTimeToLoadFrag(c/1e3,S,n*e,!y[T].details),E<p)break}if(E>=w)return;if(E>10*n)return;i.nextLoadLevel=i.nextAutoLevel=T,m?this.bwEstimator.sample(l-Math.min(c,f),o.loaded):this.bwEstimator.sampleTTFB(l);const k=y[T].maxBitrate;this.getBwEstimate()*this.hls.config.abrBandWidthUpFactor>k&&this.resetEstimator(k),this.clearTimer(),gc.warn(`[abr] Fragment ${e.sn}${t?" part "+t.index:""} of level ${e.level} is loading too slowly;\n Time to underbuffer: ${p.toFixed(3)} s\n Estimated load time for current fragment: ${w.toFixed(3)} s\n Estimated load time for down switch fragment: ${E.toFixed(3)} s\n TTFB estimate: ${0|f} ms\n Current BW estimate: ${oc(g)?0|g:"Unknown"} bps\n New BW estimate: ${0|this.getBwEstimate()} bps\n Switching to level ${T} @ ${0|k} bps`),i.trigger(dc.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:o})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(gc.log(`setting initial bwe to ${e}`),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()}initEstimator(){const e=this.hls.config;return new yf(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.FRAG_LOADING,this.onFragLoading,this),e.on(dc.FRAG_LOADED,this.onFragLoaded,this),e.on(dc.FRAG_BUFFERED,this.onFragBuffered,this),e.on(dc.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(dc.LEVEL_LOADED,this.onLevelLoaded,this),e.on(dc.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(dc.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(dc.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.FRAG_LOADING,this.onFragLoading,this),e.off(dc.FRAG_LOADED,this.onFragLoaded,this),e.off(dc.FRAG_BUFFERED,this.onFragBuffered,this),e.off(dc.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(dc.LEVEL_LOADED,this.onLevelLoaded,this),e.off(dc.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(dc.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(dc.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(e,t){const i=t.frag;if(!this.ignoreFragment(i)){var s;if(!i.bitrateTest)this.fragCurrent=i,this.partCurrent=null!=(s=t.part)?s:null;this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}onLevelSwitching(e,t){this.clearTimer()}onError(e,t){if(!t.fatal)switch(t.details){case cc.BUFFER_ADD_CODEC_ERROR:case cc.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case cc.FRAG_LOAD_TIMEOUT:{const e=t.frag,{fragCurrent:i,partCurrent:s}=this;if(e&&i&&e.sn===i.sn&&e.level===i.level){const t=performance.now(),i=s?s.stats:e.stats,r=t-i.loading.start,a=i.loading.first?i.loading.first-i.loading.start:-1;if(i.loaded&&a>-1){const e=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(r-Math.min(e,a),i.loaded)}else this.bwEstimator.sampleTTFB(r)}break}}}getTimeToLoadFrag(e,t,i,s){return e+i/t+(s?this.lastLevelLoadSec:0)}onLevelLoaded(e,t){const i=this.hls.config,{loading:s}=t.stats,r=s.end-s.start;oc(r)&&(this.lastLevelLoadSec=r/1e3),t.details.live?this.bwEstimator.update(i.abrEwmaSlowLive,i.abrEwmaFastLive):this.bwEstimator.update(i.abrEwmaSlowVoD,i.abrEwmaFastVoD)}onFragLoaded(e,{frag:t,part:i}){const s=i?i.stats:t.stats;if(t.type===gp&&this.bwEstimator.sampleTTFB(s.loading.first-s.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const e=i?i.duration:t.duration,r=this.hls.levels[t.level],a=(r.loaded?r.loaded.bytes:0)+s.loaded,o=(r.loaded?r.loaded.duration:0)+e;r.loaded={bytes:a,duration:o},r.realBitrate=Math.round(8*a/o)}if(t.bitrateTest){const e={stats:s,frag:t,part:i,id:t.type};this.onFragBuffered(dc.FRAG_BUFFERED,e),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:i,part:s}=t,r=null!=s&&s.stats.loaded?s.stats:i.stats;if(r.aborted)return;if(this.ignoreFragment(i))return;const a=r.parsing.end-r.loading.start-Math.min(r.loading.first-r.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(a,r.loaded),r.bwEstimate=this.getBwEstimate(),i.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==gp||"initSegment"===e.sn}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:t}=this.hls,i=this.getBwEstimate(),s=this.hls.config.maxStarvationDelay,r=this.findBestLevel(i,t,e,0,s,1,1);if(r>-1)return r;const a=this.hls.firstLevel,o=Math.min(Math.max(a,t),e);return gc.warn(`[abr] Could not find best starting auto level. Defaulting to first in playlist ${a} clamped to ${o}`),o}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,t=this.bwEstimator.canEstimate(),i=this.lastLoadedFragLevel>-1;if(!(-1===e||t&&i&&this.nextAutoLevelKey!==this.getAutoLevelKey()))return e;const s=t&&i?this.getNextABRAutoLevel():this.firstAutoLevel;if(-1!==e){const t=this.hls.levels;if(t.length>Math.max(e,s)&&t[e].loadError<=t[s].loadError)return e}return this._nextAutoLevel=s,this.nextAutoLevelKey=this.getAutoLevelKey(),s}getAutoLevelKey(){return`${this.getBwEstimate()}_${this.getStarvationDelay().toFixed(2)}`}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:i}=this,{maxAutoLevel:s,config:r,minAutoLevel:a}=i,o=t?t.duration:e?e.duration:0,n=this.getBwEstimate(),l=this.getStarvationDelay();let d=r.abrBandWidthFactor,h=r.abrBandWidthUpFactor;if(l){const e=this.findBestLevel(n,a,s,l,0,d,h);if(e>=0)return e}let c=o?Math.min(o,r.maxStarvationDelay):r.maxStarvationDelay;if(!l){const e=this.bitrateTestDelay;if(e){c=(o?Math.min(o,r.maxLoadingDelay):r.maxLoadingDelay)-e,gc.info(`[abr] bitrate test took ${Math.round(1e3*e)}ms, set first fragment max fetchDuration to ${Math.round(1e3*c)} ms`),d=h=1}}const u=this.findBestLevel(n,a,s,l,c,d,h);if(gc.info(`[abr] ${l?"rebuffering expected":"buffer is empty"}, optimal quality level ${u}`),u>-1)return u;const p=i.levels[a],f=i.levels[i.loadLevel];return(null==p?void 0:p.bitrate)<(null==f?void 0:f.bitrate)?a:i.loadLevel}getStarvationDelay(){const e=this.hls,t=e.media;if(!t)return 1/0;const i=t&&0!==t.playbackRate?Math.abs(t.playbackRate):1,s=e.mainForwardBufferInfo;return(s?s.len:0)/i}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,t,i,s,r,a,o){var n;const l=s+r,d=this.lastLoadedFragLevel,h=-1===d?this.hls.firstLevel:d,{fragCurrent:c,partCurrent:u}=this,{levels:p,allAudioTracks:f,loadLevel:m,config:g}=this.hls;if(1===p.length)return 0;const y=p[h],A=!(null==y||null==(n=y.details)||!n.live),b=-1===m||-1===d;let _,v="SDR",w=(null==y?void 0:y.frameRate)||0;const{audioPreference:S,videoPreference:T}=g,E=this.audioTracksByGroup||(this.audioTracksByGroup=function(e){return e.reduce(((e,t)=>{let i=e.groups[t.groupId];i||(i=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),i.tracks.push(t);const s=t.channels||"2";return i.channels[s]=(i.channels[s]||0)+1,i.hasDefault=i.hasDefault||t.default,i.hasAutoSelect=i.hasAutoSelect||t.autoselect,i.hasDefault&&(e.hasDefaultAudio=!0),i.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e}),{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}(f));if(b){if(-1!==this.firstSelection)return this.firstSelection;const s=this.codecTiers||(this.codecTiers=function(e,t,i,s){return e.slice(i,s+1).reduce(((e,i)=>{if(!i.codecSet)return e;const s=i.audioGroups;let r=e[i.codecSet];r||(e[i.codecSet]=r={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!s,fragmentError:0}),r.minBitrate=Math.min(r.minBitrate,i.bitrate);const a=Math.min(i.height,i.width);return r.minHeight=Math.min(r.minHeight,a),r.minFramerate=Math.min(r.minFramerate,i.frameRate),r.maxScore=Math.max(r.maxScore,i.score),r.fragmentError+=i.fragmentError,r.videoRanges[i.videoRange]=(r.videoRanges[i.videoRange]||0)+1,s&&s.forEach((e=>{if(!e)return;const i=t.groups[e];r.hasDefaultAudio=r.hasDefaultAudio||t.hasDefaultAudio?i.hasDefault:i.hasAutoSelect||!t.hasDefaultAudio&&!t.hasAutoSelectAudio,Object.keys(i.channels).forEach((e=>{r.channels[e]=(r.channels[e]||0)+i.channels[e]}))})),e}),{})}(p,E,t,i)),r=function(e,t,i,s,r){const a=Object.keys(e),o=null==s?void 0:s.channels,n=null==s?void 0:s.audioCodec,l=o&&2===parseInt(o);let d=!0,h=!1,c=1/0,u=1/0,p=1/0,f=0,m=[];const{preferHDR:g,allowedVideoRanges:y}=wf(t,r);for(let t=a.length;t--;){const i=e[a[t]];d=i.channels[2]>0,c=Math.min(c,i.minHeight),u=Math.min(u,i.minFramerate),p=Math.min(p,i.minBitrate);const s=y.filter((e=>i.videoRanges[e]>0));s.length>0&&(h=!0,m=s)}c=oc(c)?c:0,u=oc(u)?u:0;const A=Math.max(1080,c),b=Math.max(30,u);p=oc(p)?p:i,i=Math.max(p,i),h||(t=void 0,m=[]);const _=a.reduce(((t,s)=>{const r=e[s];if(s===t)return t;if(r.minBitrate>i)return Sf(s,`min bitrate of ${r.minBitrate} > current estimate of ${i}`),t;if(!r.hasDefaultAudio)return Sf(s,"no renditions with default or auto-select sound found"),t;if(n&&s.indexOf(n.substring(0,4))%5!=0)return Sf(s,`audio codec preference "${n}" not found`),t;if(o&&!l){if(!r.channels[o])return Sf(s,`no renditions with ${o} channel sound found (channels options: ${Object.keys(r.channels)})`),t}else if((!n||l)&&d&&0===r.channels[2])return Sf(s,"no renditions with stereo sound found"),t;return r.minHeight>A?(Sf(s,`min resolution of ${r.minHeight} > maximum of ${A}`),t):r.minFramerate>b?(Sf(s,`min framerate of ${r.minFramerate} > maximum of ${b}`),t):m.some((e=>r.videoRanges[e]>0))?r.maxScore<f?(Sf(s,`max score of ${r.maxScore} < selected max of ${f}`),t):t&&(qu(s)>=qu(t)||r.fragmentError>e[t].fragmentError)?t:(f=r.maxScore,s):(Sf(s,`no variants with VIDEO-RANGE of ${JSON.stringify(m)} found`),t)}),void 0);return{codecSet:_,videoRanges:m,preferHDR:g,minFramerate:u,minBitrate:p}}(s,v,e,S,T),{codecSet:a,videoRanges:o,minFramerate:n,minBitrate:l,preferHDR:d}=r;_=a,v=d?o[o.length-1]:o[0],w=n,e=Math.max(e,l),gc.log(`[abr] picked start tier ${JSON.stringify(r)}`)}else _=null==y?void 0:y.codecSet,v=null==y?void 0:y.videoRange;const k=u?u.duration:c?c.duration:0,C=this.bwEstimator.getEstimateTTFB()/1e3,x=[];for(let n=i;n>=t;n--){var R;const t=p[n],c=n>h;if(!t)continue;if(g.useMediaCapabilities&&!t.supportedResult&&!t.supportedPromise){const i=navigator.mediaCapabilities;"function"==typeof(null==i?void 0:i.decodingInfo)&&_f(t,E,v,w,e,S)?(t.supportedPromise=vf(t,E,i),t.supportedPromise.then((e=>{if(!this.hls)return;t.supportedResult=e;const i=this.hls.levels,s=i.indexOf(t);e.error?gc.warn(`[abr] MediaCapabilities decodingInfo error: "${e.error}" for level ${s} ${JSON.stringify(e)}`):e.supported||(gc.warn(`[abr] Unsupported MediaCapabilities decodingInfo result for level ${s} ${JSON.stringify(e)}`),s>-1&&i.length>1&&(gc.log(`[abr] Removing unsupported level ${s}`),this.hls.removeLevel(s)))}))):t.supportedResult=Af}if(_&&t.codecSet!==_||v&&t.videoRange!==v||c&&w>t.frameRate||!c&&w>0&&w<t.frameRate||t.supportedResult&&(null==(R=t.supportedResult.decodingInfoResults)||!R[0].smooth)){x.push(n);continue}const f=t.details,T=(u?null==f?void 0:f.partTarget:null==f?void 0:f.averagetargetduration)||k;let D;D=c?o*e:a*e;const L=k&&s>=2*k&&0===r?p[n].averageBitrate:p[n].maxBitrate,I=this.getTimeToLoadFrag(C,D,L*T,void 0===f);if(D>=L&&(n===d||0===t.loadError&&0===t.fragmentError)&&(I<=C||!oc(I)||A&&!this.bitrateTestDelay||I<l)){const e=this.forcedAutoLevel;return n===m||-1!==e&&e===m||(x.length&&gc.trace(`[abr] Skipped level(s) ${x.join(",")} of ${i} max with CODECS and VIDEO-RANGE:"${p[x[0]].codecs}" ${p[x[0]].videoRange}; not compatible with "${y.codecs}" ${v}`),gc.info(`[abr] switch candidate:${h}->${n} adjustedbw(${Math.round(D)})-bitrate=${Math.round(D-L)} ttfb:${C.toFixed(1)} avgDuration:${T.toFixed(1)} maxFetchDuration:${l.toFixed(1)} fetchDuration:${I.toFixed(1)} firstSelection:${b} codecSet:${_} videoRange:${v} hls.loadLevel:${m}`)),b&&(this.firstSelection=n),n}}return-1}set nextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:i}=this.hls,s=Math.min(Math.max(e,i),t);this._nextAutoLevel!==s&&(this.nextAutoLevelKey="",this._nextAutoLevel=s)}},bufferController:class{constructor(e){this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.appendSource=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this.log=void 0,this.warn=void 0,this.error=void 0,this._onEndStreaming=e=>{this.hls&&this.hls.pauseBuffering()},this._onStartStreaming=e=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=()=>{const{media:e,mediaSource:t}=this;this.log("Media source opened"),e&&(e.removeEventListener("emptied",this._onMediaEmptied),this.updateMediaElementDuration(),this.hls.trigger(dc.MEDIA_ATTACHED,{media:e,mediaSource:t})),t&&t.removeEventListener("sourceopen",this._onMediaSourceOpen),this.checkPendingTracks()},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:e,_objectUrl:t}=this;e!==t&&gc.error(`Media element src was set while attaching MediaSource (${t} > ${e})`)},this.hls=e;const t="[buffer-controller]";this.appendSource=e.config.preferManagedMediaSource&&"undefined"!=typeof self&&self.ManagedMediaSource,this.log=gc.log.bind(gc,t),this.warn=gc.warn.bind(gc,t),this.error=gc.error.bind(gc,t),this._initSourceBuffer(),this.registerListeners()}hasSourceTypes(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null,this.hls=null}registerListeners(){const{hls:e}=this;e.on(dc.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.MANIFEST_PARSED,this.onManifestParsed,this),e.on(dc.BUFFER_RESET,this.onBufferReset,this),e.on(dc.BUFFER_APPENDING,this.onBufferAppending,this),e.on(dc.BUFFER_CODECS,this.onBufferCodecs,this),e.on(dc.BUFFER_EOS,this.onBufferEos,this),e.on(dc.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(dc.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(dc.FRAG_PARSED,this.onFragParsed,this),e.on(dc.FRAG_CHANGED,this.onFragChanged,this)}unregisterListeners(){const{hls:e}=this;e.off(dc.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.MANIFEST_PARSED,this.onManifestParsed,this),e.off(dc.BUFFER_RESET,this.onBufferReset,this),e.off(dc.BUFFER_APPENDING,this.onBufferAppending,this),e.off(dc.BUFFER_CODECS,this.onBufferCodecs,this),e.off(dc.BUFFER_EOS,this.onBufferEos,this),e.off(dc.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(dc.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(dc.FRAG_PARSED,this.onFragParsed,this),e.off(dc.FRAG_CHANGED,this.onFragChanged,this)}_initSourceBuffer(){this.sourceBuffer={},this.operationQueue=new Sg(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.appendErrors={audio:0,video:0,audiovideo:0},this.lastMpegAudioChunk=null}onManifestLoading(){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){let i=2;(t.audio&&!t.video||!t.altAudio)&&(i=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=i,this.log(`${this.bufferCodecEventsExpected} bufferCodec event(s) expected`)}onMediaAttaching(e,t){const i=this.media=t.media,s=zu(this.appendSource);if(i&&s){var r;const e=this.mediaSource=new s;this.log(`created media source: ${null==(r=e.constructor)?void 0:r.name}`),e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.addEventListener("startstreaming",this._onStartStreaming),e.addEventListener("endstreaming",this._onEndStreaming));const t=this._objectUrl=self.URL.createObjectURL(e);if(this.appendSource)try{i.removeAttribute("src");const s=self.ManagedMediaSource;i.disableRemotePlayback=i.disableRemotePlayback||s&&e instanceof s,Eg(i),function(e,t){const i=self.document.createElement("source");i.type="video/mp4",i.src=t,e.appendChild(i)}(i,t),i.load()}catch(e){i.src=t}else i.src=t;i.addEventListener("emptied",this._onMediaEmptied)}}onMediaDetaching(){const{media:e,mediaSource:t,_objectUrl:i}=this;if(t){if(this.log("media source detaching"),"open"===t.readyState)try{t.endOfStream()}catch(e){this.warn(`onMediaDetaching: ${e.message} while calling endOfStream`)}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(t.removeEventListener("startstreaming",this._onStartStreaming),t.removeEventListener("endstreaming",this._onEndStreaming)),e&&(e.removeEventListener("emptied",this._onMediaEmptied),i&&self.URL.revokeObjectURL(i),this.mediaSrc===i?(e.removeAttribute("src"),this.appendSource&&Eg(e),e.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(dc.MEDIA_DETACHED,void 0)}onBufferReset(){this.getSourceBufferTypes().forEach((e=>{this.resetBuffer(e)})),this._initSourceBuffer()}resetBuffer(e){const t=this.sourceBuffer[e];try{var i;if(t)this.removeBufferListeners(e),this.sourceBuffer[e]=void 0,null!=(i=this.mediaSource)&&i.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(t)}catch(t){this.warn(`onBufferReset ${e}`,t)}}onBufferCodecs(e,t){const i=this.getSourceBufferTypes().length,s=Object.keys(t);if(s.forEach((e=>{if(i){const i=this.tracks[e];if(i&&"function"==typeof i.buffer.changeType){var s;const{id:r,codec:a,levelCodec:o,container:n,metadata:l}=t[e],d=Xu(i.codec,i.levelCodec),h=null==d?void 0:d.replace(Tg,"$1");let c=Xu(a,o);const u=null==(s=c)?void 0:s.replace(Tg,"$1");if(c&&h!==u){"audio"===e.slice(0,5)&&(c=Qu(c,this.appendSource));const t=`${n};codecs=${c}`;this.appendChangeType(e,t),this.log(`switching codec ${d} to ${c}`),this.tracks[e]={buffer:i.buffer,codec:a,container:n,levelCodec:o,metadata:l,id:r}}}}else this.pendingTracks[e]=t[e]})),i)return;const r=Math.max(this.bufferCodecEventsExpected-1,0);this.bufferCodecEventsExpected!==r&&(this.log(`${r} bufferCodec event(s) expected ${s.join(",")}`),this.bufferCodecEventsExpected=r),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks()}appendChangeType(e,t){const{operationQueue:i}=this,s={execute:()=>{const s=this.sourceBuffer[e];s&&(this.log(`changing ${e} sourceBuffer type to ${t}`),s.changeType(t)),i.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:t=>{this.warn(`Failed to change ${e} SourceBuffer type`,t)}};i.append(s,e,!!this.pendingTracks[e])}onBufferAppending(e,t){const{hls:i,operationQueue:s,tracks:r}=this,{data:a,type:o,frag:n,part:l,chunkMeta:d}=t,h=d.buffering[o],c=self.performance.now();h.start=c;const u=n.stats.buffering,p=l?l.stats.buffering:null;0===u.start&&(u.start=c),p&&0===p.start&&(p.start=c);const f=r.audio;let m=!1;"audio"===o&&"audio/mpeg"===(null==f?void 0:f.container)&&(m=!this.lastMpegAudioChunk||1===d.id||this.lastMpegAudioChunk.sn!==d.sn,this.lastMpegAudioChunk=d);const g=n.start,y={execute:()=>{if(h.executeStart=self.performance.now(),m){const e=this.sourceBuffer[o];if(e){const t=g-e.timestampOffset;Math.abs(t)>=.1&&(this.log(`Updating audio SourceBuffer timestampOffset to ${g} (delta: ${t}) sn: ${n.sn})`),e.timestampOffset=g)}}this.appendExecutor(a,o)},onStart:()=>{},onComplete:()=>{const e=self.performance.now();h.executeEnd=h.end=e,0===u.first&&(u.first=e),p&&0===p.first&&(p.first=e);const{sourceBuffer:t}=this,i={};for(const e in t)i[e]=Ff.getBuffered(t[e]);this.appendErrors[o]=0,"audio"===o||"video"===o?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(dc.BUFFER_APPENDED,{type:o,frag:n,part:l,chunkMeta:d,parent:n.type,timeRanges:i})},onError:e=>{const t={type:hc.MEDIA_ERROR,parent:n.type,details:cc.BUFFER_APPEND_ERROR,sourceBufferName:o,frag:n,part:l,chunkMeta:d,error:e,err:e,fatal:!1};if(e.code===DOMException.QUOTA_EXCEEDED_ERR)t.details=cc.BUFFER_FULL_ERROR;else{const e=++this.appendErrors[o];t.details=cc.BUFFER_APPEND_ERROR,this.warn(`Failed ${e}/${i.config.appendErrorMaxRetry} times to append segment in "${o}" sourceBuffer`),e>=i.config.appendErrorMaxRetry&&(t.fatal=!0)}i.trigger(dc.ERROR,t)}};s.append(y,o,!!this.pendingTracks[o])}onBufferFlushing(e,t){const{operationQueue:i}=this,s=e=>({execute:this.removeExecutor.bind(this,e,t.startOffset,t.endOffset),onStart:()=>{},onComplete:()=>{this.hls.trigger(dc.BUFFER_FLUSHED,{type:e})},onError:t=>{this.warn(`Failed to remove from ${e} SourceBuffer`,t)}});t.type?i.append(s(t.type),t.type):this.getSourceBufferTypes().forEach((e=>{i.append(s(e),e)}))}onFragParsed(e,t){const{frag:i,part:s}=t,r=[],a=s?s.elementaryStreams:i.elementaryStreams;a[Ec]?r.push("audiovideo"):(a[Sc]&&r.push("audio"),a[Tc]&&r.push("video"));0===r.length&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${i.type} level: ${i.level} sn: ${i.sn}`),this.blockBuffers((()=>{const e=self.performance.now();i.stats.buffering.end=e,s&&(s.stats.buffering.end=e);const t=s?s.stats:i.stats;this.hls.trigger(dc.FRAG_BUFFERED,{frag:i,part:s,stats:t,id:i.type})}),r)}onFragChanged(e,t){this.trimBuffers()}onBufferEos(e,t){this.getSourceBufferTypes().reduce(((e,i)=>{const s=this.sourceBuffer[i];return!s||t.type&&t.type!==i||(s.ending=!0,s.ended||(s.ended=!0,this.log(`${i} sourceBuffer now EOS`))),e&&!(s&&!s.ended)}),!0)&&(this.log("Queueing mediaSource.endOfStream()"),this.blockBuffers((()=>{this.getSourceBufferTypes().forEach((e=>{const t=this.sourceBuffer[e];t&&(t.ending=!1)}));const{mediaSource:e}=this;e&&"open"===e.readyState?(this.log("Calling mediaSource.endOfStream()"),e.endOfStream()):e&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${e.readyState}`)})))}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())}trimBuffers(){const{hls:e,details:t,media:i}=this;if(!i||null===t)return;if(!this.getSourceBufferTypes().length)return;const s=e.config,r=i.currentTime,a=t.levelTargetDuration,o=t.live&&null!==s.liveBackBufferLength?s.liveBackBufferLength:s.backBufferLength;if(oc(o)&&o>0){const e=Math.max(o,a),t=Math.floor(r/a)*a-e;this.flushBackBuffer(r,a,t)}if(oc(s.frontBufferFlushThreshold)&&s.frontBufferFlushThreshold>0){const e=Math.max(s.maxBufferLength,s.frontBufferFlushThreshold),t=Math.max(e,a),i=Math.floor(r/a)*a+t;this.flushFrontBuffer(r,a,i)}}flushBackBuffer(e,t,i){const{details:s,sourceBuffer:r}=this;this.getSourceBufferTypes().forEach((a=>{const o=r[a];if(o){const r=Ff.getBuffered(o);if(r.length>0&&i>r.start(0)){if(this.hls.trigger(dc.BACK_BUFFER_REACHED,{bufferEnd:i}),null!=s&&s.live)this.hls.trigger(dc.LIVE_BACK_BUFFER_REACHED,{bufferEnd:i});else if(o.ended&&r.end(r.length-1)-e<2*t)return void this.log(`Cannot flush ${a} back buffer while SourceBuffer is in ended state`);this.hls.trigger(dc.BUFFER_FLUSHING,{startOffset:0,endOffset:i,type:a})}}}))}flushFrontBuffer(e,t,i){const{sourceBuffer:s}=this;this.getSourceBufferTypes().forEach((r=>{const a=s[r];if(a){const s=Ff.getBuffered(a),o=s.length;if(o<2)return;const n=s.start(o-1),l=s.end(o-1);if(i>n||e>=n&&e<=l)return;if(a.ended&&e-l<2*t)return void this.log(`Cannot flush ${r} front buffer while SourceBuffer is in ended state`);this.hls.trigger(dc.BUFFER_FLUSHING,{startOffset:n,endOffset:1/0,type:r})}}))}updateMediaElementDuration(){if(!this.details||!this.media||!this.mediaSource||"open"!==this.mediaSource.readyState)return;const{details:e,hls:t,media:i,mediaSource:s}=this,r=e.fragments[0].start+e.totalduration,a=i.duration,o=oc(s.duration)?s.duration:0;e.live&&t.config.liveDurationInfinity?(s.duration=1/0,this.updateSeekableRange(e)):(r>o&&r>a||!oc(a))&&(this.log(`Updating Media Source duration to ${r.toFixed(3)}`),s.duration=r)}updateSeekableRange(e){const t=this.mediaSource,i=e.fragments;if(i.length&&e.live&&null!=t&&t.setLiveSeekableRange){const s=Math.max(0,i[0].start),r=Math.max(s,s+e.totalduration);this.log(`Media Source duration is set to ${t.duration}. Setting seekable range to ${s}-${r}.`),t.setLiveSeekableRange(s,r)}}checkPendingTracks(){const{bufferCodecEventsExpected:e,operationQueue:t,pendingTracks:i}=this,s=Object.keys(i).length;if(s&&(!e||2===s||"audiovideo"in i)){this.createSourceBuffers(i),this.pendingTracks={};const e=this.getSourceBufferTypes();if(e.length)this.hls.trigger(dc.BUFFER_CREATED,{tracks:this.tracks}),e.forEach((e=>{t.executeNext(e)}));else{const e=new Error("could not create source buffer for media codec(s)");this.hls.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:e,reason:e.message})}}}createSourceBuffers(e){const{sourceBuffer:t,mediaSource:i}=this;if(!i)throw Error("createSourceBuffers called when mediaSource was null");for(const s in e)if(!t[s]){const r=e[s];if(!r)throw Error(`source buffer exists for track ${s}, however track does not`);let a=r.levelCodec||r.codec;a&&"audio"===s.slice(0,5)&&(a=Qu(a,this.appendSource));const o=`${r.container};codecs=${a}`;this.log(`creating sourceBuffer(${o})`);try{const e=t[s]=i.addSourceBuffer(o),n=s;this.addBufferListener(n,"updatestart",this._onSBUpdateStart),this.addBufferListener(n,"updateend",this._onSBUpdateEnd),this.addBufferListener(n,"error",this._onSBUpdateError),this.appendSource&&this.addBufferListener(n,"bufferedchange",((e,t)=>{const i=t.removedRanges;null!=i&&i.length&&this.hls.trigger(dc.BUFFER_FLUSHED,{type:s})})),this.tracks[s]={buffer:e,codec:a,container:r.container,levelCodec:r.levelCodec,metadata:r.metadata,id:r.id}}catch(e){this.error(`error while trying to add sourceBuffer: ${e.message}`),this.hls.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:e,sourceBufferName:s,mimeType:o})}}}get mediaSrc(){var e;const t=(null==(e=this.media)?void 0:e.firstChild)||this.media;return null==t?void 0:t.src}_onSBUpdateStart(e){const{operationQueue:t}=this;t.current(e).onStart()}_onSBUpdateEnd(e){var t;if("closed"===(null==(t=this.mediaSource)?void 0:t.readyState))return void this.resetBuffer(e);const{operationQueue:i}=this;i.current(e).onComplete(),i.shiftAndExecuteNext(e)}_onSBUpdateError(e,t){var i;const s=new Error(`${e} SourceBuffer error. MediaSource readyState: ${null==(i=this.mediaSource)?void 0:i.readyState}`);this.error(`${s}`,t),this.hls.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:s,fatal:!1});const r=this.operationQueue.current(e);r&&r.onError(s)}removeExecutor(e,t,i){const{media:s,mediaSource:r,operationQueue:a,sourceBuffer:o}=this,n=o[e];if(!s||!r||!n)return this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),void a.shiftAndExecuteNext(e);const l=oc(s.duration)?s.duration:1/0,d=oc(r.duration)?r.duration:1/0,h=Math.max(0,t),c=Math.min(i,l,d);c>h&&(!n.ending||n.ended)?(n.ended=!1,this.log(`Removing [${h},${c}] from the ${e} SourceBuffer`),n.remove(h,c)):a.shiftAndExecuteNext(e)}appendExecutor(e,t){const i=this.sourceBuffer[t];if(i)i.ended=!1,i.appendBuffer(e);else if(!this.pendingTracks[t])throw new Error(`Attempting to append to the ${t} SourceBuffer, but it does not exist`)}blockBuffers(e,t=this.getSourceBufferTypes()){if(!t.length)return this.log("Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve().then(e);const{operationQueue:i}=this,s=t.map((e=>i.appendBlocker(e)));Promise.all(s).then((()=>{e(),t.forEach((e=>{const t=this.sourceBuffer[e];null!=t&&t.updating||i.shiftAndExecuteNext(e)}))}))}getSourceBufferTypes(){return Object.keys(this.sourceBuffer)}addBufferListener(e,t,i){const s=this.sourceBuffer[e];if(!s)return;const r=i.bind(this,e);this.listeners[e].push({event:t,listener:r}),s.addEventListener(t,r)}removeBufferListeners(e){const t=this.sourceBuffer[e];t&&this.listeners[e].forEach((e=>{t.removeEventListener(e.event,e.listener)}))}},capLevelController:_y,errorController:class{constructor(e){this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.log=void 0,this.warn=void 0,this.error=void 0,this.hls=e,this.log=gc.log.bind(gc,"[info]:"),this.warn=gc.warn.bind(gc,"[warning]:"),this.error=gc.error.bind(gc,"[error]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(dc.ERROR,this.onError,this),e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(dc.ERROR,this.onError,this),e.off(dc.ERROR,this.onErrorOut,this),e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(null==e?void 0:e.type)===gp?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var i,s;if(t.fatal)return;const r=this.hls,a=t.context;switch(t.details){case cc.FRAG_LOAD_ERROR:case cc.FRAG_LOAD_TIMEOUT:case cc.KEY_LOAD_ERROR:case cc.KEY_LOAD_TIMEOUT:return void(t.errorAction=this.getFragRetryOrSwitchAction(t));case cc.FRAG_PARSING_ERROR:if(null!=(i=t.frag)&&i.gap)return void(t.errorAction={action:lf,flags:uf});case cc.FRAG_GAP:case cc.FRAG_DECRYPT_ERROR:return t.errorAction=this.getFragRetryOrSwitchAction(t),void(t.errorAction.action=df);case cc.LEVEL_EMPTY_ERROR:case cc.LEVEL_PARSING_ERROR:{var o,n;const e=t.parent===gp?t.level:r.loadLevel;t.details===cc.LEVEL_EMPTY_ERROR&&null!=(o=t.context)&&null!=(n=o.levelDetails)&&n.live?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,e):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,e))}return;case cc.LEVEL_LOAD_ERROR:case cc.LEVEL_LOAD_TIMEOUT:return void("number"==typeof(null==a?void 0:a.level)&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,a.level)));case cc.AUDIO_TRACK_LOAD_ERROR:case cc.AUDIO_TRACK_LOAD_TIMEOUT:case cc.SUBTITLE_LOAD_ERROR:case cc.SUBTITLE_TRACK_LOAD_TIMEOUT:if(a){const e=r.levels[r.loadLevel];if(e&&(a.type===fp&&e.hasAudioGroup(a.groupId)||a.type===mp&&e.hasSubtitleGroup(a.groupId)))return t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.loadLevel),t.errorAction.action=df,void(t.errorAction.flags=pf)}return;case cc.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const e=r.levels[r.loadLevel],i=null==e?void 0:e.attrs["HDCP-LEVEL"];i?t.errorAction={action:df,flags:ff,hdcpLevel:i}:this.keySystemError(t)}return;case cc.BUFFER_ADD_CODEC_ERROR:case cc.REMUX_ALLOC_ERROR:case cc.BUFFER_APPEND_ERROR:return void(t.errorAction=this.getLevelSwitchAction(t,null!=(s=t.level)?s:r.loadLevel));case cc.INTERNAL_EXCEPTION:case cc.BUFFER_APPENDING_ERROR:case cc.BUFFER_FULL_ERROR:case cc.LEVEL_SWITCH_ERROR:case cc.BUFFER_STALLED_ERROR:case cc.BUFFER_SEEK_OVER_HOLE:case cc.BUFFER_NUDGE_ON_STALL:return void(t.errorAction={action:lf,flags:uf})}t.type===hc.KEY_SYSTEM_ERROR&&this.keySystemError(t)}keySystemError(e){const t=this.getVariantLevelIndex(e.frag);e.levelRetry=!1,e.errorAction=this.getLevelSwitchAction(e,t)}getPlaylistRetryOrSwitchAction(e,t){const i=Zp(this.hls.config.playlistLoadPolicy,e),s=this.playlistError++;if(sf(i,s,Xp(e),e.response))return{action:cf,flags:uf,retryConfig:i,retryCount:s};const r=this.getLevelSwitchAction(e,t);return i&&(r.retryConfig=i,r.retryCount=s),r}getFragRetryOrSwitchAction(e){const t=this.hls,i=this.getVariantLevelIndex(e.frag),s=t.levels[i],{fragLoadPolicy:r,keyLoadPolicy:a}=t.config,o=Zp(e.details.startsWith("key")?a:r,e),n=t.levels.reduce(((e,t)=>e+t.fragmentError),0);if(s){e.details!==cc.FRAG_GAP&&s.fragmentError++;if(sf(o,n,Xp(e),e.response))return{action:cf,flags:uf,retryConfig:o,retryCount:n}}const l=this.getLevelSwitchAction(e,i);return o&&(l.retryConfig=o,l.retryCount=n),l}getLevelSwitchAction(e,t){const i=this.hls;null==t&&(t=i.loadLevel);const s=this.hls.levels[t];if(s){var r,a;const t=e.details;s.loadError++,t===cc.BUFFER_APPEND_ERROR&&s.fragmentError++;let l=-1;const{levels:d,loadLevel:h,minAutoLevel:c,maxAutoLevel:u}=i;i.autoLevelEnabled||(i.loadLevel=-1);const p=null==(r=e.frag)?void 0:r.type,f=(p===yp&&t===cc.FRAG_PARSING_ERROR||"audio"===e.sourceBufferName&&(t===cc.BUFFER_ADD_CODEC_ERROR||t===cc.BUFFER_APPEND_ERROR))&&d.some((({audioCodec:e})=>s.audioCodec!==e)),m="video"===e.sourceBufferName&&(t===cc.BUFFER_ADD_CODEC_ERROR||t===cc.BUFFER_APPEND_ERROR)&&d.some((({codecSet:e,audioCodec:t})=>s.codecSet!==e&&s.audioCodec===t)),{type:g,groupId:y}=null!=(a=e.context)?a:{};for(let i=d.length;i--;){const r=(i+h)%d.length;if(r!==h&&r>=c&&r<=u&&0===d[r].loadError){var o,n;const i=d[r];if(t===cc.FRAG_GAP&&e.frag){const t=d[r].details;if(t){const i=af(e.frag,t.fragments,e.frag.start);if(null!=i&&i.gap)continue}}else{if(g===fp&&i.hasAudioGroup(y)||g===mp&&i.hasSubtitleGroup(y))continue;if(p===yp&&null!=(o=s.audioGroups)&&o.some((e=>i.hasAudioGroup(e)))||p===Ap&&null!=(n=s.subtitleGroups)&&n.some((e=>i.hasSubtitleGroup(e)))||f&&s.audioCodec===i.audioCodec||!f&&s.audioCodec!==i.audioCodec||m&&s.codecSet===i.codecSet)continue}l=r;break}}if(l>-1&&i.loadLevel!==l)return e.levelRetry=!0,this.playlistError=0,{action:df,flags:uf,nextAutoLevel:l}}return{action:df,flags:pf}}onErrorOut(e,t){var i;switch(null==(i=t.errorAction)?void 0:i.action){case lf:break;case df:this.sendAlternateToPenaltyBox(t),t.errorAction.resolved||t.details===cc.FRAG_GAP?/MediaSource readyState: ended/.test(t.error.message)&&(this.warn(`MediaSource ended after "${t.sourceBufferName}" sourceBuffer append error. Attempting to recover from media error.`),this.hls.recoverMediaError()):t.fatal=!0}t.fatal&&this.hls.stopLoad()}sendAlternateToPenaltyBox(e){const t=this.hls,i=e.errorAction;if(!i)return;const{flags:s,hdcpLevel:r,nextAutoLevel:a}=i;switch(s){case uf:this.switchLevel(e,a);break;case ff:r&&(t.maxHdcpLevel=Up[Up.indexOf(r)-1],i.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`)}i.resolved||this.switchLevel(e,a)}switchLevel(e,t){void 0!==t&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel)}},fpsController:class{constructor(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}setStreamController(e){this.streamController=e}registerListeners(){this.hls.on(dc.MEDIA_ATTACHING,this.onMediaAttaching,this)}unregisterListeners(){this.hls.off(dc.MEDIA_ATTACHING,this.onMediaAttaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const i=this.hls.config;if(i.capLevelOnFPSDrop){const e=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=e,e&&"function"==typeof e.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),i.fpsDroppedMonitoringPeriod)}}checkFPS(e,t,i){const s=performance.now();if(t){if(this.lastTime){const e=s-this.lastTime,r=i-this.lastDroppedFrames,a=t-this.lastDecodedFrames,o=1e3*r/e,n=this.hls;if(n.trigger(dc.FPS_DROP,{currentDropped:r,currentDecoded:a,totalDroppedFrames:i}),o>0&&r>n.config.fpsDroppedMonitoringThreshold*a){let e=n.currentLevel;gc.warn("drop FPS ratio greater than max allowed value for currentLevel: "+e),e>0&&(-1===n.autoLevelCapping||n.autoLevelCapping>=e)&&(e-=1,n.trigger(dc.FPS_DROP_LEVEL_CAPPING,{level:e,droppedLevel:n.currentLevel}),n.autoLevelCapping=e,this.streamController.nextLevelSwitch())}}this.lastTime=s,this.lastDroppedFrames=i,this.lastDecodedFrames=t}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}},stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrEwmaDefaultEstimateMax:5e6,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:$c,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,useMediaCapabilities:!0,certLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null}},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},{cueHandler:nA,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:class extends um{constructor(e,t,i){super(e,t,i,"[subtitle-stream-controller]",Ap),this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null}_registerListeners(){const{hls:e}=this;e.on(dc.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.LEVEL_LOADED,this.onLevelLoaded,this),e.on(dc.ERROR,this.onError,this),e.on(dc.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(dc.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(dc.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(dc.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(dc.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(dc.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(dc.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.LEVEL_LOADED,this.onLevelLoaded,this),e.off(dc.ERROR,this.onError,this),e.off(dc.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(dc.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(dc.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(dc.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(dc.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(dc.FRAG_BUFFERED,this.onFragBuffered,this)}startLoad(e){this.stopLoad(),this.state=tm,this.setInterval(500),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}onManifestLoading(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()}onMediaDetaching(){this.tracksBuffered=[],super.onMediaDetaching()}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:i,success:s}=t;if(this.fragPrevious=i,this.state=tm,!s)return;const r=this.tracksBuffered[this.currentTrackId];if(!r)return;let a;const o=i.start;for(let e=0;e<r.length;e++)if(o>=r[e].start&&o<=r[e].end){a=r[e];break}const n=i.start+i.duration;a?a.end=n:(a={start:o,end:n},r.push(a)),this.fragmentTracker.fragBuffered(i),this.fragBufferedComplete(i,null)}onBufferFlushing(e,t){const{startOffset:i,endOffset:s}=t;if(0===i&&s!==Number.POSITIVE_INFINITY){const e=s-1;if(e<=0)return;t.endOffsetSubtitles=Math.max(0,e),this.tracksBuffered.forEach((t=>{for(let i=0;i<t.length;)if(t[i].end<=e)t.shift();else{if(!(t[i].start<e))break;t[i].start=e,i++}})),this.fragmentTracker.removeFragmentsInRange(i,e,Ap)}}onFragBuffered(e,t){var i;this.loadedmetadata||t.frag.type!==gp||null!=(i=this.media)&&i.buffered.length&&(this.loadedmetadata=!0)}onError(e,t){const i=t.frag;(null==i?void 0:i.type)===Ap&&(this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==em&&(this.state=tm))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){this.levels&&bg(this.levels,t)?this.levels=t.map((e=>new zp(e))):(this.tracksBuffered=[],this.levels=t.map((e=>{const t=new zp(e);return this.tracksBuffered[t.id]=[],t})),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,Ap),this.fragPrevious=null,this.mediaBuffer=null)}onSubtitleTrackSwitch(e,t){var i;if(this.currentTrackId=t.id,null==(i=this.levels)||!i.length||-1===this.currentTrackId)return void this.clearInterval();const s=this.levels[this.currentTrackId];null!=s&&s.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,s&&this.setInterval(500)}onSubtitleTrackLoaded(e,t){var i;const{currentTrackId:s,levels:r}=this,{details:a,id:o}=t;if(!r)return void this.warn(`Subtitle tracks were reset while loading level ${o}`);const n=r[s];if(o>=r.length||o!==s||!n)return;this.log(`Subtitle track ${o} loaded [${a.startSN},${a.endSN}]${a.lastPartSn?`[part-${a.lastPartSn}-${a.lastPartIndex}]`:""},duration:${a.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let l=0;if(a.live||null!=(i=n.details)&&i.live){const e=this.mainDetails;if(a.deltaUpdateFailed||!e)return;const t=e.fragments[0];var d;if(n.details)l=this.alignPlaylists(a,n.details,null==(d=this.levelLastLoaded)?void 0:d.details),0===l&&t&&(l=t.start,qp(a,l));else a.hasProgramDateTime&&e.hasProgramDateTime?($f(a,e),l=a.fragments[0].start):t&&(l=t.start,qp(a,l))}if(n.details=a,this.levelLastLoaded=n,this.startFragRequested||!this.mainDetails&&a.live||this.setStartPosition(this.mainDetails||a,l),this.tick(),a.live&&!this.fragCurrent&&this.media&&this.state===tm){af(null,a.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),n.details=void 0)}}_handleFragmentLoadComplete(e){const{frag:t,payload:i}=e,s=t.decryptdata,r=this.hls;if(!this.fragContextChanged(t)&&i&&i.byteLength>0&&null!=s&&s.key&&s.iv&&"AES-128"===s.method){const e=performance.now();this.decrypter.decrypt(new Uint8Array(i),s.key.buffer,s.iv.buffer).catch((e=>{throw r.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.FRAG_DECRYPT_ERROR,fatal:!1,error:e,reason:e.message,frag:t}),e})).then((i=>{const s=performance.now();r.trigger(dc.FRAG_DECRYPTED,{frag:t,payload:i,stats:{tstart:e,tdecrypt:s}})})).catch((e=>{this.warn(`${e.name}: ${e.message}`),this.state=tm}))}}doTick(){if(this.media){if(this.state===tm){const{currentTrackId:e,levels:t}=this,i=null==t?void 0:t[e];if(!i||!t.length||!i.details)return;const{config:s}=this,r=this.getLoadPosition(),a=Ff.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],r,s.maxBufferHole),{end:o,len:n}=a,l=this.getFwdBufferInfo(this.media,gp),d=i.details;if(n>this.getMaxBufferLength(null==l?void 0:l.len)+d.levelTargetDuration)return;const h=d.fragments,c=h.length,u=d.edge;let p=null;const f=this.fragPrevious;if(o<u){const e=s.maxFragLookUpTolerance,t=o>u-e?0:e;p=af(f,h,Math.max(h[0].start,o),t),!p&&f&&f.start<h[0].start&&(p=h[0])}else p=h[c-1];if(!p)return;if(p=this.mapToInitFragWhenRequired(p),"initSegment"!==p.sn){const e=h[p.sn-d.startSN-1];e&&e.cc===p.cc&&this.fragmentTracker.getState(e)===Rf&&(p=e)}this.fragmentTracker.getState(p)===Rf&&this.loadFragment(p,i,o)}}else this.state=tm}getMaxBufferLength(e){const t=super.getMaxBufferLength();return e?Math.max(t,e):t}loadFragment(e,t,i){this.fragCurrent=e,"initSegment"===e.sn?this._loadInitSegment(e,t):(this.startFragRequested=!0,super.loadFragment(e,t,i))}get mediaBufferTimeRanges(){return new wg(this.tracksBuffered[this.currentTrackId]||[])}},subtitleTrackController:class extends mf{constructor(e){super(e,"[subtitle-track-controller]"),this.media=null,this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.queuedDefaultTrack=-1,this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.onTextTracksChanged=()=>{if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let e=null;const t=kp(this.media.textTracks);for(let i=0;i<t.length;i++)if("hidden"===t[i].mode)e=t[i];else if("showing"===t[i].mode){e=t[i];break}const i=this.findTrackForTextTrack(e);this.subtitleTrack!==i&&this.setSubtitleTrack(i)},this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}registerListeners(){const{hls:e}=this;e.on(dc.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.MANIFEST_PARSED,this.onManifestParsed,this),e.on(dc.LEVEL_LOADING,this.onLevelLoading,this),e.on(dc.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(dc.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(dc.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(dc.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.MANIFEST_PARSED,this.onManifestParsed,this),e.off(dc.LEVEL_LOADING,this.onLevelLoading,this),e.off(dc.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(dc.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(dc.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}onMediaDetaching(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);kp(this.media.textTracks).forEach((e=>{Tp(e)})),this.subtitleTrack=-1,this.media=null}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id:i,groupId:s,details:r}=t,a=this.tracksInGroup[i];if(!a||a.groupId!==s)return void this.warn(`Subtitle track with id:${i} and group:${s} not found in active group ${null==a?void 0:a.groupId}`);const o=a.details;a.details=t.details,this.log(`Subtitle track ${i} "${a.name}" lang:${a.lang} group:${s} loaded [${r.startSN}-${r.endSN}]`),i===this.trackId&&this.playlistLoaded(i,t,o)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const i=t.subtitleGroups||null,s=this.groupIds;let r=this.currentTrack;if(!i||(null==s?void 0:s.length)!==(null==i?void 0:i.length)||null!=i&&i.some((e=>-1===(null==s?void 0:s.indexOf(e))))){this.groupIds=i,this.trackId=-1,this.currentTrack=null;const e=this.tracks.filter((e=>!i||-1!==i.indexOf(e.groupId)));if(e.length)this.selectDefaultTrack&&!e.some((e=>e.default))&&(this.selectDefaultTrack=!1),e.forEach(((e,t)=>{e.id=t}));else if(!r&&!this.tracksInGroup.length)return;this.tracksInGroup=e;const t=this.hls.config.subtitlePreference;if(!r&&t){this.selectDefaultTrack=!1;const i=Tf(t,e);if(i>-1)r=e[i];else{const e=Tf(t,this.tracks);r=this.tracks[e]}}let s=this.findTrackId(r);-1===s&&r&&(s=this.findTrackId(null));const a={subtitleTracks:e};this.log(`Updating subtitle tracks, ${e.length} track(s) found in "${null==i?void 0:i.join(",")}" group-id`),this.hls.trigger(dc.SUBTITLE_TRACKS_UPDATED,a),-1!==s&&-1===this.trackId&&this.setSubtitleTrack(s)}else this.shouldReloadPlaylist(r)&&this.setSubtitleTrack(this.trackId)}findTrackId(e){const t=this.tracksInGroup,i=this.selectDefaultTrack;for(let s=0;s<t.length;s++){const r=t[s];if((!i||r.default)&&(i||e)&&(!e||Ef(r,e)))return s}if(e){for(let i=0;i<t.length;i++){const s=t[i];if(_g(e.attrs,s.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return i}for(let i=0;i<t.length;i++){const s=t[i];if(_g(e.attrs,s.attrs,["LANGUAGE"]))return i}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let i=0;i<t.length;i++){if(vg(t[i],e))return i}}return-1}onError(e,t){!t.fatal&&t.context&&(t.context.type!==mp||t.context.id!==this.trackId||this.groupIds&&-1===this.groupIds.indexOf(t.context.groupId)||this.checkRetry(t))}get allSubtitleTracks(){return this.tracks}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}setSubtitleOption(e){if(this.hls.config.subtitlePreference=e,e){const t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){const i=this.currentTrack;if(i&&Ef(e,i))return i;const s=Tf(e,this.tracksInGroup);if(s>-1){const e=this.tracksInGroup[s];return this.setSubtitleTrack(s),e}if(i)return null;{const i=Tf(e,t);if(i>-1)return t[i]}}}return null}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;if(this.shouldLoadPlaylist(t)&&t){const i=t.id,s=t.groupId;let r=t.url;if(e)try{r=e.addDirectives(r)}catch(e){this.warn(`Could not construct new URL with HLS Delivery Directives: ${e}`)}this.log(`Loading subtitle playlist for id ${i}`),this.hls.trigger(dc.SUBTITLE_TRACK_LOADING,{url:r,id:i,groupId:s,deliveryDirectives:e||null})}}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=kp(e.textTracks),i=this.currentTrack;let s;if(i&&(s=t.filter((e=>vg(i,e)))[0],s||this.warn(`Unable to find subtitle TextTrack with name "${i.name}" and language "${i.lang}"`)),[].slice.call(t).forEach((e=>{"disabled"!==e.mode&&e!==s&&(e.mode="disabled")})),s){const e=this.subtitleDisplay?"showing":"hidden";s.mode!==e&&(s.mode=e)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media)return void(this.queuedDefaultTrack=e);if(e<-1||e>=t.length||!oc(e))return void this.warn(`Invalid subtitle track id: ${e}`);this.clearTimer(),this.selectDefaultTrack=!1;const i=this.currentTrack,s=t[e]||null;if(this.trackId=e,this.currentTrack=s,this.toggleTrackModes(),!s)return void this.hls.trigger(dc.SUBTITLE_TRACK_SWITCH,{id:e});const r=!!s.details&&!s.details.live;if(e===this.trackId&&s===i&&r)return;this.log(`Switching to subtitle-track ${e}`+(s?` "${s.name}" lang:${s.lang} group:${s.groupId}`:""));const{id:a,groupId:o="",name:n,type:l,url:d}=s;this.hls.trigger(dc.SUBTITLE_TRACK_SWITCH,{id:a,groupId:o,name:n,type:l,url:d});const h=this.switchParams(s.url,null==i?void 0:i.details);this.loadPlaylist(h)}},timelineController:class{constructor(e){this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},e.on(dc.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(dc.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(dc.FRAG_LOADING,this.onFragLoading,this),e.on(dc.FRAG_LOADED,this.onFragLoaded,this),e.on(dc.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(dc.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(dc.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(dc.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(dc.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(dc.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(dc.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(dc.FRAG_LOADING,this.onFragLoading,this),e.off(dc.FRAG_LOADED,this.onFragLoaded,this),e.off(dc.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(dc.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(dc.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(dc.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(dc.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){if(this.config.enableCEA708Captions&&(!this.cea608Parser1||!this.cea608Parser2)){const e=new Vg(this,"textTrack1"),t=new Vg(this,"textTrack2"),i=new Vg(this,"textTrack3"),s=new Vg(this,"textTrack4");this.cea608Parser1=new zg(1,e,t),this.cea608Parser2=new zg(3,i,s)}}addCues(e,t,i,s,r){let a=!1;for(let e=r.length;e--;){const s=r[e],h=(o=s[0],n=s[1],l=t,d=i,Math.min(n,d)-Math.max(o,l));if(h>=0&&(s[0]=Math.min(s[0],t),s[1]=Math.max(s[1],i),a=!0,h/(i-t)>.5))return}var o,n,l,d;if(a||r.push([t,i]),this.config.renderTextTracksNatively){const r=this.captionsTracks[e];this.Cues.newCue(r,t,i,s)}else{const r=this.Cues.newCue(null,t,i,s);this.hls.trigger(dc.CUES_PARSED,{type:"captions",cues:r,track:e})}}onInitPtsFound(e,{frag:t,id:i,initPTS:s,timescale:r}){const{unparsedVttFrags:a}=this;"main"===i&&(this.initPTS[t.cc]={baseTime:s,timescale:r}),a.length&&(this.unparsedVttFrags=[],a.forEach((e=>{this.onFragLoaded(dc.FRAG_LOADED,e)})))}getExistingTrack(e,t){const{media:i}=this;if(i)for(let s=0;s<i.textTracks.length;s++){const r=i.textTracks[s];if(by(r,{name:e,lang:t,attrs:{}}))return r}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:i,media:s}=this,{label:r,languageCode:a}=t[e],o=this.getExistingTrack(r,a);if(o)i[e]=o,Tp(i[e]),wp(i[e],s);else{const t=this.createTextTrack("captions",r,a);t&&(t[e]=!0,i[e]=t)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const i={_id:e,label:t.label,kind:"captions",default:!!t.media&&!!t.media.default,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=i,this.hls.trigger(dc.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[i]})}createTextTrack(e,t,i){const s=this.media;if(s)return s.addTextTrack(e,t,i)}onMediaAttaching(e,t){this.media=t.media,this._cleanTracks()}onMediaDetaching(){const{captionsTracks:e}=this;Object.keys(e).forEach((t=>{Tp(e[t]),delete e[t]})),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:e}=this;if(!e)return;const t=e.textTracks;if(t)for(let e=0;e<t.length;e++)Tp(t[e])}onSubtitleTracksUpdated(e,t){const i=t.subtitleTracks||[],s=i.some((e=>e.textCodec===ny));if(this.config.enableWebVTT||s&&this.config.enableIMSC1){if(bg(this.tracks,i))return void(this.tracks=i);if(this.textTracks=[],this.tracks=i,this.config.renderTextTracksNatively){const e=this.media,t=e?kp(e.textTracks):null;if(this.tracks.forEach(((e,i)=>{let s;if(t){let i=null;for(let s=0;s<t.length;s++)if(t[s]&&by(t[s],e)){i=t[s],t[s]=null;break}i&&(s=i)}if(s)Tp(s);else{const t=Ay(e);s=this.createTextTrack(t,e.name,e.lang),s&&(s.mode="disabled")}s&&this.textTracks.push(s)})),null!=t&&t.length){const e=t.filter((e=>null!==e)).map((e=>e.label));e.length&&gc.warn(`Media element contains unused subtitle tracks: ${e.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const e=this.tracks.map((e=>({label:e.name,kind:e.type.toLowerCase(),default:e.default,subtitleTrack:e})));this.hls.trigger(dc.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:e})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach((e=>{const t=/(?:CC|SERVICE)([1-4])/.exec(e.instreamId);if(!t)return;const i=`textTrack${t[1]}`,s=this.captionsProperties[i];s&&(s.label=e.name,e.lang&&(s.languageCode=e.lang),s.media=e)}))}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return null==t?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){this.initCea608Parsers();const{cea608Parser1:i,cea608Parser2:s,lastCc:r,lastSn:a,lastPartIndex:o}=this;if(this.enabled&&i&&s&&t.frag.type===gp){var n,l;const{cc:e,sn:d}=t.frag,h=null!=(n=null==t||null==(l=t.part)?void 0:l.index)?n:-1;d===a+1||d===a&&h===o+1||e===r||(i.reset(),s.reset()),this.lastCc=e,this.lastSn=d,this.lastPartIndex=h}}onFragLoaded(e,t){const{frag:i,payload:s}=t;if(i.type===Ap)if(s.byteLength){const e=i.decryptdata,r="stats"in t;if(null==e||!e.encrypted||r){const e=this.tracks[i.level],r=this.vttCCs;r[i.cc]||(r[i.cc]={start:i.start,prevCC:this.prevCC,new:!0},this.prevCC=i.cc),e&&e.textCodec===ny?this._parseIMSC1(i,s):this._parseVTTs(t)}}else this.hls.trigger(dc.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const i=this.hls;cy(t,this.initPTS[e.cc],(t=>{this._appendCues(t,e.level),i.trigger(dc.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(t=>{gc.log(`Failed to parse IMSC1: ${t}`),i.trigger(dc.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:t})}))}_parseVTTs(e){var t;const{frag:i,payload:s}=e,{initPTS:r,unparsedVttFrags:a}=this,o=r.length-1;if(!r[i.cc]&&-1===o)return void a.push(e);const n=this.hls;oy(null!=(t=i.initSegment)&&t.data?xu(i.initSegment.data,new Uint8Array(s)):s,this.initPTS[i.cc],this.vttCCs,i.cc,i.start,(e=>{this._appendCues(e,i.level),n.trigger(dc.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:i})}),(t=>{const r="Missing initPTS for VTT MPEGTS"===t.message;r?a.push(e):this._fallbackToIMSC1(i,s),gc.log(`Failed to parse VTT cue: ${t}`),r&&o>i.cc||n.trigger(dc.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:t})}))}_fallbackToIMSC1(e,t){const i=this.tracks[e.level];i.textCodec||cy(t,this.initPTS[e.cc],(()=>{i.textCodec=ny,this._parseIMSC1(e,t)}),(()=>{i.textCodec="wvtt"}))}_appendCues(e,t){const i=this.hls;if(this.config.renderTextTracksNatively){const i=this.textTracks[t];if(!i||"disabled"===i.mode)return;e.forEach((e=>Sp(i,e)))}else{const s=this.tracks[t];if(!s)return;const r=s.default?"default":"subtitles"+t;i.trigger(dc.CUES_PARSED,{type:"subtitles",cues:e,track:r})}}onFragDecrypted(e,t){const{frag:i}=t;i.type===Ap&&this.onFragLoaded(dc.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){this.initCea608Parsers();const{cea608Parser1:i,cea608Parser2:s}=this;if(!this.enabled||!i||!s)return;const{frag:r,samples:a}=t;if(r.type!==gp||"NONE"!==this.closedCaptionsForLevel(r))for(let e=0;e<a.length;e++){const t=a[e].bytes;if(t){const r=this.extractCea608Data(t);i.addData(a[e].pts,r[0]),s.addData(a[e].pts,r[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:i,endOffsetSubtitles:s,type:r}){const{media:a}=this;if(a&&!(a.currentTime<i)){if(!r||"video"===r){const{captionsTracks:e}=this;Object.keys(e).forEach((s=>Ep(e[s],t,i)))}if(this.config.renderTextTracksNatively&&0===t&&void 0!==s){const{textTracks:e}=this;Object.keys(e).forEach((i=>Ep(e[i],t,s)))}}}extractCea608Data(e){const t=[[],[]],i=31&e[0];let s=2;for(let r=0;r<i;r++){const i=e[s++],r=127&e[s++],a=127&e[s++];if(0===r&&0===a)continue;if(0!=(4&i)){const e=3&i;0!==e&&1!==e||(t[e].push(r),t[e].push(a))}}return t}},audioStreamController:class extends um{constructor(e,t,i){super(e,t,i,"[audio-stream-controller]",yp),this.videoBuffer=null,this.videoTrackCC=-1,this.waitingVideoCC=-1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.flushing=!1,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null,this.bufferedTrack=null,this.switchingTrack=null}_registerListeners(){const{hls:e}=this;e.on(dc.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.LEVEL_LOADED,this.onLevelLoaded,this),e.on(dc.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(dc.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(dc.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(dc.ERROR,this.onError,this),e.on(dc.BUFFER_RESET,this.onBufferReset,this),e.on(dc.BUFFER_CREATED,this.onBufferCreated,this),e.on(dc.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(dc.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(dc.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(dc.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(dc.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.LEVEL_LOADED,this.onLevelLoaded,this),e.off(dc.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(dc.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(dc.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(dc.ERROR,this.onError,this),e.off(dc.BUFFER_RESET,this.onBufferReset,this),e.off(dc.BUFFER_CREATED,this.onBufferCreated,this),e.off(dc.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(dc.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(dc.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(dc.FRAG_BUFFERED,this.onFragBuffered,this)}onInitPtsFound(e,{frag:t,id:i,initPTS:s,timescale:r}){if("main"===i){const e=t.cc;this.initPTS[t.cc]={baseTime:s,timescale:r},this.log(`InitPTS for cc: ${e} found from main: ${s}`),this.videoTrackCC=e,this.state===hm&&this.tick()}}startLoad(e){if(!this.levels)return this.startPosition=e,void(this.state=em);const t=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),t>0&&-1===e?(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t,this.state=tm):(this.loadedmetadata=!1,this.state=am),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}doTick(){switch(this.state){case tm:this.doTickIdle();break;case am:{var e;const{levels:t,trackId:i}=this,s=null==t||null==(e=t[i])?void 0:e.details;if(s){if(this.waitForCdnTuneIn(s))break;this.state=hm}break}case rm:{var t;const e=performance.now(),i=this.retryDate;if(!i||e>=i||null!=(t=this.media)&&t.seeking){const{levels:e,trackId:t}=this;this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded((null==e?void 0:e[t])||null),this.state=tm}break}case hm:{const e=this.waitingData;if(e){const{frag:t,part:i,cache:s,complete:r}=e;if(void 0!==this.initPTS[t.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=sm;const e={frag:t,part:i,payload:s.flush(),networkDetails:null};this._handleFragmentLoadProgress(e),r&&super._handleFragmentLoadComplete(e)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log(`Waiting fragment cc (${t.cc}) cancelled because video is at cc ${this.videoTrackCC}`),this.clearWaitingFragment();else{const e=this.getLoadPosition(),i=Ff.bufferInfo(this.mediaBuffer,e,this.config.maxBufferHole);of(i.end,this.config.maxFragLookUpTolerance,t)<0&&(this.log(`Waiting fragment cc (${t.cc}) @ ${t.start} cancelled because another fragment at ${i.end} is needed`),this.clearWaitingFragment())}}else this.state=tm}}this.onTickEnd()}clearWaitingFragment(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=tm)}resetLoadingState(){this.clearWaitingFragment(),super.resetLoadingState()}onTickEnd(){const{media:e}=this;null!=e&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){const{hls:e,levels:t,media:i,trackId:s}=this,r=e.config;if(!i&&(this.startFragRequested||!r.startFragPrefetch)||null==t||!t[s])return;const a=t[s],o=a.details;if(!o||o.live&&this.levelLastLoaded!==a||this.waitForCdnTuneIn(o))return void(this.state=am);const n=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&n&&(this.bufferFlushed=!1,this.afterBufferFlushed(n,Sc,yp));const l=this.getFwdBufferInfo(n,yp);if(null===l)return;const{bufferedTrack:d,switchingTrack:h}=this;if(!h&&this._streamEnded(l,o))return e.trigger(dc.BUFFER_EOS,{type:"audio"}),void(this.state=lm);const c=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,gp),u=l.len,p=this.getMaxBufferLength(null==c?void 0:c.len),f=o.fragments,m=f[0].start;let g=this.flushing?this.getLoadPosition():l.end;if(h&&i){const e=this.getLoadPosition();d&&!_g(h.attrs,d.attrs)&&(g=e),o.PTSKnown&&e<m&&(l.end>m||l.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),i.currentTime=m+.05)}if(u>=p&&!h&&g<f[f.length-1].start)return;let y=this.getNextFragment(g,o),A=!1;if(y&&this.isLoopLoading(y,g)&&(A=!!y.gap,y=this.getNextFragmentLoopLoading(y,o,l,gp,p)),!y)return void(this.bufferFlushed=!0);const b=c&&y.start>c.end+o.targetduration;if(b||(null==c||!c.len)&&l.len){const e=this.getAppendedFrag(y.start,gp);if(null===e)return;if(A||(A=!!e.gap||!!b&&0===c.len),b&&!A||A&&l.nextStart&&l.nextStart<e.end)return}this.loadFragment(y,a,g)}getMaxBufferLength(e){const t=super.getMaxBufferLength();return e?Math.min(Math.max(t,e),this.config.maxMaxBufferLength):t}onMediaDetaching(){this.videoBuffer=null,this.bufferFlushed=this.flushing=!1,super.onMediaDetaching()}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map((e=>new zp(e)))}onAudioTrackSwitching(e,t){const i=!!t.url;this.trackId=t.id;const{fragCurrent:s}=this;s&&(s.abortRequests(),this.removeUnbufferedFrags(s.start)),this.resetLoadingState(),i?this.setInterval(100):this.resetTransmuxer(),i?(this.switchingTrack=t,this.state=tm,this.flushAudioIfNeeded(t)):(this.switchingTrack=null,this.bufferedTrack=t,this.state=em),this.tick()}onManifestLoading(){this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=this.flushing=!1,this.levels=this.mainDetails=this.waitingData=this.bufferedTrack=this.cachedTrackLoadedData=this.switchingTrack=null,this.startFragRequested=!1,this.trackId=this.videoTrackCC=this.waitingVideoCC=-1}onLevelLoaded(e,t){this.mainDetails=t.details,null!==this.cachedTrackLoadedData&&(this.hls.trigger(dc.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)}onAudioTrackLoaded(e,t){var i;if(null==this.mainDetails)return void(this.cachedTrackLoadedData=t);const{levels:s}=this,{details:r,id:a}=t;if(!s)return void this.warn(`Audio tracks were reset while loading level ${a}`);this.log(`Audio track ${a} loaded [${r.startSN},${r.endSN}]${r.lastPartSn?`[part-${r.lastPartSn}-${r.lastPartIndex}]`:""},duration:${r.totalduration}`);const o=s[a];let n=0;if(r.live||null!=(i=o.details)&&i.live){this.checkLiveUpdate(r);const e=this.mainDetails;if(r.deltaUpdateFailed||!e)return;var l;if(!o.details&&r.hasProgramDateTime&&e.hasProgramDateTime)$f(r,e),n=r.fragments[0].start;else n=this.alignPlaylists(r,o.details,null==(l=this.levelLastLoaded)?void 0:l.details)}o.details=r,this.levelLastLoaded=o,this.startFragRequested||!this.mainDetails&&r.live||this.setStartPosition(this.mainDetails||r,n),this.state!==am||this.waitForCdnTuneIn(r)||(this.state=tm),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:i,part:s,payload:r}=e,{config:a,trackId:o,levels:n}=this;if(!n)return void this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${i.sn} of level ${i.level} will not be buffered`);const l=n[o];if(!l)return void this.warn("Audio track is undefined on fragment load progress");const d=l.details;if(!d)return this.warn("Audio track details undefined on fragment load progress"),void this.removeUnbufferedFrags(i.start);const h=a.defaultAudioCodec||l.audioCodec||"mp4a.40.2";let c=this.transmuxer;c||(c=this.transmuxer=new Ag(this.hls,yp,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const u=this.initPTS[i.cc],p=null==(t=i.initSegment)?void 0:t.data;if(void 0!==u){const e=!1,t=s?s.index:-1,a=-1!==t,o=new Of(i.level,i.sn,i.stats.chunkCount,r.byteLength,t,a);c.push(r,p,h,"",i,s,d.totalduration,e,o,u)}else{this.log(`Unknown video PTS for cc ${i.cc}, waiting for video PTS before demuxing audio frag ${i.sn} of [${d.startSN} ,${d.endSN}],track ${o}`);const{cache:e}=this.waitingData=this.waitingData||{frag:i,part:s,cache:new pm,complete:!1};e.push(new Uint8Array(r)),this.waitingVideoCC=this.videoTrackCC,this.state=hm}}_handleFragmentLoadComplete(e){this.waitingData?this.waitingData.complete=!0:super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1}onBufferCreated(e,t){const i=t.tracks.audio;i&&(this.mediaBuffer=i.buffer||null),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer||null)}onFragBuffered(e,t){const{frag:i,part:s}=t;if(i.type===yp)if(this.fragContextChanged(i))this.warn(`Fragment ${i.sn}${s?" p: "+s.index:""} of level ${i.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);else{if("initSegment"!==i.sn){this.fragPrevious=i;const e=this.switchingTrack;e&&(this.bufferedTrack=e,this.switchingTrack=null,this.hls.trigger(dc.AUDIO_TRACK_SWITCHED,ic({},e)))}this.fragBufferedComplete(i,s)}else if(!this.loadedmetadata&&i.type===gp){const e=this.videoBuffer||this.media;if(e){Ff.getBuffered(e).length&&(this.loadedmetadata=!0)}}}onError(e,t){var i;if(t.fatal)this.state=dm;else switch(t.details){case cc.FRAG_GAP:case cc.FRAG_PARSING_ERROR:case cc.FRAG_DECRYPT_ERROR:case cc.FRAG_LOAD_ERROR:case cc.FRAG_LOAD_TIMEOUT:case cc.KEY_LOAD_ERROR:case cc.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(yp,t);break;case cc.AUDIO_TRACK_LOAD_ERROR:case cc.AUDIO_TRACK_LOAD_TIMEOUT:case cc.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==am||(null==(i=t.context)?void 0:i.type)!==fp||(this.state=tm);break;case cc.BUFFER_APPEND_ERROR:case cc.BUFFER_FULL_ERROR:if(!t.parent||"audio"!==t.parent)return;if(t.details===cc.BUFFER_APPEND_ERROR)return void this.resetLoadingState();this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case cc.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}}onBufferFlushing(e,{type:t}){t!==Tc&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==Tc){this.flushing=!1,this.bufferFlushed=!0,this.state===lm&&(this.state=tm);const e=this.mediaBuffer||this.media;e&&(this.afterBufferFlushed(e,t,yp),this.tick())}}_handleTransmuxComplete(e){var t;const i="audio",{hls:s}=this,{remuxResult:r,chunkMeta:a}=e,o=this.getCurrentContext(a);if(!o)return void this.resetWhenMissingContext(a);const{frag:n,part:l,level:d}=o,{details:h}=d,{audio:c,text:u,id3:p,initSegment:f}=r;if(!this.fragContextChanged(n)&&h){if(this.state=om,this.switchingTrack&&c&&this.completeAudioSwitch(this.switchingTrack),null!=f&&f.tracks){const e=n.initSegment||n;this._bufferInitSegment(d,f.tracks,e,a),s.trigger(dc.FRAG_PARSING_INIT_SEGMENT,{frag:e,id:i,tracks:f.tracks})}if(c){const{startPTS:e,endPTS:t,startDTS:i,endDTS:s}=c;l&&(l.elementaryStreams[Sc]={startPTS:e,endPTS:t,startDTS:i,endDTS:s}),n.setElementaryStreamInfo(Sc,e,t,i,s),this.bufferFragmentData(c,n,l,a)}if(null!=p&&null!=(t=p.samples)&&t.length){const e=ac({id:i,frag:n,details:h},p);s.trigger(dc.FRAG_PARSING_METADATA,e)}if(u){const e=ac({id:i,frag:n,details:h},u);s.trigger(dc.FRAG_PARSING_USERDATA,e)}}else this.fragmentTracker.removeFragment(n)}_bufferInitSegment(e,t,i,s){if(this.state!==om)return;t.video&&delete t.video;const r=t.audio;if(!r)return;r.id="audio";const a=e.audioCodec;this.log(`Init audio buffer, container:${r.container}, codecs[level/parsed]=[${a}/${r.codec}]`),a&&1===a.split(",").length&&(r.levelCodec=a),this.hls.trigger(dc.BUFFER_CODECS,t);const o=r.initSegment;if(null!=o&&o.byteLength){const e={type:"audio",frag:i,part:null,chunkMeta:s,parent:i.type,data:o};this.hls.trigger(dc.BUFFER_APPENDING,e)}this.tickImmediate()}loadFragment(e,t,i){const s=this.fragmentTracker.getState(e);var r;if(this.fragCurrent=e,this.switchingTrack||s===Rf||s===Lf)if("initSegment"===e.sn)this._loadInitSegment(e,t);else if(null!=(r=t.details)&&r.live&&!this.initPTS[e.cc]){this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`),this.state=hm;const i=this.mainDetails;i&&i.fragments[0].start!==t.details.fragments[0].start&&$f(t.details,i)}else this.startFragRequested=!0,super.loadFragment(e,t,i);else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){const{media:t,bufferedTrack:i}=this,s=null==i?void 0:i.attrs,r=e.attrs;t&&s&&(s.CHANNELS!==r.CHANNELS||i.name!==e.name||i.lang!==e.lang)&&(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null)}completeAudioSwitch(e){const{hls:t}=this;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(dc.AUDIO_TRACK_SWITCHED,ic({},e))}},audioTrackController:class extends mf{constructor(e){super(e,"[audio-track-controller]"),this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.MANIFEST_PARSED,this.onManifestParsed,this),e.on(dc.LEVEL_LOADING,this.onLevelLoading,this),e.on(dc.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(dc.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(dc.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.MANIFEST_PARSED,this.onManifestParsed,this),e.off(dc.LEVEL_LOADING,this.onLevelLoading,this),e.off(dc.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(dc.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(dc.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:i,groupId:s,details:r}=t,a=this.tracksInGroup[i];if(!a||a.groupId!==s)return void this.warn(`Audio track with id:${i} and group:${s} not found in active group ${null==a?void 0:a.groupId}`);const o=a.details;a.details=t.details,this.log(`Audio track ${i} "${a.name}" lang:${a.lang} group:${s} loaded [${r.startSN}-${r.endSN}]`),i===this.trackId&&this.playlistLoaded(i,t,o)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const i=t.audioGroups||null,s=this.groupIds;let r=this.currentTrack;if(!i||(null==s?void 0:s.length)!==(null==i?void 0:i.length)||null!=i&&i.some((e=>-1===(null==s?void 0:s.indexOf(e))))){this.groupIds=i,this.trackId=-1,this.currentTrack=null;const e=this.tracks.filter((e=>!i||-1!==i.indexOf(e.groupId)));if(e.length)this.selectDefaultTrack&&!e.some((e=>e.default))&&(this.selectDefaultTrack=!1),e.forEach(((e,t)=>{e.id=t}));else if(!r&&!this.tracksInGroup.length)return;this.tracksInGroup=e;const t=this.hls.config.audioPreference;if(!r&&t){const i=Tf(t,e,kf);if(i>-1)r=e[i];else{const e=Tf(t,this.tracks);r=this.tracks[e]}}let s=this.findTrackId(r);-1===s&&r&&(s=this.findTrackId(null));const o={audioTracks:e};this.log(`Updating audio tracks, ${e.length} track(s) found in group(s): ${null==i?void 0:i.join(",")}`),this.hls.trigger(dc.AUDIO_TRACKS_UPDATED,o);const n=this.trackId;if(-1!==s&&-1===n)this.setAudioTrack(s);else if(e.length&&-1===n){var a;const t=new Error(`No audio track selected for current audio group-ID(s): ${null==(a=this.groupIds)?void 0:a.join(",")} track count: ${e.length}`);this.warn(t.message),this.hls.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:t})}}else this.shouldReloadPlaylist(r)&&this.setAudioTrack(this.trackId)}onError(e,t){!t.fatal&&t.context&&(t.context.type!==fp||t.context.id!==this.trackId||this.groupIds&&-1===this.groupIds.indexOf(t.context.groupId)||(this.requestScheduled=-1,this.checkRetry(t)))}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const t=this.hls;if(t.config.audioPreference=e,e){const i=this.allAudioTracks;if(this.selectDefaultTrack=!1,i.length){const s=this.currentTrack;if(s&&Ef(e,s,kf))return s;const r=Tf(e,this.tracksInGroup,kf);if(r>-1){const e=this.tracksInGroup[r];return this.setAudioTrack(r),e}if(s){let s=t.loadLevel;-1===s&&(s=t.firstAutoLevel);const r=function(e,t,i,s,r){const a=t[s],o=t.reduce(((e,t,i)=>{const s=t.uri;return(e[s]||(e[s]=[])).push(i),e}),{})[a.uri];o.length>1&&(s=Math.max.apply(Math,o));const n=a.videoRange,l=a.frameRate,d=a.codecSet.substring(0,4),h=Cf(t,s,(t=>{if(t.videoRange!==n||t.frameRate!==l||t.codecSet.substring(0,4)!==d)return!1;const s=t.audioGroups,a=i.filter((e=>!s||-1!==s.indexOf(e.groupId)));return Tf(e,a,r)>-1}));return h>-1?h:Cf(t,s,(t=>{const s=t.audioGroups,a=i.filter((e=>!s||-1!==s.indexOf(e.groupId)));return Tf(e,a,r)>-1}))}(e,t.levels,i,s,kf);if(-1===r)return null;t.nextLoadLevel=r}if(e.channels||e.audioCodec){const t=Tf(e,i);if(t>-1)return i[t]}}}return null}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length)return void this.warn(`Invalid audio track id: ${e}`);this.clearTimer(),this.selectDefaultTrack=!1;const i=this.currentTrack,s=t[e],r=s.details&&!s.details.live;if(e===this.trackId&&s===i&&r)return;if(this.log(`Switching to audio-track ${e} "${s.name}" lang:${s.lang} group:${s.groupId} channels:${s.channels}`),this.trackId=e,this.currentTrack=s,this.hls.trigger(dc.AUDIO_TRACK_SWITCHING,ic({},s)),r)return;const a=this.switchParams(s.url,null==i?void 0:i.details);this.loadPlaylist(a)}findTrackId(e){const t=this.tracksInGroup;for(let i=0;i<t.length;i++){const s=t[i];if((!this.selectDefaultTrack||s.default)&&(!e||Ef(e,s,kf)))return i}if(e){const{name:i,lang:s,assocLang:r,characteristics:a,audioCodec:o,channels:n}=e;for(let e=0;e<t.length;e++){if(Ef({name:i,lang:s,assocLang:r,characteristics:a,audioCodec:o,channels:n},t[e],kf))return e}for(let i=0;i<t.length;i++){const s=t[i];if(_g(e.attrs,s.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return i}for(let i=0;i<t.length;i++){const s=t[i];if(_g(e.attrs,s.attrs,["LANGUAGE"]))return i}}return-1}loadPlaylist(e){const t=this.currentTrack;if(this.shouldLoadPlaylist(t)&&t){super.loadPlaylist();const i=t.id,s=t.groupId;let r=t.url;if(e)try{r=e.addDirectives(r)}catch(e){this.warn(`Could not construct new URL with HLS Delivery Directives: ${e}`)}this.log(`loading audio-track playlist ${i} "${t.name}" lang:${t.lang} group:${s}`),this.clearTimer(),this.hls.trigger(dc.AUDIO_TRACK_LOADING,{url:r,id:i,groupId:s,deliveryDirectives:e||null})}}},emeController:wy,cmcdController:class{constructor(e){this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=()=>{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=e=>{try{this.apply(e,{ot:Ty.MANIFEST,su:!this.initialized})}catch(e){gc.warn("Could not generate manifest CMCD data.",e)}},this.applyFragmentData=e=>{try{const t=e.frag,i=this.hls.levels[t.level],s=this.getObjectType(t),r={d:1e3*t.duration,ot:s};s!==Ty.VIDEO&&s!==Ty.AUDIO&&s!=Ty.MUXED||(r.br=i.bitrate/1e3,r.tb=this.getTopBandwidth(s)/1e3,r.bl=this.getBufferLength(s)),this.apply(e,r)}catch(e){gc.warn("Could not generate segment CMCD data.",e)}},this.hls=e;const t=this.config=e.config,{cmcd:i}=t;null!=i&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=i.sessionId||function(){try{return crypto.randomUUID()}catch(e){try{const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch(e){let t=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const i=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?i:3&i|8).toString(16)}))}}}(),this.cid=i.contentId,this.useHeaders=!0===i.useHeaders,this.includeKeys=i.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(dc.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(dc.MEDIA_DETACHED,this.onMediaDetached,this),e.on(dc.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(dc.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(dc.MEDIA_DETACHED,this.onMediaDetached,this),e.off(dc.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var i,s;this.audioBuffer=null==(i=t.tracks.audio)?void 0:i.buffer,this.videoBuffer=null==(s=t.tracks.video)?void 0:s.buffer}createData(){var e;return{v:1,sf:Ey.HLS,sid:this.sid,cid:this.cid,pr:null==(e=this.media)?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){ac(t,this.createData());const i=t.ot===Ty.INIT||t.ot===Ty.VIDEO||t.ot===Ty.MUXED;this.starved&&i&&(t.bs=!0,t.su=!0,this.starved=!1),null==t.su&&(t.su=this.buffering);const{includeKeys:s}=this;s&&(t=Object.keys(t).reduce(((e,i)=>(s.includes(i)&&(e[i]=t[i]),e)),{})),this.useHeaders?(e.headers||(e.headers={}),Ky(e.headers,t)):e.url=Qy(e.url,t)}getObjectType(e){const{type:t}=e;return"subtitle"===t?Ty.TIMED_TEXT:"initSegment"===e.sn?Ty.INIT:"audio"===t?Ty.AUDIO:"main"===t?this.hls.audioTracks.length?Ty.VIDEO:Ty.MUXED:void 0}getTopBandwidth(e){let t,i=0;const s=this.hls;if(e===Ty.AUDIO)t=s.audioTracks;else{const e=s.maxAutoLevel,i=e>-1?e+1:s.levels.length;t=s.levels.slice(0,i)}for(const e of t)e.bitrate>i&&(i=e.bitrate);return i>0?i:NaN}getBufferLength(e){const t=this.hls.media,i=e===Ty.AUDIO?this.audioBuffer:this.videoBuffer;if(!i||!t)return NaN;return 1e3*Ff.bufferInfo(i,t.currentTime,this.config.maxBufferHole).len}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,i=e||this.config.loader;return class{constructor(e){this.loader=void 0,this.loader=new i(e)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(e,i,s){t(e),this.loader.load(e,i,s)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,i=e||this.config.loader;return class{constructor(e){this.loader=void 0,this.loader=new i(e)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(e,i,s){t(e),this.loader.load(e,i,s)}}}},contentSteeringController:class{constructor(e){this.hls=void 0,this.log=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this.pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.log=gc.log.bind(gc,"[content-steering]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(dc.MANIFEST_PARSED,this.onManifestParsed,this),e.on(dc.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(dc.MANIFEST_PARSED,this.onManifestParsed,this),e.off(dc.ERROR,this.onError,this))}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=1e3*this.timeToLoad-(performance.now()-this.updated);if(e>0)return void this.scheduleRefresh(this.uri,e)}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){-1!==this.reloadTimer&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter((t=>t!==e)))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:i}=t;null!==i&&(this.pathwayId=i.pathwayId,this.uri=i.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:i}=t;if((null==i?void 0:i.action)===df&&i.flags===pf){const e=this.levels;let s=this.pathwayPriority,r=this.pathwayId;if(t.context){const{groupId:i,pathwayId:s,type:a}=t.context;i&&e?r=this.getPathwayForGroupId(i,a,r):s&&(r=s)}r in this.penalizedPathways||(this.penalizedPathways[r]=performance.now()),!s&&e&&(s=e.reduce(((e,t)=>(-1===e.indexOf(t.pathwayId)&&e.push(t.pathwayId),e)),[])),s&&s.length>1&&(this.updatePathwayPriority(s),i.resolved=this.pathwayId!==r),i.resolved||gc.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${r} levels: ${e?e.length:e} priorities: ${JSON.stringify(s)} penalized: ${JSON.stringify(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(0===t.length){const i=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${i}"`),t=this.getLevelsForPathway(i),this.pathwayId=i}return t.length!==e.length?(this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t):e}getLevelsForPathway(e){return null===this.levels?[]:this.levels.filter((t=>e===t.pathwayId))}updatePathwayPriority(e){let t;this.pathwayPriority=e;const i=this.penalizedPathways,s=performance.now();Object.keys(i).forEach((e=>{s-i[e]>3e5&&delete i[e]}));for(let s=0;s<e.length;s++){const r=e[s];if(r in i)continue;if(r===this.pathwayId)return;const a=this.hls.nextLoadLevel,o=this.hls.levels[a];if(t=this.getLevelsForPathway(r),t.length>0){this.log(`Setting Pathway to "${r}"`),this.pathwayId=r,Qp(t),this.hls.trigger(dc.LEVELS_UPDATED,{levels:t});const e=this.hls.levels[a];o&&e&&this.levels&&(e.attrs["STABLE-VARIANT-ID"]!==o.attrs["STABLE-VARIANT-ID"]&&e.bitrate!==o.bitrate&&this.log(`Unstable Pathways change from bitrate ${o.bitrate} to ${e.bitrate}`),this.hls.nextLoadLevel=a);break}}}getPathwayForGroupId(e,t,i){const s=this.getLevelsForPathway(i).concat(this.levels||[]);for(let i=0;i<s.length;i++)if(t===fp&&s[i].hasAudioGroup(e)||t===mp&&s[i].hasSubtitleGroup(e))return s[i].pathwayId;return i}clonePathways(e){const t=this.levels;if(!t)return;const i={},s={};e.forEach((e=>{const{ID:r,"BASE-ID":a,"URI-REPLACEMENT":o}=e;if(t.some((e=>e.pathwayId===r)))return;const n=this.getLevelsForPathway(a).map((e=>{const t=new bc(e.attrs);t["PATHWAY-ID"]=r;const a=t.AUDIO&&`${t.AUDIO}_clone_${r}`,n=t.SUBTITLES&&`${t.SUBTITLES}_clone_${r}`;a&&(i[t.AUDIO]=a,t.AUDIO=a),n&&(s[t.SUBTITLES]=n,t.SUBTITLES=n);const l=Zy(e.uri,t["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",o),d=new zp({attrs:t,audioCodec:e.audioCodec,bitrate:e.bitrate,height:e.height,name:e.name,url:l,videoCodec:e.videoCodec,width:e.width});if(e.audioGroups)for(let t=1;t<e.audioGroups.length;t++)d.addGroupId("audio",`${e.audioGroups[t]}_clone_${r}`);if(e.subtitleGroups)for(let t=1;t<e.subtitleGroups.length;t++)d.addGroupId("text",`${e.subtitleGroups[t]}_clone_${r}`);return d}));t.push(...n),Xy(this.audioTracks,i,o,r),Xy(this.subtitleTracks,s,o,r)}))}loadSteeringManifest(e){const t=this.hls.config,i=t.loader;let s;this.loader&&this.loader.destroy(),this.loader=new i(t);try{s=new self.URL(e)}catch(t){return this.enabled=!1,void this.log(`Failed to parse Steering Manifest URI: ${e}`)}if("data:"!==s.protocol){const e=0|(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate);s.searchParams.set("_HLS_pathway",this.pathwayId),s.searchParams.set("_HLS_throughput",""+e)}const r={responseType:"json",url:s.href},a=t.steeringManifestLoadPolicy.default,o=a.errorRetry||a.timeoutRetry||{},n={loadPolicy:a,timeout:a.maxLoadTimeMs,maxRetry:o.maxNumRetry||0,retryDelay:o.retryDelayMs||0,maxRetryDelay:o.maxRetryDelayMs||0},l={onSuccess:(e,t,i,r)=>{this.log(`Loaded steering manifest: "${s}"`);const a=e.data;if(1!==a.VERSION)return void this.log(`Steering VERSION ${a.VERSION} not supported!`);this.updated=performance.now(),this.timeToLoad=a.TTL;const{"RELOAD-URI":o,"PATHWAY-CLONES":n,"PATHWAY-PRIORITY":l}=a;if(o)try{this.uri=new self.URL(o,s).href}catch(e){return this.enabled=!1,void this.log(`Failed to parse Steering Manifest RELOAD-URI: ${o}`)}this.scheduleRefresh(this.uri||i.url),n&&this.clonePathways(n);const d={steeringManifest:a,url:s.toString()};this.hls.trigger(dc.STEERING_MANIFEST_LOADED,d),l&&this.updatePathwayPriority(l)},onError:(e,t,i,s)=>{if(this.log(`Error loading steering manifest: ${e.code} ${e.text} (${t.url})`),this.stopLoad(),410===e.code)return this.enabled=!1,void this.log(`Steering manifest ${t.url} no longer available`);let r=1e3*this.timeToLoad;if(429!==e.code)this.scheduleRefresh(this.uri||t.url,r);else{const e=this.loader;if("function"==typeof(null==e?void 0:e.getResponseHeader)){const t=e.getResponseHeader("Retry-After");t&&(r=1e3*parseFloat(t))}this.log(`Steering manifest ${t.url} rate limited`)}},onTimeout:(e,t,i)=>{this.log(`Timeout loading steering manifest (${t.url})`),this.scheduleRefresh(this.uri||t.url)}};this.log(`Requesting steering manifest: ${s}`),this.loader.load(r,n,l)}scheduleRefresh(e,t=1e3*this.timeToLoad){this.clearTimeout(),this.reloadTimer=self.setTimeout((()=>{var t;const i=null==(t=this.hls)?void 0:t.media;!i||i.ended?this.scheduleRefresh(e,1e3*this.timeToLoad):this.loadSteeringManifest(e)}),t)}}});function dA(e){return e&&"object"==typeof e?Array.isArray(e)?e.map(dA):Object.keys(e).reduce(((t,i)=>(t[i]=dA(e[i]),t)),{}):e}function hA(e){const t=e.loader;if(t!==sA&&t!==tA)gc.log("[config]: Custom loader detected, cannot enable progressive streaming"),e.progressive=!1;else{(function(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(e){}return!1})()&&(e.loader=sA,e.progressive=!0,e.enableSoftwareAES=!0,gc.log("[config]: Progressive streaming enabled, using FetchLoader"))}}let cA;class uA extends mf{constructor(e,t){super(e,"[level-controller]"),this._levels=[],this._firstLevel=-1,this._maxAutoLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=t,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(dc.LEVEL_LOADED,this.onLevelLoaded,this),e.on(dc.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(dc.FRAG_BUFFERED,this.onFragBuffered,this),e.on(dc.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(dc.LEVEL_LOADED,this.onLevelLoaded,this),e.off(dc.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(dc.FRAG_BUFFERED,this.onFragBuffered,this),e.off(dc.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach((e=>{e.loadError=0,e.fragmentError=0})),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const i=this.hls.config.preferManagedMediaSource,s=[],r={},a={};let o=!1,n=!1,l=!1;t.levels.forEach((e=>{var t,d;const h=e.attrs;let{audioCodec:c,videoCodec:u}=e;-1!==(null==(t=c)?void 0:t.indexOf("mp4a.40.34"))&&(cA||(cA=/chrome|firefox/i.test(navigator.userAgent)),cA&&(e.audioCodec=c=void 0)),c&&(e.audioCodec=c=Qu(c,i)),0===(null==(d=u)?void 0:d.indexOf("avc1"))&&(u=e.videoCodec=function(e){const t=e.split(".");if(t.length>2){let e=t.shift()+".";return e+=parseInt(t.shift()).toString(16),e+=("000"+parseInt(t.shift()).toString(16)).slice(-4),e}return e}(u));const{width:p,height:f,unknownCodecs:m}=e;if(o||(o=!(!p||!f)),n||(n=!!u),l||(l=!!c),null!=m&&m.length||c&&!Hu(c,"audio",i)||u&&!Hu(u,"video",i))return;const{CODECS:g,"FRAME-RATE":y,"HDCP-LEVEL":A,"PATHWAY-ID":b,RESOLUTION:_,"VIDEO-RANGE":v}=h,w=`${`${b||"."}-`}${e.bitrate}-${_}-${y}-${g}-${v}-${A}`;if(r[w])if(r[w].uri===e.url||e.attrs["PATHWAY-ID"])r[w].addGroupId("audio",h.AUDIO),r[w].addGroupId("text",h.SUBTITLES);else{const t=a[w]+=1;e.attrs["PATHWAY-ID"]=new Array(t+1).join(".");const i=new zp(e);r[w]=i,s.push(i)}else{const t=new zp(e);r[w]=t,a[w]=1,s.push(t)}})),this.filterAndSortMediaOptions(s,t,o,n,l)}filterAndSortMediaOptions(e,t,i,s,r){let a=[],o=[],n=e;if((i||s)&&r&&(n=n.filter((({videoCodec:e,videoRange:t,width:i,height:s})=>{return(!!e||!(!i||!s))&&(!!(r=t)&&Fp.indexOf(r)>-1);var r}))),0===n.length)return void Promise.resolve().then((()=>{if(this.hls){t.levels.length&&this.warn(`One or more CODECS in variant not supported: ${JSON.stringify(t.levels[0].attrs)}`);const e=new Error("no level with compatible codecs found in manifest");this.hls.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:e,reason:e.message})}}));if(t.audioTracks){const{preferManagedMediaSource:e}=this.hls.config;a=t.audioTracks.filter((t=>!t.audioCodec||Hu(t.audioCodec,"audio",e))),pA(a)}t.subtitles&&(o=t.subtitles,pA(o));const l=n.slice(0);n.sort(((e,t)=>{if(e.attrs["HDCP-LEVEL"]!==t.attrs["HDCP-LEVEL"])return(e.attrs["HDCP-LEVEL"]||"")>(t.attrs["HDCP-LEVEL"]||"")?1:-1;if(i&&e.height!==t.height)return e.height-t.height;if(e.frameRate!==t.frameRate)return e.frameRate-t.frameRate;if(e.videoRange!==t.videoRange)return Fp.indexOf(e.videoRange)-Fp.indexOf(t.videoRange);if(e.videoCodec!==t.videoCodec){const i=Ju(e.videoCodec),s=Ju(t.videoCodec);if(i!==s)return s-i}if(e.uri===t.uri&&e.codecSet!==t.codecSet){const i=qu(e.codecSet),s=qu(t.codecSet);if(i!==s)return s-i}return e.averageBitrate!==t.averageBitrate?e.averageBitrate-t.averageBitrate:0}));let d=l[0];if(this.steering&&(n=this.steering.filterParsedLevels(n),n.length!==l.length))for(let e=0;e<l.length;e++)if(l[e].pathwayId===n[0].pathwayId){d=l[e];break}this._levels=n;for(let e=0;e<n.length;e++)if(n[e]===d){var h;this._firstLevel=e;const t=d.bitrate,i=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${n.length} level(s) found, first bitrate: ${t}`),void 0===(null==(h=this.hls.userConfig)?void 0:h.abrEwmaDefaultEstimate)){const e=Math.min(t,this.hls.config.abrEwmaDefaultEstimateMax);e>i&&i===lA.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=e)}break}const c=r&&!s,u={levels:n,audioTracks:a,subtitleTracks:o,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:r,video:s,altAudio:!c&&a.some((e=>!!e.url))};this.hls.trigger(dc.MANIFEST_PARSED,u),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}get levels(){return 0===this._levels.length?null:this._levels}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(0===t.length)return;if(e<0||e>=t.length){const i=new Error("invalid level idx"),s=e<0;if(this.hls.trigger(dc.ERROR,{type:hc.OTHER_ERROR,details:cc.LEVEL_SWITCH_ERROR,level:e,fatal:s,error:i,reason:i.message}),s)return;e=Math.min(e,t.length-1)}const i=this.currentLevelIndex,s=this.currentLevel,r=s?s.attrs["PATHWAY-ID"]:void 0,a=t[e],o=a.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=a,i===e&&a.details&&s&&r===o)return;this.log(`Switching to level ${e} (${a.height?a.height+"p ":""}${a.videoRange?a.videoRange+" ":""}${a.codecSet?a.codecSet+" ":""}@${a.bitrate})${o?" with Pathway "+o:""} from level ${i}${r?" with Pathway "+r:""}`);const n={level:e,attrs:a.attrs,details:a.details,bitrate:a.bitrate,averageBitrate:a.averageBitrate,maxBitrate:a.maxBitrate,realBitrate:a.realBitrate,width:a.width,height:a.height,codecSet:a.codecSet,audioCodec:a.audioCodec,videoCodec:a.videoCodec,audioGroups:a.audioGroups,subtitleGroups:a.subtitleGroups,loaded:a.loaded,loadError:a.loadError,fragmentError:a.fragmentError,name:a.name,id:a.id,uri:a.uri,url:a.url,urlId:0,audioGroupIds:a.audioGroupIds,textGroupIds:a.textGroupIds};this.hls.trigger(dc.LEVEL_SWITCHING,n);const l=a.details;if(!l||l.live){const e=this.switchParams(a.uri,null==s?void 0:s.details);this.loadPlaylist(e)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(void 0===this._startLevel){const e=this.hls.config.startLevel;return void 0!==e?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}onError(e,t){!t.fatal&&t.context&&t.context.type===pp&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(void 0!==t&&t.type===gp){const e=t.elementaryStreams;if(!Object.keys(e).some((t=>!!e[t])))return;const i=this._levels[t.level];null!=i&&i.loadError&&(this.log(`Resetting level error count of ${i.loadError} on frag buffered`),i.loadError=0)}}onLevelLoaded(e,t){var i;const{level:s,details:r}=t,a=this._levels[s];var o;if(!a)return this.warn(`Invalid level index ${s}`),void(null!=(o=t.deliveryDirectives)&&o.skip&&(r.deltaUpdateFailed=!0));s===this.currentLevelIndex?(0===a.fragmentError&&(a.loadError=0),this.playlistLoaded(s,t,a.details)):null!=(i=t.deliveryDirectives)&&i.skip&&(r.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist();const t=this.currentLevelIndex,i=this.currentLevel;if(i&&this.shouldLoadPlaylist(i)){let s=i.uri;if(e)try{s=e.addDirectives(s)}catch(e){this.warn(`Could not construct new URL with HLS Delivery Directives: ${e}`)}const r=i.attrs["PATHWAY-ID"];this.log(`Loading level index ${t}${void 0!==(null==e?void 0:e.msn)?" at sn "+e.msn+" part "+e.part:""} with${r?" Pathway "+r:""} ${s}`),this.clearTimer(),this.hls.trigger(dc.LEVEL_LOADING,{url:s,level:t,pathwayId:i.attrs["PATHWAY-ID"],id:0,deliveryDirectives:e||null})}}get nextLoadLevel(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;const i=this._levels.filter(((t,i)=>i!==e||(this.steering&&this.steering.removeLevel(t),t===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,t.details&&t.details.fragments.forEach((e=>e.level=-1))),!1)));Qp(i),this._levels=i,this.currentLevelIndex>-1&&null!=(t=this.currentLevel)&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.hls.trigger(dc.LEVELS_UPDATED,{levels:i})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:i}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(dc.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:i}))}}function pA(e){const t={};e.forEach((e=>{const i=e.groupId||"";e.id=t[i]=t[i]||0,t[i]++}))}class fA{constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const i in this.keyUriToKeyInfo){const s=this.keyUriToKeyInfo[i].loader;if(s){var t;if(e&&e!==(null==(t=s.context)?void 0:t.frag.type))return;s.abort()}}}detach(){for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}}createKeyLoadError(e,t=cc.KEY_LOAD_ERROR,i,s,r){return new qf({type:hc.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:r,error:i,networkDetails:s})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled){const{sn:i,cc:s}=e;for(let e=0;e<t.length;e++){const r=t[e];if(s<=r.cc&&("initSegment"===i||"initSegment"===r.sn||i<r.sn)){this.emeController.selectKeySystemFormat(r).then((e=>{r.setKeyFormat(e)}));break}}}}load(e){return!e.decryptdata&&e.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(e).then((t=>this.loadInternal(e,t))):this.loadInternal(e)}loadInternal(e,t){var i,s;t&&e.setKeyFormat(t);const r=e.decryptdata;if(!r){const i=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,cc.KEY_LOAD_ERROR,i))}const a=r.uri;if(!a)return Promise.reject(this.createKeyLoadError(e,cc.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${a}"`)));let o=this.keyUriToKeyInfo[a];if(null!=(i=o)&&i.decryptdata.key)return r.key=o.decryptdata.key,Promise.resolve({frag:e,keyInfo:o});var n;if(null!=(s=o)&&s.keyLoadPromise)switch(null==(n=o.mediaKeySessionContext)?void 0:n.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return o.keyLoadPromise.then((t=>(r.key=t.keyInfo.decryptdata.key,{frag:e,keyInfo:o})))}switch(o=this.keyUriToKeyInfo[a]={decryptdata:r,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},r.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return"identity"===r.keyFormat?this.loadKeyHTTP(o,e):this.loadKeyEME(o,e);case"AES-128":return this.loadKeyHTTP(o,e);default:return Promise.reject(this.createKeyLoadError(e,cc.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${r.method}"`)))}}loadKeyEME(e,t){const i={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const t=this.emeController.loadKey(i);if(t)return(e.keyLoadPromise=t.then((t=>(e.mediaKeySessionContext=t,i)))).catch((t=>{throw e.keyLoadPromise=null,t}))}return Promise.resolve(i)}loadKeyHTTP(e,t){const i=this.config,s=new(0,i.loader)(i);return t.keyLoader=e.loader=s,e.keyLoadPromise=new Promise(((r,a)=>{const o={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},n=i.keyLoadPolicy.default,l={loadPolicy:n,timeout:n.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(e,t,i,s)=>{const{frag:o,keyInfo:n,url:l}=i;if(!o.decryptdata||n!==this.keyUriToKeyInfo[l])return a(this.createKeyLoadError(o,cc.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),s));n.decryptdata.key=o.decryptdata.key=new Uint8Array(e.data),o.keyLoader=null,n.loader=null,r({frag:o,keyInfo:n})},onError:(e,i,s,r)=>{this.resetLoader(i),a(this.createKeyLoadError(t,cc.KEY_LOAD_ERROR,new Error(`HTTP Error ${e.code} loading key ${e.text}`),s,ic({url:o.url,data:void 0},e)))},onTimeout:(e,i,s)=>{this.resetLoader(i),a(this.createKeyLoadError(t,cc.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),s))},onAbort:(e,i,s)=>{this.resetLoader(i),a(this.createKeyLoadError(t,cc.INTERNAL_ABORTED,new Error("key loading aborted"),s))}};s.load(o,l,d)}))}resetLoader(e){const{frag:t,keyInfo:i,url:s}=e,r=i.loader;t.keyLoader===r&&(t.keyLoader=null,i.loader=null),delete this.keyUriToKeyInfo[s],r&&r.destroy()}}function mA(){return self.SourceBuffer||self.WebKitSourceBuffer}function gA(){if(!zu())return!1;const e=mA();return!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove}class yA{constructor(e,t,i,s){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=i,this.hls=s}destroy(){this.media=null,this.hls=this.fragmentTracker=null}poll(e,t){const{config:i,media:s,stalled:r}=this;if(null===s)return;const{currentTime:a,seeking:o}=s,n=this.seeking&&!o,l=!this.seeking&&o;if(this.seeking=o,a!==e){if(this.moved=!0,o||(this.nudgeRetry=0),null!==r){if(this.stallReported){const e=self.performance.now()-r;gc.warn(`playback not stuck anymore @${a}, after ${Math.round(e)}ms`),this.stallReported=!1}this.stalled=null}return}if(l||n)return void(this.stalled=null);if(s.paused&&!o||s.ended||0===s.playbackRate||!Ff.getBuffered(s).length)return void(this.nudgeRetry=0);const d=Ff.bufferInfo(s,a,0),h=d.nextStart||0;if(o){const e=d.len>2,i=!h||t&&t.start<=a||h-a>2&&!this.fragmentTracker.getPartialFragment(a);if(e||i)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var c;if(!(d.len>0)&&!h)return;const e=Math.max(h,d.start||0)-a,t=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,i=(null==t||null==(c=t.details)?void 0:c.live)?2*t.details.targetduration:2,r=this.fragmentTracker.getPartialFragment(a);if(e>0&&(e<=i||r))return void(s.paused||this._trySkipBufferHole(r))}const u=self.performance.now();if(null===r)return void(this.stalled=u);const p=u-r;if(!o&&p>=250&&(this._reportStall(d),!this.media))return;const f=Ff.bufferInfo(s,a,i.maxBufferHole);this._tryFixBufferStall(f,p)}_tryFixBufferStall(e,t){const{config:i,fragmentTracker:s,media:r}=this;if(null===r)return;const a=r.currentTime,o=s.getPartialFragment(a);if(o){if(this._trySkipBufferHole(o)||!this.media)return}(e.len>i.maxBufferHole||e.nextStart&&e.nextStart-a<i.maxBufferHole)&&t>1e3*i.highBufferWatchdogPeriod&&(gc.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}_reportStall(e){const{hls:t,media:i,stallReported:s}=this;if(!s&&i){this.stallReported=!0;const s=new Error(`Playback stalling at @${i.currentTime} due to low buffer (${JSON.stringify(e)})`);gc.warn(s.message),t.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.BUFFER_STALLED_ERROR,fatal:!1,error:s,buffer:e.len})}}_trySkipBufferHole(e){const{config:t,hls:i,media:s}=this;if(null===s)return 0;const r=s.currentTime,a=Ff.bufferInfo(s,r,0),o=r<a.start?a.start:a.nextStart;if(o){const n=a.len<=t.maxBufferHole,l=a.len>0&&a.len<1&&s.readyState<3,d=o-r;if(d>0&&(n||l)){if(d>t.maxBufferHole){const{fragmentTracker:t}=this;let i=!1;if(0===r){const e=t.getAppendedFrag(0,gp);e&&o<e.end&&(i=!0)}if(!i){const i=e||t.getAppendedFrag(r,gp);if(i){let e=!1,s=i.end;for(;s<o;){const i=t.getPartialFragment(s);if(!i){e=!0;break}s+=i.duration}if(e)return 0}}}const a=Math.max(o+.05,r+.1);if(gc.warn(`skipping hole, adjusting currentTime from ${r} to ${a}`),this.moved=!0,this.stalled=null,s.currentTime=a,e&&!e.gap){const t=new Error(`fragment loaded with buffer holes, seeking from ${r} to ${a}`);i.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:t,reason:t.message,frag:e})}return a}}return 0}_tryNudgeBuffer(){const{config:e,hls:t,media:i,nudgeRetry:s}=this;if(null===i)return;const r=i.currentTime;if(this.nudgeRetry++,s<e.nudgeMaxRetry){const a=r+(s+1)*e.nudgeOffset,o=new Error(`Nudging 'currentTime' from ${r} to ${a}`);gc.warn(o.message),i.currentTime=a,t.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.BUFFER_NUDGE_ON_STALL,error:o,fatal:!1})}else{const i=new Error(`Playhead still not moving while enough data buffered @${r} after ${e.nudgeMaxRetry} nudges`);gc.error(i.message),t.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.BUFFER_STALLED_ERROR,error:i,fatal:!0})}}}class AA extends um{constructor(e,t,i){super(e,t,i,"[stream-controller]",gp),this.audioCodecSwap=!1,this.gapController=null,this.level=-1,this._forceStartLoad=!1,this.altAudio=!1,this.audioOnly=!1,this.fragPlaying=null,this.onvplaying=null,this.onvseeked=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(dc.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.MANIFEST_PARSED,this.onManifestParsed,this),e.on(dc.LEVEL_LOADING,this.onLevelLoading,this),e.on(dc.LEVEL_LOADED,this.onLevelLoaded,this),e.on(dc.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(dc.ERROR,this.onError,this),e.on(dc.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(dc.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(dc.BUFFER_CREATED,this.onBufferCreated,this),e.on(dc.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(dc.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(dc.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(dc.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.MANIFEST_PARSED,this.onManifestParsed,this),e.off(dc.LEVEL_LOADED,this.onLevelLoaded,this),e.off(dc.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(dc.ERROR,this.onError,this),e.off(dc.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(dc.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(dc.BUFFER_CREATED,this.onBufferCreated,this),e.off(dc.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(dc.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(dc.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying()}startLoad(e){if(this.levels){const{lastCurrentTime:t,hls:i}=this;if(this.stopLoad(),this.setInterval(100),this.level=-1,!this.startFragRequested){let e=i.startLevel;-1===e&&(i.config.testBandwidth&&this.levels.length>1?(e=0,this.bitrateTest=!0):e=i.firstAutoLevel),i.nextLoadLevel=e,this.level=i.loadLevel,this.loadedmetadata=!1}t>0&&-1===e&&(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t),this.state=tm,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=em}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case cm:{const{levels:e,level:t}=this,i=null==e?void 0:e[t],s=null==i?void 0:i.details;if(s&&(!s.live||this.levelLastLoaded===i)){if(this.waitForCdnTuneIn(s))break;this.state=tm;break}if(this.hls.nextLoadLevel!==this.level){this.state=tm;break}break}case rm:{var e;const t=self.performance.now(),i=this.retryDate;if(!i||t>=i||null!=(e=this.media)&&e.seeking){const{levels:e,level:t}=this,i=null==e?void 0:e[t];this.resetStartWhenNotLoaded(i||null),this.state=tm}}}this.state===tm&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){super.onTickEnd(),this.checkBuffer(),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:i,media:s}=this;if(null===t||!s&&(this.startFragRequested||!e.config.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;const r=e.nextLoadLevel;if(null==i||!i[r])return;const a=i[r],o=this.getMainFwdBufferInfo();if(null===o)return;const n=this.getLevelDetails();if(n&&this._streamEnded(o,n)){const e={};return this.altAudio&&(e.type="video"),this.hls.trigger(dc.BUFFER_EOS,e),void(this.state=lm)}e.loadLevel!==r&&-1===e.manualLevel&&this.log(`Adapting to level ${r} from level ${this.level}`),this.level=e.nextLoadLevel=r;const l=a.details;if(!l||this.state===cm||l.live&&this.levelLastLoaded!==a)return this.level=r,void(this.state=cm);const d=o.len,h=this.getMaxBufferLength(a.maxBitrate);if(d>=h)return;this.backtrackFragment&&this.backtrackFragment.start>o.end&&(this.backtrackFragment=null);const c=this.backtrackFragment?this.backtrackFragment.start:o.end;let u=this.getNextFragment(c,l);if(this.couldBacktrack&&!this.fragPrevious&&u&&"initSegment"!==u.sn&&this.fragmentTracker.getState(u)!==If){var p;const e=(null!=(p=this.backtrackFragment)?p:u).sn-l.startSN,t=l.fragments[e-1];t&&u.cc===t.cc&&(u=t,this.fragmentTracker.removeFragment(t))}else this.backtrackFragment&&o.len&&(this.backtrackFragment=null);if(u&&this.isLoopLoading(u,c)){if(!u.gap){const e=this.audioOnly&&!this.altAudio?Sc:Tc,t=(e===Tc?this.videoBuffer:this.mediaBuffer)||this.media;t&&this.afterBufferFlushed(t,e,gp)}u=this.getNextFragmentLoopLoading(u,l,o,gp,h)}u&&(!u.initSegment||u.initSegment.data||this.bitrateTest||(u=u.initSegment),this.loadFragment(u,a,c))}loadFragment(e,t,i){const s=this.fragmentTracker.getState(e);this.fragCurrent=e,s===Rf||s===Lf?"initSegment"===e.sn?this._loadInitSegment(e,t):this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):(this.startFragRequested=!0,super.loadFragment(e,t,i)):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,gp)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(null!=t&&t.readyState){let i;const s=this.getAppendedFrag(t.currentTime);s&&s.start>1&&this.flushMainBuffer(0,s.start-1);const r=this.getLevelDetails();if(null!=r&&r.live){const e=this.getMainFwdBufferInfo();if(!e||e.len<2*r.targetduration)return}if(!t.paused&&e){const t=e[this.hls.nextLoadLevel],s=this.fragLastKbps;i=s&&this.fragCurrent?this.fragCurrent.duration*t.maxBitrate/(1e3*s)+1:0}else i=0;const a=this.getBufferedFrag(t.currentTime+i);if(a){const e=this.followingBufferedFrag(a);if(e){this.abortCurrentFrag();const t=e.maxStartPTS?e.maxStartPTS:e.start,i=e.duration,s=Math.max(a.end,t+Math.min(Math.max(i-this.config.maxFragLookUpTolerance,i*(this.couldBacktrack?.5:.125)),i*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(s,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case im:case sm:case rm:case om:case nm:this.state=tm}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const i=t.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),i.addEventListener("playing",this.onvplaying),i.addEventListener("seeked",this.onvseeked),this.gapController=new yA(this.config,i,this.fragmentTracker,this.hls)}onMediaDetaching(){const{media:e}=this;e&&this.onvplaying&&this.onvseeked&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),super.onMediaDetaching()}onMediaPlaying(){this.tick()}onMediaSeeked(){const e=this.media,t=e?e.currentTime:null;oc(t)&&this.log(`Media seeked to ${t.toFixed(3)}`);const i=this.getMainFwdBufferInfo();null!==i&&0!==i.len?this.tick():this.warn(`Main forward buffer length on "seeked" event ${i?i.len:"empty"})`)}onManifestLoading(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(dc.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=this.fragLastKbps=0,this.levels=this.fragPlaying=this.backtrackFragment=this.levelLastLoaded=null,this.altAudio=this.audioOnly=this.startFragRequested=!1}onManifestParsed(e,t){let i=!1,s=!1;t.levels.forEach((e=>{const t=e.audioCodec;t&&(i=i||-1!==t.indexOf("mp4a.40.2"),s=s||-1!==t.indexOf("mp4a.40.5"))})),this.audioCodecSwitch=i&&s&&!function(){var e;const t=mA();return"function"==typeof(null==t||null==(e=t.prototype)?void 0:e.changeType)}(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1}onLevelLoading(e,t){const{levels:i}=this;if(!i||this.state!==tm)return;const s=i[t.level];(!s.details||s.details.live&&this.levelLastLoaded!==s||this.waitForCdnTuneIn(s.details))&&(this.state=cm)}onLevelLoaded(e,t){var i;const{levels:s}=this,r=t.level,a=t.details,o=a.totalduration;if(!s)return void this.warn(`Levels were reset while loading level ${r}`);this.log(`Level ${r} loaded [${a.startSN},${a.endSN}]${a.lastPartSn?`[part-${a.lastPartSn}-${a.lastPartIndex}]`:""}, cc [${a.startCC}, ${a.endCC}] duration:${o}`);const n=s[r],l=this.fragCurrent;!l||this.state!==sm&&this.state!==rm||l.level!==t.level&&l.loader&&this.abortCurrentFrag();let d=0;if(a.live||null!=(i=n.details)&&i.live){var h;if(this.checkLiveUpdate(a),a.deltaUpdateFailed)return;d=this.alignPlaylists(a,n.details,null==(h=this.levelLastLoaded)?void 0:h.details)}if(n.details=a,this.levelLastLoaded=n,this.hls.trigger(dc.LEVEL_UPDATED,{details:a,level:r}),this.state===cm){if(this.waitForCdnTuneIn(a))return;this.state=tm}this.startFragRequested?a.live&&this.synchronizeToLiveEdge(a):this.setStartPosition(a,d),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:i,part:s,payload:r}=e,{levels:a}=this;if(!a)return void this.warn(`Levels were reset while fragment load was in progress. Fragment ${i.sn} of level ${i.level} will not be buffered`);const o=a[i.level],n=o.details;if(!n)return this.warn(`Dropping fragment ${i.sn} of level ${i.level} after level details were reset`),void this.fragmentTracker.removeFragment(i);const l=o.videoCodec,d=n.PTSKnown||!n.live,h=null==(t=i.initSegment)?void 0:t.data,c=this._getAudioCodec(o),u=this.transmuxer=this.transmuxer||new Ag(this.hls,gp,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),p=s?s.index:-1,f=-1!==p,m=new Of(i.level,i.sn,i.stats.chunkCount,r.byteLength,p,f),g=this.initPTS[i.cc];u.push(r,h,c,l,i,s,n.totalduration,d,m,g)}onAudioTrackSwitching(e,t){const i=this.altAudio;if(!!!t.url){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const e=this.fragCurrent;e&&(this.log("Switching to main audio track, cancel main fragment load"),e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();const e=this.hls;i&&(e.trigger(dc.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),e.trigger(dc.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const i=t.id,s=!!this.hls.audioTracks[i].url;if(s){const e=this.videoBuffer;e&&this.mediaBuffer!==e&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=e)}this.altAudio=s,this.tick()}onBufferCreated(e,t){const i=t.tracks;let s,r,a=!1;for(const e in i){const t=i[e];if("main"===t.id){if(r=e,s=t,"video"===e){const t=i[e];t&&(this.videoBuffer=t.buffer)}}else a=!0}a&&s?(this.log(`Alternate track found, use ${r}.buffered to schedule main fragment loading`),this.mediaBuffer=s.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:i,part:s}=t;if(i&&i.type!==gp)return;if(this.fragContextChanged(i))return this.warn(`Fragment ${i.sn}${s?" p: "+s.index:""} of level ${i.level} finished buffering, but was aborted. state: ${this.state}`),void(this.state===nm&&(this.state=tm));const r=s?s.stats:i.stats;this.fragLastKbps=Math.round(8*r.total/(r.buffering.end-r.loading.first)),"initSegment"!==i.sn&&(this.fragPrevious=i),this.fragBufferedComplete(i,s)}onError(e,t){var i;if(t.fatal)this.state=dm;else switch(t.details){case cc.FRAG_GAP:case cc.FRAG_PARSING_ERROR:case cc.FRAG_DECRYPT_ERROR:case cc.FRAG_LOAD_ERROR:case cc.FRAG_LOAD_TIMEOUT:case cc.KEY_LOAD_ERROR:case cc.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(gp,t);break;case cc.LEVEL_LOAD_ERROR:case cc.LEVEL_LOAD_TIMEOUT:case cc.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==cm||(null==(i=t.context)?void 0:i.type)!==pp||(this.state=tm);break;case cc.BUFFER_APPEND_ERROR:case cc.BUFFER_FULL_ERROR:if(!t.parent||"main"!==t.parent)return;if(t.details===cc.BUFFER_APPEND_ERROR)return void this.resetLoadingState();this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case cc.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}}checkBuffer(){const{media:e,gapController:t}=this;if(e&&t&&e.readyState){if(this.loadedmetadata||!Ff.getBuffered(e).length){const e=this.state!==tm?this.fragCurrent:null;t.poll(this.lastCurrentTime,e)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=tm,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==Sc||this.audioOnly&&!this.altAudio){const e=(t===Tc?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(e,t,gp),this.tick()}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let i=this.startPosition;if(i>=0&&t<i){if(e.seeking)return void this.log(`could not seek to ${i}, already seeking at ${t}`);const s=Ff.getBuffered(e),r=(s.length?s.start(0):0)-i;r>0&&(r<this.config.maxBufferHole||r<this.config.maxFragLookUpTolerance)&&(this.log(`adjusting start position by ${r} to match buffer start`),i+=r,this.startPosition=i),this.log(`seek to target start position ${i} from current time ${t}`),e.currentTime=i}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then((i=>{const{hls:s}=this;if(!i||this.fragContextChanged(e))return;t.fragmentError=0,this.state=tm,this.startFragRequested=!1,this.bitrateTest=!1;const r=e.stats;r.parsing.start=r.parsing.end=r.buffering.start=r.buffering.end=self.performance.now(),s.trigger(dc.FRAG_LOADED,i),e.bitrateTest=!1}))}_handleTransmuxComplete(e){var t;const i="main",{hls:s}=this,{remuxResult:r,chunkMeta:a}=e,o=this.getCurrentContext(a);if(!o)return void this.resetWhenMissingContext(a);const{frag:n,part:l,level:d}=o,{video:h,text:c,id3:u,initSegment:p}=r,{details:f}=d,m=this.altAudio?void 0:r.audio;if(this.fragContextChanged(n))this.fragmentTracker.removeFragment(n);else{if(this.state=om,p){if(null!=p&&p.tracks){const e=n.initSegment||n;this._bufferInitSegment(d,p.tracks,e,a),s.trigger(dc.FRAG_PARSING_INIT_SEGMENT,{frag:e,id:i,tracks:p.tracks})}const e=p.initPTS,t=p.timescale;oc(e)&&(this.initPTS[n.cc]={baseTime:e,timescale:t},s.trigger(dc.INIT_PTS_FOUND,{frag:n,id:i,initPTS:e,timescale:t}))}if(h&&f&&"initSegment"!==n.sn){const e=f.fragments[n.sn-1-f.startSN],t=n.sn===f.startSN,i=!e||n.cc>e.cc;if(!1!==r.independent){const{startPTS:e,endPTS:s,startDTS:r,endDTS:o}=h;if(l)l.elementaryStreams[h.type]={startPTS:e,endPTS:s,startDTS:r,endDTS:o};else if(h.firstKeyFrame&&h.independent&&1===a.id&&!i&&(this.couldBacktrack=!0),h.dropped&&h.independent){const r=this.getMainFwdBufferInfo(),a=(r?r.end:this.getLoadPosition())+this.config.maxBufferHole,l=h.firstKeyFramePTS?h.firstKeyFramePTS:e;if(!t&&a<l-this.config.maxBufferHole&&!i)return void this.backtrack(n);i&&(n.gap=!0),n.setElementaryStreamInfo(h.type,n.start,s,n.start,o,!0)}else t&&e>2&&(n.gap=!0);n.setElementaryStreamInfo(h.type,e,s,r,o),this.backtrackFragment&&(this.backtrackFragment=n),this.bufferFragmentData(h,n,l,a,t||i)}else{if(!t&&!i)return void this.backtrack(n);n.gap=!0}}if(m){const{startPTS:e,endPTS:t,startDTS:i,endDTS:s}=m;l&&(l.elementaryStreams[Sc]={startPTS:e,endPTS:t,startDTS:i,endDTS:s}),n.setElementaryStreamInfo(Sc,e,t,i,s),this.bufferFragmentData(m,n,l,a)}if(f&&null!=u&&null!=(t=u.samples)&&t.length){const e={id:i,frag:n,details:f,samples:u.samples};s.trigger(dc.FRAG_PARSING_METADATA,e)}if(f&&c){const e={id:i,frag:n,details:f,samples:c.samples};s.trigger(dc.FRAG_PARSING_USERDATA,e)}}}_bufferInitSegment(e,t,i,s){if(this.state!==om)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;const{audio:r,video:a,audiovideo:o}=t;if(r){let t=e.audioCodec;const i=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(t&&(t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),1!==r.metadata.channelCount&&-1===i.indexOf("firefox")&&(t="mp4a.40.5")),t&&-1!==t.indexOf("mp4a.40.5")&&-1!==i.indexOf("android")&&"audio/mpeg"!==r.container&&(t="mp4a.40.2",this.log(`Android: force audio codec to ${t}`)),e.audioCodec&&e.audioCodec!==t&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${t}"`),r.levelCodec=t,r.id="main",this.log(`Init audio buffer, container:${r.container}, codecs[selected/level/parsed]=[${t||""}/${e.audioCodec||""}/${r.codec}]`)}a&&(a.levelCodec=e.videoCodec,a.id="main",this.log(`Init video buffer, container:${a.container}, codecs[level/parsed]=[${e.videoCodec||""}/${a.codec}]`)),o&&this.log(`Init audiovideo buffer, container:${o.container}, codecs[level/parsed]=[${e.codecs}/${o.codec}]`),this.hls.trigger(dc.BUFFER_CODECS,t),Object.keys(t).forEach((e=>{const r=t[e].initSegment;null!=r&&r.byteLength&&this.hls.trigger(dc.BUFFER_APPENDING,{type:e,data:r,frag:i,part:null,chunkMeta:s,parent:i.type})})),this.tickImmediate()}getMainFwdBufferInfo(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,gp)}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=tm}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&!1===e.seeking){const i=e.currentTime;if(Ff.isBuffered(e,i)?t=this.getAppendedFrag(i):Ff.isBuffered(e,i+.1)&&(t=this.getAppendedFrag(i+.1)),t){this.backtrackFragment=null;const e=this.fragPlaying,i=t.level;e&&t.sn===e.sn&&e.level===i||(this.fragPlaying=t,this.hls.trigger(dc.FRAG_CHANGED,{frag:t}),e&&e.level===i||this.hls.trigger(dc.LEVEL_SWITCHED,{level:i}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){const e=this.media;return e?this.fragPlaying||this.getAppendedFrag(e.currentTime):null}get currentProgramDateTime(){const e=this.media;if(e){const t=e.currentTime,i=this.currentFrag;if(i&&oc(t)&&oc(i.programDateTime)){const e=i.programDateTime+1e3*(t-i.start);return new Date(e)}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class bA{static get version(){return"1.5.7"}static isMSESupported(){return gA()}static isSupported(){return function(){if(!gA())return!1;const e=zu();return"function"==typeof(null==e?void 0:e.isTypeSupported)&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some((t=>e.isTypeSupported(Wu(t,"video"))))||["mp4a.40.2","fLaC"].some((t=>e.isTypeSupported(Wu(t,"audio")))))}()}static getMediaSource(){return zu()}static get Events(){return dc}static get ErrorTypes(){return hc}static get ErrorDetails(){return cc}static get DefaultConfig(){return bA.defaultConfig?bA.defaultConfig:lA}static set DefaultConfig(e){bA.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this.started=!1,this._emitter=new yg,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null,this.triggeringException=void 0,function(e,t){if("object"==typeof console&&!0===e||"object"==typeof e){mc(e,"debug","log","info","warn","error");try{fc.log(`Debug logs enabled for "${t}" in hls.js version 1.5.7`)}catch(e){fc=pc}}else fc=pc}(e.debug||!1,"Hls instance");const t=this.config=function(e,t){if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==t.liveMaxLatencyDurationCount&&(void 0===t.liveSyncDurationCount||t.liveMaxLatencyDurationCount<=t.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==t.liveMaxLatencyDuration&&(void 0===t.liveSyncDuration||t.liveMaxLatencyDuration<=t.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const i=dA(e),s=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return["manifest","level","frag"].forEach((e=>{const r=`${"level"===e?"playlist":e}LoadPolicy`,a=void 0===t[r],o=[];s.forEach((s=>{const n=`${e}Loading${s}`,l=t[n];if(void 0!==l&&a){o.push(n);const e=i[r].default;switch(t[r]={default:e},s){case"TimeOut":e.maxLoadTimeMs=l,e.maxTimeToFirstByteMs=l;break;case"MaxRetry":e.errorRetry.maxNumRetry=l,e.timeoutRetry.maxNumRetry=l;break;case"RetryDelay":e.errorRetry.retryDelayMs=l,e.timeoutRetry.retryDelayMs=l;break;case"MaxRetryTimeout":e.errorRetry.maxRetryDelayMs=l,e.timeoutRetry.maxRetryDelayMs=l}}})),o.length&&gc.warn(`hls.js config: "${o.join('", "')}" setting(s) are deprecated, use "${r}": ${JSON.stringify(t[r])}`)})),ic(ic({},i),t)}(bA.DefaultConfig,e);this.userConfig=e,t.progressive&&hA(t);const{abrController:i,bufferController:s,capLevelController:r,errorController:a,fpsController:o}=t,n=new a(this),l=this.abrController=new i(this),d=this.bufferController=new s(this),h=this.capLevelController=new r(this),c=new o(this),u=new vp(this),p=new Bp(this),f=t.contentSteeringController,m=f?new f(this):null,g=this.levelController=new uA(this,m),y=new Pf(this),A=new fA(this.config),b=this.streamController=new AA(this,y,A);h.setStreamController(b),c.setStreamController(b);const _=[u,g,b];m&&_.splice(1,0,m),this.networkControllers=_;const v=[l,d,h,c,p,y];this.audioTrackController=this.createController(t.audioTrackController,_);const w=t.audioStreamController;w&&_.push(new w(this,y,A)),this.subtitleTrackController=this.createController(t.subtitleTrackController,_);const S=t.subtitleStreamController;S&&_.push(new S(this,y,A)),this.createController(t.timelineController,v),A.emeController=this.emeController=this.createController(t.emeController,v),this.cmcdController=this.createController(t.cmcdController,v),this.latencyController=this.createController(Mp,v),this.coreComponents=v,_.push(n);const T=n.onErrorOut;"function"==typeof T&&this.on(dc.ERROR,T,n)}createController(e,t){if(e){const i=new e(this);return t&&t.push(i),i}return null}on(e,t,i=this){this._emitter.on(e,t,i)}once(e,t,i=this){this._emitter.once(e,t,i)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,i=this,s){this._emitter.off(e,t,i,s)}listeners(e){return this._emitter.listeners(e)}emit(e,t,i){return this._emitter.emit(e,t,i)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(t){if(gc.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),!this.triggeringException){this.triggeringException=!0;const i=e===dc.ERROR;this.trigger(dc.ERROR,{type:hc.OTHER_ERROR,details:cc.INTERNAL_EXCEPTION,fatal:i,event:e,error:t}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){gc.log("destroy"),this.trigger(dc.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach((e=>e.destroy())),this.networkControllers.length=0,this.coreComponents.forEach((e=>e.destroy())),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){gc.log("attachMedia"),this._media=e,this.trigger(dc.MEDIA_ATTACHING,{media:e})}detachMedia(){gc.log("detachMedia"),this.trigger(dc.MEDIA_DETACHING,void 0),this._media=null}loadSource(e){this.stopLoad();const t=this.media,i=this.url,s=this.url=ec.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,gc.log(`loadSource:${s}`),t&&i&&(i!==s||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(dc.MANIFEST_LOADING,{url:e})}startLoad(e=-1){gc.log(`startLoad(${e})`),this.started=!0,this.networkControllers.forEach((t=>{t.startLoad(e)}))}stopLoad(){gc.log("stopLoad"),this.started=!1,this.networkControllers.forEach((e=>{e.stopLoad()}))}resumeBuffering(){this.started&&this.networkControllers.forEach((e=>{"fragmentLoader"in e&&e.startLoad(-1)}))}pauseBuffering(){this.networkControllers.forEach((e=>{"fragmentLoader"in e&&e.stopLoad()}))}swapAudioCodec(){gc.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){gc.log("recoverMediaError");const e=this._media;this.detachMedia(),e&&this.attachMedia(e)}removeLevel(e){this.levelController.removeLevel(e)}get levels(){const e=this.levelController.levels;return e||[]}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){gc.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){gc.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){gc.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){gc.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){const e=this.levelController.startLevel;return-1===e&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e}set startLevel(e){gc.log(`set startLevel:${e}`),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}set bandwidthEstimate(e){this.abrController.resetEstimator(e)}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(gc.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){(function(e){return Up.indexOf(e)>-1})(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return-1===this.levelController.manualLevel}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const i=e.length;for(let s=0;s<i;s++)if(e[s].maxBitrate>=t)return s;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:i}=this;let s;if(s=-1===t&&null!=e&&e.length?e.length-1:t,i)for(let t=s;t--;){const s=e[t].attrs["HDCP-LEVEL"];if(s&&s<=i)return t}return s}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}setAudioOption(e){var t;return null==(t=this.audioTrackController)?void 0:t.setAudioOption(e)}setSubtitleOption(e){var t;return null==(t=this.subtitleTrackController)||t.setSubtitleOption(e),null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return!!e&&e.subtitleDisplay}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}}bA.defaultConfig=void 0;class _A extends a{constructor(e){super(),this.player=e,this.TAG_NAME="HlsDecoder",e._opt,this.canVideoPlay=!1,this.$videoElement=null,this.canvasRenderInterval=null,this.bandwidthEstimateInterval=null,this.fpsInterval=null,this.hlsFps=0,this.hlsPrevFrams=0,this.isInitInfo=!1,this.eventsDestroy=[],this.supportVideoFrameCallbackHandle=null,this.player.isHlsCanVideoPlay()?(this.$videoElement=this.player.video.$videoElement,this.canVideoPlay=!0):bA.isSupported()?(this.$videoElement=this.player.video.$videoElement,this.hls=new bA({}),this._initHls(),this._bindEvents()):this.player.debug.error(this.TAG_NAME,"init hls error ,not support "),this.player.debug.log(this.TAG_NAME,"init")}destroy(){return new Promise(((e,t)=>{this.supportVideoFrameCallbackHandle&&this.$videoElement&&(this.$videoElement.cancelVideoFrameCallback(this.supportVideoFrameCallbackHandle),this.supportVideoFrameCallbackHandle=null),this.hls&&(this.hls.destroy(),this.hls=null),this.eventsDestroy.length&&(this.eventsDestroy.forEach((e=>e())),this.eventsDestroy=[]),this.isInitInfo=!1,this._stopCanvasRender(),this._stopBandwidthEstimateInterval(),this._stopFpsInterval(),this.$videoElement=null,this.hlsFps=0,this.player.debug.log(this.TAG_NAME,"destroy"),setTimeout((()=>{e()}),0)}))}checkHlsBufferedDelay(){const e=this.$videoElement;let t=0;const i=e.buffered,s=i.length?i.end(i.length-1):0;return t=s-e.currentTime,t<0&&(this.player.debug.warn(this.TAG_NAME,`checkHlsBufferedDelay ${t} < 0, and buffered is ${s} ,currentTime is ${e.currentTime} , try to seek ${e.currentTime} to ${s}`),e.currentTime=s,t=0),t}getFps(){return this.hlsFps}_startCanvasRender(){ko()?this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this)):(this._stopCanvasRender(),this.canvasRenderInterval=setInterval((()=>{this.player.video.render({$video:this.$videoElement,ts:parseInt(1e3*this.$videoElement.currentTime,10)||0})}),40))}_stopCanvasRender(){this.canvasRenderInterval&&(clearInterval(this.canvasRenderInterval),this.canvasRenderInterval=null)}videoFrameCallback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.player.isDestroyedOrClosed())return void this.player.debug.log(this.TAG_NAME,"videoFrameCallback() player is destroyed");const i=parseInt(1e3*Math.max(t.mediaTime,this.$videoElement.currentTime),10)||0;this.player.video.render({$video:this.$videoElement,ts:i}),this.player.handleRender(),this.player.updateStats({dts:i}),this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this))}_startBandwidthEstimateInterval(){this._stopBandwidthEstimateInterval(),this.bandwidthEstimateInterval=setInterval((()=>{let e=0;this.hls.bandwidthEstimate&&(e=this.hls.bandwidthEstimate),this.player.emit(lt.kBps,(e/1024/8/10).toFixed(2))}),1e3)}_stopBandwidthEstimateInterval(){this.bandwidthEstimateInterval&&(clearInterval(this.bandwidthEstimateInterval),this.bandwidthEstimateInterval=null)}_startFpsInterval(){this._stopCanvasRender(),this.fpsInterval=setInterval((()=>{if(this.$videoElement)if(to(this.$videoElement.getVideoPlaybackQuality)){const e=this.$videoElement.getVideoPlaybackQuality();this.hlsFps=e.totalVideoFrames-this.hlsPrevFrams,this.hlsPrevFrams=e.totalVideoFrames}else{const e=this.$videoElement.webkitDecodedFrameCount||0;this.hlsFps=e-this.hlsPrevFrams,this.hlsPrevFrams=e}}),1e3)}_stopFpsInterval(){this.fpsInterval&&(clearInterval(this.fpsInterval),this.fpsInterval=null)}_initHls(){this.player._opt.useCanvasRender&&(this.$videoElement=document.createElement("video"),this.$videoElement.muted=!0,Sa()&&(this.$videoElement.style.position="absolute"),this.initVideoEvents()),this.hls.attachMedia(this.$videoElement)}_bindEvents(){const e=this.player,{proxy:t}=this.player.events;this.hls;const i=this.$videoElement,s=ko(),r=t(i,ss,(t=>{if(this.hls){const i=parseInt(t.timeStamp,10);this.player._opt.useCanvasRender&&Ao(s)&&e.updateStats({ts:i,dts:i})}}));this.eventsDestroy.push(r),this._startBandwidthEstimateInterval(),this._startFpsInterval(),this.hls.on(bA.Events.ERROR,((e,t)=>{if(t.fatal)switch(t.type){case bA.ErrorTypes.NETWORK_ERROR:this.player.debug.warn(this.TAG_NAME,"fatal network error encountered, try to recover"),this.hls.startLoad();break;case bA.ErrorTypes.MEDIA_ERROR:this.player.debug.warn(this.TAG_NAME,"fatal media error encountered, try to recover"),this.hls.recoverMediaError()}})),this.hls.on(bA.Events.MEDIA_ATTACHING,(()=>{})),this.hls.on(bA.Events.MEDIA_ATTACHED,(()=>{})),this.hls.on(bA.Events.MEDIA_DETACHING,(()=>{})),this.hls.on(bA.Events.MEDIA_DETACHED,(()=>{})),this.hls.on(bA.Events.BUFFER_RESET,(()=>{})),this.hls.on(bA.Events.BUFFER_CODECS,(()=>{})),this.hls.on(bA.Events.BUFFER_CREATED,(()=>{})),this.hls.on(bA.Events.BUFFER_APPENDING,((e,t)=>{this.player.debug.log(this.TAG_NAME,"BUFFER_APPENDING",t.type)})),this.hls.on(bA.Events.BUFFER_APPENDED,(()=>{})),this.hls.on(bA.Events.BUFFER_EOS,(()=>{})),this.hls.on(bA.Events.BUFFER_FLUSHING,(()=>{})),this.hls.on(bA.Events.BUFFER_FLUSHED,(()=>{})),this.hls.on(bA.Events.MANIFEST_LOADING,(()=>{this.player.debug.log(this.TAG_NAME,"MANIFEST_LOADING 开始加载playlist m3u8资源")})),this.hls.on(bA.Events.MANIFEST_LOADED,((e,t)=>{this.player.debug.log(this.TAG_NAME,"MANIFEST_LOADED playlist m3u8文件加载完成",t.url)})),this.hls.on(bA.Events.MANIFEST_PARSED,(()=>{this.player.debug.log(this.TAG_NAME,"MANIFEST_PARSED playlist m3u8解析完成"),e._times.demuxStart||(e._times.demuxStart=ha())})),this.hls.on(bA.Events.LEVEL_LOADING,(()=>{})),this.hls.on(bA.Events.LEVEL_LOADED,((e,t)=>{})),this.hls.on(bA.Events.FRAG_LOADING,(()=>{})),this.hls.on(bA.Events.FRAG_LOADED,((t,i)=>{e._times.decodeStart||(e._times.decodeStart=ha())})),this.hls.on(bA.Events.BUFFER_APPENDING,(()=>{e._times.videoStart||(e._times.videoStart=ha(),e.handlePlayToRenderTimes())})),this.hls.on(bA.Events.FRAG_DECRYPTED,(()=>{})),this.hls.on(bA.Events.KEY_LOADING,(()=>{})),this.hls.on(bA.Events.KEY_LOADING,(()=>{})),this.hls.on(bA.Events.FPS_DROP,(e=>{})),this.hls.on(bA.Events.FPS_DROP_LEVEL_CAPPING,(e=>{})),this.hls.on(bA.Events.FRAG_PARSING_INIT_SEGMENT,((e,t)=>{this.player.debug.log(this.TAG_NAME,"FRAG_PARSING_INIT_SEGMENT",t);const i=!!(t&&t.tracks&&t.tracks.audio),s=!!(t&&t.tracks&&t.tracks.video);if(i&&t.tracks.audio){let e=t.tracks.audio;const i=e.metadata&&e.metadata.channelCount?e.metadata.channelCount:0,s=e.codec;this.player.audio&&this.player.audio.updateAudioInfo({encType:s,channels:i,sampleRate:44100})}if(s&&t.tracks.video){let e=t.tracks.video;const i={encTypeCode:-1!==e.codec.indexOf("avc")?vt:wt};e.metadata&&(i.width=e.metadata.width,i.height=e.metadata.height),this.player.video&&this.player.video.updateVideoInfo(i)}}))}initVideoPlay(e){this.player._opt.useCanvasRender&&(this.$videoElement=document.createElement("video"),this.initVideoEvents()),this.$videoElement.autoplay=!0,this.$videoElement.muted=!0,this.$videoElement.src=e}_initRenderSize(){this.isInitInfo||(this.player.video.updateVideoInfo({width:this.$videoElement.videoWidth,height:this.$videoElement.videoHeight}),this.player.video.initCanvasViewSize(),this.isInitInfo=!0)}initVideoEvents(){const{proxy:e}=this.player.events,t=e(this.$videoElement,ts,(()=>{this.player.debug.log(this.TAG_NAME,"video canplay"),this.$videoElement.play().then((()=>{this.player.debug.log(this.TAG_NAME,"video play"),this._startCanvasRender(),this._initRenderSize()})).catch((e=>{this.player.debug.warn(this.TAG_NAME,"video play error ",e)}))})),i=e(this.$videoElement,is,(()=>{this.player.debug.log(this.TAG_NAME,"video waiting")})),s=e(this.$videoElement,ss,(e=>{const t=parseInt(e.timeStamp,10);this.player.handleRender(),this.player.updateStats({ts:t}),this.$videoElement.paused&&(this.player.debug.warn(this.TAG_NAME,"video is paused and next try to replay"),this.$videoElement.play().then((()=>{this.player.debug.log(this.TAG_NAME,"video is paused and replay success")})).catch((e=>{this.player.debug.warn(this.TAG_NAME,"video is paused and replay error ",e)})))})),r=e(this.$videoElement,rs,(()=>{this.player.debug.log(this.TAG_NAME,"video playback Rate change",this.$videoElement&&this.$videoElement.playbackRate)}));this.eventsDestroy.push(t,i,s,r)}loadSource(e){return new Promise(((t,i)=>{this.canVideoPlay?(this.initVideoPlay(e),t()):this.hls.on(bA.Events.MEDIA_ATTACHED,(()=>{this.hls.loadSource(e),t()}))}))}}const vA=2097152,wA="fetch",SA="xhr",TA="arraybuffer",EA="text",kA="json",CA="real_time_speed",xA=Object.prototype.toString;function RA(e){if("[object Object]"!==xA.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function DA(e){if(!e||null===e[0]||void 0===e[0]||0===e[0]&&(null===e[1]||void 0===e[1]))return;let t="bytes="+e[0]+"-";return e[1]&&(t+=e[1]),t}function LA(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function IA(e,t){if(!e)return;if(!t)return e;let i;const s=Object.keys(t).map((e=>{if(i=t[e],null!=i)return Array.isArray(i)?e+="[]":i=[i],i.map((t=>{var i;return i=t,"[object Date]"===xA.call(i)?t=t.toISOString():function(e){return null!==e&&"object"==typeof e}(t)&&(t=JSON.stringify(t)),`${LA(e)}=${LA(t)}`})).join("&")})).filter(Boolean).join("&");if(s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}function PA(e,t,i,s,r,a,o,n,l,d,h){r=null!=r?parseFloat(r):null,s=parseInt(s||"0",10),Number.isNaN(s)&&(s=0);return{data:e,done:t,option:{range:l,vid:d,index:n,contentLength:s,age:r,startTime:a,firstByteTime:o,endTime:Date.now(),priOptions:h},response:i}}function BA(e,t){return Math.round(8*e*1e3/t/1024)}class MA extends Error{constructor(e,t,i,s){super(s),Jd(this,"retryCount",0),Jd(this,"isTimeout",!1),Jd(this,"loaderType",wA),Jd(this,"startTime",0),Jd(this,"endTime",0),Jd(this,"options",{}),this.url=e,this.request=t,this.response=i}}class UA extends a{constructor(e){super(),Jd(this,"_abortController",null),Jd(this,"_timeoutTimer",null),Jd(this,"_reader",null),Jd(this,"_response",null),Jd(this,"_aborted",!1),Jd(this,"_index",-1),Jd(this,"_range",null),Jd(this,"_receivedLength",0),Jd(this,"_running",!1),Jd(this,"_logger",null),Jd(this,"_vid",""),Jd(this,"_onProcessMinLen",0),Jd(this,"_onCancel",null),Jd(this,"_priOptions",null),Jd(this,"TAG_NAME","FetchLoader"),this.player=e}load(e){var t;let{url:i,vid:s,timeout:r,responseType:a,onProgress:o,index:n,onTimeout:l,onCancel:d,range:h,transformResponse:c,request:u,params:p,logger:f,method:m,headers:g,body:y,mode:A,credentials:b,cache:_,redirect:v,referrer:w,referrerPolicy:S,onProcessMinLen:T,priOptions:E}=e;this._aborted=!1,this._onProcessMinLen=T,this._onCancel=d,this._abortController="undefined"!=typeof AbortController&&new AbortController,this._running=!0,this._index=n,this._range=h||[0,0],this._vid=s||i,this._priOptions=E||{};const k={method:m,headers:g,body:y,mode:A,credentials:b,cache:_,redirect:v,referrer:w,referrerPolicy:S,signal:null===(t=this._abortController)||void 0===t?void 0:t.signal};let C=!1;clearTimeout(this._timeoutTimer),i=IA(i,p);const x=DA(h);x&&(g=u?u.headers:k.headers=k.headers||(Headers?new Headers:{}),Headers&&g instanceof Headers?g.append("Range",x):g.Range=x),r&&(this._timeoutTimer=setTimeout((()=>{if(C=!0,this.cancel(),l){const e=new MA(i,k,null,"timeout");e.isTimeout=!0,l(e,{index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions})}}),r));const R=Date.now();return(Oa(n)||Oa(h))&&this.player.debug.log(this.TAG_NAME,"[fetch load start], index,",n,",range,",h),new Promise(((e,t)=>{fetch(u||i,u?void 0:k).then((async s=>{if(clearTimeout(this._timeoutTimer),this._response=s,this._aborted||!this._running)return;if(c&&(s=c(s,i)||s),!s.ok)throw new MA(i,k,s,"bad network response");const r=Date.now();let l;if(a===EA)l=await s.text(),this._running=!1;else if(a===kA)l=await s.json(),this._running=!1;else{if(o)return this.resolve=e,this.reject=t,void this._loadChunk(s,o,R,r);{l=await s.arrayBuffer(),l=new Uint8Array(l),this._running=!1;const e=Date.now()-R,t=BA(l.byteLength,e);this.emit(CA,{speed:t,len:l.byteLength,time:e,vid:this._vid,index:this._index,range:this._range,priOptions:this._priOptions})}}(Oa(n)||Oa(h))&&this.player.debug.log(this.TAG_NAME,"[fetch load end], index,",n,",range,",h),e(PA(l,!0,s,s.headers.get("Content-Length"),s.headers.get("age"),R,r,n,h,this._vid,this._priOptions))})).catch((e=>{var s;clearTimeout(this._timeoutTimer),this._running=!1,this._aborted&&!C||((e=e instanceof MA?e:new MA(i,k,null,null===(s=e)||void 0===s?void 0:s.message)).startTime=R,e.endTime=Date.now(),e.isTimeout=C,e.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},t(e))}))}))}async cancel(){if(!this._aborted){if(this._aborted=!0,this._running=!1,this._response){try{this._reader&&await this._reader.cancel()}catch(e){}this._response=this._reader=null}if(this._abortController){try{this._abortController.abort()}catch(e){}this._abortController=null}this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions})}}_loadChunk(e,t,i,s){if(!e.body||!e.body.getReader){this._running=!1;const t=new MA(e.url,"",e,"onProgress of bad response.body.getReader");return t.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},void this.reject(t)}this._onProcessMinLen>0&&(this._cache=new Uint8Array(vA),this._writeIdx=0);const r=this._reader=e.body.getReader();let a,o,n;const l=async()=>{var d;o=Date.now();try{a=await r.read(),n=Date.now()}catch(e){return n=Date.now(),void(this._aborted||(this._running=!1,e.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this.reject(e)))}const h=(null===(d=this._range)||void 0===d?void 0:d.length)>0?this._range[0]:0,c=h+this._receivedLength;if(this._aborted)return this._running=!1,void t(void 0,!1,{range:[c,c],vid:this._vid,index:this._index,startTime:o,endTime:n,st:i,firstByteTime:s,priOptions:this._priOptions},e);const u=a.value?a.value.byteLength:0;let p;if(this._receivedLength+=u,this.player.debug.log(this.TAG_NAME,"【fetchLoader,onProgress call】,task,",this._range,", start,",c,", end,",h+this._receivedLength,", done,",a.done),this._onProcessMinLen>0){if(this._writeIdx+u>=this._onProcessMinLen||a.done)p=new Uint8Array(this._writeIdx+u),p.set(this._cache.slice(0,this._writeIdx),0),u>0&&p.set(a.value,this._writeIdx),this._writeIdx=0,this.player.debug.log(this.TAG_NAME,"【fetchLoader,onProgress enough】,done,",a.done,",len,",p.byteLength,", writeIdx,",this._writeIdx);else if(u>0&&this._writeIdx+u<vA)this._cache.set(a.value,this._writeIdx),this._writeIdx+=u,this.player.debug.log(this.TAG_NAME,"【fetchLoader,onProgress cache】,len,",u,", writeIdx,",this._writeIdx);else if(u>0){const e=new Uint8Array(this._writeIdx+u+2048);this.player.debug.log(this.TAG_NAME,"【fetchLoader,onProgress extra start】,size,",this._writeIdx+u+2048,", datalen,",u,", writeIdx,",this._writeIdx),e.set(this._cache.slice(0,this._writeIdx),0),u>0&&e.set(a.value,this._writeIdx),this._writeIdx+=u,delete this._cache,this._cache=e,this.player.debug.log(this.TAG_NAME,"【fetchLoader,onProgress extra end】,len,",u,", writeIdx,",this._writeIdx)}}else p=a.value;if((p&&p.byteLength>0||a.done)&&t(p,a.done,{range:[this._range[0]+this._receivedLength-(p?p.byteLength:0),this._range[0]+this._receivedLength],vid:this._vid,index:this._index,startTime:o,endTime:n,st:i,firstByteTime:s,priOptions:this._priOptions},e),a.done){const t=Date.now()-i,r=BA(this._receivedLength,t);this.emit(CA,{speed:r,len:this._receivedLength,time:t,vid:this._vid,index:this._index,range:this._range,priOptions:this._priOptions}),this._running=!1,this.player.debug.log(this.TAG_NAME,"[fetchLoader onProgress end],task,",this._range,",done,",a.done),this.resolve(PA(a,!0,e,e.headers.get("Content-Length"),e.headers.get("age"),i,s,this._index,this._range,this._vid,this._priOptions))}else l()};l()}get receiveLen(){return this._receivedLength}get running(){return this._running}set running(e){this._running=e}static isSupported(){return!("undefined"==typeof fetch)}}class FA{constructor(e,t,i){Jd(this,"TAG_NAME","Task"),this.promise=function(){let e,t;const i=new Promise(((i,s)=>{e=i,t=s}));return i.used=!1,i.resolve=function(){return i.used=!0,e(...arguments)},i.reject=function(){return i.used=!0,t(...arguments)},i}(),this.alive=!!t.onProgress,this._loaderType=e,this.player=i,this._loader=e===wA&&window.fetch?new UA(i):new OA(i),this._config=t,this._retryCount=0,this._retryTimer=null,this._canceled=!1,this._retryCheckFunc=t.retryCheckFunc}exec(){const{retry:e,retryDelay:t,onRetryError:i,transformError:s,...r}=this._config,a=async()=>{try{const e=await this._loader.load(r);this.promise.resolve(e)}catch(o){if(this._loader.running=!1,this.player.debug.log(this.TAG_NAME,"[task request catch err]",o),this._canceled)return;o.loaderType=this._loaderType,o.retryCount=this._retryCount;let n=o;s&&(n=s(n)||n),i&&this._retryCount>0&&i(n,this._retryCount,{index:r.index,vid:r.vid,range:r.range,priOptions:r.priOptions}),this._retryCount++;let l=!0;if(this._retryCheckFunc&&(l=this._retryCheckFunc(o)),l&&this._retryCount<=e)return clearTimeout(this._retryTimer),this.player.debug.log(this.TAG_NAME,"[task request setTimeout],retry",this._retryCount,",retry range,",r.range),void(this._retryTimer=setTimeout(a,t));this.promise.reject(n)}};return a(),this.promise}async cancel(){return clearTimeout(this._retryTimer),this._canceled=!0,this._loader.running=!1,this._loader.cancel()}get running(){return this._loader&&this._loader.running}get loader(){return this._loader}}class OA extends a{constructor(e){super(),Jd(this,"_xhr",null),Jd(this,"_aborted",!1),Jd(this,"_timeoutTimer",null),Jd(this,"_range",null),Jd(this,"_receivedLength",0),Jd(this,"_url",null),Jd(this,"_onProgress",null),Jd(this,"_index",-1),Jd(this,"_headers",null),Jd(this,"_currentChunkSizeKB",384),Jd(this,"_timeout",null),Jd(this,"_xhr",null),Jd(this,"_withCredentials",null),Jd(this,"_startTime",-1),Jd(this,"_loadCompleteResolve",null),Jd(this,"_loadCompleteReject",null),Jd(this,"_runing",!1),Jd(this,"_logger",!1),Jd(this,"_vid",""),Jd(this,"_responseType",void 0),Jd(this,"_credentials",void 0),Jd(this,"_method",void 0),Jd(this,"_transformResponse",void 0),Jd(this,"_firstRtt",void 0),Jd(this,"_onCancel",null),Jd(this,"_priOptions",null),Jd(this,"TAG_NAME","XhrLoader"),this.player=e}load(e){clearTimeout(this._timeoutTimer),this._range=e.range,this._onProgress=e.onProgress,this._index=e.index,this._headers=e.headers,this._withCredentials="include"===e.credentials||"same-origin"===e.credentials,this._body=e.body||null,e.method&&(this._method=e.method),this._timeout=e.timeout||null,this._runing=!0,this._vid=e.vid||e.url,this._responseType=e.responseType,this._firstRtt=-1,this._onTimeout=e.onTimeout,this._onCancel=e.onCancel,this._request=e.request,this._priOptions=e.priOptions||{},this.player.debug.log(this.TAG_NAME,"【xhrLoader task】, range",this._range),this._url=IA(e.url,e.params);const t=Date.now();return new Promise(((e,t)=>{this._loadCompleteResolve=e,this._loadCompleteReject=t,this._startLoad()})).catch((e=>{if(clearTimeout(this._timeoutTimer),this._runing=!1,!this._aborted)throw(e=e instanceof MA?e:new MA(this._url,this._request)).startTime=t,e.endTime=Date.now(),e.options={index:this._index,vid:this._vid,priOptions:this._priOptions},e}))}_startLoad(){let e=null;if(this._responseType===TA&&this._range&&this._range.length>1)if(this._onProgress){this._firstRtt=-1;const t=1024*this._currentChunkSizeKB,i=this._range[0]+this._receivedLength;let s=this._range[1];t<this._range[1]-i&&(s=i+t),e=[i,s],this.player.debug.log(this.TAG_NAME,"[xhr_loader->],tast :",this._range,", SubRange, ",e)}else e=this._range,this.player.debug.log(this.TAG_NAME,"[xhr_loader->],tast :",this._range,", allRange, ",e);this._internalOpen(e)}_internalOpen(e){try{this._startTime=Date.now();const t=this._xhr=new XMLHttpRequest;t.open(this._method||"GET",this._url,!0),t.responseType=this._responseType,this._timeout&&(t.timeout=this._timeout),t.withCredentials=this._withCredentials,t.onload=this._onLoad.bind(this),t.onreadystatechange=this._onReadyStatechange.bind(this),t.onerror=e=>{var t,i,s;this._running=!1;const r=new MA(this._url,this._request,null==e||null===(t=e.currentTarget)||void 0===t?void 0:t.response,"xhr.onerror.status:"+(null==e||null===(i=e.currentTarget)||void 0===i?void 0:i.status)+",statusText,"+(null==e||null===(s=e.currentTarget)||void 0===s?void 0:s.statusText));r.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(r)},t.ontimeout=e=>{this.cancel();const t=new MA(this._url,this._request,{status:408},"timeout");this._onTimeout&&(t.isTimeout=!0,this._onTimeout(t,{index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions})),t.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(t)};const i=this._headers||{},s=DA(e);s&&(i.Range=s),i&&Object.keys(i).forEach((e=>{t.setRequestHeader(e,i[e])})),this.player.debug.log(this.TAG_NAME,"[xhr.send->] tast,",this._range,",load sub range, ",e),t.send(this._body)}catch(t){t.options={index:this._index,range:e,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(t)}}_onReadyStatechange(e){2===e.target.readyState&&this._firstRtt<0&&(this._firstRtt=Date.now())}_onLoad(e){var t;const i=e.target.status;if(i<200||i>299){const t=new MA(this._url,null,{...e.target.response,status:i},"bad response,status:"+i);return t.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(t)}let s,r=null,a=!1;const o=(null===(t=this._range)||void 0===t?void 0:t.length)>0?this._range[0]:0;if(this._responseType===TA){var n;const t=new Uint8Array(e.target.response);if(s=o+this._receivedLength,t&&t.byteLength>0){this._receivedLength+=t.byteLength;const e=Date.now()-this._startTime,i=BA(this._receivedLength,e);this.emit(CA,{speed:i,len:this._receivedLength,time:e,vid:this._vid,index:this._index,range:[s,o+this._receivedLength],priOptions:this._priOptions})}r=t,a=!((null===(n=this._range)||void 0===n?void 0:n.length)>1&&this._range[1]&&this._receivedLength<this._range[1]-this._range[0]),this.player.debug.log(this.TAG_NAME,"[xhr load done->], tast :",this._range,", start",s,"end ",o+this._receivedLength,",dataLen,",t?t.byteLength:0,",receivedLength",this._receivedLength,",index,",this._index,", done,",a)}else a=!0,r=e.target.response;let l={ok:i>=200&&i<300,status:i,statusText:this._xhr.statusText,url:this._xhr.responseURL,headers:this._getHeaders(this._xhr),body:this._xhr.response};this._transformResponse&&(l=this._transformResponse(l,this._url)||l),this._onProgress&&this._onProgress(r,a,{index:this._index,vid:this._vid,range:[s,o+this._receivedLength],startTime:this._startTime,endTime:Date.now(),priOptions:this._priOptions},l),a?(this._runing=!1,this._loadCompleteResolve&&this._loadCompleteResolve(PA(this._onProgress?null:r,a,l,l.headers["content-length"],l.headers.age,this._startTime,this._firstRtt,this._index,this._range,this._vid,this._priOptions))):this._startLoad()}cancel(){if(!this._aborted)return this._aborted=!0,this._runing=!1,super.removeAllListeners(),this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions}),this._xhr?this._xhr.abort():void 0}static isSupported(){return"undefined"!=typeof XMLHttpRequest}get receiveLen(){return this._receivedLength}get running(){return this._running}set running(e){this._running=e}_getHeaders(e){const t=e.getAllResponseHeaders().trim().split("\r\n"),i={};for(const e of t){const t=e.split(": ");i[t[0].toLowerCase()]=t.slice(1).join(": ")}return i}}class NA extends a{constructor(e,t){super(),Jd(this,"type",wA),Jd(this,"_queue",[]),Jd(this,"_alive",[]),Jd(this,"_currentTask",null),Jd(this,"_config",void 0),this.player=t,this._config=function(e){return{loaderType:wA,retry:0,retryDelay:0,timeout:0,request:null,onTimeout:void 0,onProgress:void 0,onRetryError:void 0,transformRequest:void 0,transformResponse:void 0,transformError:void 0,responseType:EA,range:void 0,url:"",params:void 0,method:"GET",headers:{},body:void 0,mode:void 0,credentials:void 0,cache:void 0,redirect:void 0,referrer:void 0,referrerPolicy:void 0,integrity:void 0,onProcessMinLen:0,...e}}(e),this._config.loaderType!==SA&&UA.isSupported()||(this.type=SA)}destroy(){this._queue=[],this._alive=[],this._currentTask=null}isFetch(){return this.type===wA}static isFetchSupport(){return UA.isSupported()}load(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"!=typeof e&&e?t=e:t.url=e||t.url||this._config.url,t=Object.assign({},this._config,t),t.params&&(t.params=Object.assign({},t.params)),t.headers&&RA(t.headers)&&(t.headers=Object.assign({},t.headers)),t.body&&RA(t.body)&&(t.body=Object.assign({},t.body)),t.transformRequest&&(t=t.transformRequest(t)||t);const i=new FA(this.type,t,this.player);return i.loader.on(CA,(e=>{this.emit(CA,e)})),this._queue.push(i),1!==this._queue.length||this._currentTask&&this._currentTask.running||this._processTask(),i.promise}async cancel(){const e=this._queue.map((e=>e.cancel())).concat(this._alive.map((e=>e.cancel())));this._currentTask&&e.push(this._currentTask.cancel()),this._queue=[],this._alive=[],await Promise.all(e),await function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((t=>setTimeout(t,e)))}()}_processTask(){if(this._currentTask=this._queue.shift(),!this._currentTask)return;this._currentTask.alive&&this._alive.push(this._currentTask);const e=this._currentTask.exec().catch((e=>{}));e&&"function"==typeof e.finally&&e.finally((()=>{var e,t;null!==(e=this._currentTask)&&void 0!==e&&e.alive&&(null===(t=this._alive)||void 0===t?void 0:t.length)>0&&(this._alive=this._alive.filter((e=>e&&e!==this._currentTask))),this._processTask()}))}}const jA="network",GA="network_timeout",zA="other",$A="manifest",HA="hls",VA="demux";class WA extends Error{constructor(e,t,i,s,r){super(r||(null==i?void 0:i.message)),this.errorType=e===GA?jA:e,this.originError=i,this.ext=s,this.errorMessage=this.message}static create(e,t,i,s,r){return e instanceof WA?e:(e instanceof Error&&(i=e,e=""),e||(e=zA),new WA(e,t,i,s,r))}static network(e){var t;return new WA(null!=e&&e.isTimeout?GA:jA,null,e instanceof Error?e:null,{url:null==e?void 0:e.url,response:null==e?void 0:e.response,httpCode:null==e||null===(t=e.response)||void 0===t?void 0:t.status})}}const JA=/^#(EXT[^:]*)(?::(.*))?$/,qA=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g,KA=/^(?:[a-zA-Z0-9+\-.]+:)?\/\//,YA=/^((?:[a-zA-Z0-9+\-.]+:)?\/\/[^/?#]*)?([^?#]*\/)?/;function QA(e){const t=e.match(JA);if(t&&t[1])return[t[1].replace("EXT-X-",""),t[2]]}function XA(e){const t={};let i=qA.exec(e);for(;i;)t[i[1]]=i[2]||i[3],i=qA.exec(e);return t}function ZA(e,t){if(!t||!e||KA.test(e))return e;const i=YA.exec(t);return i?"/"===e[0]?i[1]+e:i[1]+i[2]+e:e}const eb={audio:[/^mp4a/,/^vorbis$/,/^opus$/,/^flac$/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function tb(e,t){const i=eb[e];if(i&&t&&t.length)for(let e=0;e<i.length;e++)for(let s=0;s<t.length;s++)if(i[e].test(t[s]))return t[s]}class ib{constructor(){this.version=0,this.streams=[],this.isMaster=!0}}const sb="AUDIO",rb="SUBTITLE";class ab{constructor(){Jd(this,"id",0),Jd(this,"url",""),Jd(this,"default",!1),Jd(this,"autoSelect",!1),Jd(this,"forced",!1),Jd(this,"group",""),Jd(this,"name",""),Jd(this,"lang",""),Jd(this,"segments",[]),Jd(this,"endSN",0)}}class ob extends ab{constructor(){super(...arguments),Jd(this,"mediaType",sb),Jd(this,"channels",0)}}class nb extends ab{constructor(){super(...arguments),Jd(this,"mediaType",rb)}}class lb{constructor(){Jd(this,"id",0),Jd(this,"bitrate",0),Jd(this,"width",0),Jd(this,"height",0),Jd(this,"name",""),Jd(this,"url",""),Jd(this,"audioCodec",""),Jd(this,"videoCodec",""),Jd(this,"textCodec",""),Jd(this,"audioGroup",""),Jd(this,"audioStreams",[]),Jd(this,"subtitleStreams",[]),Jd(this,"closedCaptionsStream",[])}}class db{constructor(){Jd(this,"version",0),Jd(this,"url",""),Jd(this,"type",""),Jd(this,"startCC",0),Jd(this,"endCC",0),Jd(this,"startSN",0),Jd(this,"endSN",0),Jd(this,"totalDuration",0),Jd(this,"targetDuration",0),Jd(this,"live",!0),Jd(this,"segments",[])}}class hb{constructor(){Jd(this,"sn",0),Jd(this,"cc",0),Jd(this,"url",""),Jd(this,"title",""),Jd(this,"start",0),Jd(this,"duration",0),Jd(this,"key",null),Jd(this,"byteRange",null),Jd(this,"isInitSegment",!1),Jd(this,"initSegment",null),Jd(this,"isLast",!1),Jd(this,"hasAudio",!1),Jd(this,"hasVideo",!1)}get end(){return this.start+this.duration}setTrackExist(e,t){this.hasVideo=e,this.hasAudio=t}setByteRange(e,t){this.byteRange=[0];const i=e.split("@");1===i.length&&t&&t.byteRange?(this.byteRange[0]=t.byteRange[1]||0,this.byteRange[0]&&(this.byteRange[0]+=1)):this.byteRange[0]=parseInt(i[1]),this.byteRange[1]=this.byteRange[0]+parseInt(i[0])-1}}class cb{constructor(e){Jd(this,"method",""),Jd(this,"url",""),Jd(this,"iv",null),Jd(this,"keyFormat",""),Jd(this,"keyFormatVersions",""),e instanceof cb&&(this.method=e.method,this.url=e.url,this.keyFormat=e.keyFormat,this.keyFormatVersions=e.keyFormatVersions,e.iv&&(this.iv=new Uint8Array(e.iv)))}clone(e){const t=new cb(this);return null!=e&&t.setIVFromSN(e),t}setIVFromSN(e){if(!this.iv&&"AES-128"===this.method&&"number"==typeof e&&this.url){this.iv=new Uint8Array(16);for(let t=12;t<16;t++)this.iv[t]=e>>8*(15-t)&255}}}class ub{static parse(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!e.includes("#EXTM3U"))throw new Error("Invalid m3u8 file");const i=function(e){return e.split(/[\r\n]/).map((e=>e.trim())).filter(Boolean)}(e);return ub.isMediaPlaylist(e)?function(e,t){const i=new db;i.url=t;let s,r=new hb,a=null,o=null,n=0,l=0,d=0,h=0,c=!1;for(;(s=e[h++])&&!c;){if("#"!==s[0]){r.sn=l,r.cc=d,r.url=ZA(s,t),o&&(r.key=o.clone(l)),a&&(r.initSegment=a),i.segments.push(r),r=new hb,l++;continue}const e=QA(s);if(!e)continue;const[h,u]=e;switch(h){case"VERSION":i.version=parseInt(u);break;case"PLAYLIST-TYPE":i.type=null==u?void 0:u.toUpperCase();break;case"TARGETDURATION":i.targetDuration=parseFloat(u);break;case"ENDLIST":{const e=i.segments[i.segments.length-1];e&&(e.isLast=!0),i.live=!1,c=!0}break;case"MEDIA-SEQUENCE":l=i.startSN=parseInt(u);break;case"DISCONTINUITY-SEQUENCE":d=i.startCC=parseInt(u);break;case"DISCONTINUITY":d++;break;case"BYTERANGE":r.setByteRange(u,i.segments[i.segments.length-1]);break;case"EXTINF":{const[e,t]=u.split(",");r.start=n,r.duration=parseFloat(e),n+=r.duration,r.title=t}break;case"KEY":{const e=XA(u);if("NONE"===e.METHOD){o=null;break}if("AES-128"!==e.METHOD)throw new Error(`encrypt ${e.METHOD}/${e.KEYFORMAT} is not supported`);if(o=new cb,o.method=e.METHOD,o.url=/^blob:/.test(e.URI)?e.URI:ZA(e.URI,t),o.keyFormat=e.KEYFORMAT||"identity",o.keyFormatVersions=e.KEYFORMATVERSIONS,e.IV){let t=e.IV.slice(2);t=(1&t.length?"0":"")+t,o.iv=new Uint8Array(t.length/2);for(let e=0,i=t.length/2;e<i;e++)o.iv[e]=parseInt(t.slice(2*e,2*e+2),16)}}break;case"MAP":{const e=XA(u);r.url=ZA(e.URI,t),e.BYTERANGE&&r.setByteRange(e.BYTERANGE),r.isInitSegment=!0,r.sn=0,o&&(r.key=o.clone(0)),a=r,r=new hb}}}const u=i.segments[i.segments.length-1];return u&&(i.endSN=u.sn),i.totalDuration=n,i.endCC=d,i}(i,t):function(e,t){const i=new ib;let s,r=0;const a=[],o=[];for(;s=e[r++];){const n=QA(s);if(!n)continue;const[l,d]=n;if("VERSION"===l)i.version=parseInt(d);else if("MEDIA"===l&&d){const e=XA(d);let i;switch(e.TYPE){case"AUDIO":i=new ob;break;case"SUBTITLES":i=new nb;break;default:i=new ab}i.url=ZA(e.URI,t),i.default="YES"===e.DEFAULT,i.autoSelect="YES"===e.AUTOSELECT,i.group=e["GROUP-ID"],i.name=e.NAME,i.lang=e.LANGUAGE,e.CHANNELS&&(i.channels=Number(e.CHANNELS.split("/")[0]),Number.isNaN(i.channels)&&(i.channels=0)),"AUDIO"===e.TYPE&&e.URI&&a.push(i),"SUBTITLES"===e.TYPE&&o.push(i)}else if("STREAM-INF"===l&&d){const s=new lb,a=XA(d);if(s.bitrate=parseInt(a["AVERAGE-BANDWIDTH"]||a.BANDWIDTH),s.name=a.NAME,s.url=ZA(e[r++],t),a.RESOLUTION){const[e,t]=a.RESOLUTION.split("x");s.width=parseInt(e),s.height=parseInt(t)}if(a.CODECS){const e=a.CODECS.split(/[ ,]+/).filter(Boolean);s.videoCodec=tb("video",e),s.audioCodec=tb("audio",e),s.textCodec=tb("text",e)}s.audioGroup=a.AUDIO,s.subtitleGroup=a.SUBTITLES,i.streams.push(s)}}return i.streams.forEach(((e,t)=>{e.id=t})),a.length&&(a.forEach(((e,t)=>{e.id=t})),i.streams.forEach((e=>{e.audioGroup&&(e.audioStreams=a.filter((t=>t.group===e.audioGroup)))}))),o.length&&(o.forEach(((e,t)=>{e.id=t})),i.streams.forEach((e=>{e.subtitleGroup&&(e.subtitleStreams=o.filter((t=>t.group===e.subtitleGroup)))}))),i}(i,t)}static isMediaPlaylist(e){return e.includes("#EXTINF:")||e.includes("#EXT-X-TARGETDURATION:")}}class pb{constructor(e){Jd(this,"_onLoaderRetry",((e,t)=>{this.hls.emit(Zs,{error:WA.network(e),retryTime:t})})),this.hls=e,this.player=e.player,this.TAG_NAME="HlsManifestLoader",this._timer=null;const{retryCount:t,retryDelay:i,loadTimeout:s,fetchOptions:r}=this.hls.config;this._loader=new NA({...r,responseType:"text",retry:t,retryDelay:i,timeout:s,onRetryError:this._onLoaderRetry},this.player),this._audioLoader=new NA({...r,responseType:"text",retry:t,retryDelay:i,timeout:s,onRetryError:this._onLoaderRetry},this.player),this._subtitleLoader=new NA({...r,responseType:"text",retry:t,retryDelay:i,timeout:s,onRetryError:this._onLoaderRetry},this.player)}async destroy(){await this.stopPoll(),this._audioLoader&&(this._audioLoader.destroy(),this._audioLoader=null),this._subtitleLoader&&(this._subtitleLoader.destroy(),this._subtitleLoader=null),this._loader&&(this._loader.destroy(),this._loader=null)}async load(e,t,i){this.player.debug.log(this.TAG_NAME,"load()",e,t,i);const s=[this._loader.load(e)];let r,a,o,n,l,d;t&&s.push(this._audioLoader.load(t)),i&&s.push(this._subtitleLoader.load(i));try{const[e,i,n]=await Promise.all(s);if(!e)return[];r=e.data,t?(a=null==i?void 0:i.data,o=null==n?void 0:n.data):o=null==i?void 0:i.data}catch(e){throw WA.network(e)}try{var h;if(n=ub.parse(r,e),!1===(null===(h=n)||void 0===h?void 0:h.live)&&n.segments&&!n.segments.length)throw new Error("empty segments list");a&&(l=ub.parse(a,t)),o&&(d=ub.parse(o,i))}catch(e){throw new WA($A,HA,e)}return n&&(n.isMaster?this.hls.emit(Js,{playlist:n}):this.hls.emit(qs,{playlist:n})),[n,l,d]}poll(e,t,i,s,r,a){clearTimeout(this._timer),a=a||3e3;let o=this.hls.config.pollRetryCount;const n=async()=>{clearTimeout(this._timer);try{const r=await this.load(e,t,i);if(!r[0])return;o=this.hls.config.pollRetryCount,s(r[0],r[1],r[2])}catch(e){o--,o<=0&&r(e)}this._timer=setTimeout(n,a)};this._timer=setTimeout(n,a)}stopPoll(){return clearTimeout(this._timer),this.cancel()}cancel(){return Promise.all([this._loader.cancel(),this._audioLoader.cancel()])}}class fb{constructor(){Jd(this,"_chunkSpeeds",[]),Jd(this,"_speeds",[])}addRecord(e,t){e&&t&&(this._speeds.push(8e3*e/t),this._speeds=this._speeds.slice(-3))}addChunkRecord(e,t){e&&t&&(this._chunkSpeeds.push(8e3*e/t),this._chunkSpeeds=this._chunkSpeeds.slice(-100))}getAvgSpeed(){return this._chunkSpeeds.length||this._speeds.length?this._speeds.length?this._speeds.reduce(((e,t)=>e+t))/this._speeds.length:this._chunkSpeeds.reduce(((e,t)=>e+t))/this._chunkSpeeds.length:0}getLatestSpeed(){return this._chunkSpeeds.length||this._speeds.length?this._speeds.length?this._speeds[this._speeds.length-1]:this._chunkSpeeds[this._chunkSpeeds.length-1]:0}reset(){this._chunkSpeeds=[],this._speeds=[]}}class mb{constructor(e){Jd(this,"_emitOnLoaded",((e,t)=>{const{data:i,response:s,option:r}=e,{firstByteTime:a,startTime:o,endTime:n,contentLength:l}=r||{},d=n-o;this._bandwidthService.addRecord(l||i.byteLength,d),this.hls.emit(tr,{time:d,byteLength:l,url:t}),this.hls.emit(ir,{url:t,elapsed:d||0}),this.hls.emit(Xs,{url:t,responseUrl:s.url,elapsed:a-o}),this.hls.emit(sr,{headers:s.headers})})),Jd(this,"_onLoaderRetry",((e,t)=>{this.hls.emit(Zs,{error:WA.network(e),retryTime:t})})),this.hls=e,this.player=e.player,this._bandwidthService=new fb;const{retryCount:t,retryDelay:i,loadTimeout:s,fetchOptions:r}=this.hls.config;this._segmentLoader=new NA({...r,responseType:"arraybuffer",retry:t,retryDelay:i,timeout:s,onRetryError:this._onLoaderRetry},this.player),this._audioSegmentLoader=new NA({...r,responseType:"arraybuffer",retry:t,retryDelay:i,timeout:s,onRetryError:this._onLoaderRetry},this.player),this._keyLoader=new NA({...r,responseType:"arraybuffer",retry:t,retryDelay:i,timeout:s,onRetryError:this._onLoaderRetry},this.player)}destroy(){this.reset(),this._keyLoader&&(this._keyLoader.destroy(),this._keyLoader=null),this._audioSegmentLoader&&(this._audioSegmentLoader.destroy(),this._audioSegmentLoader=null),this._segmentLoader&&(this._segmentLoader.destroy(),this._segmentLoader=null)}speedInfo(){return{speed:this._bandwidthService.getLatestSpeed(),avgSpeed:this._bandwidthService.getAvgSpeed()}}resetBandwidth(){this._bandwidthService.reset()}load(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i;const r=[];return e&&(r[0]=this.loadVideoSegment(e,i)),t&&(r[1]=this.loadAudioSegment(t,s)),Promise.all(r)}loadVideoSegment(e,t){return this._loadSegment(this._segmentLoader,e,t)}loadAudioSegment(e,t){return this._loadSegment(this._audioSegmentLoader,e,t)}async _loadSegment(e,t,i){var s;let r,a,o,n,l;const d=[];if(this.hls.emit(er,{url:t.url}),d[0]=e.load(t.url),i&&t.initSegment){var h;const i=t.initSegment.url;r=this._mapCache[i],r||(this.hls.emit(er,{url:i}),d[1]=e.load(i).then((e=>{if(e){Object.keys(this._mapCache)>30&&(this._mapCache={}),r=this._mapCache[i]=e.data,this._emitOnLoaded(e,i)}})));const s=null===(h=t.initSegment.key)||void 0===h?void 0:h.url;s&&(l=t.initSegment.key.iv,n=this._keyCache[s],n||(this.hls.emit(er,{url:s}),d[2]=this._keyLoader.load(s).then((e=>{e&&(n=this._keyCache[s]=e.data,this._emitOnLoaded(e,s))}))))}const c=null===(s=t.key)||void 0===s?void 0:s.url;c&&(o=t.key.iv,a=this._keyCache[c],a||(this.hls.emit(er,{url:c}),d[3]=this._keyLoader.load(c).then((e=>{e&&(a=this._keyCache[c]=e.data,this._emitOnLoaded(e,c))}))));const[u]=await Promise.all(d);if(!u)return;const p=u.data;return this._emitOnLoaded(u,t.url),{data:p,map:r,key:a,mapKey:n,keyIv:o,mapKeyIv:l}}reset(){this.error=null,this._mapCache={},this._keyCache={},this._bandwidthService.reset()}async cancel(){await Promise.all([this._keyLoader.cancel(),this._segmentLoader.cancel(),this._audioSegmentLoader.cancel()])}}class gb{constructor(e,t,i){this.live=void 0,this.id=0,this.bitrate=0,this.width=0,this.height=0,this.name="",this.url="",this.audioCodec="",this.videoCodec="",this.textCodec="",this.startCC=0,this.endCC=0,this.startSN=0,this.endSN=-1,this.totalDuration=0,this.targetDuration=0,this.snDiff=null,this.segments=[],this.audioStreams=[],this.subtitleStreams=[],this.closedCaptions=[],this.currentAudioStream=null,this.currentSubtitleStream=null,this.TAG_NAME="HlsStream",this.update(e,t,i)}get lastSegment(){return this.segments.length?this.segments[this.segments.length-1]:null}get segmentDuration(){var e;return this.targetDuration||(null===(e=this.segments[0])||void 0===e?void 0:e.duration)||0}get liveEdge(){return this.endTime}get endTime(){var e;return(null===(e=this.lastSegment)||void 0===e?void 0:e.end)||0}get currentSubtitleEndSn(){var e;return(null===(e=this.currentSubtitleStream)||void 0===e?void 0:e.endSN)||0}clearOldSegment(e,t){return this._clearSegments(e,t)}getAudioSegment(e){if(!e||!this.currentAudioStream)return;const t=e.sn-this.snDiff;return this.currentAudioStream.segments.find((e=>e.sn===t))}update(e,t){this.url=e.url,Array.isArray(e.segments)?(null!==this.live&&void 0!==this.live||(this.live=e.live),this._updateSegments(e,this),this.startCC=e.startCC,this.endCC=e.endCC,this.startSN=e.startSN,this.endSN=e.endSN||-1,this.totalDuration=e.totalDuration,this.targetDuration=e.targetDuration,this.live=e.live,t&&this.currentAudioStream&&Array.isArray(t.segments)&&(this._updateSegments(t,this.currentAudioStream),(null===this.snDiff||void 0===this.snDiff)&&e.segments.length&&t.segments.length&&(this.snDiff=e.segments[0].sn-t.segments[0].sn))):(this.id=e.id,this.bitrate=e.bitrate,this.width=e.width,this.height=e.height,this.name=e.name,this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.textCodec=e.textCodec,this.audioStreams=e.audioStreams,this.subtitleStreams=e.subtitleStreams,!this.currentAudioStream&&this.audioStreams.length&&(this.currentAudioStream=this.audioStreams.find((e=>e.default))||this.audioStreams[0]),!this.currentSubtitleStream&&this.subtitleStreams.length&&(this.currentSubtitleStream=this.subtitleStreams.find((e=>e.default))||this.subtitleStreams[0]))}updateSubtitle(e){if(!(e&&this.currentSubtitleStream&&Array.isArray(e.segments)))return;const t=this._updateSegments(e,this.currentSubtitleStream),i=this.currentSubtitleStream.segments;return i.length>100&&(this.currentSubtitleStream.segments=i.slice(100)),t?t.map((e=>({sn:e.sn,url:e.url,duration:e.duration,start:e.start,end:e.end,lang:this.currentSubtitleStream.lang}))):void 0}switchSubtitle(e){const t=this.subtitleStreams.find((t=>t.lang===e)),i=this.currentSubtitleStream;t&&(this.currentSubtitleStream=t,i.segments=[])}_clearSegments(e,t){let i=0;const s=this.segments;for(let t=0,r=s.length;t<r;t++)if(s[t].end>=e){i=t;break}return i>t&&(i=t),i&&(this.segments=this.segments.slice(i),this.currentAudioStream&&(this.currentAudioStream.segments=this.currentAudioStream.segments.slice(i))),t-i}_updateSegments(e,t){const i=t.segments;if(this.live){const s=i[i.length-1],r=(null==s?void 0:s.sn)||-1;if(r<e.endSN&&e.segments.length){const a=e.segments.findIndex((e=>e.sn===r)),o=a<0?e.segments:e.segments.slice(a+1);if(i.length&&o.length){let e=s.end;o.forEach((t=>{t.start=e,e=t.end}));const t=(null==s?void 0:s.cc)||-1;t>o[0].cc&&o.forEach((e=>e.cc+=t))}return t.endSN=e.endSN,t.segments=i.concat(o),o}}else t.segments=e.segments}}class yb{constructor(e){this.hls=e,this.player=e.player,this.streams=[],this.currentStream=null,this.dvrWindow=0,this._segmentPointer=-1,this.TAG_NAME="HlsPlaylist"}destroy(){this.reset()}get lastSegment(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.lastSegment}get currentSegment(){var e;return null===(e=this.currentSegments)||void 0===e?void 0:e[this._segmentPointer]}get nextSegment(){var e;return null===(e=this.currentSegments)||void 0===e?void 0:e[this._segmentPointer+1]}get currentSegments(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.segments}get currentSubtitleEndSn(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.currentSubtitleEndSn}get liveEdge(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.liveEdge}get totalDuration(){var e;return(null===(e=this.currentStream)||void 0===e?void 0:e.totalDuration)||0}get seekRange(){const e=this.currentSegments;if(e&&e.length)return[e[0].start,e[e.length-1].end]}get isEmpty(){var e;return!(null!==(e=this.currentSegments)&&void 0!==e&&e.length)}get isLive(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.live}get hasSubtitle(){var e;return!(null===(e=this.currentStream)||void 0===e||!e.currentSubtitleStream)}getAudioSegment(e){var t;return null===(t=this.currentStream)||void 0===t?void 0:t.getAudioSegment(e)}moveSegmentPointer(e){var t;null==e&&(e=this._segmentPointer+1),this._segmentPointer=ca(e,-1,null===(t=this.currentSegments)||void 0===t?void 0:t.length),this.player.debug.log(this.TAG_NAME,`moveSegmentPointer() and param pos is ${e} and clamp result is ${this._segmentPointer}`)}reset(){this.streams=[],this.currentStream=null,this.dvrWindow=0,this._segmentPointer=-1}getSegmentByIndex(e){var t;return null===(t=this.currentSegments)||void 0===t?void 0:t[e]}setNextSegmentByIndex(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this._segmentPointer=e-1,this.player.debug.log(this.TAG_NAME,"setNextSegmentByIndex()",e,this._segmentPointer)}findSegmentIndexByTime(e){const t=this.currentSegments;if(t){for(let i,s=0,r=t.length;s<r;s++)if(i=t[s],e>=i.start&&e<i.end)return s;const i=t[t.length-1];if(Math.abs(e-(null==i?void 0:i.end))<.2)return t.length-1}}upsertPlaylist(e,t,i){if(!e)return void this.player.debug.warn(this.TAG_NAME,"upsertPlaylist() playlist is null");if(e.isMaster)this.streams.length=e.streams.length,e.streams.filter((e=>e.url)).forEach(((e,t)=>{this.streams[t]?this.streams[t].update(e):this.streams[t]=new gb(e)})),this.currentStream=this.streams[0];else if(Array.isArray(e.segments)){const s=this.currentStream;if(s){s.update(e,t,i);const r=s.updateSubtitle(i);r&&this.hls.emit(Ws,{list:r})}else this.reset(),this.currentStream=this.streams[0]=new gb(e,t,i)}this.currentStream&&this.hls.isLive&&!this.dvrWindow&&(this.dvrWindow=this.currentSegments.reduce(((e,t)=>e+=t.duration),0))}switchSubtitle(e){var t;null===(t=this.currentStream)||void 0===t||t.switchSubtitle(e)}clearOldSegment(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;const t=this.currentStream;if(!this.dvrWindow||!t)return;const i=t.endTime-this.dvrWindow;if(i<=0)return void this.player.debug.log(this.TAG_NAME,`clearOldSegment() stream.endTime:${t.endTime}, this.dvrWindow:${this.dvrWindow} startTime <= 0`);const s=t.segments;if(s.length<=e)return void this.player.debug.log(this.TAG_NAME,`clearOldSegment() segments.length:${s.length} <= maxPlaylistSize:${e}`);const r=this._segmentPointer;this._segmentPointer=t.clearOldSegment(i,r),this.player.debug.log(this.TAG_NAME,"clearOldSegment() update _segmentPointer:",r,this._segmentPointer),this.player.debug.log(this.TAG_NAME,"currentSegments",this.currentSegments)}checkSegmentTrackChange(e,t){const i=this.findSegmentIndexByTime(e),s=this.getSegmentByIndex(i);if(!s)return;if(!s.hasAudio&&!s.hasVideo)return;if(2!==t&&s.hasAudio&&s.hasVideo)return s;if(s.end-e>.3)return;const r=this.getSegmentByIndex(i+1);return r&&(r.hasAudio||r.hasVideo)&&(r.hasAudio!==s.hasAudio||r.hasVideo!==s.hasVideo)?r:void 0}}class Ab{constructor(e,t){this.hls=e,this.player=t;const i=window.crypto||window.msCrypto;this.subtle=i&&(i.subtle||i.webkitSubtle),this.externalDecryptor=null}decrypt(e,t){if(!e&&!t)return;const i=[];return e&&(i[0]=this._decryptSegment(e)),t&&(i[1]=this._decryptSegment(t)),Promise.all(i)}async _decryptSegment(e){let t=e.data;return e.key&&(t=await this._decryptData(e.data,e.key,e.keyIv)),e.map?ih(e.map,t):t}async _decryptData(e,t,i){if(this.externalDecryptor)return await this.externalDecryptor.decrypt(e,t,i);if(this.subtle){const s=await this.subtle.importKey("raw",t,{name:"AES-CBC"},!1,["encrypt","decrypt"]),r=await this.subtle.decrypt({name:"AES-CBC",iv:i},s,e);return new Uint8Array(r)}e=Ad(e),t=Ad(t),i=Ad(i);return function(e){const{words:t}=e,{sigBytes:i}=e,s=new Uint8Array(i);for(let e=0;e<i;e+=1)s[e]=t[e>>>2]>>>24-e%4*8&255;return s}(gd.AES.decrypt({ciphertext:e},t,{iv:i,mode:gd.mode.CBC}))}}class bb extends Ud{constructor(e){super(e),this.player=e,this._pmtId=-1,this._remainingPacketData=null,this._videoPesData=[],this._audioPesData=[],this._gopId=0,this._videoPid=-1,this._audioPid=-1,this._codecType=vt,this._audioCodecType=Et,this._vps=null,this._sps=null,this._pps=null,this.TAG_NAME="HlsTsLoader",this._isForHls=!0,this.videoTrack=bb.initVideoTrack(),this.audioTrack=bb.initAudioTrack(),this._baseDts=-1,this._baseDtsInited=!1,this._basefps=25,this._baseFpsInterval=null,this._tempSampleTsList=[],this._hasAudio=!1,this._hasVideo=!1,this._audioNextPts=void 0,this._videoNextDts=void 0,this._audioTimestampBreak=!1,this._videoTimestampBreak=!1,this._lastAudioExceptionGapDot=0,this._lastAudioExceptionOverlapDot=0,this._lastAudioExceptionLargeGapDot=0,this._isSendAACSeqHeader=!1,this.workerClearTimeout=null,this.workerUrl=null,this.loopWorker=null,this.tempSampleListInfo={},this._isUseWorker()&&this._initLoopWorker(),this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.workerUrl&&(URL.revokeObjectURL(this.workerUrl),this.workerUrl=null),this.workerClearTimeout&&(clearTimeout(this.workerClearTimeout),this.workerClearTimeout=null),this.loopWorker&&(this.loopWorker.postMessage({cmd:"destroy"}),this.loopWorker.terminate(),this.loopWorker=null),this._stopDecodeLoopInterval(),this.videoTrack=null,this.audioTrack=null,this.tempSampleListInfo={},this._baseDts=-1,this._baseDtsInited=!1,this._basefps=25,this._hasCalcFps=!1,this._audioNextPts=void 0,this._videoNextDts=void 0,this._audioTimestampBreak=!1,this._videoTimestampBreak=!1,this._lastAudioExceptionGapDot=0,this._lastAudioExceptionOverlapDot=0,this._lastAudioExceptionLargeGapDot=0,this._isForHls=!0,this._isSendAACSeqHeader=!1,this.player.debug.log(this.TAG_NAME,"destroy")}static initVideoTrack(){return{samples:[]}}static initAudioTrack(){return{samples:[]}}static probe(e){return!!e.length&&(71===e[0]&&71===e[188]&&71===e[376])}_parsePES(e){const t=e[8];if(null==t||e.length<t+9)return;const i=e[0]<<16|e[1]<<8|e[2];if(1!==i)return this.player.debug.warn(this.TAG_NAME,`_parsePES startPrefix should be 1 but with value ${i}`),{error:!0,code:"startPrefixError"};const s=(e[4]<<8)+e[5];if(s&&s>e.length-6)return;let r,a;const o=e[7];return 192&o&&(r=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,64&o?(a=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2,r-a>54e5&&(r=a)):a=r),{data:e.subarray(9+t),pts:r,dts:a,originalPts:r,originalDts:a}}_demux(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];t&&(this._pmtId=-1,this.videoTrack=bb.initVideoTrack(),this.audioTrack=bb.initAudioTrack()),!i||t?(this._remainingPacketData=null,this._videoPesData=[],this._audioPesData=[]):(this.videoTrack.samples=[],this.audioTrack.samples=[],this._remainingPacketData&&(e=ih(this._remainingPacketData,e),this._remainingPacketData=null));let s=e.length;const r=s%188;r&&(this._remainingPacketData=e.subarray(s-r),s-=r);for(let t=0;t<s;t+=188){if(71!==e[t])throw new Error("TS packet did not start with 0x47");const i=!!(64&e[t+1]),s=((31&e[t+1])<<8)+e[t+2];let r;if((48&e[t+3])>>4>1){if(r=t+5+e[t+4],r===t+188)continue}else r=t+4;switch(s){case 0:i&&(r+=e[r]+1),this._pmtId=(31&e[r+10])<<8|e[r+11];break;case this._pmtId:{i&&(r+=e[r]+1);const t=r+3+((15&e[r+1])<<8|e[r+2])-4;for(r+=12+((15&e[r+10])<<8|e[r+11]);r<t;){const t=(31&e[r+1])<<8|e[r+2];switch(e[r]){case 15:this._audioPid=t,this._audioCodecType=Et;break;case 27:if(-1!==this._videoPid)break;this._videoPid=t,this._codecType=vt;break;case 36:if(-1!==this._videoPid)break;this._videoPid=t,this._codecType=wt;break;default:this.player.debug.log(this.TAG_NAME,`Unsupported stream. type: ${e[r]}, pid: ${t}`)}r+=5+((15&e[r+3])<<8|e[r+4])}}break;case this._videoPid:i&&this._videoPesData.length&&this._parseVideoData(),this._videoPesData.push(e.subarray(r,t+188));break;case this._audioPid:i&&this._audioPesData.length&&this._parseAudioData(),this._audioPesData.push(e.subarray(r,t+188));break;case 17:case 8191:break;default:this.player.debug.log(this.TAG_NAME,`Unknown pid: ${s}`)}}this._parseVideoData(),this._parseAudioData(),this.audioTrack.formatTimescale=this.videoTrack.formatTimescale=this.videoTrack.timescale=9e4,this.audioTrack.timescale=this.audioTrack.sampleRate||0}demuxAndFix(e,t,i,s){this.player._times.demuxStart||(this.player._times.demuxStart=ha()),this._demux(e,t,i),this._fix(s,t,i)}_parseVideoData(){if(!this._videoPesData.length)return void this.player.debug.log(this.TAG_NAME,"_parseVideoData","no video pes data");const e=this._parsePES(ih(...this._videoPesData));if(!e||e.error)return void(e&&"startPrefixError"===e.code&&(this._videoPesData=[]));const t=function(e){const t=e.length;let i=2,s=0;for(;null!==e[i]&&void 0!==e[i]&&1!==e[i];)i++;if(i++,s=i+2,s>=t)return[];const r=[];for(;s<t;)switch(e[s]){case 0:if(0!==e[s-1]){s+=2;break}if(0!==e[s-2]){s++;break}i!==s-2&&r.push(e.subarray(i,s-2));do{s++}while(1!==e[s]&&s<t);i=s+1,s=i+2;break;case 1:if(0!==e[s-1]||0!==e[s-2]){s+=3;break}i!==s-2&&r.push(e.subarray(i,s-2)),i=s+1,s=i+2;break;default:s+=3}return i<t&&r.push(e.subarray(i)),r}(e.data);t?this._createVideoSample(t,e.pts,e.dts):this.player.debug.warn(this.TAG_NAME,"Cannot parse avc units",e),this._videoPesData=[]}_createVideoSample(e,t,i){if(!e.length)return;const s=this._codecType===wt,r={isIFrame:!1,type:Ge,isHevc:s,vps:null,sps:null,pps:null,pts:t,dts:i,payload:null};e.forEach((e=>{const t=s?e[0]>>>1&63:31&e[0];switch(t){case 5:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:if(!s&&5!==t||s&&5===t)break;r.isIFrame=!0,this._gopId++;break;case 6:case 39:case 40:if(!s&&6!==t||s&&6===t)break;return void function(e,t){const i=e.length;let s=t?2:1,r=0,a=0,o="";for(;255===e[s];)r+=255,s++;for(r+=e[s++];255===e[s];)a+=255,s++;if(a+=e[s++],5===r&&i>s+16)for(let t=0;t<16;t++)o+=e[s].toString(16),s++;e.subarray(s)}(function(e){const t=e.byteLength,i=[];let s=1;for(;s<t-2;)0===e[s]&&0===e[s+1]&&3===e[s+2]?(i.push(s+2),s+=2):s++;if(!i.length)return e;const r=t-i.length,a=new Uint8Array(r);let o=0;for(s=0;s<r;o++,s++)o===i[0]&&(o++,i.shift()),a[s]=e[o];return a}(e),s);case 32:if(!s)break;r.vps||(r.vps=e);break;case 7:case 33:if(!s&&7!==t||s&&7===t)break;r.sps||(r.sps=e);break;case 8:case 34:if(!s&&8!==t||s&&8===t)break;r.pps||(r.pps=e)}if(s&&qn(t)||!s&&Mn(t)){const t=aa(e);if(r.payload){const e=new Uint8Array(r.payload.byteLength+t.byteLength);e.set(r.payload,0),e.set(t,r.payload.byteLength),r.payload=e}else r.payload=t}}));let a=null;s?r.sps&&r.vps&&r.pps&&(a=Vn({vps:r.vps,sps:r.sps,pps:r.pps})):r.sps&&r.pps&&(a=Ln({sps:r.sps,pps:r.pps})),a&&(this.player.debug.log(this.TAG_NAME,"_createVideoSample","seqHeader"),this._doDecodeByHls(a,Ge,Math.round(r.pts/90),!0,0)),r.isIFrame&&this.calcIframeIntervalTimestamp(Math.round(r.dts/90)),this.videoTrack.samples=this.videoTrack.samples.concat(r)}_parseAudioData(){if(!this._audioPesData.length)return;if(!this.player._opt.hasAudio)return;const e=this._parsePES(ih(...this._audioPesData));if(e&&!e.error){if(this._audioCodecType===Et){const t=function(e,t){const i=e.length;let s=0;for(;s+2<i&&(255!==e[s]||240!=(246&e[s+1]));)s++;if(s>=i)return;const r=s,a=[],o=(60&e[s+2])>>>2,n=zr[o];if(!n)throw new Error(`Invalid sampling index: ${o}`);const l=1+((192&e[s+2])>>>6),d=(1&e[s+2])<<2|(192&e[s+3])>>>6;let h,c,u=0;const p=Kr(n);for(;s+7<i;)if(255===e[s]&&240==(246&e[s+1])){if(c=(3&e[s+3])<<11|e[s+4]<<3|(224&e[s+5])>>5,i-s<c)break;h=2*(1&~e[s+1]),a.push({pts:t+u*p,data:e.subarray(s+7+h,s+c)}),u++,s+=c}else s++;return{skip:r,remaining:s>=i?void 0:e.subarray(s),frames:a,samplingFrequencyIndex:o,sampleRate:n,objectType:l,channelCount:d,originCodec:`mp4a.40.${l}`}}(e.data,e.originalPts);if(t){if(this.audioTrack.codec=t.codec,this.audioTrack.sampleRate=t.sampleRate,this.audioTrack.channelCount=t.channelCount,!this._isSendAACSeqHeader){const e=Vr({profile:t.objectType,sampleRate:t.samplingFrequencyIndex,channel:t.channelCount});this._isSendAACSeqHeader=!0,this.player.debug.log(this.TAG_NAME,"aac seq header",`profile: ${t.objectType}, sampleRate:${t.sampleRate},sampleRateIndex: ${t.samplingFrequencyIndex}, channel: ${t.channelCount}`),this._doDecodeByHls(e,je,0,!1,0)}if(this._isSendAACSeqHeader){const e=[];t.frames.forEach((t=>{const i=t.pts,s=new Uint8Array(t.data.length+2);s.set([175,1],0),s.set(t.data,2);const r={type:je,pts:i,dts:i,payload:s};e.push(r)})),this.audioTrack.samples=this.audioTrack.samples.concat(e)}else this.player.debug.warn(this.TAG_NAME,"aac seq header not send")}else this.player.debug.warn(this.TAG_NAME,"aac parseADTS error")}this._audioPesData=[]}else e&&"startPrefixError"===e.code&&(this._audioPesData=[])}_fix(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e=Math.round(9e4*e);const s=this.videoTrack,r=this.audioTrack,a=s.samples,o=r.samples;if(!a.length&&!o.length)return;const n=a[0],l=o[0];let d=0;if(a.length&&o.length&&(d=n.dts-l.pts),this._baseDtsInited||this._calculateBaseDts(),t&&(this._calculateBaseDts(),this._baseDts-=e),!i){this._videoNextDts=d>0?e+d:e,this._audioNextPts=d>0?e:e-d;const t=n?n.dts-this._baseDts-this._videoNextDts:0,i=l?l.pts-this._baseDts-this._audioNextPts:0;Math.abs(t||i)>Pr&&(this._calculateBaseDts(this.audioTrack,this.videoTrack),this._baseDts-=e)}this._resetBaseDtsWhenStreamBreaked(),this._fixAudio(r),this._fixVideo(s);let h=s.samples.concat(r.samples);h=h.map((e=>(e.dts=Math.round(e.dts/90),e.pts=Math.round(e.pts/90),e.cts=e.pts-e.dts,e))).sort(((e,t)=>e.dts-t.dts)),h.forEach((e=>{const t=new Uint8Array(e.payload);delete e.payload,this._isUseWorker()?this.loopWorker.postMessage({...e,payload:t,cmd:"sample"},[t.buffer]):e.type===Ge?this._doDecodeVideo({...e,payload:t}):e.type===je&&this._doDecodeAudio({...e,payload:t})})),Ao(this._hasCalcFps)&&this._isUseWorker()&&(this._hasCalcFps=!0,this._calcDecodeFps(h))}_isUseWorker(){return!this.player.isUseMSE()&&this.isForHls()}_calculateBaseDts(){const e=this.audioTrack,t=this.videoTrack,i=e.samples,s=t.samples;if(!i.length&&!s.length)return!1;let r=1/0,a=1/0;i.length&&(e.baseDts=r=i[0].pts),s.length&&(t.baseDts=a=s[0].dts),this._baseDts=Math.min(r,a);const o=a-r;return Number.isFinite(o)&&Math.abs(o)>45e3&&this.player.debug.warn(this.TAG_NAME,`large av first frame gap,\n video pts: ${a},\n audio pts: ${r},\n base dts: ${this._baseDts},\n detect is: ${o}`),this._baseDtsInited=!0,!0}_resetBaseDtsWhenStreamBreaked(){if(this._baseDtsInited&&this._videoTimestampBreak&&this._audioTimestampBreak){if(!this._calculateBaseDts(this.audioTrack,this.videoTrack))return;this._baseDts-=Math.min(this._audioNextPts,this._videoNextDts),this._audioLastSample=null,this._videoLastSample=null,this._videoTimestampBreak=!1,this._audioTimestampBreak=!1}}_fixAudio(e){const t=e.samples;t.length&&(t.forEach((e=>{e.pts-=this._baseDts,e.dts=e.pts})),this._doFixAudioInternal(e,t,9e4))}_fixVideo(e){const t=e.samples;if(!t.length)return;if(t.forEach((e=>{e.dts-=this._baseDts,e.pts-=this._baseDts})),void 0===this._videoNextDts){const e=t[0];this._videoNextDts=e.dts}const i=t.length;let s=0;const r=t[0],a=t[1],o=this._videoNextDts-r.dts;let n;Math.abs(o)>45e3&&(r.dts+=o,r.pts+=o,this.player.debug.warn(this.TAG_NAME,`large video gap between chunk,\n next dts is ${this._videoNextDts},\n first dts is ${r.dts},\n next dts is ${a.dts},\n duration is ${o}`),a&&Math.abs(a.dts-r.dts)>Pr&&(this._videoTimestampBreak=!0,t.forEach(((e,t)=>{0!==t&&(e.dts+=o,e.pts+=o)}))));const l=e.samples[0],d=e.samples[i-1];n=1===i?9e3:Math.floor((d.dts-l.dts)/(i-1));for(let r=0;r<i;r++){const a=t[r].dts,o=t[r+1];if(s=r<i-1?o.dts-a:t[r-1]?Math.min(a-t[r-1].dts,n):n,s>Pr||s<0){this._videoTimestampBreak=!0,s=this._audioTimestampBreak?n:Math.max(s,2700);const i=this._audioNextPts||0;o&&o.dts>i&&(s=n),this.player.debug.warn(this.TAG_NAME,`large video gap between frames,\n time is ${a/e.timescale},\n dts is ${a},\n origin dts is ${t[r].originalDts},\n next dts is ${this._videoNextDts},\n sample Duration is ${s} ,\n ref Sample DurationInt is ${n}`)}t[r].duration=s,this._videoNextDts+=s}}_doFixAudioInternal(e,t,i){e.sampleDuration||(e.sampleDuration=Kr(e.timescale,i));const s=e.sampleDuration;if(void 0===this._audioNextPts){const e=t[0];this._audioNextPts=e.pts}for(let i=0;i<t.length;i++){const r=this._audioNextPts,a=t[i],o=a.pts-r;if(!this._audioTimestampBreak&&o>=3*s&&o<=Lr&&!Sa()){qr(e.codec,e.channelCount)||t[0].data.subarray();const n=Math.floor(o/s);Math.abs(a.pts-this._lastAudioExceptionGapDot)>Ir&&(this._lastAudioExceptionGapDot=a.pts),this.player.debug.warn(this.TAG_NAME,`audio gap detected,\n pts is ${t.pts},\n originPts is ${t.originalPts},\n count is ${n},\n nextPts is ${r},\n ref sample duration is ${s}`);for(let e=0;e<n;e++)this._audioNextPts+=s,i++;i--}else o<=-3*s&&o>=-9e4?(Math.abs(a.pts-this._lastAudioExceptionOverlapDot)>Ir&&(this._lastAudioExceptionOverlapDot=a.pts,this.player.debug.warn(this.TAG_NAME,`audio overlap detected,\n pts is ${a.pts},\n originPts is ${a.originalPts},\n nextPts is ${r},\n ref sample duration is ${s}`)),t.splice(i,1),i--):(Math.abs(o)>=Lr&&(this._audioTimestampBreak=!0,Math.abs(a.pts-this._lastAudioExceptionLargeGapDot)>Ir&&(this._lastAudioExceptionLargeGapDot=a.pts,this.player.debug.warn(this.TAG_NAME,`large audio gap detected,\n time is ${a.pts/1e3}\n pts is ${a.pts},\n originPts is ${a.originalPts},\n nextPts is ${r},\n sample duration is ${o}\n ref sample duration is ${s}`))),a.dts=a.pts=r,this._audioNextPts+=s)}}_calcDecodeFps(e){const t=ho(e.map((e=>({ts:e.dts||e.pts,type:e.type}))),Ge);t&&(this.player.debug.log(this.TAG_NAME,`_calcDecodeFps() video fps is ${t}, update base fps is ${this._basefps}`),this._basefps=t),this._postMessageToLoopWorker("updateBaseFps",{baseFps:this._basefps})}_initLoopWorker(){this.player.debug.log(this.TAG_NAME,"_initLoopWorker()");const e=Eo(function(){const e=1,t=2;let i=new class{constructor(){this.baseFps=0,this.fpsInterval=null,this.preLoopTimestamp=null,this.startBpsTime=null,this.allSampleList=[]}destroy(){this._clearInterval(),this.baseFps=0,this.allSampleList=[],this.preLoopTimestamp=null,this.startBpsTime=null}updateBaseFps(e){this.baseFps=e,this._clearInterval(),this._startInterval()}pushSample(e){delete e.cmd,this.allSampleList.push(e)}_startInterval(){const e=Math.ceil(1e3/this.baseFps);this.fpsInterval=setInterval((()=>{let t=(new Date).getTime();this.preLoopTimestamp||(this.preLoopTimestamp=t),this.startBpsTime||(this.startBpsTime=t);const i=t-this.preLoopTimestamp;if(i>2*e&&console.warn(`JbPro:[TsLoader LoopWorker] loop interval is ${i}ms, more than ${e} * 2ms`),this._loop(),this.preLoopTimestamp=(new Date).getTime(),this.startBpsTime){t-this.startBpsTime>=1e3&&(this._calcSampleList(),this.startBpsTime=t)}}),e)}_clearInterval(){this.fpsInterval&&(clearInterval(this.fpsInterval),this.fpsInterval=null)}_calcSampleList(){const i={buferredDuration:0,allListLength:this.allSampleList.length,audioListLength:0,videoListLength:0};this.allSampleList.forEach((s=>{s.type===t?(i.videoListLength++,s.duration&&(i.buferredDuration+=Math.round(s.duration/90))):s.type===e&&i.audioListLength++})),postMessage({cmd:"sampleListInfo",...i})}_loop(){let i=null;if(this.allSampleList.length)if(i=this.allSampleList.shift(),i.type===t){postMessage({cmd:"decodeVideo",...i},[i.payload.buffer]);let t=this.allSampleList[0];for(;t&&t.type===e;)i=this.allSampleList.shift(),postMessage({cmd:"decodeAudio",...i},[i.payload.buffer]),t=this.allSampleList[0]}else i.type===e&&(postMessage({cmd:"decodeAudio",...i},[i.payload.buffer]),this.allSampleList.length&&this.allSampleList[0].type===t&&(i=this.allSampleList.shift(),postMessage({cmd:"decodeVideo",...i},[i.payload.buffer])))}};self.onmessage=e=>{const t=e.data;switch(t.cmd){case"updateBaseFps":i.updateBaseFps(t.baseFps);break;case"sample":i.pushSample(t);break;case"destroy":i.destroy(),i=null}}}.toString()),t=new Blob([e],{type:"text/javascript"}),i=URL.createObjectURL(t);let s=new Worker(i);this.workerUrl=i,this.workerClearTimeout=setTimeout((()=>{window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null,this.workerClearTimeout=null}),ie),s.onmessage=e=>{const t=e.data;switch(t.cmd){case"decodeVideo":this._doDecodeVideo(t);break;case"decodeAudio":this._doDecodeAudio(t);break;case"sampleListInfo":this.tempSampleListInfo=t}},this.loopWorker=s}_postMessageToLoopWorker(e,t){this._isUseWorker()&&(this.loopWorker?this.loopWorker.postMessage({cmd:e,...t}):this.player.debug.warn(this.TAG_NAME,"loop worker is not init, can not post message"))}_doDecodeAudio(e){const t=new Uint8Array(e.payload);this.player.updateStats({abps:t.byteLength});let i=t;yo(this.player._opt.m7sCryptoAudio)&&(i=this.cryptoPayloadAudio(t)),this.isForHls()?this._doDecodeByHls(i,je,e.dts,!1,0):this._doDecodeByTs(i,je,e.dts,!1,0)}_doDecodeVideo(e){const t=new Uint8Array(e.payload);let i=null;i=e.isHevc?Wn(t,e.isIFrame):In(t,e.isIFrame),this.player.updateStats({dts:e.dts,vbps:i.byteLength});const s=e.pts-e.dts;let r=this.cryptoPayload(i,e.isIFrame);this.isForHls()?this._doDecodeByHls(r,Ge,e.dts,e.isIFrame,s):this._doDecodeByTs(r,Ge,e.dts,e.isIFrame,s)}_stopDecodeLoopInterval(){this._baseFpsInterval&&(clearInterval(this._baseFpsInterval),this._baseFpsInterval=null)}getBuferredDuration(){return this.tempSampleListInfo.buferredDuration||0}getSampleListLength(){return this.tempSampleListInfo.allListLength||0}getSampleAudioListLength(){return this.tempSampleListInfo.audioListLength||0}getSampleVideoListLength(){return this.tempSampleListInfo.videoListLength||0}isForHls(){return this._isForHls}getInputByteLength(){return this._remainingPacketData&&this._remainingPacketData.byteLength||0}}function _b(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<8)+(e[t+1]||0)}function vb(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}function wb(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const i=Math.pow(2,32);return vb(e,t)*i+vb(e,t+4)}const Sb="aac",Tb="g7110a",Eb="g7110m",kb="avc",Cb="hevc";class xb{static getFrameDuration(e){return 1024*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4)/e}static getRateIndexByRate(e){return xb.FREQ.indexOf(e)}}function Rb(e,t,i,s,r,a){const o=[],n=null==r?void 0:r.entries,l=t.entries,d=s.entries,h=i.entrySizes,c=null==a?void 0:a.entries;let u,p,f;c&&(u={},c.forEach((e=>{u[e-1]=!0}))),n&&(p=[],n.forEach((e=>{let{count:t,offset:i}=e;for(let e=0;e<t;e++)p.push(i)})));let m=-1,g=0,y=0,A=0,b=0,_=0,v=l[0].samplesPerChunk,w=l[1]?l[1].firstChunk-1:1/0;return e.entries.forEach((e=>{let{count:t,delta:s}=e;for(let e=0;e<t;e++)f={dts:g,duration:s,size:h[y]||i.sampleSize,offset:d[A]+_,index:y},c&&(f.keyframe=u[y],f.keyframe&&m++,f.gopId=m),p&&y<p.length&&(f.pts=f.dts+p[y]),o.push(f),g+=s,y++,y<v?_+=f.size:(A++,_=0,A>=w&&(b++,w=l[b+1]?l[b+1].firstChunk-1:1/0),v+=l[b].samplesPerChunk)})),o}function Db(e,t){return e.dataReferenceIndex=_b(t,6),e.width=_b(t,24),e.height=_b(t,26),e.horizresolution=vb(t,28),e.vertresolution=vb(t,32),e.frameCount=_b(t,40),e.depth=_b(t,74),78}function Lb(e,t){return e.dataReferenceIndex=_b(t,6),e.channelCount=_b(t,16),e.sampleSize=_b(t,18),e.sampleRate=vb(t,24)/65536,28}function Ib(e,t,i){if(!e)return;if(e.size!==e.data.length)throw new Error(`box ${e.type} size !== data.length`);const s={start:e.start,size:e.size,headerSize:e.headerSize,type:e.type};return t&&(s.version=e.data[e.headerSize],s.flags=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<16)+(e[t+1]<<8)+(e[t+2]||0)}(e.data,e.headerSize+1),s.headerSize+=4),i(s,e.data.subarray(s.headerSize),s.start+s.headerSize),s}Jd(xb,"FREQ",[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350]);const Pb=function(e,t,i){const s=String(i),r=t>>0;let a=Math.ceil(r/s.length);const o=[],n=String(e);for(;a--;)o.push(s);return o.join("").substring(0,r-n.length)+n},Bb=function(){const e=[];for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return i.forEach((t=>{e.push(Pb(Number(t).toString(16),2,0))})),e[0]};class Mb{static probe(e){return!!Mb.findBox(e,["ftyp"])}static findBox(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s=[];if(!e)return s;let r=0,a="",o=0;for(;e.length>7;){if(r=vb(e),a=String.fromCharCode.apply(null,e.subarray(4,8)),o=8,1===r?(r=wb(e,8),o+=8):r||(r=e.length),!t[0]||a===t[0]){const n=e.subarray(0,r);if(!(t.length<2))return Mb.findBox(n.subarray(o),t.slice(1),i+o);s.push({start:i,size:r,headerSize:o,type:a,data:n})}i+=r,e=e.subarray(r)}return s}static tfhd(e){return Ib(e,!0,((e,t)=>{e.trackId=vb(t);let i=4;const s=1&e.flags,r=2&e.flags,a=8&e.flags,o=16&e.flags,n=32&e.flags;s&&(i+=4,e.baseDataOffset=vb(t,i),i+=4),r&&(e.sampleDescriptionIndex=vb(t,i),i+=4),a&&(e.defaultSampleDuration=vb(t,i),i+=4),o&&(e.defaultSampleSize=vb(t,i),i+=4),n&&(e.defaultSampleFlags=vb(t,i))}))}static sidx(e){return Ib(e,!0,((e,t)=>{let i=0;e.reference_ID=vb(t,i),i+=4,e.timescale=vb(t,i),i+=4,0===e.version?(e.earliest_presentation_time=vb(t,i),i+=4,e.first_offset=vb(t,i),i+=4):(e.earliest_presentation_time=wb(t,i),i+=8,e.first_offset=wb(t,i),i+=8),i+=2,e.references=[];const s=_b(t,i);i+=2;for(let r=0;r<s;r++){const s={};e.references.push(s);let r=vb(t,i);i+=4,s.reference_type=r>>31&1,s.referenced_size=2147483647&r,s.subsegment_duration=vb(t,i),i+=4,r=vb(t,i),i+=4,s.starts_with_SAP=r>>31&1,s.SAP_type=r>>28&7,s.SAP_delta_time=268435455&r}}))}static moov(e){return Ib(e,!1,((e,t,i)=>{e.mvhd=Mb.mvhd(Mb.findBox(t,["mvhd"],i)[0]),e.trak=Mb.findBox(t,["trak"],i).map((e=>Mb.trak(e))),e.pssh=Mb.pssh(Mb.findBox(t,["pssh"],i)[0])}))}static mvhd(e){return Ib(e,!0,((e,t)=>{let i=0;1===e.version?(e.timescale=vb(t,16),e.duration=wb(t,20),i+=28):(e.timescale=vb(t,8),e.duration=vb(t,12),i+=16),e.nextTrackId=vb(t,i+76)}))}static trak(e){return Ib(e,!1,((e,t,i)=>{e.tkhd=Mb.tkhd(Mb.findBox(t,["tkhd"],i)[0]),e.mdia=Mb.mdia(Mb.findBox(t,["mdia"],i)[0])}))}static tkhd(e){return Ib(e,!0,((e,t)=>{let i=0;1===e.version?(e.trackId=vb(t,16),e.duration=wb(t,24),i+=32):(e.trackId=vb(t,8),e.duration=vb(t,16),i+=20),e.width=vb(t,i+52),e.height=vb(t,i+56)}))}static mdia(e){return Ib(e,!1,((e,t,i)=>{e.mdhd=Mb.mdhd(Mb.findBox(t,["mdhd"],i)[0]),e.hdlr=Mb.hdlr(Mb.findBox(t,["hdlr"],i)[0]),e.minf=Mb.minf(Mb.findBox(t,["minf"],i)[0])}))}static mdhd(e){return Ib(e,!0,((e,t)=>{let i=0;1===e.version?(e.timescale=vb(t,16),e.duration=wb(t,20),i+=28):(e.timescale=vb(t,8),e.duration=vb(t,12),i+=16);const s=_b(t,i);e.language=String.fromCharCode(96+(s>>10&31),96+(s>>5&31),96+(31&s))}))}static hdlr(e){return Ib(e,!0,((e,t)=>{0===e.version&&(e.handlerType=String.fromCharCode.apply(null,t.subarray(4,8)))}))}static minf(e){return Ib(e,!1,((e,t,i)=>{e.vmhd=Mb.vmhd(Mb.findBox(t,["vmhd"],i)[0]),e.smhd=Mb.smhd(Mb.findBox(t,["smhd"],i)[0]),e.stbl=Mb.stbl(Mb.findBox(t,["stbl"],i)[0])}))}static vmhd(e){return Ib(e,!0,((e,t)=>{e.graphicsmode=_b(t),e.opcolor=[_b(t,2),_b(t,4),_b(t,6)]}))}static smhd(e){return Ib(e,!0,((e,t)=>{e.balance=_b(t)}))}static stbl(e){return Ib(e,!1,((e,t,i)=>{var s,r,a;e.stsd=Mb.stsd(Mb.findBox(t,["stsd"],i)[0]),e.stts=Mb.stts(Mb.findBox(t,["stts"],i)[0]),e.ctts=Mb.ctts(Mb.findBox(t,["ctts"],i)[0]),e.stsc=Mb.stsc(Mb.findBox(t,["stsc"],i)[0]),e.stsz=Mb.stsz(Mb.findBox(t,["stsz"],i)[0]),e.stco=Mb.stco(Mb.findBox(t,["stco"],i)[0]),e.stco||(e.co64=Mb.co64(Mb.findBox(t,["co64"],i)[0]),e.stco=e.co64);const o=null===(s=e.stsd.entries[0])||void 0===s||null===(r=s.sinf)||void 0===r||null===(a=r.schi)||void 0===a?void 0:a.tenc.default_IV_size;e.stss=Mb.stss(Mb.findBox(t,["stss"],i)[0]),e.senc=Mb.senc(Mb.findBox(t,["senc"],i)[0],o)}))}static senc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return Ib(e,!0,((e,i)=>{let s=0;const r=vb(i,s);s+=4,e.samples=[];for(let a=0;a<r;a++){const r={InitializationVector:[]};for(let e=0;e<t;e++)r.InitializationVector[e]=i[s+e];if(s+=t,2&e.flags){r.subsamples=[];const e=_b(i,s);s+=2;for(let t=0;t<e;t++){const e={};e.BytesOfClearData=_b(i,s),s+=2,e.BytesOfProtectedData=vb(i,s),s+=4,r.subsamples.push(e)}}e.samples.push(r)}}))}static pssh(e){return Ib(e,!0,((e,t)=>{const i=[],s=[];let r=0;for(let e=0;e<16;e++)s.push(Bb(t[r+e]));if(r+=16,e.version>0){const e=vb(t,r);r+=4;for(let s=0;s<(""+e).length;s++)for(let e=0;e<16;e++){const e=t[r];r+=1,i.push(Bb(e))}}const a=vb(t,r);e.data_size=a,r+=4,e.kid=i,e.system_id=s,e.buffer=t}))}static stsd(e){return Ib(e,!0,((e,t,i)=>{e.entryCount=vb(t),e.entries=Mb.findBox(t.subarray(4),[],i+4).map((e=>{switch(e.type){case"avc1":case"avc2":case"avc3":case"avc4":return Mb.avc1(e);case"hvc1":case"hev1":return Mb.hvc1(e);case"mp4a":return Mb.mp4a(e);case"alaw":case"ulaw":return Mb.alaw(e);case"enca":return Ib(e,!1,((e,t,i)=>{e.channelCount=_b(t,16),e.samplesize=_b(t,18),e.sampleRate=vb(t,24)/65536,t=t.subarray(28),e.sinf=Mb.sinf(Mb.findBox(t,["sinf"],i)[0]),e.esds=Mb.esds(Mb.findBox(t,["esds"],i)[0])}));case"encv":return Ib(e,!1,((e,t,i)=>{e.width=_b(t,24),e.height=_b(t,26),e.horizresolution=vb(t,28),e.vertresolution=vb(t,32),t=t.subarray(78),e.sinf=Mb.sinf(Mb.findBox(t,["sinf"],i)[0]),e.avcC=Mb.avcC(Mb.findBox(t,["avcC"],i)[0]),e.hvcC=Mb.hvcC(Mb.findBox(t,["hvcC"],i)[0]),e.pasp=Mb.pasp(Mb.findBox(t,["pasp"],i)[0])}))}})).filter(Boolean)}))}static tenc(e){return Ib(e,!1,((e,t)=>{let i=6;e.default_IsEncrypted=t[i],i+=1,e.default_IV_size=t[i],i+=1,e.default_KID=[];for(let s=0;s<16;s++)e.default_KID.push(Bb(t[i])),i+=1}))}static schi(e){return Ib(e,!1,((e,t,i)=>{e.tenc=Mb.tenc(Mb.findBox(t,["tenc"],i)[0])}))}static sinf(e){return Ib(e,!1,((e,t,i)=>{e.schi=Mb.schi(Mb.findBox(t,["schi"],i)[0]),e.frma=Mb.frma(Mb.findBox(t,["frma"],i)[0])}))}static frma(e){return Ib(e,!1,((e,t)=>{e.data_format="";for(let i=0;i<4;i++)e.data_format+=String.fromCharCode(t[i])}))}static avc1(e){return Ib(e,!1,((e,t,i)=>{const s=Db(e,t),r=t.subarray(s);i+=s,e.avcC=Mb.avcC(Mb.findBox(r,["avcC"],i)[0]),e.pasp=Mb.pasp(Mb.findBox(r,["pasp"],i)[0])}))}static avcC(e){return Ib(e,!1,((e,t)=>{e.configurationVersion=t[0],e.AVCProfileIndication=t[1],e.profileCompatibility=t[2],e.AVCLevelIndication=t[3],e.codec=function(e){let t,i="avc1.";for(let s=0;s<3;s++)t=e[s].toString(16),t.length<2&&(t=`0${t}`),i+=t;return i}([t[1],t[2],t[3]]),e.lengthSizeMinusOne=3&t[4],e.spsLength=31&t[5],e.sps=[];let i=6;for(let s=0;s<e.spsLength;s++){const s=_b(t,i);i+=2,e.sps.push(t.subarray(i,i+s)),i+=s}e.ppsLength=t[i],i+=1,e.pps=[];for(let s=0;s<e.ppsLength;s++){const s=_b(t,i);i+=2,e.pps.push(t.subarray(i,i+=s)),i+=s}}))}static hvc1(e){return Ib(e,!1,((e,t,i)=>{const s=Db(e,t),r=t.subarray(s);i+=s,e.hvcC=Mb.hvcC(Mb.findBox(r,["hvcC"],i)[0]),e.pasp=Mb.pasp(Mb.findBox(r,["pasp"],i)[0])}))}static hvcC(e){return Ib(e,!1,((t,i)=>{t.data=e.data,t.codec="hev1.1.6.L93.B0",t.configurationVersion=i[0];const s=i[1];t.generalProfileSpace=s>>6,t.generalTierFlag=(32&s)>>5,t.generalProfileIdc=31&s,t.generalProfileCompatibility=vb(i,2),t.generalConstraintIndicatorFlags=i.subarray(6,12),t.generalLevelIdc=i[12],t.avgFrameRate=_b(i,19),t.numOfArrays=i[22],t.vps=[],t.sps=[],t.pps=[];let r=23,a=0,o=0,n=0;for(let e=0;e<t.numOfArrays;e++){a=63&i[r],o=_b(i,r+1),r+=3;const e=[];for(let t=0;t<o;t++)n=_b(i,r),r+=2,e.push(i.subarray(r,r+n)),r+=n;32===a?t.vps.push(...e):33===a?t.sps.push(...e):34===a&&t.pps.push(...e)}}))}static pasp(e){return Ib(e,!1,((e,t)=>{e.hSpacing=vb(t),e.vSpacing=vb(t,4)}))}static mp4a(e){return Ib(e,!1,((e,t,i)=>{const s=Lb(e,t);e.esds=Mb.esds(Mb.findBox(t.subarray(s),["esds"],i+s)[0])}))}static esds(e){return Ib(e,!0,((e,t)=>{e.codec="mp4a.";let i=0,s=0,r=0,a=0;for(;t.length;){for(i=0,a=t[i],s=t[i+1],i+=2;128&s;)r=(127&s)<<7,s=t[i],i+=1;if(r+=127&s,3===a)t=t.subarray(i+3);else{if(4!==a){if(5===a){const s=e.config=t.subarray(i,i+r);let a=(248&s[0])>>3;return 31===a&&s.length>=2&&(a=32+((7&s[0])<<3)+((224&s[1])>>5)),e.objectType=a,e.codec+=a.toString(16),void("."===e.codec[e.codec.length-1]&&(e.codec=e.codec.substring(0,e.codec.length-1)))}return void("."===e.codec[e.codec.length-1]&&(e.codec=e.codec.substring(0,e.codec.length-1)))}e.codec+=(t[i].toString(16)+".").padStart(3,"0"),t=t.subarray(i+13)}}}))}static alaw(e){return Ib(e,!1,((e,t)=>{Lb(e,t)}))}static stts(e){return Ib(e,!0,((e,t)=>{const i=vb(t),s=[];let r=4;for(let e=0;e<i;e++)s.push({count:vb(t,r),delta:vb(t,r+4)}),r+=8;e.entryCount=i,e.entries=s}))}static ctts(e){return Ib(e,!0,((e,t)=>{const i=vb(t),s=[];let r=4;if(1===e.version)for(let e=0;e<i;e++)s.push({count:vb(t,r),offset:vb(t,r+4)}),r+=8;else for(let e=0;e<i;e++)s.push({count:vb(t,r),offset:-(1+~vb(t,r+4))}),r+=8;e.entryCount=i,e.entries=s}))}static stsc(e){return Ib(e,!0,((e,t)=>{const i=vb(t),s=[];let r=4;for(let e=0;e<i;e++)s.push({firstChunk:vb(t,r),samplesPerChunk:vb(t,r+4),sampleDescriptionIndex:vb(t,r+8)}),r+=12;e.entryCount=i,e.entries=s}))}static stsz(e){return Ib(e,!0,((e,t)=>{const i=vb(t),s=vb(t,4),r=[];if(!i){let e=8;for(let i=0;i<s;i++)r.push(vb(t,e)),e+=4}e.sampleSize=i,e.sampleCount=s,e.entrySizes=r}))}static stco(e){return Ib(e,!0,((e,t)=>{const i=vb(t),s=[];let r=4;for(let e=0;e<i;e++)s.push(vb(t,r)),r+=4;e.entryCount=i,e.entries=s}))}static co64(e){return Ib(e,!0,((e,t)=>{const i=vb(t),s=[];let r=4;for(let e=0;e<i;e++)s.push(wb(t,r)),r+=8;e.entryCount=i,e.entries=s}))}static stss(e){return Ib(e,!0,((e,t)=>{const i=vb(t),s=[];let r=4;for(let e=0;e<i;e++)s.push(vb(t,r)),r+=4;e.entryCount=i,e.entries=s}))}static moof(e){return Ib(e,!1,((e,t,i)=>{e.mfhd=Mb.mfhd(Mb.findBox(t,["mfhd"],i)[0]),e.traf=Mb.findBox(t,["traf"],i).map((e=>Mb.traf(e)))}))}static mfhd(e){return Ib(e,!0,((e,t)=>{e.sequenceNumber=vb(t)}))}static traf(e){return Ib(e,!1,((e,t,i)=>{e.tfhd=Mb.tfhd(Mb.findBox(t,["tfhd"],i)[0]),e.tfdt=Mb.tfdt(Mb.findBox(t,["tfdt"],i)[0]),e.trun=Mb.trun(Mb.findBox(t,["trun"],i)[0])}))}static trun(e){return Ib(e,!0,((e,t)=>{const{version:i,flags:s}=e,r=t.length,a=e.sampleCount=vb(t);let o=4;if(r>o&&1&s&&(e.dataOffset=-(1+~vb(t,o)),o+=4),r>o&&4&s&&(e.firstSampleFlags=vb(t,o),o+=4),e.samples=[],r>o){let r;for(let n=0;n<a;n++)r={},256&s&&(r.duration=vb(t,o),o+=4),512&s&&(r.size=vb(t,o),o+=4),1024&s&&(r.flags=vb(t,o),o+=4),2048&s&&(r.cts=i?-(1+~vb(t,o+4)):vb(t,o),o+=4),e.samples.push(r)}}))}static tfdt(e){return Ib(e,!0,((e,t)=>{1===e.version?e.baseMediaDecodeTime=wb(t):e.baseMediaDecodeTime=vb(t)}))}static probe(e){return!!Mb.findBox(e,["ftyp"])}static parseSampleFlags(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}}static moovToTrack(e,t,i){var s,r;const a=e.trak;if(!a||!a.length)return;const o=a.find((e=>{var t,i;return"vide"===(null===(t=e.mdia)||void 0===t||null===(i=t.hdlr)||void 0===i?void 0:i.handlerType)})),n=a.find((e=>{var t,i;return"soun"===(null===(t=e.mdia)||void 0===t||null===(i=t.hdlr)||void 0===i?void 0:i.handlerType)}));if(o&&t){var l,d,h,c,u,p,f;const i=t,s=null===(l=o.tkhd)||void 0===l?void 0:l.trackId;null!=s&&(i.id=o.tkhd.trackId),i.tkhdDuration=o.tkhd.duration,i.mvhdDurtion=e.mvhd.duration,i.mvhdTimecale=e.mvhd.timescale,i.timescale=i.formatTimescale=o.mdia.mdhd.timescale,i.duration=o.mdia.mdhd.duration||i.mvhdDurtion/i.mvhdTimecale*i.timescale;const r=o.mdia.minf.stbl.stsd.entries[0];if(i.width=r.width,i.height=r.height,r.pasp&&(i.sarRatio=[r.pasp.hSpacing,r.pasp.vSpacing]),r.hvcC)i.codecType=Cb,i.codec=r.hvcC.codec,i.vps=r.hvcC.vps,i.sps=r.hvcC.sps,i.pps=r.hvcC.pps,i.hvcC=r.hvcC.data;else{if(!r.avcC)throw new Error("unknown video stsd entry");i.codecType=kb,i.codec=r.avcC.codec,i.sps=r.avcC.sps,i.pps=r.avcC.pps}var m,g,y,A,b,_,v,w;if(i.present=!0,i.ext={},i.ext.stss=null===(d=o.mdia)||void 0===d||null===(h=d.minf)||void 0===h||null===(c=h.stbl)||void 0===c?void 0:c.stss,i.ext.ctts=null===(u=o.mdia)||void 0===u||null===(p=u.minf)||void 0===p||null===(f=p.stbl)||void 0===f?void 0:f.ctts,r&&"encv"===r.type)i.isVideoEncryption=!0,r.default_KID=null===(m=r.sinf)||void 0===m||null===(g=m.schi)||void 0===g?void 0:g.tenc.default_KID,r.default_IsEncrypted=null===(y=r.sinf)||void 0===y||null===(A=y.schi)||void 0===A?void 0:A.tenc.default_IsEncrypted,r.default_IV_size=null===(b=r.sinf)||void 0===b||null===(_=b.schi)||void 0===_?void 0:_.tenc.default_IV_size,i.videoSenc=o.mdia.minf.stbl.senc&&o.mdia.minf.stbl.senc.samples,r.data_format=null===(v=r.sinf)||void 0===v||null===(w=v.frma)||void 0===w?void 0:w.data_format,i.useEME=e.useEME,i.kidValue=e.kidValue,i.pssh=e.pssh,i.encv=r}if(n&&i){var S,T,E,k,C,x,R,D,L;const t=i,a=null===(S=n.tkhd)||void 0===S?void 0:S.trackId;null!=a&&(t.id=n.tkhd.trackId),t.tkhdDuration=n.tkhd.duration,t.mvhdDurtion=e.mvhd.duration,t.mvhdTimecale=e.mvhd.timescale,t.timescale=t.formatTimescale=n.mdia.mdhd.timescale,t.duration=n.mdia.mdhd.duration||t.mvhdDurtion/t.mvhdTimecale*t.timescale;const o=n.mdia.minf.stbl.stsd.entries[0];switch(t.sampleSize=o.sampleSize,t.sampleRate=o.sampleRate,t.channelCount=o.channelCount,t.present=!0,o.type){case"alaw":t.codecType=t.codec=Tb,t.sampleRate=8e3;break;case"ulaw":t.codecType=t.codec=Eb,t.sampleRate=8e3;break;default:t.codecType=Sb,t.sampleDuration=xb.getFrameDuration(t.sampleRate,t.timescale),t.sampleRateIndex=xb.getRateIndexByRate(t.sampleRate),t.objectType=(null===(s=o.esds)||void 0===s?void 0:s.objectType)||2,o.esds&&(t.config=Array.from(o.esds.config)),t.codec=(null===(r=o.esds)||void 0===r?void 0:r.codec)||"mp4a.40.2"}var I,P,B,M,U,F,O,N;if(t.sampleDuration=xb.getFrameDuration(t.sampleRate,t.timescale),t.objectType=(null===(T=o.esds)||void 0===T?void 0:T.objectType)||2,o.esds&&(o.esds.config?t.config=Array.from(o.esds.config):console.warn("esds config is null")),t.codec=(null===(E=o.esds)||void 0===E?void 0:E.codec)||"mp4a.40.2",t.sampleRateIndex=xb.getRateIndexByRate(t.sampleRate),t.ext={},t.ext.stss=null===(k=n.mdia)||void 0===k||null===(C=k.minf)||void 0===C||null===(x=C.stbl)||void 0===x?void 0:x.stss,t.ext.ctts=null===(R=n.mdia)||void 0===R||null===(D=R.minf)||void 0===D||null===(L=D.stbl)||void 0===L?void 0:L.ctts,t.present=!0,o&&"enca"===o.type)t.isAudioEncryption=!0,o.data_format=null===(I=o.sinf)||void 0===I||null===(P=I.frma)||void 0===P?void 0:P.data_format,o.default_KID=null===(B=o.sinf)||void 0===B||null===(M=B.schi)||void 0===M?void 0:M.tenc.default_KID,o.default_IsEncrypted=null===(U=o.sinf)||void 0===U||null===(F=U.schi)||void 0===F?void 0:F.tenc.default_IsEncrypted,o.default_IV_size=null===(O=o.sinf)||void 0===O||null===(N=O.schi)||void 0===N?void 0:N.tenc.default_IV_size,t.audioSenc=n.mdia.minf.stbl.senc&&n.mdia.minf.stbl.senc.samples,t.useEME=e.useEME,t.kidValue=e.kidValue,t.enca=o}if(i&&(i.isVideoEncryption=!!t&&t.isVideoEncryption),t&&(t.isAudioEncryption=!!i&&i.isAudioEncryption),null!=t&&t.encv||null!=i&&i.enca){var j,G;const e=null==t||null===(j=t.encv)||void 0===j?void 0:j.default_KID,s=null==i||null===(G=i.enca)||void 0===G?void 0:G.default_KID,r=e||s?(e||s).join(""):null;t&&(t.kid=r),i&&(i.kid=r)}return t&&(t.flags=3841),i&&(i.flags=1793),{videoTrack:t,audioTrack:i}}static evaluateDefaultDuration(e,t,i){var s;const r=null==t||null===(s=t.samples)||void 0===s?void 0:s.length;if(!r)return 1024;return 1024*r/t.timescale*e.timescale/i}static moofToSamples(e,t,i){const s={};return e.mfhd&&(t&&(t.sequenceNumber=e.mfhd.sequenceNumber),i&&(i.sequenceNumber=e.mfhd.sequenceNumber)),e.traf.forEach((e=>{let{tfhd:r,tfdt:a,trun:o}=e;if(!r||!o)return;a&&(t&&t.id===r.trackId&&(t.baseMediaDecodeTime=a.baseMediaDecodeTime),i&&i.id===r.trackId&&(i.baseMediaDecodeTime=a.baseMediaDecodeTime));const n=r.defaultSampleSize||0,l=r.defaultSampleDuration||Mb.evaluateDefaultDuration(t,i,o.samples.length||o.sampleCount);let d=o.dataOffset||0,h=0,c=-1;if(!o.samples.length&&o.sampleCount){s[r.trackId]=[];for(let e=0;e<o.sampleCount;e++)s[r.trackId].push({offset:d,dts:h,duration:l,size:n}),h+=l,d+=n}else s[r.trackId]=o.samples.map(((e,t)=>((e={offset:d,dts:h,pts:h+(e.cts||0),duration:e.duration||l,size:e.size||n,gopId:c,keyframe:0===t||null!==e.flags&&void 0!==e.flags&&(65536&e.flags)>>>0!=65536}).keyframe&&(c++,e.gopId=c),h+=e.duration,d+=e.size,e)))})),s}static moovToSamples(e){const t=e.trak;if(!t||!t.length)return;const i=t.find((e=>{var t,i;return"vide"===(null===(t=e.mdia)||void 0===t||null===(i=t.hdlr)||void 0===i?void 0:i.handlerType)})),s=t.find((e=>{var t,i;return"soun"===(null===(t=e.mdia)||void 0===t||null===(i=t.hdlr)||void 0===i?void 0:i.handlerType)}));if(!i&&!s)return;let r,a;if(i){var o,n;const e=null===(o=i.mdia)||void 0===o||null===(n=o.minf)||void 0===n?void 0:n.stbl;if(!e)return;const{stts:t,stsc:s,stsz:a,stco:l,stss:d,ctts:h}=e;if(!(t&&s&&a&&l&&d))return;r=Rb(t,s,a,l,h,d)}if(s){var l,d,h;const e=null===(l=s.mdia)||void 0===l||null===(d=l.minf)||void 0===d?void 0:d.stbl;if(!e)return;const t=null===(h=s.mdia.mdhd)||void 0===h?void 0:h.timescale,{stts:i,stsc:r,stsz:o,stco:n}=e;if(!(t&&i&&r&&o&&n))return;a=Rb(i,r,o,n)}return{videoSamples:r,audioSamples:a}}}class Ub extends Ud{constructor(e){super(e),this.player=e,this.TAG_NAME="HlsFmp4Loader",this.tempSampleListInfo={},this.isInitVideo=!1,this.isInitAudio=!1,this.videoTrack={id:1,samples:[],sps:[],pps:[],vps:[],codec:""},this.audioTrack={id:2,samples:[],sampleRate:0,channelCount:0,codec:"",codecType:""},this.workerClearTimeout=null,this.workerUrl=null,this.loopWorker=null,this._hasCalcFps=!1,this._basefps=25,this.player.isUseMSE()||this._initLoopWorker(),e.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.workerUrl&&(URL.revokeObjectURL(this.workerUrl),this.workerUrl=null),this.workerClearTimeout&&(clearTimeout(this.workerClearTimeout),this.workerClearTimeout=null),this.loopWorker&&(this.loopWorker.postMessage({cmd:"destroy"}),this.loopWorker.terminate(),this.loopWorker=null),this._hasCalcFps=!1,this.videoTrack=null,this.audioTrack=null,this.isInitVideo=!1,this.isInitAudio=!1,this._basefps=25,this.player.debug.log(this.TAG_NAME,"destroy")}demux(e,t){let i=this.audioTrack,s=this.videoTrack;if(this.checkInitAudio(),this.checkInitVideo(),i.samples=[],s.samples=[],t){if(this.player.updateStats({abps:t.byteLength}),Ao(this.isInitAudio)){const e=Mb.findBox(t,["moov"])[0];if(!e)return void this.player.debug.error(this.TAG_NAME,"cannot found moov box");Mb.moovToTrack(Mb.moov(e),null,i),this.checkInitAudio()&&(this.player.debug.log(this.TAG_NAME,"audioData audio init success"),this._sendAccADTSHeader(i))}const e=Mb.findBox(t,["moof"])[0];if(e){const s=Mb.moofToSamples(Mb.moof(e),null,i)[i.id],r=i.baseMediaDecodeTime;if(s){const a=e.start;s.map((e=>{e.offset+=a;const s=t.subarray(e.offset,e.offset+e.size),o=e.dts+r,n=new Uint8Array(s.length+2);n.set([175,1],0),n.set(s,2),i.samples.push({type:je,pts:o,dts:o,payload:n,duration:e.duration,size:n.byteLength})}))}}}if(e){if(this.player.updateStats({vbps:e.byteLength}),Ao(this.isInitVideo)&&Ao(this.isInitAudio)){const t=Mb.findBox(e,["moov"])[0];if(!t)throw new Error("cannot found moov box");if(Mb.moovToTrack(Mb.moov(t),s,i),Ao(this.isInitAudio)&&this.checkInitAudio()&&(this.player.debug.log(this.TAG_NAME,"videoData audio init success",i),this._sendAccADTSHeader(i)),this.checkInitVideo()){this.player.debug.log(this.TAG_NAME,"video init success");let e=null;s.codecType===os?s.sps.length&&s.vps.length&&s.pps.length&&(e=Vn({sps:s.sps[0],pps:s.pps[0],vps:s.vps[0]})):s.sps.length&&s.pps.length&&(e=Ln({sps:s.sps[0],pps:s.pps[0]})),e&&(this.player.debug.log(this.TAG_NAME,"seqHeader"),this._doDecodeByHls(e,Ge,0,!0,0))}}const t=Mb.findBox(e,["moof"])[0];if(t){const r=Mb.moofToSamples(Mb.moof(t),s,i),a=s.baseMediaDecodeTime,o=i.baseMediaDecodeTime,n=t.start;Object.keys(r).forEach((t=>{s.id==t?r[t].map((t=>{t.offset+=n;const i={type:Ge,pts:(t.pts||t.dts)+a,dts:t.dts+a,units:[],payload:null,isIFrame:!1};i.duration=t.duration,i.gopId=t.gopId,t.keyframe&&(i.isIFrame=!0);const r=e.subarray(t.offset,t.offset+t.size);i.payload=r,s.samples.push(i)})):i.id==t&&r[t].map((t=>{t.offset+=n;const s=e.subarray(t.offset,t.offset+t.size),r=t.dts+o,a=new Uint8Array(s.length+2);a.set([175,1],0),a.set(s,2),i.samples.push({type:je,pts:r,dts:r,payload:a,duration:t.duration,size:a.byteLength})}))}))}}const r=s.samples.concat(i.samples);r.sort(((e,t)=>e.dts-t.dts)),r.forEach((e=>{const t=new Uint8Array(e.payload);delete e.payload,this.player.isUseMSE()?e.type===Ge?this._doDecodeVideo({...e,payload:t}):e.type===je&&this._doDecodeAudio({...e,payload:t}):this.loopWorker.postMessage({...e,payload:t,cmd:"sample"},[t.buffer])})),Ao(this._hasCalcFps)&&(this._hasCalcFps=!0,this._calcDecodeFps(r))}checkInitAudio(){return this.isInitAudio=!!(this.audioTrack.sampleRate&&this.audioTrack.channelCount&&this.audioTrack.codec&&"aac"===this.audioTrack.codecType),this.isInitAudio}checkInitVideo(){return this.isInitVideo=!!(this.videoTrack.pps.length&&this.videoTrack.sps.length&&this.videoTrack.codec),this.isInitVideo}_sendAccADTSHeader(e){const t=Vr({profile:e.objectType,sampleRate:e.sampleRateIndex,channel:e.channelCount});this._doDecodeByHls(t,je,0,!0,0)}_calcDecodeFps(e){const t=ho(e.map((e=>({ts:e.dts||e.pts,type:e.type}))),Ge);t&&(this.player.debug.log(this.TAG_NAME,`_calcDecodeFps() video fps is ${t}, update base fps is ${this._basefps}`),this._basefps=t),this._postMessageToLoopWorker("updateBaseFps",{baseFps:this._basefps})}_initLoopWorker(){this.player.debug.log(this.TAG_NAME,"_initLoopWorker()");const e=Eo(function(){const e=1,t=2;let i=new class{constructor(){this.baseFps=0,this.fpsInterval=null,this.preLoopTimestamp=null,this.startBpsTime=null,this.allSampleList=[]}destroy(){this._clearInterval(),this.baseFps=0,this.allSampleList=[],this.preLoopTimestamp=null,this.startBpsTime=null}updateBaseFps(e){this.baseFps=e,this._clearInterval(),this._startInterval()}pushSample(e){delete e.cmd,this.allSampleList.push(e)}_startInterval(){const e=Math.ceil(1e3/this.baseFps);this.fpsInterval=setInterval((()=>{let t=(new Date).getTime();this.preLoopTimestamp||(this.preLoopTimestamp=t),this.startBpsTime||(this.startBpsTime=t);const i=t-this.preLoopTimestamp;if(i>2*e&&console.warn(`JbPro:[HlsFmp4Loader LoopWorker] loop interval is ${i}ms, more than ${e} * 2ms`),this._loop(),this.preLoopTimestamp=(new Date).getTime(),this.startBpsTime){t-this.startBpsTime>=1e3&&(this._calcSampleList(),this.startBpsTime=t)}}),e)}_clearInterval(){this.fpsInterval&&(clearInterval(this.fpsInterval),this.fpsInterval=null)}_calcSampleList(){const i={buferredDuration:0,allListLength:this.allSampleList.length,audioListLength:0,videoListLength:0};this.allSampleList.forEach((s=>{s.type===t?(i.videoListLength++,s.duration&&(i.buferredDuration+=s.duration)):s.type===e&&i.audioListLength++})),postMessage({cmd:"sampleListInfo",...i})}_loop(){let i=null;if(this.allSampleList.length)if(i=this.allSampleList.shift(),i.type===t){postMessage({cmd:"decodeVideo",...i},[i.payload.buffer]);let t=this.allSampleList[0];for(;t&&t.type===e;)i=this.allSampleList.shift(),postMessage({cmd:"decodeAudio",...i},[i.payload.buffer]),t=this.allSampleList[0]}else i.type===e&&(postMessage({cmd:"decodeAudio",...i},[i.payload.buffer]),this.allSampleList.length&&this.allSampleList[0].type===t&&(i=this.allSampleList.shift(),postMessage({cmd:"decodeVideo",...i},[i.payload.buffer])))}};self.onmessage=e=>{const t=e.data;switch(t.cmd){case"updateBaseFps":i.updateBaseFps(t.baseFps);break;case"sample":i.pushSample(t);break;case"destroy":i.destroy(),i=null}}}.toString()),t=new Blob([e],{type:"text/javascript"}),i=URL.createObjectURL(t);let s=new Worker(i);this.workerUrl=i,this.workerClearTimeout=setTimeout((()=>{window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null,this.workerClearTimeout=null}),ie),s.onmessage=e=>{const t=e.data;switch(t.cmd){case"decodeVideo":this._doDecodeVideo(t);break;case"decodeAudio":this._doDecodeAudio(t);break;case"sampleListInfo":this.tempSampleListInfo=t}},this.loopWorker=s}_postMessageToLoopWorker(e,t){this.player.isUseMSE()||(this.loopWorker?this.loopWorker.postMessage({cmd:e,...t}):this.player.debug.warn(this.TAG_NAME,"loop worker is not init, can not post message"))}_doDecodeAudio(e){const t=new Uint8Array(e.payload);this._doDecodeByHls(t,je,e.dts,!1,0)}_doDecodeVideo(e){const t=new Uint8Array(e.payload);let i=null;i=e.isHevc?Wn(t,e.isIFrame):In(t,e.isIFrame),this.player.updateStats({dts:e.dts});const s=e.pts-e.dts;this._doDecodeByHls(i,Ge,e.dts,e.isIFrame,s)}getBuferredDuration(){return this.tempSampleListInfo.buferredDuration||0}getSampleListLength(){return this.tempSampleListInfo.allListLength||0}getSampleAudioListLength(){return this.tempSampleListInfo.audioListLength||0}getSampleVideoListLength(){return this.tempSampleListInfo.videoListLength||0}}class Fb{constructor(e,t){this.hls=e,this.player=this.hls.player,this.isMP4=t,this._initSegmentId="",this.TAG_NAME="HlsTransmuxer",this._demuxer=t?new Ub(this.hls.player):new bb(this.hls.player),this.player.debug.log(this.TAG_NAME,`init and isMP4 is ${t}`)}destroy(){this._demuxer&&(this._demuxer.destroy(),this._demuxer=null)}transmux(e,t,i,s,r,a){this.player.debug.log(this.TAG_NAME,`transmux videoChunk:${e&&e.byteLength}, audioChunk:${t&&t.byteLength}, discontinuity:${i}, contiguous:${s}, startTime:${r}, needInit:${a}`);const o=this._demuxer;try{this.isMP4?o.demux(e,t):o.demuxAndFix(ih(e,t),i,s,r)}catch(e){throw new WA(VA,HA,e)}}}class Ob{constructor(e){this.hls=e,this.player=e.player,this._decryptor=new Ab(this.hls,this.player),this._transmuxer=null,this._mse=null,this._softVideo=null,this._sourceCreated=!1,this._needInitSegment=!0,this._directAppend=!1,this.TAG_NAME="HlsBufferService"}async destroy(){this._softVideo=null,this._transmuxer&&(this._transmuxer.destroy(),this._transmuxer=null)}get baseDts(){var e,t;return null===(e=this._transmuxer)||void 0===e||null===(t=e._demuxer)||void 0===t?void 0:t._baseDts}get nbSb(){return 0}async updateDuration(e){this.player.debug.log(this.TAG_NAME,"updateDuration()",e)}getBuferredDuration(){var e,t;return null===(e=this._transmuxer)||void 0===e||null===(t=e._demuxer)||void 0===t?void 0:t.getBuferredDuration()}getBufferedSegments(){var e,t;return null===(e=this._transmuxer)||void 0===e||null===(t=e._demuxer)||void 0===t?void 0:t.getSampleListLength()}getBufferedAudioSegments(){var e,t;return null===(e=this._transmuxer)||void 0===e||null===(t=e._demuxer)||void 0===t?void 0:t.getSampleAudioListLength()}getBufferedVideoSegments(){var e,t;return null===(e=this._transmuxer)||void 0===e||null===(t=e._demuxer)||void 0===t?void 0:t.getSampleVideoListLength()}createSource(e,t,i,s){if(this._sourceCreated)return;const r=e||t;r&&(bb.probe(r)?this._transmuxer||(this._transmuxer=new Fb(this.hls,!1)):Mb.probe(r)?this._transmuxer||(this._transmuxer=new Fb(this.hls,!0)):this.player.debug.error(this.TAG_NAME,"createSource error: chunk is not ts"))}async appendBuffer(e,t,i,s,r,a,o){if(null!=i&&i.length||null!=s&&s.length)return this._needInitSegment,this._transmuxer.transmux(i,s,r,a,o,this._needInitSegment||r),!0}async clearAllBuffer(){this.player.debug.log(this.TAG_NAME,"clearAllBuffer")}decryptBuffer(e,t){return this._decryptor.decrypt(e,t)}async reset(){this._transmuxer=null,this._needInitSegment=!0,this._directAppend=!1}async endOfStream(){this._softVideo&&this._softVideo.endOfStream()}async setLiveSeekableRange(e,t){}seamlessSwitch(){this._needInitSegment=!0}}class Nb{constructor(e){this.emitter=e,this._seiSet=new Set,e.on(rr,(e=>{e&&this._seiSet.add(e)}))}throw(e){if(null==e||!this._seiSet.size)return;const t=e-.2,i=e+.2,s=[];this._seiSet.forEach((e=>{e.time>=t&&e.time<=i&&s.push(e)})),s.forEach((e=>{this._seiSet.delete(e),this.emitter.emit(ar,e)}))}reset(){this._seiSet.clear()}}class jb{constructor(e){this._timescale=e,this.encodeType="",this.audioCodec="",this.videoCodec="",this.domain="",this.fps=0,this.bitrate=0,this.width=0,this.height=0,this.samplerate=0,this.channelCount=0,this.gop=0,this._bitsAccumulateSize=0,this._bitsAccumulateDuration=0}getStats(){return{encodeType:this.encodeType,audioCodec:this.audioCodec,videoCodec:this.videoCodec,domain:this.domain,fps:this.fps,bitrate:this.bitrate,width:this.width,height:this.height,samplerate:this.samplerate,channelCount:this.channelCount,gop:this.gop}}setEncodeType(e){this.encodeType=e}setFpsFromScriptData(e){var t;let{data:i}=e;const s=null==i||null===(t=i.onMetaData)||void 0===t?void 0:t.framerate;s&&s>0&&s<100&&(this.fps=s)}setVideoMeta(e){if(this.width=e.width,this.height=e.height,this.videoCodec=e.codec,this.encodeType=e.codecType,e.fpsNum&&e.fpsDen){const t=e.fpsNum/e.fpsDen;t>0&&t<100&&(this.fps=t)}}setAudioMeta(e){this.audioCodec=e.codec,this.samplerate=e.sampleRate,this.channelCount=e.channelCount}setDomain(e){this.domain=e.split("/").slice(2,3)[0]}updateBitrate(e){if((!this.fps||this.fps>=100)&&e.length){const t=e.reduce(((e,t)=>e+t.duration),0)/e.length;this.fps=Math.round(this._timescale/t)}e.forEach((e=>{1===e.gopId&&this.gop++,this._bitsAccumulateDuration+=e.duration/(this._timescale/1e3),this._bitsAccumulateSize+=e.units.reduce(((e,t)=>e+t.length),0),this._bitsAccumulateDuration>=1e3&&(this.bitrate=8*this._bitsAccumulateSize,this._bitsAccumulateDuration=0,this._bitsAccumulateSize=0)}))}}class Gb{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;Jd(this,"_core",null),Jd(this,"_samples",[]),this._core=e,this._timescale=t,this._stats=new jb(t),this._bindEvents()}getStats(){var e,t,i,s,r,a,o;const{currentTime:n=0,decodeFps:l=0}=(null===(e=this._core)||void 0===e?void 0:e.media)||{};return{...this._stats.getStats(),downloadSpeed:(null===(t=this._core)||void 0===t||null===(i=t.speedInfo)||void 0===i?void 0:i.call(t).speed)||0,avgSpeed:(null===(s=this._core)||void 0===s||null===(r=s.speedInfo)||void 0===r?void 0:r.call(s).avgSpeed)||0,currentTime:n,bufferEnd:(null===(a=this._core)||void 0===a||null===(o=a.bufferInfo())||void 0===o?void 0:o.remaining)||0,decodeFps:l}}_bindEvents(){this._core.on(Ks,(e=>this._stats.updateBitrate(e.samples))),this._core.on(Ys,(e=>{this._stats.setFpsFromScriptData(e)})),this._core.on(Qs,(e=>{"video"===e.type?this._stats.setVideoMeta(e.track):this._stats.setAudioMeta(e.track)})),this._core.on(Xs,(e=>{this._stats.setDomain(e.responseUrl)}))}reset(){this._samples=[],this._stats=new jb(this._timescale)}}class zb extends a{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),Jd(this,"_loadSegment",(async()=>{if(this._segmentProcessing)return void this.player.debug.warn("_loadSegment()","_segmentProcessing is ture and return");if(!this._playlist)return void this.player.debug.warn("_loadSegment()","this._playlist is null and return");const e=this._playlist.currentSegment,t=this._playlist.nextSegment;if(this.player.debug.log(this.TAG_NAME,"_loadSegment()","curSeg",e&&e.url,"nextSeg",t&&t.url),t)return this._loadSegmentDirect();this.player.debug.log(this.TAG_NAME,"nextSeg is null and return")})),this.player=e,this.config=null,this._manifestLoader=null,this._segmentLoader=null,this._playlist=null,this._bufferService=null,this._seiService=null,this._stats=null,this._prevSegSn=null,this._prevSegCc=null,this._tickTimer=null,this._tickInterval=500,this._segmentProcessing=!1,this._reloadOnPlay=!1,this._switchUrlOpts=null,this._disconnectTimer=null,this.TAG_NAME="Hls256",this.canVideoPlay=!1,this.$videoElement=null,this.config=t=function(e){return{isLive:!0,maxPlaylistSize:50,retryCount:3,retryDelay:1e3,pollRetryCount:2,loadTimeout:1e4,preloadTime:30,softDecode:!1,bufferBehind:10,maxJumpDistance:3,startTime:0,targetLatency:10,maxLatency:20,allowedStreamTrackChange:!0,...e}}(t),this._manifestLoader=new pb(this),this._segmentLoader=new mb(this),this._playlist=new yb(this),this._bufferService=new Ob(this),this._seiService=new Nb(this),this._stats=new Gb(this,9e4),this.player.debug.log(this.TAG_NAME,"init")}async destroy(){this.player.debug.log(this.TAG_NAME,"destroy()"),this._playlist.reset(),this._segmentLoader.reset(),this._seiService.reset(),await Promise.all([this._clear(),this._bufferService.destroy()]),this._manifestLoader&&(await this._manifestLoader.destroy(),this._manifestLoader=null),this._segmentLoader&&(this._segmentLoader.destroy(),this._segmentLoader=null),this._playlist&&(this._playlist.destroy(),this._playlist=null),this.player.debug.log(this.TAG_NAME,"destroy end")}_startTick(){this._stopTick(),this._tickTimer=setTimeout((()=>{this._tick()}),this._tickInterval)}_stopTick(){this._tickTimer&&clearTimeout(this._tickTimer),this._tickTimer=null}_tick(){this.player.isDestroyedOrClosed()?this.player.debug.log(this.TAG_NAME,"_tick() player is destroyed"):(this._startTick(),this._loadSegment())}get isLive(){return this._playlist.isLive}get streams(){return this._playlist.streams}get currentStream(){return this._playlist.currentStream}get hasSubtitle(){return this._playlist.hasSubtitle}get baseDts(){var e;return null===(e=this._bufferService)||void 0===e?void 0:e.baseDts}speedInfo(){return this._segmentLoader.speedInfo()}resetBandwidth(){this._segmentLoader.resetBandwidth()}getStats(){return this._stats.getStats()}async loadSource(e){return await this._reset(),await this._loadData(e),this._startTick(),!0}async _loadData(e){try{e&&(e=e.trim())}catch(e){}if(!e)throw this._emitError(new WA(zA,zA,null,null,"m3u8 url is missing"));const t=await this._loadM3U8(e),{currentStream:i}=this._playlist;if(this._urlSwitching){var s,r;if(0===i.bitrate&&null!==(s=this._switchUrlOpts)&&void 0!==s&&s.bitrate)i.bitrate=null===(r=this._switchUrlOpts)||void 0===r?void 0:r.bitrate;const e=this._getSeamlessSwitchPoint();this.config.startTime=e;const t=this._playlist.findSegmentIndexByTime(e),a=this._playlist.getSegmentByIndex(t+1);if(a){const e=a.start;this.player.debug.warn(this.TAG_NAME,`clear buffer from ${e}`)}}t&&(this.isLive?(this.player.debug.log(this.TAG_NAME,"is live"),this._bufferService.setLiveSeekableRange(0,4294967295),this.config.targetLatency<this._playlist.totalDuration&&(this.config.targetLatency=this._playlist.totalDuration,this.config.maxLatency=1.5*this.config.targetLatency),t.isMaster||this._pollM3U8(e)):(this.player.debug.log(this.TAG_NAME,`is vod and totalDuration is ${i.totalDuration} s`),await this._bufferService.updateDuration(i.totalDuration))),await this._loadSegment()}async _loadM3U8(e){let t;try{[t]=await this._manifestLoader.load(e)}catch(e){throw this._emitError(WA.create(e))}if(t){var i;if(this._playlist.upsertPlaylist(t),t.isMaster)null!==(i=this._playlist.currentStream.subtitleStreams)&&void 0!==i&&i.length&&this.emit(lr,{list:this._playlist.currentStream.subtitleStreams}),await this._refreshM3U8();else this.player.debug.warn(this.TAG_NAME,"_loadM3U8() is not master playlist");return this.emit(dr),t}this.player.debug.warn(this.TAG_NAME,"_loadM3U8() playlist is empty")}_refreshM3U8(){var e,t;this.player.debug.log(this.TAG_NAME,"_refreshM3U8()");const i=this._playlist.currentStream;if(!i||!i.url)throw this._emitError(WA.create(null,null,new Error("m3u8 url is not defined")));const s=i.url,r=null===(e=i.currentAudioStream)||void 0===e?void 0:e.url,a=null===(t=i.currentSubtitleStream)||void 0===t?void 0:t.url;return this._manifestLoader.load(s,r,a).then((e=>{let[t,i,o]=e;t?(this._playlist.upsertPlaylist(t,i,o),this.isLive&&this._pollM3U8(s,r,a)):this.player.debug.warn(this.TAG_NAME,"_refreshM3U8() mediaPlaylist is empty")})).catch((e=>{throw this._emitError(WA.create(e))}))}_pollM3U8(e,t,i){var s;let r=this._playlist.isEmpty;this._manifestLoader.poll(e,t,i,((e,t,i)=>{this._playlist.upsertPlaylist(e,t,i),this._playlist.clearOldSegment(),e&&r&&!this._playlist.isEmpty&&this._loadSegment(),r&&(r=this._playlist.isEmpty)}),(e=>{this._emitError(WA.create(e))}),1e3*((null===(s=this._playlist.lastSegment)||void 0===s?void 0:s.duration)||0))}async _loadSegmentDirect(){const e=this._playlist.nextSegment;if(!e)return void this.player.debug.log(this.TAG_NAME,"_loadSegmentDirect() !seg");let t=!1,i=null;try{this._segmentProcessing=!0,t=await this._reqAndBufferSegment(e,this._playlist.getAudioSegment(e))}catch(e){i=e}finally{this._segmentProcessing=!1}return i?this._emitError(WA.create(i)):(t?(this._urlSwitching&&(this._urlSwitching=!1,this.emit(nr,{url:this.config.url})),this._playlist.moveSegmentPointer(),this.player.debug.log(this.TAG_NAME,"_loadSegmentDirect()","seg.isLast",e.isLast),e.isLast?(this.player.debug.log(this.TAG_NAME,"_loadSegmentDirect()","seg.isLast"),this._end()):(this.player.debug.log(this.TAG_NAME,"_loadSegmentDirect()","and next _loadSegment()"),this._loadSegment())):this.player.debug.log(this.TAG_NAME,"_loadSegmentDirect() not appended"),t)}async _reqAndBufferSegment(e,t){this.player.debug.log(this.TAG_NAME,"video seg",e&&e.url,"audio seg",t&&t.url);const i=e?e.cc:t.cc,s=this._prevSegCc!==i;let r=[];try{r=await this._segmentLoader.load(e,t,s)}catch(e){throw e.fatal=!1,this._segmentLoader.error=e,e}if(!r[0])return;const a=await this._bufferService.decryptBuffer(...r);if(!a)return void this.player.debug.log(this.TAG_NAME,"decryptBuffer return null");const o=e?e.sn:t.sn,n=e?e.start:t.start,l=this._playlist.currentStream;return this._bufferService.createSource(a[0],a[1],null==l?void 0:l.videoCodec,null==l?void 0:l.audioCodec),await this._bufferService.appendBuffer(e,t,a[0],a[1],s,this._prevSegSn===o-1,n),this._prevSegCc=i,this._prevSegSn=o,!0}async _clear(){this.player.debug.log(this.TAG_NAME,"_clear()"),clearTimeout(this._disconnectTimer),this._stopTick(),await Promise.all([this._segmentLoader.cancel(),this._manifestLoader.stopPoll()]),this._segmentProcessing=!1}async _reset(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.player.debug.log(this.TAG_NAME,"_reset()"),this._reloadOnPlay=!1,this._prevSegSn=null,this._prevSegCc=null,this._switchUrlOpts=null,this._playlist.reset(),this._segmentLoader.reset(),this._seiService.reset(),this._stats.reset(),await this._clear(),this._bufferService.reset(e)}_end(){this.player.debug.log(this.TAG_NAME,"_end()"),this._clear()}_emitError(e){var t;let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var s;!1===(null===(t=e.originError)||void 0===t?void 0:t.fatal)?console.warn(e):(console.table(e),console.error(e),console.error(null===(s=this.media)||void 0===s?void 0:s.error),this._stopTick(),this._urlSwitching&&(this._urlSwitching=!1,this.emit(or,e)),i&&this._end(),this._seiService.reset(),this.emit(hr,e));return e}_getSeamlessSwitchPoint(){const{media:e}=this;let t=e.currentTime;if(!e.paused){var i;const s=this._playlist.findSegmentIndexByTime(e.currentTime),r=this._playlist.getSegmentByIndex(s),a=null===(i=this._stats)||void 0===i?void 0:i.getStats().downloadSpeed;if(a&&r){t+=r.duration*this._playlist.currentStream.bitrate/a+1}else t+=5}return t}getDemuxBuferredDuration(){return this._bufferService.getBuferredDuration()||0}getDemuxBufferedListLength(){return this._bufferService.getBufferedSegments()||0}getDemuxAudioBufferedListLength(){return this._bufferService.getBufferedAudioSegments()||0}getDemuxVideoBufferedListLength(){return this._bufferService.getBufferedVideoSegments()||0}}class $b extends a{constructor(e){super(),Jd(this,"TAG_NAME","Hls256Decoder"),this.player=e,this.$videoElement=this.player.video.$videoElement,this.hls=null,this.eventsDestroy=[],this.bandwidthEstimateInterval=null,this.hls=new zb(e),this._bindEvents()}async destroy(){return this._stopBandwidthEstimateInterval(),this.hls&&(await this.hls.destroy(),this.hls=null),this.eventsDestroy.length&&(this.eventsDestroy.forEach((e=>e())),this.eventsDestroy=[]),this.$videoElement=null,this.player.debug.log(this.TAG_NAME,"destroy"),!0}_bindEvents(){this.hls.on(hr,(e=>{this.player.emitError(ut.hlsError,e)})),this._startBandwidthEstimateInterval()}_startBandwidthEstimateInterval(){this._stopBandwidthEstimateInterval(),this.bandwidthEstimateInterval=setInterval((()=>{const e=this.hls.speedInfo();this.player.emit(lt.kBps,(e.avgSpeed/1024/8).toFixed(2)),this.hls.resetBandwidth()}),1e3)}_stopBandwidthEstimateInterval(){this.bandwidthEstimateInterval&&(clearInterval(this.bandwidthEstimateInterval),this.bandwidthEstimateInterval=null)}async loadSource(e){return this.url=e,await this.hls.loadSource(e),!0}checkHlsBufferedDelay(){let e=0;return this.hls&&(e=this.hls.getDemuxBuferredDuration()),e}getDemuxBufferedListLength(){let e=0;return this.hls&&(e=this.hls.getDemuxBufferedListLength()),e}getDemuxAudioBufferedListLength(){let e=0;return this.hls&&(e=this.hls.getDemuxAudioBufferedListLength()),e}getDemuxVideoBufferedListLength(){let e=0;return this.hls&&(e=this.hls.getDemuxVideoBufferedListLength()),e}}class Hb extends a{constructor(e){super(),this.player=e,this.TAG_NAME="CommonWebrtc",this.rtcPeerConnection=null,this.videoStream=null,this.isDisconnected=!1,this.isH264=this.player.isWebrtcH264(),this.eventsDestroy=[],this.supportVideoFrameCallbackHandle=null,this.isInitInfo=!1,this.$videoElement=this.player.video.$videoElement,this.bandwidthEstimateInterval=null,this.rtcPeerTrackVideoReceiver=null,this.rtcPeerTrackAudioReceiver=null,this.prevWebrtcVideoStats={},this.prevWebrtcAudioStats={},this.currentWebrtcStats={},this.player._opt.webrtcUseCanvasRender&&this.isH264&&(this.$videoElement=document.createElement("video"),Sa()&&(this.$videoElement.style.position="absolute"),this._initVideoEvents()),this.$videoElement.muted=!0,this._initRtcPeerConnection()}destroy(){this.isDisconnected=!1,this.isInitInfo=!1,this.prevWebrtcVideoStats={},this.currentWebrtcStats={},this.rtcPeerTrackVideoReceiver=null,this.rtcPeerTrackAudioReceiver=null,this._stopBandwidthEstimateInterval(),this.supportVideoFrameCallbackHandle&&this.$videoElement&&(this.$videoElement.cancelVideoFrameCallback(this.supportVideoFrameCallbackHandle),this.supportVideoFrameCallbackHandle=null),this.eventsDestroy.length&&(this.eventsDestroy.forEach((e=>e())),this.eventsDestroy=[]),this.isH264&&(this.videoStream&&(this.videoStream.getTracks().forEach((e=>e.stop())),this.videoStream=null),this.$videoElement.srcObject=null),this.rtcPeerConnection&&(this.rtcPeerConnection.onicecandidate=oa,this.rtcPeerConnection.ontrack=oa,this.rtcPeerConnection.onconnectionstatechange=oa,this.rtcPeerConnection.ondatachannel=oa,this.rtcPeerConnection.close(),this.rtcPeerConnection=null)}_initVideoEvents(){const{proxy:e}=this.player.events,t=e(this.$videoElement,ts,(()=>{this.player.debug.log(this.TAG_NAME,"video canplay"),this.$videoElement.play().then((()=>{this.player.debug.log(this.TAG_NAME,"video play"),this._startCanvasRender(),this._initRenderSize()})).catch((e=>{this.player.debug.warn(this.TAG_NAME,"video play error ",e)}))})),i=e(this.$videoElement,is,(()=>{this.player.debug.log("HlsDecoder","video waiting")})),s=e(this.$videoElement,ss,(e=>{const t=parseInt(e.timeStamp,10);this.player.handleRender(),this.player.updateStats({ts:t}),this.$videoElement.paused&&(this.player.debug.warn("HlsDecoder","video is paused and next try to replay"),this.$videoElement.play().then((()=>{this.player.debug.log("HlsDecoder","video is paused and replay success")})).catch((e=>{this.player.debug.warn("HlsDecoder","video is paused and replay error ",e)})))})),r=e(this.$videoElement,rs,(()=>{this.player.debug.log("HlsDecoder","video playback Rate change",this.$videoElement&&this.$videoElement.playbackRate)}));this.eventsDestroy.push(t,i,s,r)}_initRtcPeerConnection(){const e=new RTCPeerConnection,t=this.player;e.addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"}),e.onsignalingstatechange=e=>{this.player.debug.log(this.TAG_NAME,"onsignalingstatechange",e)},e.oniceconnectionstatechange=i=>{this.player.debug.log(this.TAG_NAME,"oniceconnectionstatechange",e.iceConnectionState);const s=e.iceConnectionState;switch(this.player.emit(lt.webrtcOnIceConnectionStateChange,s),this.isDisconnected="disconnected"===s,e.iceConnectionState){case"new":case"checking":case"closed":case"connected":case"completed":break;case"failed":t.emit(lt.webrtcFailed);break;case"disconnected":t.emit(lt.webrtcDisconnect);break;case"closed":t.emit(lt.webrtcClosed)}},e.onicecandidate=e=>{this.player.debug.log(this.TAG_NAME,"onicecandidate",e),e.candidate&&this.player.debug.log(this.TAG_NAME,"Remote ICE candidate: ",e.candidate.candidate)},e.ontrack=t=>{if(this.player.debug.log(this.TAG_NAME,"ontrack",t),"video"===t.track.kind){this.player.debug.log(this.TAG_NAME,"ontrack video"),this.rtcPeerTrackVideoReceiver=e.getReceivers().find((function(e){return e.track===t.track})),this.rtcPeerTrackVideoReceiver&&this._startBandwidthEstimateInterval();let i=t.streams[0];this.$videoElement.autoplay=!0,this.$videoElement.srcObject=i,this.videoStream=i}else"audio"===t.track.kind&&(this.player.debug.log(this.TAG_NAME,"ontrack audio"),this.rtcPeerTrackAudioReceiver=e.getReceivers().find((function(e){return e.track===t.track})),this.rtcPeerTrackAudioReceiver&&this._startBandwidthEstimateInterval())},e.onicecandidateerror=e=>{this.player.debug.log(this.TAG_NAME,"onicecandidateerror",e),this.player.emitError(ut.webrtcIceCandidateError,e)},e.onconnectionstatechange=i=>{switch(this.player.debug.log(this.TAG_NAME,"onconnectionstatechange",i),this.player.emit(lt.webrtcOnConnectionStateChange,e.connectionState),e.connectionState){case"new":case"connecting":case"connected":case"disconnected":break;case"failed":this.isDisconnected&&t.emit(lt.webrtcFailed)}},this.rtcPeerConnection=e}_startBandwidthEstimateInterval(){this.player.debug.log(this.TAG_NAME,"_startBandwidthEstimateInterval"),this._stopBandwidthEstimateInterval(),this.bandwidthEstimateInterval=setInterval((()=>{this.rtcPeerTrackVideoReceiver&&this.rtcPeerTrackVideoReceiver.getStats().then((e=>{let t={},i=0;e.forEach((e=>{if(e)switch(e.type){case kr:("succeeded"===e.state||e.bytesReceived)&&(this.currentWebrtcStats.timestamp=e.timestamp,this.currentWebrtcStats.rtt=e.currentRoundTripTime||-1,this.currentWebrtcStats.bytesReceived=e.bytesReceived||0,this.currentWebrtcStats.bytesSent=e.bytesSent||0);break;case Rr:this.currentWebrtcStats.remoteCandidate=e||{};break;case xr:this.currentWebrtcStats.localCandidate=e||{};break;case Cr:this.currentWebrtcStats.lastTimeStamp=e.timestamp;const s=((e.timestamp||0)-(this.prevWebrtcVideoStats.timestamp||0))/1e3,r=Number(e.bytesReceived||0)-Number(this.prevWebrtcVideoStats.bytesReceived||0),a=Math.floor(r/s);i+=a,t.vbps=a,this.prevWebrtcVideoStats=e;break;case Dr:e.frameWidth&&e.frameHeight&&(this.currentWebrtcStats.frameWidth=e.frameWidth||0,this.currentWebrtcStats.frameHeight=e.frameHeight||0)}})),this.rtcPeerTrackAudioReceiver?this.rtcPeerTrackAudioReceiver.getStats().then((e=>{e.forEach((e=>{if(e&&e.type===Cr){this.currentWebrtcStats.lastTimeStamp=e.timestamp;const s=((e.timestamp||0)-(this.prevWebrtcAudioStats.timestamp||0))/1e3,r=Number(e.bytesReceived||0)-Number(this.prevWebrtcAudioStats.bytesReceived||0),a=Math.floor(r/s);i+=a,t.abps=a,this.prevWebrtcAudioStats=e}})),this.player.updateStats(t),this.player.emit(lt.kBps,(i/1024).toFixed(2))})):(this.player.updateStats(t),this.player.emit(lt.kBps,(i/1024).toFixed(2)))}))}),1e3)}_stopBandwidthEstimateInterval(){this.player.debug.log(this.TAG_NAME,"_stopBandwidthEstimateInterval"),this.bandwidthEstimateInterval&&(clearInterval(this.bandwidthEstimateInterval),this.bandwidthEstimateInterval=null)}_startCanvasRender(){ko()?this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this)):(this._stopCanvasRender(),this.canvasRenderInterval=setInterval((()=>{this.player.video.render({$video:this.$videoElement,ts:0})}),40))}_stopCanvasRender(){this.canvasRenderInterval&&(clearInterval(this.canvasRenderInterval),this.canvasRenderInterval=null)}videoFrameCallback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.player.isDestroyedOrClosed()?this.player.debug.log(this.TAG_NAME,"videoFrameCallback() player is destroyed"):(this.player.video.render({$video:this.$videoElement,ts:t.mediaTime||0}),this.player.updateStats({dts:t.mediaTime||0}),this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this)))}_initRenderSize(){this.isInitInfo||(this.player.video.updateVideoInfo({width:this.$videoElement.videoWidth,height:this.$videoElement.videoHeight}),this.player.video.initCanvasViewSize(),this.isInitInfo=!0)}getVideoCurrentTime(){let e=0;return this.$videoElement&&(e=this.$videoElement.currentTime),e}}class Vb extends Hb{constructor(e){super(e),this.rtcPeerConnectionDataChannel=null,this.player.isWebrtcH265()&&(this.streamRate=ma((t=>{e.emit(lt.kBps,(t/1024).toFixed(2))}))),this.TAG_NAME="WebrtcForM7SDecoder",this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.stopStreamRateInterval(),this.rtcPeerConnectionDataChannel&&(this.rtcPeerConnectionDataChannel.onopen=oa,this.rtcPeerConnectionDataChannel.onclose=oa,this.rtcPeerConnectionDataChannel.onmessage=oa,this.rtcPeerConnectionDataChannel.close(),this.rtcPeerConnectionDataChannel=null),this.player.debug.log(this.TAG_NAME,"destroy")}_initRtcPeerConnection(){const e=new RTCPeerConnection,t=this.player;e.addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"}),e.onsignalingstatechange=e=>{this.player.debug.log(this.TAG_NAME,"onsignalingstatechange",e)},e.oniceconnectionstatechange=i=>{this.player.debug.log(this.TAG_NAME,"oniceconnectionstatechange",e.iceConnectionState);const s=e.iceConnectionState;switch(this.player.emit(lt.webrtcOnIceConnectionStateChange,s),this.isDisconnected="disconnected"===s,e.iceConnectionState){case"new":case"checking":case"closed":case"connected":case"completed":break;case"failed":t.emit(lt.webrtcFailed);break;case"disconnected":t.emit(lt.webrtcDisconnect);break;case"closed":t.emit(lt.webrtcClosed)}},e.onicecandidate=e=>{this.player.debug.log(this.TAG_NAME,"onicecandidate",e),e.candidate&&this.player.debug.log(this.TAG_NAME,"Remote ICE candidate: ",e.candidate.candidate)},e.ontrack=i=>{this.player.debug.log(this.TAG_NAME,"ontrack",i);const s=t.video.$videoElement;if(t.isWebrtcH264())if("video"===i.track.kind){this.player.debug.log(this.TAG_NAME,"ontrack video"),this.rtcPeerTrackVideoReceiver=e.getReceivers().find((function(e){return e.track===i.track})),this.rtcPeerTrackVideoReceiver&&this._startBandwidthEstimateInterval();let t=i.streams[0];s.autoplay=!0,s.srcObject=t,this.videoStream=t}else"audio"===i.track.kind&&(this.player.debug.log(this.TAG_NAME,"ontrack audio"),this.rtcPeerTrackAudioReceiver=e.getReceivers().find((function(e){return e.track===i.track})),this.rtcPeerTrackAudioReceiver&&this._startBandwidthEstimateInterval())},e.onicecandidateerror=e=>{this.player.debug.log(this.TAG_NAME,"onicecandidateerror",e),this.player.emitError(ut.webrtcIceCandidateError,e)},e.onconnectionstatechange=i=>{switch(t.debug.log(this.TAG_NAME,`sdp connect status ${e.connectionState}`),e.connectionState){case"new":case"connecting":case"connected":case"disconnected":break;case"failed":this.isDisconnected&&t.emit(lt.webrtcFailed)}},e.ondatachannel=e=>{const t=e.channel;this.player.debug.log(this.TAG_NAME,"ondatachannel"),t.onopen=()=>{this.player.debug.log(this.TAG_NAME,"ondatachannel and onopen")},t.onmessage=e=>{const t=e.data;if(this.player.isWebrtcH264())return this.player.debug.warn(this.TAG_NAME,"ondatachannel is H265 but decode is h264 so emit webrtcStreamH265 "),void this.player.emit(lt.webrtcStreamH265);this.player.isDestroyedOrClosed()?this.player.debug.warn(this.TAG_NAME,"ondatachannel and player is destroyed"):(this.streamRate&&this.streamRate(t.byteLength),this.player.demux&&this.player.demux.dispatch(t))},t.onclose=()=>{this.player.debug.warn(this.TAG_NAME,"ondatachannel and onclose")},this.rtcPeerConnectionDataChannel=t};e.createDataChannel("signal").onmessage=e=>{this.player.debug.log(this.TAG_NAME,"signalChannel,onmessage",e);JSON.parse(e.data).type},this.rtcPeerConnection=e}startStreamRateInterval(){this.stopStreamRateInterval(),this.streamRateInterval=setInterval((()=>{this.streamRate&&this.streamRate(0)}),1e3)}stopStreamRateInterval(){this.streamRateInterval&&(clearInterval(this.streamRateInterval),this.streamRateInterval=null)}loadSource(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,s)=>{const r=this.rtcPeerConnection;r.createOffer().then((a=>{r.setLocalDescription(a),this.player.debug.log(this.TAG_NAME,"getWebRtcRemoteSdp loadSource"),function(e,t,i){let s={"Content-Type":"application/sdp"};return i.username&&i.password&&(s.Authorization="Basic "+btoa(i.username+":"+i.password)),fetch(e,{method:"POST",mode:"cors",cache:"no-cache",credentials:"include",redirect:"follow",referrerPolicy:"no-referrer",headers:s,body:t})}(e,a.sdp,t).then((e=>{e.text().then((e=>{this.player.debug.log(this.TAG_NAME,"getWebRtcRemoteSdp response"),e?r.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:e})).then((()=>{this.player.isWebrtcH265()&&this.startStreamRateInterval(),i()})).catch((e=>{s(e)})):s("sdp is null")})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource response.text() error",e),s(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource getWebRtcRemoteSdp response error",e),s(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource rtcPeerConnection.createOffer() error",e),s(e)}))}))}}class Wb extends Hb{constructor(e){super(e),this.TAG_NAME="WebrtcForZLMDecoder",this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.player.debug.log(this.TAG_NAME,"destroy")}loadSource(e){return new Promise(((t,i)=>{const s=this.rtcPeerConnection;s.createOffer().then((r=>{s.setLocalDescription(r),this.player.debug.log(this.TAG_NAME,"getWebRtcRemoteSdp loadSource"),function(e,t){return El({url:e,type:"POST",data:t,contentType:"text/plain;charset=utf-8",processData:!1,dataType:"json"})}(e,r.sdp).then((e=>{this.player.debug.log(this.TAG_NAME,`getWebRtcRemoteSdp response and code is ${e.code}`);const r=e;if(r&&0!==r.code)return i(r.msg);r&&r.sdp?s.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:r.sdp})).then((()=>{t()})).catch((e=>{i(e)})):i("sdp is null")})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource getWebRtcRemoteSdp response error",e),i(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource rtcPeerConnection.createOffer() error",e),i(e)}))}))}}class Jb extends a{constructor(e,t){if(super(),this.player=e,this.player.$container.classList.add("jb-pro-container-playback"),this._showPrecision=null,this._startTime=null,this._playStartTime=null,this._playingTimestamp=null,this._fps=parseInt(t.fps,10)||e._opt.playbackFps,this._isUseFpsRender=!!yo(t.isUseFpsRender),this._rate=1,this._audioTimestamp=0,this._videoTimestamp=0,this.controlType=t.controlType||X.normal,t.controlType&&-1===[X.normal,X.simple].indexOf(t.controlType)&&(this.player.debug.warn("Playback","constructor()","controlType is not in [normal,simple]",t.controlType),this.controlType=X.normal),this._currentLocalTimestamp=0,this._localOneFrameTimestamp=t.localOneFrameTimestamp||40,this._localCalculateTimeInterval=null,this._isUseLocalCalculateTime=!!yo(t.isUseLocalCalculateTime),this._isPlaybackPauseClearCache=!Ao(t.isPlaybackPauseClearCache),this._isCacheBeforeDecodeForFpsRender=!!yo(t.isCacheBeforeDecodeForFpsRender),this._startfpsTime=null,this._startFpsTimestamp=null,this._checkStatsInterval=null,this._playbackTs=0,this._renderFps=0,this._isUseLocalCalculateTime?this._startLocalCalculateTime():this._listen(),this.playbackList=[],this._playbackListStartTimestamp=null,this._totalDuration=0,t.controlType===X.normal)this.initPlaybackList(t.playList,t.showPrecision,t.startTime);else if(t.controlType===X.simple){t.duration&&(this._totalDuration=1e3*t.duration);let e=t.startTime||0;e>this.totalDuration&&(e=this.totalDuration),this.setStartTime(e)}this.player.on(lt.playbackPause,(e=>{e?this.pause():this.resume()}));const i={fps:this._fps,isUseFpsRender:this._isUseFpsRender,localOneFrameTimestamp:this._localOneFrameTimestamp,isUseLocalCalculateTime:this._isUseLocalCalculateTime,uiUsePlaybackPause:t.uiUsePlaybackPause,showControl:t.showControl};e.debug.log("Playback","init",JSON.stringify(i))}destroy(){this._startTime=null,this._showPrecision=null,this._playStartTime=null,this._playingTimestamp=null,this._totalDuration=0,this._audioTimestamp=0,this._videoTimestamp=0,this._fps=null,this._isUseFpsRender=!1,this._rate=1,this.playbackList=[],this._playbackListStartTimestamp=null,this._localCalculateTimeInterval=null,this._currentLocalTimestamp=0,this._startfpsTime=null,this._startFpsTimestamp=null,this._renderFps=0,this._playbackTs=0,this._stopLocalCalculateTime(),this.clearStatsInterval(),this.player.$container&&this.player.$container.classList.remove("jb-pro-container-playback"),this.off(),this.player.debug.log("Playback","destroy")}_listen(){this.player.on(lt.stats,(e=>{const t=e.ts;this._playStartTime||(this._playStartTime=t-1e3);let i=t-this._playStartTime;this.setPlayingTimestamp(i)}))}pause(){this.clearStatsInterval()}resume(){this.startCheckStatsInterval()}updateStats(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._startFpsTimestamp||(this._startFpsTimestamp=ha()),Oa(e.ts)&&(this.player.updateStats({fps:!0,ts:e.ts}),this._playbackTs=e.ts,this._startfpsTime||(this._startfpsTime=e.ts),this._renderFps+=1);const t=ha(),i=t-this._startFpsTimestamp;if(i<1e3)return;let s=null;this._startfpsTime&&(s=this._playbackTs-this._startfpsTime),this.player.emit(lt.playbackStats,{fps:this._renderFps,rate:this.rate,start:this._startfpsTime,end:this._playbackTs,timestamp:i,dataTimestamp:s,audioBufferSize:this.player.audio?this.player.audio.bufferSize:0,videoBufferSize:this.player.video?this.player.video.bufferSize:0,ts:this._playbackTs}),this._renderFps=0,this._startfpsTime=this._playbackTs,this._startFpsTimestamp=t}updateLocalOneFrameTimestamp(e){this._localOneFrameTimestamp=e}_startLocalCalculateTime(){this._stopLocalCalculateTime(),this._localCalculateTimeInterval=setInterval((()=>{const e=this._currentLocalTimestamp;this._playStartTime||(this._playStartTime=e-1e3);let t=e-this._playStartTime;this.setPlayingTimestamp(t)}),1e3)}startCheckStatsInterval(){this.clearStatsInterval(),this._checkStatsInterval=setInterval((()=>{this.updateStats()}),1e3)}_stopLocalCalculateTime(){this._localCalculateTimeInterval&&(clearInterval(this._localCalculateTimeInterval),this._localCalculateTimeInterval=null)}clearStatsInterval(){this._checkStatsInterval&&(clearInterval(this._checkStatsInterval),this._checkStatsInterval=null)}increaseLocalTimestamp(){this._isUseLocalCalculateTime&&(this._currentLocalTimestamp+=this._localOneFrameTimestamp)}initPlaybackList(e,t,i){this.playbackList=e||[];let s=0;if(this.playbackList.forEach(((e,t)=>{10===Ja(e.start)&&(e.startTimestamp=1e3*e.start,e.startTime=Ta(e.startTimestamp)),10===Ja(e.end)&&(e.endTimestamp=1e3*e.end,e.endTime=Ta(e.endTimestamp)),e.duration=e.end-e.start,s+=e.duration})),this._totalDuration=s,this.player.debug.log("Playback",this.playbackList),this.playbackList.length>0){const e=this.playbackList[0].startTimestamp;this._playbackListStartTimestamp=e;let t=e;i&&(10===Ja(i)&&(i*=1e3),this._isTimeInPlaybackList(i)&&(t=i)),this.setStartTime(t)}const r=t||Si;this.setShowPrecision(r)}get totalDuration(){return(this._totalDuration||0)/1e3}get startTime(){return this._startTime||0}setStartTime(e){this._startTime=e,this._playingTimestamp=e,this._playStartTime=null}setRate(e){this._rate=e,this.player.emit(lt.playbackRateChange,e)}get fps(){return this._fps}get rate(){return this._rate}get isUseFpsRender(){return this._isUseFpsRender}get isUseLocalCalculateTime(){return this._isUseLocalCalculateTime}get showPrecision(){return this._showPrecision}get is60Min(){return this.showPrecision===Si}get is30Min(){return this.showPrecision===Ti}get is10Min(){return this.showPrecision===Ei}get is5Min(){return this.showPrecision===ki}get is1Min(){return this.showPrecision===ki}get isPlaybackPauseClearCache(){return this._isPlaybackPauseClearCache}get isCacheBeforeDecodeForFpsRender(){return this._isCacheBeforeDecodeForFpsRender}setShowPrecision(e){xi.includes(e)||(this.player.debug.warn("Playback","setShowPrecision()","type is not in PLAYBACK_CONTROL_TIME_PRECISION_ARRAY",e),e=Si),this._showPrecision&&this._showPrecision===e||(this._showPrecision=e,this.player.emit(lt.playbackPrecision,this._showPrecision,this.playbackList),this.player.emit(lt.playbackShowPrecisionChange,this._showPrecision))}setPlayingTimestamp(e){let t;if(this.controlType===X.normal){t=this.startTime+e,this._playingTimestamp=t,this.player.emit(lt.playbackTime,t);const i=new Date(t);this.player.emit(lt.playbackTimestamp,{ts:t,hour:i.getHours(),min:i.getMinutes(),second:i.getSeconds()})}else this.controlType===X.simple&&(t=this.startTime+Math.round(e/1e3),t>this.totalDuration&&(this.player.debug.log("Playback","setPlayingTimestamp()",`timestamp ${t} > this.totalDuration ${this.totalDuration}`),t=this.totalDuration),this._playingTimestamp=t,this.player.emit(lt.playbackTime,t),this.player.emit(lt.playbackTimestamp,{ts:t}))}get playingTimestamp(){return this._playingTimestamp}narrowPrecision(){const e=xi.indexOf(this.showPrecision)-1;if(e>=0){const t=xi[e];this.setShowPrecision(t)}}expandPrecision(){const e=xi.indexOf(this.showPrecision)+1;if(e<=xi.length-1){const t=xi[e];this.setShowPrecision(t)}}seek(e){if(this.player.debug.log("Playback","seek()",e),this.controlType===X.normal){if("true"===e.hasRecord){let t=e.time;"min"===e.type&&(t=60*e.time);let i=function(e){let t={};e>-1&&(t={hour:Math.floor(e/60/60)%60,min:Math.floor(e/60)%60,second:e%60});return t}(t);if(this._playbackListStartTimestamp){const e=new Date(this._playbackListStartTimestamp).setHours(i.hour,i.min,i.second,0);i.timestamp=e;const t=this._findMoreInfoByTimestamp(e);i&&t.more&&(i.more=t.more)}this.player.emit(lt.playbackSeek,i)}}else if(this.controlType===X.simple){let t=e.time;this.player.emit(lt.playbackSeek,{ts:t})}}currentTimeScroll(){this.player.emit(lt.playbackTimeScroll)}_findMoreInfoByTimestamp(e){let t=null;return this.playbackList.forEach(((i,s)=>{i.startTimestamp<=e&&i.endTimestamp>=e&&(t=i)})),t}_isTimeInPlaybackList(e){let t=!1;return this.playbackList.forEach(((i,s)=>{i.startTimestamp<=e&&i.endTimestamp>=e&&(t=!0)})),t}getControlType(){return this.controlType}isControlTypeNormal(){return this.controlType===X.normal}isControlTypeSimple(){return this.controlType===X.simple}}class qb extends a{constructor(e){super(),this.player=e,this.TAG_NAME="zoom",this.bindEvents=[],this.isDragging=!1,this.currentZoom=1,this.prevVideoElementStyleTransform=null,this.prevVideoElementStyleScale=null,this.maxScale=5,this.tempPosition={x:0,y:0},this.videoPosition={left:0,top:0};const{events:{proxy:t},debug:i}=this.player;this.player.on(lt.zooming,(e=>{if(e){this.player.$container.classList.add("jb-pro-zoom-control"),this._bindEvents();const e=this.player.video.$videoElement.style.transform;let t=this.player.video.$videoElement.offsetLeft,i=this.player.video.$videoElement.offsetTop;t=parseFloat(t),i=parseFloat(i),t&&(this.videoPosition.left=t),i&&(this.videoPosition.top=i),this.prevVideoElementStyleTransform=e;let s=e.match(/scale\([0-9., ]*\)/g);if(s&&s[0]){let e=s[0].replace("scale(","").replace(")","");this.prevVideoElementStyleScale=e.split(",")}}else{this.player.$container.classList.remove("jb-pro-zoom-control"),this._unbindEvents(),this._resetVideoPosition(),this.player.$container.style.cursor="auto";let e=this.prevVideoElementStyleTransform;this.player.video.$videoElement.style.transform=e,this.prevVideoElementStyleTransform=null,this.prevVideoElementStyleScale=null,ya()&&this.player._opt.useWebFullScreen&&this.player.resize()}}));const s=t(window,ya()?"touchend":"mouseup",(e=>{this.handleMouseUp(e)}));this.bindEvents.push(s),e.debug.log("zoom","init")}destroy(){this.bindEvents=[],this.isDragging=!1,this.currentZoom=1,this.prevVideoElementStyleTransform=null,this.prevVideoElementStyleScale=null,this.tempPosition={x:0,y:0},this.videoPosition={left:0,top:0},this.off(),this.player.debug.log("zoom","destroy")}_bindEvents(){const{events:{proxy:e},debug:t}=this.player,i=e(this.player.$container,ya()?"touchmove":"mousemove",(e=>{this.handleMouseMove(e)}));this.bindEvents.push(i);const s=e(this.player.$container,ya()?"touchstart":"mousedown",(e=>{this.handleMouseDown(e)}));this.bindEvents.push(s);const r=e(window,ya()?"touchend":"mouseup",(e=>{this.handleMouseUp(e)}));this.bindEvents.push(r)}_unbindEvents(){this.bindEvents.forEach((e=>{e&&e()}))}handleMouseMove(e){if(e.stopPropagation(),this.isDragging&&this.player.zooming){e.preventDefault();const{posX:t,posY:i}=io(e),s=this.tempPosition.x-t,r=this.tempPosition.y-i;this.videoPosition.left=this.videoPosition.left-s,this.videoPosition.top=this.videoPosition.top-r,this.tempPosition.x=t,this.tempPosition.y=i,this.updateVideoPosition()}}handleMouseDown(e){e.stopPropagation();const t=Za(e);if(this.player.zooming&&(t.matches("video")||t.matches("canvas"))){e.preventDefault();const{posX:t,posY:i}=io(e);this.player.$container.style.cursor="grabbing",this.tempPosition.x=t,this.tempPosition.y=i,this.isDragging=!0,this.player.debug.log("zoom","handleMouseDown is dragging true")}}handleMouseUp(e){e.stopPropagation(),this.isDragging&&this.player.zooming&&(e.preventDefault(),this.tempPosition={x:0,y:0},this.isDragging=!1,this.player.$container.style.cursor="grab",this.player.debug.log("zoom","handleMouseUp is dragging false"))}updateVideoPosition(){const e=this.player.video.$videoElement;e.style.left=this.videoPosition.left+"px",e.style.top=this.videoPosition.top+"px"}_resetVideoPosition(){this.player.resize(),this.tempPosition={x:0,y:0},this.videoPosition={left:0,top:0},this.currentZoom=1,this.isDragging=!1}narrowPrecision(){this.currentZoom<=1||(this.currentZoom-=1,this.updateVideoElementScale())}expandPrecision(){this.currentZoom>=this.maxScale||(this.currentZoom+=1,this.updateVideoElementScale())}updatePrevVideoElementStyleScale(e){this.prevVideoElementStyleScale=e}updateVideoElementScale(){const e=this.player.video.$videoElement;let t=e.style.transform,i=1,s=1;if(this.prevVideoElementStyleScale){const e=this.prevVideoElementStyleScale[0];void 0!==e&&(i=e,s=e);const t=this.prevVideoElementStyleScale[1];void 0!==t&&(s=t)}s=ka(s),i=ka(i);const r=.5*i*(this.currentZoom-1)+i,a=.5*s*(this.currentZoom-1)+s;let o;o=-1===t.indexOf("scale(")?t+` scale(${r},${a})`:t.replace(/scale\([0-9., ]*\)/,`scale(${r},${a})`),this.player.debug.log("zoom",`updateVideoElementScale end is ${r}, ${a} style is ${o}`),e.style.transform=o}}class Kb extends a{constructor(e){super(),this.player=e,this.faceDetector=null,this.objectDetector=null,this.imageDetector=null,this.occlusionDetector=null,this.initFaceDetector(),this.initObjectDetector(),this.initImageDetector(),this.initOcclusionDetector();let t="init";this.faceDetector&&(t+=" and use faceDetector"),this.objectDetector&&(t+=" and use objectDetector"),this.imageDetector&&(t+=" and use imageDetector"),this.occlusionDetector&&(t+=" and use occlusionDetector"),this.player.debug.log("AiLoader",t)}destroy(){this.off(),this.faceDetector&&(this.faceDetector.destroy(),this.faceDetector=null),this.objectDetector&&(this.objectDetector.destroy(),this.objectDetector=null),this.imageDetector&&(this.imageDetector.destroy(),this.imageDetector=null),this.occlusionDetector&&(this.occlusionDetector.destroy(),this.occlusionDetector=null),this.player.debug.log("AiLoader","destroy")}initFaceDetector(){if(this.player._opt.useFaceDetector&&window.JessibucaProFaceDetector){const e=new JessibucaProFaceDetector({detectWidth:this.player._opt.aiFaceDetectWidth,showRect:!1,debug:this.player._opt.debug,debugLevel:this.player._opt.debugLevel,debugUuid:this.player._opt.debugUuid});e.load().then((()=>{this.player.debug.log("AiLoader","init face detector success"),this.faceDetector=e,this.faceDetector.on("jessibuca-pro-face-detector-info",(e=>{if(this.player.emit(lt.aiFaceDetectorInfo,e),this.player._opt.aiFaceDetectShowRect){const t=this.player._opt.aiFaceDetectRectConfig||{},i=(e.list||[]).map((e=>(e.type="rect",e.color=t.borderColor||"#0000FF",e.lineWidth=t.borderWidth||2,e)));this.player.video&&this.player.video.addAiContentToCanvas(i)}}))}))}}initObjectDetector(){if(this.player._opt.useObjectDetector&&window.JessibucaProObjectDetector){const e=new JessibucaProObjectDetector({detectWidth:this.player._opt.aiObjectDetectWidth,showRect:!1,debug:this.player._opt.debug,debugLevel:this.player._opt.debugLevel,debugUuid:this.player._opt.debugUuid});e.load().then((()=>{this.player.debug.log("AiLoader","init object detector success"),this.objectDetector=e,this.objectDetector.on("jessibuca-pro-object-detector-info",(e=>{if(this.player.emit(lt.aiObjectDetectorInfo,e),this.player._opt.aiObjectDetectShowRect){const t=[],i=this.player._opt.aiObjectDetectRectConfig||{};(e.list||[]).forEach((e=>{const s={type:"rect",color:i.borderColor||"#0000FF",lineWidth:i.borderWidth||2,x:e.rect.x,y:e.rect.y,width:e.rect.width,height:e.rect.height},r={type:"text",color:i.color||"#000",fontSize:i.fontSize||14,text:e.zh,x:e.rect.x,y:e.rect.y-25};t.push(s,r)})),this.player.video&&this.player.video.addAiContentToCanvas(t)}}))}))}}initImageDetector(){if(this.player._opt.useImageDetector&&window.JessibucaProImageDetector){const e=new JessibucaProImageDetector({debug:this.player._opt.debug,debugLevel:this.player._opt.debugLevel,debugUuid:this.player._opt.debugUuid});e.load().then((()=>{this.player.debug.log("AiLoader","init image detector success"),this.imageDetector=e}))}}initOcclusionDetector(){if(this.player._opt.useOcclusionDetector&&window.JessibucaProOcclusionDetector){const e=new JessibucaProOcclusionDetector({debug:this.player._opt.debug,debugLevel:this.player._opt.debugLevel,debugUuid:this.player._opt.debugUuid});e.load().then((()=>{this.player.debug.log("AiLoader","init occlusion detector success"),this.occlusionDetector=e}))}}updateFaceDetectorConfig(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.faceDetector&&this.faceDetector.updateConfig(e)}updateObjectDetectorConfig(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.objectDetector&&this.objectDetector.updateConfig(e)}updateImageDetectorConfig(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.imageDetector&&this.imageDetector.updateConfig(e)}updateOcclusionDetectorConfig(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.occlusionDetector&&this.occlusionDetector.updateConfig(e)}}class Yb extends a{constructor(e){super(),this.player=e,this.LOG_NAME="Contextmenu",this.menuList=[],this.$contextmenus=e.control.$contextmenus,ya()?this.player.debug.warn(this.LOG_NAME,"not support mobile"):this.init(),e.debug.log(this.LOG_NAME,"init")}destroy(){this.menuList=[],this.player.debug.log(this.LOG_NAME,"destroy")}get isShow(){return e=this.player.$container,t="jb-pro-contextmenus-show",e.classList.contains(t);var e,t}show(){Ph(this.player.$container,"jb-pro-contextmenus-show")}hide(){var e,t;e=this.player.$container,t="jb-pro-contextmenus-show",e.classList.remove(t)}init(){const{events:{proxy:e},debug:t}=this.player;this.player._opt.contextmenuBtns.length>0&&this.player._opt.contextmenuBtns.forEach((e=>{this.addMenuItem(e)})),e(this.player.$container,"contextmenu",(e=>{e.preventDefault(),this.show();const t=e.clientX,i=e.clientY,{height:s,width:r,left:a,top:o}=this.player.$container.getBoundingClientRect(),{height:n,width:l}=this.$contextmenus.getBoundingClientRect();let d=t-a,h=i-o;t+l>a+r&&(d=r-l),i+n>o+s&&(h=s-n),ua(this.$contextmenus,{left:`${d}px`,top:`${h}px`})})),e(this.player.$container,"click",(e=>{Uh(e,this.$contextmenus)||this.hide()})),this.player.on(lt.blur,(()=>{this.hide()}))}_validateMenuItem(e){let t=!0;return e.content||(this.player.debug.warn(this.LOG_NAME,"content is required"),t=!1),t}addMenuItem(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=po(js);if(e=Object.assign({},t,e),!this._validateMenuItem(e))return;const{events:{proxy:i},debug:s}=this.player,r=Ca(),a=`\n <div class="jb-pro-contextmenu jb-pro-contextmenu-${r}">\n ${e.content}\n </div>\n `,o=Array.from(this.$contextmenus.children)[e.index];o?o.insertAdjacentHTML("beforebegin",a):Bh(this.$contextmenus,a);const n=this.$contextmenus.querySelector(`.jb-pro-contextmenu-${r}`);e.click&&i(n,"click",(t=>{t.preventDefault(),e.click.call(this.player,this,t),this.hide()})),this.menuList.push({uuid:r,$menuItem:n})}}class Qb extends Hb{constructor(e){super(e),this.TAG_NAME="WebrtcForSRSDecoder",this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.player.debug.log(this.TAG_NAME,"destroy")}loadSource(e){return new Promise(((t,i)=>{const s=this.rtcPeerConnection;s.createOffer().then((r=>{s.setLocalDescription(r),this.player.debug.log(this.TAG_NAME,"getWebRtcRemoteSdp loadSource"),function(e,t){return fetch(e,{method:"POST",mode:"cors",cache:"no-cache",credentials:"include",redirect:"follow",referrerPolicy:"no-referrer",headers:{"Content-Type":"application/sdp"},body:t})}(e,r.sdp).then((e=>{this.player.debug.log(this.TAG_NAME,`getWebRtcRemoteSdp response and code is ${e.code}`);const r=e;if(r&&0!==r.code)return i(r.msg);r?s.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:r})).then((()=>{t()})).catch((e=>{i(e)})):i("sdp is null")})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource getWebRtcRemoteSdp response error",e),i(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource rtcPeerConnection.createOffer() error",e),i(e)}))}))}}class Xb extends Hb{constructor(e){super(e),this.TAG_NAME="WebrtcForOthersDecoder",this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.player.debug.log(this.TAG_NAME,"destroy")}loadSource(e){return new Promise(((t,i)=>{const s=this.rtcPeerConnection;s.createOffer().then((r=>{s.setLocalDescription(r),this.player.debug.log(this.TAG_NAME,"getWebRtcRemoteSdp loadSource"),function(e,t){return fetch(e,{method:"POST",mode:"cors",cache:"no-cache",credentials:"include",redirect:"follow",referrerPolicy:"no-referrer",headers:{"Content-Type":"application/sdp"},body:t})}(e,r.sdp).then((e=>{this.player.debug.log(this.TAG_NAME,`getWebRtcRemoteSdp response and code is ${e.code}`),e.text().then((e=>{this.player.debug.log(this.TAG_NAME,"getWebRtcRemoteSdp response");try{let t=JSON.parse(e);this.player.debug.log(this.TAG_NAME,"this is json sdp response"),0!=t.code&&(this.player.debug.log(this.TAG_NAME,`response json code ${t.code}`),i(new Error(`response sdp json code: ${t.code}`))),e=t.sdp}catch(e){this.player.debug.log(this.TAG_NAME,"this is raw sdp response")}e?s.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:e})).then((()=>{t()})).catch((e=>{i(e)})):i("sdp is null")})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource response.text() error",e),i(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource getWebRtcRemoteSdp response error",e),i(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource rtcPeerConnection.createOffer() error",e),i(e)}))}))}}class Zb extends a{constructor(e){if(super(),this.TAG_NAME="AliyunRtc",this.player=e,!window.AliRTS)throw new Error("AliyunRtc is not defined");this.aliyunRtc=window.AliRTS.createClient(),this.aliyunRtcRemoteStream=null,this.$videoElement=this.player.video.$videoElement,this.listenEvents(),this.player.debug.log(this.TAG_NAME,"init")}destroy(){this.aliyunRtc&&(this.aliyunRtcRemoteStream&&(this.aliyunRtcRemoteStream=null),this.aliyunRtc.unsubscribe(),this.aliyunRtc=null),this.off(),this.player.debug.log(this.TAG_NAME,"destroy")}listenEvents(){this.aliyunRtc.on("onError",(e=>{this.player.debug.log(this.TAG_NAME,`onError and code is ${e.errorCode} and message: ${e.message}`),10400!==e.errorCode&&(this.player.debug.error(this.TAG_NAME,`onError and code is ${e.errorCode} and message: ${e.message}`),this.player.emitError(ut.aliyunRtcError,e))})),this.aliyunRtc.on("reconnect",(e=>{this.player.debug.log(this.TAG_NAME,"reconnect",e)}));const e="canplay",t="waiting",i="playing",s="media";this.aliyunRtc.on("onPlayEvent",(r=>{if(r.event===e)this.player.debug.log(this.TAG_NAME,"onPlayEvent and canplay");else if(r.event===t)this.player.debug.log(this.TAG_NAME,"onPlayEvent and playing - > waiting");else if(r.event===i)this.player.debug.log(this.TAG_NAME,"onPlayEvent and waiting -> playing");else if(r.event===s){const e=r.data;let t={},i=0;if(e.audio){const s=Math.floor(e.audio.bytesReceivedPerSecond);i+=s,t.abps=s}if(e.video){const s=Math.floor(e.video.bytesReceivedPerSecond);i+=s,t.vbps=s}this.player.updateStats(t),this.player.emit(lt.kBps,(i/1024).toFixed(2))}}))}loadSource(e){return new Promise(((t,i)=>{this.aliyunRtc.isSupport({isReceiveVideo:!0}).then((()=>{this.aliyunRtc.subscribe(e,{}).then((e=>{this.aliyunRtcRemoteStream=e,e.play(this.$videoElement),t()})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource and subscribe is not success: ",e.message),i(e.message)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource and is not support: ",e.message),i(e.message)}))}))}getVideoCurrentTime(){let e=0;return this.$videoElement&&(e=this.$videoElement.currentTime),e}}class e_{constructor(e){this.player=e,this.TAG_NAME="PressureObserverCpu",this.observer=null,this.latestCpuInfo=null,this.currentLevel=-1,this._init(),this.player.debug.log(this.TAG_NAME,"init")}destroy(){this.observer&&(this.observer.disconnect(),this.observer=null),this.latestCpuInfo=null,this.currentLevel=-1,this.player.debug.log(this.TAG_NAME,"destroy")}getCurrentCpuState(){return this.currentLevel}_init(){Ao(Co())?this.player.debug.log(this.TAG_NAME,"not support PressureObserver"):(this.observer=new PressureObserver((e=>{const t=(e||[]).find((e=>"cpu"===e.source));if(t){switch(this.latestCpuInfo=t,t.state){case"nominal":this.currentLevel=0;break;case"fair":this.currentLevel=1;break;case"serious":this.currentLevel=2;break;case"critical":this.currentLevel=3;break;default:this.currentLevel=-1}this.player.emit(lt.pressureObserverCpu,this.currentLevel)}})),this.observer&&this.observer.observe("cpu"))}}class t_ extends Oo{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e),this.TAG_NAME="DynamicWatermark",this.isPauseAnimation=!1,this.isStopAnimation=!1,this.rafID=null,this.speed=t.speed||.2,this.isDynamic=!0,this.shadowRootDynamicDom=null,this.isGhost=!0===t.isGhost,this.ghostConfig={on:t.on||5,off:t.off||5},this.waterMarkWillRemove=!1,this.waterMarkWillAdd=!1,this.player.once(lt.start,(()=>{const e=t.content;let i=this.player.getVideoInfo();i||(i={width:200,height:200}),this.update({text:{content:e,fontSize:t.fontSize||18,color:t.color||"white"},left:i.width*Math.random(),top:i.height*Math.random(),opacity:t.opacity||.15}),this.startAnimation()})),this.player.debug.log(this.TAG_NAME,"int")}destroy(){super.destroy(),this.shadowRootDynamicDom=null,this.stopAnimation(),this.rafID&&(cancelAnimationFrame(this.rafID),this.rafID=null)}startAnimation(){if(!this.rafID){let e=1,t=1,i=Math.random(),s={width:0,height:0};const r=()=>{try{if(Ao(this.isPauseAnimation)&&this.shadowRootDynamicDom&&this.shadowRootInnerDom){const a=this.shadowRootInnerDom,o=this.shadowRootDynamicDom,n=a.getBoundingClientRect(),l=o.getBoundingClientRect();if(l.width&&l.height&&(s.width=l.width,s.height=l.height),!this.shadowRootInnerDom.contains(this.shadowRootDynamicDom))return this.isGhost?Ao(this.waterMarkWillAdd)&&(this.waterMarkWillAdd=!0,setTimeout((()=>{this._addDom(n,s),this.waterMarkWillAdd=!1}),1e3*this.ghostConfig.off)):this._addDom(n,s),void(0!==this.speed&&requestAnimationFrame(r));const d=Math.min(1,0===this.speed?0:this.speed?this.speed:.2);let h=l.left-n.left,c=l.top-n.top;h+=d*t*i,c+=d*e*(1-i),h+s.width>n.width?(t=-1,i=Math.random()):h<0&&(t=1,i=Math.random()),c+s.height>n.height?(e=-1,i=Math.random()):c<0&&(e=1,i=Math.random()),h=Math.min(n.width-s.width,h),c=Math.min(n.height-s.height,c);const u=h/n.width*100,p=c/n.height*100;this.shadowRootDynamicDom.style.left=`${u}%`,this.shadowRootDynamicDom.style.top=`${p}%`,Ao(this.waterMarkWillRemove)&&this.isGhost&&(this.waterMarkWillRemove=!0,setTimeout((()=>{this._removeDom(),this.waterMarkWillRemove=!1}),1e3*this.ghostConfig.on))}}catch(e){}if(this.isStopAnimation)return this.isStopAnimation=!1,cancelAnimationFrame(this.rafID),void(this.rafID=null);0!==this.speed&&requestAnimationFrame(r)};this.rafID=requestAnimationFrame(r)}}_addDom(e,t){if(this.shadowRootInnerDom&&this.shadowRootDynamicDom){this.shadowRootInnerDom.appendChild(this.shadowRootDynamicDom);let i=e.width*Math.random(),s=e.height*Math.random();i=Math.min(e.width-2*t.width,i),s=Math.min(e.height-2*t.height,s),this.shadowRootDynamicDom.style.left=`${i}px`,this.shadowRootDynamicDom.style.top=`${s}px`}}resumeAnimation(){this.isPauseAnimation=!1}pauseAnimation(){this.isPauseAnimation=!0}stopAnimation(){this.isStopAnimation=!0}}class i_ extends a{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),this._opt={},this.TAG_NAME="Player",this.$container=e;const i=mo();if(this._opt=Object.assign({},i,t),this.debug=new Fr(this),this.debug.log(this.TAG_NAME,"init"),this._opt.forceNoOffscreen=!0,this._canPlayAppleMpegurl=!1,(Sa()||wa())&&(this._canPlayAppleMpegurl=so(),this.debug.log(this.TAG_NAME,"isIOS or isSafari and canPlayAppleMpegurl",this._canPlayAppleMpegurl)),ya()&&(this.debug.log(this.TAG_NAME,"isMobile and set _opt.controlAutoHide false"),this._opt.controlAutoHide=!1,yo(jr.isEnabled)&&yo(this._opt.useWebFullScreen)&&(this.debug.log(this.TAG_NAME,"screenfull.isEnabled is true and _opt.useWebFullScreen is true , set _opt.useWebFullScreen false"),this._opt.useWebFullScreen=!1),Ao(jr.isEnabled)&&Ao(this._opt.useWebFullScreen)&&(this.debug.log(this.TAG_NAME,"screenfull.isEnabled is false and _opt.useWebFullScreen is false , set _opt.useWebFullScreen true"),this._opt.useWebFullScreen=!0)),wo()&&(this.debug.log(this.TAG_NAME,"isIphone and set _opt.videoRenderSupportScale false"),this._opt.videoRenderSupportScale=!1,Qa()&&yo(this._opt.isHls)&&Ao(this._opt.supportHls265)&&(this.debug.log(this.TAG_NAME,"isIphone and is in wechat and is hls so set supportHls265 true"),this._opt.supportHls265=!0)),Ao(this._opt.playFailedAndReplay)&&(this.debug.log(this.TAG_NAME,"_opt.playFailedAndReplay is false and set others replay params false"),this._opt.webglAlignmentErrorReplay=!1,this._opt.webglContextLostErrorReplay=!1,this._opt.autoWasm=!1,this._opt.mseDecodeErrorReplay=!1,this._opt.mediaSourceTsIsMaxDiffReplay=!1,this._opt.wcsDecodeErrorReplay=!1,this._opt.wasmDecodeErrorReplay=!1,this._opt.simdDecodeErrorReplay=!1,this._opt.videoElementPlayingFailedReplay=!1,this._opt.networkDelayTimeoutReplay=!1,this._opt.widthOrHeightChangeReplay=!1,this._opt.simdH264DecodeVideoWidthIsTooLargeReplay=!1,this._opt.mediaSourceUseCanvasRenderPlayFailedReplay=!1,this._opt.heartTimeoutReplay=!1,this._opt.loadingTimeoutReplay=!1,this._opt.websocket1006ErrorReplay=!1,this._opt.streamErrorReplay=!1,this._opt.streamEndReplay=!1),this._opt.hiddenControl&&(this.debug.log(this.TAG_NAME,"_opt.hiddenControl is true and set others show btn to false"),Object.keys(this._opt.operateBtns).forEach((e=>{this._opt.operateBtns[e]&&-1===(""+e).indexOf("Fn")&&(this._opt.operateBtns[e]=!1)})),this._opt.showBandwidth=!1,this._opt.extendOperateBtns=[],this._opt.controlHtml="",this.isPlayback()&&(this._opt.playbackConfig.showControl=!1)),this._opt.forceNoOffscreen||("undefined"==typeof OffscreenCanvas?(this._opt.forceNoOffscreen=!0,this._opt.useOffscreen=!1):this._opt.useOffscreen=!0),this._opt.isMpeg4&&(this.debug.log(this.TAG_NAME,"isMpeg4 is true, so set _opt.useWasm true and others params false"),this._opt.useWCS=!1,this._opt.useMSE=!1,this._opt.isNakedFlow=!1,this._opt.useSIMD=!1,this._opt.isFmp4=!1,this._opt.useWasm=!0),this.isPlayback()&&(this._opt.mseDecoderUseWorker=!1),this._opt.poster&&(this._opt.background=this._opt.poster),Ao(this._opt.muted)&&(this._opt.isNotMute=!0),this._opt.mseDecoderUseWorker&&(this._opt.mseDecoderUseWorker=!!(self.Worker&&self.MediaSource&&"canConstructInDedicatedWorker"in self.MediaSource&&!0===self.MediaSource.canConstructInDedicatedWorker),Ao(this._opt.mseDecoderUseWorker)&&this.debug.log(this.TAG_NAME,"mseDecoderUseWorker is true but not support so set _opt.mseDecoderUseWorker = false")),(this.isOldHls()||this.isWebrtcH264()||this.isAliyunRtc())&&(this.debug.log(this.TAG_NAME,"isOldHls or isWebrtcH264 or isAliyunRtc is true, so set some params false and _opt.recordType is webm"),this._opt.useWCS=!1,this._opt.useMSE=!1,this._opt.isNakedFlow=!1,this._opt.useSIMD=!1,this._opt.isFmp4=!1,this._opt.useWasm=!1,this._opt.recordType=T),this._opt.isNakedFlow&&(this.debug.log(this.TAG_NAME,"isNakedFlow is true, so set _opt.mseDecodeAudio false"),this._opt.mseDecodeAudio=!1),_a()&&(this.debug.log(this.TAG_NAME,"isFirefox is true, so set _opt.mseDecodeAudio false"),this._opt.mseDecodeAudio=!1),!this.isOldHls()&&!this.isWebrtcH264()){if(this._opt.useWCS){const e="VideoEncoder"in window,t=Ia();this._opt.useWCS=e,this._opt.useWCS&&this._opt.isH265&&(this._opt.useWCS=t),this._opt.useWCS||this.debug.warn(this.TAG_NAME,`\n useWCS is true,\n and supportWCS is ${e}, supportHevcWCS is ${t} , _opt.isH265 is ${this._opt.isH265}\n so set useWCS false`),this._opt.useWCS&&(this._opt.useOffscreen?this._opt.wcsUseVideoRender=!1:this._opt.wcsUseVideoRender&&(this._opt.wcsUseVideoRender=Pa()&&Ba(),this._opt.wcsUseVideoRender||this.debug.warn(this.TAG_NAME,"wcsUseVideoRender is true, but not support so set wcsUseVideoRender false")))}if(this._opt.useMSE){const e=function(){let e=!1;return"MediaSource"in self&&(e=!0),e}()||function(){let e=!1;return!("MediaSource"in self)&&"ManagedMediaSource"in self&&(e=!0),e}(),t=La()||function(){let e=!1;return!("MediaSource"in self)&&"ManagedMediaSource"in self&&(self.ManagedMediaSource.isTypeSupported(ui)||self.ManagedMediaSource.isTypeSupported(pi)||self.ManagedMediaSource.isTypeSupported(fi)||self.ManagedMediaSource.isTypeSupported(mi)||self.ManagedMediaSource.isTypeSupported(gi))&&(e=!0),e}();this._opt.useMSE=e,this._opt.useMSE&&this._opt.isH265&&(this._opt.useMSE=t),this._opt.useMSE||this.debug.warn(this.TAG_NAME,`\n useMSE is true,\n and supportMSE is ${e}, supportHevcMSE is ${t} , _opt.isH265 is ${this._opt.isH265}\n so set useMSE false`)}}if(Ao(this._opt.useMSE)&&(this._opt.mseDecodeAudio=!1),this._opt.useMSE?(this._opt.useWCS&&this.debug.warn(this.TAG_NAME,"useMSE is true and useWCS is true then useWCS set true->false"),this._opt.forceNoOffscreen||this.debug.warn(this.TAG_NAME,"useMSE is true and forceNoOffscreen is false then forceNoOffscreen set false->true"),this._opt.useWCS=!1,this._opt.forceNoOffscreen=!0):this._opt.useWCS,this._opt.isWebrtc&&this._opt.demuxUseWorker&&(this.debug.warn(this.TAG_NAME,"isWebrtc is true and demuxUseWorker is true then demuxUseWorker set true->false"),this._opt.demuxUseWorker=!1),this._opt.isHls&&this._opt.demuxUseWorker&&(this.debug.warn(this.TAG_NAME,"isHls is true and demuxUseWorker is true then demuxUseWorker set true->false"),this._opt.demuxUseWorker=!1),this._opt.isAliyunRtc&&this._opt.demuxUseWorker&&(this.debug.warn(this.TAG_NAME,"isAliyunRtc is true and demuxUseWorker is true then demuxUseWorker set true->false"),this._opt.demuxUseWorker=!1),this.isStreamWebTransport()&&this._opt.demuxUseWorker&&(this.debug.warn(this.TAG_NAME,"is stream use webTransport is true and demuxUseWorker is true then demuxUseWorker set true->false"),this._opt.demuxUseWorker=!1),Ao(this._opt.demuxUseWorker)&&(this._opt.mseDecoderUseWorker=!1),this.isPlayback()&&(this._opt.mseDecoderUseWorker=!1),this._opt.useMThreading&&(this._opt.useMThreading="undefined"!=typeof SharedArrayBuffer,this._opt.useMThreading||this.debug.warn(this.TAG_NAME,"useMThreading is true, but not support so set useMThreading false")),this._opt.useSIMD||-1!==this._opt.decoder.indexOf("-simd")){const e=WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),t=wo();this._opt.useSIMD=e&&Ao(t),this._opt.useSIMD||this.debug.warn(this.TAG_NAME,`useSIMD is true, but not support(isSupportSimd is ${e} ,isIphone is ${t}) so set useSIMD false`)}var s;if(this._opt.useSIMD?-1===this._opt.decoder.indexOf("-simd")?this._opt.useMThreading?this._opt.decoder=this._opt.decoder.replace("decoder-pro.js","decoder-pro-simd-mt.js"):this._opt.decoder=this._opt.decoder.replace("decoder-pro.js","decoder-pro-simd.js"):this._opt.useMThreading&&(this._opt.decoder=this._opt.decoder.replace("decoder-pro-simd.js","decoder-pro-simd-mt.js")):-1!==this._opt.decoder.indexOf("-simd")?this._opt.useMThreading?this._opt.decoder=this._opt.decoder.replace("decoder-pro-simd.js","decoder-pro-mt.js"):this._opt.decoder=this._opt.decoder.replace("decoder-pro-simd.js","decoder-pro.js"):this._opt.useMThreading&&(this._opt.decoder=this._opt.decoder.replace("decoder-pro.js","decoder-pro-mt.js")),-1!==this._opt.decoder.indexOf("-simd")?this._opt.useMThreading?(this._opt.decoderAudio=this._opt.decoder.replace("decoder-pro-simd-mt.js","decoder-pro-audio.js"),this._opt.decoderHard=this._opt.decoder.replace("decoder-pro-simd-mt.js","decoder-pro-hard.js"),this._opt.decoderHardNotWasm=this._opt.decoder.replace("decoder-pro-simd-mt.js","decoder-pro-hard-not-wasm.js")):(this._opt.decoderAudio=this._opt.decoder.replace("decoder-pro-simd.js","decoder-pro-audio.js"),this._opt.decoderHard=this._opt.decoder.replace("decoder-pro-simd.js","decoder-pro-hard.js"),this._opt.decoderHardNotWasm=this._opt.decoder.replace("decoder-pro-simd.js","decoder-pro-hard-not-wasm.js")):this._opt.useMThreading?(this._opt.decoderAudio=this._opt.decoder.replace("decoder-pro-mt.js","decoder-pro-audio.js"),this._opt.decoderHard=this._opt.decoder.replace("decoder-pro-mt.js","decoder-pro-hard.js"),this._opt.decoderHardNotWasm=this._opt.decoder.replace("decoder-pro-mt.js","decoder-pro-hard-not-wasm.js")):(this._opt.decoderAudio=this._opt.decoder.replace("decoder-pro.js","decoder-pro-audio.js"),this._opt.decoderHard=this._opt.decoder.replace("decoder-pro.js","decoder-pro-hard.js"),this._opt.decoderHardNotWasm=this._opt.decoder.replace("decoder-pro.js","decoder-pro-hard-not-wasm.js")),Ao(this._opt.hasAudio)&&(this._opt.operateBtns.audio=!1),Ao(this._opt.hasVideo)&&(this._opt.operateBtns.fullscreen=!1,this._opt.operateBtns.screenshot=!1,this._opt.operateBtns.record=!1,this._opt.operateBtns.ptz=!1,this._opt.operateBtns.quality=!1,this._opt.operateBtns.zoom=!1),this._opt.qualityConfig&&0===this._opt.qualityConfig.length&&this._opt.operateBtns.quality&&(this._opt.operateBtns.quality=!1,this.debug.warn(this.TAG_NAME,"_opt.qualityConfig is empty, so set operateBtns.quality false")),yo(this._opt.useWebGPU)&&(this._opt.useWebGPU=function(){let e=!1;return"gpu"in navigator&&(e=!0),e}(),Ao(this._opt.useWebGPU)&&this.debug.warn(this.TAG_NAME,"useWebGPU is true, but not support so set useWebGPU false")),this._opt.hasControl=this._hasControl(),this._loading=!1,this._playing=!1,this._playbackPause=!1,this._hasLoaded=!1,this._zooming=!1,this._destroyed=!1,this._closed=!1,this._checkHeartTimeout=null,this._checkLoadingTimeout=null,this._checkStatsInterval=null,this._checkVisibleHiddenTimeout=null,this._startBpsTime=null,this._isPlayingBeforePageHidden=!1,this._stats={buf:0,netBuf:0,fps:0,maxFps:0,dfps:0,abps:0,vbps:0,ts:0,mseTs:0,currentPts:0,pTs:0,dts:0,mseVideoBufferDelayTime:0,isDropping:!1},this._allStatsData={},this._faceDetectActive=!1,this._objectDetectActive=!1,this._occlusionDetectActive=!1,this._imageDetectActive=!1,this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},this._videoTimestamp=0,this._audioTimestamp=0,this._latestAudioTimestamp=0,this._videoIframeIntervalTs=0,this._streamQuality=this._opt.defaultStreamQuality||"",!this._streamQuality&&this._opt.qualityConfig.length>0&&(this._streamQuality=this._opt.qualityConfig[0]||""),this._visibility=!0,this._lastestVisibilityChangeTimestamp=null,this._tempWorkerStats=null,this._historyFpsList=[],this._historyVideoDiffList=[],this._tempStreamList=[],this._tempInnerPlayBgobj=null,this._flvMetaData=null,this._flvMetaDataFps=null,this._mseWorkerData={},Ao(this._opt.useMSE)&&Ao(this._opt.useWCS)&&!this.isWebrtcH264()&&!this.isOldHls()&&(this._opt.useWasm=!0),(this.isOldHls()||this.isWebrtcH264())&&(this._opt.hasVideo=!0,this._opt.hasAudio=!0),this._opt.hasVideo||(this._opt.useMSE=!1,this._opt.useWCS=!1),this._opt.useWasm&&(this._opt.useOffscreen?this._opt.wasmUseVideoRender=!1:this._opt.wasmUseVideoRender&&(this._opt.wasmUseVideoRender=Ea()&&Pa()&&Ba(),this._opt.wasmUseVideoRender||this.debug.warn(this.TAG_NAME,"use wasm video render, but not support so set wasmUseVideoRender false")),this._opt.useSIMD?this.debug.log(this.TAG_NAME,"use simd wasm"):this.debug.log(this.TAG_NAME,"use wasm")),this._opt.useWasm&&(this._opt.useFaceDetector&&window.JessibucaProFaceDetector||this._opt.useObjectDetector&&window.JessibucaProObjectDetector||this._opt.useOcclusionDetector&&window.JessibucaProOcclusionDetector||this._opt.useImageDetector&&window.JessibucaProImageDetector)?(this.ai=new Kb(this),this._opt.useFaceDetector&&window.JessibucaProFaceDetector||(this._opt.operateBtns.aiFace=!1),this._opt.useObjectDetector&&window.JessibucaProObjectDetector||(this._opt.operateBtns.aiObject=!1),this._opt.useOcclusionDetector&&window.JessibucaProOcclusionDetector||(this._opt.operateBtns.aiOcclusion=!1),this._opt.useImageDetector&&this._opt.aiImageDetectActive&&window.JessibucaProImageDetector&&(this.imageDetectActive=!0)):(this._opt.operateBtns.aiObject=!1,this._opt.operateBtns.aiFace=!1,this._opt.operateBtns.aiOcclusion=!1),this._opt.useFaceDetector&&(this._opt.useWasm&&window.JessibucaProFaceDetector||this.debug.warn(this.TAG_NAME,`use face detector, useWasm is ${this._opt.useWasm} and window.JbProFaceDetector is null`)),this._opt.useObjectDetector&&(this._opt.useWasm&&window.JessibucaProObjectDetector||this.debug.warn(this.TAG_NAME,`use object detector, useWasm is ${this._opt.useWasm} and window.JbProObjectDetector is null`)),this._opt.useOcclusionDetector&&(this._opt.useWasm&&window.JessibucaProOcclusionDetector||this.debug.warn(this.TAG_NAME,`use occlusion detector, useWasm is ${this._opt.useWasm} and window.JessibucaProOcclusionDetector is null`)),this._opt.useImageDetector&&(this._opt.useWasm&&window.JessibucaProImageDetector||this.debug.warn(this.TAG_NAME,`use image detector, useWasm is ${this._opt.useWasm} and window.JessibucaProImageDetector is null`)),this._opt.useVideoRender&&(this._opt.useWasm&&!this._opt.useOffscreen?(this._opt.wasmUseVideoRender=Ea()&&Pa()&&Ba(),this._opt.wasmUseVideoRender||this.debug.warn(this.TAG_NAME,"use wasm video render, but not support so set wasmUseVideoRender false")):this._opt.useWCS&&!this._opt.useOffscreen&&(this._opt.wcsUseVideoRender=Pa()&&Ba(),this._opt.wcsUseVideoRender||this.debug.warn(this.TAG_NAME,"use wcs video render, but not support so set wcsUseVideoRender false"))),this._opt.useCanvasRender&&(this._opt.useMSE&&Ao(this._opt.mseDecoderUseWorker)&&(this._opt.mseUseCanvasRender=!0),this._opt.useWasm&&(this._opt.wasmUseVideoRender=!1),this._opt.useWCS&&(this._opt.wcsUseVideoRender=!1),this.isOldHls()&&!Sa()&&(this._opt.hlsUseCanvasRender=!0),this.isWebrtcH264()&&(this._opt.webrtcUseCanvasRender=!0)),this._opt.useVideoRender=!1,this._opt.useCanvasRender=!1,this._opt.useWasm?this._opt.wasmUseVideoRender?this._opt.useVideoRender=!0:this._opt.useCanvasRender=!0:this._opt.useWCS?this._opt.wcsUseVideoRender?this._opt.useVideoRender=!0:this._opt.useCanvasRender=!0:this._opt.useMSE?this._opt.mseUseCanvasRender?this._opt.useCanvasRender=!0:this._opt.useVideoRender=!0:this.isOldHls()?this._opt.hlsUseCanvasRender?this._opt.useCanvasRender=!0:this._opt.useVideoRender=!0:this.isWebrtcH264()&&(this._opt.webrtcUseCanvasRender?this._opt.useCanvasRender=!0:this._opt.useVideoRender=!0),s=this,Object.defineProperty(s,"rect",{get:()=>{let e={};return s.$container&&(e=s.$container.getBoundingClientRect(),e.width=Math.max(e.width,s.$container.clientWidth),e.height=Math.max(e.height,s.$container.clientHeight)),e}}),["bottom","height","left","right","top","width"].forEach((e=>{Object.defineProperty(s,e,{get:()=>s.rect[e]||0})})),this.events=new xo(this),this._opt.hasVideo&&(this.video=new Qo(this),this.recorder=new ol(this)),this.isOldHls()?(this.hlsDecoder=new _A(this),this.loaded=!0):this.isWebrtcH264()?(this._opt.isWebrtcForZLM?this.webrtc=new Wb(this):this._opt.isWebrtcForSRS?this.webrtc=new Qb(this):this._opt.isWebrtcForOthers?this.webrtc=new Xb(this):this.webrtc=new Vb(this),this.loaded=!0):this.isAliyunRtc()?(this.aliyunRtcDecoder=new Zb(this),this.loaded=!0):(this.isUseHls265()&&(this.hlsDecoder=new $b(this)),this.isWebrtcH265()&&(this.webrtc=new Vb(this)),Ao(ro(this._opt))?this.decoderWorker=new ul(this):this.loaded=!0),this._opt.hasAudio&&(this.audio=new yn(this)),this.stream=null,this.demux=null,this._lastVolume=null,this._isMute=null,this._isInZoom=!1,this._playingStartTimestamp=null,this.isMSEVideoDecoderInitializationFailedNotSupportHevc=!1,this.isMSEAudioDecoderError=!1,this.isMSEPlaybackRateChangePause=!1,this.isPlayFailedAndPaused=!1,this._opt.useWCS&&(this.webcodecsDecoder=new wh(this),!this._opt.hasAudio&&Ao(this._opt.demuxUseWorker)&&(this.loaded=!0)),this._opt.useMSE&&Ao(this._opt.mseDecoderUseWorker)&&(this.mseDecoder=new Kh(this),!this._opt.hasAudio&&Ao(this._opt.demuxUseWorker)&&(this.loaded=!0)),this.control=new jh(this),this._opt.contextmenuBtns.length>0&&Ao(this._opt.disableContextmenu)&&Aa()?this.contextmenu=new Yb(this):yo(this._opt.disableContextmenu)&&this._opt.contextmenuBtns.length>0&&Aa()&&this.debug.warn(this.TAG_NAME,"disableContextmenu is true, but contextmenuBtns is not empty, so Contextmenu can not be created,please check"),this.isPlayback()&&(this.playback=new Jb(this,this._opt.playbackConfig)),this._opt.operateBtns.zoom&&(this.zoom=new qb(this)),/(iphone|ipad|ipod|ios|android)/i.test(window.navigator.userAgent.toLowerCase())&&Ao(this._opt.supportLockScreenPlayAudio&&wa())&&(this.keepScreenOn=new Qh(this)),(e=>{try{const t=t=>{Za(t)===e.$container&&(e.emit(dt.fullscreen,e.fullscreen),e.fullscreen?e._opt.useMSE&&e.resize():e.resize())};jr.on("change",t),e.events.destroys.push((()=>{jr.off("change",t)}))}catch(e){}if(e.on(lt.decoderWorkerInit,(()=>{e.debug.log("player","listen decoderWorkerInit and set loaded true"),e.loaded=!0})),e.on(lt.play,(()=>{e.loading=!1})),e.on(lt.fullscreen,(t=>{if(t)try{jr.request(e.$container).then((()=>{})).catch((t=>{e.debug.error("player","fullscreen request error",t),ya()&&e._opt.useWebFullScreen&&(e.webFullscreen=!0)}))}catch(t){ya()&&e._opt.useWebFullScreen&&(e.webFullscreen=!0)}else try{jr.exit().then((()=>{e.webFullscreen&&(e.webFullscreen=!1)})).catch((t=>{e.debug.error("player","fullscreen exit error",t),e.webFullscreen&&(e.webFullscreen=!1)}))}catch(t){e.webFullscreen&&(e.webFullscreen=!1)}})),ya()&&e.on(lt.webFullscreen,(t=>{t?e.$container.classList.add("jb-pro-fullscreen-web"):e.$container.classList.remove("jb-pro-fullscreen-web"),e.emit(dt.fullscreen,e.fullscreen)})),e.on(lt.resize,(()=>{e.video&&e.video.resize()})),e._opt.debug){const t=[lt.timeUpdate,lt.currentPts,lt.videoSEI],i=[lt.stats,lt.playbackStats,lt.playbackTimestamp,lt.flvMetaData,lt.playToRenderTimes,lt.audioInfo,lt.videoInfo];Object.keys(lt).forEach((s=>{e.on(lt[s],(function(r){if(!t.includes(s)){i.includes(s)&&(r=JSON.stringify(r));for(var a=arguments.length,o=new Array(a>1?a-1:0),n=1;n<a;n++)o[n-1]=arguments[n];e.debug.log("player events",lt[s],r,...o)}}))})),Object.keys(ut).forEach((t=>{e.on(ut[t],(function(){for(var i=arguments.length,s=new Array(i),r=0;r<i;r++)s[r]=arguments[r];e.debug.warn("player event error",ut[t],...s)}))}))}})(this),Gh(this),this.singleWatermark=new Oo(this),this._opt.ghostWatermarkConfig.content){const e=Object.assign({},this._opt.ghostWatermarkConfig,{isGhost:!0});this.ghostWatermark=new t_(this,e)}this._opt.dynamicWatermarkConfig.content&&(this.dynamicWatermark=new t_(this,this._opt.dynamicWatermarkConfig)),this._opt.watermarkConfig&&this.updateWatermark(this._opt.watermarkConfig),Co()&&(this.pressureObserverCpu=new e_(this)),this._opt.useWCS&&this.debug.log(this.TAG_NAME,"use WCS"),this._opt.useMSE&&(this._opt.mseDecoderUseWorker?this.debug.log(this.TAG_NAME,"use worker MSE"):this.debug.log(this.TAG_NAME,"use MSE")),this._opt.useOffscreen&&this.debug.log(this.TAG_NAME,"use offscreen"),this._opt.isHls&&(this._opt.supportHls265?this.debug.log(this.TAG_NAME,"use hls 265"):this.debug.log(this.TAG_NAME,"use hls")),this._opt.isWebrtc&&(this._opt.isWebrtcH265?this.debug.log(this.TAG_NAME,"use webrtc h265"):this._opt.isWebrtcForZLM?this.debug.log(this.TAG_NAME,"use webrtc for ZLM"):this._opt.isWebrtcForSRS?this.debug.log(this.TAG_NAME,"use webrtc for SRS"):this._opt.isWebrtcForOthers?this.debug.log(this.TAG_NAME,"use webrtc for Others"):this.debug.log(this.TAG_NAME,"use webrtc for M7S")),this.isAliyunRtc()&&this.debug.log(this.TAG_NAME,"use aliyun rtc"),this._opt.isFmp4&&this.debug.log(this.TAG_NAME,"use fmp4"),this._opt.isMpeg4&&this.debug.log(this.TAG_NAME,"use mpeg4"),this.isPlayback()&&this.debug.log(this.TAG_NAME,"use playback"),this._opt.hasVideo&&(0===this.width&&this.debug.warn(this.TAG_NAME,"container width is 0, please check the container width"),0===this.height&&this.debug.warn(this.TAG_NAME,"container height is 0, please check the container height")),this.debug.log("Player options",JSON.stringify(this._opt))}async destroy(){this._destroyed=!0,this.emit(lt.destroy),this.off(),this.events&&(this.events.destroy(),this.events=null),this.clearCheckLoadingTimeout(),this.clearStatsInterval(),this.clearVisibilityHiddenTimeout(),this.decoderWorker&&(await this.decoderWorker.destroy(),this.decoderWorker=null),await this._destroy()}async _destroy(){this._loading=!1,this._playing=!1,this._playbackPause=!1,this._hasLoaded=!1,this._lastVolume=null,this._isMute=null,this._zooming=!1,this._faceDetectActive=!1,this._objectDetectActive=!1,this._occlusionDetectActive=!1,this._imageDetectActive=!1,this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},this.singleWatermark&&(this.singleWatermark.destroy(),this.singleWatermark=null),this.ghostWatermark&&(this.ghostWatermark.destroy(),this.ghostWatermark=null),this.dynamicWatermark&&(this.dynamicWatermark.destroy(),this.dynamicWatermark=null),this.pressureObserverCpu&&(this.pressureObserverCpu.destroy(),this.pressureObserverCpu=null),this.stream&&(await this.stream.destroy(),this.stream=null),this.hlsDecoder&&(await this.hlsDecoder.destroy(),this.hlsDecoder=null),this.mseDecoder&&(this.mseDecoder.destroy(),this.mseDecoder=null),this.webrtc&&(this.webrtc.destroy(),this.webrtc=null),this.aliyunRtcDecoder&&(this.aliyunRtcDecoder.destroy(),this.aliyunRtcDecoder=null),this.video&&(await this.video.destroy(),this.video=null),this.audio&&(await this.audio.destroy(),this.audio=null),this.recorder&&(this.recorder.destroy(),this.recorder=null),this.control&&(this.control.destroy(),this.control=null),this.webcodecsDecoder&&(this.webcodecsDecoder.destroy(),this.webcodecsDecoder=null),this.demux&&(this.demux.destroy(),this.demux=null),this.playback&&(this.playback.destroy(),this.playback=null),this.zoom&&(this.zoom.destroy(),this.zoom=null),this.ai&&(this.ai.destroy(),this.ai=null),this.keepScreenOn&&(this.releaseWakeLock(),this.keepScreenOn.destroy(),this.keepScreenOn=null),this.resetStats(),this._audioTimestamp=0,this._latestAudioTimestamp=0,this._videoTimestamp=0,this._streamQuality="",this._visibility=!0,this._isInZoom=!1,this._playingStartTimestamp=null,this._lastestVisibilityChangeTimestamp=null,this._videoIframeIntervalTs=null,this._tempWorkerStats=null,this._tempStreamList=[],this._tempInnerPlayBgobj={},this._flvMetaData=null,this._flvMetaDataFps=null,this._mseWorkerData={},this.isMSEVideoDecoderInitializationFailedNotSupportHevc=!1,this.isMSEAudioDecoderError=!1,this.isMSEPlaybackRateChangePause=!1,this.isPlayFailedAndPaused=!1,this.debug.log("play","destroy end"),this._opt=null,this.$container=null,this.debug=null}set fullscreen(e){ya()&&this._opt.useWebFullScreen?this.webFullscreen=e:this.emit(lt.fullscreen,e)}get fullscreen(){return jr.isFullscreen||this.webFullscreen}set webFullscreen(e){this.emit(lt.webFullscreen,e),setTimeout((()=>{this.updateOption({rotate:e?270:0}),this.resize()}),10)}get webFullscreen(){return this.$container.classList.contains("jb-pro-fullscreen-web")}set loaded(e){this._hasLoaded=e}get loaded(){return this._hasLoaded||this.isOldHls()||this.isWebrtcH264()||this._opt.useMSE&&Ao(this._opt.hasAudio)&&Ao(this._opt.demuxUseWorker)||this._opt.useWCS&&!this._opt.hasAudio&&Ao(this._opt.demuxUseWorker)}set playing(e){this.isClosed()&&e?this.debug.log(this.TAG_NAME,"player is closed, so can not play"):(e&&yo(this.loading)&&(this.loading=!1),this.playing!==e&&(this._playing=e,this.emit(lt.playing,e),this.emit(lt.volumechange,this.volume),e?this.emit(lt.play):this.emit(lt.pause)))}get playing(){return this._playing}get volume(){return this.audio&&this.audio.volume||0}set volume(e){e!==this.volume&&(this.audio?(this.audio.setVolume(e),this._lastVolume=this.volume,this._isMute=0===this.volume):this.debug.warn(this.TAG_NAME,"set volume error, audio is null"))}get lastVolume(){return this._lastVolume}set loading(e){this.loading!==e&&(this._loading=e,this.emit(lt.loading,this._loading))}get loading(){return this._loading}set zooming(e){this.zooming!==e&&(this.zoom||(this.zoom=new qb(this)),this._zooming=e,this.emit(lt.zooming,this.zooming))}get zooming(){return this._zooming}set recording(e){e?this.playing&&!this.recording&&(this.recorder&&this.recorder.startRecord(),this.isDemuxInWorker()&&this.decoderWorker&&this.decoderWorker.updateWorkConfig({key:"isRecording",value:!0})):this.recording&&(this.isDemuxInWorker()&&this.decoderWorker&&this.decoderWorker.updateWorkConfig({key:"isRecording",value:!1}),this.recorder&&this.recorder.stopRecordAndSave().then((()=>{})).catch((e=>{})))}get recording(){return!!this.recorder&&this.recorder.isRecording}set audioTimestamp(e){null!==e&&(this._audioTimestamp=e)}get audioTimestamp(){return this._audioTimestamp}set latestAudioTimestamp(e){null!==e&&(this._latestAudioTimestamp=e)}get latestAudioTimestamp(){return this._latestAudioTimestamp}get videoTimestamp(){return this._stats.currentPts||this._stats.ts}set streamQuality(e){this.streamQuality!==e&&(this._streamQuality=e,this.emit(lt.streamQualityChange,e))}get streamQuality(){return this._streamQuality}get isDebug(){return yo(this._opt.debug)}get scaleType(){const e=this._opt,t=e.isResize,i=e.isFullResize;let s=Xt;return Ao(i)&&Ao(t)?s=Xt:Ao(i)&&yo(t)?s=Zt:yo(i)&&yo(t)&&(s=ei),s}set visibility(e){this._visibility!==e&&(this._visibility=e,this.emit(lt.visibilityChange,e),this._lastestVisibilityChangeTimestamp=ha(),e?this.clearVisibilityHiddenTimeout():this.startVisibilityHiddenTimeout())}get visibility(){return this._visibility}set playbackPause(e){this._playbackPause!==e&&(this._playbackPause=e,this.emit(lt.playbackPause,e),this.emit(lt.playbackPauseOrResume,e))}get playbackPause(){return this.isPlayback()&&this._playbackPause}set videoIframeIntervalTs(e){this._videoIframeIntervalTs=e}get videoIframeIntervalTs(){return this._videoIframeIntervalTs}set faceDetectActive(e){this._faceDetectActive!==e&&(this._faceDetectActive=e,this.emit(lt.faceDetectActive,e))}get faceDetectActive(){return this._faceDetectActive}set objectDetectActive(e){this._objectDetectActive!==e&&(this._objectDetectActive=e,this.emit(lt.objectDetectActive,e))}get objectDetectActive(){return this._objectDetectActive}set occlusionDetectActive(e){this._occlusionDetectActive!==e&&(this._occlusionDetectActive=e,this.emit(lt.occlusionDetectActive,e))}get occlusionDetectActive(){return this._occlusionDetectActive}set imageDetectActive(e){this._imageDetectActive!==e&&(this._imageDetectActive=e)}get imageDetectActive(){return this._imageDetectActive}get isUseWorkerDemuxAndDecode(){return this.stream&&this.stream.getStreamType()===A}isDestroyed(){return this._destroyed}isClosed(){return this._closed}isDestroyedOrClosed(){return this.isDestroyed()||this.isClosed()}isPlaying(){let e=!1;return this._opt.playType===_?e=this.playing:this._opt.playType===w&&(e=Ao(this.playbackPause)&&this.playing),e}updateOption(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._opt=Object.assign({},this._opt,e),yo(t)&&this.decoderWorker&&Object.keys(e).forEach((t=>{this.decoderWorker.updateWorkConfig({key:t,value:e[t]})}))}init(){return new Promise(((e,t)=>{this.video||this._opt.hasVideo&&(this.video=new Qo(this)),this.audio||this._opt.hasAudio&&(this.audio=new yn(this)),this.stream||(this.stream=new kn(this)),this.isOldHls()?(this.hlsDecoder||(this.hlsDecoder=new _A(this),this.loaded=!0),e()):this.isWebrtcH264()?(this.webrtc||(this._opt.isWebrtcForZLM?this.webrtc=new Wb(this):this._opt.isWebrtcForSRS?this.webrtc=new Qb(this):this._opt.isWebrtcForOthers?this.webrtc=new Xb(this):this.webrtc=new Vb(this),this.loaded=!0),e()):this.isAliyunRtc()?(this.aliyunRtcDecoder||(this.aliyunRtcDecoder=new Zb(this),this.loaded=!0),e()):(this.demux||this._opt.hasVideo&&!this.isUseWorkerDemuxAndDecode&&(this.demux=new vh(this)),this._opt.useWCS&&(this.webcodecsDecoder||(this.webcodecsDecoder=new wh(this))),this._opt.useMSE&&Ao(this._opt.mseDecoderUseWorker)&&(this.mseDecoder||(this.mseDecoder=new Kh(this))),this.isUseHls265()&&(this.hlsDecoder||(this.hlsDecoder=new $b(this))),this.isWebrtcH265()&&(this.webrtc||(this.webrtc=new Vb(this))),this.decoderWorker?this.loaded?e():this.once(lt.decoderWorkerInit,(()=>{this.isDestroyedOrClosed()?(this.debug.error(this.TAG_NAME,"init() failed and player is destroyed"),t("init() failed and player is destroyed")):(this.loaded=!0,e())})):ro(this._opt)?e():(this.decoderWorker=new ul(this),this.once(lt.decoderWorkerInit,(()=>{this.isDestroyedOrClosed()?(this.debug.error(this.TAG_NAME,"init() failed and player is destroyed"),t("init() failed and player is destroyed")):(this.loaded=!0,e())}))))}))}play(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,s)=>{if(!e&&!this._opt.url)return s("url is empty");this._closed=!1,this.loading=!0,this.playing=!1,this._times.playInitStart=ha(),e||(e=this._opt.url),this._opt.url=e,this.control&&this._opt.loadingBackground&&this.control.initLoadingBackground(),this.init().then((()=>{this.debug.log(this.TAG_NAME,"play() init and next fetch stream"),this._times.playStart=ha(),this._opt.isNotMute&&this.mute(!1),this.enableWakeLock(),this.checkLoadingTimeout(),this.stream?(this.stream.once(ut.fetchError,(e=>{this.emitError(ut.fetchError,e)})),this.stream.once(ut.websocketError,(e=>{this.emitError(ut.websocketError,e)})),this.stream.once(lt.streamEnd,(e=>{this.emit(lt.streamEnd,e)})),this.stream.once(ut.hlsError,(e=>{this.emitError(ut.hlsError,e)})),this.stream.once(ut.webrtcError,(e=>{this.emitError(ut.webrtcError,e)})),this.stream.once(lt.streamSuccess,(()=>{i(),this._times.streamResponse=ha(),this.video&&this.video.play(),this.checkStatsInterval(),this.isPlayback()&&this.playback&&this.playback.startCheckStatsInterval()})),this.stream.fetchStream(e,t)):(this.debug.warn(this.TAG_NAME,`play() this.stream is null and is isDestroyedOrClosed is ${this.isDestroyedOrClosed()}`),s("this.stream is null"))})).catch((e=>{s(e)}))}))}playForControl(){return new Promise(((e,t)=>{this.debug.log(this.TAG_NAME,`playForControl() and pauseAndNextPlayUseLastFrameShow is ${this._opt.pauseAndNextPlayUseLastFrameShow}`),this._opt.pauseAndNextPlayUseLastFrameShow&&this._tempInnerPlayBgobj&&this._tempInnerPlayBgobj.loadingBackground&&this.updateOption({loadingBackground:this._tempInnerPlayBgobj.loadingBackground,loadingBackgroundWidth:this._tempInnerPlayBgobj.loadingBackgroundWidth,loadingBackgroundHeight:this._tempInnerPlayBgobj.loadingBackgroundHeight}),this.play().then((t=>{e(t)})).catch((e=>{t(e)}))}))}close(){return new Promise(((e,t)=>{this._close().then((()=>{this.video&&this.video.clearView(),e()})).catch((e=>{t(e)}))}))}resumeAudioAfterPause(){this.lastVolume&&Ao(this._isMute)&&(this.volume=this.lastVolume)}async _close(){this._closed=!0,this.video&&(this.video.resetInit(),this.video.pause(!0)),this.loading=!1,this.recording=!1,this.zooming=!1,this.playing=!1,this.clearCheckLoadingTimeout(),this.clearStatsInterval(),this.isPlayback()&&this.playback&&this.playback.clearStatsInterval(),this.releaseWakeLock(),this.resetStats(),this._audioTimestamp=0,this._videoTimestamp=0,this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},this.decoderWorker&&(await this.decoderWorker.destroy(),this.decoderWorker=null),this.stream&&(await this.stream.destroy(),this.stream=null),this.demux&&(this.demux.destroy(),this.demux=null),this.webcodecsDecoder&&(this.webcodecsDecoder.destroy(),this.webcodecsDecoder=null),this.mseDecoder&&(this.mseDecoder.destroy(),this.mseDecoder=null),this.hlsDecoder&&(await this.hlsDecoder.destroy(),this.hlsDecoder=null),this.webrtc&&(this.webrtc.destroy(),this.webrtc=null),this.aliyunRtcDecoder&&(this.aliyunRtcDecoder.destroy(),this.aliyunRtcDecoder=null),this.audio&&(await this.audio.destroy(),this.audio=null)}pause(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise(((t,i)=>{e?this.close().then((()=>{t()})).catch((e=>{i(e)})):this._close().then((()=>{t()})).catch((e=>{i(e)}))}))}pauseForControl(){return new Promise(((e,t)=>{if(this.debug.log(this.TAG_NAME,"_pauseInner()"),this._opt.pauseAndNextPlayUseLastFrameShow&&this.video){const e=this.video.screenshot("","png",.92,"base64");if(e){const t=this.getVideoInfo();t?(this.debug.log(this.TAG_NAME,`pauseForControl() and loadingBackground width is ${t.width} and height is ${t.height}`),this._tempInnerPlayBgobj={loadingBackground:e,loadingBackgroundWidth:t.width,loadingBackgroundHeight:t.height}):this.debug.warn(this.TAG_NAME,"pauseForControl() and videoInfo is null")}else this.debug.warn(this.TAG_NAME,"pauseForControl() and loadingBackground is null")}this.pause().then((t=>{e(t)})).catch((e=>{t(e)}))}))}isAudioMute(){let e=!0;return this.audio&&(e=this.audio.isMute),e}isAudioNotMute(){return!this.isAudioMute()}mute(e){this.audio&&this.audio.mute(e)}resize(){this.video&&this.video.resize()}startRecord(e,t){this.recording||(this.recorder.setFileName(e,t),this.recording=!0)}stopRecordAndSave(e,t){return new Promise(((i,s)=>{this.recorder||s("recorder is null"),this.recording?(this._opt.useWasm&&this.decoderWorker&&this.decoderWorker.updateWorkConfig({key:"isRecording",value:!1}),this.recorder.stopRecordAndSave(e,t).then((e=>{i(e)})).catch((e=>{s(e)}))):s("recorder is not recording")}))}_hasControl(){let e=!1,t=!1;return Object.keys(this._opt.operateBtns).forEach((e=>{this._opt.operateBtns[e]&&-1===(""+e).indexOf("Fn")&&(t=!0)})),(this._opt.showBandwidth||t)&&(e=!0),this._opt.extendOperateBtns&&this._opt.extendOperateBtns.length>0&&(e=!0),this.isPlayback()&&this._opt.playbackConfig.showControl&&(e=!0),this._opt.controlHtml&&(e=!0),e}useWasmDecode(){return Ao(this._opt.useMSE)&&Ao(this._opt.useWCS)}canVideoTrackWritter(){const e=this._opt;return!this.isOldHls()&&!this.isWebrtcH264()&&Ao(e.useMSE)&&!this.isAliyunRtc()&&(e.useWCS&&Ao(e.useOffscreen)&&e.wcsUseVideoRender||this.useWasmDecode())}checkHeartTimeout$2(){if(Ao(this.playbackPause)&&this.playing){if(this.isDestroyedOrClosed())return void(this.debug&&this.debug.warn(this.TAG_NAME,"checkHeartTimeout$2 but player is destroyed"));if(Ao(this.isHistoryFpsListAllZero()))return void(this.debug&&this.debug.warn(this.TAG_NAME,"checkHeartTimeout$2 but fps is not all zero"));if(0!==this._stats.fps)return void(this.debug&&this.debug.warn(this.TAG_NAME,`checkHeartTimeout$2 but fps is ${this._stats.fps}`));if(Ao(this.visibility)&&0!==this._stats.vbps)return void(this.debug&&this.debug.warn(this.TAG_NAME,`checkHeartTimeout$2 but page is not visibility and vbps is ${this._stats.vbps}`));const e=this._historyFpsList.join(",");this.debug.warn(this.TAG_NAME,`checkHeartTimeout$2 and\n pause and emit delayTimeout event and\n current vbps is ${this._stats.vbps} and\n current fps is ${this._stats.fps} and\n history FpsList is ${e} and\n current visibility is ${this.visibility} and`),this.emit(lt.timeout,lt.delayTimeout),this.emit(lt.delayTimeout)}else this.debug.log(this.TAG_NAME,`checkHeartTimeout$2 playbackPause is ${this.playbackPause}, playing is ${this.playing}`)}checkStatsInterval(){this._checkStatsInterval=setInterval((()=>{this.updateStats()}),1e3)}checkLoadingTimeout(){this._checkLoadingTimeout=setTimeout((()=>{this.playing?this.debug.warn(this.TAG_NAME,`checkLoadingTimeout but loading is ${this.loading} and playing is ${this.playing}`):this.isDestroyedOrClosed()?this.debug&&this.debug.warn(this.TAG_NAME,"checkLoadingTimeout but player is destroyed"):(this.debug.warn(this.TAG_NAME,"checkLoadingTimeout and pause and emit loadingTimeout event"),this.emit(lt.timeout,lt.loadingTimeout),this.emit(lt.loadingTimeout))}),1e3*this._opt.loadingTimeout)}clearCheckLoadingTimeout(){this._checkLoadingTimeout&&(this.debug.log(this.TAG_NAME,"clearCheckLoadingTimeout"),clearTimeout(this._checkLoadingTimeout),this._checkLoadingTimeout=null)}clearStatsInterval(){this._checkStatsInterval&&(clearInterval(this._checkStatsInterval),this._checkStatsInterval=null)}handleRender(){this.isDestroyedOrClosed()?this.debug&&this.debug.warn(this.TAG_NAME,"handleRender but player is destroyed"):(this.loading&&(this.clearCheckLoadingTimeout(),this.loading=!1,this.emit(lt.start)),this.playing||(this.playing=!0))}updateStats(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._startBpsTime||(this._startBpsTime=ha()),Oa(e.ts)){const t=parseInt(e.ts,10);this._stats.ts=t,null===this._playingStartTimestamp&&t>0&&(this._playingStartTimestamp=t)}Oa(e.dts)&&(this._stats.dts=parseInt(e.dts,10)),Oa(e.mseTs)&&(this._stats.mseTs=e.mseTs),Oa(e.buf)&&(this._stats.buf=e.buf),Oa(e.netBuf)&&(this._stats.netBuf=e.netBuf),Oa(e.currentPts)&&(this._stats.currentPts=e.currentPts),e.fps&&(this._stats.fps+=1),e.dfps&&(this._stats.dfps+=1),e.abps&&(this._stats.abps+=e.abps),e.vbps&&(this._stats.vbps+=e.vbps),e.workerStats&&(this._tempWorkerStats=e.workerStats),e.isDropping&&(this._stats.isDropping=e.isDropping),e.mseVideoBufferDelayTime&&(this._stats.mseVideoBufferDelayTime=parseInt(1e3*e.mseVideoBufferDelayTime,10));const t=ha();if(t-this._startBpsTime<1e3)return;null!==this._playingStartTimestamp&&this._stats.fps>0&&(this._stats.pTs+=1);let i=0,s=0,r=0,a=0,o=0;this._opt.useMSE&&(this.mseDecoder?(i=this.mseDecoder.checkSourceBufferDelay(),i=parseInt(1e3*i,10),s=this.mseDecoder.checkSourceBufferStore(),s=s.toFixed(2),r=this.mseDecoder.getDecodeDiffTimes(),a=this.mseDecoder.getDecodePlaybackRate(),o=this.mseDecoder.getPendingSegmentsLength()):this.isMseDecoderUseWorker()&&(i=this.video.checkSourceBufferDelay(),i=parseInt(1e3*i,10),s=this.video.checkSourceBufferStore(),s=s.toFixed(2),a=this.video.getDecodePlaybackRate())),this._opt.useWCS&&this.webcodecsDecoder&&(r=this.webcodecsDecoder.getDecodeDiffTimes()),this.isOldHls()&&this.hlsDecoder&&(i=this.hlsDecoder.checkHlsBufferedDelay(),i=parseInt(1e3*i,10));let n=0,l=0,d=0;this.isUseHls265()&&this.hlsDecoder&&(i=this.hlsDecoder.checkHlsBufferedDelay(),i=i.toFixed(2),n=this.hlsDecoder.getDemuxBufferedListLength(),d=this.hlsDecoder.getDemuxVideoBufferedListLength(),l=this.hlsDecoder.getDemuxAudioBufferedListLength());let h=0,c=0,u=0,p=!1,f=0;this._opt.useWasm||this._opt.demuxUseWorker?this._tempWorkerStats&&(c=this._tempWorkerStats.demuxBufferDelay,u=this._tempWorkerStats.audioDemuxBufferDelay,h=this._tempWorkerStats.streamBufferByteLength,this._stats.netBuf=this._tempWorkerStats.netBuf,f=this._tempWorkerStats.pushLatestDelay,p=this._tempWorkerStats.isStreamTsMoreThanLocal,this._stats.buf=this._tempWorkerStats.latestDelay):this.demux&&(h=this.demux.getInputByteLength(),f=this.demux.getPushLatestDelay(),p=this.demux.getIsStreamTsMoreThanLocal(),this.demux.bufferList&&(c=this.demux.bufferList.length));let m=0,g=0;this.audio&&this.audio.bufferList&&(m=this.audio.bufferList.length,g=parseInt(m*this.audio.oneBufferDuration,10));let y=0,A=0;if(this.isPlayback()&&this.video){this._opt.playbackConfig.isUseFpsRender&&(y=this.video.bufferList&&this.video.bufferList.length||0);let e=this.video.getStreamFps();const t=e>0?1e3/e:0;A=parseInt(t*y+t*c,10)}let b=0;this.videoTimestamp>0&&(b=this._stats.dts-this.videoTimestamp);const _=b+this._stats.netBuf;this.isOldHls()&&(this._stats.fps=this.hlsDecoder.getFps()),this._stats.fps>this._stats.maxFps&&(this._stats.maxFps=this._stats.fps);let v=this.getVideoCurrentTime();const w=this._stats.videoCurrentTime;let S=-1;w&&v&&(S=(v-w).toFixed(2),v=v.toFixed(2));let T=0;this.audioTimestamp>0&&(T=this.audioTimestamp-this.getRenderCurrentPts()),this._allStatsData=Object.assign(this._stats,{audioBuffer:m,audioBufferDelayTs:g,audioTs:this.audioTimestamp,latestAudioTs:this.latestAudioTimestamp,playbackVideoBuffer:y,playbackVideoWaitingBuffer:0,playbackAudioWaitingBuffer:0,playbackCacheDataDuration:A,demuxBuffer:c,pushLatestDelay:f,audioDemuxBuffer:u,streamBuffer:h,mseDelay:i,mseStore:s,mseDecodeDiffTimes:r,mseDecodePlaybackRate:a,msePendingBuffer:o,wcsDecodeDiffTimes:r,hlsDelay:i,hlsDemuxLength:n,hlsDemuxAudioLength:l,hlsDemuxVideoLength:d,delayTs:b,totalDelayTs:_,isStreamTsMoreThanLocal:p,videoCurrentTime:v,videoCurrentTimeDiff:S,audioSyncVideo:T});let E=null,C=null,x="";if(this.isPlayer()&&this._opt.hasVideo&&this.playing){E=function(e,t){let i=3;const s=t||25;return e<.33*s?i=0:e<.5*s?i=1:e<.83*s&&(i=2),i}(this._stats.fps,this._flvMetaDataFps),this._allStatsData.performance=E;const e=this.checkVideoSmooth(this._allStatsData);x=e.reason,C=e.result,this._allStatsData.videoSmooth=C}this.emit(lt.stats,this._allStatsData),this._allStatsData.streamBuffer>this._opt.flvDemuxBufferSizeMaxLarge&&this.getDemuxType()===k&&this.emit(ut.flvDemuxBufferSizeTooLarge,this._allStatsData.streamBuffer),this._opt.hasVideo?(this.updateHistoryFpsList(this._stats.fps,this._stats.videoCurrentTimeDiff),Oa(E)&&this.emit(lt.performance,E),Oa(C)&&this.emit(lt.videoSmooth,C,x)):this._opt.hasAudio&&this.updateHistoryFpsList(this._stats.abps,0),this._stats.fps=0,this._stats.dfps=0,this._stats.abps=0,this._stats.vbps=0,this._stats.isDropping=!1,this._startBpsTime=t}resetStats(){this._startBpsTime=null,this._playingStartTimestamp=null,this._historyFpsList=[],this._historyVideoDiffList=[],this._stats={buf:0,netBuf:0,fps:0,maxFps:0,dfps:0,abps:0,vbps:0,ts:0,mseTs:0,currentPts:0,pTs:0,dts:0,mseVideoBufferDelayTime:0,isDropping:!1},this._allStatsData={}}checkVideoSmooth(e){let t=!0,i="";if(this._opt.videoBuffer,this._opt.videoBufferDelay,this.isWebrtcH264()||this.isOldHls())return{result:t,reason:i};if(0===e.vbps&&Ao(this._opt.isHls)&&(i="vbpsIsZero",this.debug.log(this.TAG_NAME,`checkVideoSmooth false because ${i}`),t=!1),t&&e.isDropping&&(i="isDroppingIsTrue",this.debug.log(this.TAG_NAME,`checkVideoSmooth false because ${i}`),t=!1),t&&this.visibility&&this._historyFpsList.length>=this._opt.heartTimeout){const s=function(e){const t=Math.max(...e),i=Math.min(...e);return e.filter((e=>e!==t&&e!==i))}(this._historyFpsList),r=s.reduce(((e,t)=>e+t),0)/s.length,a=.83*r;e.fps<a&&(i="fpsIsLow",this.debug.log(this.TAG_NAME,`checkVideoSmooth false because fps is ${e.fps} < min fix is ${a} and avgFps is ${r}`),t=!1)}return t&&this.visibility&&this._opt.useMSE&&(e.videoCurrentTimeDiff>=1.5||e.videoCurrentTimeDiff<=.5)&&-1!==e.videoCurrentTimeDiff&&(i="videoCurrentTimeDiffIsNotNormal",this.debug.log(this.TAG_NAME,`checkVideoSmooth false because videoCurrentTimeDiff is ${e.videoCurrentTimeDiff}`),t=!1),{result:t,reason:i}}enableWakeLock(){this._opt.keepScreenOn&&this.keepScreenOn&&this.keepScreenOn.enable()}releaseWakeLock(){this._opt.keepScreenOn&&this.keepScreenOn&&this.keepScreenOn.disable()}clearBufferDelay(){this._opt.useWasm?this.decoderWorker&&this.decoderWorker.clearWorkBuffer(!0):this.demux&&this.demux.clearBuffer(!0)}doDestroy(){this.emit(lt.beforeDestroy)}handlePlayToRenderTimes(){if(this.isDestroyedOrClosed())return void this.debug.log(this.TAG_NAME,"handlePlayToRenderTimes but player is closed or destroyed");const e=this.getPlayToRenderTimes();this.emit(lt.playToRenderTimes,e)}getPlayToRenderTimes(){const e=this._times;return e.playTimestamp=e.playStart-e.playInitStart,e.streamTimestamp=e.streamStart-e.playStart,e.streamResponseTimestamp=e.streamResponse-e.streamStart>0?e.streamResponse-e.streamStart:0,e.demuxTimestamp=e.demuxStart-e.streamResponse>0?e.demuxStart-e.streamResponse:0,e.decodeTimestamp=e.decodeStart-e.demuxStart>0?e.decodeStart-e.demuxStart:0,e.videoTimestamp=e.videoStart-e.decodeStart,e.allTimestamp=e.videoStart-e.playInitStart,e}getOption(){return this._opt}getPlayType(){return this._opt.playType}isPlayer(){return this._opt.playType===_}isPlayback(){return this._opt.playType===w}isDemuxSetCodecInit(){let e=!0,t=this._opt;return t.useWCS&&!t.useOffscreen?e=!!this.webcodecsDecoder&&this.webcodecsDecoder.hasInit:t.useMSE&&(e=!!this.mseDecoder&&this.mseDecoder.hasInit),e}isDemuxDecodeFirstIIframeInit(){let e=!0,t=this._opt;return t.useWCS&&!t.useOffscreen?e=!!this.webcodecsDecoder&&this.webcodecsDecoder.isDecodeFirstIIframe:t.useMSE&&(e=!!this.mseDecoder&&this.mseDecoder.isDecodeFirstIIframe),e}isAudioPlaybackRateSpeed(){let e=!1;return this.audio&&(e=this.audio.isPlaybackRateSpeed()),e}getPlayingTimestamp(){return this._stats.pTs}getRecordingType(){let e=null;return this.recorder&&(e=this.recorder.getType()),e}getRecordingByteLength(){let e=0;return this.recording&&(e=this.recorder.getToTalByteLength()),e}getRecordingDuration(){let e=0;return this.recording&&(e=this.recorder.getTotalDuration()),e}getDecodeType(){let e="";const t=this.getOption();return this.isWebrtcH264()?$:this.isAliyunRtc()?V:this.isOldHls()?H:(t.useMSE&&(e+=F+" ",t.mseDecoderUseWorker&&(e+="worker")),t.useWCS&&(e+=O+" "),t.useWasm&&(e+=j+" ",t.useSIMD&&(e+=G+" "),t.useMThreading&&(e+=z+" ")),t.useOffscreen&&(e+=N+" "),e)}getDemuxType(){return this._opt.demuxType}getRenderType(){let e="";return this.video&&(e=this.video.getType()),e}getCanvasRenderType(){let e="";return this.video&&(e=this.video.getCanvasType()),e}getAudioEngineType(){let e="";return this.audio&&(e=this.audio.getEngineType()),e}getStreamType(){let e="";return this.stream&&(e=this.stream.getStreamType()),e}getAllStatsData(){return this._allStatsData}isFlvDemux(){return this._opt.demuxType===k}isM7SDemux(){return this._opt.demuxType===C}isNakedFlowDemux(){return this._opt.demuxType===L}isMpeg4Demux(){return this._opt.demuxType===P}isTsDemux(){return this._opt.demuxType===M}isFmp4Demux(){return this._opt.demuxType===I}togglePerformancePanel(e){this.updateOption({showPerformance:e}),this.emit(lt.togglePerformancePanel,e)}setScaleMode(e){let t={isFullResize:!1,isResize:!1,aspectRatio:"default"};switch(e=Number(e)){case Xt:t.isFullResize=!1,t.isResize=!1;break;case Zt:t.isFullResize=!1,t.isResize=!0;break;case ei:t.isFullResize=!0,t.isResize=!0}this.updateOption(t),this.resize(),this.emit(lt.viewResizeChange,e)}startVisibilityHiddenTimeout(){this.clearVisibilityHiddenTimeout(),this._opt.pageVisibilityHiddenTimeout>0&&(this.visibilityHiddenTimeout=setTimeout((()=>{this.emit(lt.visibilityHiddenTimeout)}),1e3*this._opt.pageVisibilityHiddenTimeout))}clearVisibilityHiddenTimeout(){this._checkVisibleHiddenTimeout&&(clearTimeout(this._checkVisibleHiddenTimeout),this._checkVisibleHiddenTimeout=null)}faceDetect(e){this.faceDetectActive=e,Ao(e)&&this.video&&this.video.addAiContentToCanvas([])}objectDetect(e){this.objectDetectActive=e,Ao(e)&&this.video&&this.video.addAiContentToCanvas([])}occlusionDetect(e){this.occlusionDetectActive=e}downloadNakedFlowFile(){this.demux&&this.demux.downloadNakedFlowFile&&this.demux.downloadNakedFlowFile()}downloadFmp4File(){this.demux&&this.demux.downloadFmp4File&&this.demux.downloadFmp4File()}downloadMpeg4File(){const e=new Blob([this._tempStreamList]);try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=Date.now()+".mpeg4",t.click(),window.URL.revokeObjectURL(t.href)}catch(e){console.error("downloadMpeg4File",e)}}hasCacheOnGopBuffer(){const e=this.videoIframeIntervalTs,t=this._allStatsData.demuxBuffer,i=this._allStatsData.maxFps;let s=!1;if(e&&t&&i){s=1e3/i*t>e}return s}addContentToCanvas(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.video&&this.video.addContentToCanvas(e)}addContentToContainer(){}sendWebsocketMessage(e){const t=this.getStreamType();t===m||t===A+" "+m?this.stream.sendMessage(e):this.debug.warn(this.TAG_NAME,`sendWebsocketMessage: stream type is not websocket, current stream type is ${this.getStreamType()}`)}checkIsInRender(){const e=this._stats;return e.vbps>0&&e.fps>0}setControlHtml(e){this.control&&this.control.$controlHtml&&(this.control.$controlHtml.innerHTML=e)}clearControlHtml(){this.control&&this.control.$controlHtml&&(this.control.$controlHtml.innerHTML="")}updateWatermark(e){this.singleWatermark&&this.singleWatermark.update(e)}removeWatermark(){this.singleWatermark&&this.singleWatermark.remove()}getVideoInfo(){let e=null;return this.video&&(e=this.video.getVideoInfo()),e}getAudioInfo(){let e=null;return this.audio&&(e=this.audio.getAudioInfo()),e}getVideoPlaybackQuality(){let e=null;return this.video&&(e=this.video.getPlaybackQuality()),e}emitError(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.emit(lt.error,e,t),this.emit(e,t)}updateHistoryFpsList(e,t){this.playbackPause||(this._historyFpsList.length>this._opt.heartTimeout&&(this._historyFpsList.shift(),this._historyVideoDiffList.shift()),this._historyFpsList.push(e),this._historyVideoDiffList.push(t),this.isHistoryFpsListAllZero()&&this.checkHeartTimeout$2())}isHistoryFpsListAllZero(){let e=!0;if(this._historyFpsList.length<this._opt.heartTimeout&&(e=!1),e)for(let t=0;t<this._historyFpsList.length;t++)if(this._historyFpsList[t]>0){e=!1;break}if(e)for(let t=0;t<this._historyVideoDiffList.length;t++)if(this._historyVideoDiffList[t]>0){e=!1;break}return e}isUseHls265(){return yo(this._opt.isHls)&&yo(this._opt.supportHls265)}isHls(){return yo(this._opt.isHls)}isOldHls(){return yo(this._opt.isHls)&&Ao(this._opt.supportHls265)}isWebrtcNotH265(){return yo(this._opt.isWebrtc)&&Ao(this._opt.isWebrtcH265)}isWebrtcH264(){return yo(this._opt.isWebrtc)&&Ao(this._opt.isWebrtcH265)}isWebrtcH265(){return yo(this._opt.isWebrtc)&&yo(this._opt.isWebrtcH265)}isAliyunRtc(){return yo(this._opt.isAliyunRtc)}isUseHls265UseMse(){return this.isUseHls265()&&this.isUseMSE()}isStreamWebTransport(){return this.getStreamType()===y}isPlaybackCacheBeforeDecodeForFpsRender(){return this.isPlayback()&&yo(this._opt.playbackConfig.isCacheBeforeDecodeForFpsRender)&&yo(this._opt.useWCS)}isPlaybackUseWCS(){return this.isPlayback()&&yo(this._opt.useWCS)}isPlaybackUseMSE(){return this.isPlayback()&&yo(this._opt.useMSE)}isPlayUseMSE(){return this.isPlayer()&&yo(this._opt.useMSE)}isInWebFullscreen(){return this._opt.useWebFullScreen&&ya()&&this.fullscreen}getPlaybackRate(){let e=1;return yo(this.isPlayback())&&this.playback&&(e=this.playback.rate),e}isPlaybackOnlyDecodeIFrame(){return yo(this.isPlayback())&&this.getPlaybackRate()>=this._opt.playbackForwardMaxRateDecodeIFrame}pushTempStream(e){const t=new Uint8Array(e);this._tempStreamList.push(t)}updateLoadingText(e){this.loading&&this.control&&this.control.updateLoadingText(e)}getVideoCurrentTime(){let e=0;return this.video&&(this._opt.useMSE?this.mseDecoder?e=this.mseDecoder.getVideoCurrentTime():this.isMseDecoderUseWorker()&&(e=this.video.getVideoCurrentTime()):this.isWebrtcH264()&&this.webrtc?e=this.webrtc.getVideoCurrentTime():this.isAliyunRtc()&&this.aliyunRtcDecoder&&(e=this.aliyunRtcDecoder.getVideoCurrentTime())),e}addMemoryLog(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];this.emit(lt.memoryLog,` [${e}] `,...i)}downloadMemoryLog(){this.emit(lt.downloadMemoryLog)}isInMulti(){return-1!==this._opt.multiIndex}isWebrtcForM7S(){return Ao(this._opt.isWebrtcForZLM)&&Ao(this._opt.isWebrtcForSRS)&&Ao(this._opt.isWebrtcForOthers)}updateMetaData(e){if(this.debug.log(this.TAG_NAME,"updateMetaData",JSON.stringify(e)),this._flvMetaData=e,this._flvMetaData){const e=this._flvMetaData;if(Da(e.framerate)){const t=Math.floor(1e3*e.framerate);if(t>0){const e=t/1e3;this._flvMetaDataFps=e}}Fa(e.hasAudio)&&Ao(e.hasAudio)&&(this.debug.log("updateMetaData","hasAudio",e.hasAudio,"and update _opt.hasAudio"),this._opt.hasAudio=e.hasAudio),Fa(e.hasVideo)&&Ao(e.hasVideo)&&(this.debug.log("updateMetaData","hasVideo",e.hasVideo,"and update _opt.hasVideo"),this._opt.hasVideo=e.hasVideo)}this.emit(lt.flvMetaData,e)}getMetaData(){return this._flvMetaData}getExtendBtnList(){return this.control.getExtendBtnList().map((e=>({name:e.name,$container:e.$iconContainer,$btn:e.$iconWrap,$activeBtn:e.$activeIconWrap})))}getCpuLevel(){let e=null;return this.pressureObserverCpu&&(e=this.pressureObserverCpu.getCurrentCpuState()),e}isRecordTypeFlv(){return this.recorder&&this._opt.recordType===E}isRecordTypeMp4(){return this.recorder&&this._opt.recordType===S}isRecordTypeWebm(){return this.recorder&&this._opt.recordType===T}isDemuxInWorker(){return this._opt.useWasm||this._opt.demuxUseWorker}isUseMSE(){return yo(this._opt.useMSE)}isUseWCS(){return yo(this._opt.useWCS)}isUseWASM(){return yo(this._opt.useWasm)}isMseDecoderUseWorker(){return this.isUseMSE()&&yo(this._opt.mseDecoderUseWorker)}getAudioSyncVideoDiff(){return this.audioTimestamp-this.getRenderCurrentPts()}getMseVideoBufferDelayTime(){let e=0;return this._opt.useMSE&&this.mseDecoder&&(this.mseDecoder?e=this.mseDecoder.getVideoBufferDelayTime():this.isMseDecoderUseWorker()&&(e=this.video.getVideoBufferDelayTime()),e=parseInt(1e3*e,10)),e}updateCurrentPts(e){this.updateStats({currentPts:e}),this.emit(lt.currentPts,e)}getRenderCurrentPts(){let e=0;return e=this._stats.currentPts?this._stats.currentPts:this.videoTimestamp-this.getMseVideoBufferDelayTime(),e}openSyncAudioAndVideo(){return this._opt.syncAudioAndVideo&&this._opt.hasVideo}showTipsMessageByCode(e){if(this.control){const t=this._opt.showMessageConfig[e]||"未知异常";this.control.showTipsMessage(t,e)}}showTipsMessageByContent(e){this.control&&e&&this.control.showTipsMessage(e)}hideTipsMessage(){this.control&&this.control.hideTipsMessage()}decoderCheckFirstIFrame(){yo(this._opt.checkFirstIFrame)&&(this.mseDecoder?this.mseDecoder.isDecodeFirstIIframe=!1:this.webcodecsDecoder&&(this.webcodecsDecoder.isDecodeFirstIIframe=!1))}isHlsCanVideoPlay(){return this._canPlayAppleMpegurl&&this.isOldHls()}setPtzPosition(e){this.control&&this.control.updatePtzPosition(e)}setPlayFailedAndPaused(){this.isPlayFailedAndPaused=!0}getMseMineType(){let e={};return this.mseDecoder&&(e=this.mseDecoder.getMimeType()),e}getMaxDelayTs(){return this._opt.videoBuffer+this._opt.videoBufferDelay}isMseVideoStateInited(){return!this.video||this.video.getReadyStateInited()}}class s_{constructor(e){const{fromSampleRate:t,toSampleRate:i,channels:s,inputBufferSize:r}=e;if(!t||!i||!s)throw new Error("Invalid settings specified for the resampler.");this.resampler=null,this.fromSampleRate=t,this.toSampleRate=i,this.channels=s||0,this.inputBufferSize=r,this.initialize()}initialize(){this.fromSampleRate==this.toSampleRate?(this.resampler=e=>e,this.ratioWeight=1):(this.fromSampleRate<this.toSampleRate?(this.linearInterpolation(),this.lastWeight=1):(this.multiTap(),this.tailExists=!1,this.lastWeight=0),this.initializeBuffers(),this.ratioWeight=this.fromSampleRate/this.toSampleRate)}bufferSlice(e){try{return this.outputBuffer.subarray(0,e)}catch(t){try{return this.outputBuffer.length=e,this.outputBuffer}catch(t){return this.outputBuffer.slice(0,e)}}}initializeBuffers(){this.outputBufferSize=Math.ceil(this.inputBufferSize*this.toSampleRate/this.fromSampleRate/this.channels*1.0000004768371582)+this.channels+this.channels;try{this.outputBuffer=new Float32Array(this.outputBufferSize),this.lastOutput=new Float32Array(this.channels)}catch(e){this.outputBuffer=[],this.lastOutput=[]}}linearInterpolation(){this.resampler=e=>{let t,i,s,r,a,o,n,l,d,h=e.length,c=this.channels;if(h%c!=0)throw new Error("Buffer was of incorrect sample length.");if(h<=0)return[];for(t=this.outputBufferSize,i=this.ratioWeight,s=this.lastWeight,r=0,a=0,o=0,n=0,l=this.outputBuffer;s<1;s+=i)for(a=s%1,r=1-a,this.lastWeight=s%1,d=0;d<this.channels;++d)l[n++]=this.lastOutput[d]*r+e[d]*a;for(s-=1,h-=c,o=Math.floor(s)*c;n<t&&o<h;){for(a=s%1,r=1-a,d=0;d<this.channels;++d)l[n++]=e[o+(d>0?d:0)]*r+e[o+(c+d)]*a;s+=i,o=Math.floor(s)*c}for(d=0;d<c;++d)this.lastOutput[d]=e[o++];return this.bufferSlice(n)}}multiTap(){this.resampler=e=>{let t,i,s,r,a,o,n,l,d,h,c,u=e.length,p=this.channels;if(u%p!=0)throw new Error("Buffer was of incorrect sample length.");if(u<=0)return[];for(t=this.outputBufferSize,i=[],s=this.ratioWeight,r=0,o=0,n=0,l=!this.tailExists,this.tailExists=!1,d=this.outputBuffer,h=0,c=0,a=0;a<p;++a)i[a]=0;do{if(l)for(r=s,a=0;a<p;++a)i[a]=0;else{for(r=this.lastWeight,a=0;a<p;++a)i[a]=this.lastOutput[a];l=!0}for(;r>0&&o<u;){if(n=1+o-c,!(r>=n)){for(a=0;a<p;++a)i[a]+=e[o+(a>0?a:0)]*r;c+=r,r=0;break}for(a=0;a<p;++a)i[a]+=e[o++]*n;c=o,r-=n}if(0!==r){for(this.lastWeight=r,a=0;a<p;++a)this.lastOutput[a]=i[a];this.tailExists=!0;break}for(a=0;a<p;++a)d[h++]=i[a]/s}while(o<u&&h<t);return this.bufferSlice(h)}}resample(e){return this.fromSampleRate==this.toSampleRate?this.ratioWeight=1:(this.fromSampleRate<this.toSampleRate?this.lastWeight=1:(this.tailExists=!1,this.lastWeight=0),this.initializeBuffers(),this.ratioWeight=this.fromSampleRate/this.toSampleRate),this.resampler(e)}}const r_=[255,511,1023,2047,4095,8191,16383,32767];function a_(e,t,i){for(let s=0;s<i;s++)if(e<=t[s])return s;return i}function o_(e){const t=[];return Array.prototype.slice.call(e).forEach(((e,i)=>{t[i]=function(e){let t,i,s;return e>=0?t=213:(t=85,(e=-e-1)<0&&(e=32767)),i=a_(e,r_,8),i>=8?127^t:(s=i<<4,s|=i<2?e>>4&15:e>>i+3&15,s^t)}(e)})),t}function n_(e){const t=[];return Array.prototype.slice.call(e).forEach(((e,i)=>{t[i]=function(e){let t=0;e<0?(e=132-e,t=127):(e+=132,t=255);let i=a_(e,r_,8);return i>=8?127^t:(i<<4|e>>i+3&15)^t}(e)})),t}class l_ extends a{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),this._opt={},e&&(this.player=e),this.TAG_NAME="talk";const i=po(Ms);this._opt=Object.assign({},i,t),this._opt.sampleRate=parseInt(this._opt.sampleRate,10),this._opt.sampleBitsWidth=parseInt(this._opt.sampleBitsWidth,10),this.audioContext=null,this.gainNode=null,this.recorder=null,this.workletRecorder=null,this.biquadFilter=null,this.userMediaStream=null,this.clearWorkletUrlTimeout=null,this.bufferSize=512,this._opt.audioBufferLength=this.calcAudioBufferLength(),this.audioBufferList=[],this.socket=null,this.socketStatus=pt,this.mediaStreamSource=null,this.heartInterval=null,this.checkGetUserMediaTimeout=null,this.wsUrl=null,this.startTimestamp=0,this.sequenceId=0,this.tempTimestamp=null,this.tempG711BufferList=[],this.tempRtpBufferList=[],this.tempPcmBufferList=[],this.events=new xo(this),this._initTalk(),this.player||(this.debug=new Fr(this)),this._opt.encType!==Hi&&this._opt.encType!==Vi||8e3===this._opt.sampleRate&&16===this._opt.sampleBitsWidth||this.warn(this.TAG_NAME,`\n encType is ${this._opt.encType} and sampleBitsWidth is ${this._opt.sampleBitsWidth}, set sampleBitsWidth to ${this._opt.sampleBitsWidth}。\n ${this._opt.encType} only support sampleRate 8000 and sampleBitsWidth 16`),this.log(this.TAG_NAME,"init",JSON.stringify(this._opt))}destroy(){this.clearWorkletUrlTimeout&&(clearTimeout(this.clearWorkletUrlTimeout),this.clearWorkletUrlTimeout=null),this.userMediaStream&&(this.userMediaStream.getTracks&&this.userMediaStream.getTracks().forEach((e=>{e.stop()})),this.userMediaStream=null),this.mediaStreamSource&&(this.mediaStreamSource.disconnect(),this.mediaStreamSource=null),this.recorder&&(this.recorder.disconnect(),this.recorder.onaudioprocess=null,this.recorder=null),this.biquadFilter&&(this.biquadFilter.disconnect(),this.biquadFilter=null),this.gainNode&&(this.gainNode.disconnect(),this.gainNode=null),this.workletRecorder&&(this.workletRecorder.disconnect(),this.workletRecorder=null),this.socket&&(this.socketStatus===ft&&this._sendClose(),this.socket.close(),this.socket=null),this._stopHeartInterval(),this._stopCheckGetUserMediaTimeout(),this.audioContext=null,this.gainNode=null,this.recorder=null,this.audioBufferList=[],this.sequenceId=0,this.wsUrl=null,this.tempTimestamp=null,this.tempRtpBufferList=[],this.tempG711BufferList=[],this.tempPcmBufferList=[],this.startTimestamp=0,this.log(this.TAG_NAME,"destroy")}addRtpToBuffer(e){const t=e.length+this.tempRtpBufferList.length,i=new Uint8Array(t);i.set(this.tempRtpBufferList,0),i.set(e,this.tempRtpBufferList.length),this.tempRtpBufferList=i}addG711ToBuffer(e){const t=e.length+this.tempG711BufferList.length,i=new Uint8Array(t);i.set(this.tempG711BufferList,0),i.set(e,this.tempG711BufferList.length),this.tempG711BufferList=i}addPcmToBuffer(e){const t=e.length+this.tempPcmBufferList.length,i=new Uint8Array(t);i.set(this.tempPcmBufferList,0),i.set(e,this.tempPcmBufferList.length),this.tempG711ButempPcmBufferListfferList=i}downloadRtpFile(){this.debug.log(this.TAG_NAME,"downloadRtpFile");const e=new Blob([this.tempRtpBufferList]);try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=Date.now()+".rtp",t.click(),window.URL.revokeObjectURL(t.href)}catch(e){console.error("downloadRtpFile",e)}}downloadG711File(){this.debug.log(this.TAG_NAME,"downloadG711File");const e=new Blob([this.tempG711BufferList]);try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=Date.now()+"."+this._opt.encType,t.click(),window.URL.revokeObjectURL(t.href)}catch(e){console.error("downloadG711File",e)}}downloadPcmFile(){this.debug.log(this.TAG_NAME,"downloadPcmFile");const e=new Blob([this.tempPcmBufferList]);try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=Date.now()+"."+this._opt.encType,t.click(),window.URL.revokeObjectURL(t.href)}catch(e){console.error("downloadRtpFile",e)}}downloadFile(){this._opt.packetType===Cs?this.downloadRtpFile():this._opt.encType===Hi||this._opt.encType===Vi?this.downloadG711File():this.downloadPcmFile()}calcAudioBufferLength(){const{sampleRate:e,sampleBitsWidth:t}=this._opt;return 8*e*.02/8}get socketStatusOpen(){return this.socketStatus===ft}log(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this._log("log",...t)}warn(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this._log("warn",...t)}error(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this._log("error",...t)}_log(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];this.player?this.player.debug[e](...i):this.debug?this.debug[e](...i):console[e](...i)}_getSequenceId(){return++this.sequenceId}_createWebSocket(){return new Promise(((e,t)=>{const i=this.events.proxy;this.socket=new WebSocket(this.wsUrl),this.socket.binaryType="arraybuffer",this.emit(lt.talkStreamStart),i(this.socket,Rs,(()=>{this.socketStatus=ft,this.log(this.TAG_NAME,"websocket open -> do talk"),this.emit(lt.talkStreamOpen),e(),this._doTalk()})),i(this.socket,Is,(e=>{this.log(this.TAG_NAME,"websocket message",e.data)})),i(this.socket,Ds,(e=>{this.socketStatus=mt,this.warn(this.TAG_NAME,"websocket close -> reject",e),this.emit(lt.talkStreamClose),t(e)})),i(this.socket,Ls,(e=>{this.socketStatus=gt,this.error(this.TAG_NAME,"websocket error -> reject",e),this.emit(lt.talkStreamError,e),t(e)}))}))}_sendClose(){}_initTalk(){this._initMethods(),this._opt.engine===Ps?this._initWorklet():this._opt.engine===Bs&&this._initScriptProcessor(),this.log(this.TAG_NAME,"audioContext samplerate",this.audioContext.sampleRate)}_initMethods(){this.audioContext=new(window.AudioContext||window.webkitAudioContext)({sampleRate:48e3}),this.gainNode=this.audioContext.createGain(),this.gainNode.gain.value=1,this.biquadFilter=this.audioContext.createBiquadFilter(),this.biquadFilter.type="lowpass",this.biquadFilter.frequency.value=3e3,this.resampler=new s_({fromSampleRate:this.audioContext.sampleRate,toSampleRate:this._opt.sampleRate,channels:this._opt.numberChannels,inputBufferSize:this.bufferSize})}_initScriptProcessor(){const e=this.audioContext.createScriptProcessor||this.audioContext.createJavaScriptNode;this.recorder=e.apply(this.audioContext,[this.bufferSize,this._opt.numberChannels,this._opt.numberChannels]),this.recorder.onaudioprocess=e=>this._onaudioprocess(e)}_initWorklet(){const e=ao((function(){class e extends AudioWorkletProcessor{constructor(e){super(),this._cursor=0,this._bufferSize=e.processorOptions.bufferSize,this._buffer=new Float32Array(this._bufferSize)}process(e,t,i){if(!e.length||!e[0].length)return!0;for(let t=0;t<e[0][0].length;t++)this._cursor+=1,this._cursor===this._bufferSize&&(this._cursor=0,this.port.postMessage({eventType:"data",buffer:this._buffer})),this._buffer[this._cursor]=e[0][0][t];return!0}}registerProcessor("talk-processor",e)}));this.audioContext.audioWorklet&&this.audioContext.audioWorklet.addModule(e).then((()=>{const e=new AudioWorkletNode(this.audioContext,"talk-processor",{processorOptions:{bufferSize:this.bufferSize}});e.connect(this.gainNode),e.port.onmessage=e=>{"data"===e.data.eventType&&this._encodeAudioData(e.data.buffer)},this.workletRecorder=e})),this.clearWorkletUrlTimeout=setTimeout((()=>{URL.revokeObjectURL(e),this.clearWorkletUrlTimeout=null}),ie)}_onaudioprocess(e){const t=e.inputBuffer.getChannelData(0);this._encodeAudioData(new Float32Array(t))}_encodeAudioData(e){if(0===e[0]&&0===e[1])return void this.log(this.TAG_NAME,"empty audio data");const t=this.resampler.resample(e);let i=t;if(16===this._opt.sampleBitsWidth?i=function(e){let t=e.length,i=new Int16Array(t);for(;t--;){let s=Math.max(-1,Math.min(1,e[t]));i[t]=s<0?32768*s:32767*s}return i}(t):8===this._opt.sampleBitsWidth&&(i=function(e){let t=e.length,i=new Int8Array(t);for(;t--;){let s=Math.max(-1,Math.min(1,e[t]));const r=s<0?32768*s:32767*s;i[t]=parseInt(255/(65535/(32768+r)),10)}return i}(t)),null!==i.buffer){let e=null;this._opt.encType===Hi?e=o_(i):this._opt.encType===Vi?e=n_(i):this._opt.encType===Wi&&(e=i);const t=new Uint8Array(e);for(let e=0;e<t.length;e++){let i=this.audioBufferList.length;this.audioBufferList[i++]=t[e],this.audioBufferList.length===this._opt.audioBufferLength&&(this._sendTalkMsg(new Uint8Array(this.audioBufferList)),this.audioBufferList=[])}}}_parseAudioMsg(e){let t=null;return this._opt.packetType!==Cs||this._opt.encType!==Hi&&this._opt.encType!==Vi?this._opt.packetType===ks&&(t=e):t=this.rtpPacket(e),t}rtpPacket(e){const t=[];let i=0,s=0,r=0;const a=this._opt.rtpSsrc,o=e.length;this._opt.encType===Hi?i=Ss:this._opt.encType===Vi?i=Ts:this._opt.encType===Ji&&(i=Es),this.startTimestamp||(this.startTimestamp=ha()),r=ha()-this.startTimestamp,s=this._getSequenceId();let n=0;if(this._opt.packetTcpSendType===xs){const e=o+12;t[n++]=255&e>>8,t[n++]=255&e>>0}t[n++]=128,t[n++]=128+i,t[n++]=s/256,t[n++]=s%256,t[n++]=r/65536/256,t[n++]=r/65536%256,t[n++]=r%65536/256,t[n++]=r%65536%256,t[n++]=a/65536/256,t[n++]=a/65536%256,t[n++]=a%65536/256,t[n++]=a%65536%256;let l=t.concat([...e]),d=new Uint8Array(l.length);for(let e=0;e<l.length;e++)d[e]=l[e];return d}opusPacket(e){return e}_sendTalkMsg(e){null===this.tempTimestamp&&(this.tempTimestamp=ha());const t=ha(),i=t-this.tempTimestamp,s=this._parseAudioMsg(e);this.log(this.TAG_NAME,`send talk msg and diff is ${i} and byteLength is ${s.byteLength} and length is ${s.length}, and ${this._opt.encType} length is ${e.length}`),yo(this._opt.saveToTempFile)&&yo(this._opt.debug)&&(this._opt.packetType===Cs?this.addRtpToBuffer(s):this._opt.encType===Hi||this._opt.encType===Vi?this.addG711ToBuffer(s):this.addPcmToBuffer(s)),s&&(this.socketStatusOpen?this.socket.send(s.buffer):this.emit(ut.tallWebsocketClosedByError)),this.tempTimestamp=t}_doTalk(){this._getUserMedia()}_getUserMedia(){this.log(this.TAG_NAME,"getUserMedia"),void 0===window.navigator.mediaDevices&&(window.navigator.mediaDevices={}),void 0===window.navigator.mediaDevices.getUserMedia&&(this.log(this.TAG_NAME,"window.navigator.mediaDevices.getUserMedia is undefined and init function"),window.navigator.mediaDevices.getUserMedia=function(e){var t=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return t?new Promise((function(i,s){t.call(navigator,e,i,s)})):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}),this._opt.checkGetUserMediaTimeout&&this._startCheckGetUserMediaTimeout(),window.navigator.mediaDevices.getUserMedia({audio:this._opt.audioConstraints,video:!1}).then((e=>{this.log(this.TAG_NAME,"getUserMedia success"),this.userMediaStream=e,this.mediaStreamSource=this.audioContext.createMediaStreamSource(e),this.mediaStreamSource.connect(this.biquadFilter),this.recorder?(this.biquadFilter.connect(this.recorder),this.recorder.connect(this.gainNode)):this.workletRecorder&&(this.biquadFilter.connect(this.workletRecorder),this.workletRecorder.connect(this.gainNode)),this.gainNode.connect(this.audioContext.destination),this.emit(lt.talkGetUserMediaSuccess),null===e.oninactive&&(e.oninactive=e=>{this._handleStreamInactive(e)})})).catch((e=>{this.error(this.TAG_NAME,"getUserMedia error",e.toString()),this.emit(lt.talkGetUserMediaFail,e.toString())})).finally((()=>{this.log(this.TAG_NAME,"getUserMedia finally"),this._stopCheckGetUserMediaTimeout()}))}_getUserMedia2(){this.log(this.TAG_NAME,"getUserMedia"),navigator.mediaDevices?navigator.mediaDevices.getUserMedia({audio:!0}).then((e=>{this.log(this.TAG_NAME,"getUserMedia2 success")})):navigator.getUserMedia({audio:!0},this.log(this.TAG_NAME,"getUserMedia2 success"),this.log(this.TAG_NAME,"getUserMedia2 fail"))}async _getUserMedia3(){this.log(this.TAG_NAME,"getUserMedia3");try{const e=await navigator.mediaDevices.getUserMedia({audio:{latency:!0,noiseSuppression:!0,autoGainControl:!0,echoCancellation:!0,sampleRate:48e3,channelCount:1},video:!1});console.log("getUserMedia() got stream:",e),this.log(this.TAG_NAME,"getUserMedia3 success")}catch(e){this.log(this.TAG_NAME,"getUserMedia3 fail")}}_handleStreamInactive(e){this.userMediaStream&&(this.warn(this.TAG_NAME,"stream oninactive",e),this.emit(lt.talkStreamInactive))}_startCheckGetUserMediaTimeout(){this._stopCheckGetUserMediaTimeout(),this.checkGetUserMediaTimeout=setTimeout((()=>{this.log(this.TAG_NAME,"check getUserMedia timeout"),this.emit(lt.talkGetUserMediaTimeout)}),this._opt.getUserMediaTimeout)}_stopCheckGetUserMediaTimeout(){this.checkGetUserMediaTimeout&&(this.log(this.TAG_NAME,"stop checkGetUserMediaTimeout"),clearTimeout(this.checkGetUserMediaTimeout),this.checkGetUserMediaTimeout=null)}_startHeartInterval(){this.heartInterval=setInterval((()=>{this.log(this.TAG_NAME,"heart interval");let e=[35,36,0,0,0,0,0,0];e=new Uint8Array(e),this.socket.send(e.buffer)}),15e3)}_stopHeartInterval(){this.heartInterval&&(this.log(this.TAG_NAME,"stop heart interval"),clearInterval(this.heartInterval),this.heartInterval=null)}startTalk(e){return new Promise(((t,i)=>{if(!function(){let e=!1;const t=window.navigator;return t&&(e=!(!t.mediaDevices||!t.mediaDevices.getUserMedia),e||(e=!!(t.getUserMedia||t.webkitGetUserMedia||t.mozGetUserMedia||t.msGetUserMedia))),e}())return i("not support getUserMedia");if(this.wsUrl=e,this._opt.testMicrophone)this._doTalk();else{if(!this.wsUrl)return i("wsUrl is null");this._createWebSocket().catch((e=>{i(e)}))}this.once(lt.talkGetUserMediaFail,(()=>{i("getUserMedia fail")})),this.once(lt.talkGetUserMediaSuccess,(()=>{t()}))}))}setVolume(e){e=parseFloat(e).toFixed(2),isNaN(e)||(e=ca(e,0,1),this.gainNode.gain.value=e)}getOption(){return this._opt}get volume(){return this.gainNode?parseFloat(100*this.gainNode.gain.value).toFixed(0):null}}class d_{constructor(e){this.player=e,this.globalSetting=null;const t=Ca();this.defaultSettings={watermark_id:`JbPro_${t}`,watermark_prefix:`JbPro_mask_${t}`,watermark_txt:"JbPro 测试水印",watermark_x:0,watermark_y:0,watermark_rows:0,watermark_cols:0,watermark_x_space:0,watermark_y_space:0,watermark_font:"微软雅黑",watermark_color:"black",watermark_fontsize:"18px",watermark_alpha:.15,watermark_width:150,watermark_height:100,watermark_angle:15,watermark_parent_width:0,watermark_parent_height:0,watermark_parent_node:null},this.player.debug.log("Watermark","int")}destroy(){this._removeMark(),this.globalSetting=null,this.defaultSettings=null,this.player.debug.log("Watermark","destroy")}remove(){this._removeMark()}load(e){this.globalSetting=e,this._loadMark(e)}resize(){this.player.debug.log("Watermark","resize()"),this.globalSetting&&this._loadMark(this.globalSetting)}_loadMark(){let e=this.defaultSettings;if(1===arguments.length&&"object"==typeof arguments[0]){var t=arguments[0]||{};for(let i in t)t[i]&&e[i]&&t[i]===e[i]||(t[i]||0===t[i])&&(e[i]=t[i])}var i=document.getElementById(e.watermark_id);i&&i.parentNode&&i.parentNode.removeChild(i);var s="string"==typeof e.watermark_parent_node?document.getElementById(e.watermark_parent_node):e.watermark_parent_node,r=s||document.body;const a=r.getBoundingClientRect();var o=Math.max(r.scrollWidth,r.clientWidth,a.width),n=Math.max(r.scrollHeight,r.clientHeight,a.height),l=arguments[0]||{},d=r;(l.watermark_parent_width||l.watermark_parent_height)&&d&&(e.watermark_x=e.watermark_x+0,e.watermark_y=e.watermark_y+0);var h=document.getElementById(e.watermark_id),c=null;if(h)h.shadowRoot&&(c=h.shadowRoot);else{(h=document.createElement("div")).id=e.watermark_id,h.setAttribute("style","pointer-events: none !important; display: block !important"),c="function"==typeof h.attachShadow?h.attachShadow({mode:"open"}):h;var u=r.children,p=Math.floor(Math.random()*(u.length-1))+1;u[p]?r.insertBefore(h,u[p]):r.appendChild(h)}e.watermark_cols=parseInt((o-e.watermark_x)/(e.watermark_width+e.watermark_x_space));var f,m=parseInt((o-e.watermark_x-e.watermark_width*e.watermark_cols)/e.watermark_cols);e.watermark_x_space=m?e.watermark_x_space:m,e.watermark_rows=parseInt((n-e.watermark_y)/(e.watermark_height+e.watermark_y_space));var g,y,A,b=parseInt((n-e.watermark_y-e.watermark_height*e.watermark_rows)/e.watermark_rows);e.watermark_y_space=b?e.watermark_y_space:b,s?(f=e.watermark_x+e.watermark_width*e.watermark_cols+e.watermark_x_space*(e.watermark_cols-1),g=e.watermark_y+e.watermark_height*e.watermark_rows+e.watermark_y_space*(e.watermark_rows-1)):(f=0+e.watermark_x+e.watermark_width*e.watermark_cols+e.watermark_x_space*(e.watermark_cols-1),g=0+e.watermark_y+e.watermark_height*e.watermark_rows+e.watermark_y_space*(e.watermark_rows-1));for(var _=0;_<e.watermark_rows;_++){A=s?0+e.watermark_y+(n-g)/2+(e.watermark_y_space+e.watermark_height)*_:e.watermark_y+(n-g)/2+(e.watermark_y_space+e.watermark_height)*_;for(var v=0;v<e.watermark_cols;v++){y=s?0+e.watermark_x+(o-f)/2+(e.watermark_width+e.watermark_x_space)*v:e.watermark_x+(o-f)/2+(e.watermark_width+e.watermark_x_space)*v;var w=document.createElement("div"),S=document.createTextNode(e.watermark_txt);w.appendChild(S),w.id=e.watermark_prefix+_+v,w.style.webkitTransform="rotate("+e.watermark_angle+"deg)",w.style.MozTransform="rotate("+e.watermark_angle+"deg)",w.style.msTransform="rotate("+e.watermark_angle+"deg)",w.style.OTransform="rotate("+e.watermark_angle+"deg)",w.style.transform="rotate("+e.watermark_angle+"deg)",w.style.visibility="",w.style.position="absolute",w.style.left=y+"px",w.style.top=A+"px",w.style.overflow="hidden",w.style.zIndex="9999999",w.style.opacity=e.watermark_alpha,w.style.fontSize=e.watermark_fontsize,w.style.fontFamily=e.watermark_font,w.style.color=e.watermark_color,w.style.textAlign="center",w.style.width=e.watermark_width+"px",w.style.height=e.watermark_height+"px",w.style.display="block",w.style["-ms-user-select"]="none",c.appendChild(w)}}}_removeMark(){const e=this.defaultSettings;var t=document.getElementById(e.watermark_id);if(t){var i=t.parentNode;i&&i.removeChild(t)}}}class h_{constructor(e){this.player=e,this.globalSetting=null;const t=Ca();this.defaultSettings={watermark_id:`JbPro_${t}`,watermark_prefix:`JbPro_mask_${t}`,watermark_txt:"JbPro 测试水印",watermark_x:0,watermark_y:0,watermark_rows:0,watermark_cols:0,watermark_x_space:100,watermark_y_space:100,watermark_font:"微软雅黑",watermark_color:"black",watermark_fontsize:18,watermark_alpha:.15,watermark_width:150,watermark_height:100,watermark_angle:-15,watermark_parent_width:0,watermark_parent_height:0,watermark_parent_node:null},this.player.debug.log("Watermark","int")}destroy(){this._removeMark(),this.globalSetting=null,this.defaultSettings=null,this.player.debug.log("Watermark","destroy")}remove(){this._removeMark()}load(e){this.globalSetting=e,this._loadMark(e)}resize(){this.player.debug.log("Watermark","resize()"),this.globalSetting&&this._loadMark(this.globalSetting)}_loadMark(){let e=this.defaultSettings;if(1===arguments.length&&"object"==typeof arguments[0]){var t=arguments[0]||{};for(let i in t)t[i]&&e[i]&&t[i]===e[i]||(t[i]||0===t[i])&&(e[i]=t[i])}var i=document.getElementById(e.watermark_id);i&&i.parentNode&&i.parentNode.removeChild(i);var s="string"==typeof e.watermark_parent_node?document.getElementById(e.watermark_parent_node):e.watermark_parent_node,r=s||document.body;const a=r.getBoundingClientRect();var o=Math.max(r.scrollWidth,r.clientWidth,a.width),n=Math.max(r.scrollHeight,r.clientHeight,a.height),l=arguments[0]||{},d=r;(l.watermark_parent_width||l.watermark_parent_height)&&d&&(e.watermark_x=e.watermark_x+0,e.watermark_y=e.watermark_y+0);var h=document.getElementById(e.watermark_id),c=null;if(h)h.shadowRoot&&(c=h.shadowRoot);else{(h=document.createElement("div")).id=e.watermark_id,h.setAttribute("style","pointer-events: none !important; display: block !important"),c="function"==typeof h.attachShadow?h.attachShadow({mode:"open"}):h;var u=r.children,p=Math.floor(Math.random()*(u.length-1))+1;u[p]?r.insertBefore(h,u[p]):r.appendChild(h)}const f=this._calcTextSize(),m=this.defaultSettings,g=m.watermark_x_space+f.width,y=m.watermark_y_space+f.height,A=2*y,b=g/2,_=`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="none">\n <defs>\n <pattern id="pattern1" x="0" y="0" width="${g}" height="${A}" patternUnits="userSpaceOnUse" patternTransform="rotate(${m.watermark_angle})">\n <text x="0" y="${m.watermark_fontsize}" style="font-family:${m.watermark_font}; font-size:${m.watermark_fontsize}; fill:${m.watermark_color}; fill-opacity:${m.watermark_alpha}">${m.watermark_txt}</text>\n </pattern>\n <pattern id="pattern2" x="${b}" y="${y}" width="${g}" height="${A}" patternUnits="userSpaceOnUse" patternTransform="rotate(${m.watermark_angle})">\n <text x="0" y="${m.watermark_fontsize}" style="font-family:${m.watermark_font}; font-size:${m.watermark_fontsize}; fill:${m.watermark_color}; fill-opacity:${m.watermark_alpha}">${m.watermark_txt}</text>\n </pattern>\n </defs>\n <rect x="0" y="0" width="100%" height="100%" style="fill:url(#pattern1); fill-opacity:1;" />\n <rect x="0" y="0" width="100%" height="100%" style="fill:url(#pattern2); fill-opacity:1;" />\n </svg>`,v=window.btoa(unescape(encodeURIComponent(_)));var w=document.createElement("div");w.style.position="absolute",w.style.left="0px",w.style.top="0px",w.style.overflow="hidden",w.style.zIndex="9999999",w.style.width=o+"px",w.style.height=n+"px",w.style.display="block",w.style["-ms-user-select"]="none",w.style.backgroundImage=`url(data:image/svg+xml;base64,${v})`,c.appendChild(w)}_removeMark(){const e=this.defaultSettings;var t=document.getElementById(e.watermark_id);if(t){var i=t.parentNode;i&&i.removeChild(t)}}_calcTextSize(){const{watermark_txt:e,watermark_font:t,watermark_fontsize:i}=this.globalSetting,s=document.createElement("span");s.innerHTML=e,s.setAttribute("style",`font-family: ${t}; font-size: ${i}px; visibility: hidden; display: inline-block`),document.querySelector("body").appendChild(s);const r={width:s.offsetWidth,height:s.offsetHeight};return s.remove(),r}}const c_="right",u_="left",p_="up",f_="down",m_="leftUp",g_="leftDown",y_="rightUp",A_="rightDown",b_="zoomExpand",__="zoomNarrow",v_="apertureFar",w_="apertureNear",S_="focusFar",T_="focusNear",E_="setPos",k_="calPos",C_="delPos",x_="wiperOpen",R_="wiperClose",D_="cruiseStart",L_={stop:0,fiStop:0,right:1,left:2,up:8,down:4,leftUp:10,leftDown:6,rightUp:9,rightDown:5,zoomExpand:16,zoomNarrow:32,apertureFar:72,apertureNear:68,focusFar:66,focusNear:65,setPos:129,calPos:130,delPos:131,wiperOpen:140,wiperClose:141,setCruise:132,decCruise:133,cruiseStart:136,cruiseStop:0},I_=[25,50,75,100,125,150,175,200,225,250],P_=[1,2,3,4,5,6,7,8,9,16],B_=[16,48,80,112,144,160,176,192,208,224];function M_(e){const{type:t,speed:i=5,index:s=0}=e,r=function(e){return I_[(e=e||5)-1]||I_[4]}(i);let a,o,n,l;if(a=L_[t],!a)return"";switch(t){case p_:case f_:case v_:case w_:n=r;break;case c_:case u_:case S_:case T_:o=r;break;case m_:case g_:case y_:case A_:o=r,n=r;break;case b_:case __:l=function(e){return B_[(e=e||5)-1]||B_[4]}(i);break;case k_:case C_:case E_:n=U_(s);break;case R_:case x_:o=1;break;case D_:o=U_(s)}return function(e,t,i,s){let r=[];r[0]=165,r[1]=15,r[2]=1,r[3]=0,r[4]=0,r[5]=0,r[6]=0,e&&(r[3]=e);t&&(r[4]=t);i&&(r[5]=i);s&&(r[6]=s);return r[7]=(r[0]+r[1]+r[2]+r[3]+r[4]+r[5]+r[6])%256,function(e){let t="";for(let i=0;i<e.length;i++){let s=e[i].toString(16);1===s.length&&(s="0"+s),t+=s.toUpperCase()}return t}(r)}(a,o,n,l)}function U_(e){return P_[e-1]}const F_=["Boolean","Number","String","Undefined","Null","Date","Object"];function O_(e){if("object"!=typeof e)return e;const t=Object.prototype.toString.call(e).slice(8,-1);switch(t){case"Array":case"Uint8Array":case"ArrayBuffer":return t+"["+e.length+"]";case"Object":return"{}";default:return t}}function N_(e,t,i){i||(i=1),t||(t=2);const s={};if(!e||"object"!=typeof e)return e;const r=Object.prototype.toString.call(e).slice(8,-1);if(!F_.includes(r))return r;if(!(i>t)){for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i===t?s[r]=O_(e[r]):"object"==typeof e[r]?s[r]=N_(e[r],t,i+1):s[r]=e[r]);return s}}function j_(){return(new Date).toLocaleString()}class G_{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.player=e,this.TAG_NAME="MemoryLogger",this.logMaxSize=(null==t?void 0:t.logMaxSize)||204800,this.logSize=0,this.logTextArray=[],this.player.debug.log(this.TAG_NAME,"init")}destroy(){this.clear(),this.player.debug.log(this.TAG_NAME,"destroy")}clear(){this.logSize=0,this.logTextArray=[]}logCache(){let e="";try{for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];const r=i.map((e=>N_(e)));e="[JbPro] "+j_()+JSON.stringify(r)}catch(e){return}if(this.logSize+=e.length,this.logTextArray.push(e),this.logSize>this.logMaxSize){const e=this.logTextArray.shift();this.logSize-=e.length}}getLog(){return this.logTextArray.join("\n")}getLogBlob(){const e=this.getLog();return new Blob([e],{type:"text/plain"})}download(){const e=this.getLog();this.clear();const t=new Blob([e],{type:"text/plain"});Vo(t,"JbPro-"+j_()+".log")}}class z_ extends a{constructor(e){super(),this.player=e,this.TAG_NAME="Network",this.online=this.isOnline(),this.prevOnline=this.online,this.interval=null,this._initListener(),this.player.debug.log(this.TAG_NAME,"init")}destroy(){this.off(),this._stopCheck(),window.removeEventListener("online",this._updateOnlineStatus),window.removeEventListener("offline",this._updateOfflineStatus),this.player.debug.log(this.TAG_NAME,"destroy")}_initListener(){window.addEventListener("online",this._updateOnlineStatus.bind(this)),window.addEventListener("offline",this._updateOfflineStatus.bind(this))}_stopCheck(){this.interval&&(clearInterval(this.interval),this.interval=null)}_startCheck(){this.interval=setInterval((()=>{this.isOnline()!==this.prevOnline&&(this.isOnline()?this._updateOnlineStatus():this._updateOfflineStatus())}),1e3)}_updateOnlineStatus(){this.prevOnline=this.online,this.online=!0,this.logStatus(),this.emit("online")}_updateOfflineStatus(){this.prevOnline=this.online,this.online=!1,this.logStatus(),this.emit("offline")}logStatus(){const e=this.prevOnline?"online":"offline",t=this.online?"online":"offline";this.player.debug.log(this.TAG_NAME,`prevOnline: ${this.prevOnline}, online: ${this.online}, status: ${e} -> ${t}`)}isOnline(){return void 0===navigator.onLine||navigator.onLine}isOffline(){return!this.isOnline()}}class $_ extends a{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this._opt={},this.TAG_NAME="JbPro",this.$container=null,Object.keys(e).forEach((t=>{if(void 0===e[t])throw new Error(`JbPro option "${t}" can not be undefined`)})),this.originalOptions=e;const t=fo();let i=Object.assign({},t,e);i.url="",i.isMulti&&(i.debugUuid="xxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))),this.debug=new Fr(this),this.debug.log("JbPro","init");let s=e.container;if("string"==typeof e.container&&(s=document.querySelector(e.container)),!s)throw this.debug.error("JbPro","JbPro need container option and now container is",e.container),new Error("JbPro need container option");if(i.decoder&&Ao(-1!==i.decoder.indexOf("decoder-pro.js")||-1!==i.decoder.indexOf("decoder-pro-simd.js")))throw this.debug.error("JbPro",`JbPro decoder ${i.decoder} must be decoder-pro.js or decoder-pro-simd.js`),new Error(`JbPro decoder ${i.decoder} must be decoder-pro.js or decoder-pro-simd.js`);if("CANVAS"===s.nodeName||"VIDEO"===s.nodeName)throw this.debug.error("JbPro",`JbPro container type can not be ${s.nodeName} type`),new Error(`JbPro container type can not be ${s.nodeName} type`);if(i.videoBuffer>=i.heartTimeout)throw this.debug.error("JbPro",`JbPro videoBuffer ${i.videoBuffer}s must be less than heartTimeout ${i.heartTimeout}s`),new Error(`JbPro videoBuffer ${i.videoBuffer}s must be less than heartTimeout ${i.heartTimeout}s`);if(this._checkHasCreated(s))throw this.debug.error("JbPro","JbPro container has been created and can not be created again",s),new Error("JbPro container has been created and can not be created again",s);if(!s.classList)throw this.debug.error(this.TAG_NAME,"JbPro container is invalid, must be a DOM Element",s),new Error("JbPro container is invalid, must be a DOM Element",s);if(i.videoBuffer>10&&console.warn("JbPro",`videoBuffer ${i.videoBuffer}s is too long, will black screen for ${i.videoBuffer}s , it is recommended to set it to less than 10s`),s.classList.add("jb-pro-container"),bo(s,te,Ca()),Ao(i.isLive)){const e=document.createElement("video");return e.muted=!0,e.setAttribute("controlsList","nodownload"),e.disablePictureInPicture="disablePictureInPicture",e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.height="100%",e.style.width="100%",s.appendChild(e),this.$videoElement=e,this.$container=s,void(this._opt=i)}if(delete i.container,Oa(i.videoBuffer)&&(i.videoBuffer=1e3*Number(i.videoBuffer)),Oa(i.videoBufferDelay)&&(i.videoBufferDelay=1e3*Number(i.videoBufferDelay)),Oa(i.networkDelay)&&(i.networkDelay=1e3*Number(i.networkDelay)),Oa(i.aiFaceDetectInterval)&&(i.aiFaceDetectInterval=1e3*Number(i.aiFaceDetectInterval)),Oa(i.aiObjectDetectInterval)&&(i.aiObjectDetectInterval=1e3*Number(i.aiObjectDetectInterval)),Oa(i.timeout)&&(Ua(i.loadingTimeout)&&(i.loadingTimeout=i.timeout),Ua(i.heartTimeout)&&(i.heartTimeout=i.timeout)),Oa(i.autoWasm)&&(Ua(i.decoderErrorAutoWasm)&&(i.decoderErrorAutoWasm=i.autoWasm),Ua(i.hardDecodingNotSupportAutoWasm)&&(i.hardDecodingNotSupportAutoWasm=i.autoWasm)),Oa(i.aiFaceDetectLevel)&&Ua(i.aiFaceDetectWidth)){const e=cr[i.aiFaceDetectLevel];e&&(i.aiFaceDetectWidth=e)}if(Oa(i.aiObjectDetectLevel)&&Ua(i.aiObjectDetectWidth)){const e=ur[i.aiObjectDetectLevel];e&&(i.aiObjectDetectWidth=e)}yo(i.isCrypto)&&(i.isM7sCrypto=!0),this._opt=i,this._destroyed=!1,this.$container=s,this._tempPlayBgObj={},this._tempVideoLastIframeInfo={},this._tempPlayerIsMute=!0,this._loadingTimeoutReplayTimes=0,this._heartTimeoutReplayTimes=0,this._streamErrorReplayTimes=0,this._streamEndReplayTimes=0,this._websocket1006ErrorReplayTimes=0,this.events=new xo(this),this._opt.isUseNewFullscreenWatermark?this.watermark=new h_(this):this.watermark=new d_(this),this.memoryLogger=new G_(this),this.network=new z_(this),this._websocket1006ErrorRetryLog=[],this._mseDecodeErrorRetryLog=[],this._wcsDecodeErrorRetryLog=[],this._isNetworkOfflinePaused=!1,this._isNetworkOfflinePausedAndNextPlayConfig={},this.widthOrHeightChangeReplayDelayTimeout=null,this.streamErrorReplayDelayTimeout=null,this.streamEndReplayDelayTimeout=null,this.$loadingBgImage=null,this.$loadingBg=null,this._initPlayer(s,i),this._initWatermark(),this._initNetwork(),this.debug.log("JbPro",'init success and version is "4-1-2024"'),console.log('JbPro Version is "4-1-2024"')}destroy(){return new Promise(((e,t)=>{this.debug.log("JbPro","destroy()"),this._destroyed=!0,this.off(),this._removeTimeout(),this.$videoElement&&(this.$videoElement.pause(),this.$videoElement.currentTime=0,this.$videoElement.srcObject&&(this.$videoElement.srcObject=null,this.$videoElement.removeAttribute("srcObject")),this.$videoElement.src&&(this.$videoElement.src="",this.$videoElement.removeAttribute("src")),this.$container&&this.$container.removeChild(this.$videoElement),this.$videoElement=null),this._removeLoadingBackgroundForIOS(),this.player?this.player.destroy().then((()=>{this.player=null,this._destroy(),e()})).catch((()=>{t()})):(this._destroy(),e())}))}_removeTimeout(){this.widthOrHeightChangeReplayDelayTimeout&&(clearTimeout(this.widthOrHeightChangeReplayDelayTimeout),this.widthOrHeightChangeReplayDelayTimeout=null),this.streamErrorReplayDelayTimeout&&(clearTimeout(this.streamErrorReplayDelayTimeout),this.streamErrorReplayDelayTimeout=null),this.streamEndReplayDelayTimeout&&(clearTimeout(this.streamEndReplayDelayTimeout),this.streamEndReplayDelayTimeout=null)}_destroy(){var e,t;this.events&&(this.events.destroy(),this.events=null),this.talk&&(this.talk.destroy(),this.talk=null),this.watermark&&(this.watermark.destroy(),this.watermark=null),this.network&&(this.network.destroy(),this.network=null),this.memoryLogger&&(this.memoryLogger.destroy(),this.memoryLogger=null),this.$container&&(this.$container.classList.remove("jb-pro-container"),this.$container.classList.remove("jb-pro-fullscreen-web"),e=this.$container,t=te,e&&(e.dataset?delete e.dataset[t]:e.removeAttribute("data-"+t)),this.$container=null),this._tempPlayBgObj=null,this._tempVideoLastIframeInfo=null,this._isNetworkOfflinePaused=!1,this._isNetworkOfflinePausedAndNextPlayConfig={},this._tempPlayerIsMute=!0,this._resetReplayTimes(),this.debug&&this.debug.log("JbPro","destroy end"),this._opt=null,this.debug=null}_resetReplayTimes(){this._loadingTimeoutReplayTimes=0,this._heartTimeoutReplayTimes=0,this._streamErrorReplayTimes=0,this._streamEndReplayTimes=0,this._websocket1006ErrorReplayTimes=0,this._websocket1006ErrorRetryLog=[],this._mseDecodeErrorRetryLog=[],this._wcsDecodeErrorRetryLog=[]}_getOriginalOpt(){const e=fo();return Object.assign({},e,this.originalOptions)}_initPlayer(e,t){this.player=new i_(e,t),this._bindEvents()}_initTalk(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.talk&&(this.talk.destroy(),this.talk=null),this.player&&(e.debug=this.player._opt.debug),this.talk=new l_(this.player,e),this.debug.log("JbPro","_initTalk",this.talk.getOption()),this._bindTalkEvents()}_resetPlayer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(((t,i)=>{this.debug.log(this.TAG_NAME,"_resetPlayer()",JSON.stringify(e));const s=()=>{this._opt.url="",this._opt.playOptions={},this._opt=Object.assign(this._opt,e),this._initPlayer(this.$container,this._opt)};this.player?this.player.destroy().then((()=>{this.player=null,s(),this.debug.log(this.TAG_NAME,"_resetPlayer() end"),t()})).catch((()=>{i()})):(s(),this.debug.log(this.TAG_NAME,"_resetPlayer() end"),t())}))}_bindEvents(){var e=this;Object.keys(dt).forEach((t=>{this.player.on(dt[t],(function(){for(var i=arguments.length,s=new Array(i),r=0;r<i;r++)s[r]=arguments[r];e.emit(t,...s)}))})),this._opt.playFailedAndPausedShowMessage&&this.on(lt.playFailedAndPaused,(e=>{this.player&&this.player.showTipsMessageByCode(e)})),this.player.once(lt.beforeDestroy,(()=>{this.emit(lt.close),this.destroy().then((()=>{})).catch((e=>{}))})),this.player.on(lt.resize,(()=>{this.watermark&&this.watermark.resize()})),this.player.on(lt.fullscreen,(()=>{this.watermark&&this.watermark.resize()})),this.player.on(lt.videoInfo,(()=>{this.player&&(this.player.singleWatermark&&this.player.singleWatermark.resize(),this.player.ghostWatermark&&this.player.ghostWatermark.resize(),this.player.dynamicWatermark&&this.player.dynamicWatermark.resize())})),this.player.on(lt.memoryLog,(function(){e.memoryLogger.logCache(...arguments)})),this.player.on(lt.downloadMemoryLog,(()=>{this.downloadMemoryLog()}))}_bindTalkEvents(){Object.keys(ht).forEach((e=>{this.player.on(ht[e],(t=>{this.emit(e,t)}))}))}_initWatermark(){if(Ka(this._opt.fullscreenWatermarkConfig)){const e=ja(this.$container,this._opt.fullscreenWatermarkConfig);if(!e.watermark_txt)return void this.debug.warn("JbPro","fullscreenWatermarkConfig text is empty");this.watermark.load(e)}}_initNetwork(){this.network.on(lt.online,(()=>{if(this.emit(lt.networkState,lt.online),this.isDestroyed())this.debug.log(this.TAG_NAME,"network online and JbPro is destroyed");else if(this._isNetworkOfflinePaused&&this._isNetworkOfflinePausedAndNextPlayConfig&&this._isNetworkOfflinePausedAndNextPlayConfig.url){const e=this._isNetworkOfflinePausedAndNextPlayConfig.url,t=this._isNetworkOfflinePausedAndNextPlayConfig.playOptions;this._streamErrorReplayTimes++;const i=this._isNetworkOfflinePausedAndNextPlayConfig.type||"unknown";this._isNetworkOfflinePaused=!1,this._isNetworkOfflinePausedAndNextPlayConfig={},this.debug.log(this.TAG_NAME,`${i} and network online and reset player and play`),this.play(e,t).then((()=>{this.debug.log(this.TAG_NAME,`${i} and network online and play success`)})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.fetchError,{},error),this.debug.error(this.TAG_NAME,`${i} and network online and play error`,e)}))}})),this.network.on(lt.offline,(()=>{this.emit(lt.networkState,lt.offline)}))}_checkHasCreated(e){if(!e)return!1;return!!_o(e,te)}isDestroyed(){return this._destroyed}getOption(){return this.player?this.player.getOption():{}}setDebug(e){this.debug.log("JbPro",`setDebug() ${e}`),this._opt.debug=!!e,this.player?this.player.updateOption({debug:!!e},!0):this.debug.warn("JbPro","player is not init")}getIsDebug(){let e=!1;return this.player&&(e=this.player._opt.debug),e}mute(){this.debug.log("JbPro","mute()"),this.player&&this.player.mute(!0)}cancelMute(){this.debug.log("JbPro","cancelMute()"),this.player&&this.player.mute(!1)}setVolume(e){this.debug.log("JbPro",`setVolume() ${e}`),this.player&&(this.player.volume=e)}getVolume(){let e=null;return this.player&&(e=this.player.volume,e=parseFloat(e).toFixed(2)),e}audioResume(){this.debug.log("JbPro","audioResume()"),this.player&&this.player.audio?this.player.audio.audioEnabled(!0):this.debug.warn("JbPro","audioResume error")}setTimeout(e){this.debug.log("JbPro",`setTimeout() ${e}`),e=Number(e),isNaN(e)?this.debug.warn("JbPro",`setTimeout error: ${e} is not a number`):(this._opt.timeout=e,this._opt.loadingTimeout=e,this._opt.heartTimeout=e,this.player&&this.player.updateOption({timeout:e,loadingTimeout:e,heartTimeout:e}))}setScaleMode(e){this.debug.log("JbPro",`setScaleMode() ${e}`),this.player?this.player.setScaleMode(e):this.debug.warn("JbPro","setScaleMode() player is null")}pause(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise(((t,i)=>{this.debug.log("JbPro",`pause() ${e}`),(this._opt.pauseAndNextPlayUseLastFrameShow||this._opt.replayUseLastFrameShow)&&(this._tempPlayBgObj=this._getVideoLastIframeInfo()),this._tempPlayerIsMute=this.isMute(),this._pause(e).then((e=>{t(e)})).catch((e=>{i(e)}))}))}_pause(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise(((t,i)=>{if(this.debug.log("JbPro",`_pause() ${e}`),this.isDestroyed())return i("JbPro is destroyed");this._resetReplayTimes(),this.player?this.player.pause(e).then((e=>{t(e)})).catch((e=>{i(e)})):i("player is null")}))}close(){return new Promise(((e,t)=>{this.debug.log("JbPro","close()"),this._opt.url="",this._resetReplayTimes(),this.player?this.player.close().then((()=>{e()})).catch((e=>{t(e)})):t("player is null")}))}clearView(){this.debug.log("JbPro","clearView()"),this.player&&this.player.video?this.getRenderType()===W?this.player.video.clearView():this.debug.warn("JbPro","clearView","render type is video, not support clearView, please use canvas render type"):this.debug.warn("JbPro","clearView","player is null")}play(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,s)=>{if(this.debug.log("JbPro",`play() ${e}`,JSON.stringify(t)),!e&&!this._opt.url)return this.emit(lt.error,ut.playError),void s("url is null and this._opt.url is null");if(e&&(e=(""+e).trim(),-1===e.indexOf("http:")&&-1===e.indexOf("https:")&&-1===e.indexOf("webrtc:")&&-1===e.indexOf("ws:")&&-1===e.indexOf("wss:")&&-1===e.indexOf("wt:")&&-1===e.indexOf("artc:")))return s(`url ${e} must be "http:" or "https:" or "webrtc:" or "ws:" or "wss:" or "wt:" or "artc:" protocol`);if(Ao(this._opt.isLive))return this.$videoElement.controls="controls",this.$videoElement.muted=!1,this.$videoElement.src=e,this.$videoElement.play(),void i(this.$videoElement);if(this._opt.isM7sCrypto){let r=t.cryptoKey||this._opt.playOptions.cryptoKey,a=t.cryptoIV||this._opt.playOptions.cryptoIV;if(this._opt.m7sCryptoKey&&(!r||!a)){const e=this._opt.m7sCryptoKey.split(".");r=co(e[0]),a=co(e[1])}if(!r||!a){const r=e||this._opt.url;return void this._cryptoPlay(r).then((r=>{let{cryptoIV:a,cryptoKey:o}=r;this._opt.playOptions.cryptoKey=o,this._opt.playOptions.cryptoIV=a,t.cryptoIV=a,t.cryptoKey=o,this._playBefore(e,t).then((()=>{i()})).catch((e=>{s(e)}))})).catch((e=>{s(e)}))}this._opt.playOptions.cryptoKey=r,this._opt.playOptions.cryptoIV=a,t.cryptoIV=a,t.cryptoKey=r}else if(this._opt.isXorCrypto){let e=t.cryptoKey||this._opt.playOptions.cryptoKey,i=t.cryptoIV||this._opt.playOptions.cryptoIV;if(this._opt.xorCryptoKey&&(!e||!i)){const t=this._opt.xorCryptoKey.split(".");e=co(t[0]),i=co(t[1])}e&&i&&(this._opt.playOptions.cryptoKey=e,this._opt.playOptions.cryptoIV=i,t.cryptoIV=i,t.cryptoKey=e)}this._playBefore(e,t).then((()=>{i()})).catch((e=>{s(e)}))}))}_playBefore(e,t){return new Promise(((i,s)=>{if(this.player)if(e)if(this._opt.url)if(e===this._opt.url)if(this.player.playing)this.debug.log("JbPro","_playBefore","playing and resolve()"),i();else{this.debug.log("JbPro","_playBefore","this._opt.url === url and pause -> play and destroy play");let e=this._getOriginalOpt();(this._opt.pauseAndNextPlayUseLastFrameShow||this._opt.replayUseLastFrameShow)&&this._tempPlayBgObj&&this._tempPlayBgObj.loadingBackground&&(e=Object.assign(e,this._tempPlayBgObj)),Ao(this._tempPlayerIsMute)&&(e.isNotMute=!0,this._tempPlayerIsMute=!0);const t=this._opt.url,r=this._opt.playOptions;this._resetPlayer(e).then((()=>{this._play(t,r).then((()=>{i()})).catch((e=>{this.debug.error("JbPro","_playBefore this.player.play error",e),this.emit(lt.crashLog,this.getCrashLog("this.player.play 1",e)),s(e)}))})).catch((e=>{this.debug.error("JbPro","_resetPlayer error",e)}))}else{this.debug.log("JbPro","_playBefore",`\n this._url.url is ${this._opt.url}\n and new url is ${e}\n and destroy and play new url`);const r=this._getOriginalOpt();this._resetPlayer(r).then((()=>{this._play(e,t).then((()=>{i()})).catch((e=>{this.debug.error("JbPro","_playBefore _play error",e),this.emit(lt.crashLog,this.getCrashLog("this.player.play 2",e)),s(e)}))})).catch((e=>{this.debug.error("JbPro","_resetPlayer error",e)}))}else this._play(e,t).then((()=>{i()})).catch((e=>{this.debug.error("JbPro","_playBefore _play error",e),this.emit(lt.crashLog,this.getCrashLog("this.player.play 3",e)),s(e)}));else{let e=this._getOriginalOpt();(this._opt.pauseAndNextPlayUseLastFrameShow||this._opt.replayUseLastFrameShow)&&this._tempPlayBgObj&&this._tempPlayBgObj.loadingBackground&&(e=Object.assign(e,this._tempPlayBgObj)),Ao(this._tempPlayerIsMute)&&(e.isNotMute=!0,this._tempPlayerIsMute=!0);const t=this._opt.url,r=this._opt.playOptions;this._resetPlayer(e).then((()=>{this._play(t,r).then((()=>{i()})).catch((e=>{this.debug.error("JbPro","_playBefore _play error",e),this.emit(lt.crashLog,this.getCrashLog("this.player.play 4",e)),s(e)}))})).catch((e=>{this.debug.error("JbPro","_resetPlayer error",e)}))}else e?this._play(e,t).then((()=>{i()})).catch((e=>{this.debug.error("JbPro","_playBefore _play error",e),this.emit(lt.crashLog,this.getCrashLog("this.player.play 5",e)),s(e)})):this._play(this._opt.url,this._opt.playOptions).then((()=>{i()})).catch((e=>{this.debug.error("JbPro","_playBefore _play error",e),this.emit(lt.crashLog,this.getCrashLog("this.player.play 6",e)),s(e)}))}))}_cryptoPlay(e){return new Promise(((t,i)=>{const s=function(e){const t=(e||document.location.toString()).split("//"),i=t[1].indexOf("/");let s=t[1].substring(i);return-1!=s.indexOf("?")&&(s=s.split("?")[0]),s}(e);let r=this._opt.cryptoKeyUrl,a="";const o=uo(e);if(r){if(a=r,this._opt.isM7sCrypto&&-1===a.indexOf("/crypto/?stream=")){const e=uo(r);a=e.origin+ee+`?stream=${s}`}}else r=o.origin+ee,a=r+`?stream=${s}`;var n;this.player.debug.log("JbPro",`_cryptoPlay() cryptoKeyUrl: ${a} and opt.cryptoKeyUrl: ${this._opt.cryptoKeyUrl}`),(n=a,new Promise(((e,t)=>{El.get(n).then((t=>{e(t)})).catch((e=>{t(e)}))}))).then((e=>{if(e){const s=e.split("."),r=co(s[0]),a=co(s[1]);a&&r?t({cryptoIV:a,cryptoKey:r}):i("get cryptoIV or cryptoKey error")}else i(`cryptoKeyUrl: getM7SCryptoStreamKey ${a} res is null`)})).catch((e=>{i(e)}))}))}playback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,s)=>{if(this.debug.log("JbPro",`playback() ${e}, options: ${JSON.stringify(t)}`),Ao(this._opt.isLive))return s("this._opt.isLive is false, can not playback");const r=mo(),a=Object.assign({},r.playbackConfig,this._opt.playbackConfig,t);a.isUseFpsRender||a.isCacheBeforeDecodeForFpsRender&&(a.isCacheBeforeDecodeForFpsRender=!1,this.debug.warn("JbPro","playbackConfig.isUseFpsRender is false, isCacheBeforeDecodeForFpsRender can not be ture, isCacheBeforeDecodeForFpsRender is set to false")),0===a.rateConfig.length&&a.showRateBtn&&(a.showRateBtn=!1,this.debug.warn("JbPro","playbackConfig.rateConfig.length is 0, showRateBtn can not be ture, showRateBtn is set to false")),a.controlType,X.simple,this._resetPlayer({videoBuffer:0,playbackConfig:a,playType:w,openWebglAlignment:!0,useMSE:a.useMSE,useWCS:a.useWCS,useSIMD:!0}).then((()=>{this.play(e,t).then((()=>{i()})).catch((e=>{s(e)}))})).catch((e=>{s(e)}))}))}playbackPause(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.debug.log("JbPro",`playbackPause() ${e}`),this._opt.playType===_?Promise.reject("playType is player, can not call playbackPause method"):new Promise(((t,i)=>{if(!this.player)return i("player is null");yo(e)?this._pause().then((()=>{t()})).catch((e=>{i(e)})):(this.player.playbackPause=!0,t())}))}playbackResume(){return this.debug.log("JbPro","playbackResume()"),this._opt.playType===_?Promise.reject("playType is player, can not call playbackResume method"):new Promise(((e,t)=>{if(!this.player)return t("player is null");this.player.playbackPause=!1,e()}))}forward(e){return this.debug.log("JbPro",`forward() ${e}`),Ao(this._opt.isLive)||this._opt.playType===_?Promise.reject("forward() method only just for playback type"):Da(Number(e))?new Promise(((t,i)=>{this.player?(e=ca(Number(e),.1,32),this.player.decoderWorker&&this.player.decoderWorker.updateWorkConfig({key:"playbackRate",value:e}),this.player.playback.setRate(e),this.player.video&&this.player.video.setRate(e),this.player.audio&&this.player.audio.setRate(e),(this.player.isPlaybackUseWCS()||this.player.isPlaybackUseMSE())&&(this.player.demux.dropBuffer$2(),this.player.isPlaybackCacheBeforeDecodeForFpsRender()&&this.player.demux.initPlaybackCacheLoop()),t()):i("player is not playing")})):Promise.reject(`forward() params "rate": ${e} must be number type`)}playbackForward(e){return this.forward(e)}normal(){return this.forward(1)}playbackNormal(){return this.normal()}updatePlaybackForwardMaxRateDecodeIFrame(e){this.debug.log("JbPro",`updatePlaybackForwardMaxRateDecodeIFrame() ${e}`),e=Number(e),e=ca(e=parseInt(e,10),1,8),this._opt.playbackForwardMaxRateDecodeIFrame=e,this.player?this.player.updateOption({playbackForwardMaxRateDecodeIFrame:e},!0):this.debug.warn("JbPro","updatePlaybackForwardMaxRateDecodeIFrame() player is null")}setPlaybackStartTime(e){this.debug.log("JbPro",`setPlaybackStartTime() ${e}`);const t=Ja(e);this.player?this.player.isPlayback()?t<10&&0!==e&&this.player.playback.isControlTypeNormal()?this.debug.warn("JbPro",`setPlaybackStartTime() control type is normal and timestamp: ${e} is not valid`):this.player.playback.isControlTypeSimple()&&e>this.player.playback.totalDuration?this.debug.warn("JbPro",`setPlaybackStartTime() control type is simple and timestamp: ${e} is more than ${this.player.playback.totalDuration}`):this.player.playing&&(this.player.playback.isControlTypeNormal()&&10===t&&(e*=1e3),this.player.playback.setStartTime(e),this.playbackClearCacheBuffer()):this.debug.warn("JbPro","setPlaybackStartTime() playType is not playback"):this.debug.warn("JbPro","setPlaybackStartTime() player is null")}setPlaybackShowPrecision(e){this.debug.log("JbPro",`setPlaybackShowPrecision() ${e}`),this.player?this.player.isPlayback()?this.player.playback.isControlTypeNormal()?this.player.playback.setShowPrecision(e):this.debug.warn("JbPro","control type is not normal , not support!"):this.debug.warn("JbPro","playType is not playback"):this.debug.warn("JbPro","player is null")}playbackCurrentTimeScroll(){this.debug.log("JbPro","playbackCurrentTimeScroll()"),this.player?this.player.isPlayback()?this.player.playback.isControlTypeNormal()?this.player.playback.currentTimeScroll():this.debug.warn("JbPro","control type is not normal , not support!"):this.debug.warn("JbPro","playType is not playback"):this.debug.warn("JbPro","player is null")}playbackClearCacheBuffer(){this.debug.log("JbPro","playbackClearCacheBuffer()"),this.player?this.player.isPlayback()?(this.player.video&&this.player.video.clear(),this.player.audio&&this.player.audio.clear(),this.clearBufferDelay()):this.debug.warn("JbPro","playType is not playback"):this.debug.warn("JbPro","player is null")}getPlaybackCurrentRate(){if(this.player){if(this.player.isPlayback())return this.player.getPlaybackRate();this.debug.warn("JbPro","playType is not playback")}else this.debug.warn("JbPro","player is null")}updatePlaybackLocalOneFrameTimestamp(e){this.debug.log("JbPro",`updatePlaybackLocalOneFrameTimestamp() ${e}`),this.player?this.player.isPlayback()?this.player.playback.updateLocalOneFrameTimestamp(e):this.debug.warn("JbPro","playType is not playback"):this.debug.warn("JbPro","player is null")}setStreamQuality(e){if(this.debug.log("JbPro",`setStreamQuality() ${e}`),!this.player)return void this.debug.warn("JbPro","player is null");if(!this.player._opt.operateBtns.quality)return void this.debug.warn("JbPro","player._opt.operateBtns.quality is false");(this.player._opt.qualityConfig||[]).includes(e)?this.player.streamQuality=e:this.debug.warn("JbPro",`quality: ${e} is not in qualityList`)}_play(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((s,r)=>{if(!this.player)return r("player is null");let a=!1;this._opt.url&&this._opt.url!==t&&(a=!0),this._opt.url=t,this._opt.playOptions=i;const p=t.split("?")[0],f=p.startsWith("http://")||p.startsWith("https://"),m=p.startsWith("webrtc://"),g=p.startsWith("artc://"),y=p.startsWith("wt://"),A=p.startsWith("ws://")||p.startsWith("wss://"),b=f||A,_=f&&p.endsWith(".m3u8"),v=b&&p.endsWith(".flv"),w=b&&(p.endsWith(".fmp4")||p.endsWith(".mp4")),S=b&&p.endsWith(".mpeg4"),T=b&&(p.endsWith(".h264")||p.endsWith(".h265")),E=b&&p.endsWith(".ts");let U=this._opt.isWebrtcForZLM||!1,F=this._opt.isWebrtcForSRS||!1,O=this._opt.isWebrtcForOthers||!1;m&&(-1!==t.indexOf("/index/api/webrtc")?(U=!0,F=!1,O=!1):-1!==t.indexOf("/rtc/v1/play/")&&(F=!0,U=!1,O=!1));let N=null,G=null;if(v&&Ao(this._opt.isFlv)&&this._resetDemuxType("isFlv"),w&&Ao(this._opt.isFmp4)&&this._resetDemuxType("isFmp4"),S&&Ao(this._opt.isMpeg4)&&this._resetDemuxType("isMpeg4"),T&&Ao(this._opt.isNakedFlow)&&this._resetDemuxType("isNakedFlow"),E&&Ao(this._opt.isTs)&&this._resetDemuxType("isTs"),f?N=_?l:n:y?N=h:m?N=d:g?N=c:A&&(N=o),this._opt.isNakedFlow?G=L:this._opt.isFmp4?G=I:this._opt.isMpeg4?G=P:this._opt.isFlv?G=k:this._opt.isTs?G=M:_?G=x:m?G=R:g?G=B:y?G=D:A&&(G=C),!N||!G)return this._opt.playFailedAndPausedShowMessage&&this.showErrorMessageTips("url is not support"),r(`play url ${t} is invalid, protocol is ${u[N]}, demuxType is ${G}`);this.debug.log("JbPro",`play url ${t} protocol is ${u[N]}, demuxType is ${G}`);const z=()=>{this.player.once(ut.webglAlignmentError,(e=>{if(this.isDestroyed())this.debug.log("JbPro","webglAlignmentError but player is destroyed");else if(this.emit(lt.crashLog,this.getCrashLog(ut.webglAlignmentError,e)),this.player&&this.player._opt.webglAlignmentErrorReplay){this.debug.log("JbPro","webglAlignmentError");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({openWebglAlignment:!0}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","webglAlignmentError and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.webglAlignmentError,{},e),this.debug.error("JbPro","webglAlignmentError and play error",t)}))})).catch((e=>{this.debug.error("JbPro","webglAlignmentError and _resetPlayer error",e)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.webglAlignmentError,{},e),this.debug.log("JbPro","webglAlignmentError and webglAlignmentErrorReplay is false")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.webglAlignmentError,{},e),this.debug.error("JbPro","webglAlignmentError and pause error",t)}))}})),this.player.once(ut.webglContextLostError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","webglContextLostError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.webglContextLostError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.webglContextLostErrorReplay){this.debug.log("JbPro","webglContextLostError");const i=this._opt.url,s=this._opt.playOptions;let r={};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","webglContextLostError and play success")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.webglContextLostError,t,e),this.debug.error("JbPro","webglContextLostError and play error",i)}))})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.webglContextLostError,t,e),this.debug.error("JbPro","webglContextLostError and _resetPlayer error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.webglContextLostError,t,e),this.debug.log("JbPro","webglContextLostError and webglContextLostErrorReplay is false")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.webglContextLostError,t,e),this.debug.error("JbPro","webglAlignmentError and pause error",i)}))}})),this.player.once(ut.mediaSourceH265NotSupport,(e=>{if(this.isDestroyed())this.debug.log("JbPro","mediaSourceH265NotSupport but player is destroyed");else if(this.emit(lt.crashLog,this.getCrashLog(ut.mediaSourceH265NotSupport,e)),this.player&&this.player._opt.hardDecodingNotSupportAutoWasm){this.debug.log("JbPro","mediaSourceH265NotSupport auto wasm [mse-> wasm] reset player and play");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({useMSE:!1,useWCS:!1}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","mediaSourceH265NotSupport auto wasm [mse-> wasm] reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceH265NotSupport,e),this.debug.error("JbPro","mediaSourceH265NotSupport auto wasm [mse-> wasm] reset player and play error",t)}))})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceH265NotSupport,{},e),this.debug.error("JbPro","mediaSourceH265NotSupport auto wasm [mse-> wasm] _resetPlayer error",t)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceH265NotSupport,{},e),this.debug.log("JbPro","mediaSourceH265NotSupport and autoWasm is false")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceH265NotSupport,{},e),this.debug.error("JbPro","mediaSourceH265NotSupport and pause error",t)}))}})),this.player.once(ut.mediaSourceFull,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceFull but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.mediaSourceFull,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mseDecodeErrorReplay){const i=this._opt.url,s=this._opt.playOptions;let r={},a=this.player._opt.decoderErrorAutoWasm,o=!0;a?r={useMSE:!1,useWCS:!1}:this._checkIsMeaningfulRetry(Mr)?this._mseDecodeErrorRetryLog.push(ha()):(a=!0,o=!1,r={useMSE:!1,useWCS:!1}),this.debug.log("JbPro",`mediaSourceFull and auto wasm ${Ao(o)?" and is not meaningful Retry":""} [mse-> ${a?"wasm":"mse"}] reset player and play`),this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","mediaSourceFull and reset player and play success")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceFull,t,e),this.debug.error("JbPro","mediaSourceFull and reset player and play error",i)}))})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceFull,t,e),this.debug.error("JbPro","mediaSourceFull and _resetPlayer error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceFull,t,e),this.debug.log("JbPro","mediaSourceFull and autoWasm is false")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceFull,t,e),this.debug.error("JbPro","mediaSourceFull and pause error",i)}))}})),this.player.once(ut.mediaSourceAppendBufferError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceAppendBufferError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.mediaSourceAppendBufferError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mseDecodeErrorReplay){const i=this._opt.url,s=this._opt.playOptions;let r={},a=this.player._opt.decoderErrorAutoWasm,o=!0;a?r={useMSE:!1,useWCS:!1}:this._checkIsMeaningfulRetry(Mr)?this._mseDecodeErrorRetryLog.push(ha()):(a=!0,o=!1,r={useMSE:!1,useWCS:!1}),this.player.isMSEAudioDecoderError&&(this.player.debug.log("JbPro","mediaSourceAppendBufferError and isMSEAudioDecoderError is true so set mseDecodeAudio = false"),r.mseDecodeAudio=!1),this.debug.log("JbPro",`mediaSourceAppendBufferError and auto wasm ${Ao(o)?" and is not meaningful Retry":""} [mse-> ${a?"wasm":"mse"}] reset player and play`),this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","mediaSourceAppendBufferError and reset player and play success")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAppendBufferError,t,e),this.debug.error("JbPro","mediaSourceAppendBufferError and reset player and play error",i)}))})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAppendBufferError,t,e),this.debug.error("JbPro","mediaSourceAppendBufferError and _resetPlayer error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAppendBufferError,t,e),this.debug.log("JbPro","mediaSourceAppendBufferError and autoWasm is false")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAppendBufferError,t,e),this.debug.error("JbPro","mediaSourceAppendBufferError and pause error",i)}))}})),this.player.once(ut.mseSourceBufferError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","mseSourceBufferError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.mseSourceBufferError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mseDecodeErrorReplay){const i=this._opt.url,s=this._opt.playOptions;let r={};if(this.player._opt.mseDecoderUseWorker)r={mseDecoderUseWorker:!1},this.debug.log("JbPro","mseSourceBufferError auto wasm [mse worker -> mse] reset player and play");else{let e=this.player._opt.decoderErrorAutoWasm,t=!0;e?r={useMSE:!1,useWCS:!1}:this._checkIsMeaningfulRetry(Mr)?this._mseDecodeErrorRetryLog.push(ha()):(e=!0,t=!1,r={useMSE:!1,useWCS:!1}),this.player.isMSEVideoDecoderInitializationFailedNotSupportHevc&&(this.debug.log("JbPro","mseSourceBufferError and isMSEVideoDecoderInitializationFailedNotSupportHevc is true so auto wasm"),r={useMSE:!1,useWCS:!1}),this.debug.log("JbPro",`mseSourceBufferError auto wasm ${Ao(t)?" and is not meaningful Retry":""} [mse-> ${e?"wasm":"mse"}] reset player and play`)}this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","mseSourceBufferError reset player and play success")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mseSourceBufferError,t,e),this.debug.error("JbPro","mseSourceBufferError reset player and play error",i)}))})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mseSourceBufferError,t,e),this.debug.error("JbPro","mseSourceBufferError _resetPlayer and play error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.mseSourceBufferError,t,e),this.debug.log("JbPro","mseSourceBufferError and autoWasm is false")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mseSourceBufferError,t,e),this.debug.error("JbPro","mseSourceBufferError and pause error:",i)}))}})),this.player.once(ut.mediaSourceBufferedIsZeroError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceBufferedIsZeroError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.mediaSourceBufferedIsZeroError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mseDecodeErrorReplay){const i=this._opt.url,s=this._opt.playOptions;let r={},a=this.player._opt.decoderErrorAutoWasm,o=!0;a?r={useMSE:!1,useWCS:!1}:this._checkIsMeaningfulRetry(Mr)?this._mseDecodeErrorRetryLog.push(ha()):(a=!0,o=!1,r={useMSE:!1,useWCS:!1}),this.debug.log("JbPro",`mediaSourceBufferedIsZeroError auto wasm ${Ao(o)?" and is not meaningful Retry":""} [mse-> ${a?"wasm":"mse"}] reset player and play`),this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","mediaSourceBufferedIsZeroError reset player and play success")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceBufferedIsZeroError,t,e),this.debug.error("JbPro","mediaSourceBufferedIsZeroError reset player and play error",i)}))})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceBufferedIsZeroError,t,e),this.debug.error("JbPro","mediaSourceBufferedIsZeroError _resetPlayer and play error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceBufferedIsZeroError,t,e),this.debug.log("JbPro","mediaSourceBufferedIsZeroError and autoWasm is false")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceBufferedIsZeroError,t,e),this.debug.error("JbPro","mediaSourceBufferedIsZeroError and pause error:",i)}))}})),this.player.once(ut.mseAddSourceBufferError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","mseAddSourceBufferError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.mseAddSourceBufferError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.hardDecodingNotSupportAutoWasm){this.debug.log("JbPro","mseAddSourceBufferError auto wasm [mse-> wasm] reset player and play");const i=this._opt.url,s=this._opt.playOptions;let r={useMSE:!1,useWCS:!1};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","mseAddSourceBufferError auto wasm [mse-> wasm] reset player and play success")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mseAddSourceBufferError,t,e),this.debug.error("JbPro","mseAddSourceBufferError auto wasm [mse-> wasm] reset player and play error",i)}))})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mseAddSourceBufferError,t,e),this.debug.error("JbPro","mseAddSourceBufferError auto wasm [mse-> wasm] _resetPlayer and play error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.mseAddSourceBufferError,t,e),this.debug.log("JbPro","mseAddSourceBufferError and autoWasm is false")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mseAddSourceBufferError,t,e),this.debug.error("JbPro","mseAddSourceBufferError and pause error",i)}))}})),this.player.once(ut.mediaSourceDecoderConfigurationError,(e=>{if(this.isDestroyed())this.debug.log("JbPro","mediaSourceDecoderConfigurationError but player is destroyed");else if(this.emit(lt.crashLog,this.getCrashLog(ut.mediaSourceDecoderConfigurationError,e)),this.player&&this.player._opt.hardDecodingNotSupportAutoWasm){this.debug.log("JbPro","mediaSourceDecoderConfigurationError auto wasm [mse-> wasm] reset player and play");const t=this._opt.url,i=this._opt.playOptions;let s={useMSE:!1,useWCS:!1};this._resetPlayer(s).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","mediaSourceDecoderConfigurationError auto wasm [mse-> wasm] reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceDecoderConfigurationError,e),this.debug.error("JbPro","mediaSourceDecoderConfigurationError auto wasm [mse-> wasm] reset player and play error",t)}))})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceDecoderConfigurationError,e),this.debug.error("JbPro","mediaSourceDecoderConfigurationError auto wasm [mse-> wasm] _resetPlayer and play error",t)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceDecoderConfigurationError,e),this.debug.log("JbPro","mediaSourceDecoderConfigurationError and autoWasm is false")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceDecoderConfigurationError,e),this.debug.error("JbPro","mediaSourceDecoderConfigurationError and pause error",t)}))}})),this.player.once(ut.mediaSourceTsIsMaxDiff,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceTsIsMaxDiff but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.mediaSourceTsIsMaxDiff,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mediaSourceTsIsMaxDiffReplay){this.debug.log("JbPro","mediaSourceTsIsMaxDiff reset player and play");const i=this._opt.url,s=this._opt.playOptions;let r={};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","mediaSourceTsIsMaxDiff replay success")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceTsIsMaxDiff,t,e),this.debug.error("JbPro","mediaSourceTsIsMaxDiff replay error",i)}))})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceTsIsMaxDiff,t,e),this.debug.error("JbPro","mediaSourceTsIsMaxDiff _resetPlayer error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceTsIsMaxDiff,t,e),this.debug.log("JbPro","mediaSourceTsIsMaxDiff and replay is false")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceTsIsMaxDiff,t,e),this.debug.error("JbPro","mediaSourceTsIsMaxDiff and pause error",i)}))}})),this.player.once(ut.mseWidthOrHeightChange,(t=>{if(this.isDestroyed())return void this.debug.log("JbPro","mseWidthOrHeightChange but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.mseWidthOrHeightChange,t));const i=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.widthOrHeightChangeReplay){this.debug.log("JbPro","mseWidthOrHeightChange and reset player and play");const e=this._opt.url,s=this._opt.playOptions;let r={};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,i,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.player._opt.widthOrHeightChangeReplayDelayTime>0?this.widthOrHeightChangeReplayDelayTimeout=setTimeout((()=>{this.isDestroyed()?this.debug.log("JbPro","mseWidthOrHeightChange and widthOrHeightChangeReplayDelayTime but player is destroyed"):this.play(e,s).then((()=>{this.debug.log("JbPro","mseWidthOrHeightChange and reset player and play success")})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mseWidthOrHeightChange,i,t),this.debug.error("JbPro","mseWidthOrHeightChange and reset player and play error",e)}))}),1e3*this.player._opt.widthOrHeightChangeReplayDelayTime):this.play(e,s).then((()=>{this.debug.log("JbPro","mseWidthOrHeightChange and reset player and play success")})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mseWidthOrHeightChange,i,t),this.debug.error("JbPro","mseWidthOrHeightChange and reset player and play error",e)}))})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mseWidthOrHeightChange,i,t),this.debug.error("JbPro","mseWidthOrHeightChange and _resetPlayer error",e)}))}else{const s=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(s).then((()=>{this.emit(lt.playFailedAndPaused,ut.mseWidthOrHeightChange,i,t),this.debug.error("JbPro","mseWidthOrHeightChange and _resetPlayer error",e)})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mseWidthOrHeightChange,i,t),this.debug.error("JbPro","mseWidthOrHeightChange error and pause error",e)}))}})),this.player.once(ut.mediaSourceAudioG711NotSupport,(t=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceAudioG711NotSupport but player is destroyed");const i=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mediaSourceAudioG711NotSupportReplay){this.debug.log("JbPro","mediaSourceAudioG711NotSupport and reset player and play");const e=this._opt.url,s=this._opt.playOptions;let r={mseDecodeAudio:!1};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,i,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(e,s).then((()=>{this.debug.log("JbPro","mediaSourceAudioG711NotSupport and reset player and play success")})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAudioG711NotSupport,i,t),this.debug.error("JbPro","mediaSourceAudioG711NotSupport and reset player and play error",e)}))})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAudioG711NotSupport,i,t),this.debug.error("JbPro","mediaSourceAudioG711NotSupport and _resetPlayer error",e)}))}else{const s=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(s).then((()=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAudioG711NotSupport,i,t),this.debug.error("JbPro","mediaSourceAudioG711NotSupport and _resetPlayer error",e)})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAudioG711NotSupport,i,t),this.debug.error("JbPro","mediaSourceAudioG711NotSupport error and pause error",e)}))}})),this.player.once(ut.mediaSourceAudioInitTimeout,(t=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceAudioInitTimeout but player is destroyed");const i=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mediaSourceAudioInitTimeoutReplay){this.debug.log("JbPro","mediaSourceAudioInitTimeout and reset player and play");const e=this._opt.url,s=this._opt.playOptions;let r={mseDecodeAudio:!1};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,i,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(e,s).then((()=>{this.debug.log("JbPro","mediaSourceAudioInitTimeout and reset player and play success")})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAudioInitTimeout,i,t),this.debug.error("JbPro","mediaSourceAudioInitTimeout and reset player and play error",e)}))})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAudioInitTimeout,i,t),this.debug.error("JbPro","mediaSourceAudioInitTimeout and _resetPlayer error",e)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAudioInitTimeout,i),this.debug.error("JbPro","mediaSourceAudioInitTimeout and _resetPlayer error",e)})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAudioInitTimeout,i),this.debug.error("JbPro","mediaSourceAudioInitTimeout error and pause error",e)}))}})),this.player.once(ut.mediaSourceAudioNoDataTimeout,(t=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceAudioNoDataTimeout but player is destroyed");const i=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mediaSourceAudioInitTimeoutReplay){this.debug.log("JbPro","mediaSourceAudioNoDataTimeout and reset player and play");const e=this._opt.url,s=this._opt.playOptions;let r={mseDecodeAudio:!1};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,i,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(e,s).then((()=>{this.debug.log("JbPro","mediaSourceAudioNoDataTimeout and reset player and play success")})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAudioNoDataTimeout,i,t),this.debug.error("JbPro","mediaSourceAudioNoDataTimeout and reset player and play error",e)}))})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAudioNoDataTimeout,i,t),this.debug.error("JbPro","mediaSourceAudioNoDataTimeout and _resetPlayer error",e)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAudioNoDataTimeout,i),this.debug.error("JbPro","mediaSourceAudioNoDataTimeout and _resetPlayer error",e)})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAudioNoDataTimeout,i),this.debug.error("JbPro","mediaSourceAudioNoDataTimeout error and pause error",e)}))}})),this.player.once(ut.mediaSourceUseCanvasRenderPlayFailed,(e=>{if(this.isDestroyed())this.debug.log("JbPro","mediaSourceUseCanvasRenderPlayFailed but player is destroyed");else if(this.emit(lt.crashLog,this.getCrashLog(ut.mediaSourceUseCanvasRenderPlayFailed,e)),this.player&&this.player._opt.mediaSourceUseCanvasRenderPlayFailedReplay&&this.player._opt.mediaSourceUseCanvasRenderPlayFailedReplayType){this.debug.log("JbPro",`mediaSourceUseCanvasRenderPlayFailed relayType is ${this.player._opt.mediaSourceUseCanvasRenderPlayFailedReplayType} and reset player and play`);const t=this._opt.url,i=this._opt.playOptions;let s={};const r=this.player._opt.mediaSourceUseCanvasRenderPlayFailedReplayType;r===W?s={useMSE:!1,useWCS:!1}:r===J&&(s={useVideoRender:!0,useCanvasRender:!1}),this._resetPlayer(s).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","mediaSourceUseCanvasRenderPlayFailed and reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceUseCanvasRenderPlayFailed,e),this.debug.error("JbPro","mediaSourceUseCanvasRenderPlayFailed and reset player and play error",t)}))})).catch((e=>{this.debug.error("JbPro","mediaSourceUseCanvasRenderPlayFailed auto and _resetPlayer and play error",e)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.debug.log("JbPro","mediaSourceUseCanvasRenderPlayFailed and pause player success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceUseCanvasRenderPlayFailed,e),this.debug.error("JbPro","mediaSourceUseCanvasRenderPlayFailed and pause",t)}))}})),this.player.once(ut.webcodecsH265NotSupport,(e=>{if(this.isDestroyed())this.debug.log("JbPro","webcodecsH265NotSupport but player is destroyed");else if(this.emit(lt.crashLog,this.getCrashLog(ut.webcodecsH265NotSupport,e)),this.player&&this.player._opt.hardDecodingNotSupportAutoWasm){this.debug.log("JbPro","webcodecsH265NotSupport auto wasm [wcs-> wasm] reset player and play");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({useMSE:!1,useWCS:!1}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","webcodecsH265NotSupport auto wasm [wcs-> wasm] reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.webcodecsH265NotSupport,e),this.debug.error("JbPro","webcodecsH265NotSupport auto wasm [wcs-> wasm] reset player and play error",t)}))})).catch((e=>{this.debug.error("JbPro","webcodecsH265NotSupport auto wasm [wcs-> wasm] _resetPlayer and play error",e)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.webcodecsH265NotSupport,e),this.debug.log("JbPro","webcodecsH265NotSupport and autoWasm is false")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.webcodecsH265NotSupport,e),this.debug.error("JbPro","webcodecsH265NotSupport and pause error",t)}))}})),this.player.once(ut.webcodecsUnsupportedConfigurationError,(e=>{if(this.isDestroyed())this.debug.log("JbPro","webcodecsUnsupportedConfigurationError but player is destroyed");else if(this.emit(lt.crashLog,this.getCrashLog(ut.webcodecsUnsupportedConfigurationError,e)),this.player&&this.player._opt.hardDecodingNotSupportAutoWasm){this.debug.log("JbPro","webcodecsUnsupportedConfigurationError auto wasm [wcs-> wasm] reset player and play");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({useMSE:!1,useWCS:!1}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","webcodecsUnsupportedConfigurationError auto wasm [wcs-> wasm] reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.webcodecsUnsupportedConfigurationError,e),this.debug.error("JbPro","webcodecsUnsupportedConfigurationError auto wasm [wcs-> wasm] reset player and play error",t)}))})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.webcodecsUnsupportedConfigurationError,e),this.debug.error("JbPro","webcodecsUnsupportedConfigurationError auto wasm [wcs-> wasm] _resetPlayer and play error",t)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.webcodecsUnsupportedConfigurationError,e),this.debug.log("JbPro","webcodecsUnsupportedConfigurationError and autoWasm is false")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.webcodecsUnsupportedConfigurationError,e),this.debug.error("JbPro","webcodecsUnsupportedConfigurationError and pause error",t)}))}})),this.player.once(ut.webcodecsDecodeConfigureError,(e=>{if(this.isDestroyed())this.debug.log("JbPro","webcodecsDecodeConfigureError but player is destroyed");else if(this.emit(lt.crashLog,this.getCrashLog(ut.webcodecsDecodeConfigureError,e)),this.player&&this.player._opt.hardDecodingNotSupportAutoWasm){this.debug.log("JbPro","webcodecsDecodeConfigureError auto wasm [wcs-> wasm] reset player and play");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({useMSE:!1,useWCS:!1}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","webcodecsDecodeConfigureError auto wasm [wcs-> wasm] reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.webcodecsDecodeConfigureError,e),this.debug.error("JbPro","webcodecsDecodeConfigureError auto wasm [wcs-> wasm] reset player and play error",t)}))})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.webcodecsDecodeConfigureError,e),this.debug.error("JbPro","webcodecsDecodeConfigureError auto wasm [wcs-> wasm] _resetPlayer and play error",t)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.webcodecsDecodeConfigureError,e),this.debug.log("JbPro","webcodecsDecodeConfigureError and autoWasm is false")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.webcodecsDecodeConfigureError,e),this.debug.error("JbPro","webcodecsDecodeConfigureError and pause error",t)}))}})),this.player.once(ut.webcodecsDecodeError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","webcodecsDecodeError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.webcodecsDecodeError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.wcsDecodeErrorReplay){const i=this._opt.url,s=this._opt.playOptions;let r={},a=this.player._opt.decoderErrorAutoWasm,o=!0;a?r={useMSE:!1,useWCS:!1}:this._checkIsMeaningfulRetry(Ur)?this._wcsDecodeErrorRetryLog.push(ha()):(a=!0,o=!1,r={useMSE:!1,useWCS:!1}),this.debug.log("JbPro",`webcodecs decode error autoWasm ${Ao(o)?" and is not meaningful Retry":""} [wcs-> ${a?"wasm":"wcs"}] reset player and play`),this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","webcodecs decode error reset player and play success")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.webcodecsDecodeError,t,e),this.debug.error("JbPro","webcodecs decode error reset player and play error",i)}))})).catch((()=>{this.emit(lt.playFailedAndPaused,ut.webcodecsDecodeError,t,e),this.debug.error("JbPro","webcodecs decode error _resetPlayer error")}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.webcodecsDecodeError,t,e),this.debug.log("JbPro","webcodecs decode error and autoWasm is false")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.webcodecsDecodeError,t,e),this.debug.error("JbPro","webcodecs decode error and pause error",i)}))}})),this.player.once(ut.wcsWidthOrHeightChange,(t=>{if(this.isDestroyed())return void this.debug.log("JbPro","wcsWidthOrHeightChange but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.wcsWidthOrHeightChange,t));const i=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.widthOrHeightChangeReplay){this.debug.log("JbPro","wcsWidthOrHeightChange and reset player and play");const e=this._opt.url,s=this._opt.playOptions;let r={};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,i,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this._opt.widthOrHeightChangeReplayDelayTime>0?this.widthOrHeightChangeReplayDelayTimeout=setTimeout((()=>{this.isDestroyed()?this.debug.log("JbPro","wcsWidthOrHeightChange and widthOrHeightChangeReplayDelayTime but player is destroyed"):this.play(e,s).then((()=>{this.debug.log("JbPro","wcsWidthOrHeightChange and reset player and play success")})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.wcsWidthOrHeightChange,i,t),this.debug.error("JbPro","wcsWidthOrHeightChange and reset player and play error",e)}))}),1e3*this._opt.widthOrHeightChangeReplayDelayTime):this.play(e,s).then((()=>{this.debug.log("JbPro","wcsWidthOrHeightChange and reset player and play success")})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.wcsWidthOrHeightChange,i,t),this.debug.error("JbPro","wcsWidthOrHeightChange and reset player and play error",e)}))})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.wcsWidthOrHeightChange,i,t),this.debug.error("JbPro","wcsWidthOrHeightChange and _resetPlayer error",e)}))}else{const s=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(s).then((()=>{this.emit(lt.playFailedAndPaused,ut.wcsWidthOrHeightChange,i,t),this.debug.error("JbPro","wcsWidthOrHeightChange and _resetPlayer error",e)})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.wcsWidthOrHeightChange,i,t),this.debug.error("JbPro","wcsWidthOrHeightChange error and pause error",e)}))}})),this.player.once(ut.wasmDecodeError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","wasmDecodeError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.wasmDecodeError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.wasmDecodeErrorReplay){this.debug.log("JbPro","wasm decode error and reset player and play");const i=this._opt.url,s=this._opt.playOptions;let r={};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","wasm decode error and reset player and play success")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.wasmDecodeError,t,e),this.debug.error("JbPro","wasm decode error and reset player and play error",i)}))})).catch((()=>{this.emit(lt.playFailedAndPaused,ut.wasmDecodeError,t,e),this.debug.error("JbPro","wasm decode error and _resetPlayer error")}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.wasmDecodeError,t,e),this.debug.log("JbPro","wasm decode error and wasmDecodeErrorReplay is false")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.wasmDecodeError,t,e),this.debug.error("JbPro","wasm decode error and pause error",i)}))}})),this.player.once(ut.simdDecodeError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","simdDecodeError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.simdDecodeError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.simdDecodeErrorReplay){this.debug.log("JbPro",`simdDecodeError error simdDecodeErrorReplayType is ${this.player._opt.simdDecodeErrorReplayType} and reset player and play`);const i=this._opt.url,s=this._opt.playOptions;let r={};this.player._opt.simdDecodeErrorReplayType===j&&(r={useSIMD:!1}),this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","simdDecodeError and reset player and play success")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.simdDecodeError,t,e),this.debug.error("JbPro","simdDecodeError and reset player and play error",i)}))})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.simdDecodeError,t,e),this.debug.error("JbPro","simdDecodeError and _resetPlayer error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.simdDecodeError,t,e),this.debug.error("JbPro","simdDecodeError and simdDecodeErrorReplay is false")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.simdDecodeError,t,e),this.debug.error("JbPro","simdDecodeError error and pause error",i)}))}})),this.player.once(ut.wasmWidthOrHeightChange,(t=>{if(this.isDestroyed())return void this.debug.log("JbPro","wasmWidthOrHeightChange but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.wasmWidthOrHeightChange,t));const i=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.widthOrHeightChangeReplay){this.debug.log("JbPro","wasmWidthOrHeightChange and reset player and play");const e=this._opt.url,s=this._opt.playOptions;let r={};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,i,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this._opt.widthOrHeightChangeReplayDelayTime>0?this.widthOrHeightChangeReplayDelayTimeout=setTimeout((()=>{this.isDestroyed()?this.debug.log("JbPro","wasmWidthOrHeightChange and widthOrHeightChangeReplayDelayTime but player is destroyed"):this.play(e,s).then((()=>{this.debug.log("JbPro","wasmWidthOrHeightChange and reset player and play success")})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.wasmWidthOrHeightChange,i,t),this.debug.error("JbPro","wasmWidthOrHeightChange and reset player and play error",e)}))}),1e3*this._opt.widthOrHeightChangeReplayDelayTime):this.play(e,s).then((()=>{this.debug.log("JbPro","wasmWidthOrHeightChange and reset player and play success")})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.wasmWidthOrHeightChange,i,t),this.debug.error("JbPro","wasmWidthOrHeightChange and reset player and play error",e)}))})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.wasmWidthOrHeightChange,i,t),this.debug.error("JbPro","wasmWidthOrHeightChange and _resetPlayer error",e)}))}else{const s=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(s).then((()=>{this.emit(lt.playFailedAndPaused,ut.wasmWidthOrHeightChange,i,t),this.debug.error("JbPro","wasmWidthOrHeightChange and _resetPlayer error",e)})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.wasmWidthOrHeightChange,i),this.debug.error("JbPro","wasmWidthOrHeightChange error and pause error",e)}))}})),this.player.once(ut.wasmUseVideoRenderError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","wasmUseVideoRenderError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.wasmUseVideoRenderError,e)),this.debug.log("JbPro","wasmUseVideoRenderError and reset player and play");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({useVideoRender:!1,useCanvasRender:!0}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","wasmUseVideoRenderError and reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.wasmUseVideoRenderError,{},e),this.debug.error("JbPro","wasmUseVideoRenderError and reset player and play error",t)}))})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.wasmUseVideoRenderError,{},e),this.debug.error("JbPro","wasmUseVideoRenderError and _resetPlayer error",t)}))})),this.player.once(ut.videoElementPlayingFailed,(e=>{if(this.isDestroyed())this.debug.log("JbPro","videoElementPlayingFailed but player is destroyed");else if(this.emit(lt.crashLog,this.getCrashLog(ut.videoElementPlayingFailed,e)),this.player&&this.player._opt.videoElementPlayingFailedReplay){this.debug.log("JbPro",`videoElementPlayingFailed and useMSE is ${this._opt.useMSE} and reset player and play`);const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({useMSE:!1,useVideoRender:!1,useCanvasRender:!0}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","videoElementPlayingFailed and reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.videoElementPlayingFailed,{},e),this.debug.error("JbPro","videoElementPlayingFailed and reset player and play error",t)}))})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.videoElementPlayingFailed,{},e),this.debug.error("JbPro","videoElementPlayingFailed and _resetPlayer error",t)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.videoElementPlayingFailed,{},e),this.debug.error("JbPro","videoElementPlayingFailed and videoElementPlayingFailedReplay is false")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.videoElementPlayingFailed,{},e),this.debug.error("JbPro","videoElementPlayingFailed and _pause error",t)}))}})),this.player.once(ut.simdH264DecodeVideoWidthIsTooLarge,(e=>{if(this.isDestroyed())this.debug.log("JbPro","simdH264DecodeVideoWidthIsTooLarge but player is destroyed");else if(this.emit(lt.crashLog,this.getCrashLog(ut.simdH264DecodeVideoWidthIsTooLarge,e)),this.player&&this.player._opt.simdH264DecodeVideoWidthIsTooLargeReplay){this.debug.log("JbPro","simdH264DecodeVideoWidthIsTooLarge and reset player and play");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({useSIMD:!1}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","simdH264DecodeVideoWidthIsTooLarge and reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.simdH264DecodeVideoWidthIsTooLarge,{},e),this.debug.error("JbPro","simdH264DecodeVideoWidthIsTooLarge and reset player and play error",t)}))})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.simdH264DecodeVideoWidthIsTooLarge,{},e),this.debug.error("JbPro","simdH264DecodeVideoWidthIsTooLarge and _resetPlayer error",t)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.simdH264DecodeVideoWidthIsTooLarge,{},e),this.debug.error("JbPro","simdH264DecodeVideoWidthIsTooLarge and simdDecodeErrorReplay is false")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.simdH264DecodeVideoWidthIsTooLarge,{},e),this.debug.error("JbPro","simdH264DecodeVideoWidthIsTooLarge and pause error",t)}))}})),this.player.once(lt.networkDelayTimeout,(e=>{if(this.player._opt.networkDelayTimeoutReplay){if(this.isDestroyed())return void this.debug.log("JbPro","networkDelayTimeout but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(lt.networkDelayTimeout,e));const t=this._getVideoLastIframeInfo();this.debug.log("JbPro","network delay time out and reset player and play");const i=this._opt.url,s=this._opt.playOptions;let r={};this.player&&this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","wasm decode error and reset player and play success")})).catch((i=>{this.emit(lt.playFailedAndPaused,lt.networkDelayTimeout,t,e),this.debug.error("JbPro","wasm decode error and reset player and play error",i)}))})).catch((()=>{this.emit(lt.playFailedAndPaused,lt.networkDelayTimeout,t,e),this.debug.error("JbPro","wasm decode error and _resetPlayer error")}))}})),this.player.once(lt.flvDemuxBufferSizeTooLarge,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","flvDemuxBufferSizeTooLarge but player is destroyed");const t=this._getVideoLastIframeInfo();if(this.player._opt.flvDemuxBufferSizeTooLargeReplay){this.emit(lt.crashLog,this.getCrashLog(lt.flvDemuxBufferSizeTooLarge,e)),this.debug.log("JbPro","flv Demux Buffer Size Too Large and flvDemuxBufferSizeTooLargeReplay = true and reset player and play");const i=this._opt.url,s=this._opt.playOptions;let r={};this.player&&this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log(this.TAG_NAME,"flv Demux Buffer Size Too Large and reset player and play success")})).catch((i=>{this.emit(lt.playFailedAndPaused,lt.flvDemuxBufferSizeTooLarge,t,e),this.debug.error(this.TAG_NAME,"flv Demux Buffer Size Too Large and reset player and play error",i)}))})).catch((()=>{this.emit(lt.playFailedAndPaused,lt.flvDemuxBufferSizeTooLarge,t,e),this.debug.error(this.TAG_NAME,"flv Demux Buffer Size Too Large and _resetPlayer error")}))}else if(this._opt.flvDemuxBufferSizeTooLargeEmitFailed){this.debug.log(this.TAG_NAME,"flv Demux Buffer Size Too Large and flvDemuxBufferSizeTooLargeEmitFailed = true and pause player");const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.flvDemuxBufferSizeTooLarge,t,e)})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.flvDemuxBufferSizeTooLarge,t,e),this.debug.error(this.TAG_NAME,"flv Demux Buffer Size Too Large",i)}))}})),this.player.once(ut.fetchError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","fetchError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.fetchError,e));const t=this._getVideoLastIframeInfo(),i=this._isNeedNetworkDisconnectReplay();if(this.player._opt.streamErrorReplay||i){i?this.debug.log("JbPro","fetch error and network is disconnect and reset player and play"):this.debug.log("JbPro",`fetch error and streamErrorReplay is true and _streamErrorReplayTimes is ${this._streamErrorReplayTimes}, streamErrorReplayDelayTime is ${this._opt.streamErrorReplayDelayTime}, next replay`);let s={};this.player._opt.replayUseLastFrameShow&&(s=Object.assign({},s,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(s.isNotMute=!0);const r=this._opt.playOptions,a=this._opt.url,o=i?1:this._opt.streamErrorReplayDelayTime;this._resetPlayer(s).then((()=>{this.streamErrorReplayDelayTimeout=setTimeout((()=>{if(this.isDestroyed())this.debug.log("JbPro","fetch error and _resetPlayer but player is destroyed and return");else{if(this.network.isOffline())return this.debug.log("JbPro","fetch error and network is offline and wait network online to play , so return"),this._isNetworkOfflinePaused=!0,void(this._isNetworkOfflinePausedAndNextPlayConfig={url:a,options:r,type:ut.fetchError});this._streamErrorReplayTimes++,this.play(a,r).then((()=>{this.debug.log("JbPro","fetch error and reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.fetchError,{},e),this.debug.error("JbPro","fetch error and reset player and play error",t)}))}}),1e3*o)})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.fetchError,{},e),this.debug.error("JbPro","fetch error and _resetPlayer error",t)}))}else{this.debug.log("JbPro","fetch error and pause player");const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.fetchError,t,e)})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.fetchError,t,e),this.debug.error("JbPro","fetch error and pause",i)}))}})),this.player.once(lt.streamEnd,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","streamEnd but player is destroyed and return");this.emit(lt.crashLog,this.getCrashLog(lt.streamEnd,e));const t=this._getVideoLastIframeInfo(),i=this._checkIsMeaningfulRetry(Br),s=""+e=="1006"&&this.player._opt.websocket1006ErrorReplay,r=s&&i,a=this.player._opt.streamEndReplay,o=this._isNeedNetworkDisconnectReplay();if(r||a||o){o?this.debug.log("JbPro","streamEnd and network is disconnect and reset player and play"):r?this.debug.log("JbPro",`streamEnd and websocket1006ErrorReplay is true and error is 1006 and _websocket1006ErrorReplayTimes is ${this._websocket1006ErrorReplayTimes} , delay ${this._opt.websocket1006ErrorReplayDelayTime}s reset player and play`):this.debug.log("JbPro",`streamEnd and isStreamEndReplay is true and and _streamEndReplayTimes is ${this._streamEndReplayTimes} , delay ${this._opt.streamEndReplayDelayTime}s reset player and play`);const i=this._opt.playOptions,s=this._opt.url;this._websocket1006ErrorRetryLog.push(ha());let a={};this.player._opt.replayUseLastFrameShow&&(a=Object.assign({},a,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(a.isNotMute=!0);let n=r?this._opt.websocket1006ErrorReplayDelayTime:this._opt.streamEndReplayDelayTime;o&&(n=1),this._initLoadingBackgroundForIOS(t),this._resetPlayer(a).then((()=>{this.streamEndReplayDelayTimeout=setTimeout((()=>{if(this._removeLoadingBackgroundForIOS(),this.isDestroyed())o?this.debug.log("JbPro","streamEnd and network is disconnect and _resetPlayer() but player is destroyed and return"):r?this.debug.log("JbPro","streamEnd and 1006 error and _resetPlayer() but player is destroyed and return"):this.debug.log("JbPro","streamEnd and _resetPlayer() but player is destroyed and return");else{if(this.network.isOffline())return r?this.debug.log("JbPro","streamEnd and 1006 error network is offline and wait network online to play , so return"):this.debug.log("JbPro","streamEnd and network is offline and wait network online to play , so return"),this._isNetworkOfflinePaused=!0,void(this._isNetworkOfflinePausedAndNextPlayConfig={url:s,options:i,type:r?ut.websocket1006Error:ut.streamEnd});r?this._websocket1006ErrorReplayTimes++:this._streamEndReplayTimes++,this.play(s,i).then((()=>{r?this.debug.log("JbPro","streamEnd and 1006 error and reset player and play success"):this.debug.log("JbPro","streamEnd and reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.streamEnd,{},e),r?this.debug.error("JbPro","streamEnd and 1006 error and reset player and play error",t):this.debug.error("JbPro","streamEnd and reset player and play error",t)}))}}),1e3*n)})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.streamEnd,{},e),r?this.debug.error("JbPro","streamEnd and 1006 and _resetPlayer error",t):this.debug.error("JbPro","streamEnd and _resetPlayer error",t)}))}else{s?this.debug.log("JbPro","streamEnd pause player "+(Ao(i)?"and is not meaningful retry":"")):this.debug.log("JbPro","streamEnd pause player");const r=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(r).then((()=>{this.emit(lt.playFailedAndPaused,lt.streamEnd,t,e)})).catch((i=>{this.emit(lt.playFailedAndPaused,lt.streamEnd,t,e),this.debug.error("JbPro","streamEnd pause",i)}))}})),this.player.once(ut.websocketError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","websocketError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.websocketError,e));const t=this._getVideoLastIframeInfo(),i=this._isNeedNetworkDisconnectReplay();if(this.player._opt.streamErrorReplay||i){i?this.debug.log("JbPro","websocketError error and network is disconnect and reset player and play"):this.debug.log("JbPro",`websocketError error and streamErrorReplay is true and _streamErrorReplayTimes is ${this._streamErrorReplayTimes} and streamErrorReplayDelayTime is ${this._opt.streamErrorReplayDelayTime}, next replay`);let s={};this.player._opt.replayUseLastFrameShow&&(s=Object.assign({},s,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(s.isNotMute=!0);const r=this._opt.playOptions,a=this._opt.url,o=i?1:this._opt.streamErrorReplayDelayTime;this._resetPlayer(s).then((()=>{this.streamErrorReplayDelayTimeout=setTimeout((()=>{if(this.isDestroyed())i?this.debug.log("JbPro","websocketError error and network is disconnect and _resetPlayer() but player is destroyed and return"):this.debug.log("JbPro","websocketError error and _resetPlayer() but player is destroyed and return");else{if(this.network.isOffline())return this.debug.log("JbPro","websocketError error and network is offline and wait network online to play , so return"),this._isNetworkOfflinePaused=!0,void(this._isNetworkOfflinePausedAndNextPlayConfig={url:a,options:r,type:ut.websocketError});this._streamErrorReplayTimes++,this.play(a,r).then((()=>{this.debug.log("JbPro","websocketError error and reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.fetchError,{},e),this.debug.error("JbPro","websocketError error and reset player and play error",t)}))}}),1e3*o)})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.fetchError,{},e),this.debug.error("JbPro","websocketError error and _resetPlayer error",t)}))}else{this.debug.log("JbPro","websocketError and pause player");const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.websocketError,t,e)})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.websocketError,t,e),this.debug.error("JbPro","websocketError and pause",i)}))}})),this.player.once(ut.webrtcError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","webrtcError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.webrtcError,e));const t=this._getVideoLastIframeInfo();this.debug.log("JbPro","webrtcError and pause player");const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.webrtcError,t,e)})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.webrtcError,t,e),this.debug.error("JbPro","webrtcError and pause",i)}))})),this.player.once(ut.hlsError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","hlsError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.hlsError,e));const t=this._getVideoLastIframeInfo();this.debug.log("JbPro","hlsError and pause player");const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.hlsError,t,e)})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.hlsError,t,e),this.debug.error("JbPro","hlsError and pause",i)}))})),this.player.once(ut.aliyunRtcError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","aliyunRtcError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.aliyunRtcError,e));const t=this._getVideoLastIframeInfo();this.debug.log("JbPro","aliyunRtcError and pause player");const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.aliyunRtcError,t,e)})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.aliyunRtcError,t,e),this.debug.error("JbPro","aliyunRtcError and pause",i)}))})),this.player.once(ut.decoderWorkerInitError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","decoderWorkerInitError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.decoderWorkerInitError,e)),this.debug.log("JbPro","decoderWorkerInitError and pause player");const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.decoderWorkerInitError,{},e)})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.decoderWorkerInitError,{},e),this.debug.error("JbPro","decoderWorkerInitError and pause",t)}))})),this.player.once(ut.videoElementPlayingFailedForWebrtc,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","videoElementPlayingFailedForWebrtc but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.videoElementPlayingFailedForWebrtc,e)),this.debug.log("JbPro","videoElementPlayingFailedForWebrtc and pause player");const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.videoElementPlayingFailedForWebrtc,{},e)})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.videoElementPlayingFailedForWebrtc,{},e),this.debug.error("JbPro","videoElementPlayingFailedForWebrtc and pause",t)}))})),this.player.once(ut.videoInfoError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","videoInfoError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.videoInfoError,e)),this.debug.log("JbPro","videoInfoError and pause player");const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.videoInfoError,{},e)})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.videoInfoError,{},e),this.debug.error("JbPro","videoInfoError and pause",t)}))})),this.player.once(lt.webrtcStreamH265,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","webrtcStreamH265 but player is destroyed");this.debug.log("JbPro","webrtcStreamH265 and reset player and play");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({isWebrtcH265:!0}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","webrtcStreamH265 and reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,lt.webrtcStreamH265,{},e),this.debug.error("JbPro","webrtcStreamH265 and reset player and play error",t)}))})).catch((()=>{this.emit(lt.playFailedAndPaused,lt.webrtcStreamH265,{},e),this.debug.error("JbPro","webrtcStreamH265 and _resetPlayer error")}))})),this.player.on(lt.delayTimeout,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","delay timeout but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(lt.delayTimeout,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.heartTimeoutReplay&&(this._heartTimeoutReplayTimes<this.player._opt.heartTimeoutReplayTimes||-1===this.player._opt.heartTimeoutReplayTimes)){if(this.debug.log("JbPro",`delay timeout replay time is ${this._heartTimeoutReplayTimes} and heartTimeoutReplayTimes is ${this.player._opt.heartTimeoutReplayTimes}`),this.isDestroyed())return void(this.debug&&this.debug.warn("JbPro","delay timeout replay but player is destroyed"));this._heartTimeoutReplayTimes+=1;const i=this._opt.url,s=this._opt.playOptions;let r={};(this.player._opt.heartTimeoutReplayUseLastFrameShow||this.player._opt.replayUseLastFrameShow)&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{if(this._isNeedNetworkDisconnectReplay())return this.debug.log("JbPro","delayTimeout and network is offline and wait network online to play , so return"),this._isNetworkOfflinePaused=!0,void(this._isNetworkOfflinePausedAndNextPlayConfig={url:i,options:s,type:lt.delayTimeout});this.play(i,s).then((()=>{})).catch((i=>{this.emit(lt.playFailedAndPaused,lt.delayTimeout,t,e),this.debug.error("JbPro","delay timeout replay error",i)}))})).catch((i=>{this.emit(lt.playFailedAndPaused,lt.delayTimeout,t,e),this.debug.error("JbPro","delay timeout _resetPlayer error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,lt.delayTimeout,t,e),this.player&&(this.emit(lt.delayTimeoutRetryEnd),this.emit(lt.playFailedAndPaused,lt.delayTimeoutRetryEnd)),this.debug.warn("JbPro",`delayTimeoutRetryEnd and\n opt.heartTimeout is ${this.player&&this.player._opt.heartTimeout} and\n opt.heartTimeoutReplay is ${this.player&&this.player._opt.heartTimeoutReplay} and\n opt.heartTimeoutReplayTimes is ${this.player&&this.player._opt.heartTimeoutReplayTimes},and\n local._heartTimeoutReplayTimes is ${this._heartTimeoutReplayTimes}`)})).catch((i=>{this.emit(lt.playFailedAndPaused,lt.delayTimeout,t,e),this.debug.error("JbPro","delay timeout and pause error",i)}))}})),this.player.on(lt.loadingTimeout,(e=>{if(this.emit(lt.crashLog,this.getCrashLog(lt.loadingTimeout,e)),this.isDestroyed())this.debug.log("JbPro","loading timeout but player is destroyed");else if(this.player&&this.player._opt.loadingTimeoutReplay&&(this._loadingTimeoutReplayTimes<this.player._opt.loadingTimeoutReplayTimes||-1===this.player._opt.loadingTimeoutReplayTimes)){if(this.debug.log("JbPro",`loading timeout and\n replay time is ${this._loadingTimeoutReplayTimes} and\n loadingTimeoutReplayTimes is ${this.player._opt.loadingTimeoutReplayTimes}`),this.isDestroyed())return void(this.debug&&this.debug.warn("JbPro","delay timeout replay but player is destroyed"));this._loadingTimeoutReplayTimes+=1;const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer().then((()=>{if(this._isNeedNetworkDisconnectReplay())return this.debug.log("JbPro","loadingTimeout and network is offline and wait network online to play , so return"),this._isNetworkOfflinePaused=!0,void(this._isNetworkOfflinePausedAndNextPlayConfig={url:t,options:i,type:lt.loadingTimeout});this.play(t,i).then((()=>{})).catch((t=>{this.emit(lt.playFailedAndPaused,lt.loadingTimeout,{},e),this.debug.error("JbPro","loading timeout replay error",t)}))})).catch((t=>{this.emit(lt.playFailedAndPaused,lt.loadingTimeout,{},e),this.debug.error("JbPro","loading timeout _resetPlayer error",t)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,lt.loadingTimeout,{},e),this.player&&(this.emit(lt.loadingTimeoutRetryEnd),this.emit(lt.playFailedAndPaused,lt.loadingTimeoutRetryEnd,{},e)),this.debug.log("JbPro",`loadingTimeoutRetryEnd and\n opt.loadingTimeout is ${this.player&&this.player._opt.loadingTimeout} and\n opt.loadingTimeoutReplay is ${this.player&&this.player._opt.loadingTimeoutReplay} and\n local._loadingTimeoutReplayTimes time is ${this._loadingTimeoutReplayTimes} and\n opt.loadingTimeoutReplayTimes is ${this.player&&this.player._opt.loadingTimeoutReplayTimes}`)})).catch((t=>{this.emit(lt.playFailedAndPaused,lt.loadingTimeout,{},e),this.debug.error("JbPro","loading timeout and pause error",t)}))}})),this._hasLoaded()?this.player.play(t,i).then((()=>{s()})).catch((e=>{this.debug.error("JbPro","_hasLoaded() and play error",e),this.emit(lt.crashLog,this.getCrashLog("_hasLoaded() and play error",e)),this.player&&this.player.pause().then((()=>{r(e)})).catch((e=>{r(e),this.debug.error("JbPro","_hasLoaded() and play error and next pause error",e)}))})):this.player.once(lt.decoderWorkerInit,(()=>{this.player.play(t,i).then((()=>{s()})).catch((e=>{this.debug.error("JbPro","decoderWorkerInit and play error",e),this.emit(lt.crashLog,this.getCrashLog("decoderWorkerInit and play error",e)),this.player&&this.player.pause().then((()=>{r(e)})).catch((e=>{r(e),this.debug.error("JbPro","decoderWorkerInit and play error and next pause error",e)}))}))}))},$=this.player.getOption(),H=_&&Ao(this._opt.supportHls265),V=m&&Ao(this._opt.isWebrtcH265),q=_&&!!so(),K=_&&$.demuxUseWorker;if(H||V||g||a||S||q||K)this.debug.log("JbPro",`need reset player and\n isOldHls is ${H} and isOldWebrtc is ${V} and\n isAliyunRtc is ${g} and\n needResetPlayer(url change) is ${a} and\n isMpeg4 is ${S} and\n isHlsCanVideoPlay is ${q} and\n isHlsButDemuxUseWorker is ${K}`),this._resetPlayer({protocol:N,demuxType:G,isHls:_,isWebrtc:m,isWebrtcForZLM:U,isWebrtcForSRS:F,isWebrtcForOthers:O,isAliyunRtc:g,cryptoKey:i.cryptoKey||"",cryptoIV:i.cryptoIV||"",url:t,playOptions:i}).then((()=>{z()})).catch((e=>{r("reset player error")}));else{const e={protocol:N,demuxType:G,isHls:_,isWebrtc:m,isAliyunRtc:g,isFlv:this._opt.isFlv,isFmp4:this._opt.isFmp4,isMpeg4:this._opt.isMpeg4,isNakedFlow:this._opt.isNakedFlow,isTs:this._opt.isTs,cryptoKey:i.cryptoKey||"",cryptoIV:i.cryptoIV||""};this._opt.isNakedFlow&&(e.mseDecodeAudio=!1),this.player.updateOption(e),i.cryptoKey&&i.cryptoIV&&this.player.decoderWorker&&(this.player.decoderWorker.updateWorkConfig({key:"cryptoKey",value:i.cryptoKey}),this.player.decoderWorker.updateWorkConfig({key:"cryptoIV",value:i.cryptoIV})),z()}}))}_resetDemuxType(e){this._opt.isFlv=!1,this._opt.isFmp4=!1,this._opt.isMpeg4=!1,this._opt.isNakedFlow=!1,this._opt.isHls=!1,this._opt.isWebrtc=!1,this._opt.isWebrtcForZLM=!1,this._opt.isWebrtcForSRS=!1,this._opt.isWebrtcForOthers=!1,this._opt.isAliyunRtc=!1,this._opt.isTs=!1,e&&(this._opt[e]=!0),"isFmp4"!==e&&(this._opt.isFmp4Private=!1)}resize(){this.debug.log("JbPro","resize()"),this.player&&this.player.resize()}setBufferTime(e){this.debug.log("JbPro",`setBufferTime() ${e}`),(e=Number(e))>10&&this.debug.warn("JbPro",`setBufferTime() buffer time is ${e} second, is too large, video will show blank screen until cache ${e} second buffer data`);const t=1e3*e;this._opt.videoBuffer=t,this.player?this.player.updateOption({videoBuffer:t},!0):this.debug.warn("JbPro","setBufferTime() player is null")}setBufferDelayTime(e){this.debug.log("JbPro",`setBufferDelayTime() ${e}`),(e=Number(e))<.2&&this.debug.warn("JbPro",`setBufferDelayTime() buffer time delay is ${e} second, is too small`);const t=1e3*(e=ca(e,.2,100));this._opt.videoBufferDelay=t,this.player?this.player.updateOption({videoBufferDelay:t},!0):this.debug.warn("JbPro","setBufferDelayTime() player is null")}setRotate(e){this.debug.log("JbPro",`setRotate() ${e}`),e=parseInt(e,10);this._opt.rotate!==e&&-1!==[0,90,180,270].indexOf(e)?(this._opt.rotate=e,this.player?(this.player.updateOption({rotate:e}),this.resize()):this.debug.warn("JbPro","setRotate() player is null")):this.debug.warn("JbPro",`setRotate() rotate is ${e} and this._opt.rotate is ${this._opt.rotate}`)}setMirrorRotate(e){this.debug.log("JbPro",`setMirrorRotate() ${e}`);e||(e="none"),this._opt.mirrorRotate!==e&&-1!==["none","level","vertical"].indexOf(e)?(this._opt.mirrorRotate=e,this.player?(this.player.updateOption({mirrorRotate:e}),this.resize()):this.debug.warn("JbPro","setMirrorRotate() player is null")):this.debug.warn("JbPro",`setMirrorRotate() mirrorRotate is ${e} and this._opt.mirrorRotate is ${this._opt.mirrorRotate}`)}setAspectRatio(e){this.debug.log("JbPro",`setAspectRatio() ${e}`);e||(e="default"),this._opt.aspectRatio!==e&&-1!==["default","4:3","16:9"].indexOf(e)?(this._opt.aspectRatio=e,this.player?(this.player.updateOption({aspectRatio:e}),this.resize()):this.debug.warn("JbPro","setAspectRatio() player is null")):this.debug.warn("JbPro",`setAspectRatio() aspectRatio is ${e} and this._opt.aspectRatio is ${this._opt.mirrorRotate}`)}hasLoaded(){return!0}_hasLoaded(){return this.player&&this.player.loaded||!1}setKeepScreenOn(){this.debug.log("JbPro","setKeepScreenOn()"),this._opt.keepScreenOn=!0,this.player?this.player.updateOption({keepScreenOn:!0}):this.debug.warn("JbPro","setKeepScreenOn() player is not ready")}setFullscreen(e){this.debug.log("JbPro",`setFullscreen() ${e}`);const t=!!e;this.player?this.player.fullscreen!==t?this.player.fullscreen=t:this.debug.warn("JbPro",`setFullscreen() fullscreen is ${t} and this.player.fullscreen is ${this.player.fullscreen}`):this.debug.warn("JbPro","setFullscreen() player is not ready")}setWebFullscreen(e){this.debug.log("JbPro",`setWebFullscreen() ${e}`);const t=!!e;this.player?this.player.webFullscreen=t:this.debug.warn("JbPro","setWebFullscreen() player is not ready")}screenshot(e,t,i,s){return this.debug.log("JbPro",`screenshot() ${e} ${t} ${i} ${s}`),this.player&&this.player.video?this.player.video.screenshot(e,t,i,s):(this.debug.warn("JbPro","screenshot() player is not ready"),null)}screenshotWatermark(e){return new Promise(((t,i)=>{this.debug.log("JbPro","screenshotWatermark()",e),this.player&&this.player.video?this.player.video.screenshotWatermark(e).then((e=>{t(e)})).catch((e=>{i(e)})):(this.debug.warn("JbPro","screenshotWatermark() player is not ready"),i("player is not ready"))}))}startRecord(e,t){return new Promise(((i,s)=>{if(this.debug.log("JbPro",`startRecord() ${e} ${t}`),!this.player)return this.debug.warn("JbPro","startRecord() player is not ready"),s("player is not ready");this.player.playing?(this.player.startRecord(e,t),i()):(this.debug.warn("JbPro","startRecord() player is not playing"),s("not playing"))}))}stopRecordAndSave(e,t){return new Promise(((i,s)=>{this.debug.log("JbPro",`stopRecordAndSave() ${e} ${t}`),this.player&&this.player.recording?this.player.stopRecordAndSave(e,t).then((e=>{i(e)})).catch((e=>{s(e)})):s("not recording")}))}isPlaying(){let e=!1;return this.player&&(e=this.player.isPlaying()),e}isLoading(){return!!this.player&&this.player.loading}isPause(){let e=!1;return this._opt.playType===_?e=!this.isPlaying()&&!this.isLoading():this._opt.playType===w&&this.player&&(e=this.player.playbackPause),e}isPaused(){return this.isPause()}isPlaybackPause(){let e=!1;return this._opt.playType===w&&this.player&&(e=this.player.playbackPause),e}isMute(){let e=!0;return this.player&&(e=this.player.isAudioMute()),e}isRecording(){return this.player&&this.player.recorder&&this.player.recorder.recording||!1}isFullscreen(){let e=!1;return this.player&&(e=this.player.fullscreen),e}isWebFullscreen(){let e=!1;return this.player&&(e=this.player.webFullscreen),e}clearBufferDelay(){this.debug.log("JbPro","clearBufferDelay()"),this.player?this.player.clearBufferDelay():this.debug.warn("JbPro","clearBufferDelay() player is not init")}setNetworkDelayTime(e){this.debug.log("JbPro",`setNetworkDelayTime() ${e}`),(e=Number(e))<1&&this.debug.warn("JbPro",`setNetworkDelayTime() network delay is ${e} second, is too small`);const t=1e3*(e=ca(e,1,100));this._opt.networkDelay=t,this.player?this.player.updateOption({networkDelay:t},!0):this.debug.warn("JbPro","setNetworkDelayTime() player is null")}getDecodeType(){let e="";return this.player&&(e=this.player.getDecodeType()),e}getRenderType(){let e="";return this.player&&(e=this.player.getRenderType()),e}getAudioEngineType(){let e="";return this.player&&(e=this.player.getAudioEngineType()),e}getPlayingTimestamp(){let e=0;return this.player&&(e=this.player.getPlayingTimestamp()),e}getStatus(){let e=_s;return this.player&&(e=this.player.loading?ys:this.player.playing?As:bs),e}getPlayType(){return this.player?this.player._opt.playType:_}togglePerformancePanel(e){this.debug.log("JbPro",`togglePerformancePanel() ${e}`);const t=this.player._opt.showPerformance;let i=!t;Fa(e)&&(i=e),i!==t?this.player?this.player.togglePerformancePanel(i):this.debug.warn("JbPro","togglePerformancePanel() failed, this.player is not init"):this.debug.warn("JbPro",`togglePerformancePanel() failed, showPerformance is prev: ${t} === now: ${i}`)}openZoom(){this.debug.log("JbPro","openZoom()"),this.player?this.player.zooming=!0:this.debug.warn("JbPro","openZoom() failed, this.player is not init")}closeZoom(){this.debug.log("JbPro","closeZoom()"),this.player?this.player.zooming=!1:this.debug.warn("JbPro","closeZoom() failed, this.player is not init")}isZoomOpen(){let e=!1;return this.player&&(e=this.player.zooming),e}toggleZoom(e){this.debug.log("JbPro",`toggleZoom() ${e}`),Fa(e)||(e=!this.isZoomOpen()),yo(e)?this.openZoom():Ao(!1)&&this.closeZoom()}expandZoom(){this.debug.log("JbPro","expandZoom()"),this.player&&this.player.zoom&&this.player.zooming?this.player.zoom.expandPrecision():this.debug.warn("JbPro","expandZoom() failed, zoom is not open or not init")}narrowZoom(){this.debug.log("JbPro","narrowZoom()"),this.player&&this.player.zoom&&this.player.zooming?this.player.zoom.narrowPrecision():this.debug.warn("JbPro","narrowZoom failed, zoom is not open or not init")}getCurrentZoomIndex(){let e=1;return this.player&&this.player.zoom&&(e=this.player.zoom.currentZoom),e}startTalk(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,s)=>{this.debug.log("JbPro","startTalk()",e,t),this._initTalk(t),this.talk.startTalk(e).then((()=>{i(),this.talk.once(lt.talkStreamClose,(()=>{this.debug.warn("JbPro","talk stream close"),this.stopTalk().catch((e=>{}))})),this.talk.once(lt.talkStreamError,(e=>{this.debug.warn("JbPro","talk stream error",e),this.stopTalk().catch((e=>{}))})),this.talk.once(lt.talkStreamInactive,(()=>{this.debug.warn("JbPro","talk stream inactive"),this.stopTalk().catch((e=>{}))}))})).catch((e=>{s(e)}))}))}stopTalk(){return new Promise(((e,t)=>{if(this.debug.log("JbPro","stopTalk()"),!this.talk)return t("stopTalk() talk is not init");this.talk.destroy(),e()}))}getTalkVolume(){return new Promise(((e,t)=>{if(!this.talk)return t("getTalkVolume() talk is not init");e(this.talk.volume)}))}setTalkVolume(e){return new Promise(((t,i)=>{if(this.debug.log("JbPro","setTalkVolume()",e),!this.talk)return i("setTalkVolume() talk is not init");this.talk.setVolume(e/100),t()}))}setNakedFlowFps(e){return new Promise(((t,i)=>{if(this.debug.log("JbPro","setNakedFlowFps()",e),Ua(e))return i("setNakedFlowFps() fps is empty");let s=Number(e);s=ca(s,1,100),this._opt.nakedFlowFps=s,this.player?this.player.updateOption({nakedFlowFps:s}):this.debug.warn("JbPro","setNakedFlowFps() player is null"),t()}))}getCrashLog(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!this.player)return;const i=this.player.getAllStatsData(),s=this.player;let r={url:this._opt.url,playType:s.isPlayback()?"playback":"live",demuxType:s.getDemuxType(),decoderType:s.getDecodeType(),renderType:s.getRenderType(),videoInfo:{encType:"",width:"",height:""},audioInfo:{encType:"",sampleRate:"",channels:""},audioEngine:s.getAudioEngineType(),allTimes:i.pTs,timestamp:ha(),type:e,error:lo(t)||e};if(s.video){const e=s.video.videoInfo||{};r.videoInfo={encType:e.encType||"",width:e.width||"",height:e.height||""}}if(s.audio){const e=s.audio.audioInfo||{};r.audioInfo={encType:e.encType||"",sampleRate:e.sampleRate||"",channels:e.channels||""}}return r}updateDebugLevel(e){this.debug.log("JbPro","updateDebugLevel()",e),e===q||e===K?e!==this.player._opt.debugLevel?(this._opt.debugLevel=e,this.player?this.player.updateOption({debugLevel:e},!0):this.debug.warn("JbPro","updateDebugLevel() player is null")):this.debug.warn("JbPro",`updateDebugLevel() level is same, level: ${e}`):this.debug.warn("JbPro",`updateDebugLevel() level is not valid, level: ${e}`)}updateWatermark(e){this.debug.log("JbPro","updateWatermark()",e),this.player?this.player.updateWatermark(e):this.debug.warn("JbPro","updateWatermark() player is not init")}removeWatermark(){this.debug.log("JbPro","removeWatermark()"),this.player?this.player.removeWatermark():this.debug.warn("JbPro","removeWatermark() player is not init")}updateFullscreenWatermark(e){if(this.debug.log("JbPro","updateFullscreenWatermark()",e),Ka(e)){this._opt.fullscreenWatermarkConfig=e;const t=ja(this.$container,e);if(!t.watermark_txt)return void this.debug.warn("JbPro","fullscreenWatermarkConfig text is empty");this.watermark.load(t)}else this.debug.warn("JbPro",`updateFullscreenWatermark() config is not valid, config: ${e}`)}removeFullscreenWatermark(){this.debug.log("JbPro","removeFullscreenWatermark()"),this.watermark?this.watermark.remove():this.debug.warn("JbPro","removeFullscreenWatermark() watermark is not init")}faceDetectOpen(){this.debug.log("JbPro","faceDetectOpen()"),this.player?this.player.faceDetect(!0):this.debug.warn("JbPro","faceDetectOpen() player is not init")}faceDetectClose(){this.debug.log("JbPro","faceDetectClose()"),this.player?this.player.faceDetect(!1):this.debug.warn("JbPro","faceDetectClose() player is not init")}objectDetectOpen(){this.debug.log("JbPro","objectDetectOpen()"),this.player?this.player.objectDetect(!0):this.debug.warn("JbPro","objectDetectOpen() player is not init")}objectDetectClose(){this.debug.log("JbPro","objectDetectClose()"),this.player?this.player.objectDetect(!1):this.debug.warn("JbPro","objectDetectClose() player is not init")}sendWebsocketMessage(e){this.debug.log("JbPro","sendWebsocketMessage()",e),this.player?this.player.sendWebsocketMessage(e):this.debug.warn("JbPro","sendWebsocketMessage() player is not init")}addContentToCanvas(e){this.debug.log("JbPro","addContentToCanvas()"),this.player?this.player.addContentToCanvas(e):this.debug.warn("JbPro","addContentToCanvas() player is not init")}clearContentToCanvas(){this.debug.log("JbPro","clearContentToCanvas()"),this.player?this.player.addContentToCanvas([]):this.debug.warn("JbPro","clearContentToCanvas() player is not init")}addContentToContainer(e){this.debug.log("JbPro","addContentToContainer()"),this.player?this.player.addContentToContainer(e):this.debug.warn("JbPro","addContentToContainer() player is not init")}clearContentToContainer(){this.debug.log("JbPro","clearContentToContainer()"),this.player?this.player.addContentToContainer([]):this.debug.warn("JbPro","clearContentToContainer() player is not init")}setControlHtml(e){this.debug.log("JbPro","setControlHtml()",e),this.player?this.player.setControlHtml(e):this.debug.warn("JbPro","setControlHtml() player is not init")}clearControlHtml(){this.debug.log("JbPro","clearControlHtml()"),this.player?this.player.clearControlHtml():this.debug.warn("JbPro","clearControlHtml() player is not init")}getVideoInfo(){let e=null;return this.player&&(e=this.player.getVideoInfo()),e}getAudioInfo(){let e=null;return this.player&&(e=this.player.getAudioInfo()),e}setSm4CryptoKey(e){this.debug.log("JbPro","setSm4CryptoKey()",e),32===(e=""+e).length?(this._opt.sm4CryptoKey=e,this.player?this.player.updateOption({sm4CryptoKey:e},!0):this.debug.warn("JbPro","setSm4CryptoKey() player is null")):this.debug.warn("JbPro",`setSm4CryptoKey() key is invalid and length is ${e.length} !== 32`)}setM7sCryptoKey(e){this.debug.log("JbPro","setM7sCryptoKey()",e),e=""+e,this._opt.m7sCryptoKey=e,this.player?this.player.updateOption({m7sCryptoKey:e},!0):this.debug.warn("JbPro","setM7sCryptoKey() player is null")}setXorCryptoKey(e){this.debug.log("JbPro","setXorCryptoKey()",e),e=""+e,this._opt.xorCryptoKey=e,this.player?this.player.updateOption({xorCryptoKey:e},!0):this.debug.warn("JbPro","setXorCryptoKey() player is null")}updateLoadingText(e){this.debug.log("JbPro","updateLoadingText()",e),this.player?this.player.updateLoadingText(e):this.debug.warn("JbPro","updateLoadingText() player is null")}updateIsEmitSEI(e){this.debug.log("JbPro","updateIsEmitSEI()",e),this._opt.isEmitSEI=e,this.player?this.player.updateOption({isEmitSEI:e},!0):this.debug.warn("JbPro","updateIsEmitSEI() player is null")}getPTZCmd(e,t){if(this.debug.log("JbPro","getPTZCmd()",e),e)return this.player?M_({type:e,index:0,speed:t}):void this.debug.warn("JbPro","getPTZCmd() player is null");this.debug.warn("JbPro","getPTZCmd() ptz is null")}downloadTempNakedFlowFile(){return new Promise(((e,t)=>{this.player?(this.player.downloadNakedFlowFile(),e()):t("player is not init")}))}downloadTempFmp4File(){return new Promise(((e,t)=>{this.player?(this.player.downloadFmp4File(),e()):t("player is not init")}))}downloadTempMpeg4File(){return new Promise(((e,t)=>{this.player?(this.player.downloadMpeg4File(),e()):t("player is not init")}))}downloadTempRtpFile(){return new Promise(((e,t)=>{this.talk?(this.talk.downloadRtpFile(),e()):t("talk is not init")}))}downloadMemoryLog(){this.memoryLogger&&this.memoryLogger.download()}_getVideoLastIframeInfo(){const e=this.getVideoInfo()||{},t={loadingBackground:this.screenshot("","png",.92,"base64"),loadingBackgroundWidth:e.width||0,loadingBackgroundHeight:e.height||0};return t.loadingBackground&&t.loadingBackgroundWidth&&t.loadingBackgroundHeight&&(this._tempVideoLastIframeInfo=t),this._tempVideoLastIframeInfo||{}}getExtendBtnList(){this.debug.log("JbPro","getExtendBtnList()");let e=[];return this.player?e=this.player.getExtendBtnList():this.debug.warn("JbPro","getExtendBtnList() player is null"),e}getFlvMetaData(){this.debug.log("JbPro","getFlvMetaData()");let e=null;return this.player?e=this.player.getMetaData():this.debug.warn("JbPro","getFlvMetaData() player is null"),e}updateAiFaceDetectInterval(e){this.debug.log("JbPro","updateAiFaceDetectInterval()",e);const t=1e3*(e=Number(e));this._opt.aiFaceDetectInterval=t,this.player?this.player.updateOption({aiFaceDetectInterval:t}):this.debug.warn("JbPro","updateAiFaceDetectInterval() player is null")}updateAiFaceDetectLevel(e){if(this.debug.log("JbPro","updateAiFaceDetectLevel()",e),!cr[e])return void this.debug.warn("JbPro",`'updateAiFaceDetectLevel() level ${e} is invalid'`);const t=cr[e];this._opt.aiFaceDetectWidth=t,this.player?(this.player.updateOption({aiFaceDetectWidth:t}),this.player.ai&&this.player.ai.updateFaceDetectorConfig({detectWidth:t})):this.debug.warn("JbPro","updateAiFaceDetectLevel() player is null")}updateAiObjectDetectInterval(e){this.debug.log("JbPro","updateAiObjectDetectInterval()",e);const t=1e3*(e=Number(e));this._opt.aiObjectDetectInterval=t,this.player?this.player.updateOption({aiObjectDetectInterval:t}):this.debug.warn("JbPro","updateAiObjectDetectInterval() player is null")}updateAiObjectDetectLevel(e){if(this.debug.log("JbPro","updateAiObjectDetectLevel()",e),!ur[e])return void this.debug.warn("JbPro",`'updateAiObjectDetectLevel() level ${e} is invalid'`);const t=ur[e];this._opt.aiObjectDetectWidth=t,this.player?(this.player.updateOption({aiObjectDetectWidth:t}),this.player.ai&&this.player.ai.updateObjectDetectorConfig({detectWidth:t})):this.debug.warn("JbPro","updateAiObjectDetectLevel() player is null")}setCryptoKeyUrl(e){this.debug.log("JbPro","setCryptoKeyUrl()",e),e&&(this._opt.cryptoKeyUrl=e)}showErrorMessageTips(e){this.debug.log("JbPro","showErrorMessageTips()",e),e&&(this.player?this.player.showTipsMessageByContent(e):this.debug.warn("JbPro","showErrorMessageTips() player is null"))}setPtzPosition(e){this.debug.log("JbPro","setPtzPosition()",e),e&&!qa(e)&&(this.player?this.player.setPtzPosition(e):this.debug.warn("JbPro","setPtzPosition() player is null"))}hideErrorMessageTips(){this.debug.log("JbPro","hideErrorMessageTips()"),this.player?this.player.hideTipsMessage():this.debug.warn("JbPro","hideErrorMessageTips() player is null")}getContainerRect(){return this._getContainerRect()}proxy(e,t,i,s){return this.events.proxy(e,t,i,s)}_checkIsMeaningfulRetry(e){let t=!0,i=[];if(e===Br?i=this._websocket1006ErrorRetryLog:e===Mr?i=this._mseDecodeErrorRetryLog:e===Ur&&(i=this._wcsDecodeErrorRetryLog),this.debug.log(this.TAG_NAME,`_checkIsMeaningfulRetry() type is ${e}, and retryLog is ${i.join(",")}`),i.length>=5){const s=i[0],r=i[i.length-1],a=r-s;a<=1e4&&(this.debug.warn(this.TAG_NAME,`retry type is ${e}, and retry length is ${i.length}, and start is ${s} and end is ${r} and diff is ${a}`),t=!1)}return t}_initLoadingBackgroundForIOS(e){(wa()||Sa())&&e.loadingBackground&&e.loadingBackgroundWidth&&e.loadingBackgroundHeight&&(this.debug.log(this.TAG_NAME,"_initLoadingBackgroundForIOS"),this._initLoadingBg(),"default"===this.player._opt.aspectRatio||ya()?this._doInitLoadingBackground(e):this._doInitLoadingBackgroundForRatio(e))}_doInitLoadingBackground(e){const t=this._getContainerRect();let i=t.height;const s=this.player._opt;if(s.hasControl&&!s.controlAutoHide){i-=s.playType===w?Qt:Yt}let r=t.width,a=i;const o=s.rotate;270!==o&&90!==o||(r=i,a=t.width),this.$loadingBgImage.width=r,this.$loadingBgImage.height=a,this.$loadingBgImage.src=e.loadingBackground;let n=(t.width-r)/2,l=(i-a)/2,d="contain";s.isResize||(d="fill"),s.isFullResize&&(d="none");let h="";"none"===s.mirrorRotate&&o&&(h+=" rotate("+o+"deg)"),"level"===s.mirrorRotate?h+=" rotateY(180deg)":"vertical"===s.mirrorRotate&&(h+=" rotateX(180deg)"),this._opt.videoRenderSupportScale&&(this.$loadingBgImage.style.objectFit=d),this.$loadingBgImage.style.transform=h,this.$loadingBgImage.style.padding="0",this.$loadingBgImage.style.left=n+"px",this.$loadingBgImage.style.top=l+"px",this.$loadingBgImage.complete?Ph(this.$loadingBg,"show"):this.$loadingBgImage.onload=()=>{Ph(this.$loadingBg,"show"),this.$loadingBgImage.onload=null}}_doInitLoadingBackgroundForRatio(e){const t=this.player._opt.aspectRatio.split(":").map(Number),i=this._getContainerRect();let s=i.width,r=i.height;const a=this.player._opt;let o=0;a.hasControl&&!a.controlAutoHide&&(o=a.playType===w?Qt:Yt,r-=o);const n=e.loadingBackgroundWidth,l=e.loadingBackgroundHeight,d=n/l,h=t[0]/t[1];if(this.$loadingBgImage.src=e.loadingBackground,d>h){const e=h*l/n;this.$loadingBgImage.style.width=100*e+"%",this.$loadingBgImage.style.height=`calc(100% - ${o}px)`,this.$loadingBgImage.style.padding=`0 ${(s-s*e)/2}px`}else{const e=n/h/l;this.$loadingBgImage.style.width="100%",this.$loadingBgImage.style.height=`calc(${100*e}% - ${o}px)`,this.$loadingBgImage.style.padding=(r-r*e)/2+"px 0"}this.$loadingBgImage.complete?Ph(this.$loadingBg,"show"):this.$loadingBgImage.onload=()=>{Ph(this.$loadingBg,"show"),this.$loadingBgImage.onload=null}}_initLoadingBg(){if(!this.$loadingBg){const e=document.createElement("div"),t=document.createElement("img");e.className="jb-pro-loading-bg-for-ios",this.$loadingBg=e,this.$loadingBgImage=t,e.appendChild(t),this.$container.appendChild(e)}}_removeLoadingBackgroundForIOS(){if(this.$loadingBg){this.debug.log(this.TAG_NAME,"_removeLoadingBackgroundForIOS()");if(!Fh(this.$loadingBg)){const e=this.$container.querySelector(".jb-pro-loading-bg-for-ios");e&&this.$container&&this.$container.removeChild(e)}this.$loadingBg=null,this.$loadingBgImage=null}}_getContainerRect(){let e={};return this.$container&&(e=this.$container.getBoundingClientRect(),e.width=Math.max(e.width,this.$container.clientWidth),e.height=Math.max(e.height,this.$container.clientHeight)),e}_isNeedNetworkDisconnectReplay(){return this._opt.networkDisconnectReplay&&this.network.isOffline()}}$_.ERROR=ut,$_.EVENTS=dt,window.JessibucaPro=$_,window.JbPro=$_,window.WebPlayerPro=$_;Nh('.jb-pro-multi-container .jb-pro-multi-player-container-v2{overflow:hidden;width:100%;height:100%;position:relative;display:grid;grid-template-columns:repeat(var(--split),1fr);grid-template-rows:repeat(var(--split),1fr)}.jb-pro-multi-container .jb-pro-multi-player-container-v2 .jb-pro-multi-player{overflow:hidden;position:relative;width:100%;height:100%}.jb-pro-multi-container .jb-pro-multi-player-container-v2 .jb-pro-multi-player .jb-pro-multi-player-draw-window{position:absolute;z-index:1;width:calc(100% - 2px);height:calc(100% - 2px);color:#fff;transition:all .25s}.jb-pro-multi-container .jb-pro-multi-player-container-v2 .jb-pro-multi-player .jb-pro-multi-player-video-window{position:absolute;left:1px;top:1px;z-index:2;width:calc(100% - 2px);height:calc(100% - 2px)}.jb-pro-multi-container .jb-pro-multi-player[fullscreen="1"]{grid-column-start:1;grid-column-end:9;grid-row-start:1;grid-row-end:9}.jb-pro-multi-container .jb-pro-multi-layout-6 .jb-pro-multi-player[order="0"]{grid-column-start:1;grid-column-end:3;grid-row-start:1;grid-row-end:3}.jb-pro-multi-container .jb-pro-multi-layout-9 .jb-pro-multi-player[order="0"]{grid-column-start:1;grid-column-end:4;grid-row-start:1;grid-row-end:4}');class H_ extends a{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this._opt={},Object.keys(e).forEach((t=>{if(void 0===e[t])throw new Error(`jb-pro-multi option "${t}" can not be undefined`)}));const t=po(Gs);this._opt=Object.assign({},t,e),this.LOG_TAG="jbProMulti";let i=e.container;if("string"==typeof e.container&&(i=document.querySelector(e.container)),!i)throw new Error("Jb-pro-multi need container option");if("CANVAS"===i.nodeName||"VIDEO"===i.nodeName)throw new Error(`Jb-pro-multi container type can not be ${i.nodeName} type`);i.classList.add("jb-pro-multi-container"),this.maxWindowSize=this._opt.maxSplit*this._opt.maxSplit,this.currentWindowIndex=-1,this.currentWindowUuid=null,this.specialLayoutType=null,this.startDragWindowItem=null,this.windowList=[],this.$container=i,this.debug=new Fr(this),this.events=new xo(this),this._opt.split||(this._opt.split=1),yo(this._opt.draggable)?this._initWindows$2():this._initWindows(),this._innerArrangeWindow(this._opt.split,!0),this._initEvents(),this._handleWindowSelect(0),this._listenFullscreenChange()}destroy(){return new Promise(((e,t)=>{if(this.debug.log(this.LOG_TAG,"destroy()"),this.off(),this.events&&(this.events.destroy(),this.events=null),this.specialLayoutType=null,this.startDragWindowItem=null,this.currentWindowUuid=null,this.currentWindowIndex=-1,this.$container&&(this.$container.classList.remove("jb-pro-multi-container"),this.$container=null),this.windowList){const i=[];this.windowList.forEach((e=>{e.$playerContainerEvents.forEach((e=>{e()})),e.player&&i.push(e.player.destroy())})),Promise.all(i).then((()=>{this.windowList.forEach((e=>{e.player=null})),this.windowList=[],e()})).catch((e=>{t(e)}))}else e();this.debug&&this.debug.log(this.LOG_TAG,"destroy")}))}_createPlayer(e){var t=this;const i=this._findWindowItemIndex(e);e.uuid;const s=this._opt;s.supportDblclickContainerFullscreen&&(s.supportDblclickFullscreen=!1);const r=new $_({...s,isMulti:!0,multiIndex:i,container:e.$player});return Object.keys(dt).forEach((e=>{r.on(dt[e],(function(){for(var s=arguments.length,r=new Array(s),a=0;a<s;a++)r[a]=arguments[a];t.emit(e,i,...r)}))})),r.on(lt.close,(()=>{this.emit(lt.close,i),e.player=null})),r}_initWindows(){let e="";for(let t=0;t<this.maxWindowSize;t++)e+=`\n <div class="jb-pro-multi-player" wid="${t}" style='float: left;position:relative;overflow: hidden; background-color:${this._opt.style.background};'>\n <div class="jb-pro-multi-player-draw-window" wid="${t}" style='position:absolute; z-index: 1; border: 1px solid ${this._opt.style.border};'></div>\n <div class="jb-pro-multi-player-video-window" wid="${t}" style='position:absolute;left: 1px;top:1px; z-index: 2;'></div>\n </div>\n `;const t=`<div class="jb-pro-multi-player-container" style="overflow: hidden;width:100%; height:100%; position: relative;">${e}</div>`;this.$container.innerHTML=t;const i=this.$container.querySelectorAll(".jb-pro-multi-player");for(let e=0;e<this.maxWindowSize;e++){const t=i[e],s=t.querySelector(".jb-pro-multi-player-draw-window"),r=t.querySelector(".jb-pro-multi-player-video-window"),a=Ca();bo(t,"uuid",a),this.windowList[e]={uuid:a,isContainerFullscreen:!1,$playerContainer:t,$playerBorder:s,$player:r,$playerContainerEvents:[],player:null}}}_initWindows$2(){let e="";const t=this._opt.split;for(let t=0;t<this.maxWindowSize;t++)e+=`\n <div class="jb-pro-multi-player" wid="${t}" order='${t}' style='order:${t};background-color:${this._opt.style.background};'>\n <div class="jb-pro-multi-player-draw-window" wid="${t}"></div>\n <div class="jb-pro-multi-player-video-window" wid="${t}"></div>\n </div>\n `;const i=`<div class="jb-pro-multi-player-container-v2" style="--split:${t}">\n ${e}\n </div>`;this.$container.innerHTML=i,this.$multiContainer=this.$container.querySelector(".jb-pro-multi-player-container-v2");const s=this.$container.querySelectorAll(".jb-pro-multi-player");for(let e=0;e<this.maxWindowSize;e++){const t=s[e],i=t.querySelector(".jb-pro-multi-player-draw-window"),r=t.querySelector(".jb-pro-multi-player-video-window"),a=Ca();bo(t,"uuid",a),this.windowList[e]={uuid:a,isContainerFullscreen:!1,$playerContainer:t,$playerBorder:i,$player:r,$playerContainerEvents:[],player:null}}}_initEvents(){const{proxy:e}=this.events;this.windowList.forEach(((t,i)=>{const s=t.$playerContainer,r=e(s,"click",(e=>{const t=_o(s,"uuid"),i=this._findWindowItemIndexByUuid(t);if(this.emit(zs.selected,i,e),this.getSelectedWindowUuid()===t){if(this._getWindowItem(t).isContainerFullscreen)return}1!==this._opt.split&&this._handleWindowSelect(i)})),a=e(s,"dblclick",(e=>{const t=_o(s,"uuid"),i=this._findWindowItemIndexByUuid(t);this.emit(zs.dblSelected,i,e),this._opt.supportDblclickContainerFullscreen&&1!==this._opt.split&&this._handleWindowContainerFullscreen(i)})),o=e(s,"mouseup",(e=>{const t=_o(s,"uuid"),i=this._findWindowItemIndexByUuid(t);this.emit(zs.mouseup,i,e)})),n=e(s,"mouseover",(e=>{const t=_o(s,"uuid"),i=this._findWindowItemIndexByUuid(t);this.emit(zs.mouseover,i,e)})),l=e(s,"mouseout",(e=>{const t=_o(s,"uuid"),i=this._findWindowItemIndexByUuid(t);this.emit(zs.mouseout,i,e)})),d=e(s,"mousedown",(e=>{const t=_o(s,"uuid"),i=this._findWindowItemIndexByUuid(t);this.emit(zs.mousedown,i,e)})),h=e(s,"dragover",(e=>{e.preventDefault()})),c=e(s,"dragenter",(e=>{const t=_o(s,"uuid"),i=this._findWindowItemIndexByUuid(t);this.emit(zs.dragenter,i,e)})),u=e(s,"dragleave",(e=>{const t=_o(s,"uuid"),i=this._findWindowItemIndexByUuid(t);this.emit(zs.dragleave,i,e)})),p=e(s,"drop",(e=>{const t=_o(s,"uuid"),i=this._findWindowItemIndexByUuid(t);if(e.preventDefault(),this._opt.draggable&&this.startDragWindowItem){const e=this.startDragWindowItem.$playerContainer,t=e.style.order;e.style.order=s.style.order,e.setAttribute("order",e.style.order),s.setAttribute("order",t),s.style.order=t,this.debug.log(this.LOG_TAG,`player Drop ${t} -> ${e.style.order}`),this._sortWindows()}this.emit(zs.drop,i,e)}));if(t.$playerContainerEvents=[r,o,n,l,d,a,h,c,u,p],this._opt.draggable){const i=e(s,"dragstart",(e=>{const t=_o(s,"uuid"),i=this._findWindowItemIndexByUuid(t);this._handleWindowSelect(i),this.startDragWindowItem=this._getWindowItem(i),this.emit(zs.dragstart,i,e,s)}));t.$playerContainerEvents.push(i)}if(this._opt.supportMousemoveEvent){const i=e(s,"mousemove",(e=>{const t=_o(s,"uuid"),i=this._findWindowItemIndexByUuid(t);this.emit(zs.mousemove,i,e)}));t.$playerContainerEvents.push(i)}}))}_getContainerRect(){const e=this.$container.getBoundingClientRect();return{width:parseInt(e.width),height:parseInt(e.height)}}_updateWindows(){const e=this._getContainerRect(),t=e.width,i=e.height,s=this._opt.split,r=t%s,a=i%s,o=(t-r-2*s)/s,n=(i-a-2*s)/s,l=(t-r)/s,d=(i-a)/s;let h=this._getCurrentMaxSplit();for(let e=0;e<h;e++){const t=this.windowList[e];t.isContainerFullscreen=!1;const i=t.$playerContainer;i.style.position="relative",i.style.left="auto",i.style.top="auto",i.style.zIndex="auto";const h=t.$playerBorder,c=t.$player,u=o+(e%s==s-1?r:0),p=n+(e+s>=Math.pow(s,2)?a:0),f=l+(e%s==s-1?r:0),m=d+(e+s>=Math.pow(s,2)?a:0);i.style.width=f+"px",i.style.height=m+"px",i.style.display="block",c.style.width=u+"px",c.style.height=p+"px",c.style.display="block",h.style.width=u+"px",h.style.height=p+"px",h.style.display="block",t.player&&t.player.resize()}if(this.specialLayoutType){const e=this.windowList[0],t=e.$playerContainer,i=e.$player,s=e.$playerBorder,r=t.style.width.replace("px",""),a=t.style.height.replace("px",""),o=i.style.width.replace("px",""),n=i.style.height.replace("px","");let l,d,c,u;this.specialLayoutType===$s?(l=2*r,d=2*a,c=2*o+2,u=2*n+2):this.specialLayoutType===Hs&&(l=3*r,d=3*a,c=3*o+4,u=3*n+4),t.style.width=l+"px",t.style.height=d+"px",i.style.width=c+"px",i.style.height=u+"px",s.style.width=c+"px",s.style.height=u+"px",e.player&&e.player.resize(),h=this._getSpecialMaxSplit()}for(let e=h;e<this.maxWindowSize;e++){const t=this.windowList[e];t.player&&(t.player.destroy(),t.player=null),t.$playerContainer.style.display="none",t.$playerContainer.style.width="0",t.$playerContainer.style.height="0",t.$player.style.display="none",t.$playerBorder.style.display="none"}if(1===this._opt.split){this.windowList[0].$playerBorder.style.display="none"}}_updateWindows$2(){const e=this._opt.split;let t=this._getCurrentMaxSplit();if(this.$multiContainer){const t="jb-pro-multi-layout-6",i="jb-pro-multi-layout-9";this.$multiContainer.classList.remove(t,i),this.specialLayoutType===$s?this.$multiContainer.classList.add(t):this.specialLayoutType===Hs&&this.$multiContainer.classList.add(i),this.$multiContainer.style.setProperty("--split",`${e}`)}this._sortWindows();for(let e=t;e<this.maxWindowSize;e++){const t=this.windowList[e];t&&t.player&&(t.player.destroy(),t.player=null)}if(1===this._opt.split){this.windowList[0].$playerBorder.style.display="none"}this.windowList.forEach((e=>{e.$playerContainer.draggable=this._opt.split>1}))}_sortWindows(){const e=[];for(let t=0;t<this.maxWindowSize;t++){const i=this.windowList[t];e[i.$playerContainer.style.order]=i}this.windowList=e}_handleWindowSelect(e){const t=this._getWindowItem(e);t?(this.currentWindowIndex=this._findWindowItemIndex(t),this.currentWindowUuid=t.uuid,this.windowList.length>1&&(this.windowList.forEach((e=>{t.$playerBorder.style.display="block",e.$playerBorder.style.border=`1px solid ${this._opt.style.border}`})),this._opt.showSelectedBorder&&(t.$playerBorder.style.border=`1px solid ${this._opt.style.borderSelect}`))):this.debug.warn(this.LOG_TAG,`_handleWindowSelect() ${e} is not exist`),1===this._opt.split&&(t.$playerBorder.style.display="none")}_handleWindowContainerFullscreen(e,t){const i=this._getWindowItem(e);if(i){if(Fa(t)&&t===i.isContainerFullscreen)return;if(this._opt.draggable)i.isContainerFullscreen?(i.$playerContainer.setAttribute("fullscreen","0"),i.$playerContainer.style.fullscreen="0"):(i.$playerContainer.setAttribute("fullscreen","1"),i.$playerContainer.style.fullscreen="1");else if(i.isContainerFullscreen)i.$playerContainer.style.position="relative",i.$playerContainer.style.left="auto",i.$playerContainer.style.top="auto",i.$playerContainer.style.zIndex="auto",i.$playerContainer.style.width=i.prevInfo.playerContainerWidth,i.$playerContainer.style.height=i.prevInfo.playerContainerHeight,i.$player.style.width=i.prevInfo.playerWidth,i.$player.style.height=i.prevInfo.playerHeight,this.getSelectedWindowUuid()===i.uuid&&(i.$playerBorder.style.display="block");else{const e=this._getContainerRect(),t=e.width,s=e.height;i.prevInfo={playerContainerWidth:i.$playerContainer.style.width,playerContainerHeight:i.$playerContainer.style.height,playerWidth:i.$player.style.width,playerHeight:i.$player.style.height},i.$playerContainer.style.position="absolute",i.$playerContainer.style.top="0",i.$playerContainer.style.left="0",i.$playerContainer.style.zIndex="10",i.$playerContainer.style.width=t+"px",i.$playerContainer.style.height=s+"px",i.$player.style.width=t+"px",i.$player.style.height=s+"px",i.$playerBorder.style.display="none"}i.isContainerFullscreen=!i.isContainerFullscreen,i.player&&i.player.resize()}else this.debug.warn(this.LOG_TAG,`handleWindowContainerFullscreen() ${e} is not exist`)}_handleFullscreenResize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5,t=this._getContainerRect(),i=0;const s=setInterval((()=>{const r=jr.isFullscreen,a=this._getContainerRect(),o={width:screen.width,height:screen.height};this.debug.log(this.LOG_TAG,`isInFullscreen ${r} , checkRectInterval times : ${i} nowRect:${JSON.stringify(a)}, prevRect:${JSON.stringify(t)} ,window screen rect:${JSON.stringify(o)}`);const n=a.width===t.width&&a.height===t.height,l=!r||o.width-a.width<10&&o.height-a.height<10;if(n&&l||i>=e)return this.resize(),void clearInterval(s);t=a,i++}),1e3)}_listenFullscreenChange(){try{const e=e=>{Za(e)===this.$container&&(this.emit(zs.multiFullscreen,jr.isFullscreen),jr.isFullscreen||-1!==window.navigator.userAgent.indexOf("Edg")?this._handleFullscreenResize():this.resize())};jr.on("change",e),this.events.destroys.push((()=>{jr.off("change",e)}))}catch(e){}}play(e,t,i){return new Promise(((s,r)=>{(Da(t)||Ya(t))&&(i=t,t={});const a=this._getWindowItem(i);if(a)if(a.player)a.player.play(e,t).then((()=>{s()})).catch((e=>{r(e)}));else{const i=this._createPlayer(a);a.player=i,i.play(e,t).then((()=>{s()})).catch((e=>{r(e)}))}else r(`play() windowIndex ${selectedWindowIndex} is not exist`)}))}getOption(e){const t=this._getWindowItem(e);return t&&t.player?t.player.getOption():(this.debug.warn(this.LOG_TAG,`getOption() windowIndex ${e} is not exist`),{})}setDebug(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setDebug(e):this.debug.warn(this.LOG_TAG,`setDebug() windowIndex ${t} is not exist`)}mute(e){const t=this._getWindowItem(e);t&&t.player?t.player.mute():this.debug.warn(this.LOG_TAG,`mute() windowIndex ${e} is not exist`)}cancelMute(e){const t=this._getWindowItem(e);t&&t.player?t.player.cancelMute():this.debug.warn(this.LOG_TAG,`cancelMute() windowIndex ${e} is not exist`)}setVolume(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setVolume(e):this.debug.warn(this.LOG_TAG,`setVolume() windowIndex ${t} is not exist`)}audioResume(e){const t=this._getWindowItem(e);t&&t.player?t.player.audioResume():this.debug.warn(this.LOG_TAG,`audioResume() windowIndex ${e} is not exist`)}setTimeout(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setTimeout(e):this.debug.warn(this.LOG_TAG,`setTimeout() windowIndex ${t} is not exist`)}setScaleMode(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setScaleMode(e):this.debug.warn(this.LOG_TAG,`setScaleMode() windowIndex ${t} is not exist`)}pause(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return new Promise(((i,s)=>{const r=this._getWindowItem(t);r&&r.player?r.player.pause(e).then((()=>{i()})).catch((e=>{s(e)})):s(`pause() windowIndex ${t} is not exist`)}))}close(e){return new Promise(((t,i)=>{const s=this._getWindowItem(e);s&&s.player?s.player.close().then((()=>{t()})).catch((e=>{i(e)})):i(`close() windowIndex ${e} is not exist`)}))}clearView(e){const t=this._getWindowItem(e);t&&t.player?t.player.clearView():this.debug.warn(this.LOG_TAG,`clearView() windowIndex ${e} is not exist`)}setStreamQuality(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setStreamQuality(e):this.debug.warn(this.LOG_TAG,`setStreamQuality() windowIndex ${t} is not exist`)}resize(){this._opt.draggable?this._updateWindows$2():this._updateWindows()}setBufferTime(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setBufferTime(e):this.debug.warn(this.LOG_TAG,`setBufferTime() windowIndex ${t} is not exist`)}setBufferDelayTime(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setBufferDelayTime(e):this.debug.warn(this.LOG_TAG,`setBufferDelayTime() windowIndex ${t} is not exist`)}setRotate(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setRotate(e):this.debug.warn(this.LOG_TAG,`setRotate() windowIndex ${t} is not exist`)}setMirrorRotate(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setMirrorRotate(e):this.debug.warn(this.LOG_TAG,`setMirrorRotate() windowIndex ${t} is not exist`)}updateIsEmitSEI(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.updateIsEmitSEI(e):this.debug.warn(this.LOG_TAG,`updateIsEmitSEI() windowIndex ${t} is not exist`)}setAspectRatio(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setAspectRatio(e):this.debug.warn(this.LOG_TAG,`setAspectRatio() windowIndex ${t} is not exist`)}hasLoaded(e){const t=this._getWindowItem(e);return!(!t||!t.player)&&t.player.hasLoaded()}setKeepScreenOn(e){const t=this._getWindowItem(e);t&&t.player?t.player.setKeepScreenOn():this.debug.warn(this.LOG_TAG,`setKeepScreenOn() windowIndex ${e} is not exist`)}setFullscreen(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setFullscreen(e):this.debug.warn(this.LOG_TAG,`setFullscreen() windowIndex ${t} is not exist`)}screenshot(e,t){const i=this._getWindowItem(t);return i&&i.player?i.player.screenshot(e.filename,e.format,e.quality,e.type):null}screenshotWatermark(e,t){const i=this._getWindowItem(t);return i&&i.player?i.player.screenshotWatermark(e):null}startRecord(e,t,i){return new Promise(((s,r)=>{const a=this._getWindowItem(i);a&&a.player?a.player.startRecord(e,t).then((()=>{s()})).catch((e=>{r(e)})):(this.debug.warn(this.LOG_TAG,`startRecord() windowIndex ${i} is not exist`),r(`windowIndex ${i} is not exist`))}))}stopRecordAndSave(e,t,i){return new Promise(((s,r)=>{const a=this._getWindowItem(i);a&&a.player?a.player.stopRecordAndSave(e,t).then((e=>{s(e)})).catch((e=>{r(e)})):(this.debug.warn(this.LOG_TAG,`stopRecordAndSave() windowIndex ${i} is not exist`),r(`windowIndex ${i} is not exist`))}))}isPlaying(e){const t=this._getWindowItem(e);return t&&t.player?t.player.isPlaying():(this.debug.warn(this.LOG_TAG,`isPlaying() windowIndex ${e} is not exist`),!1)}isLoading(e){const t=this._getWindowItem(e);return t&&t.player?t.player.isLoading():(this.debug.warn(this.LOG_TAG,`isLoading() windowIndex ${e} is not exist`),!1)}isPaused(e){const t=this._getWindowItem(e);return t&&t.player?t.player.isPaused():(this.debug.warn(this.LOG_TAG,`windowIndex ${e} is not exist`),!1)}isMute(e){const t=this._getWindowItem(e);return t&&t.player?t.player.isMute():(this.debug.warn(this.LOG_TAG,`isMute() windowIndex ${e} is not exist`),!1)}isRecording(e){const t=this._getWindowItem(e);return t&&t.player?t.player.isRecording():(this.debug.warn(this.LOG_TAG,`isRecording() windowIndex ${e} is not exist`),!1)}clearBufferDelay(e){const t=this._getWindowItem(e);t&&t.player?t.player.clearBufferDelay():this.debug.warn(this.LOG_TAG,`clearBufferDelay() windowIndex ${e} is not exist`)}setNetworkDelayTime(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setNetworkDelayTime(e):this.debug.warn(this.LOG_TAG,`setNetworkDelayTime() windowIndex ${t} is not exist`)}getDecodeType(e){const t=this._getWindowItem(e);return t&&t.player?t.player.getDecodeType():(this.debug.warn(this.LOG_TAG,`getDecodeType() windowIndex ${e} is not exist`),null)}getRenderType(e){const t=this._getWindowItem(e);return t&&t.player?t.player.getRenderType():(this.debug.warn(this.LOG_TAG,`windowIndex ${e} is not exist`),null)}getAudioEngineType(e){const t=this._getWindowItem(e);return t&&t.player?t.player.getAudioEngineType():(this.debug.warn(this.LOG_TAG,`windowIndex ${e} is not exist`),null)}getPlayingTimestamp(e){const t=this._getWindowItem(e);return t&&t.player?t.player.getPlayingTimestamp():(this.debug.warn(this.LOG_TAG,`windowIndex ${e} is not exist`),null)}getStatus(e){const t=this._getWindowItem(e);return t&&t.player?t.player.getStatus():(this.debug.warn(this.LOG_TAG,`getStatus() windowIndex ${e} is not exist`),null)}getPlayType(e){const t=this._getWindowItem(e);return t&&t.player?t.player.getPlayType():(this.debug.warn(this.LOG_TAG,`getPlayType() windowIndex ${e} is not exist`),null)}togglePerformancePanel(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.togglePerformancePanel(e):this.debug.warn(this.LOG_TAG,`togglePerformancePanel() windowIndex ${t} is not exist`)}openZoom(e){const t=this._getWindowItem(e);t&&t.player?t.player.openZoom():this.debug.warn(this.LOG_TAG,`openZoom() windowIndex ${e} is not exist`)}closeZoom(e){const t=this._getWindowItem(e);t&&t.player?t.player.closeZoom():this.debug.warn(this.LOG_TAG,`closeZoom() windowIndex ${e} is not exist`)}isZoomOpen(e){const t=this._getWindowItem(e);return t&&t.player?t.player.isZoomOpen():(this.debug.warn(this.LOG_TAG,`isZoomOpen() windowIndex ${e} is not exist`),!1)}expandZoom(e){const t=this._getWindowItem(e);t&&t.player?t.player.expandZoom():this.debug.warn(this.LOG_TAG,`expandZoom() windowIndex ${e} is not exist`)}narrowZoom(e){const t=this._getWindowItem(e);t&&t.player?t.player.narrowZoom():this.debug.warn(this.LOG_TAG,`narrowZoom() windowIndex ${e} is not exist`)}getCurrentZoomIndex(e){const t=this._getWindowItem(e);return t&&t.player?t.player.getCurrentZoomIndex():(this.debug.warn(this.LOG_TAG,`getCurrentZoomIndex() windowIndex ${e} is not exist`),0)}setNakedFlowFps(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setNakedFlowFps(e):this.debug.warn(this.LOG_TAG,`setNakedFlowFps() windowIndex ${t} is not exist`)}updateDebugLevel(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.updateDebugLevel(e):this.debug.warn(this.LOG_TAG,`updateDebugLevel() windowIndex ${t} is not exist`)}updateWatermark(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.updateWatermark(e):this.debug.warn(this.LOG_TAG,`updateWatermark() windowIndex ${t} is not exist`)}removeWatermark(e){const t=this._getWindowItem(e);t&&t.player?t.player.removeWatermark():this.debug.warn(this.LOG_TAG,`removeWatermark() windowIndex ${e} is not exist`)}updateFullscreenWatermark(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.updateFullscreenWatermark(e):this.debug.warn(this.LOG_TAG,`updateFullscreenWatermark() windowIndex ${t} is not exist`)}removeFullscreenWatermark(e){const t=this._getWindowItem(e);t&&t.player?t.player.removeFullscreenWatermark():this.debug.warn(this.LOG_TAG,`removeFullscreenWatermark() windowIndex ${e} is not exist`)}faceDetectOpen(e){const t=this._getWindowItem(e);t&&t.player?t.player.faceDetectOpen():this.debug.warn(this.LOG_TAG,`faceDetectOpen() windowIndex ${e} is not exist`)}faceDetectClose(e){const t=this._getWindowItem(e);t&&t.player?t.player.faceDetectClose():this.debug.warn(this.LOG_TAG,`faceDetectClose() windowIndex ${e} is not exist`)}objectDetectOpen(e){const t=this._getWindowItem(e);t&&t.player?t.player.objectDetectOpen():this.debug.warn(this.LOG_TAG,`objectDetectOpen() windowIndex ${e} is not exist`)}objectDetectClose(e){const t=this._getWindowItem(e);t&&t.player?t.player.objectDetectClose():this.debug.warn(this.LOG_TAG,`objectDetectClose() windowIndex ${e} is not exist`)}sendWebsocketMessage(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.sendWebsocketMessage(e):this.debug.warn(this.LOG_TAG,`sendWebsocketMessage() windowIndex ${t} is not exist`)}addContentToCanvas(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.addContentToCanvas(e):this.debug.warn(this.LOG_TAG,`addContentToCanvas() windowIndex ${t} is not exist`)}clearContentToCanvas(e){const t=this._getWindowItem(e);t&&t.player?t.player.clearContentToCanvas():this.debug.warn(this.LOG_TAG,`clearContentToCanvas() windowIndex ${e} is not exist`)}setControlHtml(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setControlHtml(e):this.debug.warn(this.LOG_TAG,`setControlHtml() windowIndex ${t} is not exist`)}clearControlHtml(e){const t=this._getWindowItem(e);t&&t.player?t.player.clearControlHtml():this.debug.warn(this.LOG_TAG,`clearControlHtml() windowIndex ${e} is not exist`)}getFlvMetaData(e){const t=this._getWindowItem(e);return t&&t.player?t.player.getFlvMetaData():(this.debug.warn(this.LOG_TAG,`getFlvMetaData() windowIndex ${e} is not exist`),null)}getExtendBtnList(e){const t=this._getWindowItem(e);return t&&t.player?t.player.getExtendBtnList():(this.debug.warn(this.LOG_TAG,`getExtendBtnList() windowIndex ${e} is not exist`),null)}updateAiFaceDetectInterval(e,t){const i=this._getWindowItem(t);if(!i||!i.player)return this.debug.warn(this.LOG_TAG,`updateAiFaceDetectInterval() windowIndex ${t} is not exist`),null;i.player.updateAiFaceDetectInterval(e)}updateAiFaceDetectLevel(e,t){const i=this._getWindowItem(t);if(!i||!i.player)return this.debug.warn(this.LOG_TAG,`updateAiFaceDetectLevel() windowIndex ${t} is not exist`),null;i.player.updateAiFaceDetectLevel(e)}updateAiObjectDetectInterval(e,t){const i=this._getWindowItem(t);if(!i||!i.player)return this.debug.warn(this.LOG_TAG,`updateAiObjectDetectInterval() windowIndex ${t} is not exist`),null;i.player.updateAiObjectDetectInterval(e)}updateAiObjectDetectLevel(e,t){const i=this._getWindowItem(t);if(!i||!i.player)return this.debug.warn(this.LOG_TAG,`updateAiObjectDetectLevel() windowIndex ${t} is not exist`),null;i.player.updateAiObjectDetectLevel(e)}setCryptoKeyUrl(e,t){const i=this._getWindowItem(t);if(!i||!i.player)return this.debug.warn(this.LOG_TAG,`setCryptoKeyUrl() windowIndex ${t} is not exist`),null;i.player.setCryptoKeyUrl(e)}showErrorMessageTips(e,t){const i=this._getWindowItem(t);if(!i||!i.player)return this.debug.warn(this.LOG_TAG,`showErrorMessageTips() windowIndex ${t} is not exist`),null;i.player.showErrorMessageTips(e)}hideErrorMessageTips(e){const t=this._getWindowItem(e);if(!t||!t.player)return this.debug.warn(this.LOG_TAG,`hideErrorMessageTips() windowIndex ${e} is not exist`),null;t.player.hideErrorMessageTips()}destroySingle(e){return new Promise(((t,i)=>{const s=this._getWindowItem(e);s?s.player&&s.player.destroy().then((()=>{s.player=null,t()})).catch((e=>{i(e)})):(i("windowIndex is not exist"),this.debug.warn(this.LOG_TAG,`destroySingle() windowIndex ${e} is not exist`))}))}initSingle(e){return new Promise(((t,i)=>{const s=this._getWindowItem(e);if(s)if(s.player)s.player.destroy().then((()=>{s.player=null;const e=this._createPlayer(s);s.player=e,t()})).catch((e=>{i(e)}));else{const e=this._createPlayer(s);s.player=e,t()}else i("windowIndex is not exist"),this.debug.warn(this.LOG_TAG,`destroySingle() windowIndex ${e} is not exist`)}))}setFullscreenMulti(e){return new Promise(((t,i)=>{if(this.debug.log(this.LOG_TAG,"setFullscreenMulti",e),e)try{jr.request(this.$container).then((()=>{t()})).catch((e=>{this.debug.error(this.LOG_TAG,"fullscreen request inner error",e),i(e)}))}catch(e){this.debug.error(this.LOG_TAG,"fullscreen request error",e),i(e)}else try{jr.exit().then((()=>{t()})).catch((e=>{this.debug.error(this.LOG_TAG,"fullscreen exit inner error",e),i(e)}))}catch(e){this.debug.error(this.LOG_TAG,"fullscreen exit error",e),i(e)}}))}toggleSingleWindowContainerFullscreen(e,t){this.debug.log(this.LOG_TAG,"setSingleWindowContainerFullscreen",t);const i=this._getWindowItem(t);this.windowList.forEach((e=>{e.uuid!==i.uuid&&this._handleWindowContainerFullscreen(e.uuid,!1)})),this._handleWindowContainerFullscreen(i.uuid,e)}selectWindow(e){this.debug.log(this.LOG_TAG,"selectWindow",e),this._handleWindowSelect(e)}arrangeWindow(e){this.debug.log(this.LOG_TAG,"arrangeWindow",e),this._innerArrangeWindow(e)}_innerArrangeWindow(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return void this.debug.warn(this.LOG_TAG,`arrangeWindow() split ${e} is not valid`);if([$s,Hs].includes(e))this._arrangeSpecialWindow(e);else{if(this._opt.split===e&&null===this.specialLayoutType&&Ao(t))return void this.debug.warn(this.LOG_TAG,`arrangeWindow() split ${e} is not changed`);this.specialLayoutType=null,this._arrangeWindow(e)}}_arrangeWindow(e){(e=ka(e))<1||!Da(e)?this.debug.warn(this.LOG_TAG,`arrangeWindow() split ${e} is not valid`):(e>this._opt.maxSplit&&(e=this._opt.maxSplit),this._opt.split=e,this.currentWindowIndex=0,this._opt.draggable?this._updateWindows$2():this._updateWindows(),this._handleWindowSelect(this.currentWindowIndex))}_arrangeSpecialWindow(e){this._opt.maxSplit<=3&&e===Hs||this._opt.maxSplit<=2&&e===$s?this.debug.warn(this.LOG_TAG,`_arrangeSpecialWindow() type ${e} is not valid because maxSplit is ${this._opt.maxSplit}`):this.specialLayoutType&&this.specialLayoutType===e?this.debug.warn(this.LOG_TAG,`_arrangeSpecialWindow() type ${e} is not changed`):(this.specialLayoutType=e,e===$s?this._arrangeWindow(3):e===Hs?this._arrangeWindow(4):this.debug.warn(this.LOG_TAG,`_arrangeSpecialWindow() type ${e} is not valid`))}getCurrentSplit(){return this.specialLayoutType?this.specialLayoutType:this._opt.split}_getCurrentMaxSplit(){if(this.specialLayoutType){let e=0;return this.specialLayoutType===$s?e=9:this.specialLayoutType===Hs&&(e=16),e}return this._opt.split*this._opt.split}_getSpecialMaxSplit(){let e=0;return this.specialLayoutType===$s?e=6:this.specialLayoutType===Hs&&(e=8),e}getSelectedWindowIndex(){return this.currentWindowIndex}getSelectedWindowUuid(){return this.currentWindowUuid}getWindowItem(e){let t=this._getWindowItem(e),i=null;return t&&(i={index:e,$player:t.$player,$playerContainer:t.$playerContainer,player:t.player,uuid:t.uuid}),i}getNextWindowItem(e){let t=null,i=this._getWindowItem(e);if(i){const e=this._getWindowUuidList()||[],s=e.findIndex((e=>e===i.uuid));if(s<e.length-1){const i=s+1,r=this._findWindowItemByUuid(e[i]);r&&(t={index:i,$player:r.$player,$playerContainer:r.$playerContainer,player:r.player,uuid:r.uuid})}}return t}getPrevWindowItem(e){let t=null,i=this._getWindowItem(e);if(i){const e=this._getWindowUuidList()||[],s=e.findIndex((e=>e===i.uuid));if(s>0){const i=s-1,r=this._findWindowItemByUuid(e[i]);r&&(t={index:i,$player:r.$player,$playerContainer:r.$playerContainer,player:r.player,uuid:r.uuid})}}return t}isWindowItemHasInitPlayer(e){let t=!1,i=this._getWindowItem(e);return i&&i.player&&(t=!0),t}_getWindowItem(e){let t=null;const i=Ya(e)&&16===e.length;return t=i||!Da(e)?this._findWindowItemByUuid(i?e:this.currentWindowUuid):this.windowList[e],t}_getWindowUuidList(){return this.windowList.filter(((e,t)=>t<this._getCurrentMaxSplit())).map((e=>e.uuid))}_findWindowItemIndex(e){return e&&e.uuid?this._findWindowItemIndexByUuid(e.uuid):null}_findWindowItemIndexByUuid(e){return this.windowList.findIndex((t=>t.uuid===e))}_findWindowItemByUuid(e){return this.windowList.find((t=>t.uuid===e))}}return H_.MULTI_EVENTS=zs,H_.EVENTS={...dt,...zs},H_.ERROR=ut,window.JessibucaProMulti=H_,window.JbProMulti=H_,window.WebPlayerProMulti=H_,H_})); diff --git a/vue/src/views/components/player/public/jessibuca-pro-talk.js b/vue/src/views/components/player/public/jessibuca-pro-talk.js deleted file mode 100644 index 16ff15a9..00000000 --- a/vue/src/views/components/player/public/jessibuca-pro-talk.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self)["jessibuca-talk"]=t()}(this,(function(){"use strict";class e{on(e,t,i){const s=this.e||(this.e={});return(s[e]||(s[e]=[])).push({fn:t,ctx:i}),this}once(e,t,i){const s=this;function r(){s.off(e,r);for(var o=arguments.length,n=new Array(o),a=0;a<o;a++)n[a]=arguments[a];t.apply(i,n)}return r._=t,this.on(e,r,i)}emit(e){const t=((this.e||(this.e={}))[e]||[]).slice();for(var i=arguments.length,s=new Array(i>1?i-1:0),r=1;r<i;r++)s[r-1]=arguments[r];for(let e=0;e<t.length;e+=1)t[e].fn.apply(t[e].ctx,s);return this}off(e,t){const i=this.e||(this.e={});if(!e)return Object.keys(i).forEach((e=>{delete i[e]})),void delete this.e;const s=i[e],r=[];if(s&&t)for(let e=0,i=s.length;e<i;e+=1)s[e].fn!==t&&s[e].fn._!==t&&r.push(s[e]);return r.length?i[e]=r:delete i[e],this}}const t="debug",i="warn",s="talkGetUserMediaSuccess",r="talkGetUserMediaFail",o="talkGetUserMediaTimeout",n="talkStreamStart",a="talkStreamOpen",l="talkStreamClose",h="talkStreamError",u="talkStreamInactive",c="talkFailedAndStop",d={talkStreamClose:l,talkStreamError:h,talkStreamInactive:u,talkGetUserMediaTimeout:o,talkFailedAndStop:c},p={playError:"playIsNotPauseOrUrlIsNull",fetchError:"fetchError",websocketError:"websocketError",webcodecsH265NotSupport:"webcodecsH265NotSupport",webcodecsDecodeError:"webcodecsDecodeError",webcodecsUnsupportedConfigurationError:"webcodecsUnsupportedConfigurationError",webcodecsDecodeConfigureError:"webcodecsDecodeConfigureError",mediaSourceH265NotSupport:"mediaSourceH265NotSupport",mediaSourceAudioG711NotSupport:"mediaSourceAudioG711NotSupport",mediaSourceAudioInitTimeout:"mediaSourceAudioInitTimeout",mediaSourceAudioNoDataTimeout:"mediaSourceAudioNoDataTimeout",mediaSourceDecoderConfigurationError:"mediaSourceDecoderConfigurationError",mediaSourceFull:"mseSourceBufferFull",mseSourceBufferError:"mseSourceBufferError",mseAddSourceBufferError:"mseAddSourceBufferError",mediaSourceAppendBufferError:"mediaSourceAppendBufferError",mediaSourceTsIsMaxDiff:"mediaSourceTsIsMaxDiff",mediaSourceUseCanvasRenderPlayFailed:"mediaSourceUseCanvasRenderPlayFailed",mediaSourceBufferedIsZeroError:"mediaSourceBufferedIsZeroError",wasmDecodeError:"wasmDecodeError",wasmUseVideoRenderError:"wasmUseVideoRenderError",hlsError:"hlsError",webrtcError:"webrtcError",webrtcClosed:"webrtcClosed",webrtcIceCandidateError:"webrtcIceCandidateError",webglAlignmentError:"webglAlignmentError",wasmWidthOrHeightChange:"wasmWidthOrHeightChange",mseWidthOrHeightChange:"mseWidthOrHeightChange",wcsWidthOrHeightChange:"wcsWidthOrHeightChange",widthOrHeightChange:"widthOrHeightChange",tallWebsocketClosedByError:"tallWebsocketClosedByError",flvDemuxBufferSizeTooLarge:"flvDemuxBufferSizeTooLarge",wasmDecodeVideoNoResponseError:"wasmDecodeVideoNoResponseError",audioChannelError:"audioChannelError",simdH264DecodeVideoWidthIsTooLarge:"simdH264DecodeVideoWidthIsTooLarge",simdDecodeError:"simdDecodeError",webglContextLostError:"webglContextLostError",videoElementPlayingFailed:"videoElementPlayingFailed",videoElementPlayingFailedForWebrtc:"videoElementPlayingFailedForWebrtc",decoderWorkerInitError:"decoderWorkerInitError",videoInfoError:"videoInfoError",videoCodecIdError:"videoCodecIdError",streamEnd:"streamEnd",websocket1006Error:"websocket1006Error",delayTimeout:"delayTimeout",loadingTimeout:"loadingTimeout",networkDelayTimeout:"networkDelayTimeout",aliyunRtcError:"aliyunRtcError",...{talkStreamError:h,talkStreamClose:l}},f="notConnect",m="open",g="close",w="error",k="g711a",T="g711u",b="pcm",_="opus",S=8,y=0,E=98,A="empty",v="rtp",M="tcp",G="open",U="close",B="error",L="message",R="worklet",F="script",C={encType:k,packetType:v,packetTcpSendType:M,rtpSsrc:"0000000000",numberChannels:1,sampleRate:8e3,sampleBitsWidth:16,sendInterval:20,debug:!1,debugLevel:i,testMicrophone:!1,saveToTempFile:!1,audioBufferLength:160,engine:R,checkGetUserMediaTimeout:!1,getUserMediaTimeout:1e4,audioConstraints:{latency:!0,noiseSuppression:!0,autoGainControl:!0,echoCancellation:!0,sampleRate:48e3,channelCount:1}};function N(){return(new Date).getTime()}function W(e){let t="";if("object"==typeof e)try{t=JSON.stringify(e),t=JSON.parse(t)}catch(i){t=e}else t=e;return t}function x(e){return!0===e||"true"===e}(function(e,t){return e(t={exports:{}},t.exports),t.exports})((function(e){!function(){var t="undefined"!=typeof window&&void 0!==window.document?window.document:{},i=e.exports,s=function(){for(var e,i=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],s=0,r=i.length,o={};s<r;s++)if((e=i[s])&&e[1]in t){for(s=0;s<e.length;s++)o[i[0][s]]=e[s];return o}return!1}(),r={change:s.fullscreenchange,error:s.fullscreenerror},o={request:function(e,i){return new Promise(function(r,o){var n=function(){this.off("change",n),r()}.bind(this);this.on("change",n);var a=(e=e||t.documentElement)[s.requestFullscreen](i);a instanceof Promise&&a.then(n).catch(o)}.bind(this))},exit:function(){return new Promise(function(e,i){if(this.isFullscreen){var r=function(){this.off("change",r),e()}.bind(this);this.on("change",r);var o=t[s.exitFullscreen]();o instanceof Promise&&o.then(r).catch(i)}else e()}.bind(this))},toggle:function(e,t){return this.isFullscreen?this.exit():this.request(e,t)},onchange:function(e){this.on("change",e)},onerror:function(e){this.on("error",e)},on:function(e,i){var s=r[e];s&&t.addEventListener(s,i,!1)},off:function(e,i){var s=r[e];s&&t.removeEventListener(s,i,!1)},raw:s};s?(Object.defineProperties(o,{isFullscreen:{get:function(){return Boolean(t[s.fullscreenElement])}},element:{enumerable:!0,get:function(){return t[s.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(t[s.fullscreenEnabled])}}}),i?e.exports=o:window.screenfull=o):i?e.exports={isEnabled:!1}:window.screenfull={isEnabled:!1}}()})).isEnabled,(()=>{try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch(e){}})();class O{constructor(e){const{fromSampleRate:t,toSampleRate:i,channels:s,inputBufferSize:r}=e;if(!t||!i||!s)throw new Error("Invalid settings specified for the resampler.");this.resampler=null,this.fromSampleRate=t,this.toSampleRate=i,this.channels=s||0,this.inputBufferSize=r,this.initialize()}initialize(){this.fromSampleRate==this.toSampleRate?(this.resampler=e=>e,this.ratioWeight=1):(this.fromSampleRate<this.toSampleRate?(this.linearInterpolation(),this.lastWeight=1):(this.multiTap(),this.tailExists=!1,this.lastWeight=0),this.initializeBuffers(),this.ratioWeight=this.fromSampleRate/this.toSampleRate)}bufferSlice(e){try{return this.outputBuffer.subarray(0,e)}catch(t){try{return this.outputBuffer.length=e,this.outputBuffer}catch(t){return this.outputBuffer.slice(0,e)}}}initializeBuffers(){this.outputBufferSize=Math.ceil(this.inputBufferSize*this.toSampleRate/this.fromSampleRate/this.channels*1.0000004768371582)+this.channels+this.channels;try{this.outputBuffer=new Float32Array(this.outputBufferSize),this.lastOutput=new Float32Array(this.channels)}catch(e){this.outputBuffer=[],this.lastOutput=[]}}linearInterpolation(){this.resampler=e=>{let t,i,s,r,o,n,a,l,h,u=e.length,c=this.channels;if(u%c!=0)throw new Error("Buffer was of incorrect sample length.");if(u<=0)return[];for(t=this.outputBufferSize,i=this.ratioWeight,s=this.lastWeight,r=0,o=0,n=0,a=0,l=this.outputBuffer;s<1;s+=i)for(o=s%1,r=1-o,this.lastWeight=s%1,h=0;h<this.channels;++h)l[a++]=this.lastOutput[h]*r+e[h]*o;for(s-=1,u-=c,n=Math.floor(s)*c;a<t&&n<u;){for(o=s%1,r=1-o,h=0;h<this.channels;++h)l[a++]=e[n+(h>0?h:0)]*r+e[n+(c+h)]*o;s+=i,n=Math.floor(s)*c}for(h=0;h<c;++h)this.lastOutput[h]=e[n++];return this.bufferSlice(a)}}multiTap(){this.resampler=e=>{let t,i,s,r,o,n,a,l,h,u,c,d=e.length,p=this.channels;if(d%p!=0)throw new Error("Buffer was of incorrect sample length.");if(d<=0)return[];for(t=this.outputBufferSize,i=[],s=this.ratioWeight,r=0,n=0,a=0,l=!this.tailExists,this.tailExists=!1,h=this.outputBuffer,u=0,c=0,o=0;o<p;++o)i[o]=0;do{if(l)for(r=s,o=0;o<p;++o)i[o]=0;else{for(r=this.lastWeight,o=0;o<p;++o)i[o]=this.lastOutput[o];l=!0}for(;r>0&&n<d;){if(a=1+n-c,!(r>=a)){for(o=0;o<p;++o)i[o]+=e[n+(o>0?o:0)]*r;c+=r,r=0;break}for(o=0;o<p;++o)i[o]+=e[n++]*a;c=n,r-=a}if(0!==r){for(this.lastWeight=r,o=0;o<p;++o)this.lastOutput[o]=i[o];this.tailExists=!0;break}for(o=0;o<p;++o)h[u++]=i[o]/s}while(n<d&&u<t);return this.bufferSlice(u)}}resample(e){return this.fromSampleRate==this.toSampleRate?this.ratioWeight=1:(this.fromSampleRate<this.toSampleRate?this.lastWeight=1:(this.tailExists=!1,this.lastWeight=0),this.initializeBuffers(),this.ratioWeight=this.fromSampleRate/this.toSampleRate),this.resampler(e)}}const P=[255,511,1023,2047,4095,8191,16383,32767];function I(e,t,i){for(let s=0;s<i;s++)if(e<=t[s])return s;return i}function D(e){const t=[];return Array.prototype.slice.call(e).forEach(((e,i)=>{t[i]=function(e){let t,i,s;return e>=0?t=213:(t=85,(e=-e-1)<0&&(e=32767)),i=I(e,P,8),i>=8?127^t:(s=i<<4,s|=i<2?e>>4&15:e>>i+3&15,s^t)}(e)})),t}function z(e){const t=[];return Array.prototype.slice.call(e).forEach(((e,i)=>{t[i]=function(e){let t=0;e<0?(e=132-e,t=127):(e+=132,t=255);let i=I(e,P,8);return i>=8?127^t:(i<<4|e>>i+3&15)^t}(e)})),t}class q{constructor(e){this.log=function(i){if(e._opt.debug&&e._opt.debugLevel==t){const t=e._opt.debugUuid?`[${e._opt.debugUuid}]`:"";for(var s=arguments.length,r=new Array(s>1?s-1:0),o=1;o<s;o++)r[o-1]=arguments[o];console.log(`JbPro${t}[✅✅✅][${i}]`,...r)}},this.warn=function(s){if(e._opt.debug&&(e._opt.debugLevel==t||e._opt.debugLevel==i)){const t=e._opt.debugUuid?`[${e._opt.debugUuid}]`:"";for(var r=arguments.length,o=new Array(r>1?r-1:0),n=1;n<r;n++)o[n-1]=arguments[n];console.log(`JbPro${t}[❗❗❗][${s}]`,...o)}},this.error=function(t){const i=e._opt.debugUuid?`[${e._opt.debugUuid}]`:"";for(var s=arguments.length,r=new Array(s>1?s-1:0),o=1;o<s;o++)r[o-1]=arguments[o];console.error(`JbPro${i}[❌❌❌][${t}]`,...r)}}}class j{constructor(e){this.destroys=[],this.proxy=this.proxy.bind(this),this.master=e}proxy(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!e)return;if(Array.isArray(t))return t.map((t=>this.proxy(e,t,i,s)));e.addEventListener(t,i,s);const r=()=>{"function"==typeof e.removeEventListener&&e.removeEventListener(t,i,s)};return this.destroys.push(r),r}destroy(){this.master.debug&&this.master.debug.log("Events","destroy"),this.destroys.forEach((e=>e())),this.destroys=[]}}class $ extends e{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),this._opt={},e&&(this.player=e),this.TAG_NAME="talk";const i=W(C);this._opt=Object.assign({},i,t),this._opt.sampleRate=parseInt(this._opt.sampleRate,10),this._opt.sampleBitsWidth=parseInt(this._opt.sampleBitsWidth,10),this.audioContext=null,this.gainNode=null,this.recorder=null,this.workletRecorder=null,this.biquadFilter=null,this.userMediaStream=null,this.clearWorkletUrlTimeout=null,this.bufferSize=512,this._opt.audioBufferLength=this.calcAudioBufferLength(),this.audioBufferList=[],this.socket=null,this.socketStatus=f,this.mediaStreamSource=null,this.heartInterval=null,this.checkGetUserMediaTimeout=null,this.wsUrl=null,this.startTimestamp=0,this.sequenceId=0,this.tempTimestamp=null,this.tempG711BufferList=[],this.tempRtpBufferList=[],this.tempPcmBufferList=[],this.events=new j(this),this._initTalk(),this.player||(this.debug=new q(this)),this._opt.encType!==k&&this._opt.encType!==T||8e3===this._opt.sampleRate&&16===this._opt.sampleBitsWidth||this.warn(this.TAG_NAME,`\n encType is ${this._opt.encType} and sampleBitsWidth is ${this._opt.sampleBitsWidth}, set sampleBitsWidth to ${this._opt.sampleBitsWidth}。\n ${this._opt.encType} only support sampleRate 8000 and sampleBitsWidth 16`),this.log(this.TAG_NAME,"init",JSON.stringify(this._opt))}destroy(){this.clearWorkletUrlTimeout&&(clearTimeout(this.clearWorkletUrlTimeout),this.clearWorkletUrlTimeout=null),this.userMediaStream&&(this.userMediaStream.getTracks&&this.userMediaStream.getTracks().forEach((e=>{e.stop()})),this.userMediaStream=null),this.mediaStreamSource&&(this.mediaStreamSource.disconnect(),this.mediaStreamSource=null),this.recorder&&(this.recorder.disconnect(),this.recorder.onaudioprocess=null,this.recorder=null),this.biquadFilter&&(this.biquadFilter.disconnect(),this.biquadFilter=null),this.gainNode&&(this.gainNode.disconnect(),this.gainNode=null),this.workletRecorder&&(this.workletRecorder.disconnect(),this.workletRecorder=null),this.socket&&(this.socketStatus===m&&this._sendClose(),this.socket.close(),this.socket=null),this._stopHeartInterval(),this._stopCheckGetUserMediaTimeout(),this.audioContext=null,this.gainNode=null,this.recorder=null,this.audioBufferList=[],this.sequenceId=0,this.wsUrl=null,this.tempTimestamp=null,this.tempRtpBufferList=[],this.tempG711BufferList=[],this.tempPcmBufferList=[],this.startTimestamp=0,this.log(this.TAG_NAME,"destroy")}addRtpToBuffer(e){const t=e.length+this.tempRtpBufferList.length,i=new Uint8Array(t);i.set(this.tempRtpBufferList,0),i.set(e,this.tempRtpBufferList.length),this.tempRtpBufferList=i}addG711ToBuffer(e){const t=e.length+this.tempG711BufferList.length,i=new Uint8Array(t);i.set(this.tempG711BufferList,0),i.set(e,this.tempG711BufferList.length),this.tempG711BufferList=i}addPcmToBuffer(e){const t=e.length+this.tempPcmBufferList.length,i=new Uint8Array(t);i.set(this.tempPcmBufferList,0),i.set(e,this.tempPcmBufferList.length),this.tempG711ButempPcmBufferListfferList=i}downloadRtpFile(){this.debug.log(this.TAG_NAME,"downloadRtpFile");const e=new Blob([this.tempRtpBufferList]);try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=Date.now()+".rtp",t.click(),window.URL.revokeObjectURL(t.href)}catch(e){console.error("downloadRtpFile",e)}}downloadG711File(){this.debug.log(this.TAG_NAME,"downloadG711File");const e=new Blob([this.tempG711BufferList]);try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=Date.now()+"."+this._opt.encType,t.click(),window.URL.revokeObjectURL(t.href)}catch(e){console.error("downloadG711File",e)}}downloadPcmFile(){this.debug.log(this.TAG_NAME,"downloadPcmFile");const e=new Blob([this.tempPcmBufferList]);try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=Date.now()+"."+this._opt.encType,t.click(),window.URL.revokeObjectURL(t.href)}catch(e){console.error("downloadRtpFile",e)}}downloadFile(){this._opt.packetType===v?this.downloadRtpFile():this._opt.encType===k||this._opt.encType===T?this.downloadG711File():this.downloadPcmFile()}calcAudioBufferLength(){const{sampleRate:e,sampleBitsWidth:t}=this._opt;return 8*e*.02/8}get socketStatusOpen(){return this.socketStatus===m}log(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this._log("log",...t)}warn(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this._log("warn",...t)}error(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this._log("error",...t)}_log(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];this.player?this.player.debug[e](...i):this.debug?this.debug[e](...i):console[e](...i)}_getSequenceId(){return++this.sequenceId}_createWebSocket(){return new Promise(((e,t)=>{const i=this.events.proxy;this.socket=new WebSocket(this.wsUrl),this.socket.binaryType="arraybuffer",this.emit(n),i(this.socket,G,(()=>{this.socketStatus=m,this.log(this.TAG_NAME,"websocket open -> do talk"),this.emit(a),e(),this._doTalk()})),i(this.socket,L,(e=>{this.log(this.TAG_NAME,"websocket message",e.data)})),i(this.socket,U,(e=>{this.socketStatus=g,this.warn(this.TAG_NAME,"websocket close -> reject",e),this.emit(l),t(e)})),i(this.socket,B,(e=>{this.socketStatus=w,this.error(this.TAG_NAME,"websocket error -> reject",e),this.emit(h,e),t(e)}))}))}_sendClose(){}_initTalk(){this._initMethods(),this._opt.engine===R?this._initWorklet():this._opt.engine===F&&this._initScriptProcessor(),this.log(this.TAG_NAME,"audioContext samplerate",this.audioContext.sampleRate)}_initMethods(){this.audioContext=new(window.AudioContext||window.webkitAudioContext)({sampleRate:48e3}),this.gainNode=this.audioContext.createGain(),this.gainNode.gain.value=1,this.biquadFilter=this.audioContext.createBiquadFilter(),this.biquadFilter.type="lowpass",this.biquadFilter.frequency.value=3e3,this.resampler=new O({fromSampleRate:this.audioContext.sampleRate,toSampleRate:this._opt.sampleRate,channels:this._opt.numberChannels,inputBufferSize:this.bufferSize})}_initScriptProcessor(){const e=this.audioContext.createScriptProcessor||this.audioContext.createJavaScriptNode;this.recorder=e.apply(this.audioContext,[this.bufferSize,this._opt.numberChannels,this._opt.numberChannels]),this.recorder.onaudioprocess=e=>this._onaudioprocess(e)}_initWorklet(){const e=function(e){const t=e.toString().trim().match(/^function\s*\w*\s*\([\w\s,]*\)\s*{([\w\W]*?)}$/)[1],i=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(i)}((function(){class e extends AudioWorkletProcessor{constructor(e){super(),this._cursor=0,this._bufferSize=e.processorOptions.bufferSize,this._buffer=new Float32Array(this._bufferSize)}process(e,t,i){if(!e.length||!e[0].length)return!0;for(let t=0;t<e[0][0].length;t++)this._cursor+=1,this._cursor===this._bufferSize&&(this._cursor=0,this.port.postMessage({eventType:"data",buffer:this._buffer})),this._buffer[this._cursor]=e[0][0][t];return!0}}registerProcessor("talk-processor",e)}));this.audioContext.audioWorklet&&this.audioContext.audioWorklet.addModule(e).then((()=>{const e=new AudioWorkletNode(this.audioContext,"talk-processor",{processorOptions:{bufferSize:this.bufferSize}});e.connect(this.gainNode),e.port.onmessage=e=>{"data"===e.data.eventType&&this._encodeAudioData(e.data.buffer)},this.workletRecorder=e})),this.clearWorkletUrlTimeout=setTimeout((()=>{URL.revokeObjectURL(e),this.clearWorkletUrlTimeout=null}),1e4)}_onaudioprocess(e){const t=e.inputBuffer.getChannelData(0);this._encodeAudioData(new Float32Array(t))}_encodeAudioData(e){if(0===e[0]&&0===e[1])return void this.log(this.TAG_NAME,"empty audio data");const t=this.resampler.resample(e);let i=t;if(16===this._opt.sampleBitsWidth?i=function(e){let t=e.length,i=new Int16Array(t);for(;t--;){let s=Math.max(-1,Math.min(1,e[t]));i[t]=s<0?32768*s:32767*s}return i}(t):8===this._opt.sampleBitsWidth&&(i=function(e){let t=e.length,i=new Int8Array(t);for(;t--;){let s=Math.max(-1,Math.min(1,e[t]));const r=s<0?32768*s:32767*s;i[t]=parseInt(255/(65535/(32768+r)),10)}return i}(t)),null!==i.buffer){let e=null;this._opt.encType===k?e=D(i):this._opt.encType===T?e=z(i):this._opt.encType===b&&(e=i);const t=new Uint8Array(e);for(let e=0;e<t.length;e++){let i=this.audioBufferList.length;this.audioBufferList[i++]=t[e],this.audioBufferList.length===this._opt.audioBufferLength&&(this._sendTalkMsg(new Uint8Array(this.audioBufferList)),this.audioBufferList=[])}}}_parseAudioMsg(e){let t=null;return this._opt.packetType!==v||this._opt.encType!==k&&this._opt.encType!==T?this._opt.packetType===A&&(t=e):t=this.rtpPacket(e),t}rtpPacket(e){const t=[];let i=0,s=0,r=0;const o=this._opt.rtpSsrc,n=e.length;this._opt.encType===k?i=S:this._opt.encType===T?i=y:this._opt.encType===_&&(i=E),this.startTimestamp||(this.startTimestamp=N()),r=N()-this.startTimestamp,s=this._getSequenceId();let a=0;if(this._opt.packetTcpSendType===M){const e=n+12;t[a++]=255&e>>8,t[a++]=255&e>>0}t[a++]=128,t[a++]=128+i,t[a++]=s/256,t[a++]=s%256,t[a++]=r/65536/256,t[a++]=r/65536%256,t[a++]=r%65536/256,t[a++]=r%65536%256,t[a++]=o/65536/256,t[a++]=o/65536%256,t[a++]=o%65536/256,t[a++]=o%65536%256;let l=t.concat([...e]),h=new Uint8Array(l.length);for(let e=0;e<l.length;e++)h[e]=l[e];return h}opusPacket(e){return e}_sendTalkMsg(e){null===this.tempTimestamp&&(this.tempTimestamp=N());const t=N(),i=t-this.tempTimestamp,s=this._parseAudioMsg(e);this.log(this.TAG_NAME,`send talk msg and diff is ${i} and byteLength is ${s.byteLength} and length is ${s.length}, and ${this._opt.encType} length is ${e.length}`),x(this._opt.saveToTempFile)&&x(this._opt.debug)&&(this._opt.packetType===v?this.addRtpToBuffer(s):this._opt.encType===k||this._opt.encType===T?this.addG711ToBuffer(s):this.addPcmToBuffer(s)),s&&(this.socketStatusOpen?this.socket.send(s.buffer):this.emit(p.tallWebsocketClosedByError)),this.tempTimestamp=t}_doTalk(){this._getUserMedia()}_getUserMedia(){this.log(this.TAG_NAME,"getUserMedia"),void 0===window.navigator.mediaDevices&&(window.navigator.mediaDevices={}),void 0===window.navigator.mediaDevices.getUserMedia&&(this.log(this.TAG_NAME,"window.navigator.mediaDevices.getUserMedia is undefined and init function"),window.navigator.mediaDevices.getUserMedia=function(e){var t=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return t?new Promise((function(i,s){t.call(navigator,e,i,s)})):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}),this._opt.checkGetUserMediaTimeout&&this._startCheckGetUserMediaTimeout(),window.navigator.mediaDevices.getUserMedia({audio:this._opt.audioConstraints,video:!1}).then((e=>{this.log(this.TAG_NAME,"getUserMedia success"),this.userMediaStream=e,this.mediaStreamSource=this.audioContext.createMediaStreamSource(e),this.mediaStreamSource.connect(this.biquadFilter),this.recorder?(this.biquadFilter.connect(this.recorder),this.recorder.connect(this.gainNode)):this.workletRecorder&&(this.biquadFilter.connect(this.workletRecorder),this.workletRecorder.connect(this.gainNode)),this.gainNode.connect(this.audioContext.destination),this.emit(s),null===e.oninactive&&(e.oninactive=e=>{this._handleStreamInactive(e)})})).catch((e=>{this.error(this.TAG_NAME,"getUserMedia error",e.toString()),this.emit(r,e.toString())})).finally((()=>{this.log(this.TAG_NAME,"getUserMedia finally"),this._stopCheckGetUserMediaTimeout()}))}_getUserMedia2(){this.log(this.TAG_NAME,"getUserMedia"),navigator.mediaDevices?navigator.mediaDevices.getUserMedia({audio:!0}).then((e=>{this.log(this.TAG_NAME,"getUserMedia2 success")})):navigator.getUserMedia({audio:!0},this.log(this.TAG_NAME,"getUserMedia2 success"),this.log(this.TAG_NAME,"getUserMedia2 fail"))}async _getUserMedia3(){this.log(this.TAG_NAME,"getUserMedia3");try{const e=await navigator.mediaDevices.getUserMedia({audio:{latency:!0,noiseSuppression:!0,autoGainControl:!0,echoCancellation:!0,sampleRate:48e3,channelCount:1},video:!1});console.log("getUserMedia() got stream:",e),this.log(this.TAG_NAME,"getUserMedia3 success")}catch(e){this.log(this.TAG_NAME,"getUserMedia3 fail")}}_handleStreamInactive(e){this.userMediaStream&&(this.warn(this.TAG_NAME,"stream oninactive",e),this.emit(u))}_startCheckGetUserMediaTimeout(){this._stopCheckGetUserMediaTimeout(),this.checkGetUserMediaTimeout=setTimeout((()=>{this.log(this.TAG_NAME,"check getUserMedia timeout"),this.emit(o)}),this._opt.getUserMediaTimeout)}_stopCheckGetUserMediaTimeout(){this.checkGetUserMediaTimeout&&(this.log(this.TAG_NAME,"stop checkGetUserMediaTimeout"),clearTimeout(this.checkGetUserMediaTimeout),this.checkGetUserMediaTimeout=null)}_startHeartInterval(){this.heartInterval=setInterval((()=>{this.log(this.TAG_NAME,"heart interval");let e=[35,36,0,0,0,0,0,0];e=new Uint8Array(e),this.socket.send(e.buffer)}),15e3)}_stopHeartInterval(){this.heartInterval&&(this.log(this.TAG_NAME,"stop heart interval"),clearInterval(this.heartInterval),this.heartInterval=null)}startTalk(e){return new Promise(((t,i)=>{if(!function(){let e=!1;const t=window.navigator;return t&&(e=!(!t.mediaDevices||!t.mediaDevices.getUserMedia),e||(e=!!(t.getUserMedia||t.webkitGetUserMedia||t.mozGetUserMedia||t.msGetUserMedia))),e}())return i("not support getUserMedia");if(this.wsUrl=e,this._opt.testMicrophone)this._doTalk();else{if(!this.wsUrl)return i("wsUrl is null");this._createWebSocket().catch((e=>{i(e)}))}this.once(r,(()=>{i("getUserMedia fail")})),this.once(s,(()=>{t()}))}))}setVolume(e){var t,i,s;(e=parseFloat(e).toFixed(2),isNaN(e))||(t=e,i=0,s=1,e=Math.max(Math.min(t,Math.max(i,s)),Math.min(i,s)),this.gainNode.gain.value=e)}getOption(){return this._opt}get volume(){return this.gainNode?parseFloat(100*this.gainNode.gain.value).toFixed(0):null}}class H extends e{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this.talk=null,this._opt=e,this.LOG_TAG="JbProTalk",this.debug=new q(this),this.debug.log(this.LOG_TAG,"init",JSON.stringify(e))}destroy(){this.debug.log(this.LOG_TAG,"destroy()"),this.off(),this.talk&&(this.talk.destroy(),this.talk=null),this.debug.log(this.LOG_TAG,"destroy")}_initTalk(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.talk&&(this.debug.log(this.LOG_TAG,"_initTalk this.talk is not null and destroy"),this.talk.destroy(),this.talk=null);const t=Object.assign({},W(this._opt),e);this.talk=new $(null,t),this.debug.log(this.LOG_TAG,"_initTalk",this.talk.getOption()),this._bindTalkEvents()}_bindTalkEvents(){Object.keys(d).forEach((e=>{this.talk.on(d[e],(t=>{this.emit(e,t)}))}))}startTalk(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,s)=>{this.debug.log(this.LOG_TAG,"startTalk",e,JSON.stringify(t)),this._initTalk(t),this.talk.startTalk(e).then((()=>{i(),this.talk.once(l,(()=>{this.debug.warn(this.LOG_TAG,"talkStreamClose -> stopTalk"),this.stopTalk().catch((e=>{this.debug.warn(this.LOG_TAG,"talkStreamClose stopTalk",e)})).finally((()=>{this.emit(c,l)}))})),this.talk.once(h,(e=>{this.debug.error(this.LOG_TAG,"talkStreamError -> stopTalk"),this.stopTalk().catch((e=>{this.debug.warn(this.LOG_TAG,"talkStreamError stopTalk",e)})).finally((()=>{this.emit(c,h)}))})),this.talk.once(u,(()=>{this.debug.warn(this.LOG_TAG,"talkStreamInactive -> stopTalk"),this.stopTalk().catch((e=>{this.debug.warn(this.LOG_TAG,"talkStreamInactive stopTalk",e)})).finally((()=>{this.emit(c,u)}))})),this.talk.once(o,(()=>{this.debug.warn(this.LOG_TAG,"talkGetUserMediaTimeout -> stopTalk"),this.stopTalk().catch((e=>{this.debug.warn(this.LOG_TAG,"talkGetUserMediaTimeout stopTalk",e)})).finally((()=>{this.emit(c,o)}))}))})).catch((e=>{s(e)}))}))}stopTalk(){return new Promise(((e,t)=>{this.debug.log(this.LOG_TAG,"stopTalk()"),this.talk||t("talk is not init"),this.talk.destroy(),this.talk=null,e()}))}getTalkVolume(){return new Promise(((e,t)=>{this.talk||t("talk is not init"),e(this.talk.volume)}))}setTalkVolume(e){return new Promise(((t,i)=>{this.debug.log(this.LOG_TAG,"setTalkVolume",e),this.talk||i("talk is not init"),this.talk.setVolume(e/100),t()}))}downloadTempRtpFile(){return new Promise(((e,t)=>{this.talk?(this.talk.downloadRtpFile(),e()):t("talk is not init")}))}downloadTempG711File(){return new Promise(((e,t)=>{this.talk?(this.talk.downloadG711File(),e()):t("talk is not init")}))}downloadTempPcmFile(){return new Promise(((e,t)=>{this.talk?(this.talk.downloadPcmFile(),e()):t("talk is not init")}))}downloadTempFile(){return new Promise(((e,t)=>{this.talk?(this.talk.downloadFile(),e()):t("talk is not init")}))}}return H.EVENTS=d,window.JessibucaProTalk=H,window.JbProTalk=H,window.WebPlayerProTalk=H,H})); diff --git a/vue/src/views/components/player/public/web-player-pro-multi.js b/vue/src/views/components/player/public/web-player-pro-multi.js deleted file mode 100644 index d0f6e251..00000000 --- a/vue/src/views/components/player/public/web-player-pro-multi.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("crypto")):"function"==typeof define&&define.amd?define(["crypto"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["web-player-pro-multi"]=t(e.crypto$1)}(this,(function(t){"use strict";function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=s(t);class a{on(e,t,i){const s=this.e||(this.e={});return(s[e]||(s[e]=[])).push({fn:t,ctx:i}),this}once(e,t,i){const s=this;function r(){s.off(e,r);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];t.apply(i,o)}return r._=t,this.on(e,r,i)}emit(e){const t=((this.e||(this.e={}))[e]||[]).slice();for(var i=arguments.length,s=new Array(i>1?i-1:0),r=1;r<i;r++)s[r-1]=arguments[r];for(let e=0;e<t.length;e+=1)t[e].fn.apply(t[e].ctx,s);return this}off(e,t){const i=this.e||(this.e={});if(!e)return Object.keys(i).forEach((e=>{delete i[e]})),void delete this.e;const s=i[e],r=[];if(s&&t)for(let e=0,i=s.length;e<i;e+=1)s[e].fn!==t&&s[e].fn._!==t&&r.push(s[e]);return r.length?i[e]=r:delete i[e],this}}const o=1,n=2,l=3,d=4,h=5,c=6,u=["","websocket","fetch","hls","webrtc","webTransport","aliyunRtc","ts"],p="fetch",f="hls",m="websocket",g="webrtc",y="webTransport",A="worker",b="aliyunRtc",_="player",v="playerAudio",w="playbackTF",S="mp4",T="webm",E="flv",k="flv",C="m7s",x="hls",R="webrtc",D="webTransport",L="nakedFlow",I="fmp4",P="mpeg4",B="aliyunRtc",M="ts",U={flv:"FLV",m7s:"M7S",hls:"HLS",fmp4:"FMP4",mpeg4:"MPEG4",webrtc:"Webrtc",webTransport:"WebTransport",nakedFlow:"裸流",aliyunRtc:"AliyunRtc",ts:"TS"},F="mse",O="wcs",N="offscreen",j="wasm",G="simd",z="mt",$="webrtc",H="hls",V="aliyunRtc",W="canvas",J="video",q="debug",K="warn",Y="click",Q="mouseDownAndUp",X={normal:"normal",simple:"simple"},Z=36e5,ee="/crypto/",te="jbprov",ie=1e4,se={url:"",playbackConfig:{},fullscreenWatermarkConfig:{},playType:_,playbackForwardMaxRateDecodeIFrame:4,playOptions:{},isLive:!0,isMulti:!0,isM7sCrypto:!1,supportHls265:!1,playFailedUseLastFrameShow:!0,playFailedAndPausedShowMessage:!1,pauseAndNextPlayUseLastFrameShow:!1,widthOrHeightChangeReplayDelayTime:0,isUseNewFullscreenWatermark:!1,websocket1006ErrorReplay:!1,websocket1006ErrorReplayDelayTime:1,streamErrorReplay:!1,streamErrorReplayDelayTime:1,streamEndReplay:!1,streamEndReplayDelayTime:1,networkDisconnectReplay:!1},re={playType:_,container:"",videoBuffer:1e3,videoBufferDelay:1e3,networkDelay:1e4,isResize:!0,isFullResize:!1,isFlv:!1,isHls:!1,isFmp4:!1,isFmp4Private:!1,isWebrtc:!1,isWebrtcForZLM:!1,isWebrtcForSRS:!1,isWebrtcForOthers:!1,isNakedFlow:!1,isMpeg4:!1,isAliyunRtc:!1,isTs:!1,debug:!1,debugLevel:K,debugUuid:"",isMulti:!0,multiIndex:-1,hotKey:!1,loadingTimeout:10,heartTimeout:10,timeout:10,pageVisibilityHiddenTimeout:300,loadingTimeoutReplay:!0,heartTimeoutReplay:!0,loadingTimeoutReplayTimes:3,heartTimeoutReplayTimes:3,heartTimeoutReplayUseLastFrameShow:!0,replayUseLastFrameShow:!0,replayShowLoadingIcon:!1,supportDblclickFullscreen:!1,showBandwidth:!1,showPerformance:!1,mseCorrectTimeDuration:20,mseCorrectAudioTimeDuration:20,keepScreenOn:!0,isNotMute:!1,muted:!0,hasAudio:!0,hasVideo:!0,operateBtns:{fullscreen:!1,screenshot:!1,play:!1,audio:!1,record:!1,ptz:!1,quality:!1,zoom:!1,close:!1,scale:!1,performance:!1,logSave:!1,aiFace:!1,aiObject:!1,aiOcclusion:!1,fullscreenFn:null,fullscreenExitFn:null,screenshotFn:null,playFn:null,pauseFn:null,recordFn:null,recordStopFn:null},extendOperateBtns:[],contextmenuBtns:[],watermarkConfig:{},controlAutoHide:!1,hasControl:!1,loadingIcon:!0,loadingIconStyle:{},loadingText:"",background:"",poster:"",backgroundLoadingShow:!0,loadingBackground:"",loadingBackgroundWidth:0,loadingBackgroundHeight:0,decoder:"decoder-pro.js",decoderAudio:"decoder-pro-audio.js",decoderHard:"decoder-pro-hard.js",decoderHardNotWasm:"decoder-pro-hard-not-wasm.js",wasmMp4RecorderDecoder:"jessibuca-pro-mp4-recorder-decoder.js",decoderWASM:"",isDecoderUseCDN:!1,url:"",rotate:0,mirrorRotate:"none",aspectRatio:"default",playbackConfig:{playList:[],fps:"",showControl:!0,controlType:X.normal,duration:0,startTime:"",showRateBtn:!1,rateConfig:[],showPrecision:"",showPrecisionBtn:!0,isCacheBeforeDecodeForFpsRender:!1,uiUsePlaybackPause:!1,isPlaybackPauseClearCache:!0,isUseFpsRender:!1,isUseLocalCalculateTime:!1,localOneFrameTimestamp:40,supportWheel:!1,useWCS:!1,useMSE:!1},qualityConfig:[],defaultStreamQuality:"",scaleConfig:["拉伸","缩放","正常"],forceNoOffscreen:!0,hiddenAutoPause:!1,protocol:n,demuxType:k,useWasm:!1,useMSE:!1,useWCS:!1,useSIMD:!0,useMThreading:!1,wcsUseVideoRender:!0,wcsUseWebgl2Render:!0,wasmUseVideoRender:!0,mseUseCanvasRender:!1,hlsUseCanvasRender:!1,webrtcUseCanvasRender:!1,useOffscreen:!1,useWebGPU:!1,mseDecodeErrorReplay:!0,wcsDecodeErrorReplay:!0,wasmDecodeErrorReplay:!0,simdDecodeErrorReplay:!0,simdDecodeErrorReplayType:j,autoWasm:!0,decoderErrorAutoWasm:!0,hardDecodingNotSupportAutoWasm:!0,webglAlignmentErrorReplay:!0,webglContextLostErrorReplay:!0,openWebglAlignment:!1,syncAudioAndVideo:!1,syncAudioAndVideoDiff:500,playbackDelayTime:1e3,playbackFps:25,playbackForwardMaxRateDecodeIFrame:4,playbackCurrentTimeMove:!0,useVideoRender:!0,useCanvasRender:!1,networkDelayTimeoutReplay:!1,recordType:S,checkFirstIFrame:!0,nakedFlowFps:25,audioEngine:null,isShowRecordingUI:!0,isShowZoomingUI:!0,useFaceDetector:!1,useObjectDetector:!1,useImageDetector:!1,useOcclusionDetector:!1,ptzPositionConfig:{},ptzShowType:"vertical",ptzClickType:Y,ptzStopEmitDelay:.3,ptzZoomShow:!1,ptzApertureShow:!1,ptzFocusShow:!1,ptzMoreArrowShow:!1,ptzCruiseShow:!1,ptzFogShow:!1,ptzWiperShow:!1,ptzSupportDraggable:!1,weiXinInAndroidAudioBufferSize:4800,isM7sCrypto:!1,m7sCryptoAudio:!1,isSm4Crypto:!1,isXorCrypto:!1,sm4CryptoKey:"",m7sCryptoKey:"",xorCryptoKey:"",cryptoKey:"",cryptoIV:"",cryptoKeyUrl:"",autoResize:!1,useWebFullScreen:!1,ptsMaxDiff:3600,aiFaceDetectLevel:2,aiFaceDetectWidth:240,aiFaceDetectShowRect:!0,aiFaceDetectInterval:1e3,aiFaceDetectRectConfig:{},aiObjectDetectLevel:2,aiObjectDetectWidth:240,aiObjectDetectShowRect:!0,aiObjectDetectInterval:1e3,aiObjectDetectRectConfig:{},aiOcclusionDetectInterval:1e3,aiImageDetectDrop:!1,aiImageDetectActive:!1,videoRenderSupportScale:!0,mediaSourceTsIsMaxDiffReplay:!0,controlHtml:"",isH265:!1,isWebrtcH265:!1,supportLockScreenPlayAudio:!0,supportHls265:!1,isEmitSEI:!1,pauseAndNextPlayUseLastFrameShow:!1,demuxUseWorker:!0,playFailedAndReplay:!0,showMessageConfig:{webglAlignmentError:"Webgl 渲染失败",webglContextLostError:"webgl 上下文丢失",mediaSourceH265NotSupport:"不支持硬解码H265",mediaSourceFull:"缓冲区已满",mediaSourceAppendBufferError:"初始化解码器失败",mseSourceBufferError:"解码失败",mseAddSourceBufferError:"初始化解码器失败",mediaSourceDecoderConfigurationError:"初始化解码器失败",mediaSourceTsIsMaxDiff:"流异常",mseWidthOrHeightChange:"流异常",mediaSourceAudioG711NotSupport:"硬解码不支持G711a/u音频格式",mediaSourceUseCanvasRenderPlayFailed:"MediaSource解码使用canvas渲染失败",webcodecsH265NotSupport:"不支持硬解码H265",webcodecsUnsupportedConfigurationError:"初始化解码器失败",webcodecsDecodeConfigureError:"初始化解码器失败",webcodecsDecodeError:"解码失败",wcsWidthOrHeightChange:"解码失败",wasmDecodeError:"解码失败",simdDecodeError:"解码失败",wasmWidthOrHeightChange:"流异常",wasmUseVideoRenderError:"video自动渲染失败",videoElementPlayingFailed:"video自动渲染失败",simdH264DecodeVideoWidthIsTooLarge:"不支持该分辨率的视频",networkDelayTimeout:"网络超时重播失败",fetchError:"请求失败",streamEnd:"请求结束",websocketError:"请求失败",webrtcError:"请求失败",hlsError:"请求失败",decoderWorkerInitError:"初始化worker失败",videoElementPlayingFailedForWebrtc:"video自动渲染失败",videoInfoError:"解析视频分辨率失败",webrtcStreamH265:"webrtc不支持H265",delayTimeout:"播放超时重播失败",loadingTimeout:"加载超时重播失败",loadingTimeoutRetryEnd:"加载超时重播失败",delayTimeoutRetryEnd:"播放超时重播失败"},videoElementPlayingFailedReplay:!0,mp4RecordUseWasm:!0,mseAutoCleanupSourceBuffer:!0,mseAutoCleanupMaxBackwardDuration:30,mseAutoCleanupMinBackwardDuration:10,widthOrHeightChangeReplay:!0,simdH264DecodeVideoWidthIsTooLargeReplay:!0,mediaSourceAudioG711NotSupportReplay:!0,mediaSourceAudioInitTimeoutReplay:!0,mediaSourceUseCanvasRenderPlayFailedReplay:!0,mediaSourceUseCanvasRenderPlayFailedReplayType:J,widthOrHeightChangeReplayDelayTime:0,ghostWatermarkConfig:{on:5,off:5,content:"",fontSize:12,color:"white",opacity:.15,speed:.2},dynamicWatermarkConfig:{content:"",speed:.2,fontSize:12,color:"white",opacity:.15},isDropSameTimestampGop:!1,mseDecodeAudio:!1,nakedFlowH265DemuxUseNew:!0,extendDomConfig:{html:"",showBeforePlay:!1,showAfterLoading:!0},disableContextmenu:!1,mseDecoderUseWorker:!1,openMemoryLog:!1,mainThreadFetchUseWorker:!0,playFailedAndPausedShowPlayBtn:!0,mseCorrectionTimestamp:!0,flvDemuxBufferSizeTooLargeReplay:!1,flvDemuxBufferSizeTooLargeEmitFailed:!1,flvDemuxBufferSizeMaxLarge:1048576,isCheckInView:!1,hiddenControl:!1},ae="init",oe="initVideo",ne="render",le="playAudio",de="initAudio",he="audioCode",ce="audioNalu",ue="audioAACSequenceHeader",pe="videoCode",fe="videoCodec",me="videoNalu",ge="videoPayload",ye="audioPayload",Ae="wasmError",be="workerFetch",_e="iframeIntervalTs",ve="isDropping",we="workerEnd",Se="playbackStreamVideoFps",Te="wasmDecodeVideoNoResponseError",Ee="wasmWidthOrHeightChange",ke="simdDecodeError",Ce="simdH264DecodeVideoWidthIsTooLarge",xe="closeEnd",Re="tempStream",De="videoSEI",Le="flvScriptData",Ie="aacSequenceHeader",Pe="videoSequenceHeader",Be="flvBufferData",Me="checkFirstIFrame",Ue="mseHandle",Fe="mseFirstRenderTime",Oe="mseError",Ne="Invalid NAL unit size",je=1,Ge=2,ze=8,$e=9,He=18,Ve="init",We="decode",Je="audioDecode",qe="videoDecode",Ke="close",Ye="updateConfig",Qe="clearBuffer",Xe="fetchStream",Ze="sendWsMessage",et="mseUpdateVideoTimestamp",tt="fetch",it="destroy",st="destroyEnd",rt="buffer",at="fetchError",ot="fetchClose",nt="fetchSuccess",lt={fullscreen:"fullscreen$2",webFullscreen:"webFullscreen",decoderWorkerInit:"decoderWorkerInit",play:"play",playing:"playing",pause:"pause",mute:"mute",load:"load",loading:"loading",zooming:"zooming",videoInfo:"videoInfo",timeUpdate:"timeUpdate",audioInfo:"audioInfo",log:"log",error:"error",kBps:"kBps",timeout:"timeout",delayTimeout:"delayTimeout",delayTimeoutRetryEnd:"delayTimeoutRetryEnd",loadingTimeout:"loadingTimeout",loadingTimeoutRetryEnd:"loadingTimeoutRetryEnd",stats:"stats",performance:"performance",videoSmooth:"videoSmooth",faceDetectActive:"faceDetectActive",objectDetectActive:"objectDetectActive",occlusionDetectActive:"occlusionDetectActive",imageDetectActive:"imageDetectActive",record:"record",recording:"recording",recordingTimestamp:"recordingTimestamp",recordStart:"recordStart",recordEnd:"recordEnd",recordCreateError:"recordCreateError",recordBlob:"recordBlob",buffer:"buffer",videoFrame:"videoFrame",videoSEI:"videoSEI",start:"start",metadata:"metadata",resize:"resize",volumechange:"volumechange",volume:"volume",destroy:"destroy",beforeDestroy:"beforeDestroy",streamEnd:"streamEnd",streamRate:"streamRate",streamAbps:"streamAbps",streamVbps:"streamVbps",streamDts:"streamDts",streamSuccess:"streamSuccess",streamMessage:"streamMessage",streamError:"streamError",streamStats:"streamStats",mseSourceOpen:"mseSourceOpen",mseSourceClose:"mseSourceClose",mseSourceended:"mseSourceended",mseSourceStartStreaming:"mseSourceStartStreaming",mseSourceEndStreaming:"mseSourceEndStreaming",mseSourceBufferError:"mseSourceBufferError",mseAddSourceBufferError:"mseAddSourceBufferError",mseSourceBufferBusy:"mseSourceBufferBusy",mseSourceBufferFull:"mseSourceBufferFull",videoWaiting:"videoWaiting",videoTimeUpdate:"videoTimeUpdate",videoSyncAudio:"videoSyncAudio",playToRenderTimes:"playToRenderTimes",playbackTime:"playbackTime",playbackTimestamp:"playbackTimestamp",playbackTimeScroll:"playbackTimeScroll",playbackPrecision:"playbackPrecision",playbackShowPrecisionChange:"playbackShowPrecisionChange",playbackJustTime:"playbackJustTime",playbackStats:"playbackStats",playbackSeek:"playbackSeek",playbackPause:"playbackPause",playbackPauseOrResume:"playbackPauseOrResume",playbackRateChange:"playbackRateChange",playbackPreRateChange:"playbackPreRateChange",ptz:"ptz",streamQualityChange:"streamQualityChange",visibilityChange:"visibilityChange",netBuf:"netBuf",close:"close",networkDelayTimeout:"networkDelayTimeout",togglePerformancePanel:"togglePerformancePanel",viewResizeChange:"viewResizeChange",flvDemuxBufferSizeTooLarge:"flvDemuxBufferSizeTooLarge",talkGetUserMediaSuccess:"talkGetUserMediaSuccess",talkGetUserMediaFail:"talkGetUserMediaFail",talkGetUserMediaTimeout:"talkGetUserMediaTimeout",talkStreamStart:"talkStreamStart",talkStreamOpen:"talkStreamOpen",talkStreamClose:"talkStreamClose",talkStreamError:"talkStreamError",talkStreamInactive:"talkStreamInactive",webrtcDisconnect:"webrtcDisconnect",webrtcFailed:"webrtcFailed",webrtcClosed:"webrtcClosed",webrtcOnConnectionStateChange:"webrtcOnConnectionStateChange",webrtcOnIceConnectionStateChange:"webrtcOnIceConnectionStateChange",crashLog:"crashLog",focus:"focus",blur:"blur",inView:"inView",visibilityHiddenTimeout:"visibilityHiddenTimeout",websocketOpen:"websocketOpen",websocketClose:"websocketClose",websocketError:"websocketError",websocketMessage:"websocketMessage",aiObjectDetectorInfo:"aiObjectDetectorInfo",aiFaceDetectorInfo:"aiFaceDetectorInfo",aiOcclusionDetectResult:"aiOcclusionDetectResult",aiImageDetectResult:"aiImageDetectResult",playFailedAndPaused:"playFailedAndPaused",audioResumeState:"audioResumeState",webrtcStreamH265:"webrtcStreamH265",flvMetaData:"flvMetaData",talkFailedAndStop:"talkFailedAndStop",removeLoadingBgImage:"removeLoadingBgImage",memoryLog:"memoryLog",downloadMemoryLog:"downloadMemoryLog",pressureObserverCpu:"pressureObserverCpu",currentPts:"currentPts",online:"online",offline:"offline",networkState:"networkState"},dt={load:lt.load,timeUpdate:lt.timeUpdate,videoInfo:lt.videoInfo,audioInfo:lt.audioInfo,error:lt.error,kBps:lt.kBps,start:lt.start,timeout:lt.timeout,loadingTimeout:lt.loadingTimeout,loadingTimeoutRetryEnd:lt.loadingTimeoutRetryEnd,delayTimeout:lt.delayTimeout,delayTimeoutRetryEnd:lt.delayTimeoutRetryEnd,fullscreen:"fullscreen",webFullscreen:lt.webFullscreen,play:lt.play,pause:lt.pause,mute:lt.mute,stats:lt.stats,performance:lt.performance,recordingTimestamp:lt.recordingTimestamp,recordStart:lt.recordStart,recordCreateError:lt.recordCreateError,recordEnd:lt.recordEnd,recordBlob:lt.recordBlob,playToRenderTimes:lt.playToRenderTimes,playbackSeek:lt.playbackSeek,playbackStats:lt.playbackStats,playbackTimestamp:lt.playbackTimestamp,playbackPauseOrResume:lt.playbackPauseOrResume,playbackPreRateChange:lt.playbackPreRateChange,playbackRateChange:lt.playbackRateChange,playbackShowPrecisionChange:lt.playbackShowPrecisionChange,ptz:lt.ptz,streamQualityChange:lt.streamQualityChange,zooming:lt.zooming,crashLog:lt.crashLog,focus:lt.focus,blur:lt.blur,visibilityHiddenTimeout:lt.visibilityHiddenTimeout,visibilityChange:lt.visibilityChange,websocketOpen:lt.websocketOpen,websocketClose:lt.websocketClose,networkDelayTimeout:lt.networkDelayTimeout,aiObjectDetectorInfo:lt.aiObjectDetectorInfo,aiFaceDetectorInfo:lt.aiFaceDetectorInfo,aiOcclusionDetectResult:lt.aiOcclusionDetectResult,aiImageDetectResult:lt.aiImageDetectResult,playFailedAndPaused:lt.playFailedAndPaused,streamEnd:lt.streamEnd,audioResumeState:lt.audioResumeState,videoSEI:lt.videoSEI,flvMetaData:lt.flvMetaData,webrtcOnConnectionStateChange:lt.webrtcOnConnectionStateChange,webrtcOnIceConnectionStateChange:lt.webrtcOnIceConnectionStateChange,currentPts:lt.currentPts,videoSmooth:lt.videoSmooth,networkState:lt.networkState,volume:lt.volume},ht={talkStreamClose:lt.talkStreamClose,talkStreamError:lt.talkStreamError,talkStreamInactive:lt.talkStreamInactive,talkGetUserMediaTimeout:lt.talkGetUserMediaTimeout,talkFailedAndStop:lt.talkFailedAndStop},ct={talkStreamError:lt.talkStreamError,talkStreamClose:lt.talkStreamClose},ut={playError:"playIsNotPauseOrUrlIsNull",fetchError:"fetchError",websocketError:"websocketError",webcodecsH265NotSupport:"webcodecsH265NotSupport",webcodecsDecodeError:"webcodecsDecodeError",webcodecsUnsupportedConfigurationError:"webcodecsUnsupportedConfigurationError",webcodecsDecodeConfigureError:"webcodecsDecodeConfigureError",mediaSourceH265NotSupport:"mediaSourceH265NotSupport",mediaSourceAudioG711NotSupport:"mediaSourceAudioG711NotSupport",mediaSourceAudioInitTimeout:"mediaSourceAudioInitTimeout",mediaSourceAudioNoDataTimeout:"mediaSourceAudioNoDataTimeout",mediaSourceDecoderConfigurationError:"mediaSourceDecoderConfigurationError",mediaSourceFull:lt.mseSourceBufferFull,mseSourceBufferError:lt.mseSourceBufferError,mseAddSourceBufferError:lt.mseAddSourceBufferError,mediaSourceAppendBufferError:"mediaSourceAppendBufferError",mediaSourceTsIsMaxDiff:"mediaSourceTsIsMaxDiff",mediaSourceUseCanvasRenderPlayFailed:"mediaSourceUseCanvasRenderPlayFailed",mediaSourceBufferedIsZeroError:"mediaSourceBufferedIsZeroError",wasmDecodeError:"wasmDecodeError",wasmUseVideoRenderError:"wasmUseVideoRenderError",hlsError:"hlsError",webrtcError:"webrtcError",webrtcClosed:lt.webrtcClosed,webrtcIceCandidateError:"webrtcIceCandidateError",webglAlignmentError:"webglAlignmentError",wasmWidthOrHeightChange:"wasmWidthOrHeightChange",mseWidthOrHeightChange:"mseWidthOrHeightChange",wcsWidthOrHeightChange:"wcsWidthOrHeightChange",widthOrHeightChange:"widthOrHeightChange",tallWebsocketClosedByError:"tallWebsocketClosedByError",flvDemuxBufferSizeTooLarge:lt.flvDemuxBufferSizeTooLarge,wasmDecodeVideoNoResponseError:"wasmDecodeVideoNoResponseError",audioChannelError:"audioChannelError",simdH264DecodeVideoWidthIsTooLarge:"simdH264DecodeVideoWidthIsTooLarge",simdDecodeError:"simdDecodeError",webglContextLostError:"webglContextLostError",videoElementPlayingFailed:"videoElementPlayingFailed",videoElementPlayingFailedForWebrtc:"videoElementPlayingFailedForWebrtc",decoderWorkerInitError:"decoderWorkerInitError",videoInfoError:"videoInfoError",videoCodecIdError:"videoCodecIdError",streamEnd:lt.streamEnd,websocket1006Error:"websocket1006Error",delayTimeout:lt.delayTimeout,loadingTimeout:lt.loadingTimeout,networkDelayTimeout:lt.networkDelayTimeout,aliyunRtcError:"aliyunRtcError",...ct},pt="notConnect",ft="open",mt="close",gt="error",yt={download:"download",base64:"base64",blob:"blob"},At="download",bt="blob",_t={7:"H264(AVC)",12:"H265(HEVC)",99:"MPEG4"},vt=7,wt=12,St="H264(AVC)",Tt="H265(HEVC)",Et=10,kt=2,Ct={AAC:"AAC",ALAW:"ALAW(g711a)",MULAW:"MULAW(g711u)",MP3:"MP3"},xt={10:"AAC",7:"ALAW",8:"MULAW",2:"MP3"},Rt=7,Dt=8,Lt=5,It=1,Pt=5,Bt=6,Mt=7,Ut=8,Ft=14,Ot=19,Nt=20,jt=21,Gt=32,zt=32,$t=33,Ht=33,Vt=34,Wt=34,Jt=39,qt=39,Kt=40,Yt=38,Qt=48,Xt=0,Zt=1,ei=2,ti="webcodecs",ii="webgl",si="webgl2",ri="webgpu",ai="offscreen",oi="mse",ni="hls",li="webrtc",di="key",hi="delta",ci='video/mp4; codecs="avc1.64002A"',ui='video/mp4; codecs="hev1.1.6.L123.b0"',pi='video/mp4;codecs="hev1.1.6.L120.90"',fi='video/mp4;codecs="hev1.2.4.L120.90"',mi='video/mp4;codecs="hev1.3.E.L120.90"',gi='video/mp4;codecs="hev1.4.10.L120.90"',yi="ended",Ai="open",bi="closed",_i=27,vi=38,wi=40,Si="oneHour",Ti="halfHour",Ei="tenMin",ki="fiveMin",Ci={oneHour:"one-hour",halfHour:"half-hour",tenMin:"ten-min",fiveMin:"five-min"},xi=["oneHour","halfHour","tenMin","fiveMin"],Ri=["up","right","down","left","left-up","right-up","left-down","right-down"],Di="stop",Li="fiStop",Ii="zoomExpand",Pi="zoomNarrow",Bi="apertureFar",Mi="apertureNear",Ui="focusFar",Fi="focusNear",Oi="cruiseStart",Ni="cruiseStop",ji="fogOpen",Gi="fogClose",zi="wiperOpen",$i="wiperClose",Hi="g711a",Vi="g711u",Wi="pcm",Ji="opus",qi={png:"image/png",jpeg:"image/jpeg",webp:"image/webp"},Ki="sourceclose",Yi="sourceopen",Qi="sourceended",Xi="startstreaming",Zi="endstreaming",es="qualitychange",ts="canplay",is="waiting",ss="timeupdate",rs="ratechange",as="avc",os="hevc",ns="A key frame is required after configure() or flush()",ls="Cannot call 'decode' on a closed codec",ds="Unsupported configuration",hs="Decoder failure",cs="Decoding error",us="Decoder error",ps="HEVC decoding is not supported",fs="The user aborted a request",ms="AbortError",gs="AbortError",ys="loading",As="playing",bs="paused",_s="destroy",vs=0,ws=1,Ss=8,Ts=0,Es=98,ks="empty",Cs="rtp",xs="tcp",Rs="open",Ds="close",Ls="error",Is="message",Ps="worklet",Bs="script",Ms={encType:Hi,packetType:Cs,packetTcpSendType:xs,rtpSsrc:"0000000000",numberChannels:1,sampleRate:8e3,sampleBitsWidth:16,sendInterval:20,debug:!1,debugLevel:K,testMicrophone:!1,saveToTempFile:!1,audioBufferLength:160,engine:Ps,checkGetUserMediaTimeout:!1,getUserMediaTimeout:1e4,audioConstraints:{latency:!0,noiseSuppression:!0,autoGainControl:!0,echoCancellation:!0,sampleRate:48e3,channelCount:1}},Us="worklet",Fs="script",Os="active",Ns={name:"",index:0,icon:"",iconHover:"",iconTitle:"",activeIcon:"",activeIconHover:"",activeIconTitle:"",click:null,activeClick:null},js={content:"",click:null,index:0},Gs={container:"",maxSplit:4,split:1,draggable:!1,showSelectedBorder:!0,supportDblclickContainerFullscreen:!1,supportMousemoveEvent:!1,style:{border:"#343434",borderSelect:"#FFCC00",background:"#000"}},zs={multiFullscreen:"multiFullscreen",dblSelected:"multiDblSelected",selected:"multiSelected",mouseover:"multiMouseover",mouseout:"multiMouseout",mouseup:"multiMouseup",mousedown:"multiMousedown",mousemove:"multiMousemove",dragstart:"multiDragstart",dragenter:"multiDragenter",dragleave:"multiDragleave",drop:"multiDrop"},$s="3-1",Hs="4-1",Vs=1,Ws="subtitle-segments",Js="hls-manifest-loaded",qs="hls-level-loaded",Ks="demuxed-track",Ys="flv-script-data",Qs="metadata-parsed",Xs="ttfb",Zs="load-retry",er="load-start",tr="speed",ir="load-complete",sr="load-response-headers",rr="sei",ar="sei-in-time",or="switch-url-failed",nr="switch-url-success",lr="subtitle-playlist",dr="stream-parsed",hr="error",cr=[0,160,240,320,480,640],ur=[0,160,240,320,480,640],pr=["轻松","正常","较高","高"],fr="idle",mr="buffering",gr="complete",yr={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"},Ar="video decoder initialization failed",br="audio packet",_r=1,vr=2,wr=0,Sr=1,Tr=3,Er=16,kr="candidate-pair",Cr="inbound-rtp",xr="local-candidate",Rr="remote-candidate",Dr="track",Lr=9e4,Ir=45e4,Pr=9e4,Br="ws1006",Mr="mseDecodeError",Ur="wcsDecodeError";class Fr{constructor(e){this.log=function(t){if(e._opt.debug&&e._opt.debugLevel==q){const a=e._opt.debugUuid?`[${e._opt.debugUuid}]`:"";for(var i=arguments.length,s=new Array(i>1?i-1:0),r=1;r<i;r++)s[r-1]=arguments[r];console.log(`JbPro${a}[✅✅✅][${t}]`,...s)}},this.warn=function(t){if(e._opt.debug&&(e._opt.debugLevel==q||e._opt.debugLevel==K)){const a=e._opt.debugUuid?`[${e._opt.debugUuid}]`:"";for(var i=arguments.length,s=new Array(i>1?i-1:0),r=1;r<i;r++)s[r-1]=arguments[r];console.log(`JbPro${a}[❗❗❗][${t}]`,...s)}},this.error=function(t){const i=e._opt.debugUuid?`[${e._opt.debugUuid}]`:"";for(var s=arguments.length,r=new Array(s>1?s-1:0),a=1;a<s;a++)r[a-1]=arguments[a];console.error(`JbPro${i}[❌❌❌][${t}]`,...r)}}}var Or="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Nr(e,t){return e(t={exports:{}},t.exports),t.exports}var jr=Nr((function(e){!function(){var t="undefined"!=typeof window&&void 0!==window.document?window.document:{},i=e.exports,s=function(){for(var e,i=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],s=0,r=i.length,a={};s<r;s++)if((e=i[s])&&e[1]in t){for(s=0;s<e.length;s++)a[i[0][s]]=e[s];return a}return!1}(),r={change:s.fullscreenchange,error:s.fullscreenerror},a={request:function(e,i){return new Promise(function(r,a){var o=function(){this.off("change",o),r()}.bind(this);this.on("change",o);var n=(e=e||t.documentElement)[s.requestFullscreen](i);n instanceof Promise&&n.then(o).catch(a)}.bind(this))},exit:function(){return new Promise(function(e,i){if(this.isFullscreen){var r=function(){this.off("change",r),e()}.bind(this);this.on("change",r);var a=t[s.exitFullscreen]();a instanceof Promise&&a.then(r).catch(i)}else e()}.bind(this))},toggle:function(e,t){return this.isFullscreen?this.exit():this.request(e,t)},onchange:function(e){this.on("change",e)},onerror:function(e){this.on("error",e)},on:function(e,i){var s=r[e];s&&t.addEventListener(s,i,!1)},off:function(e,i){var s=r[e];s&&t.removeEventListener(s,i,!1)},raw:s};s?(Object.defineProperties(a,{isFullscreen:{get:function(){return Boolean(t[s.fullscreenElement])}},element:{enumerable:!0,get:function(){return t[s.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(t[s.fullscreenEnabled])}}}),i?e.exports=a:window.screenfull=a):i?e.exports={isEnabled:!1}:window.screenfull={isEnabled:!1}}()}));jr.isEnabled;class Gr{constructor(e){this._buffer=e,this._buffer_index=0,this._total_bytes=e.byteLength,this._total_bits=8*e.byteLength,this._current_word=0,this._current_word_bits_left=0}destroy(){this._buffer=null}_fillCurrentWord(){let e=this._total_bytes-this._buffer_index;if(e<=0)return void console.error("ExpGolomb: _fillCurrentWord() but no bytes available",this._total_bytes,this._buffer_index);let t=Math.min(4,e),i=new Uint8Array(4);i.set(this._buffer.subarray(this._buffer_index,this._buffer_index+t)),this._current_word=new DataView(i.buffer).getUint32(0,!1),this._buffer_index+=t,this._current_word_bits_left=8*t}readBits(e){if(e>32&&console.error("ExpGolomb: readBits() bits exceeded max 32bits!"),e<=this._current_word_bits_left){let t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}let t=this._current_word_bits_left?this._current_word:0;t>>>=32-this._current_word_bits_left;let i=e-this._current_word_bits_left;this._fillCurrentWord();let s=Math.min(i,this._current_word_bits_left),r=this._current_word>>>32-s;return this._current_word<<=s,this._current_word_bits_left-=s,t=t<<s|r,t}readBool(){return 1===this.readBits(1)}readByte(){return this.readBits(8)}_skipLeadingZero(){let e;for(e=0;e<this._current_word_bits_left;e++)if(0!=(this._current_word&2147483648>>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}readUEG(){let e=this._skipLeadingZero();return this.readBits(e+1)-1}readSEG(){let e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}const zr=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,-1,-1,-1],$r=zr,Hr=zr;function Vr(e){let{profile:t,sampleRate:i,channel:s}=e;return new Uint8Array([175,0,t<<3|(14&i)>>1,(1&i)<<7|s<<3])}function Wr(e){return Jr(e)&&e[1]===vs}function Jr(e){return e[0]>>4===Et}function qr(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}}function Kr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4;return 1024*t/e}const Yr=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];class Qr{constructor(e){this.buffer=e,this.buflen=e.length,this.bufpos=0,this.bufoff=0,this.iserro=!1}read(e){let t=0,i=0;for(;e;){if(e<0||this.bufpos>=this.buflen)return this.iserro=!0,0;this.iserro=!1,i=this.bufoff+e>8?8-this.bufoff:e,t<<=i,t+=this.buffer[this.bufpos]>>8-this.bufoff-i&255>>8-i,this.bufoff+=i,e-=i,8==this.bufoff&&(this.bufpos++,this.bufoff=0)}return t}look(e){let t=this.bufpos,i=this.bufoff,s=this.read(e);return this.bufpos=t,this.bufoff=i,s}read_golomb(){let e;for(e=0;0==this.read(1)&&!this.iserro;e++);return(1<<e)+this.read(e)-1}}function Xr(e){let t=e.read(5);return 31===t&&(t=e.read(6)+32),t}function Zr(e,t){return t.sampling_index=e.read(4),15==t.sampling_index?e.read(24):ea[t.sampling_index]}const ea=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,0,0,0],ta=[0,1,2,3,4,5,6,8];class ia{constructor(e){this.data_=e,this.eof_flag_=!1,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&console.error("Could not found ADTS syncword until payload end")}findNextSyncwordOffset(e){let t=e,i=this.data_;for(;;){if(t+7>=i.byteLength)return this.eof_flag_=!0,i.byteLength;if(4095===(i[t+0]<<8|i[t+1])>>>4)return t;t++}}readNextAACFrame(){let e=this.data_,t=null;for(;null==t&&!this.eof_flag_;){let i=this.current_syncword_offset_,s=(8&e[i+1])>>>3,r=(6&e[i+1])>>>1,a=1&e[i+1],o=(192&e[i+2])>>>6,n=(60&e[i+2])>>>2,l=(1&e[i+2])<<2|(192&e[i+3])>>>6,d=(3&e[i+3])<<11|e[i+4]<<3|(224&e[i+5])>>>5;if(e[i+6],i+d>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}let h=1===a?7:9,c=d-h;i+=h;let u=this.findNextSyncwordOffset(i+c);if(this.current_syncword_offset_=u,0!==s&&1!==s||0!==r)continue;let p=e.subarray(i,i+c);t={},t.audio_object_type=o+1,t.sampling_freq_index=n,t.sampling_frequency=$r[n],t.channel_config=l,t.data=p}return t}hasIncompleteData(){return this.has_last_incomplete_data}getIncompleteData(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null}}class sa{constructor(e){this.data_=e,this.eof_flag_=!1,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&console.error("Could not found ADTS syncword until payload end")}findNextSyncwordOffset(e){let t=e,i=this.data_;for(;;){if(t+1>=i.byteLength)return this.eof_flag_=!0,i.byteLength;if(695===(i[t+0]<<3|i[t+1]>>>5))return t;t++}}getLATMValue(e){let t=e.readBits(2),i=0;for(let s=0;s<=t;s++)i<<=8,i|=e.readByte();return i}readNextAACFrame(e){let t=this.data_,i=null;for(;null==i&&!this.eof_flag_;){let s=this.current_syncword_offset_,r=(31&t[s+1])<<8|t[s+2];if(s+3+r>=this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}let a=new Gr(t.subarray(s+3,s+3+r)),o=null;if(a.readBool()){if(null==e){console.warn("StreamMuxConfig Missing"),this.current_syncword_offset_=this.findNextSyncwordOffset(s+3+r),a.destroy();continue}o=e}else{let e=a.readBool();if(e&&a.readBool()){console.error("audioMuxVersionA is Not Supported"),a.destroy();break}if(e&&this.getLATMValue(a),!a.readBool()){console.error("allStreamsSameTimeFraming zero is Not Supported"),a.destroy();break}if(0!==a.readBits(6)){console.error("more than 2 numSubFrames Not Supported"),a.destroy();break}if(0!==a.readBits(4)){console.error("more than 2 numProgram Not Supported"),a.destroy();break}if(0!==a.readBits(3)){console.error("more than 2 numLayer Not Supported"),a.destroy();break}let t=e?this.getLATMValue(a):0,i=a.readBits(5);t-=5;let s=a.readBits(4);t-=4;let r=a.readBits(4);t-=4,a.readBits(3),t-=3,t>0&&a.readBits(t);let n=a.readBits(3);if(0!==n){console.error(`frameLengthType = ${n}. Only frameLengthType = 0 Supported`),a.destroy();break}a.readByte();let l=a.readBool();if(l)if(e)this.getLATMValue(a);else{let e=0;for(;;){e<<=8;let t=a.readBool();if(e+=a.readByte(),!t)break}console.log(e)}a.readBool()&&a.readByte(),o={},o.audio_object_type=i,o.sampling_freq_index=s,o.sampling_frequency=$r[o.sampling_freq_index],o.channel_config=r,o.other_data_present=l}let n=0;for(;;){let e=a.readByte();if(n+=e,255!==e)break}let l=new Uint8Array(n);for(let e=0;e<n;e++)l[e]=a.readByte();i={},i.audio_object_type=o.audio_object_type,i.sampling_freq_index=o.sampling_freq_index,i.sampling_frequency=$r[o.sampling_freq_index],i.channel_config=o.channel_config,i.other_data_present=o.other_data_present,i.data=l,this.current_syncword_offset_=this.findNextSyncwordOffset(s+3+r)}return i}hasIncompleteData(){return this.has_last_incomplete_data}getIncompleteData(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null}}function ra(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}function aa(e){const t=e.byteLength,i=new Uint8Array(4);i[0]=t>>>24&255,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t;const s=new Uint8Array(t+4);return s.set(i,0),s.set(e,4),s}function oa(){}function na(e){let t=null;const i=["webgl","experimental-webgl","moz-webgl","webkit-3d"];let s=0;for(;!t&&s<i.length;){const r=i[s];try{let i={preserveDrawingBuffer:!0};t=e.getContext(r,i)}catch(e){console.error(e),t=null}t&&"function"==typeof t.getParameter||(t=null),++s}return t}function la(e){let t=null;return t=e.getContext("webgl2"),t}function da(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=e.split(","),i=atob(t[1]),s=t[0].replace("data:","").replace(";base64","");let r=i.length,a=new Uint8Array(r);for(;r--;)a[r]=i.charCodeAt(r);return new File([a],"file",{type:s})}function ha(){return(new Date).getTime()}function ca(e,t,i){return Math.max(Math.min(e,Math.max(t,i)),Math.min(t,i))}function ua(e,t,i){if(e)return"object"==typeof t&&Object.keys(t).forEach((i=>{ua(e,i,t[i])})),e.style[t]=i,e}function pa(e,t){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e)return 0;const s=getComputedStyle(e,null).getPropertyValue(t);return i?parseFloat(s):s}function fa(){return performance&&"function"==typeof performance.now?performance.now():Date.now()}function ma(e){let t=0,i=fa();return s=>{if(!Da(s))return;t+=s;const r=fa(),a=r-i;a>=1e3&&(e(t/a*1e3),i=r,t=0)}}(()=>{try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch(e){}})();const ga='"4-1-2024"';function ya(){return/iphone|ipod|android.*mobile|windows.*phone|blackberry.*mobile/i.test(window.navigator.userAgent.toLowerCase())}function Aa(){return!(ya()||/ipad|android(?!.*mobile)|tablet|kindle|silk/i.test(window.navigator.userAgent.toLowerCase()))}function ba(){const e=window.navigator.userAgent.toLowerCase();return/android/i.test(e)}function _a(){const e=window.navigator.userAgent.toLowerCase();return/firefox/i.test(e)}function va(){const e=window.navigator.userAgent.toLowerCase()||"",t={type:"",version:""},i={IE:window.ActiveXObject||"ActiveXObject"in window,Chrome:e.indexOf("chrome")>-1&&e.indexOf("safari")>-1,Firefox:e.indexOf("firefox")>-1,Opera:e.indexOf("opera")>-1,Safari:e.indexOf("safari")>-1&&-1==e.indexOf("chrome"),Edge:e.indexOf("edge")>-1,QQBrowser:/qqbrowser/.test(e),WeixinBrowser:/MicroMessenger/i.test(e)};for(let s in i)if(i[s]){let i="";if("IE"===s){const t=e.match(/(msie\s|trident.*rv:)([\w.]+)/);t&&t.length>2&&(i=e.match(/(msie\s|trident.*rv:)([\w.]+)/)[2])}else if("Chrome"===s){for(let e in navigator.mimeTypes)"application/360softmgrplugin"===navigator.mimeTypes[e].type&&(s="360");const t=e.match(/chrome\/([\d.]+)/);t&&t.length>1&&(i=t[1])}else if("Firefox"===s){const t=e.match(/firefox\/([\d.]+)/);t&&t.length>1&&(i=t[1])}else if("Opera"===s){const t=e.match(/opera\/([\d.]+)/);t&&t.length>1&&(i=t[1])}else if("Safari"===s){const t=e.match(/version\/([\d.]+)/);t&&t.length>1&&(i=t[1])}else if("Edge"===s){const t=e.match(/edge\/([\d.]+)/);t&&t.length>1&&(i=t[1])}else if("QQBrowser"===s){const t=e.match(/qqbrowser\/([\d.]+)/);t&&t.length>1&&(i=t[1])}t.type=s,t.version=parseInt(i)}return t}function wa(){const e=window.navigator.userAgent.toLowerCase();return e&&/iphone|ipad|ipod|ios/.test(e)}function Sa(){const e=window.navigator.userAgent;return!e.match(/Chrome/gi)&&!!e.match(/Safari/gi)}function Ta(e,t){if(0===arguments.length)return null;var i,s=t||"{y}-{m}-{d} {h}:{i}:{s}";"object"==typeof e?i=e:(10===(""+e).length&&(e=1e3*parseInt(e)),e=+e,i=new Date(e));var r={y:i.getFullYear(),m:i.getMonth()+1,d:i.getDate(),h:i.getHours(),i:i.getMinutes(),s:i.getSeconds(),a:i.getDay()},a=s.replace(/{(y|m|d|h|i|s|a)+}/g,((e,t)=>{var i=r[t];return"a"===t?["一","二","三","四","五","六","日"][i-1]:(e.length>0&&i<10&&(i="0"+i),i||0)}));return a}function Ea(){return"VideoFrame"in window}function ka(e){if("string"!=typeof e)return e;var t=Number(e);return isNaN(t)?e:t}function Ca(){return"xxxxxxxxxxxx4xxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}function xa(e,t){let i,s,r=!1;return function a(){for(var o=arguments.length,n=new Array(o),l=0;l<o;l++)n[l]=arguments[l];if(r)return i=n,void(s=this);r=!0,e.apply(this,n),setTimeout((()=>{r=!1,i&&(a.apply(s,i),i=null,s=null)}),t)}}function Ra(e){if(null==e||""==e)return"0 Bytes";const t=new Array("Bytes","KB","MB","GB","TB","PB","EB","ZB","YB");let i=0;const s=parseFloat(e);i=Math.floor(Math.log(s)/Math.log(1024));var r=s/Math.pow(1024,i);return(r=r.toFixed(2))+t[i]}function Da(e){return"[object Number]"===Object.prototype.toString.call(e)}function La(){let e=!1;return"MediaSource"in self&&(self.MediaSource.isTypeSupported(ui)||self.MediaSource.isTypeSupported(pi)||self.MediaSource.isTypeSupported(fi)||self.MediaSource.isTypeSupported(mi)||self.MediaSource.isTypeSupported(gi))&&(e=!0),e}function Ia(){const e=va();return"chrome"===e.type.toLowerCase()&&e.version>=107}function Pa(){let e=!1;return"MediaStreamTrackGenerator"in window&&(e=!0),e}function Ba(){let e=!1;return"MediaStream"in window&&(e=!0),e}function Ma(e,t){let i=window.URL.createObjectURL(t),s=window.document.createElement("a");s.download=e,s.href=i;let r=window.document.createEvent("MouseEvents");r.initEvent("click",!0,!0),s.dispatchEvent(r),setTimeout((()=>{window.URL.revokeObjectURL(i)}),wa()?1e3:0)}function Ua(e){return null==e}function Fa(e){return!0===e||!1===e}function Oa(e){return!Ua(e)}function Na(e){let t={left:"",right:"",top:"",bottom:"",opacity:1,backgroundColor:"",image:{src:"",width:"100",height:"60"},text:{content:"",fontSize:"14",color:"#000",width:"",height:""},rect:{color:"green",lineWidth:2,width:"",height:"",fill:"",fillOpacity:.2},line:{x1:"",y1:"",x2:"",y2:"",color:"green",lineWidth:2},polygon:{color:"green",lineWidth:2,list:[],fill:"",fillOpacity:.2},html:""};const i=Object.assign(t.image,e.image||{}),s=Object.assign(t.text,e.text||{}),r=Object.assign(t.rect,e.rect||{}),a=Object.assign(t.line,e.line||{});return t=Object.assign(t,e,{image:i,text:s,rect:r,line:a}),t}function ja(e,t){let i={container:e||"",text:"",opacity:"",angle:"",color:"",fontSize:"",fontFamily:""};return i=Object.assign(i,t),{watermark_parent_node:i.container,watermark_alpha:i.opacity,watermark_angle:i.angle,watermark_fontsize:i.fontSize,watermark_color:i.color,watermark_font:i.fontFamily,watermark_txt:i.text}}function Ga(e,t){return new Promise(((i,s)=>{let r=Na(t);if(!r.image.src&&!r.text.content)return i(e);let a=document.createElement("canvas");a.width=t.width,a.height=t.height;let o=a.getContext("2d"),n=0,l=0;Da(r.left)?n=r.left:Da(r.right)&&(n=a.width-r.right),Da(r.top)?l=r.top:Da(r.bottom)&&(l=a.height-r.bottom);const d=new Image;d.src=e,d.onload=()=>{if(o.drawImage(d,0,0),r.image&&r.image.src){const e=new Image;e.src=r.image.src,e.setAttribute("crossOrigin","Anonymous"),e.onload=()=>{n-=r.image.width,o.drawImage(e,n,l,r.image.width,r.image.height),i(a.toDataURL(t.format,t.quality))},e.onerror=e=>{s()}}else r.text&&r.text.content&&(o.font=r.text.fontSize+"px 宋体",o.fillStyle=r.text.color,o.textAlign="right",o.fillText(r.text.content,n,l),i(a.toDataURL(t.format,t.quality)))},d.onerror=e=>{s(e)}}))}function za(e){var t;if(e>-1){var i=Math.floor(e/3600),s=Math.floor(e/60)%60,r=e%60;t=i<10?"0"+i+":":i+":",s<10&&(t+="0"),t+=s+":",(r=Math.round(r))<10&&(t+="0"),t+=r.toFixed(0)}return t}function $a(e,t){let i="";if(e>-1){const s=Math.floor(e/60)%60;let r=e%60;r=Math.round(r),i=s<10?"0"+s+":":s+":",r<10&&(i+="0"),i+=r,Ua(t)||(t<10&&(t="0"+t),i+=":"+t)}return i}function Ha(e){let t="";if(e>-1){const i=Math.floor(e/60/60)%60;let s=Math.floor(e/60)%60,r=e%60;s=Math.round(s),t=i<10?"0"+i+":":i+":",s<10&&(t+="0"),t+=s+":",r<10&&(t+="0"),t+=r}return t}function Va(e,t){const i=Math.floor(t/60)%60,s=Math.floor(t%60);return new Date(e).setHours(i,s,0,0)}function Wa(e,t){const i=Math.floor(t/60/60)%60,s=Math.floor(t/60)%60,r=t%60;return new Date(e).setHours(i,s,r,0)}function Ja(e){return(""+e).length}function qa(e){return e&&0===Object.keys(e).length}function Ka(e){return!qa(e)}function Ya(e){return"string"==typeof e}const Qa=()=>{const e=window.navigator.userAgent;return/MicroMessenger/i.test(e)},Xa=()=>{const e=window.navigator.userAgent;return/Chrome/i.test(e)};function Za(e){const t=e||window.event;return t.target||t.srcElement}function eo(){return _a()&&function(){const e=navigator.userAgent.toLowerCase();return/macintosh|mac os x/i.test(e)}()}function to(e){return"function"==typeof e}function io(e){if(ya()){let t=0,i=0;if(1===e.touches.length){let s=e.touches[0];t=s.clientX,i=s.clientY}return{posX:t,posY:i}}let t=0,i=0;const s=e||window.event;return s.pageX||s.pageY?(t=s.pageX,i=s.pageY):(s.clientX||s.clientY)&&(t=e.clientX+document.documentElement.scrollLeft+document.body.scrollLeft,i=e.clientY+document.documentElement.scrollTop+document.body.scrollTop),{posX:t,posY:i}}function so(){let e=document.createElement("video"),t=e.canPlayType("application/vnd.apple.mpegurl");return e=null,t}function ro(e){let t=Ao(e.hasAudio)&&(e.useMSE||e.useWCS&&!e.useOffscreen)&&Ao(e.demuxUseWorker);return!!(Ao(t)&&e.useMSE&&e.mseDecodeAudio&&Ao(e.demuxUseWorker))||t}function ao(e){const t=e.toString().trim().match(/^function\s*\w*\s*\([\w\s,]*\)\s*{([\w\W]*?)}$/)[1];const i=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(i)}function oo(e){e.close()}function no(){return"https:"===window.location.protocol||"localhost"===window.location.hostname}function lo(e){const t=Object.prototype.toString;return function(e){switch(t.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:try{return e instanceof Error}catch(e){return!1}}}(e)?e.message:null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function ho(e,t){t&&(e=e.filter((e=>e.type&&e.type===t)));let i=e[0],s=null,r=1;if(e.length>0){let t=e[1];t&&t.ts-i.ts>1e5&&(i=t,r=2)}if(i)for(let a=r;a<e.length;a++){let r=e[a];if(t&&r.type&&r.type!==t&&(r=null),r){if(r.ts-i.ts>=1e3){e[a-1].ts-i.ts<1e3&&(s=a+1)}}}return s}function co(e){for(var t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),i=window.atob(t),s=new Uint8Array(i.length),r=0;r<i.length;++r)s[r]=i.charCodeAt(r);return s}function uo(e){const t=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");let s=e;return t&&(i.setAttribute("href",s),s=i.href),i.setAttribute("href",s),{origin:i.origin,href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}function po(e){let t="";if("object"==typeof e)try{t=JSON.stringify(e),t=JSON.parse(t)}catch(i){t=e}else t=e;return t}function fo(){return po(se)}function mo(){return po(re)}function go(e){return e[0]>>4===ws&&e[1]===vs}function yo(e){return!0===e||"true"===e}function Ao(e){return!0!==e&&"true"!==e}function bo(e,t,i){e&&(e.dataset?e.dataset[t]=i:e.setAttribute("data-"+t,i))}function _o(e,t){return e?e.dataset?e.dataset[t]:e.getAttribute("data-"+t):""}function vo(e){return e.replace(/-([a-z])/g,(function(e,t){return t.toUpperCase()}))}function wo(){return/iphone/i.test(navigator.userAgent)}function So(){return window.performance&&window.performance.memory?window.performance.memory:null}function To(){try{var e=document.createElement("canvas");return!(!window.WebGL2RenderingContext||!e.getContext("webgl2"))}catch(e){return!1}}function Eo(e){return e.trim().match(/^function\s*\w*\s*\([\w\s,]*\)\s*{([\w\W]*?)}$/)[1]}function ko(){let e=!1;return"requestVideoFrameCallback"in HTMLVideoElement.prototype&&(e=!0),e}function Co(){let e=!1;return"PressureObserver"in window&&(e=!0),e}class xo{constructor(e){this.destroys=[],this.proxy=this.proxy.bind(this),this.master=e}proxy(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!e)return;if(Array.isArray(t))return t.map((t=>this.proxy(e,t,i,s)));e.addEventListener(t,i,s);const r=()=>{to(e.removeEventListener)&&e.removeEventListener(t,i,s)};return this.destroys.push(r),r}destroy(){this.master.debug&&this.master.debug.log("Events","destroy"),this.destroys.forEach((e=>e())),this.destroys=[]}}var Ro=1e-6,Do="undefined"!=typeof Float32Array?Float32Array:Array;function Lo(){var e=new Do(16);return Do!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function Io(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var Po,Bo=function(e,t,i,s,r,a,o){var n=1/(t-i),l=1/(s-r),d=1/(a-o);return e[0]=-2*n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*d,e[11]=0,e[12]=(t+i)*n,e[13]=(r+s)*l,e[14]=(o+a)*d,e[15]=1,e};function Mo(e,t,i){var s=new Do(3);return s[0]=e,s[1]=t,s[2]=i,s}Po=new Do(3),Do!=Float32Array&&(Po[0]=0,Po[1]=0,Po[2]=0);class Uo{constructor(e,t){this.gl=e,t&&this.gl.pixelStorei(this.gl.UNPACK_ALIGNMENT,1);const i=this._initShaderProgram();this._programInfo={program:i,attribLocations:{vertexPosition:e.getAttribLocation(i,"aVertexPosition"),texturePosition:e.getAttribLocation(i,"aTexturePosition")},uniformLocations:{projectionMatrix:e.getUniformLocation(i,"uProjectionMatrix"),modelMatrix:e.getUniformLocation(i,"uModelMatrix"),viewMatrix:e.getUniformLocation(i,"uViewMatrix"),rgbatexture:e.getUniformLocation(i,"rgbaTexture"),ytexture:e.getUniformLocation(i,"yTexture"),utexture:e.getUniformLocation(i,"uTexture"),vtexture:e.getUniformLocation(i,"vTexture"),isyuv:e.getUniformLocation(i,"isyuv")}},this._buffers=this._initBuffers(),this._rgbatexture=this._createTexture(),this._ytexture=this._createTexture(),this._utexture=this._createTexture(),this._vtexture=this._createTexture()}destroy(){this.gl.deleteProgram(this._programInfo.program),this.gl.deleteBuffer(this._buffers.position),this.gl.deleteBuffer(this._buffers.texPosition),this.gl.deleteBuffer(this._buffers.indices),this.gl.deleteTexture(this._rgbatexture),this.gl.deleteTexture(this._ytexture),this.gl.deleteTexture(this._utexture),this.gl.deleteTexture(this._vtexture),this._programInfo=null,this._buffers=null,this._rgbatexture=null,this._ytexture=null,this._utexture=null,this._vtexture=null}_initShaderProgram(){const e=this._loadShader(this.gl.VERTEX_SHADER,"\n attribute vec4 aVertexPosition;\n attribute vec2 aTexturePosition;\n varying lowp vec2 vTexturePosition;\n void main(void) {\n gl_Position = aVertexPosition;\n vTexturePosition = aTexturePosition;\n }\n "),t=this._loadShader(this.gl.FRAGMENT_SHADER,"\n precision highp float;\n varying highp vec2 vTexturePosition;\n uniform int isyuv;\n uniform sampler2D rgbaTexture;\n uniform sampler2D yTexture;\n uniform sampler2D uTexture;\n uniform sampler2D vTexture;\n\n const mat4 YUV2RGB = mat4( 1.1643828125, 0, 1.59602734375, -.87078515625,\n 1.1643828125, -.39176171875, -.81296875, .52959375,\n 1.1643828125, 2.017234375, 0, -1.081390625,\n 0, 0, 0, 1);\n\n\n void main(void) {\n\n if (isyuv>0) {\n\n highp float y = texture2D(yTexture, vTexturePosition).r;\n highp float u = texture2D(uTexture, vTexturePosition).r;\n highp float v = texture2D(vTexture, vTexturePosition).r;\n gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;\n\n } else {\n gl_FragColor = texture2D(rgbaTexture, vTexturePosition);\n }\n }\n "),i=this.gl.createProgram();return this.gl.attachShader(i,e),this.gl.attachShader(i,t),this.gl.linkProgram(i),this.gl.getProgramParameter(i,this.gl.LINK_STATUS)?i:(console.log("Unable to initialize the shader program: "+this.gl.getProgramInfoLog(i)),null)}_loadShader(e,t){const i=this.gl,s=i.createShader(e);return i.shaderSource(s,t),i.compileShader(s),i.getShaderParameter(s,i.COMPILE_STATUS)?s:(console.log("An error occurred compiling the shaders: "+i.getShaderInfoLog(s)),i.deleteShader(s),null)}_initBuffers(){const e=this.gl,t=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,t);const i=[-1,-1,1,-1,1,1,-1,1];e.bufferData(e.ARRAY_BUFFER,new Float32Array(i),e.STATIC_DRAW);var s=[];s=s.concat([0,1],[1,1],[1,0],[0,0]);const r=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,r),e.bufferData(e.ARRAY_BUFFER,new Float32Array(s),e.STATIC_DRAW);const a=e.createBuffer();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a);return e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,0,2,3]),e.STATIC_DRAW),{positions:i,position:t,texPosition:r,indices:a}}_createTexture(){let e=this.gl.createTexture();return this.gl.bindTexture(this.gl.TEXTURE_2D,e),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),e}_drawScene(e,t,i){this.gl.viewport(0,0,e,t),this.gl.enable(this.gl.BLEND),this.gl.blendFunc(this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this._buffers.position),this.gl.bufferData(this.gl.ARRAY_BUFFER,new Float32Array(this._buffers.positions),this.gl.STATIC_DRAW),this.gl.vertexAttribPointer(this._programInfo.attribLocations.vertexPosition,2,this.gl.FLOAT,!1,0,0),this.gl.enableVertexAttribArray(this._programInfo.attribLocations.vertexPosition),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this._buffers.texPosition),this.gl.vertexAttribPointer(this._programInfo.attribLocations.texturePosition,2,this.gl.FLOAT,!1,0,0),this.gl.enableVertexAttribArray(this._programInfo.attribLocations.texturePosition),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this._buffers.indices);i?(this.gl.activeTexture(this.gl.TEXTURE0+3),this.gl.bindTexture(this.gl.TEXTURE_2D,this._ytexture),this.gl.activeTexture(this.gl.TEXTURE0+4),this.gl.bindTexture(this.gl.TEXTURE_2D,this._utexture),this.gl.activeTexture(this.gl.TEXTURE0+5),this.gl.bindTexture(this.gl.TEXTURE_2D,this._vtexture)):(this.gl.activeTexture(this.gl.TEXTURE0+2),this.gl.bindTexture(this.gl.TEXTURE_2D,this._rgbatexture)),this.gl.useProgram(this._programInfo.program),this.gl.uniform1i(this._programInfo.uniformLocations.rgbatexture,2),this.gl.uniform1i(this._programInfo.uniformLocations.ytexture,3),this.gl.uniform1i(this._programInfo.uniformLocations.utexture,4),this.gl.uniform1i(this._programInfo.uniformLocations.vtexture,5),this.gl.uniform1i(this._programInfo.uniformLocations.isyuv,i?1:0),this.gl.drawElements(this.gl.TRIANGLES,6,this.gl.UNSIGNED_SHORT,0)}_calRect(e,t,i,s,r,a){let o=2*e/r-1,n=2*(a-t-s)/a-1,l=2*(e+i)/r-1,d=2*(a-t)/a-1;return[o,n,l,n,l,d,o,d]}_clear(){this.gl.clearColor(0,0,0,1),this.gl.clearDepth(1),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}render(e,t,i,s,r){const a=this.gl;this._clear(),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,this._ytexture),a.texImage2D(a.TEXTURE_2D,0,a.LUMINANCE,e,t,0,a.LUMINANCE,a.UNSIGNED_BYTE,i),a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,this._utexture),a.texImage2D(a.TEXTURE_2D,0,a.LUMINANCE,e/2,t/2,0,a.LUMINANCE,a.UNSIGNED_BYTE,s),a.activeTexture(a.TEXTURE2),a.bindTexture(a.TEXTURE_2D,this._vtexture),a.texImage2D(a.TEXTURE_2D,0,a.LUMINANCE,e/2,t/2,0,a.LUMINANCE,a.UNSIGNED_BYTE,r),this._buffers.positions=[-1,-1,1,-1,1,1,-1,1],this._drawScene(e,t,!0)}renderYUV(e,t,i){let s=i.slice(0,e*t),r=i.slice(e*t,e*t*5/4),a=i.slice(e*t*5/4,e*t*3/2);const o=this.gl;this._clear(),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,this._ytexture),o.texImage2D(o.TEXTURE_2D,0,o.LUMINANCE,e,t,0,o.LUMINANCE,o.UNSIGNED_BYTE,s),o.activeTexture(o.TEXTURE1),o.bindTexture(o.TEXTURE_2D,this._utexture),o.texImage2D(o.TEXTURE_2D,0,o.LUMINANCE,e/2,t/2,0,o.LUMINANCE,o.UNSIGNED_BYTE,r),o.activeTexture(o.TEXTURE2),o.bindTexture(o.TEXTURE_2D,this._vtexture),o.texImage2D(o.TEXTURE_2D,0,o.LUMINANCE,e/2,t/2,0,o.LUMINANCE,o.UNSIGNED_BYTE,a),this._buffers.positions=[-1,-1,1,-1,1,1,-1,1],this._drawScene(e,t,!0)}drawDom(e,t,i,s,r){const a=this.gl;a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,this._rgbatexture),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,r),this._buffers.positions=this._calRect(i,s,r.width,r.height,e,t),this._drawScene(e,t,!1)}}class Fo{constructor(e){this.gpu=e,this.pipeline=null,this.matrixGroupInfo=null,this.depthTexture=null,this.textureGroupInfo=null,this.hasInited=!1,this.buffers=this._initBuffer(),this._initPipeline().then((e=>{this.pipeline=e,this.matrixGroupInfo=this._initMatrixGroupInfo(),this.hasInited=!0}))}destroy(){this.gpu&&(this.gpu.device.destroy(),this.gpu=null),this.hasInited=!1,this.pipeline=null,this.matrixGroupInfo=null,this.depthTexture=null,this.textureGroupInfo=null}_initBuffer(){const e=this.gpu.device,t=new Float32Array([-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1]),i=e.createBuffer({size:t.byteLength,usage:window.GPUBufferUsage.VERTEX|window.GPUBufferUsage.COPY_DST});e.queue.writeBuffer(i,0,t);const s=new Float32Array([0,1,1,1,1,0,0,0]),r=e.createBuffer({size:s.byteLength,usage:window.GPUBufferUsage.VERTEX|window.GPUBufferUsage.COPY_DST});e.queue.writeBuffer(r,0,s);const a=new Uint16Array([0,1,2,0,2,3]),o=e.createBuffer({size:a.byteLength,usage:window.GPUBufferUsage.INDEX|window.GPUBufferUsage.COPY_DST});return e.queue.writeBuffer(o,0,a),{positionBuffer:i,texpositionBuffer:r,indexBuffer:o}}_initPipeline(){return new Promise(((e,t)=>{const i=this.gpu.device,s=this.gpu.format,r={layout:"auto",vertex:{module:i.createShaderModule({code:"\n\n @binding(0) @group(0) var<uniform> uModelMatrix : mat4x4<f32>;\n @binding(1) @group(0) var<uniform> uViewMatrix : mat4x4<f32>;\n @binding(2) @group(0) var<uniform> uProjectionMatrix : mat4x4<f32>;\n\n struct VertexOutput {\n @builtin(position) Position : vec4<f32>,\n @location(0) vTexturePosition : vec2<f32>,\n }\n\n @vertex\n fn main(\n @location(0) aVertexPosition : vec4<f32>,\n @location(1) aTexturePosition : vec2<f32>\n ) -> VertexOutput {\n var output : VertexOutput;\n var tmppos : vec4<f32> = uProjectionMatrix * uViewMatrix * uModelMatrix * aVertexPosition;\n output.Position = vec4<f32>(tmppos.x, tmppos.y, (tmppos.z+1.)/2., tmppos.w); // webgl z [-1, 1], webgpu z [0, 1], 这里z做下调整 z-webgpu = (z-webgl+1)/2\n output.vTexturePosition = aTexturePosition;\n return output;\n }\n\n "}),entryPoint:"main",buffers:[{arrayStride:12,attributes:[{shaderLocation:0,offset:0,format:"float32x3"}]},{arrayStride:8,attributes:[{shaderLocation:1,offset:0,format:"float32x2"}]}]},primitive:{topology:"triangle-list"},fragment:{module:i.createShaderModule({code:"\n @group(1) @binding(0) var mySampler: sampler;\n @group(1) @binding(1) var yTexture: texture_2d<f32>;\n @group(1) @binding(2) var uTexture: texture_2d<f32>;\n @group(1) @binding(3) var vTexture: texture_2d<f32>;\n\n const YUV2RGB : mat4x4<f32> = mat4x4<f32>( 1.1643828125, 0, 1.59602734375, -.87078515625,\n 1.1643828125, -.39176171875, -.81296875, .52959375,\n 1.1643828125, 2.017234375, 0, -1.081390625,\n 0, 0, 0, 1);\n\n @fragment\n fn main(\n @location(0) vTexturePosition: vec2<f32>\n ) -> @location(0) vec4<f32> {\n\n var y : f32= textureSample(yTexture, mySampler, vTexturePosition).r;\n var u : f32 = textureSample(uTexture, mySampler, vTexturePosition).r;\n var v : f32 = textureSample(vTexture, mySampler, vTexturePosition).r;\n\n return vec4<f32>(y, u, v, 1.0)*YUV2RGB;\n }\n\n "}),entryPoint:"main",targets:[{format:s}]},depthStencil:{depthWriteEnabled:!0,depthCompare:"less",format:"depth24plus"}};i.createRenderPipelineAsync(r).then((t=>{e(t)})).catch((e=>{t(e)}))}))}_initMatrixGroupInfo(){const e=this.gpu.device,t=this.pipeline,i=Lo();Bo(i,-1,1,-1,1,.1,100);const s=Lo();Io(s);const r=Lo();!function(e,t,i,s){var r,a,o,n,l,d,h,c,u,p,f=t[0],m=t[1],g=t[2],y=s[0],A=s[1],b=s[2],_=i[0],v=i[1],w=i[2];Math.abs(f-_)<Ro&&Math.abs(m-v)<Ro&&Math.abs(g-w)<Ro?Io(e):(h=f-_,c=m-v,u=g-w,r=A*(u*=p=1/Math.hypot(h,c,u))-b*(c*=p),a=b*(h*=p)-y*u,o=y*c-A*h,(p=Math.hypot(r,a,o))?(r*=p=1/p,a*=p,o*=p):(r=0,a=0,o=0),n=c*o-u*a,l=u*r-h*o,d=h*a-c*r,(p=Math.hypot(n,l,d))?(n*=p=1/p,l*=p,d*=p):(n=0,l=0,d=0),e[0]=r,e[1]=n,e[2]=h,e[3]=0,e[4]=a,e[5]=l,e[6]=c,e[7]=0,e[8]=o,e[9]=d,e[10]=u,e[11]=0,e[12]=-(r*f+a*m+o*g),e[13]=-(n*f+l*m+d*g),e[14]=-(h*f+c*m+u*g),e[15]=1)}(r,Mo(0,0,0),Mo(0,0,-1),Mo(0,1,0));const a=e.createBuffer({size:64,usage:window.GPUBufferUsage.UNIFORM|window.GPUBufferUsage.COPY_DST});e.queue.writeBuffer(a,0,s);const o=e.createBuffer({size:64,usage:window.GPUBufferUsage.UNIFORM|window.GPUBufferUsage.COPY_DST});e.queue.writeBuffer(o,0,r);const n=e.createBuffer({size:64,usage:window.GPUBufferUsage.UNIFORM|window.GPUBufferUsage.COPY_DST});e.queue.writeBuffer(n,0,i);return{modelMatrixBuffer:a,viewMatrixBuffer:o,projectMatrixBuffer:n,group:e.createBindGroup({label:"group0",layout:t.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:a}},{binding:1,resource:{buffer:o}},{binding:2,resource:{buffer:n}}]})}}_initTextureGroupInfo(e,t){const i=this.gpu.device,s=this.pipeline,r=i.createTexture({size:[e,t],format:"r8unorm",usage:window.GPUTextureUsage.TEXTURE_BINDING|window.GPUTextureUsage.COPY_DST|window.GPUTextureUsage.RENDER_ATTACHMENT}),a=i.createTexture({size:[e/2,t/2],format:"r8unorm",usage:window.GPUTextureUsage.TEXTURE_BINDING|window.GPUTextureUsage.COPY_DST|window.GPUTextureUsage.RENDER_ATTACHMENT}),o=i.createTexture({size:[e/2,t/2],format:"r8unorm",usage:window.GPUTextureUsage.TEXTURE_BINDING|window.GPUTextureUsage.COPY_DST|window.GPUTextureUsage.RENDER_ATTACHMENT}),n=i.createSampler({magFilter:"linear",minFilter:"linear"}),l=i.createBindGroup({label:"group1",layout:s.getBindGroupLayout(1),entries:[{binding:0,resource:n},{binding:1,resource:r.createView()},{binding:2,resource:a.createView()},{binding:3,resource:o.createView()}]});return{yTexture:r,uTexture:a,vTexture:o,group:l}}_drawScene(){const e=this.gpu.device,t=this.gpu.context,i=e.createCommandEncoder(),s={colorAttachments:[{view:t.getCurrentTexture().createView(),clearValue:{r:0,g:0,b:0,a:0},loadOp:"clear",storeOp:"store"}],depthStencilAttachment:{view:this.depthTexture.createView(),depthClearValue:1,depthLoadOp:"clear",depthStoreOp:"store"}},r=i.beginRenderPass(s);r.setPipeline(this.pipeline),r.setBindGroup(0,this.matrixGroupInfo.group),r.setBindGroup(1,this.textureGroupInfo.group),r.setVertexBuffer(0,this.buffers.positionBuffer),r.setVertexBuffer(1,this.buffers.texpositionBuffer),r.setIndexBuffer(this.buffers.indexBuffer,"uint16"),r.drawIndexed(6),r.end(),e.queue.submit([i.finish()])}renderYUV(e,t,i){if(!this.hasInited)return;let s=i.slice(0,e*t),r=i.slice(e*t,e*t*5/4),a=i.slice(e*t*5/4,e*t*3/2);const o=this.gpu.device;this.depthTexture||(this.depthTexture=this.gpu.device.createTexture({size:[e,t],format:"depth24plus",usage:window.GPUTextureUsage.RENDER_ATTACHMENT})),this.textureGroupInfo||(this.textureGroupInfo=this._initTextureGroupInfo(e,t)),o.queue.writeTexture({texture:this.textureGroupInfo.yTexture},s,{bytesPerRow:e,rowsPerImage:t},[e,t]),o.queue.writeTexture({texture:this.textureGroupInfo.uTexture},r,{bytesPerRow:e/2,rowsPerImage:t/2},[e/2,t/2]),o.queue.writeTexture({texture:this.textureGroupInfo.vTexture},a,{bytesPerRow:e/2,rowsPerImage:t/2},[e/2,t/2]),this._drawScene()}clear(){}}class Oo{constructor(e){this.player=e,this.TAG_NAME="SingleWatermark",this.configList=[],this.shadowRoot=null,this.shadowRootRealDom=null,this.shadowRootInnerDom=null,this.scale=1,this.isDynamic=!1,this._initDom(),this.player.debug.log(this.TAG_NAME,"int")}destroy(){this.configList=[],this.shadowRootInnerDom=null,this.isDynamic=!1,this.scale=1,this.shadowRoot&&(this.player.$container.removeChild(this.shadowRootRealDom),this.shadowRoot=null,this.shadowRootRealDom=null),this.player.debug.log(this.TAG_NAME,"destroy")}resize(){this.player.debug.log(this.TAG_NAME,"resize()"),"default"===this.player._opt.aspectRatio||ya()?this.player.getRenderType()===W?this._resizeDomForCanvas():this.player.getRenderType()===J&&this._resizeDomForVideo():this._resizeDomRatio()}_initDom(){const e=this.player.$container;let t=null;const i=document.createElement("div");i.setAttribute("style","pointer-events: none !important;display: block !important;"),t="function"==typeof i.attachShadow?i.attachShadow({mode:"open"}):i.shadowRoot?i.shadowRoot:i;const s=document.createElement("div");s.setAttribute("style","position: absolute; top: 0; left: 0; width: 0; height: 0;display: none;"),t.appendChild(s);const r=e.children,a=Math.floor(Math.random()*(r.length-1))+1;r[a]?e.insertBefore(i,r[a]):e.appendChild(i),this.shadowRootInnerDom=s,this.shadowRootRealDom=i,this.shadowRoot=t}update(e){this._removeDom();let t=[];Array.isArray(e)?t=e:Ka(e)&&t.push(e);let i=t.map((e=>Na(e)));this.configList=i,this._updateDom()}_resizeDomForVideo(){const e=this.player.width,t=this.player.height,i=this.player.getVideoInfo();if(!(i&&i.height>0&&i.width>0))return;let s=i.width,r=i.height;const a=this.player._opt;let o=t,n=e;if(a.hasControl&&!a.controlAutoHide){const e=a.playType===w?Qt:Yt;ya()&&this.player.fullscreen&&a.useWebFullScreen?n-=e:o-=e}const l=a.rotate;let d=(n-s)/2,h=(o-r)/2;270!==l&&90!==l||(s=i.height,r=i.width);const c=n/s,u=o/r;let p=c>u?u:c;a.isResize||c!==u&&(p=c+","+u),a.isFullResize&&(p=c>u?c:u);let f="scale("+p+")";"none"===a.mirrorRotate&&l&&(f+=" rotate("+l+"deg)"),"level"===a.mirrorRotate?f+=" rotateY(180deg)":"vertical"===a.mirrorRotate&&(f+=" rotateX(180deg)"),this.scale=-1!==(""+p).indexOf(",")?c:p,this.shadowRootInnerDom.style.transform=f,this.shadowRootInnerDom.style.left=d+"px",this.shadowRootInnerDom.style.top=h+"px",this.shadowRootInnerDom.style.width=i.width+"px",this.shadowRootInnerDom.style.height=i.height+"px",this.shadowRootInnerDom.style.display="block"}_resizeDomForCanvas(){const e=this.player.getVideoInfo();if(!(e&&e.height>0&&e.width>0))return;const t=this.player._opt;let i=this.player.width,s=this.player.height;if(t.hasControl&&!t.controlAutoHide){const e=t.playType===w?Qt:Yt;ya()&&this.player.fullscreen&&t.useWebFullScreen?i-=e:s-=e}let r=e.width,a=e.height;const o=t.rotate;let n=(i-r)/2,l=(s-a)/2;270!==o&&90!==o||(r=e.height,a=e.width);const d=i/r,h=s/a;let c=d>h?h:d;t.isResize||d!==h&&(c=d+","+h),t.isFullResize&&(c=d>h?d:h);let u="scale("+c+")";"none"===t.mirrorRotate&&o&&(u+=" rotate("+o+"deg)"),"level"===t.mirrorRotate?u+=" rotateY(180deg)":"vertical"===t.mirrorRotate&&(u+=" rotateX(180deg)"),this.shadowRootInnerDom.style.height=e.height+"px",this.shadowRootInnerDom.style.width=e.width+"px",this.shadowRootInnerDom.style.padding="0",this.shadowRootInnerDom.style.transform=u,this.shadowRootInnerDom.style.left=n+"px",this.shadowRootInnerDom.style.top=l+"px",this.shadowRootInnerDom.style.display="block"}_resizeDomRatio(){const e=this.player.getVideoInfo();if(!(e&&e.height>0&&e.width>0))return;const t=this.player._opt.aspectRatio.split(":").map(Number);let i=this.player.width,s=this.player.height;const r=this.player._opt;let a=0;r.hasControl&&!r.controlAutoHide&&(a=r.playType===w?Qt:Yt,s-=a);const o=e.width/e.height,n=t[0]/t[1];if(o>n){const t=n*e.height/e.width;this.shadowRootInnerDom.style.width=100*t+"%",this.shadowRootInnerDom.style.height=`calc(100% - ${a}px)`,this.shadowRootInnerDom.style.padding=`0 ${(i-i*t)/2}px`}else{const t=e.width/n/e.height;this.shadowRootInnerDom.style.width="100%",this.shadowRootInnerDom.style.height=`calc(${100*t}% - ${a}px)`,this.shadowRootInnerDom.style.padding=(s-s*t)/2+"px 0"}this.shadowRootInnerDom.style.display="block"}_updateDom(){this.shadowRoot&&this.configList.forEach((e=>{const t=document.createElement("div");let i=null;if(e.image&&e.image.src?(i=document.createElement("img"),i.style.height="100%",i.style.width="100%",i.style.objectFit="contain",i.src=e.image.src):e.text&&e.text.content?i=document.createTextNode(e.text.content):(e.rect&&e.rect.color&&e.rect.width||e.html||e.line&&e.line.x1&&e.line.y1&&e.line.x2&&e.line.y2||e.polygon&&e.polygon.list&&e.polygon.list.length>=3)&&(i=document.createElement("div")),i){if(t.appendChild(i),t.style.visibility="",t.style.position="absolute",t.style.display="block",t.style["-ms-user-select"]="none",t.style["-moz-user-select"]="none",t.style["-webkit-user-select"]="none",t.style["-o-user-select"]="none",t.style["user-select"]="none",t.style["-webkit-touch-callout"]="none",t.style["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",t.style["-webkit-text-size-adjust"]="none",t.style["-webkit-touch-callout"]="none",t.style.opacity=e.opacity,Oa(e.left)&&(Da(e.left)?t.style.left=e.left+"px":t.style.left=e.left),Oa(e.right)&&(Da(e.right)?t.style.right=e.right+"px":t.style.right=e.right),Oa(e.top)&&(Da(e.top)?t.style.top=e.top+"px":t.style.top=e.top),Oa(e.bottom)&&(Da(e.bottom)?t.style.bottom=e.bottom+"px":t.style.bottom=e.bottom),e.backgroundColor&&(t.style.backgroundColor=e.backgroundColor),t.style.overflow="hidden",t.style.zIndex="9999999",e.image&&e.image.src)t.style.width=e.image.width+"px",t.style.height=e.image.height+"px";else if(e.text&&e.text.content)t.style.fontSize=e.text.fontSize+"px",t.style.color=e.text.color,e.text.width&&(t.style.width=e.text.width+"px"),e.text.height&&(t.style.height=e.text.height+"px");else if(e.rect&&e.rect.color&&e.rect.width){if(t.style.width=e.rect.width+"px",t.style.height=e.rect.height+"px",t.style.borderWidth=e.rect.lineWidth+"px",t.style.borderStyle="solid",t.style.borderColor=e.rect.color,e.rect.fill){const i=document.createElement("div");i.style.position="absolute",i.style.width="100%",i.style.height="100%",i.style.backgroundColor=e.rect.fill,e.rect.fillOpacity&&(i.style.opacity=e.rect.fillOpacity),t.appendChild(i)}}else if(e.html)t.style.width="100%",t.style.height="100%",t.innerHTML=e.html;else if(e.line&&e.line.x1&&e.line.y1&&e.line.x2&&e.line.y2)this.settingLine(t,e.line);else if(e.polygon&&e.polygon.list&&e.polygon.list.length>=3){t.style.width="100%",t.style.height="100%";let i=e.polygon.list;const s=e.polygon.color,r=e.polygon.lineWidth;if(i=i.sort(((e,t)=>(e.index||0)-(t.index||0))),e.polygon.fill){const s=document.createElement("div");s.style.position="absolute",s.style.width="100%",s.style.height="100%";const r="polygon("+i.map((e=>`${e.x}px ${e.y}px`)).join(", ")+")";s.style.clipPath=r,s.style.backgroundColor=e.polygon.fill,e.polygon.fillOpacity&&(s.style.opacity=e.polygon.fillOpacity),t.appendChild(s)}i.forEach(((e,a)=>{const o=document.createElement("div");if(a===i.length-1){const a=i[0],n={x1:e.x,y1:e.y,x2:a.x,y2:a.y,color:s,lineWidth:r};return this.settingLine(o,n),void t.appendChild(o)}const n=i[a+1],l={x1:e.x,y1:e.y,x2:n.x,y2:n.y,color:s,lineWidth:r};this.settingLine(o,l),t.appendChild(o)}))}this.isDynamic&&(this.shadowRootDynamicDom=t),this.shadowRootInnerDom.appendChild(t)}}))}settingLine(e,t){const i=t.x1,s=t.y1,r=t.x2,a=t.y2;var o=Math.sqrt((i-r)**2+(s-a)**2),n=180*Math.atan2(a-s,r-i)/Math.PI;e.style.backgroundColor=t.color,e.style.width=o+"px",e.style.height=t.lineWidth+"px",e.style.position="absolute",e.style.top=s+"px",e.style.left=i+"px",e.style.transform="rotate("+n+"deg)",e.style.transformOrigin="0 0"}remove(){this._removeDom()}_removeDom(){this.shadowRootInnerDom&&(this.shadowRootInnerDom.innerHTML="")}}class No extends a{constructor(){super(),this.videoInfo={width:null,height:null,encType:null,encTypeCode:null},this.init=!1,this.prevAiFaceDetectTime=null,this.prevAiObjectDetectTime=null,this.prevOcclusionDetectTime=null,this.contentWatermark=null,this.aiContentWatermark=null,this.tempContentList=[],this.tempAiContentList=[],this.streamFps=0}destroy(){this.resetInit(),this.contentWatermark&&(this.contentWatermark.destroy(),this.contentWatermark=null),this.tempContentList=[],this.aiContentWatermark&&(this.aiContentWatermark.destroy(),this.aiContentWatermark=null),this.tempAiContentList=[],this.prevAiFaceDetectTime=null,this.prevAiObjectDetectTime=null,this.streamFps=0,this.off()}resetInit(){this.videoInfo={width:null,height:null,encType:null,encTypeCode:null},this.init=!1}getHasInit(){return this.init}updateVideoInfo(e){Oa(e.encTypeCode)&&(this.videoInfo.encType=_t[e.encTypeCode],this.videoInfo.encTypeCode=e.encTypeCode),Oa(e.encType)&&(this.videoInfo.encType=e.encType),Oa(e.width)&&(this.videoInfo.width=e.width),Oa(e.height)&&(this.videoInfo.height=e.height),Oa(this.videoInfo.encType)&&Oa(this.videoInfo.height)&&Oa(this.videoInfo.width)&&!this.init&&(this.player.emit(lt.videoInfo,this.videoInfo),this.init=!0)}getVideoInfo(){return this.videoInfo}clearView(){this.tempContentList=[],this.tempAiContentList=[]}resize(){if(this.player.debug.log("CommonVideo","resize()"),"default"===this.player._opt.aspectRatio||ya()?this._resize():this._resizeRatio(),this.contentWatermark&&this.contentWatermark.resize(),this.aiContentWatermark&&this.aiContentWatermark.resize(),this.player.singleWatermark&&this.player.singleWatermark.resize(),this.player.ghostWatermark&&this.player.ghostWatermark.resize(),this.player.dynamicWatermark&&this.player.dynamicWatermark.resize(),this.player.zoom&&this.player.zooming){const e=this._getStyleScale();this.player.zoom.updatePrevVideoElementStyleScale(e),this.player.zoom.updateVideoElementScale()}}_resizeRatio(){this.player.debug.log("CommonVideo","_resizeRatio()");const e=this.player._opt.aspectRatio.split(":").map(Number);let t=this.player.width,i=this.player.height;const s=this.player._opt;let r=0;s.hasControl&&!s.controlAutoHide&&(r=s.playType===w?Qt:Yt,i-=r);const a=this.videoInfo,o=a.width/a.height,n=e[0]/e[1];if(this.getType()===W&&(this.$videoElement.style.left="0",this.$videoElement.style.top="0",this.$videoElement.style.transform="none"),this.getType()===J&&this.player._opt.videoRenderSupportScale&&(this.$videoElement.style.objectFit="fill"),o>n){const e=n*a.height/a.width;this.$videoElement.style.width=100*e+"%",this.$videoElement.style.height=`calc(100% - ${r}px)`,this.$videoElement.style.padding=`0 ${(t-t*e)/2}px`}else{const e=a.width/n/a.height;this.$videoElement.style.width="100%",this.$videoElement.style.height=`calc(${100*e}% - ${r}px)`,this.$videoElement.style.padding=(i-i*e)/2+"px 0"}}play(){}pause(){}setRate(e){}getType(){return""}getCanvasType(){return""}getCurrentTime(){return 0}getStreamFps(){return this.streamFps}isPlaying(){return!0}getPlaybackQuality(){return null}setStreamFps(e){this.player.debug.log("CommonVideo","setStreamFps",e),this.streamFps=e}addContentToCanvas(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.tempContentList=e}addAiContentToCanvas(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.tempAiContentList=e}doAddContentToWatermark(){if(this.tempContentList.length>0){this.contentWatermark||(this.contentWatermark=new Oo(this.player),this.contentWatermark.resize());const e=[];this.tempContentList.forEach((t=>{let i={left:t.x||0,top:t.y||0};"text"===t.type?i.text={content:t.text,fontSize:t.fontSize||"14",color:t.color||"#000"}:"rect"===t.type?i.rect={width:t.width,height:t.height,color:t.color||"green",lineWidth:t.lineWidth||2,fill:t.fill||"",fillOpacity:t.fillOpacity||.2}:"polygon"===t.type?i.polygon={list:t.list,color:t.color||"green",lineWidth:t.lineWidth||2,fill:t.fill,fillOpacity:t.fillOpacity||.2}:"line"===t.type&&(i.line={color:t.color||"green",lineWidth:t.lineWidth||2,x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}),e.push(i)})),this.contentWatermark.update(e)}else this.contentWatermark&&this.contentWatermark.remove()}doAddAiContentToWatermark(){if(this.tempAiContentList.length>0){this.aiContentWatermark||(this.aiContentWatermark=new Oo(this.player),this.aiContentWatermark.resize());const e=this.tempAiContentList.map((e=>{let t={left:e.x,top:e.y};return"text"===e.type?t.text={content:e.text,fontSize:e.fontSize,color:e.color}:"rect"===e.type&&(t.rect={width:e.width,height:e.height,color:e.color,lineWidth:e.lineWidth}),t}));this.aiContentWatermark.update(e)}else this.aiContentWatermark&&this.aiContentWatermark.remove()}_getStyleScale(){let e=this.$videoElement.style.transform.match(/scale\([0-9., ]*\)/g),t="";if(e&&e[0]){t=e[0].replace("scale(","").replace(")","").split(",")}return t}getReadyStateInited(){return!0}}var jo="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0;function Go(e,t,i){var s=new XMLHttpRequest;s.open("GET",e),s.responseType="blob",s.onload=function(){Vo(s.response,t,i)},s.onerror=function(){console.error("could not download file")},s.send()}function zo(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return t.status>=200&&t.status<=299}function $o(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(i){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var Ho=jo.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),Vo="object"!=typeof window||window!==jo?function(){}:"download"in HTMLAnchorElement.prototype&&!Ho?function(e,t,i){var s=jo.URL||jo.webkitURL,r=document.createElementNS("http://www.w3.org/1999/xhtml","a");t=t||e.name||"download",r.download=t,r.rel="noopener","string"==typeof e?(r.href=e,r.origin!==location.origin?zo(r.href)?Go(e,t,i):$o(r,r.target="_blank"):$o(r)):(r.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(r.href)}),4e4),setTimeout((function(){$o(r)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,t,i){if(t=t||e.name||"download","string"==typeof e)if(zo(e))Go(e,t,i);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){$o(s)}))}else navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}(e,i),t)}:function(e,t,i,s){if((s=s||open("","_blank"))&&(s.document.title=s.document.body.innerText="downloading..."),"string"==typeof e)return Go(e,t,i);var r="application/octet-stream"===e.type,a=/constructor/i.test(jo.HTMLElement)||jo.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||r&&a||Ho)&&"undefined"!=typeof FileReader){var n=new FileReader;n.onloadend=function(){var e=n.result;e=o?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),s?s.location.href=e:location=e,s=null},n.readAsDataURL(e)}else{var l=jo.URL||jo.webkitURL,d=l.createObjectURL(e);s?s.location=d:location.href=d,s=null,setTimeout((function(){l.revokeObjectURL(d)}),4e4)}};class Wo{constructor(e,t){this.canvas=e,this.gl=t;const i=t.createShader(t.VERTEX_SHADER);if(t.shaderSource(i,"\n attribute vec2 xy;\n varying highp vec2 uv;\n void main(void) {\n gl_Position = vec4(xy, 0.0, 1.0);\n // Map vertex coordinates (-1 to +1) to UV coordinates (0 to 1).\n // UV coordinates are Y-flipped relative to vertex coordinates.\n uv = vec2((1.0 + xy.x) / 2.0, (1.0 - xy.y) / 2.0);\n }\n "),t.compileShader(i),!t.getShaderParameter(i,t.COMPILE_STATUS))throw t.getShaderInfoLog(i);const s=t.createShader(t.FRAGMENT_SHADER);if(t.shaderSource(s,"\n varying highp vec2 uv;\n uniform sampler2D texture;\n void main(void) {\n gl_FragColor = texture2D(texture, uv);\n }\n "),t.compileShader(s),!t.getShaderParameter(s,t.COMPILE_STATUS))throw t.getShaderInfoLog(s);const r=t.createProgram();if(t.attachShader(r,i),t.attachShader(r,s),t.linkProgram(r),!t.getProgramParameter(r,t.LINK_STATUS))throw t.getProgramInfoLog(r);t.useProgram(r);const a=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,a),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),t.STATIC_DRAW);const o=t.getAttribLocation(r,"xy");t.vertexAttribPointer(o,2,t.FLOAT,!1,0,0),t.enableVertexAttribArray(o);const n=t.createTexture();t.bindTexture(t.TEXTURE_2D,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),this.program=r,this.buffer=a,this.vertexShader=i,this.fragmentShader=s,this.texture=n}destroy(){this.gl.deleteProgram(this.program),this.gl.deleteBuffer(this.buffer),this.gl.deleteTexture(this.texture),this.gl.deleteShader(this.vertexShader),this.gl.deleteShader(this.fragmentShader),this.program=null,this.buffer=null,this.vertexShader=null,this.fragmentShader=null,this.texture=null}render(e){this.canvas.width=e.displayWidth,this.canvas.height=e.displayHeight;const t=this.gl;t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e),t.viewport(0,0,t.drawingBufferWidth,t.drawingBufferHeight),t.clearColor(1,0,0,1),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4)}}class Jo extends No{constructor(e){super(),this.player=e;const t=document.createElement("canvas");t.style.position="absolute",t.style.top=0,t.style.left=0,this.$videoElement=t,e.$container.appendChild(this.$videoElement),this.context2D=null,this.contextGl=null,this.webglRender=null,this.webglRectRender=null,this.webGPURender=null,this.isWebglContextLost=!1,this.isWcsWebgl2=!1,this.bitmaprenderer=null,this.renderType=null,this.controlHeight=0,this.proxyDestroyList=[],this._initCanvasRender()}destroy(){super.destroy(),this.proxyDestroyList.length>0&&(this.proxyDestroyList.forEach((e=>{e&&e()})),this.proxyDestroyList=[]),this.contextGl&&(this.contextGl=null),this.context2D&&(this.context2D=null),this.webglRender&&(this.webglRender.destroy(),this.webglRender=null),this.webglRectRender&&(this.webglRectRender.destroy(),this.webglRectRender=null),this.webGPURender&&(this.webGPURender.destroy(),this.webGPURender=null),this.bitmaprenderer&&(this.bitmaprenderer=null),this.renderType=null,this.isWebglContextLost=!1,this.videoInfo={width:"",height:"",encType:""},this.player.$container.removeChild(this.$videoElement),this.init=!1,this.off()}_initContext2D(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.context2D=this.$videoElement.getContext("2d",e)}_initContextGl(){if(this.player.events,this.contextGl=na(this.$videoElement),!this.contextGl)throw this.player.debug.error("CommonCanvasLoader","_initContextGl() createContextGL error"),new Error("CommonCanvasLoader and _initContextGl createContextGL error");this._bindContextGlEvents(),this.webglRender=new Uo(this.contextGl,this.player._opt.openWebglAlignment)}_initContextGl2(){if(this.contextGl=la(this.$videoElement),this.contextGl){this._bindContextGlEvents(2);try{this.webglRender=new Wo(this.$videoElement,this.contextGl)}catch(e){this.player.debug.error("CommonCanvasLoader",`create webgl2Render error is ${e} and next use context2d.draw render`),this.contextGl=null,this.webglRender=null,this._initContext2D()}}else this.player.debug.error("CommonCanvasLoader","_initContextGl2() createContextGL2 error")}_bindContextGlEvents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;const{proxy:t}=this.player.events,i=t(this.$videoElement,"webglcontextlost",(t=>{t.preventDefault(),this.player.debug.error("canvasVideo","webglcontextlost error",t),this.isWebglContextLost=!0,this.webglRender&&(this.player.debug.log("CommonCanvasLoader","webglcontextlost error and destroy webglRender"),this.webglRender.destroy(),this.webglRender=null),this.webglRectRender&&(this.player.debug.log("CommonCanvasLoader","webglcontextlost error and destroy webglRectRender"),this.webglRectRender.destroy(),this.webglRectRender=null),this.contextGl=null,setTimeout((()=>{if(this.player.debug.log("CommonCanvasLoader",`createContextGL() version ${e}`),1===e?this.contextGl=na(this.$videoElement):2===e&&(this.contextGl=la(this.$videoElement)),this.player.debug.log("CommonCanvasLoader","createContextGL success"),this.contextGl&&this.contextGl.getContextAttributes){const t=this.contextGl.getContextAttributes();t&&t.stencil?(1===e?this.webglRender=new Uo(this.contextGl,this.player._opt.openWebglAlignment):2===e&&(this.webglRender=new Wo(this.$videoElement,this.contextGl)),this.isWebglContextLost=!1,this.player.debug.log("CommonCanvasLoader","webglcontextlost error reset and getContextAttributes().stencil is true")):(this.player.debug.error("CommonCanvasLoader","webglcontextlost error, getContextAttributes().stencil is false"),this.player.emitError(ut.webglContextLostError))}else this.player.debug.error("CommonCanvasLoader","webglcontextlost error, getContextAttributes().stencil is false"),this.player.emitError(ut.webglContextLostError)}),500)})),s=t(this.$videoElement,"webglcontextrestored",(e=>{e.preventDefault(),this.player.debug.log("CommonCanvasLoader","webglcontextrestored ",e)}));this.proxyDestroyList.push(i,s)}_initContextGPU(){var t;(t=this.$videoElement,new Promise(((e,i)=>{navigator.gpu?navigator.gpu.requestAdapter().then((s=>{s?s.requestDevice().then((r=>{if(r){const a=t.getContext("webgpu");if(a){const t=navigator.gpu.getPreferredCanvasFormat();a.configure({device:r,format:t,alphaMode:"opaque"}),e({adapter:s,device:r,context:a,format:t})}else i('WebGPU "context" create fail')}else i('WebGPU "device" request fail')})).catch((e=>{i('WebGPU "adapter.requestDevice()" fail')})):i('WebGPU "adapter" request fail is empty')})).catch((e=>{i('WebGPU "navigator.gpu.requestAdapter()" fail')})):i("WebGPU not support!!")}))).then((t=>{t?(this.webGPURender=new Fo(t),this.player.debug.log("CommonCanvasLoader","webGPURender init success")):(this.player.debug.warn("CommonCanvasLoader",`createWebGPUContext error is ${e} and next use webgl render`),this.renderType=ii,this._initContextGl())})).catch((e=>{this.player.debug.warn("CommonCanvasLoader",`createWebGPUContext error is ${e} and next use webgl render`),this.renderType=ii,this._initContextGl()}))}initCanvasViewSize(){this.$videoElement.width=this.videoInfo.width,this.$videoElement.height=this.videoInfo.height,this.resize()}screenshot(e,t,i,s){e=e||ha(),s=s||yt.download;let r=.92;!qi[t]&&yt[t]&&(s=t,t="png",i=void 0),"string"==typeof i&&(s=i,i=void 0),void 0!==i&&(r=Number(i));const a=qi[t]||qi.png,o=this.$videoElement.toDataURL(a,r);if(s===yt.base64)return o;{const t=da(o);if(s===yt.blob)return t;if(s===yt.download){const i=a.split("/")[1];Vo(t,e+"."+i)}}}screenshotWatermark(e){return new Promise(((t,i)=>{Ya(e)&&(e={filename:e}),(e=e||{}).width=this.videoInfo.width,e.height=this.videoInfo.height,e.filename=e.filename||ha(),e.format=e.format?qi[e.format]:qi.png,e.quality=Number(e.quality)||.92,e.type=e.type||yt.download;const s=this.$videoElement.toDataURL(e.format,e.quality);Ga(s,e).then((i=>{if(e.type===yt.base64)t(s);else{const s=da(i);if(e.type===yt.blob)t(s);else if(e.type===yt.download){t();const i=e.format.split("/")[1];Vo(s,e.filename+"."+i)}}})).catch((e=>{i(e)}))}))}render(){}clearView(){super.clearView()}play(){}pause(){}_resize(){this.player.debug.log("canvasVideo","_resize()");const e=this.player._opt;let t=this.player.width,i=this.player.height;if(e.hasControl&&!e.controlAutoHide){const s=this.controlHeight;ya()&&this.player.fullscreen&&e.useWebFullScreen?t-=s:i-=s}let s=this.$videoElement.width,r=this.$videoElement.height;const a=e.rotate;let o=(t-s)/2,n=(i-r)/2;270!==a&&90!==a||(s=this.$videoElement.height,r=this.$videoElement.width);const l=t/s,d=i/r;let h=l>d?d:l;Ao(e.isResize)&&l!==d&&(h=l+","+d),e.isFullResize&&(h=l>d?l:d);let c="scale("+h+")";"none"===e.mirrorRotate&&a&&(c+=" rotate("+a+"deg)"),"level"===e.mirrorRotate?c+=" rotateY(180deg)":"vertical"===e.mirrorRotate&&(c+=" rotateX(180deg)"),this.$videoElement.style.height=this.videoInfo.height+"px",this.$videoElement.style.width=this.videoInfo.width+"px",this.$videoElement.style.padding="0",this.$videoElement.style.transform=c,this.$videoElement.style.left=o+"px",this.$videoElement.style.top=n+"px"}initFps(){}setStreamFps(e){}getStreamFps(){return 25}getType(){return W}getCanvasType(){let e=this.renderType===ri?ri:ii;return this.isWcsWebgl2&&(e=si),e}}class qo extends Jo{constructor(e){super(e),this.yuvList=[],this.controlHeight=Yt,this.tempTextCanvas=null,this.tempTextCanvasCtx=null,this.player.debug.log("CanvasVideo","init")}async destroy(){super.destroy(),this.yuvList=[],this.tempTextCanvas&&(this.tempTextCanvasCtx.clearRect(0,0,this.tempTextCanvas.width,this.tempTextCanvas.height),this.tempTextCanvas.width=0,this.tempTextCanvas.height=0,this.tempTextCanvas=null),this.player.debug.log("CanvasVideoLoader","destroy")}_initCanvasRender(){this.player._opt.useWCS&&!this._supportOffscreen()?(this.renderType=ti,To()&&this.player._opt.wcsUseWebgl2Render?(this._initContextGl2(),this.webglRender&&(this.isWcsWebgl2=!0)):this._initContext2D()):this.player._opt.useMSE&&this.player._opt.mseUseCanvasRender?(this.renderType=oi,this._initContext2D()):this.player.isOldHls()&&this.player._opt.useCanvasRender?(this.renderType=ni,this._initContext2D()):this.player.isWebrtcH264()&&this.player._opt.webrtcUseCanvasRender?(this.renderType=li,this._initContext2D()):this._supportOffscreen()?(this.renderType=ai,this._bindOffscreen()):this.player._opt.useWebGPU?(this.renderType=ri,this._initContextGPU()):(this.renderType=ii,this._initContextGl())}_supportOffscreen(){return"function"==typeof this.$videoElement.transferControlToOffscreen&&this.player._opt.useOffscreen}_bindOffscreen(){this.bitmaprenderer=this.$videoElement.getContext("bitmaprenderer")}render(e){this.yuvList.push(e),this.startRender()}startRender(){for(;!(this.yuvList.length<=0);){const e=this.yuvList.shift();this.doRender(e)}}doRender(e){if(this.renderType!==oi){const t={ts:e.ts||0,fps:!0};this.player.updateStats(t)}switch(this.renderType){case ai:this.bitmaprenderer.transferFromImageBitmap(e.buffer);break;case ii:case ri:if(this.isWebglContextLost)return void this.player.debug.warn("CanvasVideoLoader","doRender() and webgl context is lost");let t=e.output;if(this.player.faceDetectActive&&this.player.ai&&this.player.ai.faceDetector){null===this.prevAiFaceDetectTime&&(this.prevAiFaceDetectTime=ha());const i=ha();i-this.prevAiFaceDetectTime>=this.player._opt.aiFaceDetectInterval&&(t=this.player.ai.faceDetector.detect({width:this.$videoElement.width,height:this.$videoElement.height,data:e.output,ts:e.ts||0}),this.prevAiFaceDetectTime=i)}if(this.player.objectDetectActive&&this.player.ai&&this.player.ai.objectDetector){null===this.prevAiObjectDetectTime&&(this.prevAiObjectDetectTime=ha());const i=ha();i-this.prevAiObjectDetectTime>=this.player._opt.aiObjectDetectInterval&&(t=this.player.ai.objectDetector.detect({width:this.$videoElement.width,height:this.$videoElement.height,data:e.output,ts:e.ts||0}),this.prevAiObjectDetectTime=i)}if(this.player.occlusionDetectActive&&this.player.ai&&this.player.ai.occlusionDetector){null===this.prevAiOcclusionDetectTime&&(this.prevAiOcclusionDetectTime=ha());const t=ha();if(t-this.prevAiOcclusionDetectTime>=this.player._opt.aiOcclusionDetectInterval){const i=this.player.ai.occlusionDetector.check({width:this.$videoElement.width,height:this.$videoElement.height,data:e.output});this.prevAiOcclusionDetectTime=t,i&&this.player.emit(lt.aiOcclusionDetectResult,{ts:e.ts||0})}}if(this.player.imageDetectActive&&this.player.ai&&this.player.ai.imageDetector){const t=this.player.ai.imageDetector.check({width:this.$videoElement.width,height:this.$videoElement.height,data:e.output});if(t&&t.data&&(this.player.emit(lt.aiOcclusionDetectResult,{type:t.type,ts:e.ts||0}),this.player._opt.aiImageDetectDrop))return void this.player.debug.log("CanvasVideoLoader",`doRender() and ai image detect result type is ${t.type} and drop`)}if(this.renderType===ri)try{if(!this.webGPURender)return void this.player.debug.warn("CanvasVideoLoader","doRender webgpu render is not init");this.webGPURender.renderYUV(this.$videoElement.width,this.$videoElement.height,t)}catch(e){this.player.debug.error("CanvasVideoLoader",`doRender webgpu render and error: ${e.toString()}`)}else if(this.renderType===ii)try{this.webglRender.renderYUV(this.$videoElement.width,this.$videoElement.height,t)}catch(e){this.player.debug.error("CanvasVideoLoader",`doRender webgl render context is lost ${this.contextGl&&this.contextGl.isContextLost()} and error: ${e.toString()}`)}break;case ti:if(this.webglRender)this.webglRender.render(e.videoFrame),oo(e.videoFrame);else if(this.context2D)if(to(e.videoFrame.createImageBitmap))try{e.videoFrame.createImageBitmap().then((t=>{this.context2D.drawImage(t,0,0,this.$videoElement.width,this.$videoElement.height),oo(e.videoFrame)}))}catch(e){}else this.context2D.drawImage(e.videoFrame,0,0,this.$videoElement.width,this.$videoElement.height),oo(e.videoFrame);else this.player.debug.warn("CanvasVideoLoader","doRender() and webcodecs context is lost");break;case oi:case ni:case li:this.context2D.drawImage(e.$video,0,0,this.$videoElement.width,this.$videoElement.height)}let t=e.ts||0;this.renderType===oi&&(t=parseInt(1e3*e.$video.currentTime,10)+(this.player.mseDecoder.firstRenderTime||0)),this.player.updateCurrentPts(t),this.doAddContentToWatermark(),this.doAddAiContentToWatermark()}clearView(){switch(super.clearView(),this.renderType){case ai:(function(e,t){const i=document.createElement("canvas");i.width=e,i.height=t;const s=window.createImageBitmap(i,0,0,e,t);return i.width=0,i.height=0,s})(this.$videoElement.width,this.$videoElement.height).then((e=>{this.bitmaprenderer.transferFromImageBitmap(e)}));break;case ii:this.contextGl.clear(this.contextGl.COLOR_BUFFER_BIT);break;case ri:this.webGPURender.clear();break;case ti:this.contextGl?this.contextGl.clear(this.contextGl.COLOR_BUFFER_BIT):this.context2D&&this.context2D.clearRect(0,0,this.$videoElement.width,this.$videoElement.height);break;case oi:case ni:case li:this.context2D.clearRect(0,0,this.$videoElement.width,this.$videoElement.height)}}_initTempTextCanvas(){this.tempTextCanvas=document.createElement("canvas"),this.tempTextCanvasCtx=this.tempTextCanvas.getContext("2d"),this.tempTextCanvas.width=600,this.tempTextCanvas.height=20}doAddContentToCanvas(){this.tempContentList.length>0&&this.context2D&&function(e){let{ctx:t,list:i}=e;t.save(),(i||[]).forEach((e=>{"text"===e.type?(t.font=`${e.fontSize||12}px Arial`,t.fillStyle=e.color||"green",t.fillText(e.text,e.x,e.y)):"rect"===e.type&&(t.strokeStyle=e.color||"green",t.lineWidth=e.lineWidth||2,t.strokeRect(e.x,e.y,e.width,e.height))})),t.restore()}({ctx:this.context2D,list:this.tempContentList})}doAddContentToWebGlCanvas(){this.tempContentList.length>0&&this.contextGl&&this.webglRectRender&&this.tempContentList.forEach((e=>{const t=e.x,i=e.y;if("rect"===e.type){const r=e.width,a=e.height,o=(s=e.color||"#008000",[parseInt(s.substring(1,3),16)/255,parseInt(s.substring(3,5),16)/255,parseInt(s.substring(5,7),16)/255,1]),n=e.lineWidth||4;if(!r||!a)return;this.webglRectRender.drawBox({x:t,y:i,width:r,height:a,lineColor:o,lineWidth:n,canvasWidth:this.$videoElement.width,canvasHeight:this.$videoElement.height})}else if("text"===e.type){const s=e.text||"";if(!s)return;const r=e.fontSize||20,a=e.color||"#008000";this.tempTextCanvas||this._initTempTextCanvas(),this.tempTextCanvasCtx.clearRect(0,0,this.tempTextCanvas.width,this.tempTextCanvas.height),this.tempTextCanvasCtx.font=`${r}px Arial`,this.tempTextCanvasCtx.fillStyle=a,this.tempTextCanvasCtx.textBaseline="top",this.tempTextCanvasCtx.fillText(s,0,0),this.webglRender.drawDom(this.$videoElement.width,this.$videoElement.height,t,i,this.tempTextCanvas)}var s}))}}class Ko extends No{constructor(e){super(),this.player=e,this.TAG_NAME="Video";const t=document.createElement("video"),i=document.createElement("canvas");t.muted=!0,t.style.position="absolute",t.style.top=0,t.style.left=0,this._delayPlay=!1,e.$container.appendChild(t),this.$videoElement=t,this.$canvasElement=i,this.canvasContext=i.getContext("2d"),this.mediaStream=null,this.vwriter=null,e.canVideoTrackWritter()&&Pa()&&Ba()&&(this.trackGenerator=new MediaStreamTrackGenerator({kind:"video"}),this.mediaStream=new MediaStream([this.trackGenerator]),t.srcObject=this.mediaStream,this.vwriter=this.trackGenerator.writable.getWriter()),this.fixChromeVideoFlashBug(),this.fixMobileAutoFullscreen(),this.resize(),this.eventListenList=[],this.isRenderRetryPlaying=!1,this.isRenderRetryPlayingTimes=0,this.isRetryPlaying=!1,this.isRetryPlayingTimes=0,this.canplayReceived=!1,this.progressProxyDestroy=null,this.checkVideoCanplayTimeout=null;const s=ko();this.supportVideoFrameCallbackHandle=null;const{proxy:r}=this.player.events,a=r(this.$videoElement,"canplay",(()=>{this.player.debug.log("Video","canplay"),this.player.isDestroyedOrClosed()||(this.canplayReceived=!0,this._delayPlay?(this.clearCheckVideoCanplayTimeout(),this._play(),ko()?this.supportVideoFrameCallbackHandle||(this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this))):this.player.debug.warn("Video","not support requestVideoFrameCallback and use timeupdate event to update stats")):this.$videoElement.paused&&this.player.isMSEPlaybackRateChangePause&&(this.player.debug.log("Video",`canplay and video is paused and isMSEPlaybackRateChangePause is ${this.player.isMSEPlaybackRateChangePause} so next try to play`),this.player.isMSEPlaybackRateChangePause=!1,this.$videoElement.play()))})),o=r(this.$videoElement,"waiting",(()=>{this.player.debug.log("Video","waiting")})),n=r(this.$videoElement,"loadedmetadata",(()=>{this.player.debug.log("Video","loadedmetadata")})),l=r(this.$videoElement,"timeupdate",(t=>{if(!this.player.isDestroyedOrClosed()){if(Ao(s)){const t=parseInt(1e3*this.getCurrentTime(),10);(e.isWebrtcH264()||this.player.isOldHls()||this.player.isAliyunRtc())&&(this.player.emit(lt.timeUpdate,t),e.handleRender(),e.updateStats({fps:!0,ts:t,dts:t}))}this.player.isMseDecoderUseWorker()&&(this.player.decoderWorker.updateVideoTimestamp(this.getCurrentTime()),this._handleUpdatePlaybackRate())}})),d=r(this.$videoElement,"error",(()=>{let e={};if(this.player.isUseMSE()&&(e=this.player.getMseMineType()),this.player.debug.error("Video","Error Code "+this.$videoElement.error.code+" "+yr[this.$videoElement.error.code]+"; Details: "+this.$videoElement.error.message+"; Video Info: "+JSON.stringify(this.videoInfo)+"; Mse Mine Type: "+e.video+"; "),this.player.isUseMSE()){this.$videoElement.error.code;const e=this.$videoElement.error.message;-1!==e.indexOf(Ar)&&(this.player.isMSEVideoDecoderInitializationFailedNotSupportHevc=!0),-1!==e.indexOf(br)&&(this.player.isMSEAudioDecoderError=!0)}this.player.isHlsCanVideoPlay()})),h=r(this.$videoElement,"stalled",(()=>{this._detectAndFixStuckPlayback(!0)}));if(this.progressProxyDestroy=r(this.$videoElement,"progress",(()=>{this._detectAndFixStuckPlayback()})),this.eventListenList.push(a,o,l,d,n,h),this.player.isUseMSE()){const e=r(this.$videoElement,rs,(()=>{this.player.debug.log(this.TAG_NAME,"video playback Rate change",this.$videoElement&&this.$videoElement.playbackRate),this.$videoElement&&this.$videoElement.paused&&(this.player.debug.warn(this.TAG_NAME,"ratechange and video is paused and sent isMSEPlaybackRateChangePause true"),this.player.isMSEPlaybackRateChangePause=!0)}));this.eventListenList.push(e),this.player.on(lt.visibilityChange,(e=>{e&&setTimeout((()=>{if(this.player.isPlaying()&&this.$videoElement){const e=this.getVideoBufferLastTime();e-this.$videoElement.currentTime>this.getBufferMaxDelayTime()&&(this.player.debug.log(this.TAG_NAME,`visibilityChange is true and lastTime is ${e} and currentTime is ${this.$videoElement.currentTime} so set currentTime to lastTime`),this.$videoElement.currentTime=e)}}),300)}))}this.player.debug.log("Video","init")}async destroy(){if(super.destroy(),this.clearCheckVideoCanplayTimeout(),this._cancelVideoFrameCallback(),this._removeProgressProxyDestroy(),this.eventListenList.length&&(this.eventListenList.forEach((e=>{e()})),this.eventListenList=[]),this.isRenderRetryPlaying=!1,this.isRenderRetryPlayingTimes=0,this.isRetryPlaying=!1,this.isRetryPlayingTimes=0,this.canplayReceived=!1,this.player._opt.videoRenderSupportScale&&this._isNeedAddBackDropFilter()){const e=this.player.$container;e.style.backdropFilter="none",e.style.transform="none"}if(this.$canvasElement.height=0,this.$canvasElement.width=0,this.$canvasElement=null,this.canvasContext=null,this.$videoElement){this.$videoElement.pause(),this.$videoElement.currentTime=0,this.$videoElement.srcObject&&(this.$videoElement.srcObject=null,this.$videoElement.removeAttribute("srcObject")),this.$videoElement.src&&(this.$videoElement.src="",this.$videoElement.removeAttribute("src"));try{this.$videoElement.load()}catch(e){}this.player.$container.removeChild(this.$videoElement),this.$videoElement=null}this.trackGenerator&&(this.trackGenerator.stop(),this.trackGenerator=null),this.vwriter&&(await this.vwriter.close(),this.vwriter=null),this._delayPlay=!1,this.mediaStream&&(this.mediaStream.getTracks().forEach((e=>e.stop())),this.mediaStream=null),this.off(),this.player.debug.log("Video","destroy")}videoFrameCallback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.player.isDestroyedOrClosed())return void this.player.debug.log("Video","videoFrameCallback() and isDestroyedOrClosed and return");this.player.handleRender();const i=parseInt(1e3*Math.max(t.mediaTime,this.getCurrentTime()),10)||0;if(this.player.isUseHls265UseMse())this.player.updateStats({fps:!0,ts:i});else if(this.player.isMseDecoderUseWorker()){this.player._times.videoStart||(this.player._times.videoStart=ha(),this.player.handlePlayToRenderTimes());const e=i+(this.player._mseWorkerData.firstRenderTime||0);if(this.player.updateStats({fps:!0,dfps:!0,ts:e,mseTs:i}),this.player.emit(lt.timeUpdate,e),Ao(this.getHasInit())&&t.width&&t.height){const e={width:t.width,height:t.height};this.updateVideoInfo(e),this.initCanvasViewSize()}}if(this.player.isWebrtcH264()||this.player.isOldHls()||this.player.isAliyunRtc()){if(this.player.emit(lt.timeUpdate,i),Ao(this.getHasInit())&&t.width&&t.height){const e={width:t.width,height:t.height};this.videoInfo.encTypeCode||this.player.isOldHls()||(e.encTypeCode=vt),this.updateVideoInfo(e)}this.player.updateStats({fps:!0,ts:i,dts:i}),this.player.updateCurrentPts(i),this.doAddContentToWatermark()}else if(yo(this.player._opt.useMSE)&&Ao(this.player._opt.mseUseCanvasRender)){if(this.player.mseDecoder){let e=parseInt(1e3*Math.max(t.mediaTime,this.getCurrentTime()),10)+(this.player.mseDecoder.firstRenderTime||0);this.player.updateCurrentPts(e)}else if(this.player._opt.mseDecoderUseWorker){let e=parseInt(1e3*Math.max(t.mediaTime,this.getCurrentTime()),10)+(this.player._mseWorkerData.firstRenderTime||0);this.player.updateCurrentPts(e)}this.doAddContentToWatermark()}this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this))}fixChromeVideoFlashBug(){if(this.player._opt.videoRenderSupportScale&&this._isNeedAddBackDropFilter()){const e=this.player.$container;e.style.backdropFilter="blur(0px)",e.style.transform="translateZ(0)"}}fixMobileAutoFullscreen(){const e=wa(),t=ba();(e||t)&&(this.player.debug.log("Video",`fixMobileAutoFullscreen and isIOS ${e} and isAndroid ${t}`),this.$videoElement.setAttribute("webkit-playsinline","true"),this.$videoElement.setAttribute("playsinline","true"),this.$videoElement.setAttribute("x5-video-player-type","h5-page"))}_detectAndFixStuckPlayback(e){const t=this.$videoElement,i=t.buffered,s=t.readyState;this.player.debug.log(this.TAG_NAME,`_detectAndFixStuckPlayback() and isStalled is ${e} ,canplayReceived is ${this.canplayReceived} ,videoReadyState is ${s}`),e||Ao(this.canplayReceived)||s<2?i.length>0&&t.currentTime<i.start(0)&&(this.player.debug.warn(this.TAG_NAME,`_detectAndFixStuckPlayback() and video is stuck and currentTime is ${t.currentTime} ,seek to ${i.start(0)}`),t.currentTime=i.start(0),this._removeProgressProxyDestroy()):this._removeProgressProxyDestroy()}_removeProgressProxyDestroy(){this.progressProxyDestroy&&(this.player.debug.log(this.TAG_NAME,"_removeProgressProxyDestroy()"),this.progressProxyDestroy(),this.progressProxyDestroy=null)}_isNeedAddBackDropFilter(){const e=va().type.toLowerCase();return"chrome"===e||"edge"===e}isPaused(){let e=!0;return this.$videoElement&&(e=this.$videoElement.paused),e}isPause(){return this.isPaused()}_getVideoReadyState(){let e=0;return this.$videoElement&&(e=this.$videoElement.readyState),e}_getVideoCurrentTime(){let e=0;return this.$videoElement&&(e=this.$videoElement.currentTime),e}play(){if(this.$videoElement){const e=this._getVideoReadyState();if(this.player.debug.log("Video",`play and readyState: ${e}`),0===e)return this.player.debug.log("Video","readyState is 0 and set _delayPlay to true and listen canplay event to play"),this._delayPlay=!0,void(null===this.checkVideoCanplayTimeout&&(this.checkVideoCanplayTimeout=setTimeout((()=>{if(this.clearCheckVideoCanplayTimeout(),!this.player.isDestroyedOrClosed()&&Ao(this.isPlaying())){const e=this._getBufferStore();this.player.debug.warn("Video",`checkVideoCanplayTimeout and video is not playing and buffer store is ${e} and retry play`),this.$videoElement.currentTime=e,this._replay()}}),1e3)));this._play()}}_play(){this.$videoElement&&this.$videoElement.play().then((()=>{this._delayPlay=!1,this.player.debug.log("Video","_play success"),this.isPlaying()?(this.player.emit(lt.removeLoadingBgImage),this.isRetryPlayingTimes=0,this.isRetryPlaying=!1):setTimeout((()=>{this._replay()}),100)})).catch((e=>{this.player.isDestroyedOrClosed()?this.player.debug.log("Video","_play error and player is isDestroyedOrClosed and return"):(this.player.debug.error("Video","_play error",e),this.isRetryPlaying=!1,setTimeout((()=>{this._replay()}),100))}))}_replay(){if(!this.isPlaying()&&Ao(this.player.isDestroyedOrClosed())&&Ao(this.isRetryPlaying)){if(this.isRetryPlaying=!0,this.isRetryPlayingTimes>=3)return void(this.player.isWebrtcH264()?(this.player.debug.error("Video",`_replay(webrtc H264) then but not playing and retry play times is ${this.isRetryPlayingTimes} and emit error`),this.player.emitError(ut.videoElementPlayingFailedForWebrtc)):(this.player.debug.error("Video",`_replay then but not playing and retry play times is ${this.isRetryPlayingTimes} and emit error to use canvas render`),this.player.emitError(ut.videoElementPlayingFailed)));this.player.debug.warn("Video",`_play then but not playing and retry play and isRetryPlayingTimes is ${this.isRetryPlayingTimes}`),this._play(),this.isRetryPlayingTimes++}else this.player.debug.log("Video",`_replay() and isPlaying is ${this.isPlaying()} and isRetryPlaying is ${this.isRetryPlaying} and isDestroyedOrClosed is ${this.player.isDestroyedOrClosed()} and return;`)}pause(e){this.player.debug.log(this.TAG_NAME,"pause and isNow is "+e),this.isPlaying()&&(e?(this.$videoElement&&this.$videoElement.pause(),this._cancelVideoFrameCallback()):setTimeout((()=>{this.$videoElement&&this.$videoElement.pause(),this._cancelVideoFrameCallback()}),100))}clearView(){super.clearView(),this.$videoElement&&(this.$videoElement.pause(),this.$videoElement.currentTime=0,this.$videoElement.src&&(this.$videoElement.src="",this.$videoElement.removeAttribute("src")),this.$videoElement.srcObject&&(this.$videoElement.srcObject=null,this.$videoElement.removeAttribute("srcObject")))}screenshot(e,t,i,s){if(!this._canScreenshot())return this.player.debug.warn("Video",`screenshot failed, video is not ready and stats is ${this._getVideoReadyState()}`),null;e=e||ha(),s=s||yt.download;let r=.92;!qi[t]&&yt[t]&&(s=t,t="png",i=void 0),"string"==typeof i&&(s=i,i=void 0),void 0!==i&&(r=Number(i));const a=this.$videoElement;let o=this.$canvasElement;o.width=a.videoWidth,o.height=a.videoHeight,this.canvasContext.drawImage(a,0,0,o.width,o.height);const n=qi[t]||qi.png,l=o.toDataURL(n,r);if(this.canvasContext.clearRect(0,0,o.width,o.height),o.width=0,o.height=0,s===yt.base64)return l;{const t=da(l);if(s===yt.blob)return t;if(s===yt.download){const i=n.split("/")[1];Vo(t,e+"."+i)}}}screenshotWatermark(e){return new Promise(((t,i)=>{if(Ya(e)&&(e={filename:e}),!this._canScreenshot())return this.player.debug.warn("Video","screenshot failed, video is not ready"),i("screenshot failed, video is not ready");const s=this.$videoElement;(e=e||{}).width=s.videoWidth,e.height=s.videoHeight,e.filename=e.filename||ha(),e.format=e.format?qi[e.format]:qi.png,e.quality=Number(e.quality)||.92,e.type=e.type||yt.download;let r=this.$canvasElement;r.width=s.videoWidth,r.height=s.videoHeight,this.canvasContext.drawImage(s,0,0,r.width,r.height);const a=r.toDataURL(e.format,e.quality);this.canvasContext.clearRect(0,0,r.width,r.height),r.width=0,r.height=0,Ga(a,e).then((i=>{if(e.type===yt.base64)t(a);else{const s=da(i);if(e.type===yt.blob)t(s);else if(e.type===yt.download){t();const i=e.format.split("/")[1];Vo(s,e.filename+"."+i)}}})).catch((e=>{i(e)}))}))}initCanvasViewSize(){this.resize()}clear(){const e=this.$videoElement,t=e.buffered,i=t.length?t.end(t.length-1):0;e.currentTime=i}render(e){if(this.vwriter){if(this.$videoElement.srcObject||(this.$videoElement.srcObject=this.mediaStream),this.isPaused()){const e=this._getVideoReadyState();if(this.player.debug.warn("Video","render() error, video is paused and readyState is "+e),4===e&&Ao(this.isRenderRetryPlaying)){if(this.isRenderRetryPlaying=!0,this.isRenderRetryPlayingTimes>3)return this.player.debug.error("Video","render() error, video is paused and readyState is "+e+", retry times is "+this.isRenderRetryPlayingTimes+", emit error and use canvas render"),void this.player.emitError(ut.videoElementPlayingFailed);this.$videoElement.play().then((()=>{this.isRenderRetryPlayingTimes=0,this.isRenderRetryPlaying=!1,this.player.debug.log("Video","render() video is paused and replay success")})).catch((e=>{this.isRenderRetryPlaying=!1,this.isRenderRetryPlayingTimes++,this.player.debug.warn("Video","render() error, video is paused and replay error ",e)}))}}if(this.player.updateStats({fps:!0,ts:e.ts||0}),e.videoFrame)this.vwriter.write(e.videoFrame),oo(e.videoFrame);else if(e.output){let s=e.output;if(this.player.faceDetectActive&&this.player.ai&&this.player.ai.faceDetector){null===this.prevAiFaceDetectTime&&(this.prevAiFaceDetectTime=ha());const t=ha();t-this.prevAiFaceDetectTime>this.player._opt.aiFaceDetectInterval&&(s=this.player.ai.faceDetector.detect({width:this.videoInfo.width,height:this.videoInfo.height,data:e.output,ts:e.ts||0}),this.prevAiFaceDetectTime=t)}if(this.player.objectDetectActive&&this.player.ai&&this.player.ai.objectDetector){null===this.prevAiObjectDetectTime&&(this.prevAiObjectDetectTime=ha());const t=ha();t-this.prevAiObjectDetectTime>this.player._opt.aiObjectDetectInterval&&(s=this.player.ai.objectDetector.detect({width:this.videoInfo.width,height:this.videoInfo.height,data:e.output,ts:e.ts||0}),this.prevAiObjectDetectTime=t)}if(this.player.occlusionDetectActive&&this.player.ai&&this.player.ai.occlusionDetector){null===this.prevAiOcclusionDetectTime&&(this.prevAiOcclusionDetectTime=ha());const t=ha();if(t-this.prevAiOcclusionDetectTime>=this.player._opt.aiOcclusionDetectInterval){const i=this.player.ai.occlusionDetector.check({width:this.videoInfo.width,height:this.videoInfo.height,data:e.output,ts:e.ts||0});this.prevAiOcclusionDetectTime=t,i&&(this.player.debug.log("Video","render() and ai occlusion detect result is true"),this.player.emit(lt.aiOcclusionDetectResult,{ts:e.ts||0}))}}if(this.player.imageDetectActive&&this.player.ai&&this.player.ai.imageDetector){const t=this.player.ai.imageDetector.check({width:this.videoInfo.width,height:this.videoInfo.height,data:e.output,ts:e.ts||0});if(t&&t.data&&(this.player.emit(lt.aiOcclusionDetectResult,{type:t.type,ts:e.ts||0}),this.player._opt.aiImageDetectDrop))return void this.player.debug.log("Video",`render() and ai image detect result type is ${t.type} and drop`)}try{const r=(t=s,i={format:"I420",codedWidth:this.videoInfo.width,codedHeight:this.videoInfo.height,timestamp:e.ts},new VideoFrame(t,i));this.vwriter.write(r),oo(r)}catch(e){this.player.debug.error("Video","render error",e),this.player.emitError(ut.wasmUseVideoRenderError,e)}}this.player.updateCurrentPts(e.ts||0),this.doAddContentToWatermark(),this.doAddAiContentToWatermark()}else this.player.debug.warn("Video","render and this.vwriter is null");var t,i}_resize(){this.player.debug.log("Video","_resize()");let e=this.player.width,t=this.player.height;const i=this.player._opt,s=i.rotate;if(i.hasControl&&!i.controlAutoHide){const s=i.playType===w?Qt:Yt;ya()&&this.player.fullscreen&&i.useWebFullScreen?e-=s:t-=s}this.$videoElement.width=e,this.$videoElement.height=t,this.$videoElement.style.width=e+"px",this.$videoElement.style.height=t+"px",270!==s&&90!==s||(this.$videoElement.width=t,this.$videoElement.height=e,this.$videoElement.style.width=t+"px",this.$videoElement.style.height=e+"px");let r=(e-this.$videoElement.width)/2,a=(t-this.$videoElement.height)/2,o="contain";Ao(i.isResize)&&(o="fill"),i.isFullResize&&(o="none");let n="";"none"===i.mirrorRotate&&s&&(n+=" rotate("+s+"deg)"),"level"===i.mirrorRotate?n+=" rotateY(180deg)":"vertical"===i.mirrorRotate&&(n+=" rotateX(180deg)"),this.player._opt.videoRenderSupportScale&&(this.$videoElement.style.objectFit=o),this.$videoElement.style.transform=n,this.$videoElement.style.padding="0",this.$videoElement.style.left=r+"px",this.$videoElement.style.top=a+"px"}getType(){return J}getCurrentTime(){return this.$videoElement.currentTime}isPlaying(){return this.$videoElement&&Ao(this.$videoElement.paused)&&Ao(this.$videoElement.ended)&&0!==this.$videoElement.playbackRate&&0!==this.$videoElement.readyState}_canScreenshot(){return this.$videoElement&&this.$videoElement.readyState>=1}getPlaybackQuality(){let e=null;if(this.$videoElement){if(to(this.$videoElement.getVideoPlaybackQuality)){const t=this.$videoElement.getVideoPlaybackQuality();e={droppedVideoFrames:t.droppedVideoFrames||t.corruptedVideoFrames,totalVideoFrames:t.totalVideoFrames,creationTime:t.creationTime}}else e={droppedVideoFrames:this.$videoElement.webkitDroppedFrameCount,totalVideoFrames:this.$videoElement.webkitDecodedFrameCount,creationTime:ha()};e&&(e.renderedVideoFrames=e.totalVideoFrames-e.droppedVideoFrames)}return e}setRate(e){this.$videoElement&&(this.$videoElement.playbackRate=e)}get rate(){let e=1;return this.$videoElement&&(e=this.$videoElement.playbackRate),e}clearCheckVideoCanplayTimeout(){this.checkVideoCanplayTimeout&&(clearTimeout(this.checkVideoCanplayTimeout),this.checkVideoCanplayTimeout=null)}_cancelVideoFrameCallback(){this.supportVideoFrameCallbackHandle&&this.$videoElement&&(this.$videoElement.cancelVideoFrameCallback(this.supportVideoFrameCallbackHandle),this.supportVideoFrameCallbackHandle=null)}_getBufferStore(){const e=this.$videoElement;let t=0;return e.buffered.length>0&&(t=e.buffered.start(0)),t}_handleUpdatePlaybackRate(){const e=this.$videoElement,t=e.buffered;t.length&&t.start(0);const i=t.length?t.end(t.length-1):0;let s=e.currentTime;const r=i-s,a=this.getBufferMaxDelayTime();if(this.player.updateStats({mseVideoBufferDelayTime:r}),r>a)this.player.debug.log(this.TAG_NAME,`handleUpdatePlaybackRate and buffered is ${i} and current is ${s} , delay buffer is more than ${a} is ${r} and new time is ${i}`),e.currentTime=i,s=e.currentTime;else if(r<0){if(this.player.debug.warn(this.TAG_NAME,`handleUpdatePlaybackRate and delay buffer is ${i} - current is ${s} = ${r} < 0 and check video is paused : ${e.paused} `),0===i)return void this.player.emit(ut.mediaSourceBufferedIsZeroError,"video.buffered is empty");e.paused&&e.play()}const o=this._getPlaybackRate(i-s);e.playbackRate!==o&&(this.player.debug.log(this.TAG_NAME,`handleUpdatePlaybackRate and buffered is ${i} and current time is ${s} and delay is ${i-s} set playbackRate is ${o} `),e.playbackRate=o)}_getPlaybackRate(e){const t=this.$videoElement;let i=this.player._opt.videoBufferDelay+this.player._opt.videoBuffer;const s=Math.max(i,1e3),r=s/2;return e*=1e3,1===t.playbackRate?e>s?1.2:1:e<=r?1:t.playbackRate}getVideoCurrentTime(){let e=0;return this.$videoElement&&(e=this.$videoElement.currentTime),e}getVideoBufferLastTime(){const e=this.$videoElement;let t=0;if(e){const i=e.buffered;i.length&&i.start(0);t=i.length?i.end(i.length-1):0}return t}getVideoBufferDelayTime(){const e=this.$videoElement;const t=this.getVideoBufferLastTime()-e.currentTime;return t>0?t:0}checkSourceBufferDelay(){const e=this.$videoElement;let t=0,i=0;return e.buffered.length>0&&(i=e.buffered.end(e.buffered.length-1),t=i-e.currentTime),t<0&&(this.player.debug.warn(this.TAG_NAME,`checkVideoSourceBufferDelay ${t} < 0, and buffered is ${i} ,currentTime is ${e.currentTime} , try to seek ${e.currentTime} to ${i}`),e.currentTime=i,t=0),t}checkSourceBufferStore(){const e=this.$videoElement;let t=0;return e.buffered.length>0&&(t=e.currentTime-e.buffered.start(0)),t}getDecodePlaybackRate(){let e=0;const t=this.$videoElement;return t&&(e=t.playbackRate),e}getBufferMaxDelayTime(){let e=(this.player._opt.videoBuffer+this.player._opt.videoBufferDelay)/1e3;return Math.max(5,e+3)}getReadyStateInited(){return this._getVideoReadyState()>=1}}class Yo extends Jo{constructor(e){super(e),this.controlHeight=Qt,this.bufferList=[],this.playing=!1,this.playInterval=null,this.fps=1,this.preFps=1,this.streamFps=0,this.playbackRate=1,this._firstTimestamp=null,this._renderFps=0,this._startfpsTime=null,this._startFpsTimestamp=null,this._hasCalcFps=!1,this.player.on(lt.playbackPause,(e=>{e?(this.pause(),this.player.playback.isPlaybackPauseClearCache&&this.clear()):this.resume()})),this.player.debug.log("CanvasPlaybackLoader","init")}async destroy(){this._stopSync(),this._firstTimestamp=null,this.playing=!1,this.playbackRate=1,this.fps=1,this.preFps=1,this.bufferList=[],this._renderFps=0,this._startfpsTime=null,this._startFpsTimestamp=null,this._hasCalcFps=!1,super.destroy(),this.player.debug.log("CanvasPlaybackLoader","destroy")}_initCanvasRender(){this.player._opt.useWCS?(this.renderType=ti,To()&&this.player._opt.wcsUseWebgl2Render?(this._initContextGl2(),this.webglRender&&(this.isWcsWebgl2=!0)):this._initContext2D()):this.player._opt.useWebGPU?(this.renderType=ri,this._initContextGPU()):(this.renderType=ii,this._initContextGl())}_sync(){this._stopSync(),this._doPlay(),this.playInterval=setInterval((()=>{this._doPlay()}),this.fragDuration)}_doPlay(){if(this.bufferList.length>0&&!this.player.seeking){const e=this.bufferList.shift();e&&e.buffer&&(this._doRender(e.buffer),this.player.handleRender(),this.player.playback.updateStats({ts:e.ts,tfTs:e.tfTs}))}}_stopSync(){this.playInterval&&(clearInterval(this.playInterval),this.playInterval=null)}_doRender(e){if(this.player._opt.useWCS)if(this.webglRender)this.webglRender.render(e),oo(e);else if(to(e.createImageBitmap))try{e.createImageBitmap().then((t=>{this.context2D.drawImage(t,0,0,this.$videoElement.width,this.$videoElement.height),oo(e)}))}catch(e){}else this.context2D.drawImage(e,0,0,this.$videoElement.width,this.$videoElement.height),oo(e);else if(this.getCanvasType()===ii)try{this.webglRender.renderYUV(this.$videoElement.width,this.$videoElement.height,e)}catch(e){this.player.debug.error("CanvasPlaybackLoader",`doRender webgl render context is lost ${this.contextGl&&this.contextGl.isContextLost()} and error: ${e.toString()}`)}else if(this.getCanvasType()===ri)try{if(!this.webGPURender)return void this.player.debug.warn("CanvasVideoLoader","doRender webgpu render is not init");this.webGPURender.renderYUV(this.$videoElement.width,this.$videoElement.height,e)}catch(e){this.player.debug.error("CanvasPlaybackLoader",`doRender webgpu render and error: ${e.toString()}`)}}get rate(){return this.playbackRate}get fragDuration(){return Math.ceil(1e3/(this.fps*this.playbackRate))}get bufferSize(){return this.bufferList.length}getStreamFps(){return this.streamFps}initFps(){this._hasCalcFps?this.player.debug.log("CanvasPlaybackLoader","initFps, has calc fps"):(this.preFps=ca(this.player.playback.fps,1,100),this.fps=this.preFps)}setFps(e){e!==this.fps?(e>100&&this.player.debug.warn("CanvasPlaybackLoader","setFps max",e),e<0&&this.player.debug.warn("CanvasPlaybackLoader","setFps min",e),this.fps=ca(e,1,100),this.player.debug.log("CanvasPlaybackLoader",`setFps ${this.preFps} -> ${this.fps}`),this.player.playback.isUseFpsRender&&this._sync()):this.player.debug.log("CanvasPlaybackLoader",`setFps, same fps ${e}`)}setStreamFps(e){this.player.debug.log("CanvasPlaybackLoader","setStreamFps",e),this._hasCalcFps=!0,this.streamFps=e,this.preFps=e,this.setFps(e)}setRate(e){e!==this.playbackRate&&(this.playbackRate=e,this.player.playback.isUseFpsRender&&this._sync())}render$2(e){null===this._firstTimestamp&&(this._firstTimestamp=e.ts);const t={tfTs:e.ts-this._firstTimestamp,ts:e.ts};e.videoFrame?t.buffer=e.videoFrame:t.buffer=e.output,this.bufferList.push(t),this.startRender(),this.player.handleRender(),this.player.playback.updateStats({ts:e.ts,tfTs:t.tfTs})}startRender(){for(;!(this.bufferList.length<=0);){const e=this.bufferList.shift();this._doRender(e.buffer)}}pushData(e){null===this._firstTimestamp&&(this._firstTimestamp=e.ts);const t={tfTs:e.ts-this._firstTimestamp,ts:e.ts};e.videoFrame?t.buffer=e.videoFrame:t.buffer=e.output;const i=this.player._opt.playbackConfig.isCacheBeforeDecodeForFpsRender;if(i||this.bufferSize>this.fps*this.playbackRate*2&&(this.player.debug.warn("CanvasPlaybackLoader",`buffer size is ${this.bufferSize}`),this._doPlay()),this.bufferList.push(t),!this._hasCalcFps){const e=ho(this.bufferList);null!==e&&e!==this.preFps&&(this.player.debug.log("CanvasPlaybackLoader",`calc fps is ${e} pre fps is ${this.preFps} and updatePreFps`),this.setStreamFps(e))}if(!i){const e=this.bufferList.length,t=e/(this.fps*this.playbackRate);this.player.debug.log("CanvasPlaybackLoader","rate is",t),t<=1?this.setFps(this.preFps):(this.setFps(this.fps+Math.floor(t*this.playbackRate)),this.player.debug.warn("CanvasPlaybackLoader","rate is",t,"fps is",this.fps,"bufferListLength is",e))}}initVideo(){this.player.playback&&this.player.playback.isUseFpsRender&&this._sync(),this.playing=!0}initVideoDelay(){const e=this.player._opt.playbackDelayTime;e>0?this.delayTimeout=setTimeout((()=>{this.initVideo()}),e):this.initVideo()}clearView(){super.clearView(),this.contextGl.clear(this.contextGl.COLOR_BUFFER_BIT)}clear(){this.player._opt.useWCS&&this.bufferList.forEach((e=>{e.buffer&&oo(e.buffer)})),this.bufferList=[]}resume(){this.player.playback.isUseFpsRender&&this._sync(),this.playing=!0}pause(){this.player.playback.isUseFpsRender&&this._stopSync(),this.playing=!1}}class Qo{constructor(e){return new(Qo.getLoaderFactory(e._opt))(e)}static getLoaderFactory(e){return e.useMSE?e.mseUseCanvasRender?qo:Ko:e.isHls&&Ao(e.supportHls265)||e.isWebrtc&&Ao(e.isWebrtcH265)?e.useCanvasRender?qo:Ko:e.isAliyunRtc?Ko:e.useWCS?e.playType===w?Yo:!e.useOffscreen&&e.wcsUseVideoRender?Ko:qo:e.playType===w?Yo:e.wasmUseVideoRender&&!e.useOffscreen?Ko:qo}}class Xo extends a{constructor(e){super(),this.bufferList=[],this.player=e,this.$audio=null,this.scriptNode=null,this.workletProcessorNode=null,this.workletWorkerCloseTimeout=null,this.hasInitScriptNode=!1,this.audioContext=new(window.AudioContext||window.webkitAudioContext)({sampleRate:48e3}),this.gainNode=this.audioContext.createGain();const t=this.audioContext.createBufferSource();t.buffer=this.audioContext.createBuffer(1,1,22050),t.connect(this.audioContext.destination),t.noteOn?t.noteOn(0):t.start(0),this.audioBufferSourceNode=t,this.mediaStreamAudioDestinationNode=this.audioContext.createMediaStreamDestination(),this.gainNode.gain.value=0,this._prevVolume=null,this.playing=!1,this.audioInfo={encTypeCode:"",encType:"",channels:"",sampleRate:"",depth:""},this.init=!1,this.hasAudio=!1,this.audioResumeStateTimeout=null}async destroy(){return this.closeAudio(),this.resetInit(),this.clearAudioResumeStateTimeout(),this.audioContext&&(await this.audioContext.close(),this.audioContext=null),this.gainNode&&(this.gainNode.disconnect(),this.gainNode=null),this.hasAudio=!1,this.playing=!1,this.scriptNode&&(this.scriptNode.disconnect(),this.scriptNode.onaudioprocess=oa,this.scriptNode=null),await this._destroyWorklet(),this.workletProcessorNode&&(this.workletProcessorNode.disconnect(),this.workletProcessorNode.port.onmessage=oa,this.workletProcessorNode=null),this.audioBufferSourceNode&&(this.audioBufferSourceNode.stop(),this.audioBufferSourceNode=null),this.mediaStreamAudioDestinationNode&&(this.mediaStreamAudioDestinationNode.disconnect(),this.mediaStreamAudioDestinationNode=null),this.hasInitScriptNode=!1,this._prevVolume=null,this.off(),!0}_destroyWorklet(){return new Promise(((e,t)=>{this.workletProcessorNode?(this.workletProcessorNode.port.postMessage({type:"destroy"}),this.workletWorkerCloseTimeout=setTimeout((()=>{this.player.debug.log(this.TAG_NAME,"send close and wait 10ms destroy directly"),this.workletWorkerCloseTimeout&&(clearTimeout(this.workletWorkerCloseTimeout),this.workletWorkerCloseTimeout=null),e()}),10)):e()}))}resetInit(){this.audioInfo={encTypeCode:"",encType:"",channels:"",sampleRate:"",depth:""},this.init=!1}getAudioInfo(){return this.audioInfo}updateAudioInfo(e){e.encTypeCode&&(this.audioInfo.encTypeCode=e.encTypeCode,this.audioInfo.encType=xt[e.encTypeCode]),e.channels&&(this.audioInfo.channels=e.channels),e.sampleRate&&(this.audioInfo.sampleRate=e.sampleRate),e.depth&&(this.audioInfo.depth=e.depth),this.audioInfo.sampleRate&&this.audioInfo.channels&&this.audioInfo.encType&&!this.init&&(this.player.emit(lt.audioInfo,this.audioInfo),this.init=!0)}get isPlaying(){return this.playing}get isMute(){return 0===this.gainNode.gain.value}get volume(){return this.gainNode.gain.value}get bufferSize(){return this.bufferList.length}get audioContextState(){let e=null;return this.audioContext&&(e=this.audioContext.state),e}initScriptNode(){}initMobileScriptNode(){}initWorkletScriptNode(){}getEngineType(){return""}mute(e){e?(this.setVolume(0),this.clear()):this.setVolume(this.player.lastVolume||.5)}setVolume(e){e=parseFloat(e).toFixed(2),isNaN(e)||(this.audioEnabled(!0),e=ca(e,0,1),null===this._prevVolume?this.player.emit(lt.mute,0===e):0===this._prevVolume&&e>0?this.player.emit(lt.mute,!1):this._prevVolume>0&&0===e&&this.player.emit(lt.mute,!0),this.gainNode.gain.value=e,this.player.emit(lt.volumechange,this.player.volume),this.player.emit(lt.volume,this.player.volume),this._prevVolume=e)}closeAudio(){this.hasInitScriptNode&&(this.scriptNode&&this.scriptNode.disconnect(this.gainNode),this.workletProcessorNode&&this.workletProcessorNode.disconnect(this.gainNode),this.gainNode&&(this.gainNode.disconnect(this.mediaStreamAudioDestinationNode),this.$audio||this.gainNode.disconnect(this.audioContext.destination))),this.clear()}audioEnabled(e){e?this.isStateSuspended()&&(this.audioContext.resume().then((()=>{this.player.emit(lt.audioResumeState,{state:this.audioContextState,isRunning:this.isStateRunning()})})),this.audioResumeStateTimeout=setTimeout((()=>{this.clearAudioResumeStateTimeout(),this.isStateSuspended()&&this.player.emit(lt.audioResumeState,{state:this.audioContextState,isRunning:this.isStateRunning()})}),1e3)):this.isStateRunning()&&this.audioContext.suspend()}isStateRunning(){return"running"===this.audioContextState}isStateSuspended(){return"suspended"===this.audioContextState}clearAudioResumeStateTimeout(){this.audioResumeStateTimeout&&(clearTimeout(this.audioResumeStateTimeout),this.audioResumeStateTimeout=null)}clear(){this.bufferList=[]}play(e,t){}pause(){this.playing=!1}resume(){this.playing=!0}setRate(e){}getAudioBufferSize(){return 0}}class Zo{constructor(e,t,i,s){this.player=e,this.audio=t,this.channel=i,this.bufferSize=s}destroy(){this.buffer=null,this.channel=null}extract(e,t){let i=this.provide(t);for(let t=0;t<i.size;t++)e[2*t]=i.left[t],e[2*t+1]=i.right[t];return this.audio.tempAudioTimestamp=i.ts,i.size}provide(e){let t=new Float32Array(e),i=new Float32Array(e),s=0,r=0,a=0,o=e/this.bufferSize;const n=this.audio.bufferList;if(o&&n.length>=o){try{for(let e=0;e<o;e++){const e=n.shift();2===this.channel?(t.set(e.buffer[0],a),i.set(e.buffer[1],a)):(t.set(e.buffer[0],a),i.set(e.buffer[0],a)),a+=this.bufferSize,r=e.ts}}catch(e){this.player.debug.warn("Processor","provide()",e),t=new Float32Array(0),i=new Float32Array(0)}s=t.length}return{size:s,ts:r,left:t,right:i}}}class en{constructor(){this._vector=new Float32Array,this._position=0,this._frameCount=0}destroy(){this.clear(),this._vector=null}get vector(){return this._vector}get position(){return this._position}get startIndex(){return 2*this._position}get frameCount(){return this._frameCount}get endIndex(){return 2*(this._position+this._frameCount)}clear(){this.receive(this._frameCount),this.rewind()}put(e){this._frameCount+=e}putSamples(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s=2*(t=t||0);i>=0||(i=(e.length-s)/2);const r=2*i;this.ensureCapacity(i+this._frameCount);const a=this.endIndex;this.vector.set(e.subarray(s,s+r),a),this._frameCount+=i}putBuffer(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t=t||0,i>=0||(i=e.frameCount-t),this.putSamples(e.vector,e.position+t,i)}receive(e){e>=0&&!(e>this._frameCount)||(e=this.frameCount),this._frameCount-=e,this._position+=e}receiveSamples(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const i=2*t,s=this.startIndex;e.set(this._vector.subarray(s,s+i)),this.receive(t)}extract(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s=this.startIndex+2*t,r=2*i;e.set(this._vector.subarray(s,s+r))}ensureCapacity(){const e=parseInt(2*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0));if(this._vector.length<e){const t=new Float32Array(e);t.set(this._vector.subarray(this.startIndex,this.endIndex)),this._vector=t,this._position=0}else this.rewind()}ensureAdditionalCapacity(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.ensureCapacity(this._frameCount+e)}rewind(){this._position>0&&(this._vector.set(this._vector.subarray(this.startIndex,this.endIndex)),this._position=0)}}class tn{constructor(e){e?(this._inputBuffer=new en,this._outputBuffer=new en):this._inputBuffer=this._outputBuffer=null}destroy(){this.clear(),this._outputBuffer&&(this._outputBuffer.destroy(),this._outputBuffer=null),this._inputBuffer&&(this._inputBuffer.destroy(),this._inputBuffer=null)}get inputBuffer(){return this._inputBuffer}set inputBuffer(e){this._inputBuffer=e}get outputBuffer(){return this._outputBuffer}set outputBuffer(e){this._outputBuffer=e}clear(){this._inputBuffer.clear(),this._outputBuffer.clear()}}class sn extends tn{constructor(e){super(e),this.reset(),this._rate=1}destroy(){super.destroy()}set rate(e){this._rate=e}reset(){this.slopeCount=0,this.prevSampleL=0,this.prevSampleR=0}clone(){const e=new sn;return e.rate=this._rate,e}process(){const e=this._inputBuffer.frameCount;this._outputBuffer.ensureAdditionalCapacity(e/this._rate+1);const t=this.transpose(e);this._inputBuffer.receive(),this._outputBuffer.put(t)}transpose(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(0===e)return 0;const t=this._inputBuffer.vector,i=this._inputBuffer.startIndex,s=this._outputBuffer.vector,r=this._outputBuffer.endIndex;let a=0,o=0;for(;this.slopeCount<1;)s[r+2*o]=(1-this.slopeCount)*this.prevSampleL+this.slopeCount*t[i],s[r+2*o+1]=(1-this.slopeCount)*this.prevSampleR+this.slopeCount*t[i+1],o+=1,this.slopeCount+=this._rate;if(this.slopeCount-=1,1!==e)e:for(;;){for(;this.slopeCount>1;)if(this.slopeCount-=1,a+=1,a>=e-1)break e;const n=i+2*a;s[r+2*o]=(1-this.slopeCount)*t[n]+this.slopeCount*t[n+2],s[r+2*o+1]=(1-this.slopeCount)*t[n+1]+this.slopeCount*t[n+3],o+=1,this.slopeCount+=this._rate}return this.prevSampleL=t[i+2*e-2],this.prevSampleR=t[i+2*e-1],o}}class rn{constructor(e){this._pipe=e}destroy(){}get pipe(){return this._pipe}get inputBuffer(){return this._pipe.inputBuffer}get outputBuffer(){return this._pipe.outputBuffer}fillInputBuffer(){throw new Error("fillInputBuffer() not overridden")}fillOutputBuffer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;for(;this.outputBuffer.frameCount<e;){const e=16384-this.inputBuffer.frameCount;if(this.fillInputBuffer(e),this.inputBuffer.frameCount<16384)break;this._pipe.process()}}clear(){this._pipe.clear()}}const an=function(){};class on extends rn{constructor(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:an;super(t),this.callback=i,this.sourceSound=e,this.historyBufferSize=22050,this._sourcePosition=0,this.outputBufferPosition=0,this._position=0}destroy(){this.clear(),this.sourceSound.destroy(),this.sourceSound=null,this._sourcePosition=0,this.outputBufferPosition=0,this._position=0}get position(){return this._position}set position(e){if(e>this._position)throw new RangeError("New position may not be greater than current position");const t=this.outputBufferPosition-(this._position-e);if(t<0)throw new RangeError("New position falls outside of history buffer");this.outputBufferPosition=t,this._position=e}get sourcePosition(){return this._sourcePosition}set sourcePosition(e){this.clear(),this._sourcePosition=e}onEnd(){this.callback()}fillInputBuffer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const t=new Float32Array(2*e),i=this.sourceSound.extract(t,e,this._sourcePosition);this._sourcePosition+=i,this.inputBuffer.putSamples(t,0,i)}extract(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.fillOutputBuffer(this.outputBufferPosition+t);const i=Math.min(t,this.outputBuffer.frameCount-this.outputBufferPosition);this.outputBuffer.extract(e,this.outputBufferPosition,i);const s=this.outputBufferPosition+i;return this.outputBufferPosition=Math.min(this.historyBufferSize,s),this.outputBuffer.receive(Math.max(s-this.historyBufferSize,0)),this._position+=i,i}handleSampleData(e){this.extract(e.data,4096)}clear(){super.clear(),this.outputBufferPosition=0}}const nn=[[124,186,248,310,372,434,496,558,620,682,744,806,868,930,992,1054,1116,1178,1240,1302,1364,1426,1488,0],[-100,-75,-50,-25,25,50,75,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-20,-15,-10,-5,5,10,15,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-4,-3,-2,-1,1,2,3,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],ln=-10/1.5;class dn extends tn{constructor(e){super(e),this._quickSeek=!0,this.midBufferDirty=!1,this.midBuffer=null,this.refMidBuffer=null,this.overlapLength=0,this.autoSeqSetting=!0,this.autoSeekSetting=!0,this._tempo=1,this.setParameters(44100,0,0,8)}destroy(){this.clear(),super.destroy()}clear(){super.clear(),this.clearMidBuffer(),this.refMidBuffer=null}clearMidBuffer(){this.midBufferDirty&&(this.midBufferDirty=!1),this.midBuffer=null}setParameters(e,t,i,s){e>0&&(this.sampleRate=e),s>0&&(this.overlapMs=s),t>0?(this.sequenceMs=t,this.autoSeqSetting=!1):this.autoSeqSetting=!0,i>0?(this.seekWindowMs=i,this.autoSeekSetting=!1):this.autoSeekSetting=!0,this.calculateSequenceParameters(),this.calculateOverlapLength(this.overlapMs),this.tempo=this._tempo}set tempo(e){let t;this._tempo=e,this.calculateSequenceParameters(),this.nominalSkip=this._tempo*(this.seekWindowLength-this.overlapLength),this.skipFract=0,t=Math.floor(this.nominalSkip+.5),this.sampleReq=Math.max(t+this.overlapLength,this.seekWindowLength)+this.seekLength}get tempo(){return this._tempo}get inputChunkSize(){return this.sampleReq}get outputChunkSize(){return this.overlapLength+Math.max(0,this.seekWindowLength-2*this.overlapLength)}calculateOverlapLength(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;e=this.sampleRate*t/1e3,e=e<16?16:e,e-=e%8,this.overlapLength=e,this.refMidBuffer=new Float32Array(2*this.overlapLength),this.midBuffer=new Float32Array(2*this.overlapLength)}checkLimits(e,t,i){return e<t?t:e>i?i:e}calculateSequenceParameters(){let e,t;this.autoSeqSetting&&(e=150+-50*this._tempo,e=this.checkLimits(e,50,125),this.sequenceMs=Math.floor(e+.5)),this.autoSeekSetting&&(t=28.333333333333332+ln*this._tempo,t=this.checkLimits(t,15,25),this.seekWindowMs=Math.floor(t+.5)),this.seekWindowLength=Math.floor(this.sampleRate*this.sequenceMs/1e3),this.seekLength=Math.floor(this.sampleRate*this.seekWindowMs/1e3)}set quickSeek(e){this._quickSeek=e}clone(){const e=new dn;return e.tempo=this._tempo,e.setParameters(this.sampleRate,this.sequenceMs,this.seekWindowMs,this.overlapMs),e}seekBestOverlapPosition(){return this._quickSeek?this.seekBestOverlapPositionStereoQuick():this.seekBestOverlapPositionStereo()}seekBestOverlapPositionStereo(){let e,t,i,s=0;for(this.preCalculateCorrelationReferenceStereo(),e=0,t=Number.MIN_VALUE;s<this.seekLength;s+=1)i=this.calculateCrossCorrelationStereo(2*s,this.refMidBuffer),i>t&&(t=i,e=s);return e}seekBestOverlapPositionStereoQuick(){let e,t,i,s,r,a=0;for(this.preCalculateCorrelationReferenceStereo(),t=Number.MIN_VALUE,e=0,s=0,r=0;a<4;a+=1){let o=0;for(;nn[a][o]&&(r=s+nn[a][o],!(r>=this.seekLength));)i=this.calculateCrossCorrelationStereo(2*r,this.refMidBuffer),i>t&&(t=i,e=r),o+=1;s=e}return e}preCalculateCorrelationReferenceStereo(){let e,t,i=0;for(;i<this.overlapLength;i+=1)t=i*(this.overlapLength-i),e=2*i,this.refMidBuffer[e]=this.midBuffer[e]*t,this.refMidBuffer[e+1]=this.midBuffer[e+1]*t}calculateCrossCorrelationStereo(e,t){const i=this._inputBuffer.vector;e+=this._inputBuffer.startIndex;let s=0,r=2;const a=2*this.overlapLength;let o;for(;r<a;r+=2)o=r+e,s+=i[o]*t[r]+i[o+1]*t[r+1];return s}overlap(e){this.overlapStereo(2*e)}overlapStereo(e){const t=this._inputBuffer.vector;e+=this._inputBuffer.startIndex;const i=this._outputBuffer.vector,s=this._outputBuffer.endIndex;let r,a,o=0;const n=1/this.overlapLength;let l,d,h;for(;o<this.overlapLength;o+=1)a=(this.overlapLength-o)*n,l=o*n,r=2*o,d=r+e,h=r+s,i[h+0]=t[d+0]*l+this.midBuffer[r+0]*a,i[h+1]=t[d+1]*l+this.midBuffer[r+1]*a}process(){let e,t,i;if(null===this.midBuffer){if(this._inputBuffer.frameCount<this.overlapLength)return;this.midBuffer=new Float32Array(2*this.overlapLength),this._inputBuffer.receiveSamples(this.midBuffer,this.overlapLength)}for(;this._inputBuffer.frameCount>=this.sampleReq;){e=this.seekBestOverlapPosition(),this._outputBuffer.ensureAdditionalCapacity(this.overlapLength),this.overlap(Math.floor(e)),this._outputBuffer.put(this.overlapLength),t=this.seekWindowLength-2*this.overlapLength,t>0&&this._outputBuffer.putBuffer(this._inputBuffer,e+this.overlapLength,t);const s=this._inputBuffer.startIndex+2*(e+this.seekWindowLength-this.overlapLength);this.midBuffer.set(this._inputBuffer.vector.subarray(s,s+2*this.overlapLength)),this.skipFract+=this.nominalSkip,i=Math.floor(this.skipFract),this.skipFract-=i,this._inputBuffer.receive(i)}}}const hn=function(e,t){return(e>t?e-t:t-e)>1e-10};class cn{constructor(){this.transposer=new sn(!1),this.stretch=new dn(!1),this._inputBuffer=new en,this._intermediateBuffer=new en,this._outputBuffer=new en,this._rate=0,this._tempo=0,this.virtualPitch=1,this.virtualRate=1,this.virtualTempo=1,this.calculateEffectiveRateAndTempo()}destroy(){this.clear(),this._inputBuffer.destroy(),this._intermediateBuffer.destroy(),this._outputBuffer.destroy(),this._inputBuffer=null,this._intermediateBuffer=null,this._outputBuffer=null}clear(){this.transposer.clear(),this.stretch.clear()}clone(){const e=new cn;return e.rate=this.rate,e.tempo=this.tempo,e}get rate(){return this._rate}set rate(e){this.virtualRate=e,this.calculateEffectiveRateAndTempo()}set rateChange(e){this._rate=1+.01*e}get tempo(){return this._tempo}set tempo(e){this.virtualTempo=e,this.calculateEffectiveRateAndTempo()}set tempoChange(e){this.tempo=1+.01*e}set pitch(e){this.virtualPitch=e,this.calculateEffectiveRateAndTempo()}set pitchOctaves(e){this.pitch=Math.exp(.69314718056*e),this.calculateEffectiveRateAndTempo()}set pitchSemitones(e){this.pitchOctaves=e/12}get inputBuffer(){return this._inputBuffer}get outputBuffer(){return this._outputBuffer}calculateEffectiveRateAndTempo(){const e=this._tempo,t=this._rate;this._tempo=this.virtualTempo/this.virtualPitch,this._rate=this.virtualRate*this.virtualPitch,hn(this._tempo,e)&&(this.stretch.tempo=this._tempo),hn(this._rate,t)&&(this.transposer.rate=this._rate),this._rate>1?this._outputBuffer!=this.transposer.outputBuffer&&(this.stretch.inputBuffer=this._inputBuffer,this.stretch.outputBuffer=this._intermediateBuffer,this.transposer.inputBuffer=this._intermediateBuffer,this.transposer.outputBuffer=this._outputBuffer):this._outputBuffer!=this.stretch.outputBuffer&&(this.transposer.inputBuffer=this._inputBuffer,this.transposer.outputBuffer=this._intermediateBuffer,this.stretch.inputBuffer=this._intermediateBuffer,this.stretch.outputBuffer=this._outputBuffer)}process(){this._rate>1?(this.stretch.process(),this.transposer.process()):(this.transposer.process(),this.stretch.process())}}class un{constructor(e,t,i){this.player=e,this.audio=t,this.soundTouch=new cn,this.soundTouch.tempo=1,this.soundTouch.rate=1,this.filter=new on(i,this.soundTouch)}destroy(){this.filter&&(this.filter.destroy(),this.filter=null),this.soundTouch&&(this.soundTouch.destroy(),this.soundTouch=null)}setRate(e){e!==this.soundTouch.rate&&(this.soundTouch.tempo=e)}provide(e){let t=new Float32Array(2*e),i=this.filter.extract(t,e),s=new Float32Array(i),r=new Float32Array(i);for(let e=0;e<i;e++)s[e]=t[2*e],r[e]=t[2*e+1];return{size:i,left:s,right:r,ts:this.audio.tempAudioTimestamp||0}}}class pn extends Xo{constructor(e){super(e),this.defaultPlaybackRate=1,this.playbackRate=1,this.rateProcessor=null,this.processor=null,this.scriptNodeInterval=null,this.engineType=this.getAutoAudioEngineType(),this.audioBufferSize=this.getAudioBufferSizeByType(),this.$audio=null,this._delayPlay=!1,this.eventListenList=[],this.workletUrl=null,this.clearWorkletUrlTimeout=null,this.player._opt.supportLockScreenPlayAudio&&wa()&&(this.$audio=document.createElement("audio"),Object.assign(this.$audio.style,{position:"absolute",left:"-100%",top:"-100%"}),e.$container?e.$container.appendChild(this.$audio):document.body.appendChild(this.$audio),this._bindAudioProxy(),this.player.debug.log("AudioContext","create audio element")),this.scriptStartTime=0,this.player.debug.log("AudioContext","init",`engineType: ${this.engineType}, audioBufferSize: ${this.audioBufferSize}`)}async destroy(){return await super.destroy(),this.workletUrl&&(URL.revokeObjectURL(this.workletUrl),this.workletUrl=null),this.clearWorkletUrlTimeout&&(clearTimeout(this.clearWorkletUrlTimeout),this.clearWorkletUrlTimeout=null),this.eventListenList.length&&(this.eventListenList.forEach((e=>{e()})),this.eventListenList=[]),this.$audio&&(this.$audio.pause(),this.$audio.srcObject=null,this.$audio.parentNode&&this.$audio.parentNode.removeChild(this.$audio),this.$audio=null),this.processor&&(this.processor.destroy(),this.processor=null),this.rateProcessor&&(this.rateProcessor.destroy(),this.rateProcessor=null),this.scriptNodeInterval&&(clearInterval(this.scriptNodeInterval),this.scriptNodeInterval=null),this.defaultPlaybackRate=1,this.playbackRate=1,this.scriptStartTime=0,this.audioBufferSize=0,this.engineType=Fs,this.player.debug.log("AudioContext","destroy"),!0}isAudioPlaying(){return this.$audio&&Ao(this.$audio.paused)&&Ao(this.$audio.ended)&&0!==this.$audio.playbackRate&&0!==this.$audio.readyState}_bindAudioProxy(){const{proxy:e}=this.player.events,t=e(this.$audio,"canplay",(()=>{this.player.debug.log("AudioContext","canplay"),this._delayPlay&&this._audioElementPlay()}));this.eventListenList.push(t)}_getAudioElementReadyState(){let e=0;return this.$audio&&(e=this.$audio.readyState),e}audioElementPlay(){if(this.$audio){const e=this._getAudioElementReadyState();if(this.player.debug.log("AudioContext",`play and readyState: ${e}`),!(0!==e||Qa()&&wa()))return this.player.debug.warn("AudioContext","readyState is 0 and set _delayPlay to true"),void(this._delayPlay=!0);this._audioElementPlay()}}_audioElementPlay(){this.$audio&&this.$audio.play().then((()=>{this._delayPlay=!1,this.player.debug.log("AudioContext","_audioElementPlay success"),setTimeout((()=>{this.isAudioPlaying()||(this.player.debug.warn("AudioContext","play failed and retry play"),this._audioElementPlay())}),100),this.isAudioPlaying()&&(this.player.debug.log("AudioContext","play success and remove document click event listener"),document.removeEventListener("click",this._audioElementPlay.bind(this)))})).catch((e=>{this.player.debug.error("AudioContext","_audioElementPlay error",e),document.addEventListener("click",this._audioElementPlay.bind(this))}))}getAudioBufferSize(){return this.audioBufferSize}get oneBufferDuration(){return this.audioBufferSize/this.audioContext.sampleRate*1e3}get isActiveEngineType(){return this.engineType===Os}getBufferListDuration(){return this.bufferList.length*this.oneBufferDuration}isMoreThanMinBufferDuration(){return this.getBufferListDuration()>=100*this.playbackRate}initProcessor(){this.processor=new Zo(this.player,this,this.audioInfo.channels,this.audioBufferSize),this.rateProcessor=new un(this.player,this,this.processor)}getAutoAudioEngineType(){let e=this.player._opt.audioEngine||Fs;const t=()=>{e=Qa()&&ba()?Os:(wa()&&this.player._opt.supportLockScreenPlayAudio||no()&&this.supportAudioWorklet(),Fs)};return this.player._opt.audioEngine?this.player._opt.audioEngine===Us&&no()&&this.supportAudioWorklet()?e=Us:this.player._opt.audioEngine===Os?e=Os:this.player._opt.audioEngine===Fs?e=Fs:t():t(),e}getAudioBufferSizeByType(){const e=this.engineType;this.player._opt.hasVideo;const t=this.player._opt.weiXinInAndroidAudioBufferSize;return e===Us?1024:e===Os?t||4800:1024}supportAudioWorklet(){return this.audioContext&&this.audioContext.audioWorklet}initScriptNode(){this.playing=!0,this.hasInitScriptNode||(this.initProcessor(),this.engineType===Us?this.initWorkletScriptNode():this.engineType===Os?this.initIntervalScriptNode():this.engineType===Fs&&this.initProcessScriptNode(),this.audioElementPlay())}getEngineType(){return this.engineType}isPlaybackRateSpeed(){return this.playbackRate>this.defaultPlaybackRate}initProcessScriptNode(){const e=this.audioContext.createScriptProcessor(this.audioBufferSize,0,this.audioInfo.channels);e.onaudioprocess=e=>{const t=e.outputBuffer;this.handleScriptNodeCallback(t)},e.connect(this.gainNode),this.scriptNode=e,this.gainNode.connect(this.mediaStreamAudioDestinationNode),this.$audio?this.$audio.srcObject=this.mediaStreamAudioDestinationNode.stream:this.gainNode.connect(this.audioContext.destination),this.hasInitScriptNode=!0}initIntervalScriptNode(){this.scriptStartTime=0;const e=1e3*this.audioBufferSize/this.audioContext.sampleRate;this.scriptNodeInterval=setInterval((()=>{if(0===this.bufferList.length||Ao(this.playing)||this.isMute)return void(this.playing&&Ao(this.isMute)&&this.player.debug.log("AudioContext",`interval script node and bufferList is ${this.bufferList.length} or playing is ${this.playing}`));const e=this.audioContext.createBufferSource(),t=this.audioContext.createBuffer(this.audioInfo.channels,this.audioBufferSize,this.audioContext.sampleRate);this.handleScriptNodeCallback(t,(()=>{this.scriptStartTime<this.audioContext.currentTime&&(this.player.debug.log("AudioContext",`script start time ${this.scriptStartTime} is less than current time ${this.audioContext.currentTime}`),this.scriptStartTime=this.audioContext.currentTime),e.buffer=t,e.connect(this.gainNode),e.start(this.scriptStartTime),this.scriptStartTime+=t.duration}))}),e),this.gainNode.connect(this.mediaStreamAudioDestinationNode),this.$audio?this.$audio.srcObject=this.mediaStreamAudioDestinationNode.stream:this.gainNode.connect(this.audioContext.destination),this.hasInitScriptNode=!0}initWorkletScriptNode(){let e=ao((function(){class e extends AudioWorkletProcessor{constructor(){super(),this.audioBufferSize=1024,this.start=!1,this.channels=1,this.samplesArray=[],this.offset=0,this.state=0,this.port.onmessage=e=>{"init"===e.data.message?(this.audioBufferSize=e.data.audioBufferSize,this.start=e.data.start,this.channels=e.data.channels,this.state=0,this.offset=0,this.samplesArray=[]):"stop"===e.data.message?(this.state=0,this.start=!1,this.offset=0,this.samplesArray=[]):"data"===e.data.message?this.samplesArray.push(e.data.buffer):"zero"===e.data.message&&this.samplesArray.push({left:new Float32Array(this.audioBufferSize).fill(0),right:new Float32Array(this.audioBufferSize).fill(0)})}}process(e,t,i){const s=t[0][0],r=t[0][1];if(0===this.offset&&this.port.postMessage({message:"beep"}),0===this.state)this.state=1;else if(1===this.state&&this.samplesArray.length>=4)this.state=2;else if(2===this.state){const e=this.samplesArray[0];for(let t=0;t<s.length;t++)1===this.channels?s[t]=e.left[t+this.offset]:2===this.channels&&(s[t]=e.left[t+this.offset],r&&(r[t]=e.right[t+this.offset]))}else 1===this.channels?s.fill(0):2===this.channels&&(s.fill(0),r&&r.fill(0));return this.offset+=128,this.offset===this.audioBufferSize&&(this.offset=0,2===this.state&&this.samplesArray.shift(),0===this.samplesArray.length&&(this.state=0)),this.start}}registerProcessor("worklet-processor",e)}));this.workletUrl=e,this.audioContext.audioWorklet.addModule(e).then((()=>{if(this.player.isDestroyedOrClosed())return void this.player.debug.log("AudioContext","initWorkletScriptNode() player is destroyed");if(!this.audioContext)return void this.player.debug.warn("AudioContext","initWorkletScriptNode audioContext is null");let e=[1];2===this.audioInfo.channels&&(e=[1,1]);try{this.workletProcessorNode=new AudioWorkletNode(this.audioContext,"worklet-processor",{numberOfOutputs:this.audioInfo.channels,outputChannelCount:e})}catch(e){this.player.debug.error("AudioContext","initWorkletScriptNode error",e),this.workletProcessorNode=null,this.tierDownToProcessScript()}this.workletProcessorNode&&(this.workletProcessorNode.connect(this.gainNode),this.gainNode.connect(this.mediaStreamAudioDestinationNode),this.$audio?this.$audio.srcObject=this.mediaStreamAudioDestinationNode.stream:this.gainNode.connect(this.audioContext.destination),this.hasInitScriptNode=!0,this.workletProcessorNode.port.postMessage({message:"init",audioBufferSize:this.audioBufferSize,start:!0,channels:this.audioInfo.channels}),this.workletProcessorNode.port.onmessage=e=>{this.workletProcessorNode?this.audioContext?this.handleScriptNodeCallback(this.workletProcessorNode,null,!0):this.workletProcessorNode.port.postMessage({message:"zero"}):this.player.debug.error("AudioContext","workletProcessorNode is null")})})),this.clearWorkletUrlTimeout=setTimeout((()=>{URL.revokeObjectURL(this.workletUrl),this.workletUrl=null,this.clearWorkletUrlTimeout=null}),ie)}tierDownToProcessScript(){this.player.debug.log("AudioContext","tierDownToProcessScript"),this.engineType=Fs,this.audioBufferSize=this.getAudioBufferSizeByType(),this.initProcessScriptNode(),this.audioElementPlay()}handleScriptNodeCallback(e,t){let i,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=t||oa;let r=e.length;s&&(i=e,r=this.audioBufferSize);const a=this.audioInfo.channels;if(this.playing&&this.isMoreThanMinBufferDuration()){if(this.player._opt,this.player.openSyncAudioAndVideo()&&yo(this.player.visibility)){this.calcPlaybackRateBySync();const r=this.player.getAudioSyncVideoDiff();if(r>this.player._opt.syncAudioAndVideoDiff)return this.player.debug.warn("AudioContext",`audioSyncVideoOption more than diff :${r}, waiting and bufferList is ${this.bufferList.length}`),s?i.port.postMessage({message:"zero"}):this.fillScriptNodeOutputBuffer(e,a),void t()}let o=this._provide(r);if(0===o.size)return Ao(this.player.isPlaybackOnlyDecodeIFrame())&&this.player.debug.warn("AudioContext",`bufferList size is ${this.bufferList.length} outputBufferLength is ${r},and bufferItem.size is 0`),s?i.port.postMessage({message:"zero"}):this.fillScriptNodeOutputBuffer(e,a),void t();o&&o.ts&&(this.player.audioTimestamp=o.ts),s?i.port.postMessage({message:"data",buffer:o}):this.fillScriptNodeOutputBuffer(e,a,o),t()}else 0===this.bufferList.length&&this.playing&&Ao(this.isMute)&&Ao(this.player.isPlaybackOnlyDecodeIFrame())&&this.player.debug.warn("AudioContext",`bufferList size is 0 and outputBufferLength is ${r}`),s?i.port.postMessage({message:"zero"}):this.fillScriptNodeOutputBuffer(e,a),t()}fillScriptNodeOutputBuffer(e,t,i){if(1===t){const t=e.getChannelData(0);i?0===i.size?t.fill(0):t.set(i.left):t.fill(0)}else if(2===t){const t=e.getChannelData(0),s=e.getChannelData(1);i?0===i.size?(t.fill(0),s.fill(0)):(t.set(i.left),s.set(i.right)):(t.fill(0),s.fill(0))}}play(e,t){this.isMute||(this.hasInitScriptNode?(this.hasAudio=!0,this.player.latestAudioTimestamp=t,this.bufferList.push({buffer:e,ts:t}),Ao(this.player.openSyncAudioAndVideo())&&this.calcPlaybackRateByBuffer()):this.player.debug.warn("AudioContext","play has not init script node"))}calcPlaybackRateBySync(){if(this.isMute)return;if(!this.playing)return;const e=Math.floor(2e3/this.oneBufferDuration);if(this.bufferList.length>e)return this.player.debug.warn("AudioContext",`bufferList length ${this.bufferList.length} more than ${e}, and drop`),void this.clear();const t=this.player.getAudioSyncVideoDiff();if(this.getEngineType()===Os){if(t<-this.player._opt.syncAudioAndVideoDiff){this.player.debug.warn("AudioContext",`engine active , audioSyncVideoOption ${-this.player._opt.syncAudioAndVideoDiff} less than diff :${t},\n and bufferlist is ${this.bufferList.length}`);const e=this.player.getRenderCurrentPts();for(;this.bufferList.length>0;){const t=this.bufferList[0],i=t.ts-e;if(i>-this.player._opt.syncAudioAndVideoDiff/2){this.player.audioTimestamp=t.ts,this.player.debug.log("AudioContext",`engine active , audioSyncVideoOption\n item.ts is ${t.ts} and currentVideoTimestamp is ${e}, diff is ${i} > -${this.player._opt.syncAudioAndVideoDiff/2} and end`);break}this.bufferList.shift(),this.player.audioTimestamp=t.ts}}}else{let e=this.playbackRate;t<-this.player._opt.syncAudioAndVideoDiff?e===this.defaultPlaybackRate&&(this.player.debug.log("AudioContext",`audioSyncVideoOption ${-this.player._opt.syncAudioAndVideoDiff} less than diff :${t},\n speed up, playbackRate is ${e},\n and bufferList is ${this.bufferList.length}`),e=this.defaultPlaybackRate+.2):t>-this.player._opt.syncAudioAndVideoDiff/2&&e!==this.defaultPlaybackRate&&(this.player.debug.log("AudioContext",`diff is ${t} > -${this.player._opt.syncAudioAndVideoDiff/2} and speed to 1`),e=this.defaultPlaybackRate),this.updatePlaybackRate(e)}}calcPlaybackRateByBuffer(){if(this.isMute)return;if(!this.playing)return;let e=this.playbackRate,t=1e3,i=5e3;this.isAudioPlayer&&(t=this.player._opt.videoBufferDelay,i=this.player._opt.videoBufferMax);const s=Math.floor(t/this.oneBufferDuration),r=Math.floor(i/this.oneBufferDuration);if(this.bufferList.length>r)return this.player.debug.warn("AudioContext",`bufferList length ${this.bufferList.length} more than ${r}, and drop`),void this.clear();this.getEngineType()!==Os&&(this.bufferList.length>s?(e=this.defaultPlaybackRate+.2,this.player.debug.log("AudioContext",`bufferList length ${this.bufferList.length} more than ${s}, speed up, playbackRate is ${e}`)):this.bufferList.length<s/2&&(e=this.defaultPlaybackRate),this.updatePlaybackRate(e))}updatePlaybackRate(e){this.rateProcessor&&(this.playbackRate=e,this.rateProcessor.setRate(this.playbackRate))}_provide(e){return(1===this.playbackRate?this.processor:this.rateProcessor).provide(e)}}class fn extends a{constructor(e){super(),this.player=e,this.$video=e.video.$videoElement,this.init=!1,this.player._opt.hlsUseCanvasRender&&(this.$video=this.player.hlsDecoder.$videoElement),this.player._opt.webrtcUseCanvasRender&&(this.$video=this.player.webrtc.$videoElement),this.audioInfo={encTypeCode:"",encType:"",channels:"",sampleRate:"",depth:""},this._prevVolume=null,this.player.debug.log("Audio","init")}async destroy(){return this.resetInit(),this.off(),this._prevVolume=null,this.player.debug.log("Audio","destroy"),!0}resetInit(){this.init=!1,this.audioInfo={encTypeCode:"",encType:"",channels:"",sampleRate:"",depth:""}}getAudioInfo(){return this.audioInfo}updateAudioInfo(e){e.encTypeCode&&(this.audioInfo.encTypeCode=e.encTypeCode,this.audioInfo.encType=xt[e.encTypeCode]),e.encType&&(this.audioInfo.encType=e.encType),e.channels&&(this.audioInfo.channels=e.channels),e.sampleRate&&(this.audioInfo.sampleRate=e.sampleRate),e.depth&&(this.audioInfo.depth=e.depth),this.audioInfo.sampleRate&&this.audioInfo.channels&&this.audioInfo.encType&&!this.init&&(this.player.debug.log("Audio","audioInfo",JSON.stringify(this.audioInfo)),this.player.emit(lt.audioInfo,this.audioInfo),this.init=!0)}get isPlaying(){return!0}get volume(){return yo(this.$video.muted)?0:this.$video.volume}get isMute(){return 0===this.$video.volume||yo(this.$video.muted)}mute(e){this.setVolume(e?0:this.player.lastVolume||.5)}setVolume(e){e=parseFloat(e),isNaN(e)||(e=ca(e,0,1),this.$video.muted&&(this.$video.muted=!1),wa()&&(this.$video.muted=0===e),this.player.isAliyunRtc()&&this.player.aliyunRtcDecoder&&this.player.aliyunRtcDecoder.aliyunRtcRemoteStream&&(this.player.aliyunRtcDecoder.aliyunRtcRemoteStream.muted=0===e),null===this._prevVolume?this.player.emit(lt.mute,0===e):0===this._prevVolume&&e>0?this.player.emit(lt.mute,!1):this._prevVolume>0&&0===e&&this.player.emit(lt.mute,!0),this.$video.volume=e,this.player.emit(lt.volumechange,this.player.volume),this.player.emit(lt.volume,this.player.volume),this._prevVolume=e)}clear(){}play(){}pause(){}resume(){}getEngineType(){return"audio"}isPlaybackRateSpeed(){return!1}getAudioBufferSize(){return 0}setRate(){}initScriptNode(){}initScriptNodeDelay(){}audioEnabled(){this.mute(!1)}}class mn extends pn{constructor(e){super(e),this.delayTimeout=null,this.player.on(lt.playbackPause,(e=>{this.listenPlaybackPause(e)})),this.player.debug.log("AudioPlaybackContext","init")}async destroy(){return this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null),await super.destroy(),this.player.debug.log("AudioPlaybackLoader","destroy"),!0}listenPlaybackPause(e){e?(this.pause(),this.player.playback.isPlaybackPauseClearCache&&this.clear()):this.resume()}initScriptNodeDelay(){const e=this.player._opt.playbackDelayTime;e>0?this.delayTimeout=setTimeout((()=>{this.initScriptNode()}),e):this.initScriptNode()}setRate(e){e!==this.defaultPlaybackRate&&this.rateProcessor&&(this.player.debug.log("AudioPlaybackContext","setRate",e),this.defaultPlaybackRate=e,this.updatePlaybackRate(e))}}class gn extends pn{constructor(e){super(e),this.TAG_NAME="AudioPlayerLoader",this.isAudioPlayer=!0,this.player.debug.log(this.TAG_NAME,"init")}async destroy(){return await super.destroy(),this.player.debug.log(this.TAG_NAME,"destroy"),!0}play(e,t){Ao(this.playing)||super.play(e,t)}pause(){this.player.debug.log(this.TAG_NAME,"pause"),this.playing=!1,this.clear()}resume(){this.player.debug.log(this.TAG_NAME,"resume"),this.playing=!0}}class yn{constructor(e){return new(yn.getLoaderFactory(e._opt))(e)}static getLoaderFactory(e){return e.playType===w?e.useMSE&&e.mseDecodeAudio?fn:mn:e.playType===v?gn:e.isHls&&Ao(e.supportHls265)||e.isWebrtc&&Ao(e.isWebrtcH265)||e.useMSE&&e.mseDecodeAudio||e.isAliyunRtc?fn:pn}}class An extends a{constructor(e){super(),this.player=e,this.playing=!1,this._requestAbort=!1,this._status=fr,this.writableStream=null,this.abortController=new AbortController,this.streamRate=ma((t=>{e.emit(lt.kBps,(t/1024).toFixed(2))})),this.streamRateInterval=null,e.debug.log("FetchStream","init")}async destroy(){return this.abort(),this.writableStream&&Ao(this.writableStream.locked)&&this.writableStream.close().catch((e=>{this.player.debug.log("FetchStream","destroy and writableStream.close()",e)})),this.writableStream=null,this.off(),this._status=fr,this.streamRate=null,this.stopStreamRateInterval(),this.player.debug.log("FetchStream","destroy"),!0}startStreamRateInterval(){this.stopStreamRateInterval(),this.streamRateInterval=setInterval((()=>{this.streamRate&&this.streamRate(0)}),1e3)}stopStreamRateInterval(){this.streamRateInterval&&(clearInterval(this.streamRateInterval),this.streamRateInterval=null)}fetchStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{demux:i}=this.player;this.player._times.streamStart=ha();const s=Object.assign({signal:this.abortController.signal},{headers:t.headers||{}});fetch(e,s).then((e=>{if(this._requestAbort)return this._status=fr,void e.body.cancel();if(!function(e){return e.ok&&e.status>=200&&e.status<=299}(e))return this.player.debug.error("FetchStream",`fetch response status is ${e.status} and ok is ${e.ok} and emit error and next abort()`),this.abort(),void this.emit(ut.fetchError,`fetch response status is ${e.status} and ok is ${e.ok}`);if(this.emit(lt.streamSuccess),this.startStreamRateInterval(),"undefined"!=typeof WritableStream)this.player.debug.log("FetchStream","use WritableStream() to read stream"),this.writableStream=new WritableStream({write:e=>this.abortController&&this.abortController.signal&&this.abortController.signal.aborted?(this.player.debug.log("FetchStream","writableStream.write() and this.abortController.signal.aborted so return"),void(this._status=gr)):yo(this._requestAbort)?(this.player.debug.log("FetchStream","writableStream.write() and this._requestAbort is true so return"),void(this._status=gr)):"string"!=typeof e?(this._status=mr,this.streamRate&&this.streamRate(e.byteLength),i.dispatch(e)):void this.player.debug.warn("FetchStream",`writableStream.write() and value is "${e}" string so return`),close:()=>{this._status=gr,i.close(),this.emit(lt.streamEnd,"fetch done")},abort:e=>{if(this.abortController&&this.abortController.signal&&this.abortController.signal.aborted)return this.player.debug.log("FetchStream","writableStream.abort() and this.abortController.signal.aborted so return"),void(this._status=gr);i.close();const t=e.toString();-1===t.indexOf(fs)&&-1===t.indexOf(ms)&&e.name!==gs&&(this.abort(),this.emit(ut.fetchError,e))}}),e.body.pipeTo(this.writableStream);else{this.player.debug.log("FetchStream","not support WritableStream and use getReader() to read stream");const t=e.body.getReader(),s=()=>{t.read().then((e=>{let{done:t,value:r}=e;return t?(this._status=gr,i.close(),void this.emit(lt.streamEnd,"fetch done")):this.abortController&&this.abortController.signal&&this.abortController.signal.aborted?(this.player.debug.log("FetchStream","reader.read() and this.abortController.signal.aborted so return"),void(this._status=gr)):yo(this._requestAbort)?(this.player.debug.log("FetchStream","reader.read() and this._requestAbort is true so return"),void(this._status=gr)):void("string"!=typeof r?(this._status=mr,this.streamRate&&this.streamRate(r.byteLength),i.dispatch(r),s()):this.player.debug.warn("FetchStream",`reader.read() and value is "${r}" string so return`))})).catch((e=>{if(this.abortController&&this.abortController.signal&&this.abortController.signal.aborted)return this.player.debug.log("FetchStream","reader.read().catch() and this.abortController.signal.aborted so return"),void(this._status=gr);i.close();const t=e.toString();-1===t.indexOf(fs)&&-1===t.indexOf(ms)&&e.name!==gs&&(this.abort(),this.emit(ut.fetchError,e))}))};s()}})).catch((e=>{this.abortController&&this.abortController.signal&&this.abortController.signal.aborted||"AbortError"!==e.name&&(i.close(),this.abort(),this.emit(ut.fetchError,e))}))}abort(){this._requestAbort=!0;const e=Xa();if(this._status!==mr||Ao(e)){if(this.abortController){try{this.abortController.abort()}catch(e){}this.abortController=null}}else this.abortController=null,this.player.debug.log("FetchStream",`abort() and not abortController.abort() _status is ${this._status} and _isChrome is ${e}`)}getStreamType(){return p}}class bn extends a{constructor(e){super(),this.TAG_NAME="FetchWorkerLoader",this.player=e,this.playing=!1,this.fetchWorker=null,this.workerClearTimeout=null,this.workerUrl=null,this.destroyResolve=null,this.decoderWorkerCloseTimeout=null,this.abortController=new AbortController,this.streamRate=ma((t=>{e.emit(lt.kBps,(t/1024).toFixed(2))})),this.streamRateInterval=null,this._initFetchWorker(),e.debug.log(this.TAG_NAME,"init")}destroy(){return new Promise(((e,t)=>{this.fetchWorker?(this.player.debug.log(this.TAG_NAME,"send destroy"),this.fetchWorker.postMessage({cmd:it}),this.destroyResolve=e,this.decoderWorkerCloseTimeout=setTimeout((()=>{this.player.debug.warn(this.TAG_NAME,"send close but not response and destroy directly"),this.decoderWorkerCloseTimeout&&(clearTimeout(this.decoderWorkerCloseTimeout),this.decoderWorkerCloseTimeout=null),this._destroy(),setTimeout((()=>{e()}),0)}),2e3)):(this._destroy(),setTimeout((()=>{e()}),0))}))}_destroy(){this.off(),this.decoderWorkerCloseTimeout&&(clearTimeout(this.decoderWorkerCloseTimeout),this.decoderWorkerCloseTimeout=null),this.workerUrl&&(window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null),this.workerClearTimeout&&(clearTimeout(this.workerClearTimeout),this.workerClearTimeout=null),this._stopStreamRateInterval(),this.streamRate=null,this.fetchWorker&&(this.fetchWorker.terminate(),this.fetchWorker.onmessage=null,this.fetchWorker=null),this.destroyResolve&&(this.destroyResolve(),this.destroyResolve=null),this.player.debug.log(this.TAG_NAME,"destroy")}_initFetchWorker(){const e=Eo(function(){function e(e){return!0===e||"true"===e}function t(e){return!1===e||"false"===e}const i="The user aborted a request",s="AbortError",r="AbortError",a="fetch",o="destroy",n="destroyEnd",l="buffer",d="fetchError",h="fetchClose",c="fetchSuccess",u="idle",p="buffering",f="complete";let m=new class{constructor(){this._requestAbort=!1,this._status=u,this.writableStream=null,this.isChrome=!1,this.abortController=new AbortController}destroy(){this.abort(),this.writableStream&&t(this.writableStream.locked)&&this.writableStream.close().catch((e=>{})),this.writableStream=null,this._status=u}fetchStream(t){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=Object.assign({signal:this.abortController.signal},{headers:a.headers||{}});fetch(t,o).then((t=>{if(this._requestAbort)return this._status=u,void t.body.cancel();if(!function(e){return e.ok&&e.status>=200&&e.status<=299}(t))return this.abort(),void postMessage({cmd:d,message:`fetch response status is ${t.status} and ok is ${t.ok}`});if(postMessage({cmd:c}),"undefined"!=typeof WritableStream)this.writableStream=new WritableStream({write:t=>{this.abortController&&this.abortController.signal&&this.abortController.signal.aborted||e(this._requestAbort)?this._status=f:"string"!=typeof t&&(this._status=p,postMessage({cmd:l,buffer:t},[t.buffer]))},close:()=>{this._status=f,postMessage({cmd:h})},abort:e=>{if(this.abortController&&this.abortController.signal&&this.abortController.signal.aborted)return void(this._status=f);const t=e.toString();-1===t.indexOf(i)&&-1===t.indexOf(s)&&e.name!==r&&(this.abort(),postMessage({cmd:d,message:e.toString()}))}}),t.body.pipeTo(this.writableStream);else{const a=t.body.getReader(),o=()=>{a.read().then((t=>{let{done:i,value:s}=t;if(i)return this._status=f,void postMessage({cmd:h});this.abortController&&this.abortController.signal&&this.abortController.signal.aborted||e(this._requestAbort)?this._status=f:"string"!=typeof s&&(this._status=p,postMessage({cmd:l,buffer:s},[s.buffer]),o())})).catch((e=>{if(this.abortController&&this.abortController.signal&&this.abortController.signal.aborted)return void(this._status=f);const t=e.toString();-1===t.indexOf(i)&&-1===t.indexOf(s)&&e.name!==r&&(this.abort(),postMessage({cmd:d,message:e.toString()}))}))};o()}})).catch((e=>{this.abortController&&this.abortController.signal&&this.abortController.signal.aborted||"AbortError"!==e.name&&(this.abort(),postMessage({cmd:d,message:e.toString()}))}))}abort(){if(this._requestAbort=!0,this._status!==p||t(m.isChrome)){if(this.abortController){try{this.abortController.abort()}catch(e){}this.abortController=null}}else this.abortController=null}};self.onmessage=t=>{const i=t.data;switch(i.cmd){case a:m.isChrome=e(i.isChrome),m.fetchStream(i.url,JSON.parse(i.options));break;case o:m.destroy(),m=null,postMessage({cmd:n})}}}.toString()),t=new Blob([e],{type:"text/javascript"});let i=URL.createObjectURL(t);const s=new Worker(i);this.workerUrl=i,this.workerClearTimeout=setTimeout((()=>{window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null,this.workerClearTimeout=null}),ie),s.onmessage=e=>{const{demux:t}=this.player,i=e.data;switch(i.cmd){case rt:this.streamRate&&this.streamRate(i.buffer.byteLength),t.dispatch(i.buffer);break;case nt:this.emit(lt.streamSuccess),this._startStreamRateInterval();break;case ot:t.close(),this.emit(lt.streamEnd,"fetch done");break;case at:t.close(),this.emit(ut.fetchError,i.message);break;case st:this._destroy()}},this.fetchWorker=s}_startStreamRateInterval(){this._stopStreamRateInterval(),this.streamRateInterval=setInterval((()=>{this.streamRate&&this.streamRate(0)}),1e3)}_stopStreamRateInterval(){this.streamRateInterval&&(clearInterval(this.streamRateInterval),this.streamRateInterval=null)}fetchStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.player._times.streamStart=ha(),this.fetchWorker.postMessage({cmd:tt,url:e,isChrome:Xa(),options:JSON.stringify(t)})}getStreamType(){return p}}class _n extends a{constructor(e){super(),this.player=e,this.socket=null,this.socketStatus=pt,this.wsUrl=null,this.requestAbort=!1,this.socketDestroyFnList=[],this.streamRate=ma((t=>{e.emit(lt.kBps,(t/1024).toFixed(2))})),this.streamRateInterval=null,e.debug.log("WebsocketStream","init")}async destroy(){this._closeWebSocket(),this.stopStreamRateInterval(),this.wsUrl=null,this.off(),this.player.debug.log("WebsocketStream","destroy")}startStreamRateInterval(){this.stopStreamRateInterval(),this.streamRateInterval=setInterval((()=>{this.streamRate&&this.streamRate(0)}),1e3)}stopStreamRateInterval(){this.streamRateInterval&&(clearInterval(this.streamRateInterval),this.streamRateInterval=null)}_createWebSocket(){const e=this.player,{debug:t,events:{proxy:i},demux:s}=e;this.socket=new WebSocket(this.wsUrl),this.socket.binaryType="arraybuffer";const r=i(this.socket,"open",(()=>{t.log("WebsocketStream","socket open"),this.socketStatus=ft,this.emit(lt.streamSuccess),this.player.emit(lt.websocketOpen),this.startStreamRateInterval()})),a=i(this.socket,"message",(e=>{"string"!=typeof e.data?(this.streamRate&&this.streamRate(e.data.byteLength),this._handleMessage(e.data)):this.player.debug.warn("WebsocketStream",`websocket handle message message is "${e.data}" string so return`)})),o=i(this.socket,"close",(e=>{if(this.socketStatus!==gt){if(t.log("WebsocketStream",`socket close and code is ${e.code}`),1006===e.code&&t.error("WebsocketStream",`socket close abnormally and code is ${e.code}`),yo(this.requestAbort))return this.requestAbort=!1,void t.log("WebsocketStream","socket close and requestAbort is true");s.close(),this.socketStatus=mt,this.player.emit(lt.websocketClose,e.code),this.emit(lt.streamEnd,e.code)}else t.log("WebsocketStream","socket close and status is error, so return")})),n=i(this.socket,"error",(e=>{t.error("WebsocketStream","socket error",e),this.socketStatus=gt,this.emit(ut.websocketError,e),s.close(),t.log("WebsocketStream","socket error:",e.isTrusted?"websocket user aborted":"websocket error")}));this.socketDestroyFnList.push(r,a,o,n)}_closeWebSocket(){this.socketDestroyFnList.forEach((e=>e())),!this.socket||0!==this.socket.readyState&&1!==this.socket.readyState?this.socket&&this.player.debug.log("WebsocketStream",`_closeWebSocket() socket is null or socket status is ${this.socket&&this.socket.readyState}`):(this.requestAbort=!0,this.socket.close(1e3,"Client disconnecting")),this.socket=null,this.socketStatus=pt,this.streamRate=null}_handleMessage(e){const{demux:t}=this.player;t?t.dispatch(e):this.player.debug.warn("WebsocketStream","websocket handle message demux is null so return")}fetchStream(e,t){this.player._times.streamStart=ha(),this.wsUrl=e,this._createWebSocket()}sendMessage(e){this.socket?this.socketStatus===ft?this.socket.send(e):this.player.debug.error("WebsocketStream",`websocket send message error and socket status is ${this.socketStatus}`):this.player.debug.error("WebsocketStream","websocket send message socket is null")}resetFetchStream(){this._closeWebSocket(),this._createWebSocket()}getStreamType(){return m}}class vn extends a{constructor(e){super(),this.player=e,e.debug.log("HlsStream","init")}async destroy(){return this.off(),this.player.debug.log("HlsStream","destroy"),!0}fetchStream(e){const{hlsDecoder:t,debug:i}=this.player;this.player._times.streamStart=ha(),t.loadSource(e).then((()=>{this.player.debug.log("HlsStream","loadSource success"),this.emit(lt.streamSuccess)})).catch((e=>{this.emit(ut.hlsError,e)}))}getStreamType(){return f}}class wn extends a{constructor(e){super(),this.player=e,this.webrctUrl=null,e.debug.log("WebrtcStream","init")}async destroy(){return this.webrctUrl=null,this.off(),this.player.debug.log("WebrtcStream","destroy"),!0}fetchStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{webrtc:i,debug:s}=this.player;if(this.player._times.streamStart=ha(),this.webrctUrl=e.replace("webrtc:",window.location.protocol),-1===this.webrctUrl.indexOf("/webrtc/play")&&this.player.isWebrtcForM7S()){const t=new URL(this.webrctUrl),i="/webrtc/play"+t.pathname;this.webrctUrl=t.origin+i+t.search,this.player.debug.log("WebrtcStream",`original url is ${e}, and new url is: ${this.webrctUrl}`)}i.loadSource(this.webrctUrl,t).then((()=>{this.player.debug.log("WebrtcStream","loadSource success"),this.emit(lt.streamSuccess)})).catch((e=>{this.player.debug.error("WebrtcStream","loadSource error",e),this.emit(ut.webrtcError,e)}))}getStreamType(){return g}}class Sn extends a{constructor(e){super(),this.player=e,this.transport=null,this.wtUrl=null,this.streamRate=ma((t=>{e.emit(lt.kBps,(t/1024).toFixed(2))})),this.streamRateInterval=null,e.debug.log("WebTransportLoader","init")}async destroy(){return this.abort(),this.off(),this.player.debug.log("WebTransportLoader","destroy"),!0}startStreamRateInterval(){this.stopStreamRateInterval(),this.streamRateInterval=setInterval((()=>{this.streamRate&&this.streamRate(0)}),1e3)}stopStreamRateInterval(){this.streamRateInterval&&(clearInterval(this.streamRateInterval),this.streamRateInterval=null)}_createWebTransport(){const e=this.player,{debug:t,events:{proxy:i},demux:s}=e;try{this.transport=new WebTransport(this.wtUrl),this.transport.ready.then((()=>{this.emit(lt.streamSuccess),this.startStreamRateInterval(),this.transport.createBidirectionalStream().then((e=>{e.readable.pipeTo(new WritableStream(s.input))}))})).catch((e=>{this.player.debug.warn("WebTransportLoader","_createWebTransport-ready",e)}))}catch(e){this.player.debug.warn("WebTransportLoader","_createWebTransport",e)}}fetchStream(e){this.player._times.streamStart=ha(),this.wtUrl=e.replace(/^wt:/,"https:"),this._createWebTransport()}abort(){if(this.transport)try{this.transport.close(),this.transport=null}catch(e){this.transport=null}}getStreamType(){return y}}class Tn extends a{constructor(e){super(),this.player=e,this.workUrl=null,e.debug.log("WorkerStream","init")}async destroy(){return this.workUrl=null,this.off(),this.player.debug.log("WorkerStream","destroy"),!0}sendMessage(e){this.player.decoderWorker.workerSendMessage(e)}fetchStream(e){this.workUrl=e,this.player._times.streamStart=ha(),this.player.decoderWorker.workerFetchStream(e)}getStreamType(){const e=this.player._opt.protocol;return A+" "+(e===n?p:m)}}class En extends a{constructor(e){super(),this.TAG_NAME="AliyunRtcLoader",this.player=e,e.debug.log(this.TAG_NAME,"init")}async destroy(){return this.off(),this.player.debug.log(this.TAG_NAME,"destroy"),!0}fetchStream(e){const{aliyunRtcDecoder:t}=this.player;this.player._times.streamStart=ha(),t.loadSource(e).then((()=>{this.player.debug.log(this.TAG_NAME,"loadSource success"),this.emit(lt.streamSuccess)})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource error",e),this.emit(ut.aliyunRtcError,e)}))}getStreamType(){return b}}class kn{constructor(e){return new(kn.getLoaderFactory(e._opt))(e)}static getLoaderFactory(e){const{protocol:t,useWasm:i,playType:s,useWCS:r,useMSE:a,demuxUseWorker:u,mainThreadFetchUseWorker:p}=e;return t===n?s===v?Tn:s===_?i&&!ro(e)||u?Tn:p?bn:An:r||a?u?Tn:p?bn:An:Tn:t===o?s===v?Tn:s===_?i&&!ro(e)||u?Tn:_n:r||a?u?Tn:_n:Tn:t===l?vn:t===d?wn:t===h?Sn:t===c?En:void 0}}var Cn=Nr((function(e){function t(e,r){if(!e)throw"First parameter is required.";r=new i(e,r=r||{type:"video"});var a=this;function o(t){t&&(r.initCallback=function(){t(),t=r.initCallback=null});var i=new s(e,r);(p=new i(e,r)).record(),u("recording"),r.disableLogs||console.log("Initialized recorderType:",p.constructor.name,"for output-type:",r.type)}function n(e){if(e=e||function(){},p){if("paused"===a.state)return a.resumeRecording(),void setTimeout((function(){n(e)}),1);"recording"===a.state||r.disableLogs||console.warn('Recording state should be: "recording", however current state is: ',a.state),r.disableLogs||console.log("Stopped recording "+r.type+" stream."),"gif"!==r.type?p.stop(t):(p.stop(),t()),u("stopped")}else m();function t(t){if(p){Object.keys(p).forEach((function(e){"function"!=typeof p[e]&&(a[e]=p[e])}));var i=p.blob;if(!i){if(!t)throw"Recording failed.";p.blob=i=t}if(i&&!r.disableLogs&&console.log(i.type,"->",y(i.size)),e){var s;try{s=h.createObjectURL(i)}catch(e){}"function"==typeof e.call?e.call(a,s):e(s)}r.autoWriteToDisk&&d((function(e){var t={};t[r.type+"Blob"]=e,R.Store(t)}))}else"function"==typeof e.call?e.call(a,""):e("")}}function l(e){postMessage((new FileReaderSync).readAsDataURL(e))}function d(e,t){if(!e)throw"Pass a callback function over getDataURL.";var i=t?t.blob:(p||{}).blob;if(!i)return r.disableLogs||console.warn("Blob encoder did not finish its job yet."),void setTimeout((function(){d(e,t)}),1e3);if("undefined"==typeof Worker||navigator.mozGetUserMedia){var s=new FileReader;s.readAsDataURL(i),s.onload=function(t){e(t.target.result)}}else{var a=function(e){try{var t=h.createObjectURL(new Blob([e.toString(),"this.onmessage = function (eee) {"+e.name+"(eee.data);}"],{type:"application/javascript"})),i=new Worker(t);return h.revokeObjectURL(t),i}catch(e){}}(l);a.onmessage=function(t){e(t.data)},a.postMessage(i)}}function c(e){e=e||0,"paused"!==a.state?"stopped"!==a.state&&(e>=a.recordingDuration?n(a.onRecordingStopped):(e+=1e3,setTimeout((function(){c(e)}),1e3))):setTimeout((function(){c(e)}),1e3)}function u(e){a&&(a.state=e,"function"==typeof a.onStateChanged.call?a.onStateChanged.call(a,e):a.onStateChanged(e))}var p,f='It seems that recorder is destroyed or "startRecording" is not invoked for '+r.type+" recorder.";function m(){!0!==r.disableLogs&&console.warn(f)}var g={startRecording:function(t){return r.disableLogs||console.log("RecordRTC version: ",a.version),t&&(r=new i(e,t)),r.disableLogs||console.log("started recording "+r.type+" stream."),p?(p.clearRecordedData(),p.record(),u("recording"),a.recordingDuration&&c(),a):(o((function(){a.recordingDuration&&c()})),a)},stopRecording:n,pauseRecording:function(){p?"recording"===a.state?(u("paused"),p.pause(),r.disableLogs||console.log("Paused recording.")):r.disableLogs||console.warn("Unable to pause the recording. Recording state: ",a.state):m()},resumeRecording:function(){p?"paused"===a.state?(u("recording"),p.resume(),r.disableLogs||console.log("Resumed recording.")):r.disableLogs||console.warn("Unable to resume the recording. Recording state: ",a.state):m()},initRecorder:o,setRecordingDuration:function(e,t){if(void 0===e)throw"recordingDuration is required.";if("number"!=typeof e)throw"recordingDuration must be a number.";return a.recordingDuration=e,a.onRecordingStopped=t||function(){},{onRecordingStopped:function(e){a.onRecordingStopped=e}}},clearRecordedData:function(){p?(p.clearRecordedData(),r.disableLogs||console.log("Cleared old recorded data.")):m()},getBlob:function(){if(p)return p.blob;m()},getDataURL:d,toURL:function(){if(p)return h.createObjectURL(p.blob);m()},getInternalRecorder:function(){return p},save:function(e){p?A(p.blob,e):m()},getFromDisk:function(e){p?t.getFromDisk(r.type,e):m()},setAdvertisementArray:function(e){r.advertisement=[];for(var t=e.length,i=0;i<t;i++)r.advertisement.push({duration:i,image:e[i]})},blob:null,bufferSize:0,sampleRate:0,buffer:null,reset:function(){"recording"!==a.state||r.disableLogs||console.warn("Stop an active recorder."),p&&"function"==typeof p.clearRecordedData&&p.clearRecordedData(),p=null,u("inactive"),a.blob=null},onStateChanged:function(e){r.disableLogs||console.log("Recorder state changed:",e)},state:"inactive",getState:function(){return a.state},destroy:function(){var e=r.disableLogs;r={disableLogs:!0},a.reset(),u("destroyed"),g=a=null,w.AudioContextConstructor&&(w.AudioContextConstructor.close(),w.AudioContextConstructor=null),r.disableLogs=e,r.disableLogs||console.log("RecordRTC is destroyed.")},version:"5.6.2"};if(!this)return a=g,g;for(var b in g)this[b]=g[b];return a=this,g}function i(e,t){return t.recorderType||t.type||(t.audio&&t.video?t.type="video":t.audio&&!t.video&&(t.type="audio")),t.recorderType&&!t.type&&(t.recorderType===C||t.recorderType===k||t.recorderType===P?t.type="video":t.recorderType===D?t.type="gif":t.recorderType===E?t.type="audio":t.recorderType===T&&(_(e,"audio").length&&_(e,"video").length||!_(e,"audio").length&&_(e,"video").length?t.type="video":_(e,"audio").length&&!_(e,"video").length&&(t.type="audio"))),"undefined"!=typeof MediaRecorder&&"requestData"in MediaRecorder.prototype&&(t.mimeType||(t.mimeType="video/webm"),t.type||(t.type=t.mimeType.split("/")[0]),t.bitsPerSecond),t.type||(t.mimeType&&(t.type=t.mimeType.split("/")[0]),t.type||(t.type="audio")),t}function s(e,t){var i;return(f||c||u)&&(i=E),"undefined"!=typeof MediaRecorder&&"requestData"in MediaRecorder.prototype&&!f&&(i=T),"video"===t.type&&(f||u)&&(i=C,"undefined"!=typeof ReadableStream&&(i=P)),"gif"===t.type&&(i=D),"canvas"===t.type&&(i=k),S()&&i!==k&&i!==D&&"undefined"!=typeof MediaRecorder&&"requestData"in MediaRecorder.prototype&&(_(e,"video").length||_(e,"audio").length)&&("audio"===t.type?"function"==typeof MediaRecorder.isTypeSupported&&MediaRecorder.isTypeSupported("audio/webm")&&(i=T):"function"==typeof MediaRecorder.isTypeSupported&&MediaRecorder.isTypeSupported("video/webm")&&(i=T)),e instanceof Array&&e.length&&(i=I),t.recorderType&&(i=t.recorderType),!t.disableLogs&&i&&i.name&&console.log("Using recorderType:",i.name||i.constructor.name),!i&&m&&(i=T),i}function r(e){this.addStream=function(t){t&&(e=t)},this.mediaType={audio:!0,video:!0},this.startRecording=function(){var i,s=this.mediaType,r=this.mimeType||{audio:null,video:null,gif:null};if("function"!=typeof s.audio&&S()&&!_(e,"audio").length&&(s.audio=!1),"function"!=typeof s.video&&S()&&!_(e,"video").length&&(s.video=!1),"function"!=typeof s.gif&&S()&&!_(e,"video").length&&(s.gif=!1),!s.audio&&!s.video&&!s.gif)throw"MediaStream must have either audio or video tracks.";if(s.audio&&(i=null,"function"==typeof s.audio&&(i=s.audio),this.audioRecorder=new t(e,{type:"audio",bufferSize:this.bufferSize,sampleRate:this.sampleRate,numberOfAudioChannels:this.numberOfAudioChannels||2,disableLogs:this.disableLogs,recorderType:i,mimeType:r.audio,timeSlice:this.timeSlice,onTimeStamp:this.onTimeStamp}),s.video||this.audioRecorder.startRecording()),s.video){i=null,"function"==typeof s.video&&(i=s.video);var a=e;if(S()&&s.audio&&"function"==typeof s.audio){var o=_(e,"video")[0];p?((a=new g).addTrack(o),i&&i===C&&(i=T)):(a=new g).addTrack(o)}this.videoRecorder=new t(a,{type:"video",video:this.video,canvas:this.canvas,frameInterval:this.frameInterval||10,disableLogs:this.disableLogs,recorderType:i,mimeType:r.video,timeSlice:this.timeSlice,onTimeStamp:this.onTimeStamp,workerPath:this.workerPath,webAssemblyPath:this.webAssemblyPath,frameRate:this.frameRate,bitrate:this.bitrate}),s.audio||this.videoRecorder.startRecording()}if(s.audio&&s.video){var n=this,l=!0===S();(s.audio instanceof E&&s.video||!0!==s.audio&&!0!==s.video&&s.audio!==s.video)&&(l=!1),!0===l?(n.audioRecorder=null,n.videoRecorder.startRecording()):n.videoRecorder.initRecorder((function(){n.audioRecorder.initRecorder((function(){n.videoRecorder.startRecording(),n.audioRecorder.startRecording()}))}))}s.gif&&(i=null,"function"==typeof s.gif&&(i=s.gif),this.gifRecorder=new t(e,{type:"gif",frameRate:this.frameRate||200,quality:this.quality||10,disableLogs:this.disableLogs,recorderType:i,mimeType:r.gif}),this.gifRecorder.startRecording())},this.stopRecording=function(e){e=e||function(){},this.audioRecorder&&this.audioRecorder.stopRecording((function(t){e(t,"audio")})),this.videoRecorder&&this.videoRecorder.stopRecording((function(t){e(t,"video")})),this.gifRecorder&&this.gifRecorder.stopRecording((function(t){e(t,"gif")}))},this.pauseRecording=function(){this.audioRecorder&&this.audioRecorder.pauseRecording(),this.videoRecorder&&this.videoRecorder.pauseRecording(),this.gifRecorder&&this.gifRecorder.pauseRecording()},this.resumeRecording=function(){this.audioRecorder&&this.audioRecorder.resumeRecording(),this.videoRecorder&&this.videoRecorder.resumeRecording(),this.gifRecorder&&this.gifRecorder.resumeRecording()},this.getBlob=function(e){var t={};return this.audioRecorder&&(t.audio=this.audioRecorder.getBlob()),this.videoRecorder&&(t.video=this.videoRecorder.getBlob()),this.gifRecorder&&(t.gif=this.gifRecorder.getBlob()),e&&e(t),t},this.destroy=function(){this.audioRecorder&&(this.audioRecorder.destroy(),this.audioRecorder=null),this.videoRecorder&&(this.videoRecorder.destroy(),this.videoRecorder=null),this.gifRecorder&&(this.gifRecorder.destroy(),this.gifRecorder=null)},this.getDataURL=function(e){function t(e,t){if("undefined"!=typeof Worker){var i=function(e){var t,i=h.createObjectURL(new Blob([e.toString(),"this.onmessage = function (eee) {"+e.name+"(eee.data);}"],{type:"application/javascript"})),s=new Worker(i);if(void 0!==h)t=h;else{if("undefined"==typeof webkitURL)throw"Neither URL nor webkitURL detected.";t=webkitURL}return t.revokeObjectURL(i),s}((function(e){postMessage((new FileReaderSync).readAsDataURL(e))}));i.onmessage=function(e){t(e.data)},i.postMessage(e)}else{var s=new FileReader;s.readAsDataURL(e),s.onload=function(e){t(e.target.result)}}}this.getBlob((function(i){i.audio&&i.video?t(i.audio,(function(s){t(i.video,(function(t){e({audio:s,video:t})}))})):i.audio?t(i.audio,(function(t){e({audio:t})})):i.video&&t(i.video,(function(t){e({video:t})}))}))},this.writeToDisk=function(){t.writeToDisk({audio:this.audioRecorder,video:this.videoRecorder,gif:this.gifRecorder})},this.save=function(e){(e=e||{audio:!0,video:!0,gif:!0}).audio&&this.audioRecorder&&this.audioRecorder.save("string"==typeof e.audio?e.audio:""),e.video&&this.videoRecorder&&this.videoRecorder.save("string"==typeof e.video?e.video:""),e.gif&&this.gifRecorder&&this.gifRecorder.save("string"==typeof e.gif?e.gif:"")}}t.version="5.6.2",e.exports=t,t.getFromDisk=function(e,t){if(!t)throw"callback is mandatory.";console.log("Getting recorded "+("all"===e?"blobs":e+" blob ")+" from disk!"),R.Fetch((function(i,s){"all"!==e&&s===e+"Blob"&&t&&t(i),"all"===e&&t&&t(i,s.replace("Blob",""))}))},t.writeToDisk=function(e){console.log("Writing recorded blob(s) to disk!"),(e=e||{}).audio&&e.video&&e.gif?e.audio.getDataURL((function(t){e.video.getDataURL((function(i){e.gif.getDataURL((function(e){R.Store({audioBlob:t,videoBlob:i,gifBlob:e})}))}))})):e.audio&&e.video?e.audio.getDataURL((function(t){e.video.getDataURL((function(e){R.Store({audioBlob:t,videoBlob:e})}))})):e.audio&&e.gif?e.audio.getDataURL((function(t){e.gif.getDataURL((function(e){R.Store({audioBlob:t,gifBlob:e})}))})):e.video&&e.gif?e.video.getDataURL((function(t){e.gif.getDataURL((function(e){R.Store({videoBlob:t,gifBlob:e})}))})):e.audio?e.audio.getDataURL((function(e){R.Store({audioBlob:e})})):e.video?e.video.getDataURL((function(e){R.Store({videoBlob:e})})):e.gif&&e.gif.getDataURL((function(e){R.Store({gifBlob:e})}))},r.getFromDisk=t.getFromDisk,r.writeToDisk=t.writeToDisk,t.MRecordRTC=r;var a;(a=void 0!==Or?Or:null)&&"undefined"==typeof window&&void 0!==Or&&(Or.navigator={userAgent:"Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45",getUserMedia:function(){}},Or.console||(Or.console={}),void 0!==Or.console.log&&void 0!==Or.console.error||(Or.console.error=Or.console.log=Or.console.log||function(){console.log(arguments)}),"undefined"==typeof document&&(a.document={documentElement:{appendChild:function(){return""}}},document.createElement=document.captureStream=document.mozCaptureStream=function(){var e={getContext:function(){return e},play:function(){},pause:function(){},drawImage:function(){},toDataURL:function(){return""},style:{}};return e},a.HTMLVideoElement=function(){}),"undefined"==typeof location&&(a.location={protocol:"file:",href:"",hash:""}),"undefined"==typeof screen&&(a.screen={width:0,height:0}),void 0===h&&(a.URL={createObjectURL:function(){return""},revokeObjectURL:function(){return""}}),a.window=Or);var o=window.requestAnimationFrame;if(void 0===o)if("undefined"!=typeof webkitRequestAnimationFrame)o=webkitRequestAnimationFrame;else if("undefined"!=typeof mozRequestAnimationFrame)o=mozRequestAnimationFrame;else if("undefined"!=typeof msRequestAnimationFrame)o=msRequestAnimationFrame;else if(void 0===o){var n=0;o=function(e,t){var i=(new Date).getTime(),s=Math.max(0,16-(i-n)),r=setTimeout((function(){e(i+s)}),s);return n=i+s,r}}var l=window.cancelAnimationFrame;void 0===l&&("undefined"!=typeof webkitCancelAnimationFrame?l=webkitCancelAnimationFrame:"undefined"!=typeof mozCancelAnimationFrame?l=mozCancelAnimationFrame:"undefined"!=typeof msCancelAnimationFrame?l=msCancelAnimationFrame:void 0===l&&(l=function(e){clearTimeout(e)}));var d=window.AudioContext;void 0===d&&("undefined"!=typeof webkitAudioContext&&(d=webkitAudioContext),"undefined"!=typeof mozAudioContext&&(d=mozAudioContext));var h=window.URL;void 0===h&&"undefined"!=typeof webkitURL&&(h=webkitURL),"undefined"!=typeof navigator&&void 0===navigator.getUserMedia&&(void 0!==navigator.webkitGetUserMedia&&(navigator.getUserMedia=navigator.webkitGetUserMedia),void 0!==navigator.mozGetUserMedia&&(navigator.getUserMedia=navigator.mozGetUserMedia));var c=!(-1===navigator.userAgent.indexOf("Edge")||!navigator.msSaveBlob&&!navigator.msSaveOrOpenBlob),u=!!window.opera||-1!==navigator.userAgent.indexOf("OPR/"),p=navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&"netscape"in window&&/ rv:/.test(navigator.userAgent),f=!u&&!c&&!!navigator.webkitGetUserMedia||b()||-1!==navigator.userAgent.toLowerCase().indexOf("chrome/"),m=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);m&&!f&&-1!==navigator.userAgent.indexOf("CriOS")&&(m=!1,f=!0);var g=window.MediaStream;function y(e){if(0===e)return"0 Bytes";var t=parseInt(Math.floor(Math.log(e)/Math.log(1e3)),10);return(e/Math.pow(1e3,t)).toPrecision(3)+" "+["Bytes","KB","MB","GB","TB"][t]}function A(e,t){if(!e)throw"Blob object is required.";if(!e.type)try{e.type="video/webm"}catch(e){}var i=(e.type||"video/webm").split("/")[1];if(-1!==i.indexOf(";")&&(i=i.split(";")[0]),t&&-1!==t.indexOf(".")){var s=t.split(".");t=s[0],i=s[1]}var r=(t||Math.round(9999999999*Math.random())+888888888)+"."+i;if(void 0!==navigator.msSaveOrOpenBlob)return navigator.msSaveOrOpenBlob(e,r);if(void 0!==navigator.msSaveBlob)return navigator.msSaveBlob(e,r);var a=document.createElement("a");a.href=h.createObjectURL(e),a.download=r,a.style="display:none;opacity:0;color:transparent;",(document.body||document.documentElement).appendChild(a),"function"==typeof a.click?a.click():(a.target="_blank",a.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0}))),h.revokeObjectURL(a.href)}function b(){return"undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type||(!("undefined"==typeof process||"object"!=typeof process.versions||!process.versions.electron)||"object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Electron")>=0)}function _(e,t){return e&&e.getTracks?e.getTracks().filter((function(e){return e.kind===(t||"audio")})):[]}function v(e,t){"srcObject"in t?t.srcObject=e:"mozSrcObject"in t?t.mozSrcObject=e:t.srcObject=e}void 0===g&&"undefined"!=typeof webkitMediaStream&&(g=webkitMediaStream),void 0!==g&&void 0===g.prototype.stop&&(g.prototype.stop=function(){this.getTracks().forEach((function(e){e.stop()}))}),t.invokeSaveAsDialog=A,t.getTracks=_,t.getSeekableBlob=function(e,t){if("undefined"==typeof EBML)throw new Error("Please link: https://www.webrtc-experiment.com/EBML.js");var i=new EBML.Reader,s=new EBML.Decoder,r=EBML.tools,a=new FileReader;a.onload=function(e){s.decode(this.result).forEach((function(e){i.read(e)})),i.stop();var a=r.makeMetadataSeekable(i.metadatas,i.duration,i.cues),o=this.result.slice(i.metadataSize),n=new Blob([a,o],{type:"video/webm"});t(n)},a.readAsArrayBuffer(e)},t.bytesToSize=y,t.isElectron=b;var w={};function S(){if(p||m||c)return!0;var e,t,i=navigator.userAgent,s=""+parseFloat(navigator.appVersion),r=parseInt(navigator.appVersion,10);return(f||u)&&(e=i.indexOf("Chrome"),s=i.substring(e+7)),-1!==(t=s.indexOf(";"))&&(s=s.substring(0,t)),-1!==(t=s.indexOf(" "))&&(s=s.substring(0,t)),r=parseInt(""+s,10),isNaN(r)&&(s=""+parseFloat(navigator.appVersion),r=parseInt(navigator.appVersion,10)),r>=49}function T(e,t){var i=this;if(void 0===e)throw'First argument "MediaStream" is required.';if("undefined"==typeof MediaRecorder)throw"Your browser does not support the Media Recorder API. Please try other modules e.g. WhammyRecorder or StereoAudioRecorder.";if("audio"===(t=t||{mimeType:"video/webm"}).type){var s;if(_(e,"video").length&&_(e,"audio").length)navigator.mozGetUserMedia?(s=new g).addTrack(_(e,"audio")[0]):s=new g(_(e,"audio")),e=s;t.mimeType&&-1!==t.mimeType.toString().toLowerCase().indexOf("audio")||(t.mimeType=f?"audio/webm":"audio/ogg"),t.mimeType&&"audio/ogg"!==t.mimeType.toString().toLowerCase()&&navigator.mozGetUserMedia&&(t.mimeType="audio/ogg")}var r,a=[];function o(){i.timestamps.push((new Date).getTime()),"function"==typeof t.onTimeStamp&&t.onTimeStamp(i.timestamps[i.timestamps.length-1],i.timestamps)}function n(e){return r&&r.mimeType?r.mimeType:e.mimeType||"video/webm"}function l(){a=[],r=null,i.timestamps=[]}this.getArrayOfBlobs=function(){return a},this.record=function(){i.blob=null,i.clearRecordedData(),i.timestamps=[],d=[],a=[];var s=t;t.disableLogs||console.log("Passing following config over MediaRecorder API.",s),r&&(r=null),f&&!S()&&(s="video/vp8"),"function"==typeof MediaRecorder.isTypeSupported&&s.mimeType&&(MediaRecorder.isTypeSupported(s.mimeType)||(t.disableLogs||console.warn("MediaRecorder API seems unable to record mimeType:",s.mimeType),s.mimeType="audio"===t.type?"audio/webm":"video/webm"));try{r=new MediaRecorder(e,s),t.mimeType=s.mimeType}catch(t){r=new MediaRecorder(e)}s.mimeType&&!MediaRecorder.isTypeSupported&&"canRecordMimeType"in r&&!1===r.canRecordMimeType(s.mimeType)&&(t.disableLogs||console.warn("MediaRecorder API seems unable to record mimeType:",s.mimeType)),r.ondataavailable=function(e){if(e.data&&d.push("ondataavailable: "+y(e.data.size)),"number"!=typeof t.timeSlice)!e.data||!e.data.size||e.data.size<100||i.blob?i.recordingCallback&&(i.recordingCallback(new Blob([],{type:n(s)})),i.recordingCallback=null):(i.blob=t.getNativeBlob?e.data:new Blob([e.data],{type:n(s)}),i.recordingCallback&&(i.recordingCallback(i.blob),i.recordingCallback=null));else if(e.data&&e.data.size&&(a.push(e.data),o(),"function"==typeof t.ondataavailable)){var r=t.getNativeBlob?e.data:new Blob([e.data],{type:n(s)});t.ondataavailable(r)}},r.onstart=function(){d.push("started")},r.onpause=function(){d.push("paused")},r.onresume=function(){d.push("resumed")},r.onstop=function(){d.push("stopped")},r.onerror=function(e){e&&(e.name||(e.name="UnknownError"),d.push("error: "+e),t.disableLogs||(-1!==e.name.toString().toLowerCase().indexOf("invalidstate")?console.error("The MediaRecorder is not in a state in which the proposed operation is allowed to be executed.",e):-1!==e.name.toString().toLowerCase().indexOf("notsupported")?console.error("MIME type (",s.mimeType,") is not supported.",e):-1!==e.name.toString().toLowerCase().indexOf("security")?console.error("MediaRecorder security error",e):"OutOfMemory"===e.name?console.error("The UA has exhaused the available memory. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"IllegalStreamModification"===e.name?console.error("A modification to the stream has occurred that makes it impossible to continue recording. An example would be the addition of a Track while recording is occurring. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"OtherRecordingError"===e.name?console.error("Used for an fatal error other than those listed above. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"GenericError"===e.name?console.error("The UA cannot provide the codec or recording option that has been requested.",e):console.error("MediaRecorder Error",e)),function(e){if(!i.manuallyStopped&&r&&"inactive"===r.state)return delete t.timeslice,void r.start(6e5);setTimeout(void 0,1e3)}(),"inactive"!==r.state&&"stopped"!==r.state&&r.stop())},"number"==typeof t.timeSlice?(o(),r.start(t.timeSlice)):r.start(36e5),t.initCallback&&t.initCallback()},this.timestamps=[],this.stop=function(e){e=e||function(){},i.manuallyStopped=!0,r&&(this.recordingCallback=e,"recording"===r.state&&r.stop(),"number"==typeof t.timeSlice&&setTimeout((function(){i.blob=new Blob(a,{type:n(t)}),i.recordingCallback(i.blob)}),100))},this.pause=function(){r&&"recording"===r.state&&r.pause()},this.resume=function(){r&&"paused"===r.state&&r.resume()},this.clearRecordedData=function(){r&&"recording"===r.state&&i.stop(l),l()},this.getInternalRecorder=function(){return r},this.blob=null,this.getState=function(){return r&&r.state||"inactive"};var d=[];this.getAllStates=function(){return d},void 0===t.checkForInactiveTracks&&(t.checkForInactiveTracks=!1);i=this;!function s(){if(r&&!1!==t.checkForInactiveTracks)return!1===function(){if("active"in e){if(!e.active)return!1}else if("ended"in e&&e.ended)return!1;return!0}()?(t.disableLogs||console.log("MediaStream seems stopped."),void i.stop()):void setTimeout(s,1e3)}(),this.name="MediaStreamRecorder",this.toString=function(){return this.name}}function E(e,i){if(!_(e,"audio").length)throw"Your stream has no audio tracks.";var s,r=this,a=[],o=[],n=!1,l=0,d=2,c=(i=i||{}).desiredSampRate;function u(){if(!1===i.checkForInactiveTracks)return!0;if("active"in e){if(!e.active)return!1}else if("ended"in e&&e.ended)return!1;return!0}function p(e,t){function i(e,t){var i,s=e.numberOfAudioChannels,r=e.leftBuffers.slice(0),a=e.rightBuffers.slice(0),o=e.sampleRate,n=e.internalInterleavedLength,l=e.desiredSampRate;function d(e,t,i){var s=Math.round(e.length*(t/i)),r=[],a=Number((e.length-1)/(s-1));r[0]=e[0];for(var o=1;o<s-1;o++){var n=o*a,l=Number(Math.floor(n)).toFixed(),d=Number(Math.ceil(n)).toFixed(),c=n-l;r[o]=h(e[l],e[d],c)}return r[s-1]=e[e.length-1],r}function h(e,t,i){return e+(t-e)*i}function c(e,t){for(var i=new Float64Array(t),s=0,r=e.length,a=0;a<r;a++){var o=e[a];i.set(o,s),s+=o.length}return i}function u(e,t,i){for(var s=i.length,r=0;r<s;r++)e.setUint8(t+r,i.charCodeAt(r))}2===s&&(r=c(r,n),a=c(a,n),l&&(r=d(r,l,o),a=d(a,l,o))),1===s&&(r=c(r,n),l&&(r=d(r,l,o))),l&&(o=l),2===s&&(i=function(e,t){for(var i=e.length+t.length,s=new Float64Array(i),r=0,a=0;a<i;)s[a++]=e[r],s[a++]=t[r],r++;return s}(r,a)),1===s&&(i=r);var p=i.length,f=new ArrayBuffer(44+2*p),m=new DataView(f);u(m,0,"RIFF"),m.setUint32(4,36+2*p,!0),u(m,8,"WAVE"),u(m,12,"fmt "),m.setUint32(16,16,!0),m.setUint16(20,1,!0),m.setUint16(22,s,!0),m.setUint32(24,o,!0),m.setUint32(28,o*s*2,!0),m.setUint16(32,2*s,!0),m.setUint16(34,16,!0),u(m,36,"data"),m.setUint32(40,2*p,!0);for(var g=p,y=44,A=0;A<g;A++)m.setInt16(y,32767*i[A],!0),y+=2;if(t)return t({buffer:f,view:m});postMessage({buffer:f,view:m})}if(e.noWorker)i(e,(function(e){t(e.buffer,e.view)}));else{var s,r,a,o=(s=i,r=h.createObjectURL(new Blob([s.toString(),";this.onmessage = function (eee) {"+s.name+"(eee.data);}"],{type:"application/javascript"})),(a=new Worker(r)).workerURL=r,a);o.onmessage=function(e){t(e.data.buffer,e.data.view),h.revokeObjectURL(o.workerURL),o.terminate()},o.postMessage(e)}}!0===i.leftChannel&&(d=1),1===i.numberOfAudioChannels&&(d=1),(!d||d<1)&&(d=2),i.disableLogs||console.log("StereoAudioRecorder is set to record number of channels: "+d),void 0===i.checkForInactiveTracks&&(i.checkForInactiveTracks=!0),this.record=function(){if(!1===u())throw"Please make sure MediaStream is active.";v(),S=b=!1,n=!0,void 0!==i.timeSlice&&E()},this.stop=function(e){e=e||function(){},n=!1,p({desiredSampRate:c,sampleRate:A,numberOfAudioChannels:d,internalInterleavedLength:l,leftBuffers:a,rightBuffers:1===d?[]:o,noWorker:i.noWorker},(function(t,i){r.blob=new Blob([i],{type:"audio/wav"}),r.buffer=new ArrayBuffer(i.buffer.byteLength),r.view=i,r.sampleRate=c||A,r.bufferSize=y,r.length=l,S=!1,e&&e(r.blob)}))},void 0===t.Storage&&(t.Storage={AudioContextConstructor:null,AudioContext:window.AudioContext||window.webkitAudioContext}),t.Storage.AudioContextConstructor&&"closed"!==t.Storage.AudioContextConstructor.state||(t.Storage.AudioContextConstructor=new t.Storage.AudioContext);var f=t.Storage.AudioContextConstructor,m=f.createMediaStreamSource(e),g=[0,256,512,1024,2048,4096,8192,16384],y=void 0===i.bufferSize?4096:i.bufferSize;if(-1===g.indexOf(y)&&(i.disableLogs||console.log("Legal values for buffer-size are "+JSON.stringify(g,null,"\t"))),f.createJavaScriptNode)s=f.createJavaScriptNode(y,d,d);else{if(!f.createScriptProcessor)throw"WebAudio API has no support on this browser.";s=f.createScriptProcessor(y,d,d)}m.connect(s),i.bufferSize||(y=s.bufferSize);var A=void 0!==i.sampleRate?i.sampleRate:f.sampleRate||44100;(A<22050||A>96e3)&&(i.disableLogs||console.log("sample-rate must be under range 22050 and 96000.")),i.disableLogs||i.desiredSampRate&&console.log("Desired sample-rate: "+i.desiredSampRate);var b=!1;function v(){a=[],o=[],l=0,S=!1,n=!1,b=!1,f=null,r.leftchannel=a,r.rightchannel=o,r.numberOfAudioChannels=d,r.desiredSampRate=c,r.sampleRate=A,r.recordingLength=l,T={left:[],right:[],recordingLength:0}}function w(){s&&(s.onaudioprocess=null,s.disconnect(),s=null),m&&(m.disconnect(),m=null),v()}this.pause=function(){b=!0},this.resume=function(){if(!1===u())throw"Please make sure MediaStream is active.";if(!n)return i.disableLogs||console.log("Seems recording has been restarted."),void this.record();b=!1},this.clearRecordedData=function(){i.checkForInactiveTracks=!1,n&&this.stop(w),w()},this.name="StereoAudioRecorder",this.toString=function(){return this.name};var S=!1;s.onaudioprocess=function(e){if(!b)if(!1===u()&&(i.disableLogs||console.log("MediaStream seems stopped."),s.disconnect(),n=!1),n){S||(S=!0,i.onAudioProcessStarted&&i.onAudioProcessStarted(),i.initCallback&&i.initCallback());var t=e.inputBuffer.getChannelData(0),h=new Float32Array(t);if(a.push(h),2===d){var c=e.inputBuffer.getChannelData(1),p=new Float32Array(c);o.push(p)}l+=y,r.recordingLength=l,void 0!==i.timeSlice&&(T.recordingLength+=y,T.left.push(h),2===d&&T.right.push(p))}else m&&(m.disconnect(),m=null)},f.createMediaStreamDestination?s.connect(f.createMediaStreamDestination()):s.connect(f.destination),this.leftchannel=a,this.rightchannel=o,this.numberOfAudioChannels=d,this.desiredSampRate=c,this.sampleRate=A,r.recordingLength=l;var T={left:[],right:[],recordingLength:0};function E(){n&&"function"==typeof i.ondataavailable&&void 0!==i.timeSlice&&(T.left.length?(p({desiredSampRate:c,sampleRate:A,numberOfAudioChannels:d,internalInterleavedLength:T.recordingLength,leftBuffers:T.left,rightBuffers:1===d?[]:T.right},(function(e,t){var s=new Blob([t],{type:"audio/wav"});i.ondataavailable(s),setTimeout(E,i.timeSlice)})),T={left:[],right:[],recordingLength:0}):setTimeout(E,i.timeSlice))}}function k(e,t){if("undefined"==typeof html2canvas)throw"Please link: https://www.webrtc-experiment.com/screenshot.js";(t=t||{}).frameInterval||(t.frameInterval=10);var i=!1;["captureStream","mozCaptureStream","webkitCaptureStream"].forEach((function(e){e in document.createElement("canvas")&&(i=!0)}));var s,r,a,o=!(!window.webkitRTCPeerConnection&&!window.webkitGetUserMedia||!window.chrome),n=50,l=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);if(o&&l&&l[2]&&(n=parseInt(l[2],10)),o&&n<52&&(i=!1),t.useWhammyRecorder&&(i=!1),i)if(t.disableLogs||console.log("Your browser supports both MediRecorder API and canvas.captureStream!"),e instanceof HTMLCanvasElement)s=e;else{if(!(e instanceof CanvasRenderingContext2D))throw"Please pass either HTMLCanvasElement or CanvasRenderingContext2D.";s=e.canvas}else navigator.mozGetUserMedia&&(t.disableLogs||console.error("Canvas recording is NOT supported in Firefox."));this.record=function(){if(a=!0,i&&!t.useWhammyRecorder){var e;"captureStream"in s?e=s.captureStream(25):"mozCaptureStream"in s?e=s.mozCaptureStream(25):"webkitCaptureStream"in s&&(e=s.webkitCaptureStream(25));try{var o=new g;o.addTrack(_(e,"video")[0]),e=o}catch(e){}if(!e)throw"captureStream API are NOT available.";(r=new T(e,{mimeType:t.mimeType||"video/webm"})).record()}else p.frames=[],u=(new Date).getTime(),c();t.initCallback&&t.initCallback()},this.getWebPImages=function(i){if("canvas"===e.nodeName.toLowerCase()){var s=p.frames.length;p.frames.forEach((function(e,i){var r=s-i;t.disableLogs||console.log(r+"/"+s+" frames remaining"),t.onEncodingCallback&&t.onEncodingCallback(r,s);var a=e.image.toDataURL("image/webp",1);p.frames[i].image=a})),t.disableLogs||console.log("Generating WebM"),i()}else i()},this.stop=function(e){a=!1;var s=this;i&&r?r.stop(e):this.getWebPImages((function(){p.compile((function(i){t.disableLogs||console.log("Recording finished!"),s.blob=i,s.blob.forEach&&(s.blob=new Blob([],{type:"video/webm"})),e&&e(s.blob),p.frames=[]}))}))};var d=!1;function h(){p.frames=[],a=!1,d=!1}function c(){if(d)return u=(new Date).getTime(),setTimeout(c,500);if("canvas"===e.nodeName.toLowerCase()){var i=(new Date).getTime()-u;return u=(new Date).getTime(),p.frames.push({image:(s=document.createElement("canvas"),r=s.getContext("2d"),s.width=e.width,s.height=e.height,r.drawImage(e,0,0),s),duration:i}),void(a&&setTimeout(c,t.frameInterval))}var s,r;html2canvas(e,{grabMouse:void 0===t.showMousePointer||t.showMousePointer,onrendered:function(e){var i=(new Date).getTime()-u;if(!i)return setTimeout(c,t.frameInterval);u=(new Date).getTime(),p.frames.push({image:e.toDataURL("image/webp",1),duration:i}),a&&setTimeout(c,t.frameInterval)}})}this.pause=function(){d=!0,r instanceof T&&r.pause()},this.resume=function(){d=!1,r instanceof T?r.resume():a||this.record()},this.clearRecordedData=function(){a&&this.stop(h),h()},this.name="CanvasRecorder",this.toString=function(){return this.name};var u=(new Date).getTime(),p=new x.Video(100)}function C(e,t){function i(e){e=void 0!==e?e:10;var t=(new Date).getTime()-l;return t?a?(l=(new Date).getTime(),setTimeout(i,100)):(l=(new Date).getTime(),n.paused&&n.play(),c.drawImage(n,0,0,h.width,h.height),d.frames.push({duration:t,image:h.toDataURL("image/webp")}),void(r||setTimeout(i,e,e))):setTimeout(i,e,e)}function s(e,t,i,s,r){var a=document.createElement("canvas");a.width=h.width,a.height=h.height;var o=a.getContext("2d"),n=[],l=-1===t,d=t&&t>0&&t<=e.length?t:e.length,c=0,u=0,p=0,f=Math.sqrt(Math.pow(255,2)+Math.pow(255,2)+Math.pow(255,2)),m=i&&i>=0&&i<=1?i:0,g=s&&s>=0&&s<=1?s:0,y=!1;!function(e){var t=-1,i=e.length;!function s(){++t!==i?setTimeout((function(){e.functionToLoop(s,t)}),1):e.callback()}()}({length:d,functionToLoop:function(t,i){var s,r,a,d=function(){!y&&a-s<=a*g||(l&&(y=!0),n.push(e[i])),t()};if(y)d();else{var A=new Image;A.onload=function(){o.drawImage(A,0,0,h.width,h.height);var e=o.getImageData(0,0,h.width,h.height);s=0,r=e.data.length,a=e.data.length/4;for(var t=0;t<r;t+=4){var i={r:e.data[t],g:e.data[t+1],b:e.data[t+2]};Math.sqrt(Math.pow(i.r-c,2)+Math.pow(i.g-u,2)+Math.pow(i.b-p,2))<=f*m&&s++}d()},A.src=e[i].image}},callback:function(){(n=n.concat(e.slice(d))).length<=0&&n.push(e[e.length-1]),r(n)}})}(t=t||{}).frameInterval||(t.frameInterval=10),t.disableLogs||console.log("Using frames-interval:",t.frameInterval),this.record=function(){t.width||(t.width=320),t.height||(t.height=240),t.video||(t.video={width:t.width,height:t.height}),t.canvas||(t.canvas={width:t.width,height:t.height}),h.width=t.canvas.width||320,h.height=t.canvas.height||240,c=h.getContext("2d"),t.video&&t.video instanceof HTMLVideoElement?(n=t.video.cloneNode(),t.initCallback&&t.initCallback()):(n=document.createElement("video"),v(e,n),n.onloadedmetadata=function(){t.initCallback&&t.initCallback()},n.width=t.video.width,n.height=t.video.height),n.muted=!0,n.play(),l=(new Date).getTime(),d=new x.Video,t.disableLogs||(console.log("canvas resolutions",h.width,"*",h.height),console.log("video width/height",n.width||h.width,"*",n.height||h.height)),i(t.frameInterval)};var r=!1;this.stop=function(e){e=e||function(){},r=!0;var i=this;setTimeout((function(){s(d.frames,-1,null,null,(function(s){d.frames=s,t.advertisement&&t.advertisement.length&&(d.frames=t.advertisement.concat(d.frames)),d.compile((function(t){i.blob=t,i.blob.forEach&&(i.blob=new Blob([],{type:"video/webm"})),e&&e(i.blob)}))}))}),10)};var a=!1;function o(){d.frames=[],r=!0,a=!1}this.pause=function(){a=!0},this.resume=function(){a=!1,r&&this.record()},this.clearRecordedData=function(){r||this.stop(o),o()},this.name="WhammyRecorder",this.toString=function(){return this.name};var n,l,d,h=document.createElement("canvas"),c=h.getContext("2d")}void 0!==d?w.AudioContext=d:"undefined"!=typeof webkitAudioContext&&(w.AudioContext=webkitAudioContext),t.Storage=w,t.MediaStreamRecorder=T,t.StereoAudioRecorder=E,t.CanvasRecorder=k,t.WhammyRecorder=C;var x=function(){function e(e){this.frames=[],this.duration=e||1,this.quality=.8}function t(e){function t(e,t,i){return[{data:e,id:231}].concat(i.map((function(e){var i=function(e){var t=0;e.keyframe&&(t|=128);e.invisible&&(t|=8);e.lacing&&(t|=e.lacing<<1);e.discardable&&(t|=1);if(e.trackNum>127)throw"TrackNumber > 127 not supported";return[128|e.trackNum,e.timecode>>8,255&e.timecode,t].map((function(e){return String.fromCharCode(e)})).join("")+e.frame}({discardable:0,frame:e.data.slice(4),invisible:0,keyframe:1,lacing:0,trackNum:1,timecode:Math.round(t)});return t+=e.duration,{data:i,id:163}})))}function i(e){for(var t=[];e>0;)t.push(255&e),e>>=8;return new Uint8Array(t.reverse())}function s(e){var t=[];e=(e.length%8?new Array(9-e.length%8).join("0"):"")+e;for(var i=0;i<e.length;i+=8)t.push(parseInt(e.substr(i,8),2));return new Uint8Array(t)}function r(e){for(var t=[],a=0;a<e.length;a++){var o=e[a].data;"object"==typeof o&&(o=r(o)),"number"==typeof o&&(o=s(o.toString(2))),"string"==typeof o&&(o=new Uint8Array(o.split("").map((function(e){return e.charCodeAt(0)}))));var n=o.size||o.byteLength||o.length,l=Math.ceil(Math.ceil(Math.log(n)/Math.log(2))/8),d=n.toString(2),h=new Array(7*l+7+1-d.length).join("0")+d,c=new Array(l).join("0")+"1"+h;t.push(i(e[a].id)),t.push(s(c)),t.push(o)}return new Blob(t,{type:"video/webm"})}function a(e,t){return parseInt(e.substr(t+4,4).split("").map((function(e){var t=e.charCodeAt(0).toString(2);return new Array(8-t.length+1).join("0")+t})).join(""),2)}function o(e){for(var t=0,i={};t<e.length;){var s=e.substr(t,4),r=a(e,t),n=e.substr(t+4+4,r);t+=8+r,i[s]=i[s]||[],"RIFF"===s||"LIST"===s?i[s].push(o(n)):i[s].push(n)}return i}var n=new function(e){var i=function(e){if(!e[0])return void postMessage({error:"Something went wrong. Maybe WebP format is not supported in the current browser."});for(var t=e[0].width,i=e[0].height,s=e[0].duration,r=1;r<e.length;r++)s+=e[r].duration;return{duration:s,width:t,height:i}}(e);if(!i)return[];for(var s,a=[{id:440786851,data:[{data:1,id:17030},{data:1,id:17143},{data:4,id:17138},{data:8,id:17139},{data:"webm",id:17026},{data:2,id:17031},{data:2,id:17029}]},{id:408125543,data:[{id:357149030,data:[{data:1e6,id:2807729},{data:"whammy",id:19840},{data:"whammy",id:22337},{data:(s=i.duration,[].slice.call(new Uint8Array(new Float64Array([s]).buffer),0).map((function(e){return String.fromCharCode(e)})).reverse().join("")),id:17545}]},{id:374648427,data:[{id:174,data:[{data:1,id:215},{data:1,id:29637},{data:0,id:156},{data:"und",id:2274716},{data:"V_VP8",id:134},{data:"VP8",id:2459272},{data:1,id:131},{id:224,data:[{data:i.width,id:176},{data:i.height,id:186}]}]}]}]}],o=0,n=0;o<e.length;){var l=[],d=0;do{l.push(e[o]),d+=e[o].duration,o++}while(o<e.length&&d<3e4);var h={id:524531317,data:t(n,0,l)};a[1].data.push(h),n+=d}return r(a)}(e.map((function(e){var t=function(e){for(var t=e.RIFF[0].WEBP[0],i=t.indexOf("*"),s=0,r=[];s<4;s++)r[s]=t.charCodeAt(i+3+s);return{width:16383&(r[1]<<8|r[0]),height:16383&(r[3]<<8|r[2]),data:t,riff:e}}(o(atob(e.image.slice(23))));return t.duration=e.duration,t})));postMessage(n)}return e.prototype.add=function(e,t){if("canvas"in e&&(e=e.canvas),"toDataURL"in e&&(e=e.toDataURL("image/webp",this.quality)),!/^data:image\/webp;base64,/gi.test(e))throw"Input must be formatted properly as a base64 encoded DataURI of type image/webp";this.frames.push({image:e,duration:t||this.duration})},e.prototype.compile=function(e){var i,s,r,a=(i=t,s=h.createObjectURL(new Blob([i.toString(),"this.onmessage = function (eee) {"+i.name+"(eee.data);}"],{type:"application/javascript"})),r=new Worker(s),h.revokeObjectURL(s),r);a.onmessage=function(t){t.data.error?console.error(t.data.error):e(t.data)},a.postMessage(this.frames)},{Video:e}}();t.Whammy=x;var R={init:function(){var e=this;if("undefined"!=typeof indexedDB&&void 0!==indexedDB.open){var t,i=this.dbName||location.href.replace(/\/|:|#|%|\.|\[|\]/g,""),s=indexedDB.open(i,1);s.onerror=e.onError,s.onsuccess=function(){((t=s.result).onerror=e.onError,t.setVersion)?1!==t.version?t.setVersion(1).onsuccess=function(){r(t),a()}:a():a()},s.onupgradeneeded=function(e){r(e.target.result)}}else console.error("IndexedDB API are not available in this browser.");function r(t){t.createObjectStore(e.dataStoreName)}function a(){var i=t.transaction([e.dataStoreName],"readwrite");function s(t){i.objectStore(e.dataStoreName).get(t).onsuccess=function(i){e.callback&&e.callback(i.target.result,t)}}e.videoBlob&&i.objectStore(e.dataStoreName).put(e.videoBlob,"videoBlob"),e.gifBlob&&i.objectStore(e.dataStoreName).put(e.gifBlob,"gifBlob"),e.audioBlob&&i.objectStore(e.dataStoreName).put(e.audioBlob,"audioBlob"),s("audioBlob"),s("videoBlob"),s("gifBlob")}},Fetch:function(e){return this.callback=e,this.init(),this},Store:function(e){return this.audioBlob=e.audioBlob,this.videoBlob=e.videoBlob,this.gifBlob=e.gifBlob,this.init(),this},onError:function(e){console.error(JSON.stringify(e,null,"\t"))},dataStoreName:"recordRTC",dbName:null};function D(e,t){if("undefined"==typeof GIFEncoder){var i=document.createElement("script");i.src="https://www.webrtc-experiment.com/gif-recorder.js",(document.body||document.documentElement).appendChild(i)}t=t||{};var s=e instanceof CanvasRenderingContext2D||e instanceof HTMLCanvasElement;this.record=function(){"undefined"!=typeof GIFEncoder&&d?(s||(t.width||(t.width=h.offsetWidth||320),t.height||(t.height=h.offsetHeight||240),t.video||(t.video={width:t.width,height:t.height}),t.canvas||(t.canvas={width:t.width,height:t.height}),a.width=t.canvas.width||320,a.height=t.canvas.height||240,h.width=t.video.width||320,h.height=t.video.height||240),(u=new GIFEncoder).setRepeat(0),u.setDelay(t.frameRate||200),u.setQuality(t.quality||10),u.start(),"function"==typeof t.onGifRecordingStarted&&t.onGifRecordingStarted(),p=o((function e(i){if(!0!==f.clearedRecordedData){if(r)return setTimeout((function(){e(i)}),100);p=o(e),void 0===typeof c&&(c=i),i-c<90||(!s&&h.paused&&h.play(),s||n.drawImage(h,0,0,a.width,a.height),t.onGifPreview&&t.onGifPreview(a.toDataURL("image/png")),u.addFrame(n),c=i)}})),t.initCallback&&t.initCallback()):setTimeout(f.record,1e3)},this.stop=function(e){e=e||function(){},p&&l(p),this.blob=new Blob([new Uint8Array(u.stream().bin)],{type:"image/gif"}),e(this.blob),u.stream().bin=[]};var r=!1;this.pause=function(){r=!0},this.resume=function(){r=!1},this.clearRecordedData=function(){f.clearedRecordedData=!0,u&&(u.stream().bin=[])},this.name="GifRecorder",this.toString=function(){return this.name};var a=document.createElement("canvas"),n=a.getContext("2d");s&&(e instanceof CanvasRenderingContext2D?a=(n=e).canvas:e instanceof HTMLCanvasElement&&(n=e.getContext("2d"),a=e));var d=!0;if(!s){var h=document.createElement("video");h.muted=!0,h.autoplay=!0,h.playsInline=!0,d=!1,h.onloadedmetadata=function(){d=!0},v(e,h),h.play()}var c,u,p=null,f=this}function L(e,t){t=t||"multi-streams-mixer";var i=[],s=!1,r=document.createElement("canvas"),a=r.getContext("2d");r.style.opacity=0,r.style.position="absolute",r.style.zIndex=-1,r.style.top="-1000em",r.style.left="-1000em",r.className=t,(document.body||document.documentElement).appendChild(r),this.disableLogs=!1,this.frameInterval=10,this.width=360,this.height=240,this.useGainNode=!0;var o=this,n=window.AudioContext;void 0===n&&("undefined"!=typeof webkitAudioContext&&(n=webkitAudioContext),"undefined"!=typeof mozAudioContext&&(n=mozAudioContext));var l=window.URL;void 0===l&&"undefined"!=typeof webkitURL&&(l=webkitURL),"undefined"!=typeof navigator&&void 0===navigator.getUserMedia&&(void 0!==navigator.webkitGetUserMedia&&(navigator.getUserMedia=navigator.webkitGetUserMedia),void 0!==navigator.mozGetUserMedia&&(navigator.getUserMedia=navigator.mozGetUserMedia));var d=window.MediaStream;void 0===d&&"undefined"!=typeof webkitMediaStream&&(d=webkitMediaStream),void 0!==d&&void 0===d.prototype.stop&&(d.prototype.stop=function(){this.getTracks().forEach((function(e){e.stop()}))});var h={};function c(){if(!s){var e=i.length,t=!1,a=[];if(i.forEach((function(e){e.stream||(e.stream={}),e.stream.fullcanvas?t=e:a.push(e)})),t)r.width=t.stream.width,r.height=t.stream.height;else if(a.length){r.width=e>1?2*a[0].width:a[0].width;var n=1;3!==e&&4!==e||(n=2),5!==e&&6!==e||(n=3),7!==e&&8!==e||(n=4),9!==e&&10!==e||(n=5),r.height=a[0].height*n}else r.width=o.width||360,r.height=o.height||240;t&&t instanceof HTMLVideoElement&&u(t),a.forEach((function(e,t){u(e,t)})),setTimeout(c,o.frameInterval)}}function u(e,t){if(!s){var i=0,r=0,o=e.width,n=e.height;1===t&&(i=e.width),2===t&&(r=e.height),3===t&&(i=e.width,r=e.height),4===t&&(r=2*e.height),5===t&&(i=e.width,r=2*e.height),6===t&&(r=3*e.height),7===t&&(i=e.width,r=3*e.height),void 0!==e.stream.left&&(i=e.stream.left),void 0!==e.stream.top&&(r=e.stream.top),void 0!==e.stream.width&&(o=e.stream.width),void 0!==e.stream.height&&(n=e.stream.height),a.drawImage(e,i,r,o,n),"function"==typeof e.stream.onRender&&e.stream.onRender(a,i,r,o,n,t)}}function p(e){var i=document.createElement("video");return function(e,t){"srcObject"in t?t.srcObject=e:"mozSrcObject"in t?t.mozSrcObject=e:t.srcObject=e}(e,i),i.className=t,i.muted=!0,i.volume=0,i.width=e.width||o.width||360,i.height=e.height||o.height||240,i.play(),i}function f(t){i=[],(t=t||e).forEach((function(e){if(e.getTracks().filter((function(e){return"video"===e.kind})).length){var t=p(e);t.stream=e,i.push(t)}}))}void 0!==n?h.AudioContext=n:"undefined"!=typeof webkitAudioContext&&(h.AudioContext=webkitAudioContext),this.startDrawingFrames=function(){c()},this.appendStreams=function(t){if(!t)throw"First parameter is required.";t instanceof Array||(t=[t]),t.forEach((function(t){var s=new d;if(t.getTracks().filter((function(e){return"video"===e.kind})).length){var r=p(t);r.stream=t,i.push(r),s.addTrack(t.getTracks().filter((function(e){return"video"===e.kind}))[0])}if(t.getTracks().filter((function(e){return"audio"===e.kind})).length){var a=o.audioContext.createMediaStreamSource(t);o.audioDestination=o.audioContext.createMediaStreamDestination(),a.connect(o.audioDestination),s.addTrack(o.audioDestination.stream.getTracks().filter((function(e){return"audio"===e.kind}))[0])}e.push(s)}))},this.releaseStreams=function(){i=[],s=!0,o.gainNode&&(o.gainNode.disconnect(),o.gainNode=null),o.audioSources.length&&(o.audioSources.forEach((function(e){e.disconnect()})),o.audioSources=[]),o.audioDestination&&(o.audioDestination.disconnect(),o.audioDestination=null),o.audioContext&&o.audioContext.close(),o.audioContext=null,a.clearRect(0,0,r.width,r.height),r.stream&&(r.stream.stop(),r.stream=null)},this.resetVideoStreams=function(e){!e||e instanceof Array||(e=[e]),f(e)},this.name="MultiStreamsMixer",this.toString=function(){return this.name},this.getMixedStream=function(){s=!1;var t=function(){var e;f(),"captureStream"in r?e=r.captureStream():"mozCaptureStream"in r?e=r.mozCaptureStream():o.disableLogs||console.error("Upgrade to latest Chrome or otherwise enable this flag: chrome://flags/#enable-experimental-web-platform-features");var t=new d;return e.getTracks().filter((function(e){return"video"===e.kind})).forEach((function(e){t.addTrack(e)})),r.stream=t,t}(),i=function(){h.AudioContextConstructor||(h.AudioContextConstructor=new h.AudioContext);o.audioContext=h.AudioContextConstructor,o.audioSources=[],!0===o.useGainNode&&(o.gainNode=o.audioContext.createGain(),o.gainNode.connect(o.audioContext.destination),o.gainNode.gain.value=0);var t=0;if(e.forEach((function(e){if(e.getTracks().filter((function(e){return"audio"===e.kind})).length){t++;var i=o.audioContext.createMediaStreamSource(e);!0===o.useGainNode&&i.connect(o.gainNode),o.audioSources.push(i)}})),!t)return;return o.audioDestination=o.audioContext.createMediaStreamDestination(),o.audioSources.forEach((function(e){e.connect(o.audioDestination)})),o.audioDestination.stream}();return i&&i.getTracks().filter((function(e){return"audio"===e.kind})).forEach((function(e){t.addTrack(e)})),e.forEach((function(e){e.fullcanvas})),t}}function I(e,t){e=e||[];var i,s,r=this;(t=t||{elementClass:"multi-streams-mixer",mimeType:"video/webm",video:{width:360,height:240}}).frameInterval||(t.frameInterval=10),t.video||(t.video={}),t.video.width||(t.video.width=360),t.video.height||(t.video.height=240),this.record=function(){var r;i=new L(e,t.elementClass||"multi-streams-mixer"),(r=[],e.forEach((function(e){_(e,"video").forEach((function(e){r.push(e)}))})),r).length&&(i.frameInterval=t.frameInterval||10,i.width=t.video.width||360,i.height=t.video.height||240,i.startDrawingFrames()),t.previewStream&&"function"==typeof t.previewStream&&t.previewStream(i.getMixedStream()),(s=new T(i.getMixedStream(),t)).record()},this.stop=function(e){s&&s.stop((function(t){r.blob=t,e(t),r.clearRecordedData()}))},this.pause=function(){s&&s.pause()},this.resume=function(){s&&s.resume()},this.clearRecordedData=function(){s&&(s.clearRecordedData(),s=null),i&&(i.releaseStreams(),i=null)},this.addStreams=function(r){if(!r)throw"First parameter is required.";r instanceof Array||(r=[r]),e.concat(r),s&&i&&(i.appendStreams(r),t.previewStream&&"function"==typeof t.previewStream&&t.previewStream(i.getMixedStream()))},this.resetVideoStreams=function(e){i&&(!e||e instanceof Array||(e=[e]),i.resetVideoStreams(e))},this.getMixer=function(){return i},this.name="MultiStreamRecorder",this.toString=function(){return this.name}}function P(e,t){var i,s,r;function a(){return new ReadableStream({start:function(s){var r=document.createElement("canvas"),a=document.createElement("video"),o=!0;a.srcObject=e,a.muted=!0,a.height=t.height,a.width=t.width,a.volume=0,a.onplaying=function(){r.width=t.width,r.height=t.height;var e=r.getContext("2d"),n=1e3/t.frameRate,l=setInterval((function(){if(i&&(clearInterval(l),s.close()),o&&(o=!1,t.onVideoProcessStarted&&t.onVideoProcessStarted()),e.drawImage(a,0,0),"closed"!==s._controlledReadableStream.state)try{s.enqueue(e.getImageData(0,0,t.width,t.height))}catch(e){}}),n)},a.play()}})}function o(e,l){if(!t.workerPath&&!l)return i=!1,void fetch("https://unpkg.com/webm-wasm@latest/dist/webm-worker.js").then((function(t){t.arrayBuffer().then((function(t){o(e,t)}))}));if(!t.workerPath&&l instanceof ArrayBuffer){var d=new Blob([l],{type:"text/javascript"});t.workerPath=h.createObjectURL(d)}t.workerPath||console.error("workerPath parameter is missing."),(s=new Worker(t.workerPath)).postMessage(t.webAssemblyPath||"https://unpkg.com/webm-wasm@latest/dist/webm-wasm.wasm"),s.addEventListener("message",(function(e){"READY"===e.data?(s.postMessage({width:t.width,height:t.height,bitrate:t.bitrate||1200,timebaseDen:t.frameRate||30,realtime:t.realtime}),a().pipeTo(new WritableStream({write:function(e){i?console.error("Got image, but recorder is finished!"):s.postMessage(e.data.buffer,[e.data.buffer])}}))):e.data&&(r||n.push(e.data))}))}"undefined"!=typeof ReadableStream&&"undefined"!=typeof WritableStream||console.error("Following polyfill is strongly recommended: https://unpkg.com/@mattiasbuelens/web-streams-polyfill/dist/polyfill.min.js"),(t=t||{}).width=t.width||640,t.height=t.height||480,t.frameRate=t.frameRate||30,t.bitrate=t.bitrate||1200,t.realtime=t.realtime||!0,this.record=function(){n=[],r=!1,this.blob=null,o(e),"function"==typeof t.initCallback&&t.initCallback()},this.pause=function(){r=!0},this.resume=function(){r=!1};var n=[];this.stop=function(e){i=!0;var t=this;!function(e){s?(s.addEventListener("message",(function(t){null===t.data&&(s.terminate(),s=null,e&&e())})),s.postMessage(null)):e&&e()}((function(){t.blob=new Blob(n,{type:"video/webm"}),e(t.blob)}))},this.name="WebAssemblyRecorder",this.toString=function(){return this.name},this.clearRecordedData=function(){n=[],r=!1,this.blob=null},this.blob=null}t.DiskStorage=R,t.GifRecorder=D,t.MultiStreamRecorder=I,t.RecordRTCPromisesHandler=function(e,i){if(!this)throw'Use "new RecordRTCPromisesHandler()"';if(void 0===e)throw'First argument "MediaStream" is required.';var s=this;s.recordRTC=new t(e,i),this.startRecording=function(){return new Promise((function(e,t){try{s.recordRTC.startRecording(),e()}catch(e){t(e)}}))},this.stopRecording=function(){return new Promise((function(e,t){try{s.recordRTC.stopRecording((function(i){s.blob=s.recordRTC.getBlob(),s.blob&&s.blob.size?e(i):t("Empty blob.",s.blob)}))}catch(e){t(e)}}))},this.pauseRecording=function(){return new Promise((function(e,t){try{s.recordRTC.pauseRecording(),e()}catch(e){t(e)}}))},this.resumeRecording=function(){return new Promise((function(e,t){try{s.recordRTC.resumeRecording(),e()}catch(e){t(e)}}))},this.getDataURL=function(e){return new Promise((function(e,t){try{s.recordRTC.getDataURL((function(t){e(t)}))}catch(e){t(e)}}))},this.getBlob=function(){return new Promise((function(e,t){try{e(s.recordRTC.getBlob())}catch(e){t(e)}}))},this.getInternalRecorder=function(){return new Promise((function(e,t){try{e(s.recordRTC.getInternalRecorder())}catch(e){t(e)}}))},this.reset=function(){return new Promise((function(e,t){try{e(s.recordRTC.reset())}catch(e){t(e)}}))},this.destroy=function(){return new Promise((function(e,t){try{e(s.recordRTC.destroy())}catch(e){t(e)}}))},this.getState=function(){return new Promise((function(e,t){try{e(s.recordRTC.getState())}catch(e){t(e)}}))},this.blob=null,this.version="5.6.2"},t.WebAssemblyRecorder=P}));class xn{static _ebsp2rbsp(e){let t=e,i=t.byteLength,s=new Uint8Array(i),r=0;for(let e=0;e<i;e++)e>=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(s[r]=t[e],r++);return new Uint8Array(s.buffer,0,r)}static parseSPS(e){let t=xn._ebsp2rbsp(e),i=new Gr(t);i.readByte();let s=i.readByte();i.readByte();let r=i.readByte();i.readUEG();let a=xn.getProfileString(s),o=xn.getLevelString(r),n=1,l=420,d=[0,420,422,444],h=8;if((100===s||110===s||122===s||244===s||44===s||83===s||86===s||118===s||128===s||138===s||144===s)&&(n=i.readUEG(),3===n&&i.readBits(1),n<=3&&(l=d[n]),h=i.readUEG()+8,i.readUEG(),i.readBits(1),i.readBool())){let e=3!==n?8:12;for(let t=0;t<e;t++)i.readBool()&&(t<6?xn._skipScalingList(i,16):xn._skipScalingList(i,64))}i.readUEG();let c=i.readUEG();if(0===c)i.readUEG();else if(1===c){i.readBits(1),i.readSEG(),i.readSEG();let e=i.readUEG();for(let t=0;t<e;t++)i.readSEG()}let u=i.readUEG();i.readBits(1);let p=i.readUEG(),f=i.readUEG(),m=i.readBits(1);0===m&&i.readBits(1),i.readBits(1);let g=0,y=0,A=0,b=0;i.readBool()&&(g=i.readUEG(),y=i.readUEG(),A=i.readUEG(),b=i.readUEG());let _=1,v=1,w=0,S=!0,T=0,E=0;if(i.readBool()){if(i.readBool()){let e=i.readByte(),t=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],s=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];e>0&&e<16?(_=t[e-1],v=s[e-1]):255===e&&(_=i.readByte()<<8|i.readByte(),v=i.readByte()<<8|i.readByte())}if(i.readBool()&&i.readBool(),i.readBool()&&(i.readBits(4),i.readBool()&&i.readBits(24)),i.readBool()&&(i.readUEG(),i.readUEG()),i.readBool()){let e=i.readBits(32),t=i.readBits(32);S=i.readBool(),T=t,E=2*e,w=T/E}}let k=1;1===_&&1===v||(k=_/v);let C=0,x=0;if(0===n)C=1,x=2-m;else{C=3===n?1:2,x=(1===n?2:1)*(2-m)}let R=16*(p+1),D=16*(f+1)*(2-m);R-=(g+y)*C,D-=(A+b)*x;let L=Math.ceil(R*k);return i.destroy(),i=null,{profile_string:a,level_string:o,bit_depth:h,ref_frames:u,chroma_format:l,chroma_format_string:xn.getChromaFormatString(l),frame_rate:{fixed:S,fps:w,fps_den:E,fps_num:T},sar_ratio:{width:_,height:v},codec_size:{width:R,height:D},present_size:{width:L,height:D}}}static parseSPS$2(e){let t=e.subarray(1,4),i="avc1.";for(let e=0;e<3;e++){let s=t[e].toString(16);s.length<2&&(s="0"+s),i+=s}let s=xn._ebsp2rbsp(e),r=new Gr(s);r.readByte();let a=r.readByte();r.readByte();let o=r.readByte();r.readUEG();let n=xn.getProfileString(a),l=xn.getLevelString(o),d=1,h=420,c=[0,420,422,444],u=8,p=8;if((100===a||110===a||122===a||244===a||44===a||83===a||86===a||118===a||128===a||138===a||144===a)&&(d=r.readUEG(),3===d&&r.readBits(1),d<=3&&(h=c[d]),u=r.readUEG()+8,p=r.readUEG()+8,r.readBits(1),r.readBool())){let e=3!==d?8:12;for(let t=0;t<e;t++)r.readBool()&&(t<6?xn._skipScalingList(r,16):xn._skipScalingList(r,64))}r.readUEG();let f=r.readUEG();if(0===f)r.readUEG();else if(1===f){r.readBits(1),r.readSEG(),r.readSEG();let e=r.readUEG();for(let t=0;t<e;t++)r.readSEG()}let m=r.readUEG();r.readBits(1);let g=r.readUEG(),y=r.readUEG(),A=r.readBits(1);0===A&&r.readBits(1),r.readBits(1);let b=0,_=0,v=0,w=0;r.readBool()&&(b=r.readUEG(),_=r.readUEG(),v=r.readUEG(),w=r.readUEG());let S=1,T=1,E=0,k=!0,C=0,x=0;if(r.readBool()){if(r.readBool()){let e=r.readByte(),t=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],i=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];e>0&&e<16?(S=t[e-1],T=i[e-1]):255===e&&(S=r.readByte()<<8|r.readByte(),T=r.readByte()<<8|r.readByte())}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(4),r.readBool()&&r.readBits(24)),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool()){let e=r.readBits(32),t=r.readBits(32);k=r.readBool(),C=t,x=2*e,E=C/x}}let R=1;1===S&&1===T||(R=S/T);let D=0,L=0;if(0===d)D=1,L=2-A;else{D=3===d?1:2,L=(1===d?2:1)*(2-A)}let I=16*(g+1),P=16*(y+1)*(2-A);I-=(b+_)*D,P-=(v+w)*L;let B=Math.ceil(I*R);return r.destroy(),r=null,{codec_mimetype:i,profile_idc:a,level_idc:o,profile_string:n,level_string:l,chroma_format_idc:d,bit_depth:u,bit_depth_luma:u,bit_depth_chroma:p,ref_frames:m,chroma_format:h,chroma_format_string:xn.getChromaFormatString(h),frame_rate:{fixed:k,fps:E,fps_den:x,fps_num:C},sar_ratio:{width:S,height:T},codec_size:{width:I,height:P},present_size:{width:B,height:P}}}static _skipScalingList(e,t){let i=8,s=8,r=0;for(let a=0;a<t;a++)0!==s&&(r=e.readSEG(),s=(i+r+256)%256),i=0===s?i:s}static getProfileString(e){switch(e){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}static getLevelString(e){return(e/10).toFixed(1)}static getChromaFormatString(e){switch(e){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}class Rn{constructor(e){this.buffer=e,this.buflen=e.length,this.bufpos=0,this.bufoff=0,this.iserro=!1}read(e){let t=0,i=0;for(;e;){if(e<0||this.bufpos>=this.buflen)return this.iserro=!0,0;this.iserro=!1,i=this.bufoff+e>8?8-this.bufoff:e,t<<=i,t+=this.buffer[this.bufpos]>>8-this.bufoff-i&255>>8-i,this.bufoff+=i,e-=i,8==this.bufoff&&(this.bufpos++,this.bufoff=0)}return t}look(e){let t=this.bufpos,i=this.bufoff,s=this.read(e);return this.bufpos=t,this.bufoff=i,s}read_golomb(){let e;for(e=0;0===this.read(1)&&!this.iserro;e++);return(1<<e)+this.read(e)-1}}function Dn(e){const t={};let i=function(){let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}();const s=new DataView(e.buffer);let r=s.getUint8(0),a=s.getUint8(1);if(s.getUint8(2),s.getUint8(3),1!==r||0===a)return{};const o=1+(3&s.getUint8(4));if(3!==o&&4!==o)return{};let n=31&s.getUint8(5);if(0===n)return{};let l=6;for(let r=0;r<n;r++){let a=s.getUint16(l,!i);if(l+=2,0===a)continue;let o=new Uint8Array(e.buffer,l,a);l+=a;let n=xn.parseSPS(o);if(0!==r)continue;t.sps=o,t.timescale=1e3,t.codecWidth=n.codec_size.width,t.codecHeight=n.codec_size.height,t.presentWidth=n.present_size.width,t.presentHeight=n.present_size.height,t.profile=n.profile_string,t.level=n.level_string,t.bitDepth=n.bit_depth,t.chromaFormat=n.chroma_format,t.sarRatio=n.sar_ratio,t.frameRate=n.frame_rate,!1!==n.frame_rate.fixed&&0!==n.frame_rate.fps_num&&0!==n.frame_rate.fps_den||(t.frameRate={fixed:!0,fps:25,fps_num:25e3,fps_den:1e3});let d=t.frameRate.fps_den,h=t.frameRate.fps_num;t.refSampleDuration=t.timescale*(d/h);let c=o.subarray(1,4),u="avc1.";for(let e=0;e<3;e++){let t=c[e].toString(16);t.length<2&&(t="0"+t),u+=t}t.codec=u}let d=s.getUint8(l);if(0===d)return{};l++;for(let r=0;r<d;r++){let r=s.getUint16(l,!i);if(l+=2,0===r)continue;let a=new Uint8Array(e.buffer,l,r);l+=r,t.pps=a}if(t.videoType=as,t.sps){const e=t.sps.byteLength,i=new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e]),s=new Uint8Array(e+4);s.set(i,0),s.set(t.sps,4),t.sps=s}if(t.pps){const e=t.pps.byteLength,i=new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e]),s=new Uint8Array(e+4);s.set(i,0),s.set(t.pps,4),t.pps=s}return t}function Ln(e){let{sps:t,pps:i}=e,s=8+t.byteLength+1+2+i.byteLength,r=!1;const a=xn.parseSPS$2(t);66!==t[3]&&77!==t[3]&&88!==t[3]&&(r=!0,s+=4);let o=new Uint8Array(s);o[0]=1,o[1]=t[1],o[2]=t[2],o[3]=t[3],o[4]=255,o[5]=225;let n=t.byteLength;o[6]=n>>>8,o[7]=255&n;let l=8;o.set(t,8),l+=n,o[l]=1;let d=i.byteLength;o[l+1]=d>>>8,o[l+2]=255&d,o.set(i,l+3),l+=3+d,r&&(o[l]=252|a.chroma_format_idc,o[l+1]=248|a.bit_depth_luma-8,o[l+2]=248|a.bit_depth_chroma-8,o[l+3]=0,l+=4);const h=[23,0,0,0,0],c=new Uint8Array(h.length+o.byteLength);return c.set(h,0),c.set(o,h.length),c}function In(e,t){let i=[];i[0]=t?23:39,i[1]=1,i[2]=0,i[3]=0,i[4]=0;const s=new Uint8Array(i.length+e.byteLength);return s.set(i,0),s.set(e,i.length),s}function Pn(e){return 31&e[0]}function Bn(e){return e===Bt}function Mn(e){return!function(e){return e===Rt||e===Dt}(e)&&!Bn(e)}function Un(e){return e===Lt}class Fn{constructor(e){this.data=e,this.eofFlag=!1,this.currentStartcodeOffset=this.findNextStartCodeOffset(0),this.eofFlag&&console.error("Could not find H264 startcode until payload end!")}findNextStartCodeOffset(e){let t=e,i=this.data;for(;;){if(t+3>=i.byteLength)return this.eofFlag=!0,i.byteLength;let e=i[t+0]<<24|i[t+1]<<16|i[t+2]<<8|i[t+3],s=i[t+0]<<16|i[t+1]<<8|i[t+2];if(1===e||1===s)return t;t++}}readNextNaluPayload(){let e=this.data,t=null;for(;null==t&&!this.eofFlag;){let i=this.currentStartcodeOffset;i+=1===(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3])?4:3;let s=31&e[i],r=(128&e[i])>>>7,a=this.findNextStartCodeOffset(i);this.currentStartcodeOffset=a,s>=Ft||0===r&&(t={type:s,data:e.subarray(i,a)})}return t}}class On{constructor(e){let t=e.data.byteLength;this.type=e.type,this.data=new Uint8Array(4+t),new DataView(this.data.buffer).setUint32(0,t),this.data.set(e.data,4)}}const Nn=e=>{let t=e,i=t.byteLength,s=new Uint8Array(i),r=0;for(let e=0;e<i;e++)e>=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(s[r]=t[e],r++);return new Uint8Array(s.buffer,0,r)},jn=e=>{switch(e){case 0:return"4:0:0";case 1:return"4:2:0";case 2:return"4:2:2";case 3:return"4:4:4";default:return"Unknown"}};class Gn{static _ebsp2rbsp(e){let t=e,i=t.byteLength,s=new Uint8Array(i),r=0;for(let e=0;e<i;e++)e>=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(s[r]=t[e],r++);return new Uint8Array(s.buffer,0,r)}static parseVPS(e){let t=Gn._ebsp2rbsp(e),i=new Gr(t);return i.readByte(),i.readByte(),i.readBits(4),i.readBits(2),i.readBits(6),{num_temporal_layers:i.readBits(3)+1,temporal_id_nested:i.readBool()}}static parseSPS(e){let t=Gn._ebsp2rbsp(e),i=new Gr(t);i.readByte(),i.readByte();let s=0,r=0,a=0,o=0;i.readBits(4);let n=i.readBits(3);i.readBool();let l=i.readBits(2),d=i.readBool(),h=i.readBits(5),c=i.readByte(),u=i.readByte(),p=i.readByte(),f=i.readByte(),m=i.readByte(),g=i.readByte(),y=i.readByte(),A=i.readByte(),b=i.readByte(),_=i.readByte(),v=i.readByte(),w=[],S=[];for(let e=0;e<n;e++)w.push(i.readBool()),S.push(i.readBool());if(n>0)for(let e=n;e<8;e++)i.readBits(2);for(let e=0;e<n;e++)w[e]&&(i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte()),S[e]&&i.readByte();i.readUEG();let T=i.readUEG();3==T&&i.readBits(1);let E=i.readUEG(),k=i.readUEG();i.readBool()&&(s+=i.readUEG(),r+=i.readUEG(),a+=i.readUEG(),o+=i.readUEG());let C=i.readUEG(),x=i.readUEG(),R=i.readUEG();for(let e=i.readBool()?0:n;e<=n;e++)i.readUEG(),i.readUEG(),i.readUEG();if(i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readBool()){if(i.readBool())for(let e=0;e<4;e++)for(let t=0;t<(3===e?2:6);t++){if(i.readBool()){let t=Math.min(64,1<<4+(e<<1));e>1&&i.readSEG();for(let e=0;e<t;e++)i.readSEG()}else i.readUEG()}}i.readBool(),i.readBool(),i.readBool()&&(i.readByte(),i.readUEG(),i.readUEG(),i.readBool());let D=i.readUEG(),L=0;for(let e=0;e<D;e++){let t=!1;if(0!==e&&(t=i.readBool()),t){e===D&&i.readUEG(),i.readBool(),i.readUEG();let t=0;for(let e=0;e<=L;e++){let e=i.readBool(),s=!1;e||(s=i.readBool()),(e||s)&&t++}L=t}else{let e=i.readUEG(),t=i.readUEG();L=e+t;for(let t=0;t<e;t++)i.readUEG(),i.readBool();for(let e=0;e<t;e++)i.readUEG(),i.readBool()}}if(i.readBool()){let e=i.readUEG();for(let t=0;t<e;t++){for(let e=0;e<R+4;e++)i.readBits(1);i.readBits(1)}}let I=!1,P=0,B=1,M=1,U=!1,F=1,O=1;if(i.readBool(),i.readBool(),i.readBool()){if(i.readBool()){let e=i.readByte(),t=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],s=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];e>0&&e<=16?(B=t[e-1],M=s[e-1]):255===e&&(B=i.readBits(16),M=i.readBits(16))}if(i.readBool()&&i.readBool(),i.readBool()){i.readBits(3),i.readBool(),i.readBool()&&(i.readByte(),i.readByte(),i.readByte())}if(i.readBool()&&(i.readUEG(),i.readUEG()),i.readBool(),i.readBool(),i.readBool(),I=i.readBool(),I&&(i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG()),i.readBool()){if(F=i.readBits(32),O=i.readBits(32),i.readBool()&&i.readUEG(),i.readBool()){let e=!1,t=!1,s=!1;e=i.readBool(),t=i.readBool(),(e||t)&&(s=i.readBool(),s&&(i.readByte(),i.readBits(5),i.readBool(),i.readBits(5)),i.readBits(4),i.readBits(4),s&&i.readBits(4),i.readBits(5),i.readBits(5),i.readBits(5));for(let r=0;r<=n;r++){let r=i.readBool();U=r;let a=!0,o=1;r||(a=i.readBool());let n=!1;if(a?i.readUEG():n=i.readBool(),n||(o=i.readUEG()+1),e){for(let e=0;e<o;e++)i.readUEG(),i.readUEG(),s&&(i.readUEG(),i.readUEG());i.readBool()}if(t){for(let e=0;e<o;e++)i.readUEG(),i.readUEG(),s&&(i.readUEG(),i.readUEG());i.readBool()}}}}i.readBool()&&(i.readBool(),i.readBool(),i.readBool(),P=i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG())}i.readBool();let N=`hvc1.${h}.1.L${v}.B0`,j=E-(s+r)*(1===T||2===T?2:1),G=k-(a+o)*(1===T?2:1),z=1;return 1!==B&&1!==M&&(z=B/M),i.destroy(),i=null,{codec_mimetype:N,profile_string:Gn.getProfileString(h),level_string:Gn.getLevelString(v),profile_idc:h,bit_depth:C+8,ref_frames:1,chroma_format:T,chroma_format_string:Gn.getChromaFormatString(T),general_level_idc:v,general_profile_space:l,general_tier_flag:d,general_profile_idc:h,general_profile_compatibility_flags_1:c,general_profile_compatibility_flags_2:u,general_profile_compatibility_flags_3:p,general_profile_compatibility_flags_4:f,general_constraint_indicator_flags_1:m,general_constraint_indicator_flags_2:g,general_constraint_indicator_flags_3:y,general_constraint_indicator_flags_4:A,general_constraint_indicator_flags_5:b,general_constraint_indicator_flags_6:_,min_spatial_segmentation_idc:P,constant_frame_rate:0,chroma_format_idc:T,bit_depth_luma_minus8:C,bit_depth_chroma_minus8:x,frame_rate:{fixed:U,fps:O/F,fps_den:F,fps_num:O},sar_ratio:{width:B,height:M},codec_size:{width:j,height:G},present_size:{width:j*z,height:G}}}static parsePPS(e){let t=Gn._ebsp2rbsp(e),i=new Gr(t);i.readByte(),i.readByte(),i.readUEG(),i.readUEG(),i.readBool(),i.readBool(),i.readBits(3),i.readBool(),i.readBool(),i.readUEG(),i.readUEG(),i.readSEG(),i.readBool(),i.readBool(),i.readBool()&&i.readUEG(),i.readSEG(),i.readSEG(),i.readBool(),i.readBool(),i.readBool(),i.readBool();let s=i.readBool(),r=i.readBool(),a=1;return r&&s?a=0:r?a=3:s&&(a=2),{parallelismType:a}}static getChromaFormatString(e){switch(e){case 0:return"4:0:0";case 1:return"4:2:0";case 2:return"4:2:2";case 3:return"4:4:4";default:return"Unknown"}}static getProfileString(e){switch(e){case 1:return"Main";case 2:return"Main10";case 3:return"MainSP";case 4:return"Rext";case 9:return"SCC";default:return"Unknown"}}static getLevelString(e){return(e/30).toFixed(1)}}function zn(e){let t={codecWidth:0,codecHeight:0,videoType:os,width:0,height:0,profile:0,level:0};e=e.slice(5);do{let i={};if(e.length<23){console.warn("parseHEVCDecoderConfigurationRecord$2",`arrayBuffer.length ${e.length} < 23`);break}if(i.configurationVersion=e[0],1!=i.configurationVersion)break;i.general_profile_space=e[1]>>6&3,i.general_tier_flag=e[1]>>5&1,i.general_profile_idc=31&e[1],i.general_profile_compatibility_flags=e[2]<<24|e[3]<<16|e[4]<<8|e[5],i.general_constraint_indicator_flags=e[6]<<24|e[7]<<16|e[8]<<8|e[9],i.general_constraint_indicator_flags=i.general_constraint_indicator_flags<<16|e[10]<<8|e[11],i.general_level_idc=e[12],i.min_spatial_segmentation_idc=(15&e[13])<<8|e[14],i.parallelismType=3&e[15],i.chromaFormat=3&e[16],i.bitDepthLumaMinus8=7&e[17],i.bitDepthChromaMinus8=7&e[18],i.avgFrameRate=e[19]<<8|e[20],i.constantFrameRate=e[21]>>6&3,i.numTemporalLayers=e[21]>>3&7,i.temporalIdNested=e[21]>>2&1,i.lengthSizeMinusOne=3&e[21];let s=e[22],r=e.slice(23);for(let e=0;e<s&&!(r.length<3);e++){let e=63&r[0],s=r[1]<<8|r[2];r=r.slice(3);for(let a=0;a<s&&!(r.length<2);a++){let s=r[0]<<8|r[1];if(r.length<2+s)break;if(r=r.slice(2),33==e){let e=new Uint8Array(s);e.set(r.slice(0,s),0),i.psps=Hn(e,i),t.profile=i.general_profile_idc,t.level=i.general_level_idc/30,t.width=i.psps.pic_width_in_luma_samples-(i.psps.conf_win_left_offset+i.psps.conf_win_right_offset),t.height=i.psps.pic_height_in_luma_samples-(i.psps.conf_win_top_offset+i.psps.conf_win_bottom_offset)}r=r.slice(s)}}}while(0);return t.codecWidth=t.width||1920,t.codecHeight=t.height||1080,t.presentHeight=t.codecHeight,t.presentWidth=t.codecWidth,t.timescale=1e3,t.refSampleDuration=1e3/23976*1e3,t}function $n(e){const t=e;if(t.length<22)return console.error(`Invalid HEVCDecoderConfigurationRecord, lack of data! ${t.length} < 22`),{};let i={codecWidth:0,codecHeight:0,videoType:os},s=function(){let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}(),r=new DataView(t.buffer),a=r.getUint8(0),o=31&r.getUint8(1);if(1!==a||0===o)return console.error(`Invalid HEVCDecoderConfigurationRecord,version is ${a}, hevcProfile is ${o}`),{};let n=1+(3&r.getUint8(21));if(3!==n&&4!==n)return console.error("Invalid HEVCDecoderConfigurationRecord, Strange NaluLengthSizeMinusOne: "+(n-1)),{};let l=r.getUint8(22);for(let e=0,a=23;e<l;e++){let e=63&r.getUint8(a+0),o=r.getUint16(a+1,!s);a+=3;for(let n=0;n<o;n++){let o=r.getUint16(a+0,!s);if(0===n)if(33===e){a+=2;let e=new Uint8Array(t.buffer,a,o),s=Gn.parseSPS(e);i.codecWidth=s.codec_size.width,i.codecHeight=s.codec_size.height,i.presentWidth=s.present_size.width,i.presentHeight=s.present_size.height,i.profile=s.profile_string,i.level=s.level_string,i.bitDepth=s.bit_depth,i.chromaFormat=s.chroma_format,i.sarRatio=s.sar_ratio,i.frameRate=s.frame_rate,!1!==s.frame_rate.fixed&&0!==s.frame_rate.fps_num&&0!==s.frame_rate.fps_den||(i.frameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3}),i.frameRate.fps_den,i.frameRate.fps_num,i.codec=s.codec_mimetype,a+=o}else a+=2+o;else a+=2+o}}return i.hvcc=new Uint8Array(t),i}function Hn(e,t){let i={},s=e.length,r=[],a=new Rn(e);a.read(1),a.read(6),a.read(6),a.read(3);for(let e=2;e<s;e++)e+2<s&&3==a.look(24)?(r.push(a.read(8)),r.push(a.read(8)),e+=2,a.read(8)):r.push(a.read(8));let o=new Uint8Array(r),n=new Rn(o);if(i.sps_video_parameter_set_id=n.read(4),i.sps_max_sub_layers_minus1=n.read(3),i.sps_temporal_id_nesting_flag=n.read(1),i.profile_tier_level=function(e,t,i){let s={};s.profile_space=e.read(2),s.tier_flag=e.read(1),s.profile_idc=e.read(5),s.profile_compatibility_flags=e.read(32),s.general_progressive_source_flag=e.read(1),s.general_interlaced_source_flag=e.read(1),s.general_non_packed_constraint_flag=e.read(1),s.general_frame_only_constraint_flag=e.read(1),e.read(32),e.read(12),s.level_idc=e.read(8),s.sub_layer_profile_present_flag=[],s.sub_layer_level_present_flag=[];for(let t=0;t<i;t++)s.sub_layer_profile_present_flag[t]=e.read(1),s.sub_layer_level_present_flag[t]=e.read(1);if(i>0)for(let t=i;t<8;t++)e.read(2);s.sub_layer_profile_space=[],s.sub_layer_tier_flag=[],s.sub_layer_profile_idc=[],s.sub_layer_profile_compatibility_flag=[],s.sub_layer_progressive_source_flag=[],s.sub_layer_interlaced_source_flag=[],s.sub_layer_non_packed_constraint_flag=[],s.sub_layer_frame_only_constraint_flag=[],s.sub_layer_level_idc=[];for(let t=0;t<i;t++)s.sub_layer_profile_present_flag[t]&&(s.sub_layer_profile_space[t]=e.read(2),s.sub_layer_tier_flag[t]=e.read(1),s.sub_layer_profile_idc[t]=e.read(5),s.sub_layer_profile_compatibility_flag[t]=e.read(32),s.sub_layer_progressive_source_flag[t]=e.read(1),s.sub_layer_interlaced_source_flag[t]=e.read(1),s.sub_layer_non_packed_constraint_flag[t]=e.read(1),s.sub_layer_frame_only_constraint_flag[t]=e.read(1),e.read(32),e.read(12)),s.sub_layer_level_present_flag[t]?s.sub_layer_level_idc[t]=e.read(8):s.sub_layer_level_idc[t]=1;return s}(n,0,i.sps_max_sub_layers_minus1),i.sps_seq_parameter_set_id=n.read_golomb(),i.chroma_format_idc=n.read_golomb(),3==i.chroma_format_idc?i.separate_colour_plane_flag=n.read(1):i.separate_colour_plane_flag=0,i.pic_width_in_luma_samples=n.read_golomb(),i.pic_height_in_luma_samples=n.read_golomb(),i.conformance_window_flag=n.read(1),i.conformance_window_flag){let e=1+(i.chroma_format_idc<2),t=1+(i.chroma_format_idc<3);i.conf_win_left_offset=n.read_golomb()*t,i.conf_win_right_offset=n.read_golomb()*t,i.conf_win_top_offset=n.read_golomb()*e,i.conf_win_bottom_offset=n.read_golomb()*e}else i.conf_win_left_offset=0,i.conf_win_right_offset=0,i.conf_win_top_offset=0,i.conf_win_bottom_offset=0;return i}function Vn(e){let{vps:t,pps:i,sps:s}=e,r={configurationVersion:1};const a=(e=>{let t=Nn(e),i=new Gr(t);return i.readByte(),i.readByte(),i.readBits(4),i.readBits(2),i.readBits(6),{num_temporal_layers:i.readBits(3)+1,temporal_id_nested:i.readBool()}})(t),o=(e=>{let t=Nn(e),i=new Gr(t);i.readByte(),i.readByte();let s=0,r=0,a=0,o=0;i.readBits(4);let n=i.readBits(3);i.readBool();let l=i.readBits(2),d=i.readBool(),h=i.readBits(5),c=i.readByte(),u=i.readByte(),p=i.readByte(),f=i.readByte(),m=i.readByte(),g=i.readByte(),y=i.readByte(),A=i.readByte(),b=i.readByte(),_=i.readByte(),v=i.readByte(),w=[],S=[];for(let e=0;e<n;e++)w.push(i.readBool()),S.push(i.readBool());if(n>0)for(let e=n;e<8;e++)i.readBits(2);for(let e=0;e<n;e++)w[e]&&(i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte()),w[e]&&i.readByte();i.readUEG();let T=i.readUEG();3==T&&i.readBits(1);let E=i.readUEG(),k=i.readUEG();i.readBool()&&(s+=i.readUEG(),r+=i.readUEG(),a+=i.readUEG(),o+=i.readUEG());let C=i.readUEG(),x=i.readUEG(),R=i.readUEG();for(let e=i.readBool()?0:n;e<=n;e++)i.readUEG(),i.readUEG(),i.readUEG();if(i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readBool()&&i.readBool())for(let e=0;e<4;e++)for(let t=0;t<(3===e?2:6);t++)if(i.readBool()){let t=Math.min(64,1<<4+(e<<1));e>1&&i.readSEG();for(let e=0;e<t;e++)i.readSEG()}else i.readUEG();i.readBool(),i.readBool(),i.readBool()&&(i.readByte(),i.readUEG(),i.readUEG(),i.readBool());let D=i.readUEG(),L=0;for(let e=0;e<D;e++){let t=!1;if(0!==e&&(t=i.readBool()),t){e===D&&i.readUEG(),i.readBool(),i.readUEG();let t=0;for(let e=0;e<=L;e++){let e=i.readBool(),s=!1;e||(s=i.readBool()),(e||s)&&t++}L=t}else{let e=i.readUEG(),t=i.readUEG();L=e+t;for(let t=0;t<e;t++)i.readUEG(),i.readBool();for(let e=0;e<t;e++)i.readUEG(),i.readBool()}}if(i.readBool()){let e=i.readUEG();for(let t=0;t<e;t++){for(let e=0;e<R+4;e++)i.readBits(1);i.readBits(1)}}let I=!1,P=0,B=1,M=1,U=!1,F=1,O=1;if(i.readBool(),i.readBool(),i.readBool()){if(i.readBool()){let e=i.readByte(),t=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],s=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];e>0&&e<16?(B=t[e-1],M=s[e-1]):255===e&&(B=i.readBits(16),M=i.readBits(16))}if(i.readBool()&&i.readBool(),i.readBool()&&(i.readBits(3),i.readBool(),i.readBool()&&(i.readByte(),i.readByte(),i.readByte())),i.readBool()&&(i.readUEG(),i.readUEG()),i.readBool(),i.readBool(),i.readBool(),I=i.readBool(),I&&(s+=i.readUEG(),r+=i.readUEG(),a+=i.readUEG(),o+=i.readUEG()),i.readBool()&&(F=i.readBits(32),O=i.readBits(32),i.readBool()&&(i.readUEG(),i.readBool()))){let e=!1,t=!1,s=!1;e=i.readBool(),t=i.readBool(),(e||t)&&(s=i.readBool(),s&&(i.readByte(),i.readBits(5),i.readBool(),i.readBits(5)),i.readBits(4),i.readBits(4),s&&i.readBits(4),i.readBits(5),i.readBits(5),i.readBits(5));for(let r=0;r<=n;r++){let r=i.readBool();U=r;let a=!1,o=1;r||(a=i.readBool());let n=!1;if(a?i.readSEG():n=i.readBool(),n||(cpbcnt=i.readUEG()+1),e)for(let e=0;e<o;e++)i.readUEG(),i.readUEG(),s&&(i.readUEG(),i.readUEG());if(t)for(let e=0;e<o;e++)i.readUEG(),i.readUEG(),s&&(i.readUEG(),i.readUEG())}}i.readBool()&&(i.readBool(),i.readBool(),i.readBool(),P=i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG())}i.readBool();let N=`hvc1.${h}.1.L${v}.B0`,j=E,G=k,z=1;return 1!==B&&1!==M&&(z=B/M),i.destroy(),i=null,{codec_mimetype:N,level_string:($=v,($/30).toFixed(1)),profile_idc:h,bit_depth:C+8,ref_frames:1,chroma_format:T,chroma_format_string:jn(T),general_level_idc:v,general_profile_space:l,general_tier_flag:d,general_profile_idc:h,general_profile_compatibility_flags_1:c,general_profile_compatibility_flags_2:u,general_profile_compatibility_flags_3:p,general_profile_compatibility_flags_4:f,general_constraint_indicator_flags_1:m,general_constraint_indicator_flags_2:g,general_constraint_indicator_flags_3:y,general_constraint_indicator_flags_4:A,general_constraint_indicator_flags_5:b,general_constraint_indicator_flags_6:_,min_spatial_segmentation_idc:P,constant_frame_rate:0,chroma_format_idc:T,bit_depth_luma_minus8:C,bit_depth_chroma_minus8:x,frame_rate:{fixed:U,fps:O/F,fps_den:F,fps_num:O},sar_ratio:{width:B,height:M},codec_size:{width:j,height:G},present_size:{width:j*z,height:G}};var $})(s),n=(e=>{let t=Nn(e),i=new Gr(t);i.readByte(),i.readByte(),i.readUEG(),i.readUEG(),i.readBool(),i.readBool(),i.readBits(3),i.readBool(),i.readBool(),i.readUEG(),i.readUEG(),i.readSEG(),i.readBool(),i.readBool(),i.readBool()&&i.readUEG(),i.readSEG(),i.readSEG(),i.readBool(),i.readBool(),i.readBool(),i.readBool();let s=i.readBool(),r=i.readBool(),a=1;return r&&s?a=0:r?a=3:s&&(a=2),{parallelismType:a}})(i);r=Object.assign(r,a,o,n);let l=23+(5+t.byteLength)+(5+s.byteLength)+(5+i.byteLength),d=new Uint8Array(l);d[0]=1,d[1]=(3&r.general_profile_space)<<6|(r.general_tier_flag?1:0)<<5|31&r.general_profile_idc,d[2]=r.general_profile_compatibility_flags_1||0,d[3]=r.general_profile_compatibility_flags_2||0,d[4]=r.general_profile_compatibility_flags_3||0,d[5]=r.general_profile_compatibility_flags_4||0,d[6]=r.general_constraint_indicator_flags_1||0,d[7]=r.general_constraint_indicator_flags_2||0,d[8]=r.general_constraint_indicator_flags_3||0,d[9]=r.general_constraint_indicator_flags_4||0,d[10]=r.general_constraint_indicator_flags_5||0,d[11]=r.general_constraint_indicator_flags_6||0,d[12]=60,d[13]=240|(3840&r.min_spatial_segmentation_idc)>>8,d[14]=255&r.min_spatial_segmentation_idc,d[15]=252|3&r.parallelismType,d[16]=252|3&r.chroma_format_idc,d[17]=248|7&r.bit_depth_luma_minus8,d[18]=248|7&r.bit_depth_chroma_minus8,d[19]=0,d[20]=0,d[21]=(3&r.constant_frame_rate)<<6|(7&r.num_temporal_layers)<<3|(r.temporal_id_nested?1:0)<<2|3,d[22]=3,d[23]=128|Gt,d[24]=0,d[25]=1,d[26]=(65280&t.byteLength)>>8,d[27]=(255&t.byteLength)>>0,d.set(t,28),d[23+(5+t.byteLength)+0]=128|$t,d[23+(5+t.byteLength)+1]=0,d[23+(5+t.byteLength)+2]=1,d[23+(5+t.byteLength)+3]=(65280&s.byteLength)>>8,d[23+(5+t.byteLength)+4]=(255&s.byteLength)>>0,d.set(s,23+(5+t.byteLength)+5),d[23+(5+t.byteLength+5+s.byteLength)+0]=128|Vt,d[23+(5+t.byteLength+5+s.byteLength)+1]=0,d[23+(5+t.byteLength+5+s.byteLength)+2]=1,d[23+(5+t.byteLength+5+s.byteLength)+3]=(65280&i.byteLength)>>8,d[23+(5+t.byteLength+5+s.byteLength)+4]=(255&i.byteLength)>>0,d.set(i,23+(5+t.byteLength+5+s.byteLength)+5);const h=[28,0,0,0,0],c=new Uint8Array(h.length+d.byteLength);return c.set(h,0),c.set(d,h.length),c}function Wn(e,t){let i=[];i[0]=t?28:44,i[1]=1,i[2]=0,i[3]=0,i[4]=0;const s=new Uint8Array(i.length+e.byteLength);return s.set(i,0),s.set(e,i.length),s}function Jn(e){return(126&e[0])>>1}function qn(e){return!function(e){return e>=32&&e<=40}(e)}function Kn(e){return e>=16&&e<=21}class Yn{constructor(e){this.data=e,this.eofFlag=!1,this.currentStartcodeOffset=this.findNextStartCodeOffset(0),this.eofFlag&&console.error("Could not find H265 startcode until payload end!")}findNextStartCodeOffset(e){let t=e,i=this.data;for(;;){if(t+3>=i.byteLength)return this.eofFlag=!0,i.byteLength;let e=i[t+0]<<24|i[t+1]<<16|i[t+2]<<8|i[t+3],s=i[t+0]<<16|i[t+1]<<8|i[t+2];if(1===e||1===s)return t;t++}}readNextNaluPayload(){let e=this.data,t=null;for(;null==t&&!this.eofFlag;){let i=this.currentStartcodeOffset;i+=1===(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3])?4:3;let s=e[i]>>1&63,r=(128&e[i])>>>7,a=this.findNextStartCodeOffset(i);this.currentStartcodeOffset=a,0===r&&(t={type:s,data:e.subarray(i,a)})}return t}}class Qn{constructor(e){let t=e.data.byteLength;this.type=e.type,this.data=new Uint8Array(4+t),new DataView(this.data.buffer).setUint32(0,t),this.data.set(e.data,4)}}class Xn extends a{constructor(e){super(),this.TAG_NAME="recorderCommon",this.player=e,this.fileName="",this._isRecording=!1,this._recordingTimestamp=0,this.recordingInterval=null,this.sps=null,this.pps=null,this.vps=null,this.codecId=null,this.audioCodeId=null,this.metaInfo={codecWidth:0,codecHeight:0,presentWidth:0,presentHeight:0,refSampleDuration:0,timescale:1e3,avcc:null,videoType:""},this.audioMetaInfo={timescale:1e3,sampleRate:0,refSampleDuration:0,channelCount:0,codec:"",originalCodec:"",audioType:"",extraData:new Uint8Array(0)}}destroy(){this._reset(),this.sps=null,this.pps=null,this.vps=null,this.codecId=null,this.audioCodeId=null,this.metaInfo=null,this.audioMetaInfo=null}get isH264(){return this.codecId===vt}get isH265(){return this.codecId===wt}setFileName(e){this.fileName=e}get isRecording(){return this._isRecording}get recording(){return this._isRecording}get recordTime(){return this._recordingTimestamp}startRecord(){}handleAddNaluTrack(e,t,i,s){}handleAddAudioTrack(e,t){}handleAddTrack(e){}stopRecordAndSave(){}startRecordingInterval(){}isWasmMp4(){return!1}stopRecordingInterval(){this.recordingInterval&&clearInterval(this.recordingInterval),this.recordingInterval=null}getToTalByteLength(){return 0}_reset(){this.fileName="",this._isRecording=!1,this._recordingTimestamp=0,this.stopRecordingInterval()}initMetaData(e,t){let i;const s=e.slice(5);if(this.codecId=t,this.metaInfo.avcc=s,t===vt)i=Dn(s);else if(t===wt){i=function(e){let t=23;const i=e[t];if((63&i)!==Gt)return console.warn(`parseHEVCDecoderVPSAndSPSAndPPS and vpsTag is ${i}`),{};t+=2,t+=1;const s=e[t+1]|e[t]<<8;t+=2;const r=e.slice(t,t+s);t+=s;const a=e[t];if((63&a)!==$t)return console.warn(`parseHEVCDecoderVPSAndSPSAndPPS and sps tag is ${a}`),{};t+=2,t+=1;const o=e[t+1]|e[t]<<8;t+=2;const n=e.slice(t,t+o);t+=o;const l=e[t];if((63&l)!==Vt)return console.warn(`parseHEVCDecoderVPSAndSPSAndPPS and pps tag is ${l}`),{};t+=2,t+=1;const d=e[t+1]|e[t]<<8;t+=2;const h=e.slice(t,t+d),c=new Uint8Array([o>>>24&255,o>>>16&255,o>>>8&255,255&o]),u=new Uint8Array([d>>>24&255,d>>>16&255,d>>>8&255,255&d]),p=new Uint8Array([s>>>24&255,s>>>16&255,s>>>8&255,255&s]),f=new Uint8Array(o+4);f.set(c,0),f.set(n,4);const m=new Uint8Array(d+4);m.set(u,0),m.set(h,4);const g=new Uint8Array(s+4);return g.set(p,0),g.set(r,4),{sps:f,pps:m,vps:g}}(s);const t=zn(e);i=Object.assign(i,t)}i&&(i.vps&&(this.vps=i.vps),i.pps&&(this.pps=i.pps),i.sps&&(this.sps=i.sps),i.presentWidth&&(this.metaInfo.presentWidth=i.presentWidth),i.presentHeight&&(this.metaInfo.presentHeight=i.presentHeight),i.codecWidth&&(this.metaInfo.codecWidth=i.codecWidth),i.codecHeight&&(this.metaInfo.codecHeight=i.codecHeight),i.timescale&&(this.metaInfo.timescale=i.timescale),i.refSampleDuration&&(this.metaInfo.refSampleDuration=i.refSampleDuration),i.videoType&&(this.metaInfo.videoType=i.videoType))}initAudioMetaData(e,t){this.audioCodeId=t;const i=e[0]>>1&1;let s=null;t===Et?(s=function(e){let t={},i=new Qr(e);return i.read(16),t.object_type=Xr(i),t.sample_rate=Zr(i,t),t.chan_config=i.read(4),t.chan_config<ta.length&&(t.channels=ta[t.chan_config]),t.sbr=-1,t.ps=-1,5!=t.object_type&&29!=t.object_type||(29==t.object_type&&(t.ps=1),t.ext_object_type=5,t.sbr=1,t.sample_rate=Zr(i,t),t.object_type=Xr(i)),{...t,channelCount:t.channels,sampleRate:t.sample_rate}}(e),s&&(s.channelCount&&(this.audioMetaInfo.channelCount=s.channelCount),s.codec&&(this.audioMetaInfo.codec=s.codec),s.originalCodec&&(this.audioMetaInfo.originalCodec=s.originalCodec),s.config&&(this.audioMetaInfo.config=s.config),s.sampleRate&&(this.audioMetaInfo.sampleRate=s.sampleRate),this.audioMetaInfo.sampleRate&&this.audioMetaInfo.timescale&&(this.audioMetaInfo.refSampleDuration=1024/this.audioMetaInfo.sampleRate*this.audioMetaInfo.timescale)),this.audioMetaInfo.depth=i?16:8,this.audioMetaInfo.extraData=e.slice(2)):this.audioMetaInfo.depth=0===i?8:16}initAudioAacExtraData(e){this.audioMetaInfo.extraData=new Uint8Array(e)}}class Zn extends Xn{constructor(e){super(e),this.totalByteLength=0,this._startRecordingTimestamp=null,e.debug.log("RecorderRTC","init")}destroy(){super.destroy(),this._reset(),this.player.debug.log("RecorderRTC","destroy")}_reset(){super._reset(),this.totalByteLength=0,this._startRecordingTimestamp=null,this.recorder&&(this.recorder.destroy(),this.recorder=null)}getSeekableBlob(e){const t=new EBML.Reader,i=new EBML.Decoder,s=EBML.tools,r=new FileReader;return new Promise(((a,o)=>{r.onload=function(e){i.decode(this.result).forEach((function(e){t.read(e)})),t.stop();const r=s.makeMetadataSeekable(t.metadatas,t.duration,t.cues),o=this.result.slice(t.metadataSize),n=new Blob([r,o],{type:"video/webm"});a(n)},r.readAsArrayBuffer(e)}))}startRecord(){const e=this.player.debug,t={type:"video",mimeType:"video/webm;codecs=h264",timeSlice:1e3,onTimeStamp:t=>{e.log("RecorderRTC","record timestamp :"+t),null===this._startRecordingTimestamp&&(this._startRecordingTimestamp=t),this._recordingTimestamp=(t-this._startRecordingTimestamp)/1e3},ondataavailable:t=>{this.totalByteLength+=t.size,e.log("RecorderRTC","ondataavailable",t.size)},disableLogs:!this.player._opt.debug};try{let i=null;if(this.player.getRenderType()===W?i=this.player.video.$videoElement.captureStream(25):this.player.video.mediaStream?i=this.player.video.mediaStream:this.player.isOldHls()||this.player._opt.useMSE||this.player._opt.useWCS?i=this.player.video.$videoElement.captureStream(25):this.player.isWebrtcH264()?i=this.player.webrtc.videoStream:this.player.isAliyunRtc()&&(i=this.player.video.$videoElement.captureStream(25)),!i)return e.error("RecorderRTC","startRecord error and can not create stream"),void this.player.emitError(lt.recordCreateError,"can not create stream");if(this.player.audio&&this.player.audio.mediaStreamAudioDestinationNode&&this.player.audio.mediaStreamAudioDestinationNode.stream&&!this.player.audio.isStateSuspended()&&this.player.audio.hasAudio&&this.player._opt.hasAudio){const e=this.player.audio.mediaStreamAudioDestinationNode.stream;if(e.getAudioTracks().length>0){const t=e.getAudioTracks()[0];t&&t.enabled&&i.addTrack(t)}}this.recorder=Cn(i,t)}catch(t){return e.error("RecorderRTC","startRecord error",t),void this.player.emitError(lt.recordCreateError,t)}this.recorder&&(this._isRecording=!0,this.player.emit(lt.recording,!0),this.recorder.startRecording(),e.log("RecorderRTC","start recording"),this.player.emit(lt.recordStart),this.startRecordingInterval())}startRecordingInterval(){this.stopRecordingInterval(),this.recordingInterval=window.setInterval((()=>{this.player.emit(lt.recordingTimestamp,this._recordingTimestamp)}),1e3)}stopRecordAndSave(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:At,t=arguments.length>1?arguments[1]:void 0;return new Promise(((i,s)=>{this.recorder&&this._isRecording||s("recorder is not ready"),t&&this.setFileName(t),this.recorder.stopRecording((()=>{this.player.debug.log("RecorderRTC","stop recording");const t=(this.fileName||ha())+"."+T;if(this.recorder.getBlob(),e===bt){const e=this.recorder.getBlob();i(e),this.player.emit(lt.recordBlob,e)}else i(),this.recorder.save(t);this.player.emit(lt.recordEnd),this._reset(),this.player.emit(lt.recording,!1)}))}))}getToTalByteLength(){return this.totalByteLength}getTotalDuration(){return this.recordTime}getType(){return T}initMetaData(){}}class el{static init(){el.types={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[],free:[],edts:[],elst:[],stss:[]};for(let e in el.types)el.types.hasOwnProperty(e)&&(el.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);let e=el.constants={};e.FTYP=new Uint8Array([105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,97,118,99,49,109,112,52,49,0,0,0,0]),e.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),e.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSC=e.STCO=e.STTS,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),e.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),e.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(e){let t=8,i=null,s=Array.prototype.slice.call(arguments,1),r=s.length;for(let e=0;e<r;e++)t+=s[e].byteLength;i=new Uint8Array(t),i[0]=t>>>24&255,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i.set(e,4);let a=8;for(let e=0;e<r;e++)i.set(s[e],a),a+=s[e].byteLength;return i}static generateInitSegment(e,t,i){let s=el.box(el.types.ftyp,el.constants.FTYP),r=el.box(el.types.free),a=8,o=new Uint8Array;i+a>=Math.pow(2,32)-1?(a=16,o=new Uint8Array(i+a),o.set(new Uint8Array([0,0,0,1]),0),o.set(el.types.mdat,4),o.set(new Uint8Array([i+8>>>56&255,i+8>>>48&255,i+8>>>40&255,i+8>>>32&255,i+8>>>24&255,i+8>>>16&255,i+8>>>8&255,i+8&255]),8)):(o=new Uint8Array(i+a),o[0]=i+8>>>24&255,o[1]=i+8>>>16&255,o[2]=i+8>>>8&255,o[3]=i+8&255,o.set(el.types.mdat,4));for(let e=0;e<t.length;e++){let i=t[e];i.duration=i.refSampleDuration*i.sequenceNumber;for(let e=0;e<i.sequenceNumber;e++){let t=i.samples[e];t.chunkOffset=s.byteLength+r.byteLength+a;let n=t.data;o.set(n,a),a+=n.byteLength}}let n=el.moov(e,t),l=new Uint8Array(s.byteLength+n.byteLength+o.byteLength+r.byteLength);return l.set(s,0),l.set(r,s.byteLength),l.set(o,s.byteLength+r.byteLength),l.set(n,s.byteLength+o.byteLength+r.byteLength),l}static moov(e,t){let i=e.timescale,s=e.duration,r=t.length,a=el.mvhd(i,s),o=new Uint8Array;for(let e=0;e<r;e++){let i=el.trak(t[e]),s=new Uint8Array(i.byteLength+o.byteLength);s.set(o,0),s.set(i,o.byteLength),o=new Uint8Array(s.byteLength),o.set(s,0)}return el.box(el.types.moov,a,o)}static mvhd(e,t){return el.box(el.types.mvhd,new Uint8Array([0,0,0,0,206,186,253,168,206,186,253,168,e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3]))}static trak(e){return el.box(el.types.trak,el.tkhd(e),el.mdia(e))}static tkhd(e){let t=e.id,i=e.duration,s=e.presentWidth,r=e.presentHeight;return el.box(el.types.tkhd,new Uint8Array([0,0,0,15,206,186,253,168,206,186,253,168,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,s>>>8&255,255&s,0,0,r>>>8&255,255&r,0,0]))}static edts(e,t){return el.box(el.types.edts,el.elst(e,t))}static elst(e,t){let i=0;for(let s=0;s<t;s++)"video"===e[s].type&&(i+=e[s].duration);let s=e[t].duration;return 0===i&&(i=e[t].refSampleDuration),el.box(el.types.elst,new Uint8Array([0,0,0,0,0,0,0,2,i>>>24&255,i>>>16&255,i>>>8&255,255&i,255,255,255,255,0,1,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s,0,0,0,0,0,1,0,0]))}static mdia(e){return el.box(el.types.mdia,el.mdhd(e),el.hdlr(e),el.minf(e))}static mdhd(e){let t=e.timescale/e.refSampleDuration,i=t*e.duration/e.timescale;return el.box(el.types.mdhd,new Uint8Array([0,0,0,0,206,186,253,168,206,186,253,168,t>>>24&255,t>>>16&255,t>>>8&255,255&t,i>>>24&255,i>>>16&255,i>>>8&255,255&i,85,196,0,0]))}static hdlr(e){let t=null;return t=el.constants.HDLR_VIDEO,el.box(el.types.hdlr,t)}static minf(e){let t=null;return t=el.box(el.types.vmhd,el.constants.VMHD),el.box(el.types.minf,t,el.dinf(),el.stbl(e))}static dinf(){return el.box(el.types.dinf,el.box(el.types.dref,el.constants.DREF))}static stbl(e){let t=e.samples,i=[{No:1,num:0,sampleDelte:1,chunkNo:1,duration:t[0].duration}],s=[t[0].duration],r=t.length;for(let e=0;e<r;e++)for(let r=0;r<i.length;r++)t[e].duration===i[r].duration?i[r].num++:s.indexOf(t[e].duration)<0&&(s.push(t[e].duration),i.push({No:2,num:0,sampleDelte:1,chunkNo:e+1,duration:t[e].duration}));return el.box(el.types.stbl,el.stsd(e),el.stts(i),el.stss(t),el.stsc(i),el.stsz(t),el.stco(i,t))}static stts(e){let t=e.length,i=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]),s=i.byteLength,r=new Uint8Array(s+8*t);r.set(i,0);for(let i=0;i<t;i++)r.set(new Uint8Array([e[i].num>>>24&255,e[i].num>>>16&255,e[i].num>>>8&255,255&e[i].num,e[i].sampleDelte>>>24&255,e[i].sampleDelte>>>16&255,e[i].sampleDelte>>>8&255,255&e[i].sampleDelte]),s),s+=8;return el.box(el.types.stts,r)}static stss(e){let t=[],i=e.length;for(let s=0;s<i;s++)!0===e[s].isKeyframe&&t.push(s+1);let s=t.length,r=new Uint8Array([0,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s]),a=r.byteLength,o=new Uint8Array(a+4*s);o.set(r,0);for(let e=0;e<s;e++)o.set(new Uint8Array([t[e]>>>24&255,t[e]>>>16&255,t[e]>>>8&255,255&t[e]]),a),a+=4;return el.box(el.types.stss,o)}static stsc(e){let t=e.length,i=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]),s=i.byteLength,r=new Uint8Array(s+12*t);r.set(i,0);for(let i=0;i<t;i++){let t=e[i].chunkNo,a=e[i].num,o=e[i].sampleDelte;r.set(new Uint8Array([t>>>24&255,t>>>16&255,t>>>8&255,255&t,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o]),s),s+=12}return el.box(el.types.stsc,r)}static stsz(e){let t=e.length,i=new Uint8Array([0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]),s=i.byteLength,r=new Uint8Array(s+4*t);r.set(i,0);for(let i=0;i<t;i++){let t=e[i].data.byteLength;r.set(new Uint8Array([t>>>24&255,t>>>16&255,t>>>8&255,255&t]),s),s+=4}return el.box(el.types.stsz,r)}static stco(e,t){let i=t[0].chunkOffset;return el.box(el.types.stco,new Uint8Array([0,0,0,0,0,0,0,1,i>>>24&255,i>>>16&255,i>>>8&255,255&i]))}static stsd(e){return"audio"===e.type?"mp3"===e.codec?el.box(el.types.stsd,el.constants.STSD_PREFIX,el.mp3(e)):el.box(el.types.stsd,el.constants.STSD_PREFIX,el.mp4a(e)):"avc"===e.videoType?el.box(el.types.stsd,el.constants.STSD_PREFIX,el.avc1(e)):el.box(el.types.stsd,el.constants.STSD_PREFIX,el.hvc1(e))}static mp3(e){let t=e.channelCount,i=e.sampleRate,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return el.box(el.types[".mp3"],s)}static mp4a(e){let t=e.channelCount,i=e.sampleRate,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return el.box(el.types.mp4a,s,el.esds(e))}static esds(e){let t=e.config||[],i=t.length,s=new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(t).concat([6,1,2]));return el.box(el.types.esds,s)}static avc1(e){let t=e.avcc,i=e.codecWidth,s=e.codecHeight,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,s>>>8&255,255&s,0,72,0,0,0,72,0,0,0,0,0,0,0,1,13,106,101,115,115,105,98,117,99,97,45,112,114,111,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return el.box(el.types.avc1,r,el.box(el.types.avcC,t))}static hvc1(e){let t=e.avcc;const i=e.codecWidth,s=e.codecHeight;let r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,s>>>8&255,255&s,0,72,0,0,0,72,0,0,0,0,0,0,0,1,13,106,101,115,115,105,98,117,99,97,45,112,114,111,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return el.box(el.types.hvc1,r,el.box(el.types.hvcC,t))}static mvex(e){return el.box(el.types.mvex,el.trex(e))}static trex(e){let t=e.id,i=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return el.box(el.types.trex,i)}static moof(e,t){return el.box(el.types.moof,el.mfhd(e.sequenceNumber),el.traf(e,t))}static mfhd(e){let t=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return el.box(el.types.mfhd,t)}static traf(e,t){let i=e.id,s=el.box(el.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),r=el.box(el.types.tfdt,new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),a=el.sdtp(e),o=el.trun(e,a.byteLength+16+16+8+16+8+8);return el.box(el.types.traf,s,r,o,a)}static sdtp(e){let t=e.samples||[],i=t.length,s=new Uint8Array(4+i);for(let e=0;e<i;e++){let i=t[e].flags;s[e+4]=i.isLeading<<6|i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy}return el.box(el.types.sdtp,s)}static trun(e,t){let i=e.samples||[],s=i.length,r=12+16*s,a=new Uint8Array(r);t+=8+r,a.set([0,0,15,1,s>>>24&255,s>>>16&255,s>>>8&255,255&s,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0);for(let e=0;e<s;e++){let t=i[e].duration,s=i[e].size,r=i[e].flags,o=i[e].cts;a.set([t>>>24&255,t>>>16&255,t>>>8&255,255&t,s>>>24&255,s>>>16&255,s>>>8&255,255&s,r.isLeading<<2|r.dependsOn,r.isDependedOn<<6|r.hasRedundancy<<4|r.isNonSync,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o],12+16*e)}return el.box(el.types.trun,a)}static mdat(e){return el.box(el.types.mdat,e)}}el.init();class tl extends Xn{constructor(e){super(e),this.TAG_NAME="recorderMP4",this._reset(),e.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this._reset(),this.player.debug.log(this.TAG_NAME,"destroy")}_reset(){super._reset(),this.totalDuration=0,this.totalAudioDuration=0,this.totalByteLength=0,this.totalAudioByteLength=0,this.bufferList=[],this.audioBufferList=[],this.cacheTrack={},this.audioCacheTrack={},this.sequenceNumber=0,this.audioSequenceNumber=0}startRecord(){const e=this.player.debug;this._isRecording=!0,this.player.emit(lt.recording,!0),e.log(this.TAG_NAME,"start recording"),this.player.emit(lt.recordStart),this.startRecordingInterval()}startRecordingInterval(){this.stopRecordingInterval(),this.recordingInterval=window.setInterval((()=>{this.player.emit(lt.recordingTimestamp,this.getTotalDuration())}),1e3)}formatFmp4Track(e,t,i,s){return{id:1,sequenceNumber:++this.sequenceNumber,size:e.byteLength,dts:i,cts:s,isKeyframe:t,data:e,duration:0,flags:{isLeading:0,dependsOn:t?2:1,isDependedOn:t?1:0,hasRedundancy:0,isNonSync:t?0:1}}}formatAudioFmp4Track(e,t){return{id:2,sequenceNumber:++this.audioSequenceNumber,size:e.byteLength,dts:t,pts:t,cts:0,data:new Uint8Array(e),duration:0,originalDts:t,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}}handleAddNaluTrack(e,t,i,s){this.cacheTrack.id&&i>=this.cacheTrack.dts?(this.cacheTrack.duration=i-this.cacheTrack.dts,this.handleAddFmp4Track(this.cacheTrack)):this.cacheTrack={},this.cacheTrack=this.formatFmp4Track(e,t,i,s)}handleAddAudioTrack(e,t){}handleAddFmp4Track(e){if(!this.isRecording)return void this.player.debug.error(this.TAG_NAME,"handleAddFmp4Track, isRecording is false ");if((null===this.sps||null===this.pps)&&this.isH264)return void this.player.debug.error(this.TAG_NAME,"handleAddFmp4Track, is h264 and this.sps or this.pps is null ");if((null===this.sps||null===this.pps||null===this.vps)&&this.isH265)return void this.player.debug.error(this.TAG_NAME,"handleAddFmp4Track, is h265 and this.sps or this.pps or this.vps is null ");const t=Object.assign({},e);t.pts=t.dts+t.cts;const i=t.data;if(t.isKeyframe)if(this.isH264){const e=new Uint8Array(this.sps.byteLength+this.pps.byteLength);e.set(this.sps,0),e.set(this.pps,this.sps.byteLength);const s=new Uint8Array(e.byteLength+i.byteLength);s.set(e,0),s.set(i,e.byteLength),t.data=s}else if(this.isH265){const e=new Uint8Array(this.sps.byteLength+this.pps.byteLength+this.vps.byteLength);e.set(this.vps,0),e.set(this.sps,this.vps.byteLength),e.set(this.pps,this.vps.byteLength+this.sps.byteLength);const s=new Uint8Array(e.byteLength+i.byteLength);s.set(e,0),s.set(i,e.byteLength),t.data=s}t.size=t.data.byteLength,this.totalDuration+=t.duration,this.totalByteLength+=t.data.byteLength,t.duration=0,t.originalDts=t.dts,delete t.id,delete t.sequenceNumber,this.bufferList.push(t)}handleAddFmp4AudioTrack(e){const t=Object.assign({},e);t.pts=t.dts+t.cts,t.size=t.data.byteLength,this.totalAudioDuration+=t.duration,this.totalAudioByteLength+=t.data.byteLength,t.duration=0,t.originalDts=t.dts,delete t.id,delete t.sequenceNumber,this.audioBufferList.push(t)}getTotalDuration(){return this.totalDuration/1e3}getType(){return S}getToTalByteLength(){return this.totalByteLength+this.totalAudioByteLength}stopRecordAndSave(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:At,t=arguments.length>1?arguments[1]:void 0;return new Promise(((i,s)=>{if(!this.isRecording)return this.player.debug.error(this.TAG_NAME,"stop recording fail, isRecording is false "),s("stop recording fail, isRecording is false ");if(0===this.bufferList.length)return this.player.debug.error(this.TAG_NAME,"stop recording fail, this.bufferList.length is 0 "),s("stop recording fail, this.bufferList.length is 0 ");t&&this.setFileName(t);const r={id:1,type:"video",sps:this.sps,pps:this.pps,samples:this.bufferList,sequenceNumber:this.bufferList.length,length:0,addSampleNum:1,duration:0,...this.metaInfo},a={id:2,type:"audio",sequenceNumber:this.audioBufferList.length,samples:this.audioBufferList,...this.audioMetaInfo},o=[r];a.samples.length>0&&o.push(a),this.player.debug.log(this.TAG_NAME,`trackList length is ${o.length}`);const n=el.generateInitSegment({timescale:1e3,duration:this.totalDuration},o,this.totalByteLength+this.totalAudioByteLength);this.player.debug.log(this.TAG_NAME,"stop recording");const l=new Blob([n],{type:"application/octet-stream"});if(e===bt)i(l),this.player.emit(lt.recordBlob,l);else{i();Ma((this.fileName||ha())+"."+S,l)}this._reset(),this.player.emit(lt.recording,!1)}))}}class il extends Xn{constructor(e){super(e),this.TAG_NAME="FlvRecorderLoader",this.player=e,this._init(),this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this._init(),this.player.debug.log(this.TAG_NAME,"destroy")}_init(){this.hasAudio=!1,this.hasVideo=!1,this.startTime=null,this.currentTime=0,this.prevTimestamp=0,this.totalByteLength=0,this.totalDuration=0,this.flvMetaData=null,this.aacSequenceHeader=null,this.videoSequenceHeader=null,this.bufferList=[]}_reset(){super._reset(),this._init()}startRecord(){const e=this.player.debug;this._isRecording=!0,this.player.emit(lt.recording,!0),e.log(this.TAG_NAME,"start recording"),this.player.emit(lt.recordStart),this.startRecordingInterval()}startRecordingInterval(){this.stopRecordingInterval(),this.recordingInterval=window.setInterval((()=>{this.player.emit(lt.recordingTimestamp,this.getTotalDuration())}),1e3)}addMetaData(e){this.flvMetaData=e}addAACSequenceHeader(e){this.aacSequenceHeader=e}addVideoSequenceHeader(e){this.videoSequenceHeader=e}addVideo(e,t){this._setStartTime(t);const i=this._getBufferTs(t);this.hasVideo=!0,this._createBufferItem(e,$e,i)}addAudio(e,t){this._setStartTime(t);const i=this._getBufferTs(t);this.hasAudio=!0,this._createBufferItem(e,ze,i)}_setStartTime(e){null===this.startTime&&this._isRecording&&(this.startTime=e,this.player.debug.log(this.TAG_NAME,`_setStartTime is ${e}`))}_getBufferTs(e){e>this.currentTime&&(this.currentTime=e);let t=0;return this.startTime&&e>=this.startTime&&(t=e-this.startTime),t>this.prevTimestamp?this.prevTimestamp=t:t=this.prevTimestamp,t}_createBufferItem(e,t,i){const s=this._createFlvPacket(e,t,i),r=this._createFlvTag(s);this.totalByteLength+=r.byteLength,this.bufferList.push(r)}_createFlvTag(e){let t=11+e.header.length,i=new Uint8Array(t+4);i[0]=e.header.type;let s=new DataView(i.buffer);return i[1]=e.header.length>>16&255,i[2]=e.header.length>>8&255,i[3]=255&e.header.length,i[4]=e.header.timestamp>>16&255,i[5]=e.header.timestamp>>8&255,i[6]=255&e.header.timestamp,i[7]=e.header.timestamp>>24&255,i[8]=0,i[9]=0,i[10]=0,s.setUint32(t,t),i.set(e.payload.subarray(0,e.header.length),11),i}_createFlvPacket(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{header:{length:e?e.length:0,timestamp:i,type:t},payload:e}}stopRecordAndSave(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:At,t=arguments.length>1?arguments[1]:void 0;return new Promise(((i,s)=>{if(!this.isRecording)return this.player.debug.error(this.TAG_NAME,"stop recording fail, isRecording is false "),s("stop recording fail, isRecording is false ");if(0===this.bufferList.length)return this.player.debug.error(this.TAG_NAME,"stop recording fail, this.bufferList.length is 0 "),s("stop recording fail, this.bufferList.length is 0 ");t&&this.setFileName(t);const r=new Uint8Array([70,76,86,1,0,0,0,0,9,0,0,0,0]);this.hasVideo&&(r[4]|=1),this.hasAudio&&(r[4]|=4);let a=[r];if(this.flvMetaData){const e=this._createFlvPacket(this.flvMetaData,He),t=this._createFlvTag(e);a.push(t)}if(this.videoSequenceHeader){const e=this._createFlvPacket(this.videoSequenceHeader,$e),t=this._createFlvTag(e);a.push(t)}if(this.aacSequenceHeader){const e=this._createFlvPacket(this.aacSequenceHeader,ze),t=this._createFlvTag(e);a.push(t)}const o=function(e){const t=e[0].constructor;return e.reduce(((e,i)=>{const s=new t((0|e.byteLength)+(0|i.byteLength));return s.set(e,0),s.set(i,0|e.byteLength),s}),new t)}(a.concat(this.bufferList));this.player.debug.log(this.TAG_NAME,"stop recording");const n=new Blob([o],{type:"application/octet-stream"});if(e===bt)i(n),this.player.emit(lt.recordBlob,n);else{i();Ma((this.fileName||ha())+"."+E,n)}this._reset(),this.player.emit(lt.recording,!1)}))}getTotalDuration(){let e=0;return null!==this.startTime&&null!==this.currentTime&&(e=this.currentTime-this.startTime),Math.round(e/1e3)}getType(){return E}getToTalByteLength(){return this.totalByteLength}}const sl={init:0,findFirstStartCode:1,findSecondStartCode:2};class rl extends a{constructor(e){super(),this.player=e,this.isDestroyed=!1,this.reset()}destroy(){this.isDestroyed=!1,this.off(),this.reset()}reset(){this.stats=sl.init,this.tempBuffer=new Uint8Array(0),this.parsedOffset=0,this.versionLayer=0}dispatch(e,t){let i=new Uint8Array(this.tempBuffer.length+e.length);for(i.set(this.tempBuffer,0),i.set(e,this.tempBuffer.length),this.tempBuffer=i;!this.isDestroyed;){if(this.state==sl.Init){let e=!1;for(;this.tempBuffer.length-this.parsedOffset>=2&&!this.isDestroyed;)if(255==this.tempBuffer[this.parsedOffset]){if(!(!1&this.tempBuffer[this.parsedOffset+1])){this.versionLayer=this.tempBuffer[this.parsedOffset+1],this.state=sl.findFirstStartCode,this.fisrtStartCodeOffset=this.parsedOffset,this.parsedOffset+=2,e=!0;break}this.parsedOffset++}else this.parsedOffset++;if(e)continue;break}if(this.state==sl.findFirstStartCode){let e=!1;for(;this.tempBuffer.length-this.parsedOffset>=2&&!this.isDestroyed;)if(255==this.tempBuffer[this.parsedOffset]){if(this.tempBuffer[this.parsedOffset+1]==this.versionLayer){this.state=sl.findSecondStartCode,this.secondStartCodeOffset=this.parsedOffset,this.parsedOffset+=2,e=!0;break}this.parsedOffset++}else this.parsedOffset++;if(e)continue;break}if(this.state==sl.findSecondStartCode){let e=this.tempBuffer.slice(this.fisrtStartCodeOffset,this.secondStartCodeOffset);this.emit("data",e,t),this.tempBuffer=this.tempBuffer.slice(this.secondStartCodeOffset),this.fisrtStartCodeOffset=0,this.parsedOffset=2,this.state=sl.findFirstStartCode}}}}class al extends Xn{constructor(e){super(e),this.TAG_NAME="recorderWasmMP4",this._reset(),this.wasmMp4Recorder=new window.JessibucaProMp4Recorder({debug:e._opt.debug,debugLevel:e._opt.debugLevel,debugUuid:e._opt.debugUuid,decoder:e._opt.wasmMp4RecorderDecoder}),this.wasmMp4Recorder.on("recordingTimestamp",(e=>{this._recordingTimestamp=e/1e3})),this.mp3Demuxer=null,e.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.mp3Demuxer&&(this.mp3Demuxer.destroy(),this.mp3Demuxer=null),this._reset(),this.player.debug.log(this.TAG_NAME,"destroy")}_reset(){super._reset(),this.cacheTrack={},this.audioCacheTrack={},this.totalDuration=0,this.totalAudioDuration=0,this.totalByteLength=0,this.totalAudioByteLength=0,this.hasAudio=!1,this.hasVideo=!1}getType(){return S}isWasmMp4(){return!0}getTotalDuration(){return this.totalDuration/1e3}getToTalByteLength(){return this.totalByteLength+this.totalAudioByteLength}startRecord(){const e=this.player.debug,t=this.player.getAudioInfo(),i=this.player.getVideoInfo(),s={};if(this.codecId){const e={type:this.codecId,width:i.width,height:i.height,extraData:this.metaInfo.avcc};s.video=e,this.hasVideo=!0}if(t.encTypeCode){const e={type:t.encTypeCode,sampleRate:t.sampleRate,channels:t.channels,extraData:this.audioMetaInfo.extraData,depth:t.depth};this.audioCodeId=t.encTypeCode,s.audio=e,this.hasAudio=!0}this.wasmMp4Recorder.startRecord(s).then((()=>{this._isRecording=!0,this.player.emit(lt.recording,!0),e.log(this.TAG_NAME,"start recording"),this.player.emit(lt.recordStart),this.startRecordingInterval()})).catch((t=>{e.error(this.TAG_NAME,"startRecord error",t),this.player.emitError(lt.recordCreateError,t)}))}startRecordingInterval(){this.stopRecordingInterval(),this.recordingInterval=window.setInterval((()=>{this.player.emit(lt.recordingTimestamp,this.recordTime)}),1e3)}stopRecordAndSave(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:At,t=arguments.length>1?arguments[1]:void 0;return new Promise(((i,s)=>this.isRecording?0===this.totalDuration?(this.player.debug.error(this.TAG_NAME,"stop recording fail, totalDuration is 0 "),s("stop recording fail, totalDuration is 0 ")):(t&&this.setFileName(t),void this.wasmMp4Recorder.stopRecord().then((t=>{if(e===bt)i(t),this.player.emit(lt.recordBlob,t);else{i();Ma((this.fileName||ha())+"."+S,t)}})).catch((e=>{this.player.debug.error(this.TAG_NAME,"stopRecord error",e),s(e)})).finally((()=>{this._reset(),this.player.emit(lt.recording,!1)}))):(this.player.debug.error(this.TAG_NAME,"stop recording fail, isRecording is false "),s("stop recording fail, isRecording is false "))))}handleAddAudioTrack(e,t){this.audioCodeId===kt?(this.mp3Demuxer||(this.mp3Demuxer=new rl(this.player),this.mp3Demuxer.on("data",((e,t)=>{this._handleAddAudioTrack(e,t)}))),this.mp3Demuxer.dispatch(e,t)):this._handleAddAudioTrack(e,t)}_handleAddAudioTrack(e,t){Ao(this.hasAudio)||(this.audioCacheTrack.id&&t>=this.audioCacheTrack.dts?(this.audioCacheTrack.duration=t-this.audioCacheTrack.dts,this.totalAudioDuration+=this.audioCacheTrack.duration,this.totalAudioByteLength+=this.audioCacheTrack.payload.byteLength,this.wasmMp4Recorder.sendAudioFrame(this.audioCacheTrack.payload,this.audioCacheTrack.dts)):this.audioCacheTrack={},this.audioCacheTrack={id:2,payload:e,dts:t})}handleAddNaluTrack(e,t,i,s){Ao(this.hasVideo)||(this.cacheTrack.id&&i>=this.cacheTrack.dts?(this.cacheTrack.duration=i-this.cacheTrack.dts,this.totalDuration+=this.cacheTrack.duration,this.totalByteLength+=this.cacheTrack.payload.byteLength,this.wasmMp4Recorder.sendVideoFrame(this.cacheTrack.payload,this.cacheTrack.isIFrame,this.cacheTrack.dts,this.cacheTrack.cts)):this.cacheTrack={},this.cacheTrack={id:1,payload:e,isIFrame:t,dts:i,cts:s})}}class ol{constructor(e){return new(ol.getLoaderFactory(e._opt))(e)}static getLoaderFactory(e){if(e.recordType===S){if(e.useWasm||e.useMSE||e.useWCS)return window.JessibucaProMp4Recorder&&e.mp4RecordUseWasm?al:tl}else if(e.recordType===E)return il;return Zn}}function nl(e,t,i){let s=e;if(t+i<s.length){for(;i--;)if(128!=(192&s[++t]))return!1;return!0}return!1}function ll(e){let t=[],i=e,s=0,r=e.length;for(;s<r;)if(i[s]<128)t.push(String.fromCharCode(i[s])),++s;else{if(i[s]<192);else if(i[s]<224){if(nl(i,s,1)){let e=(31&i[s])<<6|63&i[s+1];if(e>=128){t.push(String.fromCharCode(65535&e)),s+=2;continue}}}else if(i[s]<240){if(nl(i,s,2)){let e=(15&i[s])<<12|(63&i[s+1])<<6|63&i[s+2];if(e>=2048&&55296!=(63488&e)){t.push(String.fromCharCode(65535&e)),s+=3;continue}}}else if(i[s]<248&&nl(i,s,3)){let e=(7&i[s])<<18|(63&i[s+1])<<12|(63&i[s+2])<<6|63&i[s+3];if(e>65536&&e<1114112){e-=65536,t.push(String.fromCharCode(e>>>10|55296)),t.push(String.fromCharCode(1023&e|56320)),s+=4;continue}}t.push(String.fromCharCode(65533)),++s}return t.join("")}let dl=function(){let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}();class hl{static parseScriptData(e,t,i){let s={};try{let r=hl.parseValue(e,t,i),a=hl.parseValue(e,t+r.size,i-r.size);s[r.data]=a.data}catch(e){console.error("AMF",e.toString())}return s}static parseObject(e,t,i){let s=hl.parseString(e,t,i),r=hl.parseValue(e,t+s.size,i-s.size),a=r.objectEnd;return{data:{name:s.data,value:r.data},size:s.size+r.size,objectEnd:a}}static parseVariable(e,t,i){return hl.parseObject(e,t,i)}static parseString(e,t,i){let s,r=new DataView(e,t,i).getUint16(0,!dl);return s=r>0?ll(new Uint8Array(e,t+2,r)):"",{data:s,size:2+r}}static parseLongString(e,t,i){let s,r=new DataView(e,t,i).getUint32(0,!dl);return s=r>0?ll(new Uint8Array(e,t+4,r)):"",{data:s,size:4+r}}static parseDate(e,t,i){let s=new DataView(e,t,i),r=s.getFloat64(0,!dl);return r+=60*s.getInt16(8,!dl)*1e3,{data:new Date(r),size:10}}static parseValue(e,t,i){let s,r=new DataView(e,t,i),a=1,o=r.getUint8(0),n=!1;try{switch(o){case 0:s=r.getFloat64(1,!dl),a+=8;break;case 1:s=!!r.getUint8(1),a+=1;break;case 2:{let r=hl.parseString(e,t+1,i-1);s=r.data,a+=r.size;break}case 3:{s={};let o=0;for(9==(16777215&r.getUint32(i-4,!dl))&&(o=3);a<i-4;){let r=hl.parseObject(e,t+a,i-a-o);if(r.objectEnd)break;s[r.data.name]=r.data.value,a+=r.size}if(a<=i-3){9===(16777215&r.getUint32(a-1,!dl))&&(a+=3)}break}case 8:{s={},a+=4;let o=0;for(9==(16777215&r.getUint32(i-4,!dl))&&(o=3);a<i-8;){let r=hl.parseVariable(e,t+a,i-a-o);if(r.objectEnd)break;s[r.data.name]=r.data.value,a+=r.size}if(a<=i-3){9===(16777215&r.getUint32(a-1,!dl))&&(a+=3)}break}case 9:s=void 0,a=1,n=!0;break;case 10:{s=[];let o=r.getUint32(1,!dl);a+=4;for(let r=0;r<o;r++){let r=hl.parseValue(e,t+a,i-a);s.push(r.data),a+=r.size}break}case 11:{let r=hl.parseDate(e,t+1,i-1);s=r.data,a+=r.size;break}case 12:{let r=hl.parseString(e,t+1,i-1);s=r.data,a+=r.size;break}default:a=i,console.warn("AMF","Unsupported AMF value type "+o)}}catch(e){console.error("AMF",e.toString())}return{data:s,size:a,objectEnd:n}}}function cl(e){return hl.parseScriptData(e.buffer,e.byteOffset,e.byteLength)}class ul{constructor(e){this.player=e,this.destroyResolve=null,this.workerClearTimeout=null,this.workerUrl=null;let t=e._opt.decoder;if(this.decoderWorkerCloseTimeout=null,Ao(this.player._opt.useWasm)&&(t=this.player._opt.demuxUseWorker?this.player._opt.mseDecodeAudio||Ao(this.player._opt.hasAudio)?e._opt.decoderHardNotWasm:e._opt.decoderHard:e._opt.decoderAudio),0===t.indexOf("http")&&this.player._opt.isDecoderUseCDN){const e=new Blob([`importScripts("${t}")`],{type:"application/javascript"});t=window.URL.createObjectURL(e),this.workerUrl=t,this.workerClearTimeout=setTimeout((()=>{window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null,this.workerClearTimeout=null}),ie)}this.decoderWorker=new Worker(t),this._initDecoderWorker(),e.debug.log("decoderWorker",`init and decoder url is ${t}`),e.on(lt.visibilityChange,(()=>{this.updateWorkConfig({key:"visibility",value:e.visibility})}))}destroy(){return new Promise(((e,t)=>{if(this.player.loaded)if(this.player.debug.log("decoderWorker","has loaded and post message to destroy"),this.decoderWorker){const t={};this.player.isMseDecoderUseWorker()&&(t.isVideoInited=this.player.isMseVideoStateInited()),this.decoderWorker.postMessage({cmd:Ke,options:t}),this.destroyResolve=e,this.decoderWorkerCloseTimeout=setTimeout((()=>{this.player.debug.warn("decoderWorker","send close but not response and destroy directly"),this.decoderWorkerCloseTimeout&&(clearTimeout(this.decoderWorkerCloseTimeout),this.decoderWorkerCloseTimeout=null),this._destroy(),setTimeout((()=>{e()}),0)}),2e3)}else this.player.debug.warn("decoderWorker","has loaded but decoderWorker is null and destroy directly"),this._destroy(),setTimeout((()=>{e()}),0);else this.player.debug.log("decoderWorker","has not loaded and destroy directly"),this._destroy(),setTimeout((()=>{e()}),0)}))}_destroy(){this.decoderWorkerCloseTimeout&&(clearTimeout(this.decoderWorkerCloseTimeout),this.decoderWorkerCloseTimeout=null),this.workerUrl&&(window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null),this.workerClearTimeout&&(clearTimeout(this.workerClearTimeout),this.workerClearTimeout=null),this.decoderWorker&&(this.decoderWorker.terminate(),this.decoderWorker.onerror=null,this.decoderWorker.onmessageerror=null,this.decoderWorker.onmessage=null,this.decoderWorker=null),this.player.debug.log("decoderWorker","destroy"),this.destroyResolve&&(this.destroyResolve(),this.destroyResolve=null)}_initDecoderWorker(){const{debug:e,events:{proxy:t}}=this.player;this.decoderWorker.onerror=e=>{this.player.debug.error("decoderWorker","onerror",e),this.player.emitError(ut.decoderWorkerInitError,e)},this.decoderWorker.onmessageerror=e=>{this.player.debug.error("decoderWorker","onmessageerror",e)},this.decoderWorker.onmessage=t=>{const i=t.data;switch(i.cmd){case ae:e.log("decoderWorker","onmessage:",ae),this.decoderWorker&&this._initWork(),this.player.loaded||this.player.emit(lt.load),this.player.emit(lt.decoderWorkerInit);break;case pe:e.log("decoderWorker","onmessage:",pe,i.code),this.player._times.decodeStart||(this.player._times.decodeStart=ha()),this.player.video.updateVideoInfo({encTypeCode:i.code});break;case fe:e.log("decoderWorker","onmessage:",fe,i.codecId),this.player.recorder&&this.player.recorder.initMetaData(i.buffer,i.codecId),this.player.video.updateVideoInfo({encTypeCode:i.codecId});break;case he:e.log("decoderWorker","onmessage:",he,i.code),this.player.audio&&this.player.audio.updateAudioInfo({encTypeCode:i.code});break;case ue:e.log("decoderWorker","onmessage:",ue),this.player.recorder&&this.player.recorder.initAudioAacExtraData(i.buffer);break;case oe:if(e.log("decoderWorker","onmessage:",oe,`width:${i.w},height:${i.h}`),Ua(i.w)||Ua(i.h))return void this.player.emitError(ut.videoInfoError,`video width ${i.w} or height ${i.h} is empty`);if(this.player.video.updateVideoInfo({width:i.w,height:i.h}),!this.player._opt.openWebglAlignment&&i.w/2%4!=0&&this.player.getRenderType()===W)return void this.player.emitError(ut.webglAlignmentError);this.player.video.initCanvasViewSize(),this.player._opt.playType===w&&(this.player.video.initFps(),this.player.video.initVideoDelay());break;case de:if(e.log("decoderWorker","onmessage:",de,`channels:${i.channels},sampleRate:${i.sampleRate}`),i.channels>2)return void this.player.emitError(ut.audioChannelError,`audio channel is ${i.channels}, max is 2`);this.player.audio&&(this.player.audio.updateAudioInfo(i),this.player._opt.playType===_?this.player.audio.initScriptNode():this.player._opt.playType===w&&this.player.audio.initScriptNodeDelay());break;case ne:if(!this.player.video)return void e.warn("decoderWorker","onmessage render but video is null");if(this.player.isPlayer()){if(Ao(this.player.video.getHasInit()))return void e.warn("decoderWorker","onmessage render but video has not init");this.player.video.render(i),this.player.handleRender(),this.player.emit(lt.timeUpdate,i.ts),this.player.updateStats({dfps:!0,buf:i.delay}),this.player._times.videoStart||(this.player._times.videoStart=ha(),this.player.handlePlayToRenderTimes())}else this.player.isPlayback()&&(this.player.updateStats({dfps:!0}),Ao(this.player.playbackPause)?(this.player.playback.isUseLocalCalculateTime&&this.player.playback.increaseLocalTimestamp(),this.player.playback.isUseFpsRender?this.player.video.pushData(i):this.player.video.render$2(i)):!this.player.playback.isPlaybackPauseClearCache&&this.player.playback.isCacheBeforeDecodeForFpsRender&&this.player.playback.isUseFpsRender&&this.player.video.pushData(i));break;case me:this.player.recorder&&this.player.recorder.isRecording&&this.player._opt.recordType===S&&this.player.recorder.handleAddNaluTrack(i.buffer,i.isIFrame,i.ts,i.cts);break;case ce:this.player.recorder&&this.player.recorder.isRecording&&this.player._opt.recordType===S&&this.player.recorder.isWasmMp4()&&this.player.recorder.handleAddAudioTrack(i.buffer,i.ts);break;case ge:const{webcodecsDecoder:t,mseDecoder:s}=this.player;this.player.updateStats({buf:i.delay});const r=new Uint8Array(i.payload);this.player._opt.useWCS&&!this.player._opt.useOffscreen?t.decodeVideo(r,i.ts,i.isIFrame,i.cts):this.player._opt.useMSE&&s.decodeVideo(r,i.ts,i.isIFrame,i.cts);break;case ye:if(this.player._opt.useMSE){const e=new Uint8Array(i.payload);this.player.mseDecoder.decodeAudio(e,i.ts,i.cts)}break;case le:if(!this.player.audio)return void e.warn("decoderWorker","onmessage playAudio but audio is null");(this.player.playing&&this.player.audio||!this.player.video)&&(this.player._opt.hasVideo||this.player.handleRender(),(this.player._opt.playType===_||this.player._opt.playType===w&&(Ao(this.player.playbackPause)||!this.player.playback.isPlaybackPauseClearCache&&this.player.playback.isCacheBeforeDecodeForFpsRender&&this.player.playback.isUseFpsRender))&&this.player.audio.play(i.buffer,i.ts));break;case be:if(i.type===lt.streamSuccess)this.player.stream?this.player.stream.emit(lt.streamSuccess):e.warn("decoderWorker","onmessage and workerFetch response stream success but stream is null");else if(i.type===lt.streamRate)this.player.emit(lt.kBps,(i.value/1024).toFixed(2));else if(i.type===lt.streamEnd)this.player?(i.value===m&&this.player.emit(lt.websocketClose,i.msg),this.player.stream?this.player.stream.emit(lt.streamEnd,i.msg):e&&e.warn("decoderWorker","onmessage and workerFetch response stream end but player.stream is null")):e&&e.warn("decoderWorker","onmessage and workerFetch response stream end but player is null");else if(i.type===ut.websocketError)this.player&&this.player.stream?this.player.stream.emit(ut.websocketError,i.value):e&&e.warn("decoderWorker","onmessage and workerFetch response websocket error but stream is null");else if(i.type===ut.fetchError)this.player&&this.player.stream?this.player.stream.emit(ut.fetchError,i.value):e&&e.warn("decoderWorker","onmessage and workerFetch response fetch error but stream is null");else if(i.type===lt.streamAbps)this.player.updateStats({abps:i.value});else if(i.type===lt.streamVbps)this.player._times.demuxStart||(this.player._times.demuxStart=ha()),this.player.updateStats({vbps:i.value});else if(i.type===lt.streamDts)this.player.updateStats({dts:i.value});else if(i.type===lt.netBuf)this.player.updateStats({netBuf:i.value});else if(i.type===lt.networkDelayTimeout)this.player.emit(lt.networkDelayTimeout,i.value);else if(i.type===lt.streamStats){const e=JSON.parse(i.value);this.player.updateStats({workerStats:e})}else i.type===lt.websocketOpen&&this.player.emit(lt.websocketOpen);break;case _e:this.player&&(this.player.videoIframeIntervalTs=i.value);break;case ve:this.player&&this.player.updateStats({isDropping:!0});break;case Me:this.player.decoderCheckFirstIFrame();break;case Se:this.player&&this.player.video&&this.player.video.setStreamFps(i.value);break;case Ae:i.message&&-1!==i.message.indexOf(Ne)&&this.player.emitError(ut.wasmDecodeError,"");break;case Te:this.player.emitError(ut.wasmDecodeVideoNoResponseError);break;case Ce:this.player.emitError(ut.simdH264DecodeVideoWidthIsTooLarge);break;case Ee:this.player.emitError(ut.wasmWidthOrHeightChange);break;case ke:this.player.emitError(ut.simdDecodeError);break;case we:e.log("decoderWorker","onmessage:",we);break;case xe:e.log("decoderWorker","onmessage:",xe),this._destroy();break;case Re:this.player&&this.player.pushTempStream(i.buffer);break;case De:this.player&&this.player.emit(lt.videoSEI,{ts:i.ts,data:new Uint8Array(i.buffer)});break;case Le:if(this.player){if(this.player.isRecordTypeFlv()){const e=new Uint8Array(i.buffer);this.player.recorder.addMetaData(e)}const e=cl(new Uint8Array(i.buffer));e&&e.onMetaData&&this.player.updateMetaData(e.onMetaData)}break;case Ie:if(this.player&&this.player.isRecordTypeFlv()){const e=new Uint8Array(i.buffer);this.player.recorder.addAACSequenceHeader(e,i.ts)}break;case Pe:if(this.player&&this.player.isRecordTypeFlv()){const e=new Uint8Array(i.buffer);this.player.recorder.addVideoSequenceHeader(e,i.ts)}break;case Be:if(this.player&&this.player.isRecordTypeFlv()&&this.player.recording){const e=new Uint8Array(i.buffer);i.type===Ge?this.player.recorder.addVideo(e,i.ts):i.type===je&&this.player.recorder.addAudio(e,i.ts)}break;case Ue:this.player&&(this.player.debug.log("decoderWorker","onmessage:",Ue),this.player.video.$videoElement.srcObject=i.mseHandle);break;case Fe:this.player&&(this.player.debug.log("decoderWorker","onmessage:",Fe,i.value),this.player._mseWorkerData.firstRenderTime=Number(i.value));break;case Oe:this.player&&(this.player.debug.log("decoderWorker","onmessage:",Oe,i.value,i.msg),this.player.emitError(i.value,i.msg));break;default:this.player[i.cmd]&&this.player[i.cmd](i)}}}_initWork(){const e={debug:this.player._opt.debug,debugLevel:this.player._opt.debugLevel,debugUuid:this.player._opt.debugUuid,useOffscreen:this.player._opt.useOffscreen,useWCS:this.player._opt.useWCS,useMSE:this.player._opt.useMSE,videoBuffer:this.player._opt.videoBuffer,videoBufferDelay:this.player._opt.videoBufferDelay,openWebglAlignment:this.player._opt.openWebglAlignment,playType:this.player._opt.playType,hasAudio:this.player._opt.hasAudio,hasVideo:this.player._opt.hasVideo,playbackRate:1,playbackForwardMaxRateDecodeIFrame:this.player._opt.playbackForwardMaxRateDecodeIFrame,playbackIsCacheBeforeDecodeForFpsRender:this.player._opt.playbackConfig.isCacheBeforeDecodeForFpsRender,sampleRate:this.player.audio&&this.player.audio.audioContext&&this.player.audio.audioContext.sampleRate||0,audioBufferSize:this.player.audio&&this.player.audio.getAudioBufferSize()||1024,networkDelay:this.player._opt.networkDelay,visibility:this.player.visibility,useSIMD:this.player._opt.useSIMD,recordType:this.player._opt.recordType,checkFirstIFrame:this.player._opt.checkFirstIFrame,isM7sCrypto:this.player._opt.isM7sCrypto,isXorCrypto:this.player._opt.isXorCrypto,isSm4Crypto:this.player._opt.isSm4Crypto,sm4CryptoKey:this.player._opt.sm4CryptoKey,m7sCryptoAudio:this.player._opt.m7sCryptoAudio,isFlv:this.player._opt.isFlv,isFmp4:this.player._opt.isFmp4,isMpeg4:this.player._opt.isMpeg4,isTs:this.player._opt.isTs,isNakedFlow:this.player._opt.isNakedFlow,isHls265:this.player.isUseHls265(),isFmp4Private:this.player._opt.isFmp4Private,isEmitSEI:this.player._opt.isEmitSEI,isRecordTypeFlv:this.player.isRecordTypeFlv(),isWasmMp4:this.player.recorder&&this.player.recorder.isWasmMp4()||!1,isChrome:Xa(),isDropSameTimestampGop:this.player._opt.isDropSameTimestampGop,mseDecodeAudio:this.player._opt.mseDecodeAudio,nakedFlowH265DemuxUseNew:this.player._opt.nakedFlowH265DemuxUseNew,mseDecoderUseWorker:this.player._opt.mseDecoderUseWorker,mseAutoCleanupMinBackwardDuration:this.player._opt.mseAutoCleanupMinBackwardDuration,mseAutoCleanupMaxBackwardDuration:this.player._opt.mseAutoCleanupMaxBackwardDuration,mseCorrectTimeDuration:this.player._opt.mseCorrectTimeDuration,mseCorrectAudioTimeDuration:this.player._opt.mseCorrectAudioTimeDuration};this.decoderWorker.postMessage({cmd:Ve,opt:JSON.stringify(e)}),this.player._opt.isM7sCrypto&&(this.updateWorkConfig({key:"cryptoKey",value:this.player._opt.cryptoKey}),this.updateWorkConfig({key:"cryptoIV",value:this.player._opt.cryptoIV}))}decodeVideo(e,t,i){this.player._opt.playType===_?this.player.isUseHls265()?this._decodeVideoNoDelay(e,t,i):this._decodeVideo(e,t,i):this.player._opt.playType===w&&(this.player.video.rate>=this.player._opt.playbackForwardMaxRateDecodeIFrame?i&&(this.player.debug.log("decoderWorker",`current rate is ${this.player.video.rate},only decode i frame`),this._decodeVideoNoDelay(e,t,i)):1===this.player.video.rate?this._decodeVideo(e,t,i):this._decodeVideoNoDelay(e,t,i))}_decodeVideo(e,t,i){const s={type:Ge,ts:Math.max(t,0),isIFrame:i};this.decoderWorker.postMessage({cmd:We,buffer:e,options:s},[e.buffer])}_decodeVideoNoDelay(e,t,i){this.decoderWorker.postMessage({cmd:qe,buffer:e,ts:Math.max(t,0),isIFrame:i},[e.buffer])}decodeAudio(e,t){this.player._opt.playType===_?this.player._opt.useWCS||this.player._opt.useMSE||this.player.isUseHls265()?this._decodeAudioNoDelay(e,t):this._decodeAudio(e,t):this.player._opt.playType===w&&(1===this.player.video.rate?this._decodeAudio(e,t):this._decodeAudioNoDelay(e,t))}_decodeAudio(e,t){const i={type:je,ts:Math.max(t,0)};this.decoderWorker.postMessage({cmd:We,buffer:e,options:i},[e.buffer])}_decodeAudioNoDelay(e,t){this.decoderWorker.postMessage({cmd:Je,buffer:e,ts:Math.max(t,0)},[e.buffer])}updateWorkConfig(e){this.decoderWorker&&this.decoderWorker.postMessage({cmd:Ye,key:e.key,value:e.value})}workerFetchStream(e){const{_opt:t}=this.player,i={protocol:t.protocol,isFlv:t.isFlv,isFmp4:t.isFmp4,isMpeg4:t.isMpeg4,isNakedFlow:t.isNakedFlow,isTs:t.isTs};this.decoderWorker.postMessage({cmd:Xe,url:e,opt:JSON.stringify(i)})}clearWorkBuffer(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.decoderWorker.postMessage({cmd:Qe,needClear:e})}workerSendMessage(e){this.decoderWorker.postMessage({cmd:Ze,message:e})}updateVideoTimestamp(e){this.decoderWorker.postMessage({cmd:et,message:e})}}var pl,fl="application/json, text/javascript",ml="text/html",gl=/^(?:text|application)\/xml/i,yl=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Al=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,bl=/^\s*$/,_l={},vl={},wl="",Sl={type:"GET",beforeSend:Tl,success:Tl,error:Tl,complete:Tl,context:null,xhr:function(){return new window.XMLHttpRequest},accepts:{json:fl,xml:"application/xml, text/xml",html:ml,text:"text/plain","*":"*/".concat("*")},crossDomain:!1,timeout:0,username:null,password:null,processData:!0,promise:Tl,contentType:"application/x-www-form-urlencoded; charset=UTF-8"};function Tl(){}var El=function(e,t){"object"==typeof e&&(t=e,e=void 0);var i=Pl({},t=t||{});for(var s in Sl)void 0===i[s]&&(i[s]=Sl[s]);try{var r={},a=new Promise((function(e,t){r.resolve=e,r.reject=t}));a.resolve=r.resolve,a.reject=r.reject,i.promise=a}catch(e){i.promise={resolve:Tl,reject:Tl}}var o=Al.exec(window.location.href.toLowerCase())||[];i.url=((e||i.url||window.location.href)+"").replace(/#.*$/,"").replace(/^\/\//,o[1]+"//");var n=i.url;i.crossDomain||(i.crossDomain=/^([\w-]+:)?\/\/([^\/]+)/.test(i.url)&&RegExp.$2!==window.location.href);var l=i.dataType;if("jsonp"===l){if(!/=\?/.test(i.url)){var d=(i.jsonp||"callback")+"=?";i.url=Dl(i.url,d)}return function(e){var t,i=e.jsonpCallback||"jsonp"+Ul(),s=window.document.createElement("script"),r={abort:function(){i in window&&(window[i]=Tl)}},a=window.document.getElementsByTagName("head")[0]||window.document.documentElement;function o(i){window.clearTimeout(t),r.abort(),xl(i.type,r,i.type,e),n()}s.onerror=function(e){o(e)},window[i]=function(i){window.clearTimeout(t),kl(i,r,e),n()},Ll(e),s.src=e.url.replace(/=\?/,"="+i),s.src=Dl(s.src,"_="+(new Date).getTime()),s.async=!0,e.scriptCharset&&(s.charset=e.scriptCharset);a.insertBefore(s,a.firstChild),e.timeout>0&&(t=window.setTimeout((function(){r.abort(),xl("timeout",r,"timeout",e),n()}),e.timeout));function n(){s.clearAttributes?s.clearAttributes():s.onload=s.onreadystatechange=s.onerror=null,s.parentNode&&s.parentNode.removeChild(s),s=null,delete window[i]}return e.promise.abort=function(){r.abort()},e.promise.xhr=r,e.promise}(i)}Ll(i);var h=i.accepts[l]||i.accepts["*"],c={};/^([\w-]+:)\/\//.test(i.url)?RegExp.$1:window.location.protocol;var u,p=Sl.xhr();i.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest"),i.ifModified&&(_l[n]&&(c["If-Modified-Since"]=_l[n]),vl[n]&&(c["If-None-Match"]=vl[n])),h&&(c.Accept=h,h.indexOf(",")>-1&&(h=h.split(",",2)[0]),p.overrideMimeType&&p.overrideMimeType(h));var f=!/^(?:GET|HEAD)$/.test(i.type.toUpperCase());if((i.data&&f&&!1!==i.contentType||t.contentType)&&(c["Content-Type"]=i.contentType),!1===i.cache&&!f){var m=/([?&])_=[^&]*/;i.url=m.test(n)?n.replace(m,"$1_="+Ul()):n+(/\?/.test(n)?"&":"?")+"_="+Ul()}i.headers=Pl(c,i.headers||{}),p.onreadystatechange=function(){if(4===p.readyState){var e;clearTimeout(u);var t=!1;if(p.status>=200&&p.status<300||304===p.status){if(wl=p.getAllResponseHeaders(),i.ifModified){var s=Rl("Last-Modified");s&&(_l[n]=s),(s=Rl("etag"))&&(vl[n]=s)}l=l||function(e){return e&&(e===ml?"html":e===fl?"json":gl.test(e)&&"xml")||"text"}(p.getResponseHeader("content-type")),e=p.responseText;try{"xml"===l?e=p.responseXML:"json"===l&&(e=bl.test(e)?null:JSON.parse(e))}catch(e){t=e}t?xl(t,"parseerror",p,i):kl(e,p,i)}else xl(null,"error",p,i)}};var g=!("async"in i)||i.async;if(p.open(i.type,i.url,g,i.username,i.password),i.xhrFields)for(var y in i.xhrFields)p[y]=i.xhrFields[y];for(var y in i.mimeType&&p.overrideMimeType&&p.overrideMimeType(i.mimeType),i.headers)void 0!==i.headers[y]&&p.setRequestHeader(y,i.headers[y]+"");return!1===function(e,t){var i=t.context;if(!1===t.beforeSend.call(i,e,t))return!1}(p,i)?(p.abort(),!1):(i.timeout>0&&(u=window.setTimeout((function(){p.onreadystatechange=Tl,p.abort(),xl(null,"timeout",p,i)}),i.timeout)),p.send(i.data?i.data:null),i.promise.abort=function(){p.abort()},i.promise)};function kl(e,t,i){var s=i.context,r="success";i.success.call(s,e,r,t),i.promise.resolve(e,r,t),Cl(r,t,i)}function Cl(e,t,i){var s=i.context;i.complete.call(s,t,e)}function xl(e,t,i,s){var r=s.context;s.error.call(r,i,t,e),s.promise.reject(i,t,e),Cl(t,i,s)}function Rl(e){var t;if(!pl){for(pl={};t=yl.exec(wl);)pl[t[1].toLowerCase()]=t[2];t=pl[e.toLowerCase()]}return null===t?null:t}function Dl(e,t){return(e+"&"+t).replace(/[&?]{1,2}/,"?")}function Ll(e){!Bl(e)||e.data instanceof FormData||!e.processData||(e.data=function(e,t){var i=[];return i.add=function(e,t){this.push(encodeURIComponent(e)+"="+encodeURIComponent(t))},Il(i,e,t),i.join("&").replace("%20","+")}(e.data)),!e.data||e.type&&"GET"!==e.type.toUpperCase()||(e.url=Dl(e.url,e.data))}function Il(e,t,i,s){var r=function(e){return"[object Array]"===Object.prototype.toString.call(e)}(t);for(var a in t){var o=t[a];s&&(a=i?s:s+"["+(r?"":a)+"]"),!s&&r?e.add(o.name,o.value):(i?r(o):Bl(o))?Il(e,o,i,a):e.add(a,o)}}function Pl(e){for(var t=Array.prototype.slice,i=t.call(arguments,1),s=0,r=i.length;s<r;s++){var a=i[s]||{};for(var o in a)a.hasOwnProperty(o)&&void 0!==a[o]&&(e[o]=a[o])}return e}function Bl(e){var t=typeof e;return"function"===t||"object"===t&&!!e}function Ml(e){return"function"==typeof e}function Ul(){return(new Date).getTime()}function Fl(e){return parseInt(e)===e}function Ol(e){if(!Fl(e.length))return!1;for(var t=0;t<e.length;t++)if(!Fl(e[t])||e[t]<0||e[t]>255)return!1;return!0}function Nl(e,t){if(e.buffer&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!Ol(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(Fl(e.length)&&Ol(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function jl(e){return new Uint8Array(e)}function Gl(e,t,i,s,r){null==s&&null==r||(e=e.slice?e.slice(s,r):Array.prototype.slice.call(e,s,r)),t.set(e,i)}El.get=function(e,t,i,s){return Ml(t)&&(s=s||i,i=t,t=void 0),El({url:e,data:t,success:i,dataType:s})},El.post=function(e,t,i,s){return Ml(t)&&(s=s||i,i=t,t=void 0),El({type:"POST",url:e,data:t,success:i,dataType:s})},El.getJSON=function(e,t,i){return Ml(t)&&(i=t,t=void 0),El({url:e,data:t,success:i,dataType:"json"})},El.ajaxSetup=function(e,t){return t?Pl(Pl(e,Sl),t):Pl(Sl,e)};var zl={toBytes:function(e){var t=[],i=0;for(e=encodeURI(e);i<e.length;){var s=e.charCodeAt(i++);37===s?(t.push(parseInt(e.substr(i,2),16)),i+=2):t.push(s)}return Nl(t)},fromBytes:function(e){for(var t=[],i=0;i<e.length;){var s=e[i];s<128?(t.push(String.fromCharCode(s)),i++):s>191&&s<224?(t.push(String.fromCharCode((31&s)<<6|63&e[i+1])),i+=2):(t.push(String.fromCharCode((15&s)<<12|(63&e[i+1])<<6|63&e[i+2])),i+=3)}return t.join("")}},$l=function(){var e="0123456789abcdef";return{toBytes:function(e){for(var t=[],i=0;i<e.length;i+=2)t.push(parseInt(e.substr(i,2),16));return t},fromBytes:function(t){for(var i=[],s=0;s<t.length;s++){var r=t[s];i.push(e[(240&r)>>4]+e[15&r])}return i.join("")}}}(),Hl={16:10,24:12,32:14},Vl=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],Wl=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],Jl=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],ql=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],Kl=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],Yl=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],Ql=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],Xl=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],Zl=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],ed=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],td=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],id=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],sd=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],rd=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],ad=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function od(e){for(var t=[],i=0;i<e.length;i+=4)t.push(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]);return t}var nd=function(e){if(!(this instanceof nd))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:Nl(e,!0)}),this._prepare()};nd.prototype._prepare=function(){var e=Hl[this.key.length];if(null==e)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var t=0;t<=e;t++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);var i,s=4*(e+1),r=this.key.length/4,a=od(this.key);for(t=0;t<r;t++)i=t>>2,this._Ke[i][t%4]=a[t],this._Kd[e-i][t%4]=a[t];for(var o,n=0,l=r;l<s;){if(o=a[r-1],a[0]^=Wl[o>>16&255]<<24^Wl[o>>8&255]<<16^Wl[255&o]<<8^Wl[o>>24&255]^Vl[n]<<24,n+=1,8!=r)for(t=1;t<r;t++)a[t]^=a[t-1];else{for(t=1;t<r/2;t++)a[t]^=a[t-1];o=a[r/2-1],a[r/2]^=Wl[255&o]^Wl[o>>8&255]<<8^Wl[o>>16&255]<<16^Wl[o>>24&255]<<24;for(t=r/2+1;t<r;t++)a[t]^=a[t-1]}for(t=0;t<r&&l<s;)d=l>>2,h=l%4,this._Ke[d][h]=a[t],this._Kd[e-d][h]=a[t++],l++}for(var d=1;d<e;d++)for(var h=0;h<4;h++)o=this._Kd[d][h],this._Kd[d][h]=id[o>>24&255]^sd[o>>16&255]^rd[o>>8&255]^ad[255&o]},nd.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,i=[0,0,0,0],s=od(e),r=0;r<4;r++)s[r]^=this._Ke[0][r];for(var a=1;a<t;a++){for(r=0;r<4;r++)i[r]=ql[s[r]>>24&255]^Kl[s[(r+1)%4]>>16&255]^Yl[s[(r+2)%4]>>8&255]^Ql[255&s[(r+3)%4]]^this._Ke[a][r];s=i.slice()}var o,n=jl(16);for(r=0;r<4;r++)o=this._Ke[t][r],n[4*r]=255&(Wl[s[r]>>24&255]^o>>24),n[4*r+1]=255&(Wl[s[(r+1)%4]>>16&255]^o>>16),n[4*r+2]=255&(Wl[s[(r+2)%4]>>8&255]^o>>8),n[4*r+3]=255&(Wl[255&s[(r+3)%4]]^o);return n},nd.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,i=[0,0,0,0],s=od(e),r=0;r<4;r++)s[r]^=this._Kd[0][r];for(var a=1;a<t;a++){for(r=0;r<4;r++)i[r]=Xl[s[r]>>24&255]^Zl[s[(r+3)%4]>>16&255]^ed[s[(r+2)%4]>>8&255]^td[255&s[(r+1)%4]]^this._Kd[a][r];s=i.slice()}var o,n=jl(16);for(r=0;r<4;r++)o=this._Kd[t][r],n[4*r]=255&(Jl[s[r]>>24&255]^o>>24),n[4*r+1]=255&(Jl[s[(r+3)%4]>>16&255]^o>>16),n[4*r+2]=255&(Jl[s[(r+2)%4]>>8&255]^o>>8),n[4*r+3]=255&(Jl[255&s[(r+1)%4]]^o);return n};var ld=function(e){if(!(this instanceof ld))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new nd(e)};ld.prototype.encrypt=function(e){if((e=Nl(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=jl(e.length),i=jl(16),s=0;s<e.length;s+=16)Gl(e,i,0,s,s+16),Gl(i=this._aes.encrypt(i),t,s);return t},ld.prototype.decrypt=function(e){if((e=Nl(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=jl(e.length),i=jl(16),s=0;s<e.length;s+=16)Gl(e,i,0,s,s+16),Gl(i=this._aes.decrypt(i),t,s);return t};var dd=function(e,t){if(!(this instanceof dd))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else t=jl(16);this._lastCipherblock=Nl(t,!0),this._aes=new nd(e)};dd.prototype.encrypt=function(e){if((e=Nl(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=jl(e.length),i=jl(16),s=0;s<e.length;s+=16){Gl(e,i,0,s,s+16);for(var r=0;r<16;r++)i[r]^=this._lastCipherblock[r];this._lastCipherblock=this._aes.encrypt(i),Gl(this._lastCipherblock,t,s)}return t},dd.prototype.decrypt=function(e){if((e=Nl(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=jl(e.length),i=jl(16),s=0;s<e.length;s+=16){Gl(e,i,0,s,s+16),i=this._aes.decrypt(i);for(var r=0;r<16;r++)t[s+r]=i[r]^this._lastCipherblock[r];Gl(e,this._lastCipherblock,0,s,s+16)}return t};var hd=function(e,t,i){if(!(this instanceof hd))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 size)")}else t=jl(16);i||(i=1),this.segmentSize=i,this._shiftRegister=Nl(t,!0),this._aes=new nd(e)};hd.prototype.encrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var t,i=Nl(e,!0),s=0;s<i.length;s+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var r=0;r<this.segmentSize;r++)i[s+r]^=t[r];Gl(this._shiftRegister,this._shiftRegister,0,this.segmentSize),Gl(i,this._shiftRegister,16-this.segmentSize,s,s+this.segmentSize)}return i},hd.prototype.decrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var t,i=Nl(e,!0),s=0;s<i.length;s+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var r=0;r<this.segmentSize;r++)i[s+r]^=t[r];Gl(this._shiftRegister,this._shiftRegister,0,this.segmentSize),Gl(e,this._shiftRegister,16-this.segmentSize,s,s+this.segmentSize)}return i};var cd=function(e,t){if(!(this instanceof cd))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else t=jl(16);this._lastPrecipher=Nl(t,!0),this._lastPrecipherIndex=16,this._aes=new nd(e)};cd.prototype.encrypt=function(e){for(var t=Nl(e,!0),i=0;i<t.length;i++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),t[i]^=this._lastPrecipher[this._lastPrecipherIndex++];return t},cd.prototype.decrypt=cd.prototype.encrypt;var ud=function(e){if(!(this instanceof ud))throw Error("Counter must be instanitated with `new`");0===e||e||(e=1),"number"==typeof e?(this._counter=jl(16),this.setValue(e)):this.setBytes(e)};ud.prototype.setValue=function(e){if("number"!=typeof e||parseInt(e)!=e)throw new Error("invalid counter value (must be an integer)");if(e>Number.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var t=15;t>=0;--t)this._counter[t]=e%256,e=parseInt(e/256)},ud.prototype.setBytes=function(e){if(16!=(e=Nl(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},ud.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var pd=function(e,t){if(!(this instanceof pd))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof ud||(t=new ud(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new nd(e)};pd.prototype.encrypt=function(e){for(var t=Nl(e,!0),i=0;i<t.length;i++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),t[i]^=this._remainingCounter[this._remainingCounterIndex++];return t},pd.prototype.decrypt=pd.prototype.encrypt;const fd={AES:nd,Counter:ud,ModeOfOperation:{ecb:ld,cbc:dd,cfb:hd,ofb:cd,ctr:pd},utils:{hex:$l,utf8:zl},padding:{pkcs7:{pad:function(e){var t=16-(e=Nl(e,!0)).length%16,i=jl(e.length+t);Gl(e,i);for(var s=e.length;s<i.length;s++)i[s]=t;return i},strip:function(e){if((e=Nl(e,!0)).length<16)throw new Error("PKCS#7 invalid length");var t=e[e.length-1];if(t>16)throw new Error("PKCS#7 padding byte out of range");for(var i=e.length-t,s=0;s<t;s++)if(e[i+s]!==t)throw new Error("PKCS#7 invalid padding byte");var r=jl(i);return Gl(e,r,0,0,i),r}}},_arrayTest:{coerceArray:Nl,createArray:jl,copyArray:Gl}};var md=Nr((function(e,t){var i;e.exports=(i=i||function(e,t){var i;if("undefined"!=typeof window&&window.crypto&&(i=window.crypto),"undefined"!=typeof self&&self.crypto&&(i=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(i=globalThis.crypto),!i&&"undefined"!=typeof window&&window.msCrypto&&(i=window.msCrypto),!i&&void 0!==Or&&Or.crypto&&(i=Or.crypto),!i)try{i=r.default}catch(e){}var s=function(){if(i){if("function"==typeof i.getRandomValues)try{return i.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof i.randomBytes)try{return i.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function e(){}return function(t){var i;return e.prototype=t,i=new e,e.prototype=null,i}}(),o={},n=o.lib={},l=n.Base={extend:function(e){var t=a(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},d=n.WordArray=l.extend({init:function(e,i){e=this.words=e||[],this.sigBytes=i!=t?i:4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,i=e.words,s=this.sigBytes,r=e.sigBytes;if(this.clamp(),s%4)for(var a=0;a<r;a++){var o=i[a>>>2]>>>24-a%4*8&255;t[s+a>>>2]|=o<<24-(s+a)%4*8}else for(var n=0;n<r;n+=4)t[s+n>>>2]=i[n>>>2];return this.sigBytes+=r,this},clamp:function(){var t=this.words,i=this.sigBytes;t[i>>>2]&=4294967295<<32-i%4*8,t.length=e.ceil(i/4)},clone:function(){var e=l.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],i=0;i<e;i+=4)t.push(s());return new d.init(t,e)}}),h=o.enc={},c=h.Hex={stringify:function(e){for(var t=e.words,i=e.sigBytes,s=[],r=0;r<i;r++){var a=t[r>>>2]>>>24-r%4*8&255;s.push((a>>>4).toString(16)),s.push((15&a).toString(16))}return s.join("")},parse:function(e){for(var t=e.length,i=[],s=0;s<t;s+=2)i[s>>>3]|=parseInt(e.substr(s,2),16)<<24-s%8*4;return new d.init(i,t/2)}},u=h.Latin1={stringify:function(e){for(var t=e.words,i=e.sigBytes,s=[],r=0;r<i;r++){var a=t[r>>>2]>>>24-r%4*8&255;s.push(String.fromCharCode(a))}return s.join("")},parse:function(e){for(var t=e.length,i=[],s=0;s<t;s++)i[s>>>2]|=(255&e.charCodeAt(s))<<24-s%4*8;return new d.init(i,t)}},p=h.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},f=n.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new d.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var i,s=this._data,r=s.words,a=s.sigBytes,o=this.blockSize,n=a/(4*o),l=(n=t?e.ceil(n):e.max((0|n)-this._minBufferSize,0))*o,h=e.min(4*l,a);if(l){for(var c=0;c<l;c+=o)this._doProcessBlock(r,c);i=r.splice(0,l),s.sigBytes-=h}return new d.init(i,h)},clone:function(){var e=l.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});n.Hasher=f.extend({cfg:l.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,i){return new e.init(i).finalize(t)}},_createHmacHelper:function(e){return function(t,i){return new m.HMAC.init(e,i).finalize(t)}}});var m=o.algo={};return o}(Math),i)})),gd=(Nr((function(e,t){var i,s,r,a,o,n,l;e.exports=(r=(s=l=md).lib,a=r.Base,o=r.WordArray,(n=s.x64={}).Word=a.extend({init:function(e,t){this.high=e,this.low=t}}),n.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=t!=i?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,i=[],s=0;s<t;s++){var r=e[s];i.push(r.high),i.push(r.low)}return o.create(i,this.sigBytes)},clone:function(){for(var e=a.clone.call(this),t=e.words=this.words.slice(0),i=t.length,s=0;s<i;s++)t[s]=t[s].clone();return e}}),l)})),Nr((function(e,t){var i;e.exports=(i=md,function(){if("function"==typeof ArrayBuffer){var e=i.lib.WordArray,t=e.init,s=e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var i=e.byteLength,s=[],r=0;r<i;r++)s[r>>>2]|=e[r]<<24-r%4*8;t.call(this,s,i)}else t.apply(this,arguments)};s.prototype=e}}(),i.lib.WordArray)})),Nr((function(e,t){var i;e.exports=(i=md,function(){var e=i,t=e.lib.WordArray,s=e.enc;function r(e){return e<<8&4278255360|e>>>8&16711935}s.Utf16=s.Utf16BE={stringify:function(e){for(var t=e.words,i=e.sigBytes,s=[],r=0;r<i;r+=2){var a=t[r>>>2]>>>16-r%4*8&65535;s.push(String.fromCharCode(a))}return s.join("")},parse:function(e){for(var i=e.length,s=[],r=0;r<i;r++)s[r>>>1]|=e.charCodeAt(r)<<16-r%2*16;return t.create(s,2*i)}},s.Utf16LE={stringify:function(e){for(var t=e.words,i=e.sigBytes,s=[],a=0;a<i;a+=2){var o=r(t[a>>>2]>>>16-a%4*8&65535);s.push(String.fromCharCode(o))}return s.join("")},parse:function(e){for(var i=e.length,s=[],a=0;a<i;a++)s[a>>>1]|=r(e.charCodeAt(a)<<16-a%2*16);return t.create(s,2*i)}}}(),i.enc.Utf16)})),Nr((function(e,t){var i;e.exports=(i=md,function(){var e=i,t=e.lib.WordArray;function s(e,i,s){for(var r=[],a=0,o=0;o<i;o++)if(o%4){var n=s[e.charCodeAt(o-1)]<<o%4*2|s[e.charCodeAt(o)]>>>6-o%4*2;r[a>>>2]|=n<<24-a%4*8,a++}return t.create(r,a)}e.enc.Base64={stringify:function(e){var t=e.words,i=e.sigBytes,s=this._map;e.clamp();for(var r=[],a=0;a<i;a+=3)for(var o=(t[a>>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,n=0;n<4&&a+.75*n<i;n++)r.push(s.charAt(o>>>6*(3-n)&63));var l=s.charAt(64);if(l)for(;r.length%4;)r.push(l);return r.join("")},parse:function(e){var t=e.length,i=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var a=0;a<i.length;a++)r[i.charCodeAt(a)]=a}var o=i.charAt(64);if(o){var n=e.indexOf(o);-1!==n&&(t=n)}return s(e,t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),i.enc.Base64)})),Nr((function(e,t){var i;e.exports=(i=md,function(){var e=i,t=e.lib.WordArray;function s(e,i,s){for(var r=[],a=0,o=0;o<i;o++)if(o%4){var n=s[e.charCodeAt(o-1)]<<o%4*2|s[e.charCodeAt(o)]>>>6-o%4*2;r[a>>>2]|=n<<24-a%4*8,a++}return t.create(r,a)}e.enc.Base64url={stringify:function(e,t){void 0===t&&(t=!0);var i=e.words,s=e.sigBytes,r=t?this._safe_map:this._map;e.clamp();for(var a=[],o=0;o<s;o+=3)for(var n=(i[o>>>2]>>>24-o%4*8&255)<<16|(i[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|i[o+2>>>2]>>>24-(o+2)%4*8&255,l=0;l<4&&o+.75*l<s;l++)a.push(r.charAt(n>>>6*(3-l)&63));var d=r.charAt(64);if(d)for(;a.length%4;)a.push(d);return a.join("")},parse:function(e,t){void 0===t&&(t=!0);var i=e.length,r=t?this._safe_map:this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var o=0;o<r.length;o++)a[r.charCodeAt(o)]=o}var n=r.charAt(64);if(n){var l=e.indexOf(n);-1!==l&&(i=l)}return s(e,i,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),i.enc.Base64url)})),Nr((function(e,t){var i;e.exports=(i=md,function(e){var t=i,s=t.lib,r=s.WordArray,a=s.Hasher,o=t.algo,n=[];!function(){for(var t=0;t<64;t++)n[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=o.MD5=a.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var i=0;i<16;i++){var s=t+i,r=e[s];e[s]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var a=this._hash.words,o=e[t+0],l=e[t+1],p=e[t+2],f=e[t+3],m=e[t+4],g=e[t+5],y=e[t+6],A=e[t+7],b=e[t+8],_=e[t+9],v=e[t+10],w=e[t+11],S=e[t+12],T=e[t+13],E=e[t+14],k=e[t+15],C=a[0],x=a[1],R=a[2],D=a[3];C=d(C,x,R,D,o,7,n[0]),D=d(D,C,x,R,l,12,n[1]),R=d(R,D,C,x,p,17,n[2]),x=d(x,R,D,C,f,22,n[3]),C=d(C,x,R,D,m,7,n[4]),D=d(D,C,x,R,g,12,n[5]),R=d(R,D,C,x,y,17,n[6]),x=d(x,R,D,C,A,22,n[7]),C=d(C,x,R,D,b,7,n[8]),D=d(D,C,x,R,_,12,n[9]),R=d(R,D,C,x,v,17,n[10]),x=d(x,R,D,C,w,22,n[11]),C=d(C,x,R,D,S,7,n[12]),D=d(D,C,x,R,T,12,n[13]),R=d(R,D,C,x,E,17,n[14]),C=h(C,x=d(x,R,D,C,k,22,n[15]),R,D,l,5,n[16]),D=h(D,C,x,R,y,9,n[17]),R=h(R,D,C,x,w,14,n[18]),x=h(x,R,D,C,o,20,n[19]),C=h(C,x,R,D,g,5,n[20]),D=h(D,C,x,R,v,9,n[21]),R=h(R,D,C,x,k,14,n[22]),x=h(x,R,D,C,m,20,n[23]),C=h(C,x,R,D,_,5,n[24]),D=h(D,C,x,R,E,9,n[25]),R=h(R,D,C,x,f,14,n[26]),x=h(x,R,D,C,b,20,n[27]),C=h(C,x,R,D,T,5,n[28]),D=h(D,C,x,R,p,9,n[29]),R=h(R,D,C,x,A,14,n[30]),C=c(C,x=h(x,R,D,C,S,20,n[31]),R,D,g,4,n[32]),D=c(D,C,x,R,b,11,n[33]),R=c(R,D,C,x,w,16,n[34]),x=c(x,R,D,C,E,23,n[35]),C=c(C,x,R,D,l,4,n[36]),D=c(D,C,x,R,m,11,n[37]),R=c(R,D,C,x,A,16,n[38]),x=c(x,R,D,C,v,23,n[39]),C=c(C,x,R,D,T,4,n[40]),D=c(D,C,x,R,o,11,n[41]),R=c(R,D,C,x,f,16,n[42]),x=c(x,R,D,C,y,23,n[43]),C=c(C,x,R,D,_,4,n[44]),D=c(D,C,x,R,S,11,n[45]),R=c(R,D,C,x,k,16,n[46]),C=u(C,x=c(x,R,D,C,p,23,n[47]),R,D,o,6,n[48]),D=u(D,C,x,R,A,10,n[49]),R=u(R,D,C,x,E,15,n[50]),x=u(x,R,D,C,g,21,n[51]),C=u(C,x,R,D,S,6,n[52]),D=u(D,C,x,R,f,10,n[53]),R=u(R,D,C,x,v,15,n[54]),x=u(x,R,D,C,l,21,n[55]),C=u(C,x,R,D,b,6,n[56]),D=u(D,C,x,R,k,10,n[57]),R=u(R,D,C,x,y,15,n[58]),x=u(x,R,D,C,T,21,n[59]),C=u(C,x,R,D,m,6,n[60]),D=u(D,C,x,R,w,10,n[61]),R=u(R,D,C,x,p,15,n[62]),x=u(x,R,D,C,_,21,n[63]),a[0]=a[0]+C|0,a[1]=a[1]+x|0,a[2]=a[2]+R|0,a[3]=a[3]+D|0},_doFinalize:function(){var t=this._data,i=t.words,s=8*this._nDataBytes,r=8*t.sigBytes;i[r>>>5]|=128<<24-r%32;var a=e.floor(s/4294967296),o=s;i[15+(r+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),i[14+(r+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(i.length+1),this._process();for(var n=this._hash,l=n.words,d=0;d<4;d++){var h=l[d];l[d]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}return n},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function d(e,t,i,s,r,a,o){var n=e+(t&i|~t&s)+r+o;return(n<<a|n>>>32-a)+t}function h(e,t,i,s,r,a,o){var n=e+(t&s|i&~s)+r+o;return(n<<a|n>>>32-a)+t}function c(e,t,i,s,r,a,o){var n=e+(t^i^s)+r+o;return(n<<a|n>>>32-a)+t}function u(e,t,i,s,r,a,o){var n=e+(i^(t|~s))+r+o;return(n<<a|n>>>32-a)+t}t.MD5=a._createHelper(l),t.HmacMD5=a._createHmacHelper(l)}(Math),i.MD5)})),Nr((function(e,t){var i,s,r,a,o,n,l,d;e.exports=(s=(i=d=md).lib,r=s.WordArray,a=s.Hasher,o=i.algo,n=[],l=o.SHA1=a.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var i=this._hash.words,s=i[0],r=i[1],a=i[2],o=i[3],l=i[4],d=0;d<80;d++){if(d<16)n[d]=0|e[t+d];else{var h=n[d-3]^n[d-8]^n[d-14]^n[d-16];n[d]=h<<1|h>>>31}var c=(s<<5|s>>>27)+l+n[d];c+=d<20?1518500249+(r&a|~r&o):d<40?1859775393+(r^a^o):d<60?(r&a|r&o|a&o)-1894007588:(r^a^o)-899497514,l=o,o=a,a=r<<30|r>>>2,r=s,s=c}i[0]=i[0]+s|0,i[1]=i[1]+r|0,i[2]=i[2]+a|0,i[3]=i[3]+o|0,i[4]=i[4]+l|0},_doFinalize:function(){var e=this._data,t=e.words,i=8*this._nDataBytes,s=8*e.sigBytes;return t[s>>>5]|=128<<24-s%32,t[14+(s+64>>>9<<4)]=Math.floor(i/4294967296),t[15+(s+64>>>9<<4)]=i,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}}),i.SHA1=a._createHelper(l),i.HmacSHA1=a._createHmacHelper(l),d.SHA1)})),Nr((function(e,t){var i;e.exports=(i=md,function(e){var t=i,s=t.lib,r=s.WordArray,a=s.Hasher,o=t.algo,n=[],l=[];!function(){function t(t){for(var i=e.sqrt(t),s=2;s<=i;s++)if(!(t%s))return!1;return!0}function i(e){return 4294967296*(e-(0|e))|0}for(var s=2,r=0;r<64;)t(s)&&(r<8&&(n[r]=i(e.pow(s,.5))),l[r]=i(e.pow(s,1/3)),r++),s++}();var d=[],h=o.SHA256=a.extend({_doReset:function(){this._hash=new r.init(n.slice(0))},_doProcessBlock:function(e,t){for(var i=this._hash.words,s=i[0],r=i[1],a=i[2],o=i[3],n=i[4],h=i[5],c=i[6],u=i[7],p=0;p<64;p++){if(p<16)d[p]=0|e[t+p];else{var f=d[p-15],m=(f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3,g=d[p-2],y=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;d[p]=m+d[p-7]+y+d[p-16]}var A=s&r^s&a^r&a,b=(s<<30|s>>>2)^(s<<19|s>>>13)^(s<<10|s>>>22),_=u+((n<<26|n>>>6)^(n<<21|n>>>11)^(n<<7|n>>>25))+(n&h^~n&c)+l[p]+d[p];u=c,c=h,h=n,n=o+_|0,o=a,a=r,r=s,s=_+(b+A)|0}i[0]=i[0]+s|0,i[1]=i[1]+r|0,i[2]=i[2]+a|0,i[3]=i[3]+o|0,i[4]=i[4]+n|0,i[5]=i[5]+h|0,i[6]=i[6]+c|0,i[7]=i[7]+u|0},_doFinalize:function(){var t=this._data,i=t.words,s=8*this._nDataBytes,r=8*t.sigBytes;return i[r>>>5]|=128<<24-r%32,i[14+(r+64>>>9<<4)]=e.floor(s/4294967296),i[15+(r+64>>>9<<4)]=s,t.sigBytes=4*i.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=a._createHelper(h),t.HmacSHA256=a._createHmacHelper(h)}(Math),i.SHA256)})),Nr((function(e,t){var i,s,r,a,o,n;e.exports=(s=(i=n=md).lib.WordArray,r=i.algo,a=r.SHA256,o=r.SHA224=a.extend({_doReset:function(){this._hash=new s.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=4,e}}),i.SHA224=a._createHelper(o),i.HmacSHA224=a._createHmacHelper(o),n.SHA224)})),Nr((function(e,t){var i;e.exports=(i=md,function(){var e=i,t=e.lib.Hasher,s=e.x64,r=s.Word,a=s.WordArray,o=e.algo;function n(){return r.create.apply(r,arguments)}var l=[n(1116352408,3609767458),n(1899447441,602891725),n(3049323471,3964484399),n(3921009573,2173295548),n(961987163,4081628472),n(1508970993,3053834265),n(2453635748,2937671579),n(2870763221,3664609560),n(3624381080,2734883394),n(310598401,1164996542),n(607225278,1323610764),n(1426881987,3590304994),n(1925078388,4068182383),n(2162078206,991336113),n(2614888103,633803317),n(3248222580,3479774868),n(3835390401,2666613458),n(4022224774,944711139),n(264347078,2341262773),n(604807628,2007800933),n(770255983,1495990901),n(1249150122,1856431235),n(1555081692,3175218132),n(1996064986,2198950837),n(2554220882,3999719339),n(2821834349,766784016),n(2952996808,2566594879),n(3210313671,3203337956),n(3336571891,1034457026),n(3584528711,2466948901),n(113926993,3758326383),n(338241895,168717936),n(666307205,1188179964),n(773529912,1546045734),n(1294757372,1522805485),n(1396182291,2643833823),n(1695183700,2343527390),n(1986661051,1014477480),n(2177026350,1206759142),n(2456956037,344077627),n(2730485921,1290863460),n(2820302411,3158454273),n(3259730800,3505952657),n(3345764771,106217008),n(3516065817,3606008344),n(3600352804,1432725776),n(4094571909,1467031594),n(275423344,851169720),n(430227734,3100823752),n(506948616,1363258195),n(659060556,3750685593),n(883997877,3785050280),n(958139571,3318307427),n(1322822218,3812723403),n(1537002063,2003034995),n(1747873779,3602036899),n(1955562222,1575990012),n(2024104815,1125592928),n(2227730452,2716904306),n(2361852424,442776044),n(2428436474,593698344),n(2756734187,3733110249),n(3204031479,2999351573),n(3329325298,3815920427),n(3391569614,3928383900),n(3515267271,566280711),n(3940187606,3454069534),n(4118630271,4000239992),n(116418474,1914138554),n(174292421,2731055270),n(289380356,3203993006),n(460393269,320620315),n(685471733,587496836),n(852142971,1086792851),n(1017036298,365543100),n(1126000580,2618297676),n(1288033470,3409855158),n(1501505948,4234509866),n(1607167915,987167468),n(1816402316,1246189591)],d=[];!function(){for(var e=0;e<80;e++)d[e]=n()}();var h=o.SHA512=t.extend({_doReset:function(){this._hash=new a.init([new r.init(1779033703,4089235720),new r.init(3144134277,2227873595),new r.init(1013904242,4271175723),new r.init(2773480762,1595750129),new r.init(1359893119,2917565137),new r.init(2600822924,725511199),new r.init(528734635,4215389547),new r.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var i=this._hash.words,s=i[0],r=i[1],a=i[2],o=i[3],n=i[4],h=i[5],c=i[6],u=i[7],p=s.high,f=s.low,m=r.high,g=r.low,y=a.high,A=a.low,b=o.high,_=o.low,v=n.high,w=n.low,S=h.high,T=h.low,E=c.high,k=c.low,C=u.high,x=u.low,R=p,D=f,L=m,I=g,P=y,B=A,M=b,U=_,F=v,O=w,N=S,j=T,G=E,z=k,$=C,H=x,V=0;V<80;V++){var W,J,q=d[V];if(V<16)J=q.high=0|e[t+2*V],W=q.low=0|e[t+2*V+1];else{var K=d[V-15],Y=K.high,Q=K.low,X=(Y>>>1|Q<<31)^(Y>>>8|Q<<24)^Y>>>7,Z=(Q>>>1|Y<<31)^(Q>>>8|Y<<24)^(Q>>>7|Y<<25),ee=d[V-2],te=ee.high,ie=ee.low,se=(te>>>19|ie<<13)^(te<<3|ie>>>29)^te>>>6,re=(ie>>>19|te<<13)^(ie<<3|te>>>29)^(ie>>>6|te<<26),ae=d[V-7],oe=ae.high,ne=ae.low,le=d[V-16],de=le.high,he=le.low;J=(J=(J=X+oe+((W=Z+ne)>>>0<Z>>>0?1:0))+se+((W+=re)>>>0<re>>>0?1:0))+de+((W+=he)>>>0<he>>>0?1:0),q.high=J,q.low=W}var ce,ue=F&N^~F&G,pe=O&j^~O&z,fe=R&L^R&P^L&P,me=D&I^D&B^I&B,ge=(R>>>28|D<<4)^(R<<30|D>>>2)^(R<<25|D>>>7),ye=(D>>>28|R<<4)^(D<<30|R>>>2)^(D<<25|R>>>7),Ae=(F>>>14|O<<18)^(F>>>18|O<<14)^(F<<23|O>>>9),be=(O>>>14|F<<18)^(O>>>18|F<<14)^(O<<23|F>>>9),_e=l[V],ve=_e.high,we=_e.low,Se=$+Ae+((ce=H+be)>>>0<H>>>0?1:0),Te=ye+me;$=G,H=z,G=N,z=j,N=F,j=O,F=M+(Se=(Se=(Se=Se+ue+((ce+=pe)>>>0<pe>>>0?1:0))+ve+((ce+=we)>>>0<we>>>0?1:0))+J+((ce+=W)>>>0<W>>>0?1:0))+((O=U+ce|0)>>>0<U>>>0?1:0)|0,M=P,U=B,P=L,B=I,L=R,I=D,R=Se+(ge+fe+(Te>>>0<ye>>>0?1:0))+((D=ce+Te|0)>>>0<ce>>>0?1:0)|0}f=s.low=f+D,s.high=p+R+(f>>>0<D>>>0?1:0),g=r.low=g+I,r.high=m+L+(g>>>0<I>>>0?1:0),A=a.low=A+B,a.high=y+P+(A>>>0<B>>>0?1:0),_=o.low=_+U,o.high=b+M+(_>>>0<U>>>0?1:0),w=n.low=w+O,n.high=v+F+(w>>>0<O>>>0?1:0),T=h.low=T+j,h.high=S+N+(T>>>0<j>>>0?1:0),k=c.low=k+z,c.high=E+G+(k>>>0<z>>>0?1:0),x=u.low=x+H,u.high=C+$+(x>>>0<H>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,i=8*this._nDataBytes,s=8*e.sigBytes;return t[s>>>5]|=128<<24-s%32,t[30+(s+128>>>10<<5)]=Math.floor(i/4294967296),t[31+(s+128>>>10<<5)]=i,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(h),e.HmacSHA512=t._createHmacHelper(h)}(),i.SHA512)})),Nr((function(e,t){var i,s,r,a,o,n,l,d;e.exports=(s=(i=d=md).x64,r=s.Word,a=s.WordArray,o=i.algo,n=o.SHA512,l=o.SHA384=n.extend({_doReset:function(){this._hash=new a.init([new r.init(3418070365,3238371032),new r.init(1654270250,914150663),new r.init(2438529370,812702999),new r.init(355462360,4144912697),new r.init(1731405415,4290775857),new r.init(2394180231,1750603025),new r.init(3675008525,1694076839),new r.init(1203062813,3204075428)])},_doFinalize:function(){var e=n._doFinalize.call(this);return e.sigBytes-=16,e}}),i.SHA384=n._createHelper(l),i.HmacSHA384=n._createHmacHelper(l),d.SHA384)})),Nr((function(e,t){var i;e.exports=(i=md,function(e){var t=i,s=t.lib,r=s.WordArray,a=s.Hasher,o=t.x64.Word,n=t.algo,l=[],d=[],h=[];!function(){for(var e=1,t=0,i=0;i<24;i++){l[e+5*t]=(i+1)*(i+2)/2%64;var s=(2*e+3*t)%5;e=t%5,t=s}for(e=0;e<5;e++)for(t=0;t<5;t++)d[e+5*t]=t+(2*e+3*t)%5*5;for(var r=1,a=0;a<24;a++){for(var n=0,c=0,u=0;u<7;u++){if(1&r){var p=(1<<u)-1;p<32?c^=1<<p:n^=1<<p-32}128&r?r=r<<1^113:r<<=1}h[a]=o.create(n,c)}}();var c=[];!function(){for(var e=0;e<25;e++)c[e]=o.create()}();var u=n.SHA3=a.extend({cfg:a.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new o.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var i=this._state,s=this.blockSize/2,r=0;r<s;r++){var a=e[t+2*r],o=e[t+2*r+1];a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),(x=i[r]).high^=o,x.low^=a}for(var n=0;n<24;n++){for(var u=0;u<5;u++){for(var p=0,f=0,m=0;m<5;m++)p^=(x=i[u+5*m]).high,f^=x.low;var g=c[u];g.high=p,g.low=f}for(u=0;u<5;u++){var y=c[(u+4)%5],A=c[(u+1)%5],b=A.high,_=A.low;for(p=y.high^(b<<1|_>>>31),f=y.low^(_<<1|b>>>31),m=0;m<5;m++)(x=i[u+5*m]).high^=p,x.low^=f}for(var v=1;v<25;v++){var w=(x=i[v]).high,S=x.low,T=l[v];T<32?(p=w<<T|S>>>32-T,f=S<<T|w>>>32-T):(p=S<<T-32|w>>>64-T,f=w<<T-32|S>>>64-T);var E=c[d[v]];E.high=p,E.low=f}var k=c[0],C=i[0];for(k.high=C.high,k.low=C.low,u=0;u<5;u++)for(m=0;m<5;m++){var x=i[v=u+5*m],R=c[v],D=c[(u+1)%5+5*m],L=c[(u+2)%5+5*m];x.high=R.high^~D.high&L.high,x.low=R.low^~D.low&L.low}x=i[0];var I=h[n];x.high^=I.high,x.low^=I.low}},_doFinalize:function(){var t=this._data,i=t.words;this._nDataBytes;var s=8*t.sigBytes,a=32*this.blockSize;i[s>>>5]|=1<<24-s%32,i[(e.ceil((s+1)/a)*a>>>5)-1]|=128,t.sigBytes=4*i.length,this._process();for(var o=this._state,n=this.cfg.outputLength/8,l=n/8,d=[],h=0;h<l;h++){var c=o[h],u=c.high,p=c.low;u=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),d.push(p),d.push(u)}return new r.init(d,n)},clone:function(){for(var e=a.clone.call(this),t=e._state=this._state.slice(0),i=0;i<25;i++)t[i]=t[i].clone();return e}});t.SHA3=a._createHelper(u),t.HmacSHA3=a._createHmacHelper(u)}(Math),i.SHA3)})),Nr((function(e,t){var i;e.exports=(i=md,function(e){var t=i,s=t.lib,r=s.WordArray,a=s.Hasher,o=t.algo,n=r.create([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=r.create([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]),d=r.create([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]),h=r.create([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=r.create([0,1518500249,1859775393,2400959708,2840853838]),u=r.create([1352829926,1548603684,1836072691,2053994217,0]),p=o.RIPEMD160=a.extend({_doReset:function(){this._hash=r.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var i=0;i<16;i++){var s=t+i,r=e[s];e[s]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var a,o,p,_,v,w,S,T,E,k,C,x=this._hash.words,R=c.words,D=u.words,L=n.words,I=l.words,P=d.words,B=h.words;for(w=a=x[0],S=o=x[1],T=p=x[2],E=_=x[3],k=v=x[4],i=0;i<80;i+=1)C=a+e[t+L[i]]|0,C+=i<16?f(o,p,_)+R[0]:i<32?m(o,p,_)+R[1]:i<48?g(o,p,_)+R[2]:i<64?y(o,p,_)+R[3]:A(o,p,_)+R[4],C=(C=b(C|=0,P[i]))+v|0,a=v,v=_,_=b(p,10),p=o,o=C,C=w+e[t+I[i]]|0,C+=i<16?A(S,T,E)+D[0]:i<32?y(S,T,E)+D[1]:i<48?g(S,T,E)+D[2]:i<64?m(S,T,E)+D[3]:f(S,T,E)+D[4],C=(C=b(C|=0,B[i]))+k|0,w=k,k=E,E=b(T,10),T=S,S=C;C=x[1]+p+E|0,x[1]=x[2]+_+k|0,x[2]=x[3]+v+w|0,x[3]=x[4]+a+S|0,x[4]=x[0]+o+T|0,x[0]=C},_doFinalize:function(){var e=this._data,t=e.words,i=8*this._nDataBytes,s=8*e.sigBytes;t[s>>>5]|=128<<24-s%32,t[14+(s+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),e.sigBytes=4*(t.length+1),this._process();for(var r=this._hash,a=r.words,o=0;o<5;o++){var n=a[o];a[o]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}return r},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function f(e,t,i){return e^t^i}function m(e,t,i){return e&t|~e&i}function g(e,t,i){return(e|~t)^i}function y(e,t,i){return e&i|t&~i}function A(e,t,i){return e^(t|~i)}function b(e,t){return e<<t|e>>>32-t}t.RIPEMD160=a._createHelper(p),t.HmacRIPEMD160=a._createHmacHelper(p)}(),i.RIPEMD160)})),Nr((function(e,t){var i,s,r;e.exports=(s=(i=md).lib.Base,r=i.enc.Utf8,void(i.algo.HMAC=s.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var i=e.blockSize,s=4*i;t.sigBytes>s&&(t=e.finalize(t)),t.clamp();for(var a=this._oKey=t.clone(),o=this._iKey=t.clone(),n=a.words,l=o.words,d=0;d<i;d++)n[d]^=1549556828,l[d]^=909522486;a.sigBytes=o.sigBytes=s,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,i=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(i))}})))})),Nr((function(e,t){var i,s,r,a,o,n,l,d,h;e.exports=(s=(i=h=md).lib,r=s.Base,a=s.WordArray,o=i.algo,n=o.SHA256,l=o.HMAC,d=o.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:n,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var i=this.cfg,s=l.create(i.hasher,e),r=a.create(),o=a.create([1]),n=r.words,d=o.words,h=i.keySize,c=i.iterations;n.length<h;){var u=s.update(t).finalize(o);s.reset();for(var p=u.words,f=p.length,m=u,g=1;g<c;g++){m=s.finalize(m),s.reset();for(var y=m.words,A=0;A<f;A++)p[A]^=y[A]}r.concat(u),d[0]++}return r.sigBytes=4*h,r}}),i.PBKDF2=function(e,t,i){return d.create(i).compute(e,t)},h.PBKDF2)})),Nr((function(e,t){var i,s,r,a,o,n,l,d;e.exports=(s=(i=d=md).lib,r=s.Base,a=s.WordArray,o=i.algo,n=o.MD5,l=o.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:n,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var i,s=this.cfg,r=s.hasher.create(),o=a.create(),n=o.words,l=s.keySize,d=s.iterations;n.length<l;){i&&r.update(i),i=r.update(e).finalize(t),r.reset();for(var h=1;h<d;h++)i=r.finalize(i),r.reset();o.concat(i)}return o.sigBytes=4*l,o}}),i.EvpKDF=function(e,t,i){return l.create(i).compute(e,t)},d.EvpKDF)})),Nr((function(e,t){var i;e.exports=void((i=md).lib.Cipher||function(e){var t=i,s=t.lib,r=s.Base,a=s.WordArray,o=s.BufferedBlockAlgorithm,n=t.enc;n.Utf8;var l=n.Base64,d=t.algo.EvpKDF,h=s.Cipher=o.extend({cfg:r.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,i){this.cfg=this.cfg.extend(i),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?b:y}return function(t){return{encrypt:function(i,s,r){return e(s).encrypt(t,i,s,r)},decrypt:function(i,s,r){return e(s).decrypt(t,i,s,r)}}}}()});s.StreamCipher=h.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var c=t.mode={},u=s.BlockCipherMode=r.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=c.CBC=function(){var t=u.extend();function i(t,i,s){var r,a=this._iv;a?(r=a,this._iv=e):r=this._prevBlock;for(var o=0;o<s;o++)t[i+o]^=r[o]}return t.Encryptor=t.extend({processBlock:function(e,t){var s=this._cipher,r=s.blockSize;i.call(this,e,t,r),s.encryptBlock(e,t),this._prevBlock=e.slice(t,t+r)}}),t.Decryptor=t.extend({processBlock:function(e,t){var s=this._cipher,r=s.blockSize,a=e.slice(t,t+r);s.decryptBlock(e,t),i.call(this,e,t,r),this._prevBlock=a}}),t}(),f=(t.pad={}).Pkcs7={pad:function(e,t){for(var i=4*t,s=i-e.sigBytes%i,r=s<<24|s<<16|s<<8|s,o=[],n=0;n<s;n+=4)o.push(r);var l=a.create(o,s);e.concat(l)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};s.BlockCipher=h.extend({cfg:h.cfg.extend({mode:p,padding:f}),reset:function(){var e;h.reset.call(this);var t=this.cfg,i=t.iv,s=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=s.createEncryptor:(e=s.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,i&&i.words):(this._mode=e.call(s,this,i&&i.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var m=s.CipherParams=r.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,i=e.salt;return(i?a.create([1398893684,1701076831]).concat(i).concat(t):t).toString(l)},parse:function(e){var t,i=l.parse(e),s=i.words;return 1398893684==s[0]&&1701076831==s[1]&&(t=a.create(s.slice(2,4)),s.splice(0,4),i.sigBytes-=16),m.create({ciphertext:i,salt:t})}},y=s.SerializableCipher=r.extend({cfg:r.extend({format:g}),encrypt:function(e,t,i,s){s=this.cfg.extend(s);var r=e.createEncryptor(i,s),a=r.finalize(t),o=r.cfg;return m.create({ciphertext:a,key:i,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:s.format})},decrypt:function(e,t,i,s){return s=this.cfg.extend(s),t=this._parse(t,s.format),e.createDecryptor(i,s).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),A=(t.kdf={}).OpenSSL={execute:function(e,t,i,s,r){if(s||(s=a.random(8)),r)o=d.create({keySize:t+i,hasher:r}).compute(e,s);else var o=d.create({keySize:t+i}).compute(e,s);var n=a.create(o.words.slice(t),4*i);return o.sigBytes=4*t,m.create({key:o,iv:n,salt:s})}},b=s.PasswordBasedCipher=y.extend({cfg:y.cfg.extend({kdf:A}),encrypt:function(e,t,i,s){var r=(s=this.cfg.extend(s)).kdf.execute(i,e.keySize,e.ivSize,s.salt,s.hasher);s.iv=r.iv;var a=y.encrypt.call(this,e,t,r.key,s);return a.mixIn(r),a},decrypt:function(e,t,i,s){s=this.cfg.extend(s),t=this._parse(t,s.format);var r=s.kdf.execute(i,e.keySize,e.ivSize,t.salt,s.hasher);return s.iv=r.iv,y.decrypt.call(this,e,t,r.key,s)}})}())})),Nr((function(e,t){var i;e.exports=((i=md).mode.CFB=function(){var e=i.lib.BlockCipherMode.extend();function t(e,t,i,s){var r,a=this._iv;a?(r=a.slice(0),this._iv=void 0):r=this._prevBlock,s.encryptBlock(r,0);for(var o=0;o<i;o++)e[t+o]^=r[o]}return e.Encryptor=e.extend({processBlock:function(e,i){var s=this._cipher,r=s.blockSize;t.call(this,e,i,r,s),this._prevBlock=e.slice(i,i+r)}}),e.Decryptor=e.extend({processBlock:function(e,i){var s=this._cipher,r=s.blockSize,a=e.slice(i,i+r);t.call(this,e,i,r,s),this._prevBlock=a}}),e}(),i.mode.CFB)})),Nr((function(e,t){var i,s,r;e.exports=((r=md).mode.CTR=(i=r.lib.BlockCipherMode.extend(),s=i.Encryptor=i.extend({processBlock:function(e,t){var i=this._cipher,s=i.blockSize,r=this._iv,a=this._counter;r&&(a=this._counter=r.slice(0),this._iv=void 0);var o=a.slice(0);i.encryptBlock(o,0),a[s-1]=a[s-1]+1|0;for(var n=0;n<s;n++)e[t+n]^=o[n]}}),i.Decryptor=s,i),r.mode.CTR)})),Nr((function(e,t){var i;e.exports=((i=md).mode.CTRGladman=function(){var e=i.lib.BlockCipherMode.extend();function t(e){if(255==(e>>24&255)){var t=e>>16&255,i=e>>8&255,s=255&e;255===t?(t=0,255===i?(i=0,255===s?s=0:++s):++i):++t,e=0,e+=t<<16,e+=i<<8,e+=s}else e+=1<<24;return e}function s(e){return 0===(e[0]=t(e[0]))&&(e[1]=t(e[1])),e}var r=e.Encryptor=e.extend({processBlock:function(e,t){var i=this._cipher,r=i.blockSize,a=this._iv,o=this._counter;a&&(o=this._counter=a.slice(0),this._iv=void 0),s(o);var n=o.slice(0);i.encryptBlock(n,0);for(var l=0;l<r;l++)e[t+l]^=n[l]}});return e.Decryptor=r,e}(),i.mode.CTRGladman)})),Nr((function(e,t){var i,s,r;e.exports=((r=md).mode.OFB=(i=r.lib.BlockCipherMode.extend(),s=i.Encryptor=i.extend({processBlock:function(e,t){var i=this._cipher,s=i.blockSize,r=this._iv,a=this._keystream;r&&(a=this._keystream=r.slice(0),this._iv=void 0),i.encryptBlock(a,0);for(var o=0;o<s;o++)e[t+o]^=a[o]}}),i.Decryptor=s,i),r.mode.OFB)})),Nr((function(e,t){var i,s;e.exports=((s=md).mode.ECB=((i=s.lib.BlockCipherMode.extend()).Encryptor=i.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),i.Decryptor=i.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),i),s.mode.ECB)})),Nr((function(e,t){var i;e.exports=((i=md).pad.AnsiX923={pad:function(e,t){var i=e.sigBytes,s=4*t,r=s-i%s,a=i+r-1;e.clamp(),e.words[a>>>2]|=r<<24-a%4*8,e.sigBytes+=r},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},i.pad.Ansix923)})),Nr((function(e,t){var i;e.exports=((i=md).pad.Iso10126={pad:function(e,t){var s=4*t,r=s-e.sigBytes%s;e.concat(i.lib.WordArray.random(r-1)).concat(i.lib.WordArray.create([r<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},i.pad.Iso10126)})),Nr((function(e,t){var i;e.exports=((i=md).pad.Iso97971={pad:function(e,t){e.concat(i.lib.WordArray.create([2147483648],1)),i.pad.ZeroPadding.pad(e,t)},unpad:function(e){i.pad.ZeroPadding.unpad(e),e.sigBytes--}},i.pad.Iso97971)})),Nr((function(e,t){var i;e.exports=((i=md).pad.ZeroPadding={pad:function(e,t){var i=4*t;e.clamp(),e.sigBytes+=i-(e.sigBytes%i||i)},unpad:function(e){var t=e.words,i=e.sigBytes-1;for(i=e.sigBytes-1;i>=0;i--)if(t[i>>>2]>>>24-i%4*8&255){e.sigBytes=i+1;break}}},i.pad.ZeroPadding)})),Nr((function(e,t){var i;e.exports=((i=md).pad.NoPadding={pad:function(){},unpad:function(){}},i.pad.NoPadding)})),Nr((function(e,t){var i;e.exports=(i=md,function(e){var t=i,s=t.lib.CipherParams,r=t.enc.Hex;t.format.Hex={stringify:function(e){return e.ciphertext.toString(r)},parse:function(e){var t=r.parse(e);return s.create({ciphertext:t})}}}(),i.format.Hex)})),Nr((function(e,t){var i;e.exports=(i=md,function(){var e=i,t=e.lib.BlockCipher,s=e.algo,r=[],a=[],o=[],n=[],l=[],d=[],h=[],c=[],u=[],p=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var i=0,s=0;for(t=0;t<256;t++){var f=s^s<<1^s<<2^s<<3^s<<4;f=f>>>8^255&f^99,r[i]=f,a[f]=i;var m=e[i],g=e[m],y=e[g],A=257*e[f]^16843008*f;o[i]=A<<24|A>>>8,n[i]=A<<16|A>>>16,l[i]=A<<8|A>>>24,d[i]=A,A=16843009*y^65537*g^257*m^16843008*i,h[f]=A<<24|A>>>8,c[f]=A<<16|A>>>16,u[f]=A<<8|A>>>24,p[f]=A,i?(i=m^e[e[e[y^m]]],s^=e[e[s]]):i=s=1}}();var f=[0,1,2,4,8,16,32,64,128,27,54],m=s.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,i=e.sigBytes/4,s=4*((this._nRounds=i+6)+1),a=this._keySchedule=[],o=0;o<s;o++)o<i?a[o]=t[o]:(d=a[o-1],o%i?i>6&&o%i==4&&(d=r[d>>>24]<<24|r[d>>>16&255]<<16|r[d>>>8&255]<<8|r[255&d]):(d=r[(d=d<<8|d>>>24)>>>24]<<24|r[d>>>16&255]<<16|r[d>>>8&255]<<8|r[255&d],d^=f[o/i|0]<<24),a[o]=a[o-i]^d);for(var n=this._invKeySchedule=[],l=0;l<s;l++){if(o=s-l,l%4)var d=a[o];else d=a[o-4];n[l]=l<4||o<=4?d:h[r[d>>>24]]^c[r[d>>>16&255]]^u[r[d>>>8&255]]^p[r[255&d]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,n,l,d,r)},decryptBlock:function(e,t){var i=e[t+1];e[t+1]=e[t+3],e[t+3]=i,this._doCryptBlock(e,t,this._invKeySchedule,h,c,u,p,a),i=e[t+1],e[t+1]=e[t+3],e[t+3]=i},_doCryptBlock:function(e,t,i,s,r,a,o,n){for(var l=this._nRounds,d=e[t]^i[0],h=e[t+1]^i[1],c=e[t+2]^i[2],u=e[t+3]^i[3],p=4,f=1;f<l;f++){var m=s[d>>>24]^r[h>>>16&255]^a[c>>>8&255]^o[255&u]^i[p++],g=s[h>>>24]^r[c>>>16&255]^a[u>>>8&255]^o[255&d]^i[p++],y=s[c>>>24]^r[u>>>16&255]^a[d>>>8&255]^o[255&h]^i[p++],A=s[u>>>24]^r[d>>>16&255]^a[h>>>8&255]^o[255&c]^i[p++];d=m,h=g,c=y,u=A}m=(n[d>>>24]<<24|n[h>>>16&255]<<16|n[c>>>8&255]<<8|n[255&u])^i[p++],g=(n[h>>>24]<<24|n[c>>>16&255]<<16|n[u>>>8&255]<<8|n[255&d])^i[p++],y=(n[c>>>24]<<24|n[u>>>16&255]<<16|n[d>>>8&255]<<8|n[255&h])^i[p++],A=(n[u>>>24]<<24|n[d>>>16&255]<<16|n[h>>>8&255]<<8|n[255&c])^i[p++],e[t]=m,e[t+1]=g,e[t+2]=y,e[t+3]=A},keySize:8});e.AES=t._createHelper(m)}(),i.AES)})),Nr((function(e,t){var i;e.exports=(i=md,function(){var e=i,t=e.lib,s=t.WordArray,r=t.BlockCipher,a=e.algo,o=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],n=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],d=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],h=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],c=a.DES=r.extend({_doReset:function(){for(var e=this._key.words,t=[],i=0;i<56;i++){var s=o[i]-1;t[i]=e[s>>>5]>>>31-s%32&1}for(var r=this._subKeys=[],a=0;a<16;a++){var d=r[a]=[],h=l[a];for(i=0;i<24;i++)d[i/6|0]|=t[(n[i]-1+h)%28]<<31-i%6,d[4+(i/6|0)]|=t[28+(n[i+24]-1+h)%28]<<31-i%6;for(d[0]=d[0]<<1|d[0]>>>31,i=1;i<7;i++)d[i]=d[i]>>>4*(i-1)+3;d[7]=d[7]<<5|d[7]>>>27}var c=this._invSubKeys=[];for(i=0;i<16;i++)c[i]=r[15-i]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,i){this._lBlock=e[t],this._rBlock=e[t+1],u.call(this,4,252645135),u.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),u.call(this,1,1431655765);for(var s=0;s<16;s++){for(var r=i[s],a=this._lBlock,o=this._rBlock,n=0,l=0;l<8;l++)n|=d[l][((o^r[l])&h[l])>>>0];this._lBlock=o,this._rBlock=a^n}var c=this._lBlock;this._lBlock=this._rBlock,this._rBlock=c,u.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),u.call(this,16,65535),u.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function u(e,t){var i=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=i,this._lBlock^=i<<e}function p(e,t){var i=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=i,this._rBlock^=i<<e}e.DES=r._createHelper(c);var f=a.TripleDES=r.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),i=e.length<4?e.slice(0,2):e.slice(2,4),r=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=c.createEncryptor(s.create(t)),this._des2=c.createEncryptor(s.create(i)),this._des3=c.createEncryptor(s.create(r))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=r._createHelper(f)}(),i.TripleDES)})),Nr((function(e,t){var i;e.exports=(i=md,function(){var e=i,t=e.lib.StreamCipher,s=e.algo,r=s.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,i=e.sigBytes,s=this._S=[],r=0;r<256;r++)s[r]=r;r=0;for(var a=0;r<256;r++){var o=r%i,n=t[o>>>2]>>>24-o%4*8&255;a=(a+s[r]+n)%256;var l=s[r];s[r]=s[a],s[a]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=a.call(this)},keySize:8,ivSize:0});function a(){for(var e=this._S,t=this._i,i=this._j,s=0,r=0;r<4;r++){i=(i+e[t=(t+1)%256])%256;var a=e[t];e[t]=e[i],e[i]=a,s|=e[(e[t]+e[i])%256]<<24-8*r}return this._i=t,this._j=i,s}e.RC4=t._createHelper(r);var o=s.RC4Drop=r.extend({cfg:r.cfg.extend({drop:192}),_doReset:function(){r._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)a.call(this)}});e.RC4Drop=t._createHelper(o)}(),i.RC4)})),Nr((function(e,t){var i;e.exports=(i=md,function(){var e=i,t=e.lib.StreamCipher,s=e.algo,r=[],a=[],o=[],n=s.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,i=0;i<4;i++)e[i]=16711935&(e[i]<<8|e[i]>>>24)|4278255360&(e[i]<<24|e[i]>>>8);var s=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,i=0;i<4;i++)l.call(this);for(i=0;i<8;i++)r[i]^=s[i+4&7];if(t){var a=t.words,o=a[0],n=a[1],d=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),h=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),c=d>>>16|4294901760&h,u=h<<16|65535&d;for(r[0]^=d,r[1]^=c,r[2]^=h,r[3]^=u,r[4]^=d,r[5]^=c,r[6]^=h,r[7]^=u,i=0;i<4;i++)l.call(this)}},_doProcessBlock:function(e,t){var i=this._X;l.call(this),r[0]=i[0]^i[5]>>>16^i[3]<<16,r[1]=i[2]^i[7]>>>16^i[5]<<16,r[2]=i[4]^i[1]>>>16^i[7]<<16,r[3]=i[6]^i[3]>>>16^i[1]<<16;for(var s=0;s<4;s++)r[s]=16711935&(r[s]<<8|r[s]>>>24)|4278255360&(r[s]<<24|r[s]>>>8),e[t+s]^=r[s]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,i=0;i<8;i++)a[i]=t[i];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<a[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<a[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<a[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<a[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<a[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<a[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<a[6]>>>0?1:0)|0,this._b=t[7]>>>0<a[7]>>>0?1:0,i=0;i<8;i++){var s=e[i]+t[i],r=65535&s,n=s>>>16,l=((r*r>>>17)+r*n>>>15)+n*n,d=((4294901760&s)*s|0)+((65535&s)*s|0);o[i]=l^d}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}e.Rabbit=t._createHelper(n)}(),i.Rabbit)})),Nr((function(e,t){var i;e.exports=(i=md,function(){var e=i,t=e.lib.StreamCipher,s=e.algo,r=[],a=[],o=[],n=s.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,i=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],s=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var r=0;r<4;r++)l.call(this);for(r=0;r<8;r++)s[r]^=i[r+4&7];if(t){var a=t.words,o=a[0],n=a[1],d=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),h=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),c=d>>>16|4294901760&h,u=h<<16|65535&d;for(s[0]^=d,s[1]^=c,s[2]^=h,s[3]^=u,s[4]^=d,s[5]^=c,s[6]^=h,s[7]^=u,r=0;r<4;r++)l.call(this)}},_doProcessBlock:function(e,t){var i=this._X;l.call(this),r[0]=i[0]^i[5]>>>16^i[3]<<16,r[1]=i[2]^i[7]>>>16^i[5]<<16,r[2]=i[4]^i[1]>>>16^i[7]<<16,r[3]=i[6]^i[3]>>>16^i[1]<<16;for(var s=0;s<4;s++)r[s]=16711935&(r[s]<<8|r[s]>>>24)|4278255360&(r[s]<<24|r[s]>>>8),e[t+s]^=r[s]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,i=0;i<8;i++)a[i]=t[i];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<a[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<a[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<a[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<a[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<a[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<a[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<a[6]>>>0?1:0)|0,this._b=t[7]>>>0<a[7]>>>0?1:0,i=0;i<8;i++){var s=e[i]+t[i],r=65535&s,n=s>>>16,l=((r*r>>>17)+r*n>>>15)+n*n,d=((4294901760&s)*s|0)+((65535&s)*s|0);o[i]=l^d}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}e.RabbitLegacy=t._createHelper(n)}(),i.RabbitLegacy)})),Nr((function(e,t){var i;e.exports=(i=md,function(){var e=i,t=e.lib.BlockCipher,s=e.algo;const r=16,a=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],o=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var n={pbox:[],sbox:[]};function l(e,t){let i=t>>24&255,s=t>>16&255,r=t>>8&255,a=255&t,o=e.sbox[0][i]+e.sbox[1][s];return o^=e.sbox[2][r],o+=e.sbox[3][a],o}function d(e,t,i){let s,a=t,o=i;for(let t=0;t<r;++t)a^=e.pbox[t],o=l(e,a)^o,s=a,a=o,o=s;return s=a,a=o,o=s,o^=e.pbox[r],a^=e.pbox[r+1],{left:a,right:o}}function h(e,t,i){let s,a=t,o=i;for(let t=r+1;t>1;--t)a^=e.pbox[t],o=l(e,a)^o,s=a,a=o,o=s;return s=a,a=o,o=s,o^=e.pbox[1],a^=e.pbox[0],{left:a,right:o}}function c(e,t,i){for(let t=0;t<4;t++){e.sbox[t]=[];for(let i=0;i<256;i++)e.sbox[t][i]=o[t][i]}let s=0;for(let o=0;o<r+2;o++)e.pbox[o]=a[o]^t[s],s++,s>=i&&(s=0);let n=0,l=0,h=0;for(let t=0;t<r+2;t+=2)h=d(e,n,l),n=h.left,l=h.right,e.pbox[t]=n,e.pbox[t+1]=l;for(let t=0;t<4;t++)for(let i=0;i<256;i+=2)h=d(e,n,l),n=h.left,l=h.right,e.sbox[t][i]=n,e.sbox[t][i+1]=l;return!0}var u=s.Blowfish=t.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var e=this._keyPriorReset=this._key,t=e.words,i=e.sigBytes/4;c(n,t,i)}},encryptBlock:function(e,t){var i=d(n,e[t],e[t+1]);e[t]=i.left,e[t+1]=i.right},decryptBlock:function(e,t){var i=h(n,e[t],e[t+1]);e[t]=i.left,e[t+1]=i.right},blockSize:2,keySize:4,ivSize:2});e.Blowfish=t._createHelper(u)}(),i.Blowfish)})),Nr((function(e,t){e.exports=md})));function yd(e){return e[3]|e[2]<<8|e[1]<<16|e[0]<<24}function Ad(e){const t=[];for(let i=0;i<e.length;i+=1)t[i>>>2]|=e[i]<<24-i%4*8;return gd.lib.WordArray.create(t,e.length)}const bd=16,_d=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],vd=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function wd(e){const t=[];for(let i=0,s=e.length;i<s;i+=2)t.push(parseInt(e.substr(i,2),16));return t}function Sd(e){return e.map((e=>1===(e=e.toString(16)).length?"0"+e:e)).join("")}function Td(e){const t=[];for(let i=0,s=e.length;i<s;i++){const s=e.codePointAt(i);if(s<=127)t.push(s);else if(s<=2047)t.push(192|s>>>6),t.push(128|63&s);else if(s<=55295||s>=57344&&s<=65535)t.push(224|s>>>12),t.push(128|s>>>6&63),t.push(128|63&s);else{if(!(s>=65536&&s<=1114111))throw t.push(s),new Error("input is not supported");i++,t.push(240|s>>>18&28),t.push(128|s>>>12&63),t.push(128|s>>>6&63),t.push(128|63&s)}}return t}function Ed(e){const t=[];for(let i=0,s=e.length;i<s;i++)e[i]>=240&&e[i]<=247?(t.push(String.fromCodePoint(((7&e[i])<<18)+((63&e[i+1])<<12)+((63&e[i+2])<<6)+(63&e[i+3]))),i+=3):e[i]>=224&&e[i]<=239?(t.push(String.fromCodePoint(((15&e[i])<<12)+((63&e[i+1])<<6)+(63&e[i+2]))),i+=2):e[i]>=192&&e[i]<=223?(t.push(String.fromCodePoint(((31&e[i])<<6)+(63&e[i+1]))),i++):t.push(String.fromCodePoint(e[i]));return t.join("")}function kd(e,t){const i=31&t;return e<<i|e>>>32-i}function Cd(e){return(255&_d[e>>>24&255])<<24|(255&_d[e>>>16&255])<<16|(255&_d[e>>>8&255])<<8|255&_d[255&e]}function xd(e){return e^kd(e,2)^kd(e,10)^kd(e,18)^kd(e,24)}function Rd(e){return e^kd(e,13)^kd(e,23)}function Dd(e,t,i){const s=new Array(4),r=new Array(4);for(let t=0;t<4;t++)r[0]=255&e[4*t],r[1]=255&e[4*t+1],r[2]=255&e[4*t+2],r[3]=255&e[4*t+3],s[t]=r[0]<<24|r[1]<<16|r[2]<<8|r[3];for(let e,t=0;t<32;t+=4)e=s[1]^s[2]^s[3]^i[t+0],s[0]^=xd(Cd(e)),e=s[2]^s[3]^s[0]^i[t+1],s[1]^=xd(Cd(e)),e=s[3]^s[0]^s[1]^i[t+2],s[2]^=xd(Cd(e)),e=s[0]^s[1]^s[2]^i[t+3],s[3]^=xd(Cd(e));for(let e=0;e<16;e+=4)t[e]=s[3-e/4]>>>24&255,t[e+1]=s[3-e/4]>>>16&255,t[e+2]=s[3-e/4]>>>8&255,t[e+3]=255&s[3-e/4]}function Ld(e,t,i){const s=new Array(4),r=new Array(4);for(let t=0;t<4;t++)r[0]=255&e[0+4*t],r[1]=255&e[1+4*t],r[2]=255&e[2+4*t],r[3]=255&e[3+4*t],s[t]=r[0]<<24|r[1]<<16|r[2]<<8|r[3];s[0]^=2746333894,s[1]^=1453994832,s[2]^=1736282519,s[3]^=2993693404;for(let e,i=0;i<32;i+=4)e=s[1]^s[2]^s[3]^vd[i+0],t[i+0]=s[0]^=Rd(Cd(e)),e=s[2]^s[3]^s[0]^vd[i+1],t[i+1]=s[1]^=Rd(Cd(e)),e=s[3]^s[0]^s[1]^vd[i+2],t[i+2]=s[2]^=Rd(Cd(e)),e=s[0]^s[1]^s[2]^vd[i+3],t[i+3]=s[3]^=Rd(Cd(e));if(0===i)for(let e,i=0;i<16;i++)e=t[i],t[i]=t[31-i],t[31-i]=e}function Id(e,t,i){let{padding:s="pkcs#7",mode:r,iv:a=[],output:o="string"}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("cbc"===r&&("string"==typeof a&&(a=wd(a)),16!==a.length))throw new Error("iv is invalid");if("string"==typeof t&&(t=wd(t)),16!==t.length)throw new Error("key is invalid");if(e="string"==typeof e?0!==i?Td(e):wd(e):[...e],("pkcs#5"===s||"pkcs#7"===s)&&0!==i){const t=bd-e.length%bd;for(let i=0;i<t;i++)e.push(t)}const n=new Array(32);Ld(t,n,i);const l=[];let d=a,h=e.length,c=0;for(;h>=bd;){const t=e.slice(c,c+16),s=new Array(16);if("cbc"===r)for(let e=0;e<bd;e++)0!==i&&(t[e]^=d[e]);Dd(t,s,n);for(let e=0;e<bd;e++)"cbc"===r&&0===i&&(s[e]^=d[e]),l[c+e]=s[e];"cbc"===r&&(d=0!==i?s:t),h-=bd,c+=bd}if(("pkcs#5"===s||"pkcs#7"===s)&&0===i){const e=l.length,t=l[e-1];for(let i=1;i<=t;i++)if(l[e-i]!==t)throw new Error("padding is invalid");l.splice(e-t,t)}return"array"!==o?0!==i?Sd(l):Ed(l):l}function Pd(e){return e[3]|e[2]<<8|e[1]<<16|e[0]<<24}function Bd(e,t,i){for(let s=2;s<e.length;++s){const r=s-2,a=t[r%t.length],o=i[r%i.length];e[s]=e[s]^a^o}return e}function Md(e){return e[3]|e[2]<<8|e[1]<<16|e[0]<<24}class Ud extends a{constructor(e){super(),this.TAG_NAME="CommonDemux",this.player=e,this.stopId=null,this.firstTimestamp=null,this.startTimestamp=null,this.preDelayTimestamp=null,this.preLoopTimestamp=null,this.bufferStartDts=null,this.bufferStartLocalTs=null,this.preIframeTs=null,this.preFrameTs=null,this.preTimestamp=null,this.preTimestampDuration=0,this.prevPayloadBufferSize=0,this.isStreamTsMoreThanLocal=!1,this.delay=-1,this.pushLatestDelay=-1,this.bufferList=[],this.historyIntervalDiffTimeList=[],this.playbackStreamFps=null,this.playbackStreamAudioFps=null,this.playbackStreamVideoFps=null,this.dropping=!1,this.isPushDropping=!1,this.nalUnitSize=null,this.initInterval(),this.player.debug.log("CommonDemux","init")}destroy(){this.bufferList=[],this.historyIntervalDiffTimeList=[],this.playbackStreamFps=null,this.playbackStreamAudioFps=null,this.playbackStreamVideoFps=null,this.clearStopInterval(),this.firstTimestamp=null,this.startTimestamp=null,this.bufferStartDts=null,this.bufferStartLocalTs=null,this.preDelayTimestamp=null,this.preLoopTimestamp=null,this.preIframeTs=null,this.preTimestamp=null,this.preTimestampDuration=0,this.prevPayloadBufferSize=0,this.isStreamTsMoreThanLocal=!1,this.delay=-1,this.pushLatestDelay=-1,this.dropping=!1,this.isPushDropping=!1,this.nalUnitSize=null,this.off(),this.player.debug.log("CommonDemux","destroy")}isDropping(){return this.dropping||this.isPushDropping}getDelay(e,t){if(!e||!this.player.isDemuxDecodeFirstIIframeInit())return-1;if(t===je)return this.delay;if(this.preDelayTimestamp&&this.preDelayTimestamp>e)return this.preDelayTimestamp-e>1e3&&this.player.debug.warn("CommonDemux",`getDelay() and preDelayTimestamp is ${this.preDelayTimestamp} > timestamp is ${e} more than ${this.preDelayTimestamp-e}ms and return ${this.delay}`),this.preDelayTimestamp=e,this.delay;if(this.firstTimestamp){if(e){const t=Date.now()-this.startTimestamp,i=e-this.firstTimestamp;t>=i?(this.isStreamTsMoreThanLocal=!1,this.delay=t-i):(this.isStreamTsMoreThanLocal=!0,this.delay=i-t)}}else this.firstTimestamp=e,this.startTimestamp=Date.now(),this.delay=-1;return this.preDelayTimestamp=e,this.delay}getDelayNotUpdateDelay(e,t){if(!e||!this.player.isDemuxDecodeFirstIIframeInit())return-1;if(t===je)return this.pushLatestDelay;if(this.preDelayTimestamp&&this.preDelayTimestamp-e>1e3)return this.player.debug.warn("CommonDemux",`getDelayNotUpdateDelay() and preDelayTimestamp is ${this.preDelayTimestamp} > timestamp is ${e} more than ${this.preDelayTimestamp-e}ms and return -1`),-1;if(this.firstTimestamp){let t=-1;if(e){const i=Date.now()-this.startTimestamp,s=e-this.firstTimestamp;t=i>=s?i-s:s-i}return t}return-1}resetDelay(){this.firstTimestamp=null,this.startTimestamp=null,this.delay=-1,this.dropping=!1}resetAllDelay(){this.resetDelay(),this.preDelayTimestamp=null}initInterval(){this.player.isUseHls265()?this.player.debug.log("CommonDemux","initInterval() and is hls and support hls265 so return"):-1===this.player.getStreamType().indexOf(A)?this.player.isPlaybackCacheBeforeDecodeForFpsRender()?this.player.debug.log("CommonDemux","initInterval() and playback and playbackIsCacheBeforeDecodeForFpsRender is true so return"):(this.player.debug.log("CommonDemux","setInterval()"),this._loop(),this.stopId=setInterval((()=>{let e=(new Date).getTime();this.preLoopTimestamp||(this.preLoopTimestamp=e);const t=e-this.preLoopTimestamp;this.updateHistoryIntervalDiffTimeList(t),t>100&&this.player.debug.warn("CommonDemux",`loop demux diff time is ${t}`),this._loop(),this.preLoopTimestamp=(new Date).getTime()}),20)):this.player.debug.log("CommonDemux","initInterval() and is worker stream so return")}clearStopInterval(){this.stopId&&(clearInterval(this.stopId),this.stopId=null)}updateHistoryIntervalDiffTimeList(e){this.historyIntervalDiffTimeList.length>5&&this.historyIntervalDiffTimeList.shift(),this.historyIntervalDiffTimeList.push(e)}isHistoryIntervalDiffTimeAllLarge(){if(this.historyIntervalDiffTimeList.length<5)return!1;for(let e=0;e<this.historyIntervalDiffTimeList.length;e++)if(this.historyIntervalDiffTimeList[e]<900)return!1;return!0}initPlaybackCacheLoop(){this.clearStopInterval();const e=()=>{let e=null;this.bufferList.length&&(e=this.bufferList.shift(),this._doDecoderDecode(e))};e();const t=Math.ceil(1e3/(this.playbackStreamFps*this.player.getPlaybackRate()));this.player.debug.log("CommonDemux",`initPlaybackCacheLoop() and fragDuration is ${t}, playbackStreamFps is ${this.playbackStreamFps}, playbackRate is ${this.player.getPlaybackRate()}`),this.stopId=setInterval(e,t)}_loop(){let e;const t=this.player._opt.videoBuffer,i=this.player._opt.videoBufferDelay,s=this.player._opt.playType===_;if(this.bufferList.length){if(this.isPushDropping)return void this.player.debug.warn("CommonDemux",`_loop isPushDropping is true and bufferList length is ${this.bufferList.length}`);if(this.dropping){for(e=this.bufferList.shift(),this.player.debug.warn("CommonDemux",`_loop is dropping and data.ts is ${e.ts}, data.type is ${e.type}, data.isIFrame is ${e.isIFrame}, delay is ${this.delay} ,buffer list is ${this.bufferList.length}`);!e.isIFrame&&this.bufferList.length;)e=this.bufferList.shift();const t=this.getDelayNotUpdateDelay(e.ts,e.type);e.isIFrame&&t<=this.getNotDroppingDelayTs()&&(this.player.debug.log("CommonDemux",`_loop data isIFrame is true and delay is ${this.delay}`),this.dropping=!1,this._doDecoderDecode(e),this._decodeNext(e))}else if(this.player.isPlayback()||this.player.isPlayUseMSE()||0===t)for(;this.bufferList.length;)e=this.bufferList.shift(),this._doDecoderDecode(e);else if(e=this.bufferList[0],-1===this.getDelay(e.ts,e.type))this.player.debug.log("CommonDemux",`delay is -1 and data.ts is ${e.ts} data.type is ${e.type}`),this.bufferList.shift(),this._doDecoderDecode(e),this._decodeNext(e);else if(this.delay>i+t&&s)this.hasIframeInBufferList()?(this.player.debug.warn("CommonDemux",`_loop delay is ${this.delay}, set dropping is true`),this.resetAllDelay(),this.dropping=!0,this.player.updateStats({isDropping:!0})):(this.bufferList.shift(),this._doDecoderDecode(e),this._decodeNext(e));else for(;this.bufferList.length;){if(e=this.bufferList[0],!(this.getDelay(e.ts,e.type)>t)){this.delay<0&&this.player.debug.warn("CommonDemux",`_loop delay is ${this.delay} bufferList is ${this.bufferList}`);break}this.bufferList.shift(),this._doDecoderDecode(e)}}else-1!==this.delay&&this.player.debug.log("CommonDemux","loop() bufferList is empty and reset delay"),this.resetAllDelay()}_doDecode(e,t,i,s){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;const a=this.player;let o={ts:i,cts:r,type:t,isIFrame:!1};this.player.isPlayer()?(t===Ge&&a._opt.playType===_&&this.calcNetworkDelay(i),a._opt.useWCS&&!a._opt.useOffscreen||a._opt.useMSE?(t===Ge&&(o.isIFrame=s),this.pushBuffer(e,o)):t===Ge?a.decoderWorker&&a.decoderWorker.decodeVideo(e,i,s):t===je&&a._opt.hasAudio&&a.decoderWorker&&a.decoderWorker.decodeAudio(e,i)):this.player.isPlayback()&&(t===Ge&&(o.isIFrame=s),this.player.isPlaybackOnlyDecodeIFrame()?t===Ge&&s&&this.pushBuffer(e,o):this.player.isPlaybackCacheBeforeDecodeForFpsRender()||1===this.player.getPlaybackRate()?this.pushBuffer(e,o):this.pushBuffer(e,o,!1))}_doDecodeByHls(e,t,i,s){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=!1;if(t===je&&Wr(e)&&(this.player.debug.log("CommonDemux",`hls pushBuffer audio ts is ${i}, isAacCodecPacket is true`),a=!0,this.player.isRecordTypeFlv())){const t=new Uint8Array(e);this.player.recorder.addAACSequenceHeader(t,i)}let o=!1;if(t===Ge&&s&&go(e)&&(this.player.debug.log("CommonDemux",`hls pushBuffer video ts is ${i}, isVideoSequenceHeader is true`),o=!0,this.player.isRecordTypeFlv())){const t=new Uint8Array(e);this.player.recorder.addVideoSequenceHeader(t,i)}this.player.recording&&Ao(o)&&Ao(a)&&this.handleRecording(e,t,i,s,r),t===Ge?this._doDecoderDecode({ts:i,cts:r,payload:e,type:Ge,isIFrame:s}):t===je&&this._doDecoderDecode({ts:i,payload:e,type:je})}_doDecodeByFmp4(e,t,i,s){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;this._doDecode(e,t,i,s,r)}_doDecodeByTs(e,t,i,s){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;this._doDecode(e,t,i,s,r)}_doDecodeByPs(e,t,i,s){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;this._doDecode(e,t,i,s,r)}_decodeNext(e){const t=e.ts;if(0===this.bufferList.length)return;let i=this.bufferList[0];const s=i.ts-t,r=e.type===Ge&&i.type===je,a=e.type===Ge&&go(e.payload);(s<=20||r||a)&&(this.player.debug.log("CommonDemux",`decode data type is ${e.type} and\n ts is ${t} next data type is ${i.type} ts is ${i.ts}\n diff is ${s} and isVideoAndNextAudio is ${r} and isVideoSqeHeader is ${a}`),this.bufferList.shift(),this._doDecoderDecode(i))}_doDecoderDecode(e){const t=this.player,{webcodecsDecoder:i,mseDecoder:s}=t;this.player.isPlayer()&&this.player.updateStats({buf:this.delay}),e.type===je?t._opt.hasAudio&&(t._opt.useMSE&&t._opt.mseDecodeAudio?s.decodeAudio(e.payload,e.ts):t.decoderWorker&&t.decoderWorker.decodeAudio(e.payload,e.ts)):e.type===Ge&&(t._opt.isEmitSEI&&this.findSei(e.payload,e.ts),t._opt.useWCS&&!t._opt.useOffscreen?i.decodeVideo(e.payload,e.ts,e.isIFrame,e.cts):t._opt.useMSE?s.decodeVideo(e.payload,e.ts,e.isIFrame,e.cts):t.decoderWorker&&t.decoderWorker.decodeVideo(e.payload,e.ts,e.isIFrame))}pushBuffer(e,t){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=this.player._opt.videoBuffer,r=this.player._opt.videoBufferDelay,a=this.player.isPlayer();if(t.type===je&&Wr(e)){if(this.player.debug.log("CommonDemux",`pushBuffer() audio ts is ${t.ts}, isAacCodecPacket is true`),this.player.isRecordTypeFlv()){const i=new Uint8Array(e);this.player.recorder.addAACSequenceHeader(i,t.ts)}this._doDecoderDecode({ts:t.ts,payload:e,type:je})}else if(t.type===Ge&&t.isIFrame&&go(e)){if(this.player.debug.log("CommonDemux",`pushBuffer() video ts is ${t.ts}, isVideoSequenceHeader is true`),this.player.isRecordTypeFlv()){const i=new Uint8Array(e);this.player.recorder.addVideoSequenceHeader(i,t.ts)}this._doDecoderDecode({ts:t.ts,payload:e,type:Ge,isIFrame:t.isIFrame,cts:t.cts})}else{if(this.player.recording&&this.handleRecording(e,t.type,t.ts,t.isIFrame,t.cts),a){if(this.preTimestampDuration>0&&this.preTimestamp>0&&t.type===Ge){const e=t.ts-this.preTimestamp,i=this.preTimestampDuration+this.preTimestampDuration/2;e>=i&&this.player.debug.log("CommonDemux",`pushBuffer() video\n ts is ${t.ts}, preTimestamp is ${this.preTimestamp},\n diff is ${e} and preTimestampDuration is ${this.preTimestampDuration} and maxDiff is ${i}\n maybe trigger black screen or flower screen`)}if(this.preTimestamp>0&&t.ts<this.preTimestamp&&t.type===Ge&&this.preTimestamp-t.ts>Z&&(this.player.debug.warn("CommonDemux",`pushBuffer() video\n ts is ${t.ts}, preTimestamp is ${this.preTimestamp},\n diff is ${this.preTimestamp-t.ts} more than 3600000\n and resetAllDelay()`),this.resetAllDelay()),t.ts<=this.preTimestamp&&this.preTimestamp>0&&t.type===Ge&&(this.player.debug.warn("CommonDemux",`pushBuffer() video and isIFrame is ${t.isIFrame} and\n ts is ${t.ts} less than (or equal) preTimestamp is ${this.preTimestamp} and\n payloadBufferSize is ${e.byteLength} and prevPayloadBufferSize is ${this.prevPayloadBufferSize}`),this.player._opt.isDropSameTimestampGop&&Ao(t.isIFrame)&&this.player.isDemuxDecodeFirstIIframeInit())){const e=this.hasIframeInBufferList(),t=Ao(this.isPushDropping);return this.player.debug.log("CommonDemux",`pushBuffer(), isDropSameTimestampGop is true and\n hasIframe is ${e} and isNotPushDropping is ${t} and next drop buffer`),void(e&&t?this.dropBuffer$2():this.clearBuffer(!0))}if(this.player.isDemuxDecodeFirstIIframeInit()){let e=this.getDelayNotUpdateDelay(t.ts,t.type);this.pushLatestDelay=e;const i=r+s;this.player._opt.useMSE?e>i&&this.delay<i&&this.delay>0&&this.hasIframeInBufferList()&&!1===this.isPushDropping&&(this.player.debug.warn("CommonDemux",`useMSE, pushLatestDelay is ${e} > ${r+s}, bufferList is ${this.bufferList.length}, delay is ${this.delay} and dropBuffer$2()`),this.dropBuffer$2()):e>i&&this.delay<i&&this.delay>0&&this.hasIframeInBufferList()&&!1===this.isPushDropping&&(this.player.debug.warn("CommonDemux",`useWCS, pushLatestDelay is ${e} > ${r+s},bufferList is ${this.bufferList.length}, delay is ${this.delay} and dropBuffer$2()`),this.dropBuffer$2()),this.isHistoryIntervalDiffTimeAllLarge()&&Ao(this.player.visibility)&&(this.player._opt.useMSE?this.hasIframeInBufferList()&&!1===this.isPushDropping&&(this.player.debug.warn("CommonDemux",`useMSE, page visibility is false and\n history interval diff is ${this.historyIntervalDiffTimeList.join(",")} and\n bufferList is ${this.bufferList.length},\n delay is ${this.delay} and dropBuffer$2()`),this.dropBuffer$2()):this.hasIframeInBufferList()&&!1===this.isPushDropping&&(this.player.debug.warn("CommonDemux",`useWCS, page visibility is false and\n history interval diff is ${this.historyIntervalDiffTimeList.join(",")} and\n bufferList is ${this.bufferList.length},\n delay is ${this.delay} and dropBuffer$2()`),this.dropBuffer$2()))}t.type===Ge&&(this.preTimestamp>0&&(this.preTimestampDuration=t.ts-this.preTimestamp),this.prevPayloadBufferSize=e.byteLength,this.preTimestamp=t.ts)}if(i?t.type===je?this.bufferList.push({ts:t.ts,payload:e,type:je}):t.type===Ge&&this.bufferList.push({ts:t.ts,cts:t.cts,payload:e,type:Ge,isIFrame:t.isIFrame}):t.type===Ge?this._doDecoderDecode({ts:t.ts,cts:t.cts,payload:e,type:Ge,isIFrame:t.isIFrame}):t.type===je&&this._doDecoderDecode({ts:t.ts,payload:e,type:je}),this.player.isPlaybackCacheBeforeDecodeForFpsRender()&&(Ua(this.playbackStreamVideoFps)||Ua(this.playbackStreamAudioFps))){let e=this.playbackStreamVideoFps,t=this.playbackStreamAudioFps;if(Ua(this.playbackStreamVideoFps)&&(e=ho(this.bufferList,Ge),e>0&&(this.playbackStreamVideoFps=e,this.player.video&&this.player.video.setStreamFps(this.playbackStreamVideoFps),this.playbackStreamFps=t?e+t:e,Ao(this.player._opt.hasAudio)&&(this.player.debug.log(this.TAG_NAME,"playbackCacheBeforeDecodeForFpsRender,_opt.hasAudio is false and set streamAudioFps is 0"),this.playbackStreamAudioFps=0),this.initPlaybackCacheLoop())),Ua(this.playbackStreamAudioFps)&&(t=ho(this.bufferList,je),t>0&&(this.playbackStreamAudioFps=t,this.playbackStreamFps=e?e+t:t,this.initPlaybackCacheLoop())),Ua(this.playbackStreamVideoFps)&&Ua(this.playbackStreamAudioFps)){const i=this.bufferList.map((e=>({type:e.type,ts:e.ts})));this.player.debug.log("CommonDemux",`playbackCacheBeforeDecodeForFpsRender, calc streamAudioFps is ${t}, streamVideoFps is ${e}, bufferListLength is ${this.bufferList.length} and ts list is ${JSON.stringify(i)}`)}const i=this.getAudioBufferLength()>0,s=i?60:40;this.bufferList.length>=s&&(this.debug.warn("CommonDemux",`playbackCacheBeforeDecodeForFpsRender, bufferListLength is ${this.bufferList.length} more than ${s}, and hasAudio is ${i} an set streamFps is 25`),this.playbackStreamVideoFps=e,this.player.video&&this.player.video.setStreamFps(this.playbackStreamVideoFps),i?(this.playbackStreamAudioFps=25,this.playbackStreamFps=this.playbackStreamVideoFps+this.playbackStreamAudioFps):this.playbackStreamFps=this.playbackStreamVideoFps,this.initPlaybackCacheLoop())}}}dropBuffer$2(){if(this.bufferList.length>0){let e=this.bufferList.findIndex((e=>yo(e.isIFrame)&&e.type===Ge));if(this.isAllIframeInBufferList())for(let t=0;t<this.bufferList.length;t++){const i=this.bufferList[t],s=this.getDelayNotUpdateDelay(i.ts,i.type);if(s>=this.getNotDroppingDelayTs()){this.player.debug.log("CommonDemux",`dropBuffer$2() isAllIframeInBufferList() is true, and index is ${t} and tempDelay is ${s} and notDroppingDelayTs is ${this.getNotDroppingDelayTs()}`),e=t;break}}if(e>=0){this.isPushDropping=!0,this.player.updateStats({isDropping:!0});const t=this.bufferList.length;this.bufferList=this.bufferList.slice(e);const i=this.bufferList.shift();this.resetAllDelay(),this.getDelay(i.ts,i.type),this._doDecoderDecode(i),this.isPushDropping=!1,this.player.debug.log("CommonDemux",`dropBuffer$2() iFrameIndex is ${e},and old bufferList length is ${t} ,and new bufferList length is ${this.bufferList.length} and new delay is ${this.delay} `)}else this.isPushDropping=!1}0===this.bufferList.length&&(this.isPushDropping=!1)}clearBuffer(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.player.debug.log("CommonDemux",`clearBuffer,buffer length is ${this.bufferList.length}, need clear is ${e} and _opt.checkFirstIFrame is ${this.player._opt.checkFirstIFrame}`),e&&(this.bufferList=[]),this.player.isPlayer()&&(this.resetAllDelay(),yo(this.player._opt.checkFirstIFrame)&&(this.dropping=!0,this.player.updateStats({isDropping:!0}))),this.player.decoderCheckFirstIFrame()}calcNetworkDelay(e){if(!(this.player.isDemuxDecodeFirstIIframeInit()&&e>0))return;null===this.bufferStartDts?(this.bufferStartDts=e,this.bufferStartLocalTs=ha()):e<this.bufferStartDts&&(this.player.debug.warn("CommonDemux",`calcNetworkDelay dts is ${e} and bufferStartDts is ${this.bufferStartDts}`),this.bufferStartDts=e,this.bufferStartLocalTs=ha());let t=e-this.bufferStartDts,i=ha()-this.bufferStartLocalTs,s=i>t?i-t:0;s>this.player._opt.networkDelay&&this.player._opt.playType===_&&(this.player.debug.warn("CommonDemux",`delay is more than networkDelay and now dts:${e},start dts is ${this.bufferStartDts}, vs start is ${t},local diff is ${i} ,delay is ${s}, _opt.networkDelay is ${this.player._opt.networkDelay}`),this.player.emit(lt.networkDelayTimeout,s)),this.player.updateStats({netBuf:s})}calcIframeIntervalTimestamp(e){if(null===this.preIframeTs)this.preIframeTs=e;else if(this.preIframeTs<e){const t=e-this.preIframeTs;this.player&&(this.player.videoIframeIntervalTs=t),this.preIframeTs=e}}calcBufferFps(e){}getNotDroppingDelayTs(){return this.player._opt.videoBuffer+this.player._opt.videoBufferDelay/2}getMaxDelayTs(){return this.player._opt.videoBuffer+this.player._opt.videoBufferDelay}getPushLatestDelay(){return this.pushLatestDelay}getVideoBufferLength(){let e=0;return this.bufferList.forEach((t=>{t.type===Ge&&(e+=1)})),e}getAudioBufferLength(){let e=0;return this.bufferList.forEach((t=>{t.type===je&&(e+=1)})),e}hasIframeInBufferList(){return this.bufferList.some((e=>e.type===Ge&&e.isIFrame))}isAllIframeInBufferList(){const e=this.getVideoBufferLength();let t=0;return this.bufferList.forEach((e=>{e.type===Ge&&e.isIFrame&&(t+=1)})),e===t}getInputByteLength(){return 0}getIsStreamTsMoreThanLocal(){return this.isStreamTsMoreThanLocal}close(){}reset(){}findSei(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=4;Oa(this.nalUnitSize)&&(s=this.nalUnitSize);const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(e.length<4)return;const i=e.length,s=[];let r,a=0;for(;a+t<i;)if(r=ra(e,a),3===t&&(r>>>=8),a+=t,r){if(a+r>i)break;s.push(e.subarray(a,a+r)),a+=r}return s}(e.slice(5),s);if(Ao(i)){const e=this.player.getVideoInfo();e&&e.encType&&(i=e.encType===Tt)}r.forEach((e=>{const s=i?e[0]>>>1&63:31&e[0];(i&&(s===Kt||s===qt)||Ao(i)&&s===Bt)&&this.player.emit(lt.videoSEI,{ts:t,data:e})}))}handleRecording(e,t,i,s,r){if(this.player.isRecordTypeFlv()){const s=new Uint8Array(e);t===Ge?this.player.recorder.addVideo(s,i):t===je&&this.player.recorder.addAudio(s,i)}else if(this.player.isRecordTypeMp4()){const a=new Uint8Array(e);if(this.player.recorder.isWasmMp4()){if(t===Ge)this.player.recorder.handleAddNaluTrack(a.slice(5),s,i,r);else if(t===je){const t=new Uint8Array(e);this.player.recorder.handleAddAudioTrack(Jr(t)?t.slice(2):t.slice(1),i)}}else t===Ge&&this.player.recorder.handleAddNaluTrack(a.slice(5),s,i,r)}}updateNalUnitSize(e){const t=15&e[0];this.player.video.updateVideoInfo({encTypeCode:t});const i=t===wt;this.nalUnitSize=function(e,t){let i=null;return t?e.length>=28&&(i=1+(3&e[26])):e.length>=12&&(i=1+(3&e[9])),i}(e,i),this.player.debug.log(this.TAG_NAME,`demux() isVideoSequenceHeader is true and isHevc is ${i} and nalUnitSize is ${this.nalUnitSize}`)}cryptoPayload(e,t){let i=e,s=this.player;if(s._opt.isM7sCrypto)if(s._opt.cryptoKey&&s._opt.cryptoKey.byteLength>0&&s._opt.cryptoIV&&s._opt.cryptoIV.byteLength>0){const t=this.player.video.getVideoInfo();t.encTypeCode?i=function(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t=new Uint8Array(t),i=new Uint8Array(i);const r=e.byteLength;let a=5;for(;a<r;){let o=yd(e.slice(a,a+4));if(o>r)break;let n=e[a+4],l=!1;if(s?(n=n>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(n)):(n&=31,l=1===n||5===n),l){const s=e.slice(a+4+2,a+4+o);let r=new fd.ModeOfOperation.ctr(t,new fd.Counter(i));const n=r.decrypt(s);r=null,e.set(n,a+4+2)}a=a+4+o}return e}(e,s._opt.cryptoKey,s._opt.cryptoIV,t.encTypeCode===wt):s.debug.warn(this.TAG_NAME,`videoInfo.encTypeCode is ${t.encTypeCode}`)}else s.debug.error(this.TAG_NAME,`isM7sCrypto cryptoKey.length is ${s._opt.cryptoKey&&s._opt.cryptoKey.byteLength} or cryptoIV.length is ${s._opt.cryptoIV&&s._opt.cryptoIV.byteLength} null`);else if(s._opt.isSm4Crypto)s._opt.sm4CryptoKey&&t?i=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=e.byteLength;let r=5;for(;r<s;){let a=Pd(e.slice(r,r+4));if(a>s)break;let o=e[r+4],n=!1;if(i?(o=o>>>1&63,n=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(o)):(o&=31,n=1===o||5===o),n){const i=Id(e.slice(r+4+2,r+4+a),t,0,{padding:"none",output:"array"});e.set(i,r+4+2)}r=r+4+a}return e}(e,s._opt.sm4CryptoKey):s._opt.sm4CryptoKey||s.debug.error(this.TAG_NAME,"isSm4Crypto opt.sm4CryptoKey is null");else if(s._opt.isXorCrypto)if(s._opt.cryptoKey&&s._opt.cryptoKey.byteLength>0&&s._opt.cryptoIV&&s._opt.cryptoIV.byteLength>0){const t=this.player.video.getVideoInfo();i=function(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=e.byteLength;let a=5;for(;a<r;){let o=Md(e.slice(a,a+4));if(o>r)break;let n=e[a+4],l=!1;if(s?(n=n>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(n)):(n&=31,l=1===n||5===n),l){const s=Bd(e.slice(a+4,a+4+o),t,i);e.set(s,a+4)}a=a+4+o}return e}(e,s._opt.cryptoKey,s._opt.cryptoIV,t.encTypeCode===wt)}else s.debug.error(this.TAG_NAME,"isXorCrypto opt.xorCryptoKey is null");return i}cryptoPayloadAudio(e){let t=e,i=this.player;if(i._opt.isM7sCrypto)if(i._opt.cryptoKey&&i._opt.cryptoKey.byteLength>0&&i._opt.cryptoIV&&i._opt.cryptoIV.byteLength>0){e[0]>>4===Et&&(t=function(e,t,i){if(e.byteLength<=30)return e;const s=e.slice(32);let r=new fd.ModeOfOperation.ctr(t,new fd.Counter(i));const a=r.decrypt(s);return r=null,e.set(a,32),e}(e,i._opt.cryptoKey,i._opt.cryptoIV))}else i.debug.error(this.TAG_NAME,`isM7sCrypto cryptoKey.length is ${i._opt.cryptoKey&&i._opt.cryptoKey.byteLength} or cryptoIV.length is ${i._opt.cryptoIV&&i._opt.cryptoIV.byteLength} null`);return t}_decodeEnhancedH265Video(e,t){const i=e[0],s=48&i,r=15&i,a=e.slice(1,5),o=new ArrayBuffer(4),n=new Uint32Array(o),l="a"==String.fromCharCode(a[0]);if(r===wr){if(s===Er){const t=e.slice(5);if(l);else{const e=new Uint8Array(5+t.length);e.set([28,0,0,0,0],0),e.set(t,5),this.updateNalUnitSize(e),this.player.debug.log(this.TAG_NAME,`demux() isVideoSequenceHeader(enhancedH265) is true and nalUnitSize is ${this.nalUnitSize}`),this._doDecode(e,Ge,0,!0,0)}}}else if(r===Sr){let i=e,r=0;const a=s===Er;if(a&&this.calcIframeIntervalTimestamp(t),l);else{n[0]=e[4],n[1]=e[3],n[2]=e[2],n[3]=0,r=n[0];i=Wn(e.slice(8),a),i=this.cryptoPayload(i,a),this._doDecode(i,Ge,t,a,r)}}else if(r===Tr){const i=s===Er,r=e.slice(5);i&&this.calcIframeIntervalTimestamp(t);let a=Wn(r,i);a=this.cryptoPayload(a,i),this._doDecode(a,Ge,t,i,0)}}_isEnhancedH265Header(e){return 128==(128&e)}}var Fd=function(e,t,i,s){return new(i||(i=Promise))((function(r,a){function o(e){try{l(s.next(e))}catch(e){a(e)}}function n(e){try{l(s.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,n)}l((s=s.apply(e,t||[])).next())}))};const Od=Symbol(32),Nd=Symbol(16),jd=Symbol(8);class Gd{constructor(e){this.g=e,this.consumed=0,e&&(this.need=e.next().value)}setG(e){this.g=e,this.demand(e.next().value,!0)}consume(){this.buffer&&this.consumed&&(this.buffer.copyWithin(0,this.consumed),this.buffer=this.buffer.subarray(0,this.buffer.length-this.consumed),this.consumed=0)}demand(e,t){return t&&this.consume(),this.need=e,this.flush()}read(e){return Fd(this,void 0,void 0,(function*(){return this.lastReadPromise&&(yield this.lastReadPromise),this.lastReadPromise=new Promise(((t,i)=>{var s;this.reject=i,this.resolve=e=>{delete this.lastReadPromise,delete this.resolve,delete this.need,t(e)};this.demand(e,!0)||null===(s=this.pull)||void 0===s||s.call(this,e)}))}))}readU32(){return this.read(Od)}readU16(){return this.read(Nd)}readU8(){return this.read(jd)}close(){var e;this.g&&this.g.return(),this.buffer&&this.buffer.subarray(0,0),null===(e=this.reject)||void 0===e||e.call(this,new Error("EOF")),delete this.lastReadPromise}flush(){if(!this.buffer||!this.need)return;let e=null;const t=this.buffer.subarray(this.consumed);let i=0;const s=e=>t.length<(i=e);if("number"==typeof this.need){if(s(this.need))return;e=t.subarray(0,i)}else if(this.need===Od){if(s(4))return;e=t[0]<<24|t[1]<<16|t[2]<<8|t[3]}else if(this.need===Nd){if(s(2))return;e=t[0]<<8|t[1]}else if(this.need===jd){if(s(1))return;e=t[0]}else if("buffer"in this.need){if("byteOffset"in this.need){if(s(this.need.byteLength-this.need.byteOffset))return;new Uint8Array(this.need.buffer,this.need.byteOffset).set(t.subarray(0,i)),e=this.need}else if(this.g)return void this.g.throw(new Error("Unsupported type"))}else{if(s(this.need.byteLength))return;new Uint8Array(this.need).set(t.subarray(0,i)),e=this.need}return this.consumed+=i,this.g?this.demand(this.g.next(e).value,!0):this.resolve&&this.resolve(e),e}write(e){if(e instanceof Uint8Array?this.malloc(e.length).set(e):"buffer"in e?this.malloc(e.byteLength).set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)):this.malloc(e.byteLength).set(new Uint8Array(e)),!this.g&&!this.resolve)return new Promise((e=>this.pull=e));this.flush()}writeU32(e){this.malloc(4).set([e>>24&255,e>>16&255,e>>8&255,255&e]),this.flush()}writeU16(e){this.malloc(2).set([e>>8&255,255&e]),this.flush()}writeU8(e){this.malloc(1)[0]=e,this.flush()}malloc(e){if(this.buffer){const t=this.buffer.length,i=t+e;if(i<=this.buffer.buffer.byteLength-this.buffer.byteOffset)this.buffer=new Uint8Array(this.buffer.buffer,this.buffer.byteOffset,i);else{const e=new Uint8Array(i);e.set(this.buffer),this.buffer=e}return this.buffer.subarray(t,i)}return this.buffer=new Uint8Array(e),this.buffer}}Gd.U32=Od,Gd.U16=Nd,Gd.U8=jd;class zd extends Ud{constructor(e){super(e),this.TAG_NAME="FlvDemux",this.input=new Gd(this.demux()),e.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.input=null,this.player.debug.log(this.TAG_NAME,"destroy")}dispatch(e){this.input?this.input.write(e):this.player&&this.player.debug.warn(this.TAG_NAME,"dispatch() this.input is null")}*demux(){yield 9;const e=new ArrayBuffer(4),t=new Uint8Array(e),i=new Uint32Array(e),s=this.player;for(;;){if(!this.input)return;t[3]=0;const e=yield 15,r=e[4];t[0]=e[7],t[1]=e[6],t[2]=e[5];const a=i[0];t[0]=e[10],t[1]=e[9],t[2]=e[8],t[3]=e[11];let o=i[0];const n=(yield a).slice();if(!s)return;switch(r){case ze:if(s._opt.hasAudio&&(s.updateStats({abps:n.byteLength}),n.byteLength>0)){let e=n;yo(this.player._opt.m7sCryptoAudio)&&(e=this.cryptoPayloadAudio(n)),this._doDecode(e,je,o)}break;case $e:if(s._opt.hasVideo&&n.length>=6){let e=o;s.updateStats({vbps:n.byteLength,dts:e}),s._times.demuxStart||(s._times.demuxStart=ha());const t=n[0];if(this._isEnhancedH265Header(t))this._decodeEnhancedH265Video(n,e);else{const e=15&t;let s=(t>>4&15)===Vs;const r=e===vt;if(Ao(e===wt||r))return void this.player.debug.warn(this.TAG_NAME,`demux() codecId is ${e} and ignore`);s&&(this.calcIframeIntervalTimestamp(o),null===this.nalUnitSize&&go(n)&&this.updateNalUnitSize(n)),i[0]=n[4],i[1]=n[3],i[2]=n[2],i[3]=0;let a=i[0],l=this.cryptoPayload(n,s);this._doDecode(l,Ge,o,s,a)}}else n.length<6&&s.debug.warn(this.TAG_NAME,`payload.length is ${n.length} less than 6 and ignore`);break;case He:if(this.player.isRecordTypeFlv()){const e=new Uint8Array(n);this.player.recorder.addMetaData(e)}const e=cl(n);e&&e.onMetaData&&s.updateMetaData(e.onMetaData);break;default:s.debug.log(this.TAG_NAME,`demux() type is ${r}`)}}}close(){this.input=null}getInputByteLength(){let e=0;return this.input&&this.input.buffer&&(e=this.input.buffer.byteLength),e}}class $d extends Ud{constructor(e){super(e),this.TAG_NAME="M7sDemux",e.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.player.debug.log(this.TAG_NAME,"destroy")}dispatch(e){const t=this.player,i=new DataView(e),s=i.getUint8(0),r=i.getUint32(1,!1),a=new ArrayBuffer(4),o=new Uint32Array(a);switch(s){case je:if(t._opt.hasAudio){const i=new Uint8Array(e,5);t.updateStats({abps:i.byteLength}),i.byteLength>0&&this._doDecode(i,s,r)}break;case Ge:if(t._opt.hasVideo)if(t._times.demuxStart||(t._times.demuxStart=ha()),i.byteLength>=11){const a=new Uint8Array(e,5);let n=r;t.updateStats({vbps:a.byteLength,dts:n});const l=a[0];if(this._isEnhancedH265Header(l))this._decodeEnhancedH265Video(a,r);else{const e=i.getUint8(5)>>4==1;e&&this.calcIframeIntervalTimestamp(r),o[0]=a[4],o[1]=a[3],o[2]=a[2],o[3]=0;let t=o[0],n=this.cryptoPayload(a,e);this._doDecode(n,s,r,e,t)}}else this.player.debug.warn(this.TAG_NAME,"dispatch","dv byteLength is",i.byteLength,"and return")}}}class Hd extends zd{constructor(e){super(e),e.debug.log("WebTransportDemux","init")}destroy(){this.player.debug.log("WebTransportDemux","destroy"),super.destroy()}}var Vd,Wd=Nr((function(e){e.exports=function(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e},e.exports.__esModule=!0,e.exports.default=e.exports})),Jd=(Vd=Wd)&&Vd.__esModule&&Object.prototype.hasOwnProperty.call(Vd,"default")?Vd.default:Vd;class qd extends Ud{constructor(e){super(e),Jd(this,"TAG_NAME","NakedFlowDemux"),this.lastBuf=null,this.vps=null,this.sps=null,this.pps=null,this.streamVideoType=null,this.streamAudioType=null,this.tempNaluBufferList=new Uint8Array(0),this.localDts=0,this.isSendSeqHeader=!1,this.isSendAACSeqHeader=!1,e.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.lastBuf=null,this.vps=null,this.sps=null,this.pps=null,this.streamVideoType=null,this.streamAudioType=null,this.tempNaluBufferList=new Uint8Array(0),this.localDts=0,this.localAudioDts=0,this.isSendSeqHeader=!1,this.isSendAACSeqHeader=!1,this.player.debug.log(this.TAG_NAME,"destroy")}dispatch(e){this.player;const t=new Uint8Array(e);this.extractNALu$2(t)}addNaluToBuffer(e){const t=e.byteLength+this.tempNaluBufferList.byteLength,i=new Uint8Array(t);i.set(this.tempNaluBufferList,0),i.set(e,this.tempNaluBufferList.byteLength),this.tempNaluBufferList=i}downloadNakedFlowFile(){const e=new Blob([this.tempNaluBufferList]);try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=Date.now()+".h264",t.click(),window.URL.revokeObjectURL(t.href)}catch(e){console.error("downloadTempNalu",e)}}getNaluDts(){const e=this.player._opt.nakedFlowFps;return this.localDts=this.localDts+parseInt(1e3/e),this.localDts}getNaluAudioDts(){const e=this.player.audio.audioContext.sampleRate,t=this.player.audio.audioBufferSize;return this.localDts+parseInt(t/e*1e3)}extractNALu(e){let t,i,s=0,r=e.byteLength,a=0,o=[];for(;s<r;)switch(t=e[s++],a){case 0:0===t&&(a=1);break;case 1:a=0===t?2:0;break;case 2:case 3:0===t?a=3:1===t&&s<r?(e[s],i&&o.push(e.subarray(i,s-a-1)),i=s,a=0):a=0}return i&&o.push(e.subarray(i,r)),o}extractNALu$2(e){let t=null;if(!e||e.byteLength<1)return;this.lastBuf?(t=new Uint8Array(e.byteLength+this.lastBuf.length),t.set(this.lastBuf),t.set(new Uint8Array(e),this.lastBuf.length)):t=new Uint8Array(e);let i=0,s=-1,r=-2;const a=new Array;for(let e=0;e<t.length;e+=2){const i=t[e],o=t[e+1];0==s&&0==i&&0==o?a.push(e-1):1==o&&0==i&&0==s&&0==r&&a.push(e-2),r=i,s=o}if(a.length>1)for(let e=0;e<a.length-1;++e){const s=t.subarray(a[e],a[e+1]+1);this.handleNALu(s),i=a[e+1]}else i=a[0];if(0!=i&&i<t.length)this.lastBuf=t.subarray(i);else{this.lastBuf||(this.lastBuf=t);const i=new Uint8Array(this.lastBuf.length+e.byteLength);i.set(this.lastBuf),i.set(new Uint8Array(e),this.lastBuf.length),this.lastBuf=i}}handleNALu(e){e.byteLength<4?this.player.debug.warn(this.TAG_NAME,`handleNALu nalu byteLength is ${e.byteLength} <= 4`):(e=e.slice(4),this.handleVideoNalu(e))}handleVideoNalu(e){const t=new Uint8Array(e);if(this.streamVideoType||(this.streamVideoType=function(e){let t=null,i=31&e[0];return i!==Rt&&i!==Dt||(t=St),t||(i=(126&e[0])>>1,i!==Gt&&i!==$t&&i!==Vt||(t=Tt)),t}(t)),this.streamVideoType===St){const e=this.handleAddNaluStartCode(t),i=this.extractNALu(e);if(0===i.length)return void this.player.debug.warn(this.TAG_NAME,"handleVideoNalu","naluList.length === 0");const s=[];if(i.forEach((e=>{const t=Pn(e);t===Dt||t===Rt?this.handleVideoH264Nalu(e):Mn(t)&&s.push(e)})),1===s.length)this.handleVideoH264Nalu(s[0]);else{const e=function(e){if(0===e.length)return!1;const t=Pn(e[0]);for(let i=1;i<e.length;i++)if(t!==Pn(e[i]))return!1;return!0}(s);if(e){const e=Pn(s[0]),t=Un(e);this.handleVideoH264NaluList(s,t,e)}else s.forEach((e=>{this.handleVideoH264Nalu(e)}))}}else if(this.streamVideoType===Tt)if(this.player._opt.nakedFlowH265DemuxUseNew){const e=this.handleAddNaluStartCode(t),i=this.extractNALu(e);if(0===i.length)return void this.player.debug.warn(this.TAG_NAME,"handleVideoNalu","h265 naluList.length === 0");const s=[];if(i.forEach((e=>{const t=Jn(e);t===Vt||t===$t||t===Gt?this.handleVideoH265Nalu(e):qn(t)&&s.push(e)})),1===s.length)this.handleVideoH265Nalu(s[0]);else{const e=function(e){if(0===e.length)return!1;const t=Jn(e[0]);for(let i=1;i<e.length;i++)if(t!==Jn(e[i]))return!1;return!0}(s);if(e){const e=Jn(s[0]),t=Kn(e);this.handleVideoH265NaluList(s,t,e)}else s.forEach((e=>{this.handleVideoH265Nalu(e)}))}}else{Jn(t)===Vt?this.extractH265PPS(t):this.handleVideoH265Nalu(t)}else this.player.debug.error(this.TAG_NAME," this.streamVideoType is null")}extractH264PPS(e){const t=this.handleAddNaluStartCode(e);this.extractNALu(t).forEach((e=>{Bn(Pn(e))?this.extractH264SEI(e):this.handleVideoH264Nalu(e)}))}extractH265PPS(e){const t=this.handleAddNaluStartCode(e);this.extractNALu(t).forEach((e=>{const t=Jn(e);t===Jt?this.extractH265SEI(e):this.handleVideoH265Nalu(e)}))}extractH264SEI(e){const t=this.handleAddNaluStartCode(e);this.extractNALu(t).forEach((e=>{this.handleVideoH264Nalu(e)}))}extractH265SEI(e){const t=this.handleAddNaluStartCode(e);this.extractNALu(t).forEach((e=>{this.handleVideoH265Nalu(e)}))}handleAddNaluStartCode(e){const t=[0,0,0,1],i=new Uint8Array(e.length+t.length);return i.set(t),i.set(e,t.length),i}handleAudioAACNalu(e){if(!e||e.byteLength<1)return;this.streamAudioType||(this.streamAudioType=Ct.AAC);let t=new Uint8Array(e);const i=t.slice(0,7);if(t=t.slice(7),!this.isSendAACSeqHeader){const e=(192&i[2])>>6,t=(60&i[2])>>2,s=(1&i[2])<<2|(192&i[3])>>6,r=new Uint8Array([175,0,e<<3|(14&t)>>1,(1&t)<<7|s<<3]);this.isSendAACSeqHeader=!0,this._doDecode(r,je,0,!1,0)}const s=this.getNaluAudioDts(),r=new Uint8Array(t.length+2);r.set([175,1],0),r.set(t,2),this._doDecode(r,je,s,!1,0)}handleAudioG711ANalu(e){if(!e||e.byteLength<1)return;this.streamAudioType||(this.streamAudioType=Ct.ALAW);let t=new Uint8Array(e);const i=this.getNaluAudioDts(),s=new Uint8Array(t.length+1);s.set([114],0),s.set(t,1),this._doDecode(s,je,i,!1,0)}handleAudioG711UNalu(e){if(!e||e.byteLength<1)return;this.streamAudioType||(this.streamAudioType=Ct.MULAW);let t=new Uint8Array(e);const i=this.getNaluAudioDts(),s=new Uint8Array(t.length+1);s.set([130],0),s.set(t,1),this._doDecode(s,je,i,!1,0)}handleVideoH264Nalu(e){const t=Pn(e);switch(t){case Rt:this.sps=e;break;case Dt:this.pps=e}if(this.isSendSeqHeader){if(this.sps&&this.pps){const e=Ln({sps:this.sps,pps:this.pps}),t=this.getNaluDts();this._doDecode(e,Ge,t,!0,0),this.sps=null,this.pps=null}if(Mn(t)){this.player._times.demuxStart||(this.player._times.demuxStart=ha());const i=Un(t),s=this.getNaluDts(),r=function(e,t){let i=[];i[0]=t?23:39,i[1]=1,i[2]=0,i[3]=0,i[4]=0,i[5]=e.byteLength>>24&255,i[6]=e.byteLength>>16&255,i[7]=e.byteLength>>8&255,i[8]=255&e.byteLength;const s=new Uint8Array(i.length+e.byteLength);return s.set(i,0),s.set(e,i.length),s}(e,i);this._preDoDecode(r,Ge,s,i,0)}else this.player.debug.warn(this.TAG_NAME,`handleVideoH264Nalu is avc seq head nalType is ${t}`)}else if(this.sps&&this.pps){this.isSendSeqHeader=!0;const e=Ln({sps:this.sps,pps:this.pps});this._doDecode(e,Ge,0,!0,0),this.sps=null,this.pps=null}}handleVideoH264NaluList(e,t,i){if(this.isSendSeqHeader){this.player._times.demuxStart||(this.player._times.demuxStart=ha());const i=this.getNaluDts(),s=In(e.reduce(((e,t)=>{const i=aa(e),s=aa(t),r=new Uint8Array(i.byteLength+s.byteLength);return r.set(i,0),r.set(s,i.byteLength),r})),t);this._preDoDecode(s,Ge,i,t,0)}else this.player.debug.warn(this.TAG_NAME,"handleVideoH264NaluList isSendSeqHeader is false")}handleVideoH265Nalu(e){const t=Jn(e);switch(t){case Gt:this.vps=e;break;case $t:this.sps=e;break;case Vt:this.pps=e}if(this.isSendSeqHeader){if(this.vps&&this.sps&&this.pps){const e=Vn({vps:this.vps,sps:this.sps,pps:this.pps}),t=this.getNaluDts();this._doDecode(e,Ge,t,!0,0),this.vps=null,this.sps=null,this.pps=null}if(qn(t)){this.player._times.demuxStart||(this.player._times.demuxStart=ha());const i=Kn(t),s=this.getNaluDts(),r=function(e,t){let i=[];i[0]=t?28:44,i[1]=1,i[2]=0,i[3]=0,i[4]=0,i[5]=e.byteLength>>24&255,i[6]=e.byteLength>>16&255,i[7]=e.byteLength>>8&255,i[8]=255&e.byteLength;const s=new Uint8Array(i.length+e.byteLength);return s.set(i,0),s.set(e,i.length),s}(e,i);this._preDoDecode(r,Ge,s,i,0)}}else if(this.vps&&this.sps&&this.pps){this.isSendSeqHeader=!0;const e=Vn({vps:this.vps,sps:this.sps,pps:this.pps});this._doDecode(e,Ge,0,!0,0),this.vps=null,this.sps=null,this.pps=null}}handleVideoH265NaluList(e,t,i){if(this.isSendSeqHeader){this.player._times.demuxStart||(this.player._times.demuxStart=ha());const i=this.getNaluDts(),s=Wn(e.reduce(((e,t)=>{const i=aa(e),s=aa(t),r=new Uint8Array(i.byteLength+s.byteLength);return r.set(i,0),r.set(s,i.byteLength),r})),t);this._preDoDecode(s,Ge,i,t,0)}else this.player.debug.warn(this.TAG_NAME,"handleVideoH265NaluList isSendSeqHeader is false")}_preDoDecode(e,t,i,s,r){this.player.updateStats({vbps:e.byteLength,dts:i}),s&&this.calcIframeIntervalTimestamp(i),this._doDecode(e,Ge,i,s,r)}getInputByteLength(){let e=0;return this.lastBuf&&(e=this.lastBuf.byteLength),e}}class Kd extends Ud{constructor(e){super(e),this.player=e,e.debug.log("EmptyDemux","init")}destroy(){super.destroy(),this.player.debug.log("EmptyDemux","destroy")}}var Yd=Nr((function(e,t){var s,r,a,o=(s=new Date,r=4,a={setLogLevel:function(e){r=e==this.debug?1:e==this.info?2:e==this.warn?3:(this.error,4)},debug:function(e,t){void 0===console.debug&&(console.debug=console.log),1>=r&&console.debug("["+o.getDurationString(new Date-s,1e3)+"]","["+e+"]",t)},log:function(e,t){this.debug(e.msg)},info:function(e,t){2>=r&&console.info("["+o.getDurationString(new Date-s,1e3)+"]","["+e+"]",t)},warn:function(e,t){3>=r&&console.warn("["+o.getDurationString(new Date-s,1e3)+"]","["+e+"]",t)},error:function(e,t){4>=r&&console.error("["+o.getDurationString(new Date-s,1e3)+"]","["+e+"]",t)}},a);o.getDurationString=function(e,t){var i;function s(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 r=e/(t||1),a=Math.floor(r/3600);r-=3600*a;var o=Math.floor(r/60),n=1e3*(r-=60*o);return n-=1e3*(r=Math.floor(r)),n=Math.floor(n),(i?"-":"")+a+":"+s(o,2)+":"+s(r,2)+"."+s(n,3)},o.printRanges=function(e){var t=e.length;if(t>0){for(var i="",s=0;s<t;s++)s>0&&(i+=","),i+="["+o.getDurationString(e.start(s))+","+o.getDurationString(e.end(s))+"]";return i}return"(empty)"},t.Log=o;var n=function(e){if(!(e instanceof ArrayBuffer))throw"Needs an array buffer";this.buffer=e,this.dataview=new DataView(e),this.position=0};n.prototype.getPosition=function(){return this.position},n.prototype.getEndPosition=function(){return this.buffer.byteLength},n.prototype.getLength=function(){return this.buffer.byteLength},n.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},n.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()},n.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+1)<<8,i|=this.dataview.getUint8(this.position+2);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+4);break;default:throw"readInt method not implemented for size: "+e}return this.position+=e,i}throw"Not enough bytes in buffer"},n.prototype.readUint8=function(){return this.readAnyInt(1,!1)},n.prototype.readUint16=function(){return this.readAnyInt(2,!1)},n.prototype.readUint24=function(){return this.readAnyInt(3,!1)},n.prototype.readUint32=function(){return this.readAnyInt(4,!1)},n.prototype.readUint64=function(){return this.readAnyInt(8,!1)},n.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"},n.prototype.readCString=function(){for(var e=[];;){var t=this.readUint8();if(0===t)break;e.push(t)}return String.fromCharCode.apply(null,e)},n.prototype.readInt8=function(){return this.readAnyInt(1,!0)},n.prototype.readInt16=function(){return this.readAnyInt(2,!0)},n.prototype.readInt32=function(){return this.readAnyInt(4,!0)},n.prototype.readInt64=function(){return this.readAnyInt(8,!1)},n.prototype.readUint8Array=function(e){for(var t=new Uint8Array(e),i=0;i<e;i++)t[i]=this.readUint8();return t},n.prototype.readInt16Array=function(e){for(var t=new Int16Array(e),i=0;i<e;i++)t[i]=this.readInt16();return t},n.prototype.readUint16Array=function(e){for(var t=new Int16Array(e),i=0;i<e;i++)t[i]=this.readUint16();return t},n.prototype.readUint32Array=function(e){for(var t=new Uint32Array(e),i=0;i<e;i++)t[i]=this.readUint32();return t},n.prototype.readInt32Array=function(e){for(var t=new Int32Array(e),i=0;i<e;i++)t[i]=this.readInt32();return t},t.MP4BoxStream=n;var l=function(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?l.LITTLE_ENDIAN:i};l.prototype={},l.prototype.getPosition=function(){return this.position},l.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 s=new ArrayBuffer(i),r=new Uint8Array(this._buffer);new Uint8Array(s,0,r.length).set(r),this.buffer=s,this._byteLength=t}}},l.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}},l.BIG_ENDIAN=!1,l.LITTLE_ENDIAN=!0,l.prototype._byteLength=0,Object.defineProperty(l.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(l.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(e){this._buffer=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(e){this._byteOffset=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"dataView",{get:function(){return this._dataView},set:function(e){this._byteOffset=e.byteOffset,this._buffer=e.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+e.byteLength}}),l.prototype.seek=function(e){var t=Math.max(0,Math.min(this.byteLength,e));this.position=isNaN(t)||!isFinite(t)?0:t},l.prototype.isEof=function(){return this.position>=this._byteLength},l.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},l.prototype.readInt32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Int32Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readInt16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var i=new Int16Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readInt8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Int8Array(e);return l.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},l.prototype.readUint32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Uint32Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readUint16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var i=new Uint16Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readUint8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Uint8Array(e);return l.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},l.prototype.readFloat64Array=function(e,t){e=null==e?this.byteLength-this.position/8:e;var i=new Float64Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readFloat32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Float32Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readInt32=function(e){var t=this._dataView.getInt32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readInt16=function(e){var t=this._dataView.getInt16(this.position,null==e?this.endianness:e);return this.position+=2,t},l.prototype.readInt8=function(){var e=this._dataView.getInt8(this.position);return this.position+=1,e},l.prototype.readUint32=function(e){var t=this._dataView.getUint32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readUint16=function(e){var t=this._dataView.getUint16(this.position,null==e?this.endianness:e);return this.position+=2,t},l.prototype.readUint8=function(){var e=this._dataView.getUint8(this.position);return this.position+=1,e},l.prototype.readFloat32=function(e){var t=this._dataView.getFloat32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readFloat64=function(e){var t=this._dataView.getFloat64(this.position,null==e?this.endianness:e);return this.position+=8,t},l.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,l.memcpy=function(e,t,i,s,r){var a=new Uint8Array(e,t,r),o=new Uint8Array(i,s,r);a.set(o)},l.arrayToNative=function(e,t){return t==this.endianness?e:this.flipArrayEndianness(e)},l.nativeToEndian=function(e,t){return this.endianness==t?e:this.flipArrayEndianness(e)},l.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 s=i+e.BYTES_PER_ELEMENT-1,r=i;s>r;s--,r++){var a=t[r];t[r]=t[s],t[s]=a}return e},l.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)},l.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))},l.prototype.readCString=function(e){var t=this.byteLength-this.position,i=new Uint8Array(this._buffer,this._byteOffset+this.position),s=t;null!=e&&(s=Math.min(e,t));for(var r=0;r<s&&0!==i[r];r++);var a=String.fromCharCodeUint8.apply(null,[this.mapUint8Array(r)]);return null!=e?this.position+=s-r:r!=t&&(this.position+=1),a};var d=Math.pow(2,32);l.prototype.readInt64=function(){return this.readInt32()*d+this.readUint32()},l.prototype.readUint64=function(){return this.readUint32()*d+this.readUint32()},l.prototype.readInt64=function(){return this.readUint32()*d+this.readUint32()},l.prototype.readUint24=function(){return(this.readUint8()<<16)+(this.readUint8()<<8)+this.readUint8()},t.DataStream=l,l.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),s=document.createElement("a");document.body.appendChild(s),s.setAttribute("href",i),s.setAttribute("download",e),s.setAttribute("target","_self"),s.click(),window.URL.revokeObjectURL(i)},l.prototype._dynamicSize=!0,Object.defineProperty(l.prototype,"dynamicSize",{get:function(){return this._dynamicSize},set:function(e){e||this._trimAlloc(),this._dynamicSize=e}}),l.prototype.shift=function(e){var t=new ArrayBuffer(this._byteLength-e),i=new Uint8Array(t),s=new Uint8Array(this._buffer,e,i.length);i.set(s),this.buffer=t,this.position-=e},l.prototype.writeInt32Array=function(e,t){if(this._realloc(4*e.length),e instanceof Int32Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.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)},l.prototype.writeInt16Array=function(e,t){if(this._realloc(2*e.length),e instanceof Int16Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.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)},l.prototype.writeInt8Array=function(e){if(this._realloc(1*e.length),e instanceof Int8Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.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])},l.prototype.writeUint32Array=function(e,t){if(this._realloc(4*e.length),e instanceof Uint32Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.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)},l.prototype.writeUint16Array=function(e,t){if(this._realloc(2*e.length),e instanceof Uint16Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.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)},l.prototype.writeUint8Array=function(e){if(this._realloc(1*e.length),e instanceof Uint8Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.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])},l.prototype.writeFloat64Array=function(e,t){if(this._realloc(8*e.length),e instanceof Float64Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.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)},l.prototype.writeFloat32Array=function(e,t){if(this._realloc(4*e.length),e instanceof Float32Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.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)},l.prototype.writeInt32=function(e,t){this._realloc(4),this._dataView.setInt32(this.position,e,null==t?this.endianness:t),this.position+=4},l.prototype.writeInt16=function(e,t){this._realloc(2),this._dataView.setInt16(this.position,e,null==t?this.endianness:t),this.position+=2},l.prototype.writeInt8=function(e){this._realloc(1),this._dataView.setInt8(this.position,e),this.position+=1},l.prototype.writeUint32=function(e,t){this._realloc(4),this._dataView.setUint32(this.position,e,null==t?this.endianness:t),this.position+=4},l.prototype.writeUint16=function(e,t){this._realloc(2),this._dataView.setUint16(this.position,e,null==t?this.endianness:t),this.position+=2},l.prototype.writeUint8=function(e){this._realloc(1),this._dataView.setUint8(this.position,e),this.position+=1},l.prototype.writeFloat32=function(e,t){this._realloc(4),this._dataView.setFloat32(this.position,e,null==t?this.endianness:t),this.position+=4},l.prototype.writeFloat64=function(e,t){this._realloc(8),this._dataView.setFloat64(this.position,e,null==t?this.endianness:t),this.position+=8},l.prototype.writeUCS2String=function(e,t,i){null==i&&(i=e.length);for(var s=0;s<e.length&&s<i;s++)this.writeUint16(e.charCodeAt(s),t);for(;s<i;s++)this.writeUint16(0)},l.prototype.writeString=function(e,t,i){var s=0;if(null==t||"ASCII"==t)if(null!=i){var r=Math.min(e.length,i);for(s=0;s<r;s++)this.writeUint8(e.charCodeAt(s));for(;s<i;s++)this.writeUint8(0)}else for(s=0;s<e.length;s++)this.writeUint8(e.charCodeAt(s));else this.writeUint8Array(new TextEncoder(t).encode(e.substring(0,i)))},l.prototype.writeCString=function(e,t){var i=0;if(null!=t){var s=Math.min(e.length,t);for(i=0;i<s;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)}},l.prototype.writeStruct=function(e,t){for(var i=0;i<e.length;i+=2){var s=e[i+1];this.writeType(s,t[e[i]],t)}},l.prototype.writeType=function(e,t,i){var s;if("function"==typeof e)return e(this,t);if("object"==typeof e&&!(e instanceof Array))return e.set(this,t,i);var r=null,a="ASCII",o=this.position;switch("string"==typeof e&&/:/.test(e)&&(s=e.split(":"),e=s[0],r=parseInt(s[1])),"string"==typeof e&&/,/.test(e)&&(s=e.split(","),e=s[0],a=parseInt(s[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,l.BIG_ENDIAN);break;case"int16be":this.writeInt16(t,l.BIG_ENDIAN);break;case"uint32be":this.writeUint32(t,l.BIG_ENDIAN);break;case"int32be":this.writeInt32(t,l.BIG_ENDIAN);break;case"float32be":this.writeFloat32(t,l.BIG_ENDIAN);break;case"float64be":this.writeFloat64(t,l.BIG_ENDIAN);break;case"uint16le":this.writeUint16(t,l.LITTLE_ENDIAN);break;case"int16le":this.writeInt16(t,l.LITTLE_ENDIAN);break;case"uint32le":this.writeUint32(t,l.LITTLE_ENDIAN);break;case"int32le":this.writeInt32(t,l.LITTLE_ENDIAN);break;case"float32le":this.writeFloat32(t,l.LITTLE_ENDIAN);break;case"float64le":this.writeFloat64(t,l.LITTLE_ENDIAN);break;case"cstring":this.writeCString(t,r);break;case"string":this.writeString(t,a,r);break;case"u16string":this.writeUCS2String(t,this.endianness,r);break;case"u16stringle":this.writeUCS2String(t,l.LITTLE_ENDIAN,r);break;case"u16stringbe":this.writeUCS2String(t,l.BIG_ENDIAN,r);break;default:if(3==e.length){for(var n=e[1],d=0;d<t.length;d++)this.writeType(n,t[d]);break}this.writeStruct(e,t)}null!=r&&(this.position=o,this._realloc(r),this.position=o+r)},l.prototype.writeUint64=function(e){var t=Math.floor(e/d);this.writeUint32(t),this.writeUint32(4294967295&e)},l.prototype.writeUint24=function(e){this.writeUint8((16711680&e)>>16),this.writeUint8((65280&e)>>8),this.writeUint8(255&e)},l.prototype.adjustUint32=function(e,t){var i=this.position;this.seek(e),this.writeUint32(t),this.seek(i)},l.prototype.mapInt32Array=function(e,t){this._realloc(4*e);var i=new Int32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i},l.prototype.mapInt16Array=function(e,t){this._realloc(2*e);var i=new Int16Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=2*e,i},l.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},l.prototype.mapUint32Array=function(e,t){this._realloc(4*e);var i=new Uint32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i},l.prototype.mapUint16Array=function(e,t){this._realloc(2*e);var i=new Uint16Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=2*e,i},l.prototype.mapFloat64Array=function(e,t){this._realloc(8*e);var i=new Float64Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=8*e,i},l.prototype.mapFloat32Array=function(e,t){this._realloc(4*e);var i=new Float32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i};var h=function(e){this.buffers=[],this.bufferIndex=-1,e&&(this.insertBuffer(e),this.bufferIndex=0)};(h.prototype=new l(new ArrayBuffer,0,l.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,o.debug("MultiBufferStream","Stream ready for parsing"),!0):(o.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(o.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1))},ArrayBuffer.concat=function(e,t){o.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},h.prototype.reduceBuffer=function(e,t,i){var s;return(s=new Uint8Array(i)).set(new Uint8Array(e,t,i)),s.buffer.fileStart=e.fileStart+t,s.buffer.usedBytes=0,s.buffer},h.prototype.insertBuffer=function(e){for(var t=!0,i=0;i<this.buffers.length;i++){var s=this.buffers[i];if(e.fileStart<=s.fileStart){if(e.fileStart===s.fileStart){if(e.byteLength>s.byteLength){this.buffers.splice(i,1),i--;continue}o.warn("MultiBufferStream","Buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+") already appended, ignoring")}else e.fileStart+e.byteLength<=s.fileStart||(e=this.reduceBuffer(e,0,s.fileStart-e.fileStart)),o.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<s.fileStart+s.byteLength){var r=s.fileStart+s.byteLength-e.fileStart,a=e.byteLength-r;if(!(a>0)){t=!1;break}e=this.reduceBuffer(e,r,a)}}t&&(o.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.push(e),0===i&&(this.buffer=e))},h.prototype.logBufferLevel=function(e){var t,i,s,r,a,n=[],l="";for(s=0,r=0,t=0;t<this.buffers.length;t++)i=this.buffers[t],0===t?(a={},n.push(a),a.start=i.fileStart,a.end=i.fileStart+i.byteLength,l+="["+a.start+"-"):a.end===i.fileStart?a.end=i.fileStart+i.byteLength:((a={}).start=i.fileStart,l+=n[n.length-1].end-1+"], ["+a.start+"-",a.end=i.fileStart+i.byteLength,n.push(a)),s+=i.usedBytes,r+=i.byteLength;n.length>0&&(l+=a.end-1+"]");var d=e?o.info:o.debug;0===this.buffers.length?d("MultiBufferStream","No more buffer in memory"):d("MultiBufferStream",this.buffers.length+" stored buffer(s) ("+s+"/"+r+" bytes), continuous ranges: "+l)},h.prototype.cleanBuffers=function(){var e,t;for(e=0;e<this.buffers.length;e++)(t=this.buffers[e]).usedBytes===t.byteLength&&(o.debug("MultiBufferStream","Removing buffer #"+e),this.buffers.splice(e,1),e--)},h.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,s=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=s,o.debug("ISOFile","Concatenating buffer for box parsing (length: "+t+"->"+this.buffer.byteLength+")"),!0}return!1}return!1},h.prototype.findPosition=function(e,t,i){var s,r=null,a=-1;for(s=!0===e?0:this.bufferIndex;s<this.buffers.length&&(r=this.buffers[s]).fileStart<=t;)a=s,i&&(r.fileStart+r.byteLength<=t?r.usedBytes=r.byteLength:r.usedBytes=t-r.fileStart,this.logBufferLevel()),s++;return-1!==a&&(r=this.buffers[a]).fileStart+r.byteLength>=t?(o.debug("MultiBufferStream","Found position in existing buffer #"+a),a):-1},h.prototype.findEndContiguousBuf=function(e){var t,i,s,r=void 0!==e?e:this.bufferIndex;if(i=this.buffers[r],this.buffers.length>r+1)for(t=r+1;t<this.buffers.length&&(s=this.buffers[t]).fileStart===i.fileStart+i.byteLength;t++)i=s;return i.fileStart+i.byteLength},h.prototype.getEndFilePositionAfter=function(e){var t=this.findPosition(!0,e,!1);return-1!==t?this.findEndContiguousBuf(t):e},h.prototype.addUsedBytes=function(e){this.buffer.usedBytes+=e,this.logBufferLevel()},h.prototype.setAllUsedBytes=function(){this.buffer.usedBytes=this.buffer.byteLength,this.logBufferLevel()},h.prototype.seek=function(e,t,i){var s;return-1!==(s=this.findPosition(t,e,i))?(this.buffer=this.buffers[s],this.bufferIndex=s,this.position=e-this.buffer.fileStart,o.debug("MultiBufferStream","Repositioning parser at buffer position: "+this.position),!0):(o.debug("MultiBufferStream","Position "+e+" not found in buffered data"),!1)},h.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},h.prototype.getLength=function(){return this.byteLength},h.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},h.prototype.destroy=function(){this.buffers=[],this.bufferIndex},t.MultiBufferStream=h;var c=function(){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 s,r,a,n=0;for(s=t.readUint8(),a=t.readUint8();128&a;)n=(127&a)<<7,a=t.readUint8();return n+=127&a,o.debug("MPEG4DescriptorParser","Found "+(e[s]||"Descriptor "+s)+", size "+n+" at position "+t.getPosition()),(r=e[s]?new i[e[s]](n):new i.Descriptor(n)).parse(t),r},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 s=t.parseOneDescriptor(e);this.descs.push(s)}},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 s=(248&i.data[0])>>3;return 31===s&&i.data.length>=2&&(s=32+((7&i.data[0])<<3)+((224&i.data[1])>>5)),s}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.upStream=0!=(this.streamType>>1&1),this.streamType=this.streamType>>>2,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};t.MPEG4DescriptorParser=c;var u={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"],["grpl"],["j2kH"],["etyp",["tyco"]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){u.FullBox.prototype=new u.Box,u.ContainerBox.prototype=new u.Box,u.SampleEntry.prototype=new u.Box,u.TrackGroupTypeBox.prototype=new u.FullBox,u.BASIC_BOXES.forEach((function(e){u.createBoxCtor(e)})),u.FULL_BOXES.forEach((function(e){u.createFullBoxCtor(e)})),u.CONTAINER_BOXES.forEach((function(e){u.createContainerBoxCtor(e[0],null,e[1])}))},Box:function(e,t,i){this.type=e,this.size=t,this.uuid=i},FullBox:function(e,t,i){u.Box.call(this,e,t,i),this.flags=0,this.version=0},ContainerBox:function(e,t,i){u.Box.call(this,e,t,i),this.boxes=[]},SampleEntry:function(e,t,i,s){u.ContainerBox.call(this,e,t),this.hdr_size=i,this.start=s},SampleGroupEntry:function(e){this.grouping_type=e},TrackGroupTypeBox:function(e,t){u.FullBox.call(this,e,t)},createBoxCtor:function(e,t){u.boxCodes.push(e),u[e+"Box"]=function(t){u.Box.call(this,e,t)},u[e+"Box"].prototype=new u.Box,t&&(u[e+"Box"].prototype.parse=t)},createFullBoxCtor:function(e,t){u[e+"Box"]=function(t){u.FullBox.call(this,e,t)},u[e+"Box"].prototype=new u.FullBox,u[e+"Box"].prototype.parse=function(e){this.parseFullHeader(e),t&&t.call(this,e)}},addSubBoxArrays:function(e){if(e){this.subBoxNames=e;for(var t=e.length,i=0;i<t;i++)this[e[i]+"s"]=[]}},createContainerBoxCtor:function(e,t,i){u[e+"Box"]=function(t){u.ContainerBox.call(this,e,t),u.addSubBoxArrays.call(this,i)},u[e+"Box"].prototype=new u.ContainerBox,t&&(u[e+"Box"].prototype.parse=t)},createMediaSampleEntryCtor:function(e,t,i){u.sampleEntryCodes[e]=[],u[e+"SampleEntry"]=function(e,t){u.SampleEntry.call(this,e,t),u.addSubBoxArrays.call(this,i)},u[e+"SampleEntry"].prototype=new u.SampleEntry,t&&(u[e+"SampleEntry"].prototype.parse=t)},createSampleEntryCtor:function(e,t,i,s){u.sampleEntryCodes[e].push(t),u[t+"SampleEntry"]=function(i){u[e+"SampleEntry"].call(this,t,i),u.addSubBoxArrays.call(this,s)},u[t+"SampleEntry"].prototype=new u[e+"SampleEntry"],i&&(u[t+"SampleEntry"].prototype.parse=i)},createEncryptedSampleEntryCtor:function(e,t,i){u.createSampleEntryCtor.call(this,e,t,i,["sinf"])},createSampleGroupCtor:function(e,t){u[e+"SampleGroupEntry"]=function(t){u.SampleGroupEntry.call(this,e,t)},u[e+"SampleGroupEntry"].prototype=new u.SampleGroupEntry,t&&(u[e+"SampleGroupEntry"].prototype.parse=t)},createTrackGroupCtor:function(e,t){u[e+"TrackGroupTypeBox"]=function(t){u.TrackGroupTypeBox.call(this,e,t)},u[e+"TrackGroupTypeBox"].prototype=new u.TrackGroupTypeBox,t&&(u[e+"TrackGroupTypeBox"].prototype.parse=t)},createUUIDBox:function(e,t,i,s){u.UUIDs.push(e),u.UUIDBoxes[e]=function(s){t?u.FullBox.call(this,"uuid",s,e):i?u.ContainerBox.call(this,"uuid",s,e):u.Box.call(this,"uuid",s,e)},u.UUIDBoxes[e].prototype=t?new u.FullBox:i?new u.ContainerBox:new u.Box,s&&(u.UUIDBoxes[e].prototype.parse=t?function(e){this.parseFullHeader(e),s&&s.call(this,e)}:s)}};function p(e,t){this.x=e,this.y=t}function f(e,t){this.bad_pixel_row=e,this.bad_pixel_column=t}u.initialize(),u.TKHD_FLAG_ENABLED=1,u.TKHD_FLAG_IN_MOVIE=2,u.TKHD_FLAG_IN_PREVIEW=4,u.TFHD_FLAG_BASE_DATA_OFFSET=1,u.TFHD_FLAG_SAMPLE_DESC=2,u.TFHD_FLAG_SAMPLE_DUR=8,u.TFHD_FLAG_SAMPLE_SIZE=16,u.TFHD_FLAG_SAMPLE_FLAGS=32,u.TFHD_FLAG_DUR_EMPTY=65536,u.TFHD_FLAG_DEFAULT_BASE_IS_MOOF=131072,u.TRUN_FLAGS_DATA_OFFSET=1,u.TRUN_FLAGS_FIRST_FLAG=4,u.TRUN_FLAGS_DURATION=256,u.TRUN_FLAGS_SIZE=512,u.TRUN_FLAGS_FLAGS=1024,u.TRUN_FLAGS_CTS_OFFSET=2048,u.Box.prototype.add=function(e){return this.addBox(new u[e+"Box"])},u.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},u.Box.prototype.set=function(e,t){return this[e]=t,this},u.Box.prototype.addEntry=function(e,t){var i=t||"entries";return this[i]||(this[i]=[]),this[i].push(e),this},t.BoxParser=u,u.parseUUID=function(e){return u.parseHex16(e)},u.parseHex16=function(e){for(var t="",i=0;i<16;i++){var s=e.readUint8().toString(16);t+=1===s.length?"0"+s:s}return t},u.parseOneBox=function(e,t,i){var s,r,a,n=e.getPosition(),l=0;if(e.getEndPosition()-n<8)return o.debug("BoxParser","Not enough data in stream to parse the type and size of the box"),{code:u.ERR_NOT_ENOUGH_DATA};if(i&&i<8)return o.debug("BoxParser","Not enough bytes left in the parent box to parse a new box"),{code:u.ERR_NOT_ENOUGH_DATA};var d=e.readUint32(),h=e.readString(4),c=h;if(o.debug("BoxParser","Found box of type '"+h+"' and size "+d+" at position "+n),l=8,"uuid"==h){if(e.getEndPosition()-e.getPosition()<16||i-l<16)return e.seek(n),o.debug("BoxParser","Not enough bytes left in the parent box to parse a UUID box"),{code:u.ERR_NOT_ENOUGH_DATA};l+=16,c=a=u.parseUUID(e)}if(1==d){if(e.getEndPosition()-e.getPosition()<8||i&&i-l<8)return e.seek(n),o.warn("BoxParser",'Not enough data in stream to parse the extended size of the "'+h+'" box'),{code:u.ERR_NOT_ENOUGH_DATA};d=e.readUint64(),l+=8}else if(0===d)if(i)d=i;else if("mdat"!==h)return o.error("BoxParser","Unlimited box size not supported for type: '"+h+"'"),s=new u.Box(h,d),{code:u.OK,box:s,size:s.size};return 0!==d&&d<l?(o.error("BoxParser","Box of type "+h+" has an invalid size "+d+" (too small to be a box)"),{code:u.ERR_NOT_ENOUGH_DATA,type:h,size:d,hdr_size:l,start:n}):0!==d&&i&&d>i?(o.error("BoxParser","Box of type '"+h+"' has a size "+d+" greater than its container size "+i),{code:u.ERR_NOT_ENOUGH_DATA,type:h,size:d,hdr_size:l,start:n}):0!==d&&n+d>e.getEndPosition()?(e.seek(n),o.info("BoxParser","Not enough data in stream to parse the entire '"+h+"' box"),{code:u.ERR_NOT_ENOUGH_DATA,type:h,size:d,hdr_size:l,start:n}):t?{code:u.OK,type:h,size:d,hdr_size:l,start:n}:(u[h+"Box"]?s=new u[h+"Box"](d):"uuid"!==h?(o.warn("BoxParser","Unknown box type: '"+h+"'"),(s=new u.Box(h,d)).has_unparsed_data=!0):u.UUIDBoxes[a]?s=new u.UUIDBoxes[a](d):(o.warn("BoxParser","Unknown uuid type: '"+a+"'"),(s=new u.Box(h,d)).uuid=a,s.has_unparsed_data=!0),s.hdr_size=l,s.start=n,s.write===u.Box.prototype.write&&"mdat"!==s.type&&(o.info("BoxParser","'"+c+"' box writing not yet implemented, keeping unparsed data in memory for later write"),s.parseDataAndRewind(e)),s.parse(e),(r=e.getPosition()-(s.start+s.size))<0?(o.warn("BoxParser","Parsing of box '"+c+"' did not read the entire indicated box data size (missing "+-r+" bytes), seeking forward"),e.seek(s.start+s.size)):r>0&&(o.error("BoxParser","Parsing of box '"+c+"' read "+r+" more bytes than the indicated box data size, seeking backwards"),0!==s.size&&e.seek(s.start+s.size)),{code:u.OK,box:s,size:s.size})},u.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)},u.Box.prototype.parseDataAndRewind=function(e){this.data=e.readUint8Array(this.size-this.hdr_size),e.position-=this.size-this.hdr_size},u.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},u.FullBox.prototype.parseFullHeader=function(e){this.version=e.readUint8(),this.flags=e.readUint24(),this.hdr_size+=4},u.FullBox.prototype.parse=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},u.ContainerBox.prototype.parse=function(e){for(var t,i;e.getPosition()<this.start+this.size;){if((t=u.parseOneBox(e,!1,this.size-(e.getPosition()-this.start))).code!==u.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 s="uuid"!==i.type?i.type:i.uuid;this[s]?o.warn("Box of type "+s+" already stored in field of this type"):this[s]=i}}},u.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)},u.SAMPLE_ENTRY_TYPE_VISUAL="Visual",u.SAMPLE_ENTRY_TYPE_AUDIO="Audio",u.SAMPLE_ENTRY_TYPE_HINT="Hint",u.SAMPLE_ENTRY_TYPE_METADATA="Metadata",u.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",u.SAMPLE_ENTRY_TYPE_SYSTEM="System",u.SAMPLE_ENTRY_TYPE_TEXT="Text",u.SampleEntry.prototype.parseHeader=function(e){e.readUint8Array(6),this.data_reference_index=e.readUint16(),this.hdr_size+=8},u.SampleEntry.prototype.parse=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},u.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},u.SampleEntry.prototype.parseFooter=function(e){u.ContainerBox.prototype.parse.call(this,e)},u.createMediaSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_HINT),u.createMediaSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_METADATA),u.createMediaSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_SUBTITLE),u.createMediaSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_SYSTEM),u.createMediaSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_TEXT),u.createMediaSampleEntryCtor(u.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)})),u.createMediaSampleEntryCtor(u.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)})),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"dav1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"hvt1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"lhe1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"dvh1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"dvhe"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"vvc1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"vvi1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"vvs1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"vvcN"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"vp08"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"vp09"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"avs3"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"j2ki"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"mjp2"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"mjpg"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"uncv"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"ac-4"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"Opus"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"mha1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"mha2"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"mhm1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"mhm2"),u.createEncryptedSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),u.createEncryptedSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),u.createEncryptedSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),u.createEncryptedSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),u.createEncryptedSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_TEXT,"enct"),u.createEncryptedSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_METADATA,"encm"),u.createBoxCtor("a1lx",(function(e){var t=16*(1+(1&(1&e.readUint8())));this.layer_size=[];for(var i=0;i<3;i++)this.layer_size[i]=16==t?e.readUint16():e.readUint32()})),u.createBoxCtor("a1op",(function(e){this.op_index=e.readUint8()})),u.createFullBoxCtor("auxC",(function(e){this.aux_type=e.readCString();var t=this.size-this.hdr_size-(this.aux_type.length+1);this.aux_subtype=e.readUint8Array(t)})),u.createBoxCtor("av1C",(function(e){var t=e.readUint8();if(t>>7&!1)o.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 o.error("av1C reserved_2 parsing problem");var i=this.size-this.hdr_size-4;this.configOBUs=e.readUint8Array(i)}else o.error("av1C reserved_1 parsing problem");else o.error("av1C version "+this.version+" not supported")})),u.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))})),u.createBoxCtor("btrt",(function(e){this.bufferSizeDB=e.readUint32(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32()})),u.createFullBoxCtor("ccst",(function(e){var t=e.readUint8();this.all_ref_pics_intra=128==(128&t),this.intra_pred_used=64==(64&t),this.max_ref_per_pic=(63&t)>>2,e.readUint24()})),u.createBoxCtor("cdef",(function(e){var t;for(this.channel_count=e.readUint16(),this.channel_indexes=[],this.channel_types=[],this.channel_associations=[],t=0;t<this.channel_count;t++)this.channel_indexes.push(e.readUint16()),this.channel_types.push(e.readUint16()),this.channel_associations.push(e.readUint16())})),u.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()})),u.createBoxCtor("clli",(function(e){this.max_content_light_level=e.readUint16(),this.max_pic_average_light_level=e.readUint16()})),u.createFullBoxCtor("cmex",(function(e){1&this.flags&&(this.pos_x=e.readInt32()),2&this.flags&&(this.pos_y=e.readInt32()),4&this.flags&&(this.pos_z=e.readInt32()),8&this.flags&&(0==this.version?16&this.flags?(this.quat_x=e.readInt32(),this.quat_y=e.readInt32(),this.quat_z=e.readInt32()):(this.quat_x=e.readInt16(),this.quat_y=e.readInt16(),this.quat_z=e.readInt16()):this.version),32&this.flags&&(this.id=e.readUint32())})),u.createFullBoxCtor("cmin",(function(e){this.focal_length_x=e.readInt32(),this.principal_point_x=e.readInt32(),this.principal_point_y=e.readInt32(),1&this.flags&&(this.focal_length_y=e.readInt32(),this.skew_factor=e.readInt32())})),u.createBoxCtor("cmpd",(function(e){for(this.component_count=e.readUint32(),this.component_types=[],this.component_type_urls=[],i=0;i<this.component_count;i++){var t=e.readUint16();this.component_types.push(t),t>=32768&&this.component_type_urls.push(e.readCString())}})),u.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())})),u.createFullBoxCtor("CoLL",(function(e){this.maxCLL=e.readUint16(),this.maxFALL=e.readUint16()})),u.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))})),u.createFullBoxCtor("cprt",(function(e){this.parseLanguage(e),this.notice=e.readCString()})),u.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())})),u.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 s=e.readInt32();s<0&&o.warn("BoxParser","ctts box uses negative values without using version 1"),this.sample_offsets.push(s)}else if(1==this.version)for(i=0;i<t;i++)this.sample_counts.push(e.readUint32()),this.sample_offsets.push(e.readInt32())})),u.createBoxCtor("dac3",(function(e){var t=e.readUint8(),i=e.readUint8(),s=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|s>>5&7})),u.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 s={};this.ind_subs.push(s);var r=e.readUint8(),a=e.readUint8(),o=e.readUint8();s.fscod=r>>6,s.bsid=r>>1&31,s.bsmod=(1&r)<<4|a>>4&15,s.acmod=a>>1&7,s.lfeon=1&a,s.num_dep_sub=o>>1&15,s.num_dep_sub>0&&(s.chan_loc=(1&o)<<8|e.readUint8())}})),u.createFullBoxCtor("dfLa",(function(e){var t=[],i=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];for(this.parseFullHeader(e);;){var s=e.readUint8(),r=Math.min(127&s,i.length-1);if(r?e.readUint8Array(e.readUint24()):(e.readUint8Array(13),this.samplerate=e.readUint32()>>12,e.readUint8Array(20)),t.push(i[r]),128&s)break}this.numMetadataBlocks=t.length+" ("+t.join(", ")+")"})),u.createBoxCtor("dimm",(function(e){this.bytessent=e.readUint64()})),u.createBoxCtor("dmax",(function(e){this.time=e.readUint32()})),u.createBoxCtor("dmed",(function(e){this.bytessent=e.readUint64()})),u.createBoxCtor("dOps",(function(e){if(this.Version=e.readUint8(),this.OutputChannelCount=e.readUint8(),this.PreSkip=e.readUint16(),this.InputSampleRate=e.readUint32(),this.OutputGain=e.readInt16(),this.ChannelMappingFamily=e.readUint8(),0!==this.ChannelMappingFamily){this.StreamCount=e.readUint8(),this.CoupledCount=e.readUint8(),this.ChannelMapping=[];for(var t=0;t<this.OutputChannelCount;t++)this.ChannelMapping[t]=e.readUint8()}})),u.createFullBoxCtor("dref",(function(e){var t,i;this.entries=[];for(var s=e.readUint32(),r=0;r<s;r++){if((t=u.parseOneBox(e,!1,this.size-(e.getPosition()-this.start))).code!==u.OK)return;i=t.box,this.entries.push(i)}})),u.createBoxCtor("drep",(function(e){this.bytessent=e.readUint64()})),u.createFullBoxCtor("elng",(function(e){this.extended_language=e.readString(this.size-this.hdr_size)})),u.createFullBoxCtor("elst",(function(e){this.entries=[];for(var t=e.readUint32(),i=0;i<t;i++){var s={};this.entries.push(s),1===this.version?(s.segment_duration=e.readUint64(),s.media_time=e.readInt64()):(s.segment_duration=e.readUint32(),s.media_time=e.readInt32()),s.media_rate_integer=e.readInt16(),s.media_rate_fraction=e.readInt16()}})),u.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)})),u.createEntityToGroupCtor=function(e,t){u[e+"Box"]=function(t){u.FullBox.call(this,e,t)},u[e+"Box"].prototype=new u.FullBox,u[e+"Box"].prototype.parse=function(e){if(this.parseFullHeader(e),t)t.call(this,e);else for(this.group_id=e.readUint32(),this.num_entities_in_group=e.readUint32(),this.entity_ids=[],i=0;i<this.num_entities_in_group;i++){var s=e.readUint32();this.entity_ids.push(s)}}},u.createEntityToGroupCtor("aebr"),u.createEntityToGroupCtor("afbr"),u.createEntityToGroupCtor("albc"),u.createEntityToGroupCtor("altr"),u.createEntityToGroupCtor("brst"),u.createEntityToGroupCtor("dobr"),u.createEntityToGroupCtor("eqiv"),u.createEntityToGroupCtor("favc"),u.createEntityToGroupCtor("fobr"),u.createEntityToGroupCtor("iaug"),u.createEntityToGroupCtor("pano"),u.createEntityToGroupCtor("slid"),u.createEntityToGroupCtor("ster"),u.createEntityToGroupCtor("tsyn"),u.createEntityToGroupCtor("wbbr"),u.createEntityToGroupCtor("prgr"),u.createFullBoxCtor("esds",(function(e){var t=e.readUint8Array(this.size-this.hdr_size),i=new c;this.esd=i.parseOneDescriptor(new l(t.buffer,0,l.BIG_ENDIAN))})),u.createBoxCtor("fiel",(function(e){this.fieldCount=e.readUint8(),this.fieldOrdering=e.readUint8()})),u.createBoxCtor("frma",(function(e){this.data_format=e.readString(4)})),u.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++})),u.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)))})),u.createBoxCtor("hvcC",(function(e){var t,i,s,r;this.configurationVersion=e.readUint8(),r=e.readUint8(),this.general_profile_space=r>>6,this.general_tier_flag=(32&r)>>5,this.general_profile_idc=31&r,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(),r=e.readUint8(),this.constantFrameRate=r>>6,this.numTemporalLayers=(13&r)>>3,this.temporalIdNested=(4&r)>>2,this.lengthSizeMinusOne=3&r,this.nalu_arrays=[];var a=e.readUint8();for(t=0;t<a;t++){var o=[];this.nalu_arrays.push(o),r=e.readUint8(),o.completeness=(128&r)>>7,o.nalu_type=63&r;var n=e.readUint16();for(i=0;i<n;i++){var l={};o.push(l),s=e.readUint16(),l.data=e.readUint8Array(s)}}})),u.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=u.parseOneBox(e,!1,this.size-(e.getPosition()-this.start))).code!==u.OK)return;"infe"!==t.box.type&&o.error("BoxParser","Expected 'infe' box, got "+t.box.type),this.item_infos[i]=t.box}})),u.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 s=0;s<i;s++){var r={};if(this.items.push(r),this.version<2)r.item_ID=e.readUint16();else{if(2!==this.version)throw"version of iloc box not supported";r.item_ID=e.readUint32()}switch(1===this.version||2===this.version?r.construction_method=15&e.readUint16():r.construction_method=0,r.data_reference_index=e.readUint16(),this.base_offset_size){case 0:r.base_offset=0;break;case 4:r.base_offset=e.readUint32();break;case 8:r.base_offset=e.readUint64();break;default:throw"Error reading base offset size"}var a=e.readUint16();r.extents=[];for(var o=0;o<a;o++){var n={};if(r.extents.push(n),1===this.version||2===this.version)switch(this.index_size){case 0:n.extent_index=0;break;case 4:n.extent_index=e.readUint32();break;case 8:n.extent_index=e.readUint64();break;default:throw"Error reading extent index"}switch(this.offset_size){case 0:n.extent_offset=0;break;case 4:n.extent_offset=e.readUint32();break;case 8:n.extent_offset=e.readUint64();break;default:throw"Error reading extent index"}switch(this.length_size){case 0:n.extent_length=0;break;case 4:n.extent_length=e.readUint32();break;case 8:n.extent_length=e.readUint64();break;default:throw"Error reading extent index"}}}})),u.createBoxCtor("imir",(function(e){var t=e.readUint8();this.reserved=t>>7,this.axis=1&t})),u.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),o.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()))})),u.createFullBoxCtor("ipma",(function(e){var t,i;for(entry_count=e.readUint32(),this.associations=[],t=0;t<entry_count;t++){var s={};this.associations.push(s),this.version<1?s.id=e.readUint16():s.id=e.readUint32();var r=e.readUint8();for(s.props=[],i=0;i<r;i++){var a=e.readUint8(),o={};s.props.push(o),o.essential=(128&a)>>7==1,1&this.flags?o.property_index=(127&a)<<8|e.readUint8():o.property_index=127&a}}})),u.createFullBoxCtor("iref",(function(e){var t,i;for(this.references=[];e.getPosition()<this.start+this.size;){if((t=u.parseOneBox(e,!0,this.size-(e.getPosition()-this.start))).code!==u.OK)return;(i=0===this.version?new u.SingleItemTypeReferenceBox(t.type,t.size,t.hdr_size,t.start):new u.SingleItemTypeReferenceBoxLarge(t.type,t.size,t.hdr_size,t.start)).write===u.Box.prototype.write&&"mdat"!==i.type&&(o.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)}})),u.createBoxCtor("irot",(function(e){this.angle=3&e.readUint8()})),u.createFullBoxCtor("ispe",(function(e){this.image_width=e.readUint32(),this.image_height=e.readUint32()})),u.createFullBoxCtor("kind",(function(e){this.schemeURI=e.readCString(),this.value=e.readCString()})),u.createFullBoxCtor("leva",(function(e){var t=e.readUint8();this.levels=[];for(var i=0;i<t;i++){var s={};this.levels[i]=s,s.track_ID=e.readUint32();var r=e.readUint8();switch(s.padding_flag=r>>7,s.assignment_type=127&r,s.assignment_type){case 0:s.grouping_type=e.readString(4);break;case 1:s.grouping_type=e.readString(4),s.grouping_type_parameter=e.readUint32();break;case 2:case 3:break;case 4:s.sub_track_id=e.readUint32();break;default:o.warn("BoxParser","Unknown leva assignement type")}}})),u.createBoxCtor("lsel",(function(e){this.layer_id=e.readUint16()})),u.createBoxCtor("maxr",(function(e){this.period=e.readUint32(),this.bytes=e.readUint32()})),p.prototype.toString=function(){return"("+this.x+","+this.y+")"},u.createBoxCtor("mdcv",(function(e){this.display_primaries=[],this.display_primaries[0]=new p(e.readUint16(),e.readUint16()),this.display_primaries[1]=new p(e.readUint16(),e.readUint16()),this.display_primaries[2]=new p(e.readUint16(),e.readUint16()),this.white_point=new p(e.readUint16(),e.readUint16()),this.max_display_mastering_luminance=e.readUint32(),this.min_display_mastering_luminance=e.readUint32()})),u.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()})),u.createFullBoxCtor("mehd",(function(e){1&this.flags&&(o.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()})),u.createFullBoxCtor("meta",(function(e){this.boxes=[],u.ContainerBox.prototype.parse.call(this,e)})),u.createFullBoxCtor("mfhd",(function(e){this.sequence_number=e.readUint32()})),u.createFullBoxCtor("mfro",(function(e){this._size=e.readUint32()})),u.createFullBoxCtor("mskC",(function(e){this.bits_per_pixel=e.readUint8()})),u.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()})),u.createBoxCtor("npck",(function(e){this.packetssent=e.readUint32()})),u.createBoxCtor("nump",(function(e){this.packetssent=e.readUint64()})),u.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()})),u.createBoxCtor("pasp",(function(e){this.hSpacing=e.readUint32(),this.vSpacing=e.readUint32()})),u.createBoxCtor("payl",(function(e){this.text=e.readString(this.size-this.hdr_size)})),u.createBoxCtor("payt",(function(e){this.payloadID=e.readUint32();var t=e.readUint8();this.rtpmap_string=e.readString(t)})),u.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()})),u.createFullBoxCtor("pitm",(function(e){0===this.version?this.item_id=e.readUint16():this.item_id=e.readUint32()})),u.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()})),u.createBoxCtor("pmax",(function(e){this.bytes=e.readUint32()})),u.createFullBoxCtor("prdi",(function(e){if(this.step_count=e.readUint16(),this.item_count=[],2&this.flags)for(var t=0;t<this.step_count;t++)this.item_count[t]=e.readUint16()})),u.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()})),u.createFullBoxCtor("pssh",(function(e){if(this.system_id=u.parseHex16(e),this.version>0){var t=e.readUint32();this.kid=[];for(var i=0;i<t;i++)this.kid[i]=u.parseHex16(e)}var s=e.readUint32();s>0&&(this.data=e.readUint8Array(s))})),u.createFullBoxCtor("clef",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),u.createFullBoxCtor("enof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),u.createFullBoxCtor("prof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),u.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),u.createBoxCtor("rtp ",(function(e){this.descriptionformat=e.readString(4),this.sdptext=e.readString(this.size-this.hdr_size-4)})),u.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()})),u.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()})),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_METADATA,"mett",(function(e){this.parseHeader(e),this.content_encoding=e.readCString(),this.mime_format=e.readCString(),this.parseFooter(e)})),u.createSampleEntryCtor(u.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)})),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_SUBTITLE,"sbtt",(function(e){this.parseHeader(e),this.content_encoding=e.readCString(),this.mime_format=e.readCString(),this.parseFooter(e)})),u.createSampleEntryCtor(u.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)})),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_SUBTITLE,"stxt",(function(e){this.parseHeader(e),this.content_encoding=e.readCString(),this.mime_format=e.readCString(),this.parseFooter(e)})),u.createSampleEntryCtor(u.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)})),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_METADATA,"wvtt",(function(e){this.parseHeader(e),this.parseFooter(e)})),u.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 s=this.description_length-4-4*i;for(this.num_output_samples=[],this.num_total_samples=[],t=0;t<s/4;t++)this.num_output_samples[t]=e.readUint16(),this.num_total_samples[t]=e.readUint16()})),u.createSampleGroupCtor("avll",(function(e){this.layerNumber=e.readUint8(),this.accurateStatisticsFlag=e.readUint8(),this.avgBitRate=e.readUint16(),this.avgFrameRate=e.readUint16()})),u.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(),s=0;s<i;s++){var r={};this.dependency.push(r),r.subSeqDirectionFlag=e.readUint8(),r.layerNumber=e.readUint8(),r.subSequenceIdentifier=e.readUint16()}})),u.createSampleGroupCtor("dtrt",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.createSampleGroupCtor("mvif",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.createSampleGroupCtor("prol",(function(e){this.roll_distance=e.readInt16()})),u.createSampleGroupCtor("rap ",(function(e){var t=e.readUint8();this.num_leading_samples_known=t>>7,this.num_leading_samples=127&t})),u.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)o.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()}})),u.createSampleGroupCtor("roll",(function(e){this.roll_distance=e.readInt16()})),u.SampleGroupEntry.prototype.parse=function(e){o.warn("BoxParser","Unknown Sample Group type: "+this.grouping_type),this.data=e.readUint8Array(this.description_length)},u.createSampleGroupCtor("scif",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.createSampleGroupCtor("scnm",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.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=u.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))})),u.createSampleGroupCtor("stsa",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.createSampleGroupCtor("sync",(function(e){var t=e.readUint8();this.NAL_unit_type=63&t})),u.createSampleGroupCtor("tele",(function(e){var t=e.readUint8();this.level_independently_decodable=t>>7})),u.createSampleGroupCtor("tsas",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.createSampleGroupCtor("tscl",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.createSampleGroupCtor("vipr",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.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 s={};this.entries.push(s),s.sample_count=e.readInt32(),s.group_description_index=e.readInt32()}})),f.prototype.toString=function(){return"[row: "+this.bad_pixel_row+", column: "+this.bad_pixel_column+"]"},u.createFullBoxCtor("sbpm",(function(e){var t;for(this.component_count=e.readUint16(),this.component_index=[],t=0;t<this.component_count;t++)this.component_index.push(e.readUint16());var i=e.readUint8();for(this.correction_applied=128==(128&i),this.num_bad_rows=e.readUint32(),this.num_bad_cols=e.readUint32(),this.num_bad_pixels=e.readUint32(),this.bad_rows=[],this.bad_columns=[],this.bad_pixels=[],t=0;t<this.num_bad_rows;t++)this.bad_rows.push(e.readUint32());for(t=0;t<this.num_bad_cols;t++)this.bad_columns.push(e.readUint32());for(t=0;t<this.num_bad_pixels;t++){var s=e.readUint32(),r=e.readUint32();this.bad_pixels.push(new f(s,r))}})),u.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))})),u.createBoxCtor("sdp ",(function(e){this.sdptext=e.readString(this.size-this.hdr_size)})),u.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 s=0;s<i;s++)t=e.readUint8(),this.is_leading[s]=t>>6,this.sample_depends_on[s]=t>>4&3,this.sample_is_depended_on[s]=t>>2&3,this.sample_has_redundancy[s]=3&t})),u.createFullBoxCtor("senc"),u.createFullBoxCtor("sgpd",(function(e){this.grouping_type=e.readString(4),o.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 s;s=u[this.grouping_type+"SampleGroupEntry"]?new u[this.grouping_type+"SampleGroupEntry"](this.grouping_type):new u.SampleGroupEntry(this.grouping_type),this.entries.push(s),1===this.version&&0===this.default_length?s.description_length=e.readUint32():s.description_length=this.default_length,s.write===u.SampleGroupEntry.prototype.write&&(o.info("BoxParser","SampleGroup for type "+this.grouping_type+" writing not yet implemented, keeping unparsed data in memory for later write"),s.data=e.readUint8Array(s.description_length),e.position-=s.description_length),s.parse(e)}})),u.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 s={};this.references.push(s);var r=e.readUint32();s.reference_type=r>>31&1,s.referenced_size=2147483647&r,s.subsegment_duration=e.readUint32(),r=e.readUint32(),s.starts_with_SAP=r>>31&1,s.SAP_type=r>>28&7,s.SAP_delta_time=268435455&r}})),u.SingleItemTypeReferenceBox=function(e,t,i,s){u.Box.call(this,e,t),this.hdr_size=i,this.start=s},u.SingleItemTypeReferenceBox.prototype=new u.Box,u.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]={},this.references[i].to_item_ID=e.readUint16()},u.SingleItemTypeReferenceBoxLarge=function(e,t,i,s){u.Box.call(this,e,t),this.hdr_size=i,this.start=s},u.SingleItemTypeReferenceBoxLarge.prototype=new u.Box,u.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]={},this.references[i].to_item_ID=e.readUint32()},u.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()})),u.createFullBoxCtor("smhd",(function(e){this.balance=e.readUint16(),e.readUint16()})),u.createFullBoxCtor("ssix",(function(e){this.subsegments=[];for(var t=e.readUint32(),i=0;i<t;i++){var s={};this.subsegments.push(s),s.ranges=[];for(var r=e.readUint32(),a=0;a<r;a++){var o={};s.ranges.push(o),o.level=e.readUint8(),o.range_size=e.readUint24()}}})),u.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())})),u.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()})),u.createFullBoxCtor("sthd"),u.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()})),u.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())})),u.createFullBoxCtor("stsd",(function(e){var t,i,s,r;for(this.entries=[],s=e.readUint32(),t=1;t<=s;t++){if((i=u.parseOneBox(e,!0,this.size-(e.getPosition()-this.start))).code!==u.OK)return;u[i.type+"SampleEntry"]?((r=new u[i.type+"SampleEntry"](i.size)).hdr_size=i.hdr_size,r.start=i.start):(o.warn("BoxParser","Unknown sample entry type: "+i.type),r=new u.SampleEntry(i.type,i.size,i.hdr_size,i.start)),r.write===u.SampleEntry.prototype.write&&(o.info("BoxParser","SampleEntry "+r.type+" box writing not yet implemented, keeping unparsed data in memory for later write"),r.parseDataAndRewind(e)),r.parse(e),this.entries.push(r)}})),u.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()})),u.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())})),u.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())})),u.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})),u.createFullBoxCtor("stts",(function(e){var t,i,s;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()),(s=e.readInt32())<0&&(o.warn("BoxParser","File uses negative stts sample delta, using value 1 instead, sync may be lost!"),s=1),this.sample_deltas.push(s)})),u.createFullBoxCtor("stvi",(function(e){var t=e.readUint32();this.single_view_allowed=3&t,this.stereo_scheme=e.readUint32();var i,s,r=e.readUint32();for(this.stereo_indication_type=e.readString(r),this.boxes=[];e.getPosition()<this.start+this.size;){if((i=u.parseOneBox(e,!1,this.size-(e.getPosition()-this.start))).code!==u.OK)return;s=i.box,this.boxes.push(s),this[s.type]=s}})),u.createBoxCtor("styp",(function(e){u.ftypBox.prototype.parse.call(this,e)})),u.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 s=e.readUint8();this.sample_sizes[t]=s>>4&15,this.sample_sizes[t+1]=15&s}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 o.error("BoxParser","Error in length field in stz2 box")})),u.createFullBoxCtor("subs",(function(e){var t,i,s,r;for(s=e.readUint32(),this.entries=[],t=0;t<s;t++){var a={};if(this.entries[t]=a,a.sample_delta=e.readUint32(),a.subsamples=[],(r=e.readUint16())>0)for(i=0;i<r;i++){var o={};a.subsamples.push(o),1==this.version?o.size=e.readUint32():o.size=e.readUint16(),o.priority=e.readUint8(),o.discardable=e.readUint8(),o.codec_specific_parameters=e.readUint32()}}})),u.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=u.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))})),u.createFullBoxCtor("tfdt",(function(e){1==this.version?this.baseMediaDecodeTime=e.readUint64():this.baseMediaDecodeTime=e.readUint32()})),u.createFullBoxCtor("tfhd",(function(e){var t=0;this.track_id=e.readUint32(),this.size-this.hdr_size>t&&this.flags&u.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&u.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&u.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&u.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&u.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=e.readUint32(),t+=4):this.default_sample_flags=0})),u.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(),s=0;s<i;s++)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)]()})),u.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()})),u.createBoxCtor("tmax",(function(e){this.time=e.readUint32()})),u.createBoxCtor("tmin",(function(e){this.time=e.readUint32()})),u.createBoxCtor("totl",(function(e){this.bytessent=e.readUint32()})),u.createBoxCtor("tpay",(function(e){this.bytessent=e.readUint32()})),u.createBoxCtor("tpyl",(function(e){this.bytessent=e.readUint64()})),u.TrackGroupTypeBox.prototype.parse=function(e){this.parseFullHeader(e),this.track_group_id=e.readUint32()},u.createTrackGroupCtor("msrc"),u.TrackReferenceTypeBox=function(e,t,i,s){u.Box.call(this,e,t),this.hdr_size=i,this.start=s},u.TrackReferenceTypeBox.prototype=new u.Box,u.TrackReferenceTypeBox.prototype.parse=function(e){this.track_ids=e.readUint32Array((this.size-this.hdr_size)/4)},u.trefBox.prototype.parse=function(e){for(var t,i;e.getPosition()<this.start+this.size;){if((t=u.parseOneBox(e,!0,this.size-(e.getPosition()-this.start))).code!==u.OK)return;(i=new u.TrackReferenceTypeBox(t.type,t.size,t.hdr_size,t.start)).write===u.Box.prototype.write&&"mdat"!==i.type&&(o.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)}},u.createFullBoxCtor("trep",(function(e){for(this.track_ID=e.readUint32(),this.boxes=[];e.getPosition()<this.start+this.size;){if(ret=u.parseOneBox(e,!1,this.size-(e.getPosition()-this.start)),ret.code!==u.OK)return;box=ret.box,this.boxes.push(box)}})),u.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()})),u.createBoxCtor("trpy",(function(e){this.bytessent=e.readUint64()})),u.createFullBoxCtor("trun",(function(e){var t=0;if(this.sample_count=e.readUint32(),t+=4,this.size-this.hdr_size>t&&this.flags&u.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=e.readInt32(),t+=4):this.data_offset=0,this.size-this.hdr_size>t&&this.flags&u.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&u.TRUN_FLAGS_DURATION&&(this.sample_duration[i]=e.readUint32()),this.flags&u.TRUN_FLAGS_SIZE&&(this.sample_size[i]=e.readUint32()),this.flags&u.TRUN_FLAGS_FLAGS&&(this.sample_flags[i]=e.readUint32()),this.flags&u.TRUN_FLAGS_CTS_OFFSET&&(0===this.version?this.sample_composition_time_offset[i]=e.readUint32():this.sample_composition_time_offset[i]=e.readInt32())})),u.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()})),u.createFullBoxCtor("txtC",(function(e){this.config=e.readCString()})),u.createBoxCtor("tyco",(function(e){var t=(this.size-this.hdr_size)/4;this.compatible_brands=[];for(var i=0;i<t;i++)this.compatible_brands[i]=e.readString(4)})),u.createFullBoxCtor("udes",(function(e){this.lang=e.readCString(),this.name=e.readCString(),this.description=e.readCString(),this.tags=e.readCString()})),u.createFullBoxCtor("uncC",(function(e){var t;if(this.profile=e.readUint32(),1==this.version);else if(0==this.version){for(this.component_count=e.readUint32(),this.component_index=[],this.component_bit_depth_minus_one=[],this.component_format=[],this.component_align_size=[],t=0;t<this.component_count;t++)this.component_index.push(e.readUint16()),this.component_bit_depth_minus_one.push(e.readUint8()),this.component_format.push(e.readUint8()),this.component_align_size.push(e.readUint8());this.sampling_type=e.readUint8(),this.interleave_type=e.readUint8(),this.block_size=e.readUint8();var i=e.readUint8();this.component_little_endian=i>>7&1,this.block_pad_lsb=i>>6&1,this.block_little_endian=i>>5&1,this.block_reversed=i>>4&1,this.pad_unknown=i>>3&1,this.pixel_size=e.readUint32(),this.row_align_size=e.readUint32(),this.tile_align_size=e.readUint32(),this.num_tile_cols_minus_one=e.readUint32(),this.num_tile_rows_minus_one=e.readUint32()}})),u.createFullBoxCtor("url ",(function(e){1!==this.flags&&(this.location=e.readCString())})),u.createFullBoxCtor("urn ",(function(e){this.name=e.readCString(),this.size-this.hdr_size-this.name.length-1>0&&(this.location=e.readCString())})),u.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,(function(e){this.LiveServerManifest=e.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")})),u.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,(function(e){this.system_id=u.parseHex16(e);var t=e.readUint32();t>0&&(this.data=e.readUint8Array(t))})),u.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),u.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,(function(e){this.default_AlgorithmID=e.readUint24(),this.default_IV_size=e.readUint8(),this.default_KID=u.parseHex16(e)})),u.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,(function(e){this.fragment_count=e.readUint8(),this.entries=[];for(var t=0;t<this.fragment_count;t++){var i={},s=0,r=0;1===this.version?(s=e.readUint64(),r=e.readUint64()):(s=e.readUint32(),r=e.readUint32()),i.absolute_time=s,i.absolute_duration=r,this.entries.push(i)}})),u.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())})),u.createFullBoxCtor("vmhd",(function(e){this.graphicsmode=e.readUint16(),this.opcolor=e.readUint16Array(3)})),u.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))})),u.createBoxCtor("vttC",(function(e){this.text=e.readString(this.size-this.hdr_size)})),u.createFullBoxCtor("vvcC",(function(e){var t,i,s={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(e){this.held_bits=e.readUint8(),this.num_held_bits=8},stream_read_2_bytes:function(e){this.held_bits=e.readUint16(),this.num_held_bits=16},extract_bits:function(e){var t=this.held_bits>>this.num_held_bits-e&(1<<e)-1;return this.num_held_bits-=e,t}};if(s.stream_read_1_bytes(e),s.extract_bits(5),this.lengthSizeMinusOne=s.extract_bits(2),this.ptl_present_flag=s.extract_bits(1),this.ptl_present_flag){if(s.stream_read_2_bytes(e),this.ols_idx=s.extract_bits(9),this.num_sublayers=s.extract_bits(3),this.constant_frame_rate=s.extract_bits(2),this.chroma_format_idc=s.extract_bits(2),s.stream_read_1_bytes(e),this.bit_depth_minus8=s.extract_bits(3),s.extract_bits(5),s.stream_read_2_bytes(e),s.extract_bits(2),this.num_bytes_constraint_info=s.extract_bits(6),this.general_profile_idc=s.extract_bits(7),this.general_tier_flag=s.extract_bits(1),this.general_level_idc=e.readUint8(),s.stream_read_1_bytes(e),this.ptl_frame_only_constraint_flag=s.extract_bits(1),this.ptl_multilayer_enabled_flag=s.extract_bits(1),this.general_constraint_info=new Uint8Array(this.num_bytes_constraint_info),this.num_bytes_constraint_info){for(t=0;t<this.num_bytes_constraint_info-1;t++){var r=s.extract_bits(6);s.stream_read_1_bytes(e);var a=s.extract_bits(2);this.general_constraint_info[t]=r<<2|a}this.general_constraint_info[this.num_bytes_constraint_info-1]=s.extract_bits(6)}else s.extract_bits(6);if(this.num_sublayers>1){for(s.stream_read_1_bytes(e),this.ptl_sublayer_present_mask=0,i=this.num_sublayers-2;i>=0;--i){var o=s.extract_bits(1);this.ptl_sublayer_present_mask|=o<<i}for(i=this.num_sublayers;i<=8&&this.num_sublayers>1;++i)s.extract_bits(1);for(this.sublayer_level_idc=[],i=this.num_sublayers-2;i>=0;--i)this.ptl_sublayer_present_mask&1<<i&&(this.sublayer_level_idc[i]=e.readUint8())}if(this.ptl_num_sub_profiles=e.readUint8(),this.general_sub_profile_idc=[],this.ptl_num_sub_profiles)for(t=0;t<this.ptl_num_sub_profiles;t++)this.general_sub_profile_idc.push(e.readUint32());this.max_picture_width=e.readUint16(),this.max_picture_height=e.readUint16(),this.avg_frame_rate=e.readUint16()}this.nalu_arrays=[];var n=e.readUint8();for(t=0;t<n;t++){var l=[];this.nalu_arrays.push(l),s.stream_read_1_bytes(e),l.completeness=s.extract_bits(1),s.extract_bits(2),l.nalu_type=s.extract_bits(5);var d=1;for(13!=l.nalu_type&&12!=l.nalu_type&&(d=e.readUint16()),i=0;i<d;i++){var h=e.readUint16();l.push({data:e.readUint8Array(h),length:h})}}})),u.createFullBoxCtor("vvnC",(function(e){var t=strm.readUint8();this.lengthSizeMinusOne=3&t})),u.SampleEntry.prototype.isVideo=function(){return!1},u.SampleEntry.prototype.isAudio=function(){return!1},u.SampleEntry.prototype.isSubtitle=function(){return!1},u.SampleEntry.prototype.isMetadata=function(){return!1},u.SampleEntry.prototype.isHint=function(){return!1},u.SampleEntry.prototype.getCodec=function(){return this.type.replace(".","")},u.SampleEntry.prototype.getWidth=function(){return""},u.SampleEntry.prototype.getHeight=function(){return""},u.SampleEntry.prototype.getChannelCount=function(){return""},u.SampleEntry.prototype.getSampleRate=function(){return""},u.SampleEntry.prototype.getSampleSize=function(){return""},u.VisualSampleEntry.prototype.isVideo=function(){return!0},u.VisualSampleEntry.prototype.getWidth=function(){return this.width},u.VisualSampleEntry.prototype.getHeight=function(){return this.height},u.AudioSampleEntry.prototype.isAudio=function(){return!0},u.AudioSampleEntry.prototype.getChannelCount=function(){return this.channel_count},u.AudioSampleEntry.prototype.getSampleRate=function(){return this.samplerate},u.AudioSampleEntry.prototype.getSampleSize=function(){return this.samplesize},u.SubtitleSampleEntry.prototype.isSubtitle=function(){return!0},u.MetadataSampleEntry.prototype.isMetadata=function(){return!0},u.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},u.avc1SampleEntry.prototype.getCodec=u.avc2SampleEntry.prototype.getCodec=u.avc3SampleEntry.prototype.getCodec=u.avc4SampleEntry.prototype.getCodec=function(){var e=u.SampleEntry.prototype.getCodec.call(this);return this.avcC?e+"."+u.decimalToHex(this.avcC.AVCProfileIndication)+u.decimalToHex(this.avcC.profile_compatibility)+u.decimalToHex(this.avcC.AVCLevelIndication):e},u.hev1SampleEntry.prototype.getCodec=u.hvc1SampleEntry.prototype.getCodec=function(){var e,t=u.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,s=0;for(e=0;e<32&&(s|=1&i,31!=e);e++)s<<=1,i>>=1;t+=u.decimalToHex(s,0),t+=".",0===this.hvcC.general_tier_flag?t+="L":t+="H",t+=this.hvcC.general_level_idc;var r=!1,a="";for(e=5;e>=0;e--)(this.hvcC.general_constraint_indicator[e]||r)&&(a="."+u.decimalToHex(this.hvcC.general_constraint_indicator[e],0)+a,r=!0);t+=a}return t},u.vvc1SampleEntry.prototype.getCodec=u.vvi1SampleEntry.prototype.getCodec=function(){var e,t=u.SampleEntry.prototype.getCodec.call(this);if(this.vvcC){t+="."+this.vvcC.general_profile_idc,this.vvcC.general_tier_flag?t+=".H":t+=".L",t+=this.vvcC.general_level_idc;var i="";if(this.vvcC.general_constraint_info){var s,r=[],a=0;for(a|=this.vvcC.ptl_frame_only_constraint<<7,a|=this.vvcC.ptl_multilayer_enabled<<6,e=0;e<this.vvcC.general_constraint_info.length;++e)a|=this.vvcC.general_constraint_info[e]>>2&63,r.push(a),a&&(s=e),a=this.vvcC.general_constraint_info[e]>>2&3;if(void 0===s)i=".CA";else{i=".C";var o="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",n=0,l=0;for(e=0;e<=s;++e)for(n=n<<8|r[e],l+=8;l>=5;){i+=o[n>>l-5&31],n&=(1<<(l-=5))-1}l&&(i+=o[31&(n<<=5-l)])}}t+=i}return t},u.mp4aSampleEntry.prototype.getCodec=function(){var e=u.SampleEntry.prototype.getCodec.call(this);if(this.esds&&this.esds.esd){var t=this.esds.esd.getOTI(),i=this.esds.esd.getAudioConfig();return e+"."+u.decimalToHex(t)+(i?"."+i:"")}return e},u.stxtSampleEntry.prototype.getCodec=function(){var e=u.SampleEntry.prototype.getCodec.call(this);return this.mime_format?e+"."+this.mime_format:e},u.vp08SampleEntry.prototype.getCodec=u.vp09SampleEntry.prototype.getCodec=function(){var e=u.SampleEntry.prototype.getCodec.call(this),t=this.vpcC.level;0==t&&(t="00");var i=this.vpcC.bitDepth;return 8==i&&(i="08"),e+".0"+this.vpcC.profile+"."+t+"."+i},u.av01SampleEntry.prototype.getCodec=function(){var e,t=u.SampleEntry.prototype.getCodec.call(this),i=this.av1C.seq_level_idx_0;return i<10&&(i="0"+i),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+"."+i+(this.av1C.seq_tier_0?"H":"M")+"."+e},u.Box.prototype.writeHeader=function(e,t){this.size+=8,this.size>d&&(this.size+=8),"uuid"===this.type&&(this.size+=16),o.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+e.getPosition()+(t||"")),this.size>d?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>d&&e.writeUint64(this.size)},u.FullBox.prototype.writeHeader=function(e){this.size+=4,u.Box.prototype.writeHeader.call(this,e," v="+this.version+" f="+this.flags),e.writeUint8(this.version),e.writeUint24(this.flags)},u.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))},u.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);o.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size)},u.TrackReferenceTypeBox.prototype.write=function(e){this.size=4*this.track_ids.length,this.writeHeader(e),e.writeUint32Array(this.track_ids)},u.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)},u.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])},u.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)},u.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])},u.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;o.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size)},u.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)},u.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)}},u.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)},u.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)},u.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)},u.hvcCBox.prototype.write=function(e){var t,i;for(this.size=23,t=0;t<this.nalu_arrays.length;t++)for(this.size+=3,i=0;i<this.nalu_arrays[t].length;i++)this.size+=2+this.nalu_arrays[t][i].data.length;for(this.writeHeader(e),e.writeUint8(this.configurationVersion),e.writeUint8(this.general_profile_space<<6+this.general_tier_flag<<5+this.general_profile_idc),e.writeUint32(this.general_profile_compatibility),e.writeUint8Array(this.general_constraint_indicator),e.writeUint8(this.general_level_idc),e.writeUint16(this.min_spatial_segmentation_idc+(15<<24)),e.writeUint8(this.parallelismType+252),e.writeUint8(this.chroma_format_idc+252),e.writeUint8(this.bit_depth_luma_minus8+248),e.writeUint8(this.bit_depth_chroma_minus8+248),e.writeUint16(this.avgFrameRate),e.writeUint8((this.constantFrameRate<<6)+(this.numTemporalLayers<<3)+(this.temporalIdNested<<2)+this.lengthSizeMinusOne),e.writeUint8(this.nalu_arrays.length),t=0;t<this.nalu_arrays.length;t++)for(e.writeUint8((this.nalu_arrays[t].completeness<<7)+this.nalu_arrays[t].nalu_type),e.writeUint16(this.nalu_arrays[t].length),i=0;i<this.nalu_arrays[t].length;i++)e.writeUint16(this.nalu_arrays[t][i].data.length),e.writeUint8Array(this.nalu_arrays[t][i].data)},u.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)},u.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)},u.mehdBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=4,this.writeHeader(e),e.writeUint32(this.fragment_duration)},u.mfhdBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=4,this.writeHeader(e),e.writeUint32(this.sequence_number)},u.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)},u.SampleEntry.prototype.writeHeader=function(e){this.size=8,u.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)},u.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;o.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size)},u.SampleEntry.prototype.write=function(e){this.writeHeader(e),e.writeUint8Array(this.data),this.size+=this.data.length,o.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size)},u.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)},u.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)},u.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)},u.SampleGroupEntry.prototype.write=function(e){e.writeUint8Array(this.data)},u.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)}},u.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)},u.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)}},u.smhdBox.prototype.write=function(e){this.version=0,this.flags=1,this.size=4,this.writeHeader(e),e.writeUint16(this.balance),e.writeUint16(0)},u.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)},u.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])},u.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;o.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size)},u.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])},u.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)},u.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)},u.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])},u.tfdtBox.prototype.write=function(e){var t=Math.pow(2,32)-1;this.version=this.baseMediaDecodeTime>t?1: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)},u.tfhdBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&u.TFHD_FLAG_BASE_DATA_OFFSET&&(this.size+=8),this.flags&u.TFHD_FLAG_SAMPLE_DESC&&(this.size+=4),this.flags&u.TFHD_FLAG_SAMPLE_DUR&&(this.size+=4),this.flags&u.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&u.TFHD_FLAG_SAMPLE_FLAGS&&(this.size+=4),this.writeHeader(e),e.writeUint32(this.track_id),this.flags&u.TFHD_FLAG_BASE_DATA_OFFSET&&e.writeUint64(this.base_data_offset),this.flags&u.TFHD_FLAG_SAMPLE_DESC&&e.writeUint32(this.default_sample_description_index),this.flags&u.TFHD_FLAG_SAMPLE_DUR&&e.writeUint32(this.default_sample_duration),this.flags&u.TFHD_FLAG_SAMPLE_SIZE&&e.writeUint32(this.default_sample_size),this.flags&u.TFHD_FLAG_SAMPLE_FLAGS&&e.writeUint32(this.default_sample_flags)},u.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)},u.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)},u.trunBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&u.TRUN_FLAGS_DATA_OFFSET&&(this.size+=4),this.flags&u.TRUN_FLAGS_FIRST_FLAG&&(this.size+=4),this.flags&u.TRUN_FLAGS_DURATION&&(this.size+=4*this.sample_duration.length),this.flags&u.TRUN_FLAGS_SIZE&&(this.size+=4*this.sample_size.length),this.flags&u.TRUN_FLAGS_FLAGS&&(this.size+=4*this.sample_flags.length),this.flags&u.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(e),e.writeUint32(this.sample_count),this.flags&u.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=e.getPosition(),e.writeInt32(this.data_offset)),this.flags&u.TRUN_FLAGS_FIRST_FLAG&&e.writeUint32(this.first_sample_flags);for(var t=0;t<this.sample_count;t++)this.flags&u.TRUN_FLAGS_DURATION&&e.writeUint32(this.sample_duration[t]),this.flags&u.TRUN_FLAGS_SIZE&&e.writeUint32(this.sample_size[t]),this.flags&u.TRUN_FLAGS_FLAGS&&e.writeUint32(this.sample_flags[t]),this.flags&u.TRUN_FLAGS_CTS_OFFSET&&(0===this.version?e.writeUint32(this.sample_composition_time_offset[t]):e.writeInt32(this.sample_composition_time_offset[t]))},u["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)},u["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)},u.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)},u.cttsBox.prototype.unpack=function(e){var t,i,s;for(s=0,t=0;t<this.sample_counts.length;t++)for(i=0;i<this.sample_counts[t];i++)e[s].pts=e[s].dts+this.sample_offsets[t],s++},u.sttsBox.prototype.unpack=function(e){var t,i,s;for(s=0,t=0;t<this.sample_counts.length;t++)for(i=0;i<this.sample_counts[t];i++)e[s].dts=0===s?0:e[s-1].dts+this.sample_deltas[t],s++},u.stcoBox.prototype.unpack=function(e){var t;for(t=0;t<this.chunk_offsets.length;t++)e[t].offset=this.chunk_offsets[t]},u.stscBox.prototype.unpack=function(e){var t,i,s,r,a;for(r=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++,s=0;s<this.samples_per_chunk[t];s++){if(!e[r])return;e[r].description_index=this.sample_description_index[t],e[r].chunk_index=a,r++}},u.stszBox.prototype.unpack=function(e){var t;for(t=0;t<this.sample_sizes.length;t++)e[t].size=this.sample_sizes[t]},u.DIFF_BOXES_PROP_NAMES=["boxes","entries","references","subsamples","items","item_infos","extents","associations","subsegments","ranges","seekLists","seekPoints","esd","levels"],u.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"],u.boxEqualFields=function(e,t){if(e&&!t)return!1;var i;for(i in e)if(!(u.DIFF_BOXES_PROP_NAMES.indexOf(i)>-1||e[i]instanceof u.Box||t[i]instanceof u.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||u.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(i)>-1||e[i]===t[i]))return!1;return!0},u.boxEqual=function(e,t){if(!u.boxEqualFields(e,t))return!1;for(var i=0;i<u.DIFF_BOXES_PROP_NAMES.length;i++){var s=u.DIFF_BOXES_PROP_NAMES[i];if(e[s]&&t[s]&&!u.boxEqual(e[s],t[s]))return!1}return!0};var m=function(){};m.prototype.parseSample=function(e){var t,i={};i.resources=[];var s=new n(e.data.buffer);if(e.subsamples&&0!==e.subsamples.length){if(i.documentString=s.readString(e.subsamples[0].size),e.subsamples.length>1)for(t=1;t<e.subsamples.length;t++)i.resources[t]=s.readUint8Array(e.subsamples[t].size)}else i.documentString=s.readString(e.data.length);return"undefined"!=typeof DOMParser&&(i.document=(new DOMParser).parseFromString(i.documentString,"application/xml")),i};var g=function(){};g.prototype.parseSample=function(e){return new n(e.data.buffer).readString(e.data.length)},g.prototype.parseConfig=function(e){var t=new n(e.buffer);return t.readUint32(),t.readCString()},t.XMLSubtitlein4Parser=m,t.Textin4Parser=g;var y=function(e){this.stream=e||new h,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};y.prototype.destroy=function(){this.stream&&(this.stream.destroy(),this.stream=null),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},y.prototype.setSegmentOptions=function(e,t,i){var s=this.getTrackById(e);if(s){var r={};this.fragmentedTracks.push(r),r.id=e,r.user=t,r.trak=s,s.nextSample=0,r.segmentStream=null,r.nb_samples=1e3,r.rapAlignement=!0,i&&(i.nbSamples&&(r.nb_samples=i.nbSamples),i.rapAlignement&&(r.rapAlignement=i.rapAlignement))}},y.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)},y.prototype.setExtractionOptions=function(e,t,i){var s=this.getTrackById(e);if(s){var r={};this.extractedTracks.push(r),r.id=e,r.user=t,r.trak=s,s.nextSample=0,r.nb_samples=1e3,r.samples=[],i&&i.nbSamples&&(r.nb_samples=i.nbSamples)}},y.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)},y.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=u.parseOneBox(this.stream,false)).code===u.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]&&o.warn("ISOFile","Duplicate Box of type: "+i+", overriding previous occurrence"),this[i]=t}this.updateUsedBytes&&this.updateUsedBytes(t,e)}},y.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?(o.warn("ISOFile","Ignoring empty buffer (fileStart: "+e.fileStart+")"),this.stream.logBufferLevel(),!1):(o.info("ISOFile","Processing buffer (fileStart: "+e.fileStart+")"),e.usedBytes=0,this.stream.insertBuffer(e),this.stream.logBufferLevel(),!!this.stream.initialized()||(o.warn("ISOFile","Not ready to start parsing"),!1))},y.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&&(o.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),o.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),i},y.prototype.getInfo=function(){var e,t,i,s,r,a,o={},n=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(o.hasMoov=!0,o.duration=this.moov.mvhd.duration,o.timescale=this.moov.mvhd.timescale,o.isFragmented=null!=this.moov.mvex,o.isFragmented&&this.moov.mvex.mehd&&(o.fragment_duration=this.moov.mvex.mehd.fragment_duration),o.isProgressive=this.isProgressive,o.hasIOD=null!=this.moov.iods,o.brands=[],o.brands.push(this.ftyp.major_brand),o.brands=o.brands.concat(this.ftyp.compatible_brands),o.created=new Date(n+1e3*this.moov.mvhd.creation_time),o.modified=new Date(n+1e3*this.moov.mvhd.modification_time),o.tracks=[],o.audioTracks=[],o.videoTracks=[],o.subtitleTracks=[],o.metadataTracks=[],o.hintTracks=[],o.otherTracks=[],e=0;e<this.moov.traks.length;e++){if(a=(i=this.moov.traks[e]).mdia.minf.stbl.stsd.entries[0],s={},o.tracks.push(s),s.id=i.tkhd.track_id,s.name=i.mdia.hdlr.name,s.references=[],i.tref)for(t=0;t<i.tref.boxes.length;t++)r={},s.references.push(r),r.type=i.tref.boxes[t].type,r.track_ids=i.tref.boxes[t].track_ids;i.edts&&(s.edits=i.edts.elst.entries),s.created=new Date(n+1e3*i.tkhd.creation_time),s.modified=new Date(n+1e3*i.tkhd.modification_time),s.movie_duration=i.tkhd.duration,s.movie_timescale=o.timescale,s.layer=i.tkhd.layer,s.alternate_group=i.tkhd.alternate_group,s.volume=i.tkhd.volume,s.matrix=i.tkhd.matrix,s.track_width=i.tkhd.width/65536,s.track_height=i.tkhd.height/65536,s.timescale=i.mdia.mdhd.timescale,s.cts_shift=i.mdia.minf.stbl.cslg,s.duration=i.mdia.mdhd.duration,s.samples_duration=i.samples_duration,s.codec=a.getCodec(),s.kind=i.udta&&i.udta.kinds.length?i.udta.kinds[0]:{schemeURI:"",value:""},s.language=i.mdia.elng?i.mdia.elng.extended_language:i.mdia.mdhd.languageString,s.nb_samples=i.samples.length,s.size=i.samples_size,s.bitrate=8*s.size*s.timescale/s.samples_duration,a.isAudio()?(s.type="audio",o.audioTracks.push(s),s.audio={},s.audio.sample_rate=a.getSampleRate(),s.audio.channel_count=a.getChannelCount(),s.audio.sample_size=a.getSampleSize()):a.isVideo()?(s.type="video",o.videoTracks.push(s),s.video={},s.video.width=a.getWidth(),s.video.height=a.getHeight()):a.isSubtitle()?(s.type="subtitles",o.subtitleTracks.push(s)):a.isHint()?(s.type="metadata",o.hintTracks.push(s)):a.isMetadata()?(s.type="metadata",o.metadataTracks.push(s)):(s.type="metadata",o.otherTracks.push(s))}else o.hasMoov=!1;if(o.mime="",o.hasMoov&&o.tracks){for(o.videoTracks&&o.videoTracks.length>0?o.mime+='video/mp4; codecs="':o.audioTracks&&o.audioTracks.length>0?o.mime+='audio/mp4; codecs="':o.mime+='application/mp4; codecs="',e=0;e<o.tracks.length;e++)0!==e&&(o.mime+=","),o.mime+=o.tracks[e].codec;o.mime+='"; profiles="',o.mime+=this.ftyp.compatible_brands.join(),o.mime+='"'}return o},y.prototype.setNextSeekPositionFromSample=function(e){e&&(this.nextSeekPosition?this.nextSeekPosition=Math.min(e.offset+e.alreadyRead,this.nextSeekPosition):this.nextSeekPosition=e.offset+e.alreadyRead)},y.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 s=this.fragmentedTracks[t];for(i=s.trak;i.nextSample<i.samples.length&&this.sampleProcessingStarted;){o.debug("ISOFile","Creating media fragment on track #"+s.id+" for sample "+i.nextSample);var r=this.createFragment(s.id,i.nextSample,s.segmentStream);if(!r)break;if(s.segmentStream=r,i.nextSample++,(i.nextSample%s.nb_samples==0||e||i.nextSample>=i.samples.length)&&(o.info("ISOFile","Sending fragmented data on track #"+s.id+" for samples ["+Math.max(0,i.nextSample-s.nb_samples)+","+(i.nextSample-1)+"]"),o.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(s.id,s.user,s.segmentStream.buffer,i.nextSample,e||i.nextSample>=i.samples.length),s.segmentStream=null,s!==this.fragmentedTracks[t]))break}}if(null!==this.onSamples)for(t=0;t<this.extractedTracks.length;t++){var a=this.extractedTracks[t];for(i=a.trak;i.nextSample<i.samples.length&&this.sampleProcessingStarted;){o.debug("ISOFile","Exporting on track #"+a.id+" sample #"+i.nextSample);var n=this.getSample(i,i.nextSample);if(!n){this.setNextSeekPositionFromSample(i.samples[i.nextSample]);break}if(i.nextSample++,a.samples.push(n),(i.nextSample%a.nb_samples==0||i.nextSample>=i.samples.length)&&(o.debug("ISOFile","Sending samples on track #"+a.id+" for sample "+i.nextSample),this.onSamples&&this.onSamples(a.id,a.user,a.samples),a.samples=[],a!==this.extractedTracks[t]))break}}}},y.prototype.getBox=function(e){var t=this.getBoxes(e,!0);return t.length?t[0]:null},y.prototype.getBoxes=function(e,t){var i=[];return y._sweep.call(this,e,i,t),i},y._sweep=function(e,t,i){for(var s in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&i)return;y._sweep.call(this.boxes[s],e,t,i)}},y.prototype.getTrackSamplesInfo=function(e){var t=this.getTrackById(e);return t?t.samples:void 0},y.prototype.getTrackSample=function(e,t){var i=this.getTrackById(e);return this.getSample(i,t)},y.prototype.releaseUsedSamples=function(e,t){var i=0,s=this.getTrackById(e);s.lastValidSample||(s.lastValidSample=0);for(var r=s.lastValidSample;r<t;r++)i+=this.releaseSample(s,r);o.info("ISOFile","Track #"+e+" released samples up to "+t+" (released size: "+i+", remaining: "+this.samplesDataSize+")"),s.lastValidSample=t},y.prototype.start=function(){this.sampleProcessingStarted=!0,this.processSamples(!1)},y.prototype.stop=function(){this.sampleProcessingStarted=!1},y.prototype.flush=function(){o.info("ISOFile","Flushing remaining samples"),this.updateSampleLists(),this.processSamples(!0),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0)},y.prototype.seekTrack=function(e,t,i){var s,r,a,n,l=0,d=0;if(0===i.samples.length)return o.info("ISOFile","No sample in track, cannot seek! Using time "+o.getDurationString(0,1)+" and offset: 0"),{offset:0,time:0};for(s=0;s<i.samples.length;s++){if(r=i.samples[s],0===s)d=0,n=r.timescale;else if(r.cts>e*r.timescale){d=s-1;break}t&&r.is_sync&&(l=s)}for(t&&(d=l),e=i.samples[d].cts,i.nextSample=d;i.samples[d].alreadyRead===i.samples[d].size&&i.samples[d+1];)d++;return a=i.samples[d].offset+i.samples[d].alreadyRead,o.info("ISOFile","Seeking to "+(t?"RAP":"")+" sample #"+i.nextSample+" on track "+i.tkhd.track_id+", time "+o.getDurationString(e,n)+" and offset: "+a),{offset:a,time:e/n}},y.prototype.getTrackDuration=function(e){var t;return e.samples?((t=e.samples[e.samples.length-1]).cts+t.duration)/t.timescale:1/0},y.prototype.seek=function(e,t){var i,s,r,a=this.moov,n={offset:1/0,time:1/0};if(this.moov){for(r=0;r<a.traks.length;r++)i=a.traks[r],e>this.getTrackDuration(i)||((s=this.seekTrack(e,t,i)).offset<n.offset&&(n.offset=s.offset),s.time<n.time&&(n.time=s.time));return o.info("ISOFile","Seeking at time "+o.getDurationString(n.time,1)+" needs a buffer with a fileStart position of "+n.offset),n.offset===1/0?n={offset:this.nextParsePosition,time:0}:n.offset=this.stream.getEndFilePositionAfter(n.offset),o.info("ISOFile","Adjusted seek position (after checking data already in buffer): "+n.offset),n}throw"Cannot seek: moov not received!"},y.prototype.equal=function(e){for(var t=0;t<this.boxes.length&&t<e.boxes.length;){var i=this.boxes[t],s=e.boxes[t];if(!u.boxEqual(i,s))return!1;t++}return!0},t.ISOFile=y,y.prototype.lastBoxStartPosition=0,y.prototype.parsingMdat=null,y.prototype.nextParsePosition=0,y.prototype.discardMdatData=!1,y.prototype.processIncompleteBox=function(e){var t;return"mdat"===e.type?(t=new u[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))},y.prototype.hasIncompleteMdat=function(){return null!==this.parsingMdat},y.prototype.processIncompleteMdat=function(){var e;return e=this.parsingMdat,this.stream.seek(e.start+e.size,!1,this.discardMdatData)?(o.debug("ISOFile","Found 'mdat' end in buffered data"),this.parsingMdat=null,!0):(this.nextParsePosition=this.stream.findEndContiguousBuf(),!1)},y.prototype.restoreParsePosition=function(){return this.stream.seek(this.lastBoxStartPosition,!0,this.discardMdatData)},y.prototype.saveParsePosition=function(){this.lastBoxStartPosition=this.stream.getPosition()},y.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))},y.prototype.add=u.Box.prototype.add,y.prototype.addBox=u.Box.prototype.addBox,y.prototype.init=function(e){var t=e||{};this.add("ftyp").set("major_brand",t.brands&&t.brands[0]||"iso4").set("minor_version",0).set("compatible_brands",t.brands||["iso4"]);var i=this.add("moov");return i.add("mvhd").set("timescale",t.timescale||600).set("rate",t.rate||65536).set("creation_time",0).set("modification_time",0).set("duration",t.duration||0).set("volume",t.width?0:256).set("matrix",[65536,0,0,0,65536,0,0,0,1073741824]).set("next_track_id",1),i.add("mvex"),this},y.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",u.TKHD_FLAG_ENABLED|u.TKHD_FLAG_IN_MOVIE|u.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<<16).set("height",t.height<<16);var s=i.add("mdia");s.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||"und"),s.add("hdlr").set("handler",t.hdlr||"vide").set("name",t.name||"Track created with MP4Box.js"),s.add("elng").set("extended_language",t.language||"fr-FR");var r=s.add("minf");if(void 0!==u[t.type+"SampleEntry"]){var a=new u[t.type+"SampleEntry"];a.data_reference_index=1;var o="";for(var l in u.sampleEntryCodes)for(var d=u.sampleEntryCodes[l],h=0;h<d.length;h++)if(d.indexOf(t.type)>-1){o=l;break}switch(o){case"Visual":if(r.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),t.avcDecoderConfigRecord){var c=new u.avcCBox;c.parse(new n(t.avcDecoderConfigRecord)),a.addBox(c)}else if(t.hevcDecoderConfigRecord){var p=new u.hvcCBox;p.parse(new n(t.hevcDecoderConfigRecord)),a.addBox(p)}break;case"Audio":r.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":r.add("hmhd");break;case"Subtitle":if(r.add("sthd"),"stpp"===t.type)a.set("namespace",t.namespace||"nonamespace").set("schema_location",t.schema_location||"").set("auxiliary_mime_types",t.auxiliary_mime_types||"");break;default:r.add("nmhd")}t.description&&a.addBox(t.description),t.description_boxes&&t.description_boxes.forEach((function(e){a.addBox(e)})),r.add("dinf").add("dref").addEntry((new u["url Box"]).set("flags",1));var f=r.add("stbl");return f.add("stsd").addEntry(a),f.add("stts").set("sample_counts",[]).set("sample_deltas",[]),f.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),f.add("stco").set("chunk_offsets",[]),f.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}},u.Box.prototype.computeSize=function(e){var t=e||new l;t.endianness=l.BIG_ENDIAN,this.write(t)},y.prototype.addSample=function(e,t,i){var s=i||{},r={},a=this.getTrackById(e);if(null!==a){r.number=a.samples.length,r.track_id=a.tkhd.track_id,r.timescale=a.mdia.mdhd.timescale,r.description_index=s.sample_description_index?s.sample_description_index-1:0,r.description=a.mdia.minf.stbl.stsd.entries[r.description_index],r.data=t,r.size=t.byteLength,r.alreadyRead=r.size,r.duration=s.duration||1,r.cts=s.cts||0,r.dts=s.dts||0,r.is_sync=s.is_sync||!1,r.is_leading=s.is_leading||0,r.depends_on=s.depends_on||0,r.is_depended_on=s.is_depended_on||0,r.has_redundancy=s.has_redundancy||0,r.degradation_priority=s.degradation_priority||0,r.offset=0,r.subsamples=s.subsamples,a.samples.push(r),a.samples_size+=r.size,a.samples_duration+=r.duration,void 0===a.first_dts&&(a.first_dts=s.dts),this.processSamples();var o=this.createSingleSampleMoof(r);return this.addBox(o),o.computeSize(),o.trafs[0].truns[0].data_offset=o.size+8,this.add("mdat").data=new Uint8Array(t),r}},y.prototype.createSingleSampleMoof=function(e){var t=0;t=e.is_sync?1<<25:65536;var i=new u.moofBox;i.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var s=i.add("traf"),r=this.getTrackById(e.track_id);return s.add("tfhd").set("track_id",e.track_id).set("flags",u.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),s.add("tfdt").set("baseMediaDecodeTime",e.dts-(r.first_dts||0)),s.add("trun").set("flags",u.TRUN_FLAGS_DATA_OFFSET|u.TRUN_FLAGS_DURATION|u.TRUN_FLAGS_SIZE|u.TRUN_FLAGS_FLAGS|u.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",[t]).set("sample_composition_time_offset",[e.cts-e.dts]),i},y.prototype.lastMoofIndex=0,y.prototype.samplesDataSize=0,y.prototype.resetTables=function(){var e,t,i,s,r,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=[],(s=t.mdia.minf.stbl.stts).sample_counts=[],s.sample_deltas=[],(r=t.mdia.minf.stbl.ctts)&&(r.sample_counts=[],r.sample_offsets=[]),a=t.mdia.minf.stbl.stss;var o=t.mdia.minf.stbl.boxes.indexOf(a);-1!=o&&(t.mdia.minf.stbl.boxes[o]=null)}},y.initSampleGroups=function(e,t,i,s,r){var a,o,n,l;function d(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=[]),o=0;o<i.length;o++){for(l=i[o].grouping_type+"/"+i[o].grouping_type_parameter,n=new d(i[o].grouping_type,i[o].grouping_type_parameter,i[o]),t&&(t.sample_groups_info[l]=n),e.sample_groups_info[l]||(e.sample_groups_info[l]=n),a=0;a<s.length;a++)s[a].grouping_type===i[o].grouping_type&&(n.description=s[a],n.description.used=!0);if(r)for(a=0;a<r.length;a++)r[a].grouping_type===i[o].grouping_type&&(n.fragment_description=r[a],n.fragment_description.used=!0,n.is_fragment=!0)}if(t){if(r)for(o=0;o<r.length;o++)!r[o].used&&r[o].version>=2&&(l=r[o].grouping_type+"/0",(n=new d(r[o].grouping_type,0)).is_fragment=!0,t.sample_groups_info[l]||(t.sample_groups_info[l]=n))}else for(o=0;o<s.length;o++)!s[o].used&&s[o].version>=2&&(l=s[o].grouping_type+"/0",n=new d(s[o].grouping_type,0),e.sample_groups_info[l]||(e.sample_groups_info[l]=n))},y.setSampleGroupProperties=function(e,t,i,s){var r,a;for(r in t.sample_groups=[],s){var o;if(t.sample_groups[r]={},t.sample_groups[r].grouping_type=s[r].grouping_type,t.sample_groups[r].grouping_type_parameter=s[r].grouping_type_parameter,i>=s[r].last_sample_in_run&&(s[r].last_sample_in_run<0&&(s[r].last_sample_in_run=0),s[r].entry_index++,s[r].entry_index<=s[r].sbgp.entries.length-1&&(s[r].last_sample_in_run+=s[r].sbgp.entries[s[r].entry_index].sample_count)),s[r].entry_index<=s[r].sbgp.entries.length-1?t.sample_groups[r].group_description_index=s[r].sbgp.entries[s[r].entry_index].group_description_index:t.sample_groups[r].group_description_index=-1,0!==t.sample_groups[r].group_description_index)o=s[r].fragment_description?s[r].fragment_description:s[r].description,t.sample_groups[r].group_description_index>0?(a=t.sample_groups[r].group_description_index>65535?(t.sample_groups[r].group_description_index>>16)-1:t.sample_groups[r].group_description_index-1,o&&a>=0&&(t.sample_groups[r].description=o.entries[a])):o&&o.version>=2&&o.default_group_description_index>0&&(t.sample_groups[r].description=o.entries[o.default_group_description_index-1])}},y.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))},y.prototype.buildSampleLists=function(){var e,t;for(e=0;e<this.moov.traks.length;e++)t=this.moov.traks[e],this.buildTrakSampleLists(t)},y.prototype.buildTrakSampleLists=function(e){var t,i,s,r,a,o,n,l,d,h,c,u,p,f,m,g,A,b,_,v,w,S,T,E;if(e.samples=[],e.samples_duration=0,e.samples_size=0,i=e.mdia.minf.stbl.stco||e.mdia.minf.stbl.co64,s=e.mdia.minf.stbl.stsc,r=e.mdia.minf.stbl.stsz||e.mdia.minf.stbl.stz2,a=e.mdia.minf.stbl.stts,o=e.mdia.minf.stbl.ctts,n=e.mdia.minf.stbl.stss,l=e.mdia.minf.stbl.stsd,d=e.mdia.minf.stbl.subs,u=e.mdia.minf.stbl.stdp,h=e.mdia.minf.stbl.sbgps,c=e.mdia.minf.stbl.sgpds,b=-1,_=-1,v=-1,w=-1,S=0,T=0,E=0,y.initSampleGroups(e,null,h,c),void 0!==r){for(t=0;t<r.sample_sizes.length;t++){var k={};k.number=t,k.track_id=e.tkhd.track_id,k.timescale=e.mdia.mdhd.timescale,k.alreadyRead=0,e.samples[t]=k,k.size=r.sample_sizes[t],e.samples_size+=k.size,0===t?(f=1,p=0,k.chunk_index=f,k.chunk_run_index=p,A=s.samples_per_chunk[p],g=0,m=p+1<s.first_chunk.length?s.first_chunk[p+1]-1:1/0):t<A?(k.chunk_index=f,k.chunk_run_index=p):(f++,k.chunk_index=f,g=0,f<=m||(m=++p+1<s.first_chunk.length?s.first_chunk[p+1]-1:1/0),k.chunk_run_index=p,A+=s.samples_per_chunk[p]),k.description_index=s.sample_description_index[k.chunk_run_index]-1,k.description=l.entries[k.description_index],k.offset=i.chunk_offsets[k.chunk_index-1]+g,g+=k.size,t>b&&(_++,b<0&&(b=0),b+=a.sample_counts[_]),t>0?(e.samples[t-1].duration=a.sample_deltas[_],e.samples_duration+=e.samples[t-1].duration,k.dts=e.samples[t-1].dts+e.samples[t-1].duration):k.dts=0,o?(t>=v&&(w++,v<0&&(v=0),v+=o.sample_counts[w]),k.cts=e.samples[t].dts+o.sample_offsets[w]):k.cts=k.dts,n?(t==n.sample_numbers[S]-1?(k.is_sync=!0,S++):(k.is_sync=!1,k.degradation_priority=0),d&&d.entries[T].sample_delta+E==t+1&&(k.subsamples=d.entries[T].subsamples,E+=d.entries[T].sample_delta,T++)):k.is_sync=!0,y.process_sdtp(e.mdia.minf.stbl.sdtp,k,k.number),k.degradation_priority=u?u.priority[t]:0,d&&d.entries[T].sample_delta+E==t&&(k.subsamples=d.entries[T].subsamples,E+=d.entries[T].sample_delta),(h.length>0||c.length>0)&&y.setSampleGroupProperties(e,k,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)}},y.prototype.updateSampleLists=function(){var e,t,i,s,r,a,o,n,l,d,h,c,p,f,m;if(void 0!==this.moov)for(;this.lastMoofIndex<this.moofs.length;)if(l=this.moofs[this.lastMoofIndex],this.lastMoofIndex++,"moof"==l.type)for(d=l,e=0;e<d.trafs.length;e++){for(h=d.trafs[e],c=this.getTrackById(h.tfhd.track_id),p=this.getTrexById(h.tfhd.track_id),s=h.tfhd.flags&u.TFHD_FLAG_SAMPLE_DESC?h.tfhd.default_sample_description_index:p?p.default_sample_description_index:1,r=h.tfhd.flags&u.TFHD_FLAG_SAMPLE_DUR?h.tfhd.default_sample_duration:p?p.default_sample_duration:0,a=h.tfhd.flags&u.TFHD_FLAG_SAMPLE_SIZE?h.tfhd.default_sample_size:p?p.default_sample_size:0,o=h.tfhd.flags&u.TFHD_FLAG_SAMPLE_FLAGS?h.tfhd.default_sample_flags:p?p.default_sample_flags:0,h.sample_number=0,h.sbgps.length>0&&y.initSampleGroups(c,h,h.sbgps,c.mdia.minf.stbl.sgpds,h.sgpds),t=0;t<h.truns.length;t++){var g=h.truns[t];for(i=0;i<g.sample_count;i++){(f={}).moof_number=this.lastMoofIndex,f.number_in_traf=h.sample_number,h.sample_number++,f.number=c.samples.length,h.first_sample_index=c.samples.length,c.samples.push(f),f.track_id=c.tkhd.track_id,f.timescale=c.mdia.mdhd.timescale,f.description_index=s-1,f.description=c.mdia.minf.stbl.stsd.entries[f.description_index],f.size=a,g.flags&u.TRUN_FLAGS_SIZE&&(f.size=g.sample_size[i]),c.samples_size+=f.size,f.duration=r,g.flags&u.TRUN_FLAGS_DURATION&&(f.duration=g.sample_duration[i]),c.samples_duration+=f.duration,c.first_traf_merged||i>0?f.dts=c.samples[c.samples.length-2].dts+c.samples[c.samples.length-2].duration:(h.tfdt?f.dts=h.tfdt.baseMediaDecodeTime:f.dts=0,c.first_traf_merged=!0),f.cts=f.dts,g.flags&u.TRUN_FLAGS_CTS_OFFSET&&(f.cts=f.dts+g.sample_composition_time_offset[i]),m=o,g.flags&u.TRUN_FLAGS_FLAGS?m=g.sample_flags[i]:0===i&&g.flags&u.TRUN_FLAGS_FIRST_FLAG&&(m=g.first_sample_flags),f.is_sync=!(m>>16&1),f.is_leading=m>>26&3,f.depends_on=m>>24&3,f.is_depended_on=m>>22&3,f.has_redundancy=m>>20&3,f.degradation_priority=65535&m;var A=!!(h.tfhd.flags&u.TFHD_FLAG_BASE_DATA_OFFSET),b=!!(h.tfhd.flags&u.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),_=!!(g.flags&u.TRUN_FLAGS_DATA_OFFSET),v=0;v=A?h.tfhd.base_data_offset:b||0===t?d.start:n,f.offset=0===t&&0===i?_?v+g.data_offset:v:n,n=f.offset+f.size,(h.sbgps.length>0||h.sgpds.length>0||c.mdia.minf.stbl.sbgps.length>0||c.mdia.minf.stbl.sgpds.length>0)&&y.setSampleGroupProperties(c,f,f.number_in_traf,h.sample_groups_info)}}if(h.subs){c.has_fragment_subsamples=!0;var w=h.first_sample_index;for(t=0;t<h.subs.entries.length;t++)w+=h.subs.entries[t].sample_delta,(f=c.samples[w-1]).subsamples=h.subs.entries[t].subsamples}}},y.prototype.getSample=function(e,t){var i,s=e.samples[t];if(!this.moov)return null;if(s.data){if(s.alreadyRead==s.size)return s}else s.data=new Uint8Array(s.size),s.alreadyRead=0,this.samplesDataSize+=s.size,o.debug("ISOFile","Allocating sample #"+t+" on track #"+e.tkhd.track_id+" of size "+s.size+" (total: "+this.samplesDataSize+")");for(;;){var r=this.stream.findPosition(!0,s.offset+s.alreadyRead,!1);if(!(r>-1))return null;var a=(i=this.stream.buffers[r]).byteLength-(s.offset+s.alreadyRead-i.fileStart);if(s.size-s.alreadyRead<=a)return o.debug("ISOFile","Getting sample #"+t+" data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-i.fileStart)+" read size: "+(s.size-s.alreadyRead)+" full size: "+s.size+")"),l.memcpy(s.data.buffer,s.alreadyRead,i,s.offset+s.alreadyRead-i.fileStart,s.size-s.alreadyRead),i.usedBytes+=s.size-s.alreadyRead,this.stream.logBufferLevel(),s.alreadyRead=s.size,s;if(0===a)return null;o.debug("ISOFile","Getting sample #"+t+" partial data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-i.fileStart)+" read size: "+a+" full size: "+s.size+")"),l.memcpy(s.data.buffer,s.alreadyRead,i,s.offset+s.alreadyRead-i.fileStart,a),s.alreadyRead+=a,i.usedBytes+=a,this.stream.logBufferLevel()}},y.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},y.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize},y.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},y.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},y.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},y.prototype.items=[],y.prototype.entity_groups=[],y.prototype.itemsDataSize=0,y.prototype.flattenItemInfo=function(){var e,t,i,s=this.items,r=this.entity_groups,a=this.meta;if(null!=a&&void 0!==a.hdlr&&void 0!==a.iinf){for(e=0;e<a.iinf.item_infos.length;e++)(i={}).id=a.iinf.item_infos[e].item_ID,s[i.id]=i,i.ref_to=[],i.name=a.iinf.item_infos[e].item_name,a.iinf.item_infos[e].protection_index>0&&(i.protection=a.ipro.protections[a.iinf.item_infos[e].protection_index-1]),a.iinf.item_infos[e].item_type?i.type=a.iinf.item_infos[e].item_type:i.type="mime",i.content_type=a.iinf.item_infos[e].content_type,i.content_encoding=a.iinf.item_infos[e].content_encoding;if(a.grpl)for(e=0;e<a.grpl.boxes.length;e++)entity_group={},entity_group.id=a.grpl.boxes[e].group_id,entity_group.entity_ids=a.grpl.boxes[e].entity_ids,entity_group.type=a.grpl.boxes[e].type,r[entity_group.id]=entity_group;if(a.iloc)for(e=0;e<a.iloc.items.length;e++){var n=a.iloc.items[e];switch(i=s[n.item_ID],0!==n.data_reference_index&&(o.warn("Item storage with reference to other files: not supported"),i.source=a.dinf.boxes[n.data_reference_index-1]),n.construction_method){case 0:break;case 1:case 2:o.warn("Item storage with construction_method : not supported")}for(i.extents=[],i.size=0,t=0;t<n.extents.length;t++)i.extents[t]={},i.extents[t].offset=n.extents[t].extent_offset+n.base_offset,i.extents[t].length=n.extents[t].extent_length,i.extents[t].alreadyRead=0,i.size+=i.extents[t].length}if(a.pitm&&(s[a.pitm.item_id].primary=!0),a.iref)for(e=0;e<a.iref.references.length;e++){var l=a.iref.references[e];for(t=0;t<l.references.length;t++)s[l.from_item_ID].ref_to.push({type:l.type,id:l.references[t]})}if(a.iprp)for(var d=0;d<a.iprp.ipmas.length;d++){var h=a.iprp.ipmas[d];for(e=0;e<h.associations.length;e++){var c=h.associations[e];if((i=s[c.id])||(i=r[c.id]),i)for(void 0===i.properties&&(i.properties={},i.properties.boxes=[]),t=0;t<c.props.length;t++){var u=c.props[t];if(u.property_index>0&&u.property_index-1<a.iprp.ipco.boxes.length){var p=a.iprp.ipco.boxes[u.property_index-1];i.properties[p.type]=p,i.properties.boxes.push(p)}}}}}},y.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,o.debug("ISOFile","Allocating item #"+e+" of size "+i.size+" (total: "+this.itemsDataSize+")");else if(i.alreadyRead===i.size)return i;for(var s=0;s<i.extents.length;s++){var r=i.extents[s];if(r.alreadyRead!==r.length){var a=this.stream.findPosition(!0,r.offset+r.alreadyRead,!1);if(!(a>-1))return null;var n=(t=this.stream.buffers[a]).byteLength-(r.offset+r.alreadyRead-t.fileStart);if(!(r.length-r.alreadyRead<=n))return o.debug("ISOFile","Getting item #"+e+" extent #"+s+" partial data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-t.fileStart)+" read size: "+n+" full extent size: "+r.length+" full item size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,t,r.offset+r.alreadyRead-t.fileStart,n),r.alreadyRead+=n,i.alreadyRead+=n,t.usedBytes+=n,this.stream.logBufferLevel(),null;o.debug("ISOFile","Getting item #"+e+" extent #"+s+" data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-t.fileStart)+" read size: "+(r.length-r.alreadyRead)+" full extent size: "+r.length+" full item size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,t,r.offset+r.alreadyRead-t.fileStart,r.length-r.alreadyRead),t.usedBytes+=r.length-r.alreadyRead,this.stream.logBufferLevel(),i.alreadyRead+=r.length-r.alreadyRead,r.alreadyRead=r.length}}return i.alreadyRead===i.size?i:null},y.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},y.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)}},y.prototype.hasItem=function(e){for(var t in this.items){var i=this.items[t];if(i.name===e)return i.id}return-1},y.prototype.getMetaHandler=function(){return this.meta?this.meta.hdlr.handler:null},y.prototype.getPrimaryItem=function(){return this.meta&&this.meta.pitm?this.getItem(this.meta.pitm.item_id):null},y.prototype.itemToFragmentedTrackFile=function(e){var t=e||{},i=null;if(null==(i=t.itemId?this.getItem(t.itemId):this.getPrimaryItem()))return null;var s=new y;s.discardMdatData=!1;var r={type:i.type,description_boxes:i.properties.boxes};i.properties.ispe&&(r.width=i.properties.ispe.image_width,r.height=i.properties.ispe.image_height);var a=s.addTrack(r);return a?(s.addSample(a,i.data),s):null},y.prototype.write=function(e){for(var t=0;t<this.boxes.length;t++)this.boxes[t].write(e)},y.prototype.createFragment=function(e,t,i){var s=this.getTrackById(e),r=this.getSample(s,t);if(null==r)return this.setNextSeekPositionFromSample(s.samples[t]),null;var a=i||new l;a.endianness=l.BIG_ENDIAN;var n=this.createSingleSampleMoof(r);n.write(a),n.trafs[0].truns[0].data_offset=n.size+8,o.debug("MP4Box","Adjusting data_offset with new value "+n.trafs[0].truns[0].data_offset),a.adjustUint32(n.trafs[0].truns[0].data_offset_position,n.trafs[0].truns[0].data_offset);var d=new u.mdatBox;return d.data=r.data,d.write(a),a},y.writeInitializationSegment=function(e,t,i,s){var r;o.debug("ISOFile","Generating initialization segment");var a=new l;a.endianness=l.BIG_ENDIAN,e.write(a);var n=t.add("mvex");for(i&&n.add("mehd").set("fragment_duration",i),r=0;r<t.traks.length;r++)n.add("trex").set("track_id",t.traks[r].tkhd.track_id).set("default_sample_description_index",1).set("default_sample_duration",s).set("default_sample_size",0).set("default_sample_flags",65536);return t.write(a),a.buffer},y.prototype.save=function(e){var t=new l;t.endianness=l.BIG_ENDIAN,this.write(t),t.save(e)},y.prototype.getBuffer=function(){var e=new l;return e.endianness=l.BIG_ENDIAN,this.write(e),e.buffer},y.prototype.initializeSegmentation=function(){var e,t,i,s;for(null===this.onSegment&&o.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 r=new u.moovBox;r.mvhd=this.moov.mvhd,r.boxes.push(r.mvhd),i=this.getTrackById(this.fragmentedTracks[e].id),r.boxes.push(i),r.traks.push(i),(s={}).id=i.tkhd.track_id,s.user=this.fragmentedTracks[e].user,s.buffer=y.writeInitializationSegment(this.ftyp,r,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(s)}return t},u.Box.prototype.printHeader=function(e){this.size+=8,this.size>d&&(this.size+=8),"uuid"===this.type&&(this.size+=16),e.log(e.indent+"size:"+this.size),e.log(e.indent+"type:"+this.type)},u.FullBox.prototype.printHeader=function(e){this.size+=4,u.Box.prototype.printHeader.call(this,e),e.log(e.indent+"version:"+this.version),e.log(e.indent+"flags:"+this.flags)},u.Box.prototype.print=function(e){this.printHeader(e)},u.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}},y.prototype.print=function(e){e.indent="";for(var t=0;t<this.boxes.length;t++)this.boxes[t]&&this.boxes[t].print(e)},u.mvhdBox.prototype.print=function(e){u.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)},u.tkhdBox.prototype.print=function(e){u.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 A={createFile:function(e,t){var i=void 0===e||e,s=new y(t);return s.discardMdatData=!i,s}};t.createFile=A.createFile}));function Qd(e){return e.reduce(((e,t)=>256*e+t))}function Xd(e){const t=[101,103,119,99],i=e.length-28,s=e.slice(i,i+t.length);return t.every(((e,t)=>e===s[t]))}Yd.Log,Yd.MP4BoxStream,Yd.DataStream,Yd.MultiBufferStream,Yd.MPEG4DescriptorParser,Yd.BoxParser,Yd.XMLSubtitlein4Parser,Yd.Textin4Parser,Yd.ISOFile,Yd.createFile;class Zd{constructor(){this.s=null,this.a=null,this.l=0,this.c=0,this.u=1/0,this.A=!1,this.d=!1,this.r=4194304,this.n=new Uint8Array([30,158,90,33,244,57,83,165,2,70,35,87,215,231,226,108]),this.t=this.n.slice().reverse()}destroy(){this.s=null,this.a=null,this.l=0,this.c=0,this.u=1/0,this.A=!1,this.d=!1,this.r=4194304,this.n=null,this.t=null}transport(e){if(!this.s&&this.l>50)return e;if(this.l++,this.d)return e;const t=new Uint8Array(e);if(this.A){if(!(this.c<this.u))return this.a&&this.s?(this.a.set(t,this.r),this.s.parse(null,this.r,t.byteLength),this.a.slice(this.r,this.r+t.byteLength)):(console.error("video_error_2"),this.d=!0,e);Xd(t)&&this.c++}else{const i=function(e,t){const i=function(e,t){for(let i=0;i<e.byteLength-t.length;i++)for(let s=0;s<t.length&&e[i+s]===t[s];s++)if(s===t.length-1)return i;return null}(e,t);if(i){const t=Qd(e.slice(i+16,i+16+8));return[t,Qd(e.slice(i+24,i+24+8)),function(e){return e.map((e=>~e))}(e.slice(i+32,i+32+t))]}return null}(t,this.t);if(!i)return e;const s=function(e){try{if("object"!=typeof WebAssembly||"function"!=typeof WebAssembly.instantiate)throw null;{const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(!(e instanceof WebAssembly.Module&&new WebAssembly.Instance(e)instanceof WebAssembly.Instance))throw null}}catch(e){return new Error("video_error_4")}let t;try{t={env:{__handle_stack_overflow:()=>e(new Error("video_error_1")),memory:new WebAssembly.Memory({initial:256,maximum:256})}}}catch(e){return new Error("video_error_5")}return t}(e);if(s instanceof Error)return console.error(s.message),this.d=!0,e;this.A=!0,this.u=i[1],Xd(t)&&this.c++,WebAssembly.instantiate(i[2],s).then((e=>{if(!function(e){return"function"==typeof e.parse&&"object"==typeof e.memory}(e.instance.exports))return this.d=!0,void console.error("video_error_3");this.s=e.instance.exports,this.a=new Uint8Array(this.s.memory.buffer)})).catch((e=>{this.d=!0,console.error("video_error_6")}))}return e}}class eh extends Ud{constructor(e){super(e),this.TAG_NAME="Fmp4Loader",this.player=e,this.mp4Box=Yd.createFile(),this.tempFmp4List=[],this.offset=0,this.videoTrackId=null,this.audioTrackId=null,this.isHevc=!1,this.transportDescarmber=null,this.player._opt.isFmp4Private&&(this.transportDescarmber=new Zd),this._listenMp4Box(),e.debug.log(this.TAG_NAME,"init")}destroy(){this.mp4Box&&(this.mp4Box.stop(),this.mp4Box.flush(),this.mp4Box.destroy(),this.mp4Box=null),this.transportDescarmber&&(this.transportDescarmber.destroy(),this.transportDescarmber=null),this.tempFmp4List=[],this.offset=0,this.videoTrackId=null,this.audioTrackId=null,this.isHevc=!1,this.player.debug.log(this.TAG_NAME,"destroy")}_listenMp4Box(){this.mp4Box.onReady=this.onReady.bind(this),this.mp4Box.onError=this.onError.bind(this),this.mp4Box.onSamples=this.onSamples.bind(this)}onReady(e){this.player.debug.log(this.TAG_NAME,"onReady",e);const t=e.videoTracks[0],i=e.audioTracks[0];if(t){this.videoTrackId=t.id;const e=this.getSeqHeader(t);e&&(this.player.debug.log(this.TAG_NAME,"seqHeader",e),this._doDecodeByFmp4(e,Ge,0,!0,0)),this.mp4Box.setExtractionOptions(t.id)}if(i&&this.player._opt.hasAudio){this.audioTrackId=i.id;const e=i.audio||{},t=Hr.indexOf(e.sample_rate),s=i.codec.replace("mp4a.40.","");this.mp4Box.setExtractionOptions(i.id);const r={profile:parseInt(s,10),sampleRate:t,channel:e.channel_count},a=Vr(r);this.player.debug.log(this.TAG_NAME,"aacADTSHeader",a,"config",r),this._doDecodeByFmp4(a,je,0,!1,0)}this.mp4Box.start()}onError(e){this.player.debug.error(this.TAG_NAME,"mp4Box onError",e)}onSamples(e,t,i){if(e===this.videoTrackId)for(const t of i){const i=t.data,s=t.is_sync,r=1e3*t.cts/t.timescale;t.duration,t.timescale,this.player.updateStats({vbps:i.byteLength,dts:r}),s&&this.calcIframeIntervalTimestamp(r);let a=null;a=this.isHevc?Wn(i,s):In(i,s);let o=this.cryptoPayload(a,s);this._doDecodeByFmp4(o,Ge,r,s,0),this.mp4Box.releaseUsedSamples(e,t.number)}else if(e===this.audioTrackId){if(this.player._opt.hasAudio)for(const t of i){const i=t.data;this.player.updateStats({abps:i.byteLength});const s=1e3*t.cts/t.timescale;t.duration,t.timescale;const r=new Uint8Array(i.byteLength+2);r.set([175,1],0),r.set(i,2),this._doDecodeByFmp4(r,je,s,!1,0),this.mp4Box.releaseUsedSamples(e,t.number)}}else this.player.debug.warn(this.TAG_NAME,"onSamples() trackId error",e)}getSeqHeader(e){const t=this.mp4Box.getTrackById(e.id);for(const e of t.mdia.minf.stbl.stsd.entries)if(e.avcC||e.hvcC){const t=new Yd.DataStream(void 0,0,Yd.DataStream.BIG_ENDIAN);let i=[];e.avcC?(e.avcC.write(t),i=[23,0,0,0,0]):(this.isHevc=!0,e.hvcC.write(t),i=[28,0,0,0,0]);const s=new Uint8Array(t.buffer,8),r=new Uint8Array(i.length+s.length);return r.set(i,0),r.set(s,i.length),r}return null}dispatch(e){let t=new Uint8Array(e);this.transportDescarmber&&(t=this.transportDescarmber.transport(t)),t.buffer.fileStart=this.offset,this.offset+=t.byteLength,this.mp4Box.appendBuffer(t.buffer)}downloadFmp4File(){const e=new Blob(this.tempFmp4List,{type:'video/mp4; codecs="avc1.640028,mp4a.40.2"'}),t=URL.createObjectURL(e),i=document.createElement("a");i.href=t,i.download=ha()+".fmp4",i.click(),URL.revokeObjectURL(t)}getInputByteLength(){let e=0;return this.mp4Box&&(e=this.mp4Box.getAllocatedSampleDataSize()),e}}class th extends Ud{constructor(e){super(e),Jd(this,"LOG_NAME","Mpeg4Loader"),this.player=e,this.player.debug.log(this.LOG_NAME,"init")}destroy(){super.destroy(),this.player.debug.log(this.LOG_NAME,"destroy")}}function ih(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if((t=t.filter(Boolean)).length<2)return t[0];const s=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let r=0;return t.forEach((e=>{s.set(e,r),r+=e.byteLength})),s}const sh=3,rh=4,ah=6,oh=15,nh=17,lh=129,dh=135,hh=21,ch=134,uh=27,ph=36;class fh{constructor(){this.slices=[],this.total_length=0,this.expected_length=0,this.random_access_indicator=0}}class mh{constructor(){this.pid=null,this.data=null,this.stream_type=null,this.random_access_indicator=null}}class gh{constructor(){this.pid=null,this.stream_id=null,this.len=null,this.data=null,this.pts=null,this.nearest_pts=null,this.dts=null}}const yh=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];class Ah{constructor(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}isComplete(){let e=!1===this.hasAudio||!0===this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,t=!1===this.hasVideo||!0===this.hasVideo&&null!=this.videoCodec&&null!=this.width&&null!=this.height&&null!=this.fps&&null!=this.profile&&null!=this.level&&null!=this.refFrames&&null!=this.chromaFormat&&null!=this.sarNum&&null!=this.sarDen;return null!=this.mimeType&&e&&t}isSeekable(){return!0===this.hasKeyframesIndex}getNearestKeyframe(e){if(null==this.keyframesIndex)return null;let t=this.keyframesIndex,i=this._search(t.times,e);return{index:i,milliseconds:t.times[i],fileposition:t.filepositions[i]}}_search(e,t){let i=0,s=e.length-1,r=0,a=0,o=s;for(t<e[0]&&(i=0,a=o+1);a<=o;){if(r=a+Math.floor((o-a)/2),r===s||t>=e[r]&&t<e[r+1]){i=r;break}e[r]<t?a=r+1:o=r-1}return i}}class bh{constructor(e){let t=null,i=e.audio_object_type,s=e.audio_object_type,r=e.sampling_freq_index,a=e.channel_config,o=0,n=navigator.userAgent.toLowerCase();-1!==n.indexOf("firefox")?r>=6?(s=5,t=new Array(4),o=r-3):(s=2,t=new Array(2),o=r):-1!==n.indexOf("android")?(s=2,t=new Array(2),o=r):(s=5,o=r,t=new Array(4),r>=6?o=r-3:1===a&&(s=2,t=new Array(2),o=r)),t[0]=s<<3,t[0]|=(15&r)>>>1,t[1]=(15&r)<<7,t[1]|=(15&a)<<3,5===s&&(t[1]|=(15&o)>>>1,t[2]=(1&o)<<7,t[2]|=8,t[3]=0),this.config=t,this.sampling_rate=yh[r],this.sampling_index=r,this.channel_count=a,this.object_type=s,this.original_object_type=i,this.codec_mimetype="mp4a.40."+s,this.original_codec_mimetype="mp4a.40."+i}}class _h extends Ud{constructor(e){super(e),this.player=e,this.TAG_NAME="TsLoaderV2",this.first_parse_=!0,this.tsPacketSize=0,this.syncOffset=0,this.pmt_=null,this.config_=null,this.media_info_=new Ah,this.timescale_=90,this.duration_=0,this.pat_={version_number:0,network_pid:0,program_map_pid:{}},this.current_program_=null,this.current_pmt_pid_=-1,this.program_pmt_map_={},this.pes_slice_queues_={},this.section_slice_queues_={},this.video_metadata_={vps:null,sps:null,pps:null,details:null},this.audio_metadata_={codec:null,audio_object_type:null,sampling_freq_index:null,sampling_frequency:null,channel_config:null},this.last_pcr_=null,this.audio_last_sample_pts_=void 0,this.aac_last_incomplete_data_=null,this.has_video_=!1,this.has_audio_=!1,this.video_init_segment_dispatched_=!1,this.audio_init_segment_dispatched_=!1,this.video_metadata_changed_=!1,this.audio_metadata_changed_=!1,this.loas_previous_frame=null,this.video_track_={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this.audio_track_={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._remainingPacketData=null,this.player.debug.log(this.TAG_NAME,"init")}destroy(){this.media_info_=null,this.pes_slice_queues_=null,this.section_slice_queues_=null,this.video_metadata_=null,this.audio_metadata_=null,this.aac_last_incomplete_data_=null,this.video_track_=null,this.audio_track_=null,this._remainingPacketData=null,super.destroy()}probe(e){let t=new Uint8Array(e),i=-1,s=188;if(t.byteLength<=3*s)return{needMoreData:!0};for(;-1===i;){let e=Math.min(1e3,t.byteLength-3*s);for(let r=0;r<e;){if(71===t[r]&&71===t[r+s]&&71===t[r+2*s]){i=r;break}r++}if(-1===i)if(188===s)s=192;else{if(192!==s)break;s=204}}return-1===i?{match:!1}:(192===s&&i>=4&&(i-=4),{match:!0,consumed:0,ts_packet_size:s,sync_offset:i})}_initPmt(){return{program_number:0,version_number:0,pcr_pid:0,pid_stream_type:{},common_pids:{h264:void 0,h265:void 0,adts_aac:void 0,loas_aac:void 0,opus:void 0,ac3:void 0,eac3:void 0,mp3:void 0},pes_private_data_pids:{},timed_id3_pids:{},synchronous_klv_pids:{},asynchronous_klv_pids:{},scte_35_pids:{},smpte2038_pids:{}}}dispatch(e){let t=new Uint8Array(e);this._remainingPacketData&&(t=ih(this._remainingPacketData,t),this._remainingPacketData=null);let i=t.buffer;const s=this.parseChunks(i);s?this._remainingPacketData=t.subarray(s):t.length<this.tsPacketSize&&(this._remainingPacketData=t)}parseChunks(e){let t=0;if(this.first_parse_){this.first_parse_=!1;const i=this.probe(e);i.match&&(this.tsPacketSize=i.ts_packet_size,this.syncOffset=i.sync_offset),t=this.syncOffset,this.player.debug.log(this.TAG_NAME,`isFirstDispatch and tsPacketSize = ${this.tsPacketSize}, syncOffset = ${this.syncOffset}`)}for(;t+this.tsPacketSize<=e.byteLength;){192===this.tsPacketSize&&(t+=4);const i=new Uint8Array(e,t,188);let s=i[0];if(71!==s){this.player.debug.warn(this.TAG_NAME,`parseChunks() sync_byte = ${s}, not start with 0x47, so break`);break}let r=(64&i[1])>>>6;i[1];let a=(31&i[1])<<8|i[2],o=(48&i[3])>>>4,n=15&i[3],l=!(!this.pmt_||this.pmt_.pcr_pid!==a),d={},h=4;if(2==o||3==o){let e=i[4];if(e>0&&(l||3==o)){if(d.discontinuity_indicator=(128&i[5])>>>7,d.random_access_indicator=(64&i[5])>>>6,d.elementary_stream_priority_indicator=(32&i[5])>>>5,(16&i[5])>>>4){let e=300*(i[6]<<25|i[7]<<17|i[8]<<9|i[9]<<1|i[10]>>>7)+((1&i[10])<<8|i[11]);this.last_pcr_=e}}if(2==o||5+e===188){t+=188,204===this.tsPacketSize&&(t+=16);continue}h=5+e}if(1==o||3==o)if(0===a||a===this.current_pmt_pid_||null!=this.pmt_&&this.pmt_.pid_stream_type[a]===ch){let i=188-h;this.handleSectionSlice(e,t+h,i,{pid:a,payload_unit_start_indicator:r,continuity_conunter:n,random_access_indicator:d.random_access_indicator})}else if(null!=this.pmt_&&null!=this.pmt_.pid_stream_type[a]){let i=188-h,s=this.pmt_.pid_stream_type[a];a!==this.pmt_.common_pids.h264&&a!==this.pmt_.common_pids.h265&&a!==this.pmt_.common_pids.adts_aac&&a!==this.pmt_.common_pids.loas_aac&&a!==this.pmt_.common_pids.ac3&&a!==this.pmt_.common_pids.eac3&&a!==this.pmt_.common_pids.opus&&a!==this.pmt_.common_pids.mp3&&!0!==this.pmt_.pes_private_data_pids[a]&&!0!==this.pmt_.timed_id3_pids[a]&&!0!==this.pmt_.synchronous_klv_pids[a]&&!0!==this.pmt_.asynchronous_klv_pids[a]||this.handlePESSlice(e,t+h,i,{pid:a,stream_type:s,payload_unit_start_indicator:r,continuity_conunter:n,random_access_indicator:d.random_access_indicator})}t+=188,204===this.tsPacketSize&&(t+=16)}return this.dispatchAudioVideoMediaSegment(),t}handleSectionSlice(e,t,i,s){let r=new Uint8Array(e,t,i),a=this.section_slice_queues_[s.pid];if(s.payload_unit_start_indicator){let o=r[0];if(null!=a&&0!==a.total_length){let r=new Uint8Array(e,t+1,Math.min(i,o));a.slices.push(r),a.total_length+=r.byteLength,a.total_length===a.expected_length?this.emitSectionSlices(a,s):this.clearSlices(a,s)}for(let n=1+o;n<r.byteLength;){if(255===r[n+0])break;let o=(15&r[n+1])<<8|r[n+2];this.section_slice_queues_[s.pid]=new fh,a=this.section_slice_queues_[s.pid],a.expected_length=o+3,a.random_access_indicator=s.random_access_indicator;let l=new Uint8Array(e,t+n,Math.min(i-n,a.expected_length-a.total_length));a.slices.push(l),a.total_length+=l.byteLength,a.total_length===a.expected_length?this.emitSectionSlices(a,s):a.total_length>=a.expected_length&&this.clearSlices(a,s),n+=l.byteLength}}else if(null!=a&&0!==a.total_length){let r=new Uint8Array(e,t,Math.min(i,a.expected_length-a.total_length));a.slices.push(r),a.total_length+=r.byteLength,a.total_length===a.expected_length?this.emitSectionSlices(a,s):a.total_length>=a.expected_length&&this.clearSlices(a,s)}}handlePESSlice(e,t,i,s){let r=new Uint8Array(e,t,i),a=r[0]<<16|r[1]<<8|r[2];r[3];let o=r[4]<<8|r[5];if(s.payload_unit_start_indicator){if(1!==a)return void this.player.debug.warn(this.TAG_NAME,`handlePESSlice: packet_start_code_prefix should be 1 but with value ${a}`);let e=this.pes_slice_queues_[s.pid];e&&(0===e.expected_length||e.expected_length===e.total_length?this.emitPESSlices(e,s):this.clearSlices(e,s)),this.pes_slice_queues_[s.pid]=new fh,this.pes_slice_queues_[s.pid].random_access_indicator=s.random_access_indicator}if(null==this.pes_slice_queues_[s.pid])return;let n=this.pes_slice_queues_[s.pid];n.slices.push(r),s.payload_unit_start_indicator&&(n.expected_length=0===o?0:o+6),n.total_length+=r.byteLength,n.expected_length>0&&n.expected_length===n.total_length?this.emitPESSlices(n,s):n.expected_length>0&&n.expected_length<n.total_length&&this.clearSlices(n,s)}emitSectionSlices(e,t){let i=new Uint8Array(e.total_length);for(let t=0,s=0;t<e.slices.length;t++){let r=e.slices[t];i.set(r,s),s+=r.byteLength}e.slices=[],e.expected_length=-1,e.total_length=0;let s={};s.pid=t.pid,s.data=i,s.file_position=e.file_position,s.random_access_indicator=e.random_access_indicator,this.parseSection(s)}emitPESSlices(e,t){let i=new Uint8Array(e.total_length);for(let t=0,s=0;t<e.slices.length;t++){let r=e.slices[t];i.set(r,s),s+=r.byteLength}e.slices=[],e.expected_length=-1,e.total_length=0;let s=new mh;s.pid=t.pid,s.data=i,s.stream_type=t.stream_type,s.random_access_indicator=e.random_access_indicator,this.parsePES(s)}clearSlices(e){e.slices=[],e.expected_length=-1,e.total_length=0}parseSection(e){let t=e.data,i=e.pid;0===i?this.parsePAT(t):i===this.current_pmt_pid_?this.parsePMT(t):null!=this.pmt_&&this.pmt_.scte_35_pids[i]&&this.parseSCTE35(t)}parsePES(e){let t=e.data,i=t[0]<<16|t[1]<<8|t[2],s=t[3],r=t[4]<<8|t[5];if(1===i){if(188!==s&&190!==s&&191!==s&&240!==s&&241!==s&&255!==s&&242!==s&&248!==s){t[6];let i,a,o=(192&t[7])>>>6,n=t[8];2!==o&&3!==o||(i=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,a=3===o?536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2:i);let l,d=9+n;if(0!==r){if(r<3+n)return void this.player.debug.warn(this.TAG_NAME,"Malformed PES: PES_packet_length < 3 + PES_header_data_length");l=r-3-n}else l=t.byteLength-d;let h=t.subarray(d,d+l);switch(e.stream_type){case sh:case rh:this.parseMP3Payload(h,i);break;case ah:this.pmt_.common_pids.opus===e.pid?this.parseOpusPayload(h,i):this.pmt_.common_pids.ac3===e.pid?this.parseAC3Payload(h,i):this.pmt_.common_pids.eac3===e.pid?this.parseEAC3Payload(h,i):this.pmt_.asynchronous_klv_pids[e.pid]?this.parseAsynchronousKLVMetadataPayload(h,e.pid,s):this.pmt_.smpte2038_pids[e.pid]?this.parseSMPTE2038MetadataPayload(h,i,a,e.pid,s):this.parsePESPrivateDataPayload(h,i,a,e.pid,s);break;case oh:this.parseADTSAACPayload(h,i);break;case nh:this.parseLOASAACPayload(h,i);break;case lh:this.parseAC3Payload(h,i);break;case dh:this.parseEAC3Payload(h,i);break;case hh:this.pmt_.timed_id3_pids[e.pid]?this.parseTimedID3MetadataPayload(h,i,a,e.pid,s):this.pmt_.synchronous_klv_pids[e.pid]&&this.parseSynchronousKLVMetadataPayload(h,i,a,e.pid,s);break;case uh:this.parseH264Payload(h,i,a,e.random_access_indicator);break;case ph:this.parseH265Payload(h,i,a,e.random_access_indicator)}}else if((188===s||191===s||240===s||241===s||255===s||242===s||248===s)&&e.stream_type===ah){let i,a=6;i=0!==r?r:t.byteLength-a;let o=t.subarray(a,a+i);this.parsePESPrivateDataPayload(o,void 0,void 0,e.pid,s)}}else this.player.debug.error(this.TAG_NAME,`parsePES: packet_start_code_prefix should be 1 but with value ${i}`)}parsePAT(e){let t=e[0];if(0!==t)return void Log.e(this.TAG,`parsePAT: table_id ${t} is not corresponded to PAT!`);let i=(15&e[1])<<8|e[2];e[3],e[4];let s=(62&e[5])>>>1,r=1&e[5],a=e[6];e[7];let o=null;if(1===r&&0===a)o={version_number:0,network_pid:0,program_pmt_pid:{}},o.version_number=s;else if(o=this.pat_,null==o)return;let n=i-5-4,l=-1,d=-1;for(let t=8;t<8+n;t+=4){let i=e[t]<<8|e[t+1],s=(31&e[t+2])<<8|e[t+3];0===i?o.network_pid=s:(o.program_pmt_pid[i]=s,-1===l&&(l=i),-1===d&&(d=s))}1===r&&0===a&&(null==this.pat_&&this.player.debug.log(this.TAG_NAME,`Parsed first PAT: ${JSON.stringify(o)}`),this.pat_=o,this.current_program_=l,this.current_pmt_pid_=d)}parsePMT(e){let t=e[0];if(2!==t)return void this.player.debug.error(this.TAG_NAME,`parsePMT: table_id ${t} is not corresponded to PMT!`);let i,s=(15&e[1])<<8|e[2],r=e[3]<<8|e[4],a=(62&e[5])>>>1,o=1&e[5],n=e[6];if(e[7],1===o&&0===n)i=this._initPmt(),i.program_number=r,i.version_number=a,this.program_pmt_map_[r]=i;else if(i=this.program_pmt_map_[r],null==i)return;i.pcr_pid=(31&e[8])<<8|e[9];let l=(15&e[10])<<8|e[11],d=12+l,h=s-9-l-4;for(let t=d;t<d+h;){let s=e[t],r=(31&e[t+1])<<8|e[t+2],a=(15&e[t+3])<<8|e[t+4];i.pid_stream_type[r]=s;let o=i.common_pids.h264||i.common_pids.h265,n=i.common_pids.adts_aac||i.common_pids.loas_aac||i.common_pids.ac3||i.common_pids.eac3||i.common_pids.opus||i.common_pids.mp3;if(s!==uh||o)if(s!==ph||o)if(s!==oh||n)if(s!==nh||n)if(s!==lh||n)if(s!==dh||n)if(s!==sh&&s!==rh||n)if(s===ah){if(i.pes_private_data_pids[r]=!0,a>0){for(let s=t+5;s<t+5+a;){let t=e[s+0],a=e[s+1];if(5===t){let t=String.fromCharCode(...Array.from(e.subarray(s+2,s+2+a)));"VANC"===t?i.smpte2038_pids[r]=!0:"Opus"===t?i.common_pids.opus=r:"KLVA"===t&&(i.asynchronous_klv_pids[r]=!0)}else if(127===t&&r===i.common_pids.opus){let t=null;if(128===e[s+2]&&(t=e[s+3]),null==t){Log.e(this.TAG,"Not Supported Opus channel count.");continue}const i={codec:"opus",channel_count:0==(15&t)?2:15&t,channel_config_code:t,sample_rate:48e3},r={codec:"opus",meta:i};0==this.audio_init_segment_dispatched_?(this.audio_metadata_=i,this.dispatchAudioInitSegment(r)):this.detectAudioMetadataChange(r)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(r))}s+=2+a}let o=e.subarray(t+5,t+5+a);this.dispatchPESPrivateDataDescriptor(r,s,o)}}else if(s===hh){if(a>0)for(let s=t+5;s<t+5+a;){let t=e[s+0],a=e[s+1];if(38===t){let t=e[s+2]<<8|e[s+3]<<0,a=null;65535===t&&(a=String.fromCharCode(...Array.from(e.subarray(s+4,s+4+4))));let o=null;if(255===e[s+4+(65535===t?4:0)]){let i=4+(65535===t?4:0)+1;o=String.fromCharCode(...Array.from(e.subarray(s+i,s+i+4)))}"ID3 "===a&&"ID3 "===o?i.timed_id3_pids[r]=!0:"KLVA"===o&&(i.synchronous_klv_pids[r]=!0)}s+=2+a}}else s===ch&&(i.scte_35_pids[r]=!0);else i.common_pids.mp3=r;else i.common_pids.eac3=r;else i.common_pids.ac3=r;else i.common_pids.loas_aac=r;else i.common_pids.adts_aac=r;else i.common_pids.h265=r;else i.common_pids.h264=r;t+=5+a}r===this.current_program_&&(null==this.pmt_&&this.player.debug.log(this.TAG_NAME,`Parsed first PMT: ${JSON.stringify(i)}`),this.pmt_=i,(i.common_pids.h264||i.common_pids.h265)&&(this.has_video_=!0),(i.common_pids.adts_aac||i.common_pids.loas_aac||i.common_pids.ac3||i.common_pids.opus||i.common_pids.mp3)&&(this.has_audio_=!0))}parseSCTE35(e){}parseH264Payload(e,t,i,s){let r=new Fn(e),a=null,o=null,n=[],l=0,d=!1;for(;null!=(a=r.readNextNaluPayload());){let e=new On(a);if(e.type===Mt){let t=xn.parseSPS$2(a.data);this.video_init_segment_dispatched_?!0===this.detectVideoMetadataChange(e,t)&&(this.player.debug.log(this.TAG_NAME,"H264: Critical h264 metadata has been changed, attempt to re-generate InitSegment"),this.video_metadata_changed_=!0,this.video_metadata_={vps:void 0,sps:e,pps:void 0,details:t}):(this.video_metadata_.sps=e,this.video_metadata_.details=t)}else e.type===Ut?this.video_init_segment_dispatched_&&!this.video_metadata_changed_||(this.video_metadata_.pps=e,this.video_metadata_.sps&&this.video_metadata_.pps&&(this.video_metadata_changed_&&this.dispatchVideoMediaSegment(),this.dispatchVideoInitSegment())):(e.type===Pt||e.type===It&&1===s)&&(d=!0);this.video_init_segment_dispatched_&&(n.push(e),l+=e.data.byteLength)}let h=Math.floor(t/this.timescale_),c=Math.floor(i/this.timescale_);if(n.length){let e=this.video_track_;for(let e=0;e<n.length;e++){let t=n[e];if(null==o)o=t.data;else{let e=new Uint8Array(o.byteLength+t.data.byteLength);e.set(o,0),e.set(t.data,o.byteLength),o=e}}let t={length:l,isIFrame:d,dts:c,pts:h,cts:h-c,payload:o,type:Ge,isHevc:!1};e.samples.push(t),e.length=o.byteLength}}parseH265Payload(e,t,i,s){let r=new Yn(e),a=null,o=null,n=[],l=0,d=!1;for(;null!=(a=r.readNextNaluPayload());){let e=new Qn(a);if(e.type===zt){if(!this.video_init_segment_dispatched_){let t=Gn.parseVPS(a.data);this.video_metadata_.vps=e,this.video_metadata_.details={...this.video_metadata_.details,...t}}}else if(e.type===Ht){let t=Gn.parseSPS(a.data);this.video_init_segment_dispatched_?!0===this.detectVideoMetadataChange(e,t)&&(this.player.debug.log(this.TAG_NAME,"H265: Critical h265 metadata has been changed, attempt to re-generate InitSegment"),this.video_metadata_changed_=!0,this.video_metadata_={vps:void 0,sps:e,pps:void 0,details:t}):(this.video_metadata_.sps=e,this.video_metadata_.details={...this.video_metadata_.details,...t})}else if(e.type===Wt){if(!this.video_init_segment_dispatched_||this.video_metadata_changed_){let t=Gn.parsePPS(a.data);this.video_metadata_.pps=e,this.video_metadata_.details={...this.video_metadata_.details,...t},this.video_metadata_.vps&&this.video_metadata_.sps&&this.video_metadata_.pps&&(this.video_metadata_changed_&&this.dispatchVideoMediaSegment(),this.dispatchVideoInitSegment())}}else e.type!==Ot&&e.type!==Nt&&e.type!==jt||(d=!0);this.video_init_segment_dispatched_&&(n.push(e),l+=e.data.byteLength)}let h=Math.floor(t/this.timescale_),c=Math.floor(i/this.timescale_);if(n.length){let e=this.video_track_;for(let e=0;e<n.length;e++){let t=n[e];if(null==o)o=t.data;else{let e=new Uint8Array(o.byteLength+t.data.byteLength);e.set(o,0),e.set(t.data,o.byteLength),o=e}}let t={type:Ge,length:l,isIFrame:d,dts:c,pts:h,cts:h-c,payload:o,isHevc:!0};e.samples.push(t),e.length=o.byteLength}}detectVideoMetadataChange(e,t){if(t.codec_mimetype!==this.video_metadata_.details.codec_mimetype)return this.player.debug.log(this.TAG_NAME,`Video: Codec mimeType changed from ${this.video_metadata_.details.codec_mimetype} to ${t.codec_mimetype}`),!0;if(t.codec_size.width!==this.video_metadata_.details.codec_size.width||t.codec_size.height!==this.video_metadata_.details.codec_size.height){let e=this.video_metadata_.details.codec_size,i=t.codec_size;return this.player.debug.log(this.TAG_NAME,`Video: Coded Resolution changed from ${e.width}x${e.height} to ${i.width}x${i.height}`),!0}return t.present_size.width!==this.video_metadata_.details.present_size.width&&(this.player.debug.log(this.TAG_NAME,`Video: Present resolution width changed from ${this.video_metadata_.details.present_size.width} to ${t.present_size.width}`),!0)}isInitSegmentDispatched(){return this.has_video_&&this.has_audio_?this.video_init_segment_dispatched_&&this.audio_init_segment_dispatched_:this.has_video_&&!this.has_audio_?this.video_init_segment_dispatched_:!(this.has_video_||!this.has_audio_)&&this.audio_init_segment_dispatched_}dispatchVideoInitSegment(){let e=this.video_metadata_.details,t={type:"video"};t.id=this.video_track_.id,t.timescale=1e3,t.duration=this.duration_,t.codecWidth=e.codec_size.width,t.codecHeight=e.codec_size.height,t.presentWidth=e.present_size.width,t.presentHeight=e.present_size.height,t.profile=e.profile_string,t.level=e.level_string,t.bitDepth=e.bit_depth,t.chromaFormat=e.chroma_format,t.sarRatio=e.sar_ratio,t.frameRate=e.frame_rate;let i=t.frameRate.fps_den,s=t.frameRate.fps_num;t.refSampleDuration=i/s*1e3,t.codec=e.codec_mimetype;let r=!1;if(this.video_metadata_.vps){r=!0;let e=this.video_metadata_.vps.data.subarray(4),i=this.video_metadata_.sps.data.subarray(4),s=this.video_metadata_.pps.data.subarray(4);t.hvcc=Vn({vps:e,sps:i,pps:s}),0==this.video_init_segment_dispatched_&&this.player.debug.log(this.TAG_NAME,`Generated first HEVCDecoderConfigurationRecord for mimeType: ${t.codec}`),t.hvcc&&this._doDecodeByTs(t.hvcc,Ge,0,!0,0)}else{let e=this.video_metadata_.sps.data.subarray(4),i=this.video_metadata_.pps.data.subarray(4);t.avcc=Ln({sps:e,pps:i}),0==this.video_init_segment_dispatched_&&this.player.debug.log(this.TAG_NAME,`Generated first AVCDecoderConfigurationRecord for mimeType: ${t.codec}`),t.avcc&&this._doDecodeByTs(t.avcc,Ge,0,!0,0)}this.video_init_segment_dispatched_=!0,this.video_metadata_changed_=!1;let a=this.media_info_;a.hasVideo=!0,a.width=t.codecWidth,a.height=t.codecHeight,a.fps=t.frameRate.fps,a.profile=t.profile,a.level=t.level,a.refFrames=e.ref_frames,a.chromaFormat=e.chroma_format_string,a.sarNum=t.sarRatio.width,a.sarDen=t.sarRatio.height,a.videoCodec=t.codec,a.hasAudio&&a.audioCodec?a.mimeType=`video/mp2t; codecs="${a.videoCodec},${a.audioCodec}"`:a.mimeType=`video/mp2t; codecs="${a.videoCodec}"`,this.player.video.updateVideoInfo({width:t.codecWidth,height:t.codecHeight,encTypeCode:r?wt:vt})}dispatchVideoMediaSegment(){this.isInitSegmentDispatched()&&this.video_track_.length&&this._preDoDecode()}dispatchAudioMediaSegment(){this.isInitSegmentDispatched()&&this.audio_track_.length&&this._preDoDecode()}dispatchAudioVideoMediaSegment(){this.isInitSegmentDispatched()&&(this.audio_track_.length||this.video_track_.length)&&this._preDoDecode()}parseADTSAACPayload(e,t){if(this.has_video_&&!this.video_init_segment_dispatched_)return;if(this.aac_last_incomplete_data_){let t=new Uint8Array(e.byteLength+this.aac_last_incomplete_data_.byteLength);t.set(this.aac_last_incomplete_data_,0),t.set(e,this.aac_last_incomplete_data_.byteLength),e=t}let i,s;if(null!=t&&(s=t/this.timescale_),"aac"===this.audio_metadata_.codec){if(null==t&&null!=this.audio_last_sample_pts_)i=1024/this.audio_metadata_.sampling_frequency*1e3,s=this.audio_last_sample_pts_+i;else if(null==t)return void this.player.debug.warn(this.TAG_NAME,"AAC: Unknown pts");if(this.aac_last_incomplete_data_&&this.audio_last_sample_pts_){i=1024/this.audio_metadata_.sampling_frequency*1e3;let e=this.audio_last_sample_pts_+i;Math.abs(e-s)>1&&(this.player.debug.warn(this.TAG_NAME,`AAC: Detected pts overlapped, expected: ${e}ms, PES pts: ${s}ms`),s=e)}}let r,a=new ia(e),o=null,n=s;for(;null!=(o=a.readNextAACFrame());){i=1024/o.sampling_frequency*1e3;const e={codec:"aac",data:o};0==this.audio_init_segment_dispatched_?(this.audio_metadata_={codec:"aac",audio_object_type:o.audio_object_type,sampling_freq_index:o.sampling_freq_index,sampling_frequency:o.sampling_frequency,channel_config:o.channel_config},this.dispatchAudioInitSegment(e)):this.detectAudioMetadataChange(e)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(e)),r=n;let t=Math.floor(n);const s=new Uint8Array(o.data.length+2);s.set([175,1],0),s.set(o.data,2);let a={payload:s,length:s.byteLength,pts:t,dts:t,type:je};this.audio_track_.samples.push(a),this.audio_track_.length+=s.byteLength,n+=i}a.hasIncompleteData()&&(this.aac_last_incomplete_data_=a.getIncompleteData()),r&&(this.audio_last_sample_pts_=r)}parseLOASAACPayload(e,t){if(this.has_video_&&!this.video_init_segment_dispatched_)return;if(this.aac_last_incomplete_data_){let t=new Uint8Array(e.byteLength+this.aac_last_incomplete_data_.byteLength);t.set(this.aac_last_incomplete_data_,0),t.set(e,this.aac_last_incomplete_data_.byteLength),e=t}let i,s;if(null!=t&&(s=t/this.timescale_),"aac"===this.audio_metadata_.codec){if(null==t&&null!=this.audio_last_sample_pts_)i=1024/this.audio_metadata_.sampling_frequency*1e3,s=this.audio_last_sample_pts_+i;else if(null==t)return void this.player.debug.warn(this.TAG_NAME,"AAC: Unknown pts");if(this.aac_last_incomplete_data_&&this.audio_last_sample_pts_){i=1024/this.audio_metadata_.sampling_frequency*1e3;let e=this.audio_last_sample_pts_+i;Math.abs(e-s)>1&&(this.player.debug.warn(this.TAG,`AAC: Detected pts overlapped, expected: ${e}ms, PES pts: ${s}ms`),s=e)}}let r,a=new sa(e),o=null,n=s;for(;null!=(o=a.readNextAACFrame(Ua(this.loas_previous_frame)?void 0:this.loas_previous_frame));){this.loas_previous_frame=o,i=1024/o.sampling_frequency*1e3;const e={codec:"aac",data:o};0==this.audio_init_segment_dispatched_?(this.audio_metadata_={codec:"aac",audio_object_type:o.audio_object_type,sampling_freq_index:o.sampling_freq_index,sampling_frequency:o.sampling_frequency,channel_config:o.channel_config},this.dispatchAudioInitSegment(e)):this.detectAudioMetadataChange(e)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(e)),r=n;let t=Math.floor(n);const s=new Uint8Array(o.data.length+2);s.set([175,1],0),s.set(o.data,2);let a={payload:s,length:s.byteLength,pts:t,dts:t,type:je};this.audio_track_.samples.push(a),this.audio_track_.length+=s.byteLength,n+=i}a.hasIncompleteData()&&(this.aac_last_incomplete_data_=a.getIncompleteData()),r&&(this.audio_last_sample_pts_=r)}parseAC3Payload(e,t){}parseEAC3Payload(e,t){}parseOpusPayload(e,t){}parseMP3Payload(e,t){if(this.has_video_&&!this.video_init_segment_dispatched_)return;let i=[44100,48e3,32e3,0],s=[22050,24e3,16e3,0],r=[11025,12e3,8e3,0],a=e[1]>>>3&3,o=(6&e[1])>>1;e[2];let n=(12&e[2])>>>2,l=3!==(e[3]>>>6&3)?2:1,d=0,h=34;switch(a){case 0:d=r[n];break;case 2:d=s[n];break;case 3:d=i[n]}switch(o){case 1:h=34;break;case 2:h=33;break;case 3:h=32}const c={};c.object_type=h,c.sample_rate=d,c.channel_count=l,c.data=e;const u={codec:"mp3",data:c};0==this.audio_init_segment_dispatched_?(this.audio_metadata_={codec:"mp3",object_type:h,sample_rate:d,channel_count:l},this.dispatchAudioInitSegment(u)):this.detectAudioMetadataChange(u)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(u));let p={payload:e,length:e.byteLength,pts:t/this.timescale_,dts:t/this.timescale_,type:je};this.audio_track_.samples.push(p),this.audio_track_.length+=e.byteLength}detectAudioMetadataChange(e){if(e.codec!==this.audio_metadata_.codec)return this.player.debug.log(this.TAG_NAME,`Audio: Audio Codecs changed from ${this.audio_metadata_.codec} to ${e.codec}`),!0;if("aac"===e.codec&&"aac"===this.audio_metadata_.codec){const t=e.data;if(t.audio_object_type!==this.audio_metadata_.audio_object_type)return this.player.debug.log(this.TAG_NAME,`AAC: AudioObjectType changed from ${this.audio_metadata_.audio_object_type} to ${t.audio_object_type}`),!0;if(t.sampling_freq_index!==this.audio_metadata_.sampling_freq_index)return this.player.debug.log(this.TAG_NAME,`AAC: SamplingFrequencyIndex changed from ${this.audio_metadata_.sampling_freq_index} to ${t.sampling_freq_index}`),!0;if(t.channel_config!==this.audio_metadata_.channel_config)return this.player.debug.log(this.TAG_NAME,`AAC: Channel configuration changed from ${this.audio_metadata_.channel_config} to ${t.channel_config}`),!0}else if("ac-3"===e.codec&&"ac-3"===this.audio_metadata_.codec){const t=e.data;if(t.sampling_frequency!==this.audio_metadata_.sampling_frequency)return this.player.debug.log(this.TAG_NAME,`AC3: Sampling Frequency changed from ${this.audio_metadata_.sampling_frequency} to ${t.sampling_frequency}`),!0;if(t.bit_stream_identification!==this.audio_metadata_.bit_stream_identification)return this.player.debug.log(this.TAG_NAME,`AC3: Bit Stream Identification changed from ${this.audio_metadata_.bit_stream_identification} to ${t.bit_stream_identification}`),!0;if(t.bit_stream_mode!==this.audio_metadata_.bit_stream_mode)return this.player.debug.log(this.TAG_NAME,`AC3: BitStream Mode changed from ${this.audio_metadata_.bit_stream_mode} to ${t.bit_stream_mode}`),!0;if(t.channel_mode!==this.audio_metadata_.channel_mode)return this.player.debug.log(this.TAG_NAME,`AC3: Channel Mode changed from ${this.audio_metadata_.channel_mode} to ${t.channel_mode}`),!0;if(t.low_frequency_effects_channel_on!==this.audio_metadata_.low_frequency_effects_channel_on)return this.player.debug.log(this.TAG_NAME,`AC3: Low Frequency Effects Channel On changed from ${this.audio_metadata_.low_frequency_effects_channel_on} to ${t.low_frequency_effects_channel_on}`),!0}else if("opus"===e.codec&&"opus"===this.audio_metadata_.codec){const t=e.meta;if(t.sample_rate!==this.audio_metadata_.sample_rate)return this.player.debug.log(this.TAG_NAME,`Opus: SamplingFrequencyIndex changed from ${this.audio_metadata_.sample_rate} to ${t.sample_rate}`),!0;if(t.channel_count!==this.audio_metadata_.channel_count)return this.player.debug.log(this.TAG_NAME,`Opus: Channel count changed from ${this.audio_metadata_.channel_count} to ${t.channel_count}`),!0}else if("mp3"===e.codec&&"mp3"===this.audio_metadata_.codec){const t=e.data;if(t.object_type!==this.audio_metadata_.object_type)return this.player.debug.log(this.TAG_NAME,`MP3: AudioObjectType changed from ${this.audio_metadata_.object_type} to ${t.object_type}`),!0;if(t.sample_rate!==this.audio_metadata_.sample_rate)return this.player.debug.log(this.TAG_NAME,`MP3: SamplingFrequencyIndex changed from ${this.audio_metadata_.sample_rate} to ${t.sample_rate}`),!0;if(t.channel_count!==this.audio_metadata_.channel_count)return this.player.debug.log(this.TAG_NAME,`MP3: Channel count changed from ${this.audio_metadata_.channel_count} to ${t.channel_count}`),!0}return!1}dispatchAudioInitSegment(e){let t={type:"audio"};t.id=this.audio_track_.id,t.timescale=1e3,t.duration=this.duration_;let i="";if("aac"===this.audio_metadata_.codec){let s="aac"===e.codec?e.data:null,r=new bh(s);t.audioSampleRate=r.sampling_rate,t.audioSampleRateIndex=r.sampling_index,t.channelCount=r.channel_count,t.codec=r.codec_mimetype,t.originalCodec=r.original_codec_mimetype,t.config=r.config,t.refSampleDuration=1024/t.audioSampleRate*t.timescale,i=Et;const a=Vr({profile:this.player._opt.mseDecodeAudio?r.object_type:r.original_object_type,sampleRate:t.audioSampleRateIndex,channel:t.channelCount});console.error("aacADTSHeader",`profile: ${r.object_type}, sampleRate: ${t.audioSampleRateIndex}, channel: ${t.channelCount}`),this._doDecodeByTs(a,je,0,!1,0)}else"ac-3"===this.audio_metadata_.codec||"ec-3"===this.audio_metadata_.codec||"opus"===this.audio_metadata_.codec||"mp3"===this.audio_metadata_.codec&&(t.audioSampleRate=this.audio_metadata_.sample_rate,t.channelCount=this.audio_metadata_.channel_count,t.codec="mp3",t.originalCodec="mp3",t.config=void 0,i=kt);0==this.audio_init_segment_dispatched_&&this.player.debug.log(this.TAG_NAME,`Generated first AudioSpecificConfig for mimeType: ${t.codec}`),this.audio_init_segment_dispatched_=!0,this.video_metadata_changed_=!1;let s=this.media_info_;s.hasAudio=!0,s.audioCodec=t.originalCodec,s.audioSampleRate=t.audioSampleRate,s.audioChannelCount=t.channelCount,s.hasVideo&&s.videoCodec?s.mimeType=`video/mp2t; codecs="${s.videoCodec},${s.audioCodec}"`:s.mimeType=`video/mp2t; codecs="${s.audioCodec}"`,i&&this.player.audio.updateAudioInfo({encTypeCode:i,channels:t.channelCount,sampleRate:t.audioSampleRate})}dispatchPESPrivateDataDescriptor(e,t,i){}parsePESPrivateDataPayload(e,t,i,s,r){let a=new gh;if(a.pid=s,a.stream_id=r,a.len=e.byteLength,a.data=e,null!=t){let e=Math.floor(t/this.timescale_);a.pts=e}else a.nearest_pts=this.getNearestTimestampMilliseconds();if(null!=i){let e=Math.floor(i/this.timescale_);a.dts=e}}parseTimedID3MetadataPayload(e,t,i,s,r){this.player.debug.log(this.TAG_NAME,`Timed ID3 Metadata: pid=${s}, pts=${t}, dts=${i}, stream_id=${r}`)}parseSynchronousKLVMetadataPayload(e,t,i,s,r){this.player.debug.log(this.TAG_NAME,`Synchronous KLV Metadata: pid=${s}, pts=${t}, dts=${i}, stream_id=${r}`)}parseAsynchronousKLVMetadataPayload(e,t,i){this.player.debug.log(this.TAG_NAME,`Asynchronous KLV Metadata: pid=${t}, stream_id=${i}`)}parseSMPTE2038MetadataPayload(e,t,i,s,r){this.player.debug.log(this.TAG_NAME,`SMPTE 2038 Metadata: pid=${s}, pts=${t}, dts=${i}, stream_id=${r}`)}getNearestTimestampMilliseconds(){if(null!=this.audio_last_sample_pts_)return Math.floor(this.audio_last_sample_pts_);if(null!=this.last_pcr_){return Math.floor(this.last_pcr_/300/this.timescale_)}}_preDoDecode(){const e=this.video_track_,t=this.audio_track_;let i=e.samples;t.samples.length>0&&(i=e.samples.concat(t.samples),i=i.sort(((e,t)=>e.dts-t.dts))),i.forEach((e=>{const t=new Uint8Array(e.payload);delete e.payload,e.type===Ge?this._doDecodeVideo({...e,payload:t}):e.type===je&&this._doDecodeAudio({...e,payload:t})})),e.samples=[],e.length=0,t.samples=[],t.length=0}_doDecodeVideo(e){const t=new Uint8Array(e.payload);let i=null;i=e.isHevc?Wn(t,e.isIFrame):In(t,e.isIFrame),this.player.updateStats({dts:e.dts,vbps:i.byteLength}),e.isIFrame&&this.calcIframeIntervalTimestamp(e.dts);let s=this.cryptoPayload(i,e.isIFrame);this._doDecodeByTs(s,Ge,e.dts,e.isIFrame,e.cts)}_doDecodeAudio(e){const t=new Uint8Array(e.payload);this.player.updateStats({abps:t.byteLength});let i=t;yo(this.player._opt.m7sCryptoAudio)&&(i=this.cryptoPayloadAudio(t)),this._doDecodeByTs(i,je,e.dts,!1,0)}getInputByteLength(){return this._remainingPacketData&&this._remainingPacketData.byteLength||0}}class vh{constructor(e){return new(vh.getLoaderFactory(e))(e)}static getLoaderFactory(e){const t=e._opt.demuxType;return t===C?$d:t===k||e.isWebrtcH265()?zd:t===D?Hd:t===L?qd:t===I?eh:t===P?th:t===M?_h:Kd}}class wh extends a{constructor(e){super(),this.player=e,this.TAG_NAME="Webcodecs",this.hasInit=!1,this.isDecodeFirstIIframe=!!Ao(e._opt.checkFirstIFrame),this.isInitInfo=!1,this.prevTimestamp=null,this.decodeDiffTimestamp=null,this.prevDts=null,this.decoder=null,this.isWidthOrHeightChanged=!1,this.initDecoder(),e.debug.log(this.TAG_NAME,"init")}destroy(){this.decoder&&(Ao(this.isDecodeStateClosed())&&this.decoder.close(),this.decoder=null),this.prevTimestamp=null,this.decodeDiffTimestamp=null,this.prevDts=null,this.hasInit=!1,this.isInitInfo=!1,this.isDecodeFirstIIframe=!1,this.isWidthOrHeightChanged=!1,this.off(),this.player.debug.log(this.TAG_NAME,"destroy")}initDecoder(){const e=this;this.decoder=new VideoDecoder({output(t){e.handleDecode(t)},error(t){e.handleError(t)}})}handleDecode(e){this.isInitInfo||(this.player.video.updateVideoInfo({width:e.codedWidth,height:e.codedHeight}),this.player.video.initCanvasViewSize(),this.isInitInfo=!0),this.player.isPlayer()?(this.player.updateStats({dfps:!0}),this.player._times.videoStart||(this.player._times.videoStart=ha(),this.player.handlePlayToRenderTimes()),this.player.video.render({videoFrame:e,ts:e.timestamp}),this.player.handleRender()):this.player.isPlayback()&&(this.player.updateStats({dfps:!0}),Ao(this.player.playbackPause)?(this.player.playback.isUseLocalCalculateTime&&this.player.playback.increaseLocalTimestamp(),this.player.playback.isUseFpsRender?this.player.video.pushData({videoFrame:e,ts:e.timestamp}):this.player.video.render$2({videoFrame:e,ts:e.timestamp})):Ao(this.player.playback.isPlaybackPauseClearCache)&&this.player.playback.isCacheBeforeDecodeForFpsRender&&this.player.playback.isUseFpsRender&&this.player.video.pushData({videoFrame:e,ts:e.timestamp}))}handleError(e){this.player.debug.error(this.TAG_NAME,"VideoDecoder handleError:",e.code,e);const t=e.toString();-1!==t.indexOf(ds)?this.player.emitError(ut.webcodecsUnsupportedConfigurationError,t):-1!==t.indexOf(hs)||-1!==t.indexOf(cs)||-1!==t.indexOf(us)?this.player.emitError(ut.webcodecsDecodeError,t):-1!==t.indexOf(ps)&&this.player.emitError(ut.webcodecsH265NotSupport)}decodeVideo(e,t,i,s){if(this.player)if(this.player.isDestroyedOrClosed())this.player.debug.warn(this.TAG_NAME,"decodeVideo() player is destroyed");else if(this.hasInit)if(!this.isDecodeFirstIIframe&&i&&(this.isDecodeFirstIIframe=!0),this.isDecodeFirstIIframe){if(this.isDecodeStateClosed())return void this.player.debug.warn(this.TAG_NAME,"VideoDecoder isDecodeStateClosed true");if(i&&0===e[1]){const t=15&e[0];let i={};if(t===vt){i=Dn(e.slice(5))}else t===wt&&(i=zn(e));const s=this.player.video.videoInfo;s&&s.width&&s.height&&i&&i.codecWidth&&i.codecHeight&&(i.codecWidth!==s.width||i.codecHeight!==s.height)&&(this.player.debug.warn(this.TAG_NAME,`decodeVideo: video width or height is changed,\n old width is ${s.width}, old height is ${s.height},\n new width is ${i.codecWidth}, new height is ${i.codecHeight},\n and emit change event`),this.isWidthOrHeightChanged=!0,this.player.emitError(ut.wcsWidthOrHeightChange))}if(this.isWidthOrHeightChanged)return void this.player.debug.warn(this.TAG_NAME,"decodeVideo: video width or height is changed, and return");if(go(e))return void this.player.debug.warn(this.TAG_NAME,"decodeVideo and payload is video sequence header so drop this frame");if(e.byteLength<12)return void this.player.debug.warn(this.TAG_NAME,`decodeVideo and payload is too small , payload length is ${e.byteLength}`);let s=!1,r=(new Date).getTime();this.prevTimestamp||(this.prevTimestamp=r,s=!0);const a=r-this.prevTimestamp;this.decodeDiffTimestamp=a,a>500&&!s&&this.player.isPlayer()&&this.player.debug.warn(this.TAG_NAME,"decodeVideo diff time is ",a);const o=e.slice(5),n=new EncodedVideoChunk({data:o,timestamp:t,type:i?di:hi});this.player.emit(lt.timeUpdate,t);try{this.decoder.decode(n)}catch(e){this.player.debug.error(this.TAG_NAME,"VideoDecoder",e);const t=e.toString();(-1!==t.indexOf(ns)||-1!==t.indexOf(ls))&&this.player.emitError(ut.webcodecsDecodeError)}this.prevTimestamp=(new Date).getTime()}else this.player.debug.log(this.TAG_NAME,"VideoDecoder first frame is not iFrame");else if(i&&e[1]===vs){const t=15&e[0];if(this.player.video.updateVideoInfo({encTypeCode:t}),t===wt&&!Ia()){const e=va();return this.player.debug.warn(this.TAG_NAME,"WebcodecsDecoder not support hevc decode",e.type,e.version),void this.player.emitError(ut.webcodecsH265NotSupport)}this.player._times.decodeStart||(this.player._times.decodeStart=ha());let i=null,s=null;const r=e.slice(5);if(t===vt?(s=Dn(r),i={codec:s.codec,description:r}):t===wt&&(s=$n(r),i={codec:s.codec,description:r}),!i||i&&!i.codec)return this.player.debug.warn(this.TAG_NAME,"decodeVideo and webcodecs configure is",JSON.stringify(i)),void this.player.emitError(ut.webcodecsDecodeConfigureError);s&&s.codecWidth&&s.codecHeight&&(i.codedHeight=s.codecHeight,i.codedWidth=s.codecWidth),this.player.recorder&&this.player._opt.recordType===S&&this.player.recorder.initMetaData(e,t),this.player.debug.log(this.TAG_NAME,`decoder.configure() and codec is ${i.codec}`);try{this.decoder.configure(i),this.hasInit=!0}catch(e){this.player.debug.log(this.TAG_NAME,"configure error",e.code,e);-1!==e.toString().indexOf(ps)?this.player.emitError(ut.webcodecsH265NotSupport):this.player.emitError(ut.webcodecsDecodeConfigureError)}}}getDecodeDiffTimes(){return this.decodeDiffTimestamp}isDecodeStateClosed(){return"closed"===this.decoder.state}isDecodeStateConfigured(){return"configured"===this.decoder.state}isDecodeStateUnConfigured(){return"unconfigured"===this.decoder.state}}const Sh={play:"播放",pause:"暂停",audio:"",mute:"",screenshot:"截图",loading:"",fullscreen:"全屏",fullscreenExit:"退出全屏",record:"录制",recordStop:"停止录制",narrow:"缩小",expand:"放大",ptz:"操作盘",ptzActive:"操作盘激活",zoom:"电子放大",zoomStop:"关闭电子放大",close:"关闭",performance:"性能面板",performanceActive:"性能面板激活",face:"人脸识别",faceActive:"人脸识别激活",object:"物品识别",objectActive:"物品识别激活",occlusion:"遮挡物检查",occlusionActive:"遮挡物检查激活",logSave:"保存日志"};var Th=Object.keys(Sh).reduce(((e,t)=>(e[t]=`\n <i class="jb-pro-icon jb-pro-icon-${t}"></i>\n ${Sh[t]?`<span class="icon-title-tips"><span class="icon-title">${Sh[t]}</span></span>`:""}\n`,e)),{});function Eh(e,t){let i=!1;return e.forEach((e=>{i||e.startTimestamp<=t&&e.endTimestamp>t&&(i=!0)})),i}function kh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;const s=e.length,r=t.length,a=Math.max(s,r),o=2e3,n=Math.ceil(a/o);let l=0,d=0;function h(){let r="",a="";for(let i=0;i<o;i++){const i=e[d];i&&(r+=`\n <div class="jb-pro-playback-time-minute-one${i.hasRecord?" active":""}${i.isStart?" start":""}" data-has-record="${i.hasRecord}"\n data-time="${i.timestamp}" data-type="${i.dataType}">\n <span class="jb-pro-playback-time-title-tips ${d>s-60?"jb-pro-playback-time-title-tips-left":""}"><span class="jb-pro-playback-time-title">${i.title}</span></span>\n </div>\n `);const o=t[d];o&&(a+=`\n <div class="jb-pro-playback-time-hour" data-hour="${o.hour}" data-min="${o.min}" data-second="${o.second}"><span class="jb-pro-playback-time-hour-text">${o.title}</span></div>\n `),d+=1}r&&i.$playbackTimeListOne.insertAdjacentHTML("beforeend",r),a&&i.$playbackTimeListSecond.insertAdjacentHTML("beforeend",a),l+=1,l<n&&(i.rafId=window.requestAnimationFrame(h))}h()}function Ch(e,t){const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];const i=(e[0]||{}).startTimestamp;for(let s=0;s<1440;s++){const r=s%60==0;let a=!1;i&&(a=Eh(e,Va(i,s))),t.push({title:$a(s),timestamp:s,dataType:"min",hasRecord:a,isStart:r})}return t}(e);kh(i,function(){let e=[];for(let t=0;t<24;t++){let i=t+":00";t<10&&(i="0"+i),e.push({title:i,hour:t,min:0,second:0})}return e}(),t)}function xh(e,t){const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];const i=(e[0]||{}).startTimestamp;for(let s=0;s<1440;s++){let r=60*s,a=r%1800==0,o=!1;i&&(o=Eh(e,Wa(i,r))),t.push({title:Ha(r),timestamp:r,dataType:"second",hasRecord:o,isStart:a});let n=60*s+30;a=n%1800==0,i&&(o=Eh(e,Wa(i,n))),t.push({title:Ha(n),timestamp:n,dataType:"second",hasRecord:o,isStart:a})}return t}(e);kh(i,function(){let e=[];for(let t=0;t<24;t++){let i=t+":00",s=t+":30";t<10&&(i="0"+i,s="0"+s),e.push({title:i,hour:t,min:0,second:0}),e.push({title:s,hour:t,min:30,second:0})}return e}(),t)}function Rh(e,t){const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];const i=(e[0]||{}).startTimestamp;for(let s=0;s<144;s++)for(let r=0;r<60;r++){let a=10*r+600*s,o=a%600==0,n=!1;i&&(n=Eh(e,Wa(i,a))),t.push({title:Ha(a),timestamp:a,dataType:"second",isStart:o,hasRecord:n})}return t}(e);kh(i,function(){let e=[];for(let t=0;t<24;t++){let i=t+":00";t<10&&(i="0"+i),e.push({title:i,hour:t,min:0,second:0});for(let s=1;s<6;s++){let r=s+"0";e.push({title:i.replace(":00",":"+r),hour:t,min:10*s,second:0})}}return e}(),t)}function Dh(e,t){const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];const i=(e[0]||{}).startTimestamp;for(let s=0;s<288;s++)for(let r=0;r<60;r++){let a=5*r+300*s,o=a%300==0,n=!1;i&&(n=Eh(e,Wa(i,a))),t.push({title:Ha(a),timestamp:a,dataType:"second",isStart:o,hasRecord:n})}return t}(e);kh(i,function(){let e=[];for(let t=0;t<24;t++){let i=t+":00";t<10&&(i="0"+i),e.push({title:i,hour:t,min:0,second:0}),e.push({title:i.replace(":00",":05"),hour:t,min:5,second:0});for(let s=1;s<6;s++){let r=s+"0",a=s+"5";e.push({title:i.replace(":00",":"+r),hour:t,min:10*s,second:0}),e.push({title:i.replace(":00",":"+a),hour:t,min:10*s+5,second:0})}}return e}(),t)}function Lh(e){const t=Math.floor(e/3600),i=Math.floor((e-3600*t)/60),s=Math.floor(e-3600*t-60*i);return(t>0?[t,i,s]:[i,s]).map((e=>e<10?`0${e}`:String(e))).join(":")}function Ih(e,t,i){const s=e.$playbackProgress,{left:r}=s.getBoundingClientRect(),a=ca((ya()?i.touches[0].clientX:i.pageX)-r,0,s.clientWidth),o=parseInt(a/s.clientWidth*t,10);return{second:o,time:Lh(o),width:a,percentage:ca(a/s.clientWidth,0,1)}}function Ph(e,t){return e.classList.add(t)}function Bh(e,t){return t instanceof Element?e.appendChild(t):e.insertAdjacentHTML("beforeend",String(t)),e.lastElementChild||e.lastChild}function Mh(e,t,i){return e&&e.style&&Oa(t)&&(e.style[t]=i),e}function Uh(e,t){return e.composedPath&&e.composedPath().indexOf(t)>-1}function Fh(e){let t=!1;return e&&e.parentNode&&(e.parentNode.removeChild(e),t=!0),t}var Oh=(e,t)=>{const{events:{proxy:i}}=e,s=document.createElement("object");s.setAttribute("aria-hidden","true"),s.setAttribute("tabindex",-1),s.type="text/html",s.data="about:blank",ua(s,{display:"block",position:"absolute",top:"0",left:"0",height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:"-1"});let r=e.width,a=e.height;const o=xa((()=>{e.width===r&&e.height===a||(r=e.width,a=e.height,e.emit(lt.resize),c())}),500);i(s,"load",(()=>{i(s.contentDocument.defaultView,"resize",(()=>{o()}))})),e.$container.appendChild(s),e.on(lt.destroy,(()=>{e.$container.removeChild(s)})),e.on(lt.volumechange,(()=>{!function(e){if(0===e)ua(t.$volumeOn,"display","none"),ua(t.$volumeOff,"display","flex"),ua(t.$volumeHandle,"top","48px");else if(t.$volumeHandle&&t.$volumePanel){const i=pa(t.$volumePanel,"height")||60,s=pa(t.$volumeHandle,"height"),r=i-(i-s)*e-s;ua(t.$volumeHandle,"top",`${r}px`),ua(t.$volumeOn,"display","flex"),ua(t.$volumeOff,"display","none")}t.$volumePanelText&&(t.$volumePanelText.innerHTML=parseInt(100*e))}(e.volume)})),e.on(lt.loading,(i=>{ua(t.$loading,"display",i?"flex":"none"),(Ao(e._opt.backgroundLoadingShow)&&yo(i)||Ao(i))&&ua(t.$poster,"display","none"),i&&(ua(t.$playBig,"display","none"),ua(t.$tipsMessage,"display","none")),i||e._opt.extendDomConfig.showAfterLoading&&t.$extendDom&&ua(t.$extendDom,"display","block"),i||e.getRenderType()===W&&Ao(e._opt.useMSE)&&n()})),e.on(lt.removeLoadingBgImage,(()=>{n()}));const n=()=>{t.$loadingBgImage&&t.$loadingBg&&t.$loadingBgImage.src&&(e.debug&&e.debug.log("Control","remove loading bg image"),t.$loadingBgImage.width=0,t.$loadingBgImage.height=0,t.$loadingBgImage.src="",ua(t.$loadingBg,"display","none"))},l=t=>{e.fullscreen?Za(t)===e.$container&&d():d()},d=i=>{let s=Fa(i)?i:e.fullscreen;ua(t.$fullscreenExit,"display",s?"flex":"none"),ua(t.$fullscreen,"display",s?"none":"flex")},h=()=>e._opt.playType===w&&e._opt.playbackConfig.showControl,c=i=>{ya()&&t.$controls&&e._opt.useWebFullScreen&&setTimeout((()=>{if(e.fullscreen){const i=h()?Qt:Yt;let s=e.height/2-e.width+i/2,r=e.height/2-i/2;if(t.$controls.style.transform=`translateX(${-s}px) translateY(-${r}px) rotate(-90deg)`,t.$zoomControls){const i=156,s=30,r=e.width/2+i/2-s/2;t.$zoomControls.style.transform=`translateX(${-r}px) translateY(${e.height/2}px) rotate(-90deg)`}if(t.$recording){const i=101,s=20,r=e.width/2+i/2-s/2;t.$recording.style.transform=`translateX(${-r}px) translateY(${e.height/2}px) rotate(-90deg)`}}else t.$controls.style.transform="translateX(0) translateY(0) rotate(0)",t.$zoomControls&&(t.$zoomControls.style.transform="translateX(-50%) translateY(0) rotate(0)"),t.$recording&&(t.$recording.style.transform="translateX(-50%) translateY(0) rotate(0)");i&&i()}),10)};try{jr.on("change",l),e.events.destroys.push((()=>{jr.off("change",l)}))}catch(e){}e.on(lt.webFullscreen,(e=>{ya()&&(d(e),c((()=>{p()})))})),e.on(lt.recording,(()=>{e.playing&&(ua(t.$record,"display",e.recording?"none":"flex"),ua(t.$recordStop,"display",e.recording?"flex":"none"),(e._opt.hasControl||e._opt.isShowRecordingUI)&&(ua(t.$recording,"display",e.recording?"flex":"none"),Ao(e.recording)&&t.$recordingTime&&(t.$recordingTime.innerHTML=za(0))))})),e.on(lt.recordingTimestamp,(e=>{t.$recordingTime&&(t.$recordingTime.innerHTML=za(e))})),e.on(lt.zooming,(()=>{e.playing&&(ua(t.$zoom,"display",e.zooming?"none":"flex"),ua(t.$zoomStop,"display",e.zooming?"flex":"none"),(e._opt.hasControl||e._opt.isShowZoomingUI)&&ua(t.$zoomControls,"display",e.zooming?"flex":"none"))})),e.on(lt.playing,(e=>{u(e)}));const u=i=>{i||e.isPlayFailedAndPaused&&Ao(e._opt.playFailedAndPausedShowPlayBtn)?(ua(t.$play,"display","none"),ua(t.$playBig,"display","none")):(ua(t.$play,"display","flex"),ua(t.$playBig,"display","block")),ua(t.$pause,"display",i?"flex":"none"),ua(t.$screenshot,"display",i?"flex":"none"),ua(t.$record,"display",i?"flex":"none"),ua(t.$qualityMenu,"display",i?"flex":"none"),ua(t.$volume,"display",i?"flex":"none"),ua(t.$ptz,"display",i?"flex":"none"),ua(t.$zoom,"display",i?"flex":"none"),ua(t.$scaleMenu,"display",i?"flex":"none"),ua(t.$faceDetect,"display",i?"flex":"none"),ua(t.$objectDetect,"display",i?"flex":"none"),ua(t.$occlusionDetect,"display",i?"flex":"none"),ua(t.$controlHtml,"display",i?"flex":"none"),e.isPlayback()&&ua(t.$speedMenu,"display",i?"flex":"none"),d(),t.extendBtnList.forEach((e=>{e.$iconWrap&&ua(e.$iconWrap,"display",i?"flex":"none"),e.$activeIconWrap&&ua(e.$activeIconWrap,"display","none")})),e._opt.showPerformance?ua(t.$performanceActive,"display",i?"flex":"none"):(ua(t.$performance,"display",i?"flex":"none"),ua(t.$performanceActive,"display","none")),ua(t.$poster,"display","none"),ua(t.$ptzActive,"display","none"),ua(t.$recordStop,"display","none"),ua(t.$zoomStop,"display","none"),ua(t.$faceDetectActive,"display","none"),ua(t.$objectDetectActive,"display","none"),i||(t.$speed&&(t.$speed.innerHTML=function(e){if(null==e||""===e)return"0 KB/s";let t=parseFloat(e);return t=t.toFixed(2),t+"KB/s"}("")),ua(t.$zoomControls,"display","none"),ua(t.$recording,"display","none"),t.$ptzControl&&t.$ptzControl.classList.remove("jb-pro-ptz-controls-show")),p(),i&&f()};e.on(lt.playbackPause,(e=>{u(!e)})),e.on(lt.kBps,(i=>{const s=function(e){if(null==e||""===e||0===parseFloat(e)||"NaN"===e)return"0 KB/s";const t=["KB/s","MB/s","GB/s","TB/s","PB/s","EB/s","ZB/s","YB/s"];let i=0;const s=parseFloat(e);i=Math.floor(Math.log(s)/Math.log(1024));let r=s/Math.pow(1024,i);return r=r.toFixed(2),r+(t[i]||t[0])}(i);t.kbpsShow=s,e._opt.showBandwidth&&(t.$speed&&(t.$speed.innerHTML=s),p())}));const p=()=>{if(h()&&e._opt.playbackConfig.controlType===X.normal){let i=t.controlsInnerRect.width-t.controlsLeftRect.width-t.controlsRightRect.width-t.controlsPlaybackBtnsRect.width;ya()&&e.webFullscreen&&(i=t.controlsInnerRect.height-t.controlsLeftRect.height-t.controlsRightRect.height-t.controlsPlaybackBtnsRect.height),t.$playbackTimeInner.style.width=i+"px"}},f=()=>{if(!h()||e._opt.playbackConfig.controlType!==X.normal)return;const i=t.$playbackCurrentTime.style.left;let s=parseInt(i,10);const r=t.controlsPlaybackTimeInner.width;s=s-r/2>0?parseInt(s-r/2,10):0,t.$playbackTimeInner.scrollLeft=s};if(h()){const i=()=>{if(h()){let i=0;const s=e.playback&&e.playback.playingTimestamp;if(s){const r=new Date(s),a=r.getHours(),o=r.getMinutes(),n=r.getSeconds();e.playback.is60Min?i=60*a+o:e.playback.is30Min?i=2*(60*a+o)+parseInt(n/30,10):e.playback.is10Min?i=6*(60*a+o)+parseInt(n/10,10):e.playback.is5Min?i=12*(60*a+o)+parseInt(n/5,10):e.playback.is1Min&&(i=60*(60*a+o)+parseInt(n,10)),t.$playbackCurrentTime.style.left=i+"px"}}},s=e=>{t.$playbackNarrow.classList.remove("disabled"),t.$playbackExpand.classList.remove("disabled"),e===Si&&t.$playbackNarrow.classList.add("disabled"),e===ki&&t.$playbackExpand.classList.add("disabled")};e.on(lt.playbackTime,(s=>{if(e._opt.playbackConfig.controlType===X.normal)t.$playbackCurrentTimeText&&(t.$playbackCurrentTimeText.innerText=Ta(s,"{h}:{i}:{s}")),i();else if(e._opt.playbackConfig.controlType===X.simple){const i=(r=s,a=e.playback.totalDuration,ca(r/a,0,1));t.$playbackProgressPlayed.style.width=100*i+"%",t.$playbackProgressIndicator.style.left=`calc(${100*i}% - 7px)`,t.$playbackProgressTime.innerText=`${Lh(s)} / ${Lh(e.playback.totalDuration)}`}var r,a})),e.on(lt.playbackPrecision,((r,a)=>{h()&&e._opt.playbackConfig.controlType===X.normal&&(t.$playbackTimeScroll.classList.remove(Ci.oneHour,Ci.halfHour,Ci.fiveMin,Ci.tenMin),t.$playbackTimeScroll.classList.add(Ci[r]),t.rafId&&(window.cancelAnimationFrame(t.rafId),t.rafId=null),t.changePercisitionInterval&&(clearTimeout(t.changePercisitionInterval),t.changePercisitionInterval=null),t.$playbackTimeListOne.innerHTML="",t.$playbackTimeListSecond.innerHTML="",t.changePercisitionInterval=setTimeout((()=>{switch(t.$playbackTimeListOne.innerHTML="",t.$playbackTimeListSecond.innerHTML="",r){case Si:Ch(a,t);break;case Ti:xh(a,t);break;case Ei:Rh(a,t);break;case ki:Dh(a,t)}i(),e._opt.playbackConfig.showPrecisionBtn&&s(r),f()}),16))})),e.on(lt.resize,(()=>{p()})),e.on(lt.playbackTimeScroll,(()=>{f()})),p()}if(e._opt.operateBtns.quality&&e._opt.qualityConfig.length>0){e.on(lt.streamQualityChange,(e=>{i(e)}));const i=e=>{t.$qualityText.innerText=e,t.$qualityMenuItems.forEach((t=>{const i=t.dataset.quality;t.classList.remove("jb-pro-quality-menu-item-active"),i===e&&t.classList.add("jb-pro-quality-menu-item-active")}))};(()=>{const i=e._opt.qualityConfig||[];let s="";i.forEach((e=>{s+=`\n <div class="jb-pro-quality-menu-item" data-quality="${e}">${e}</div>\n `})),s&&(t.$qualityMenuList.insertAdjacentHTML("beforeend",s),Object.defineProperty(t,"$qualityMenuItems",{value:e.$container.querySelectorAll(".jb-pro-quality-menu-item")}))})(),e.streamQuality&&i(e.streamQuality)}if(e._opt.operateBtns.scale&&e._opt.scaleConfig.length>0){e.on(lt.viewResizeChange,(e=>{i(e)}));const i=i=>{const s=e._opt.scaleConfig[i];t.$scaleText.innerText=s,t.$scaleMenuItems.forEach((e=>{const t=e.dataset.scale;e.classList.remove("jb-pro-scale-menu-item-active"),ka(t)===ka(i)&&e.classList.add("jb-pro-scale-menu-item-active")}))};(()=>{const i=e._opt.scaleConfig||[];let s="";i.forEach(((e,t)=>{s+=`\n <div class="jb-pro-scale-menu-item" data-scale="${t}">${e}</div>\n `})),s&&(t.$scaleMenuList.insertAdjacentHTML("beforeend",s),Object.defineProperty(t,"$scaleMenuItems",{value:e.$container.querySelectorAll(".jb-pro-scale-menu-item")}))})(),i(e.scaleType)}if(e.isPlayback()&&e._opt.playbackConfig.showRateBtn&&e._opt.playbackConfig.rateConfig.length>0){e.on(lt.playbackRateChange,(e=>{i(e)}));const i=i=>{const s=e._opt.playbackConfig.rateConfig.find((e=>ka(e.value)===ka(i)));s&&(t.$speedText.innerText=s.label,t.$speedMenuItems.forEach((e=>{const t=e.dataset.speed;e.classList.remove("jb-pro-speed-menu-item-active"),ka(t)===ka(i)&&e.classList.add("jb-pro-speed-menu-item-active")})))};(()=>{const i=e._opt.playbackConfig.rateConfig;let s="";i.forEach(((e,t)=>{s+=`\n <div class="jb-pro-speed-menu-item" data-speed="${e.value}">${e.label}</div>\n `})),s&&(t.$speedMenuList.insertAdjacentHTML("beforeend",s),Object.defineProperty(t,"$speedMenuItems",{value:e.$container.querySelectorAll(".jb-pro-speed-menu-item")}))})();const s=e.playback?e.playback.playbackRate:1;i(s)}e.on(lt.stats,(function(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e._opt.showPerformance){ua(t.$performancePanel,"display","block"),t.$performancePanel.innerHTML="";const s=ga,r=So(),a=e.getCpuLevel(),o=Oa(a)&&-1!==a?`${pr[a]}`:"",n=e.video&&e.video.videoInfo||{},l=e.audio&&e.audio.audioInfo||{},d=e._times||{},h=e.getRenderType(),c=e.getCanvasRenderType(),u=e.getDecodeType(),p=e.getDemuxType(),f=e.getStreamType(),m=e.getAudioEngineType();let g=e.getRecordingDuration(),y=e.getRecordingByteLength();const A=e.isAudioPlaybackRateSpeed(),b=e.videoIframeIntervalTs;g=za(g),y=Ra(y);const _=e.isPlayback()?"录播":"直播";let v=i.isDropping;const w=e._opt.useMSE&&e._opt.mseDecodeAudio,S=e.control?e.control.kbpsShow:"0 KB/s",T=e.getVideoPlaybackQuality(),E=`\n <div class="jb-pro-performance-item">\n <span>版本 ${s}</span>\n </div>\n ${e._opt.isMulti?`\n <div class="jb-pro-performance-item">\n <span>UUid ${e._opt.debugUuid}</span>\n </div>\n `:""}\n ${e.isInMulti()?`\n <div class="jb-pro-performance-item">\n <span>窗口下标 ${e._opt.multiIndex}</span>\n </div>\n `:""}\n ${r?`\n <div class="jb-pro-performance-item">\n <span>内存大小限制 ${Ra(r.jsHeapSizeLimit)}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>可使用的内存 ${Ra(r.totalJSHeapSize)}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>已使用的内存 ${Ra(r.usedJSHeapSize)}</span>\n </div>\n `:""}\n ${o?`\n <div class="jb-pro-performance-item">\n <span>CPU压力情况 ${o}</span>\n </div>\n `:""}\n\n ${r&&r.usedJSHeapSize>r.totalJSHeapSize?'\n <div class="jb-pro-performance-item">\n <span>可能内存泄漏 是}</span>\n </div>\n ':""}\n <div class="jb-pro-performance-item">\n <span>播放模式 ${_}</span>\n </div>\n ${e.isPlayback()?`\n <div class="jb-pro-performance-item">\n <span>播放倍率 ${e.playback.rate}倍</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>播放模式 ${e.playback.isUseFpsRender?"固定FPS":"动态FPS"}</span>\n </div>\n ${e.playback.isUseFpsRender?`\n <div class="jb-pro-performance-item">\n <span>固定FPS ${e.video.getStreamFps()}</span>\n </div>\n `:""}\n `:""}\n <div class="jb-pro-performance-item">\n <span>解封装模式 ${U[p]}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>解码模式 ${u}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>渲染组件 ${h}</span>\n </div>\n ${h===W?`\n <div class="jb-pro-performance-item">\n <span>渲染引擎 ${c}</span>\n </div>\n `:""}\n <div class="jb-pro-performance-item">\n <span>网络请求组件 ${f}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>视频格式 ${n.encType||"-"}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>视频(宽x高) ${n.width||"-"}x${n.height||"-"}</span>\n </div>\n ${e.isPlayer()?`\n <div class="jb-pro-performance-item">\n <span>视频GOP(ms) ${b||"-"}</span>\n </div>\n `:""}\n <div class="jb-pro-performance-item">\n <span>音频格式 ${Ct[l.encType]||"-"}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>音频引擎 ${m||"-"}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>音频通道 ${l.channels||"-"}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>音频采样率 ${l.sampleRate||"-"}</span>\n </div>\n ${e.isPlayer()?`\n <div class="jb-pro-performance-item">\n <span>播放器初始化(ms) ${d.playTimestamp}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>开始请求地址(ms) ${d.streamTimestamp}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>请求响应(ms) ${d.streamResponseTimestamp}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>解封装(ms) ${d.demuxTimestamp}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>解码(ms) ${d.decodeTimestamp}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>页面开始渲染(ms) ${d.videoTimestamp}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>初始化到页面渲染(ms) ${d.allTimestamp}</span>\n </div>\n ${e.recording?`\n <div class="jb-pro-performance-item">\n <span>视频录制时间 ${g}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>视频录制大小 ${y}</span>\n </div>\n `:""}\n `:""}\n <div class="jb-pro-performance-item">\n <span>音频码率(bit) ${i.abps}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>视频码率(bit) ${i.vbps}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>视频帧率(fps) ${i.fps}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>视频峰值帧率(fps) ${i.maxFps}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>解码帧率(fps) ${i.dfps}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>音频缓冲帧 ${i.audioBuffer}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>音频缓冲时长(ms) ${i.audioBufferDelayTs}</span>\n </div>\n ${e.isPlayer()?`\n <div class="jb-pro-performance-item">\n <span>视频待解码帧 ${i.demuxBuffer}</span>\n </div>\n `:`\n <div class="jb-pro-performance-item">\n <span>缓存时长(ms) ${i.playbackCacheDataDuration}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>视频待渲染帧 ${i.playbackVideoBuffer}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>视频待解码帧 ${i.demuxBuffer}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>音频待解码帧 ${i.audioDemuxBuffer}</span>\n </div>\n `}\n <div class="jb-pro-performance-item">\n <span>待解封装数据(byte) ${i.streamBuffer}</span>\n </div>\n ${e._opt.useMSE?`\n <div class="jb-pro-performance-item">\n <span>MSE缓冲时长(ms) ${i.mseDelay}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>MSE待解码帧 ${i.msePendingBuffer}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>MSE缓存时长(s) ${i.mseStore}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>MSE解码间隔(ms) ${i.mseDecodeDiffTimes}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>MSE解码时间(ms) ${i.mseTs}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>MSE播放模式 ${i.mseDecodePlaybackRate>1?"加速":"正常"}</span>\n </div>\n `:""}\n ${e._opt.useWCS?`\n <div class="jb-pro-performance-item">\n <span>WCS解码间隔(ms) ${i.wcsDecodeDiffTimes}</span>\n </div>\n `:""}\n ${e.isOldHls()?`<div class="jb-pro-performance-item">\n <span>HLS缓冲时长(ms) ${i.hlsDelay}</span>\n </div>\n `:""}\n ${e.isUseHls265()?`<div class="jb-pro-performance-item">\n <span>HLS缓冲时长(ms) ${i.hlsDelay}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>HLS待解码帧 ${i.hlsDemuxLength}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>HLS待解码视频帧 ${i.hlsDemuxVideoLength}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>HLS待解码音频帧 ${i.hlsDemuxAudioLength}</span>\n </div>\n `:""}\n ${e.isPlayer()&&T?`\n <div class="jb-pro-performance-item">\n <span>Video已渲染帧 ${T.renderedVideoFrames}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>Video已丢弃帧 ${T.droppedVideoFrames}</span>\n </div>\n `:""}\n ${e.isPlayer()?`\n <div class="jb-pro-performance-item">\n <span>网络延迟(ms) ${i.netBuf}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>缓冲时长(ms) ${i.buf}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>最新缓冲时长(ms) ${i.pushLatestDelay}</span>\n </div>\n `:""}\n ${e._opt.useMSE||e.isWebrtcH264()||e.isAliyunRtc()?`\n <div class="jb-pro-performance-item">\n <span>video显示时间(s) ${i.videoCurrentTime}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>video间隔时间(s) ${i.videoCurrentTimeDiff}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>videoBuffer缓存时间(ms) ${i.mseVideoBufferDelayTime}</span>\n </div>\n `:""}\n <div class="jb-pro-performance-item">\n <span>视频显示时间(ms) ${i.currentPts||i.ts}</span>\n </div>\n ${e._opt.hasAudio&&e.isAudioNotMute()&&Ao(w)?`\n <div class="jb-pro-performance-item">\n <span>音频显示时间(ms) ${i.audioTs}</span>\n </div>\n ${e._opt.hasVideo?`\n <div class="jb-pro-performance-item">\n <span>音视频同步时间戳(ms) ${i.audioSyncVideo}</span>\n </div>\n `:""}\n <div class="jb-pro-performance-item">\n <span>音频播放模式 ${A?"加速":"正常"}</span>\n </div>\n `:""}\n <div class="jb-pro-performance-item">\n <span>视频解码时间(ms) ${i.dts}</span>\n </div>\n ${e.isPlayer()?`\n <div class="jb-pro-performance-item">\n <span>解码前-解码后延迟(ms) ${i.delayTs}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>总延迟(网络+解码)(ms) ${i.totalDelayTs}</span>\n </div>\n `:""}\n ${e.isPlayer()&&i.isStreamTsMoreThanLocal?'<div class="jb-pro-performance-item">\n <span>是否超过一倍率推流 是</span>\n </div>\n ':""}\n ${e.isPlayer()?`\n <div class="jb-pro-performance-item">\n <span>是否播放流畅 ${i.videoSmooth}</span>\n </div>\n `:""}\n ${e.isPlayer()?`\n <div class="jb-pro-performance-item">\n <span>是否在丢帧 ${v}</span>\n </div>\n `:""}\n <div class="jb-pro-performance-item">\n <span>网速 ${S}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>播放时长(s) ${za(i.pTs)}</span>\n </div>\n <div class="jb-pro-performance-item-block"></div>\n `;t.$performancePanel.insertAdjacentHTML("beforeend",E)}else t.$performancePanel.innerHTML="",ua(t.$performancePanel,"display","none")})),e.on(lt.togglePerformancePanel,(e=>{ua(t.$performance,"display",e?"none":"flex"),ua(t.$performanceActive,"display",e?"flex":"none")})),e.on(lt.faceDetectActive,(e=>{ua(t.$faceDetect,"display",e?"none":"flex"),ua(t.$faceDetectActive,"display",e?"flex":"none")})),e.on(lt.objectDetectActive,(e=>{ua(t.$objectDetect,"display",e?"none":"flex"),ua(t.$objectDetectActive,"display",e?"flex":"none")})),e.on(lt.occlusionDetectActive,(e=>{ua(t.$occlusionDetect,"display",e?"none":"flex"),ua(t.$occlusionDetectActive,"display",e?"flex":"none")}))};function Nh(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&s.firstChild?s.insertBefore(r,s.firstChild):s.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}Nh('@keyframes rotation{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes magentaPulse{0%{background-color:#630030;-webkit-box-shadow:0 0 9px #333}50%{background-color:#a9014b;-webkit-box-shadow:0 0 18px #a9014b}to{background-color:#630030;-webkit-box-shadow:0 0 9px #333}}.jb-pro-container video::-webkit-media-controls{display:none!important}.jb-pro-container .jb-pro-icon{cursor:pointer;width:16px;height:16px;display:inline-block}.jb-pro-container .jb-pro-ptz-controls{position:absolute;width:156px;height:156px;visibility:hidden;opacity:0;border-radius:78px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATgAAAE4BAMAAAA9UfJZAAAAMFBMVEUAAABHcEy0tLRZWVmysrKoqKi1tbWvr6+2traBgYG1tbWWlpa1tbW1tbVUVFS1tbVGCHqkAAAAD3RSTlMzAO9U3LSWySp3aZcV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5ErkJggg==") no-repeat 50%;background-size:100% 100%;transition:visibility .3s,opacity .3s;right:43px;bottom:135px}.jb-pro-container .jb-pro-ptz-controls.show-vertical{right:43px}.jb-pro-container .jb-pro-ptz-controls.show-vertical .jb-pro-ptz-btns{left:0;top:156px}.jb-pro-container .jb-pro-ptz-controls.show-level{right:163px}.jb-pro-container .jb-pro-ptz-controls.show-level .jb-pro-ptz-btns{min-height:156px;left:144px;top:0;display:flex;flex-direction:column;justify-content:center}.jb-pro-container .jb-pro-ptz-controls.jb-pro-ptz-controls-show{visibility:visible;opacity:1}.jb-pro-container .jb-pro-ptz-bg-active{visibility:hidden;opacity:0;width:156px;height:156px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATgAAAE4CAMAAAD4oR9YAAAAM1BMVEX///////////////////////////9HcEz///////////////////////////////////85yRS0AAAAEXRSTlO5DCgVgZBxAK2fQDRkBR5XTPLKM/gAABnnSURBVHja7F0Jkqs6DGQPO9z/tD8Jq6WWbCCvIjKfzAGmulrW3ooedr6ui+M4TdP++SXPr1l/SdL3aRrHhv7ZyA5qb9xe0L3Am+DrkzeCL/BeX908MezTuPsfOArdgl3KsZuhq99fk/Tx3waum+ByAHua5QbYilkzY1aP728YhrH5InrfBa57OLAtVjpRbYaumex04dq4APeC7vnVSfo/45bXLe33jGscMx3f0A1vyg3t69e2dRL/NeA6wrgdcCvjyPM2U25mXDt9xVD3f/qN0yi3Mm6P20S54vlXtGPS/R3GPSbYOsC4ZAvmJtiaGiL3Zlzx/Ht+Y/KXTJXbqmaqe9za1VYn3N7YpX/OVGev2qduOLIiB7xqOzGuWCiXFVmWtU3368A5lkqeOJI21I5XXaORxVRnxmUTdNnY/4U3riNvHMJts9XRtdXVUttipdzrK/4x7UyY6sK4Gbo+nU21T1zKcd9AGJetlMvyLKvj3zXVfeqQElMljINx3MK4xVQ3xj2Ry7N/6CiMOIfYyVUXWxUyBx7HuZRbcHt9bf/Lb9zsHlzKzabauJaK47iVcC7jJujS33/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4zPHt2v7kgNe+cb3FbqeVa9qBfw39C1jZw9cMBDmr7jwqHDylzL+5Sfw2V9wcn9Iy5qZFoTaZRV9b7+k1nB55Sr2gEOaysFiFO+tCSrhqsj2yzyjyAu3lYCHnojyap85gAdfV9wu3l+x2V0R36INSvWAUbvuMvzydRprWogTmfVO+AI4uB+XF/JvxK4UHekMZRucHdkQhsQvdqPuwGurV95cl+LhUR3hPfjTN5lkFa78bUH97StdEdcOJC277h0bvgO24ty6RkQV5OtG5Pn0GIy19S8/OCeKofojlu47gjVT+4/EjZvdu9grnq1uVxAB1il1beEzRtBJJQICv1VMeKU93a0OzItbzq5k90RgLhl+XGCqy3ERdYrO0fftXnb2T3VqjfE5aigMbf3YANirN54co93XMjJT20rhWteP5Hrr/NbT+7xjoPMctOzJkqq6/Luk3u84+7vuGUBSzeBweoE3yPTm8Hm444LiA5gyMXuuJU56G3NR07uAXHVwwo5fgBTf1Xo2rjVnzq7r6yK1LwSr5HHHTdt9fy5k5/R7XLcJdX7FbeOy2dP7trPweQ57FRZx7r6+Mndq3ldEzrAY938ysl9uiQ1cJNVa2SO16X6tZP/dj8uDqJW2VfM/O/ftf7FmPkK3OMZ3MAu8G3T6ytiTTU7OK8jxMlfuN1idg/X91/9VUZ81WOVo8P+Bw+0DogP6NDPAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-up{transform:rotate(-90deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-left{transform:rotate(180deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-down{transform:rotate(90deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-left-up{transform:rotate(-135deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-right-up{transform:rotate(-45deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-left-down{transform:rotate(135deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-right-down{transform:rotate(45deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-show{visibility:visible;opacity:1}.jb-pro-container .jb-pro-ptz-control{position:absolute;left:53px;top:53px;width:50px;height:50px;background:#fff;border-radius:50%;transition:left .3s,top .3s}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-left{left:33px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-up{top:33px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-right{left:73px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-down{top:73px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-left-up{top:39px;left:39px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-left-down{left:39px;top:67px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-right-up{top:39px;left:67px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-right-down{top:67px;left:67px}.jb-pro-container .jb-pro-ptz-icon{position:relative}.jb-pro-container .jb-pro-ptz-icon:hover .icon-title-tips{visibility:visible;opacity:1}.jb-pro-container .jb-pro-ptz-btns{display:block;position:absolute;left:0;top:156px;width:156px;box-sizing:border-box;padding:0 30px}.jb-pro-container .jb-pro-ptz-btns .jb-pro-ptz-btn{display:flex;justify-content:space-between}.jb-pro-container .jb-pro-ptz-expand .jb-pro-ptz-expand-icon{display:inline-block;width:28px;height:28px;cursor:pointer;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAANlBMVEVfX19fX19fX19fX19fX19fX19fX19HcExfX19fX19fX1/////Pz8+oqKjCwsKhoaHn5+eWlpaOqTaDAAAAC3RSTlP/3CaKxwJiAELtp4ri/s4AAACuSURBVCjPfZPREoUgCERXBdPRyv7/Z6/Z1aQp9oWJMyYLiKUrOIpAJBdGCldgbzBkPM/QEoTI3jBEPBRDhwEvChe08Q1Ge0ImvIq4Qj8ljrLdH77CyQPWlCdHC0Q1e9rmmuC+oQN9Q4LwcQg40L6eyqm0uEpXSUqe3fKpkkqL+Y/o+07SrahNEO0T0LBsvOitf4xsLqiNTB32wtqaVKosGLO2mhUrS93+PZ4D99wPqzMJVcbEyA8AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-expand:hover .jb-pro-ptz-expand-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAM1BMVEVHcEyZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZn////i4uLZ2dnIyMjExMS8vLy+iXNeAAAACnRSTlMAYomLxwEm9+NCLo6DKwAAALNJREFUKM99k9kWgyAMRIMmEMLm/39tKaVKFJkXl3sYJ4sAXeQ3ZOcYd0+gRYblFBuFLYoS2ot5lpvYn8zJQ65TO2GVNmdCmQq/qczw4gjpejD14BgmhziEIvCjVRlPioftHW6A7xBB1a8CCUMvsuSqEkPM7eZX6h8GrQ67bYpNIbRL6rb4/k2EfVXKsgmqfQrW9qnGq96a28jGQG1ky2HXpVysyYyeDIhWq7le6ua9P36HD6+2GRi8iBZBAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-narrow .jb-pro-ptz-narrow-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAM1BMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX1/9/f2/v7/y8vLUObqxAAAADXRSTlMA3IrE6SZi9wI+y0gNXAn3CgAAAI5JREFUKM+Fk1kOwyAMBQ04bJHT3P+0JVUMNMWv8zvSk1cipfjAKXHwhR7k6KTjYp7dVuWLug1XWB5wz96T/JD2O3Phmv0k5ypL6lVVFIPYpLOka5WKSSFvS0/BloHYlkza5HkMzrvVLo8ZlRr7mtFYWBBsBQ4BjC//GTxcGVw2PpOVHQ6fJj7qS4936OoN2K4e5yE6N1UAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-narrow:hover .jb-pro-ptz-narrow-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcBAMAAACAI8KnAAAAJ1BMVEVHcEyZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZn+/v7X19ckk9ihAAAACnRSTlMA9+NCAsuKJsRiPv/2GwAAAJlJREFUGNNjYAAC5gxFoTYDBijw1FoFBIumQHjsUavAYGkBmGu0CgqUwRqlYNyFIO2Fq+BAnIGBJQrBXerAwLkKCUxgYELmKjBYIXMXM2Qhc5cxdCFzVzBoIXMXMYAcsRsMdgEdgs4FKT4DBqdAitGMQrMIzRkojlRB9wKaB9G8z+CMGjgshjCuMCjoWNxRAxYt2KGRYgJiAQAnZcjElaB/xwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-aperture-far .jb-pro-ptz-aperture-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAASFBMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX1////9fX1+kpKRzc3ODg4PFxcW1tbXW1tbk5OT29vaVlZVmZmZ8vCMFAAAADHRSTlMAxGJ5Mssm9+NCiYtiH91SAAABAklEQVQoz41T7Q6DIAyEJQooUL55/zddhVazzZjdHyqXXo8DhWCYTWqltNyN+MZLuxP69UGti/vAsl6c0e4L+tQ2yv1AEbvecMhO5cXdYhk+6aO3WGrNAMwentlMz/ZAKIlNoRsqY2wtFWu9t8wasc0iYVN0LkQfrG1zbxNyrIBcntOQrH1Ukkb60QcxYF1xMA2dh8zWj6ZDsLCsIrL4Ds5Hm9FMbCEROWUB0COaLXEIZJKV7CKybGO7UuxjxY2C/TkMbxboKBQCxgMN6MCJQ6Ch/QjOZg/B13LGx8FDTe3IFvl+Bc9XBi3UWoex68qeL/vxmdyxyvz3NJ8f9dDef36HN7koIK2LjxB0AAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-aperture-far:hover .jb-pro-ptz-aperture-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAOVBMVEVHcEyZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZn+/v6cnJzr6+u/v7+xsbGlpaXNzc3b29vqh7uRAAAAC3RSTlMAyRjKA59J/3PzPhe1wxwAAAD2SURBVCjPjZPrssMgCIR1mkYtisD7P+zBCyZpM5mzv5hs0M8VnZvaok9BlXzc3FXbO5z0vtifFC5Kn8OL4UfxwVvuHm61d5Z0b6ZGZZwZpQAUosWsjVZntVS1sH3ZFo1IRVYfGXgx+VGwNkkIVbhq9/jm3cAhaNv1Uk3IA8mNn7D3kbQeWK3TLH2jCthrDFcTMwUWaKiClc9mJtJWhS3SF5BpJqMQW1b3xwnkDahMoHYomkeJRgSENA/MFsKML7fgoCBVbGvM+Cx4JcKWbWHKK/h1ZYS1Jy/nK3u8bB3KhzG5deMxtfv3aO7/Heq+9ms8h9fxHP4AHzAWU9zlWNgAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-aperture-near .jb-pro-ptz-aperture-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAQlBMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX1////9fX1+FhYWbm5vz8/Nzc3OwsLDi4uLDw8PW1tZmZmYgm6a+AAAAC3RSTlMAYmOLx4kn9+NCIVJiPGAAAAD+SURBVCjPjVPttoMgDMOJAqOU8uH7v+qKFN2c597lF5LTJg1VqQG3aGuM1bNTV0wWDtjpg3pq+IB+npyzcIE9ejsDXzDCrjccs+tOariF3n2OLyw5xko0vh9MDjNb9Q0hp2GK3cixlIApe4/JD9appR8SFxWAUFLg6n63iB1irnY1Jv0mlrok7nUdcZRa1YeshxBA9iijChlxI6iZEaBgSEL2tkRcymPGGJpqlbZ6uDg0WR/F0DwuMpxDkYwiIXA8hO2uMJdGCCK6teB8RQoY8xGfevQjxYQt25qoRwDT25MRBjZ7GtP/P/afa3LHmrflXa+ruf661Hvv+et3eAF6Fh3v+sSUGgAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-aperture-near:hover .jb-pro-ptz-aperture-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAM1BMVEWZmZmZmZmZmZmZmZmZmZmZmZmZmZlHcEyZmZmZmZn///+qqqq9vb3z8/PMzMzo6Oja2tpXGg+mAAAACnRSTlP/JomLxwJiAONCr+rW2wAAAOtJREFUKM99U9sWhCAInEpLBS///7WLEWy7p9O8qEzCMBIOQ15DAlLYsoegS9yFMKQ93skl4Adh+ZI54Q8pG5nxgKzkgkcsk4zhmQxRyN1OPHqtncjOu5AuppcJ6s1EHTA1YzC3Wgq3YmzGqpsmlwZAo7F8oLEVKoeE6+TbSxK0JJ/3FLOwFnUxzXuoltYDDMLoAlmYXLAWIrkqbdZKs+q4KBfkNV1uwGaBim9TdLWS3R7iGRvCNTPB7JvGlc5EXK8cKbrxooint73RzXh7Msl6Oj/uT/b62O9j8sj6gMXX0Xwf6jP3Zr9DtNAHTYMMXrXSK0YAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-focus-far .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAPFBMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX1////92dnbs7OyFhYWjo6Pe3t7Ly8uxsbG8vLyG+Q0EAAAAC3RSTlMAiWJjx9wm/0Lti7mfpe0AAADaSURBVCjPfVMJDoQgDERFC/bg8P9/XUSO6CqTqA0TptNDpSrMpC2A1btRT8wrNKzzjdo03KC3zhkLD9imbeAFhd3sG2kvZQ2v0NknfGBJZKkhBM9MxOxDKBV1N4iHi0TRHYjN01Qi7/kK2PtyNDU7DAEJgDAAN0u1jsQEFEkcVVmrqjeXrkWRmC67eqbgG7bJyvkQSQkvUvec7szpek6t9ubWJSK/uJVSm+APzHKCh++DWWuH4plQKNYOpfappcjy2VvJn9744cjGwx6uyXjBxqs5Xuqsvf/9Dj8rLhRg+bQ5VAAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-focus-far:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAOVBMVEWZmZmZmZmZmZmZmZmZmZmZmZmZmZlHcEyZmZmZmZmZmZn///+xsbGoqKjt7e309PTExMTQ0NDe3t774OlGAAAAC3RSTlP/itxixwImAELtp8B2gZgAAADmSURBVCjPjZMLjsUgCEVpq60G8Lf/xQ62gvNeOmZuUiWeKHC1cKnC5iJAdFuwJXgmf+xg2g//G54OPuTOCUOEL8WgMMCLwgPP+Abj2aF38CrnBR7whw6Bo4fWUk7MMrQ2OrpAq0GspTLLgKg1wTailNITZA0EaTkZGjIAY5NwlATah5CGRMJYj50tFtlWiapsLvAPRdtL/WOmET7QzZyl5ywzp7NWsjBJ1odsragJqeJ9HGFNZoLaJw71hMTm0O7NeDE1Z6YsU5rGL69sedmXXz0ToW8PzA/oV09T8OJR32fb7+B17Qe3WwtC9PVbHAAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-focus-near .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAARVBMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX1/////t7e2dnZ3W1tbGxsa3t7eDg4Oqqqri4uKTk5NImu/5AAAADXRSTlMAYieJ3MvE/0Lti4oh87zNagAAAOtJREFUKM+NU1sOwyAMY30FtoWS8Lj/UZe2gWpVh2aJH1wcO0mNqbDj4gDc8rLmiscEDdPji3rP8IX5fXLWwQWuaVu4gbKDuyPdsJMz3GLefcIPbJ6PDCEAFDlUAJiORM3NigQFAXAFlqOeRhWJyFFIHxNGvRrN0mp470U++3axGM2RAmXcXqKnkDSN0a9WIk5Sa01MpDXBQAdVtrA8lBhFnnKpsmoo5VBrhszV0KuJ5N2tP92O50iQjpzcctravoihdoi0Q1NrfN56m0VWzFBoje+OrD/s7pr0F0yUr6s5/LvUu/bz+B2ep+IHdMIV2SUZfCsAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-focus-near:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAQlBMVEVHcEyZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZn////c3Nz09PTp6enR0dHFxcW7u7uwsLAUKT0cAAAADXRSTlMA3IrE6WIm9wI+y0gNQZpqdwAAAOdJREFUKM99U9GShCAMQ8BF3Cmlpfz/r15dAe88l8zwQiQkoRrTEa3zIXhno7lhWxcYWNbtN/fa4Q/218VFDzf4of0O8A/h3TQfOGU/ytsOj9gPVyt8warkmYEQQAgABYDxTKROz88koS6AVIB1fRCNbSI1cVUy15Jq27LGjTtyzipPeWw40/IXQkrHyZSRmqw3LaQgctFNKYzYyGACfEXossLMojFEj7J0WfdwJ3dD9uY2X25tL0Hj45mTR87Y66u9IQFsDS1bL57o7JbUDNIofvpk08eej8kTe3Hz0ZwP9UFfv8OgfgBUByCEUZhYtAAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-cruise-play .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJWSURBVHgBtZe/b9pAFMefbSYWMjCjdOtmYEYqXVC3umMlBFRiT7qxkexITcdKSDUSYna2iqX+E/DG6LCQgcETUiR+5Pv8I3Kc+McF5ysZ3x2++9x79/zuLFEG9Xq9s/1+r8my/AnVJq4z/2LZfB0Oh1tFUQxd1+208aQ0GAa7kCTpMgRJk4kJXk+nU5NEoe12W8PM/wrAotIx2Z+w3MkE7XQ6Q3S4otNlY5zPUZdL7wiMBUsRIK/fDeWvhQ92XS0HrQia83cCsqoIyMug8gQ9Ho/DpF7FYpEajQa9VTBoyIZxWeEfv6IndSqVSjQYDKhcLtNqtaLtdkuigmGSZVn/XKiqqr9wqyZ1YEtbrRZVKhX3zvX1ei0Eh7Ufa7Xan8C9VRIUg9lyQZfzO19VOOugkBpAgaXRtnq97oLZ5ZvNJm0YQkBZ8m63E7YyKl5ntrrf77vlJCF/qzLlKLZ4NBqRpmmuF2LBlLOyBFYBchDKlIeWyyWNx+PUtS2Qtx+eJA6i2WzmQtMEA+8KnA+73a6N+jkJil1pGAbN5/PMfRBIZsGn3+LFvSABMYiBgpnJgZEeFHQD4EzQrOsWI4N/nrY2uPg/eeefV8WvAKfALOsWJ3jzA++rcqjhB25OXAd244nA62AjV4LGxWLhIBk/oPiF8pc9mUy+BZVnyQEzueEZUb5yjyvhBiX6BCw2YTGvdZNyAkYPZsprT/rgO/K2vDcdQQH7jes7gPcv/kvqyCcKbEVX6PxVAG76QWPGPZAIDcEZqGECTQyokpe9wp8VfNqzyA2L9M+KRzm19l1i6ZQBAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-cruise-play:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAdCAYAAABWk2cPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJ5SURBVHgBtZe7buJAFIYPjsVFAok3wBUlYcUDLNvQISUSDVVCA0IUYZ8gmzcgBeIiJLwdFau8QToaQKygovI20CJBARKX/Y/jICPAF3B+yRpjZvzNOWfOzLGLLKrZbAaXy+WdKIq32+1WcrlcQe0vZb1e/8XvQT6ff7fyLpdZh0qlEr+5uXne7XZxMpciCIKMSfzGBBSyCwVMAqxpEXYEhzdeAJYtQ2u12h2aJq4gXadSLpf7aQptNBoPm81GJofEsc5ms9/0zwT9j3K5HHUSyEJ4ovV6vXkSyjHEyvxDXyCAHxGy4hEUq+4JjWQ02O/30xV65rTbQ9lKNEWjEYFAgFKpFMViMbpQnOfFPRSKWxnldrtVaDqdpnA4THalefMDinx8sDOYrY7H45RIJOy6PMibjch3F24AJEmSeo3HY+p2u7RYLEzHwNqogOUcpSvFrk4mk5Zcjry9FZCX1+46qj5dzvEOhUKGfQVyWAyPRCLqojsnEYtohpiSE5rP59TpdEhRFMN+Itw7Q3DpGq1WKxqNRurF90YC75+gnXszulBsVbvdpl6vZwpkwasDNWVw9r3BWlu5Op1OVdBkMrEzTD11RO1exmUJytb0+30aDodkV7DyjT2rBpNrG8zg3WwQW9ZqtS4CatASt/sVhAC/GA3glWk1bqcEo+TPwm0P5QeYySt9jRS9UQe54vF4fqEZkMNCdXivrw4PoJlMZoad5IeDYE7F+0KhcPC+syVotVotIQ5PdLm4CD8CGkJZfAIhzlw3SWRdM+T9q9frLbHnTnUwrfBZfPCiecQG8v3MBHj/HvAm4/P55HMwW1C9tG8a/RmsGH1CnNJ/17UakVMOx7kAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-cruise-pause .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHySURBVHgBxZc7bsJAEIbHdprQJAU1ckln3FM4J4jTIkSMRB9uQDhBlBPECIk2yQ1MSeeIxg0KZQoKKpSCR/4xtsXTNmA7v2ThHe/ut7M7O7sIFEOGYdzO5/OSJEn3KGp4ZDy33ucxP6vVqo86H71ez47qT4iCLZfLJ0EQmhuQKNlo89rtdk06FVqtVjV49kZrr86RicG2TdMcx4LWarUWGjzT5Rqjn7tdsJAi8Ch4C4op1TGl75S8GKwCPOWC6FsRNDKAL5SOZER30HcAhbFFEUFTLBapXC5v2fL5/J7tiOCXofHLlVfikRhRrSqVChUKBXIchyaTiWtrNBruYLjM9jB5jlmup4vFQqMYyuVydKE03vsuVBTFR8pIcFD317REGQlRXBJ5PSl+iktCskgZC57eZA5l/Q/Uy4lTykjYq1++p5EHb1LC9rRdKA7dT8pO64yERG/SmVM8m81OqW7yckr8Ztv2r6Io1whnLawF59fhcLiVY0ejkWsfDAYUJfRfB+snOE85J2KRvym9RGF2Op06vwRbhg9YHgmlIz7E235B2vwC1x1VVdl7jZLT3nVF2q0BsJUg+ODFTDpU0wP3PfC5a2wB+BD7CuqLgws/TQQYn7cyxYfxfdc6ViEUujMAHUlER4cKHfhbATvPjBUG8/UH1xXJDxHoYGQAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-cruise-pause:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH/SURBVHgBxVY7bsJAEJ01CAkJKUhUULmiDSnpoKYINyBuQIgi3AA4QZQKIQq4QaChhhuQCxAXSERUSDSIb944axSS+CPA5kn27o7X+2Z2dz6CXKDT6URXq1UqGAw+Hg6HDB4V4qj8rAsh9N1uN9rv971KpTJ2Wk84kW2322csVv1BYr+gEGMo8Foul7uWc6w+NJvNjKIoHXRVOgMg74K8AXLdFWm73a7BujpdDh3rZH8TCw8JLYlPSFutVh7NG10feigUetA0bcEDxZTiDFU0L+QN1M1mc1z7SBoIBGrkcGkSiQQlk8kTWSQS+SP7D3CzJ76c3A/yi61kodOP6XSaYrEYzWYzWi6XhiybzVI8HjfGLLeDNGxoWpohF8C50CXgwMK+r0gNCuQTENnyitQgRT4BQSOlyFvrKsRdCapC/uPuFqR0G1IZExfkH94NSzkHkk+Ap4wNUiTqPvmH74gUDoe7dOYWr9dr13M5sfNxBnjQ7/dXuVwuDGHG7ieOr9Pp9CTGzudzQz6ZTMgJ2FFtMBh8HvMpx0Ro/UEeBQq2slgsatw/uoxMsBp5A64WG+bgxE9LpVIPpUWDrgv7csUE4nEdlWCNPCC0JJXEF5Wg8MchHs11CWpCVvZVkBfckksyrneHVnMEuQRXitiqPBS4lwpEJYmORkc7Qju0IzPxBZ2t+3mW/JtqAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-fog-open .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAdCAYAAABWk2cPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAKgSURBVHgBtZe/jtpAEMYH28WJioIa+URDF8MTkAalO6cH4YIiFbk8QXS8QO6oUlCAkGjDtTRHJBoa4nQ0KBZdJApoEAV/Mp9jkAF7bXPcJ5ndtdf725nZWdYxiijDMBKr1SqhKIqKNpdms9mcRxkjFqZTsVjMy7J8x1WdL9WjC6D97Xb73G63m0HjxULAvnI1T+FlMfxBBPeEwoW73Q6we7pcViwWe8+utwKhDFQZ+IOrGr1eAH9ksOkLdSz8Rd5xu1RzBmfdFkvupwz8dmUgBENeYNAZtFQqGVwY9DZSnTVi6+Decrn8h0JYWSgUKJfLHdrL5ZKm0ykNBgOazWbCd9nNt3CzgoZjpUohlEqlKJPJHN3DJHRdp16vR51Ox/ddTiVkw70NlSTp7rRDMpmkWq1G4/HYvmANSpHghXg8To1Gw/M5W1oGVEZD07TvXNy4O8Btw+GQFouFbV06nabRaGRbhbaf8AzvTiYTr8c32Wz2p8KrSuMgJ7x6IEa4AIuivau9tNlsNGm9XqsBY9gxhOvCCi728wa7OCHhRzQAZl2pVGyXRZEoBAoFCDGs1+v2QooiUfpIHE+LBEL+VatVezVfDcp/whYJhAWBVHFvCEFCfz8op6cpORuxJRokajz98tSRae+97OJnUS/RanQLkwNQ4FrzsA2yyU0Gf/br2e12A90LlwYAkS5Pdrm/wRs+/rh1ChAshuV7wTqAQoTAarVat6gorll8YWvzXBXmbdTUcY3/sK/L+4ppmnPeF/9SCGsvAXIsH8+gDthkMFyepyuJgS0GHh3w5NNOzO0zeMHVD/R64BMDP53d93vBORW+0GVnpvmpS0NBXXDDSacwR9K5kxaPok+NUJ8VDlzlQucJvKNj63G2/U3/E78fZqx/rk0w4ggu8jUAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-fog-open:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAdCAYAAABWk2cPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAK2SURBVHgBtVa9jtpAEB58/EqArqCBBqehorgTVDQxPVJOiD5QAEJUeYLjniBcgRACKeQJQsQDBBoqkIigookraC1BwT+ZcQBBsNd7Ovgk2LV3vd/M7PyZgBPlclnc7XZPFovFv91uRZPJdL9fktfr9W987udyuRbPWSajDUgm3d3dPSOhBMaQUaAXu93eSKVSCryVtFQqPaBWXznJNMlR8zo3aa1W+7zZbIo4vYd3QBCEQjqdfjEkrVarzyhlAa4EvOt6JpNJ6ZJWKpUnHH7A9VHMZrNfLkjJO9Ecv3Aqwg2A1osevFs4vCQP5SF0Op3g9XrPflar1egzut9vCNVHzPS3j8EkcCAcDkMgELh4PxqNoNvtwmw20/tUXC6XSRyLqqZ7LS80CgaDqiY8IEESiQSIoqi7B53qE40qqVYsolTgdrshEokAeh9IkgRGIDPTPhJYC8SD4eg3k52RQNQi7XQ66txms+kepEUcjUah2Wxqrq9Wq6h5Pp8/4CUzD1osFuqPFwfnIsE1IBKbyDqANIzFYhCPx+EtYPmCGQxAppJlGQaDAVwLaFlBgRtAx7T/SNGNZWCg1WqpoeP3+4EX0+kUJpOJNiEqKWA49HGusA6gwPd4PMCLXq+nu4bpsK+6LVV9YMDlcqnkPKD7JyF1oFD+PSSHV9ZB4/EYQqEQGGE4HEK73dZdR+Ua6nh4gWXtD3AkfCL3+XzHZ4pfyrekIQnHApr2A2oqn4YM1TvDWkr3xbozPVAxJ0KaH1MRFllSvQG3gYztz7FtOct/mLqorZDhulD2BVzWJKW2kTZckVjBnviM8IKUQBtQ40ck/w7vAIUhnvGYz+cvwpHZbGNHkcQMwtXGnICs9YrCF/Q2GHb4e3IJBxLgo44ACsY6afbT4XDUWd09N+kpqOhTDT55Jf9/Z0b4C/UJLQCcLGi1AAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-fog-close .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAIjSURBVHgBtZe9UsJAEMc3l1Q0WvAA2NEp1MyInVbGnoE8AVrSqW+gT2CY4QGwpTEFNcaOEqksKKiYcYYP/xsSJoRwx8f5n7nRu9u73+7lbu8waAc5jnM6m81sIcQlqhcoOZTTsHvAZT6fv5um2XZdd6Caz1DBMNm9YRgPMYhKHhx8brVaHu0LrVQqNjx/2wOWlAtnn9MiT4VWq9VHDHii4zXAPFdJsPGPwK1gIwHk7/dC+sXgAsBjroioFZsmpznCuHKLxeIxqqwirdVqvGmcbaOy2SyVSqW1tuFwGJTRaES7CEGd8TJbXOEo4YkjG8BQ27ZT+7rdLrXbbSUcx4+P3oOIVQ4Wr0Cj0aBMJiO1Q6Q1PvsirFzSkeKVqNfrKjM+8xeCybRMbUcrn88HRSasqs2R5kijisWitB+reiKm0+mhaS5VvMwqCdIs1WYKoJZljUmj+NwqobS8D7Wp1+tJ+5EPvkWYD33SIE4S/X5faoOHgCdC+jsdKc5GnJUUGiNIzwrpbjwh76tOpxMAJ5OJyjTwKp7wP/CnvM06LeFzdPwNd4AFihL+Chom/U86/HmiAr4CGOR4M2r0fX9cKBR+8e816deg2WzeRJW15ABPXvgxRXoVPFfiDWbSAhF7iJiXvUyagMmHmZlmGYK/aXn7HPSNAWui3AH4s9EnG8ibiy94DL6l3W8jL3zvetsMpNCEAw4cKGPCc9r8WeGj/YuBMlikP+yn3EGZYjlWAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-fog-close:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAI5SURBVHgBxZZLjtpAEIbLjUFih8QFnBUrJCIOEHOCROIACStALBhOMMwJMlkgBCyYnCDMCUJWrJCQYB+zBwkJFiBe+QvZyEz86IEezSc1dj/w76pyV5dGEnS73cR6vf4SiUQ+HY9HE0MJu5GmaSNcFrvd7hn3vXK5bIU9TwsTw8Oqh8PhzhGRoIf1tSBxX9F2u12FVfVXiL3ksVgs1khWtNVqfcfljm7HgtW5l1Zrbyh4Fo7FYh8LhcLCGRDu2U6nc69YkDG22+0v98DZ0mazaQgh/tLbUUOMHy9E8eH8treDJ8lkkgzDuBibz+c0m81otVqRBAu4+QO7WecerDSDBB3RbDbrOTcej2kwGFAIvNc5dPVTTLHpv9INpNNpyufzBEsC1yF81dOVf8KslCHIEy4SjUYjIxDLDDoGKYAtDrNW13VT7Pf7azOOJ6lUKnAeySLB7jVIIezmMAS9A/igxIIUwns3VBQ+HpFCLMsKnGcjhX0CKLF2MpnQcrkMXIPzuX+KKax9phthtw6Hw7BlVqVSGel25wntqqy02WxOFnLj+xB6/HNTwmdXTqdTGTHmfKA7lhKSxAOCbPr9g90n82X6AcGfTgVxUTngtKlD+J4UAw/2S6VSzulfJAe8SZ3fiNRiQbTgHvgvI0H4Gxb9IAVwTexVmHmmQbiCD1suHy26En7xaDSa86p/A4ttrpuIT3ohpLcTxw/tAWJ9vzUaSWCLm3DXZzS+z7hELFzYjX/i8fiTu9T04x9LgQk+PbvDKQAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-wiper-open .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAALxSURBVHgBtVYrrBpBFJ0FFAqBqCIrUXRBk5QaUleewBBIlwSDoW1CUlzz0CSlaJJHA8FgqMBg4CWIKkpRuEfQCDAYAvSeYYfsLgss6fYkk5ndmXvP/c1HYjaQTqdjbrf7PQ0VarLWgBW1Cdput3tutVrdW7qka5OZTEZ1uVwfaBhj9jDf7/ePzWazwe4hVFVVPhwOT3cQnRFLkvS20WjMzRMuCzKFyH7/AxkAg18oQp/ME24LsgENfcwBkJfvQqHQejqd/jr905HJGpnMHIYW3iHGp5AS2df/QabpfiKHfCdCVCN1qh1hv9/PIpEIi0ajLBgMskAgcDZfKBTMYjJVL8+nh7MeS/8ioFiQbDYbtlgseA/lXq+Xt9lsxrrdLkulUmw8Hp/poLB+JC+rkpa7FysiKEokEpyo3+/zBiIrr2EU1kKmWCxariMvsy46IRJWZFBSLpf5GApgvZUSYLlcstFoxMfwHnKQN4Mi+cYdDoe/IGpmslKpxJV0Oh223W7ZLcTjcb6uVqtxLxFayJtkfSga2Sycy+X4YnhlBzAQhGI9euTRqnhAaNjkKA5Unl0yALlD0SC0Au12m/fIvx5nRxsEYV2lUrHMgxmiYMwGwmiE1qzDrSiKSv0r8QMxF2Wdz+fZer3mhXAJCP9gMOCGAiBJJpM8h6jqXq9nWO+hLfGH9ohiVoTFIEbxwFqECMoQInwLy4V3mEMe0SB7YWtMJJzoVK7fLnkgKg65BVBM8Bj5gjHwDORoGNfrdUMu9SDnfl7d+HqAEArFCYNQYoxtAODfJSIBimTWpV2Swxt8PLwiRAgjGrwXuEVGmBNXw6MxP5KXMWYTCKs4U+2COH6g59tCu6uG7A7AYxteCcypVU+EmgVZbcJxkO4HcmplIEQuMcGOTz8nyT6T7on4Npw0mMBzgDnkqUZWNfyzWujQM/FB79lVQh2xeudbZ0VE36mvipzdRagjjtFtnSBlr9nxuS9uGCidk1HPdFp1xcvsGv4CcbeEIeSIw9MAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-wiper-open:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAM0SURBVHgBtVa/SyNREJ7dBLVQELU4bdwrtFJOUCxsXEG0Ue4OK6tLKhEb/QsO/4LzChVtvGvE0sPOxtiYJuFyJBBICtOlSSAQCEnIj5tvyC676ybZYPLB4y373ptv5puZt6uQB1xeXup+v/9zs9lc4qHxK621VFAUJYbRaDSeDw4O7rvZUroQBXw+3zcm0ckbMkx8enh4+It6IWQijYlueiByI95g4oxzQXW+OD8/X1JV9e87yACNbbxeXV0dOxcUJxnn6okfx6l/OOHcnr0hhIzsFcg06jNa8obwbErKOfs+CDIhUdUbxrhJiGrknAW8HB4bGyNN02h+fp6mp6dpcnLStj46OkpbW1vOY1q5XJZ8iqTX19dPnYpkZmZGSObm5qharVI+n5cZ5ENDQzKy2SxFIhFaW1ujTCZDqVTKaabA+z4qrdy9uhHB0PLyskSTSCRkVCoV16gRLfYODw/T7e2tOOQE5zKocmRf3Mggzd7eHvEtQnd3dxSNRl3JgGKxaEaE6HEO553gOllXuQ3W3ch2d3fFyMvLS1siKxYXF0XWh4cHOYfzUMgKpE1t3Y026LouhxCVF8DBhYUFcz9m5HF7e9u5VUOV2pp8dnaWpqamPJMBKysrEh2kNRAOh2VG/q14c7XhILzb3993zYMT2IOCcTo4MTEhkqKgrPCx1gGePxgv6vW6EKJYNjc3qVQqSSG0A+RPJpPiKACS1dVVaQ9UdSwWs+33c6n+47ZYchqKx+NCvLOzI80NiWAMEkFyeM75lx5FdFhD4SCXIEJluxRbTLm4uDjmcv3RLgIYgrfILZBOpymXy0m+UImIDLLCATyHQiFbLq1gB/90bHwrcNPAILwGAaREcz8+Pso6CNsRGZDGx0eS8xXqRgh5DYkgIwZuFQPdyGACfwJ+PHGhnHKUOnkEetS4U72Co/uNWdoC3yovUVqBiD1EZW4fGRk5MwkBjjKIBRoAarXa12AwWLARIpdY4McC9RcnR0dHZjPabhosMOkG9S9S2/8MMLDfRKhljawjoYU4wNXby79OgavxJwrEyFlPhBZinasYH+pPPOMaNL4wMJphJZ553Bt/Zp3wHwTYnvHjbDCuAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-wiper-close .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAANOSURBVHgBtVc9TCJBFB52r7jYyCXWnhcbO1aru8RErjGXWBxX2BijGG1svNhJo56VhQU2ViQsgdDQYEFDc5rQ0BDoaMgRGhoKaMhdCHDve+6QZVhgMfglm9mdn/e9v3kz6xEusL+/79c0bcvj8fjpc8V6gCY9VXqK3W73MZFIpN3I80wj03X9il79wh2q/X7fJAXvTdNszkQaDAZXaHF0BrIRcvLKERE/OQ3qYwh/06shXg8vRPl8PlEqlZ4nktoIV8QcgBxwItbfitBOvL6+XioWi2XZp8kXIryaN6FNdpSM8spvthRWUmPaJ25vb4vV1VVRqVSGBCwtLYm1tTUeW1hY4KfVak2hFe+J+B+5+QkfnL2Hh4fI1KAq/OLiQlxeXorl5WWxsbEhNjc3RbvdFrVajVvMkcTlclmk02nRaDTGETfJ1Z+wlTxWLP84zQoEAkwEodlslh+QqZDWY36hUGByp3m9Xu88Ho+HNaokfidCCAIh2kgkMlYQAOtyuZy4vb1lBW9ubnidCioa37klkw0nQrgWgpLJJMfXDUAOBbEO66GAAkOS+tSRk5MTXgjr4FIAMXULrIObz87O1CHv8fHxR03thXAkDhbahezt7TlpzkA8sc7uUngIQIhUgNRr70AWQsu7u7uBEPTBdaqboQTcCIUgXL4DUBzjTrHVDcP4BmVlR6fTYVLg9PSU9yC2CIghEG7HHIC2GluJOGYyGR6DYiDCGEKD/iErNS2sU238QnH9rGqDopDP5zm+EIJ3aL6zs8NEUAKCQSiVwxp4BFaHQqGRwkJoRqPRkEZ7tCjGAAJQHED28PDAVkirsX1kUcAc7FEXWc5c7+iQTltnpyMgHNYgUSSZBL5BhqTBHkVMAZnxKsijMbQ6Vf+/FFe/mFLs6/X6IJZ20t3dXXb34uIihwFuTqVSI3Mt0nPia3LtpVLot461V0FWLiiBZwzMWCx2xOSy5+DgIEya/BRvA1xfvlKxr+JjUBwola/Fy81u7iDCX5JwiJSPHNJm3sQWoTnUp06a57XFIrxW+0dug8guutM8EvEHpxPIJRDDH6qFA2UmrSSrg0SO5HJLjhDdUxue+bLtQG7QqR8ggVvC4beCFHumRMSxVJxEJvEfnFm91YrgD/sAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-wiper-close:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAANwSURBVHgBtZa/SyNBFMffboJaKAS10SZ7hXqFegGbCyjmUPTAH3eHlZWmULG6u/Kqi/9BLEQRIdoKigf2l1Q2ChGtBLmtFAQloPgL1HvfRyZuJhuzBvOFzezOj/eZee/NZAzyoMXFxYjf7+99enqK8GNxlZVtyhiGYXOZ5vo/MzMzW17sGaVgPp/vN2DkTbZpmqs8wfloNJqh10AZZjEs8QpYAfzx8TE6Ozub9AQFkGf7l55dWLbYTmxqamruRehbAl8CG5UEOvTNmWSmekHCVAgIJVgB9eHHD1bJSTPp7NXe3k68Hejg4CBvdF1dHTU0NFBVVRVdXl7S/f09nZ+fl2BS4Pb29geXMXyIe5eXlxM6FMaHh4dpY2ODGhsbybIsamlpyUFQog/geE5PT2l3d5eurq6KgTPc7x22kpGN5T+3Xl1dXdTa2ipGDw8P5bm7uyvoB3hTU5P0t22b9vb2ZFIu+smxjSOmEbfW2tpaAcJgMpkUQ25ACG4+Ojqi7e1tqq6uprGxMRmvi8P1BaXJLyE34MjIiBja2dmhzs5O8iLAMUGMw3h4yCkOobDYs+YHfXAkEpGBWJ1KJMTUqzAObh4cHNSbAisrK0FTrw0Gg5I4GKiEBAmHwwUzV2pubpZJOV0KD0EIkS6TlxxwViALMcvx8fGcEdQhKzs6OvIGYxLIcEwIxuFSvEP19fXSjpzQ5RsdHf3M5XtV8fDwIFDs0f7+frq+vpYtAjAMwu3oA/X09MgqEcf9/X1pQ/wBQhuyPZ1O56/SNOO+oaGhMAM+6rM5Ozuj4+NjiS+M4B2ZGQqFBHRyckLd3d2USqWor6+Pbm5uZAySqa2tjdbX1+VbU2Z6evoX3JumIoIBHA6ATUxMyCl1cXEhQOxD1ON9c3NT9qjufl2K5a+pqdliA4liHWEc7kOiwMXOvYpvwJA02KOILwS3FoGuoTTlWDKMJJUQ4qwfDmoyAwMDkkiYIBIOsS2iJH7k7MW1JPu3VpbUyYWVw91u4oWtcjyjOSi0tLQU54bvVBnh+vKJry82PnKHAydFDI1UATFwTgHzoIgtZvPW4Cxw1VlX0YtZFhjT6wvOXrgBK+ZnjcqXimHMrbHUZXuSV43kCpE3IUTzvPfjr75s61pYWAgx/Ctndy9/WlxaCsKPzZs+xc8Ww9IvwZT+A8hTw5fcMmXrAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-arrow{cursor:pointer;position:absolute;width:0;height:0}.jb-pro-container .jb-pro-ptz-arrow-up{left:71px;top:15px;border:7px solid transparent;border-bottom:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-right{top:71px;right:15px;border:7px solid transparent;border-left:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-left{left:15px;top:71px;border:7px solid transparent;border-right:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-down{left:71px;bottom:15px;border:7px solid transparent;border-top:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-left-up{transform:rotate(45deg);left:32px;top:33px;border:7px solid transparent;border-right:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-right-up{transform:rotate(-45deg);right:32px;top:33px;border:7px solid transparent;border-left:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-left-down{transform:rotate(45deg);left:32px;bottom:33px;border:7px solid transparent;border-top:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-right-down{transform:rotate(-45deg);right:32px;bottom:33px;border:7px solid transparent;border-top:10px solid #fff}.jb-pro-container .jb-pro-loading-bg{display:none}.jb-pro-container .jb-pro-loading-bg,.jb-pro-container .jb-pro-poster{position:absolute;z-index:10;left:0;top:0;right:0;bottom:0;height:100%;width:100%;background-position:50%;background-repeat:no-repeat;background-size:contain;pointer-events:none}.jb-pro-container .jb-pro-play-big{position:absolute;display:none;height:100%;width:100%;z-index:1;background:rgba(0,0,0,.4)}.jb-pro-container .jb-pro-play-big:after{cursor:pointer;content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;width:48px;height:48px;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAIVBMVEVHcEzMzMzMzMzNzc3MzMzPz8/Nzc3MzMzMzMzMzMzMzMzLVn6fAAAACnRSTlMA+duduRUwSGSD8toSsAAAAI9JREFUOMvV07ENgzAQhWG3lLSp6MwCViYIRSpG8AiM4FWMaPymDBKESMF/cQ0S136F353vnLuo3gp1kOYEoCXW4LFKIZAnqAXYICeASoAdzgG+cApwgF4EfwF+oDkCqIwA6gnyAKA8AaizQhsBAjzuqUHofInGIQbjRxXjMrTJuHDestR4Bng4eGrN0929PqNfzC6h06weAAAAAElFTkSuQmCC");background-repeat:no-repeat;background-position:50%}.jb-pro-container .jb-pro-play-big:hover:after{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEVHcEz///////////////////////////////////////////8Uel1nAAAAC3RSTlMA+rbVFUecgC7rYhEEz+4AAACbSURBVDjL1dMhDsJAEIXhdeiGpKYWQVKDWc8ReojFc4ReAlPFFQazad7lIGkb0jK/WEPSsZ+YN5mZEP5UrZIP0vgE0Kv3oPlIJlAk8AJM4ASYwAkww2+ABfQg0ImgugPYsfNBVl99kA0AsjOArAPQpRTGHiBB8whxM0y+3skXNltsvMYriIWrpWPA80mFJ5qL3gAfB1/tcAt7rzdiV+HEgs1oBgAAAABJRU5ErkJggg==")}.jb-pro-container .jb-pro-recording{display:none;position:absolute;box-sizing:border-box;left:50%;top:0;padding:0 3px;transform:translateX(-50%);justify-content:space-around;align-items:center;width:101px;height:20px;background:#000;opacity:1;border-radius:0 0 8px 8px;z-index:1}.jb-pro-container .jb-pro-recording .jb-pro-recording-red-point{width:8px;height:8px;background:#ff1f1f;border-radius:50%;animation:magentaPulse 1s linear infinite}.jb-pro-container .jb-pro-recording .jb-pro-recording-time{font-size:14px;font-weight:500;color:#ddd}.jb-pro-container .jb-pro-recording .jb-pro-recording-stop{height:100%}.jb-pro-container .jb-pro-recording .jb-pro-icon-recordStop{width:16px;height:16px;cursor:pointer}.jb-pro-container .jb-pro-zoom-controls{display:none;position:absolute;box-sizing:border-box;left:50%;top:0;padding:0 3px;transform:translateX(-50%);justify-content:space-around;align-items:center;width:156px;height:30px;background:#000;opacity:1;border-radius:0 0 8px 8px;z-index:1}.jb-pro-container .jb-pro-zoom-controls .jb-pro-icon{vertical-align:top}.jb-pro-container .jb-pro-zoom-controls .jb-pro-zoom-narrow{width:16px;height:16px;cursor:pointer}.jb-pro-container .jb-pro-zoom-controls .jb-pro-zoom-tips{font-size:14px;font-weight:500;color:#ddd}.jb-pro-container .jb-pro-zoom-controls .jb-pro-zoom-expand,.jb-pro-container .jb-pro-zoom-controls .jb-pro-zoom-stop2{width:16px;height:16px;cursor:pointer}.jb-pro-container .jb-pro-loading{display:none;flex-direction:column;justify-content:center;align-items:center;position:absolute;z-index:20;left:0;top:0;right:0;bottom:0;width:100%;height:100%;pointer-events:none}.jb-pro-container .jb-pro-loading-text{line-height:20px;font-size:13px;color:#fff;margin-top:10px}.jb-pro-container .jb-pro-controls{background-color:#161616;box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-end;position:absolute;z-index:40;left:0;right:0;bottom:0;height:38px;width:100%;padding-left:13px;padding-right:13px;font-size:14px;color:#fff;opacity:0;visibility:hidden;transition:all .2s ease-in-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:width .5s ease-in}.jb-pro-container .jb-pro-controls .jb-pro-controls-item{position:relative;display:flex;justify-content:center;padding:0 8px}.jb-pro-container .jb-pro-controls .jb-pro-controls-item:hover .icon-title-tips{visibility:visible;opacity:1}.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-face,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-face-active,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-fullscreen,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-fullscreen-exit,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-icon-audio,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-microphone-close,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-object,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-object-active,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-occlusion,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-occlusion-active,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-pause,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-performance,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-performance-active,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-play,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-ptz,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-ptz-active,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-quality-menu,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-record,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-record-stop,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-scale-menu,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-screenshot,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-speed-menu,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-template-menu,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-volume,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-zoom,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-zoom-stop{display:none}.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-speed{padding:0}.jb-pro-container .jb-pro-controls .jb-pro-controls-item-html{position:relative;display:none;justify-content:center}.jb-pro-container .jb-pro-controls .jb-pro-playback-control-time{position:relative;justify-content:center;padding:0 8px}.jb-pro-container .jb-pro-controls .jb-pro-icon-audio,.jb-pro-container .jb-pro-controls .jb-pro-icon-mute{z-index:1}.jb-pro-container .jb-pro-controls .jb-pro-controls-bottom{display:flex;justify-content:space-between;height:100%}.jb-pro-container .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-left,.jb-pro-container .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-right{display:flex;align-items:center}.jb-pro-container.jb-pro-controls-show .jb-pro-controls{opacity:1;visibility:visible}.jb-pro-container.jb-pro-controls-show-auto-hide .jb-pro-controls{opacity:.8;visibility:visible;display:none}.jb-pro-container.jb-pro-hide-cursor *{cursor:none!important}.jb-pro-container .jb-pro-icon-loading{width:50px;height:50px;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8BAMAAADI0sRBAAAAIVBMVEVHcEx4eHh4eHh4eHh4eHh3d3d4eHh4eHh4eHh4eHh4eHiqaCaRAAAACnRSTlMAikwX3CxpwZ7zIGi5xgAAAZ9JREFUOMt9lb9Lw0AUx2Njqm4iGEqmEnBxslKUdhJctFMVcW5wKZ0CLpJJQRw6iVqQbg3FtPdX+l5+XHJ3796bQj557773fe8ujtOI+6jz5p84dHjTkYD4+RhT9CIRZWRPJr1bChnbY532GhT4oUpbI6HEuqvgIH9544dh9J4/rpr0Ms8oV3zMNT7X1MXSmaznzfHjM4n72moe5n8ryYrW9rKRvgf0S93JA7yKa9lbzUg3keJb8OVCtwkrFmoO4MnsAuj5rGqnZg+GZXUXkl9NjEui9n3YA9XgpMgakLXz6ujMTIgrCkPVv0Jil8KgKQN/wRN69hLcb1vrbR2nQkxwiZTGQ5Teb7TO8PUaS8Q03sE+zkjP8qbjzgJtEhRbV4gnlkOFeM7hDYNdxPbiYFvKSHN6L2NmY5WzMYPtplZdTxncRvn2sI+DHIoug22jWMaA12Y7BrXzrG8BX32XPMDKWVzw1bdMOnH1KNqNi8toqn7JGumZnStXLi0e4tcP6R3I635Nc/mzsMxl9aux9b78UVmn2pve8u6eR50j9c0/ywzyVl5+z84AAAAASUVORK5CYII=");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;animation-name:rotation;animation-duration:1s;animation-timing-function:linear;animation-iteration-count:infinite}.jb-pro-container .jb-pro-icon-screenshot{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEVHcEzMzMzMzMzMzMzMzMzNzc3MzMzMzMzNzc3Nzc3MzMzMzMwv5ahDAAAAC3RSTlMAW+8S2UGVwyyZnOTRhEMAAAEfSURBVDjLzZKxbsJADIYdBQpsSCyVMlXAdEuQYGKpWFk6dWHJgsQ7sMDSpUv3PgITAQT0f7ly57ucQ45KXRAZot+/89k+X4ju9KzL4XOhlm3pR0enYrWViSRPXQIQSASkRSkIJEFRimYCuQAHSW89IOv6SH5TCsuAj68Ab1wDzqkAzqoC7AUAPtgsABgkBBgkCJiNHehGok//KRVsHqd+3Dj1/vukt3AH/Jj05s5/AmyZhFVWXDls44iVvfQWkCvgxU6g9ZdJfCLvjJbYaT3GvjOY4mQSG3SJGjhr/Y1Xohp+TGKqqzexZ/1GVGdNCitt6R8zVvb9d+JmKdl8o5sPWbtxT6zFuJcDQtk92MNmYiXHquYlZlVt1j4P6cd7fgHFW7Nhqu29TwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-screenshot:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEVHcEz////////////////////////////////////////////////////////NXt0CAAAADnRSTlMAWe+X2TINXUYZvctoYyuS2NgAAAEVSURBVDjLzZKhDsJADIZLCAsEg8WgEGCWGSwCgZxB4MgEAonB8wQEXoBH4BEWXgPJgEBG0mdgR3u77raRYAgnlq+9+/t3TQF+dKbZcJXSYSnzlViT457lRScKmBqILSFA3GoO8S4E+Ex5JiSJ4CbVdyOQdZNomX9D4dl+ko3NC8vFFmhPy8FIsi0ZlwLBW/LY5BxYYreUSgoFAEmhB5Rc9OCbUoXmTmDadQKTn4y6A/XTaoSKdb6KyGU6RJ7eHgpb3ABinAoil303xB6vQnRahNhXvMdre+fzOgxVrokX4jHAnBh8PALU8Eq8BqgTg/vePF8tpuPy9/NFaalSc273RizarYqfkswjifNMQ/TyTGMv4v87L+ks5gqDbc9OAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-play{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAIVBMVEVHcEzMzMzMzMzNzc3MzMzPz8/Nzc3MzMzMzMzMzMzMzMzLVn6fAAAACnRSTlMA+duduRUwSGSD8toSsAAAAI9JREFUOMvV07ENgzAQhWG3lLSp6MwCViYIRSpG8AiM4FWMaPymDBKESMF/cQ0S136F353vnLuo3gp1kOYEoCXW4LFKIZAnqAXYICeASoAdzgG+cApwgF4EfwF+oDkCqIwA6gnyAKA8AaizQhsBAjzuqUHofInGIQbjRxXjMrTJuHDestR4Bng4eGrN0929PqNfzC6h06weAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-play:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEVHcEz///////////////////////////////////////////8Uel1nAAAAC3RSTlMA+rbVFUecgC7rYhEEz+4AAACbSURBVDjL1dMhDsJAEIXhdeiGpKYWQVKDWc8ReojFc4ReAlPFFQazad7lIGkb0jK/WEPSsZ+YN5mZEP5UrZIP0vgE0Kv3oPlIJlAk8AJM4ASYwAkww2+ABfQg0ImgugPYsfNBVl99kA0AsjOArAPQpRTGHiBB8whxM0y+3skXNltsvMYriIWrpWPA80mFJ5qL3gAfB1/tcAt7rzdiV+HEgs1oBgAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-pause{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEVHcEzMzMzHx8fMzMzMzMzOzs7MzMz4IlKVAAAABnRSTlMA6xIU1hVqIuOVAAAAMUlEQVQ4y2NgGFYgLS3RAEQziQFZoxKjEqMSaBJpEAkgIw1ZQlBQRAEs4QhkDeIMDgAWx1gMHyIL4wAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-pause:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEVHcEz///////////////////////+3ygHaAAAABnRSTlMA7OgSFBXMmAA4AAAAM0lEQVQ4y2NgGFYgLS3JAUQzi6WlJY5KjEqMSqBJpEEkgIw0ZAklJSUDsISikpLQIM7gAJjhWp6XcaOxAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-record{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEVHcEzGxsbMzMzMzMzLy8vMzMzMzMzNzc3MzMzMzMxEZ/aQAAAACXRSTlMADPKKKeBxlV6neZ4mAAAArUlEQVQ4y2NgGDZgJhpowCURAJeYpIQENJEkCgWRgCeShAGyjfgl2EqwS7BFToZJiLg4ICTEImdOh0pwRM6cDJcIjpw5E6aDFeh8B5gECBCUYAkKCoMbNXNSOlyCgUEQ4apJJmxIEkjOVWFgxi4RgEsikGQJnEYp4pLA6VxUDyJLIAUJcRLIwY7qXKSIQvOHWCQODzKIleBPPjgTHM4kijNR48oGkajiYUMykwMAAfmZhUjBISQAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-record:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJ1BMVEVHcEz///////////////////////////////////////////////8NopmKAAAADHRSTlMA8gyMLeRw1x2DBpWGN2QDAAAAt0lEQVQ4y2NgGDbgDBpIwCVRAJc4KIgEZM4EwCU2KSEBHySJCcg29iBJGCBLgHUs24FdYlnNYZiESksDXKJALebMaagES8yZw3CJypgzZ2A6WIHOd4BJgABMgh2XBEtpaBjcqDMHs+ESDFyLEK46aMGGkEB2rgQDJ3aJAFwSUSRL4DQKp+VHcTkXxYMoEkhBQpwEcrCjSCBHFJo/1GIO408MOJMPzgSHM4niTNS4skENqnjYkMzkAEgzyFpeX6L3AAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-recordStop{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAOVBMVEVHcEz///////////////////////////////////////////////////////////////////////99PJZNAAAAEnRSTlMAMPndsnZj1CSYPcmL6wsdoU80pOJLAAABu0lEQVRIx5VV26KEIAhMA++p9f8fezatFDPr8LSrjMxwiWlqzRuMYKW0ENH46c3WuGyVLXEduuO83UyK59fl1jX5EEUXD9DOaSh43XEP5zUIdZ4pAecTofVnWSt3ip4rx7N61vjnY1D30CpH4QQR8vsP+RA5Rs3KpjfMU/pMim/LgbvH7DF2F8sU0owqapKLqgnhuGWwImUagn2zhUX6WQQoYkXG9WxSAJd700/ygsCpAoliaDsPiG48GM1X5Ft/06sfp8DrDE+3DpekWjxM6366fgEcnklC+AIIWYQmPEeAaUmjFOnhCLDfxZRH+w1gU5b/DYjfNcyJ0p7dxX8B+FwxQVtvAGB5ig0d5gFA5KbzS91hI8CenvlHflfN/XvzJQnxbBEko1gbvVnPii+FadSVRUEaYylQfJtpLB+aRG4LY/80yKdUbCraM0lozGR4ewZ0Wtnj1iC7hjWKNnjYmR62W15cLlL3+2pyMR09jccyuyUrHKsvthc5xsY1iWJ0Xk3t+2XP7AnWwrAQmBH6asXubmL1Z5Lz6o992jWiu9lnMSiQsK27FS9NxhCumZgB2fTBPFsFolhZr5B/D3o9sJAI6skAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-recordStop:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEVHcEwimP0imPwimP8imPwimP0imPsimP0imfsimPwimP0imPwimf8imPwimPwimPxLmg1rAAAAD3RSTlMA15sisGUvdz3szYwMT8H+hDJEAAABx0lEQVQ4y3WUO08CQRCADxBQchBiMDE24KswFlw0Wtig/oHzUWglJBZWio3GDjUxlhhrEzT+ABMrO2iptLLVRluDggI+xtmdXW73LkxxNzvfzuzszNwZhhDzdOxqaPGgYrgkOgFczh90ezAJQmpL2v6OHYnqk2aWxOTtAnu/O/Y5XNZXmTZjo3ot7aESwLdFeqAM0MoJkMf9ltwVQJ9PcQN0UFIJogvdJgLQVFMsAlxyBaPmVBDCE8W7qd+2SDsx0q4OwhSrCG134W54jDfKLjDNxaL8/9AAMM/solptRnoALBbwEPWYrOEzLnrZsTGoMW+fBHG2SiLPUNI6KMOH8QS/XsCMBYQekIEv7NGZF/Rht2yqmA4i3UG9O0iTqgMfhirDhRdU8XJZqqEO8tDAqje8IIt1r+I5HmBjfD9AxQ1MgJQRpc6GJRALHOAS1WRlhMs4VaSFzwIWzCUF3op71kdNsNs/FDCuA58YqCQl7IhN3WbDnlLtfjnuON515WM17c7w41QPOuBIzDT5wqi0T4ESGV3gjtTjkuPATwHoX9+cPRlmmvJ57YAir2qKy459QL/UhrS/uAu3xf8KiX3DI+b22t6jc9F/qfaum9E1pJ4AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-fullscreen{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEVHcEzMzMzOzs7Pz8/MzMzMzMzNzc3MzMzMzMzMzMzMzMzMzMzNzc3MzMzMzMxdHBitAAAADnRSTlMA8AwGYt0aUcg+til5kgmZywUAAAGWSURBVDjL1VM9SwNBEB12IcGkMagxNktQSZFCYimIJAqKpZ3Vco3YBYs0NkKQgBg4ECtLFSFVCGgQrERBsLayPE0Ip7n5De73BdKLTrE3ezPvze6+GYDfsAQKy/Rz0i/OZJjY9XREuohTKulS+ZFGiADfyZXU5uHktI44VH5apDx554aXwJqloiIwiEsStAjCAsRNF1jCmGqa4Vc+BvS4JkjwzyPE6xiwzsxxeTbZxqjkANSWZFkoIj5bQBl4aBDfkPDNpeRRialB+SRAFz8UU1sAaEUjSCDoJ7iukZJ1V+c01bFczM1pWaa+a0Rp7MHn4V8Z1R9vLLCv9WjKdVFfk77JP+bZdz35YAfKXx6KhKp93abUYVbrj49g9aAYSuFCLbPUwzdCsYEWTloXgw1oGwQbENeuKwxzXhxwAADRMFd+zzRc6AAASY6RH8VjUHaXTrlOpDgCUP3gelc01e2d+f16cWbnQ46BGCRNVsWAWQJVw2xGfUXVv2k1OsLfazXqblzS99u1FwKFvBJioXBY2+r82U75Ab7O0ypVV0wKAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-fullscreen:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEz///////////////////////////////////////////////////////////////////+GUsxbAAAAEXRSTlMA3clDHfdfDQbsVG00u4Cqkr04dRsAAAGaSURBVEjH7VXLdsQgCPUBAROdjP//s1UTDUxsz3TRTc+wC94bHsLVmP9hkE8LIdvgupt2tFhcpy2CMZyVxNePEoqDp4hwEGz5PTqWoZNzLrmD9riltBEYzzpZQ8bweXy56Qy6Tivsp5JQYtawuMH3eJlSxIJtdSSa4xer4lMB89pK23mKrwjZVpsRzLq35vEE3+r26h6w5EKppcp3fP2lIpTPWJvoXoobeNI1sM3haHvx56tu2sdElJ54GbnPQ7RZ1sCpl8qPEMXBNQ8vN82jNbzLCPzGSDOZj/2Bqd19R1rELIEbDFrUJfKYdlALbDuDMko/hz7t8DqtCfr8h1Vt4rn7eh/6Ph37ch20aW8McsfGCOXzcr+GOlQG1rJ2HSHUDO/4Mu01qVAqTCpCJfgZ3phTS2pKm5aZOMUbs7Q6nk6L8UzRh6W78jH+gD/VRxHokPuNgUGTaPPR+zDR1mrlvcGgwkAVacSbeoN4Z0rb5/6XLrW/2GTLk2NhXHRKzrqAt9cD4rr4ddvae0NAYgOICdZyvPj4UYRf2BdfbB8iWvnTUwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-fullscreenExit{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAG1BMVEVHcEzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxi4XDRAAAACHRSTlMAf3WqJmy+7azWNnMAAADNSURBVDjLxZQ9E4IwDIaLfMzCOTDSOz07OjLir5CR0dmJFVHIzzZtnMzbOzcyZHnuaXpJWmO2ji4GhpAzzZeQzw8FKCj1pMHss9OgpwsGOS0YGOcVUMPsfBVkmJoVCBJW0FFB6SFIaMKAlRGDnEiDkuM00lP3SmL6H5QSh+iIr9ZWVWntUV9Z4qWbHAWrhcUYNLC4Wwm3xb1r2mOQYoVn2EKFAVb81KHiQQq6L3vSUoMBUmSzgCKbVeiL3eTp3Odf8H1sxRAZZNZt/Vt8AHcPQbiQQVF+AAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-fullscreenExit:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJ1BMVEVHcEz///////////////////////////////////////////////8NopmKAAAADHRSTlMAe4Fzh7MZbKPtN8gpX19xAAAA3klEQVQ4y8XUIQ7CQBAF0CWhKQHDGtQKQFcURUgqEARBED0Aoqp3IKnoATAEW8MNOACmhQYKcyi6uyjmr+aLqXj56bSbVoh/J3HBxcw0ZfA2c3FiQLGeQcWh1lOVDDJTAeCbCgAR6QqCDj0xCEU5Bl2BIALKMwhdKjGILRUYfCIOEynlvABANk64M5jabJxHfJY2I76yzYu/ZCc0s1WbNYAQ3jxqwMoGHoqWGHpUQajEgcYYcKWFtjLE4FGJQewoxODRDQOqKPPcHl9sfzSXa/0L349tEDsOsp/8+2/xAY+BZBY9KhM5AAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-audio{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAIVBMVEVHcEzKysrMzMzMzMzMzMzMzMzMzMzMzMzMzMzNzc3MzMz8gU00AAAACnRSTlMAL0jMZKt96hGJsSKv1QAAAJ9JREFUOMvN078KQFAYBfCbJEw2q6SUyWxTnsJT2JTJ6D38Gb6n5PpT6BwbuaNfTnz3fEp9fZwAP7czD0MsGCzBYJcEYsGwBEHQQRB0EII1CMAWdAOzyJUvJ4jyDVyZVHKGpj9guEI2IuhaDFadYnCkIm9I+kPgn8t+kI7kOsT72HcwQnJR9Gofy8DrwwtHK8pLzdeALg5fNb6cdJ1fOjOGYrl5CLFcggAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-audio:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJ1BMVEVHcEz///////////////////////////////////////////////8NopmKAAAADHRSTlMAL0TQf2frEaZYt8E+idL4AAAAnUlEQVQ4y2NgoDdgUcAuzr4Hh4TaGQHsBp3BLsG+BoeE2hnsEkCDsEqADMIqATIImwTYICwSEIPQJFhnBjKInUGSUA2CSPCcOcIwB1ki5xRM4iiDDrKEzQlsEuUF2CVY0jbgkDhjMLQkEkj0IM4gQQ1EHMHOOXMiakRpTiQQtXgTA+7kgzvB4UyiuBM17myAM+Pgzmq4MyfO7EwjAAAEf+BAxqI/agAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-mute{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEVHcEzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMztXryaAAAAD3RSTlMAHd4P7ztyiy1OnKhdx7uY2gyAAAAB8ElEQVQ4y72Uu0vDQBzHE45C3SJFaSGjUEiRpJRCBifXokkpSv0DfOBrEKxUUSoFH9ClFAUfU7c4OARRCs5WjThIsJuDlLo4ldvPe8SYxGyCt1zgw+dev+8vHPcvYybvfCR2OgUv2CoLdI62bUn3gq5UJxOomZofXPUNrIChJRklfcDSiKK2bYQ6PiCaREk0EQoYPFYa3F73F+DGsBJLmAjBAMBKakG15KAxqIhd2KuK5reRccBDNbqGJhfSlnNc/kBh4OY+vaoR5QrRC0afKgxMrKdXNKI8yxRENpyd+i0VA6wMm5IOBmORCwfAFjGwolofevbuPrvpGhRgpVaqiJflrLuUQQFRToS9l894EMDe7q6yL7/G5wMATc5mQCiAvQo3HAbwLtyYHQZgTxhohgGUa/CP12EA16W2/Ou4ZEj1dNG9oPMkZGiwJWQ8j+huPoJy9Z/XHTfUFSbAURveCtE5px5vs7hQDKS25FSDn2KR5Up1/lRmIHne7BvKd82LMRJbSjr5M40lmaYZ5/PRpiCpizjJyk+CwOGOzACLpSdz02QxkiuRhd8dNOwkV7zl2YX1mcySKJrQiPkXY9klSt6rkJPRwIlmzrcWSGyzHuTb11V/N0y/S6SdwdCR4m/47OIN7XOQCfwJwHGp8IcfyRdBLEZK4Uxp6wAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-mute:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAP1BMVEVHcEz///////////////////////////////////////////////////////////////////////////////9KjZoYAAAAFHRSTlMAbk2o8o0P5TsGnVojFi/XHcV9urLaq0oAAAIQSURBVEjH3ZZZkqswDEXxLM8T+1/rkw0BuwM0f131+IvDyZVk6SrL8p88QCHp8UAnWmoWoG8AwQRN4/vOiqwUuwWqiob646MMhEW+KnMLMIXffgiZoODBusb7kCzjByF7OOszkOyp4amJ7fWVPwCN6BpyWRypvANPCvi7u4aTXe13YI+KkYA5bMRTSMlLnSyGwisSH40B0FJOrKVB6iAw2U7sGgPgQ/DTPQjitCOZT4Q6gWCtGwGFbSM34ENUNSpAKTACmC31rnRgJwjDdkFAJpfkAsZcAJvCSVQB2FaWWKdB/ATMAHwIUYL21lRBZRDiC5AnsBHBUqxEyaraFMoz0AnvHNa6xDWS34FGgNf6PYAEZoCt+BroUWFVbeb5HbCqSvB2cToyca+Adjlycdawt0C/HeyScl1W/w3gsU3aAd7JF8AuAN6isr7NAogXAFeq59Ec7ifAm49hF8wCMWfVNXAeCAkjEGuBr6R5ZGJzBrl4gGniBME+w8aMMyCsNZtfaemnmYaAQ6I3Rz0fnDhHJxc93Vrr7sHWjP3XRtTba2L3EkdFVaPC6YmXxKI9DGF1YPLdiwfD2r37cL5nDVw+uKzU5K27hsXCXPtyC2uyyl0D0p2TY7VaIvFYWU0Dm8TdOXmrVp52HG4lU4K/N38PpS/Kw70dbmb/sC0WCcQwNNzzjrzUj7veUyIIyL/4m/EP8V829O8zh5EAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-ptz{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAM1BMVEVHcEzMzMzMzMzMzMzMzMzMzMzNzc3MzMzNzc3MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxDm1AzAAAAEXRSTlMAHqw+E8It/gjxc03jhGDTlgAjE2kAAAI6SURBVEjHpVbZkoQgDBwg3Of/f+12gtfMbK1Yy4NampCju4Ov1y8ruNyyo9fyCibVlNW6vUu29GpWQwTVdPTernqwffHex0WP4Nro3k+PrMKCvew/PcZ95aoNsY9yua+cGxTZsnf2K7ch4CAdGnWwYx/5LgKZCgxGdrhH3BeqNmnwviFXPZbQJmcM25HJ5n7/Pczr2QqksMJfO7BJOHLKLWFdMiL1QXYRwFagMklb4GB1zS7s8Le3fqH7Q28tVLkKdIzeaOJB2OKtY8KfTQCUa4++dNsLbrqpTR7xguHGt8hfg8P+seuaEkNdBjahzOD7g1cHP21SL2LtMNBKMdTRJjffTX1wVgrsEb1ITJU6QknwYJAcQky2cE02NbzPp70KyKggtpu9xM7Ik+CBIqY+8FrYyRUkrs+MEm1TG6tG9LZxNDNFGDue63TYGgIHqUUcuNhvhyZtn5LnlDq3Juxa4noCuX0scErOpNMDCrVcHPCS5rFGuQR9KZpxnB6CQ0ZO+AIBcTPk3UdbTx1L7jLEEHsMW7ZYm8NlIFyxn8+xdL7MURYEhzd5k2N2TabxIAORwC2r00QQfNSgrnqTJfh7cDmDu9ggtV0EZFr7kGu4KAxtNDln406TLwF9iZCIwn9EfjPuncRHYm5x3NfK3cFAS5kWxljSnTFlPHBAUFg5HsCCVOd9cdwXq+027un2QJlMjqISJutCDceRtTTuT4+1Q3HWHR8cu0fh9sGvADTYH9iLah/9nPz5+/MDJnQfoIVoAnQAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-ptz:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAQlBMVEVHcEz////////////////////////////////////////////////////////////////////////////////////1bZCPAAAAFXRSTlMAeVoYDS1pBiPv4/g6lkzO2qSxvoixscijAAACi0lEQVRIx51W2ZLcIAwcLnPf+P9/NS2wp5xkq0ziF3ZRC3R0i/l8fvi04oxx89n+RBi1sqB38TKw7lw7lNzDa3U0e57bHhJ4d567HlqGC08eLAj9Gv8XD4/OwtsdhlfCW2s9LfWtuNrMhG1uLWP17Xh14LF4m8dx1OJ9jkm85YCYch5JzDVy81on3MFYkpTNYGmHHloYI+aqlNhlh5ZSvmH1AyBUwPcMX+u/clW3XYvA2YgRGXyZIZX6PXv0l3GlV9Jp9FKcK7mytJIg8xEeBdaBtV4P8tAixexnp73tY7ZBkrk9WEL8t7ZUDqtIA3jXa8sODSeUVqw5aztT+g4QeNAgM0PGTA0+EmfVeUvU0CEW4hX+lt/zseE7jJKDSmi0EUKBhr7EAMKPvNjOA9Fz4Yk/CFgcGRSdkYOHCLRxQfzKRN5SB/b5Ot8SzzQiKqcb6ipFdCfi1JI84OBdxzarhJ8RkpxHOQszl7bpn0GpmnXq6R4OfTkwwlyUWzeQg7rSLNhNUzEUEqJF3DMHeeXgqRIaYwHimLKipK8hMZOYVfJ5oKtIFSgXk5z4KcNx3GOIPGYfPigh9YGHBNQKVKbZhxMnqq+OHfWBHARZfWm1dnfSXfJuXInplse8wy39zkisdQ5kuLY+Bpc5hwGiH8Mx1rE24DFaLqXkfrNVkjk+8JPTPF0bUw+R9MCVuA8ks/xDyF/9orMqpBQeiob5RbIbmv7/TxvoX1Oqa914TsYg7QUWx8Y7R89JQY8mY6Dat1G5GARuMOgYHY9cbL1vNvc++fk67olLk4nrQSl7457OPqdeKn+vEwm4LPzW87DyXvqIyei9znHS+cZz9SxV+Qf8nNbjn37NkDx4+PmCXzHOLUMtjgmUAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-ptzActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEwgmv8imPwimPwhmP8imP8imPwimPwmmf8imPwimPwhmP0imPwimPwimPwimPsimP0imPoLqfILAAAAEnRSTlMADprCJBnU/gXwh3LiUKxAXjJ/ELXKAAACbklEQVRIx5VW2bbjIAwLa1jM9v8/O7Iht+09MwPlpS2VwLZkJ9f1lxVG1joPdZ0u1ZIxurhv8DH6dMpQI5t439GAEc7xYPgTRnAtV7plReRhd5kDP8+fd+wzt70yPhIJzWT7/6DCJCAYLReZPMIuJC4pClSktHqbNpJO1aTmmAme3cvtWs9NSfq52CPhnJNjlbVHwgmWSWGHeQHcKFjj7fygwidf2fa4mbVOuladcnsoDn9/CKKAWf6HEtpANiJvUp9Fgr0SvocPP/sqjOCK9ktpyCAo4Kt/d4n4/6baseNKAt5XrauPN1A4ZLAd30RUI4kNfELVx+yd3lrXYIg1Bp/B/dGs5N8mPsJoVyiwkofQSlm+K9aiwmoQMDoI4wefoK/rhkESrSuV+BR2i6HZH9juLzxCtBmn6rFmB66gNJQwBOSxncT/N3FAlxAoLQfJDy2+6rMLI3aznl9fhOcGSdZzoNhex2K3TXJEVe3M4Zb6QhHuJc5BWakYIqqietcPw6FK+EHofUHRqtLEQ5X8dKVENXXgEpLOpcjwkFI30YFVHE8fyx2ShZJ/ydTKlZwZ4BCOv/af9uMi0DILe4kieynScgPbhai+DRDckTT6N6zJpI3HMghM3BMg+q9pHmwrbR0Q0D5wc0JHPy0E5Ur7Nf3Rk68LnR0NHfO28/T5P4cNr+uLFR7eEdiNxvMRbd5Onlqsis4iIVdme4di3akWOz+3T0aUnFWHa8QZrO51NO69MeLPafrNuBenxel/3d21j8k/jyxf+75OQabFxOtuT94G3Lpjzb0zBn2Dl0ep/waPidQ/p/XB60Dp7e8F/QO7WSJg4zEzdwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-ptzActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcExru/9ru/9qu/9ru/9ru/9ru/9ru/9svP9ruv9ru/9ru/9ru/9ru/9ru/9ru/9ru/9ru/+3uxEqAAAAEnRSTlMA5q0cR/PC/ggSKtN5OIhaa5izIOiAAAACV0lEQVRIx5VW2ZLjMAiMToNu/f/PboNsJ5PaKWv8kKRkWkDTQF6v/zyUfO+JX9sP1dKKd/v2acQcm992kbo1R4il7iHIif0BRNtCUOozH4cikAdt2YfjRLTnzN15/8I85wFCI2xDzlnyMLO7R0aFoTzbFGB+jIkYLkyePvmW8d2fs2ZfZuv8It9s6zvV5uSr2LmKb9oVh37QvpjYOcf8fcO3Cb1jGqOU0SvTTd6X2KUBLgKdLzaiDtE2n+isTh8/+AX7E6/Vh/NNSyfVm10RXIe1nxXRapmsDQB7SMnkmE0IxgqvUn0jteEf1T2CHXgr0gjZllGk1HoJL7lD7fRpD20CgJcwQ6EdSh3lLK0zVfuqz2WvPlPJh7HqnCQ4MysxoAYQE0vHub/toRuqzRy5pEUvbg62MzlJQn1MHBe1x7WSAddpNDSN1c9wRMhKfi2jrICwAIsQvHkD7Al41bOrBNC1Y7QdmSg15LDokGETJB/imxYJKfmFMDqI3FjUkDS3NSEDjBaxknRYSb+4nj4kC43W2OKrkqGB8jV2Fq03YiWbhHQTpUV1mMHXWYf8HlNX7ZUQRC6iwBAIK0r0ILr1UxqKsPattAkhwSIiMl76bT/Ft/TbTy2jHQoM7Cz9isHVMb6GILl0H4DGivbw7xNc8rAtiJn3O/qvD6JT/wgs7Y370ZSdWmbZWEKiG1lXImldW7Q1jGMbZW9tUVKZmGjjGvf+EXAqzWiX5OfFSHVp/zjbfGPc3whdcbTF67V2N1e79qYMru2/AnzVYFsdWFt/+nOypv8vQvoHou4gOtSrG5EAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-performance{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAnUExURUdwTM7OzszMzM3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3NzW8hQDoAAAAMdFJOUwC/gO8ra6tUQNmVEKtAA1gAAAE4SURBVDjLzZMhT8RAEIWnpS3tXcWdQ6wgOJIKfFdUICv6AyruB5w4EuSJCwRXgUBWkGArLsEi6JVuaZkfxawguSWz/p7azLdtdt97C3ASagp+PpeXPDjHVx7McMWDCBc8qPCZB4m44YFIeOBh+ckCf9z+sCCYqi8WvA/5Nwu26cfA+JRBs4h7WmX/tr9AXcQHAPdgzEPZh5idTQBOZ3zyiModISKQGxZ7dd85E0SKfMGjM7vXeI/5AE5LvrwpcK9IOrQYB5BlCsFIvjzgrkaSjsBZbmC9XsGsAxfn8gKXpL9sSlnQFBwFTTuaKWXgI5Ar+sfHTrW6DUDO+2jEEtCNQ9wL6gNujMvvdFS3eugxGT51fBXxTvF1wLLngbT0BGphKalAy0MQ3Z4Ha2V7UoMFJKkFVAWcvH4B0OJfd9YsTl0AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-performance:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAzUExURUdwTP///////////////////////////////////////////////////////////////8/RimEAAAAQdFJOUwD2qdfrViyAwW2XORBGtSCsD6SyAAABN0lEQVRIx+2VzQ7DIAyDYfxToH7/p10CbQ+T2s33Rb1MijM3/qDG/EurolD9zSNRggBU0hFelMABmenfADhGkJDhGUFGgiX6I1AAQlDgZK/td8ELtQORiTmIq42I2bYdCD8NjzPmYQxO+rbn2S5qzEUF6YjkgcJude56X3s0SoL7LRAeylyaVPiFq0Jyx230mpeXmXVOHssRbhackhCq25Sny++xcBW1n6Snqw6BTgrqRP6kzfDcgmRLGonDWSf2OecwB491dOrEVZpNsxiyiHzWJ0Z+BbBwzaoWVb49HrqVfSkxHen7WNznLhzl8xpQlT3E9oHUtYaufB+7NY9g9ctbjFfj/h1DwXUrzDltMn1Ql9M814EQWPLmEBg4R7JSzpFQxTmSBMkLvJKOhFHfKEEnv3L/+qw3DuMPzAFH9pIAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-performanceActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAtUExURUdwTBGW2xKV2hKW3BKW2xGW3BKW2xGW3BGW2xKW2xKV3RGW2xGW2xGW3BKW2+P2IvgAAAAOdFJOUwC/gCvzq1RAleURc9VmrA9rXAAAAT9JREFUOMvNkzFLw1AUhU+SxtTahnZyC+IsIeAenDuE/oJQcS/FTYTi6hKcHYpDZ/EXBME95BeURpM0Me39Db4Mgk/u23umcL8kvHfOucBBKEr5eW95xoMjeuBBlyY86NOQBwt654HrPPHAca/YuUHrDQsG9eybBWa1+GLBqvS3LJiNX0vGJw/R0N6LJ+/f6x9I3uwG0D+luRU0FnmdCtBy6ZM7KvQdjgXwJYuNZVNrFfqF8IX+nFm/oBvyS2iZ8OWxgH4u1IZmU4kgfoa5E77c0jwhoTYCbTRFGE7QrXFCveCURkK/2cRBCp2gFYiyWk7Jw4AgXOmQZMAqa9uAeCP+JsViihtb9OKIPtBUuvy8jeqyHRpMhvc5X0W6Lvg60HrPg0DREySOoqQJKRbByRWbExaqlSoVwB0rwCLFwesHquttxhcsa64AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-performanceActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAnUExURUdwTH3G63zE6n3G7H3F633G7H3F633G633F7H3F7HvG7H3G7H3F6xOzy+EAAAAMdFJOUwC/hKbvK0BT2XURZct0z00AAAE3SURBVDjLzZMhU8NAEIX3LiSUNqI1qBMMChFRgYxAd07E4CI6HQwzEUXgKjC4CH5ABAKJyA+oaHqBJO3+KPaYYSZh9nyfyuyXu7l77x3ASSgu+flYX/HgHOc8kC4wwikPMnzhQaTueKAiHvi43bFg0m4OLPBM9sWCjyb9ZsHm8NkwPiUQT8MjfSX/fn+F/C3syJf9YB7oLsDkjIaiHix5QCNbGBmAFPve+3lXi/0viLB3ZnmDz5g2ICry5daAvCbZhSE2oIsFeC35ssJljiQbgZitIY7nIGu4wLG+xBnpL5tClxQhCANR1Q5TSmCCQK7YjftOVbYNUOxot0EsHl0uwHdFfcD14PJLG9W9HfpMho81X0V8MnwdcHvkgS4cBcqVo6QKHQ9B1a6XY1zAcSiIFg6QlXDy+gEd714RcAqEowAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-face{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAeUExURUdwTL+/v76+vsDAwL+/v7+/v7+/v8DAwL+/v7+/v96T4QgAAAAJdFJOUwBAgSCbs9hZap+hQJoAAADvSURBVDjLY2AYRkAJCAygbEZBQUEBKJtpJhDAOJpA9kSYxESgKphuIaBuhASqyYzESjC2hDRilQBZ64BFgm2qMLPYNCwSkQpAwlMBWYIRzJsKYrKCxZSRncKSDFYzBSNY2MD2MqRhSFgqgClPAwwJBxwSbAk4jGKZDCKZp2JIsEOcOx0ztjQDYL5ENwsYJKrTsMSvGSgepzVg2pE5qSikPRPT8sopBuDod0ATZ54JsbZyBrJgAVAp1Ax2oPXMykjxYQaLA2CMoERUZQDMrgBUCc8CKIdzAvHJhyQJpLQLSu0TCaV2lPwBSu0KQy+LAwBuJj5UbruNggAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-face:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAnUExURUdwTP///////////////////////////////////////////////w2imYoAAAAMdFJOUwBAgBvfrFmcw4wrbtGliFoAAAD2SURBVDjLY2AYRkAJCAygbEZBQUEBKJvpDBDAODpA9kGYxEGgKphuIaBuhASqyYzESjBu79yIVWIP0NoCLBIsR4WZJY5gkYiZACRqFJAlGMG8EyAmK1hMGdkp7M4gkus4RrCwBIApFwwJmwlgqsYAQ6IAIrEAwygHHEaxngJbfhRDgg0sxHoMM7Z0AmC+RAPsJ4S5NE5gid8VoHg8sgHTDh/PzM60HkzLc44bgKMf3RKuMwoQ+dNIgswJDAycUDPYjhgwMCsjxYcJLA6AMYISUTkBMLsaUCVqEqAcngPEJx+SJJDSLii1HySU2lHyByi1Kwy9LA4AqflRBKNSA88AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-faceActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAhUExURUdwTBCT2xKV2hGY2hKW2xGW2xGW2xGW2xKX3BGX3BKW23povfoAAAAKdFJOUwBAgRybs9hZLG6hrV9tAAAA80lEQVQ4y2NgGEZACQgMoGxGQUFBASibaRUQwDhaQPZCmMRCoCqYbiGgboQEqsmMxEowTgmZiFViFtBaBywSbEuFmcWWYZGIUgASXgrIEoxg3lIQkxUspozsFJZkEMmxBCNY2MD2MqRhSFgpgCkvAwwJBxwSbAk4jGJZAbZ8KYYEO8S5yzFjSysA5kt0s5YKc6guwxK/baB4XDYB045Vi4pCyrMwLa9aYgCOfgc0cY5VEGurViIJMhcAlULNYF9mwMCsjBQfZrA4AMYISkRVBcDsCkCV8CqAcrgWEJ98SJJASrug1L6QUGpHyR+g1K4w9LI4ALk0RHtSETFcAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-faceActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAhUExURUdwTHzD63zE6n7H7H3F7H3F633G63zF7H3G7H3F7H3F68TinBIAAAAKdFJOUwBAgR+Z31ipwW4yAjb9AAAA+UlEQVQ4y2NgGEZACQgMoGxGQUFBASibaRUQwDhaQPZCmMRCoCqYbiGgboQEqsmMxEowTmmZiFViFtBaBywSrMuFmSWWYpGoUgASXgrIEowgHtsKEJMDLKaM7BSWYLCaJRjBwloAploxJKwUwJSXAYYE2KUMVRgSrAFgKhTDKPbFIJJ5OYYEG1iIfRlmbGkVwHyJBlhWCDNrrMASvxageFw6AdOOqKCklrQuTMuzlhiAo98BTZx5FcTarJXIgglApVBr2ZYaMDArI8WHKSwOgDGCElFZBTC7GlAlvBKgHK4FxCcfkiSQ0i4otS8klNpR8gcotSsMvSwOAIs+RIlIrewIAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-object{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA51JREFUaEPtmT1oFEEUx9/bnRALGxE70btkZjcR7QMiRisRbCzEQvxCLGyEhCDRBC/RoNaWFgYLFUSwUBAUDKKFFqIQ3OzNJpfCyspS8HaejNyG87J7t7N3l03gttydefP/vbcz8+YNwhZ/cIvrhx5A3hFMjEAQBDwMwzOmAi3LWhBCLDTr5/t+ycSubdtLnPOncX1iAfQAlmXdNBmkru2RVgBSSspg+5kQ4lRjv1iAIAgqRFTIMIju0i2AWNvrAKSUowDwLqP4tACm9rWmbABCiFxXKimlhu0BtPFHtdc19wj4vn/Wtu3XnPOfWVByA5BSngCAuwCwryb8Hud8EhGNltANB/B9/5BlWXcA4GCMx/8g4jjn/H7aaGwYgOd5BxhjcwCgPd/0QcRVAJhM2l3rO3cdQEq5GxFvEdH5VsLX7aKIH8MwLLmu+zapb9cAFhcXt/f3988AwJip8Jj2L2zbLg0MDHxr/NY1gCAIpohIJ2V2BwC0iUd9fX2lQqFQ6cQvtJbICSGOxHhlVOdKjuPMl8vlqzrxI6IdWUAQ8Um1Wp0ZGhryiYghYrUtgDQionxJT0al1IwGkVJeBAANvieNDQB4joglzvmilHIXAIwrpX67rmuUamfKcxoTvnoQ3/dP27Z9g4j2J4C81KBCiC9LS0suY2yMiC7rttoZuQBEQhsiopfT6wAwUvv+hjE2XSwWP0kpRxBxgohO1kPmDhAHEgTBUaVU1XGc98vLy8eVUhoqbpPLPwIx6/wqEV2ovX8AALzZ/Ng0EWgQGa1iLQ8xPYCUyx8YHjt7EWjm2I7sAy0it7ERqNWEDkeiklIJg8pFWwC1ZC6SM9NYc1oXgcaiVlxVYmVlZW8YhlMAcCnFvOkEQPqqRBqASLTneTsZY3pjapZSpwF4Y1nW7ODg4Ie202kTgGiwSqWyrVqtXgOA6Zj0OhGAiF4R0azrup87dqDJAlA/eLlcnkDESQCI0us4gOdEdNtxnK+tfkHjA027AJEgKeUVANBROVd7p3fixwAwJ4T43kp4nR2zylynAOoE/JuAiPiDcx6kFb5pAEwF5zKJ2xXZrH9uc6BTUD0AAGh639Xo6bjUI+G/NglS+p3Y87wCY+y/2ozJSGkuRDLekQFjbEexWPxVryfpjuxhllKhNtwtAESc55xHx9M1hsR0WlcOlFLHTLyv26Ypi5hesyql5oeHh3VBeN2T6TxgCtXN9j2Abno3je0tH4G/KbtRT7VUKs8AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-object:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAwd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size:100% 100%}.jb-pro-container .jb-pro-icon-objectActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA9JJREFUaEPtmU+IE1ccx7+/N7O0BwUn24UeRKOd7LalvS+I6HoSwYsH8SCtLf1jEqWoyLJVMfEP6nlNIgi6eFChCB4UChaU0h7aQ1GQrnFSdw9e/JNs9LTFzPvJZI27m8xk5k02m13I3sK+33vfz/u9N+/7fo+wzP9ometHF6DTGfTMQF+mYNqwd6sKlFLcK++P3WsWF8nkUyr9stAeTcXN624xrgDVAUgcVxmk1lbaGPIFyFocou9fSonYzvo4d4BsYQLgaIhB0EYA174bAFaNWpuFhrthxDsxQQCMrKXUPwGbvfr2BSglYh39UjmwXYCwy2kh4jqegd5M/itdaL8+i5vPwwB1DMDIWNuJcBbA545wAs4V4+YIiJQ+oYsOYGTzGwniDIANLjP+hkCHiglzNGg2Fg3AGB3/Ugj9NBO2+4ujSSaMeJ2uc+PbDhC5aK1GhU6CeY+/8IZz9E+CnSomBn7zim0bQF/m4QqbPkgDOKgufH4EAzdZaKny3vUP6vtqG0BvtnCUwY4p01oFcOIZuCJ7elKvvo9OtLyESMN7IzeViA3VC3TshiY4Wkz2j0Uyj3+aMX5shAIhuia4kn6Z+DSPu6xjiCotAQQRMeuXaJJYpqsgOetbcBV8TZA+ANxgotRU3Hz48SWr7800DjHL6VJyQMlqh/I5jYZvFsTI5XcRa0cA/sLDv98iieMv98X++Sj7aEBCPwjwD9W2LNMdAqhJnQMyc5D9DGBwRhzukK4fK/647q9I1hoE6DDAO+ZBdh6gEaQ3V9hi27JS3tf/u3Hhv20kpQPldsgthQw0fOcnpc3fVK2EhosEmE33x9LJwKxM54Lj/Ap0SeoCBPz+qVw7uxnwmdQFOge8R1n0DDg1ISaxqSbJy0oE2pTvqhStbOK5FQy2ka6vOTVkoL6o5VaVWHX+yVoh7KMAvvPbNq1mQNmNBgGoiV55fry3R+jOweRpqQMBMO4wxImp5Cd/tGynVQBqg0UvT3z4eroyDMaxenvdHIBvE/GJYnzgb69MtjUDboMa2ceHCTQCoGqvPQBuSOZT5WT/fb8luOgANUFGxkoQYVja+Lq2iQm4ygKnS3tj//oJf9+PamUuzBJqJsY59Jz/9wh6+iJpFoIKXzIAqoI7solbFdksvmN7YKGgugAMNH3vqp9pN+vhtq5VMqT2PpAbjwrW59VmVAYL8iASCfdGBvm/bpQPrCvP1eP+RpYrXA5XKgTaBkA0Voqb1eupL4DToFo5YLlVZfadtkHKIqrPrFLIsXL8s0k3LaHuA6pQ7WzfBWjn7Abpe9ln4C11Qo9Pmb2aMgAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-objectActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA8hJREFUaEPtmU1oU1kUx//nvthx4cJqX3RgGLsQBNG1tq8Z7axkwM0sxIX4hbhwIygibfPMeyapunY5iymzGAURZjEDAwoVm8SPhSiIKAjtQtAmiooLiyb3yEtNm76+5L37kjQp5C2Te879/+65H+eeS1jlH61y/egCtDuCNSOQyH3cWirNHVIXKO6kYvqdenbxqVlLxS8J8Txp6Ne9bDwBnA5IiIRKJ5W2LDHsB2BmC6zqmxk3UkP6AbedJ4CZfTsNcL9qJ077VgHU8r0MID5V2EsCk2HEBwbIFdT8M/aGBkgaelt3KtOB7QKEnU9NsGt7BMyp2cOa4P8tY3M+DE/bAC7cK+xnxmUwtjvCCXzFHtRHiEhpC11xADOTjwG4BCLDY8S/MvhsyoheDRqNFQMwc292QmppEPb7i6MZgEdqna7V9i0HSNx/95MscRLgo/7CXS0IWS6VrFRs8+1ati0DSEzm18kesgGcURa+3OAfSGklY5ueuP9qGYCZzceZySKC1gQAgPkvXtNjpXatn258CmlYSOSSg/qwW+B8usH9SSM6Ec/lTxM7iR/3hgEh4Jpk2Kkh/UVikiP2MBUbAggiYjFfchajtB0QM/fuOFg64D8H8QHQTQ3CsowNT8cffdLnPn8+KyXPpWKb1FLtYJ0tbbU84asCyRYOEmiMwTtq+P63JJAYH9AfxTOFbUTlNXRyPlmTdpsAKlIXQZyDDJJGGbx7/l++BSHM5EDfg7HMm91CRM6B+fdqyA4AWA5iZd/++hWymDaid+OZ/G8EGgXB65DrhAi4Jw3NsORj5VRC4A8AW+tN2Q6KwKJM54b2HcD3EtMFCLojqVw7uxHwGdVQ992OjkC5JqSJPRXw2qlEsMpFo1OonMx9/7gE211z8iirLC1qeVUlxrLvtwgU4wBO+K2bpgCoVSX8ASqiRx682hgp/jBaL6UOBsC3pMTFdCyaaUI6HRyg0llicnptqWfdeTBMd3pdH4D/kyQupgf7HtaKZIj7gDpAdefxzOw5IjECoJxeewEQ6CZBpmwj+thvCq44QEWQmZ09BYjzLHFk4SQm/C2KIm3/svGZn/AFP+qVucYi4BbmbLnOb5rGr+zB6MugwjsGQFVwWxZxoyLr2bdtDTQLqgsAQt33LvdIe6UenvNaJUQqJ3Hi3ut+KSNLajMqfQV5EAnzRuZoEF8ivfZw74dqPbXeyP4MVSoE0DoAmkgafeXrqS+A08CpHBDTPpXRd9oGKYuoPrNqETlhD/w446Ul1H1AFaqV7bsArRzdIL5XfQS+AaeCtE+rbksUAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-occlusion{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAACCVJREFUaEO9Wn2MXFUVP+e96X5oa9UoYpUszrzzZlqLKDYhgAFaaKU2+M2W9Q8TNUQSQEsiRUjFVaHGNmoBMTUmaPwD2iIhqKR8WEBFGkLFUjbtzDtvpjYrVhpCXAtm1867x5zxvnXm9c28mR13b7LpdO65557fveeez0GYp1Gr1d4VRdF7lL3rui/n8/lX5mMr/H8wDcPwIgC4QkQuAwAVWv9eA4BJy/8sAHg7ALysf4i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O+K3hWvvZJvb2ensoqCwmgq7KK1eGttnuyNqsSvVAAtGINAE9oF6hjYUsB2EaG6vWx2La3U96FAmAt28jU1NTqZOMjtbhrGxovZJXVFwJAXGYHgPPS6lVtS+dxY6PT41wIAFpe79To6Fj7j9PCdmX2TvF6vzYzLqtrgyX2MWk8M5sXcaNDRLQjeft8Vaxj4bQSLSJbEFHjsraNjZg+E4AS2obHTzRb0kxsvirXVm1vBoAT9Xr9y2kNjeQtdAVAF9kQW5PseW+zzszMjCcbGe1UsmsAMYOURveTc62nap1TRNYsSKM7eQIaO7mu+zkAWAsArwPA45oXdPNTAxutaillsTqoKIruW7CfGqRdpRaHReSj2lvo8scezyDiY1qc7dda9axC3W64UD+3+Q/fZENVhTDr2gAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-occlusion:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABphJREFUaEO9WmnIVVUUXSuiuahopOLLIqTBBgtCC01Ty8JmS/sRVESBNgiVJVZaaag0WBlGYNEPrSyiQdTKskEjpNKSCBqlzAqJSAsbYMV67vt13/3uffe+93pvw+Mb7rn77HXOPntY5xEdEkkHAjgk1G8k+VMnpuL/oVTSaQDOBnBmGG3DfwHwXeg/DMC+ADbGZwWAZSRXtTt/ywAk2eDLAIwAsAXAkvjY6O9J/pk2TtLOAA4FYDDnxmdPAG8AeJbkslbANA1A0gkAbgJwKYA5AJaS/KCVySWdCmA0gFsAPAfgIZLrmtFVGYCk3QBMDeNfAjCb5MfNTFY0VtJJAG4FcL5BALiX5B9VdFcCEBPMB7ALgPtIPlNFebNjJI0DcDuAbQCuq7JApQBC6SIAiwFMJPlzs4Y1M17SAQAeBTAWwPiyxWoIQNJdAKbZbUjObcaQdsdKujHcaTpJ25ArhQAkDQKwmmTpLrVjrKQdANwJ4FOSL2R1SRKAwSTfz5sn1zhJhwP4BsAokq+3Y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zKjX1WNgMYRnK9pAsAuAxYTNLRxu+5l1hYYGRuBGoWkCQzgu4L7kjOgP3WodRRIAGQGJen33VLch7GJr8HAIdCh8Q8yW3MWwDwWS2EkqvS/YBJ2UsyvehHAPIO3QSSj+VNLMkJzKRUViaTdNHYlgSf+jxJk8R1DY3byQ05GS/vMNaSSvii/VEkaxlUUjr5JMY6gt3QluX/eYZLlJ6k+KvUUkpyqj8+OirH300pALWiLSHAJJnVMK/kusqs9RqSTjptS3C0+S1lrF5TTX266uw0gxf2FTf1McDkUWVapZsAKtEqAcIu4FJhZBkT3S0AwVib4lxCspjYCgC+yLBf+0DXYnuRdBGAI5trK+efuouPInLXodMhtCGt3g0AKZp9YB5f1Yhe923JokaHs0sATK8XXnSUXXAkbWEuzd6oXm83ZkpKaPVpSY7J01l6eZFcdESX5cu3jjDWiXHBRLvpcV1WeLGRjC8FEAfbienx6JZmdZC5tttOBuBkeW3ehUZ2FyoBCBAurWv3ZdEPd/Ka1W5Td5FR5JKVAaS2OHvRbX6mJT41eE5TM52/6M6uQNDxlzvhAdga91gusat81cDVquurPQA4QS3s2lcN8rYyyOGzfLdQ8cseLsiWu7NrN1o17UJVJ+zW123+BfogD+TkdLQFAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-occlusionActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAACItJREFUaEO9Wn+MVNUV/s59+wOqyM7bFaxAsDBvFqnWak0MYhBQUEqUVssi/aNJawg7bxaKScFqqKyt0gip4sK8XUKqjX/IL43RlqBSxLZWYqwWdWNh3oIlFClkebMUaXfZefc0983MMjv7Zt7MLrvvn93MPec753v33HPuPfcRhukZt+3YeCndCQpeCO3kmWVTTg+HKbocoKHWjpnEuBfMd4GgnJ7ADAcCJzx8iUlE0AGcBOMkiPYz4c1kNPzXodofNAE9fvheQCyBoLvBOA/wHunSHq7CiXM9+Bd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W0yYSZBnwHxKEc3dtGUbYF5Xg/k6CNHDTB9o4A87zfBHl8P5okfKNLvyDvV+BC6Ho4Uwih7qlVK5bZWRJFBSWyUTw+sJtLCSMC+oEz1SBNIda+xj8J6ijS1FQF1kdLtjVYE6ns3thaZ0pAhkMtvkUdq5OfkXHwWau96FxsdBbfWRIJBts0vCLX79qoKt8+zFRrH2+ogQsGwudtFR/IIjeyws0GYvtl8fajbKttVBaM7WGD/MwMuL7EUHwBuRoqeGq2PdV1C9TjSvBWh1sYuNrHwgAS+9pi88tgIYx0TPDFfnOhO2jwI4Iym13O9CI38WSiLgKe1qrwp1VjePxDVrsq6nOf8io1BIlk4gg5B/0S01emew/VSvz+ny3BG56M5/A6odz6T9kIB5DHwFxtsssbuUTw1IYDEI8wm4koF9xO7LI/apgd9UquYwS74HzHeU+LHHeyToLdWcHWq2KjuESjU4Up/b/B9u0kgtWdqPkwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-occlusionActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAACJpJREFUaEO9WntsW9UZ/33HaZJCX7S5TmhalQ1NaAzGYJUgvk7pe5QKusGa0v0xaZvQkKBbK60BWl/b8XWKaLWtUJg6IcG0P+hrCMHWlcdK2OLrFPFYGdU0ac+q9BHfFPoC2sQ+33SufVPXvfa1kyaWolg+3+t3zznfd87vu4Qx+nQfONc8yF+0KvP1NPHoxjsm9Y+FK7oSRo2+fh0I3AUpFwHUyoxWIv6EiI4o+8w8m5mmE+EowEchxH4g95rZ1myN1v+IAUR6M3eRwCqAFgM4C8ZeZuyFmHDk9OmpH2+7my4UB7fmj9wwderpWZBDs4mwHOoPmAzwn1hiV7I9+NpIwNQMwOjtvwWC1gLUwVJuIfA+s73lnZE4N3pP3M6gZSTEeoB3Q/JWs735w1psVQ0g/t6xq+T5uogkrCXQKyDebIaCf63FWTlZI525F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ZgfY9UG7qQ28tN6XgBUJlNCJoj6gcXlDY+PMndwmb5wI9WHw8ALs0O4tu8+KoK9Hq+sVGJXh8PAHl6vXyjo3KDo3AtLEezVzqvjzYbubQ6A3G3xpQ5nlR25TY6iLGF6kRyrBhrNwrFRHNWRpiwvlJjw5WvqvuSb3gEfs2gIAFPjhVznU+VeJTAGSFyP/ZqaJQ+7qoAKCXV+OBTdnw82qw0TYuXNjLKrZOqAbgGShvdLOitkfKpiuckyQvHpdFd+gQUHQ9B3yPGEhDOAfwGS9pT1asGgldCNTgYk5igCtSL4/aqgddUKnIY4G8xc7ialz2IKAXQ64qcHW22qnkJVetwvF63+T9nAHfjRfzL0gAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-logSave{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA1RJREFUaEPtmT1oFEEUx9/bFLFKJzG2WiknZObFxlO8RtFC8SuFWlrYGBtRRNCghV9YmFQWgoVaaAS1ULRRRKvbmYBBQezVYBOIGFMkT0ZuYXPufOxdspuDO7jibmfe/H/z3sy8eYvQ4R/scP3QBSjbg8EemJyc3La4uHgUETcx82YAWNum+N8A8IWZrxLR41ZtBQForUeY+Xarg/j6MfMVIrroa5f13AuglOJWDLfQ56aU8mzefk4ApdR9ADiW12ir7RFxXAgxkqe/FUBrvYeZXzQbY+bh3t7ed5VKZTrPQM2eNHYQ8VGGjTtSypOhtq0AcRyPIeKptCEppTfkbAM3AxhbcRwfyYJg5nEiCvKEVZBS6hUA7EoEIeJ+IcTz0JlpbpcFYNrYIBDxlhDijG88lwd+IGJ/YoCZ1xPRd5/BUA/Mzc31VavVWRcEM18jovOuMV0eWLL7tBM+RoBS6isAbEzERFFUHRwc/JD8dnjishDikg2iSIAJADiU8uhdIjqRFuZYEweI6Gmuc8AWs6EhVK/XR3t6eg4zMyKiEQ/MvOSwQsS3iHhhZmbmY61W++UIp/dSyu2FAmit3zDzTjMoItaFEFuVUt8AYCB0ElLtZqWUfYUCZHlQKXUQAJ60AAC2Nbhia8AWglprAoB7jYQwmGXVACSKzRqJomgLAJjvBh/JqgPwCQ7dRAoPIZ/w5HkXIHQGQlOHvCd56PjdEOpoD6TShT/MfD19OXeFQCPnOYeIaxYWFiaGhoZGQ9Pv5nZthVA6XWjkOsMJRGj+b/IhIURtVQCkIUJvYKUCONLf/+67tjuw+T+rLlTYLmSDCDmwbOIbF6CgC1Vba8B3m3JBuMQXDuC4iGQy+MSXAhAKESK+NAAfRKj4UgFsEHnElw5gBGit9wFAUqy9kbco1vY2Gsfxsha2QrbV1K42gIimAPDvw8zTRLQuy0ZhpcU8AMZ7zPws1ee1lHJ3LoDlLu7mAcioZFuLvYWV130AU1NT/fPz8zuyqtWIuFcI8TKXBxo7QaEvOCyQD6SUx20T4K33F/iKKVOj7yrqBWhsiSv6ki8zNBBPCyHGfKEXBGCMrMBr1mZtPxHxEzN/jqLoYbr07oIIBvDNRFnPuwBlzXwybsd74C95KWhPrxIhsgAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-logSave:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAthJREFUaEPtmTuMTUEYx3//TrWdeLRUJCrReISGUBCvLVAqNGiEiASh8IoClUKyBQqPBAWhsREqnYRE9NgoV0T3yci5m9mzc2bmnHvvOXuTO8ktbs7MN//ffPP45hsx4kUjrp8xQNcezPaAmW0EDgFrgLXA0j7F/wG+AlckPW5qKwvAzE4At5p2ktHusqTzGfUWVEkCmJk1MdygzQ1Jp+u2iwKY2X3gcF2jfdS/I8l5O7tUApjZTuBlwNIk8E7STHYvQMCTzs6jgI27ko7l2o4B3AaO+4YkJadcVcdlAGfLzA5WQGR7IgbwGtjuCdoj6UXuyJTrhQBcnQjETUmnUv3FAH4CyzwDKyX9SBnM9QAwIWk2AXFV0tlYnzGAebtPP9OnEPkNWO2J2STpQ+9/xBOXJF2ogmgT4Amw3xNyT9JRX1gEYq+kZyGIoQGY2UXgAPyPt5x4V8qH1TRwDvgk6XdkOr2XtLltgLfA1qLTj5I2mNl3YEWDdTQraaJtgAVryMz2AU8bAFC1Boc5hYKbgJmtB6aKgDCbZdEAeLuOWyPrit+qFMmiA0gJrjr4yu1an0Ip4Z6Hss6hMUBu6FD3JB9PodwRGGkPeOHCX+CafzmPDUAR85wBlrgwQ5LbUueV3AHsaxGbmR8uOAGTPYga8f+0pG2LBWAOosYNrFOAqith6L5bdQee81optG7nHIjE8DlnVlB8EVa3AxCJ4VMAleJbB2gAERXfCUANiKT4zgAyILLEdwoQgcgW3zlAIWA30EvWXq+bFBvESTzQxFZqSyqdAe7i7xIAvTIjaXnIRmupxZoAznvPvTZvJO2oCzDQ5G5NgPKbRGWyt7X0egrAzFwedktFtnqXpFe1PFAsxLYfOEIaH0g6UjUAyXx/i09MQY2pq2gSoPDEsB/5QuJPSnLrMFqyAAqIQT+zloX9Aj4DX4CHfuo9RpANkBqJrr6PAboa+V6/I++Bf0in3kCazcMZAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-zoom{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAkUExURUdwTMDAwL+/v7+/v7+/v76+vr+/v7+/v7+/v7+/v7+/v7+/vxtcv/AAAAALdFJOUwBVdZCpGdZE7C3B0wnY6AAAAV9JREFUOMt1lDtPwzAQx20ghGwVsHVJhQRDlsywWKqEULsw8FhRJ2iWiglGGJvFCw8xIVVCSEwkKU25L4ftpOHs2Cclsu7v370smxCLecRh+xOH8Ja5kGEs/6dtYf1XONcWZurbwwRCQjYZ9l7uHAPAOBHpI1QC/QSY9g84ldmnAn7Z3htwsfZnvSe54eJd5hlcC7gccxTwSETZEr5+714vLRdfkFraVNtetXLpR7ha+mkHCV1Y/q8ZOW8AgDkecsIaAEIcGbIGyLUq4KcBYl0o7QAB4FZACBMrQKpaJOCZQqyAIhgayYEpgD1DZghXCvBTNJFKmCvgzmhcCEsBwMjSRx6BslYftRX0JLYKrAsLqzDC54EFMwvy58QhMM8hFNq0UpwET+sLC9/4BmEBTytyRCIbDoAEiR1Qp1dbRxfoyv9g3ogaKVuXhVZZbtqX6Ez6H23PxG4CM259QDwt/h8ABfK8nDqSAAAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-zoom:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAzUExURUdwTP///////////////////////////////////////////////////////////////8/RimEAAAAQdFJOUwCCyreU7KZVRCDaZnETLwj6WaYVAAABUUlEQVRIx5WV2Q6EIAxFoVBWxf7/184AOnGUsvTBqDmXrqRCzNou1kwGtyZIQNuiD0P6evWTURFUMtIoPO+iVoGIZPkMqkdKA0jZgoJ6suQc2EoiGBldOoQ9HSDk5+GTs1Fqo9IlcEpvNv3qv0MBhSalIFSv3+MCJCY8fUaCxasycrMu9dp5VTUhubXZ6CqsAvn66ZAsx+e8fON37oT3bZ4aiRU0kDlavGSrQI95HPBZACt8FuCL16IruBVkzBeBW+CLYHvyfiDQd96IpHpOMqP++fAq9VMQ7rwrM5+6gjwG/3y/D/m8ylPYpvpAeqO7DfvwMPO9D6jnBabG56YFZx77fEjD+9AyLdYEhp8nxoNh5wmJtfY8AS+wzIZZrJNcC4h3wV8IH1p87Iyfnc6XVaAd7ICHAsebw97zgDSxZ/yvViiPuYUfTe650knM2+7Ywz9yOCklzohLOwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-zoomStop{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAzUExURUdwTP///////////////////////////////////////////////////////////////8/RimEAAAAQdFJOUwDjmTC6Y0KBVakX8s8iC3JYR1wyAAABVUlEQVRIx62V2baFIAiGcwJRS97/aU/Zbtht0VzrcJOuvl/AAabpXy1RF0F/m2h2PX5mzucEuO9gMon1MY7KlG8w4LImC1XFQmxDGVkm1DYpXi0qS1gXTEGzKoqNS1ajAxPqJDikFLcFS+aukYJffRfXnAj9kYUXFVi86wzzPjuCFRXBwS3KaC/Pt02Ww7uf1jz3BVYtX/OsyDQFDn7yswPXb+Ovs39eJJWwxrOXV4thgC+//QBf/uMAXwAa4AuRBvgdWR58CB2B+eaRG5e8QO7Jn2sIAvzhbdsDnXzev8q0BengGXv8EciH3y1CY5++yI/BRNx82g/La7lc7b0Am/tUC6n3HoZ4SbDyy5BgzSNivV6wbPXeIPOpHlOU+CjkTQKvQOpXdRdJvn+5xttWQa4EZUOzluonT6+q72X6Zb0+T/lNhQd7hg9vm8LWUhW5gT4iN7c/0ZUo8Q3AttYAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-zoomStop:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAqUExURUdwTBKV2hGW2xKW2xKW2xKW2xGV3BGW2xGW3BGX2xKW3BKW2xCX2xKW2yDN61kAAAANdFJOUwCAVKxm3T/DmhrxKw97YQBGAAABaklEQVQ4y2NgIA6wGqCLMCqAqV4HdIm9F0Ek22UMM9hiG4AkVzQDA+cmx+YyJJnDlw8wMNQaNpfevbu0QgxJgrN3JQPD3VvhjU57kESnOZqvvXuJgcEXxVFMEkDt1w11gZYwoVgue3d5SzaQSgCydZG1TMkBU8vBuq9guBcqNBNDgj0GQrMEb0CVYEmA2ViANRQZ795tQPZduADciXcVUNSthGu4hGrAJawagBIXsWoAClzGqgEocRWrBqDIrQNQDTPRXZ8A0cB41wBNQgGiQfbubTQJAagGDB0GIA0OsnevbkCTCADiu4J374ahW34JqAEIbiXMRJOAgkvMKJYgJBx6717AKiF4F4eOu+jxgQCXGHBIKPDgkBC8JYCURJDtQHYWN4oEcvpZiyR+C9lZtkgSKKG1CyGOGrxItleixjrcLFBWRAYcMIkG9NQMiY67N7AlcxAQwMwA6SBxM2xZQ3jtVRPsRQ83sg8ACMIUxzzE8wsAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-close{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAeUExURUdwTM3Nzc7Ozs7Ozs3Nzc3NzcrKys3Nzc3Nzc3NzePZJxkAAAAJdFJOUwCtKdPBGAmNTt3jdDcAAADfSURBVDjL1dOxDoIwEADQgwR07GTCZtI/IGHgAzBhM9EPkMTB0Y3V0ZXIcn/rtRR6pefgSKeSu3ellyvA9lZ/5F9p/3K7PZY8oPG5BD6MpPUSgIITzdIStifAshjRQV1PCFT8TxaicTzzwEwINOEdHVmDmcTAkRhMhMAp7iQRjcMtDhCp8SA1v0ARGIIK/gnkv0p1OBTS4QRUIpE7DiYYXTBrzcld3JIrAarXrps4AVNwRSZgExoJmIyAaAdsShUMn/JF2fh4YEkpAcgvnuwYCIb6EbbbP4PsDfLD2dD6Av1qTvAQlzUTAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-close:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAeUExURUdwTP///////////////////////////////////8kBMKEAAAAJdFJOUwCt0igUwJdJePGbgLgAAADcSURBVDjL1ZMxEoIwFESTCaOWFDapqeicnAALTiANnaWlnVewDTMW/7b+aCAb8jkAVIHN2/lsNkrt73lf8M08nnF1pAYFR/dFmAAx7SIoi4iDbRrWDMAuQFzmmxAGbjjJgjj6dCjMCAND/o8RWQMzUgIRKYE/wsC5TJIRR74rBUZaqqXwLZEXT0WTDGwLW1aavJWQir9qadw++NgykWoMNtcykh8Q5EECgr5C+jjpGjHjPGhPU5eVzyfPJitfnUyhPg6ywMKZ7BygcYcsPCj1Kc8uXYPqpeSLs6PnC4w8S+8OJ9MLAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-narrow{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABm1JREFUaEPVWWuIVVUUXmvfYRosHzUZUUqKjkSXSe5Z+5qJhfawLELCR5ohPhKjjB4EWgkpkopRSWEPS1Mqy7Gkd0iPGaKy6ey9Z3z0opwEQytSMiS5NZ4Ve7j3dubMOfecO96buf/cx17rW+vba52919oH4RQfeIr7DxUjoLW+BhHHAsAAZh5gPwGghpl/TKVSHZ7n7T9+/Ph+ANg/atQo+1mRcUIEtNYzAWAiM09ExLPK8KgNADYw8wYp5Z9l6PUQ7RWBvON3AMClJ2Kcmb9DxAKR33qDVRYBrfUNzLwQESf0xliUDjPvR8T1RLSsXNzEBIwxc5l5fYSBnxGxxfO8bQCwN5VKHc7lcofr6+tzR44cGcTMg4UQgxDRfp8IAJdH4KwlooXlkEhEQGv9EAAsDQF+GwDWEdE75Rg1xlwFADcx83QAOCOg29SvX79ZDQ0NuSSYsQS01h8BwBUBsF45HnTIGHMBM9uFmR2Ya0bEWxzHORBHoiQBY8xmZp4RAFlNRIvigMuZN8asYOb7Azq7hBCTMpnMvlJYkQSMMUuYeblf2fO8ZdlsNiyVyvE3VNZ13XFCiGb/JCK+6DjOrLIJ2N0GAN4KKG4hIpuzVRtKqf6I+HvAwAIiWhdlNDQCSqntga3yUy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7e3ne563mplvDoIh4le2xC+VurEE8pGwh1m3/sBec3ie96iUcndvWLS3t4/o7OycK4SYw8znRKZIDIlEBPIk7IrfGDB01JIAgJZsNtuShIjruplUKmWdtidsMLK2lFmFiPP8fUapSCQmYJ2L6cDsNfh7iLiXme1VjG3GOwFguOd5DYg4HAAa7O/Q3QTRXiavchxnhzHmIgCw3V6xWYoiURYBa9h13atTqdTssJxNEoEImQeJaIV/LimJsgkUjCilLrGXToho33mFrmoMod2I+LLneW9KKb8Nk01CotcE/AaVUmOFENcz8zgAGAIA54Y4dAgADiCifejtjcQnSSIWRgIAniIi+5q3cm/q/c40NzfX9e3bd4gQ4kxEPFhbW3sgnU7/lcThJJHwV8kViUBvHStHz0aCme2qe7W1tasbGxu7rkFPGQKR50Q5q/B/lP0HjgOoT/ydvaYAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-narrow:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABS1JREFUaEPVmgmoVVUUhr+fosKC5ogGSsqIpKQwMqjIBpsICdMGQ7ISo4wGApugJCoxLClssElpNEuaI5okKjOI5onKhEQrSiKiaKA/Vu3zOu+8c88593qvj7fgcO99e6/h33udtdda+4khThri9tM1ALaPAQ4Btso9GwNfAyuBb7JHUnzvCq0XANuTgePSs00bFr0L3BuPpF/b4BswtSMAyfDzgYPXRznweQ7ID53IaguA7ROBGcC4TpRV8IRL3SNpVrtyGwOwfVYoaaHgW2AZsBT4CliXnt+BXYBd02d8D5c7rIWc+ZJigRpTIwC2rwauKZH6NLBA0jONNQK2jwJOAU4FtijwPgpMkRTga6kWgO2XgSMKkjoyvGiN7d3SwpxZGHsVOEPSmjoElQBsPwScVhAyR9LMOsHtjNu+Hri8wPMBMF7SqipZLQHYvgq4tsA8S1KZK7Vjb+lc24cDsfJ5ul/SlLYBpGjzVIFxsaTw2Z6R7S2BnwoKpkta0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MabLUg2gKQQBydSrwyn63dgRYTrpQUdwR91BRE2wAyDbYPSk2nuPOKVW6X4t15EHhS0mdlzE1AdAygsFpxwX0CEJcUuwM7lhgULhW5VRgeHYnXmiBuAeI2SXHN272b+gKgzRKQrYFIBNdI+qOJwQ13oi8/68oOdGpYO3xpJ2LV/45zI/t3hSEDoBXYIQ/gH99H3EBePlczAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-expand{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABvJJREFUaEPVWWmIXEUQrnqzZseYxGM9QBNF4hrJEDfzqieuAY/gFRXPyMYbzUHwQBQUzx+KeBAJKhrRqEhEQWMU75AYXREPlunu3bjxIDGraIwiuJpFkL26pMK84eXtm3lvZieGFAzsTtf1VVd3V9Ug7OOE+7j/0BAAnZ2d2UmTJl2cyWTaAOBA+TDzgYjYDAB/y4eZ5fNjc3Pze7NmzfqlUYEbFwBr7TUAcAEzXwAA2bROIeKnzrkNALBeKWXTysXx1QXAGHMVANwEACePxzgzjyLi057nrczn81vr0VUTAGOMRPtmRDy7HmOVZBDxL+fcyr6+vgc7OjqGatGdGoC19hZmfrKC8t9LafEWAGzLZDL9g4OD/S0tLYM7d+6cyszTPM+biojy97kAcGoFPV8ODw8vbG9v354WRCoAxpiXAUDyPUrvAcAqIno/rUHhs9aeCQALmflyAJgUlkXEf5xzp6U9G4kAjDHcKMejeqy1xzDz/QBwXYyNViL6ISkwVQEYY74AgLkRJcuJ6M4kxbWsW2sfZua7ozJNTU1HtLW1/VFNV0UAxpjlAHBHWNg590ChUJCINZyKxeLpnud1RhSvmzJlyiWtra2DFS+AuAW5bQDg3cja60QkObvHSGstj588fGVi5heVUktqAqC1Xh+5Kj8nolP2mOchxd3d3ec55z6I2JpPROvj7I9JodIj9UqIebNz7qJCodD3fwAQG8aYhwDgnpC99UQ0Py2ALyMv7DIiWvV/O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qJxcJik6NQGhWzfD9yYMI9ucKqkGByXUtVo8ceSOmecpE+6jcB2XsqEiFmS5reSVQVgNNBbeyeMwioxSh8w2Y6GPzJ+2os0+H4OxPtr6rqVzbbtMcBXJZpGkTVf0qedoCjifCSpq4B9WvBoCaISQDC2PQKIN5GPF6MqjCuOsqOpn6bK2R5fKB3K75QpHpPouUAkvrTPaAqiFoACRMxpwuqNniE3WsxrXk++0EQzHr3rwVGSZP+WGTymD3MlrbEdLerzdUDUBtCQaDvSeXyQKPPZTrwpztwuKS1h4tZrgWgbQALkaOCy4hNrn1FHTRTxdmKQ8LKksjdWC0THADK/jtQ/BQhQBwBl7Wi4VNRWoXhMJN6tA7TJTSyQFJ95u/OlPlfEdjzOALI7EIVgzEfb+nyaGSh3p4h+Pd1jV26gjiUHuqe4ibD6eklRqvfQkAHQzABDHsB/7aMVT352GH8AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-menu-icon-text,.jb-pro-container .jb-pro-quality-icon-text,.jb-pro-container .jb-pro-scale-icon-text,.jb-pro-container .jb-pro-speed-icon-text{font-size:14px;min-width:30px;height:20px;line-height:20px;cursor:pointer;text-align:center}.jb-pro-container .jb-pro-speed{box-sizing:border-box;text-align:center;font-size:14px;color:#fff;width:90px}.jb-pro-container .jb-pro-menu-list,.jb-pro-container .jb-pro-quality-menu-list,.jb-pro-container .jb-pro-scale-menu-list,.jb-pro-container .jb-pro-speed-menu-list{position:absolute;left:50%;bottom:100%;visibility:hidden;opacity:0;transform:translateX(-50%);transition:visibility .3s,opacity .3s;background-color:rgba(0,0,0,.5);border-radius:4px;overflow:hidden;width:-moz-max-content;width:max-content}.jb-pro-container .jb-pro-menu-list.jb-pro-menu-shown,.jb-pro-container .jb-pro-menu-list.jb-pro-quality-menu-shown,.jb-pro-container .jb-pro-menu-list.jb-pro-scale-menu-shown,.jb-pro-container .jb-pro-menu-list.jb-pro-speed-menu-shown,.jb-pro-container .jb-pro-quality-menu-list.jb-pro-menu-shown,.jb-pro-container .jb-pro-quality-menu-list.jb-pro-quality-menu-shown,.jb-pro-container .jb-pro-quality-menu-list.jb-pro-scale-menu-shown,.jb-pro-container .jb-pro-quality-menu-list.jb-pro-speed-menu-shown,.jb-pro-container .jb-pro-scale-menu-list.jb-pro-menu-shown,.jb-pro-container .jb-pro-scale-menu-list.jb-pro-quality-menu-shown,.jb-pro-container .jb-pro-scale-menu-list.jb-pro-scale-menu-shown,.jb-pro-container .jb-pro-scale-menu-list.jb-pro-speed-menu-shown,.jb-pro-container .jb-pro-speed-menu-list.jb-pro-menu-shown,.jb-pro-container .jb-pro-speed-menu-list.jb-pro-quality-menu-shown,.jb-pro-container .jb-pro-speed-menu-list.jb-pro-scale-menu-shown,.jb-pro-container .jb-pro-speed-menu-list.jb-pro-speed-menu-shown{visibility:visible;opacity:1}.jb-pro-container .icon-title-tips{pointer-events:none;position:absolute;left:50%;bottom:100%;visibility:hidden;opacity:0;transform:translateX(-50%);transition:visibility .3s ease 0s,opacity .3s ease 0s;background-color:rgba(0,0,0,.5);border-radius:4px}.jb-pro-container .icon-title{display:inline-block;padding:5px 10px;font-size:12px;white-space:nowrap;color:#fff}.jb-pro-container .jb-pro-quality-menu{padding:8px 0}.jb-pro-container .jb-pro-menu-item,.jb-pro-container .jb-pro-quality-menu-item,.jb-pro-container .jb-pro-scale-menu-item,.jb-pro-container .jb-pro-speed-menu-item{display:block;height:25px;line-height:25px;margin:0;padding:0 10px;cursor:pointer;font-size:14px;text-align:center;width:50px;color:hsla(0,0%,100%,.5);transition:color .3s,background-color .3s}.jb-pro-container .jb-pro-menu-item:hover,.jb-pro-container .jb-pro-quality-menu-item:hover,.jb-pro-container .jb-pro-scale-menu-item:hover,.jb-pro-container .jb-pro-speed-menu-item:hover{background-color:hsla(0,0%,100%,.2)}.jb-pro-container .jb-pro-menu-item:focus,.jb-pro-container .jb-pro-quality-menu-item:focus,.jb-pro-container .jb-pro-scale-menu-item:focus,.jb-pro-container .jb-pro-speed-menu-item:focus{outline:none}.jb-pro-container .jb-pro-menu-item.jb-pro-menu-item-active,.jb-pro-container .jb-pro-menu-item.jb-pro-quality-menu-item-active,.jb-pro-container .jb-pro-menu-item.jb-pro-scale-menu-item-active,.jb-pro-container .jb-pro-menu-item.jb-pro-speed-menu-item-active,.jb-pro-container .jb-pro-quality-menu-item.jb-pro-menu-item-active,.jb-pro-container .jb-pro-quality-menu-item.jb-pro-quality-menu-item-active,.jb-pro-container .jb-pro-quality-menu-item.jb-pro-scale-menu-item-active,.jb-pro-container .jb-pro-quality-menu-item.jb-pro-speed-menu-item-active,.jb-pro-container .jb-pro-scale-menu-item.jb-pro-menu-item-active,.jb-pro-container .jb-pro-scale-menu-item.jb-pro-quality-menu-item-active,.jb-pro-container .jb-pro-scale-menu-item.jb-pro-scale-menu-item-active,.jb-pro-container .jb-pro-scale-menu-item.jb-pro-speed-menu-item-active,.jb-pro-container .jb-pro-speed-menu-item.jb-pro-menu-item-active,.jb-pro-container .jb-pro-speed-menu-item.jb-pro-quality-menu-item-active,.jb-pro-container .jb-pro-speed-menu-item.jb-pro-scale-menu-item-active,.jb-pro-container .jb-pro-speed-menu-item.jb-pro-speed-menu-item-active{color:#2298fc}.jb-pro-container .jb-pro-volume-panel-wrap{position:absolute;left:50%;bottom:100%;visibility:hidden;opacity:0;transform:translateX(-50%) translateY(22%);transition:visibility .3s,opacity .3s;background-color:rgba(0,0,0,.5);border-radius:4px;height:120px;width:50px;overflow:hidden}.jb-pro-container .jb-pro-volume-panel-wrap.jb-pro-volume-panel-wrap-show{visibility:visible;opacity:1}.jb-pro-container .jb-pro-volume-panel{cursor:pointer;position:absolute;top:21px;height:60px;width:50px;overflow:hidden}.jb-pro-container .jb-pro-volume-panel-text{position:absolute;left:0;top:0;width:50px;height:20px;line-height:20px;text-align:center;color:#fff;font-size:12px}.jb-pro-container .jb-pro-volume-panel-handle{position:absolute;top:48px;left:50%;width:12px;height:12px;border-radius:12px;margin-left:-6px;background:#fff}.jb-pro-container .jb-pro-volume-panel-handle:before{bottom:-54px;background:#fff}.jb-pro-container .jb-pro-volume-panel-handle:after{bottom:6px;background:hsla(0,0%,100%,.2)}.jb-pro-container .jb-pro-volume-panel-handle:after,.jb-pro-container .jb-pro-volume-panel-handle:before{content:"";position:absolute;display:block;left:50%;width:3px;margin-left:-1px;height:60px}.jb-pro-container.jb-pro-fullscreen-web .jb-pro-controls{width:100vh}.jb-pro-container.jb-pro-fullscreen-web .jb-pro-play-big:after{transform:translate(-50%,-50%) rotate(270deg)}.jb-pro-container.jb-pro-fullscreen-web .jb-pro-loading{flex-direction:row}.jb-pro-container.jb-pro-fullscreen-web .jb-pro-loading-text{transform:rotate(270deg)}.jb-pro-container .jb-pro-contextmenus{display:none;flex-direction:column;position:absolute;z-index:120;left:10px;top:10px;min-width:200px;padding:5px 0;background-color:rgba(0,0,0,.9);border-radius:3px}.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu{cursor:pointer;font-size:12px;display:block;color:#fff;padding:10px 15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 0 2px rgba(0,0,0,.5);border-bottom:1px solid hsla(0,0%,100%,.1)}.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu a{color:#fff;text-decoration:none}.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu span{display:inline-block;padding:0 7px}.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu span.art-current,.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu span:hover{color:var(--theme)}.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu:hover{background-color:hsla(0,0%,100%,.1)}.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu:last-child{border-bottom:none}.jb-pro-container.jb-pro-contextmenus-show .jb-pro-contextmenus{display:flex}.jb-pro-container .jb-pro-extend-dom{display:block;position:relative;width:100%;height:100%;display:none}.jb-pro-container-playback .jb-pro-controls{height:48px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center{flex:1;display:flex;box-sizing:border-box;justify-content:space-between;font-size:12px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time{box-sizing:border-box;flex:1;position:relative;height:100%}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-inner{width:300px;height:100%;overflow-y:hidden;overflow-x:auto}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-current-time{position:absolute;left:0;top:0;height:15px;width:1px;background-color:red;text-align:center;z-index:1}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-current-time-text{position:absolute;box-sizing:border-box;padding:0 5px;width:60px;left:-25px;top:15px;border:1px solid red;height:15px;line-height:15px;cursor:move;background-color:#fff;color:#000;-webkit-user-select:none;-moz-user-select:none;user-select:none}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-scroll{position:relative;width:1440px;margin:0 auto}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-scroll.one-hour{width:1440px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-scroll.half-hour{width:2880px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-scroll.ten-min{width:8640px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-scroll.five-min{width:17280px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-scroll.one-min{width:86400px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-list{position:relative;background-color:#ccc;height:48px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-day{height:100%;overflow:hidden}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-one-wrap{height:8px;z-index:1}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-second-wrap{height:25px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-btns{display:flex;align-items:center}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute-one,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-second-one{float:left;width:1px;height:8px;margin:0;cursor:default;position:relative;z-index:1}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute-one.active,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-second-one.active{background-color:orange;cursor:pointer}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute-one.start,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-second-one.start{background-color:#999}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute-one:hover .jb-pro-playback-time-title-tips,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-second-one:hover .jb-pro-playback-time-title-tips{visibility:visible;opacity:1}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-title-tips{pointer-events:none;position:absolute;left:0;top:100%;visibility:hidden;opacity:0;transform:translateX(13%);transition:visibility .3s ease 0s,opacity .3s ease 0s;background-color:#000;border-radius:4px;z-index:1}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-title-tips.jb-pro-playback-time-title-tips-left{transform:translateX(-100%)}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-title-tips .jb-pro-playback-time-title{display:inline-block;padding:2px 5px;font-size:12px;white-space:nowrap;color:#fff}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-hour,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute{float:left;position:relative;width:60px;box-sizing:border-box;border-top:1px solid #999;-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:left;height:25px;line-height:25px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-hour:first-child,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute:first-child{border-left:0}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-hour:first-child .jb-pro-playback-time-hour-text,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute:first-child .jb-pro-playback-time-hour-text{left:0}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-hour:after,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute:after{content:"";position:absolute;left:0;top:-8px;width:1px;height:14px;background-color:#999}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-hour-text,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute-text{position:absolute;left:-13px}.jb-pro-container-playback .jb-pro-playback-expand.disabled .jb-pro-icon-expand,.jb-pro-container-playback .jb-pro-playback-narrow.disabled .jb-pro-icon-narrow{cursor:no-drop}.jb-pro-container-playback .jb-pro-control-progress-simple{position:absolute;box-sizing:border-box;left:0;top:-2px;width:100%;display:flex;flex-direction:row;align-items:center;height:8px;cursor:pointer}.jb-pro-container-playback .jb-pro-control-progress-simple:hover{top:0;align-items:flex-start}.jb-pro-container-playback .jb-pro-control-progress-simple:hover .jb-pro-control-progress-inner{height:100%}.jb-pro-container-playback .jb-pro-control-progress-simple:hover .jb-pro-control-progress-inner .jb-pro-progress-indicator{transform:scale(1);visibility:visible}.jb-pro-container-playback .jb-pro-control-progress-inner{display:flex;align-items:center;position:relative;height:50%;width:100%;transition:all .2s ease;background:hsla(0,0%,100%,.5)}.jb-pro-container-playback .jb-pro-progress-hover{display:none;width:0}.jb-pro-container-playback .jb-pro-progress-played{position:absolute;left:0;top:0;right:0;bottom:0;height:100%;width:0;background-color:orange}.jb-pro-container-playback .jb-pro-progress-indicator{visibility:hidden;align-items:center;justify-content:center;position:absolute;z-index:40;border-radius:50%;transform:scale(.1);transition:transform .1s ease-in-out}.jb-pro-container-playback .jb-pro-progress-indicator .jb-pro-icon{width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.jb-pro-container-playback .jb-pro-progress-indicator:hover{transform:scale(1.2)!important}.jb-pro-container-playback .jb-pro-progress-tip{display:none;position:absolute;z-index:50;top:-25px;left:0;height:20px;padding:0 5px;line-height:20px;color:#fff;font-size:12px;text-align:center;background:rgba(0,0,0,.7);border-radius:3px;font-weight:700;white-space:nowrap}.jb-pro-container-playback.jb-pro-fullscreen-web .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-playback-time-inner{overflow-y:auto}.jb-pro-zoom-control{cursor:grab}.jb-pro-performance-panel{position:absolute;box-sizing:border-box;z-index:10000;left:0;top:0;padding:5px;font-size:10px;background:rgba(0,0,0,.2);color:#fff;max-height:100%;overflow-y:auto;display:none}.jb-pro-performance-panel .jb-pro-performance-item{display:flex;align-items:center;margin-top:3px;color:#fff}.jb-pro-performance-panel .jb-pro-performance-item-block{height:10px}.jb-pro-tips-message{position:absolute;top:0;left:0;width:100%;height:100%;background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto;box-sizing:content-box;display:none}.jb-pro-tips-message:before{color:hsla(0,0%,100%,.3);content:"X";font-family:Arial,Helvetica,sans-serif;font-size:40px;left:0;line-height:1;margin-top:-20px;position:absolute;text-shadow:2em 2em 4em #000;text-align:center;top:50%;vertical-align:middle;width:100%}.jb-pro-tips-message .jb-pro-tips-message-close{position:absolute;z-index:99999;right:0;top:0;width:40px;height:40px;display:flex;align-items:center;justify-content:center}.jb-pro-tips-message .jb-pro-tips-message-close .jb-pro-tips-message-close-icon{width:20px;height:20px;border-radius:10px;cursor:pointer;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAeUExURUdwTM3Nzc7Ozs7Ozs3Nzc3NzcrKys3Nzc3Nzc3NzePZJxkAAAAJdFJOUwCtKdPBGAmNTt3jdDcAAADfSURBVDjL1dOxDoIwEADQgwR07GTCZtI/IGHgAzBhM9EPkMTB0Y3V0ZXIcn/rtRR6pefgSKeSu3ellyvA9lZ/5F9p/3K7PZY8oPG5BD6MpPUSgIITzdIStifAshjRQV1PCFT8TxaicTzzwEwINOEdHVmDmcTAkRhMhMAp7iQRjcMtDhCp8SA1v0ARGIIK/gnkv0p1OBTS4QRUIpE7DiYYXTBrzcld3JIrAarXrps4AVNwRSZgExoJmIyAaAdsShUMn/JF2fh4YEkpAcgvnuwYCIb6EbbbP4PsDfLD2dD6Av1qTvAQlzUTAAAAAElFTkSuQmCC") no-repeat 50%;background-color:#fff;background-size:100% 100%}.jb-pro-tips-message .jb-pro-tips-message-content{overflow:auto;padding:35px;box-sizing:border-box;width:100%;height:100%}.jb-pro-tips-message .jb-pro-tips-message-content .jb-pro-tips-message-content-item{font-size:14px;color:#fff;text-align:center;line-height:1.5}');class jh{constructor(e){var t;this.player=e,this.TAG_NAME="Control",this.extendBtnList=[],((e,t)=>{e._opt.hasControl&&e._opt.controlAutoHide?e.$container.classList.add("jb-pro-controls-show-auto-hide"):e.$container.classList.add("jb-pro-controls-show");const i=e._opt,s=i.operateBtns,r=`\n <div class="jb-pro-controls-center">\n <div class="jb-pro-controls-playback-time">\n <div class="jb-pro-controls-playback-time-inner">\n <div class="jb-pro-controls-playback-time-scroll">\n <div class="jb-pro-controls-playback-time-list">\n <div class="jb-pro-playback-time-day">\n <div class="jb-pro-playback-time-one-wrap"></div>\n <div class="jb-pro-playback-time-second-wrap"></div>\n </div>\n </div>\n <div class="jb-pro-controls-playback-current-time">\n <div class="jb-pro-controls-playback-current-time-text">00:00:00</div>\n </div>\n </div>\n </div>\n </div>\n ${i.playbackConfig.showPrecisionBtn?`\n <div class="jb-pro-controls-playback-btns">\n <div class="jb-pro-controls-item jb-pro-playback-narrow">${Th.narrow}</div>\n <div class="jb-pro-controls-item jb-pro-playback-expand">${Th.expand}</div>\n </div>\n `:""}\n </div>\n `;e.$container.insertAdjacentHTML("beforeend",`\n ${i.background?`<div class="jb-pro-poster" style="background-image: url(${i.background})"></div>`:""}\n <div class="jb-pro-loading-bg">\n <img class="jb-pro-loading-bg-image" src="" alt="">\n </div>\n ${i.loadingIcon?`\n <div class="jb-pro-loading">\n ${Th.loading}\n <div class="jb-pro-loading-text">${i.loadingText}</div>\n </div>\n `:""}\n ${i.hasControl&&s.play?'<div class="jb-pro-play-big"></div>':""}\n ${i.hasControl&&s.ptz?`\n <div class="jb-pro-ptz-controls show-${i.ptzShowType}">\n <div class="jb-pro-ptz-bg-active"></div>\n <div class="jb-pro-ptz-arrow jb-pro-ptz-arrow-up" data-arrow="up"></div>\n <div class="jb-pro-ptz-arrow jb-pro-ptz-arrow-right" data-arrow="right"></div>\n <div class="jb-pro-ptz-arrow jb-pro-ptz-arrow-down" data-arrow="down"></div>\n <div class="jb-pro-ptz-arrow jb-pro-ptz-arrow-left" data-arrow="left"></div>\n ${i.ptzMoreArrowShow?'\n <div class="jb-pro-ptz-arrow jb-pro-ptz-arrow-left-up" data-arrow="left-up"></div>\n <div class="jb-pro-ptz-arrow jb-pro-ptz-arrow-right-up" data-arrow="right-up"></div>\n <div class="jb-pro-ptz-arrow jb-pro-ptz-arrow-left-down" data-arrow="left-down"></div>\n <div class="jb-pro-ptz-arrow jb-pro-ptz-arrow-right-down" data-arrow="right-down"></div>\n ':""}\n <div class="jb-pro-ptz-control"></div>\n <div class="jb-pro-ptz-btns">\n ${i.ptzZoomShow?'\n <div class="jb-pro-ptz-btn">\n <div class="jb-pro-ptz-expand jb-pro-ptz-icon">\n <i class="jb-pro-ptz-expand-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">缩放+</span>\n </span>\n </div>\n <div class="jb-pro-ptz-narrow jb-pro-ptz-icon">\n <i class="jb-pro-ptz-narrow-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">缩放-</span>\n </span>\n </div>\n </div>\n ':""}\n ${i.ptzApertureShow?'\n <div class="jb-pro-ptz-btn">\n <div class="jb-pro-ptz-aperture-far jb-pro-ptz-icon">\n <i class="jb-pro-ptz-aperture-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">光圈+</span>\n </span>\n </div>\n <div class="jb-pro-ptz-aperture-near jb-pro-ptz-icon">\n <i class="jb-pro-ptz-aperture-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">光圈-</span>\n </span>\n </div>\n </div>\n ':""}\n ${i.ptzFocusShow?'\n <div class="jb-pro-ptz-btn">\n <div class="jb-pro-ptz-focus-far jb-pro-ptz-icon">\n <i class="jb-pro-ptz-focus-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">聚焦+</span>\n </span>\n </div>\n <div class="jb-pro-ptz-focus-near jb-pro-ptz-icon">\n <i class="jb-pro-ptz-focus-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">聚焦-</span>\n </span>\n </div>\n </div>\n ':""}\n ${i.ptzCruiseShow?'\n <div class="jb-pro-ptz-btn">\n <div class="jb-pro-ptz-cruise-play jb-pro-ptz-icon">\n <i class="jb-pro-ptz-focus-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">巡航开</span>\n </span>\n </div>\n <div class="jb-pro-ptz-cruise-pause jb-pro-ptz-icon">\n <i class="jb-pro-ptz-focus-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">巡航关</span>\n </span>\n </div>\n </div>\n ':""}\n ${i.ptzFogShow?'\n <div class="jb-pro-ptz-btn">\n <div class="jb-pro-ptz-fog-open jb-pro-ptz-icon">\n <i class="jb-pro-ptz-focus-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">透雾开</span>\n </span>\n </div>\n <div class="jb-pro-ptz-fog-close jb-pro-ptz-icon">\n <i class="jb-pro-ptz-focus-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">透雾关</span>\n </span>\n </div>\n </div>\n ':""}\n\n ${i.ptzWiperShow?'\n <div class="jb-pro-ptz-btn">\n <div class="jb-pro-ptz-wiper-open jb-pro-ptz-icon">\n <i class="jb-pro-ptz-focus-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">雨刷开</span>\n </span>\n </div>\n <div class="jb-pro-ptz-wiper-close jb-pro-ptz-icon">\n <i class="jb-pro-ptz-focus-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">雨刷关</span>\n </span>\n </div>\n </div>\n ':""}\n </div>\n </div>\n `:""}\n ${i.hasVideo?`\n <div class="jb-pro-zoom-controls">\n <div class="jb-pro-zoom-narrow">${Th.narrow}</div>\n <div class="jb-pro-zoom-tips">电子放大</div>\n <div class="jb-pro-zoom-expand">${Th.expand}</div>\n <div class="jb-pro-zoom-stop2">${Th.zoomStop}</div>\n </div>\n <div class="jb-pro-recording">\n <div class="jb-pro-recording-red-point"></div>\n <div class="jb-pro-recording-time">00:00:00</div>\n <div class="jb-pro-recording-stop">${Th.recordStop}</div>\n </div>\n `:""}\n\n ${i.hasControl?`\n <div class="jb-pro-controls">\n <div class="jb-pro-controls-bottom">\n <div class="jb-pro-controls-left">\n ${i.showBandwidth?'<div class="jb-pro-controls-item jb-pro-speed"></div>':""}\n <div class="jb-pro-playback-control-time"></div>\n <div class="jb-pro-controls-item-html">${i.controlHtml}</div>\n </div>\n ${i.playType===w&&i.playbackConfig.showControl&&i.playbackConfig.controlType===X.normal?r:""}\n ${i.playType===w&&i.playbackConfig.showControl&&i.playbackConfig.controlType===X.simple?'\n <div class="jb-pro-control-progress-simple">\n <div class="jb-pro-control-progress-inner">\n <div class="jb-pro-progress-hover"></div>\n <div class="jb-pro-progress-played"></div>\n <div class="jb-pro-progress-indicator"></div>\n <div class="jb-pro-progress-tip">00:00</div>\n </div>\n </div>\n ':""}\n <div class="jb-pro-controls-right">\n ${i.playType===w&&i.playbackConfig.showRateBtn?'\n <div class="jb-pro-controls-item-wrap">\n <div class="jb-pro-controls-item jb-pro-speed-menu">\n <div class="jb-pro-speed-icon-text"></div>\n <div class="jb-pro-speed-menu-list"></div>\n </div>\n </div>\n ':""}\n ${s.close?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-close">${Th.close}</div></div>`:""}\n ${s.logSave?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-logSave">${Th.logSave}</div></div>`:""}\n ${s.performance?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-performance">${Th.performance}</div><div class="jb-pro-controls-item jb-pro-performance-active">${Th.performanceActive}</div></div>`:""}\n ${s.aiFace?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-face">${Th.face}</div><div class="jb-pro-controls-item jb-pro-face-active">${Th.faceActive}</div></div>`:""}\n ${s.aiObject?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-object">${Th.object}</div><div class="jb-pro-controls-item jb-pro-object-active">${Th.objectActive}</div></div>`:""}\n ${s.aiOcclusion?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-occlusion">${Th.occlusion}</div><div class="jb-pro-controls-item jb-pro-occlusion-active">${Th.occlusionActive}</div></div>`:""}\n ${s.quality?'\n <div class="jb-pro-controls-item-wrap">\n <div class="jb-pro-controls-item jb-pro-quality-menu">\n <div class="jb-pro-quality-icon-text"></div>\n <div class="jb-pro-quality-menu-list"></div>\n </div>\n </div>\n ':""}\n ${s.scale?'\n <div class="jb-pro-controls-item-wrap">\n <div class="jb-pro-controls-item jb-pro-scale-menu">\n <div class="jb-pro-scale-icon-text"></div>\n <div class="jb-pro-scale-menu-list"></div>\n </div>\n </div>\n ':""}\n ${s.audio?`\n <div class="jb-pro-controls-item-wrap">\n <div class="jb-pro-controls-item jb-pro-volume">\n ${Th.audio}\n ${Th.mute}\n <div class="jb-pro-volume-panel-wrap">\n <div class="jb-pro-volume-panel">\n <div class="jb-pro-volume-panel-handle"></div>\n </div>\n <div class="jb-pro-volume-panel-text"></div>\n </div>\n </div>\n </div>\n `:""}\n ${s.play?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-play">${Th.play}</div><div class="jb-pro-controls-item jb-pro-pause">${Th.pause}</div></div>`:""}\n ${s.screenshot?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-screenshot">${Th.screenshot}</div></div>`:""}\n ${s.record?` <div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-record">${Th.record}</div><div class="jb-pro-controls-item jb-pro-record-stop">${Th.recordStop}</div></div>`:""}\n ${s.ptz?` <div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-ptz">${Th.ptz}</div><div class="jb-pro-controls-item jb-pro-ptz-active">${Th.ptzActive}</div></div>`:""}\n ${s.zoom?` <div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-zoom">${Th.zoom}</div><div class="jb-pro-controls-item jb-pro-zoom-stop">${Th.zoomStop}</div></div>`:""}\n ${s.fullscreen?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-fullscreen">${Th.fullscreen}</div><div class="jb-pro-controls-item jb-pro-fullscreen-exit">${Th.fullscreenExit}</div></div>`:""}\n </div>\n </div>\n </div>\n `:""}\n <div class="jb-pro-performance-panel"></div>\n <div class="jb-pro-contextmenus"></div>\n <div class="jb-pro-tips-message">\n <div class="jb-pro-tips-message-close">\n <div class="jb-pro-tips-message-close-icon"></div>\n </div>\n <div class="jb-pro-tips-message-content"></div>\n </div>\n `),Object.defineProperty(t,"$poster",{value:e.$container.querySelector(".jb-pro-poster")}),Object.defineProperty(t,"$loadingBg",{value:e.$container.querySelector(".jb-pro-loading-bg")}),Object.defineProperty(t,"$loadingBgImage",{value:e.$container.querySelector(".jb-pro-loading-bg-image")}),Object.defineProperty(t,"$loading",{value:e.$container.querySelector(".jb-pro-loading")}),Object.defineProperty(t,"$loadingText",{value:e.$container.querySelector(".jb-pro-loading-text")}),Object.defineProperty(t,"$play",{value:e.$container.querySelector(".jb-pro-play")}),Object.defineProperty(t,"$playBig",{value:e.$container.querySelector(".jb-pro-play-big")}),Object.defineProperty(t,"$recording",{value:e.$container.querySelector(".jb-pro-recording")}),Object.defineProperty(t,"$recordingTime",{value:e.$container.querySelector(".jb-pro-recording-time")}),Object.defineProperty(t,"$recordingStop",{value:e.$container.querySelector(".jb-pro-recording-stop")}),Object.defineProperty(t,"$pause",{value:e.$container.querySelector(".jb-pro-pause")}),Object.defineProperty(t,"$controls",{value:e.$container.querySelector(".jb-pro-controls")}),Object.defineProperty(t,"$controlsInner",{value:e.$container.querySelector(".jb-pro-controls-bottom")}),Object.defineProperty(t,"$controlsLeft",{value:e.$container.querySelector(".jb-pro-controls-left")}),Object.defineProperty(t,"$controlsRight",{value:e.$container.querySelector(".jb-pro-controls-right")}),Object.defineProperty(t,"$volume",{value:e.$container.querySelector(".jb-pro-volume")}),Object.defineProperty(t,"$volumePanelWrap",{value:e.$container.querySelector(".jb-pro-volume-panel-wrap")}),Object.defineProperty(t,"$volumePanelText",{value:e.$container.querySelector(".jb-pro-volume-panel-text")}),Object.defineProperty(t,"$volumePanel",{value:e.$container.querySelector(".jb-pro-volume-panel")}),Object.defineProperty(t,"$volumeHandle",{value:e.$container.querySelector(".jb-pro-volume-panel-handle")}),Object.defineProperty(t,"$volumeOn",{value:e.$container.querySelector(".jb-pro-icon-audio")}),Object.defineProperty(t,"$volumeOff",{value:e.$container.querySelector(".jb-pro-icon-mute")}),Object.defineProperty(t,"$fullscreen",{value:e.$container.querySelector(".jb-pro-fullscreen")}),Object.defineProperty(t,"$fullscreenExit",{value:e.$container.querySelector(".jb-pro-fullscreen-exit")}),Object.defineProperty(t,"$record",{value:e.$container.querySelector(".jb-pro-record")}),Object.defineProperty(t,"$recordStop",{value:e.$container.querySelector(".jb-pro-record-stop")}),Object.defineProperty(t,"$screenshot",{value:e.$container.querySelector(".jb-pro-screenshot")}),Object.defineProperty(t,"$speed",{value:e.$container.querySelector(".jb-pro-speed")}),Object.defineProperty(t,"$controlHtml",{value:e.$container.querySelector(".jb-pro-controls-item-html")}),Object.defineProperty(t,"$playbackTime",{value:e.$container.querySelector(".jb-pro-controls-playback-time")}),Object.defineProperty(t,"$playbackTimeInner",{value:e.$container.querySelector(".jb-pro-controls-playback-time-inner")}),Object.defineProperty(t,"$playbackTimeScroll",{value:e.$container.querySelector(".jb-pro-controls-playback-time-scroll")}),Object.defineProperty(t,"$playbackTimeList",{value:e.$container.querySelector(".jb-pro-controls-playback-time-list")}),Object.defineProperty(t,"$playbackTimeListOne",{value:e.$container.querySelector(".jb-pro-playback-time-one-wrap")}),Object.defineProperty(t,"$playbackTimeListSecond",{value:e.$container.querySelector(".jb-pro-playback-time-second-wrap")}),Object.defineProperty(t,"$playbackCurrentTime",{value:e.$container.querySelector(".jb-pro-controls-playback-current-time")}),Object.defineProperty(t,"$playbackCurrentTimeText",{value:e.$container.querySelector(".jb-pro-controls-playback-current-time-text")}),Object.defineProperty(t,"$controlsPlaybackBtns",{value:e.$container.querySelector(".jb-pro-controls-playback-btns")}),Object.defineProperty(t,"$playbackNarrow",{value:e.$container.querySelector(".jb-pro-playback-narrow")}),Object.defineProperty(t,"$playbackExpand",{value:e.$container.querySelector(".jb-pro-playback-expand")}),Object.defineProperty(t,"$ptz",{value:e.$container.querySelector(".jb-pro-ptz")}),Object.defineProperty(t,"$ptzActive",{value:e.$container.querySelector(".jb-pro-ptz-active")}),Object.defineProperty(t,"$ptzControl",{value:e.$container.querySelector(".jb-pro-ptz-controls")}),Object.defineProperty(t,"$ptzBgActive",{value:e.$container.querySelector(".jb-pro-ptz-bg-active")}),Object.defineProperty(t,"$ptzControlCircular",{value:e.$container.querySelector(".jb-pro-ptz-control")}),Object.defineProperty(t,"$ptzArrows",{value:e.$container.querySelectorAll(".jb-pro-ptz-arrow")}),Object.defineProperty(t,"$ptzExpand",{value:e.$container.querySelector(".jb-pro-ptz-expand")}),Object.defineProperty(t,"$ptzNarrow",{value:e.$container.querySelector(".jb-pro-ptz-narrow")}),Object.defineProperty(t,"$ptzApertureFar",{value:e.$container.querySelector(".jb-pro-ptz-aperture-far")}),Object.defineProperty(t,"$ptzApertureNear",{value:e.$container.querySelector(".jb-pro-ptz-aperture-near")}),Object.defineProperty(t,"$ptzFocusFar",{value:e.$container.querySelector(".jb-pro-ptz-focus-far")}),Object.defineProperty(t,"$ptzFocusNear",{value:e.$container.querySelector(".jb-pro-ptz-focus-near")}),Object.defineProperty(t,"$ptzCruisePlay",{value:e.$container.querySelector(".jb-pro-ptz-cruise-play")}),Object.defineProperty(t,"$ptzCruisePause",{value:e.$container.querySelector(".jb-pro-ptz-cruise-pause")}),Object.defineProperty(t,"$ptzFogOpen",{value:e.$container.querySelector(".jb-pro-ptz-fog-open")}),Object.defineProperty(t,"$ptzFogClose",{value:e.$container.querySelector(".jb-pro-ptz-fog-close")}),Object.defineProperty(t,"$ptzWiperOpen",{value:e.$container.querySelector(".jb-pro-ptz-wiper-open")}),Object.defineProperty(t,"$ptzWiperClose",{value:e.$container.querySelector(".jb-pro-ptz-wiper-close")}),Object.defineProperty(t,"$qualityText",{value:e.$container.querySelector(".jb-pro-quality-icon-text")}),Object.defineProperty(t,"$qualityMenu",{value:e.$container.querySelector(".jb-pro-quality-menu")}),Object.defineProperty(t,"$qualityMenuList",{value:e.$container.querySelector(".jb-pro-quality-menu-list")}),Object.defineProperty(t,"$scaleText",{value:e.$container.querySelector(".jb-pro-scale-icon-text")}),Object.defineProperty(t,"$scaleMenu",{value:e.$container.querySelector(".jb-pro-scale-menu")}),Object.defineProperty(t,"$scaleMenuList",{value:e.$container.querySelector(".jb-pro-scale-menu-list")}),Object.defineProperty(t,"$zoom",{value:e.$container.querySelector(".jb-pro-zoom")}),Object.defineProperty(t,"$zoomStop",{value:e.$container.querySelector(".jb-pro-zoom-stop")}),Object.defineProperty(t,"$zoomNarrow",{value:e.$container.querySelector(".jb-pro-zoom-narrow")}),Object.defineProperty(t,"$zoomExpand",{value:e.$container.querySelector(".jb-pro-zoom-expand")}),Object.defineProperty(t,"$zoomStop2",{value:e.$container.querySelector(".jb-pro-zoom-stop2")}),Object.defineProperty(t,"$close",{value:e.$container.querySelector(".jb-pro-close")}),Object.defineProperty(t,"$zoomControls",{value:e.$container.querySelector(".jb-pro-zoom-controls")}),Object.defineProperty(t,"$performancePanel",{value:e.$container.querySelector(".jb-pro-performance-panel")}),Object.defineProperty(t,"$performance",{value:e.$container.querySelector(".jb-pro-performance")}),Object.defineProperty(t,"$performanceActive",{value:e.$container.querySelector(".jb-pro-performance-active")}),Object.defineProperty(t,"$faceDetect",{value:e.$container.querySelector(".jb-pro-face")}),Object.defineProperty(t,"$faceDetectActive",{value:e.$container.querySelector(".jb-pro-face-active")}),Object.defineProperty(t,"$objectDetect",{value:e.$container.querySelector(".jb-pro-object")}),Object.defineProperty(t,"$objectDetectActive",{value:e.$container.querySelector(".jb-pro-object-active")}),Object.defineProperty(t,"$occlusionDetect",{value:e.$container.querySelector(".jb-pro-occlusion")}),Object.defineProperty(t,"$occlusionDetectActive",{value:e.$container.querySelector(".jb-pro-occlusion-active")}),Object.defineProperty(t,"$contextmenus",{value:e.$container.querySelector(".jb-pro-contextmenus")}),Object.defineProperty(t,"$speedText",{value:e.$container.querySelector(".jb-pro-speed-icon-text")}),Object.defineProperty(t,"$speedMenu",{value:e.$container.querySelector(".jb-pro-speed-menu")}),Object.defineProperty(t,"$speedMenuList",{value:e.$container.querySelector(".jb-pro-speed-menu-list")}),Object.defineProperty(t,"$logSave",{value:e.$container.querySelector(".jb-pro-logSave")}),Object.defineProperty(t,"$playbackProgress",{value:e.$container.querySelector(".jb-pro-control-progress-simple")}),Object.defineProperty(t,"$playbackProgressTip",{value:e.$container.querySelector(".jb-pro-progress-tip")}),Object.defineProperty(t,"$playbackProgressHover",{value:e.$container.querySelector(".jb-pro-progress-hover")}),Object.defineProperty(t,"$playbackProgressPlayed",{value:e.$container.querySelector(".jb-pro-progress-played")}),Object.defineProperty(t,"$playbackProgressIndicator",{value:e.$container.querySelector(".jb-pro-progress-indicator")}),Object.defineProperty(t,"$playbackProgressTime",{value:e.$container.querySelector(".jb-pro-playback-control-time")}),Object.defineProperty(t,"$tipsMessage",{value:e.$container.querySelector(".jb-pro-tips-message")}),Object.defineProperty(t,"$tipsMessageClose",{value:e.$container.querySelector(".jb-pro-tips-message-close")}),Object.defineProperty(t,"$tipsMessageContent",{value:e.$container.querySelector(".jb-pro-tips-message-content")})})(e,this),e._opt.extendOperateBtns.length>0&&e._opt.extendOperateBtns.forEach((e=>{this.addExtendBtn(e)})),e._opt.extendDomConfig&&e._opt.extendDomConfig.html&&this.addExtendDom(e._opt.extendDomConfig),t=this,Object.defineProperty(t,"controlsRect",{get:()=>t.$controls.getBoundingClientRect()}),Object.defineProperty(t,"controlsInnerRect",{get:()=>t.$controlsInner.getBoundingClientRect()}),Object.defineProperty(t,"controlsLeftRect",{get:()=>t.$controlsLeft.getBoundingClientRect()}),Object.defineProperty(t,"controlsRightRect",{get:()=>t.$controlsRight.getBoundingClientRect()}),Object.defineProperty(t,"controlsPlaybackTimeInner",{get:()=>t.$playbackTimeInner&&t.$playbackTimeInner.getBoundingClientRect()||{}}),Object.defineProperty(t,"controlsPlaybackBtnsRect",{get:()=>t.$controlsPlaybackBtns&&t.$controlsPlaybackBtns.getBoundingClientRect()||{width:0}}),Oh(e,this),((e,t)=>{const{events:{proxy:i},debug:s}=e,r=e._opt,a=r.operateBtns;function o(e){const{bottom:i,height:s}=t.$volumePanel.getBoundingClientRect(),{height:r}=t.$volumeHandle.getBoundingClientRect();return ca(i-e.y-r/2,0,s-r/2)/(s-r)}if(Aa()&&i(window,["click","contextmenu"],(i=>{i.composedPath().indexOf(e.$container)>-1?t.isFocus=!0:t.isFocus=!1})),i(t.$controls,"click",(e=>{e.stopPropagation()})),a.play&&(i(t.$pause,"click",(t=>{r.playType===w&&r.playbackConfig.uiUsePlaybackPause?e.playbackPause=!0:to(a.pauseFn)?a.pauseFn():e.pauseForControl()})),i(t.$play,"click",(t=>{r.playType===w&&e.playbackPause?e.playbackPause=!1:to(a.playFn)?a.playFn():e.playForControl().then((()=>{e.resumeAudioAfterPause()}))}))),i(t.$playBig,"click",(t=>{r.playType===w&&e.playbackPause?e.playbackPause=!1:to(a.playFn)?a.playFn():e.playForControl().then((()=>{e.resumeAudioAfterPause()}))})),a.screenshot&&i(t.$screenshot,"click",(t=>{t.stopPropagation(),to(a.screenshotFn)?a.screenshotFn():e.video.screenshot()})),a.audio&&(Aa()&&(i(t.$volume,"mouseover",(()=>{t.$volumePanelWrap.classList.add("jb-pro-volume-panel-wrap-show")})),i(t.$volume,"mouseout",(()=>{t.$volumePanelWrap.classList.remove("jb-pro-volume-panel-wrap-show")})),i(t.$volumePanel,"click",(t=>{t.stopPropagation(),e.volume=o(t)})),i(t.$volumeHandle,"mousedown",(e=>{e.stopPropagation(),t.isVolumeDroging=!0})),i(t.$volumeHandle,"mousemove",(i=>{t.isVolumeDroging&&(e.volume=o(i))})),i(document,"mouseup",(()=>{t.isVolumeDroging&&(t.isVolumeDroging=!1)}))),i(t.$volumeOn,"click",(i=>{i.stopPropagation(),ua(t.$volumeOn,"display","none"),ua(t.$volumeOff,"display","block");const s=e.volume;e.volume=0,e._lastVolume=Aa()?s:1})),i(t.$volumeOff,"click",(i=>{i.stopPropagation(),ua(t.$volumeOn,"display","block"),ua(t.$volumeOff,"display","none"),e.volume=Aa()?e.lastVolume||.5:1}))),a.record&&(i(t.$record,"click",(t=>{t.stopPropagation(),to(a.recordFn)?a.recordFn():e.recording=!0})),i(t.$recordStop,"click",(t=>{t.stopPropagation(),to(a.recordStopFn)?a.recordStopFn():e.recording=!1}))),i(t.$recordingStop,"click",(t=>{t.stopPropagation(),to(a.recordStopFn)?a.recordStopFn():e.recording=!1})),a.fullscreen&&(i(t.$fullscreen,"click",(t=>{t.stopPropagation(),to(a.fullscreenFn)?a.fullscreenFn():e.fullscreen=!0})),i(t.$fullscreenExit,"click",(t=>{t.stopPropagation(),to(a.fullscreenExitFn)?a.fullscreenExitFn():e.fullscreen=!1}))),a.ptz){if(i(t.$ptz,"click",(e=>{e.stopPropagation(),ua(t.$ptzActive,"display","flex"),ua(t.$ptz,"display","none"),t.$ptzControl.classList.add("jb-pro-ptz-controls-show")})),i(t.$ptzActive,"click",(e=>{e.stopPropagation(),ua(t.$ptz,"display","flex"),ua(t.$ptzActive,"display","none"),t.$ptzControl.classList.remove("jb-pro-ptz-controls-show")})),t.$ptzArrows.forEach((s=>{if(r.ptzClickType===Y)i(s,"click",(i=>{i.stopPropagation();const s=i.currentTarget.dataset.arrow;t.$ptzBgActive.classList.add("jb-pro-ptz-bg-active-show"),t.$ptzBgActive.classList.add(`jb-pro-ptz-bg-active-${s}`),t.$ptzControlCircular.classList.add(`jb-pro-ptz-control-${s}`),e.emit(lt.ptz,vo(s)),setTimeout((()=>{t.$ptzBgActive.classList.remove("jb-pro-ptz-bg-active-show"),Ri.forEach((e=>{t.$ptzBgActive.classList.remove(`jb-pro-ptz-bg-active-${e}`),t.$ptzControlCircular.classList.remove(`jb-pro-ptz-control-${e}`)})),e.emit(lt.ptz,Di)}),1e3*r.ptzStopEmitDelay)}));else if(r.ptzClickType===Q){let r=!1;i(s,"mousedown",(i=>{i.stopPropagation(),r=!0;const s=i.currentTarget.dataset.arrow;t.$ptzBgActive.classList.add("jb-pro-ptz-bg-active-show"),t.$ptzBgActive.classList.add(`jb-pro-ptz-bg-active-${s}`),t.$ptzControlCircular.classList.add(`jb-pro-ptz-control-${s}`),e.emit(lt.ptz,vo(s))}));const a=()=>{r=!1,t.$ptzBgActive.classList.remove("jb-pro-ptz-bg-active-show"),Ri.forEach((e=>{t.$ptzBgActive.classList.remove(`jb-pro-ptz-bg-active-${e}`),t.$ptzControlCircular.classList.remove(`jb-pro-ptz-control-${e}`)})),e.emit(lt.ptz,Di)};i(s,"mouseup",(e=>{e.stopPropagation(),r&&a()})),i(window,"mouseup",(e=>{e.stopPropagation(),r&&a()}))}})),r.ptzZoomShow)if(r.ptzClickType===Y)i(t.$ptzExpand,"click",(t=>{t.stopPropagation(),e.emit(lt.ptz,Ii),setTimeout((()=>{e.emit(lt.ptz,Di)}),1e3*r.ptzStopEmitDelay)})),i(t.$ptzNarrow,"click",(t=>{t.stopPropagation(),e.emit(lt.ptz,Pi),setTimeout((()=>{e.emit(lt.ptz,Di)}),1e3*r.ptzStopEmitDelay)}));else if(r.ptzClickType===Q){let n=!1,l=!1;i(t.$ptzExpand,"mousedown",(t=>{t.stopPropagation(),n=!0,e.emit(lt.ptz,Ii)})),i(t.$ptzNarrow,"mousedown",(t=>{t.stopPropagation(),l=!0,e.emit(lt.ptz,Pi)}));const d=()=>{n=!1,l=!1,e.emit(lt.ptz,Di)};i(t.$ptzExpand,"mouseup",(e=>{e.stopPropagation(),n&&d()})),i(t.$ptzNarrow,"mouseup",(e=>{e.stopPropagation(),l&&d()})),i(window,"mouseup",(e=>{e.stopPropagation(),(n||l)&&d()}))}if(r.ptzApertureShow)if(r.ptzClickType===Y)i(t.$ptzApertureFar,"click",(t=>{t.stopPropagation(),e.emit(lt.ptz,Bi),setTimeout((()=>{e.emit(lt.ptz,Li)}),1e3*r.ptzStopEmitDelay)})),i(t.$ptzApertureNear,"click",(t=>{t.stopPropagation(),e.emit(lt.ptz,Mi),setTimeout((()=>{e.emit(lt.ptz,Li)}),1e3*r.ptzStopEmitDelay)}));else if(r.ptzClickType===Q){let h=!1,c=!1;i(t.$ptzApertureFar,"mousedown",(t=>{t.stopPropagation(),h=!0,e.emit(lt.ptz,Bi)})),i(t.$ptzApertureNear,"mousedown",(t=>{t.stopPropagation(),c=!0,e.emit(lt.ptz,Mi)}));const u=()=>{h=!1,c=!1,e.emit(lt.ptz,Li)};i(t.$ptzApertureFar,"mouseup",(e=>{e.stopPropagation(),h&&u()})),i(t.$ptzApertureNear,"mouseup",(e=>{e.stopPropagation(),c&&u()})),i(window,"mouseup",(e=>{e.stopPropagation(),(h||c)&&u()}))}if(r.ptzFocusShow)if(r.ptzClickType===Y)i(t.$ptzFocusFar,"click",(t=>{t.stopPropagation(),e.emit(lt.ptz,Ui),setTimeout((()=>{e.emit(lt.ptz,Li)}),1e3*r.ptzStopEmitDelay)})),i(t.$ptzFocusNear,"click",(t=>{t.stopPropagation(),e.emit(lt.ptz,Fi),setTimeout((()=>{e.emit(lt.ptz,Li)}),1e3*r.ptzStopEmitDelay)}));else if(r.ptzClickType===Q){let p=!1,f=!1;i(t.$ptzFocusFar,"mousedown",(t=>{t.stopPropagation(),p=!0,e.emit(lt.ptz,Ui)})),i(t.$ptzFocusNear,"mousedown",(t=>{t.stopPropagation(),f=!0,e.emit(lt.ptz,Fi)}));const m=()=>{p=!1,f=!1,e.emit(lt.ptz,Li)};i(t.$ptzFocusFar,"mouseup",(e=>{e.stopPropagation(),p&&m()})),i(t.$ptzFocusNear,"mouseup",(e=>{e.stopPropagation(),f&&m()})),i(window,"mouseup",(e=>{e.stopPropagation(),(p||f)&&m()}))}if(r.ptzCruiseShow&&(i(t.$ptzCruisePlay,"click",(t=>{t.stopPropagation(),e.emit(lt.ptz,Oi)})),i(t.$ptzCruisePause,"click",(t=>{t.stopPropagation(),e.emit(lt.ptz,Ni)}))),r.ptzFogShow&&(i(t.$ptzFogOpen,"click",(t=>{t.stopPropagation(),e.emit(lt.ptz,ji)})),i(t.$ptzFogClose,"click",(t=>{t.stopPropagation(),e.emit(lt.ptz,Gi)}))),r.ptzWiperShow&&(i(t.$ptzWiperOpen,"click",(t=>{t.stopPropagation(),e.emit(lt.ptz,zi)})),i(t.$ptzWiperClose,"click",(t=>{t.stopPropagation(),e.emit(lt.ptz,$i)}))),r.ptzSupportDraggable){function g(){t.isPtzControlDroging&&(t.isPtzControlDroging=!1,t.$ptzControl.style.cursor="grab",t.tempPtzPosition={x:0,y:0})}t.isPtzControlDroging=!1,t.tempPtzPosition={x:0,y:0},i(t.$ptzControl,ya()?"touchstart":"mousedown",(e=>{e.stopPropagation(),t.isPtzControlDroging=!0,t.$ptzControl.style.cursor="grabbing";const{posX:i,posY:s}=io(e);t.tempPtzPosition={x:i,y:s}})),i(t.$ptzControl,ya()?"touchmove":"mousemove",(e=>{if(t.isPtzControlDroging){e.stopPropagation();const{posX:i,posY:s}=io(e),r=t.tempPtzPosition.x-i,a=t.tempPtzPosition.y-s;t.$ptzControl.style.left=t.$ptzControl.offsetLeft-r+"px",t.$ptzControl.style.top=t.$ptzControl.offsetTop-a+"px",t.tempPtzPosition={x:i,y:s}}})),i(t.$ptzControl,ya()?"touchend":"mouseup",(e=>{e.stopPropagation(),g()})),i(window,ya()?"touchend":"mouseup",(e=>{e.stopPropagation(),g()}))}}if(a.performance&&(i(t.$performance,"click",(t=>{t.stopPropagation(),e.togglePerformancePanel(!0)})),i(t.$performanceActive,"click",(t=>{t.stopPropagation(),e.togglePerformancePanel(!1)}))),a.logSave&&i(t.$logSave,"click",(t=>{t.stopPropagation(),e.downloadMemoryLog()})),a.aiFace&&(i(t.$faceDetect,"click",(t=>{t.stopPropagation(),e.faceDetect(!0)})),i(t.$faceDetectActive,"click",(t=>{t.stopPropagation(),e.faceDetect(!1)}))),a.aiObject&&(i(t.$objectDetect,"click",(t=>{t.stopPropagation(),e.objectDetect(!0)})),i(t.$objectDetectActive,"click",(t=>{t.stopPropagation(),e.objectDetect(!1)}))),a.aiOcclusion&&(i(t.$occlusionDetect,"click",(t=>{t.stopPropagation(),e.occlusionDetect(!0)})),i(t.$occlusionDetectActive,"click",(t=>{t.stopPropagation(),e.occlusionDetect(!1)}))),e._opt.hasControl&&e._opt.controlAutoHide){i(e.$container,"mouseover",(()=>{e.fullscreen||(ua(t.$controls,"display","block"),A())})),i(e.$container,"mousemove",(()=>{e.$container&&t.$controls&&(e.fullscreen,"none"===t.$controls.style.display&&(ua(t.$controls,"display","block"),A()))})),i(e.$container,"mouseout",(()=>{b(),ua(t.$controls,"display","none")}));let y=null;const A=()=>{b(),y=setTimeout((()=>{ua(t.$controls,"display","none")}),5e3)},b=()=>{y&&(clearTimeout(y),y=null)}}if(e._opt.playType===w){let _=e._opt.playbackConfig.controlType;e._opt.playbackConfig.showRateBtn&&(i(t.$speedMenu,"mouseover",(()=>{t.$speedMenuList.classList.add("jb-pro-speed-menu-shown")})),i(t.$speedMenu,"mouseout",(()=>{t.$speedMenuList.classList.remove("jb-pro-speed-menu-shown")})),i(t.$speedMenuList,"click",(t=>{const i=Za(t);if(i.matches("div.jb-pro-speed-menu-item")){const t=i.dataset;e.emit(lt.playbackPreRateChange,t.speed)}}))),_===X.normal?(i(t.$playbackNarrow,"click",(t=>{t.stopPropagation(),e.playback&&e.playback.narrowPrecision()})),i(t.$playbackExpand,"click",(t=>{t.stopPropagation(),e.playback&&e.playback.expandPrecision()})),i(t.$playbackTimeList,"click",(t=>{const i=Za(t);i.matches("div.jb-pro-playback-time-minute-one")&&e.playback&&e.playback.seek(i.dataset)})),e._opt.playbackConfig.supportWheel&&i(t.$playbackTimeInner,"wheel",(t=>{t.preventDefault(),(t.wheelDelta?t.wheelDelta/120:-(t.detail||0)/3)>0?e.playback&&e.playback.expandPrecision():e.playback&&e.playback.narrowPrecision()}))):_===X.simple&&(t.isDroging=!1,i(t.$playbackProgress,"click",(i=>{if(i.target!==t.$playbackProgressIndicator){let s=0,r=0;if(e.isInWebFullscreen())s=i.touches[0].clientY/e.height,r=s*e.playback.totalDuration;else{const a=Ih(t,e.playback.totalDuration,i);s=a.percentage,r=a.second}e.playback&&e.playback.seek({time:r})}})),i(t.$playbackProgress,"mousemove",(i=>{ua(t.$playbackProgressTip,"display","block");const{width:s,time:r}=Ih(t,e.playback.totalDuration,i);t.$playbackProgressTip.innerHTML=r;const a=t.$playbackProgressTip.clientWidth;s<=a/2?ua(t.$playbackProgressTip,"left",0):s>t.$playbackProgress.clientWidth-a/2?ua(t.$playbackProgressTip,"left",t.$playbackProgress-a+"px"):ua(t.$playbackProgressTip,"left",s-a/2+"px")})),i(t.$playbackProgress,"mouseout",(()=>{ua(t.$playbackProgressTip,"display","none")})),i(t.$playbackProgressIndicator,"mousedown",(e=>{t.isDroging=!0})),i(t.$playbackProgress,"mousemove",(i=>{if(t.isDroging){const{second:s,percentage:r}=Ih(t,e.playback.totalDuration,i);e.playback&&e.playback.seek({time:s})}})),i(t.$playbackProgress,"mouseup",(e=>{t.isDroging&&(t.isDroging=!1)})))}a.quality&&(i(t.$qualityMenu,"mouseover",(()=>{t.$qualityMenuList.classList.add("jb-pro-quality-menu-shown")})),i(t.$qualityMenu,"mouseout",(()=>{t.$qualityMenuList.classList.remove("jb-pro-quality-menu-shown")})),i(t.$qualityMenuList,"click",(t=>{const i=Za(t);if(i.matches("div.jb-pro-quality-menu-item")){const t=i.dataset;e.streamQuality=t.quality}}))),a.scale&&(i(t.$scaleMenu,"mouseover",(()=>{t.$scaleMenuList.classList.add("jb-pro-scale-menu-shown")})),i(t.$scaleMenu,"mouseout",(()=>{t.$scaleMenuList.classList.remove("jb-pro-scale-menu-shown")})),i(t.$scaleMenuList,"click",(t=>{const i=Za(t);if(i.matches("div.jb-pro-scale-menu-item")){const t=i.dataset;e.setScaleMode(t.scale)}}))),a.zoom&&(i(t.$zoom,"click",(t=>{t.stopPropagation(),e.zooming=!0})),i(t.$zoomStop,"click",(t=>{t.stopPropagation(),e.zooming=!1}))),i(t.$zoomExpand,"click",(t=>{t.stopPropagation(),e.zoom&&e.zoom.expandPrecision()})),i(t.$zoomNarrow,"click",(t=>{t.stopPropagation(),e.zoom&&e.zoom.narrowPrecision()})),i(t.$zoomStop2,"click",(t=>{t.stopPropagation(),e.zooming=!1})),a.close&&i(t.$close,"click",(t=>{t.stopPropagation(),e.doDestroy()})),i(t.$tipsMessageClose,"click",(e=>{e.stopPropagation(),t.$tipsMessageContent.innerHTML="",ua(t.$tipsMessage,"display","none")}))})(e,this),e._opt.hotKey&&((e,t)=>{const{events:{proxy:i}}=e,s={};function r(e,t){s[e]?s[e].push(t):s[e]=[t]}r(_i,(()=>{e.fullscreen&&(e.fullscreen=!1)})),r(vi,(()=>{e.volume+=.05})),r(wi,(()=>{e.volume-=.05})),i(window,"keydown",(e=>{if(t.isFocus){const t=document.activeElement.tagName.toUpperCase(),i=document.activeElement.getAttribute("contenteditable");if("INPUT"!==t&&"TEXTAREA"!==t&&""!==i&&"true"!==i){const t=s[e.keyCode];t&&(e.preventDefault(),t.forEach((e=>e())))}}}))})(e,this),this.btnIndex=0,this.initLoadingBackground(),Ka(e._opt.loadingIconStyle)&&this.initLoadingIconStyle(e._opt.loadingIconStyle),Ka(e._opt.ptzPositionConfig)&&this.updatePtzPosition(e._opt.ptzPositionConfig),this.kbpsShow="0 KB/s",this.player.debug.log("Control","init")}destroy(){if(this.$performancePanel){this.$performancePanel.innerHTML="";if(!Fh(this.$performancePanel)){const e=this.player.$container.querySelector(".jb-pro-performance-panel");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$poster){if(!Fh(this.$poster)){const e=this.player.$container.querySelector(".jb-pro-poster");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$loading){if(!Fh(this.$loading)){const e=this.player.$container.querySelector(".jb-pro-loading");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$loadingBg){if(!Fh(this.$loadingBg)){const e=this.player.$container.querySelector(".jb-pro-loading-bg");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$controls){if(!Fh(this.$controls)){const e=this.player.$container.querySelector(".jb-pro-controls");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$playBig){if(!Fh(this.$playBig)){const e=this.player.$container.querySelector(".jb-pro-play-big");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$recording){if(!Fh(this.$recording)){const e=this.player.$container.querySelector(".jb-pro-recording");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$ptzControl){if(!Fh(this.$ptzControl)){const e=this.player.$container.querySelector(".jb-pro-ptz-controls");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$zoomControls){if(!Fh(this.$zoomControls)){const e=this.player.$container.querySelector(".jb-pro-zoom-controls");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$contextmenus){this.$contextmenus.innerHTML="";if(!Fh(this.$contextmenus)){const e=this.player.$container.querySelector(".jb-pro-contextmenus");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$tipsMessage){if(!Fh(this.$tipsMessage)){const e=this.player.$container.querySelector(".jb-pro-tips-message");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$extendDom){if(!Fh(this.$extendDom)){const e=this.player.$container.querySelector(".jb-pro-extend-dom");e&&this.player.$container&&this.player.$container.removeChild(e)}}this.btnIndex=0,this.extendBtnList=[],this.kbpsShow="0 KB/s",this.player.$container&&(this.player.$container.classList.remove("jb-pro-controls-show-auto-hide"),this.player.$container.classList.remove("jb-pro-controls-show")),this.player.debug.log("Control","destroy")}getBtnIndex(){return this.btnIndex++}autoSize(){const e=this.player;e.$container.style.padding="0 0";const t=e.width,i=e.height,s=t/i,r=e.video.$videoElement.width/e.video.$videoElement.height;if(s>r){const s=(t-i*r)/2;e.$container.style.padding=`0 ${s}px`}else{const s=(i-t/r)/2;e.$container.style.padding=`${s}px 0`}}initLoadingBackground(){const e=this.player;e._opt.loadingBackground&&e._opt.loadingBackgroundWidth&&e._opt.loadingBackgroundHeight&&(e.debug.log("Control","initLoadingBackground()"),"default"===this.player._opt.aspectRatio||ya()?(e.getRenderType()===W||e.getRenderType()===J)&&this._initLoadingBackground():this._initLoadingBackgroundForRatio(),Mh(this.$loadingBg,"display","block"),e._opt.loadingBackground="",e._opt.loadingBackgroundWidth=0,e._opt.loadingBackgroundHeight=0)}initLoadingIconStyle(e){const t=this.player.$container.querySelector(".jb-pro-icon-loading");t&&(e.width&&Mh(t,"width",`${e.width}px`),e.height&&Mh(t,"height",`${e.height}px`),e.background&&Mh(t,"backgroundImage",`url("${e.background}")`),!1===e.hasAnimation&&(Mh(t,"animationName","none"),Mh(t,"animationDuration",0),Mh(t,"animationTimingFunction","ease"),Mh(t,"animationIterationCount",1)))}_initLoadingBackgroundForRatio(){const e=this.player._opt.aspectRatio.split(":").map(Number);let t=this.player.width,i=this.player.height;const s=this.player._opt;let r=0;s.hasControl&&!s.controlAutoHide&&(r=s.playType===w?Qt:Yt,i-=r);const a=this.player._opt.loadingBackgroundWidth,o=this.player._opt.loadingBackgroundHeight,n=a/o,l=e[0]/e[1];if(this.$loadingBgImage.src=this.player._opt.loadingBackground,n>l){const e=l*o/a;this.$loadingBgImage.style.width=100*e+"%",this.$loadingBgImage.style.height=`calc(100% - ${r}px)`,this.$loadingBgImage.style.padding=`0 ${(t-t*e)/2}px`}else{const e=a/l/o;this.$loadingBgImage.style.width="100%",this.$loadingBgImage.style.height=`calc(${100*e}% - ${r}px)`,this.$loadingBgImage.style.padding=(i-i*e)/2+"px 0"}}_initLoadingBackground(){const e=this.player;let t=e.height;const i=e._opt;if(i.hasControl&&!i.controlAutoHide){t-=i.playType===w?Qt:Yt}let s=e.width,r=t;const a=i.rotate;270!==a&&90!==a||(s=t,r=e.width),this.$loadingBgImage.width=s,this.$loadingBgImage.height=r,this.$loadingBgImage.src=e._opt.loadingBackground;let o=(e.width-s)/2,n=(t-r)/2,l="contain";i.isResize||(l="fill"),i.isFullResize&&(l="none");let d="";"none"===i.mirrorRotate&&a&&(d+=" rotate("+a+"deg)"),"level"===i.mirrorRotate?d+=" rotateY(180deg)":"vertical"===i.mirrorRotate&&(d+=" rotateX(180deg)"),this.player._opt.videoRenderSupportScale&&(this.$loadingBgImage.style.objectFit=l),this.$loadingBgImage.style.transform=d,this.$loadingBgImage.style.padding="0",this.$loadingBgImage.style.left=o+"px",this.$loadingBgImage.style.top=n+"px"}_validateExtendBtn(e){let t=!0;if(e.name||(this.player.debug.warn("Control","extend button name is required"),t=!1),t){-1!==this.extendBtnList.findIndex((t=>t.name===e.name))&&(this.player.debug.warn("Control",`extend button name: ${e.name} is already exist`),t=!1)}return t&&(e.icon||(this.player.debug.warn("Control","extend button icon is required"),t=!1)),t}addExtendBtn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=po(Ns);if(e=Object.assign({},t,e),!this._validateExtendBtn(e))return;const i=e.name||"",s=this.$controlsRight,r=e.activeIcon&&e.activeClick,a=`\n <div class="jb-pro-controls-item-wrap jb-pro-controls-item-wrap-${i}">\n ${e.icon?`<div class="jb-pro-controls-item jb-pro-control-extend-${i}">\n <i class="jb-pro-icon jb-pro-icon-extend-${i}"></i>\n ${e.iconTitle?`\n <span class="icon-title-tips"><span class="icon-title">${e.iconTitle}</span></span>\n `:""}\n </div>`:""}\n ${e.activeIcon?`<div class="jb-pro-controls-item jb-pro-control-extend-${i}-active">\n <i class="jb-pro-icon jb-pro-icon-extend-${i}-active"></i>\n ${e.activeIconTitle?`\n <span class="icon-title-tips"><span class="icon-title">${e.activeIconTitle}</span></span>\n `:""}\n </div>`:""}\n </div>\n `,o=Array.from(s.children)[e.index];o?o.insertAdjacentHTML("beforebegin",a):Bh(s,a);const n=s.querySelector(`.jb-pro-controls-item-wrap-${i}`),l=e.icon?s.querySelector(`.jb-pro-icon-extend-${i}`):null,d=e.icon?s.querySelector(`.jb-pro-control-extend-${i}`):null,h=e.activeIcon?s.querySelector(`.jb-pro-icon-extend-${i}-active`):null,c=e.activeIcon?s.querySelector(`.jb-pro-control-extend-${i}-active`):null,{events:{proxy:u},debug:p}=this.player;e.icon&&(Mh(l,"background",`url(${e.icon}) no-repeat center`),Mh(l,"background-size","100% 100%"),Mh(d,"display","none"),e.iconHover&&(u(l,"mouseover",(()=>{Mh(l,"background",`url(${e.iconHover}) no-repeat center`),Mh(l,"background-size","100% 100%")})),u(l,"mouseout",(()=>{Mh(l,"background",`url(${e.icon}) no-repeat center`),Mh(l,"background-size","100% 100%")})))),e.activeIcon&&(Mh(h,"background",`url(${e.activeIcon}) no-repeat center`),Mh(h,"background-size","100% 100%"),Mh(c,"display","none"),e.activeIconHover&&(u(h,"mouseover",(()=>{Mh(h,"background",`url(${e.activeIconHover}) no-repeat center`),Mh(h,"background-size","100% 100%")})),u(h,"mouseout",(()=>{Mh(h,"background",`url(${e.activeIcon}) no-repeat center`),Mh(h,"background-size","100% 100%")})))),e.click&&l&&u(l,"click",(t=>{t.preventDefault(),r&&(Mh(d,"display","none"),Mh(c,"display","flex")),this.player.isInMulti()?e.click.call(this.player,t,this.player._opt.multiIndex):e.click.call(this.player,t)})),e.activeClick&&h&&u(h,"click",(t=>{t.preventDefault(),Mh(d,"display","flex"),Mh(c,"display","none"),this.player.isInMulti()?e.activeClick.call(this.player,t,this.player._opt.multiIndex):e.activeClick.call(this.player,t)})),this.extendBtnList.push({name:i,$iconContainer:n,$iconWrap:d,$activeIconWrap:c})}addExtendDom(e){if(this.player.debug.log(this.TAG_NAME,"addExtendDom"),e.html){const t=`\n <div class="jb-pro-extend-dom">\n ${e.html}\n </div>\n `;this.player.$container.insertAdjacentHTML("beforeend",t),Object.defineProperty(this,"$extendDom",{value:this.player.$container.querySelector(".jb-pro-extend-dom")}),e.showBeforePlay&&Mh(this.$extendDom,"display","block")}}toggleExtendDom(e){this.$extendDom&&(Fa(e)||(e="none"===this.$extendDom.style.display),Mh(this.$extendDom,"display",e?"block":"none"))}updateExtendDom(e){this.player.debug.log(this.TAG_NAME,"updateExtendDom"),this.$extendDom&&(this.$extendDom.innerHTML=e)}removeExtendDom(){this.player.debug.log(this.TAG_NAME,"removeExtendDom"),this.$extendDom&&(this.$extendDom.innerHTML="")}updateLoadingText(e){this.$loadingText&&(this.$loadingText.innerText=e)}getExtendBtnList(){return this.extendBtnList}showTipsMessage(e,t){const i=this.$tipsMessage,s=this.$tipsMessageContent;if(i){const r=`\n <div class="jb-pro-tips-message-content-item">${e}</div>\n ${t?`<div class="jb-pro-tips-message-content-item">Error Type:${t}</div>`:""}\n `;s.innerHTML=r,Mh(i,"display","block")}}hideTipsMessage(){const e=this.$tipsMessage;e&&($tipsMessageContent.innerHTML="",Mh(e,"display","none"))}updatePtzPosition(e){const t=this.$ptzControl;if(Ka(e)&&t){let i="auto";e.left&&(i=Number(e.left)===e.left?e.left+"px":e.left),Mh(t,"left",i);let s="auto";e.top&&(s=Number(e.top)===e.top?e.top+"px":e.top),Mh(t,"top",s);let r="auto";e.bottom&&(r=Number(e.bottom)===e.bottom?e.bottom+"px":e.bottom),Mh(t,"bottom",r);let a="auto";e.right&&(a=Number(e.right)===e.right?e.right+"px":e.right),Mh(t,"right",a)}}}Nh(".jb-pro-container{position:relative;width:100%;height:100%;overflow:hidden}.jb-pro-container.jb-pro-fullscreen-web{position:fixed;z-index:9999;left:0;top:0;right:0;bottom:0;width:100vw!important;height:100vh!important;background:#000}.jb-pro-container .jb-pro-loading-bg-for-ios{position:absolute;z-index:100;left:0;top:0;right:0;bottom:0;height:100%;width:100%;opacity:0;visibility:hidden;background-position:50%;background-repeat:no-repeat;background-size:contain;pointer-events:none}.jb-pro-container .jb-pro-loading-bg-for-ios.show{opacity:1;visibility:visible}");var Gh=e=>{const{_opt:t,debug:i,events:{proxy:s}}=e;if(t.supportDblclickFullscreen&&s(e.$container,"dblclick",(t=>{const i=Za(t).nodeName.toLowerCase();"canvas"!==i&&"video"!==i||(e.fullscreen=!e.fullscreen)})),s(document,"visibilitychange",(()=>{e.visibility="visible"===document.visibilityState,i.log("visibilitychange",document.visibilityState),t.hiddenAutoPause&&(i.log("visibilitychange","hiddenAutoPause is true ",document.visibilityState,e._isPlayingBeforePageHidden),"visible"===document.visibilityState?e._isPlayingBeforePageHidden&&e.play():(e._isPlayingBeforePageHidden=e.playing,e.playing&&e.pause()))})),Aa()&&s(document,["click","contextmenu"],(t=>{Uh(t,e.$container)?(yo(e._opt.disableContextmenu)&&"contextmenu"===t.type&&t.preventDefault(),e.isInput="INPUT"===t.target.tagName,e.isFocus=!0,e.emit(lt.focus)):(e.isInput=!1,e.isFocus=!1,e.emit(lt.blur))})),t.isCheckInView){const t=xa((()=>{e.emit(lt.inView,function(e){const t=e.getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight,s=window.innerWidth||document.documentElement.clientWidth,r=t.top<=i&&t.top+t.height>=0,a=t.left<=s&&t.left+t.width>=0;return r&&a}(e.$container))}),200);s(window,"scroll",(()=>t()))}if(t.autoResize){const t=xa((()=>{e.resize()}),500);s(window,["resize","orientationchange"],(()=>{t()})),screen&&screen.orientation&&screen.orientation.onchange&&s(screen.orientation,"change",(()=>{t()}))}};class zh{static init(){zh.types={avc1:[],avcC:[],hvc1:[],hvcC:[],av01:[],av1C:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[],Opus:[],dOps:[],"ac-3":[],dac3:[],"ec-3":[],dec3:[]};for(let e in zh.types)zh.types.hasOwnProperty(e)&&(zh.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);let e=zh.constants={};e.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),e.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),e.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSC=e.STCO=e.STTS,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),e.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),e.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(e){let t=8,i=null,s=Array.prototype.slice.call(arguments,1),r=s.length;for(let e=0;e<r;e++)t+=s[e].byteLength;i=new Uint8Array(t),i[0]=t>>>24&255,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i.set(e,4);let a=8;for(let e=0;e<r;e++)i.set(s[e],a),a+=s[e].byteLength;return i}static generateInitSegment(e){let t=zh.box(zh.types.ftyp,zh.constants.FTYP),i=zh.moov(e),s=new Uint8Array(t.byteLength+i.byteLength);return s.set(t,0),s.set(i,t.byteLength),s}static moov(e){let t=zh.mvhd(e.timescale,e.duration),i=zh.trak(e),s=zh.mvex(e);return zh.box(zh.types.moov,t,i,s)}static mvhd(e,t){return zh.box(zh.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static trak(e){return zh.box(zh.types.trak,zh.tkhd(e),zh.mdia(e))}static tkhd(e){let t=e.id,i=e.duration,s=e.presentWidth,r=e.presentHeight;return zh.box(zh.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,s>>>8&255,255&s,0,0,r>>>8&255,255&r,0,0]))}static mdia(e){return zh.box(zh.types.mdia,zh.mdhd(e),zh.hdlr(e),zh.minf(e))}static mdhd(e){let t=e.timescale,i=e.duration;return zh.box(zh.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,i>>>24&255,i>>>16&255,i>>>8&255,255&i,85,196,0,0]))}static hdlr(e){let t=null;return t="audio"===e.type?zh.constants.HDLR_AUDIO:zh.constants.HDLR_VIDEO,zh.box(zh.types.hdlr,t)}static minf(e){let t=null;return t="audio"===e.type?zh.box(zh.types.smhd,zh.constants.SMHD):zh.box(zh.types.vmhd,zh.constants.VMHD),zh.box(zh.types.minf,t,zh.dinf(),zh.stbl(e))}static dinf(){return zh.box(zh.types.dinf,zh.box(zh.types.dref,zh.constants.DREF))}static stbl(e){return zh.box(zh.types.stbl,zh.stsd(e),zh.box(zh.types.stts,zh.constants.STTS),zh.box(zh.types.stsc,zh.constants.STSC),zh.box(zh.types.stsz,zh.constants.STSZ),zh.box(zh.types.stco,zh.constants.STCO))}static stsd(e){return"audio"===e.type?"mp3"===e.audioType?zh.box(zh.types.stsd,zh.constants.STSD_PREFIX,zh.mp3(e)):zh.box(zh.types.stsd,zh.constants.STSD_PREFIX,zh.mp4a(e)):"avc"===e.videoType?zh.box(zh.types.stsd,zh.constants.STSD_PREFIX,zh.avc1(e)):zh.box(zh.types.stsd,zh.constants.STSD_PREFIX,zh.hvc1(e))}static mp3(e){let t=e.channelCount,i=e.audioSampleRate,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return zh.box(zh.types[".mp3"],s)}static mp4a(e){let t=e.channelCount,i=e.audioSampleRate,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return zh.box(zh.types.mp4a,s,zh.esds(e))}static esds(e){let t=e.config||[],i=t.length,s=new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(t).concat([6,1,2]));return zh.box(zh.types.esds,s)}static avc1(e){let t=e.avcc;const i=e.codecWidth,s=e.codecHeight;let r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,s>>>8&255,255&s,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return zh.box(zh.types.avc1,r,zh.box(zh.types.avcC,t))}static hvc1(e){let t=e.avcc;const i=e.codecWidth,s=e.codecHeight;let r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,s>>>8&255,255&s,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return zh.box(zh.types.hvc1,r,zh.box(zh.types.hvcC,t))}static mvex(e){return zh.box(zh.types.mvex,zh.trex(e))}static trex(e){let t=e.id,i=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return zh.box(zh.types.trex,i)}static moof(e,t){return zh.box(zh.types.moof,zh.mfhd(e.sequenceNumber),zh.traf(e,t))}static mfhd(e){let t=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return zh.box(zh.types.mfhd,t)}static traf(e,t){let i=e.id,s=zh.box(zh.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),r=zh.box(zh.types.tfdt,new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),a=zh.sdtp(e),o=zh.trun(e,a.byteLength+16+16+8+16+8+8);return zh.box(zh.types.traf,s,r,o,a)}static sdtp(e){let t=new Uint8Array(5),i=e.flags;return t[4]=i.isLeading<<6|i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy,zh.box(zh.types.sdtp,t)}static trun(e,t){let i=new Uint8Array(28);t+=36,i.set([0,0,15,1,0,0,0,1,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0);let s=e.duration,r=e.size,a=e.flags,o=e.cts;return i.set([s>>>24&255,s>>>16&255,s>>>8&255,255&s,r>>>24&255,r>>>16&255,r>>>8&255,255&r,a.isLeading<<2|a.dependsOn,a.isDependedOn<<6|a.hasRedundancy<<4|a.isNonSync,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o],12),zh.box(zh.types.trun,i)}static mdat(e){return zh.box(zh.types.mdat,e)}}zh.init();const $h=[44100,48e3,32e3,0],Hh=[22050,24e3,16e3,0],Vh=[11025,12e3,8e3,0],Wh=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],Jh=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],qh=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1];class Kh extends a{constructor(e){super(),this.TAG_NAME="MediaSource",this.player=e,this._resetInIt(),this._useManagedMediaSource="ManagedMediaSource"in self&&!("MediaSource"in self),this.mediaSource=this._useManagedMediaSource?new self.ManagedMediaSource:new self.MediaSource,this.isDecodeFirstIIframe=!!Ao(e._opt.checkFirstIFrame),this.mediaSourceObjectURL=null,this._useManagedMediaSource||(this.mediaSourceObjectURL=window.URL.createObjectURL(this.mediaSource)),this.isSupportVideoFrameCallback=ko(),this.canvasRenderInterval=null,e._opt.mseUseCanvasRender?(this.$videoElement=document.createElement("video"),this._useManagedMediaSource?(this.$videoElement.disableRemotePlayback=!0,this.$videoElement.srcObject=this.mediaSource):this.$videoElement.src=this.mediaSourceObjectURL,this.initVideoEvents()):(this._useManagedMediaSource?(this.player.video.$videoElement.disableRemotePlayback=!0,this.player.video.$videoElement.srcObject=this.mediaSource):this.player.video.$videoElement.src=this.mediaSourceObjectURL,this.$videoElement=this.player.video.$videoElement),this._bindMediaSourceEvents(),this.audioSourceBufferCheckTimeout=null,this.audioSourceNoDataCheckTimeout=null,this.hasPendingEos=!1,this.player.isPlayback()&&this.player.on(lt.playbackPause,(t=>{Ao(t)?(yo(e._opt.checkFirstIFrame)&&(this.player.debug.log(this.TAG_NAME,"playbackPause is false and _opt.checkFirstIFrame is true so set isDecodeFirstIIframe = false"),this.isDecodeFirstIIframe=!1),this.clearUpAllSourceBuffer(),this.$videoElement.play()):(this.$videoElement.pause(),this.cacheTrack={})})),this._useManagedMediaSource?this.player.debug.log(this.TAG_NAME,"init and using ManagedMediaSource"):this.player.debug.log(this.TAG_NAME,"init")}destroy(){this.stop(),this._clearAudioSourceBufferCheckTimeout(),this._clearAudioNoDataCheckTimeout(),this._stopCanvasRender(),this.eventListenList.length&&(this.eventListenList.forEach((e=>e())),this.eventListenList=[]),this.supportVideoFrameCallbackHandle&&this.$videoElement&&(this.$videoElement.cancelVideoFrameCallback(this.supportVideoFrameCallbackHandle),this.supportVideoFrameCallbackHandle=null),this.$videoElement&&(this.player._opt.mseUseCanvasRender&&this.$videoElement.src&&(this.$videoElement.src="",this.$videoElement.removeAttribute("src")),this.$videoElement=null),this.mediaSourceObjectURL&&(window.URL.revokeObjectURL(this.mediaSourceObjectURL),this.mediaSourceObjectURL=null),this._resetInIt(),this.mediaSource=null,this.off(),this.player.debug.log(this.TAG_NAME,"destroy")}needInitAudio(){return this.player._opt.hasAudio&&this.player._opt.mseDecodeAudio}_resetInIt(){this.isAvc=null,this.isAAC=null,this.videoMeta={},this.audioMeta={},this.sourceBuffer=null,this.audioSourceBuffer=null,this.hasInit=!1,this.hasAudioInit=!1,this.isInitInfo=!1,this.isAudioInitInfo=!1,this.audioMimeType="",this.videoMimeType="",this.cacheTrack={},this.cacheAudioTrack={},this.sequenceNumber=0,this.audioSequenceNumber=0,this.firstRenderTime=null,this.firstAudioTime=null,this.$videoElement=null,this.mediaSourceAppendBufferFull=!1,this.mediaSourceAppendBufferError=!1,this.mediaSourceAddSourceBufferError=!1,this.mediaSourceBufferError=!1,this.mediaSourceError=!1,this.prevTimestamp=null,this.decodeDiffTimestamp=null,this.prevDts=null,this.prevAudioDts=null,this.prevPayloadBufferSize=0,this.isWidthOrHeightChanged=!1,this.prevTs=null,this.prevAudioTs=null,this.eventListenList=[],this.pendingRemoveRanges=[],this.pendingSegments=[],this.pendingAudioRemoveRanges=[],this.pendingAudioSegments=[],this.supportVideoFrameCallbackHandle=null}get state(){return this.mediaSource&&this.mediaSource.readyState}get isStateOpen(){return this.state===Ai}get isStateClosed(){return this.state===bi}get isStateEnded(){return this.state===yi}get duration(){return this.mediaSource&&this.mediaSource.duration||-1}set duration(e){this.mediaSource.duration=e}_bindMediaSourceEvents(){const{debug:e,events:{proxy:t}}=this.player,i=t(this.mediaSource,Yi,(()=>{this.player.debug.log(this.TAG_NAME,"sourceOpen"),this._onMediaSourceSourceOpen(),this.player.emit(lt.mseSourceOpen)})),s=t(this.mediaSource,Ki,(()=>{this.player.debug.log(this.TAG_NAME,"sourceClose"),this.player.emit(lt.mseSourceClose)})),r=t(this.mediaSource,Qi,(()=>{this.player.debug.log(this.TAG_NAME,"sourceended"),this.player.emit(lt.mseSourceended)}));this.eventListenList.push(i,s,r);const a=t(this.$videoElement,ss,(e=>{if(Ao(this.isSupportVideoFrameCallback))if(this.player.checkIsInRender())this.player.handleRender();else{const t=parseInt(e.timeStamp,10);this.player.debug.log(this.TAG_NAME,`mseUseCanvasRender is ${this.player._opt.mseUseCanvasRender} and\n $videoElement ts is ${t}, but not in render and vbps is ${this.player._stats.vbps} and fps is ${this.player._stats.fps}`)}}));if(this.eventListenList.push(a),this._useManagedMediaSource){const e=t(this.mediaSource,Xi,(()=>{this.player.debug.log(this.TAG_NAME,"ManagedMediaSource startstreaming"),this.player.emit(lt.mseSourceStartStreaming)})),i=t(this.mediaSource,Zi,(()=>{this.player.debug.log(this.TAG_NAME,"ManagedMediaSource endstreaming"),this.player.emit(lt.mseSourceEndStreaming)})),s=t(this.mediaSource,es,(()=>{this.player.debug.log(this.TAG_NAME,"ManagedMediaSource qualitychange")}));this.eventListenList.push(e,i,s)}}_onMediaSourceSourceOpen(){this.sourceBuffer||(this.player.debug.log("MediaSource","onMediaSourceSourceOpen() sourceBuffer is null and next init"),this._initSourceBuffer()),this.audioSourceBuffer||(this.player.debug.log("MediaSource","onMediaSourceSourceOpen() audioSourceBuffer is null and next init"),this._initAudioSourceBuffer()),this._hasPendingSegments()&&this._doAppendSegments()}initVideoEvents(){const{proxy:e}=this.player.events;this.player.on(lt.visibilityChange,(e=>{e&&setTimeout((()=>{if(this.player.isPlaying()&&this.$videoElement){const e=this.getVideoBufferLastTime();e-this.$videoElement.currentTime>this.getMseBufferMaxDelayTime()&&(this.player.debug.log(this.TAG_NAME,`visibilityChange is true and lastTime is ${e} and currentTime is ${this.$videoElement.currentTime} so set currentTime to lastTime`),this.$videoElement.currentTime=e)}}),300)}));const t=e(this.$videoElement,ts,(()=>{this.player.debug.log(this.TAG_NAME,"video canplay"),this.$videoElement.play().then((()=>{this.player.emit(lt.removeLoadingBgImage),ko()?this.supportVideoFrameCallbackHandle||(this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this))):this.player.isUseHls265()&&(this._stopCanvasRender(),this.canvasRenderInterval=setInterval((()=>{this.player.video.render({$video:this.$videoElement,ts:parseInt(1e3*this.$videoElement.currentTime,10)||0})}),40)),this.player.debug.log(this.TAG_NAME,"video play")})).catch((e=>{this.player.debug.error(this.TAG_NAME,"video play error ",e),this.player.emitError(ut.mediaSourceUseCanvasRenderPlayFailed,e)}))})),i=e(this.$videoElement,is,(()=>{this.player.debug.log(this.TAG_NAME,"video waiting")})),s=e(this.$videoElement,ss,(e=>{parseInt(e.timeStamp,10),this.$videoElement.paused&&(this.player.debug.warn(this.TAG_NAME,"video is paused and next try to replay"),this.$videoElement.play().then((()=>{this.player.debug.log(this.TAG_NAME,"video is paused and replay success")})).catch((e=>{this.player.debug.warn(this.TAG_NAME,"video is paused and replay error ",e)})))})),r=e(this.$videoElement,rs,(()=>{this.player.debug.log(this.TAG_NAME,"video playback Rate change",this.$videoElement&&this.$videoElement.playbackRate),this.$videoElement&&this.$videoElement.paused&&this.player.debug.warn(this.TAG_NAME,"ratechange and video is paused")}));this.eventListenList.push(t,i,s,r)}videoFrameCallback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.player.isDestroyedOrClosed())return void this.player.debug.log(this.TAG_NAME,"videoFrameCallback() player is destroyed");const i=parseInt(1e3*Math.max(t.mediaTime,this.$videoElement.currentTime),10)||0;this.player.handleRender(),this.player.video.render({$video:this.$videoElement,ts:i}),this.player.isUseHls265()&&this.player.updateStats({fps:!0,ts:i}),this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this))}decodeVideo(e,t,i,s){const r=this.player;if(r)if(this.player.isDestroyedOrClosed())this.player.debug.warn(this.TAG_NAME,"decodeVideo() player is destroyed");else if(this.hasInit)if(!this.isDecodeFirstIIframe&&i&&(this.isDecodeFirstIIframe=!0),this.isDecodeFirstIIframe){if(i&&0===e[1]){const t=15&e[0];let i={};if(t===vt){i=Dn(e.slice(5))}else t===wt&&(i=zn(e));const s=this.player.video.videoInfo;s&&s.width&&s.height&&i&&i.codecWidth&&i.codecHeight&&(i.codecWidth!==s.width||i.codecHeight!==s.height)&&(this.player.debug.warn(this.TAG_NAME,`\n decodeVideo: video width or height is changed,\n old width is ${s.width}, old height is ${s.height},\n new width is ${i.codecWidth}, new height is ${i.codecHeight},\n and emit change event`),this.isWidthOrHeightChanged=!0,this.player.emitError(ut.mseWidthOrHeightChange))}if(this.isWidthOrHeightChanged)return void this.player.debug.warn(this.TAG_NAME,"decodeVideo: video width or height is changed, and return");if(go(e))return void this.player.debug.warn(this.TAG_NAME,"decodeVideo and payload is video sequence header so drop this frame");if(e.byteLength<12)return void this.player.debug.warn(this.TAG_NAME,`decodeVideo and payload is too small , payload length is ${e.byteLength}`);let r=t;if(this.player.isPlayer()){if(null===this.firstRenderTime&&(this.firstRenderTime=t),r=t-this.firstRenderTime,r<0&&(this.player.debug.warn(this.TAG_NAME,`decodeVideo\n local dts is < 0 , ts is ${t} and prevTs is ${this.prevTs},\n firstRenderTime is ${this.firstRenderTime} and mseCorrectTimeDuration is ${this.player._opt.mseCorrectTimeDuration}`),r=null===this.prevDts?0:this.prevDts+this.player._opt.mseCorrectTimeDuration,this._checkTsIsMaxDiff(t)))return this.player.debug.warn(this.TAG_NAME,`decodeVideo is max diff , ts is ${t} and prevTs is ${this.prevTs}, diff is ${this.prevTs-t} and emit replay`),void this.player.emitError(ut.mediaSourceTsIsMaxDiff,`decodeVideo is max diff, prevTs is ${this.prevTs} and ts is ${t}`);if(null!==this.prevDts&&r<=this.prevDts){if(this.player.debug.warn(this.TAG_NAME,`\n decodeVideo dts is less than(or equal) prev dts ,\n dts is ${r} and prev dts is ${this.prevDts} ,\n and now ts is ${t} and prev ts is ${this.prevTs} ,\n and diff is ${t-this.prevTs} and firstRenderTime is ${this.firstRenderTime} and isIframe is ${i},\n and mseCorrectTimeDuration is ${this.player._opt.mseCorrectTimeDuration},\n and prevPayloadBufferSize is ${this.prevPayloadBufferSize} and payload size is ${e.byteLength}`),r===this.prevDts&&this.prevPayloadBufferSize===e.byteLength)return void this.player.debug.warn(this.TAG_NAME,"decodeVideo dts is equal to prev dts and payload size is equal to prev payload size so drop this frame");if(r=this.prevDts+this.player._opt.mseCorrectTimeDuration,this._checkTsIsMaxDiff(t))return this.player.debug.warn(this.TAG_NAME,`decodeVideo is max diff , ts is ${t} and prevTs is ${this.prevTs}, diff is ${this.prevTs-t} and emit replay`),void this.emit(ut.mediaSourceTsIsMaxDiff,`decodeVideo is max diff, prevTs is ${this.prevTs} and ts is ${t}`)}}this.player.isPlayer()?this._decodeVideo(e,r,i,s,t):this.player.isPlayback()&&Ao(this.player.playbackPause)&&(this.player.playback.isUseLocalCalculateTime&&this.player.playback.increaseLocalTimestamp(),this._decodeVideo(e,r,i,s,t)),this.prevDts=r,this.prevPayloadBufferSize=e.byteLength,this.prevTs=t}else this.player.debug.log(this.TAG_NAME,"decodeVideo first frame is not iFrame");else if(i&&e[1]===vs){const s=15&e[0];if(r.video.updateVideoInfo({encTypeCode:s}),s===wt&&Ao(La()))return void this.player.emitError(ut.mediaSourceH265NotSupport);r._times.decodeStart||(r._times.decodeStart=ha()),this.hasInit=this._decodeConfigurationRecord(e,t,i,s)}else this.player.debug.warn(this.TAG_NAME,`decodeVideo has not init , isIframe is ${i} , payload is ${e[1]}`)}decodeAudio(e,t){if(this.player)if(this.player.isDestroyedOrClosed())this.player.debug.warn(this.TAG_NAME,"decodeAudio() player is destroyed");else if(Ao(this.hasAudioInit))this.hasAudioInit=this._decodeAudioConfigurationRecord(e,t);else{let i=t;if(Wr(e))return void this.player.debug.log(this.TAG_NAME,"decodeAudio and has already initialized and payload is aac codec packet so drop this frame");if(this._clearAudioNoDataCheckTimeout(),this.isDecodeFirstIIframe){if(this.player.isPlayer()){if(null===this.firstAudioTime&&(this.firstAudioTime=t,null!==this.firstRenderTime&&null!==this.prevTs)){const e=Math.abs(this.firstRenderTime-this.prevTs);e>300&&(this.firstAudioTime-=e,this.player.debug.warn(this.TAG_NAME,`video\n firstAudioTime is ${this.firstRenderTime} and current time is ${this.prevTs}\n play time is ${e} and firstAudioTime ${t} - ${e} = ${this.firstAudioTime}`))}if(i=t-this.firstAudioTime,i<0&&(this.player.debug.warn(this.TAG_NAME,`decodeAudio\n local dts is < 0 , ts is ${t} and prevTs is ${this.prevAudioTs},\n firstAudioTime is ${this.firstAudioTime}`),i=null===this.prevAudioDts?0:this.prevAudioDts+this.player._opt.mseCorrectAudioTimeDuration,this._checkAudioTsIsMaxDiff(t)))return this.player.debug.warn(this.TAG_NAME,`decodeAudio is max diff , ts is ${t} and prevTs is ${this.prevAudioDts}, diff is ${this.prevAudioDts-t} and emit replay`),void this.player.emitError(ut.mediaSourceTsIsMaxDiff,`decodeAudio is max diff, prevTs is ${this.prevAudioDts} and ts is ${t}`);null!==this.prevAudioTs&&i<=this.prevAudioDts&&(this.player.debug.warn(this.TAG_NAME,`\n decodeAudio dts is less than(or equal) prev dts ,\n dts is ${i} and prev dts is ${this.prevAudioDts} ,\n and now ts is ${t} and prev ts is ${this.prevAudioTs} ,\n and diff is ${t-this.prevAudioTs}`),i=this.prevAudioDts+this.player._opt.mseCorrectAudioTimeDuration)}(this.player.isPlayer()||this.player.isPlayback()&&Ao(this.player.playbackPause))&&this._decodeAudio(e,i,t),this.prevAudioTs=t,this.prevAudioDts=i}else this.player.debug.log(this.TAG_NAME,"decodeAudio first frame is not iFrame")}}_checkTsIsMaxDiff(e){return this.prevTs>0&&e<this.prevTs&&this.prevTs-e>Z}_checkAudioTsIsMaxDiff(e){return this.prevAudioTs>0&&e<this.prevAudioTs&&this.prevAudioTs-e>Z}_decodeConfigurationRecord(e,t,i,s){let r=e.slice(5),a={};if(s===vt?a=Dn(r):s===wt&&(a=$n(r)),qa(a)||0===a.codecWidth&&0===a.codecHeight)return this.player.debug.warn(this.TAG_NAME,"_decodeConfigurationRecord",a),this.player.emitError(ut.mediaSourceDecoderConfigurationError),!1;this.player.recorder&&this.player._opt.recordType===S&&this.player.recorder.initMetaData(e,s);const o={id:_r,type:"video",timescale:1e3,duration:0,avcc:r,codecWidth:a.codecWidth,codecHeight:a.codecHeight,videoType:a.videoType},n=zh.generateInitSegment(o);this.isAvc=s===vt;let l=a.codec;return this.videoMimeType=l?`video/mp4; codecs="${a.codec}"`:this.isAvc?ci:ui,this._initSourceBuffer(),this.appendBuffer(n.buffer),this.sequenceNumber=0,this.cacheTrack={},!0}_decodeAudioConfigurationRecord(e,t){const i=e[0]>>4,s=i===kt,r=i===Et;if(Ao(r||s))return this.player.debug.warn(this.TAG_NAME,`_decodeAudioConfigurationRecord audio codec is not support , codecId is ${i} ant auto wasm decode`),this.player.emit(ut.mediaSourceAudioG711NotSupport),!1;const a={id:vr,type:"audio",timescale:1e3};let o={};if(Wr(e)){if(o=function(e){let t=new Uint8Array(e),i=null,s=0,r=0,a=0,o=null;if(s=r=t[0]>>>3,a=(7&t[0])<<1|t[1]>>>7,a<0||a>=Yr.length)return void console.error("Flv: AAC invalid sampling frequency index!");let n=Yr[a],l=(120&t[1])>>>3;if(l<0||l>=8)return void console.log("Flv: AAC invalid channel configuration");5===s&&(o=(7&t[1])<<1|t[2]>>>7,t[2]);let d=self.navigator.userAgent.toLowerCase();return-1!==d.indexOf("firefox")?a>=6?(s=5,i=new Array(4),o=a-3):(s=2,i=new Array(2),o=a):-1!==d.indexOf("android")?(s=2,i=new Array(2),o=a):(s=5,o=a,i=new Array(4),a>=6?o=a-3:1===l&&(s=2,i=new Array(2),o=a)),i[0]=s<<3,i[0]|=(15&a)>>>1,i[1]=(15&a)<<7,i[1]|=(15&l)<<3,5===s&&(i[1]|=(15&o)>>>1,i[2]=(1&o)<<7,i[2]|=8,i[3]=0),{audioType:"aac",config:i,sampleRate:n,channelCount:l,objectType:s,codec:"mp4a.40."+s,originalCodec:"mp4a.40."+r}}(e.slice(2)),!o)return!1;a.audioSampleRate=o.sampleRate,a.channelCount=o.channelCount,a.config=o.config,a.refSampleDuration=1024/a.audioSampleRate*a.timescale}else{if(!s)return!1;if(o=function(e){if(e.length<4)return void console.error("Invalid MP3 packet, header missing!");let t=new Uint8Array(e.buffer),i=null;if(255!==t[0])return void console.error("Invalid MP3 packet, first byte != 0xFF ");let s=t[1]>>>3&3,r=(6&t[1])>>1,a=(240&t[2])>>>4,o=(12&t[2])>>>2,n=3!=(t[3]>>>6&3)?2:1,l=0,d=0;switch(s){case 0:l=Vh[o];break;case 2:l=Hh[o];break;case 3:l=$h[o]}switch(r){case 1:a<qh.length&&(d=qh[a]);break;case 2:a<Jh.length&&(d=Jh[a]);break;case 3:a<Wh.length&&(d=Wh[a])}return i={bitRate:d,samplingRate:l,channelCount:n,codec:"mp3",originalCodec:"mp3",audioType:"mp3"},i}(e),!o)return!1;a.audioSampleRate=o.samplingRate,a.channelCount=o.channelCount,a.refSampleDuration=1152/a.audioSampleRate*a.timescale}a.codec=o.codec,a.duration=0;let n="mp4",l=o.codec,d=null;s&&Ao(_a())?(n="mpeg",l="",d=new Uint8Array):d=zh.generateInitSegment(a);let h=`${a.type}/${n}`;return l&&l.length>0&&(h+=`;codecs=${l}`),Ao(this.isAudioInitInfo)&&(this.player.audio.updateAudioInfo({encTypeCode:i,channels:a.channelCount,sampleRate:a.audioSampleRate}),this.isAudioInitInfo=!0),this.audioMimeType=h,this.isAAC=r,this._initAudioSourceBuffer(),this.appendAudioBuffer(d.buffer),!0}_initSourceBuffer(){const{debug:e,events:{proxy:t}}=this.player;if(null===this.sourceBuffer&&null!==this.mediaSource&&this.isStateOpen&&this.videoMimeType){try{this.sourceBuffer=this.mediaSource.addSourceBuffer(this.videoMimeType),e.log(this.TAG_NAME,"_initSourceBuffer() this.mediaSource.addSourceBuffer()",this.videoMimeType)}catch(t){return e.error(this.TAG_NAME,"appendBuffer() this.mediaSource.addSourceBuffer()",t.code,t),this.player.emitError(ut.mseAddSourceBufferError,t),void(this.mediaSourceAddSourceBufferError=!0)}if(this.sourceBuffer){const i=t(this.sourceBuffer,"error",(t=>{this.mediaSourceBufferError=!0,e.error(this.TAG_NAME,"mseSourceBufferError this.sourceBuffer",t),this.player.emitError(ut.mseSourceBufferError,t)})),s=t(this.sourceBuffer,"updateend",(()=>{this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this.hasPendingEos&&(this.player.debug.log(this.TAG_NAME,"videoSourceBuffer updateend and hasPendingEos is true, next endOfStream()"),this.endOfStream())}));this.eventListenList.push(i,s)}}else e.log(this.TAG_NAME,`_initSourceBuffer and this.isStateOpen is ${this.isStateOpen} and this.isAvc === null is ${null===this.isAvc}`)}_initAudioSourceBuffer(){const{debug:e,events:{proxy:t}}=this.player;if(null===this.audioSourceBuffer&&null!==this.mediaSource&&this.isStateOpen&&this.audioMimeType){try{this.audioSourceBuffer=this.mediaSource.addSourceBuffer(this.audioMimeType),this._clearAudioSourceBufferCheckTimeout(),e.log(this.TAG_NAME,"_initAudioSourceBuffer() this.mediaSource.addSourceBuffer()",this.audioMimeType)}catch(t){return e.error(this.TAG_NAME,"appendAudioBuffer() this.mediaSource.addSourceBuffer()",t.code,t),this.player.emitError(ut.mseAddSourceBufferError,t),void(this.mediaSourceAddSourceBufferError=!0)}if(this.audioSourceBuffer){const i=t(this.audioSourceBuffer,"error",(t=>{this.mediaSourceBufferError=!0,e.error(this.TAG_NAME,"mseSourceBufferError this.audioSourceBuffer",t),this.player.emitError(ut.mseSourceBufferError,t)})),s=t(this.audioSourceBuffer,"updateend",(()=>{this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this.hasPendingEos&&(this.player.debug.log(this.TAG_NAME,"audioSourceBuffer updateend and hasPendingEos is true, next endOfStream()"),this.endOfStream())}));this.eventListenList.push(i,s),null===this.audioSourceNoDataCheckTimeout&&(this.audioSourceNoDataCheckTimeout=setTimeout((()=>{this._clearAudioNoDataCheckTimeout(),this.player.emit(ut.mediaSourceAudioNoDataTimeout)}),1e3))}}else e.log(this.TAG_NAME,`_initAudioSourceBuffer and this.isStateOpen is ${this.isStateOpen} and this.audioMimeType is ${this.audioMimeType}`)}_decodeVideo(e,t,i,s,r){const a=this.player;let o=e.slice(5),n=o.byteLength;if(0===n)return void a.debug.warn(this.TAG_NAME,"_decodeVideo payload bytes is 0 and return");let l=(new Date).getTime(),d=!1;this.prevTimestamp||(this.prevTimestamp=l,d=!0);const h=l-this.prevTimestamp;this.decodeDiffTimestamp=h,h>500&&!d&&this.player.isPlayer()&&a.debug.warn(this.TAG_NAME,`_decodeVideo now time is ${l} and prev time is ${this.prevTimestamp}, diff time is ${h} ms`);const c=this.$videoElement;if(this.cacheTrack.id&&t>=this.cacheTrack.dts){let e=8+this.cacheTrack.size,i=new Uint8Array(e);i[0]=e>>>24&255,i[1]=e>>>16&255,i[2]=e>>>8&255,i[3]=255&e,i.set(zh.types.mdat,4),i.set(this.cacheTrack.data,8),this.cacheTrack.duration=t-this.cacheTrack.dts;let s=zh.moof(this.cacheTrack,this.cacheTrack.dts);this.cacheTrack={};let o=new Uint8Array(s.byteLength+i.byteLength);o.set(s,0),o.set(i,s.byteLength),this.appendBuffer(o.buffer),a.emit(lt.timeUpdate,r),a.isPlayer()?a.isUseHls265()?a.updateStats({dfps:!0,mseTs:t}):a.updateStats({fps:!0,dfps:!0,ts:r,mseTs:t}):a.isPlayback()&&a.playback.updateStats({ts:r}),a._times.videoStart||(a._times.videoStart=ha(),a.handlePlayToRenderTimes())}else a.debug.log(this.TAG_NAME,`cacheTrack = {} now dts is ${t}, and ts is ${r} cacheTrack dts is ${this.cacheTrack&&this.cacheTrack.dts}`),this.cacheTrack={};this.cacheTrack||(this.cacheTrack={}),this.cacheTrack.id=_r,this.cacheTrack.sequenceNumber=++this.sequenceNumber,this.cacheTrack.size=n,this.cacheTrack.dts=t,this.cacheTrack.cts=s,this.cacheTrack.isKeyframe=i,this.cacheTrack.data=o,this.cacheTrack.flags={isLeading:0,dependsOn:i?2:1,isDependedOn:i?1:0,hasRedundancy:0,isNonSync:i?0:1},!this.isInitInfo&&c.videoWidth>0&&c.videoHeight>0&&(a.debug.log(this.TAG_NAME,`updateVideoInfo: ${c.videoWidth},${c.videoHeight}`),a.video.updateVideoInfo({width:c.videoWidth,height:c.videoHeight}),a.video.initCanvasViewSize(),this.isInitInfo=!0),a._opt.mseUseCanvasRender&&Ao(this.isSupportVideoFrameCallback)&&Ao(a.isUseHls265())&&a.video.render({$video:c,ts:t}),this.prevTimestamp=(new Date).getTime()}_stopCanvasRender(){this.canvasRenderInterval&&(clearInterval(this.canvasRenderInterval),this.canvasRenderInterval=null)}_decodeAudio(e,t,i){const s=this.player;let r=this.isAAC?e.slice(2):e.slice(1),a=r.byteLength;if(this.cacheAudioTrack.id&&t>=this.cacheAudioTrack.dts){let e=8+this.cacheAudioTrack.size,i=new Uint8Array(e);i[0]=e>>>24&255,i[1]=e>>>16&255,i[2]=e>>>8&255,i[3]=255&e,i.set(zh.types.mdat,4),i.set(this.cacheAudioTrack.data,8),this.cacheAudioTrack.duration=t-this.cacheAudioTrack.dts;let s=zh.moof(this.cacheAudioTrack,this.cacheAudioTrack.dts);this.cacheAudioTrack={};let r=new Uint8Array(s.byteLength+i.byteLength);r.set(s,0),r.set(i,s.byteLength),this.appendAudioBuffer(r.buffer)}else s.debug.log(this.TAG_NAME,`cacheAudioTrack = {} now dts is ${t} cacheAudioTrack dts is ${this.cacheAudioTrack&&this.cacheAudioTrack.dts}`),this.cacheAudioTrack={};this.cacheAudioTrack||(this.cacheAudioTrack={}),this.cacheAudioTrack.id=vr,this.cacheAudioTrack.sequenceNumber=++this.audioSequenceNumber,this.cacheAudioTrack.size=a,this.cacheAudioTrack.dts=t,this.cacheAudioTrack.cts=0,this.cacheAudioTrack.data=r,this.cacheAudioTrack.flags={isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}appendBuffer(e){if(this.player.isDestroyedOrClosed())return void this.player.debug.warn(this.TAG_NAME,"appendBuffer() player is destroyed");const{debug:t,events:{proxy:i}}=this.player;this.mediaSourceAddSourceBufferError?t.warn(this.TAG_NAME,"appendBuffer() this.mediaSourceAddSourceBufferError is true"):this.mediaSourceAppendBufferFull?t.warn(this.TAG_NAME,"appendBuffer() this.mediaSourceAppendBufferFull is true"):this.mediaSourceAppendBufferError?t.warn(this.TAG_NAME,"appendBuffer() this.mediaSourceAppendBufferError is true"):this.mediaSourceBufferError?t.warn(this.TAG_NAME,"appendBuffer() this.mediaSourceBufferError is true"):(this.pendingSegments.push(e),this.sourceBuffer&&(this.player.isPlayer()&&this._handleUpdatePlaybackRate(),this.player.isPlayback()&&(this._handleUpdateBufferDelayTime(),this._checkVideoPlayCurrentTime()),this.player._opt.mseAutoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanUpSourceBuffer(),Ao(this.getSourceBufferUpdating())&&this.isStateOpen&&Ao(this._hasPendingRemoveRanges()))?this._doAppendSegments():this.isStateClosed?(this.mediaSourceBufferError=!0,this.player.emitError(ut.mseSourceBufferError,"mediaSource is not attached to video or mediaSource is closed")):this.isStateEnded?(this.mediaSourceBufferError=!0,this.player.emitError(ut.mseSourceBufferError,"mediaSource is end")):this._hasPendingRemoveRanges()&&t.log(this.TAG_NAME,`video has pending remove ranges and video length is ${this.pendingRemoveRanges.length}, audio length is ${this.pendingAudioRemoveRanges.length}`))}appendAudioBuffer(e){if(this.player.isDestroyedOrClosed())return void this.player.debug.warn(this.TAG_NAME,"appendAudioBuffer() player is destroyed");const{debug:t,events:{proxy:i}}=this.player;this.mediaSourceAddSourceBufferError?t.warn(this.TAG_NAME,"appendAudioBuffer() this.mediaSourceAddSourceBufferError is true"):this.mediaSourceAppendBufferFull?t.warn(this.TAG_NAME,"appendAudioBuffer() this.mediaSourceAppendBufferFull is true"):this.mediaSourceAppendBufferError?t.warn(this.TAG_NAME,"appendAudioBuffer() this.mediaSourceAppendBufferError is true"):this.mediaSourceBufferError?t.warn(this.TAG_NAME,"appendAudioBuffer() this.mediaSourceBufferError is true"):(this.pendingAudioSegments.push(e),this.audioSourceBuffer&&(this.player.isPlayer()&&this._handleUpdatePlaybackRate(),this.player.isPlayback()&&(this._handleUpdateBufferDelayTime(),this._checkVideoPlayCurrentTime()),this.player._opt.mseAutoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanUpSourceBuffer(),Ao(this.getAudioSourceBufferUpdating())&&this.isStateOpen&&Ao(this._hasPendingRemoveRanges()))?this._doAppendSegments():this.isStateClosed?(this.mediaSourceBufferError=!0,this.player.emitError(ut.mseSourceBufferError,"mediaSource is not attached to video or mediaSource is closed")):this.isStateEnded?(this.mediaSourceBufferError=!0,this.player.emitError(ut.mseSourceBufferError,"mediaSource is end")):this._hasPendingRemoveRanges()&&t.log(this.TAG_NAME,`audio has pending remove ranges and video length is ${this.pendingRemoveRanges.length}, audio length is ${this.pendingAudioRemoveRanges.length}`))}getSourceBufferUpdating(){return this.sourceBuffer&&this.sourceBuffer.updating}getAudioSourceBufferUpdating(){return this.audioSourceBuffer&&this.audioSourceBuffer.updating}stop(){this.abortSourceBuffer(),this.removeSourceBuffer(),this.endOfStream()}checkSourceBufferDelay(){const e=this.$videoElement;let t=0,i=0;return e.buffered.length>0&&(i=e.buffered.end(e.buffered.length-1),t=i-e.currentTime),t<0&&(this.player.debug.warn(this.TAG_NAME,`checkMSESourceBufferDelay ${t} < 0, and buffered is ${i} ,currentTime is ${e.currentTime} , try to seek ${e.currentTime} to ${i}`),e.currentTime=i,t=0),t}checkSourceBufferStore(){const e=this.$videoElement;let t=0;return e.buffered.length>0&&(t=e.currentTime-e.buffered.start(0)),t}getDecodeDiffTimes(){return this.decodeDiffTimestamp}removeBuffer(e,t){const i=eo();if(this.player.debug.log(this.TAG_NAME,`removeBuffer() start is ${e} and end is ${t} and _isMacOsFirefox is ${i}`),this.isStateOpen&&Ao(i)){if(Ao(this.getSourceBufferUpdating()))try{this.sourceBuffer.remove(e,t)}catch(e){this.player.debug.warn(this.TAG_NAME,"removeBuffer() sourceBuffer error",e)}if(Ao(this.getAudioSourceBufferUpdating()))try{this.audioSourceBuffer.remove(e,t)}catch(e){this.player.debug.warn(this.TAG_NAME,"removeBuffer() audioSourceBuffer error",e)}}}clearUpAllSourceBuffer(){if(this.sourceBuffer){const e=this.sourceBuffer.buffered;for(let t=0;t<e.length;t++){let i=e.start(t),s=e.end(t);this.pendingRemoveRanges.push({start:i,end:s})}Ao(this.getSourceBufferUpdating())&&this._doRemoveRanges()}if(this.audioSourceBuffer){const e=this.audioSourceBuffer.buffered;for(let t=0;t<e.length;t++){let i=e.start(t),s=e.end(t);this.pendingAudioRemoveRanges.push({start:i,end:s})}Ao(this.getAudioSourceBufferUpdating())&&this._doRemoveRanges()}}endOfStream(){if(this.isStateOpen&&this.$videoElement&&this.$videoElement.readyState>=1)if(this.getSourceBufferUpdating()||this.getAudioSourceBufferUpdating())this.hasPendingEos=!0;else{this.hasPendingEos=!1;try{this.player.debug.log(this.TAG_NAME,"endOfStream()"),this.mediaSource.endOfStream()}catch(e){this.player.debug.warn(this.TAG_NAME,"endOfStream() error",e)}}}abortSourceBuffer(){if(this.isStateOpen){if(this.sourceBuffer){try{this.player.debug.log(this.TAG_NAME,"abortSourceBuffer() abort sourceBuffer"),this.sourceBuffer.abort()}catch(e){}Ao(this.getSourceBufferUpdating())&&this._doRemoveRanges()}if(this.audioSourceBuffer){try{this.player.debug.log(this.TAG_NAME,"abortSourceBuffer() abort audioSourceBuffer"),this.audioSourceBuffer.abort()}catch(e){}Ao(this.getAudioSourceBufferUpdating())&&this._doRemoveRanges()}}this.sourceBuffer=null,this.audioSourceBuffer=null}removeSourceBuffer(){if(!this.isStateClosed&&this.mediaSource){if(this.sourceBuffer)try{this.player.debug.log(this.TAG_NAME,"removeSourceBuffer() sourceBuffer"),this.mediaSource.removeSourceBuffer(this.sourceBuffer)}catch(e){this.player.debug.error(this.TAG_NAME,"removeSourceBuffer() sourceBuffer error",e)}if(this.audioSourceBuffer)try{this.player.debug.log(this.TAG_NAME,"removeSourceBuffer() audioSourceBuffer"),this.mediaSource.removeSourceBuffer(this.audioSourceBuffer)}catch(e){this.player.debug.error(this.TAG_NAME,"removeSourceBuffer() audioSourceBuffer error",e)}}}_hasPendingSegments(){return this.pendingSegments.length>0||this.pendingAudioSegments.length>0}getPendingSegmentsLength(){return this.pendingSegments.length}_handleUpdatePlaybackRate(){if(!this.$videoElement)return;const e=this.$videoElement;this.player._opt.videoBuffer,this.player._opt.videoBufferDelay;const t=e.buffered;t.length&&t.start(0);const i=t.length?t.end(t.length-1):0;let s=e.currentTime;const r=i-s,a=this.getMseBufferMaxDelayTime();if(this.player.updateStats({mseVideoBufferDelayTime:r}),r>a)this.player.debug.log(this.TAG_NAME,`handleUpdatePlaybackRate and buffered is ${i} and current is ${s} , delay buffer is more than ${a} is ${r} and new time is ${i}`),e.currentTime=i,s=e.currentTime;else if(r<0){if(this.player.debug.warn(this.TAG_NAME,`handleUpdatePlaybackRate and delay buffer is ${i} - current is ${s} = ${r} < 0 and check video is paused : ${e.paused} `),0===i)return void this.player.emit(ut.mediaSourceBufferedIsZeroError,"video.buffered is empty");e.paused&&e.play()}const o=this._getPlaybackRate(i-s);e.playbackRate!==o&&(this.player.debug.log(this.TAG_NAME,`handleUpdatePlaybackRate and buffered is ${i} and current time is ${s} and delay is ${i-s} set playbackRate is ${o} `),e.playbackRate=o)}_handleUpdateBufferDelayTime(){const e=this.getVideoBufferDelayTime();this.player.updateStats({mseVideoBufferDelayTime:e})}_checkVideoPlayCurrentTime(){const e=this.checkSourceBufferStore();if(e<0){const t=this.getVideoBufferStartTime();this.player.debug.warn(this.TAG_NAME,`checkVideoPlayCurrentTime store is ${e} < 0 and set currentTime ${this.$videoElement.currentTime} to ${t}`),this.$videoElement.currentTime=t}}_doAppendSegments(){if(this.isStateClosed||this.isStateEnded)this.player.debug.log(this.TAG_NAME,"_doAppendSegments() mediaSource is closed or ended and return");else if(null!==this.sourceBuffer){if(this.needInitAudio()&&null===this.audioSourceBuffer)return this.player.debug.log(this.TAG_NAME,"_doAppendSegments() audioSourceBuffer is null and need init audio source buffer"),void(null===this.audioSourceBufferCheckTimeout&&(this.audioSourceBufferCheckTimeout=setTimeout((()=>{this._clearAudioSourceBufferCheckTimeout(),this.player.emit(ut.mediaSourceAudioInitTimeout)}),1e3)));if(Ao(this.getSourceBufferUpdating())&&this.pendingSegments.length>0){const e=this.pendingSegments.shift();try{this.sourceBuffer.appendBuffer(e)}catch(e){this.player.debug.error(this.TAG_NAME,"this.sourceBuffer.appendBuffer()",e.code,e),22===e.code?(this.stop(),this.mediaSourceAppendBufferFull=!0,this.player.emitError(ut.mediaSourceFull)):11===e.code?(this.stop(),this.mediaSourceAppendBufferError=!0,this.player.emitError(ut.mediaSourceAppendBufferError)):(this.stop(),this.mediaSourceBufferError=!0,this.player.emitError(lt.mseSourceBufferError,e))}}if(Ao(this.getAudioSourceBufferUpdating())&&this.pendingAudioSegments.length>0){const e=this.pendingAudioSegments.shift();try{this.audioSourceBuffer.appendBuffer(e)}catch(e){this.player.debug.error(this.TAG_NAME,"this.audioSourceBuffer.appendBuffer()",e.code,e),22===e.code?(this.stop(),this.mediaSourceAppendBufferFull=!0,this.player.emitError(ut.mediaSourceFull)):11===e.code?(this.stop(),this.mediaSourceAppendBufferError=!0,this.player.emitError(ut.mediaSourceAppendBufferError)):(this.stop(),this.mediaSourceBufferError=!0,this.player.emitError(lt.mseSourceBufferError,e))}}}else this.player.debug.log(this.TAG_NAME,"_doAppendSegments() sourceBuffer is null and wait init and return")}_doCleanUpSourceBuffer(){if(!this.$videoElement)return;const e=this.$videoElement.currentTime;if(this.sourceBuffer){const t=this.sourceBuffer.buffered;let i=!1;for(let s=0;s<t.length;s++){let r=t.start(s),a=t.end(s);if(r<=e&&e<a+3){if(e-r>=this.player._opt.mseAutoCleanupMaxBackwardDuration){i=!0;let t=e-this.player._opt.mseAutoCleanupMinBackwardDuration;this.pendingRemoveRanges.push({start:r,end:t})}}else a<e&&(i=!0,this.pendingRemoveRanges.push({start:r,end:a}))}i&&Ao(this.getSourceBufferUpdating())&&this._doRemoveRanges()}if(this.audioSourceBuffer){const t=this.audioSourceBuffer.buffered;let i=!1;for(let s=0;s<t.length;s++){let r=t.start(s),a=t.end(s);if(r<=e&&e<a+3){if(e-r>=this.player._opt.mseAutoCleanupMaxBackwardDuration){i=!0;let t=e-this.player._opt.mseAutoCleanupMinBackwardDuration;this.pendingAudioRemoveRanges.push({start:r,end:t})}}else a<e&&(i=!0,this.pendingAudioRemoveRanges.push({start:r,end:a}))}i&&Ao(this.getAudioSourceBufferUpdating())&&this._doRemoveRanges()}}_hasPendingRemoveRanges(){return this.pendingRemoveRanges.length>0||this.pendingAudioRemoveRanges.length>0}_doRemoveRanges(){if(this.sourceBuffer&&Ao(this.getSourceBufferUpdating())){let e=this.pendingRemoveRanges;for(;e.length&&Ao(this.getSourceBufferUpdating());){let t=e.shift();try{this.sourceBuffer.remove(t.start,t.end)}catch(e){this.player.debug.warn(this.TAG_NAME,"_doRemoveRanges() sourceBuffer error",e)}}}if(this.audioSourceBuffer&&Ao(this.getAudioSourceBufferUpdating())){let e=this.pendingAudioRemoveRanges;for(;e.length&&Ao(this.getAudioSourceBufferUpdating());){let t=e.shift();try{this.audioSourceBuffer.remove(t.start,t.end)}catch(e){this.player.debug.warn(this.TAG_NAME,"_doRemoveRanges() audioSourceBuffer error",e)}}}}getDecodePlaybackRate(){let e=0;const t=this.$videoElement;return t&&(e=t.playbackRate),e}_getPlaybackRate(e){const t=this.$videoElement;let i=this.player._opt.videoBufferDelay+this.player._opt.videoBuffer;const s=Math.max(i,1e3),r=s/2;return e*=1e3,1===t.playbackRate?e>s?1.2:1:e<=r?1:t.playbackRate}_needCleanupSourceBuffer(){if(Ao(this.player._opt.mseAutoCleanupSourceBuffer)||!this.$videoElement)return!1;const e=this.$videoElement,t=e.buffered,i=e.currentTime;return t.length>=1&&i-t.start(0)>=this.player._opt.mseAutoCleanupMaxBackwardDuration}getVideoCurrentTime(){let e=0;return this.$videoElement&&(e=this.$videoElement.currentTime),e}getVideoBufferLastTime(){const e=this.$videoElement;let t=0;if(e){const i=e.buffered;i.length&&i.start(0);t=i.length?i.end(i.length-1):0}return t}getVideoBufferStartTime(){const e=this.$videoElement;let t=0;if(e){const i=e.buffered;t=i.length?i.start(0):0}return t}getVideoBufferDelayTime(){const e=this.$videoElement;const t=this.getVideoBufferLastTime()-e.currentTime;return t>0?t:0}_clearAudioSourceBufferCheckTimeout(){this.audioSourceBufferCheckTimeout&&(clearTimeout(this.audioSourceBufferCheckTimeout),this.audioSourceBufferCheckTimeout=null)}_clearAudioNoDataCheckTimeout(){this.audioSourceNoDataCheckTimeout&&(clearTimeout(this.audioSourceNoDataCheckTimeout),this.audioSourceNoDataCheckTimeout=null)}getMimeType(){return{video:this.videoMimeType,audio:this.audioMimeType}}getMseBufferMaxDelayTime(){let e=(this.player._opt.videoBuffer+this.player._opt.videoBufferDelay)/1e3;return Math.max(5,e+3)}}const Yh=()=>"wakeLock"in navigator&&-1===window.navigator.userAgent.indexOf("Samsung")&&Ao(wa());class Qh{constructor(e){this.player=e,this.enabled=!1,Yh()?(this.player.debug.log("NoSleep","Native Wake Lock API supported."),this._wakeLock=null,this.handleVisibilityChange=()=>{null!==this._wakeLock&&"visible"===document.visibilityState&&this.enable()},document.addEventListener("visibilitychange",this.handleVisibilityChange),document.addEventListener("fullscreenchange",this.handleVisibilityChange)):(this.player.debug.log("NoSleep","Native Wake Lock API not supported. so use video element."),this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSle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qOHggKVgPj//qOHggKpgPj//qOHggK9gPj//qOegQLDANECAAUQEBRgAGFgv9AAIgAQzX61yT5xzAAAo4eCAtGA+P/+o4eCAuWA+P/+o4eCAvmA+P/+o4eCAw2A+P/+o4eCAyGA+P/+o56BAycA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IDNYD4//6jh4IDSYD4//6jh4IDXYD4//6jh4IDcYD4//6jh4IDhYD4//6jnoEDiwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggOZgPj//qOHggOtgPj//qOHggPBgPj//qOHggPVgPj//qOHggPpgPj//qOegQPvANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCA/2A+P/+o4eCBBGA+P/+o4eCBCWA+P/+o4eCBDmA+P/+o4eCBE2A+P/+o56BBFMA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IEiID4//6jh4IEnID4//6jh4IEsID4//6jnoEEtwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggTEgPj//qOHggTYgPj//qOHggTsgPj//qOHggUAgPj//qOHggUUgPj//qOegQUbANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCBSiA+P/+o4eCBTyA+P/+o4eCBVCA+P/+o4eCBWSA+P/+o4eCBXiA+P/+o56BBX8A0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IFjID4//6jh4IFoID4//6jh4IFtID4//6jh4IFyID4//6jh4IF3ID4//6jnoEF4wDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggXwgPj//qOHggYEgPj//qOHggYYgPj//qOHggYsgPj//qOHggZAgPj//qOegQZHANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCBlSA+P/+o4eCBmiA+P/+o4eCBnyA+P/+o4eCBpCA+P/+o4eCBqSA+P/+o56BBqsA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IGuID4//6jh4IGzID4//6jh4IG4ID4//6jh4IG9ID4//6jh4IHCID4//6jnoEHDwDRAgAFEBAUYABhYL/QACIAEM1+tck+ccwAAKOHggccgPj//qOHggcwgPj//qOHggdEgPj//qOHggdYgPj//qOHggdsgPj//qOegQdzANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCB4CA+P/+o4eCB5SA+P/+o4eCB6iA+P/+o4eCB7yA+P/+o4eCB9CA+P/+o56BB9cA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IH5ID4//6jh4IH+ID4//6jh4IIDID4//6jh4IIIID4//6jh4IINID4//6jnoEIOwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHgghIgPj//qOHgghcgPj//qOHgghwgPj//qOHggiEgPj//qOegQifANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCCMCA+P/+o4eCCNSA+P/+o4eCCOiA+P/+o4eCCPyA+P/+o56BCQMA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IJEID4//6jh4IJJID4//6jh4IJOID4//6jh4IJTID4//6jh4IJYID4//6jnoEJZwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggl0gPj//qOHggmIgPj//qOHggmcgPj//qOHggmwgPj//qOHggnEgPj//qOegQnLANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCCdiA+P/+o4eCCeyA+P/+o4eCCgCA+P/+o4eCChSA+P/+o4eCCiiA+P/+o56BCi8A0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IKPID4//6jh4IKUID4//6jh4IKZID4//6jh4IKeID4//6jh4IKjID4//6jnoEKkwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggqggPj//qOHggq0gPj//qOHggrIgPj//qOHggrcgPj//qOHggrwgPj//qOegQr3ANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCCwSA+P/+o4eCCxiA+P/+o4eCCyyA+P/+o4eCC0CA+P/+o4eCC1SA+P/+o56BC1sA0QIABRAQFGAAYWC/0AAiABDNfrXJPnHMAACjh4ILaID4//6jh4ILfID4//6jh4ILkID4//6jh4ILpID4//6jh4ILuID4//6jnoELvwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggvMgPj//qOHggvggPj//qOHggv0gPj//qOHggwIgPj//qOHggwcgPj//qOegQwjANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCDDCA+P/+o4eCDESA+P/+o4eCDFiA+P/+o4eCDGyA+P/+o4eCDICA+P/+o56BDIcA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IMlID4//6jh4IMqID4//6jh4IMvID4//6jh4IM0ID4//6jnoEM6wDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHgg0MgPj//qOHgg0ggPj//qOHgg00gPj//qOHgg1IgPj//qOegQ1PANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCDVyA+P/+o4eCDXCA+P/+o4eCDYSA+P/+o4eCDZiA+P/+o4eCDayA+P/+o56BDbMA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4INwID4//6jh4IN1ID4//6jh4IN6ID4//6jh4IN/ID4//6jh4IOEID4//6jnoEOFwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHgg4kgPj//qOHgg44gPj//qOHgg5MgPj//qOHgg5ggPj//qOHgg50gPj//qOegQ57ANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCDoiA+P/+o4eCDpyA+P/+o4eCDrCA+P/+o4eCDsSA+P/+o4eCDtiA+P/+o56BDt8A0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IO7ID4//6jh4IPAID4//6jh4IPFID4//6jh4IPKID4//6jh4IPPID4//6jnoEPQwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHgg9QgPj//qOHgg9kgPj//qOHgg94gPj//qOHgg+MgPj//qOHgg+ggPj//qOegQ+nANECAAUQEBRgAGFgv9AAIgAQzX61yT5xzAAAo4eCD7SA+P/+o4eCD8iA+P/+o4eCD9yA+P/+o4eCD/CA+P/+o4eCEASA+P/+o56BEAsA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IQGID4//6jh4IQLID4//6jh4IQQID4//6jh4IQVID4//6jh4IQaID4//6jnoEQbwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHghB8gPj//qOHghCQgPj//qOHghCkgPj//qOHghC4gPj//qOHghDMgPj//qOegRDTANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCEOCA+P/+o4eCEPSA+P/+o4eCEQiA+P/+o56BETcA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IRQ4D4//6jh4IRV4D4//6jh4IRa4D4//6jh4IRf4D4//6jh4IRk4D4//6jnoERmwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHghGngPj//qOHghG7gPj//qOHghHPgPj//qOHghHjgPj//qOHghH3gPj//qOegRH/ANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCEguA+P/+o4eCEh+A+P/+o4eCEjOA+P/+o4eCEkeA+P/+o4eCEluA+P/+o56BEmMA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4ISb4D4//6jh4ISg4D4//6jh4ISl4D4//6jh4ISq4D4//6jh4ISv4D4//6jnoESxwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHghLTgPj//qOHghLngPj//qOHghL7gPj//qOHghMPgPj//qOHghMjgPj//qOegRMrANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCEzeA+P/+o4eCE0uA+P/+o4eCE1+A+P/+o4eCE3OA+P/+oAEAAAAAAAAPoYeCE4cA+P/+daKDB/KBHFO7a5G7j7OBB7eK94EB8YIDX/CBDA=="),this._addSourceToVideo(this.noSleepVideo,"mp4","data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACORtZGF03gIATGF2YzU4LjM1LjEwMAACMEAOAAACcQYF//9t3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE2MSByMzAyNyA0MTIxMjc3IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAyMCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTAgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0xIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MCBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0tMiB0aHJlYWRzPTcgbG9va2FoZWFkX3RocmVhZHM9MSBzbGljZWRfdGhyZWFkcz0wIG5yPTAgZGVjaW1hdGU9MSBpbnRlcmxhY2VkPTAgYmx1cmF5X2NvbXBhdD0wIGNvbnN0cmFpbmVkX2ludHJhPTAgYmZyYW1lcz0wIHdlaWdodHA9MCBrZXlpbnQ9MjUwIGtleWludF9taW49MTAgc2NlbmVjdXQ9NDAgaW50cmFfcmVmcmVzaD0wIHJjX2xvb2thaGVhZD00MCByYz1jcmYgbWJ0cmVlPTEgY3JmPTIzLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IGlwX3JhdGlvPTEuNDAgYXE9MToxLjAwAIAAAADvZYiED/JigADD7JycnJycnJycnJycnJycnJycnJ11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111114BGCAHARggBwEYIAcBGCAHARggBwAAAAdBmjgf4BLYARggBwEYIAcBGCAHARggBwAAAAdBmlQH+AS2ARggBwEYIAcBGCAHARgg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QAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAA3HN0Y28AAAAAAAAAMwAAADAAAAOtAAADzAAAA+cAAAQCAAAEIQAABDwAAARXAAAEdgAABJEAAASsAAAEywAABOIAAAT5AAAFGAAABTMAAAVOAAAFbQAABYgAAAWjAAAFwgAABd0AAAX4AAAGDwAABioAAAZFAAAGZAAABn8AAAaaAAAGuQAABtQAAAbvAAAHDgAABykAAAc8AAAHWwAAB3YAAAeRAAAHsAAAB8sAAAfmAAAIBQAACCAAAAg7AAAIWgAACG0AAAiIAAAIpwAACMIAAAjdAAAI/AAAABpzZ3BkAQAAAHJvbGwAAAACAAAAAf//AAAAHHNiZ3AAAAAAcm9sbAAAAAEAAADSAAAAAQAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTguMjAuMTAw"),Object.assign(this.noSleepVideo.style,{position:"absolute",left:"-100%",top:"-100%"}),document.querySelector("body").append(this.noSleepVideo),this.handleNoSleepVideoTimeUpdate=()=>{this.noSleepVideo&&this.noSleepVideo.currentTime>4&&(this.noSleepVideo.currentTime=1)},this.noSleepVideo.addEventListener("timeupdate",this.handleNoSleepVideoTimeUpdate))}destroy(){if(this._wakeLock&&(this._wakeLock.release(),this._wakeLock=null),this.noSleepVideo){this.handleNoSleepVideoTimeUpdate&&this.noSleepVideo.removeEventListener("timeupdate",this.handleNoSleepVideoTimeUpdate);try{this.noSleepVideo.parentNode&&this.noSleepVideo.parentNode.removeChild(this.noSleepVideo)}catch(e){this.player.debug.warn("NoSleep","Failed to remove noSleepVideo element.")}this.noSleepVideo=null}this.handleVisibilityChange&&(document.removeEventListener("visibilitychange",this.handleVisibilityChange),document.removeEventListener("fullscreenchange",this.handleVisibilityChange))}_addSourceToVideo(e,t,i){var s=document.createElement("source");s.src=i,s.type=`video/${t}`,e.appendChild(s)}get isEnabled(){return this.enabled}enable(){const e=this.player.debug;if(Yh())return navigator.wakeLock.request("screen").then((t=>{this._wakeLock=t,this.enabled=!0,e.log("wakeLock","Wake Lock active."),this._wakeLock.addEventListener("release",(()=>{e.log("wakeLock","Wake Lock released.")}))})).catch((t=>{throw this.enabled=!1,e.warn("wakeLock",`${t.name}, ${t.message}`),t}));return this.noSleepVideo.play().then((t=>(e.log("wakeLock","noSleepVideo Wake Lock active."),this.enabled=!0,t))).catch((t=>{throw e.warn("wakeLock",`noSleepVideo ${t.name}, ${t.message}`),this.enabled=!1,t}))}disable(){Yh()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):this.noSleepVideo&&this.noSleepVideo.pause(),this.enabled=!1,this.player.debug.log("wakeLock","Disabling wake lock.")}}function Xh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Zh={exports:{}};!function(e,t){var i,s,r,a,o;i=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,s=/^(?=([^\/?#]*))\1([^]*)$/,r=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(e,t,i){if(i=i||{},e=e.trim(),!(t=t.trim())){if(!i.alwaysNormalize)return e;var r=o.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=o.normalizePath(r.path),o.buildURLFromParts(r)}var a=o.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return i.alwaysNormalize?(a.path=o.normalizePath(a.path),o.buildURLFromParts(a)):t;var n=o.parseURL(e);if(!n)throw new Error("Error trying to parse base URL.");if(!n.netLoc&&n.path&&"/"!==n.path[0]){var l=s.exec(n.path);n.netLoc=l[1],n.path=l[2]}n.netLoc&&!n.path&&(n.path="/");var d={scheme:n.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(d.netLoc=n.netLoc,"/"!==a.path[0]))if(a.path){var h=n.path,c=h.substring(0,h.lastIndexOf("/")+1)+a.path;d.path=o.normalizePath(c)}else d.path=n.path,a.params||(d.params=n.params,a.query||(d.query=n.query));return null===d.path&&(d.path=i.alwaysNormalize?o.normalizePath(a.path):a.path),o.buildURLFromParts(d)},parseURL:function(e){var t=i.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(r,"");e.length!==(e=e.replace(a,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=o}(Zh);var ec=Zh.exports;function tc(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,s)}return i}function ic(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?tc(Object(i),!0).forEach((function(t){rc(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):tc(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function sc(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var s=i.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function rc(e,t,i){return(t=sc(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function ac(){return ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},ac.apply(this,arguments)}const oc=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},nc=Number.isSafeInteger||function(e){return"number"==typeof e&&Math.abs(e)<=lc},lc=Number.MAX_SAFE_INTEGER||9007199254740991;let dc=function(e){return e.MEDIA_ATTACHING="hlsMediaAttaching",e.MEDIA_ATTACHED="hlsMediaAttached",e.MEDIA_DETACHING="hlsMediaDetaching",e.MEDIA_DETACHED="hlsMediaDetached",e.BUFFER_RESET="hlsBufferReset",e.BUFFER_CODECS="hlsBufferCodecs",e.BUFFER_CREATED="hlsBufferCreated",e.BUFFER_APPENDING="hlsBufferAppending",e.BUFFER_APPENDED="hlsBufferAppended",e.BUFFER_EOS="hlsBufferEos",e.BUFFER_FLUSHING="hlsBufferFlushing",e.BUFFER_FLUSHED="hlsBufferFlushed",e.MANIFEST_LOADING="hlsManifestLoading",e.MANIFEST_LOADED="hlsManifestLoaded",e.MANIFEST_PARSED="hlsManifestParsed",e.LEVEL_SWITCHING="hlsLevelSwitching",e.LEVEL_SWITCHED="hlsLevelSwitched",e.LEVEL_LOADING="hlsLevelLoading",e.LEVEL_LOADED="hlsLevelLoaded",e.LEVEL_UPDATED="hlsLevelUpdated",e.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",e.LEVELS_UPDATED="hlsLevelsUpdated",e.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",e.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",e.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",e.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",e.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",e.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",e.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",e.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",e.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",e.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",e.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",e.CUES_PARSED="hlsCuesParsed",e.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",e.INIT_PTS_FOUND="hlsInitPtsFound",e.FRAG_LOADING="hlsFragLoading",e.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",e.FRAG_LOADED="hlsFragLoaded",e.FRAG_DECRYPTED="hlsFragDecrypted",e.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",e.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",e.FRAG_PARSING_METADATA="hlsFragParsingMetadata",e.FRAG_PARSED="hlsFragParsed",e.FRAG_BUFFERED="hlsFragBuffered",e.FRAG_CHANGED="hlsFragChanged",e.FPS_DROP="hlsFpsDrop",e.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",e.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",e.ERROR="hlsError",e.DESTROYING="hlsDestroying",e.KEY_LOADING="hlsKeyLoading",e.KEY_LOADED="hlsKeyLoaded",e.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",e.BACK_BUFFER_REACHED="hlsBackBufferReached",e.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",e}({}),hc=function(e){return e.NETWORK_ERROR="networkError",e.MEDIA_ERROR="mediaError",e.KEY_SYSTEM_ERROR="keySystemError",e.MUX_ERROR="muxError",e.OTHER_ERROR="otherError",e}({}),cc=function(e){return e.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",e.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",e.KEY_SYSTEM_NO_SESSION="keySystemNoSession",e.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",e.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",e.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",e.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",e.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",e.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",e.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",e.MANIFEST_LOAD_ERROR="manifestLoadError",e.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",e.MANIFEST_PARSING_ERROR="manifestParsingError",e.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",e.LEVEL_EMPTY_ERROR="levelEmptyError",e.LEVEL_LOAD_ERROR="levelLoadError",e.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",e.LEVEL_PARSING_ERROR="levelParsingError",e.LEVEL_SWITCH_ERROR="levelSwitchError",e.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",e.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",e.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",e.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",e.FRAG_LOAD_ERROR="fragLoadError",e.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",e.FRAG_DECRYPT_ERROR="fragDecryptError",e.FRAG_PARSING_ERROR="fragParsingError",e.FRAG_GAP="fragGap",e.REMUX_ALLOC_ERROR="remuxAllocError",e.KEY_LOAD_ERROR="keyLoadError",e.KEY_LOAD_TIMEOUT="keyLoadTimeOut",e.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",e.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",e.BUFFER_APPEND_ERROR="bufferAppendError",e.BUFFER_APPENDING_ERROR="bufferAppendingError",e.BUFFER_STALLED_ERROR="bufferStalledError",e.BUFFER_FULL_ERROR="bufferFullError",e.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",e.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",e.INTERNAL_EXCEPTION="internalException",e.INTERNAL_ABORTED="aborted",e.UNKNOWN="unknown",e}({});const uc=function(){},pc={trace:uc,debug:uc,log:uc,warn:uc,info:uc,error:uc};let fc=pc;function mc(e,...t){t.forEach((function(t){fc[t]=e[t]?e[t].bind(e):function(e){const t=self.console[e];return t?t.bind(self.console,`[${e}] >`):uc}(t)}))}const gc=fc,yc=/^(\d+)x(\d+)$/,Ac=/(.+?)=(".*?"|.*?)(?:,|$)/g;class bc{constructor(e){"string"==typeof e&&(e=bc.parseAttrList(e)),ac(this,e)}get clientAttrs(){return Object.keys(this).filter((e=>"X-"===e.substring(0,2)))}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;const i=new Uint8Array(t.length/2);for(let e=0;e<t.length/2;e++)i[e]=parseInt(t.slice(2*e,2*e+2),16);return i}return null}hexadecimalIntegerAsNumber(e){const t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const i=this[e];return i?parseFloat(i):t}enumeratedString(e){return this[e]}bool(e){return"YES"===this[e]}decimalResolution(e){const t=yc.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e){let t;const i={};for(Ac.lastIndex=0;null!==(t=Ac.exec(e));){let e=t[2];0===e.indexOf('"')&&e.lastIndexOf('"')===e.length-1&&(e=e.slice(1,-1));i[t[1].trim()]=e}return i}}function _c(e){return"SCTE35-OUT"===e||"SCTE35-IN"===e}class vc{constructor(e,t){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,t){const i=t.attr;for(const t in i)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==i[t]){gc.warn(`DATERANGE tag attribute: "${t}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=t;break}e=ac(new bc({}),i,e)}if(this.attr=e,this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const e=new Date(this.attr["END-DATE"]);oc(e.getTime())&&(this._endDate=e)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get startDate(){return this._startDate}get endDate(){if(this._endDate)return this._endDate;const e=this.duration;return null!==e?new Date(this._startDate.getTime()+1e3*e):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(oc(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isValid(){return!!this.id&&!this._badValueForSameId&&oc(this.startDate.getTime())&&(null===this.duration||this.duration>=0)&&(!this.endOnNext||!!this.class)}}class wc{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var Sc="audio",Tc="video",Ec="audiovideo";class kc{constructor(e){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[Sc]:null,[Tc]:null,[Ec]:null},this.baseurl=e}setByteRange(e,t){const i=e.split("@",2);let s;s=1===i.length?(null==t?void 0:t.byteRangeEndOffset)||0:parseInt(i[1]),this._byteRange=[s,parseInt(i[0])+s]}get byteRange(){return this._byteRange?this._byteRange:[]}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=ec.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}}class Cc extends kc{constructor(e,t){super(t),this._decryptdata=null,this.rawProgramDateTime=null,this.programDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.stats=new wc,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const e=this.levelkeys.identity;if(e)this._decryptdata=e.getDecryptData(this.sn);else{const e=Object.keys(this.levelkeys);if(1===e.length)return this._decryptdata=this.levelkeys[e[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(null===this.programDateTime)return null;if(!oc(this.programDateTime))return null;const e=oc(this.duration)?this.duration:0;return this.programDateTime+1e3*e}get encrypted(){var e;if(null!=(e=this._decryptdata)&&e.encrypted)return!0;if(this.levelkeys){const e=Object.keys(this.levelkeys),t=e.length;if(t>1||1===t&&this.levelkeys[e[0]].encrypted)return!0}return!1}setKeyFormat(e){if(this.levelkeys){const t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}}abortRequests(){var e,t;null==(e=this.loader)||e.abort(),null==(t=this.keyLoader)||t.abort()}setElementaryStreamInfo(e,t,i,s,r,a=!1){const{elementaryStreams:o}=this,n=o[e];n?(n.startPTS=Math.min(n.startPTS,t),n.endPTS=Math.max(n.endPTS,i),n.startDTS=Math.min(n.startDTS,s),n.endDTS=Math.max(n.endDTS,r)):o[e]={startPTS:t,endPTS:i,startDTS:s,endDTS:r,partial:a}}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[Sc]=null,e[Tc]=null,e[Ec]=null}}class xc extends kc{constructor(e,t,i,s,r){super(i),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.stats=new wc,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=s;const a=e.enumeratedString("BYTERANGE");a&&this.setByteRange(a,r),r&&(this.fragOffset=r.fragOffset+r.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}class Rc{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e)return this.advanced=!0,void(this.updated=!0);const t=this.lastPartSn-e.lastPartSn,i=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!i||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||0===t&&i>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay}get hasProgramDateTime(){return!!this.fragments.length&&oc(this.fragments[this.fragments.length-1].programDateTime)}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||10}get drift(){const e=this.driftEndTime-this.driftStartTime;if(e>0){return 1e3*(this.driftEnd-this.driftStart)/e}return 1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){var e;return null!=(e=this.fragments)&&e.length?this.fragments[this.fragments.length-1].end:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].index:-1}get lastPartSn(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}function Dc(e){return Uint8Array.from(atob(e),(e=>e.charCodeAt(0)))}function Lc(e){const t=e.split(":");let i=null;if("data"===t[0]&&2===t.length){const e=t[1].split(";"),s=e[e.length-1].split(",");if(2===s.length){const t="base64"===s[0],r=s[1];t?(e.splice(-1,1),i=Dc(r)):i=function(e){const t=Ic(e).subarray(0,16),i=new Uint8Array(16);return i.set(t,16-t.length),i}(r)}}return i}function Ic(e){return Uint8Array.from(unescape(encodeURIComponent(e)),(e=>e.charCodeAt(0)))}const Pc="undefined"!=typeof self?self:void 0;var Bc={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},Mc="org.w3.clearkey",Uc="com.apple.streamingkeydelivery",Fc="com.microsoft.playready",Oc="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";function Nc(e){switch(e){case Uc:return Bc.FAIRPLAY;case Fc:return Bc.PLAYREADY;case Oc:return Bc.WIDEVINE;case Mc:return Bc.CLEARKEY}}var jc="edef8ba979d64acea3c827dcd51d21ed";function Gc(e){switch(e){case Bc.FAIRPLAY:return Uc;case Bc.PLAYREADY:return Fc;case Bc.WIDEVINE:return Oc;case Bc.CLEARKEY:return Mc}}function zc(e){const{drmSystems:t,widevineLicenseUrl:i}=e,s=t?[Bc.FAIRPLAY,Bc.WIDEVINE,Bc.PLAYREADY,Bc.CLEARKEY].filter((e=>!!t[e])):[];return!s[Bc.WIDEVINE]&&i&&s.push(Bc.WIDEVINE),s}const $c=null!=Pc&&null!=(Hc=Pc.navigator)&&Hc.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null;var Hc;function Vc(e,t,i){return Uint8Array.prototype.slice?e.slice(t,i):new Uint8Array(Array.prototype.slice.call(e,t,i))}const Wc=(e,t)=>t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128,Jc=(e,t)=>t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128,qc=(e,t)=>{const i=t;let s=0;for(;Wc(e,t);){s+=10;s+=Kc(e,t+6),Jc(e,t+10)&&(s+=10),t+=s}if(s>0)return e.subarray(i,i+s)},Kc=(e,t)=>{let i=0;return i=(127&e[t])<<21,i|=(127&e[t+1])<<14,i|=(127&e[t+2])<<7,i|=127&e[t+3],i},Yc=(e,t)=>Wc(e,t)&&Kc(e,t+6)+10<=e.length-t,Qc=e=>{const t=eu(e);for(let e=0;e<t.length;e++){const i=t[e];if(Xc(i))return au(i)}},Xc=e=>e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info,Zc=e=>{const t=String.fromCharCode(e[0],e[1],e[2],e[3]),i=Kc(e,4);return{type:t,size:i,data:e.subarray(10,10+i)}},eu=e=>{let t=0;const i=[];for(;Wc(e,t);){const s=Kc(e,t+6);t+=10;const r=t+s;for(;t+8<r;){const s=Zc(e.subarray(t)),r=tu(s);r&&i.push(r),t+=s.size+10}Jc(e,t)&&(t+=10)}return i},tu=e=>"PRIV"===e.type?iu(e):"W"===e.type[0]?ru(e):su(e),iu=e=>{if(e.size<2)return;const t=ou(e.data,!0),i=new Uint8Array(e.data.subarray(t.length+1));return{key:e.type,info:t,data:i.buffer}},su=e=>{if(e.size<2)return;if("TXXX"===e.type){let t=1;const i=ou(e.data.subarray(t),!0);t+=i.length+1;const s=ou(e.data.subarray(t));return{key:e.type,info:i,data:s}}const t=ou(e.data.subarray(1));return{key:e.type,data:t}},ru=e=>{if("WXXX"===e.type){if(e.size<2)return;let t=1;const i=ou(e.data.subarray(t),!0);t+=i.length+1;const s=ou(e.data.subarray(t));return{key:e.type,info:i,data:s}}const t=ou(e.data);return{key:e.type,data:t}},au=e=>{if(8===e.data.byteLength){const t=new Uint8Array(e.data),i=1&t[3];let s=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return s/=45,i&&(s+=47721858.84),Math.round(s)}},ou=(e,t=!1)=>{const i=lu();if(i){const s=i.decode(e);if(t){const e=s.indexOf("\0");return-1!==e?s.substring(0,e):s}return s.replace(/\0/g,"")}const s=e.length;let r,a,o,n="",l=0;for(;l<s;){if(r=e[l++],0===r&&t)return n;if(0!==r&&3!==r)switch(r>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:n+=String.fromCharCode(r);break;case 12:case 13:a=e[l++],n+=String.fromCharCode((31&r)<<6|63&a);break;case 14:a=e[l++],o=e[l++],n+=String.fromCharCode((15&r)<<12|(63&a)<<6|(63&o)<<0)}}return n};let nu;function lu(){if(!navigator.userAgent.includes("PlayStation 4"))return nu||void 0===self.TextDecoder||(nu=new self.TextDecoder("utf-8")),nu}const du=function(e){let t="";for(let i=0;i<e.length;i++){let s=e[i].toString(16);s.length<2&&(s="0"+s),t+=s}return t},hu=Math.pow(2,32)-1,cu=[].push,uu={video:1,audio:2,id3:3,text:4};function pu(e){return String.fromCharCode.apply(null,e)}function fu(e,t){const i=e[t]<<8|e[t+1];return i<0?65536+i:i}function mu(e,t){const i=yu(e,t);return i<0?4294967296+i:i}function gu(e,t){let i=mu(e,t);return i*=Math.pow(2,32),i+=mu(e,t+4),i}function yu(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function Au(e,t,i){e[t]=i>>24,e[t+1]=i>>16&255,e[t+2]=i>>8&255,e[t+3]=255&i}function bu(e,t){const i=[];if(!t.length)return i;const s=e.byteLength;for(let r=0;r<s;){const a=mu(e,r),o=a>1?r+a:s;if(pu(e.subarray(r+4,r+8))===t[0])if(1===t.length)i.push(e.subarray(r+8,o));else{const s=bu(e.subarray(r+8,o),t.slice(1));s.length&&cu.apply(i,s)}r=o}return i}function _u(e){const t=[],i=e[0];let s=8;const r=mu(e,s);s+=4;let a=0,o=0;0===i?(a=mu(e,s),o=mu(e,s+4),s+=8):(a=gu(e,s),o=gu(e,s+8),s+=16),s+=2;let n=e.length+o;const l=fu(e,s);s+=2;for(let i=0;i<l;i++){let i=s;const a=mu(e,i);i+=4;const o=2147483647&a;if(1===(2147483648&a)>>>31)return gc.warn("SIDX has hierarchical references (not supported)"),null;const l=mu(e,i);i+=4,t.push({referenceSize:o,subsegmentDuration:l,info:{duration:l/r,start:n,end:n+o-1}}),n+=o,i+=4,s=i}return{earliestPresentationTime:a,timescale:r,version:i,referencesCount:l,references:t}}function vu(e){const t=[],i=bu(e,["moov","trak"]);for(let e=0;e<i.length;e++){const s=i[e],r=bu(s,["tkhd"])[0];if(r){let e=r[0];const i=mu(r,0===e?12:20),a=bu(s,["mdia","mdhd"])[0];if(a){e=a[0];const r=mu(a,0===e?12:20),o=bu(s,["mdia","hdlr"])[0];if(o){const e=pu(o.subarray(8,12)),a={soun:Sc,vide:Tc}[e];if(a){const e=wu(bu(s,["mdia","minf","stbl","stsd"])[0]);t[i]={timescale:r,type:a},t[a]=ic({timescale:r,id:i},e)}}}}}return bu(e,["moov","mvex","trex"]).forEach((e=>{const i=mu(e,4),s=t[i];s&&(s.default={duration:mu(e,12),flags:mu(e,20)})})),t}function wu(e){const t=e.subarray(8),i=t.subarray(86),s=pu(t.subarray(4,8));let r=s;const a="enca"===s||"encv"===s;if(a){const e=bu(t,[s])[0];bu(e.subarray("enca"===s?28:78),["sinf"]).forEach((e=>{const t=bu(e,["schm"])[0];if(t){const i=pu(t.subarray(4,8));if("cbcs"===i||"cenc"===i){const t=bu(e,["frma"])[0];t&&(r=pu(t))}}}))}switch(r){case"avc1":case"avc2":case"avc3":case"avc4":{const e=bu(i,["avcC"])[0];r+="."+Tu(e[1])+Tu(e[2])+Tu(e[3]);break}case"mp4a":{const e=bu(t,[s])[0],i=bu(e.subarray(28),["esds"])[0];if(i&&i.length>12){let e=4;if(3!==i[e++])break;e=Su(i,e),e+=2;const t=i[e++];if(128&t&&(e+=2),64&t&&(e+=i[e++]),4!==i[e++])break;e=Su(i,e);const s=i[e++];if(64!==s)break;if(r+="."+Tu(s),e+=12,5!==i[e++])break;e=Su(i,e);const a=i[e++];let o=(248&a)>>3;31===o&&(o+=1+((7&a)<<3)+((224&i[e])>>5)),r+="."+o}break}case"hvc1":case"hev1":{const e=bu(i,["hvcC"])[0],t=e[1],s=["","A","B","C"][t>>6],a=31&t,o=mu(e,2),n=(32&t)>>5?"H":"L",l=e[12],d=e.subarray(6,12);r+="."+s+a,r+="."+o.toString(16).toUpperCase(),r+="."+n+l;let h="";for(let e=d.length;e--;){const t=d[e];if(t||h){h="."+t.toString(16).toUpperCase()+h}}r+=h;break}case"dvh1":case"dvhe":{const e=bu(i,["dvcC"])[0],t=e[2]>>1&127,s=e[2]<<5&32|e[3]>>3&31;r+="."+Eu(t)+"."+Eu(s);break}case"vp09":{const e=bu(i,["vpcC"])[0],t=e[4],s=e[5],a=e[6]>>4&15;r+="."+Eu(t)+"."+Eu(s)+"."+Eu(a);break}case"av01":{const e=bu(i,["av1C"])[0],t=e[1]>>>5,s=31&e[1],a=e[2]>>>7?"H":"M",o=(64&e[2])>>6,n=(32&e[2])>>5,l=2===t&&o?n?12:10:o?10:8,d=(16&e[2])>>4,h=(8&e[2])>>3,c=(4&e[2])>>2,u=3&e[2],p=1,f=1,m=1,g=0;r+="."+t+"."+Eu(s)+a+"."+Eu(l)+"."+d+"."+h+c+u+"."+Eu(p)+"."+Eu(f)+"."+Eu(m)+"."+g;break}}return{codec:r,encrypted:a}}function Su(e,t){const i=t+5;for(;128&e[t++]&&t<i;);return t}function Tu(e){return("0"+e.toString(16).toUpperCase()).slice(-2)}function Eu(e){return(e<10?"0":"")+e}function ku(e){const t=bu(e,["schm"])[0];if(t){const i=pu(t.subarray(4,8));if("cbcs"===i||"cenc"===i)return bu(e,["schi","tenc"])[0]}return gc.error("[eme] missing 'schm' box"),null}function Cu(e){const t=mu(e,0);let i=8;1&t&&(i+=4),4&t&&(i+=4);let s=0;const r=mu(e,4);for(let a=0;a<r;a++){if(256&t){s+=mu(e,i),i+=4}512&t&&(i+=4),1024&t&&(i+=4),2048&t&&(i+=4)}return s}function xu(e,t){const i=new Uint8Array(e.length+t.length);return i.set(e),i.set(t,e.length),i}function Ru(e,t){const i=[],s=t.samples,r=t.timescale,a=t.id;let o=!1;return bu(s,["moof"]).map((n=>{const l=n.byteOffset-8;bu(n,["traf"]).map((n=>{const d=bu(n,["tfdt"]).map((e=>{const t=e[0];let i=mu(e,4);return 1===t&&(i*=Math.pow(2,32),i+=mu(e,8)),i/r}))[0];return void 0!==d&&(e=d),bu(n,["tfhd"]).map((d=>{const h=mu(d,4),c=16777215&mu(d,0);let u=0;const p=0!=(16&c);let f=0;const m=0!=(32&c);let g=8;h===a&&(0!=(1&c)&&(g+=8),0!=(2&c)&&(g+=4),0!=(8&c)&&(u=mu(d,g),g+=4),p&&(f=mu(d,g),g+=4),m&&(g+=4),"video"===t.type&&(o=function(e){if(!e)return!1;const t=e.indexOf("."),i=t<0?e:e.substring(0,t);return"hvc1"===i||"hev1"===i||"dvh1"===i||"dvhe"===i}(t.codec)),bu(n,["trun"]).map((a=>{const n=a[0],d=16777215&mu(a,0),h=0!=(1&d);let c=0;const p=0!=(4&d),m=0!=(256&d);let g=0;const y=0!=(512&d);let A=0;const b=0!=(1024&d),_=0!=(2048&d);let v=0;const w=mu(a,4);let S=8;h&&(c=mu(a,S),S+=4),p&&(S+=4);let T=c+l;for(let l=0;l<w;l++){if(m?(g=mu(a,S),S+=4):g=u,y?(A=mu(a,S),S+=4):A=f,b&&(S+=4),_&&(v=0===n?mu(a,S):yu(a,S),S+=4),t.type===Tc){let t=0;for(;t<A;){const a=mu(s,T);if(T+=4,Du(o,s[T])){Lu(s.subarray(T,T+a),o?2:1,e+v/r,i)}T+=a,t+=a+4}}e+=g/r}})))}))}))})),i}function Du(e,t){if(e){const e=t>>1&63;return 39===e||40===e}return 6===(31&t)}function Lu(e,t,i,s){const r=Iu(e);let a=0;a+=t;let o=0,n=0,l=0;for(;a<r.length;){o=0;do{if(a>=r.length)break;l=r[a++],o+=l}while(255===l);n=0;do{if(a>=r.length)break;l=r[a++],n+=l}while(255===l);const e=r.length-a;let t=a;if(n<e)a+=n;else if(n>e){gc.error(`Malformed SEI payload. ${n} is too small, only ${e} bytes left to parse.`);break}if(4===o){if(181===r[t++]){const e=fu(r,t);if(t+=2,49===e){const e=mu(r,t);if(t+=4,1195456820===e){const e=r[t++];if(3===e){const a=r[t++],n=31&a,l=64&a,d=l?2+3*n:0,h=new Uint8Array(d);if(l){h[0]=a;for(let e=1;e<d;e++)h[e]=r[t++]}s.push({type:e,payloadType:o,pts:i,bytes:h})}}}}}else if(5===o&&n>16){const e=[];for(let i=0;i<16;i++){const s=r[t++].toString(16);e.push(1==s.length?"0"+s:s),3!==i&&5!==i&&7!==i&&9!==i||e.push("-")}const a=n-16,l=new Uint8Array(a);for(let e=0;e<a;e++)l[e]=r[t++];s.push({payloadType:o,pts:i,uuid:e.join(""),userData:ou(l),userDataBytes:l})}}}function Iu(e){const t=e.byteLength,i=[];let s=1;for(;s<t-2;)0===e[s]&&0===e[s+1]&&3===e[s+2]?(i.push(s+2),s+=2):s++;if(0===i.length)return e;const r=t-i.length,a=new Uint8Array(r);let o=0;for(s=0;s<r;o++,s++)o===i[0]&&(o++,i.shift()),a[s]=e[o];return a}function Pu(e,t,i){if(16!==e.byteLength)throw new RangeError("Invalid system id");let s,r,a;if(t){s=1,r=new Uint8Array(16*t.length);for(let e=0;e<t.length;e++){const i=t[e];if(16!==i.byteLength)throw new RangeError("Invalid key");r.set(i,16*e)}}else s=0,r=new Uint8Array;s>0?(a=new Uint8Array(4),t.length>0&&new DataView(a.buffer).setUint32(0,t.length,!1)):a=new Uint8Array;const o=new Uint8Array(4);return i&&i.byteLength>0&&new DataView(o.buffer).setUint32(0,i.byteLength,!1),function(e,...t){const i=t.length;let s=8,r=i;for(;r--;)s+=t[r].byteLength;const a=new Uint8Array(s);for(a[0]=s>>24&255,a[1]=s>>16&255,a[2]=s>>8&255,a[3]=255&s,a.set(e,4),r=0,s=8;r<i;r++)a.set(t[r],s),s+=t[r].byteLength;return a}([112,115,115,104],new Uint8Array([s,0,0,0]),e,a,r,o,i||new Uint8Array)}let Bu={};class Mu{static clearKeyUriToKeyIdMap(){Bu={}}constructor(e,t,i,s=[1],r=null){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=i,this.keyFormatVersions=s,this.iv=r,this.encrypted=!!e&&"NONE"!==e,this.isCommonEncryption=this.encrypted&&"AES-128"!==e}isSupported(){if(this.method){if("AES-128"===this.method||"NONE"===this.method)return!0;if("identity"===this.keyFormat)return"SAMPLE-AES"===this.method;switch(this.keyFormat){case Uc:case Oc:case Fc:case Mc:return-1!==["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)}}return!1}getDecryptData(e){if(!this.encrypted||!this.uri)return null;if("AES-128"===this.method&&this.uri&&!this.iv){"number"!=typeof e&&("AES-128"!==this.method||this.iv||gc.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const t=function(e){const t=new Uint8Array(16);for(let i=12;i<16;i++)t[i]=e>>8*(15-i)&255;return t}(e);return new Mu(this.method,this.uri,"identity",this.keyFormatVersions,t)}const t=Lc(this.uri);if(t)switch(this.keyFormat){case Oc:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case Fc:{const e=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=Pu(e,null,t);const i=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2),s=String.fromCharCode.apply(null,Array.from(i)),r=s.substring(s.indexOf("<"),s.length),a=(new DOMParser).parseFromString(r,"text/xml").getElementsByTagName("KID")[0];if(a){const e=a.childNodes[0]?a.childNodes[0].nodeValue:a.getAttribute("VALUE");if(e){const t=Dc(e).subarray(0,16);!function(e){const t=function(e,t,i){const s=e[t];e[t]=e[i],e[i]=s};t(e,0,3),t(e,1,2),t(e,4,5),t(e,6,7)}(t),this.keyId=t}}break}default:{let e=t.subarray(0,16);if(16!==e.length){const t=new Uint8Array(16);t.set(e,16-e.length),e=t}this.keyId=e;break}}if(!this.keyId||16!==this.keyId.byteLength){let e=Bu[this.uri];if(!e){const t=Object.keys(Bu).length%Number.MAX_SAFE_INTEGER;e=new Uint8Array(16);new DataView(e.buffer,12,4).setUint32(0,t),Bu[this.uri]=e}this.keyId=e}return this}}const Uu=/\{\$([a-zA-Z0-9-_]+)\}/g;function Fu(e){return Uu.test(e)}function Ou(e,t,i){if(null!==e.variableList||e.hasVariableRefs)for(let s=i.length;s--;){const r=i[s],a=t[r];a&&(t[r]=Nu(e,a))}}function Nu(e,t){if(null!==e.variableList||e.hasVariableRefs){const i=e.variableList;return t.replace(Uu,(t=>{const s=t.substring(2,t.length-1),r=null==i?void 0:i[s];return void 0===r?(e.playlistParsingError||(e.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${s}"`)),t):r}))}return t}function ju(e,t,i){let s,r,a=e.variableList;if(a||(e.variableList=a={}),"QUERYPARAM"in t){s=t.QUERYPARAM;try{const e=new self.URL(i).searchParams;if(!e.has(s))throw new Error(`"${s}" does not match any query parameter in URI: "${i}"`);r=e.get(s)}catch(t){e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${t.message}`))}}else s=t.NAME,r=t.VALUE;s in a?e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${s}"`)):a[s]=r||""}function Gu(e,t,i){const s=t.IMPORT;if(i&&s in i){let t=e.variableList;t||(e.variableList=t={}),t[s]=i[s]}else e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${s}"`))}function zu(e=!0){if("undefined"==typeof self)return;return(e||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}const $u={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function Hu(e,t,i=!0){return!e.split(",").some((e=>!Vu(e,t,i)))}function Vu(e,t,i=!0){var s;const r=zu(i);return null!=(s=null==r?void 0:r.isTypeSupported(Wu(e,t)))&&s}function Wu(e,t){return`${t}/mp4;codecs="${e}"`}function Ju(e){if(e){const t=e.substring(0,4);return $u.video[t]}return 2}function qu(e){return e.split(",").reduce(((e,t)=>{const i=$u.video[t];return i?(2*i+e)/(e?3:2):($u.audio[t]+e)/(e?2:1)}),0)}const Ku={};const Yu=/flac|opus/i;function Qu(e,t=!0){return e.replace(Yu,(e=>function(e,t=!0){if(Ku[e])return Ku[e];const i={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"]}[e];for(let s=0;s<i.length;s++)if(Vu(i[s],"audio",t))return Ku[e]=i[s],i[s];return e}(e.toLowerCase(),t)))}function Xu(e,t){return e&&"mp4a"!==e?e:t}const Zu=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,ep=/#EXT-X-MEDIA:(.*)/g,tp=/^#EXT(?:INF|-X-TARGETDURATION):/m,ip=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),sp=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class rp{static findGroup(e,t){for(let i=0;i<e.length;i++){const s=e[i];if(s.id===t)return s}}static resolve(e,t){return ec.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return tp.test(e)}static parseMasterPlaylist(e,t){const i={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:Fu(e)},s=[];let r;for(Zu.lastIndex=0;null!=(r=Zu.exec(e));)if(r[1]){var a;const e=new bc(r[1]);Ou(i,e,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);const o=Nu(i,r[2]),n={attrs:e,bitrate:e.decimalInteger("BANDWIDTH")||e.decimalInteger("AVERAGE-BANDWIDTH"),name:e.NAME,url:rp.resolve(o,t)},l=e.decimalResolution("RESOLUTION");l&&(n.width=l.width,n.height=l.height),np(e.CODECS,n),null!=(a=n.unknownCodecs)&&a.length||s.push(n),i.levels.push(n)}else if(r[3]){const e=r[3],s=r[4];switch(e){case"SESSION-DATA":{const e=new bc(s);Ou(i,e,["DATA-ID","LANGUAGE","VALUE","URI"]);const t=e["DATA-ID"];t&&(null===i.sessionData&&(i.sessionData={}),i.sessionData[t]=e);break}case"SESSION-KEY":{const e=ap(s,t,i);e.encrypted&&e.isSupported()?(null===i.sessionKeys&&(i.sessionKeys=[]),i.sessionKeys.push(e)):gc.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${s}"`);break}case"DEFINE":{const e=new bc(s);Ou(i,e,["NAME","VALUE","QUERYPARAM"]),ju(i,e,t)}break;case"CONTENT-STEERING":{const e=new bc(s);Ou(i,e,["SERVER-URI","PATHWAY-ID"]),i.contentSteering={uri:rp.resolve(e["SERVER-URI"],t),pathwayId:e["PATHWAY-ID"]||"."};break}case"START":i.startTimeOffset=op(s)}}const o=s.length>0&&s.length<i.levels.length;return i.levels=o?s:i.levels,0===i.levels.length&&(i.playlistParsingError=new Error("no levels found in manifest")),i}static parseMasterPlaylistMedia(e,t,i){let s;const r={},a=i.levels,o={AUDIO:a.map((e=>({id:e.attrs.AUDIO,audioCodec:e.audioCodec}))),SUBTITLES:a.map((e=>({id:e.attrs.SUBTITLES,textCodec:e.textCodec}))),"CLOSED-CAPTIONS":[]};let n=0;for(ep.lastIndex=0;null!==(s=ep.exec(e));){const e=new bc(s[1]),a=e.TYPE;if(a){const s=o[a],l=r[a]||[];r[a]=l,Ou(i,e,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const d=e.LANGUAGE,h=e["ASSOC-LANGUAGE"],c=e.CHANNELS,u=e.CHARACTERISTICS,p=e["INSTREAM-ID"],f={attrs:e,bitrate:0,id:n++,groupId:e["GROUP-ID"]||"",name:e.NAME||d||"",type:a,default:e.bool("DEFAULT"),autoselect:e.bool("AUTOSELECT"),forced:e.bool("FORCED"),lang:d,url:e.URI?rp.resolve(e.URI,t):""};if(h&&(f.assocLang=h),c&&(f.channels=c),u&&(f.characteristics=u),p&&(f.instreamId=p),null!=s&&s.length){const e=rp.findGroup(s,f.groupId)||s[0];lp(f,e,"audioCodec"),lp(f,e,"textCodec")}l.push(f)}}return r}static parseLevelPlaylist(e,t,i,s,r,a){const o=new Rc(t),n=o.fragments;let l,d,h,c=null,u=0,p=0,f=0,m=0,g=null,y=new Cc(s,t),A=-1,b=!1,_=null;for(ip.lastIndex=0,o.m3u8=e,o.hasVariableRefs=Fu(e);null!==(l=ip.exec(e));){b&&(b=!1,y=new Cc(s,t),y.start=f,y.sn=u,y.cc=m,y.level=i,c&&(y.initSegment=c,y.rawProgramDateTime=c.rawProgramDateTime,c.rawProgramDateTime=null,_&&(y.setByteRange(_),_=null)));const e=l[1];if(e){y.duration=parseFloat(e);const t=(" "+l[2]).slice(1);y.title=t||null,y.tagList.push(t?["INF",e,t]:["INF",e])}else if(l[3]){if(oc(y.duration)){y.start=f,h&&cp(y,h,o),y.sn=u,y.level=i,y.cc=m,n.push(y);const e=(" "+l[3]).slice(1);y.relurl=Nu(o,e),dp(y,g),g=y,f+=y.duration,u++,p=0,b=!0}}else if(l[4]){const e=(" "+l[4]).slice(1);g?y.setByteRange(e,g):y.setByteRange(e)}else if(l[5])y.rawProgramDateTime=(" "+l[5]).slice(1),y.tagList.push(["PROGRAM-DATE-TIME",y.rawProgramDateTime]),-1===A&&(A=n.length);else{if(l=l[0].match(sp),!l){gc.warn("No matches on slow regex match for level playlist!");continue}for(d=1;d<l.length&&void 0===l[d];d++);const e=(" "+l[d]).slice(1),r=(" "+l[d+1]).slice(1),f=l[d+2]?(" "+l[d+2]).slice(1):"";switch(e){case"PLAYLIST-TYPE":o.type=r.toUpperCase();break;case"MEDIA-SEQUENCE":u=o.startSN=parseInt(r);break;case"SKIP":{const e=new bc(r);Ou(o,e,["RECENTLY-REMOVED-DATERANGES"]);const t=e.decimalInteger("SKIPPED-SEGMENTS");if(oc(t)){o.skippedSegments=t;for(let e=t;e--;)n.unshift(null);u+=t}const i=e.enumeratedString("RECENTLY-REMOVED-DATERANGES");i&&(o.recentlyRemovedDateranges=i.split("\t"));break}case"TARGETDURATION":o.targetduration=Math.max(parseInt(r),1);break;case"VERSION":o.version=parseInt(r);break;case"INDEPENDENT-SEGMENTS":case"EXTM3U":break;case"ENDLIST":o.live=!1;break;case"#":(r||f)&&y.tagList.push(f?[r,f]:[r]);break;case"DISCONTINUITY":m++,y.tagList.push(["DIS"]);break;case"GAP":y.gap=!0,y.tagList.push([e]);break;case"BITRATE":y.tagList.push([e,r]);break;case"DATERANGE":{const e=new bc(r);Ou(o,e,["ID","CLASS","START-DATE","END-DATE","SCTE35-CMD","SCTE35-OUT","SCTE35-IN"]),Ou(o,e,e.clientAttrs);const t=new vc(e,o.dateRanges[e.ID]);t.isValid||o.skippedSegments?o.dateRanges[t.id]=t:gc.warn(`Ignoring invalid DATERANGE tag: "${r}"`),y.tagList.push(["EXT-X-DATERANGE",r]);break}case"DEFINE":{const e=new bc(r);Ou(o,e,["NAME","VALUE","IMPORT","QUERYPARAM"]),"IMPORT"in e?Gu(o,e,a):ju(o,e,t)}break;case"DISCONTINUITY-SEQUENCE":m=parseInt(r);break;case"KEY":{const e=ap(r,t,o);if(e.isSupported()){if("NONE"===e.method){h=void 0;break}h||(h={}),h[e.keyFormat]&&(h=ac({},h)),h[e.keyFormat]=e}else gc.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${r}"`);break}case"START":o.startTimeOffset=op(r);break;case"MAP":{const e=new bc(r);if(Ou(o,e,["BYTERANGE","URI"]),y.duration){const r=new Cc(s,t);hp(r,e,i,h),c=r,y.initSegment=c,c.rawProgramDateTime&&!y.rawProgramDateTime&&(y.rawProgramDateTime=c.rawProgramDateTime)}else{const t=y.byteRangeEndOffset;if(t){const e=y.byteRangeStartOffset;_=`${t-e}@${e}`}else _=null;hp(y,e,i,h),c=y,b=!0}break}case"SERVER-CONTROL":{const e=new bc(r);o.canBlockReload=e.bool("CAN-BLOCK-RELOAD"),o.canSkipUntil=e.optionalFloat("CAN-SKIP-UNTIL",0),o.canSkipDateRanges=o.canSkipUntil>0&&e.bool("CAN-SKIP-DATERANGES"),o.partHoldBack=e.optionalFloat("PART-HOLD-BACK",0),o.holdBack=e.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const e=new bc(r);o.partTarget=e.decimalFloatingPoint("PART-TARGET");break}case"PART":{let e=o.partList;e||(e=o.partList=[]);const i=p>0?e[e.length-1]:void 0,s=p++,a=new bc(r);Ou(o,a,["BYTERANGE","URI"]);const n=new xc(a,y,t,s,i);e.push(n),y.duration+=n.duration;break}case"PRELOAD-HINT":{const e=new bc(r);Ou(o,e,["URI"]),o.preloadHint=e;break}case"RENDITION-REPORT":{const e=new bc(r);Ou(o,e,["URI"]),o.renditionReports=o.renditionReports||[],o.renditionReports.push(e);break}default:gc.warn(`line parsed but not handled: ${l}`)}}}g&&!g.relurl?(n.pop(),f-=g.duration,o.partList&&(o.fragmentHint=g)):o.partList&&(dp(y,g),y.cc=m,o.fragmentHint=y,h&&cp(y,h,o));const v=n.length,w=n[0],S=n[v-1];if(f+=o.skippedSegments*o.targetduration,f>0&&v&&S){o.averagetargetduration=f/v;const e=S.sn;o.endSN="initSegment"!==e?e:0,o.live||(S.endList=!0),w&&(o.startCC=w.cc)}else o.endSN=0,o.startCC=0;return o.fragmentHint&&(f+=o.fragmentHint.duration),o.totalduration=f,o.endCC=m,A>0&&function(e,t){let i=e[t];for(let s=t;s--;){const t=e[s];if(!t)return;t.programDateTime=i.programDateTime-1e3*t.duration,i=t}}(n,A),o}}function ap(e,t,i){var s,r;const a=new bc(e);Ou(i,a,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]);const o=null!=(s=a.METHOD)?s:"",n=a.URI,l=a.hexadecimalInteger("IV"),d=a.KEYFORMATVERSIONS,h=null!=(r=a.KEYFORMAT)?r:"identity";n&&a.IV&&!l&&gc.error(`Invalid IV: ${a.IV}`);const c=n?rp.resolve(n,t):"",u=(d||"1").split("/").map(Number).filter(Number.isFinite);return new Mu(o,c,h,u,l)}function op(e){const t=new bc(e).decimalFloatingPoint("TIME-OFFSET");return oc(t)?t:null}function np(e,t){let i=(e||"").split(/[ ,]+/).filter((e=>e));["video","audio","text"].forEach((e=>{const s=i.filter((t=>function(e,t){const i=$u[t];return!!i&&!!i[e.slice(0,4)]}(t,e)));s.length&&(t[`${e}Codec`]=s.join(","),i=i.filter((e=>-1===s.indexOf(e))))})),t.unknownCodecs=i}function lp(e,t,i){const s=t[i];s&&(e[i]=s)}function dp(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),oc(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}function hp(e,t,i,s){e.relurl=t.URI,t.BYTERANGE&&e.setByteRange(t.BYTERANGE),e.level=i,e.sn="initSegment",s&&(e.levelkeys=s),e.initSegment=null}function cp(e,t,i){e.levelkeys=t;const{encryptedFragments:s}=i;s.length&&s[s.length-1].levelkeys===t||!Object.keys(t).some((e=>t[e].isCommonEncryption))||s.push(e)}var up="manifest",pp="level",fp="audioTrack",mp="subtitleTrack",gp="main",yp="audio",Ap="subtitle";function bp(e){const{type:t}=e;switch(t){case fp:return yp;case mp:return Ap;default:return gp}}function _p(e,t){let i=e.url;return void 0!==i&&0!==i.indexOf("data:")||(i=t.url),i}class vp{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.LEVEL_LOADING,this.onLevelLoading,this),e.on(dc.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(dc.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}unregisterListeners(){const{hls:e}=this;e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.LEVEL_LOADING,this.onLevelLoading,this),e.off(dc.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(dc.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}createInternalLoader(e){const t=this.hls.config,i=t.pLoader,s=t.loader,r=new(i||s)(t);return this.loaders[e.type]=r,r}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:i}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:up,url:i,deliveryDirectives:null})}onLevelLoading(e,t){const{id:i,level:s,pathwayId:r,url:a,deliveryDirectives:o}=t;this.load({id:i,level:s,pathwayId:r,responseType:"text",type:pp,url:a,deliveryDirectives:o})}onAudioTrackLoading(e,t){const{id:i,groupId:s,url:r,deliveryDirectives:a}=t;this.load({id:i,groupId:s,level:null,responseType:"text",type:fp,url:r,deliveryDirectives:a})}onSubtitleTrackLoading(e,t){const{id:i,groupId:s,url:r,deliveryDirectives:a}=t;this.load({id:i,groupId:s,level:null,responseType:"text",type:mp,url:r,deliveryDirectives:a})}load(e){var t;const i=this.hls.config;let s,r=this.getInternalLoader(e);if(r){const t=r.context;if(t&&t.url===e.url&&t.level===e.level)return void gc.trace("[playlist-loader]: playlist request ongoing");gc.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),r.abort()}if(s=e.type===up?i.manifestLoadPolicy.default:ac({},i.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),r=this.createInternalLoader(e),oc(null==(t=e.deliveryDirectives)?void 0:t.part)){let t;if(e.type===pp&&null!==e.level?t=this.hls.levels[e.level].details:e.type===fp&&null!==e.id?t=this.hls.audioTracks[e.id].details:e.type===mp&&null!==e.id&&(t=this.hls.subtitleTracks[e.id].details),t){const e=t.partTarget,i=t.targetduration;if(e&&i){const t=1e3*Math.max(3*e,.8*i);s=ac({},s,{maxTimeToFirstByteMs:Math.min(t,s.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(t,s.maxTimeToFirstByteMs)})}}}const a=s.errorRetry||s.timeoutRetry||{},o={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:a.maxNumRetry||0,retryDelay:a.retryDelayMs||0,maxRetryDelay:a.maxRetryDelayMs||0},n={onSuccess:(e,t,i,s)=>{const r=this.getInternalLoader(i);this.resetInternalLoader(i.type);const a=e.data;0===a.indexOf("#EXTM3U")?(t.parsing.start=performance.now(),rp.isMediaPlaylist(a)?this.handleTrackOrLevelPlaylist(e,t,i,s||null,r):this.handleMasterPlaylist(e,t,i,s)):this.handleManifestParsingError(e,i,new Error("no EXTM3U delimiter"),s||null,t)},onError:(e,t,i,s)=>{this.handleNetworkError(t,i,!1,e,s)},onTimeout:(e,t,i)=>{this.handleNetworkError(t,i,!0,void 0,e)}};r.load(e,o,n)}handleMasterPlaylist(e,t,i,s){const r=this.hls,a=e.data,o=_p(e,i),n=rp.parseMasterPlaylist(a,o);if(n.playlistParsingError)return void this.handleManifestParsingError(e,i,n.playlistParsingError,s,t);const{contentSteering:l,levels:d,sessionData:h,sessionKeys:c,startTimeOffset:u,variableList:p}=n;this.variableList=p;const{AUDIO:f=[],SUBTITLES:m,"CLOSED-CAPTIONS":g}=rp.parseMasterPlaylistMedia(a,o,n);if(f.length){f.some((e=>!e.url))||!d[0].audioCodec||d[0].attrs.AUDIO||(gc.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),f.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new bc({}),bitrate:0,url:""}))}r.trigger(dc.MANIFEST_LOADED,{levels:d,audioTracks:f,subtitles:m,captions:g,contentSteering:l,url:o,stats:t,networkDetails:s,sessionData:h,sessionKeys:c,startTimeOffset:u,variableList:p})}handleTrackOrLevelPlaylist(e,t,i,s,r){const a=this.hls,{id:o,level:n,type:l}=i,d=_p(e,i),h=oc(n)?n:oc(o)?o:0,c=bp(i),u=rp.parseLevelPlaylist(e.data,d,h,c,0,this.variableList);if(l===up){const e={attrs:new bc({}),bitrate:0,details:u,name:"",url:d};a.trigger(dc.MANIFEST_LOADED,{levels:[e],audioTracks:[],url:d,stats:t,networkDetails:s,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),i.levelDetails=u,this.handlePlaylistLoaded(u,e,t,i,s,r)}handleManifestParsingError(e,t,i,s,r){this.hls.trigger(dc.ERROR,{type:hc.NETWORK_ERROR,details:cc.MANIFEST_PARSING_ERROR,fatal:t.type===up,url:e.url,err:i,error:i,reason:i.message,response:e,context:t,networkDetails:s,stats:r})}handleNetworkError(e,t,i=!1,s,r){let a=`A network ${i?"timeout":"error"+(s?" (status "+s.code+")":"")} occurred while loading ${e.type}`;e.type===pp?a+=`: ${e.level} id: ${e.id}`:e.type!==fp&&e.type!==mp||(a+=` id: ${e.id} group-id: "${e.groupId}"`);const o=new Error(a);gc.warn(`[playlist-loader]: ${a}`);let n=cc.UNKNOWN,l=!1;const d=this.getInternalLoader(e);switch(e.type){case up:n=i?cc.MANIFEST_LOAD_TIMEOUT:cc.MANIFEST_LOAD_ERROR,l=!0;break;case pp:n=i?cc.LEVEL_LOAD_TIMEOUT:cc.LEVEL_LOAD_ERROR,l=!1;break;case fp:n=i?cc.AUDIO_TRACK_LOAD_TIMEOUT:cc.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case mp:n=i?cc.SUBTITLE_TRACK_LOAD_TIMEOUT:cc.SUBTITLE_LOAD_ERROR,l=!1}d&&this.resetInternalLoader(e.type);const h={type:hc.NETWORK_ERROR,details:n,fatal:l,url:e.url,loader:d,context:e,error:o,networkDetails:t,stats:r};if(s){const i=(null==t?void 0:t.url)||e.url;h.response=ic({url:i,data:void 0},s)}this.hls.trigger(dc.ERROR,h)}handlePlaylistLoaded(e,t,i,s,r,a){const o=this.hls,{type:n,level:l,id:d,groupId:h,deliveryDirectives:c}=s,u=_p(t,s),p=bp(s),f="number"==typeof s.level&&p===gp?l:void 0;if(!e.fragments.length){const e=new Error("No Segments found in Playlist");return void o.trigger(dc.ERROR,{type:hc.NETWORK_ERROR,details:cc.LEVEL_EMPTY_ERROR,fatal:!1,url:u,error:e,reason:e.message,response:t,context:s,level:f,parent:p,networkDetails:r,stats:i})}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const m=e.playlistParsingError;if(m)o.trigger(dc.ERROR,{type:hc.NETWORK_ERROR,details:cc.LEVEL_PARSING_ERROR,fatal:!1,url:u,error:m,reason:m.message,response:t,context:s,level:f,parent:p,networkDetails:r,stats:i});else switch(e.live&&a&&(a.getCacheAge&&(e.ageHeader=a.getCacheAge()||0),a.getCacheAge&&!isNaN(e.ageHeader)||(e.ageHeader=0)),n){case up:case pp:o.trigger(dc.LEVEL_LOADED,{details:e,level:f||0,id:d||0,stats:i,networkDetails:r,deliveryDirectives:c});break;case fp:o.trigger(dc.AUDIO_TRACK_LOADED,{details:e,id:d||0,groupId:h||"",stats:i,networkDetails:r,deliveryDirectives:c});break;case mp:o.trigger(dc.SUBTITLE_TRACK_LOADED,{details:e,id:d||0,groupId:h||"",stats:i,networkDetails:r,deliveryDirectives:c})}}}function wp(e,t){let i;try{i=new Event("addtrack")}catch(e){i=document.createEvent("Event"),i.initEvent("addtrack",!1,!1)}i.track=e,t.dispatchEvent(i)}function Sp(e,t){const i=e.mode;if("disabled"===i&&(e.mode="hidden"),e.cues&&!e.cues.getCueById(t.id))try{if(e.addCue(t),!e.cues.getCueById(t.id))throw new Error(`addCue is failed for: ${t}`)}catch(i){gc.debug(`[texttrack-utils]: ${i}`);try{const i=new self.TextTrackCue(t.startTime,t.endTime,t.text);i.id=t.id,e.addCue(i)}catch(e){gc.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${e}`)}}"disabled"===i&&(e.mode=i)}function Tp(e){const t=e.mode;if("disabled"===t&&(e.mode="hidden"),e.cues)for(let t=e.cues.length;t--;)e.removeCue(e.cues[t]);"disabled"===t&&(e.mode=t)}function Ep(e,t,i,s){const r=e.mode;if("disabled"===r&&(e.mode="hidden"),e.cues&&e.cues.length>0){const r=function(e,t,i){const s=[],r=function(e,t){if(t<e[0].startTime)return 0;const i=e.length-1;if(t>e[i].endTime)return-1;let s=0,r=i;for(;s<=r;){const a=Math.floor((r+s)/2);if(t<e[a].startTime)r=a-1;else{if(!(t>e[a].startTime&&s<i))return a;s=a+1}}return e[s].startTime-t<t-e[r].startTime?s:r}(e,t);if(r>-1)for(let a=r,o=e.length;a<o;a++){const r=e[a];if(r.startTime>=t&&r.endTime<=i)s.push(r);else if(r.startTime>i)return s}return s}(e.cues,t,i);for(let t=0;t<r.length;t++)s&&!s(r[t])||e.removeCue(r[t])}"disabled"===r&&(e.mode=r)}function kp(e){const t=[];for(let i=0;i<e.length;i++){const s=e[i];"subtitles"!==s.kind&&"captions"!==s.kind||!s.label||t.push(e[i])}return t}var Cp="org.id3",xp="com.apple.quicktime.HLS",Rp="https://aomedia.org/emsg/ID3";function Dp(){if("undefined"!=typeof self)return self.VTTCue||self.TextTrackCue}function Lp(e,t,i,s,r){let a=new e(t,i,"");try{a.value=s,r&&(a.type=r)}catch(o){a=new e(t,i,JSON.stringify(r?ic({type:r},s):s))}return a}const Ip=(()=>{const e=Dp();try{e&&new e(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function Pp(e,t){return e.getTime()/1e3-t}class Bp{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null}_registerListeners(){const{hls:e}=this;e.on(dc.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(dc.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(dc.LEVEL_UPDATED,this.onLevelUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(dc.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(dc.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(dc.LEVEL_UPDATED,this.onLevelUpdated,this)}onMediaAttached(e,t){this.media=t.media}onMediaDetaching(){this.id3Track&&(Tp(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;t<e.length;t++){const i=e[t];if("metadata"===i.kind&&"id3"===i.label)return wp(i,this.media),i}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:i,enableID3MetadataCues:s}}}=this;if(!i&&!s)return;const{samples:r}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const a=Dp();if(a)for(let e=0;e<r.length;e++){const t=r[e].type;if(t===Rp&&!i||!s)continue;const o=eu(r[e].data);if(o){const i=r[e].pts;let s=i+r[e].duration;s>Ip&&(s=Ip);s-i<=0&&(s=i+.25);for(let e=0;e<o.length;e++){const r=o[e];if(!Xc(r)){this.updateId3CueEnds(i,t);const e=Lp(a,i,s,r,t);e&&this.id3Track.addCue(e)}}}}}updateId3CueEnds(e,t){var i;const s=null==(i=this.id3Track)?void 0:i.cues;if(s)for(let i=s.length;i--;){const r=s[i];r.type===t&&r.startTime<e&&r.endTime===Ip&&(r.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:i,type:s}){const{id3Track:r,hls:a}=this;if(!a)return;const{config:{enableEmsgMetadataCues:o,enableID3MetadataCues:n}}=a;if(r&&(o||n)){let e;e="audio"===s?e=>e.type===Cp&&n:"video"===s?e=>e.type===Rp&&o:e=>e.type===Cp&&n||e.type===Rp&&o,Ep(r,t,i,e)}}onLevelUpdated(e,{details:t}){if(!this.media||!t.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{dateRangeCuesAppended:i,id3Track:s}=this,{dateRanges:r}=t,a=Object.keys(r);if(s){const e=Object.keys(i).filter((e=>!a.includes(e)));for(let t=e.length;t--;){const r=e[t];Object.keys(i[r].cues).forEach((e=>{s.removeCue(i[r].cues[e])})),delete i[r]}}const o=t.fragments[t.fragments.length-1];if(0===a.length||!oc(null==o?void 0:o.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const n=o.programDateTime/1e3-o.start,l=Dp();for(let e=0;e<a.length;e++){const t=a[e],s=r[t],o=Pp(s.startDate,n),c=i[t],u=(null==c?void 0:c.cues)||{};let p=(null==c?void 0:c.durationKnown)||!1,f=Ip;const m=s.endDate;if(m)f=Pp(m,n),p=!0;else if(s.endOnNext&&!p){const e=a.reduce(((e,t)=>{if(t!==s.id){const i=r[t];if(i.class===s.class&&i.startDate>s.startDate&&(!e||s.startDate<e.startDate))return i}return e}),null);e&&(f=Pp(e.startDate,n),p=!0)}const g=Object.keys(s.attr);for(let e=0;e<g.length;e++){const i=g[e];if("ID"===(h=i)||"CLASS"===h||"START-DATE"===h||"DURATION"===h||"END-DATE"===h||"END-ON-NEXT"===h)continue;const r=u[i];if(r)p&&!c.durationKnown&&(r.endTime=f);else if(l){let e=s.attr[i];_c(i)&&(d=e,e=Uint8Array.from(d.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer);const r=Lp(l,o,f,{key:i,data:e},xp);r&&(r.id=t,this.id3Track.addCue(r),u[i]=r)}}i[t]={cues:u,dateRange:s,durationKnown:p}}var d,h}}class Mp{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=()=>this.timeupdate(),this.hls=e,this.config=e.config,this.registerListeners()}get latency(){return this._latency||0}get maxLatency(){const{config:e,levelDetails:t}=this;return void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const{levelDetails:e}=this;if(null===e)return null;const{holdBack:t,partHoldBack:i,targetduration:s}=e,{liveSyncDuration:r,liveSyncDurationCount:a,lowLatencyMode:o}=this.config,n=this.hls.userConfig;let l=o&&i||t;(n.liveSyncDuration||n.liveSyncDurationCount||0===l)&&(l=void 0!==r?r:a*s);const d=s;return l+Math.min(1*this.stallCount,d)}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency,i=this.levelDetails;if(null===e||null===t||null===i)return null;const s=i.edge,r=e-t-this.edgeStalled,a=s-i.totalduration,o=s-(this.config.lowLatencyMode&&i.partTarget||i.targetduration);return Math.min(Math.max(a,r),o)}get drift(){const{levelDetails:e}=this;return null===e?1:e.drift}get edgeStalled(){const{levelDetails:e}=this;if(null===e)return 0;const t=3*(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e,levelDetails:t}=this;if(!e||!t)return 0;const i=e.buffered.length;return(i?e.buffered.end(i-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null}registerListeners(){this.hls.on(dc.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(dc.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(dc.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(dc.ERROR,this.onError,this)}unregisterListeners(){this.hls.off(dc.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(dc.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(dc.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(dc.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)}onManifestLoading(){this.levelDetails=null,this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){this.levelDetails=t,t.advanced&&this.timeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)}onError(e,t){var i;t.details===cc.BUFFER_STALLED_ERROR&&(this.stallCount++,null!=(i=this.levelDetails)&&i.live&&gc.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))}timeupdate(){const{media:e,levelDetails:t}=this;if(!e||!t)return;this.currentTime=e.currentTime;const i=this.computeLatency();if(null===i)return;this._latency=i;const{lowLatencyMode:s,maxLiveSyncPlaybackRate:r}=this.config;if(!s||1===r||!t.live)return;const a=this.targetLatency;if(null===a)return;const o=i-a;if(o<Math.min(this.maxLatency,a+t.targetduration)&&o>.05&&this.forwardBufferLength>1){const t=Math.min(2,Math.max(1,r)),i=Math.round(2/(1+Math.exp(-.75*o-this.edgeStalled))*20)/20;e.playbackRate=Math.min(t,Math.max(1,i))}else 1!==e.playbackRate&&0!==e.playbackRate&&(e.playbackRate=1)}estimateLiveEdge(){const{levelDetails:e}=this;return null===e?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return null===e?null:e-this.currentTime}}const Up=["NONE","TYPE-0","TYPE-1",null];const Fp=["SDR","PQ","HLG"];var Op="",Np="YES",jp="v2";class Gp{constructor(e,t,i){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=i}addDirectives(e){const t=new self.URL(e);return void 0!==this.msn&&t.searchParams.set("_HLS_msn",this.msn.toString()),void 0!==this.part&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class zp{constructor(e){this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter((e=>!!e)).map((e=>e.substring(0,4))).join(","),this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return $p(this._audioGroups,e)}hasSubtitleGroup(e){return $p(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t)if("audio"===e){let e=this._audioGroups;e||(e=this._audioGroups=[]),-1===e.indexOf(t)&&e.push(t)}else if("text"===e){let e=this._subtitleGroups;e||(e=this._subtitleGroups=[]),-1===e.indexOf(t)&&e.push(t)}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return null==(e=this.audioGroups)?void 0:e[0]}get textGroupId(){var e;return null==(e=this.subtitleGroups)?void 0:e[0]}addFallback(){}}function $p(e,t){return!(!t||!e)&&-1!==e.indexOf(t)}function Hp(e,t){const i=t.startPTS;if(oc(i)){let s,r=0;t.sn>e.sn?(r=i-e.start,s=e):(r=e.start-i,s=t),s.duration!==r&&(s.duration=r)}else if(t.sn>e.sn){e.cc===t.cc&&e.minEndPTS?t.start=e.start+(e.minEndPTS-e.start):t.start=e.start+e.duration}else t.start=Math.max(e.start-t.duration,0)}function Vp(e,t,i,s,r,a){s-i<=0&&(gc.warn("Fragment should have a positive duration",t),s=i+t.duration,a=r+t.duration);let o=i,n=s;const l=t.startPTS,d=t.endPTS;if(oc(l)){const e=Math.abs(l-i);oc(t.deltaPTS)?t.deltaPTS=Math.max(e,t.deltaPTS):t.deltaPTS=e,o=Math.max(i,l),i=Math.min(i,l),r=Math.min(r,t.startDTS),n=Math.min(s,d),s=Math.max(s,d),a=Math.max(a,t.endDTS)}const h=i-t.start;0!==t.start&&(t.start=i),t.duration=s-t.start,t.startPTS=i,t.maxStartPTS=o,t.startDTS=r,t.endPTS=s,t.minEndPTS=n,t.endDTS=a;const c=t.sn;if(!e||c<e.startSN||c>e.endSN)return 0;let u;const p=c-e.startSN,f=e.fragments;for(f[p]=t,u=p;u>0;u--)Hp(f[u],f[u-1]);for(u=p;u<f.length-1;u++)Hp(f[u],f[u+1]);return e.fragmentHint&&Hp(f[f.length-1],e.fragmentHint),e.PTSKnown=e.alignedSliding=!0,h}function Wp(e,t){let i=null;const s=e.fragments;for(let e=s.length-1;e>=0;e--){const t=s[e].initSegment;if(t){i=t;break}}e.fragmentHint&&delete e.fragmentHint.endPTS;let r,a=0;if(function(e,t,i){const s=t.skippedSegments,r=Math.max(e.startSN,t.startSN)-t.startSN,a=(e.fragmentHint?1:0)+(s?t.endSN:Math.min(e.endSN,t.endSN))-t.startSN,o=t.startSN-e.startSN,n=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,l=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments;for(let e=r;e<=a;e++){const r=l[o+e];let a=n[e];s&&!a&&e<s&&(a=t.fragments[e]=r),r&&a&&i(r,a)}}(e,t,((e,s)=>{e.relurl&&(a=e.cc-s.cc),oc(e.startPTS)&&oc(e.endPTS)&&(s.start=s.startPTS=e.startPTS,s.startDTS=e.startDTS,s.maxStartPTS=e.maxStartPTS,s.endPTS=e.endPTS,s.endDTS=e.endDTS,s.minEndPTS=e.minEndPTS,s.duration=e.endPTS-e.startPTS,s.duration&&(r=s),t.PTSKnown=t.alignedSliding=!0),s.elementaryStreams=e.elementaryStreams,s.loader=e.loader,s.stats=e.stats,e.initSegment&&(s.initSegment=e.initSegment,i=e.initSegment)})),i){(t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments).forEach((e=>{var t;!e||e.initSegment&&e.initSegment.relurl!==(null==(t=i)?void 0:t.relurl)||(e.initSegment=i)}))}if(t.skippedSegments)if(t.deltaUpdateFailed=t.fragments.some((e=>!e)),t.deltaUpdateFailed){gc.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let e=t.skippedSegments;e--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}else t.canSkipDateRanges&&(t.dateRanges=function(e,t,i){const s=ac({},e);i&&i.forEach((e=>{delete s[e]}));return Object.keys(t).forEach((e=>{const i=new vc(t[e].attr,s[e]);i.isValid?s[e]=i:gc.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${JSON.stringify(t[e].attr)}"`)})),s}(e.dateRanges,t.dateRanges,t.recentlyRemovedDateranges));const o=t.fragments;if(a){gc.warn("discontinuity sliding from playlist, take drift into account");for(let e=0;e<o.length;e++)o[e].cc+=a}t.skippedSegments&&(t.startCC=t.fragments[0].cc),function(e,t,i){if(e&&t){let s=0;for(let r=0,a=e.length;r<=a;r++){const a=e[r],o=t[r+s];a&&o&&a.index===o.index&&a.fragment.sn===o.fragment.sn?i(a,o):s--}}}(e.partList,t.partList,((e,t)=>{t.elementaryStreams=e.elementaryStreams,t.stats=e.stats})),r?Vp(t,r,r.startPTS,r.endPTS,r.startDTS,r.endDTS):Jp(e,t),o.length&&(t.totalduration=t.edge-o[0].start),t.driftStartTime=e.driftStartTime,t.driftStart=e.driftStart;const n=t.advancedDateTime;if(t.advanced&&n){const e=t.edge;t.driftStart||(t.driftStartTime=n,t.driftStart=e),t.driftEndTime=n,t.driftEnd=e}else t.driftEndTime=e.driftEndTime,t.driftEnd=e.driftEnd,t.advancedDateTime=e.advancedDateTime}function Jp(e,t){const i=t.startSN+t.skippedSegments-e.startSN,s=e.fragments;i<0||i>=s.length||qp(t,s[i].start)}function qp(e,t){if(t){const i=e.fragments;for(let s=e.skippedSegments;s<i.length;s++)i[s].start+=t;e.fragmentHint&&(e.fragmentHint.start+=t)}}function Kp(e,t,i){var s;return null!=e&&e.details?Yp(null==(s=e.details)?void 0:s.partList,t,i):null}function Yp(e,t,i){if(e)for(let s=e.length;s--;){const r=e[s];if(r.index===i&&r.fragment.sn===t)return r}return null}function Qp(e){e.forEach(((e,t)=>{const{details:i}=e;null!=i&&i.fragments&&i.fragments.forEach((e=>{e.level=t}))}))}function Xp(e){switch(e.details){case cc.FRAG_LOAD_TIMEOUT:case cc.KEY_LOAD_TIMEOUT:case cc.LEVEL_LOAD_TIMEOUT:case cc.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function Zp(e,t){const i=Xp(t);return e.default[(i?"timeout":"error")+"Retry"]}function ef(e,t){const i="linear"===e.backoff?1:Math.pow(2,t);return Math.min(i*e.retryDelayMs,e.maxRetryDelayMs)}function tf(e){return ic(ic({},e),{errorRetry:null,timeoutRetry:null})}function sf(e,t,i,s){if(!e)return!1;const r=null==s?void 0:s.code,a=t<e.maxNumRetry&&(function(e){return 0===e&&!1===navigator.onLine||!!e&&(e<400||e>499)}(r)||!!i);return e.shouldRetry?e.shouldRetry(e,t,i,s,a):a}const rf=function(e,t){let i=0,s=e.length-1,r=null,a=null;for(;i<=s;){r=(i+s)/2|0,a=e[r];const o=t(a);if(o>0)i=r+1;else{if(!(o<0))return a;s=r-1}}return null};function af(e,t,i=0,s=0){let r=null;if(e){r=t[e.sn-t[0].sn+1]||null;const s=e.endDTS-i;s>0&&s<15e-7&&(i+=15e-7)}else 0===i&&0===t[0].start&&(r=t[0]);if(r&&(!e||e.level===r.level)&&0===of(i,s,r))return r;const a=rf(t,of.bind(null,i,s));return!a||a===e&&r?r:a}function of(e=0,t=0,i){if(i.start<=e&&i.start+i.duration>e)return 0;const s=Math.min(t,i.duration+(i.deltaPTS?i.deltaPTS:0));return i.start+i.duration-s<=e?1:i.start-s>e&&i.start?-1:0}function nf(e,t,i){const s=1e3*Math.min(t,i.duration+(i.deltaPTS?i.deltaPTS:0));return(i.endProgramDateTime||0)-s>e}var lf=0,df=2,hf=3,cf=5,uf=0,pf=1,ff=2;class mf{constructor(e,t){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.log=void 0,this.warn=void 0,this.log=gc.log.bind(gc,`${t}:`),this.warn=gc.warn.bind(gc,`${t}:`),this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){-1!==this.timer&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.requestScheduled=-1,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t){const i=null==t?void 0:t.renditionReports;if(i){let s=-1;for(let r=0;r<i.length;r++){const a=i[r];let o;try{o=new self.URL(a.URI,t.url).href}catch(e){gc.warn(`Could not construct new URL for Rendition Report: ${e}`),o=a.URI||""}if(o===e){s=r;break}o===e.substring(0,o.length)&&(s=r)}if(-1!==s){const e=i[s],r=parseInt(e["LAST-MSN"])||(null==t?void 0:t.lastPartSn);let a=parseInt(e["LAST-PART"])||(null==t?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){const e=Math.min(t.age-t.partTarget,t.targetduration);a>=0&&e>t.partTarget&&(a+=1)}return new Gp(r,a>=0?a:void 0,Op)}}}loadPlaylist(e){-1===this.requestScheduled&&(this.requestScheduled=self.performance.now())}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}shouldReloadPlaylist(e){return-1===this.timer&&-1===this.requestScheduled&&this.shouldLoadPlaylist(e)}playlistLoaded(e,t,i){const{details:s,stats:r}=t,a=self.performance.now(),o=r.loading.first?Math.max(0,a-r.loading.first):0;if(s.advancedDateTime=Date.now()-o,s.live||null!=i&&i.live){if(s.reloaded(i),i&&this.log(`live playlist ${e} ${s.advanced?"REFRESHED "+s.lastPartSn+"-"+s.lastPartIndex:s.updated?"UPDATED":"MISSED"}`),i&&s.fragments.length>0&&Wp(i,s),!this.canLoad||!s.live)return;let o,n,l;if(s.canBlockReload&&s.endSN&&s.advanced){const e=this.hls.config.lowLatencyMode,r=s.lastPartSn,a=s.endSN,d=s.lastPartIndex,h=r===a,c=e?0:d;-1!==d?(n=h?a+1:r,l=h?c:d+1):n=a+1;const u=s.age,p=u+s.ageHeader;let f=Math.min(p-s.partTarget,1.5*s.targetduration);if(f>0){if(i&&f>i.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${i.tuneInGoal} to: ${f} with playlist age: ${s.age}`),f=0;else{const e=Math.floor(f/s.targetduration);if(n+=e,void 0!==l){l+=Math.round(f%s.targetduration/s.partTarget)}this.log(`CDN Tune-in age: ${s.ageHeader}s last advanced ${u.toFixed(2)}s goal: ${f} skip sn ${e} to part ${l}`)}s.tuneInGoal=f}if(o=this.getDeliveryDirectives(s,t.deliveryDirectives,n,l),e||!h)return void this.loadPlaylist(o)}else(s.canBlockReload||s.canSkipUntil)&&(o=this.getDeliveryDirectives(s,t.deliveryDirectives,n,l));const d=this.hls.mainForwardBufferInfo,h=d?d.end-d.len:0,c=function(e,t=1/0){let i=1e3*e.targetduration;if(e.updated){const s=e.fragments,r=4;if(s.length&&i*r>t){const e=1e3*s[s.length-1].duration;e<i&&(i=e)}}else i/=2;return Math.round(i)}(s,1e3*(s.edge-h));s.updated&&a>this.requestScheduled+c&&(this.requestScheduled=r.loading.start),void 0!==n&&s.canBlockReload?this.requestScheduled=r.loading.first+c-(1e3*s.partTarget||1e3):-1===this.requestScheduled||this.requestScheduled+c<a?this.requestScheduled=a:this.requestScheduled-a<=0&&(this.requestScheduled+=c);let u=this.requestScheduled-a;u=Math.max(0,u),this.log(`reload live playlist ${e} in ${Math.round(u)} ms`),this.timer=self.setTimeout((()=>this.loadPlaylist(o)),u)}else this.clearTimer()}getDeliveryDirectives(e,t,i,s){let r=function(e,t){const{canSkipUntil:i,canSkipDateRanges:s,endSN:r}=e;return i&&(void 0!==t?t-r:0)<i?s?jp:Np:Op}(e,i);return null!=t&&t.skip&&e.deltaUpdateFailed&&(i=t.msn,s=t.part,r=Op),new Gp(i,s,r)}checkRetry(e){const t=e.details,i=Xp(e),s=e.errorAction,{action:r,retryCount:a=0,retryConfig:o}=s||{},n=!!s&&!!o&&(r===cf||!s.resolved&&r===df);if(n){var l;if(this.requestScheduled=-1,a>=o.maxNumRetry)return!1;if(i&&null!=(l=e.context)&&l.deliveryDirectives)this.warn(`Retrying playlist loading ${a+1}/${o.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const e=ef(o,a);this.timer=self.setTimeout((()=>this.loadPlaylist()),e),this.warn(`Retrying playlist loading ${a+1}/${o.maxNumRetry} after "${t}" in ${e}ms`)}e.levelRetry=!0,s.resolved=!0}return n}}class gf{constructor(e,t=0,i=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=i}sample(e,t){const i=Math.pow(this.alpha_,e);this.estimate_=t*(1-i)+i*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class yf{constructor(e,t,i,s=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=i,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new gf(e),this.fast_=new gf(t),this.defaultTTFB_=s,this.ttfb_=new gf(e)}update(e,t){const{slow_:i,fast_:s,ttfb_:r}=this;i.halfLife!==e&&(this.slow_=new gf(e,i.getEstimate(),i.getTotalWeight())),s.halfLife!==t&&(this.fast_=new gf(t,s.getEstimate(),s.getTotalWeight())),r.halfLife!==e&&(this.ttfb_=new gf(e,r.getEstimate(),r.getTotalWeight()))}sample(e,t){const i=(e=Math.max(e,this.minDelayMs_))/1e3,s=8*t/i;this.fast_.sample(i,s),this.slow_.sample(i,s)}sampleTTFB(e){const t=e/1e3,i=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(i,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}destroy(){}}const Af={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]},bf={};function _f(e,t,i,s,r,a){const o=e.audioCodec?e.audioGroups:null,n=null==a?void 0:a.audioCodec,l=null==a?void 0:a.channels,d=l?parseInt(l):n?1/0:2;let h=null;if(null!=o&&o.length)try{h=1===o.length&&o[0]?t.groups[o[0]].channels:o.reduce(((e,i)=>{if(i){const s=t.groups[i];if(!s)throw new Error(`Audio track group ${i} not found`);Object.keys(s.channels).forEach((t=>{e[t]=(e[t]||0)+s.channels[t]}))}return e}),{2:0})}catch(e){return!0}return void 0!==e.videoCodec&&(e.width>1920&&e.height>1088||e.height>1920&&e.width>1088||e.frameRate>Math.max(s,30)||"SDR"!==e.videoRange&&e.videoRange!==i||e.bitrate>Math.max(r,8e6))||!!h&&oc(d)&&Object.keys(h).some((e=>parseInt(e)>d))}function vf(e,t,i){const s=e.videoCodec,r=e.audioCodec;if(!s||!r||!i)return Promise.resolve(Af);const a={width:e.width,height:e.height,bitrate:Math.ceil(Math.max(.9*e.bitrate,e.averageBitrate)),framerate:e.frameRate||30},o=e.videoRange;"SDR"!==o&&(a.transferFunction=o.toLowerCase());const n=s.split(",").map((e=>({type:"media-source",video:ic(ic({},a),{},{contentType:Wu(e,"video")})})));return r&&e.audioGroups&&e.audioGroups.forEach((e=>{var i;e&&(null==(i=t.groups[e])||i.tracks.forEach((t=>{if(t.groupId===e){const e=t.channels||"",i=parseFloat(e);oc(i)&&i>2&&n.push.apply(n,r.split(",").map((e=>({type:"media-source",audio:{contentType:Wu(e,"audio"),channels:""+i}}))))}})))})),Promise.all(n.map((e=>{const t=function(e){const{audio:t,video:i}=e,s=i||t;if(s){const e=s.contentType.split('"')[1];if(i)return`r${i.height}x${i.width}f${Math.ceil(i.framerate)}${i.transferFunction||"sd"}_${e}_${Math.ceil(i.bitrate/1e5)}`;if(t)return`c${t.channels}${t.spatialRendering?"s":"n"}_${e}`}return""}(e);return bf[t]||(bf[t]=i.decodingInfo(e))}))).then((e=>({supported:!e.some((e=>!e.supported)),configurations:n,decodingInfoResults:e}))).catch((e=>({supported:!1,configurations:n,decodingInfoResults:[],error:e})))}function wf(e,t){let i=!1,s=[];return e&&(i="SDR"!==e,s=[e]),t&&(s=t.allowedVideoRanges||Fp.slice(0),i=void 0!==t.preferHDR?t.preferHDR:function(){if("function"==typeof matchMedia){const e=matchMedia("(dynamic-range: high)"),t=matchMedia("bad query");if(e.media!==t.media)return!0===e.matches}return!1}(),s=i?s.filter((e=>"SDR"!==e)):["SDR"]),{preferHDR:i,allowedVideoRanges:s}}function Sf(e,t){gc.log(`[abr] start candidates with "${e}" ignored because ${t}`)}function Tf(e,t,i){if("attrs"in e){const i=t.indexOf(e);if(-1!==i)return i}for(let s=0;s<t.length;s++){if(Ef(e,t[s],i))return s}return-1}function Ef(e,t,i){const{groupId:s,name:r,lang:a,assocLang:o,characteristics:n,default:l}=e,d=e.forced;return(void 0===s||t.groupId===s)&&(void 0===r||t.name===r)&&(void 0===a||t.lang===a)&&(void 0===a||t.assocLang===o)&&(void 0===l||t.default===l)&&(void 0===d||t.forced===d)&&(void 0===n||function(e,t=""){const i=e.split(","),s=t.split(",");return i.length===s.length&&!i.some((e=>-1===s.indexOf(e)))}(n,t.characteristics))&&(void 0===i||i(e,t))}function kf(e,t){const{audioCodec:i,channels:s}=e;return!(void 0!==i&&(t.audioCodec||"").substring(0,4)!==i.substring(0,4)||void 0!==s&&s!==(t.channels||"2"))}function Cf(e,t,i){for(let s=t;s;s--)if(i(e[s]))return s;for(let s=t+1;s<e.length;s++)if(i(e[s]))return s;return-1}class xf{constructor(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}destroy(){this.onHandlerDestroying(),this.onHandlerDestroyed()}onHandlerDestroying(){this.clearNextTick(),this.clearInterval()}onHandlerDestroyed(){}hasInterval(){return!!this._tickInterval}hasNextTick(){return!!this._tickTimer}setInterval(e){return!this._tickInterval&&(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)}clearInterval(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)}clearNextTick(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)}tick(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}var Rf="NOT_LOADED",Df="APPENDING",Lf="PARTIAL",If="OK";class Pf{constructor(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(dc.BUFFER_APPENDED,this.onBufferAppended,this),e.on(dc.FRAG_BUFFERED,this.onFragBuffered,this),e.on(dc.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(dc.BUFFER_APPENDED,this.onBufferAppended,this),e.off(dc.FRAG_BUFFERED,this.onFragBuffered,this),e.off(dc.FRAG_LOADED,this.onFragLoaded,this)}destroy(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const i=this.activePartLists[t];if(i)for(let t=i.length;t--;){const s=i[t];if(!s)break;const r=s.end;if(s.start<=e&&null!==r&&e<=r)return s}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){const{fragments:i}=this,s=Object.keys(i);for(let r=s.length;r--;){const a=i[s[r]];if((null==a?void 0:a.body.type)===t&&a.buffered){const t=a.body;if(t.start<=e&&e<=t.end)return t}}return null}detectEvictedFragments(e,t,i,s){this.timeRanges&&(this.timeRanges[e]=t);const r=(null==s?void 0:s.fragment.sn)||-1;Object.keys(this.fragments).forEach((s=>{const a=this.fragments[s];if(!a)return;if(r>=a.body.sn)return;if(!a.buffered&&!a.loaded)return void(a.body.type===i&&this.removeFragment(a.body));const o=a.range[e];o&&o.time.some((e=>{const i=!this.isTimeBuffered(e.startPTS,e.endPTS,t);return i&&this.removeFragment(a.body),i}))}))}detectPartialFragments(e){const t=this.timeRanges,{frag:i,part:s}=e;if(!t||"initSegment"===i.sn)return;const r=Mf(i),a=this.fragments[r];if(!a||a.buffered&&i.gap)return;const o=!i.relurl;if(Object.keys(t).forEach((e=>{const r=i.elementaryStreams[e];if(!r)return;const n=t[e],l=o||!0===r.partial;a.range[e]=this.getBufferedTimes(i,s,l,n)})),a.loaded=null,Object.keys(a.range).length){a.buffered=!0;(a.body.endList=i.endList||a.body.endList)&&(this.endListFragments[a.body.type]=a),Bf(a)||this.removeParts(i.sn-1,i.type)}else this.removeFragment(a.body)}removeParts(e,t){const i=this.activePartLists[t];i&&(this.activePartLists[t]=i.filter((t=>t.fragment.sn>=e)))}fragBuffered(e,t){const i=Mf(e);let s=this.fragments[i];!s&&t&&(s=this.fragments[i]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),s&&(s.loaded=null,s.buffered=!0)}getBufferedTimes(e,t,i,s){const r={time:[],partial:i},a=e.start,o=e.end,n=e.minEndPTS||o,l=e.maxStartPTS||a;for(let e=0;e<s.length;e++){const t=s.start(e)-this.bufferPadding,i=s.end(e)+this.bufferPadding;if(l>=t&&n<=i){r.time.push({startPTS:Math.max(a,s.start(e)),endPTS:Math.min(o,s.end(e))});break}if(a<i&&o>t){const t=Math.max(a,s.start(e)),i=Math.min(o,s.end(e));i>t&&(r.partial=!0,r.time.push({startPTS:t,endPTS:i}))}else if(o<=t)break}return r}getPartialFragment(e){let t,i,s,r=null,a=0;const{bufferPadding:o,fragments:n}=this;return Object.keys(n).forEach((l=>{const d=n[l];d&&Bf(d)&&(i=d.body.start-o,s=d.body.end+o,e>=i&&e<=s&&(t=Math.min(e-i,s-e),a<=t&&(r=d.body,a=t)))})),r}isEndListAppended(e){const t=this.endListFragments[e];return void 0!==t&&(t.buffered||Bf(t))}getState(e){const t=Mf(e),i=this.fragments[t];return i?i.buffered?Bf(i)?Lf:If:Df:Rf}isTimeBuffered(e,t,i){let s,r;for(let a=0;a<i.length;a++){if(s=i.start(a)-this.bufferPadding,r=i.end(a)+this.bufferPadding,e>=s&&t<=r)return!0;if(t<=s)return!1}return!1}onFragLoaded(e,t){const{frag:i,part:s}=t;if("initSegment"===i.sn||i.bitrateTest)return;const r=s?null:t,a=Mf(i);this.fragments[a]={body:i,appendedPTS:null,loaded:r,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:i,part:s,timeRanges:r}=t;if("initSegment"===i.sn)return;const a=i.type;if(s){let e=this.activePartLists[a];e||(this.activePartLists[a]=e=[]),e.push(s)}this.timeRanges=r,Object.keys(r).forEach((e=>{const t=r[e];this.detectEvictedFragments(e,t,a,s)}))}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=Mf(e);return!!this.fragments[t]}hasParts(e){var t;return!(null==(t=this.activePartLists[e])||!t.length)}removeFragmentsInRange(e,t,i,s,r){s&&!this.hasGaps||Object.keys(this.fragments).forEach((a=>{const o=this.fragments[a];if(!o)return;const n=o.body;n.type!==i||s&&!n.gap||n.start<t&&n.end>e&&(o.buffered||r)&&this.removeFragment(n)}))}removeFragment(e){const t=Mf(e);e.stats.loaded=0,e.clearElementaryStreamInfo();const i=this.activePartLists[e.type];if(i){const t=e.sn;this.activePartLists[e.type]=i.filter((e=>e.fragment.sn!==t))}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1}}function Bf(e){var t,i,s;return e.buffered&&(e.body.gap||(null==(t=e.range.video)?void 0:t.partial)||(null==(i=e.range.audio)?void 0:i.partial)||(null==(s=e.range.audiovideo)?void 0:s.partial))}function Mf(e){return`${e.type}_${e.level}_${e.sn}`}const Uf={length:0,start:()=>0,end:()=>0};class Ff{static isBuffered(e,t){try{if(e){const i=Ff.getBuffered(e);for(let e=0;e<i.length;e++)if(t>=i.start(e)&&t<=i.end(e))return!0}}catch(e){}return!1}static bufferInfo(e,t,i){try{if(e){const s=Ff.getBuffered(e),r=[];let a;for(a=0;a<s.length;a++)r.push({start:s.start(a),end:s.end(a)});return this.bufferedInfo(r,t,i)}}catch(e){}return{len:0,start:t,end:t,nextStart:void 0}}static bufferedInfo(e,t,i){t=Math.max(0,t),e.sort((function(e,t){const i=e.start-t.start;return i||t.end-e.end}));let s=[];if(i)for(let t=0;t<e.length;t++){const r=s.length;if(r){const a=s[r-1].end;e[t].start-a<i?e[t].end>a&&(s[r-1].end=e[t].end):s.push(e[t])}else s.push(e[t])}else s=e;let r,a=0,o=t,n=t;for(let e=0;e<s.length;e++){const l=s[e].start,d=s[e].end;if(t+i>=l&&t<d)o=l,n=d,a=n-t;else if(t+i<l){r=l;break}}return{len:a,start:o||0,end:n||0,nextStart:r}}static getBuffered(e){try{return e.buffered}catch(e){return gc.log("failed to get media.buffered",e),Uf}}}class Of{constructor(e,t,i,s=0,r=-1,a=!1){this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing={start:0,executeStart:0,executeEnd:0,end:0},this.buffering={audio:{start:0,executeStart:0,executeEnd:0,end:0},video:{start:0,executeStart:0,executeEnd:0,end:0},audiovideo:{start:0,executeStart:0,executeEnd:0,end:0}},this.level=e,this.sn=t,this.id=i,this.size=s,this.part=r,this.partial=a}}function Nf(e,t){for(let s=0,r=e.length;s<r;s++){var i;if((null==(i=e[s])?void 0:i.cc)===t)return e[s]}return null}function jf(e,t){if(e){const i=e.start+t;e.start=e.startPTS=i,e.endPTS=i+e.duration}}function Gf(e,t){const i=t.fragments;for(let t=0,s=i.length;t<s;t++)jf(i[t],e);t.fragmentHint&&jf(t.fragmentHint,e),t.alignedSliding=!0}function zf(e,t,i){t&&(!function(e,t,i){if(function(e,t,i){return!(!t||!(i.endCC>i.startCC||e&&e.cc<i.startCC))}(e,i,t)){const e=function(e,t){const i=e.fragments,s=t.fragments;if(!s.length||!i.length)return void gc.log("No fragments to align");const r=Nf(i,s[0].cc);if(r&&(!r||r.startPTS))return r;gc.log("No frag in previous level to align on")}(i,t);e&&oc(e.start)&&(gc.log(`Adjusting PTS using last level due to CC increase within current level ${t.url}`),Gf(e.start,t))}}(e,i,t),!i.alignedSliding&&t&&$f(i,t),i.alignedSliding||!t||i.skippedSegments||Jp(t,i))}function $f(e,t){if(!e.hasProgramDateTime||!t.hasProgramDateTime)return;const i=e.fragments,s=t.fragments;if(!i.length||!s.length)return;let r,a;const o=Math.min(t.endCC,e.endCC);t.startCC<o&&e.startCC<o&&(r=Nf(s,o),a=Nf(i,o)),r&&a||(r=s[Math.floor(s.length/2)],a=Nf(i,r.cc)||i[Math.floor(i.length/2)]);const n=r.programDateTime,l=a.programDateTime;if(!n||!l)return;Gf((l-n)/1e3-(a.start-r.start),e)}const Hf=Math.pow(2,17);class Vf{constructor(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(e,t){const i=e.url;if(!i)return Promise.reject(new qf({type:hc.NETWORK_ERROR,details:cc.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error("Fragment does not have a "+(i?"part list":"url")),networkDetails:null}));this.abort();const s=this.config,r=s.fLoader,a=s.loader;return new Promise(((o,n)=>{if(this.loader&&this.loader.destroy(),e.gap){if(e.tagList.some((e=>"GAP"===e[0])))return void n(Jf(e));e.gap=!1}const l=this.loader=e.loader=r?new r(s):new a(s),d=Wf(e),h=tf(s.fragLoadPolicy.default),c={loadPolicy:h,timeout:h.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:"initSegment"===e.sn?1/0:Hf};e.stats=l.stats,l.load(d,c,{onSuccess:(t,i,s,r)=>{this.resetLoader(e,l);let a=t.data;s.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(a.slice(0,16)),a=a.slice(16)),o({frag:e,part:null,payload:a,networkDetails:r})},onError:(t,s,r,a)=>{this.resetLoader(e,l),n(new qf({type:hc.NETWORK_ERROR,details:cc.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:ic({url:i,data:void 0},t),error:new Error(`HTTP Error ${t.code} ${t.text}`),networkDetails:r,stats:a}))},onAbort:(t,i,s)=>{this.resetLoader(e,l),n(new qf({type:hc.NETWORK_ERROR,details:cc.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:s,stats:t}))},onTimeout:(t,i,s)=>{this.resetLoader(e,l),n(new qf({type:hc.NETWORK_ERROR,details:cc.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${c.timeout}ms`),networkDetails:s,stats:t}))},onProgress:(i,s,r,a)=>{t&&t({frag:e,part:null,payload:r,networkDetails:a})}})}))}loadPart(e,t,i){this.abort();const s=this.config,r=s.fLoader,a=s.loader;return new Promise(((o,n)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap)return void n(Jf(e,t));const l=this.loader=e.loader=r?new r(s):new a(s),d=Wf(e,t),h=tf(s.fragLoadPolicy.default),c={loadPolicy:h,timeout:h.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Hf};t.stats=l.stats,l.load(d,c,{onSuccess:(s,r,a,n)=>{this.resetLoader(e,l),this.updateStatsFromPart(e,t);const d={frag:e,part:t,payload:s.data,networkDetails:n};i(d),o(d)},onError:(i,s,r,a)=>{this.resetLoader(e,l),n(new qf({type:hc.NETWORK_ERROR,details:cc.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:ic({url:d.url,data:void 0},i),error:new Error(`HTTP Error ${i.code} ${i.text}`),networkDetails:r,stats:a}))},onAbort:(i,s,r)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,l),n(new qf({type:hc.NETWORK_ERROR,details:cc.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:r,stats:i}))},onTimeout:(i,s,r)=>{this.resetLoader(e,l),n(new qf({type:hc.NETWORK_ERROR,details:cc.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${c.timeout}ms`),networkDetails:r,stats:i}))}})}))}updateStatsFromPart(e,t){const i=e.stats,s=t.stats,r=s.total;if(i.loaded+=s.loaded,r){const s=Math.round(e.duration/t.duration),a=Math.min(Math.round(i.loaded/r),s),o=(s-a)*Math.round(i.loaded/a);i.total=i.loaded+o}else i.total=Math.max(i.loaded,i.total);const a=i.loading,o=s.loading;a.start?a.first+=o.first-o.start:(a.start=o.start,a.first=o.first),a.end=o.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function Wf(e,t=null){const i=t||e,s={frag:e,part:t,responseType:"arraybuffer",url:i.url,headers:{},rangeStart:0,rangeEnd:0},r=i.byteRangeStartOffset,a=i.byteRangeEndOffset;if(oc(r)&&oc(a)){var o;let t=r,i=a;if("initSegment"===e.sn&&"AES-128"===(null==(o=e.decryptdata)?void 0:o.method)){const e=a-r;e%16&&(i=a+(16-e%16)),0!==r&&(s.resetIV=!0,t=r-16)}s.rangeStart=t,s.rangeEnd=i}return s}function Jf(e,t){const i=new Error(`GAP ${e.gap?"tag":"attribute"} found`),s={type:hc.MEDIA_ERROR,details:cc.FRAG_GAP,fatal:!1,frag:e,error:i,networkDetails:null};return t&&(s.part=t),(t||e).stats.aborted=!0,new qf(s)}class qf extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class Kf{constructor(e,t){this.subtle=void 0,this.aesIV=void 0,this.subtle=e,this.aesIV=t}decrypt(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)}}class Yf{constructor(e,t){this.subtle=void 0,this.key=void 0,this.subtle=e,this.key=t}expandKey(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])}}class Qf{constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(e){const t=new DataView(e),i=new Uint32Array(4);for(let e=0;e<4;e++)i[e]=t.getUint32(4*e);return i}initTable(){const e=this.sBox,t=this.invSBox,i=this.subMix,s=i[0],r=i[1],a=i[2],o=i[3],n=this.invSubMix,l=n[0],d=n[1],h=n[2],c=n[3],u=new Uint32Array(256);let p=0,f=0,m=0;for(m=0;m<256;m++)u[m]=m<128?m<<1:m<<1^283;for(m=0;m<256;m++){let i=f^f<<1^f<<2^f<<3^f<<4;i=i>>>8^255&i^99,e[p]=i,t[i]=p;const n=u[p],m=u[n],g=u[m];let y=257*u[i]^16843008*i;s[p]=y<<24|y>>>8,r[p]=y<<16|y>>>16,a[p]=y<<8|y>>>24,o[p]=y,y=16843009*g^65537*m^257*n^16843008*p,l[i]=y<<24|y>>>8,d[i]=y<<16|y>>>16,h[i]=y<<8|y>>>24,c[i]=y,p?(p=n^u[u[u[g^n]]],f^=u[u[f]]):p=f=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let i=!0,s=0;for(;s<t.length&&i;)i=t[s]===this.key[s],s++;if(i)return;this.key=t;const r=this.keySize=t.length;if(4!==r&&6!==r&&8!==r)throw new Error("Invalid aes key size="+r);const a=this.ksRows=4*(r+6+1);let o,n;const l=this.keySchedule=new Uint32Array(a),d=this.invKeySchedule=new Uint32Array(a),h=this.sBox,c=this.rcon,u=this.invSubMix,p=u[0],f=u[1],m=u[2],g=u[3];let y,A;for(o=0;o<a;o++)o<r?y=l[o]=t[o]:(A=y,o%r==0?(A=A<<8|A>>>24,A=h[A>>>24]<<24|h[A>>>16&255]<<16|h[A>>>8&255]<<8|h[255&A],A^=c[o/r|0]<<24):r>6&&o%r==4&&(A=h[A>>>24]<<24|h[A>>>16&255]<<16|h[A>>>8&255]<<8|h[255&A]),l[o]=y=(l[o-r]^A)>>>0);for(n=0;n<a;n++)o=a-n,A=3&n?l[o]:l[o-4],d[n]=n<4||o<=4?A:p[h[A>>>24]]^f[h[A>>>16&255]]^m[h[A>>>8&255]]^g[h[255&A]],d[n]=d[n]>>>0}networkToHostOrderSwap(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24}decrypt(e,t,i){const s=this.keySize+6,r=this.invKeySchedule,a=this.invSBox,o=this.invSubMix,n=o[0],l=o[1],d=o[2],h=o[3],c=this.uint8ArrayToUint32Array_(i);let u=c[0],p=c[1],f=c[2],m=c[3];const g=new Int32Array(e),y=new Int32Array(g.length);let A,b,_,v,w,S,T,E,k,C,x,R,D,L;const I=this.networkToHostOrderSwap;for(;t<g.length;){for(k=I(g[t]),C=I(g[t+1]),x=I(g[t+2]),R=I(g[t+3]),w=k^r[0],S=R^r[1],T=x^r[2],E=C^r[3],D=4,L=1;L<s;L++)A=n[w>>>24]^l[S>>16&255]^d[T>>8&255]^h[255&E]^r[D],b=n[S>>>24]^l[T>>16&255]^d[E>>8&255]^h[255&w]^r[D+1],_=n[T>>>24]^l[E>>16&255]^d[w>>8&255]^h[255&S]^r[D+2],v=n[E>>>24]^l[w>>16&255]^d[S>>8&255]^h[255&T]^r[D+3],w=A,S=b,T=_,E=v,D+=4;A=a[w>>>24]<<24^a[S>>16&255]<<16^a[T>>8&255]<<8^a[255&E]^r[D],b=a[S>>>24]<<24^a[T>>16&255]<<16^a[E>>8&255]<<8^a[255&w]^r[D+1],_=a[T>>>24]<<24^a[E>>16&255]<<16^a[w>>8&255]<<8^a[255&S]^r[D+2],v=a[E>>>24]<<24^a[w>>16&255]<<16^a[S>>8&255]<<8^a[255&T]^r[D+3],y[t]=I(A^u),y[t+1]=I(v^p),y[t+2]=I(_^f),y[t+3]=I(b^m),u=k,p=C,f=x,m=R,t+=4}return y.buffer}}class Xf{constructor(e,{removePKCS7Padding:t=!0}={}){if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.useSoftware=e.enableSoftwareAES,this.removePKCS7Padding=t,t)try{const e=self.crypto;e&&(this.subtle=e.subtle||e.webkitSubtle)}catch(e){}null===this.subtle&&(this.useSoftware=!0)}destroy(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null}isSync(){return this.useSoftware}flush(){const{currentResult:e,remainderData:t}=this;if(!e||t)return this.reset(),null;const i=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?function(e){const t=e.byteLength,i=t&&new DataView(e.buffer).getUint8(t-1);return i?Vc(e,0,t-i):e}(i):i}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,i){return this.useSoftware?new Promise(((s,r)=>{this.softwareDecrypt(new Uint8Array(e),t,i);const a=this.flush();a?s(a.buffer):r(new Error("[softwareDecrypt] Failed to decrypt data"))})):this.webCryptoDecrypt(new Uint8Array(e),t,i)}softwareDecrypt(e,t,i){const{currentIV:s,currentResult:r,remainderData:a}=this;this.logOnce("JS AES decrypt"),a&&(e=xu(a,e),this.remainderData=null);const o=this.getValidChunk(e);if(!o.length)return null;s&&(i=s);let n=this.softwareDecrypter;n||(n=this.softwareDecrypter=new Qf),n.expandKey(t);const l=r;return this.currentResult=n.decrypt(o.buffer,0,i),this.currentIV=Vc(o,-16).buffer,l||null}webCryptoDecrypt(e,t,i){const s=this.subtle;return this.key===t&&this.fastAesKey||(this.key=t,this.fastAesKey=new Yf(s,t)),this.fastAesKey.expandKey().then((t=>{if(!s)return Promise.reject(new Error("web crypto not initialized"));this.logOnce("WebCrypto AES decrypt");return new Kf(s,new Uint8Array(i)).decrypt(e.buffer,t)})).catch((s=>(gc.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${s.name}: ${s.message}`),this.onWebCryptoError(e,t,i))))}onWebCryptoError(e,t,i){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,i);const s=this.flush();if(s)return s.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")}getValidChunk(e){let t=e;const i=e.length-e.length%16;return i!==e.length&&(t=Vc(e,0,i),this.remainderData=Vc(e,i)),t}logOnce(e){this.logEnabled&&(gc.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const Zf=function(e){let t="";const i=e.length;for(let s=0;s<i;s++)t+=`[${e.start(s).toFixed(3)}-${e.end(s).toFixed(3)}]`;return t},em="STOPPED",tm="IDLE",im="KEY_LOADING",sm="FRAG_LOADING",rm="FRAG_LOADING_WAITING_RETRY",am="WAITING_TRACK",om="PARSING",nm="PARSED",lm="ENDED",dm="ERROR",hm="WAITING_INIT_PTS",cm="WAITING_LEVEL";class um extends xf{constructor(e,t,i,s,r){super(),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=em,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.loadedmetadata=!1,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.onvseeking=null,this.onvended=null,this.logPrefix="",this.log=void 0,this.warn=void 0,this.playlistType=r,this.logPrefix=s,this.log=gc.log.bind(gc,`${s}:`),this.warn=gc.warn.bind(gc,`${s}:`),this.hls=e,this.fragmentLoader=new Vf(e.config),this.keyLoader=i,this.fragmentTracker=t,this.config=e.config,this.decrypter=new Xf(e.config),e.on(dc.MANIFEST_LOADED,this.onManifestLoaded,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);const e=this.fragCurrent;null!=e&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=em}_streamEnded(e,t){if(t.live||e.nextStart||!e.end||!this.media)return!1;const i=t.partList;if(null!=i&&i.length){const e=i[i.length-1];return Ff.isBuffered(this.media,e.start+e.duration/2)}const s=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(s)}getLevelDetails(){var e;if(this.levels&&null!==this.levelLastLoaded)return null==(e=this.levelLastLoaded)?void 0:e.details}onMediaAttached(e,t){const i=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),i.addEventListener("seeking",this.onvseeking),i.addEventListener("ended",this.onvended);const s=this.config;this.levels&&s.autoStartLoad&&this.state===em&&this.startLoad(s.startPosition)}onMediaDetaching(){const e=this.media;null!=e&&e.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&this.onvseeking&&this.onvended&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.keyLoader&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}onMediaSeeking(){const{config:e,fragCurrent:t,media:i,mediaBuffer:s,state:r}=this,a=i?i.currentTime:0,o=Ff.bufferInfo(s||i,a,e.maxBufferHole);if(this.log(`media seeking to ${oc(a)?a.toFixed(3):a}, state: ${r}`),this.state===lm)this.resetLoadingState();else if(t){const i=e.maxFragLookUpTolerance,s=t.start-i,r=t.start+t.duration+i;if(!o.len||r<o.start||s>o.end){const e=a>r;(a<s||e)&&(e&&t.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),t.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}i&&(this.fragmentTracker.removeFragmentsInRange(a,1/0,this.playlistType,!0),this.lastCurrentTime=a),this.loadedmetadata||o.len||(this.nextLoadPosition=this.startPosition=a),this.tickImmediate()}onMediaEnded(){this.startPosition=this.lastCurrentTime=0}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset,this.initPTS=[]}onHandlerDestroying(){this.hls.off(dc.MANIFEST_LOADED,this.onManifestLoaded,this),this.stopLoad(),super.onHandlerDestroying(),this.hls=null}onHandlerDestroyed(){this.state=em,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,super.onHandlerDestroyed()}loadFragment(e,t,i){this._loadFragForPlayback(e,t,i)}_loadFragForPlayback(e,t,i){this._doFragLoad(e,t,i,(t=>{if(this.fragContextChanged(e))return this.warn(`Fragment ${e.sn}${t.part?" p: "+t.part.index:""} of level ${e.level} was dropped during download.`),void this.fragmentTracker.removeFragment(e);e.stats.chunkCount++,this._handleFragmentLoadProgress(t)})).then((t=>{if(!t)return;const i=this.state;this.fragContextChanged(e)?(i===sm||!this.fragCurrent&&i===om)&&(this.fragmentTracker.removeFragment(e),this.state=tm):("payload"in t&&(this.log(`Loaded fragment ${e.sn} of level ${e.level}`),this.hls.trigger(dc.FRAG_LOADED,t)),this._handleFragmentLoadComplete(t))})).catch((t=>{this.state!==em&&this.state!==dm&&(this.warn(t),this.resetFragmentLoading(e))}))}clearTrackerIfNeeded(e){var t;const{fragmentTracker:i}=this;if(i.getState(e)===Df){const t=e.type,s=this.getFwdBufferInfo(this.mediaBuffer,t),r=Math.max(e.duration,s?s.len:this.config.maxBufferLength);this.reduceMaxBufferLength(r)&&i.removeFragment(e)}else 0===(null==(t=this.mediaBuffer)?void 0:t.buffered.length)?i.removeAllFragments():i.hasParts(e.type)&&(i.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),i.getState(e)===Lf&&i.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}flushMainBuffer(e,t,i=null){if(!(e-t))return;const s={startOffset:e,endOffset:t,type:i};this.hls.trigger(dc.BUFFER_FLUSHING,s)}_loadInitSegment(e,t){this._doFragLoad(e,t).then((t=>{if(!t||this.fragContextChanged(e)||!this.levels)throw new Error("init load aborted");return t})).then((t=>{const{hls:i}=this,{payload:s}=t,r=e.decryptdata;if(s&&s.byteLength>0&&null!=r&&r.key&&r.iv&&"AES-128"===r.method){const a=self.performance.now();return this.decrypter.decrypt(new Uint8Array(s),r.key.buffer,r.iv.buffer).catch((t=>{throw i.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.FRAG_DECRYPT_ERROR,fatal:!1,error:t,reason:t.message,frag:e}),t})).then((s=>{const r=self.performance.now();return i.trigger(dc.FRAG_DECRYPTED,{frag:e,payload:s,stats:{tstart:a,tdecrypt:r}}),t.payload=s,this.completeInitSegmentLoad(t)}))}return this.completeInitSegmentLoad(t)})).catch((t=>{this.state!==em&&this.state!==dm&&(this.warn(t),this.resetFragmentLoading(e))}))}completeInitSegmentLoad(e){const{levels:t}=this;if(!t)throw new Error("init load aborted, missing levels");const i=e.frag.stats;this.state=tm,e.frag.data=new Uint8Array(e.payload),i.parsing.start=i.buffering.start=self.performance.now(),i.parsing.end=i.buffering.end=self.performance.now(),this.tick()}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.sn!==t.sn||e.level!==t.level}fragBufferedComplete(e,t){var i,s,r,a;const o=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.playlistType===gp?"level":"track"} ${e.level} (frag:[${(null!=(i=e.startPTS)?i:NaN).toFixed(3)}-${(null!=(s=e.endPTS)?s:NaN).toFixed(3)}] > buffer:${o?Zf(Ff.getBuffered(o)):"(detached)"})`),"initSegment"!==e.sn){var n;if(e.type!==Ap){const t=e.elementaryStreams;if(!Object.keys(t).some((e=>!!t[e])))return void(this.state=tm)}const t=null==(n=this.levels)?void 0:n[e.level];null!=t&&t.fragmentError&&(this.log(`Resetting level fragment error count of ${t.fragmentError} on frag buffered`),t.fragmentError=0)}this.state=tm,o&&(!this.loadedmetadata&&e.type==gp&&o.buffered.length&&(null==(r=this.fragCurrent)?void 0:r.sn)===(null==(a=this.fragPrevious)?void 0:a.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())}seekToStartPos(){}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:i,part:s,partsLoaded:r}=e,a=!r||0===r.length||r.some((e=>!e)),o=new Of(i.level,i.sn,i.stats.chunkCount+1,0,s?s.index:-1,!a);t.flush(o)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,i=null,s){var r;const a=null==t?void 0:t.details;if(!this.levels||!a)throw new Error(`frag load aborted, missing level${a?"":" detail"}s`);let o=null;if(!e.encrypted||null!=(r=e.decryptdata)&&r.key?!e.encrypted&&a.encryptedFragments.length&&this.keyLoader.loadClear(e,a.encryptedFragments):(this.log(`Loading key for ${e.sn} of [${a.startSN}-${a.endSN}], ${"[stream-controller]"===this.logPrefix?"level":"track"} ${e.level}`),this.state=im,this.fragCurrent=e,o=this.keyLoader.load(e).then((e=>{if(!this.fragContextChanged(e.frag))return this.hls.trigger(dc.KEY_LOADED,e),this.state===im&&(this.state=tm),e})),this.hls.trigger(dc.KEY_LOADING,{frag:e}),null===this.fragCurrent&&(o=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))),i=Math.max(e.start,i||0),this.config.lowLatencyMode&&"initSegment"!==e.sn){const r=a.partList;if(r&&s){i>e.end&&a.fragmentHint&&(e=a.fragmentHint);const n=this.getNextPart(r,e,i);if(n>-1){const l=r[n];let d;return this.log(`Loading part sn: ${e.sn} p: ${l.index} cc: ${e.cc} of playlist [${a.startSN}-${a.endSN}] parts [0-${n}-${r.length-1}] ${"[stream-controller]"===this.logPrefix?"level":"track"}: ${e.level}, target: ${parseFloat(i.toFixed(3))}`),this.nextLoadPosition=l.start+l.duration,this.state=sm,d=o?o.then((i=>!i||this.fragContextChanged(i.frag)?null:this.doFragPartsLoad(e,l,t,s))).catch((e=>this.handleFragLoadError(e))):this.doFragPartsLoad(e,l,t,s).catch((e=>this.handleFragLoadError(e))),this.hls.trigger(dc.FRAG_LOADING,{frag:e,part:l,targetBufferTime:i}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):d}if(!e.url||this.loadedEndOfParts(r,i))return Promise.resolve(null)}}this.log(`Loading fragment ${e.sn} cc: ${e.cc} ${a?"of ["+a.startSN+"-"+a.endSN+"] ":""}${"[stream-controller]"===this.logPrefix?"level":"track"}: ${e.level}, target: ${parseFloat(i.toFixed(3))}`),oc(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=sm;const n=this.config.progressive;let l;return l=n&&o?o.then((t=>!t||this.fragContextChanged(null==t?void 0:t.frag)?null:this.fragmentLoader.load(e,s))).catch((e=>this.handleFragLoadError(e))):Promise.all([this.fragmentLoader.load(e,n?s:void 0),o]).then((([e])=>(!n&&e&&s&&s(e),e))).catch((e=>this.handleFragLoadError(e))),this.hls.trigger(dc.FRAG_LOADING,{frag:e,targetBufferTime:i}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):l}doFragPartsLoad(e,t,i,s){return new Promise(((r,a)=>{var o;const n=[],l=null==(o=i.details)?void 0:o.partList,d=t=>{this.fragmentLoader.loadPart(e,t,s).then((s=>{n[t.index]=s;const a=s.part;this.hls.trigger(dc.FRAG_LOADED,s);const o=Kp(i,e.sn,t.index+1)||Yp(l,e.sn,t.index+1);if(!o)return r({frag:e,part:a,partsLoaded:n});d(o)})).catch(a)};d(t)}))}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===cc.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(dc.ERROR,t)}else this.hls.trigger(dc.ERROR,{type:hc.OTHER_ERROR,details:cc.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==om)return void(this.fragCurrent||this.state===em||this.state===dm||(this.state=tm));const{frag:i,part:s,level:r}=t,a=self.performance.now();i.stats.parsing.end=a,s&&(s.stats.parsing.end=a),this.updateLevelTiming(i,s,r,e.partial)}getCurrentContext(e){const{levels:t,fragCurrent:i}=this,{level:s,sn:r,part:a}=e;if(null==t||!t[s])return this.warn(`Levels object was unset while buffering fragment ${r} of level ${s}. The current chunk will not be buffered.`),null;const o=t[s],n=a>-1?Kp(o,r,a):null,l=n?n.fragment:function(e,t,i){if(null==e||!e.details)return null;const s=e.details;let r=s.fragments[t-s.startSN];return r||(r=s.fragmentHint,r&&r.sn===t?r:t<s.startSN&&i&&i.sn===t?i:null)}(o,r,i);return l?(i&&i!==l&&(l.stats=i.stats),{frag:l,part:n,level:o}):null}bufferFragmentData(e,t,i,s,r){var a;if(!e||this.state!==om)return;const{data1:o,data2:n}=e;let l=o;if(o&&n&&(l=xu(o,n)),null==(a=l)||!a.length)return;const d={type:e.type,frag:t,part:i,chunkMeta:s,parent:t.type,data:l};if(this.hls.trigger(dc.BUFFER_APPENDING,d),e.dropped&&e.independent&&!i){if(r)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!Ff.isBuffered(t,t.currentTime))return void this.flushMainBuffer(0,e.start);const i=t.currentTime,s=Ff.bufferInfo(t,i,0),r=e.duration,a=Math.min(2*this.config.maxFragLookUpTolerance,.25*r),o=Math.max(Math.min(e.start-a,s.end-a),i+a);e.start-o>a&&this.flushMainBuffer(o,e.start)}getFwdBufferInfo(e,t){const i=this.getLoadPosition();return oc(i)?this.getFwdBufferInfoAtPos(e,i,t):null}getFwdBufferInfoAtPos(e,t,i){const{config:{maxBufferHole:s}}=this,r=Ff.bufferInfo(e,t,s);if(0===r.len&&void 0!==r.nextStart){const a=this.fragmentTracker.getBufferedFrag(t,i);if(a&&r.nextStart<a.end)return Ff.bufferInfo(e,t,Math.max(r.nextStart,s))}return r}getMaxBufferLength(e){const{config:t}=this;let i;return i=e?Math.max(8*t.maxBufferSize/e,t.maxBufferLength):t.maxBufferLength,Math.min(i,t.maxMaxBufferLength)}reduceMaxBufferLength(e){const t=this.config,i=e||t.maxBufferLength;return t.maxMaxBufferLength>=i&&(t.maxMaxBufferLength/=2,this.warn(`Reduce max buffer length to ${t.maxMaxBufferLength}s`),!0)}getAppendedFrag(e,t=gp){const i=this.fragmentTracker.getAppendedFrag(e,gp);return i&&"fragment"in i?i.fragment:i}getNextFragment(e,t){const i=t.fragments,s=i.length;if(!s)return null;const{config:r}=this,a=i[0].start;let o;if(t.live){const n=r.initialLiveManifestSize;if(s<n)return this.warn(`Not enough fragments to start playback (have: ${s}, need: ${n})`),null;(!t.PTSKnown&&!this.startFragRequested&&-1===this.startPosition||e<a)&&(o=this.getInitialLiveFragment(t,i),this.startPosition=this.nextLoadPosition=o?this.hls.liveSyncPosition||o.start:e)}else e<=a&&(o=i[0]);if(!o){const i=r.lowLatencyMode?t.partEnd:t.fragmentEnd;o=this.getFragmentAtPosition(e,i,t)}return this.mapToInitFragWhenRequired(o)}isLoopLoading(e,t){const i=this.fragmentTracker.getState(e);return(i===If||i===Lf&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,i,s,r){const a=e.gap,o=this.getNextFragment(this.nextLoadPosition,t);if(null===o)return o;if(e=o,a&&e&&!e.gap&&i.nextStart){const t=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,i.nextStart,s);if(null!==t&&i.len+t.len>=r)return this.log(`buffer full after gaps in "${s}" playlist starting at sn: ${e.sn}`),null}return e}mapToInitFragWhenRequired(e){return null==e||!e.initSegment||null!=e&&e.initSegment.data||this.bitrateTest?e:e.initSegment}getNextPart(e,t,i){let s=-1,r=!1,a=!0;for(let o=0,n=e.length;o<n;o++){const n=e[o];if(a=a&&!n.independent,s>-1&&i<n.start)break;const l=n.loaded;l?s=-1:(r||n.independent||a)&&n.fragment===t&&(s=o),r=l}return s}loadedEndOfParts(e,t){const i=e[e.length-1];return i&&t>i.start&&i.loaded}getInitialLiveFragment(e,t){const i=this.fragPrevious;let s=null;if(i){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${i.programDateTime}`),s=function(e,t,i){if(null===t||!Array.isArray(e)||!e.length||!oc(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;i=i||0;for(let s=0;s<e.length;++s){const r=e[s];if(nf(t,i,r))return r}return null}(t,i.endProgramDateTime,this.config.maxFragLookUpTolerance)),!s){const r=i.sn+1;if(r>=e.startSN&&r<=e.endSN){const a=t[r-e.startSN];i.cc===a.cc&&(s=a,this.log(`Live playlist, switching playlist, load frag with next SN: ${s.sn}`))}s||(s=function(e,t){return rf(e,(e=>e.cc<t?1:e.cc>t?-1:0))}(t,i.cc),s&&this.log(`Live playlist, switching playlist, load frag with same CC: ${s.sn}`))}}else{const t=this.hls.liveSyncPosition;null!==t&&(s=this.getFragmentAtPosition(t,this.bitrateTest?e.fragmentEnd:e.edge,e))}return s}getFragmentAtPosition(e,t,i){const{config:s}=this;let{fragPrevious:r}=this,{fragments:a,endSN:o}=i;const{fragmentHint:n}=i,l=s.maxFragLookUpTolerance,d=i.partList,h=!!(s.lowLatencyMode&&null!=d&&d.length&&n);let c;if(h&&n&&!this.bitrateTest&&(a=a.concat(n),o=n.sn),e<t){c=af(r,a,e,e>t-l?0:l)}else c=a[a.length-1];if(c){const e=c.sn-i.startSN,t=this.fragmentTracker.getState(c);if((t===If||t===Lf&&c.gap)&&(r=c),r&&c.sn===r.sn&&(!h||d[0].fragment.sn>c.sn)){if(r&&c.level===r.level){const t=a[e+1];c=c.sn<o&&this.fragmentTracker.getState(t)!==If?t:null}}}return c}synchronizeToLiveEdge(e){const{config:t,media:i}=this;if(!i)return;const s=this.hls.liveSyncPosition,r=i.currentTime,a=e.fragments[0].start,o=e.edge,n=r>=a-t.maxFragLookUpTolerance&&r<=o;if(null!==s&&i.duration>s&&(r<s||!n)){const a=void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!n&&i.readyState<4||r<o-a)&&(this.loadedmetadata||(this.nextLoadPosition=s),i.readyState&&(this.warn(`Playback: ${r.toFixed(3)} is located too far from the end of live sliding playlist: ${o}, reset currentTime to : ${s.toFixed(3)}`),i.currentTime=s))}}alignPlaylists(e,t,i){const s=e.fragments.length;if(!s)return this.warn("No fragments in live playlist"),0;const r=e.fragments[0].start,a=!t,o=e.alignedSliding&&oc(r);if(a||!o&&!r){const{fragPrevious:r}=this;zf(r,i,e);const a=e.fragments[0].start;return this.log(`Live playlist sliding: ${a.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} prev-sn: ${r?r.sn:"na"} fragments: ${s}`),a}return r}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)}setStartPosition(e,t){let i=this.startPosition;if(i<t&&(i=-1),-1===i||-1===this.lastCurrentTime){const s=null!==this.startTimeOffset,r=s?this.startTimeOffset:e.startTimeOffset;null!==r&&oc(r)?(i=t+r,r<0&&(i+=e.totalduration),i=Math.min(Math.max(t,i),t+e.totalduration),this.log(`Start time offset ${r} found in ${s?"multivariant":"media"} playlist, adjust startPosition to ${i}`),this.startPosition=i):e.live?i=this.hls.liveSyncPosition||t:this.startPosition=i=0,this.lastCurrentTime=i}this.nextLoadPosition=i}getLoadPosition(){const{media:e}=this;let t=0;return this.loadedmetadata&&e?t=e.currentTime:this.nextLoadPosition&&(t=this.nextLoadPosition),t}handleFragLoadAborted(e,t){this.transmuxer&&"initSegment"!==e.sn&&e.stats.aborted&&(this.warn(`Fragment ${e.sn}${t?" part "+t.index:""} of level ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){this.fragCurrent&&(this.fragContextChanged(e)||this.state===rm)||(this.state=tm)}onFragmentOrKeyLoadError(e,t){if(t.chunkMeta&&!t.frag){const e=this.getCurrentContext(t.chunkMeta);e&&(t.frag=e.frag)}const i=t.frag;if(!i||i.type!==e||!this.levels)return;var s;if(this.fragContextChanged(i))return void this.warn(`Frag load error must match current frag to retry ${i.url} > ${null==(s=this.fragCurrent)?void 0:s.url}`);const r=t.details===cc.FRAG_GAP;r&&this.fragmentTracker.fragBuffered(i,!0);const a=t.errorAction,{action:o,retryCount:n=0,retryConfig:l}=a||{};if(a&&o===cf&&l){this.resetStartWhenNotLoaded(this.levelLastLoaded);const s=ef(l,n);this.warn(`Fragment ${i.sn} of ${e} ${i.level} errored with ${t.details}, retrying loading ${n+1}/${l.maxNumRetry} in ${s}ms`),a.resolved=!0,this.retryDate=self.performance.now()+s,this.state=rm}else if(l&&a){if(this.resetFragmentErrors(e),!(n<l.maxNumRetry))return void gc.warn(`${t.details} reached or exceeded max retry (${n})`);r||o===hf||(a.resolved=!0)}else(null==a?void 0:a.action)===df?this.state=cm:this.state=dm;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===om||this.state===nm){const t=e.parent,i=this.getFwdBufferInfo(this.mediaBuffer,t),s=i&&i.len>.5;s&&this.reduceMaxBufferLength(i.len);const r=!s;return r&&this.warn(`Buffer full error while media.currentTime is not buffered, flush ${t} buffer`),e.frag&&(this.fragmentTracker.removeFragment(e.frag),this.nextLoadPosition=e.frag.start),this.resetLoadingState(),r}return!1}resetFragmentErrors(e){e===yp&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==em&&(this.state=tm)}afterBufferFlushed(e,t,i){if(!e)return;const s=Ff.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,s,i),this.state===lm&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=tm}resetStartWhenNotLoaded(e){if(!this.loadedmetadata){this.startFragRequested=!1;const t=e?e.details:null;null!=t&&t.live?(this.startPosition=-1,this.setStartPosition(t,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){this.warn(`The loading context changed while buffering fragment ${e.sn} of level ${e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,i,s){var r;const a=i.details;if(!a)return void this.warn("level.details undefined");if(!Object.keys(e.elementaryStreams).reduce(((t,r)=>{const o=e.elementaryStreams[r];if(o){const n=o.endPTS-o.startPTS;if(n<=0)return this.warn(`Could not parse fragment ${e.sn} ${r} duration reliably (${n})`),t||!1;const l=s?0:Vp(a,e,o.startPTS,o.endPTS,o.startDTS,o.endDTS);return this.hls.trigger(dc.LEVEL_PTS_UPDATED,{details:a,level:i,drift:l,type:r,frag:e,start:o.startPTS,end:o.endPTS}),!0}return t}),!1)&&null===(null==(r=this.transmuxer)?void 0:r.error)){const t=new Error(`Found no media in fragment ${e.sn} of level ${e.level} resetting transmuxer to fallback to playlist timing`);if(0===i.fragmentError&&(i.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)),this.warn(t.message),this.hls.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.FRAG_PARSING_ERROR,fatal:!1,error:t,frag:e,reason:`Found no media in msn ${e.sn} of level "${i.url}"`}),!this.hls)return;this.resetTransmuxer()}this.state=nm,this.hls.trigger(dc.FRAG_PARSED,{frag:e,part:t})}resetTransmuxer(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)}recoverWorkerError(e){"demuxerWorker"===e.event&&(this.fragmentTracker.removeAllFragments(),this.resetTransmuxer(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}class pm{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let i;return e.length?(i=1===e.length?e[0]:function(e,t){const i=new Uint8Array(t);let s=0;for(let t=0;t<e.length;t++){const r=e[t];i.set(r,s),s+=r.length}return i}(e,t),this.reset(),i):new Uint8Array(0)}reset(){this.chunks.length=0,this.dataLength=0}}function fm(e="",t=9e4){return{type:e,id:-1,pid:-1,inputTimeScale:t,sequenceNumber:-1,samples:[],dropped:0}}class mm{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(e,t,i,s){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,t){return!1}appendFrame(e,t,i){}demux(e,t){this.cachedData&&(e=xu(this.cachedData,e),this.cachedData=null);let i,s=qc(e,0),r=s?s.length:0;const a=this._audioTrack,o=this._id3Track,n=s?Qc(s):void 0,l=e.length;for((null===this.basePTS||0===this.frameIndex&&oc(n))&&(this.basePTS=gm(n,t,this.initPTS),this.lastPTS=this.basePTS),null===this.lastPTS&&(this.lastPTS=this.basePTS),s&&s.length>0&&o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:s,type:Cp,duration:Number.POSITIVE_INFINITY});r<l;){if(this.canParse(e,r)){const t=this.appendFrame(a,e,r);t?(this.frameIndex++,this.lastPTS=t.sample.pts,r+=t.length,i=r):r=l}else Yc(e,r)?(s=qc(e,r),o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:s,type:Cp,duration:Number.POSITIVE_INFINITY}),r+=s.length,i=r):r++;if(r===l&&i!==l){const t=Vc(e,i);this.cachedData?this.cachedData=xu(this.cachedData,t):this.cachedData=t}}return{audioTrack:a,videoTrack:fm(),id3Track:o,textTrack:fm()}}demuxSampleAes(e,t,i){return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`))}flush(e){const t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:fm(),id3Track:this._id3Track,textTrack:fm()}}destroy(){}}const gm=(e,t,i)=>{if(oc(e))return 90*e;return 9e4*t+(i?9e4*i.baseTime/i.timescale:0)};function ym(e,t){return 255===e[t]&&240==(246&e[t+1])}function Am(e,t){return 1&e[t+1]?7:9}function bm(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function _m(e,t){return t+1<e.length&&ym(e,t)}function vm(e,t){if(_m(e,t)){const i=Am(e,t);if(t+i>=e.length)return!1;const s=bm(e,t);if(s<=i)return!1;const r=t+s;return r===e.length||_m(e,r)}return!1}function wm(e,t,i,s,r){if(!e.samplerate){const a=function(e,t,i,s){let r,a,o,n;const l=navigator.userAgent.toLowerCase(),d=s,h=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];r=1+((192&t[i+2])>>>6);const c=(60&t[i+2])>>>2;if(!(c>h.length-1))return o=(1&t[i+2])<<2,o|=(192&t[i+3])>>>6,gc.log(`manifest codec:${s}, ADTS type:${r}, samplingIndex:${c}`),/firefox/i.test(l)?c>=6?(r=5,n=new Array(4),a=c-3):(r=2,n=new Array(2),a=c):-1!==l.indexOf("android")?(r=2,n=new Array(2),a=c):(r=5,n=new Array(4),s&&(-1!==s.indexOf("mp4a.40.29")||-1!==s.indexOf("mp4a.40.5"))||!s&&c>=6?a=c-3:((s&&-1!==s.indexOf("mp4a.40.2")&&(c>=6&&1===o||/vivaldi/i.test(l))||!s&&1===o)&&(r=2,n=new Array(2)),a=c)),n[0]=r<<3,n[0]|=(14&c)>>1,n[1]|=(1&c)<<7,n[1]|=o<<3,5===r&&(n[1]|=(14&a)>>1,n[2]=(1&a)<<7,n[2]|=8,n[3]=0),{config:n,samplerate:h[c],channelCount:o,codec:"mp4a.40."+r,manifestCodec:d};{const t=new Error(`invalid ADTS sampling index:${c}`);e.emit(dc.ERROR,dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.FRAG_PARSING_ERROR,fatal:!0,error:t,reason:t.message})}}(t,i,s,r);if(!a)return;e.config=a.config,e.samplerate=a.samplerate,e.channelCount=a.channelCount,e.codec=a.codec,e.manifestCodec=a.manifestCodec,gc.log(`parsed codec:${e.codec}, rate:${a.samplerate}, channels:${a.channelCount}`)}}function Sm(e){return 9216e4/e}function Tm(e,t,i,s,r){const a=s+r*Sm(e.samplerate),o=function(e,t){const i=Am(e,t);if(t+i<=e.length){const s=bm(e,t)-i;if(s>0)return{headerLength:i,frameLength:s}}}(t,i);let n;if(o){const{frameLength:s,headerLength:r}=o,l=r+s,d=Math.max(0,i+l-t.length);d?(n=new Uint8Array(l-r),n.set(t.subarray(i+r,t.length),0)):n=t.subarray(i+r,i+l);const h={unit:n,pts:a};return d||e.samples.push(h),{sample:h,length:l,missing:d}}const l=t.length-i;n=new Uint8Array(l),n.set(t.subarray(i,t.length),0);return{sample:{unit:n,pts:a},length:l,missing:-1}}let Em=null;const km=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],Cm=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],xm=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Rm=[0,1,1,4];function Dm(e,t,i,s,r){if(i+24>t.length)return;const a=Lm(t,i);if(a&&i+a.frameLength<=t.length){const o=s+r*(9e4*a.samplesPerFrame/a.sampleRate),n={unit:t.subarray(i,i+a.frameLength),pts:o,dts:o};return e.config=[],e.channelCount=a.channelCount,e.samplerate=a.sampleRate,e.samples.push(n),{sample:n,length:a.frameLength,missing:0}}}function Lm(e,t){const i=e[t+1]>>3&3,s=e[t+1]>>1&3,r=e[t+2]>>4&15,a=e[t+2]>>2&3;if(1!==i&&0!==r&&15!==r&&3!==a){const o=e[t+2]>>1&1,n=e[t+3]>>6,l=1e3*km[14*(3===i?3-s:3===s?3:4)+r-1],d=Cm[3*(3===i?0:2===i?1:2)+a],h=3===n?1:2,c=xm[i][s],u=Rm[s],p=8*c*u,f=Math.floor(c*l/d+o)*u;if(null===Em){const e=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Em=e?parseInt(e[1]):0}return!!Em&&Em<=87&&2===s&&l>=224e3&&0===n&&(e[t+3]=128|e[t+3]),{sampleRate:d,channelCount:h,frameLength:f,samplesPerFrame:p}}}function Im(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function Pm(e,t){return t+1<e.length&&Im(e,t)}function Bm(e,t){if(t+1<e.length&&Im(e,t)){const i=4,s=Lm(e,t);let r=i;null!=s&&s.frameLength&&(r=s.frameLength);const a=t+r;return a===e.length||Pm(e,a)}return!1}const Mm=/\/emsg[-/]ID3/i;const Um=(e,t)=>{let i=0,s=5;t+=s;const r=new Uint32Array(1),a=new Uint32Array(1),o=new Uint8Array(1);for(;s>0;){o[0]=e[t];const n=Math.min(s,8),l=8-n;a[0]=4278190080>>>24+l<<l,r[0]=(o[0]&a[0])>>l,i=i?i<<n|r[0]:r[0],t+=1,s-=n}return i};class Fm extends mm{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,t,i,s){super.resetInitSegment(e,t,i,s),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:s,inputTimeScale:9e4,dropped:0}}canParse(e,t){return t+64<e.length}appendFrame(e,t,i){const s=Om(e,t,i,this.basePTS,this.frameIndex);if(-1!==s){return{sample:e.samples[e.samples.length-1],length:s,missing:0}}}static probe(e){if(!e)return!1;const t=qc(e,0);if(!t)return!1;const i=t.length;return 11===e[i]&&119===e[i+1]&&void 0!==Qc(t)&&Um(e,i)<16}}function Om(e,t,i,s,r){if(i+8>t.length)return-1;if(11!==t[i]||119!==t[i+1])return-1;const a=t[i+4]>>6;if(a>=3)return-1;const o=[48e3,44100,32e3][a],n=63&t[i+4],l=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*n+a];if(i+l>t.length)return-1;const d=t[i+6]>>5;let h=0;2===d?h+=2:(1&d&&1!==d&&(h+=2),4&d&&(h+=2));const c=(t[i+6]<<8|t[i+7])>>12-h&1,u=[2,1,2,3,3,4,4,5][d]+c,p=t[i+5]>>3,f=7&t[i+5],m=new Uint8Array([a<<6|p<<1|f>>2,(3&f)<<6|d<<3|c<<2|n>>4,n<<4&224]),g=s+r*(1536/o*9e4),y=t.subarray(i,i+l);return e.config=m,e.channelCount=u,e.samplerate=o,e.samples.push({unit:y,pts:g}),l}class Nm{constructor(){this.VideoSample=null}createVideoSample(e,t,i,s){return{key:e,frame:!1,pts:t,dts:i,units:[],debug:s,length:0}}getLastNalUnit(e){var t;let i,s=this.VideoSample;if(s&&0!==s.units.length||(s=e[e.length-1]),null!=(t=s)&&t.units){const e=s.units;i=e[e.length-1]}return i}pushAccessUnit(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){const i=t.samples,s=i.length;if(!s)return void t.dropped++;{const t=i[s-1];e.pts=t.pts,e.dts=t.dts}}t.samples.push(e)}e.debug.length&&gc.log(e.pts+"/"+e.dts+":"+e.debug)}}class jm{constructor(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const e=this.data,t=this.bytesAvailable,i=e.byteLength-t,s=new Uint8Array(4),r=Math.min(4,t);if(0===r)throw new Error("no bytes available");s.set(e.subarray(i,i+r)),this.word=new DataView(s.buffer).getUint32(0),this.bitsAvailable=8*r,this.bytesAvailable-=r}skipBits(e){let t;e=Math.min(e,8*this.bytesAvailable+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(t=(e-=this.bitsAvailable)>>3,e-=t<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let t=Math.min(this.bitsAvailable,e);const i=this.word>>>32-t;if(e>32&&gc.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else{if(!(this.bytesAvailable>0))throw new Error("no bits available");this.loadWord()}return t=e-t,t>0&&this.bitsAvailable?i<<t|this.readBits(t):i}skipLZ(){let e;for(e=0;e<this.bitsAvailable;++e)if(0!=(this.word&2147483648>>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return 1===this.readBits(1)}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}skipScalingList(e){let t,i=8,s=8;for(let r=0;r<e;r++)0!==s&&(t=this.readEG(),s=(i+t+256)%256),i=0===s?i:s}readSPS(){let e,t,i,s=0,r=0,a=0,o=0;const n=this.readUByte.bind(this),l=this.readBits.bind(this),d=this.readUEG.bind(this),h=this.readBoolean.bind(this),c=this.skipBits.bind(this),u=this.skipEG.bind(this),p=this.skipUEG.bind(this),f=this.skipScalingList.bind(this);n();const m=n();if(l(5),c(3),n(),p(),100===m||110===m||122===m||244===m||44===m||83===m||86===m||118===m||128===m){const e=d();if(3===e&&c(1),p(),p(),c(1),h())for(t=3!==e?8:12,i=0;i<t;i++)h()&&f(i<6?16:64)}p();const g=d();if(0===g)d();else if(1===g)for(c(1),u(),u(),e=d(),i=0;i<e;i++)u();p(),c(1);const y=d(),A=d(),b=l(1);0===b&&c(1),c(1),h()&&(s=d(),r=d(),a=d(),o=d());let _=[1,1];if(h()&&h()){switch(n()){case 1:_=[1,1];break;case 2:_=[12,11];break;case 3:_=[10,11];break;case 4:_=[16,11];break;case 5:_=[40,33];break;case 6:_=[24,11];break;case 7:_=[20,11];break;case 8:_=[32,11];break;case 9:_=[80,33];break;case 10:_=[18,11];break;case 11:_=[15,11];break;case 12:_=[64,33];break;case 13:_=[160,99];break;case 14:_=[4,3];break;case 15:_=[3,2];break;case 16:_=[2,1];break;case 255:_=[n()<<8|n(),n()<<8|n()]}}return{width:Math.ceil(16*(y+1)-2*s-2*r),height:(2-b)*(A+1)*16-(b?2:4)*(a+o),pixelRatio:_}}readSliceType(){return this.readUByte(),this.readUEG(),this.readUEG()}}class Gm extends Nm{parseAVCPES(e,t,i,s,r){const a=this.parseAVCNALu(e,i.data);let o,n=this.VideoSample,l=!1;i.data=null,n&&a.length&&!e.audFound&&(this.pushAccessUnit(n,e),n=this.VideoSample=this.createVideoSample(!1,i.pts,i.dts,"")),a.forEach((s=>{var a;switch(s.type){case 1:{let t=!1;o=!0;const r=s.data;if(l&&r.length>4){const e=new jm(r).readSliceType();2!==e&&4!==e&&7!==e&&9!==e||(t=!0)}var d;if(t)null!=(d=n)&&d.frame&&!n.key&&(this.pushAccessUnit(n,e),n=this.VideoSample=null);n||(n=this.VideoSample=this.createVideoSample(!0,i.pts,i.dts,"")),n.frame=!0,n.key=t;break}case 5:o=!0,null!=(a=n)&&a.frame&&!n.key&&(this.pushAccessUnit(n,e),n=this.VideoSample=null),n||(n=this.VideoSample=this.createVideoSample(!0,i.pts,i.dts,"")),n.key=!0,n.frame=!0;break;case 6:o=!0,Lu(s.data,1,i.pts,t.samples);break;case 7:{var h,c;o=!0,l=!0;const t=s.data,i=new jm(t).readSPS();if(!e.sps||e.width!==i.width||e.height!==i.height||(null==(h=e.pixelRatio)?void 0:h[0])!==i.pixelRatio[0]||(null==(c=e.pixelRatio)?void 0:c[1])!==i.pixelRatio[1]){e.width=i.width,e.height=i.height,e.pixelRatio=i.pixelRatio,e.sps=[t],e.duration=r;const s=t.subarray(1,4);let a="avc1.";for(let e=0;e<3;e++){let t=s[e].toString(16);t.length<2&&(t="0"+t),a+=t}e.codec=a}break}case 8:o=!0,e.pps=[s.data];break;case 9:o=!0,e.audFound=!0,n&&this.pushAccessUnit(n,e),n=this.VideoSample=this.createVideoSample(!1,i.pts,i.dts,"");break;case 12:o=!0;break;default:o=!1,n&&(n.debug+="unknown NAL "+s.type+" ")}if(n&&o){n.units.push(s)}})),s&&n&&(this.pushAccessUnit(n,e),this.VideoSample=null)}parseAVCNALu(e,t){const i=t.byteLength;let s=e.naluState||0;const r=s,a=[];let o,n,l,d=0,h=-1,c=0;for(-1===s&&(h=0,c=31&t[0],s=0,d=1);d<i;)if(o=t[d++],s)if(1!==s)if(o)if(1===o){if(n=d-s-1,h>=0){const e={data:t.subarray(h,n),type:c};a.push(e)}else{const i=this.getLastNalUnit(e.samples);i&&(r&&d<=4-r&&i.state&&(i.data=i.data.subarray(0,i.data.byteLength-r)),n>0&&(i.data=xu(i.data,t.subarray(0,n)),i.state=0))}d<i?(l=31&t[d],h=d,c=l,s=0):s=-1}else s=0;else s=3;else s=o?0:2;else s=o?0:1;if(h>=0&&s>=0){const e={data:t.subarray(h,i),type:c,state:s};a.push(e)}if(0===a.length){const i=this.getLastNalUnit(e.samples);i&&(i.data=xu(i.data,t))}return e.naluState=s,a}}class zm{constructor(e,t,i){this.keyData=void 0,this.decrypter=void 0,this.keyData=i,this.decrypter=new Xf(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer)}decryptAacSample(e,t,i){const s=e[t].unit;if(s.length<=16)return;const r=s.subarray(16,s.length-s.length%16),a=r.buffer.slice(r.byteOffset,r.byteOffset+r.length);this.decryptBuffer(a).then((r=>{const a=new Uint8Array(r);s.set(a,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,i)}))}decryptAacSamples(e,t,i){for(;;t++){if(t>=e.length)return void i();if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,i),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=16*Math.floor((e.length-48)/160)+16,i=new Int8Array(t);let s=0;for(let t=32;t<e.length-16;t+=160,s+=16)i.set(e.subarray(t,t+16),s);return i}getAvcDecryptedUnit(e,t){const i=new Uint8Array(t);let s=0;for(let t=32;t<e.length-16;t+=160,s+=16)e.set(i.subarray(s,s+16),t);return e}decryptAvcSample(e,t,i,s,r){const a=Iu(r.data),o=this.getAvcEncryptedData(a);this.decryptBuffer(o.buffer).then((o=>{r.data=this.getAvcDecryptedUnit(a,o),this.decrypter.isSync()||this.decryptAvcSamples(e,t,i+1,s)}))}decryptAvcSamples(e,t,i,s){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,i=0){if(t>=e.length)return void s();const r=e[t].units;for(;!(i>=r.length);i++){const a=r[i];if(!(a.data.length<=48||1!==a.type&&5!==a.type||(this.decryptAvcSample(e,t,i,s,a),this.decrypter.isSync())))return}}}}const $m=188;class Hm{constructor(e,t,i){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=t,this.typeSupported=i,this.videoParser=new Gm}static probe(e){const t=Hm.syncOffset(e);return t>0&&gc.warn(`MPEG2-TS detected but first sync word found @ offset ${t}`),-1!==t}static syncOffset(e){const t=e.length;let i=Math.min(940,t-$m)+1,s=0;for(;s<i;){let r=!1,a=-1,o=0;for(let n=s;n<t;n+=$m){if(71!==e[n]||t-n!==$m&&71!==e[n+$m]){if(o)return-1;break}if(o++,-1===a&&(a=n,0!==a&&(i=Math.min(a+18612,e.length-$m)+1)),r||(r=0===Vm(e,n)),r&&o>1&&(0===a&&o>2||n+$m>i))return a}s++}return-1}static createTrack(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:uu[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===e?t:void 0}}resetInitSegment(e,t,i,s){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=Hm.createTrack("video"),this._audioTrack=Hm.createTrack("audio",s),this._id3Track=Hm.createTrack("id3"),this._txtTrack=Hm.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=i,this._duration=s}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:i}=this;e&&(e.pesData=null),t&&(t.pesData=null),i&&(i.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,i=!1,s=!1){let r;i||(this.sampleAes=null);const a=this._videoTrack,o=this._audioTrack,n=this._id3Track,l=this._txtTrack;let d=a.pid,h=a.pesData,c=o.pid,u=n.pid,p=o.pesData,f=n.pesData,m=null,g=this.pmtParsed,y=this._pmtId,A=e.length;if(this.remainderData&&(A=(e=xu(this.remainderData,e)).length,this.remainderData=null),A<$m&&!s)return this.remainderData=e,{audioTrack:o,videoTrack:a,id3Track:n,textTrack:l};const b=Math.max(0,Hm.syncOffset(e));A-=(A-b)%$m,A<e.byteLength&&!s&&(this.remainderData=new Uint8Array(e.buffer,A,e.buffer.byteLength-A));let _=0;for(let t=b;t<A;t+=$m)if(71===e[t]){const s=!!(64&e[t+1]),A=Vm(e,t);let _;if((48&e[t+3])>>4>1){if(_=t+5+e[t+4],_===t+$m)continue}else _=t+4;switch(A){case d:s&&(h&&(r=Km(h))&&this.videoParser.parseAVCPES(a,l,r,!1,this._duration),h={data:[],size:0}),h&&(h.data.push(e.subarray(_,t+$m)),h.size+=t+$m-_);break;case c:if(s){if(p&&(r=Km(p)))switch(o.segmentCodec){case"aac":this.parseAACPES(o,r);break;case"mp3":this.parseMPEGPES(o,r);break;case"ac3":this.parseAC3PES(o,r)}p={data:[],size:0}}p&&(p.data.push(e.subarray(_,t+$m)),p.size+=t+$m-_);break;case u:s&&(f&&(r=Km(f))&&this.parseID3PES(n,r),f={data:[],size:0}),f&&(f.data.push(e.subarray(_,t+$m)),f.size+=t+$m-_);break;case 0:s&&(_+=e[_]+1),y=this._pmtId=Wm(e,_);break;case y:{s&&(_+=e[_]+1);const r=Jm(e,_,this.typeSupported,i);d=r.videoPid,d>0&&(a.pid=d,a.segmentCodec=r.segmentVideoCodec),c=r.audioPid,c>0&&(o.pid=c,o.segmentCodec=r.segmentAudioCodec),u=r.id3Pid,u>0&&(n.pid=u),null===m||g||(gc.warn(`MPEG-TS PMT found at ${t} after unknown PID '${m}'. Backtracking to sync byte @${b} to parse all TS packets.`),m=null,t=b-188),g=this.pmtParsed=!0;break}case 17:case 8191:break;default:m=A}}else _++;if(_>0){const e=new Error(`Found ${_} TS packet/s that do not start with 0x47`);this.observer.emit(dc.ERROR,dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.FRAG_PARSING_ERROR,fatal:!1,error:e,reason:e.message})}a.pesData=h,o.pesData=p,n.pesData=f;const v={audioTrack:o,videoTrack:a,id3Track:n,textTrack:l};return s&&this.extractRemainingSamples(v),v}flush(){const{remainderData:e}=this;let t;return this.remainderData=null,t=e?this.demux(e,-1,!1,!0):{videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t}extractRemainingSamples(e){const{audioTrack:t,videoTrack:i,id3Track:s,textTrack:r}=e,a=i.pesData,o=t.pesData,n=s.pesData;let l;if(a&&(l=Km(a))?(this.videoParser.parseAVCPES(i,r,l,!0,this._duration),i.pesData=null):i.pesData=a,o&&(l=Km(o))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,l);break;case"mp3":this.parseMPEGPES(t,l);break;case"ac3":this.parseAC3PES(t,l)}t.pesData=null}else null!=o&&o.size&&gc.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=o;n&&(l=Km(n))?(this.parseID3PES(s,l),s.pesData=null):s.pesData=n}demuxSampleAes(e,t,i){const s=this.demux(e,i,!0,!this.config.progressive),r=this.sampleAes=new zm(this.observer,this.config,t);return this.decrypt(s,r)}decrypt(e,t){return new Promise((i=>{const{audioTrack:s,videoTrack:r}=e;s.samples&&"aac"===s.segmentCodec?t.decryptAacSamples(s.samples,0,(()=>{r.samples?t.decryptAvcSamples(r.samples,0,0,(()=>{i(e)})):i(e)})):r.samples&&t.decryptAvcSamples(r.samples,0,0,(()=>{i(e)}))}))}destroy(){this._duration=0}parseAACPES(e,t){let i=0;const s=this.aacOverFlow;let r,a,o,n=t.data;if(s){this.aacOverFlow=null;const t=s.missing,r=s.sample.unit.byteLength;if(-1===t)n=xu(s.sample.unit,n);else{const a=r-t;s.sample.unit.set(n.subarray(0,t),a),e.samples.push(s.sample),i=s.missing}}for(r=i,a=n.length;r<a-1&&!_m(n,r);r++);if(r!==i){let e;const t=r<a-1;e=t?`AAC PES did not start with ADTS header,offset:${r}`:"No ADTS header found in AAC PES";const i=new Error(e);if(gc.warn(`parsing error: ${e}`),this.observer.emit(dc.ERROR,dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:i,reason:e}),!t)return}if(wm(e,this.observer,n,r,this.audioCodec),void 0!==t.pts)o=t.pts;else{if(!s)return void gc.warn("[tsdemuxer]: AAC PES unknown PTS");{const t=Sm(e.samplerate);o=s.sample.pts+t}}let l,d=0;for(;r<a;){if(l=Tm(e,n,r,o,d),r+=l.length,l.missing){this.aacOverFlow=l;break}for(d++;r<a-1&&!_m(n,r);r++);}}parseMPEGPES(e,t){const i=t.data,s=i.length;let r=0,a=0;const o=t.pts;if(void 0!==o)for(;a<s;)if(Pm(i,a)){const t=Dm(e,i,a,o,r);if(!t)break;a+=t.length,r++}else a++;else gc.warn("[tsdemuxer]: MPEG PES unknown PTS")}parseAC3PES(e,t){{const i=t.data,s=t.pts;if(void 0===s)return void gc.warn("[tsdemuxer]: AC3 PES unknown PTS");const r=i.length;let a,o=0,n=0;for(;n<r&&(a=Om(e,i,n,s,o++))>0;)n+=a}}parseID3PES(e,t){if(void 0===t.pts)return void gc.warn("[tsdemuxer]: ID3 PES unknown PTS");const i=ac({},t,{type:this._videoTrack?Rp:Cp,duration:Number.POSITIVE_INFINITY});e.samples.push(i)}}function Vm(e,t){return((31&e[t+1])<<8)+e[t+2]}function Wm(e,t){return(31&e[t+10])<<8|e[t+11]}function Jm(e,t,i,s){const r={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},a=t+3+((15&e[t+1])<<8|e[t+2])-4;for(t+=12+((15&e[t+10])<<8|e[t+11]);t<a;){const a=Vm(e,t),o=(15&e[t+3])<<8|e[t+4];switch(e[t]){case 207:if(!s){qm("ADTS AAC");break}case 15:-1===r.audioPid&&(r.audioPid=a);break;case 21:-1===r.id3Pid&&(r.id3Pid=a);break;case 219:if(!s){qm("H.264");break}case 27:-1===r.videoPid&&(r.videoPid=a,r.segmentVideoCodec="avc");break;case 3:case 4:i.mpeg||i.mp3?-1===r.audioPid&&(r.audioPid=a,r.segmentAudioCodec="mp3"):gc.log("MPEG audio found, not supported in this browser");break;case 193:if(!s){qm("AC-3");break}case 129:i.ac3?-1===r.audioPid&&(r.audioPid=a,r.segmentAudioCodec="ac3"):gc.log("AC-3 audio found, not supported in this browser");break;case 6:if(-1===r.audioPid&&o>0){let s=t+5,n=o;for(;n>2;){if(106===e[s])!0!==i.ac3?gc.log("AC-3 audio found, not supported in this browser for now"):(r.audioPid=a,r.segmentAudioCodec="ac3");const t=e[s+1]+2;s+=t,n-=t}}break;case 194:case 135:gc.warn("Unsupported EC-3 in M2TS found");break;case 36:gc.warn("Unsupported HEVC in M2TS found")}t+=o+5}return r}function qm(e){gc.log(`${e} with AES-128-CBC encryption found in unencrypted stream`)}function Km(e){let t,i,s,r,a,o=0;const n=e.data;if(!e||0===e.size)return null;for(;n[0].length<19&&n.length>1;)n[0]=xu(n[0],n[1]),n.splice(1,1);t=n[0];if(1===(t[0]<<16)+(t[1]<<8)+t[2]){if(i=(t[4]<<8)+t[5],i&&i>e.size-6)return null;const l=t[7];192&l&&(r=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&l?(a=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2,r-a>54e5&&(gc.warn(`${Math.round((r-a)/9e4)}s delta between PTS and DTS, align them`),r=a)):a=r),s=t[8];let d=s+9;if(e.size<=d)return null;e.size-=d;const h=new Uint8Array(e.size);for(let e=0,i=n.length;e<i;e++){t=n[e];let i=t.byteLength;if(d){if(d>i){d-=i;continue}t=t.subarray(d),i-=d,d=0}h.set(t,o),o+=i}return i&&(i-=s+3),{data:h,pts:r,dts:a,len:i}}return null}class Ym{static getSilentFrame(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}}}const Qm=Math.pow(2,32)-1;class Xm{static init(){let e;for(e in Xm.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],dac3:[],"ac-3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},Xm.types)Xm.types.hasOwnProperty(e)&&(Xm.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);Xm.HDLR_TYPES={video:t,audio:i};const s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),r=new Uint8Array([0,0,0,0,0,0,0,0]);Xm.STTS=Xm.STSC=Xm.STCO=r,Xm.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Xm.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Xm.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Xm.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const a=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),n=new Uint8Array([0,0,0,1]);Xm.FTYP=Xm.box(Xm.types.ftyp,a,n,a,o),Xm.DINF=Xm.box(Xm.types.dinf,Xm.box(Xm.types.dref,s))}static box(e,...t){let i=8,s=t.length;const r=s;for(;s--;)i+=t[s].byteLength;const a=new Uint8Array(i);for(a[0]=i>>24&255,a[1]=i>>16&255,a[2]=i>>8&255,a[3]=255&i,a.set(e,4),s=0,i=8;s<r;s++)a.set(t[s],i),i+=t[s].byteLength;return a}static hdlr(e){return Xm.box(Xm.types.hdlr,Xm.HDLR_TYPES[e])}static mdat(e){return Xm.box(Xm.types.mdat,e)}static mdhd(e,t){t*=e;const i=Math.floor(t/(Qm+1)),s=Math.floor(t%(Qm+1));return Xm.box(Xm.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,s>>24,s>>16&255,s>>8&255,255&s,85,196,0,0]))}static mdia(e){return Xm.box(Xm.types.mdia,Xm.mdhd(e.timescale,e.duration),Xm.hdlr(e.type),Xm.minf(e))}static mfhd(e){return Xm.box(Xm.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))}static minf(e){return"audio"===e.type?Xm.box(Xm.types.minf,Xm.box(Xm.types.smhd,Xm.SMHD),Xm.DINF,Xm.stbl(e)):Xm.box(Xm.types.minf,Xm.box(Xm.types.vmhd,Xm.VMHD),Xm.DINF,Xm.stbl(e))}static moof(e,t,i){return Xm.box(Xm.types.moof,Xm.mfhd(e),Xm.traf(i,t))}static moov(e){let t=e.length;const i=[];for(;t--;)i[t]=Xm.trak(e[t]);return Xm.box.apply(null,[Xm.types.moov,Xm.mvhd(e[0].timescale,e[0].duration)].concat(i).concat(Xm.mvex(e)))}static mvex(e){let t=e.length;const i=[];for(;t--;)i[t]=Xm.trex(e[t]);return Xm.box.apply(null,[Xm.types.mvex,...i])}static mvhd(e,t){t*=e;const i=Math.floor(t/(Qm+1)),s=Math.floor(t%(Qm+1)),r=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,s>>24,s>>16&255,s>>8&255,255&s,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return Xm.box(Xm.types.mvhd,r)}static sdtp(e){const t=e.samples||[],i=new Uint8Array(4+t.length);let s,r;for(s=0;s<t.length;s++)r=t[s].flags,i[s+4]=r.dependsOn<<4|r.isDependedOn<<2|r.hasRedundancy;return Xm.box(Xm.types.sdtp,i)}static stbl(e){return Xm.box(Xm.types.stbl,Xm.stsd(e),Xm.box(Xm.types.stts,Xm.STTS),Xm.box(Xm.types.stsc,Xm.STSC),Xm.box(Xm.types.stsz,Xm.STSZ),Xm.box(Xm.types.stco,Xm.STCO))}static avc1(e){let t,i,s,r=[],a=[];for(t=0;t<e.sps.length;t++)i=e.sps[t],s=i.byteLength,r.push(s>>>8&255),r.push(255&s),r=r.concat(Array.prototype.slice.call(i));for(t=0;t<e.pps.length;t++)i=e.pps[t],s=i.byteLength,a.push(s>>>8&255),a.push(255&s),a=a.concat(Array.prototype.slice.call(i));const o=Xm.box(Xm.types.avcC,new Uint8Array([1,r[3],r[4],r[5],255,224|e.sps.length].concat(r).concat([e.pps.length]).concat(a))),n=e.width,l=e.height,d=e.pixelRatio[0],h=e.pixelRatio[1];return Xm.box(Xm.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,n>>8&255,255&n,l>>8&255,255&l,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,Xm.box(Xm.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),Xm.box(Xm.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,255&d,h>>24,h>>16&255,h>>8&255,255&h])))}static esds(e){const t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))}static audioStsd(e){const t=e.samplerate;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,t>>8&255,255&t,0,0])}static mp4a(e){return Xm.box(Xm.types.mp4a,Xm.audioStsd(e),Xm.box(Xm.types.esds,Xm.esds(e)))}static mp3(e){return Xm.box(Xm.types[".mp3"],Xm.audioStsd(e))}static ac3(e){return Xm.box(Xm.types["ac-3"],Xm.audioStsd(e),Xm.box(Xm.types.dac3,e.config))}static stsd(e){return"audio"===e.type?"mp3"===e.segmentCodec&&"mp3"===e.codec?Xm.box(Xm.types.stsd,Xm.STSD,Xm.mp3(e)):"ac3"===e.segmentCodec?Xm.box(Xm.types.stsd,Xm.STSD,Xm.ac3(e)):Xm.box(Xm.types.stsd,Xm.STSD,Xm.mp4a(e)):Xm.box(Xm.types.stsd,Xm.STSD,Xm.avc1(e))}static tkhd(e){const t=e.id,i=e.duration*e.timescale,s=e.width,r=e.height,a=Math.floor(i/(Qm+1)),o=Math.floor(i%(Qm+1));return Xm.box(Xm.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,o>>24,o>>16&255,o>>8&255,255&o,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,s>>8&255,255&s,0,0,r>>8&255,255&r,0,0]))}static traf(e,t){const i=Xm.sdtp(e),s=e.id,r=Math.floor(t/(Qm+1)),a=Math.floor(t%(Qm+1));return Xm.box(Xm.types.traf,Xm.box(Xm.types.tfhd,new Uint8Array([0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s])),Xm.box(Xm.types.tfdt,new Uint8Array([1,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,a>>24,a>>16&255,a>>8&255,255&a])),Xm.trun(e,i.length+16+20+8+16+8+8),i)}static trak(e){return e.duration=e.duration||4294967295,Xm.box(Xm.types.trak,Xm.tkhd(e),Xm.mdia(e))}static trex(e){const t=e.id;return Xm.box(Xm.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,t){const i=e.samples||[],s=i.length,r=12+16*s,a=new Uint8Array(r);let o,n,l,d,h,c;for(t+=8+r,a.set(["video"===e.type?1:0,0,15,1,s>>>24&255,s>>>16&255,s>>>8&255,255&s,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0),o=0;o<s;o++)n=i[o],l=n.duration,d=n.size,h=n.flags,c=n.cts,a.set([l>>>24&255,l>>>16&255,l>>>8&255,255&l,d>>>24&255,d>>>16&255,d>>>8&255,255&d,h.isLeading<<2|h.dependsOn,h.isDependedOn<<6|h.hasRedundancy<<4|h.paddingValue<<1|h.isNonSync,61440&h.degradPrio,15&h.degradPrio,c>>>24&255,c>>>16&255,c>>>8&255,255&c],12+16*o);return Xm.box(Xm.types.trun,a)}static initSegment(e){Xm.types||Xm.init();const t=Xm.moov(e);return xu(Xm.FTYP,t)}}Xm.types=void 0,Xm.HDLR_TYPES=void 0,Xm.STTS=void 0,Xm.STSC=void 0,Xm.STCO=void 0,Xm.STSZ=void 0,Xm.VMHD=void 0,Xm.SMHD=void 0,Xm.STSD=void 0,Xm.FTYP=void 0,Xm.DINF=void 0;function Zm(e,t,i=1,s=!1){const r=e*t*i;return s?Math.round(r):r}function eg(e,t=!1){return Zm(e,1e3,1/9e4,t)}let tg,ig=null,sg=null;class rg{constructor(e,t,i,s=""){if(this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=i,this.ISGenerated=!1,null===ig){const e=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);ig=e?parseInt(e[1]):0}if(null===sg){const e=navigator.userAgent.match(/Safari\/(\d+)/i);sg=e?parseInt(e[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){gc.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){gc.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){gc.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let t=!1;const i=e.reduce(((e,i)=>{const s=i.pts-e;return s<-4294967296?(t=!0,ag(e,i.pts)):s>0?e:i.pts}),e[0].pts);return t&&gc.debug("PTS rollover detected"),i}remux(e,t,i,s,r,a,o,n){let l,d,h,c,u,p,f=r,m=r;const g=e.pid>-1,y=t.pid>-1,A=t.samples.length,b=e.samples.length>0,_=o&&A>0||A>1;if((!g||b)&&(!y||_)||this.ISGenerated||o){if(this.ISGenerated){var v,w,S,T;const e=this.videoTrackConfig;!e||t.width===e.width&&t.height===e.height&&(null==(v=t.pixelRatio)?void 0:v[0])===(null==(w=e.pixelRatio)?void 0:w[0])&&(null==(S=t.pixelRatio)?void 0:S[1])===(null==(T=e.pixelRatio)?void 0:T[1])||this.resetInitSegment()}else h=this.generateIS(e,t,r,a);const i=this.isVideoContiguous;let s,o=-1;if(_&&(o=function(e){for(let t=0;t<e.length;t++)if(e[t].key)return t;return-1}(t.samples),!i&&this.config.forceKeyFrameOnDiscontinuity))if(p=!0,o>0){gc.warn(`[mp4-remuxer]: Dropped ${o} out of ${A} video samples due to a missing keyframe`);const e=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(o),t.dropped+=o,m+=(t.samples[0].pts-e)/t.inputTimeScale,s=m}else-1===o&&(gc.warn(`[mp4-remuxer]: No keyframe found out of ${A} video samples`),p=!1);if(this.ISGenerated){if(b&&_){const i=this.getVideoStartPts(t.samples),s=(ag(e.samples[0].pts,i)-i)/t.inputTimeScale;f+=Math.max(0,s),m+=Math.max(0,-s)}if(b){if(e.samplerate||(gc.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),h=this.generateIS(e,t,r,a)),d=this.remuxAudio(e,f,this.isAudioContiguous,a,y||_||n===yp?m:void 0),_){const s=d?d.endPTS-d.startPTS:0;t.inputTimeScale||(gc.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),h=this.generateIS(e,t,r,a)),l=this.remuxVideo(t,m,i,s)}}else _&&(l=this.remuxVideo(t,m,i,0));l&&(l.firstKeyFrame=o,l.independent=-1!==o,l.firstKeyFramePTS=s)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(i.samples.length&&(u=og(i,r,this._initPTS,this._initDTS)),s.samples.length&&(c=ng(s,r,this._initPTS))),{audio:d,video:l,initSegment:h,independent:p,text:c,id3:u}}generateIS(e,t,i,s){const r=e.samples,a=t.samples,o=this.typeSupported,n={},l=this._initPTS;let d,h,c,u=!l||s,p="audio/mp4";if(u&&(d=h=1/0),e.config&&r.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":o.mpeg?(p="audio/mpeg",e.codec=""):o.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3"}n.audio={id:"audio",container:p,codec:e.codec,initSegment:"mp3"===e.segmentCodec&&o.mpeg?new Uint8Array(0):Xm.initSegment([e]),metadata:{channelCount:e.channelCount}},u&&(c=e.inputTimeScale,l&&c===l.timescale?u=!1:d=h=r[0].pts-Math.round(c*i))}if(t.sps&&t.pps&&a.length){if(t.timescale=t.inputTimeScale,n.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:Xm.initSegment([t]),metadata:{width:t.width,height:t.height}},u)if(c=t.inputTimeScale,l&&c===l.timescale)u=!1;else{const e=this.getVideoStartPts(a),t=Math.round(c*i);h=Math.min(h,ag(a[0].dts,e)-t),d=Math.min(d,e-t)}this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(n).length)return this.ISGenerated=!0,u?(this._initPTS={baseTime:d,timescale:c},this._initDTS={baseTime:h,timescale:c}):d=c=void 0,{tracks:n,initPTS:d,timescale:c}}remuxVideo(e,t,i,s){const r=e.inputTimeScale,a=e.samples,o=[],n=a.length,l=this._initPTS;let d,h,c=this.nextAvcDts,u=8,p=this.videoSampleDuration,f=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,g=!1;if(!i||null===c){const e=t*r,s=a[0].pts-ag(a[0].dts,a[0].pts);ig&&null!==c&&Math.abs(e-s-c)<15e3?i=!0:c=e-s}const y=l.baseTime*r/l.timescale;for(let e=0;e<n;e++){const t=a[e];t.pts=ag(t.pts-y,c),t.dts=ag(t.dts-y,c),t.dts<a[e>0?e-1:e].dts&&(g=!0)}g&&a.sort((function(e,t){const i=e.dts-t.dts,s=e.pts-t.pts;return i||s})),d=a[0].dts,h=a[a.length-1].dts;const A=h-d,b=A?Math.round(A/(n-1)):p||e.inputTimeScale/30;if(i){const e=d-c,i=e>b,s=e<-1;if((i||s)&&(i?gc.warn(`AVC: ${eg(e,!0)} ms (${e}dts) hole between fragments detected at ${t.toFixed(3)}`):gc.warn(`AVC: ${eg(-e,!0)} ms (${e}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!s||c>=a[0].pts||ig)){d=c;const t=a[0].pts-e;if(i)a[0].dts=d,a[0].pts=t;else for(let i=0;i<a.length&&!(a[i].dts>t);i++)a[i].dts-=e,a[i].pts-=e;gc.log(`Video: Initial PTS/DTS adjusted: ${eg(t,!0)}/${eg(d,!0)}, delta: ${eg(e,!0)} ms`)}}d=Math.max(0,d);let _=0,v=0,w=d;for(let e=0;e<n;e++){const t=a[e],i=t.units,s=i.length;let r=0;for(let e=0;e<s;e++)r+=i[e].data.length;v+=r,_+=s,t.length=r,t.dts<w?(t.dts=w,w+=b/4|0||1):w=t.dts,f=Math.min(t.pts,f),m=Math.max(t.pts,m)}h=a[n-1].dts;const S=v+4*_+8;let T;try{T=new Uint8Array(S)}catch(e){return void this.observer.emit(dc.ERROR,dc.ERROR,{type:hc.MUX_ERROR,details:cc.REMUX_ALLOC_ERROR,fatal:!1,error:e,bytes:S,reason:`fail allocating video mdat ${S}`})}const E=new DataView(T.buffer);E.setUint32(0,S),T.set(Xm.types.mdat,4);let k=!1,C=Number.POSITIVE_INFINITY,x=Number.POSITIVE_INFINITY,R=Number.NEGATIVE_INFINITY,D=Number.NEGATIVE_INFINITY;for(let e=0;e<n;e++){const t=a[e],i=t.units;let l,d=0;for(let e=0,t=i.length;e<t;e++){const t=i[e],s=t.data,r=t.data.byteLength;E.setUint32(u,r),u+=4,T.set(s,u),u+=r,d+=4+r}if(e<n-1)p=a[e+1].dts-t.dts,l=a[e+1].pts-t.pts;else{const i=this.config,o=e>0?t.dts-a[e-1].dts:b;if(l=e>0?t.pts-a[e-1].pts:b,i.stretchShortVideoTrack&&null!==this.nextAudioPts){const e=Math.floor(i.maxBufferHole*r),a=(s?f+s*r:this.nextAudioPts)-t.pts;a>e?(p=a-o,p<0?p=o:k=!0,gc.log(`[mp4-remuxer]: It is approximately ${a/90} ms to the next segment; using duration ${p/90} ms for the last video frame.`)):p=o}else p=o}const h=Math.round(t.pts-t.dts);C=Math.min(C,p),R=Math.max(R,p),x=Math.min(x,l),D=Math.max(D,l),o.push(new lg(t.key,p,d,h))}if(o.length)if(ig){if(ig<70){const e=o[0].flags;e.dependsOn=2,e.isNonSync=0}}else if(sg&&D-x<R-C&&b/R<.025&&0===o[0].cts){gc.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let e=d;for(let t=0,i=o.length;t<i;t++){const s=e+o[t].duration,r=e+o[t].cts;if(t<i-1){const e=s+o[t+1].cts;o[t].duration=e-r}else o[t].duration=t?o[t-1].duration:b;o[t].cts=0,e=s}}p=k||!p?b:p,this.nextAvcDts=c=h+p,this.videoSampleDuration=p,this.isVideoContiguous=!0;const L={data1:Xm.moof(e.sequenceNumber++,d,ac({},e,{samples:o})),data2:T,startPTS:f/r,endPTS:(m+p)/r,startDTS:d/r,endDTS:c/r,type:"video",hasAudio:!1,hasVideo:!0,nb:o.length,dropped:e.dropped};return e.samples=[],e.dropped=0,L}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return 1152;case"ac3":return 1536;default:return 1024}}remuxAudio(e,t,i,s,r){const a=e.inputTimeScale,o=a/(e.samplerate?e.samplerate:a),n=this.getSamplesPerFrame(e),l=n*o,d=this._initPTS,h="mp3"===e.segmentCodec&&this.typeSupported.mpeg,c=[],u=void 0!==r;let p=e.samples,f=h?0:8,m=this.nextAudioPts||-1;const g=t*a,y=d.baseTime*a/d.timescale;if(this.isAudioContiguous=i=i||p.length&&m>0&&(s&&Math.abs(g-m)<9e3||Math.abs(ag(p[0].pts-y,g)-m)<20*l),p.forEach((function(e){e.pts=ag(e.pts-y,g)})),!i||m<0){if(p=p.filter((e=>e.pts>=0)),!p.length)return;m=0===r?0:s&&!u?Math.max(0,g):p[0].pts}if("aac"===e.segmentCodec){const t=this.config.maxAudioFramesDrift;for(let i=0,s=m;i<p.length;i++){const r=p[i],o=r.pts,n=o-s,d=Math.abs(1e3*n/a);if(n<=-t*l&&u)0===i&&(gc.warn(`Audio frame @ ${(o/a).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*n/a)} ms.`),this.nextAudioPts=m=s=o);else if(n>=t*l&&d<1e4&&u){let t=Math.round(n/l);s=o-t*l,s<0&&(t--,s+=l),0===i&&(this.nextAudioPts=m=s),gc.warn(`[mp4-remuxer]: Injecting ${t} audio frame @ ${(s/a).toFixed(3)}s due to ${Math.round(1e3*n/a)} ms gap.`);for(let a=0;a<t;a++){const t=Math.max(s,0);let a=Ym.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);a||(gc.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),a=r.unit.subarray()),p.splice(i,0,{unit:a,pts:t}),s+=l,i++}}r.pts=s,s+=l}}let A,b=null,_=null,v=0,w=p.length;for(;w--;)v+=p[w].unit.byteLength;for(let t=0,s=p.length;t<s;t++){const s=p[t],r=s.unit;let a=s.pts;if(null!==_){c[t-1].duration=Math.round((a-_)/o)}else{if(i&&"aac"===e.segmentCodec&&(a=m),b=a,!(v>0))return;v+=f;try{A=new Uint8Array(v)}catch(e){return void this.observer.emit(dc.ERROR,dc.ERROR,{type:hc.MUX_ERROR,details:cc.REMUX_ALLOC_ERROR,fatal:!1,error:e,bytes:v,reason:`fail allocating audio mdat ${v}`})}if(!h){new DataView(A.buffer).setUint32(0,v),A.set(Xm.types.mdat,4)}}A.set(r,f);const l=r.byteLength;f+=l,c.push(new lg(!0,n,l,0)),_=a}const S=c.length;if(!S)return;const T=c[c.length-1];this.nextAudioPts=m=_+o*T.duration;const E=h?new Uint8Array(0):Xm.moof(e.sequenceNumber++,b/o,ac({},e,{samples:c}));e.samples=[];const k=b/a,C=m/a,x={data1:E,data2:A,startPTS:k,endPTS:C,startDTS:k,endDTS:C,type:"audio",hasAudio:!0,hasVideo:!1,nb:S};return this.isAudioContiguous=!0,x}remuxEmptyAudio(e,t,i,s){const r=e.inputTimeScale,a=r/(e.samplerate?e.samplerate:r),o=this.nextAudioPts,n=this._initDTS,l=9e4*n.baseTime/n.timescale,d=(null!==o?o:s.startDTS*r)+l,h=s.endDTS*r+l,c=1024*a,u=Math.ceil((h-d)/c),p=Ym.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(gc.warn("[mp4-remuxer]: remux empty Audio"),!p)return void gc.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");const f=[];for(let e=0;e<u;e++){const t=d+e*c;f.push({unit:p,pts:t,dts:t})}return e.samples=f,this.remuxAudio(e,t,i,!1)}}function ag(e,t){let i;if(null===t)return e;for(i=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=i;return e}function og(e,t,i,s){const r=e.samples.length;if(!r)return;const a=e.inputTimeScale;for(let o=0;o<r;o++){const r=e.samples[o];r.pts=ag(r.pts-i.baseTime*a/i.timescale,t*a)/a,r.dts=ag(r.dts-s.baseTime*a/s.timescale,t*a)/a}const o=e.samples;return e.samples=[],{samples:o}}function ng(e,t,i){const s=e.samples.length;if(!s)return;const r=e.inputTimeScale;for(let a=0;a<s;a++){const s=e.samples[a];s.pts=ag(s.pts-i.baseTime*r/i.timescale,t*r)/r}e.samples.sort(((e,t)=>e.pts-t.pts));const a=e.samples;return e.samples=[],{samples:a}}class lg{constructor(e,t,i,s){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=i,this.cts=s,this.flags={isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:e?2:1,isNonSync:e?0:1}}}function dg(e,t){const i=null==e?void 0:e.codec;if(i&&i.length>4)return i;if(t===Sc){if("ec-3"===i||"ac-3"===i||"alac"===i)return i;if("fLaC"===i||"Opus"===i){return Qu(i,!1)}const e="mp4a.40.5";return gc.info(`Parsed audio codec "${i}" or audio object type not handled. Using "${e}"`),e}return gc.warn(`Unhandled video codec "${i}"`),"hvc1"===i||"hev1"===i?"hvc1.1.6.L120.90":"av01"===i?"av01.0.04M.08":"avc1.42e01e"}try{tg=self.performance.now.bind(self.performance)}catch(e){gc.debug("Unable to use Performance API on this environment"),tg=null==Pc?void 0:Pc.Date.now}const hg=[{demux:class{constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,i,s){const r=this.videoTrack=fm("video",1),a=this.audioTrack=fm("audio",1),o=this.txtTrack=fm("text",1);if(this.id3Track=fm("id3",1),this.timeOffset=0,null==e||!e.byteLength)return;const n=vu(e);if(n.video){const{id:e,timescale:t,codec:i}=n.video;r.id=e,r.timescale=o.timescale=t,r.codec=i}if(n.audio){const{id:e,timescale:t,codec:i}=n.audio;a.id=e,a.timescale=t,a.codec=i}o.id=uu.text,r.sampleDuration=0,r.duration=a.duration=s}resetContiguity(){this.remainderData=null}static probe(e){return function(e){const t=e.byteLength;for(let i=0;i<t;){const s=mu(e,i);if(s>8&&109===e[i+4]&&111===e[i+5]&&111===e[i+6]&&102===e[i+7])return!0;i=s>1?i+s:t}return!1}(e)}demux(e,t){this.timeOffset=t;let i=e;const s=this.videoTrack,r=this.txtTrack;if(this.config.progressive){this.remainderData&&(i=xu(this.remainderData,e));const t=function(e){const t={valid:null,remainder:null},i=bu(e,["moof"]);if(i.length<2)return t.remainder=e,t;const s=i[i.length-1];return t.valid=Vc(e,0,s.byteOffset-8),t.remainder=Vc(e,s.byteOffset-8),t}(i);this.remainderData=t.remainder,s.samples=t.valid||new Uint8Array}else s.samples=i;const a=this.extractID3Track(s,t);return r.samples=Ru(t,s),{videoTrack:s,audioTrack:this.audioTrack,id3Track:a,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,i=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const s=this.extractID3Track(t,this.timeOffset);return i.samples=Ru(e,t),{videoTrack:t,audioTrack:fm(),id3Track:s,textTrack:fm()}}extractID3Track(e,t){const i=this.id3Track;if(e.samples.length){const s=bu(e.samples,["emsg"]);s&&s.forEach((e=>{const s=function(e){const t=e[0];let i="",s="",r=0,a=0,o=0,n=0,l=0,d=0;if(0===t){for(;"\0"!==pu(e.subarray(d,d+1));)i+=pu(e.subarray(d,d+1)),d+=1;for(i+=pu(e.subarray(d,d+1)),d+=1;"\0"!==pu(e.subarray(d,d+1));)s+=pu(e.subarray(d,d+1)),d+=1;s+=pu(e.subarray(d,d+1)),d+=1,r=mu(e,12),a=mu(e,16),n=mu(e,20),l=mu(e,24),d=28}else if(1===t){d+=4,r=mu(e,d),d+=4;const t=mu(e,d);d+=4;const a=mu(e,d);for(d+=4,o=2**32*t+a,nc(o)||(o=Number.MAX_SAFE_INTEGER,gc.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),n=mu(e,d),d+=4,l=mu(e,d),d+=4;"\0"!==pu(e.subarray(d,d+1));)i+=pu(e.subarray(d,d+1)),d+=1;for(i+=pu(e.subarray(d,d+1)),d+=1;"\0"!==pu(e.subarray(d,d+1));)s+=pu(e.subarray(d,d+1)),d+=1;s+=pu(e.subarray(d,d+1)),d+=1}return{schemeIdUri:i,value:s,timeScale:r,presentationTime:o,presentationTimeDelta:a,eventDuration:n,id:l,payload:e.subarray(d,e.byteLength)}}(e);if(Mm.test(s.schemeIdUri)){const e=oc(s.presentationTime)?s.presentationTime/s.timeScale:t+s.presentationTimeDelta/s.timeScale;let r=4294967295===s.eventDuration?Number.POSITIVE_INFINITY:s.eventDuration/s.timeScale;r<=.001&&(r=Number.POSITIVE_INFINITY);const a=s.payload;i.samples.push({data:a,len:a.byteLength,dts:e,pts:e,type:Rp,duration:r})}}))}return i}demuxSampleAes(e,t,i){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){}},remux:class{constructor(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null}destroy(){}resetTimeStamp(e){this.initPTS=e,this.lastEndTime=null}resetNextTimestamp(){this.lastEndTime=null}resetInitSegment(e,t,i,s){this.audioCodec=t,this.videoCodec=i,this.generateInitSegment(function(e,t){if(!e||!t)return e;const i=t.keyId;i&&t.isCommonEncryption&&bu(e,["moov","trak"]).forEach((e=>{const t=bu(e,["mdia","minf","stbl","stsd"])[0].subarray(8);let s=bu(t,["enca"]);const r=s.length>0;r||(s=bu(t,["encv"])),s.forEach((e=>{bu(r?e.subarray(28):e.subarray(78),["sinf"]).forEach((e=>{const t=ku(e);if(t){const e=t.subarray(8,24);e.some((e=>0!==e))||(gc.log(`[eme] Patching keyId in 'enc${r?"a":"v"}>sinf>>tenc' box: ${du(e)} -> ${du(i)}`),t.set(i,8))}}))}))}));return e}(e,s)),this.emitInitSegment=!0}generateInitSegment(e){let{audioCodec:t,videoCodec:i}=this;if(null==e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);const s=this.initData=vu(e);s.audio&&(t=dg(s.audio,Sc)),s.video&&(i=dg(s.video,Tc));const r={};s.audio&&s.video?r.audiovideo={container:"video/mp4",codec:t+","+i,initSegment:e,id:"main"}:s.audio?r.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:s.video?r.video={container:"video/mp4",codec:i,initSegment:e,id:"main"}:gc.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=r}remux(e,t,i,s,r,a){var o,n;let{initPTS:l,lastEndTime:d}=this;const h={audio:void 0,video:void 0,text:s,id3:i,initSegment:void 0};oc(d)||(d=this.lastEndTime=r||0);const c=t.samples;if(null==c||!c.length)return h;const u={initPTS:void 0,timescale:1};let p=this.initData;if(null!=(o=p)&&o.length||(this.generateInitSegment(c),p=this.initData),null==(n=p)||!n.length)return gc.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),h;this.emitInitSegment&&(u.tracks=this.initTracks,this.emitInitSegment=!1);const f=function(e,t){let i=0,s=0,r=0;const a=bu(e,["moof","traf"]);for(let e=0;e<a.length;e++){const o=a[e],n=bu(o,["tfhd"])[0],l=t[mu(n,4)];if(!l)continue;const d=l.default,h=mu(n,0)|(null==d?void 0:d.flags);let c=null==d?void 0:d.duration;8&h&&(c=mu(n,2&h?12:8));const u=l.timescale||9e4,p=bu(o,["trun"]);for(let e=0;e<p.length;e++)i=Cu(p[e]),!i&&c&&(i=c*mu(p[e],4)),l.type===Tc?s+=i/u:l.type===Sc&&(r+=i/u)}if(0===s&&0===r){let t=1/0,i=0,s=0;const r=bu(e,["sidx"]);for(let e=0;e<r.length;e++){const a=_u(r[e]);if(null!=a&&a.references){t=Math.min(t,a.earliestPresentationTime/a.timescale);const e=a.references.reduce(((e,t)=>e+t.info.duration||0),0);i=Math.max(i,e+a.earliestPresentationTime/a.timescale),s=i-t}}if(s&&oc(s))return s}return s||r}(c,p),m=function(e,t){return bu(t,["moof","traf"]).reduce(((t,i)=>{const s=bu(i,["tfdt"])[0],r=s[0],a=bu(i,["tfhd"]).reduce(((t,i)=>{const a=mu(i,4),o=e[a];if(o){let e=mu(s,4);if(1===r){if(e===hu)return gc.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),t;e*=hu+1,e+=mu(s,8)}const i=e/(o.timescale||9e4);if(oc(i)&&(null===t||i<t))return i}return t}),null);return null!==a&&oc(a)&&(null===t||a<t)?a:t}),null)}(p,c),g=null===m?r:m;(function(e,t,i,s){if(null===e)return!0;const r=Math.max(s,1),a=t-e.baseTime/e.timescale;return Math.abs(a-i)>r}(l,g,r,f)||u.timescale!==l.timescale&&a)&&(u.initPTS=g-r,l&&1===l.timescale&&gc.warn("Adjusting initPTS by "+(u.initPTS-l.baseTime)),this.initPTS=l={baseTime:u.initPTS,timescale:1});const y=e?g-l.baseTime/l.timescale:d,A=y+f;!function(e,t,i){bu(t,["moof","traf"]).forEach((t=>{bu(t,["tfhd"]).forEach((s=>{const r=mu(s,4),a=e[r];if(!a)return;const o=a.timescale||9e4;bu(t,["tfdt"]).forEach((e=>{const t=e[0],s=i*o;if(s){let i=mu(e,4);if(0===t)i-=s,i=Math.max(i,0),Au(e,4,i);else{i*=Math.pow(2,32),i+=mu(e,8),i-=s,i=Math.max(i,0);const t=Math.floor(i/(hu+1)),r=Math.floor(i%(hu+1));Au(e,4,t),Au(e,8,r)}}}))}))}))}(p,c,l.baseTime/l.timescale),f>0?this.lastEndTime=A:(gc.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const b=!!p.audio,_=!!p.video;let v="";b&&(v+="audio"),_&&(v+="video");const w={data1:c,startPTS:y,startDTS:y,endPTS:A,endDTS:A,type:v,hasAudio:b,hasVideo:_,nb:1,dropped:0};return h.audio="audio"===w.type?w:void 0,h.video="audio"!==w.type?w:void 0,h.initSegment=u,h.id3=og(i,r,l,l),s.samples.length&&(h.text=ng(s,r,l)),h}}},{demux:Hm,remux:rg},{demux:class extends mm{constructor(e,t){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=t}resetInitSegment(e,t,i,s){super.resetInitSegment(e,t,i,s),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:s,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=qc(e,0);let i=(null==t?void 0:t.length)||0;if(Bm(e,i))return!1;for(let t=e.length;i<t;i++)if(vm(e,i))return gc.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return function(e,t){return function(e,t){return t+5<e.length}(e,t)&&ym(e,t)&&bm(e,t)<=e.length-t}(e,t)}appendFrame(e,t,i){wm(e,this.observer,t,i,e.manifestCodec);const s=Tm(e,t,i,this.basePTS,this.frameIndex);if(s&&0===s.missing)return s}},remux:rg},{demux:class extends mm{resetInitSegment(e,t,i,s){super.resetInitSegment(e,t,i,s),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:s,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=qc(e,0);let i=(null==t?void 0:t.length)||0;if(t&&11===e[i]&&119===e[i+1]&&void 0!==Qc(t)&&Um(e,i)<=16)return!1;for(let t=e.length;i<t;i++)if(Bm(e,i))return gc.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return function(e,t){return Im(e,t)&&4<=e.length-t}(e,t)}appendFrame(e,t,i){if(null!==this.basePTS)return Dm(e,t,i,this.basePTS,this.frameIndex)}},remux:rg}];hg.splice(2,0,{demux:Fm,remux:rg});class cg{constructor(e,t,i,s,r){this.async=!1,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=i,this.vendor=s,this.id=r}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,i,s){const r=i.transmuxing;r.executeStart=tg();let a=new Uint8Array(e);const{currentTransmuxState:o,transmuxConfig:n}=this;s&&(this.currentTransmuxState=s);const{contiguous:l,discontinuity:d,trackSwitch:h,accurateTimeOffset:c,timeOffset:u,initSegmentChange:p}=s||o,{audioCodec:f,videoCodec:m,defaultInitPts:g,duration:y,initSegmentData:A}=n,b=function(e,t){let i=null;e.byteLength>0&&null!=(null==t?void 0:t.key)&&null!==t.iv&&null!=t.method&&(i=t);return i}(a,t);if(b&&"AES-128"===b.method){const e=this.getDecrypter();if(!e.isSync())return this.decryptionPromise=e.webCryptoDecrypt(a,b.key.buffer,b.iv.buffer).then((e=>{const t=this.push(e,null,i);return this.decryptionPromise=null,t})),this.decryptionPromise;{let t=e.softwareDecrypt(a,b.key.buffer,b.iv.buffer);if(i.part>-1&&(t=e.flush()),!t)return r.executeEnd=tg(),ug(i);a=new Uint8Array(t)}}const _=this.needsProbing(d,h);if(_){const e=this.configureTransmuxer(a);if(e)return gc.warn(`[transmuxer] ${e.message}`),this.observer.emit(dc.ERROR,dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.FRAG_PARSING_ERROR,fatal:!1,error:e,reason:e.message}),r.executeEnd=tg(),ug(i)}(d||h||p||_)&&this.resetInitSegment(A,f,m,y,t),(d||p||_)&&this.resetInitialTimestamp(g),l||this.resetContiguity();const v=this.transmux(a,b,u,c,i),w=this.currentTransmuxState;return w.contiguous=!0,w.discontinuity=!1,w.trackSwitch=!1,r.executeEnd=tg(),v}flush(e){const t=e.transmuxing;t.executeStart=tg();const{decrypter:i,currentTransmuxState:s,decryptionPromise:r}=this;if(r)return r.then((()=>this.flush(e)));const a=[],{timeOffset:o}=s;if(i){const t=i.flush();t&&a.push(this.push(t,null,e))}const{demuxer:n,remuxer:l}=this;if(!n||!l)return t.executeEnd=tg(),[ug(e)];const d=n.flush(o);return pg(d)?d.then((t=>(this.flushRemux(a,t,e),a))):(this.flushRemux(a,d,e),a)}flushRemux(e,t,i){const{audioTrack:s,videoTrack:r,id3Track:a,textTrack:o}=t,{accurateTimeOffset:n,timeOffset:l}=this.currentTransmuxState;gc.log(`[transmuxer.ts]: Flushed fragment ${i.sn}${i.part>-1?" p: "+i.part:""} of level ${i.level}`);const d=this.remuxer.remux(s,r,a,o,l,n,!0,this.id);e.push({remuxResult:d,chunkMeta:i}),i.transmuxing.executeEnd=tg()}resetInitialTimestamp(e){const{demuxer:t,remuxer:i}=this;t&&i&&(t.resetTimeStamp(e),i.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,i,s,r){const{demuxer:a,remuxer:o}=this;a&&o&&(a.resetInitSegment(e,t,i,s),o.resetInitSegment(e,t,i,r))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,i,s,r){let a;return a=t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,i,s,r):this.transmuxUnencrypted(e,i,s,r),a}transmuxUnencrypted(e,t,i,s){const{audioTrack:r,videoTrack:a,id3Track:o,textTrack:n}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(r,a,o,n,t,i,!1,this.id),chunkMeta:s}}transmuxSampleAes(e,t,i,s,r){return this.demuxer.demuxSampleAes(e,t,i).then((e=>({remuxResult:this.remuxer.remux(e.audioTrack,e.videoTrack,e.id3Track,e.textTrack,i,s,!1,this.id),chunkMeta:r})))}configureTransmuxer(e){const{config:t,observer:i,typeSupported:s,vendor:r}=this;let a;for(let t=0,i=hg.length;t<i;t++){var o;if(null!=(o=hg[t].demux)&&o.probe(e)){a=hg[t];break}}if(!a)return new Error("Failed to find demuxer by probing fragment data");const n=this.demuxer,l=this.remuxer,d=a.remux,h=a.demux;l&&l instanceof d||(this.remuxer=new d(i,t,s,r)),n&&n instanceof h||(this.demuxer=new h(i,t,s),this.probe=h.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new Xf(this.config)),e}}const ug=e=>({remuxResult:{},chunkMeta:e});function pg(e){return"then"in e&&e.then instanceof Function}class fg{constructor(e,t,i,s,r){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=i,this.duration=s,this.defaultInitPts=r||null}}class mg{constructor(e,t,i,s,r,a){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=i,this.trackSwitch=s,this.timeOffset=r,this.initSegmentChange=a}}var gg={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,i="~";function s(){}function r(e,t,i){this.fn=e,this.context=t,this.once=i||!1}function a(e,t,s,a,o){if("function"!=typeof s)throw new TypeError("The listener must be a function");var n=new r(s,a||e,o),l=i?i+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],n]:e._events[l].push(n):(e._events[l]=n,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new s:delete e._events[t]}function n(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(i=!1)),n.prototype.eventNames=function(){var e,s,r=[];if(0===this._eventsCount)return r;for(s in e=this._events)t.call(e,s)&&r.push(i?s.slice(1):s);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},n.prototype.listeners=function(e){var t=i?i+e:e,s=this._events[t];if(!s)return[];if(s.fn)return[s.fn];for(var r=0,a=s.length,o=new Array(a);r<a;r++)o[r]=s[r].fn;return o},n.prototype.listenerCount=function(e){var t=i?i+e:e,s=this._events[t];return s?s.fn?1:s.length:0},n.prototype.emit=function(e,t,s,r,a,o){var n=i?i+e:e;if(!this._events[n])return!1;var l,d,h=this._events[n],c=arguments.length;if(h.fn){switch(h.once&&this.removeListener(e,h.fn,void 0,!0),c){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,t),!0;case 3:return h.fn.call(h.context,t,s),!0;case 4:return h.fn.call(h.context,t,s,r),!0;case 5:return h.fn.call(h.context,t,s,r,a),!0;case 6:return h.fn.call(h.context,t,s,r,a,o),!0}for(d=1,l=new Array(c-1);d<c;d++)l[d-1]=arguments[d];h.fn.apply(h.context,l)}else{var u,p=h.length;for(d=0;d<p;d++)switch(h[d].once&&this.removeListener(e,h[d].fn,void 0,!0),c){case 1:h[d].fn.call(h[d].context);break;case 2:h[d].fn.call(h[d].context,t);break;case 3:h[d].fn.call(h[d].context,t,s);break;case 4:h[d].fn.call(h[d].context,t,s,r);break;default:if(!l)for(u=1,l=new Array(c-1);u<c;u++)l[u-1]=arguments[u];h[d].fn.apply(h[d].context,l)}}return!0},n.prototype.on=function(e,t,i){return a(this,e,t,i,!1)},n.prototype.once=function(e,t,i){return a(this,e,t,i,!0)},n.prototype.removeListener=function(e,t,s,r){var a=i?i+e:e;if(!this._events[a])return this;if(!t)return o(this,a),this;var n=this._events[a];if(n.fn)n.fn!==t||r&&!n.once||s&&n.context!==s||o(this,a);else{for(var l=0,d=[],h=n.length;l<h;l++)(n[l].fn!==t||r&&!n[l].once||s&&n[l].context!==s)&&d.push(n[l]);d.length?this._events[a]=1===d.length?d[0]:d:o(this,a)}return this},n.prototype.removeAllListeners=function(e){var t;return e?(t=i?i+e:e,this._events[t]&&o(this,t)):(this._events=new s,this._eventsCount=0),this},n.prototype.off=n.prototype.removeListener,n.prototype.addListener=n.prototype.on,n.prefixed=i,n.EventEmitter=n,e.exports=n}(gg);var yg=Xh(gg.exports);class Ag{constructor(e,t,i,s){this.error=null,this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0;const r=e.config;this.hls=e,this.id=t,this.useWorker=!!r.enableWorker,this.onTransmuxComplete=i,this.onFlush=s;const a=(e,t)=>{(t=t||{}).frag=this.frag,t.id=this.id,e===dc.ERROR&&(this.error=t.error),this.hls.trigger(e,t)};this.observer=new yg,this.observer.on(dc.FRAG_DECRYPTED,a),this.observer.on(dc.ERROR,a);const o=zu(r.preferManagedMediaSource)||{isTypeSupported:()=>!1},n={mpeg:o.isTypeSupported("audio/mpeg"),mp3:o.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:o.isTypeSupported('audio/mp4; codecs="ac-3"')},l=navigator.vendor;if(this.useWorker&&"undefined"!=typeof Worker){if(r.workerPath||"function"==typeof __HLS_WORKER_BUNDLE__){try{r.workerPath?(gc.log(`loading Web Worker ${r.workerPath} for "${t}"`),this.workerContext=function(e){const t=new self.URL(e,self.location.href).href;return{worker:new self.Worker(t),scriptURL:t}}(r.workerPath)):(gc.log(`injecting Web Worker for "${t}"`),this.workerContext=function(){const e=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),t=self.URL.createObjectURL(e);return{worker:new self.Worker(t),objectURL:t}}()),this.onwmsg=e=>this.onWorkerMessage(e);const{worker:e}=this.workerContext;e.addEventListener("message",this.onwmsg),e.onerror=e=>{const i=new Error(`${e.message} (${e.filename}:${e.lineno})`);r.enableWorker=!1,gc.warn(`Error in "${t}" Web Worker, fallback to inline`),this.hls.trigger(dc.ERROR,{type:hc.OTHER_ERROR,details:cc.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:i})},e.postMessage({cmd:"init",typeSupported:n,vendor:l,id:t,config:JSON.stringify(r)})}catch(e){gc.warn(`Error setting up "${t}" Web Worker, fallback to inline`,e),this.resetWorker(),this.error=null,this.transmuxer=new cg(this.observer,n,r,l,t)}return}}this.transmuxer=new cg(this.observer,n,r,l,t)}resetWorker(){if(this.workerContext){const{worker:e,objectURL:t}=this.workerContext;t&&self.URL.revokeObjectURL(t),e.removeEventListener("message",this.onwmsg),e.onerror=null,e.terminate(),this.workerContext=null}}destroy(){if(this.workerContext)this.resetWorker(),this.onwmsg=void 0;else{const e=this.transmuxer;e&&(e.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null}push(e,t,i,s,r,a,o,n,l,d){var h,c;l.transmuxing.start=self.performance.now();const{transmuxer:u}=this,p=a?a.start:r.start,f=r.decryptdata,m=this.frag,g=!(m&&r.cc===m.cc),y=!(m&&l.level===m.level),A=m?l.sn-m.sn:-1,b=this.part?l.part-this.part.index:-1,_=0===A&&l.id>1&&l.id===(null==m?void 0:m.stats.chunkCount),v=!y&&(1===A||0===A&&(1===b||_&&b<=0)),w=self.performance.now();(y||A||0===r.stats.parsing.start)&&(r.stats.parsing.start=w),!a||!b&&v||(a.stats.parsing.start=w);const S=!(m&&(null==(h=r.initSegment)?void 0:h.url)===(null==(c=m.initSegment)?void 0:c.url)),T=new mg(g,v,n,y,p,S);if(!v||g||S){gc.log(`[transmuxer-interface, ${r.type}]: Starting new transmux session for sn: ${l.sn} p: ${l.part} level: ${l.level} id: ${l.id}\n discontinuity: ${g}\n trackSwitch: ${y}\n contiguous: ${v}\n accurateTimeOffset: ${n}\n timeOffset: ${p}\n initSegmentChange: ${S}`);const e=new fg(i,s,t,o,d);this.configureTransmuxer(e)}if(this.frag=r,this.part=a,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:f,chunkMeta:l,state:T},e instanceof ArrayBuffer?[e]:[]);else if(u){const t=u.push(e,f,l,T);pg(t)?(u.async=!0,t.then((e=>{this.handleTransmuxComplete(e)})).catch((e=>{this.transmuxerError(e,l,"transmuxer-interface push error")}))):(u.async=!1,this.handleTransmuxComplete(t))}}flush(e){e.transmuxing.start=self.performance.now();const{transmuxer:t}=this;if(this.workerContext)this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:e});else if(t){let i=t.flush(e);pg(i)||t.async?(pg(i)||(i=Promise.resolve(i)),i.then((t=>{this.handleFlushResult(t,e)})).catch((t=>{this.transmuxerError(t,e,"transmuxer-interface flush error")}))):this.handleFlushResult(i,e)}}transmuxerError(e,t,i){this.hls&&(this.error=e,this.hls.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.FRAG_PARSING_ERROR,chunkMeta:t,fatal:!1,error:e,err:e,reason:i}))}handleFlushResult(e,t){e.forEach((e=>{this.handleTransmuxComplete(e)})),this.onFlush(t)}onWorkerMessage(e){const t=e.data,i=this.hls;switch(t.event){case"init":{var s;const e=null==(s=this.workerContext)?void 0:s.objectURL;e&&self.URL.revokeObjectURL(e);break}case"transmuxComplete":this.handleTransmuxComplete(t.data);break;case"flush":this.onFlush(t.data);break;case"workerLog":gc[t.data.logType]&&gc[t.data.logType](t.data.message);break;default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,i.trigger(t.event,t.data)}}configureTransmuxer(e){const{transmuxer:t}=this;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:e}):t&&t.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}function bg(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!_g(e[i].attrs,t[i].attrs))return!1;return!0}function _g(e,t,i){const s=e["STABLE-RENDITION-ID"];return s&&!i?s===t["STABLE-RENDITION-ID"]:!(i||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some((i=>e[i]!==t[i]))}function vg(e,t){return t.label.toLowerCase()===e.name.toLowerCase()&&(!t.language||t.language.toLowerCase()===(e.lang||"").toLowerCase())}class wg{constructor(e){this.buffered=void 0;const t=(t,i,s)=>{if((i>>>=0)>s-1)throw new DOMException(`Failed to execute '${t}' on 'TimeRanges': The index provided (${i}) is greater than the maximum bound (${s})`);return e[i][t]};this.buffered={get length(){return e.length},end:i=>t("end",i,e.length),start:i=>t("start",i,e.length)}}}class Sg{constructor(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}append(e,t,i){const s=this.queues[t];s.push(e),1!==s.length||i||this.executeNext(t)}insertAbort(e,t){this.queues[t].unshift(e),this.executeNext(t)}appendBlocker(e){let t;const i=new Promise((e=>{t=e})),s={execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};return this.append(s,e),i}executeNext(e){const t=this.queues[e];if(t.length){const i=t[0];try{i.execute()}catch(t){gc.warn(`[buffer-operation-queue]: Exception executing "${e}" SourceBuffer operation: ${t}`),i.onError(t);const s=this.buffers[e];null!=s&&s.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){this.queues[e].shift(),this.executeNext(e)}current(e){return this.queues[e][0]}}const Tg=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/;function Eg(e){const t=e.querySelectorAll("source");[].slice.call(t).forEach((t=>{e.removeChild(t)}))}const kg={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},Cg=function(e){let t=e;return kg.hasOwnProperty(e)&&(t=kg[e]),String.fromCharCode(t)},xg=15,Rg=100,Dg={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Lg={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Ig={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Pg={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Bg=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class Mg{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const i="function"==typeof t?t():t;gc.log(`${this.time} [${e}] ${i}`)}}}const Ug=function(e){const t=[];for(let i=0;i<e.length;i++)t.push(e[i].toString(16));return t};class Fg{constructor(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const t=["foreground","underline","italics","background","flash"];for(let i=0;i<t.length;i++){const s=t[i];e.hasOwnProperty(s)&&(this[s]=e[s])}}isDefault(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash}equals(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}copy(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}toString(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}class Og{constructor(){this.uchar=" ",this.penState=new Fg}reset(){this.uchar=" ",this.penState.reset()}setChar(e,t){this.uchar=e,this.penState.copy(t)}setPenState(e){this.penState.copy(e)}equals(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)}copy(e){this.uchar=e.uchar,this.penState.copy(e.penState)}isEmpty(){return" "===this.uchar&&this.penState.isDefault()}}class Ng{constructor(e){this.chars=[],this.pos=0,this.currPenState=new Fg,this.cueStartTime=null,this.logger=void 0;for(let e=0;e<Rg;e++)this.chars.push(new Og);this.logger=e}equals(e){for(let t=0;t<Rg;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<Rg;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<Rg;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e}setCursor(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>Rg&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=Rg)}moveCursor(e){const t=this.pos+e;if(e>1)for(let e=this.pos+1;e<t+1;e++)this.chars[e].setPenState(this.currPenState);this.setCursor(t)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const t=Cg(e);this.pos>=Rg?this.logger.log(0,(()=>"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!")):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))}clearFromPos(e){let t;for(t=e;t<Rg;t++)this.chars[t].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let t=!0;for(let i=0;i<Rg;i++){const s=this.chars[i].uchar;" "!==s&&(t=!1),e.push(s)}return t?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e);this.chars[this.pos].setPenState(this.currPenState)}}class jg{constructor(e){this.rows=[],this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<xg;t++)this.rows.push(new Ng(e));this.logger=e}reset(){for(let e=0;e<xg;e++)this.rows[e].clear();this.currRow=14}equals(e){let t=!0;for(let i=0;i<xg;i++)if(!this.rows[i].equals(e.rows[i])){t=!1;break}return t}copy(e){for(let t=0;t<xg;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<xg;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e}backSpace(){this.rows[this.currRow].backSpace()}clearToEndOfRow(){this.rows[this.currRow].clearToEndOfRow()}insertChar(e){this.rows[this.currRow].insertChar(e)}setPen(e){this.rows[this.currRow].setPenStyles(e)}moveCursor(e){this.rows[this.currRow].moveCursor(e)}setCursor(e){this.logger.log(2,"setCursor: "+e);this.rows[this.currRow].setCursor(e)}setPAC(e){this.logger.log(2,(()=>"pacData = "+JSON.stringify(e)));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let e=0;e<xg;e++)this.rows[e].clear();const e=this.currRow+1-this.nrRollUpRows,i=this.lastOutputScreen;if(i){const s=i.rows[e].cueStartTime,r=this.logger.time;if(null!==s&&null!==r&&s<r)for(let s=0;s<this.nrRollUpRows;s++)this.rows[t-this.nrRollUpRows+s+1].copy(i.rows[e+s])}}this.currRow=t;const i=this.rows[this.currRow];if(null!==e.indent){const t=e.indent,s=Math.max(t-1,0);i.setCursor(e.indent),e.color=i.chars[s].penState.foreground}const s={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(s)}setBkgData(e){this.logger.log(2,(()=>"bkgData = "+JSON.stringify(e))),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(null===this.nrRollUpRows)return void this.logger.log(3,"roll_up but nrRollUpRows not set yet");this.logger.log(1,(()=>this.getDisplayText()));const e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const t=[];let i="",s=-1;for(let i=0;i<xg;i++){const r=this.rows[i].getTextString();r&&(s=i+1,e?t.push("Row "+s+": '"+r+"'"):t.push(r.trim()))}return t.length>0&&(i=e?"["+t.join(" | ")+"]":t.join("\n")),i}getTextAndFormat(){return this.rows}}class Gg{constructor(e,t,i){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new jg(i),this.nonDisplayedMemory=new jg(i),this.lastOutputScreen=new jg(i),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=i}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,(()=>"MODE="+e)),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);const t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,(()=>t+": "+this.writeScreen.getDisplayText(!0))),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(1,(()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0))),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,(()=>"DISP: "+this.displayedMemory.getDisplayText()))}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{const i=Math.floor(e/2)-16,s=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=s[i]}this.logger.log(2,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)}outputDataUpdate(e=!1){const t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}}class zg{constructor(e,t,i){this.channels=void 0,this.currentChannel=0,this.cmdHistory={a:null,b:null},this.logger=void 0;const s=this.logger=new Mg;this.channels=[null,new Gg(e,t,s),new Gg(e+1,i,s)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){let i,s,r,a=!1;this.logger.time=e;for(let e=0;e<t.length;e+=2)if(s=127&t[e],r=127&t[e+1],0!==s||0!==r){if(this.logger.log(3,"["+Ug([t[e],t[e+1]])+"] -> ("+Ug([s,r])+")"),i=this.parseCmd(s,r),i||(i=this.parseMidrow(s,r)),i||(i=this.parsePAC(s,r)),i||(i=this.parseBackgroundAttributes(s,r)),!i&&(a=this.parseChars(s,r),a)){const e=this.currentChannel;if(e&&e>0){this.channels[e].insertChars(a)}else this.logger.log(2,"No channel found yet. TEXT-MODE?")}i||a||this.logger.log(2,"Couldn't parse cleaned data "+Ug([s,r])+" orig: "+Ug([t[e],t[e+1]]))}}parseCmd(e,t){const{cmdHistory:i}=this;if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47)&&!((23===e||31===e)&&t>=33&&t<=35))return!1;if(Hg(e,t,i))return $g(null,null,i),this.logger.log(3,"Repeated command ("+Ug([e,t])+") is dropped"),!0;const s=20===e||21===e||23===e?1:2,r=this.channels[s];return 20===e||21===e||28===e||29===e?32===t?r.ccRCL():33===t?r.ccBS():34===t?r.ccAOF():35===t?r.ccAON():36===t?r.ccDER():37===t?r.ccRU(2):38===t?r.ccRU(3):39===t?r.ccRU(4):40===t?r.ccFON():41===t?r.ccRDC():42===t?r.ccTR():43===t?r.ccRTD():44===t?r.ccEDM():45===t?r.ccCR():46===t?r.ccENM():47===t&&r.ccEOC():r.ccTO(t-32),$g(e,t,i),this.currentChannel=s,!0}parseMidrow(e,t){let i=0;if((17===e||25===e)&&t>=32&&t<=47){if(i=17===e?1:2,i!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const s=this.channels[i];return!!s&&(s.ccMIDROW(t),this.logger.log(3,"MIDROW ("+Ug([e,t])+")"),!0)}return!1}parsePAC(e,t){let i;const s=this.cmdHistory;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127)&&!((16===e||24===e)&&t>=64&&t<=95))return!1;if(Hg(e,t,s))return $g(null,null,s),!0;const r=e<=23?1:2;i=t>=64&&t<=95?1===r?Dg[e]:Ig[e]:1===r?Lg[e]:Pg[e];const a=this.channels[r];return!!a&&(a.setPAC(this.interpretPAC(i,t)),$g(e,t,s),this.currentChannel=r,!0)}interpretPAC(e,t){let i;const s={color:null,italics:!1,indent:null,underline:!1,row:e};return i=t>95?t-96:t-64,s.underline=1==(1&i),i<=13?s.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(i/2)]:i<=15?(s.italics=!0,s.color="white"):s.indent=4*Math.floor((i-16)/2),s}parseChars(e,t){let i,s=null,r=null;if(e>=25?(i=2,r=e-8):(i=1,r=e),r>=17&&r<=19){let e;e=17===r?t+80:18===r?t+112:t+144,this.logger.log(2,"Special char '"+Cg(e)+"' in channel "+i),s=[e]}else e>=32&&e<=127&&(s=0===t?[e]:[e,t]);if(s){const i=Ug(s);this.logger.log(3,"Char codes = "+i.join(",")),$g(e,t,this.cmdHistory)}return s}parseBackgroundAttributes(e,t){if(!((16===e||24===e)&&t>=32&&t<=47)&&!((23===e||31===e)&&t>=45&&t<=47))return!1;let i;const s={};16===e||24===e?(i=Math.floor((t-32)/2),s.background=Bg[i],t%2==1&&(s.background=s.background+"_semi")):45===t?s.background="transparent":(s.foreground="black",47===t&&(s.underline=!0));const r=e<=23?1:2;return this.channels[r].setBkgData(s),$g(e,t,this.cmdHistory),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}this.cmdHistory={a:null,b:null}}cueSplitAtTime(e){for(let t=0;t<this.channels.length;t++){const i=this.channels[t];i&&i.cueSplitAtTime(e)}}}function $g(e,t,i){i.a=e,i.b=t}function Hg(e,t,i){return i.a===e&&i.b===t}class Vg{constructor(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}dispatchCue(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}newCue(e,t,i){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=i,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}var Wg=function(){if(null!=Pc&&Pc.VTTCue)return self.VTTCue;const e=["","lr","rl"],t=["start","middle","end","left","right"];function i(e,t){if("string"!=typeof t)return!1;if(!Array.isArray(e))return!1;const i=t.toLowerCase();return!!~e.indexOf(i)&&i}function s(e){return i(t,e)}function r(e,...t){let i=1;for(;i<arguments.length;i++){const t=arguments[i];for(const i in t)e[i]=t[i]}return e}function a(t,a,o){const n=this,l={enumerable:!0};n.hasBeenReset=!1;let d="",h=!1,c=t,u=a,p=o,f=null,m="",g=!0,y="auto",A="start",b=50,_="middle",v=50,w="middle";Object.defineProperty(n,"id",r({},l,{get:function(){return d},set:function(e){d=""+e}})),Object.defineProperty(n,"pauseOnExit",r({},l,{get:function(){return h},set:function(e){h=!!e}})),Object.defineProperty(n,"startTime",r({},l,{get:function(){return c},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");c=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"endTime",r({},l,{get:function(){return u},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");u=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"text",r({},l,{get:function(){return p},set:function(e){p=""+e,this.hasBeenReset=!0}})),Object.defineProperty(n,"region",r({},l,{get:function(){return f},set:function(e){f=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"vertical",r({},l,{get:function(){return m},set:function(t){const s=function(t){return i(e,t)}(t);if(!1===s)throw new SyntaxError("An invalid or illegal string was specified.");m=s,this.hasBeenReset=!0}})),Object.defineProperty(n,"snapToLines",r({},l,{get:function(){return g},set:function(e){g=!!e,this.hasBeenReset=!0}})),Object.defineProperty(n,"line",r({},l,{get:function(){return y},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"lineAlign",r({},l,{get:function(){return A},set:function(e){const t=s(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");A=t,this.hasBeenReset=!0}})),Object.defineProperty(n,"position",r({},l,{get:function(){return b},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"positionAlign",r({},l,{get:function(){return _},set:function(e){const t=s(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");_=t,this.hasBeenReset=!0}})),Object.defineProperty(n,"size",r({},l,{get:function(){return v},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"align",r({},l,{get:function(){return w},set:function(e){const t=s(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");w=t,this.hasBeenReset=!0}})),n.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}();class Jg{decode(e,t){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function qg(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+parseFloat(s||0)}const i=e.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return i?parseFloat(i[2])>59?t(i[2],i[3],0,i[4]):t(i[1],i[2],i[3],i[4]):null}class Kg{constructor(){this.values=Object.create(null)}set(e,t){this.get(e)||""===t||(this.values[e]=t)}get(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,i){for(let s=0;s<i.length;++s)if(t===i[s]){this.set(e,t);break}}integer(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))}percent(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){const i=parseFloat(t);if(i>=0&&i<=100)return this.set(e,i),!0}return!1}}function Yg(e,t,i,s){const r=s?e.split(s):[e];for(const e in r){if("string"!=typeof r[e])continue;const s=r[e].split(i);if(2!==s.length)continue;t(s[0],s[1])}}const Qg=new Wg(0,0,""),Xg="middle"===Qg.align?"middle":"center";function Zg(e,t,i){const s=e;function r(){const t=qg(e);if(null===t)throw new Error("Malformed timestamp: "+s);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function a(){e=e.replace(/^\s+/,"")}if(a(),t.startTime=r(),a(),"--\x3e"!==e.slice(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+s);e=e.slice(3),a(),t.endTime=r(),a(),function(e,t){const s=new Kg;Yg(e,(function(e,t){let r;switch(e){case"region":for(let r=i.length-1;r>=0;r--)if(i[r].id===t){s.set(e,i[r].region);break}break;case"vertical":s.alt(e,t,["rl","lr"]);break;case"line":r=t.split(","),s.integer(e,r[0]),s.percent(e,r[0])&&s.set("snapToLines",!1),s.alt(e,r[0],["auto"]),2===r.length&&s.alt("lineAlign",r[1],["start",Xg,"end"]);break;case"position":r=t.split(","),s.percent(e,r[0]),2===r.length&&s.alt("positionAlign",r[1],["start",Xg,"end","line-left","line-right","auto"]);break;case"size":s.percent(e,t);break;case"align":s.alt(e,t,["start",Xg,"end","left","right"])}}),/:/,/\s/),t.region=s.get("region",null),t.vertical=s.get("vertical","");let r=s.get("line","auto");"auto"===r&&-1===Qg.line&&(r=-1),t.line=r,t.lineAlign=s.get("lineAlign","start"),t.snapToLines=s.get("snapToLines",!0),t.size=s.get("size",100),t.align=s.get("align",Xg);let a=s.get("position","auto");"auto"===a&&50===Qg.position&&(a="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=a}(e,t)}function ey(e){return e.replace(/<br(?: \/)?>/gi,"\n")}class ty{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new Jg,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const t=this;function i(){let e=t.buffer,i=0;for(e=ey(e);i<e.length&&"\r"!==e[i]&&"\n"!==e[i];)++i;const s=e.slice(0,i);return"\r"===e[i]&&++i,"\n"===e[i]&&++i,t.buffer=e.slice(i),s}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{let e="";if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;e=i();const s=e.match(/^()?WEBVTT([ \t].*)?$/);if(null==s||!s[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let s=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(s?s=!1:e=i(),t.state){case"HEADER":/:/.test(e)?Yg(e,(function(e,t){}),/:/):e||(t.state="ID");continue;case"NOTE":e||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(e)){t.state="NOTE";break}if(!e)continue;if(t.cue=new Wg(0,0,""),t.state="CUE",-1===e.indexOf("--\x3e")){t.cue.id=e;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{Zg(e,t.cue,t.regionList)}catch(e){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const i=-1!==e.indexOf("--\x3e");if(!e||i&&(s=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(null===t.cue)continue;t.cue.text&&(t.cue.text+="\n"),t.cue.text+=e}continue;case"BADCUE":e||(t.state="ID")}}}catch(e){"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this}flush(){const e=this;try{if((e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state||"BADWEBVTT"===e.state)throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this}}const iy=/\r\n|\n\r|\n|\r/g,sy=function(e,t,i=0){return e.slice(i,i+t.length)===t},ry=function(e){let t=5381,i=e.length;for(;i;)t=33*t^e.charCodeAt(--i);return(t>>>0).toString()};function ay(e,t,i){return ry(e.toString())+ry(t.toString())+ry(i)}function oy(e,t,i,s,r,a,o){const n=new ty,l=ou(new Uint8Array(e)).trim().replace(iy,"\n").split("\n"),d=[],h=t?function(e,t=1){return Zm(e,9e4,1/t)}(t.baseTime,t.timescale):0;let c,u="00:00.000",p=0,f=0,m=!0;n.oncue=function(e){const a=i[s];let o=i.ccOffset;const n=(p-h)/9e4;if(null!=a&&a.new&&(void 0!==f?o=i.ccOffset=a.start:function(e,t,i){let s=e[t],r=e[s.prevCC];if(!r||!r.new&&s.new)return e.ccOffset=e.presentationOffset=s.start,void(s.new=!1);for(;null!=(a=r)&&a.new;){var a;e.ccOffset+=s.start-r.start,s.new=!1,s=r,r=e[s.prevCC]}e.presentationOffset=i}(i,s,n)),n){if(!t)return void(c=new Error("Missing initPTS for VTT MPEGTS"));o=n-i.presentationOffset}const l=e.endTime-e.startTime,u=ag(9e4*(e.startTime+o-f),9e4*r)/9e4;e.startTime=Math.max(u,0),e.endTime=Math.max(u+l,0);const m=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(m)),e.id||(e.id=ay(e.startTime,e.endTime,m)),e.endTime>0&&d.push(e)},n.onparsingerror=function(e){c=e},n.onflush=function(){c?o(c):a(d)},l.forEach((e=>{if(m){if(sy(e,"X-TIMESTAMP-MAP=")){m=!1,e.slice(16).split(",").forEach((e=>{sy(e,"LOCAL:")?u=e.slice(6):sy(e,"MPEGTS:")&&(p=parseInt(e.slice(7)))}));try{f=function(e){let t=parseInt(e.slice(-3));const i=parseInt(e.slice(-6,-4)),s=parseInt(e.slice(-9,-7)),r=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!(oc(t)&&oc(i)&&oc(s)&&oc(r)))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*i,t+=6e4*s,t+=36e5*r,t}(u)/1e3}catch(e){c=e}return}""===e&&(m=!1)}n.parse(e+"\n")})),n.flush()}const ny="stpp.ttml.im1t",ly=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,dy=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,hy={left:"start",center:"center",right:"end",start:"start",end:"end"};function cy(e,t,i,s){const r=bu(new Uint8Array(e),["mdat"]);if(0===r.length)return void s(new Error("Could not parse IMSC1 mdat"));const a=r.map((e=>ou(e))),o=function(e,t,i=1,s=!1){return Zm(e,t,1/i,s)}(t.baseTime,1,t.timescale);try{a.forEach((e=>i(function(e,t){const i=new DOMParser,s=i.parseFromString(e,"text/xml").getElementsByTagName("tt")[0];if(!s)throw new Error("Invalid ttml");const r={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},a=Object.keys(r).reduce(((e,t)=>(e[t]=s.getAttribute(`ttp:${t}`)||r[t],e)),{}),o="preserve"!==s.getAttribute("xml:space"),n=py(uy(s,"styling","style")),l=py(uy(s,"layout","region")),d=uy(s,"body","[begin]");return[].map.call(d,(e=>{const i=fy(e,o);if(!i||!e.hasAttribute("begin"))return null;const s=yy(e.getAttribute("begin"),a),r=yy(e.getAttribute("dur"),a);let d=yy(e.getAttribute("end"),a);if(null===s)throw gy(e);if(null===d){if(null===r)throw gy(e);d=s+r}const h=new Wg(s-t,d-t,i);h.id=ay(h.startTime,h.endTime,h.text);const c=function(e,t,i){const s="http://www.w3.org/ns/ttml#styling";let r=null;const a=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],o=null!=e&&e.hasAttribute("style")?e.getAttribute("style"):null;o&&i.hasOwnProperty(o)&&(r=i[o]);return a.reduce(((i,a)=>{const o=my(t,s,a)||my(e,s,a)||my(r,s,a);return o&&(i[a]=o),i}),{})}(l[e.getAttribute("region")],n[e.getAttribute("style")],n),{textAlign:u}=c;if(u){const e=hy[u];e&&(h.lineAlign=e),h.align=u}return ac(h,c),h})).filter((e=>null!==e))}(e,o))))}catch(e){s(e)}}function uy(e,t,i){const s=e.getElementsByTagName(t)[0];return s?[].slice.call(s.querySelectorAll(i)):[]}function py(e){return e.reduce(((e,t)=>{const i=t.getAttribute("xml:id");return i&&(e[i]=t),e}),{})}function fy(e,t){return[].slice.call(e.childNodes).reduce(((e,i,s)=>{var r;return"br"===i.nodeName&&s?e+"\n":null!=(r=i.childNodes)&&r.length?fy(i,t):t?e+i.textContent.trim().replace(/\s+/g," "):e+i.textContent}),"")}function my(e,t,i){return e&&e.hasAttributeNS(t,i)?e.getAttributeNS(t,i):null}function gy(e){return new Error(`Could not parse ttml timestamp ${e}`)}function yy(e,t){if(!e)return null;let i=qg(e);return null===i&&(ly.test(e)?i=function(e,t){const i=ly.exec(e),s=(0|i[4])+(0|i[5])/t.subFrameRate;return 3600*(0|i[1])+60*(0|i[2])+(0|i[3])+s/t.frameRate}(e,t):dy.test(e)&&(i=function(e,t){const i=dy.exec(e),s=Number(i[1]);switch(i[2]){case"h":return 3600*s;case"m":return 60*s;case"ms":return 1e3*s;case"f":return s/t.frameRate;case"t":return s/t.tickRate}return s}(e,t))),i}function Ay(e){return e.characteristics&&/transcribes-spoken-dialog/gi.test(e.characteristics)&&/describes-music-and-sound/gi.test(e.characteristics)?"captions":"subtitles"}function by(e,t){return!!e&&e.kind===Ay(t)&&vg(t,e)}class _y{constructor(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}setStreamController(e){this.streamController=e}destroy(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(dc.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(dc.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(dc.MANIFEST_PARSED,this.onManifestParsed,this),e.on(dc.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(dc.BUFFER_CODECS,this.onBufferCodecs,this),e.on(dc.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(dc.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(dc.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(dc.MANIFEST_PARSED,this.onManifestParsed,this),e.off(dc.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(dc.BUFFER_CODECS,this.onBufferCodecs,this),e.off(dc.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const i=this.hls.levels[t.droppedLevel];this.isLevelAllowed(i)&&this.restrictedLevels.push({bitrate:i.bitrate,height:i.height,width:i.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const i=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,i.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&oc(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping()}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0)return void(this.clientRect=null);const e=this.hls.levels;if(e.length){const t=this.hls,i=this.getMaxLevel(e.length-1);i!==this.autoLevelCapping&&gc.log(`Setting autoLevelCapping to ${i}: ${e[i].height}p@${e[i].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=i,t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const i=t.filter(((t,i)=>this.isLevelAllowed(t)&&i<=e));return this.clientRect=null,_y.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,t={width:0,height:0};if(e){const i=e.getBoundingClientRect();t.width=i.width,t.height=i.height,t.width||t.height||(t.width=i.right-i.left||e.width||0,t.height=i.bottom-i.top||e.height||0)}return this.clientRect=t,t}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(e){}return e}isLevelAllowed(e){return!this.restrictedLevels.some((t=>e.bitrate===t.bitrate&&e.width===t.width&&e.height===t.height))}static getMaxLevelByMediaSize(e,t,i){if(null==e||!e.length)return-1;let s=e.length-1;const r=Math.max(t,i);for(let t=0;t<e.length;t+=1){const i=e[t];if((i.width>=r||i.height>=r)&&(a=i,!(o=e[t+1])||a.width!==o.width||a.height!==o.height)){s=t;break}}var a,o;return s}}const vy="[eme]";class wy{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=wy.CDMCleanupPromise?[wy.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=gc.debug.bind(gc,vy),this.log=gc.log.bind(gc,vy),this.warn=gc.warn.bind(gc,vy),this.error=gc.error.bind(gc,vy),this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.unregisterListeners(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.onMediaEncrypted=this.onWaitingForKey=this.keyIdToKeySessionPromise=null,this.config=null}registerListeners(){this.hls.on(dc.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(dc.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(dc.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(dc.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(dc.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(dc.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:i}=this.config,s=t[e];if(s)return s.licenseUrl;if(e===Bc.WIDEVINE&&i)return i;throw new Error(`no license server URL configured for key-system "${e}"`)}getServerCertificateUrl(e){const{drmSystems:t}=this.config,i=t[e];if(i)return i.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,i=(e,t,i)=>!!e&&i.indexOf(e)===t,s=t.map((e=>e.audioCodec)).filter(i),r=t.map((e=>e.videoCodec)).filter(i);return s.length+r.length===0&&r.push("avc1.42e01e"),new Promise(((t,i)=>{const a=e=>{const o=e.shift();this.getMediaKeysPromise(o,s,r).then((e=>t({keySystem:o,mediaKeys:e}))).catch((t=>{e.length?a(e):i(t instanceof Sy?t:new Sy({type:hc.KEY_SYSTEM_ERROR,details:cc.KEY_SYSTEM_NO_ACCESS,error:t,fatal:!0},t.message))}))};a(e)}))}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:i}=this.config;if("function"!=typeof i){let e=`Configured requestMediaKeySystemAccess is not a function ${i}`;return null===$c&&"http:"===self.location.protocol&&(e=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(e))}return i(e,t)}getMediaKeysPromise(e,t,i){const s=function(e,t,i,s){let r;switch(e){case Bc.FAIRPLAY:r=["cenc","sinf"];break;case Bc.WIDEVINE:case Bc.PLAYREADY:r=["cenc"];break;case Bc.CLEARKEY:r=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${e}`)}return function(e,t,i,s){return[{initDataTypes:e,persistentState:s.persistentState||"optional",distinctiveIdentifier:s.distinctiveIdentifier||"optional",sessionTypes:s.sessionTypes||[s.sessionType||"temporary"],audioCapabilities:t.map((e=>({contentType:`audio/mp4; codecs="${e}"`,robustness:s.audioRobustness||"",encryptionScheme:s.audioEncryptionScheme||null}))),videoCapabilities:i.map((e=>({contentType:`video/mp4; codecs="${e}"`,robustness:s.videoRobustness||"",encryptionScheme:s.videoEncryptionScheme||null})))}]}(r,t,i,s)}(e,t,i,this.config.drmSystemOptions),r=this.keySystemAccessPromises[e];let a=null==r?void 0:r.keySystemAccess;if(!a){this.log(`Requesting encrypted media "${e}" key-system access with config: ${JSON.stringify(s)}`),a=this.requestMediaKeySystemAccess(e,s);const t=this.keySystemAccessPromises[e]={keySystemAccess:a};return a.catch((t=>{this.log(`Failed to obtain access to key-system "${e}": ${t}`)})),a.then((i=>{this.log(`Access for key-system "${i.keySystem}" obtained`);const s=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),t.mediaKeys=i.createMediaKeys().then((t=>(this.log(`Media-keys created for "${e}"`),s.then((i=>i?this.setMediaKeysServerCertificate(t,e,i):t))))),t.mediaKeys.catch((t=>{this.error(`Failed to create media-keys for "${e}"}: ${t}`)})),t.mediaKeys}))}return a.then((()=>r.mediaKeys))}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:i}){this.log(`Creating key-system session "${t}" keyId: ${du(e.keyId||[])}`);const s=i.createSession(),r={decryptdata:e,keySystem:t,mediaKeys:i,mediaKeysSession:s,keyStatus:"status-pending"};return this.mediaKeySessions.push(r),r}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const i=this.createMediaKeySessionContext(e),s=this.getKeyIdString(t),r="cenc";this.keyIdToKeySessionPromise[s]=this.generateRequestWithPreferredKeySession(i,r,t.pssh,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}getKeyIdString(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(null===e.keyId)throw new Error("keyId is null");return du(e.keyId)}updateKeySession(e,t){var i;const s=e.mediaKeysSession;return this.log(`Updating key-session "${s.sessionId}" for keyID ${du((null==(i=e.decryptdata)?void 0:i.keyId)||[])}\n } (data length: ${t?t.byteLength:t})`),s.update(t)}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){return new Promise(((t,i)=>{const s=zc(this.config),r=e.map(Nc).filter((e=>!!e&&-1!==s.indexOf(e)));return this.getKeySystemSelectionPromise(r).then((({keySystem:e})=>{const s=Gc(e);s?t(s):i(new Error(`Unable to find format for key-system "${e}"`))})).catch(i)}))}loadKey(e){const t=e.keyInfo.decryptdata,i=this.getKeyIdString(t),s=`(keyId: ${i} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${s}`);let r=this.keyIdToKeySessionPromise[i];return r||(r=this.keyIdToKeySessionPromise[i]=this.getKeySystemForKeyPromise(t).then((({keySystem:i,mediaKeys:r})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${s}`),this.attemptSetMediaKeys(i,r).then((()=>{this.throwIfDestroyed();const e=this.createMediaKeySessionContext({keySystem:i,mediaKeys:r,decryptdata:t});return this.generateRequestWithPreferredKeySession(e,"cenc",t.pssh,"playlist-key")}))))),r.catch((e=>this.handleError(e)))),r}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof Sy?this.hls.trigger(dc.ERROR,e.data):this.hls.trigger(dc.ERROR,{type:hc.KEY_SYSTEM_ERROR,details:cc.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),i=this.keyIdToKeySessionPromise[t];if(!i){const t=Nc(e.keyFormat),i=t?[t]:zc(this.config);return this.attemptKeySystemAccess(i)}return i}getKeySystemSelectionPromise(e){if(e.length||(e=zc(this.config)),0===e.length)throw new Sy({type:hc.KEY_SYSTEM_ERROR,details:cc.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${JSON.stringify({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}_onMediaEncrypted(e){const{initDataType:t,initData:i}=e;if(this.debug(`"${e.type}" event: init data type: "${t}"`),null===i)return;let s,r;if("sinf"===t&&this.config.drmSystems[Bc.FAIRPLAY]){const e=pu(new Uint8Array(i));try{const t=Dc(JSON.parse(e).sinf),i=ku(new Uint8Array(t));if(!i)return;s=i.subarray(8,24),r=Bc.FAIRPLAY}catch(e){return void this.warn('Failed to parse sinf "encrypted" event message initData')}}else{const e=function(e){if(!(e instanceof ArrayBuffer)||e.byteLength<32)return null;const t={version:0,systemId:"",kids:null,data:null},i=new DataView(e),s=i.getUint32(0);if(e.byteLength!==s&&s>44)return null;if(1886614376!==i.getUint32(4))return null;if(t.version=i.getUint32(8)>>>24,t.version>1)return null;t.systemId=du(new Uint8Array(e,12,16));const r=i.getUint32(28);if(0===t.version){if(s-32<r)return null;t.data=new Uint8Array(e,32,r)}else if(1===t.version){t.kids=[];for(let i=0;i<r;i++)t.kids.push(new Uint8Array(e,32+16*i,16))}return t}(i);if(null===e)return;0===e.version&&e.systemId===jc&&e.data&&(s=e.data.subarray(8,24)),r=function(e){if(e===jc)return Bc.WIDEVINE}(e.systemId)}if(!r||!s)return;const a=du(s),{keyIdToKeySessionPromise:o,mediaKeySessions:n}=this;let l=o[a];for(let e=0;e<n.length;e++){const r=n[e],d=r.decryptdata;if(d.pssh||!d.keyId)continue;const h=du(d.keyId);if(a===h||-1!==d.uri.replace(/-/g,"").indexOf(a)){l=o[h],delete o[h],d.pssh=new Uint8Array(i),d.keyId=s,l=o[a]=l.then((()=>this.generateRequestWithPreferredKeySession(r,t,i,"encrypted-event-key-match")));break}}l||(l=o[a]=this.getKeySystemSelectionPromise([r]).then((({keySystem:e,mediaKeys:r})=>{var o;this.throwIfDestroyed();const n=new Mu("ISO-23001-7",a,null!=(o=Gc(e))?o:"");return n.pssh=new Uint8Array(i),n.keyId=s,this.attemptSetMediaKeys(e,r).then((()=>{this.throwIfDestroyed();const s=this.createMediaKeySessionContext({decryptdata:n,keySystem:e,mediaKeys:r});return this.generateRequestWithPreferredKeySession(s,t,i,"encrypted-event-no-match")}))}))),l.catch((e=>this.handleError(e)))}_onWaitingForKey(e){this.log(`"${e.type}" event`)}attemptSetMediaKeys(e,t){const i=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const s=Promise.all(i).then((()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)}));return this.setMediaKeysQueue.push(s),s.then((()=>{this.log(`Media-keys set for "${e}"`),i.push(s),this.setMediaKeysQueue=this.setMediaKeysQueue.filter((e=>-1===i.indexOf(e)))}))}generateRequestWithPreferredKeySession(e,t,i,s){var r,a;const o=null==(r=this.config.drmSystems)||null==(a=r[e.keySystem])?void 0:a.generateRequest;if(o)try{const s=o.call(this.hls,t,i,e);if(!s)throw new Error("Invalid response from configured generateRequest filter");t=s.initDataType,i=e.decryptdata.pssh=s.initData?new Uint8Array(s.initData):null}catch(e){var n;if(this.warn(e.message),null!=(n=this.hls)&&n.config.debug)throw e}if(null===i)return this.log(`Skipping key-session request for "${s}" (no initData)`),Promise.resolve(e);const l=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${s}": ${l} (init data type: ${t} length: ${i?i.byteLength:null})`);const d=new yg,h=e._onmessage=t=>{const i=e.mediaKeysSession;if(!i)return void d.emit("error",new Error("invalid state"));const{messageType:s,message:r}=t;this.log(`"${s}" message event for session "${i.sessionId}" message size: ${r.byteLength}`),"license-request"===s||"license-renewal"===s?this.renewLicense(e,r).catch((e=>{this.handleError(e),d.emit("error",e)})):"license-release"===s?e.keySystem===Bc.FAIRPLAY&&(this.updateKeySession(e,Ic("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${s}"`)},c=e._onkeystatuseschange=t=>{if(!e.mediaKeysSession)return void d.emit("error",new Error("invalid state"));this.onKeyStatusChange(e);const i=e.keyStatus;d.emit("keyStatus",i),"expired"===i&&(this.warn(`${e.keySystem} expired for key ${l}`),this.renewKeySession(e))};e.mediaKeysSession.addEventListener("message",h),e.mediaKeysSession.addEventListener("keystatuseschange",c);const u=new Promise(((e,t)=>{d.on("error",t),d.on("keyStatus",(i=>{i.startsWith("usable")?e():"output-restricted"===i?t(new Sy({type:hc.KEY_SYSTEM_ERROR,details:cc.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):"internal-error"===i?t(new Sy({type:hc.KEY_SYSTEM_ERROR,details:cc.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${i}"`)):"expired"===i?t(new Error("key expired while generating request")):this.warn(`unhandled key status change "${i}"`)}))}));return e.mediaKeysSession.generateRequest(t,i).then((()=>{var t;this.log(`Request generated for key-session "${null==(t=e.mediaKeysSession)?void 0:t.sessionId}" keyId: ${l}`)})).catch((e=>{throw new Sy({type:hc.KEY_SYSTEM_ERROR,details:cc.KEY_SYSTEM_NO_SESSION,error:e,fatal:!1},`Error generating key-session request: ${e}`)})).then((()=>u)).catch((t=>{throw d.removeAllListeners(),this.removeSession(e),t})).then((()=>(d.removeAllListeners(),e)))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach(((t,i)=>{this.log(`key status change "${t}" for keyStatuses keyId: ${du("buffer"in i?new Uint8Array(i.buffer,i.byteOffset,i.byteLength):new Uint8Array(i))} session keyId: ${du(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=t}))}fetchServerCertificate(e){const t=this.config,i=new(0,t.loader)(t),s=this.getServerCertificateUrl(e);return s?(this.log(`Fetching server certificate for "${e}"`),new Promise(((r,a)=>{const o={responseType:"arraybuffer",url:s},n=t.certLoadPolicy.default,l={loadPolicy:n,timeout:n.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(e,t,i,s)=>{r(e.data)},onError:(t,i,r,n)=>{a(new Sy({type:hc.KEY_SYSTEM_ERROR,details:cc.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:r,response:ic({url:o.url,data:void 0},t)},`"${e}" certificate request failed (${s}). Status: ${t.code} (${t.text})`))},onTimeout:(t,i,r)=>{a(new Sy({type:hc.KEY_SYSTEM_ERROR,details:cc.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:r,response:{url:o.url,data:void 0}},`"${e}" certificate request timed out (${s})`))},onAbort:(e,t,i)=>{a(new Error("aborted"))}};i.load(o,l,d)}))):Promise.resolve()}setMediaKeysServerCertificate(e,t,i){return new Promise(((s,r)=>{e.setServerCertificate(i).then((r=>{this.log(`setServerCertificate ${r?"success":"not supported by CDM"} (${null==i?void 0:i.byteLength}) on "${t}"`),s(e)})).catch((e=>{r(new Sy({type:hc.KEY_SYSTEM_ERROR,details:cc.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:e,fatal:!0},e.message))}))}))}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then((t=>this.updateKeySession(e,new Uint8Array(t)).catch((e=>{throw new Sy({type:hc.KEY_SYSTEM_ERROR,details:cc.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:e,fatal:!0},e.message)}))))}unpackPlayReadyKeyMessage(e,t){const i=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!i.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const s=(new DOMParser).parseFromString(i,"application/xml"),r=s.querySelectorAll("HttpHeader");if(r.length>0){let t;for(let i=0,s=r.length;i<s;i++){var a,o;t=r[i];const s=null==(a=t.querySelector("name"))?void 0:a.textContent,n=null==(o=t.querySelector("value"))?void 0:o.textContent;s&&n&&e.setRequestHeader(s,n)}}const n=s.querySelector("Challenge"),l=null==n?void 0:n.textContent;if(!l)throw new Error("Cannot find <Challenge> in key message");return Ic(atob(l))}setupLicenseXHR(e,t,i,s){const r=this.config.licenseXhrSetup;return r?Promise.resolve().then((()=>{if(!i.decryptdata)throw new Error("Key removed");return r.call(this.hls,e,t,i,s)})).catch((a=>{if(!i.decryptdata)throw a;return e.open("POST",t,!0),r.call(this.hls,e,t,i,s)})).then((i=>{e.readyState||e.open("POST",t,!0);return{xhr:e,licenseChallenge:i||s}})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:s}))}requestLicense(e,t){const i=this.config.keyLoadPolicy.default;return new Promise(((s,r)=>{const a=this.getLicenseServerUrl(e.keySystem);this.log(`Sending license request to URL: ${a}`);const o=new XMLHttpRequest;o.responseType="arraybuffer",o.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return r(new Error("invalid state"));if(4===o.readyState)if(200===o.status){this._requestLicenseFailureCount=0;let t=o.response;this.log(`License received ${t instanceof ArrayBuffer?t.byteLength:t}`);const i=this.config.licenseResponseCallback;if(i)try{t=i.call(this.hls,o,a,e)}catch(e){this.error(e)}s(t)}else{const n=i.errorRetry,l=n?n.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>l||o.status>=400&&o.status<500)r(new Sy({type:hc.KEY_SYSTEM_ERROR,details:cc.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:o,response:{url:a,data:void 0,code:o.status,text:o.statusText}},`License Request XHR failed (${a}). Status: ${o.status} (${o.statusText})`));else{const i=l-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${i} attempts left`),this.requestLicense(e,t).then(s,r)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=o,this.setupLicenseXHR(o,a,e,t).then((({xhr:t,licenseChallenge:i})=>{e.keySystem==Bc.PLAYREADY&&(i=this.unpackPlayReadyKeyMessage(t,i)),t.send(i)}))}))}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const i=t.media;this.media=i,i.addEventListener("encrypted",this.onMediaEncrypted),i.addEventListener("waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media,t=this.mediaKeySessions;e&&(e.removeEventListener("encrypted",this.onMediaEncrypted),e.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},Mu.clearKeyUriToKeyIdMap();const i=t.length;wy.CDMCleanupPromise=Promise.all(t.map((e=>this.removeSession(e))).concat(null==e?void 0:e.setMediaKeys(null).catch((e=>{this.log(`Could not clear media keys: ${e}`)})))).then((()=>{i&&(this.log("finished closing key sessions and clearing media keys"),t.length=0)})).catch((e=>{this.log(`Could not close sessions and clear media keys: ${e}`)}))}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(t&&this.config.emeEnabled&&!this.keyFormatPromise){const e=t.reduce(((e,t)=>(-1===e.indexOf(t.keyFormat)&&e.push(t.keyFormat),e)),[]);this.log(`Selecting key-system from session-keys ${e.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(e)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:i}=e;if(t){this.log(`Remove licenses and keys and close session ${t.sessionId}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),i&&i.readyState!==XMLHttpRequest.DONE&&i.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const s=this.mediaKeySessions.indexOf(e);return s>-1&&this.mediaKeySessions.splice(s,1),t.remove().catch((e=>{this.log(`Could not remove session: ${e}`)})).then((()=>t.close())).catch((e=>{this.log(`Could not close session: ${e}`)}))}}}wy.CDMCleanupPromise=void 0;class Sy extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}var Ty,Ey,ky;!function(e){e.MANIFEST="m",e.AUDIO="a",e.VIDEO="v",e.MUXED="av",e.INIT="i",e.CAPTION="c",e.TIMED_TEXT="tt",e.KEY="k",e.OTHER="o"}(Ty||(Ty={})),function(e){e.DASH="d",e.HLS="h",e.SMOOTH="s",e.OTHER="o"}(Ey||(Ey={})),function(e){e.OBJECT="CMCD-Object",e.REQUEST="CMCD-Request",e.SESSION="CMCD-Session",e.STATUS="CMCD-Status"}(ky||(ky={}));const Cy={[ky.OBJECT]:["br","d","ot","tb"],[ky.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[ky.SESSION]:["cid","pr","sf","sid","st","v"],[ky.STATUS]:["bs","rtp"]};class xy{constructor(e,t){this.value=void 0,this.params=void 0,Array.isArray(e)&&(e=e.map((e=>e instanceof xy?e:new xy(e)))),this.value=e,this.params=t}}class Ry{constructor(e){this.description=void 0,this.description=e}}function Dy(e,t,i,s){return new Error(`failed to ${e} "${r=t,Array.isArray(r)?JSON.stringify(r):r instanceof Map?"Map{}":r instanceof Set?"Set{}":"object"==typeof r?JSON.stringify(r):String(r)}" as ${i}`,{cause:s});var r}const Ly="Bare Item";const Iy=/[\x00-\x1f\x7f]+/;function Py(e,t,i){return Dy("serialize",e,t,i)}function By(e){if(!1===ArrayBuffer.isView(e))throw Py(e,"Byte Sequence");return`:${t=e,btoa(String.fromCharCode(...t))}:`;var t}function My(e){if(function(e){return e<-999999999999999||999999999999999<e}(e))throw Py(e,"Integer");return e.toString()}function Uy(e,t){if(e<0)return-Uy(-e,t);const i=Math.pow(10,t);if(Math.abs(e*i%1-.5)<Number.EPSILON){const t=Math.floor(e*i);return(t%2==0?t:t+1)/i}return Math.round(e*i)/i}function Fy(e){const t=Uy(e,3);if(Math.floor(Math.abs(t)).toString().length>12)throw Py(e,"Decimal");const i=t.toString();return i.includes(".")?i:`${i}.0`}function Oy(e){const t=(i=e).description||i.toString().slice(7,-1);var i;if(!1===/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(t))throw Py(t,"Token");return t}function Ny(e){switch(typeof e){case"number":if(!oc(e))throw Py(e,Ly);return Number.isInteger(e)?My(e):Fy(e);case"string":return function(e){if(Iy.test(e))throw Py(e,"String");return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}(e);case"symbol":return Oy(e);case"boolean":return function(e){if("boolean"!=typeof e)throw Py(e,"Boolean");return e?"?1":"?0"}(e);case"object":if(e instanceof Date)return function(e){return`@${My(e.getTime()/1e3)}`}(e);if(e instanceof Uint8Array)return By(e);if(e instanceof Ry)return Oy(e);default:throw Py(e,Ly)}}function jy(e){if(!1===/^[a-z*][a-z0-9\-_.*]*$/.test(e))throw Py(e,"Key");return e}function Gy(e){return null==e?"":Object.entries(e).map((([e,t])=>!0===t?`;${jy(e)}`:`;${jy(e)}=${Ny(t)}`)).join("")}function zy(e){return e instanceof xy?`${Ny(e.value)}${Gy(e.params)}`:Ny(e)}function $y(e,t={whitespace:!0}){if("object"!=typeof e)throw Py(e,"Dict");const i=e instanceof Map?e.entries():Object.entries(e),s=null!=t&&t.whitespace?" ":"";return Array.from(i).map((([e,t])=>{t instanceof xy==!1&&(t=new xy(t));let i=jy(e);var s;return!0===t.value?i+=Gy(t.params):(i+="=",Array.isArray(t.value)?i+=`(${(s=t).value.map(zy).join(" ")})${Gy(s.params)}`:i+=zy(t)),i})).join(`,${s}`)}const Hy=e=>Math.round(e),Vy=e=>100*Hy(e/100),Wy={br:Hy,d:Hy,bl:Vy,dl:Vy,mtp:Vy,nor:(e,t)=>(null!=t&&t.baseUrl&&(e=function(e,t){const i=new URL(e),s=new URL(t);if(i.origin!==s.origin)return e;const r=i.pathname.split("/").slice(1),a=s.pathname.split("/").slice(1,-1);for(;r[0]===a[0];)r.shift(),a.shift();for(;a.length;)a.shift(),r.unshift("..");return r.join("/")}(e,t.baseUrl)),encodeURIComponent(e)),rtp:Vy,tb:Hy};function Jy(e,t){const i={};if(null==e||"object"!=typeof e)return i;const s=Object.keys(e).sort(),r=ac({},Wy,null==t?void 0:t.formatters),a=null==t?void 0:t.filter;return s.forEach((s=>{if(null!=a&&a(s))return;let o=e[s];const n=r[s];n&&(o=n(o,t)),"v"===s&&1===o||"pr"==s&&1===o||(e=>"number"==typeof e?oc(e):null!=e&&""!==e&&!1!==e)(o)&&((e=>"ot"===e||"sf"===e||"st"===e)(s)&&"string"==typeof o&&(o=new Ry(o)),i[s]=o)})),i}function qy(e,t={}){return e?function(e,t){return $y(e,t)}(Jy(e,t),ac({whitespace:!1},t)):""}function Ky(e,t,i){return ac(e,function(e,t={}){if(!e)return{};const i=Object.entries(e),s=Object.entries(Cy).concat(Object.entries((null==t?void 0:t.customHeaderMap)||{})),r=i.reduce(((e,t)=>{var i;const[r,a]=t,o=(null==(i=s.find((e=>e[1].includes(r))))?void 0:i[0])||ky.REQUEST;return null!=e[o]||(e[o]={}),e[o][r]=a,e}),{});return Object.entries(r).reduce(((e,[i,s])=>(e[i]=qy(s,t),e)),{})}(t,i))}const Yy=/CMCD=[^&#]+/;function Qy(e,t,i){const s=function(e,t={}){if(!e)return"";const i=qy(e,t);return`CMCD=${encodeURIComponent(i)}`}(t,i);if(!s)return e;if(Yy.test(e))return e.replace(Yy,s);const r=e.includes("?")?"&":"?";return`${e}${r}${s}`}function Xy(e,t,i,s){e&&Object.keys(t).forEach((r=>{const a=e.filter((e=>e.groupId===r)).map((e=>{const a=ac({},e);return a.details=void 0,a.attrs=new bc(a.attrs),a.url=a.attrs.URI=Zy(e.url,e.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",i),a.groupId=a.attrs["GROUP-ID"]=t[r],a.attrs["PATHWAY-ID"]=s,a}));e.push(...a)}))}function Zy(e,t,i,s){const{HOST:r,PARAMS:a,[i]:o}=s;let n;t&&(n=null==o?void 0:o[t],n&&(e=n));const l=new self.URL(e);return r&&!n&&(l.host=r),a&&Object.keys(a).sort().forEach((e=>{e&&l.searchParams.set(e,a[e])})),l.href}const eA=/^age:\s*[\d.]+\s*$/im;class tA{constructor(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new wc,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null,this.stats=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,i){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=i,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const i=this.loader=new self.XMLHttpRequest,s=this.stats;s.loading.first=0,s.loaded=0,s.aborted=!1;const r=this.xhrSetup;r?Promise.resolve().then((()=>{if(!this.stats.aborted)return r(i,t.url)})).catch((e=>(i.open("GET",t.url,!0),r(i,t.url)))).then((()=>{this.stats.aborted||this.openAndSendXhr(i,t,e)})).catch((e=>{this.callbacks.onError({code:i.status,text:e.message},t,i,s)})):this.openAndSendXhr(i,t,e)}openAndSendXhr(e,t,i){e.readyState||e.open("GET",t.url,!0);const s=t.headers,{maxTimeToFirstByteMs:r,maxLoadTimeMs:a}=i.loadPolicy;if(s)for(const t in s)e.setRequestHeader(t,s[t]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),i.timeout=r&&oc(r)?r:a,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:i}=this;if(!e||!t)return;const s=t.readyState,r=this.config;if(!i.aborted&&s>=2&&(0===i.loading.first&&(i.loading.first=Math.max(self.performance.now(),i.loading.start),r.timeout!==r.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),r.timeout=r.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.loadPolicy.maxLoadTimeMs-(i.loading.first-i.loading.start)))),4===s)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const s=t.status,a="text"!==t.responseType;if(s>=200&&s<300&&(a&&t.response||null!==t.responseText)){i.loading.end=Math.max(self.performance.now(),i.loading.first);const r=a?t.response:t.responseText,o="arraybuffer"===t.responseType?r.byteLength:r.length;if(i.loaded=i.total=o,i.bwEstimate=8e3*i.total/(i.loading.end-i.loading.first),!this.callbacks)return;const n=this.callbacks.onProgress;if(n&&n(i,e,r,t),!this.callbacks)return;const l={url:t.responseURL,data:r,code:s};this.callbacks.onSuccess(l,i,e,t)}else{const a=r.loadPolicy.errorRetry;sf(a,i.retry,!1,{url:e.url,data:void 0,code:s})?this.retry(a):(gc.error(`${s} while loading ${e.url}`),this.callbacks.onError({code:s,text:t.statusText},e,t,i))}}}loadtimeout(){var e;const t=null==(e=this.config)?void 0:e.loadPolicy.timeoutRetry;if(sf(t,this.stats.retry,!0))this.retry(t);else{var i;gc.warn(`timeout while loading ${null==(i=this.context)?void 0:i.url}`);const e=this.callbacks;e&&(this.abortInternal(),e.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:i}=this;this.retryDelay=ef(e,i.retry),i.retry++,gc.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${null==t?void 0:t.url}, retrying ${i.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&eA.test(this.loader.getAllResponseHeaders())){const t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}const iA=/(\d+)-(\d+)\/(\d+)/;class sA{constructor(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=null,this.response=null,this.controller=void 0,this.context=null,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||rA,this.controller=new self.AbortController,this.stats=new wc}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,i){const s=this.stats;if(s.loading.start)throw new Error("Loader can only be used once.");s.loading.start=self.performance.now();const r=function(e,t){const i={method:"GET",mode:"cors",credentials:"same-origin",signal:t,headers:new self.Headers(ac({},e.headers))};e.rangeEnd&&i.headers.set("Range","bytes="+e.rangeStart+"-"+String(e.rangeEnd-1));return i}(e,this.controller.signal),a=i.onProgress,o="arraybuffer"===e.responseType,n=o?"byteLength":"length",{maxTimeToFirstByteMs:l,maxLoadTimeMs:d}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=i,this.request=this.fetchSetup(e,r),self.clearTimeout(this.requestTimeout),t.timeout=l&&oc(l)?l:d,this.requestTimeout=self.setTimeout((()=>{this.abortInternal(),i.onTimeout(s,e,this.response)}),t.timeout),self.fetch(this.request).then((r=>{this.response=this.loader=r;const n=Math.max(self.performance.now(),s.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=d,this.requestTimeout=self.setTimeout((()=>{this.abortInternal(),i.onTimeout(s,e,this.response)}),d-(n-s.loading.start)),!r.ok){const{status:e,statusText:t}=r;throw new aA(t||"fetch, bad network response",e,r)}return s.loading.first=n,s.total=function(e){const t=e.get("Content-Range");if(t){const e=function(e){const t=iA.exec(e);if(t)return parseInt(t[2])-parseInt(t[1])+1}(t);if(oc(e))return e}const i=e.get("Content-Length");if(i)return parseInt(i)}(r.headers)||s.total,a&&oc(t.highWaterMark)?this.loadProgressively(r,s,e,t.highWaterMark,a):o?r.arrayBuffer():"json"===e.responseType?r.json():r.text()})).then((r=>{const o=this.response;if(!o)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),s.loading.end=Math.max(self.performance.now(),s.loading.first);const l=r[n];l&&(s.loaded=s.total=l);const d={url:o.url,data:r,code:o.status};a&&!oc(t.highWaterMark)&&a(s,e,r,o),i.onSuccess(d,s,e,o)})).catch((t=>{if(self.clearTimeout(this.requestTimeout),s.aborted)return;const r=t&&t.code||0,a=t?t.message:null;i.onError({code:r,text:a},e,t?t.details:null,s)}))}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,i,s=0,r){const a=new pm,o=e.body.getReader(),n=()=>o.read().then((o=>{if(o.done)return a.dataLength&&r(t,i,a.flush(),e),Promise.resolve(new ArrayBuffer(0));const l=o.value,d=l.length;return t.loaded+=d,d<s||a.dataLength?(a.push(l),a.dataLength>=s&&r(t,i,a.flush(),e)):r(t,i,l,e),n()})).catch((()=>Promise.reject()));return n()}}function rA(e,t){return new self.Request(e.url,t)}class aA extends Error{constructor(e,t,i){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=i}}const oA=/\s/,nA={newCue(e,t,i,s){const r=[];let a,o,n,l,d;const h=self.VTTCue||self.TextTrackCue;for(let u=0;u<s.rows.length;u++)if(a=s.rows[u],n=!0,l=0,d="",!a.isEmpty()){var c;for(let e=0;e<a.chars.length;e++)oA.test(a.chars[e].uchar)&&n?l++:(d+=a.chars[e].uchar,n=!1);a.cueStartTime=t,t===i&&(i+=1e-4),l>=16?l--:l++;const s=ey(d.trim()),p=ay(t,i,s);null!=e&&null!=(c=e.cues)&&c.getCueById(p)||(o=new h(t,i,s),o.id=p,o.line=u+1,o.align="left",o.position=10+Math.min(80,10*Math.floor(8*l/32)),r.push(o))}return e&&r.length&&(r.sort(((e,t)=>"auto"===e.line||"auto"===t.line?0:e.line>8&&t.line>8?t.line-e.line:e.line-t.line)),r.forEach((t=>Sp(e,t)))),r}},lA=ic(ic({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,maxBufferSize:6e7,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:tA,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:class{constructor(e){this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this._abandonRulesCheck=()=>{const{fragCurrent:e,partCurrent:t,hls:i}=this,{autoLevelEnabled:s,media:r}=i;if(!e||!r)return;const a=performance.now(),o=t?t.stats:e.stats,n=t?t.duration:e.duration,l=a-o.loading.start,d=i.minAutoLevel;if(o.aborted||o.loaded&&o.loaded===o.total||e.level<=d)return this.clearTimer(),void(this._nextAutoLevel=-1);if(!s||r.paused||!r.playbackRate||!r.readyState)return;const h=i.mainForwardBufferInfo;if(null===h)return;const c=this.bwEstimator.getEstimateTTFB(),u=Math.abs(r.playbackRate);if(l<=Math.max(c,n/(2*u)*1e3))return;const p=h.len/u,f=o.loading.first?o.loading.first-o.loading.start:-1,m=o.loaded&&f>-1,g=this.getBwEstimate(),y=i.levels,A=y[e.level],b=o.total||Math.max(o.loaded,Math.round(n*A.averageBitrate/8));let _=m?l-f:l;_<1&&m&&(_=Math.min(l,8*o.loaded/g));const v=m?1e3*o.loaded/_:0,w=v?(b-o.loaded)/v:8*b/g+c/1e3;if(w<=p)return;const S=v?8*v:g;let T,E=Number.POSITIVE_INFINITY;for(T=e.level-1;T>d;T--){const e=y[T].maxBitrate;if(E=this.getTimeToLoadFrag(c/1e3,S,n*e,!y[T].details),E<p)break}if(E>=w)return;if(E>10*n)return;i.nextLoadLevel=i.nextAutoLevel=T,m?this.bwEstimator.sample(l-Math.min(c,f),o.loaded):this.bwEstimator.sampleTTFB(l);const k=y[T].maxBitrate;this.getBwEstimate()*this.hls.config.abrBandWidthUpFactor>k&&this.resetEstimator(k),this.clearTimer(),gc.warn(`[abr] Fragment ${e.sn}${t?" part "+t.index:""} of level ${e.level} is loading too slowly;\n Time to underbuffer: ${p.toFixed(3)} s\n Estimated load time for current fragment: ${w.toFixed(3)} s\n Estimated load time for down switch fragment: ${E.toFixed(3)} s\n TTFB estimate: ${0|f} ms\n Current BW estimate: ${oc(g)?0|g:"Unknown"} bps\n New BW estimate: ${0|this.getBwEstimate()} bps\n Switching to level ${T} @ ${0|k} bps`),i.trigger(dc.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:o})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(gc.log(`setting initial bwe to ${e}`),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()}initEstimator(){const e=this.hls.config;return new yf(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.FRAG_LOADING,this.onFragLoading,this),e.on(dc.FRAG_LOADED,this.onFragLoaded,this),e.on(dc.FRAG_BUFFERED,this.onFragBuffered,this),e.on(dc.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(dc.LEVEL_LOADED,this.onLevelLoaded,this),e.on(dc.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(dc.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(dc.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.FRAG_LOADING,this.onFragLoading,this),e.off(dc.FRAG_LOADED,this.onFragLoaded,this),e.off(dc.FRAG_BUFFERED,this.onFragBuffered,this),e.off(dc.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(dc.LEVEL_LOADED,this.onLevelLoaded,this),e.off(dc.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(dc.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(dc.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(e,t){const i=t.frag;if(!this.ignoreFragment(i)){var s;if(!i.bitrateTest)this.fragCurrent=i,this.partCurrent=null!=(s=t.part)?s:null;this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}onLevelSwitching(e,t){this.clearTimer()}onError(e,t){if(!t.fatal)switch(t.details){case cc.BUFFER_ADD_CODEC_ERROR:case cc.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case cc.FRAG_LOAD_TIMEOUT:{const e=t.frag,{fragCurrent:i,partCurrent:s}=this;if(e&&i&&e.sn===i.sn&&e.level===i.level){const t=performance.now(),i=s?s.stats:e.stats,r=t-i.loading.start,a=i.loading.first?i.loading.first-i.loading.start:-1;if(i.loaded&&a>-1){const e=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(r-Math.min(e,a),i.loaded)}else this.bwEstimator.sampleTTFB(r)}break}}}getTimeToLoadFrag(e,t,i,s){return e+i/t+(s?this.lastLevelLoadSec:0)}onLevelLoaded(e,t){const i=this.hls.config,{loading:s}=t.stats,r=s.end-s.start;oc(r)&&(this.lastLevelLoadSec=r/1e3),t.details.live?this.bwEstimator.update(i.abrEwmaSlowLive,i.abrEwmaFastLive):this.bwEstimator.update(i.abrEwmaSlowVoD,i.abrEwmaFastVoD)}onFragLoaded(e,{frag:t,part:i}){const s=i?i.stats:t.stats;if(t.type===gp&&this.bwEstimator.sampleTTFB(s.loading.first-s.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const e=i?i.duration:t.duration,r=this.hls.levels[t.level],a=(r.loaded?r.loaded.bytes:0)+s.loaded,o=(r.loaded?r.loaded.duration:0)+e;r.loaded={bytes:a,duration:o},r.realBitrate=Math.round(8*a/o)}if(t.bitrateTest){const e={stats:s,frag:t,part:i,id:t.type};this.onFragBuffered(dc.FRAG_BUFFERED,e),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:i,part:s}=t,r=null!=s&&s.stats.loaded?s.stats:i.stats;if(r.aborted)return;if(this.ignoreFragment(i))return;const a=r.parsing.end-r.loading.start-Math.min(r.loading.first-r.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(a,r.loaded),r.bwEstimate=this.getBwEstimate(),i.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==gp||"initSegment"===e.sn}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:t}=this.hls,i=this.getBwEstimate(),s=this.hls.config.maxStarvationDelay,r=this.findBestLevel(i,t,e,0,s,1,1);if(r>-1)return r;const a=this.hls.firstLevel,o=Math.min(Math.max(a,t),e);return gc.warn(`[abr] Could not find best starting auto level. Defaulting to first in playlist ${a} clamped to ${o}`),o}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,t=this.bwEstimator.canEstimate(),i=this.lastLoadedFragLevel>-1;if(!(-1===e||t&&i&&this.nextAutoLevelKey!==this.getAutoLevelKey()))return e;const s=t&&i?this.getNextABRAutoLevel():this.firstAutoLevel;if(-1!==e){const t=this.hls.levels;if(t.length>Math.max(e,s)&&t[e].loadError<=t[s].loadError)return e}return this._nextAutoLevel=s,this.nextAutoLevelKey=this.getAutoLevelKey(),s}getAutoLevelKey(){return`${this.getBwEstimate()}_${this.getStarvationDelay().toFixed(2)}`}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:i}=this,{maxAutoLevel:s,config:r,minAutoLevel:a}=i,o=t?t.duration:e?e.duration:0,n=this.getBwEstimate(),l=this.getStarvationDelay();let d=r.abrBandWidthFactor,h=r.abrBandWidthUpFactor;if(l){const e=this.findBestLevel(n,a,s,l,0,d,h);if(e>=0)return e}let c=o?Math.min(o,r.maxStarvationDelay):r.maxStarvationDelay;if(!l){const e=this.bitrateTestDelay;if(e){c=(o?Math.min(o,r.maxLoadingDelay):r.maxLoadingDelay)-e,gc.info(`[abr] bitrate test took ${Math.round(1e3*e)}ms, set first fragment max fetchDuration to ${Math.round(1e3*c)} ms`),d=h=1}}const u=this.findBestLevel(n,a,s,l,c,d,h);if(gc.info(`[abr] ${l?"rebuffering expected":"buffer is empty"}, optimal quality level ${u}`),u>-1)return u;const p=i.levels[a],f=i.levels[i.loadLevel];return(null==p?void 0:p.bitrate)<(null==f?void 0:f.bitrate)?a:i.loadLevel}getStarvationDelay(){const e=this.hls,t=e.media;if(!t)return 1/0;const i=t&&0!==t.playbackRate?Math.abs(t.playbackRate):1,s=e.mainForwardBufferInfo;return(s?s.len:0)/i}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,t,i,s,r,a,o){var n;const l=s+r,d=this.lastLoadedFragLevel,h=-1===d?this.hls.firstLevel:d,{fragCurrent:c,partCurrent:u}=this,{levels:p,allAudioTracks:f,loadLevel:m,config:g}=this.hls;if(1===p.length)return 0;const y=p[h],A=!(null==y||null==(n=y.details)||!n.live),b=-1===m||-1===d;let _,v="SDR",w=(null==y?void 0:y.frameRate)||0;const{audioPreference:S,videoPreference:T}=g,E=this.audioTracksByGroup||(this.audioTracksByGroup=function(e){return e.reduce(((e,t)=>{let i=e.groups[t.groupId];i||(i=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),i.tracks.push(t);const s=t.channels||"2";return i.channels[s]=(i.channels[s]||0)+1,i.hasDefault=i.hasDefault||t.default,i.hasAutoSelect=i.hasAutoSelect||t.autoselect,i.hasDefault&&(e.hasDefaultAudio=!0),i.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e}),{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}(f));if(b){if(-1!==this.firstSelection)return this.firstSelection;const s=this.codecTiers||(this.codecTiers=function(e,t,i,s){return e.slice(i,s+1).reduce(((e,i)=>{if(!i.codecSet)return e;const s=i.audioGroups;let r=e[i.codecSet];r||(e[i.codecSet]=r={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!s,fragmentError:0}),r.minBitrate=Math.min(r.minBitrate,i.bitrate);const a=Math.min(i.height,i.width);return r.minHeight=Math.min(r.minHeight,a),r.minFramerate=Math.min(r.minFramerate,i.frameRate),r.maxScore=Math.max(r.maxScore,i.score),r.fragmentError+=i.fragmentError,r.videoRanges[i.videoRange]=(r.videoRanges[i.videoRange]||0)+1,s&&s.forEach((e=>{if(!e)return;const i=t.groups[e];r.hasDefaultAudio=r.hasDefaultAudio||t.hasDefaultAudio?i.hasDefault:i.hasAutoSelect||!t.hasDefaultAudio&&!t.hasAutoSelectAudio,Object.keys(i.channels).forEach((e=>{r.channels[e]=(r.channels[e]||0)+i.channels[e]}))})),e}),{})}(p,E,t,i)),r=function(e,t,i,s,r){const a=Object.keys(e),o=null==s?void 0:s.channels,n=null==s?void 0:s.audioCodec,l=o&&2===parseInt(o);let d=!0,h=!1,c=1/0,u=1/0,p=1/0,f=0,m=[];const{preferHDR:g,allowedVideoRanges:y}=wf(t,r);for(let t=a.length;t--;){const i=e[a[t]];d=i.channels[2]>0,c=Math.min(c,i.minHeight),u=Math.min(u,i.minFramerate),p=Math.min(p,i.minBitrate);const s=y.filter((e=>i.videoRanges[e]>0));s.length>0&&(h=!0,m=s)}c=oc(c)?c:0,u=oc(u)?u:0;const A=Math.max(1080,c),b=Math.max(30,u);p=oc(p)?p:i,i=Math.max(p,i),h||(t=void 0,m=[]);const _=a.reduce(((t,s)=>{const r=e[s];if(s===t)return t;if(r.minBitrate>i)return Sf(s,`min bitrate of ${r.minBitrate} > current estimate of ${i}`),t;if(!r.hasDefaultAudio)return Sf(s,"no renditions with default or auto-select sound found"),t;if(n&&s.indexOf(n.substring(0,4))%5!=0)return Sf(s,`audio codec preference "${n}" not found`),t;if(o&&!l){if(!r.channels[o])return Sf(s,`no renditions with ${o} channel sound found (channels options: ${Object.keys(r.channels)})`),t}else if((!n||l)&&d&&0===r.channels[2])return Sf(s,"no renditions with stereo sound found"),t;return r.minHeight>A?(Sf(s,`min resolution of ${r.minHeight} > maximum of ${A}`),t):r.minFramerate>b?(Sf(s,`min framerate of ${r.minFramerate} > maximum of ${b}`),t):m.some((e=>r.videoRanges[e]>0))?r.maxScore<f?(Sf(s,`max score of ${r.maxScore} < selected max of ${f}`),t):t&&(qu(s)>=qu(t)||r.fragmentError>e[t].fragmentError)?t:(f=r.maxScore,s):(Sf(s,`no variants with VIDEO-RANGE of ${JSON.stringify(m)} found`),t)}),void 0);return{codecSet:_,videoRanges:m,preferHDR:g,minFramerate:u,minBitrate:p}}(s,v,e,S,T),{codecSet:a,videoRanges:o,minFramerate:n,minBitrate:l,preferHDR:d}=r;_=a,v=d?o[o.length-1]:o[0],w=n,e=Math.max(e,l),gc.log(`[abr] picked start tier ${JSON.stringify(r)}`)}else _=null==y?void 0:y.codecSet,v=null==y?void 0:y.videoRange;const k=u?u.duration:c?c.duration:0,C=this.bwEstimator.getEstimateTTFB()/1e3,x=[];for(let n=i;n>=t;n--){var R;const t=p[n],c=n>h;if(!t)continue;if(g.useMediaCapabilities&&!t.supportedResult&&!t.supportedPromise){const i=navigator.mediaCapabilities;"function"==typeof(null==i?void 0:i.decodingInfo)&&_f(t,E,v,w,e,S)?(t.supportedPromise=vf(t,E,i),t.supportedPromise.then((e=>{if(!this.hls)return;t.supportedResult=e;const i=this.hls.levels,s=i.indexOf(t);e.error?gc.warn(`[abr] MediaCapabilities decodingInfo error: "${e.error}" for level ${s} ${JSON.stringify(e)}`):e.supported||(gc.warn(`[abr] Unsupported MediaCapabilities decodingInfo result for level ${s} ${JSON.stringify(e)}`),s>-1&&i.length>1&&(gc.log(`[abr] Removing unsupported level ${s}`),this.hls.removeLevel(s)))}))):t.supportedResult=Af}if(_&&t.codecSet!==_||v&&t.videoRange!==v||c&&w>t.frameRate||!c&&w>0&&w<t.frameRate||t.supportedResult&&(null==(R=t.supportedResult.decodingInfoResults)||!R[0].smooth)){x.push(n);continue}const f=t.details,T=(u?null==f?void 0:f.partTarget:null==f?void 0:f.averagetargetduration)||k;let D;D=c?o*e:a*e;const L=k&&s>=2*k&&0===r?p[n].averageBitrate:p[n].maxBitrate,I=this.getTimeToLoadFrag(C,D,L*T,void 0===f);if(D>=L&&(n===d||0===t.loadError&&0===t.fragmentError)&&(I<=C||!oc(I)||A&&!this.bitrateTestDelay||I<l)){const e=this.forcedAutoLevel;return n===m||-1!==e&&e===m||(x.length&&gc.trace(`[abr] Skipped level(s) ${x.join(",")} of ${i} max with CODECS and VIDEO-RANGE:"${p[x[0]].codecs}" ${p[x[0]].videoRange}; not compatible with "${y.codecs}" ${v}`),gc.info(`[abr] switch candidate:${h}->${n} adjustedbw(${Math.round(D)})-bitrate=${Math.round(D-L)} ttfb:${C.toFixed(1)} avgDuration:${T.toFixed(1)} maxFetchDuration:${l.toFixed(1)} fetchDuration:${I.toFixed(1)} firstSelection:${b} codecSet:${_} videoRange:${v} hls.loadLevel:${m}`)),b&&(this.firstSelection=n),n}}return-1}set nextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:i}=this.hls,s=Math.min(Math.max(e,i),t);this._nextAutoLevel!==s&&(this.nextAutoLevelKey="",this._nextAutoLevel=s)}},bufferController:class{constructor(e){this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.appendSource=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this.log=void 0,this.warn=void 0,this.error=void 0,this._onEndStreaming=e=>{this.hls&&this.hls.pauseBuffering()},this._onStartStreaming=e=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=()=>{const{media:e,mediaSource:t}=this;this.log("Media source opened"),e&&(e.removeEventListener("emptied",this._onMediaEmptied),this.updateMediaElementDuration(),this.hls.trigger(dc.MEDIA_ATTACHED,{media:e,mediaSource:t})),t&&t.removeEventListener("sourceopen",this._onMediaSourceOpen),this.checkPendingTracks()},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:e,_objectUrl:t}=this;e!==t&&gc.error(`Media element src was set while attaching MediaSource (${t} > ${e})`)},this.hls=e;const t="[buffer-controller]";this.appendSource=e.config.preferManagedMediaSource&&"undefined"!=typeof self&&self.ManagedMediaSource,this.log=gc.log.bind(gc,t),this.warn=gc.warn.bind(gc,t),this.error=gc.error.bind(gc,t),this._initSourceBuffer(),this.registerListeners()}hasSourceTypes(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null,this.hls=null}registerListeners(){const{hls:e}=this;e.on(dc.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.MANIFEST_PARSED,this.onManifestParsed,this),e.on(dc.BUFFER_RESET,this.onBufferReset,this),e.on(dc.BUFFER_APPENDING,this.onBufferAppending,this),e.on(dc.BUFFER_CODECS,this.onBufferCodecs,this),e.on(dc.BUFFER_EOS,this.onBufferEos,this),e.on(dc.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(dc.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(dc.FRAG_PARSED,this.onFragParsed,this),e.on(dc.FRAG_CHANGED,this.onFragChanged,this)}unregisterListeners(){const{hls:e}=this;e.off(dc.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.MANIFEST_PARSED,this.onManifestParsed,this),e.off(dc.BUFFER_RESET,this.onBufferReset,this),e.off(dc.BUFFER_APPENDING,this.onBufferAppending,this),e.off(dc.BUFFER_CODECS,this.onBufferCodecs,this),e.off(dc.BUFFER_EOS,this.onBufferEos,this),e.off(dc.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(dc.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(dc.FRAG_PARSED,this.onFragParsed,this),e.off(dc.FRAG_CHANGED,this.onFragChanged,this)}_initSourceBuffer(){this.sourceBuffer={},this.operationQueue=new Sg(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.appendErrors={audio:0,video:0,audiovideo:0},this.lastMpegAudioChunk=null}onManifestLoading(){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){let i=2;(t.audio&&!t.video||!t.altAudio)&&(i=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=i,this.log(`${this.bufferCodecEventsExpected} bufferCodec event(s) expected`)}onMediaAttaching(e,t){const i=this.media=t.media,s=zu(this.appendSource);if(i&&s){var r;const e=this.mediaSource=new s;this.log(`created media source: ${null==(r=e.constructor)?void 0:r.name}`),e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.addEventListener("startstreaming",this._onStartStreaming),e.addEventListener("endstreaming",this._onEndStreaming));const t=this._objectUrl=self.URL.createObjectURL(e);if(this.appendSource)try{i.removeAttribute("src");const s=self.ManagedMediaSource;i.disableRemotePlayback=i.disableRemotePlayback||s&&e instanceof s,Eg(i),function(e,t){const i=self.document.createElement("source");i.type="video/mp4",i.src=t,e.appendChild(i)}(i,t),i.load()}catch(e){i.src=t}else i.src=t;i.addEventListener("emptied",this._onMediaEmptied)}}onMediaDetaching(){const{media:e,mediaSource:t,_objectUrl:i}=this;if(t){if(this.log("media source detaching"),"open"===t.readyState)try{t.endOfStream()}catch(e){this.warn(`onMediaDetaching: ${e.message} while calling endOfStream`)}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(t.removeEventListener("startstreaming",this._onStartStreaming),t.removeEventListener("endstreaming",this._onEndStreaming)),e&&(e.removeEventListener("emptied",this._onMediaEmptied),i&&self.URL.revokeObjectURL(i),this.mediaSrc===i?(e.removeAttribute("src"),this.appendSource&&Eg(e),e.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(dc.MEDIA_DETACHED,void 0)}onBufferReset(){this.getSourceBufferTypes().forEach((e=>{this.resetBuffer(e)})),this._initSourceBuffer()}resetBuffer(e){const t=this.sourceBuffer[e];try{var i;if(t)this.removeBufferListeners(e),this.sourceBuffer[e]=void 0,null!=(i=this.mediaSource)&&i.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(t)}catch(t){this.warn(`onBufferReset ${e}`,t)}}onBufferCodecs(e,t){const i=this.getSourceBufferTypes().length,s=Object.keys(t);if(s.forEach((e=>{if(i){const i=this.tracks[e];if(i&&"function"==typeof i.buffer.changeType){var s;const{id:r,codec:a,levelCodec:o,container:n,metadata:l}=t[e],d=Xu(i.codec,i.levelCodec),h=null==d?void 0:d.replace(Tg,"$1");let c=Xu(a,o);const u=null==(s=c)?void 0:s.replace(Tg,"$1");if(c&&h!==u){"audio"===e.slice(0,5)&&(c=Qu(c,this.appendSource));const t=`${n};codecs=${c}`;this.appendChangeType(e,t),this.log(`switching codec ${d} to ${c}`),this.tracks[e]={buffer:i.buffer,codec:a,container:n,levelCodec:o,metadata:l,id:r}}}}else this.pendingTracks[e]=t[e]})),i)return;const r=Math.max(this.bufferCodecEventsExpected-1,0);this.bufferCodecEventsExpected!==r&&(this.log(`${r} bufferCodec event(s) expected ${s.join(",")}`),this.bufferCodecEventsExpected=r),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks()}appendChangeType(e,t){const{operationQueue:i}=this,s={execute:()=>{const s=this.sourceBuffer[e];s&&(this.log(`changing ${e} sourceBuffer type to ${t}`),s.changeType(t)),i.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:t=>{this.warn(`Failed to change ${e} SourceBuffer type`,t)}};i.append(s,e,!!this.pendingTracks[e])}onBufferAppending(e,t){const{hls:i,operationQueue:s,tracks:r}=this,{data:a,type:o,frag:n,part:l,chunkMeta:d}=t,h=d.buffering[o],c=self.performance.now();h.start=c;const u=n.stats.buffering,p=l?l.stats.buffering:null;0===u.start&&(u.start=c),p&&0===p.start&&(p.start=c);const f=r.audio;let m=!1;"audio"===o&&"audio/mpeg"===(null==f?void 0:f.container)&&(m=!this.lastMpegAudioChunk||1===d.id||this.lastMpegAudioChunk.sn!==d.sn,this.lastMpegAudioChunk=d);const g=n.start,y={execute:()=>{if(h.executeStart=self.performance.now(),m){const e=this.sourceBuffer[o];if(e){const t=g-e.timestampOffset;Math.abs(t)>=.1&&(this.log(`Updating audio SourceBuffer timestampOffset to ${g} (delta: ${t}) sn: ${n.sn})`),e.timestampOffset=g)}}this.appendExecutor(a,o)},onStart:()=>{},onComplete:()=>{const e=self.performance.now();h.executeEnd=h.end=e,0===u.first&&(u.first=e),p&&0===p.first&&(p.first=e);const{sourceBuffer:t}=this,i={};for(const e in t)i[e]=Ff.getBuffered(t[e]);this.appendErrors[o]=0,"audio"===o||"video"===o?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(dc.BUFFER_APPENDED,{type:o,frag:n,part:l,chunkMeta:d,parent:n.type,timeRanges:i})},onError:e=>{const t={type:hc.MEDIA_ERROR,parent:n.type,details:cc.BUFFER_APPEND_ERROR,sourceBufferName:o,frag:n,part:l,chunkMeta:d,error:e,err:e,fatal:!1};if(e.code===DOMException.QUOTA_EXCEEDED_ERR)t.details=cc.BUFFER_FULL_ERROR;else{const e=++this.appendErrors[o];t.details=cc.BUFFER_APPEND_ERROR,this.warn(`Failed ${e}/${i.config.appendErrorMaxRetry} times to append segment in "${o}" sourceBuffer`),e>=i.config.appendErrorMaxRetry&&(t.fatal=!0)}i.trigger(dc.ERROR,t)}};s.append(y,o,!!this.pendingTracks[o])}onBufferFlushing(e,t){const{operationQueue:i}=this,s=e=>({execute:this.removeExecutor.bind(this,e,t.startOffset,t.endOffset),onStart:()=>{},onComplete:()=>{this.hls.trigger(dc.BUFFER_FLUSHED,{type:e})},onError:t=>{this.warn(`Failed to remove from ${e} SourceBuffer`,t)}});t.type?i.append(s(t.type),t.type):this.getSourceBufferTypes().forEach((e=>{i.append(s(e),e)}))}onFragParsed(e,t){const{frag:i,part:s}=t,r=[],a=s?s.elementaryStreams:i.elementaryStreams;a[Ec]?r.push("audiovideo"):(a[Sc]&&r.push("audio"),a[Tc]&&r.push("video"));0===r.length&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${i.type} level: ${i.level} sn: ${i.sn}`),this.blockBuffers((()=>{const e=self.performance.now();i.stats.buffering.end=e,s&&(s.stats.buffering.end=e);const t=s?s.stats:i.stats;this.hls.trigger(dc.FRAG_BUFFERED,{frag:i,part:s,stats:t,id:i.type})}),r)}onFragChanged(e,t){this.trimBuffers()}onBufferEos(e,t){this.getSourceBufferTypes().reduce(((e,i)=>{const s=this.sourceBuffer[i];return!s||t.type&&t.type!==i||(s.ending=!0,s.ended||(s.ended=!0,this.log(`${i} sourceBuffer now EOS`))),e&&!(s&&!s.ended)}),!0)&&(this.log("Queueing mediaSource.endOfStream()"),this.blockBuffers((()=>{this.getSourceBufferTypes().forEach((e=>{const t=this.sourceBuffer[e];t&&(t.ending=!1)}));const{mediaSource:e}=this;e&&"open"===e.readyState?(this.log("Calling mediaSource.endOfStream()"),e.endOfStream()):e&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${e.readyState}`)})))}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())}trimBuffers(){const{hls:e,details:t,media:i}=this;if(!i||null===t)return;if(!this.getSourceBufferTypes().length)return;const s=e.config,r=i.currentTime,a=t.levelTargetDuration,o=t.live&&null!==s.liveBackBufferLength?s.liveBackBufferLength:s.backBufferLength;if(oc(o)&&o>0){const e=Math.max(o,a),t=Math.floor(r/a)*a-e;this.flushBackBuffer(r,a,t)}if(oc(s.frontBufferFlushThreshold)&&s.frontBufferFlushThreshold>0){const e=Math.max(s.maxBufferLength,s.frontBufferFlushThreshold),t=Math.max(e,a),i=Math.floor(r/a)*a+t;this.flushFrontBuffer(r,a,i)}}flushBackBuffer(e,t,i){const{details:s,sourceBuffer:r}=this;this.getSourceBufferTypes().forEach((a=>{const o=r[a];if(o){const r=Ff.getBuffered(o);if(r.length>0&&i>r.start(0)){if(this.hls.trigger(dc.BACK_BUFFER_REACHED,{bufferEnd:i}),null!=s&&s.live)this.hls.trigger(dc.LIVE_BACK_BUFFER_REACHED,{bufferEnd:i});else if(o.ended&&r.end(r.length-1)-e<2*t)return void this.log(`Cannot flush ${a} back buffer while SourceBuffer is in ended state`);this.hls.trigger(dc.BUFFER_FLUSHING,{startOffset:0,endOffset:i,type:a})}}}))}flushFrontBuffer(e,t,i){const{sourceBuffer:s}=this;this.getSourceBufferTypes().forEach((r=>{const a=s[r];if(a){const s=Ff.getBuffered(a),o=s.length;if(o<2)return;const n=s.start(o-1),l=s.end(o-1);if(i>n||e>=n&&e<=l)return;if(a.ended&&e-l<2*t)return void this.log(`Cannot flush ${r} front buffer while SourceBuffer is in ended state`);this.hls.trigger(dc.BUFFER_FLUSHING,{startOffset:n,endOffset:1/0,type:r})}}))}updateMediaElementDuration(){if(!this.details||!this.media||!this.mediaSource||"open"!==this.mediaSource.readyState)return;const{details:e,hls:t,media:i,mediaSource:s}=this,r=e.fragments[0].start+e.totalduration,a=i.duration,o=oc(s.duration)?s.duration:0;e.live&&t.config.liveDurationInfinity?(s.duration=1/0,this.updateSeekableRange(e)):(r>o&&r>a||!oc(a))&&(this.log(`Updating Media Source duration to ${r.toFixed(3)}`),s.duration=r)}updateSeekableRange(e){const t=this.mediaSource,i=e.fragments;if(i.length&&e.live&&null!=t&&t.setLiveSeekableRange){const s=Math.max(0,i[0].start),r=Math.max(s,s+e.totalduration);this.log(`Media Source duration is set to ${t.duration}. Setting seekable range to ${s}-${r}.`),t.setLiveSeekableRange(s,r)}}checkPendingTracks(){const{bufferCodecEventsExpected:e,operationQueue:t,pendingTracks:i}=this,s=Object.keys(i).length;if(s&&(!e||2===s||"audiovideo"in i)){this.createSourceBuffers(i),this.pendingTracks={};const e=this.getSourceBufferTypes();if(e.length)this.hls.trigger(dc.BUFFER_CREATED,{tracks:this.tracks}),e.forEach((e=>{t.executeNext(e)}));else{const e=new Error("could not create source buffer for media codec(s)");this.hls.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:e,reason:e.message})}}}createSourceBuffers(e){const{sourceBuffer:t,mediaSource:i}=this;if(!i)throw Error("createSourceBuffers called when mediaSource was null");for(const s in e)if(!t[s]){const r=e[s];if(!r)throw Error(`source buffer exists for track ${s}, however track does not`);let a=r.levelCodec||r.codec;a&&"audio"===s.slice(0,5)&&(a=Qu(a,this.appendSource));const o=`${r.container};codecs=${a}`;this.log(`creating sourceBuffer(${o})`);try{const e=t[s]=i.addSourceBuffer(o),n=s;this.addBufferListener(n,"updatestart",this._onSBUpdateStart),this.addBufferListener(n,"updateend",this._onSBUpdateEnd),this.addBufferListener(n,"error",this._onSBUpdateError),this.appendSource&&this.addBufferListener(n,"bufferedchange",((e,t)=>{const i=t.removedRanges;null!=i&&i.length&&this.hls.trigger(dc.BUFFER_FLUSHED,{type:s})})),this.tracks[s]={buffer:e,codec:a,container:r.container,levelCodec:r.levelCodec,metadata:r.metadata,id:r.id}}catch(e){this.error(`error while trying to add sourceBuffer: ${e.message}`),this.hls.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:e,sourceBufferName:s,mimeType:o})}}}get mediaSrc(){var e;const t=(null==(e=this.media)?void 0:e.firstChild)||this.media;return null==t?void 0:t.src}_onSBUpdateStart(e){const{operationQueue:t}=this;t.current(e).onStart()}_onSBUpdateEnd(e){var t;if("closed"===(null==(t=this.mediaSource)?void 0:t.readyState))return void this.resetBuffer(e);const{operationQueue:i}=this;i.current(e).onComplete(),i.shiftAndExecuteNext(e)}_onSBUpdateError(e,t){var i;const s=new Error(`${e} SourceBuffer error. MediaSource readyState: ${null==(i=this.mediaSource)?void 0:i.readyState}`);this.error(`${s}`,t),this.hls.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:s,fatal:!1});const r=this.operationQueue.current(e);r&&r.onError(s)}removeExecutor(e,t,i){const{media:s,mediaSource:r,operationQueue:a,sourceBuffer:o}=this,n=o[e];if(!s||!r||!n)return this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),void a.shiftAndExecuteNext(e);const l=oc(s.duration)?s.duration:1/0,d=oc(r.duration)?r.duration:1/0,h=Math.max(0,t),c=Math.min(i,l,d);c>h&&(!n.ending||n.ended)?(n.ended=!1,this.log(`Removing [${h},${c}] from the ${e} SourceBuffer`),n.remove(h,c)):a.shiftAndExecuteNext(e)}appendExecutor(e,t){const i=this.sourceBuffer[t];if(i)i.ended=!1,i.appendBuffer(e);else if(!this.pendingTracks[t])throw new Error(`Attempting to append to the ${t} SourceBuffer, but it does not exist`)}blockBuffers(e,t=this.getSourceBufferTypes()){if(!t.length)return this.log("Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve().then(e);const{operationQueue:i}=this,s=t.map((e=>i.appendBlocker(e)));Promise.all(s).then((()=>{e(),t.forEach((e=>{const t=this.sourceBuffer[e];null!=t&&t.updating||i.shiftAndExecuteNext(e)}))}))}getSourceBufferTypes(){return Object.keys(this.sourceBuffer)}addBufferListener(e,t,i){const s=this.sourceBuffer[e];if(!s)return;const r=i.bind(this,e);this.listeners[e].push({event:t,listener:r}),s.addEventListener(t,r)}removeBufferListeners(e){const t=this.sourceBuffer[e];t&&this.listeners[e].forEach((e=>{t.removeEventListener(e.event,e.listener)}))}},capLevelController:_y,errorController:class{constructor(e){this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.log=void 0,this.warn=void 0,this.error=void 0,this.hls=e,this.log=gc.log.bind(gc,"[info]:"),this.warn=gc.warn.bind(gc,"[warning]:"),this.error=gc.error.bind(gc,"[error]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(dc.ERROR,this.onError,this),e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(dc.ERROR,this.onError,this),e.off(dc.ERROR,this.onErrorOut,this),e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(null==e?void 0:e.type)===gp?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var i,s;if(t.fatal)return;const r=this.hls,a=t.context;switch(t.details){case cc.FRAG_LOAD_ERROR:case cc.FRAG_LOAD_TIMEOUT:case cc.KEY_LOAD_ERROR:case cc.KEY_LOAD_TIMEOUT:return void(t.errorAction=this.getFragRetryOrSwitchAction(t));case cc.FRAG_PARSING_ERROR:if(null!=(i=t.frag)&&i.gap)return void(t.errorAction={action:lf,flags:uf});case cc.FRAG_GAP:case cc.FRAG_DECRYPT_ERROR:return t.errorAction=this.getFragRetryOrSwitchAction(t),void(t.errorAction.action=df);case cc.LEVEL_EMPTY_ERROR:case cc.LEVEL_PARSING_ERROR:{var o,n;const e=t.parent===gp?t.level:r.loadLevel;t.details===cc.LEVEL_EMPTY_ERROR&&null!=(o=t.context)&&null!=(n=o.levelDetails)&&n.live?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,e):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,e))}return;case cc.LEVEL_LOAD_ERROR:case cc.LEVEL_LOAD_TIMEOUT:return void("number"==typeof(null==a?void 0:a.level)&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,a.level)));case cc.AUDIO_TRACK_LOAD_ERROR:case cc.AUDIO_TRACK_LOAD_TIMEOUT:case cc.SUBTITLE_LOAD_ERROR:case cc.SUBTITLE_TRACK_LOAD_TIMEOUT:if(a){const e=r.levels[r.loadLevel];if(e&&(a.type===fp&&e.hasAudioGroup(a.groupId)||a.type===mp&&e.hasSubtitleGroup(a.groupId)))return t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.loadLevel),t.errorAction.action=df,void(t.errorAction.flags=pf)}return;case cc.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const e=r.levels[r.loadLevel],i=null==e?void 0:e.attrs["HDCP-LEVEL"];i?t.errorAction={action:df,flags:ff,hdcpLevel:i}:this.keySystemError(t)}return;case cc.BUFFER_ADD_CODEC_ERROR:case cc.REMUX_ALLOC_ERROR:case cc.BUFFER_APPEND_ERROR:return void(t.errorAction=this.getLevelSwitchAction(t,null!=(s=t.level)?s:r.loadLevel));case cc.INTERNAL_EXCEPTION:case cc.BUFFER_APPENDING_ERROR:case cc.BUFFER_FULL_ERROR:case cc.LEVEL_SWITCH_ERROR:case cc.BUFFER_STALLED_ERROR:case cc.BUFFER_SEEK_OVER_HOLE:case cc.BUFFER_NUDGE_ON_STALL:return void(t.errorAction={action:lf,flags:uf})}t.type===hc.KEY_SYSTEM_ERROR&&this.keySystemError(t)}keySystemError(e){const t=this.getVariantLevelIndex(e.frag);e.levelRetry=!1,e.errorAction=this.getLevelSwitchAction(e,t)}getPlaylistRetryOrSwitchAction(e,t){const i=Zp(this.hls.config.playlistLoadPolicy,e),s=this.playlistError++;if(sf(i,s,Xp(e),e.response))return{action:cf,flags:uf,retryConfig:i,retryCount:s};const r=this.getLevelSwitchAction(e,t);return i&&(r.retryConfig=i,r.retryCount=s),r}getFragRetryOrSwitchAction(e){const t=this.hls,i=this.getVariantLevelIndex(e.frag),s=t.levels[i],{fragLoadPolicy:r,keyLoadPolicy:a}=t.config,o=Zp(e.details.startsWith("key")?a:r,e),n=t.levels.reduce(((e,t)=>e+t.fragmentError),0);if(s){e.details!==cc.FRAG_GAP&&s.fragmentError++;if(sf(o,n,Xp(e),e.response))return{action:cf,flags:uf,retryConfig:o,retryCount:n}}const l=this.getLevelSwitchAction(e,i);return o&&(l.retryConfig=o,l.retryCount=n),l}getLevelSwitchAction(e,t){const i=this.hls;null==t&&(t=i.loadLevel);const s=this.hls.levels[t];if(s){var r,a;const t=e.details;s.loadError++,t===cc.BUFFER_APPEND_ERROR&&s.fragmentError++;let l=-1;const{levels:d,loadLevel:h,minAutoLevel:c,maxAutoLevel:u}=i;i.autoLevelEnabled||(i.loadLevel=-1);const p=null==(r=e.frag)?void 0:r.type,f=(p===yp&&t===cc.FRAG_PARSING_ERROR||"audio"===e.sourceBufferName&&(t===cc.BUFFER_ADD_CODEC_ERROR||t===cc.BUFFER_APPEND_ERROR))&&d.some((({audioCodec:e})=>s.audioCodec!==e)),m="video"===e.sourceBufferName&&(t===cc.BUFFER_ADD_CODEC_ERROR||t===cc.BUFFER_APPEND_ERROR)&&d.some((({codecSet:e,audioCodec:t})=>s.codecSet!==e&&s.audioCodec===t)),{type:g,groupId:y}=null!=(a=e.context)?a:{};for(let i=d.length;i--;){const r=(i+h)%d.length;if(r!==h&&r>=c&&r<=u&&0===d[r].loadError){var o,n;const i=d[r];if(t===cc.FRAG_GAP&&e.frag){const t=d[r].details;if(t){const i=af(e.frag,t.fragments,e.frag.start);if(null!=i&&i.gap)continue}}else{if(g===fp&&i.hasAudioGroup(y)||g===mp&&i.hasSubtitleGroup(y))continue;if(p===yp&&null!=(o=s.audioGroups)&&o.some((e=>i.hasAudioGroup(e)))||p===Ap&&null!=(n=s.subtitleGroups)&&n.some((e=>i.hasSubtitleGroup(e)))||f&&s.audioCodec===i.audioCodec||!f&&s.audioCodec!==i.audioCodec||m&&s.codecSet===i.codecSet)continue}l=r;break}}if(l>-1&&i.loadLevel!==l)return e.levelRetry=!0,this.playlistError=0,{action:df,flags:uf,nextAutoLevel:l}}return{action:df,flags:pf}}onErrorOut(e,t){var i;switch(null==(i=t.errorAction)?void 0:i.action){case lf:break;case df:this.sendAlternateToPenaltyBox(t),t.errorAction.resolved||t.details===cc.FRAG_GAP?/MediaSource readyState: ended/.test(t.error.message)&&(this.warn(`MediaSource ended after "${t.sourceBufferName}" sourceBuffer append error. Attempting to recover from media error.`),this.hls.recoverMediaError()):t.fatal=!0}t.fatal&&this.hls.stopLoad()}sendAlternateToPenaltyBox(e){const t=this.hls,i=e.errorAction;if(!i)return;const{flags:s,hdcpLevel:r,nextAutoLevel:a}=i;switch(s){case uf:this.switchLevel(e,a);break;case ff:r&&(t.maxHdcpLevel=Up[Up.indexOf(r)-1],i.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`)}i.resolved||this.switchLevel(e,a)}switchLevel(e,t){void 0!==t&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel)}},fpsController:class{constructor(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}setStreamController(e){this.streamController=e}registerListeners(){this.hls.on(dc.MEDIA_ATTACHING,this.onMediaAttaching,this)}unregisterListeners(){this.hls.off(dc.MEDIA_ATTACHING,this.onMediaAttaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const i=this.hls.config;if(i.capLevelOnFPSDrop){const e=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=e,e&&"function"==typeof e.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),i.fpsDroppedMonitoringPeriod)}}checkFPS(e,t,i){const s=performance.now();if(t){if(this.lastTime){const e=s-this.lastTime,r=i-this.lastDroppedFrames,a=t-this.lastDecodedFrames,o=1e3*r/e,n=this.hls;if(n.trigger(dc.FPS_DROP,{currentDropped:r,currentDecoded:a,totalDroppedFrames:i}),o>0&&r>n.config.fpsDroppedMonitoringThreshold*a){let e=n.currentLevel;gc.warn("drop FPS ratio greater than max allowed value for currentLevel: "+e),e>0&&(-1===n.autoLevelCapping||n.autoLevelCapping>=e)&&(e-=1,n.trigger(dc.FPS_DROP_LEVEL_CAPPING,{level:e,droppedLevel:n.currentLevel}),n.autoLevelCapping=e,this.streamController.nextLevelSwitch())}}this.lastTime=s,this.lastDroppedFrames=i,this.lastDecodedFrames=t}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}},stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrEwmaDefaultEstimateMax:5e6,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:$c,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,useMediaCapabilities:!0,certLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null}},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},{cueHandler:nA,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:class extends um{constructor(e,t,i){super(e,t,i,"[subtitle-stream-controller]",Ap),this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null}_registerListeners(){const{hls:e}=this;e.on(dc.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.LEVEL_LOADED,this.onLevelLoaded,this),e.on(dc.ERROR,this.onError,this),e.on(dc.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(dc.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(dc.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(dc.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(dc.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(dc.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(dc.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.LEVEL_LOADED,this.onLevelLoaded,this),e.off(dc.ERROR,this.onError,this),e.off(dc.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(dc.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(dc.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(dc.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(dc.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(dc.FRAG_BUFFERED,this.onFragBuffered,this)}startLoad(e){this.stopLoad(),this.state=tm,this.setInterval(500),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}onManifestLoading(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()}onMediaDetaching(){this.tracksBuffered=[],super.onMediaDetaching()}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:i,success:s}=t;if(this.fragPrevious=i,this.state=tm,!s)return;const r=this.tracksBuffered[this.currentTrackId];if(!r)return;let a;const o=i.start;for(let e=0;e<r.length;e++)if(o>=r[e].start&&o<=r[e].end){a=r[e];break}const n=i.start+i.duration;a?a.end=n:(a={start:o,end:n},r.push(a)),this.fragmentTracker.fragBuffered(i),this.fragBufferedComplete(i,null)}onBufferFlushing(e,t){const{startOffset:i,endOffset:s}=t;if(0===i&&s!==Number.POSITIVE_INFINITY){const e=s-1;if(e<=0)return;t.endOffsetSubtitles=Math.max(0,e),this.tracksBuffered.forEach((t=>{for(let i=0;i<t.length;)if(t[i].end<=e)t.shift();else{if(!(t[i].start<e))break;t[i].start=e,i++}})),this.fragmentTracker.removeFragmentsInRange(i,e,Ap)}}onFragBuffered(e,t){var i;this.loadedmetadata||t.frag.type!==gp||null!=(i=this.media)&&i.buffered.length&&(this.loadedmetadata=!0)}onError(e,t){const i=t.frag;(null==i?void 0:i.type)===Ap&&(this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==em&&(this.state=tm))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){this.levels&&bg(this.levels,t)?this.levels=t.map((e=>new zp(e))):(this.tracksBuffered=[],this.levels=t.map((e=>{const t=new zp(e);return this.tracksBuffered[t.id]=[],t})),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,Ap),this.fragPrevious=null,this.mediaBuffer=null)}onSubtitleTrackSwitch(e,t){var i;if(this.currentTrackId=t.id,null==(i=this.levels)||!i.length||-1===this.currentTrackId)return void this.clearInterval();const s=this.levels[this.currentTrackId];null!=s&&s.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,s&&this.setInterval(500)}onSubtitleTrackLoaded(e,t){var i;const{currentTrackId:s,levels:r}=this,{details:a,id:o}=t;if(!r)return void this.warn(`Subtitle tracks were reset while loading level ${o}`);const n=r[s];if(o>=r.length||o!==s||!n)return;this.log(`Subtitle track ${o} loaded [${a.startSN},${a.endSN}]${a.lastPartSn?`[part-${a.lastPartSn}-${a.lastPartIndex}]`:""},duration:${a.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let l=0;if(a.live||null!=(i=n.details)&&i.live){const e=this.mainDetails;if(a.deltaUpdateFailed||!e)return;const t=e.fragments[0];var d;if(n.details)l=this.alignPlaylists(a,n.details,null==(d=this.levelLastLoaded)?void 0:d.details),0===l&&t&&(l=t.start,qp(a,l));else a.hasProgramDateTime&&e.hasProgramDateTime?($f(a,e),l=a.fragments[0].start):t&&(l=t.start,qp(a,l))}if(n.details=a,this.levelLastLoaded=n,this.startFragRequested||!this.mainDetails&&a.live||this.setStartPosition(this.mainDetails||a,l),this.tick(),a.live&&!this.fragCurrent&&this.media&&this.state===tm){af(null,a.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),n.details=void 0)}}_handleFragmentLoadComplete(e){const{frag:t,payload:i}=e,s=t.decryptdata,r=this.hls;if(!this.fragContextChanged(t)&&i&&i.byteLength>0&&null!=s&&s.key&&s.iv&&"AES-128"===s.method){const e=performance.now();this.decrypter.decrypt(new Uint8Array(i),s.key.buffer,s.iv.buffer).catch((e=>{throw r.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.FRAG_DECRYPT_ERROR,fatal:!1,error:e,reason:e.message,frag:t}),e})).then((i=>{const s=performance.now();r.trigger(dc.FRAG_DECRYPTED,{frag:t,payload:i,stats:{tstart:e,tdecrypt:s}})})).catch((e=>{this.warn(`${e.name}: ${e.message}`),this.state=tm}))}}doTick(){if(this.media){if(this.state===tm){const{currentTrackId:e,levels:t}=this,i=null==t?void 0:t[e];if(!i||!t.length||!i.details)return;const{config:s}=this,r=this.getLoadPosition(),a=Ff.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],r,s.maxBufferHole),{end:o,len:n}=a,l=this.getFwdBufferInfo(this.media,gp),d=i.details;if(n>this.getMaxBufferLength(null==l?void 0:l.len)+d.levelTargetDuration)return;const h=d.fragments,c=h.length,u=d.edge;let p=null;const f=this.fragPrevious;if(o<u){const e=s.maxFragLookUpTolerance,t=o>u-e?0:e;p=af(f,h,Math.max(h[0].start,o),t),!p&&f&&f.start<h[0].start&&(p=h[0])}else p=h[c-1];if(!p)return;if(p=this.mapToInitFragWhenRequired(p),"initSegment"!==p.sn){const e=h[p.sn-d.startSN-1];e&&e.cc===p.cc&&this.fragmentTracker.getState(e)===Rf&&(p=e)}this.fragmentTracker.getState(p)===Rf&&this.loadFragment(p,i,o)}}else this.state=tm}getMaxBufferLength(e){const t=super.getMaxBufferLength();return e?Math.max(t,e):t}loadFragment(e,t,i){this.fragCurrent=e,"initSegment"===e.sn?this._loadInitSegment(e,t):(this.startFragRequested=!0,super.loadFragment(e,t,i))}get mediaBufferTimeRanges(){return new wg(this.tracksBuffered[this.currentTrackId]||[])}},subtitleTrackController:class extends mf{constructor(e){super(e,"[subtitle-track-controller]"),this.media=null,this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.queuedDefaultTrack=-1,this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.onTextTracksChanged=()=>{if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let e=null;const t=kp(this.media.textTracks);for(let i=0;i<t.length;i++)if("hidden"===t[i].mode)e=t[i];else if("showing"===t[i].mode){e=t[i];break}const i=this.findTrackForTextTrack(e);this.subtitleTrack!==i&&this.setSubtitleTrack(i)},this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}registerListeners(){const{hls:e}=this;e.on(dc.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.MANIFEST_PARSED,this.onManifestParsed,this),e.on(dc.LEVEL_LOADING,this.onLevelLoading,this),e.on(dc.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(dc.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(dc.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(dc.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.MANIFEST_PARSED,this.onManifestParsed,this),e.off(dc.LEVEL_LOADING,this.onLevelLoading,this),e.off(dc.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(dc.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(dc.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}onMediaDetaching(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);kp(this.media.textTracks).forEach((e=>{Tp(e)})),this.subtitleTrack=-1,this.media=null}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id:i,groupId:s,details:r}=t,a=this.tracksInGroup[i];if(!a||a.groupId!==s)return void this.warn(`Subtitle track with id:${i} and group:${s} not found in active group ${null==a?void 0:a.groupId}`);const o=a.details;a.details=t.details,this.log(`Subtitle track ${i} "${a.name}" lang:${a.lang} group:${s} loaded [${r.startSN}-${r.endSN}]`),i===this.trackId&&this.playlistLoaded(i,t,o)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const i=t.subtitleGroups||null,s=this.groupIds;let r=this.currentTrack;if(!i||(null==s?void 0:s.length)!==(null==i?void 0:i.length)||null!=i&&i.some((e=>-1===(null==s?void 0:s.indexOf(e))))){this.groupIds=i,this.trackId=-1,this.currentTrack=null;const e=this.tracks.filter((e=>!i||-1!==i.indexOf(e.groupId)));if(e.length)this.selectDefaultTrack&&!e.some((e=>e.default))&&(this.selectDefaultTrack=!1),e.forEach(((e,t)=>{e.id=t}));else if(!r&&!this.tracksInGroup.length)return;this.tracksInGroup=e;const t=this.hls.config.subtitlePreference;if(!r&&t){this.selectDefaultTrack=!1;const i=Tf(t,e);if(i>-1)r=e[i];else{const e=Tf(t,this.tracks);r=this.tracks[e]}}let s=this.findTrackId(r);-1===s&&r&&(s=this.findTrackId(null));const a={subtitleTracks:e};this.log(`Updating subtitle tracks, ${e.length} track(s) found in "${null==i?void 0:i.join(",")}" group-id`),this.hls.trigger(dc.SUBTITLE_TRACKS_UPDATED,a),-1!==s&&-1===this.trackId&&this.setSubtitleTrack(s)}else this.shouldReloadPlaylist(r)&&this.setSubtitleTrack(this.trackId)}findTrackId(e){const t=this.tracksInGroup,i=this.selectDefaultTrack;for(let s=0;s<t.length;s++){const r=t[s];if((!i||r.default)&&(i||e)&&(!e||Ef(r,e)))return s}if(e){for(let i=0;i<t.length;i++){const s=t[i];if(_g(e.attrs,s.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return i}for(let i=0;i<t.length;i++){const s=t[i];if(_g(e.attrs,s.attrs,["LANGUAGE"]))return i}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let i=0;i<t.length;i++){if(vg(t[i],e))return i}}return-1}onError(e,t){!t.fatal&&t.context&&(t.context.type!==mp||t.context.id!==this.trackId||this.groupIds&&-1===this.groupIds.indexOf(t.context.groupId)||this.checkRetry(t))}get allSubtitleTracks(){return this.tracks}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}setSubtitleOption(e){if(this.hls.config.subtitlePreference=e,e){const t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){const i=this.currentTrack;if(i&&Ef(e,i))return i;const s=Tf(e,this.tracksInGroup);if(s>-1){const e=this.tracksInGroup[s];return this.setSubtitleTrack(s),e}if(i)return null;{const i=Tf(e,t);if(i>-1)return t[i]}}}return null}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;if(this.shouldLoadPlaylist(t)&&t){const i=t.id,s=t.groupId;let r=t.url;if(e)try{r=e.addDirectives(r)}catch(e){this.warn(`Could not construct new URL with HLS Delivery Directives: ${e}`)}this.log(`Loading subtitle playlist for id ${i}`),this.hls.trigger(dc.SUBTITLE_TRACK_LOADING,{url:r,id:i,groupId:s,deliveryDirectives:e||null})}}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=kp(e.textTracks),i=this.currentTrack;let s;if(i&&(s=t.filter((e=>vg(i,e)))[0],s||this.warn(`Unable to find subtitle TextTrack with name "${i.name}" and language "${i.lang}"`)),[].slice.call(t).forEach((e=>{"disabled"!==e.mode&&e!==s&&(e.mode="disabled")})),s){const e=this.subtitleDisplay?"showing":"hidden";s.mode!==e&&(s.mode=e)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media)return void(this.queuedDefaultTrack=e);if(e<-1||e>=t.length||!oc(e))return void this.warn(`Invalid subtitle track id: ${e}`);this.clearTimer(),this.selectDefaultTrack=!1;const i=this.currentTrack,s=t[e]||null;if(this.trackId=e,this.currentTrack=s,this.toggleTrackModes(),!s)return void this.hls.trigger(dc.SUBTITLE_TRACK_SWITCH,{id:e});const r=!!s.details&&!s.details.live;if(e===this.trackId&&s===i&&r)return;this.log(`Switching to subtitle-track ${e}`+(s?` "${s.name}" lang:${s.lang} group:${s.groupId}`:""));const{id:a,groupId:o="",name:n,type:l,url:d}=s;this.hls.trigger(dc.SUBTITLE_TRACK_SWITCH,{id:a,groupId:o,name:n,type:l,url:d});const h=this.switchParams(s.url,null==i?void 0:i.details);this.loadPlaylist(h)}},timelineController:class{constructor(e){this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},e.on(dc.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(dc.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(dc.FRAG_LOADING,this.onFragLoading,this),e.on(dc.FRAG_LOADED,this.onFragLoaded,this),e.on(dc.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(dc.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(dc.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(dc.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(dc.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(dc.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(dc.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(dc.FRAG_LOADING,this.onFragLoading,this),e.off(dc.FRAG_LOADED,this.onFragLoaded,this),e.off(dc.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(dc.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(dc.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(dc.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(dc.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){if(this.config.enableCEA708Captions&&(!this.cea608Parser1||!this.cea608Parser2)){const e=new Vg(this,"textTrack1"),t=new Vg(this,"textTrack2"),i=new Vg(this,"textTrack3"),s=new Vg(this,"textTrack4");this.cea608Parser1=new zg(1,e,t),this.cea608Parser2=new zg(3,i,s)}}addCues(e,t,i,s,r){let a=!1;for(let e=r.length;e--;){const s=r[e],h=(o=s[0],n=s[1],l=t,d=i,Math.min(n,d)-Math.max(o,l));if(h>=0&&(s[0]=Math.min(s[0],t),s[1]=Math.max(s[1],i),a=!0,h/(i-t)>.5))return}var o,n,l,d;if(a||r.push([t,i]),this.config.renderTextTracksNatively){const r=this.captionsTracks[e];this.Cues.newCue(r,t,i,s)}else{const r=this.Cues.newCue(null,t,i,s);this.hls.trigger(dc.CUES_PARSED,{type:"captions",cues:r,track:e})}}onInitPtsFound(e,{frag:t,id:i,initPTS:s,timescale:r}){const{unparsedVttFrags:a}=this;"main"===i&&(this.initPTS[t.cc]={baseTime:s,timescale:r}),a.length&&(this.unparsedVttFrags=[],a.forEach((e=>{this.onFragLoaded(dc.FRAG_LOADED,e)})))}getExistingTrack(e,t){const{media:i}=this;if(i)for(let s=0;s<i.textTracks.length;s++){const r=i.textTracks[s];if(by(r,{name:e,lang:t,attrs:{}}))return r}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:i,media:s}=this,{label:r,languageCode:a}=t[e],o=this.getExistingTrack(r,a);if(o)i[e]=o,Tp(i[e]),wp(i[e],s);else{const t=this.createTextTrack("captions",r,a);t&&(t[e]=!0,i[e]=t)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const i={_id:e,label:t.label,kind:"captions",default:!!t.media&&!!t.media.default,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=i,this.hls.trigger(dc.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[i]})}createTextTrack(e,t,i){const s=this.media;if(s)return s.addTextTrack(e,t,i)}onMediaAttaching(e,t){this.media=t.media,this._cleanTracks()}onMediaDetaching(){const{captionsTracks:e}=this;Object.keys(e).forEach((t=>{Tp(e[t]),delete e[t]})),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:e}=this;if(!e)return;const t=e.textTracks;if(t)for(let e=0;e<t.length;e++)Tp(t[e])}onSubtitleTracksUpdated(e,t){const i=t.subtitleTracks||[],s=i.some((e=>e.textCodec===ny));if(this.config.enableWebVTT||s&&this.config.enableIMSC1){if(bg(this.tracks,i))return void(this.tracks=i);if(this.textTracks=[],this.tracks=i,this.config.renderTextTracksNatively){const e=this.media,t=e?kp(e.textTracks):null;if(this.tracks.forEach(((e,i)=>{let s;if(t){let i=null;for(let s=0;s<t.length;s++)if(t[s]&&by(t[s],e)){i=t[s],t[s]=null;break}i&&(s=i)}if(s)Tp(s);else{const t=Ay(e);s=this.createTextTrack(t,e.name,e.lang),s&&(s.mode="disabled")}s&&this.textTracks.push(s)})),null!=t&&t.length){const e=t.filter((e=>null!==e)).map((e=>e.label));e.length&&gc.warn(`Media element contains unused subtitle tracks: ${e.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const e=this.tracks.map((e=>({label:e.name,kind:e.type.toLowerCase(),default:e.default,subtitleTrack:e})));this.hls.trigger(dc.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:e})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach((e=>{const t=/(?:CC|SERVICE)([1-4])/.exec(e.instreamId);if(!t)return;const i=`textTrack${t[1]}`,s=this.captionsProperties[i];s&&(s.label=e.name,e.lang&&(s.languageCode=e.lang),s.media=e)}))}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return null==t?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){this.initCea608Parsers();const{cea608Parser1:i,cea608Parser2:s,lastCc:r,lastSn:a,lastPartIndex:o}=this;if(this.enabled&&i&&s&&t.frag.type===gp){var n,l;const{cc:e,sn:d}=t.frag,h=null!=(n=null==t||null==(l=t.part)?void 0:l.index)?n:-1;d===a+1||d===a&&h===o+1||e===r||(i.reset(),s.reset()),this.lastCc=e,this.lastSn=d,this.lastPartIndex=h}}onFragLoaded(e,t){const{frag:i,payload:s}=t;if(i.type===Ap)if(s.byteLength){const e=i.decryptdata,r="stats"in t;if(null==e||!e.encrypted||r){const e=this.tracks[i.level],r=this.vttCCs;r[i.cc]||(r[i.cc]={start:i.start,prevCC:this.prevCC,new:!0},this.prevCC=i.cc),e&&e.textCodec===ny?this._parseIMSC1(i,s):this._parseVTTs(t)}}else this.hls.trigger(dc.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const i=this.hls;cy(t,this.initPTS[e.cc],(t=>{this._appendCues(t,e.level),i.trigger(dc.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(t=>{gc.log(`Failed to parse IMSC1: ${t}`),i.trigger(dc.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:t})}))}_parseVTTs(e){var t;const{frag:i,payload:s}=e,{initPTS:r,unparsedVttFrags:a}=this,o=r.length-1;if(!r[i.cc]&&-1===o)return void a.push(e);const n=this.hls;oy(null!=(t=i.initSegment)&&t.data?xu(i.initSegment.data,new Uint8Array(s)):s,this.initPTS[i.cc],this.vttCCs,i.cc,i.start,(e=>{this._appendCues(e,i.level),n.trigger(dc.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:i})}),(t=>{const r="Missing initPTS for VTT MPEGTS"===t.message;r?a.push(e):this._fallbackToIMSC1(i,s),gc.log(`Failed to parse VTT cue: ${t}`),r&&o>i.cc||n.trigger(dc.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:t})}))}_fallbackToIMSC1(e,t){const i=this.tracks[e.level];i.textCodec||cy(t,this.initPTS[e.cc],(()=>{i.textCodec=ny,this._parseIMSC1(e,t)}),(()=>{i.textCodec="wvtt"}))}_appendCues(e,t){const i=this.hls;if(this.config.renderTextTracksNatively){const i=this.textTracks[t];if(!i||"disabled"===i.mode)return;e.forEach((e=>Sp(i,e)))}else{const s=this.tracks[t];if(!s)return;const r=s.default?"default":"subtitles"+t;i.trigger(dc.CUES_PARSED,{type:"subtitles",cues:e,track:r})}}onFragDecrypted(e,t){const{frag:i}=t;i.type===Ap&&this.onFragLoaded(dc.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){this.initCea608Parsers();const{cea608Parser1:i,cea608Parser2:s}=this;if(!this.enabled||!i||!s)return;const{frag:r,samples:a}=t;if(r.type!==gp||"NONE"!==this.closedCaptionsForLevel(r))for(let e=0;e<a.length;e++){const t=a[e].bytes;if(t){const r=this.extractCea608Data(t);i.addData(a[e].pts,r[0]),s.addData(a[e].pts,r[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:i,endOffsetSubtitles:s,type:r}){const{media:a}=this;if(a&&!(a.currentTime<i)){if(!r||"video"===r){const{captionsTracks:e}=this;Object.keys(e).forEach((s=>Ep(e[s],t,i)))}if(this.config.renderTextTracksNatively&&0===t&&void 0!==s){const{textTracks:e}=this;Object.keys(e).forEach((i=>Ep(e[i],t,s)))}}}extractCea608Data(e){const t=[[],[]],i=31&e[0];let s=2;for(let r=0;r<i;r++){const i=e[s++],r=127&e[s++],a=127&e[s++];if(0===r&&0===a)continue;if(0!=(4&i)){const e=3&i;0!==e&&1!==e||(t[e].push(r),t[e].push(a))}}return t}},audioStreamController:class extends um{constructor(e,t,i){super(e,t,i,"[audio-stream-controller]",yp),this.videoBuffer=null,this.videoTrackCC=-1,this.waitingVideoCC=-1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.flushing=!1,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null,this.bufferedTrack=null,this.switchingTrack=null}_registerListeners(){const{hls:e}=this;e.on(dc.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.LEVEL_LOADED,this.onLevelLoaded,this),e.on(dc.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(dc.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(dc.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(dc.ERROR,this.onError,this),e.on(dc.BUFFER_RESET,this.onBufferReset,this),e.on(dc.BUFFER_CREATED,this.onBufferCreated,this),e.on(dc.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(dc.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(dc.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(dc.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(dc.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.LEVEL_LOADED,this.onLevelLoaded,this),e.off(dc.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(dc.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(dc.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(dc.ERROR,this.onError,this),e.off(dc.BUFFER_RESET,this.onBufferReset,this),e.off(dc.BUFFER_CREATED,this.onBufferCreated,this),e.off(dc.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(dc.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(dc.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(dc.FRAG_BUFFERED,this.onFragBuffered,this)}onInitPtsFound(e,{frag:t,id:i,initPTS:s,timescale:r}){if("main"===i){const e=t.cc;this.initPTS[t.cc]={baseTime:s,timescale:r},this.log(`InitPTS for cc: ${e} found from main: ${s}`),this.videoTrackCC=e,this.state===hm&&this.tick()}}startLoad(e){if(!this.levels)return this.startPosition=e,void(this.state=em);const t=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),t>0&&-1===e?(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t,this.state=tm):(this.loadedmetadata=!1,this.state=am),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}doTick(){switch(this.state){case tm:this.doTickIdle();break;case am:{var e;const{levels:t,trackId:i}=this,s=null==t||null==(e=t[i])?void 0:e.details;if(s){if(this.waitForCdnTuneIn(s))break;this.state=hm}break}case rm:{var t;const e=performance.now(),i=this.retryDate;if(!i||e>=i||null!=(t=this.media)&&t.seeking){const{levels:e,trackId:t}=this;this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded((null==e?void 0:e[t])||null),this.state=tm}break}case hm:{const e=this.waitingData;if(e){const{frag:t,part:i,cache:s,complete:r}=e;if(void 0!==this.initPTS[t.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=sm;const e={frag:t,part:i,payload:s.flush(),networkDetails:null};this._handleFragmentLoadProgress(e),r&&super._handleFragmentLoadComplete(e)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log(`Waiting fragment cc (${t.cc}) cancelled because video is at cc ${this.videoTrackCC}`),this.clearWaitingFragment();else{const e=this.getLoadPosition(),i=Ff.bufferInfo(this.mediaBuffer,e,this.config.maxBufferHole);of(i.end,this.config.maxFragLookUpTolerance,t)<0&&(this.log(`Waiting fragment cc (${t.cc}) @ ${t.start} cancelled because another fragment at ${i.end} is needed`),this.clearWaitingFragment())}}else this.state=tm}}this.onTickEnd()}clearWaitingFragment(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=tm)}resetLoadingState(){this.clearWaitingFragment(),super.resetLoadingState()}onTickEnd(){const{media:e}=this;null!=e&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){const{hls:e,levels:t,media:i,trackId:s}=this,r=e.config;if(!i&&(this.startFragRequested||!r.startFragPrefetch)||null==t||!t[s])return;const a=t[s],o=a.details;if(!o||o.live&&this.levelLastLoaded!==a||this.waitForCdnTuneIn(o))return void(this.state=am);const n=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&n&&(this.bufferFlushed=!1,this.afterBufferFlushed(n,Sc,yp));const l=this.getFwdBufferInfo(n,yp);if(null===l)return;const{bufferedTrack:d,switchingTrack:h}=this;if(!h&&this._streamEnded(l,o))return e.trigger(dc.BUFFER_EOS,{type:"audio"}),void(this.state=lm);const c=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,gp),u=l.len,p=this.getMaxBufferLength(null==c?void 0:c.len),f=o.fragments,m=f[0].start;let g=this.flushing?this.getLoadPosition():l.end;if(h&&i){const e=this.getLoadPosition();d&&!_g(h.attrs,d.attrs)&&(g=e),o.PTSKnown&&e<m&&(l.end>m||l.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),i.currentTime=m+.05)}if(u>=p&&!h&&g<f[f.length-1].start)return;let y=this.getNextFragment(g,o),A=!1;if(y&&this.isLoopLoading(y,g)&&(A=!!y.gap,y=this.getNextFragmentLoopLoading(y,o,l,gp,p)),!y)return void(this.bufferFlushed=!0);const b=c&&y.start>c.end+o.targetduration;if(b||(null==c||!c.len)&&l.len){const e=this.getAppendedFrag(y.start,gp);if(null===e)return;if(A||(A=!!e.gap||!!b&&0===c.len),b&&!A||A&&l.nextStart&&l.nextStart<e.end)return}this.loadFragment(y,a,g)}getMaxBufferLength(e){const t=super.getMaxBufferLength();return e?Math.min(Math.max(t,e),this.config.maxMaxBufferLength):t}onMediaDetaching(){this.videoBuffer=null,this.bufferFlushed=this.flushing=!1,super.onMediaDetaching()}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map((e=>new zp(e)))}onAudioTrackSwitching(e,t){const i=!!t.url;this.trackId=t.id;const{fragCurrent:s}=this;s&&(s.abortRequests(),this.removeUnbufferedFrags(s.start)),this.resetLoadingState(),i?this.setInterval(100):this.resetTransmuxer(),i?(this.switchingTrack=t,this.state=tm,this.flushAudioIfNeeded(t)):(this.switchingTrack=null,this.bufferedTrack=t,this.state=em),this.tick()}onManifestLoading(){this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=this.flushing=!1,this.levels=this.mainDetails=this.waitingData=this.bufferedTrack=this.cachedTrackLoadedData=this.switchingTrack=null,this.startFragRequested=!1,this.trackId=this.videoTrackCC=this.waitingVideoCC=-1}onLevelLoaded(e,t){this.mainDetails=t.details,null!==this.cachedTrackLoadedData&&(this.hls.trigger(dc.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)}onAudioTrackLoaded(e,t){var i;if(null==this.mainDetails)return void(this.cachedTrackLoadedData=t);const{levels:s}=this,{details:r,id:a}=t;if(!s)return void this.warn(`Audio tracks were reset while loading level ${a}`);this.log(`Audio track ${a} loaded [${r.startSN},${r.endSN}]${r.lastPartSn?`[part-${r.lastPartSn}-${r.lastPartIndex}]`:""},duration:${r.totalduration}`);const o=s[a];let n=0;if(r.live||null!=(i=o.details)&&i.live){this.checkLiveUpdate(r);const e=this.mainDetails;if(r.deltaUpdateFailed||!e)return;var l;if(!o.details&&r.hasProgramDateTime&&e.hasProgramDateTime)$f(r,e),n=r.fragments[0].start;else n=this.alignPlaylists(r,o.details,null==(l=this.levelLastLoaded)?void 0:l.details)}o.details=r,this.levelLastLoaded=o,this.startFragRequested||!this.mainDetails&&r.live||this.setStartPosition(this.mainDetails||r,n),this.state!==am||this.waitForCdnTuneIn(r)||(this.state=tm),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:i,part:s,payload:r}=e,{config:a,trackId:o,levels:n}=this;if(!n)return void this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${i.sn} of level ${i.level} will not be buffered`);const l=n[o];if(!l)return void this.warn("Audio track is undefined on fragment load progress");const d=l.details;if(!d)return this.warn("Audio track details undefined on fragment load progress"),void this.removeUnbufferedFrags(i.start);const h=a.defaultAudioCodec||l.audioCodec||"mp4a.40.2";let c=this.transmuxer;c||(c=this.transmuxer=new Ag(this.hls,yp,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const u=this.initPTS[i.cc],p=null==(t=i.initSegment)?void 0:t.data;if(void 0!==u){const e=!1,t=s?s.index:-1,a=-1!==t,o=new Of(i.level,i.sn,i.stats.chunkCount,r.byteLength,t,a);c.push(r,p,h,"",i,s,d.totalduration,e,o,u)}else{this.log(`Unknown video PTS for cc ${i.cc}, waiting for video PTS before demuxing audio frag ${i.sn} of [${d.startSN} ,${d.endSN}],track ${o}`);const{cache:e}=this.waitingData=this.waitingData||{frag:i,part:s,cache:new pm,complete:!1};e.push(new Uint8Array(r)),this.waitingVideoCC=this.videoTrackCC,this.state=hm}}_handleFragmentLoadComplete(e){this.waitingData?this.waitingData.complete=!0:super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1}onBufferCreated(e,t){const i=t.tracks.audio;i&&(this.mediaBuffer=i.buffer||null),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer||null)}onFragBuffered(e,t){const{frag:i,part:s}=t;if(i.type===yp)if(this.fragContextChanged(i))this.warn(`Fragment ${i.sn}${s?" p: "+s.index:""} of level ${i.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);else{if("initSegment"!==i.sn){this.fragPrevious=i;const e=this.switchingTrack;e&&(this.bufferedTrack=e,this.switchingTrack=null,this.hls.trigger(dc.AUDIO_TRACK_SWITCHED,ic({},e)))}this.fragBufferedComplete(i,s)}else if(!this.loadedmetadata&&i.type===gp){const e=this.videoBuffer||this.media;if(e){Ff.getBuffered(e).length&&(this.loadedmetadata=!0)}}}onError(e,t){var i;if(t.fatal)this.state=dm;else switch(t.details){case cc.FRAG_GAP:case cc.FRAG_PARSING_ERROR:case cc.FRAG_DECRYPT_ERROR:case cc.FRAG_LOAD_ERROR:case cc.FRAG_LOAD_TIMEOUT:case cc.KEY_LOAD_ERROR:case cc.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(yp,t);break;case cc.AUDIO_TRACK_LOAD_ERROR:case cc.AUDIO_TRACK_LOAD_TIMEOUT:case cc.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==am||(null==(i=t.context)?void 0:i.type)!==fp||(this.state=tm);break;case cc.BUFFER_APPEND_ERROR:case cc.BUFFER_FULL_ERROR:if(!t.parent||"audio"!==t.parent)return;if(t.details===cc.BUFFER_APPEND_ERROR)return void this.resetLoadingState();this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case cc.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}}onBufferFlushing(e,{type:t}){t!==Tc&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==Tc){this.flushing=!1,this.bufferFlushed=!0,this.state===lm&&(this.state=tm);const e=this.mediaBuffer||this.media;e&&(this.afterBufferFlushed(e,t,yp),this.tick())}}_handleTransmuxComplete(e){var t;const i="audio",{hls:s}=this,{remuxResult:r,chunkMeta:a}=e,o=this.getCurrentContext(a);if(!o)return void this.resetWhenMissingContext(a);const{frag:n,part:l,level:d}=o,{details:h}=d,{audio:c,text:u,id3:p,initSegment:f}=r;if(!this.fragContextChanged(n)&&h){if(this.state=om,this.switchingTrack&&c&&this.completeAudioSwitch(this.switchingTrack),null!=f&&f.tracks){const e=n.initSegment||n;this._bufferInitSegment(d,f.tracks,e,a),s.trigger(dc.FRAG_PARSING_INIT_SEGMENT,{frag:e,id:i,tracks:f.tracks})}if(c){const{startPTS:e,endPTS:t,startDTS:i,endDTS:s}=c;l&&(l.elementaryStreams[Sc]={startPTS:e,endPTS:t,startDTS:i,endDTS:s}),n.setElementaryStreamInfo(Sc,e,t,i,s),this.bufferFragmentData(c,n,l,a)}if(null!=p&&null!=(t=p.samples)&&t.length){const e=ac({id:i,frag:n,details:h},p);s.trigger(dc.FRAG_PARSING_METADATA,e)}if(u){const e=ac({id:i,frag:n,details:h},u);s.trigger(dc.FRAG_PARSING_USERDATA,e)}}else this.fragmentTracker.removeFragment(n)}_bufferInitSegment(e,t,i,s){if(this.state!==om)return;t.video&&delete t.video;const r=t.audio;if(!r)return;r.id="audio";const a=e.audioCodec;this.log(`Init audio buffer, container:${r.container}, codecs[level/parsed]=[${a}/${r.codec}]`),a&&1===a.split(",").length&&(r.levelCodec=a),this.hls.trigger(dc.BUFFER_CODECS,t);const o=r.initSegment;if(null!=o&&o.byteLength){const e={type:"audio",frag:i,part:null,chunkMeta:s,parent:i.type,data:o};this.hls.trigger(dc.BUFFER_APPENDING,e)}this.tickImmediate()}loadFragment(e,t,i){const s=this.fragmentTracker.getState(e);var r;if(this.fragCurrent=e,this.switchingTrack||s===Rf||s===Lf)if("initSegment"===e.sn)this._loadInitSegment(e,t);else if(null!=(r=t.details)&&r.live&&!this.initPTS[e.cc]){this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`),this.state=hm;const i=this.mainDetails;i&&i.fragments[0].start!==t.details.fragments[0].start&&$f(t.details,i)}else this.startFragRequested=!0,super.loadFragment(e,t,i);else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){const{media:t,bufferedTrack:i}=this,s=null==i?void 0:i.attrs,r=e.attrs;t&&s&&(s.CHANNELS!==r.CHANNELS||i.name!==e.name||i.lang!==e.lang)&&(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null)}completeAudioSwitch(e){const{hls:t}=this;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(dc.AUDIO_TRACK_SWITCHED,ic({},e))}},audioTrackController:class extends mf{constructor(e){super(e,"[audio-track-controller]"),this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.MANIFEST_PARSED,this.onManifestParsed,this),e.on(dc.LEVEL_LOADING,this.onLevelLoading,this),e.on(dc.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(dc.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(dc.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.MANIFEST_PARSED,this.onManifestParsed,this),e.off(dc.LEVEL_LOADING,this.onLevelLoading,this),e.off(dc.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(dc.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(dc.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:i,groupId:s,details:r}=t,a=this.tracksInGroup[i];if(!a||a.groupId!==s)return void this.warn(`Audio track with id:${i} and group:${s} not found in active group ${null==a?void 0:a.groupId}`);const o=a.details;a.details=t.details,this.log(`Audio track ${i} "${a.name}" lang:${a.lang} group:${s} loaded [${r.startSN}-${r.endSN}]`),i===this.trackId&&this.playlistLoaded(i,t,o)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const i=t.audioGroups||null,s=this.groupIds;let r=this.currentTrack;if(!i||(null==s?void 0:s.length)!==(null==i?void 0:i.length)||null!=i&&i.some((e=>-1===(null==s?void 0:s.indexOf(e))))){this.groupIds=i,this.trackId=-1,this.currentTrack=null;const e=this.tracks.filter((e=>!i||-1!==i.indexOf(e.groupId)));if(e.length)this.selectDefaultTrack&&!e.some((e=>e.default))&&(this.selectDefaultTrack=!1),e.forEach(((e,t)=>{e.id=t}));else if(!r&&!this.tracksInGroup.length)return;this.tracksInGroup=e;const t=this.hls.config.audioPreference;if(!r&&t){const i=Tf(t,e,kf);if(i>-1)r=e[i];else{const e=Tf(t,this.tracks);r=this.tracks[e]}}let s=this.findTrackId(r);-1===s&&r&&(s=this.findTrackId(null));const o={audioTracks:e};this.log(`Updating audio tracks, ${e.length} track(s) found in group(s): ${null==i?void 0:i.join(",")}`),this.hls.trigger(dc.AUDIO_TRACKS_UPDATED,o);const n=this.trackId;if(-1!==s&&-1===n)this.setAudioTrack(s);else if(e.length&&-1===n){var a;const t=new Error(`No audio track selected for current audio group-ID(s): ${null==(a=this.groupIds)?void 0:a.join(",")} track count: ${e.length}`);this.warn(t.message),this.hls.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:t})}}else this.shouldReloadPlaylist(r)&&this.setAudioTrack(this.trackId)}onError(e,t){!t.fatal&&t.context&&(t.context.type!==fp||t.context.id!==this.trackId||this.groupIds&&-1===this.groupIds.indexOf(t.context.groupId)||(this.requestScheduled=-1,this.checkRetry(t)))}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const t=this.hls;if(t.config.audioPreference=e,e){const i=this.allAudioTracks;if(this.selectDefaultTrack=!1,i.length){const s=this.currentTrack;if(s&&Ef(e,s,kf))return s;const r=Tf(e,this.tracksInGroup,kf);if(r>-1){const e=this.tracksInGroup[r];return this.setAudioTrack(r),e}if(s){let s=t.loadLevel;-1===s&&(s=t.firstAutoLevel);const r=function(e,t,i,s,r){const a=t[s],o=t.reduce(((e,t,i)=>{const s=t.uri;return(e[s]||(e[s]=[])).push(i),e}),{})[a.uri];o.length>1&&(s=Math.max.apply(Math,o));const n=a.videoRange,l=a.frameRate,d=a.codecSet.substring(0,4),h=Cf(t,s,(t=>{if(t.videoRange!==n||t.frameRate!==l||t.codecSet.substring(0,4)!==d)return!1;const s=t.audioGroups,a=i.filter((e=>!s||-1!==s.indexOf(e.groupId)));return Tf(e,a,r)>-1}));return h>-1?h:Cf(t,s,(t=>{const s=t.audioGroups,a=i.filter((e=>!s||-1!==s.indexOf(e.groupId)));return Tf(e,a,r)>-1}))}(e,t.levels,i,s,kf);if(-1===r)return null;t.nextLoadLevel=r}if(e.channels||e.audioCodec){const t=Tf(e,i);if(t>-1)return i[t]}}}return null}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length)return void this.warn(`Invalid audio track id: ${e}`);this.clearTimer(),this.selectDefaultTrack=!1;const i=this.currentTrack,s=t[e],r=s.details&&!s.details.live;if(e===this.trackId&&s===i&&r)return;if(this.log(`Switching to audio-track ${e} "${s.name}" lang:${s.lang} group:${s.groupId} channels:${s.channels}`),this.trackId=e,this.currentTrack=s,this.hls.trigger(dc.AUDIO_TRACK_SWITCHING,ic({},s)),r)return;const a=this.switchParams(s.url,null==i?void 0:i.details);this.loadPlaylist(a)}findTrackId(e){const t=this.tracksInGroup;for(let i=0;i<t.length;i++){const s=t[i];if((!this.selectDefaultTrack||s.default)&&(!e||Ef(e,s,kf)))return i}if(e){const{name:i,lang:s,assocLang:r,characteristics:a,audioCodec:o,channels:n}=e;for(let e=0;e<t.length;e++){if(Ef({name:i,lang:s,assocLang:r,characteristics:a,audioCodec:o,channels:n},t[e],kf))return e}for(let i=0;i<t.length;i++){const s=t[i];if(_g(e.attrs,s.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return i}for(let i=0;i<t.length;i++){const s=t[i];if(_g(e.attrs,s.attrs,["LANGUAGE"]))return i}}return-1}loadPlaylist(e){const t=this.currentTrack;if(this.shouldLoadPlaylist(t)&&t){super.loadPlaylist();const i=t.id,s=t.groupId;let r=t.url;if(e)try{r=e.addDirectives(r)}catch(e){this.warn(`Could not construct new URL with HLS Delivery Directives: ${e}`)}this.log(`loading audio-track playlist ${i} "${t.name}" lang:${t.lang} group:${s}`),this.clearTimer(),this.hls.trigger(dc.AUDIO_TRACK_LOADING,{url:r,id:i,groupId:s,deliveryDirectives:e||null})}}},emeController:wy,cmcdController:class{constructor(e){this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=()=>{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=e=>{try{this.apply(e,{ot:Ty.MANIFEST,su:!this.initialized})}catch(e){gc.warn("Could not generate manifest CMCD data.",e)}},this.applyFragmentData=e=>{try{const t=e.frag,i=this.hls.levels[t.level],s=this.getObjectType(t),r={d:1e3*t.duration,ot:s};s!==Ty.VIDEO&&s!==Ty.AUDIO&&s!=Ty.MUXED||(r.br=i.bitrate/1e3,r.tb=this.getTopBandwidth(s)/1e3,r.bl=this.getBufferLength(s)),this.apply(e,r)}catch(e){gc.warn("Could not generate segment CMCD data.",e)}},this.hls=e;const t=this.config=e.config,{cmcd:i}=t;null!=i&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=i.sessionId||function(){try{return crypto.randomUUID()}catch(e){try{const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch(e){let t=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const i=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?i:3&i|8).toString(16)}))}}}(),this.cid=i.contentId,this.useHeaders=!0===i.useHeaders,this.includeKeys=i.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(dc.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(dc.MEDIA_DETACHED,this.onMediaDetached,this),e.on(dc.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(dc.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(dc.MEDIA_DETACHED,this.onMediaDetached,this),e.off(dc.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var i,s;this.audioBuffer=null==(i=t.tracks.audio)?void 0:i.buffer,this.videoBuffer=null==(s=t.tracks.video)?void 0:s.buffer}createData(){var e;return{v:1,sf:Ey.HLS,sid:this.sid,cid:this.cid,pr:null==(e=this.media)?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){ac(t,this.createData());const i=t.ot===Ty.INIT||t.ot===Ty.VIDEO||t.ot===Ty.MUXED;this.starved&&i&&(t.bs=!0,t.su=!0,this.starved=!1),null==t.su&&(t.su=this.buffering);const{includeKeys:s}=this;s&&(t=Object.keys(t).reduce(((e,i)=>(s.includes(i)&&(e[i]=t[i]),e)),{})),this.useHeaders?(e.headers||(e.headers={}),Ky(e.headers,t)):e.url=Qy(e.url,t)}getObjectType(e){const{type:t}=e;return"subtitle"===t?Ty.TIMED_TEXT:"initSegment"===e.sn?Ty.INIT:"audio"===t?Ty.AUDIO:"main"===t?this.hls.audioTracks.length?Ty.VIDEO:Ty.MUXED:void 0}getTopBandwidth(e){let t,i=0;const s=this.hls;if(e===Ty.AUDIO)t=s.audioTracks;else{const e=s.maxAutoLevel,i=e>-1?e+1:s.levels.length;t=s.levels.slice(0,i)}for(const e of t)e.bitrate>i&&(i=e.bitrate);return i>0?i:NaN}getBufferLength(e){const t=this.hls.media,i=e===Ty.AUDIO?this.audioBuffer:this.videoBuffer;if(!i||!t)return NaN;return 1e3*Ff.bufferInfo(i,t.currentTime,this.config.maxBufferHole).len}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,i=e||this.config.loader;return class{constructor(e){this.loader=void 0,this.loader=new i(e)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(e,i,s){t(e),this.loader.load(e,i,s)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,i=e||this.config.loader;return class{constructor(e){this.loader=void 0,this.loader=new i(e)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(e,i,s){t(e),this.loader.load(e,i,s)}}}},contentSteeringController:class{constructor(e){this.hls=void 0,this.log=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this.pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.log=gc.log.bind(gc,"[content-steering]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(dc.MANIFEST_PARSED,this.onManifestParsed,this),e.on(dc.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(dc.MANIFEST_PARSED,this.onManifestParsed,this),e.off(dc.ERROR,this.onError,this))}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=1e3*this.timeToLoad-(performance.now()-this.updated);if(e>0)return void this.scheduleRefresh(this.uri,e)}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){-1!==this.reloadTimer&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter((t=>t!==e)))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:i}=t;null!==i&&(this.pathwayId=i.pathwayId,this.uri=i.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:i}=t;if((null==i?void 0:i.action)===df&&i.flags===pf){const e=this.levels;let s=this.pathwayPriority,r=this.pathwayId;if(t.context){const{groupId:i,pathwayId:s,type:a}=t.context;i&&e?r=this.getPathwayForGroupId(i,a,r):s&&(r=s)}r in this.penalizedPathways||(this.penalizedPathways[r]=performance.now()),!s&&e&&(s=e.reduce(((e,t)=>(-1===e.indexOf(t.pathwayId)&&e.push(t.pathwayId),e)),[])),s&&s.length>1&&(this.updatePathwayPriority(s),i.resolved=this.pathwayId!==r),i.resolved||gc.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${r} levels: ${e?e.length:e} priorities: ${JSON.stringify(s)} penalized: ${JSON.stringify(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(0===t.length){const i=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${i}"`),t=this.getLevelsForPathway(i),this.pathwayId=i}return t.length!==e.length?(this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t):e}getLevelsForPathway(e){return null===this.levels?[]:this.levels.filter((t=>e===t.pathwayId))}updatePathwayPriority(e){let t;this.pathwayPriority=e;const i=this.penalizedPathways,s=performance.now();Object.keys(i).forEach((e=>{s-i[e]>3e5&&delete i[e]}));for(let s=0;s<e.length;s++){const r=e[s];if(r in i)continue;if(r===this.pathwayId)return;const a=this.hls.nextLoadLevel,o=this.hls.levels[a];if(t=this.getLevelsForPathway(r),t.length>0){this.log(`Setting Pathway to "${r}"`),this.pathwayId=r,Qp(t),this.hls.trigger(dc.LEVELS_UPDATED,{levels:t});const e=this.hls.levels[a];o&&e&&this.levels&&(e.attrs["STABLE-VARIANT-ID"]!==o.attrs["STABLE-VARIANT-ID"]&&e.bitrate!==o.bitrate&&this.log(`Unstable Pathways change from bitrate ${o.bitrate} to ${e.bitrate}`),this.hls.nextLoadLevel=a);break}}}getPathwayForGroupId(e,t,i){const s=this.getLevelsForPathway(i).concat(this.levels||[]);for(let i=0;i<s.length;i++)if(t===fp&&s[i].hasAudioGroup(e)||t===mp&&s[i].hasSubtitleGroup(e))return s[i].pathwayId;return i}clonePathways(e){const t=this.levels;if(!t)return;const i={},s={};e.forEach((e=>{const{ID:r,"BASE-ID":a,"URI-REPLACEMENT":o}=e;if(t.some((e=>e.pathwayId===r)))return;const n=this.getLevelsForPathway(a).map((e=>{const t=new bc(e.attrs);t["PATHWAY-ID"]=r;const a=t.AUDIO&&`${t.AUDIO}_clone_${r}`,n=t.SUBTITLES&&`${t.SUBTITLES}_clone_${r}`;a&&(i[t.AUDIO]=a,t.AUDIO=a),n&&(s[t.SUBTITLES]=n,t.SUBTITLES=n);const l=Zy(e.uri,t["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",o),d=new zp({attrs:t,audioCodec:e.audioCodec,bitrate:e.bitrate,height:e.height,name:e.name,url:l,videoCodec:e.videoCodec,width:e.width});if(e.audioGroups)for(let t=1;t<e.audioGroups.length;t++)d.addGroupId("audio",`${e.audioGroups[t]}_clone_${r}`);if(e.subtitleGroups)for(let t=1;t<e.subtitleGroups.length;t++)d.addGroupId("text",`${e.subtitleGroups[t]}_clone_${r}`);return d}));t.push(...n),Xy(this.audioTracks,i,o,r),Xy(this.subtitleTracks,s,o,r)}))}loadSteeringManifest(e){const t=this.hls.config,i=t.loader;let s;this.loader&&this.loader.destroy(),this.loader=new i(t);try{s=new self.URL(e)}catch(t){return this.enabled=!1,void this.log(`Failed to parse Steering Manifest URI: ${e}`)}if("data:"!==s.protocol){const e=0|(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate);s.searchParams.set("_HLS_pathway",this.pathwayId),s.searchParams.set("_HLS_throughput",""+e)}const r={responseType:"json",url:s.href},a=t.steeringManifestLoadPolicy.default,o=a.errorRetry||a.timeoutRetry||{},n={loadPolicy:a,timeout:a.maxLoadTimeMs,maxRetry:o.maxNumRetry||0,retryDelay:o.retryDelayMs||0,maxRetryDelay:o.maxRetryDelayMs||0},l={onSuccess:(e,t,i,r)=>{this.log(`Loaded steering manifest: "${s}"`);const a=e.data;if(1!==a.VERSION)return void this.log(`Steering VERSION ${a.VERSION} not supported!`);this.updated=performance.now(),this.timeToLoad=a.TTL;const{"RELOAD-URI":o,"PATHWAY-CLONES":n,"PATHWAY-PRIORITY":l}=a;if(o)try{this.uri=new self.URL(o,s).href}catch(e){return this.enabled=!1,void this.log(`Failed to parse Steering Manifest RELOAD-URI: ${o}`)}this.scheduleRefresh(this.uri||i.url),n&&this.clonePathways(n);const d={steeringManifest:a,url:s.toString()};this.hls.trigger(dc.STEERING_MANIFEST_LOADED,d),l&&this.updatePathwayPriority(l)},onError:(e,t,i,s)=>{if(this.log(`Error loading steering manifest: ${e.code} ${e.text} (${t.url})`),this.stopLoad(),410===e.code)return this.enabled=!1,void this.log(`Steering manifest ${t.url} no longer available`);let r=1e3*this.timeToLoad;if(429!==e.code)this.scheduleRefresh(this.uri||t.url,r);else{const e=this.loader;if("function"==typeof(null==e?void 0:e.getResponseHeader)){const t=e.getResponseHeader("Retry-After");t&&(r=1e3*parseFloat(t))}this.log(`Steering manifest ${t.url} rate limited`)}},onTimeout:(e,t,i)=>{this.log(`Timeout loading steering manifest (${t.url})`),this.scheduleRefresh(this.uri||t.url)}};this.log(`Requesting steering manifest: ${s}`),this.loader.load(r,n,l)}scheduleRefresh(e,t=1e3*this.timeToLoad){this.clearTimeout(),this.reloadTimer=self.setTimeout((()=>{var t;const i=null==(t=this.hls)?void 0:t.media;!i||i.ended?this.scheduleRefresh(e,1e3*this.timeToLoad):this.loadSteeringManifest(e)}),t)}}});function dA(e){return e&&"object"==typeof e?Array.isArray(e)?e.map(dA):Object.keys(e).reduce(((t,i)=>(t[i]=dA(e[i]),t)),{}):e}function hA(e){const t=e.loader;if(t!==sA&&t!==tA)gc.log("[config]: Custom loader detected, cannot enable progressive streaming"),e.progressive=!1;else{(function(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(e){}return!1})()&&(e.loader=sA,e.progressive=!0,e.enableSoftwareAES=!0,gc.log("[config]: Progressive streaming enabled, using FetchLoader"))}}let cA;class uA extends mf{constructor(e,t){super(e,"[level-controller]"),this._levels=[],this._firstLevel=-1,this._maxAutoLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=t,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(dc.LEVEL_LOADED,this.onLevelLoaded,this),e.on(dc.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(dc.FRAG_BUFFERED,this.onFragBuffered,this),e.on(dc.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(dc.LEVEL_LOADED,this.onLevelLoaded,this),e.off(dc.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(dc.FRAG_BUFFERED,this.onFragBuffered,this),e.off(dc.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach((e=>{e.loadError=0,e.fragmentError=0})),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const i=this.hls.config.preferManagedMediaSource,s=[],r={},a={};let o=!1,n=!1,l=!1;t.levels.forEach((e=>{var t,d;const h=e.attrs;let{audioCodec:c,videoCodec:u}=e;-1!==(null==(t=c)?void 0:t.indexOf("mp4a.40.34"))&&(cA||(cA=/chrome|firefox/i.test(navigator.userAgent)),cA&&(e.audioCodec=c=void 0)),c&&(e.audioCodec=c=Qu(c,i)),0===(null==(d=u)?void 0:d.indexOf("avc1"))&&(u=e.videoCodec=function(e){const t=e.split(".");if(t.length>2){let e=t.shift()+".";return e+=parseInt(t.shift()).toString(16),e+=("000"+parseInt(t.shift()).toString(16)).slice(-4),e}return e}(u));const{width:p,height:f,unknownCodecs:m}=e;if(o||(o=!(!p||!f)),n||(n=!!u),l||(l=!!c),null!=m&&m.length||c&&!Hu(c,"audio",i)||u&&!Hu(u,"video",i))return;const{CODECS:g,"FRAME-RATE":y,"HDCP-LEVEL":A,"PATHWAY-ID":b,RESOLUTION:_,"VIDEO-RANGE":v}=h,w=`${`${b||"."}-`}${e.bitrate}-${_}-${y}-${g}-${v}-${A}`;if(r[w])if(r[w].uri===e.url||e.attrs["PATHWAY-ID"])r[w].addGroupId("audio",h.AUDIO),r[w].addGroupId("text",h.SUBTITLES);else{const t=a[w]+=1;e.attrs["PATHWAY-ID"]=new Array(t+1).join(".");const i=new zp(e);r[w]=i,s.push(i)}else{const t=new zp(e);r[w]=t,a[w]=1,s.push(t)}})),this.filterAndSortMediaOptions(s,t,o,n,l)}filterAndSortMediaOptions(e,t,i,s,r){let a=[],o=[],n=e;if((i||s)&&r&&(n=n.filter((({videoCodec:e,videoRange:t,width:i,height:s})=>{return(!!e||!(!i||!s))&&(!!(r=t)&&Fp.indexOf(r)>-1);var r}))),0===n.length)return void Promise.resolve().then((()=>{if(this.hls){t.levels.length&&this.warn(`One or more CODECS in variant not supported: ${JSON.stringify(t.levels[0].attrs)}`);const e=new Error("no level with compatible codecs found in manifest");this.hls.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:e,reason:e.message})}}));if(t.audioTracks){const{preferManagedMediaSource:e}=this.hls.config;a=t.audioTracks.filter((t=>!t.audioCodec||Hu(t.audioCodec,"audio",e))),pA(a)}t.subtitles&&(o=t.subtitles,pA(o));const l=n.slice(0);n.sort(((e,t)=>{if(e.attrs["HDCP-LEVEL"]!==t.attrs["HDCP-LEVEL"])return(e.attrs["HDCP-LEVEL"]||"")>(t.attrs["HDCP-LEVEL"]||"")?1:-1;if(i&&e.height!==t.height)return e.height-t.height;if(e.frameRate!==t.frameRate)return e.frameRate-t.frameRate;if(e.videoRange!==t.videoRange)return Fp.indexOf(e.videoRange)-Fp.indexOf(t.videoRange);if(e.videoCodec!==t.videoCodec){const i=Ju(e.videoCodec),s=Ju(t.videoCodec);if(i!==s)return s-i}if(e.uri===t.uri&&e.codecSet!==t.codecSet){const i=qu(e.codecSet),s=qu(t.codecSet);if(i!==s)return s-i}return e.averageBitrate!==t.averageBitrate?e.averageBitrate-t.averageBitrate:0}));let d=l[0];if(this.steering&&(n=this.steering.filterParsedLevels(n),n.length!==l.length))for(let e=0;e<l.length;e++)if(l[e].pathwayId===n[0].pathwayId){d=l[e];break}this._levels=n;for(let e=0;e<n.length;e++)if(n[e]===d){var h;this._firstLevel=e;const t=d.bitrate,i=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${n.length} level(s) found, first bitrate: ${t}`),void 0===(null==(h=this.hls.userConfig)?void 0:h.abrEwmaDefaultEstimate)){const e=Math.min(t,this.hls.config.abrEwmaDefaultEstimateMax);e>i&&i===lA.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=e)}break}const c=r&&!s,u={levels:n,audioTracks:a,subtitleTracks:o,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:r,video:s,altAudio:!c&&a.some((e=>!!e.url))};this.hls.trigger(dc.MANIFEST_PARSED,u),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}get levels(){return 0===this._levels.length?null:this._levels}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(0===t.length)return;if(e<0||e>=t.length){const i=new Error("invalid level idx"),s=e<0;if(this.hls.trigger(dc.ERROR,{type:hc.OTHER_ERROR,details:cc.LEVEL_SWITCH_ERROR,level:e,fatal:s,error:i,reason:i.message}),s)return;e=Math.min(e,t.length-1)}const i=this.currentLevelIndex,s=this.currentLevel,r=s?s.attrs["PATHWAY-ID"]:void 0,a=t[e],o=a.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=a,i===e&&a.details&&s&&r===o)return;this.log(`Switching to level ${e} (${a.height?a.height+"p ":""}${a.videoRange?a.videoRange+" ":""}${a.codecSet?a.codecSet+" ":""}@${a.bitrate})${o?" with Pathway "+o:""} from level ${i}${r?" with Pathway "+r:""}`);const n={level:e,attrs:a.attrs,details:a.details,bitrate:a.bitrate,averageBitrate:a.averageBitrate,maxBitrate:a.maxBitrate,realBitrate:a.realBitrate,width:a.width,height:a.height,codecSet:a.codecSet,audioCodec:a.audioCodec,videoCodec:a.videoCodec,audioGroups:a.audioGroups,subtitleGroups:a.subtitleGroups,loaded:a.loaded,loadError:a.loadError,fragmentError:a.fragmentError,name:a.name,id:a.id,uri:a.uri,url:a.url,urlId:0,audioGroupIds:a.audioGroupIds,textGroupIds:a.textGroupIds};this.hls.trigger(dc.LEVEL_SWITCHING,n);const l=a.details;if(!l||l.live){const e=this.switchParams(a.uri,null==s?void 0:s.details);this.loadPlaylist(e)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(void 0===this._startLevel){const e=this.hls.config.startLevel;return void 0!==e?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}onError(e,t){!t.fatal&&t.context&&t.context.type===pp&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(void 0!==t&&t.type===gp){const e=t.elementaryStreams;if(!Object.keys(e).some((t=>!!e[t])))return;const i=this._levels[t.level];null!=i&&i.loadError&&(this.log(`Resetting level error count of ${i.loadError} on frag buffered`),i.loadError=0)}}onLevelLoaded(e,t){var i;const{level:s,details:r}=t,a=this._levels[s];var o;if(!a)return this.warn(`Invalid level index ${s}`),void(null!=(o=t.deliveryDirectives)&&o.skip&&(r.deltaUpdateFailed=!0));s===this.currentLevelIndex?(0===a.fragmentError&&(a.loadError=0),this.playlistLoaded(s,t,a.details)):null!=(i=t.deliveryDirectives)&&i.skip&&(r.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist();const t=this.currentLevelIndex,i=this.currentLevel;if(i&&this.shouldLoadPlaylist(i)){let s=i.uri;if(e)try{s=e.addDirectives(s)}catch(e){this.warn(`Could not construct new URL with HLS Delivery Directives: ${e}`)}const r=i.attrs["PATHWAY-ID"];this.log(`Loading level index ${t}${void 0!==(null==e?void 0:e.msn)?" at sn "+e.msn+" part "+e.part:""} with${r?" Pathway "+r:""} ${s}`),this.clearTimer(),this.hls.trigger(dc.LEVEL_LOADING,{url:s,level:t,pathwayId:i.attrs["PATHWAY-ID"],id:0,deliveryDirectives:e||null})}}get nextLoadLevel(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;const i=this._levels.filter(((t,i)=>i!==e||(this.steering&&this.steering.removeLevel(t),t===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,t.details&&t.details.fragments.forEach((e=>e.level=-1))),!1)));Qp(i),this._levels=i,this.currentLevelIndex>-1&&null!=(t=this.currentLevel)&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.hls.trigger(dc.LEVELS_UPDATED,{levels:i})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:i}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(dc.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:i}))}}function pA(e){const t={};e.forEach((e=>{const i=e.groupId||"";e.id=t[i]=t[i]||0,t[i]++}))}class fA{constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const i in this.keyUriToKeyInfo){const s=this.keyUriToKeyInfo[i].loader;if(s){var t;if(e&&e!==(null==(t=s.context)?void 0:t.frag.type))return;s.abort()}}}detach(){for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}}createKeyLoadError(e,t=cc.KEY_LOAD_ERROR,i,s,r){return new qf({type:hc.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:r,error:i,networkDetails:s})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled){const{sn:i,cc:s}=e;for(let e=0;e<t.length;e++){const r=t[e];if(s<=r.cc&&("initSegment"===i||"initSegment"===r.sn||i<r.sn)){this.emeController.selectKeySystemFormat(r).then((e=>{r.setKeyFormat(e)}));break}}}}load(e){return!e.decryptdata&&e.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(e).then((t=>this.loadInternal(e,t))):this.loadInternal(e)}loadInternal(e,t){var i,s;t&&e.setKeyFormat(t);const r=e.decryptdata;if(!r){const i=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,cc.KEY_LOAD_ERROR,i))}const a=r.uri;if(!a)return Promise.reject(this.createKeyLoadError(e,cc.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${a}"`)));let o=this.keyUriToKeyInfo[a];if(null!=(i=o)&&i.decryptdata.key)return r.key=o.decryptdata.key,Promise.resolve({frag:e,keyInfo:o});var n;if(null!=(s=o)&&s.keyLoadPromise)switch(null==(n=o.mediaKeySessionContext)?void 0:n.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return o.keyLoadPromise.then((t=>(r.key=t.keyInfo.decryptdata.key,{frag:e,keyInfo:o})))}switch(o=this.keyUriToKeyInfo[a]={decryptdata:r,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},r.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return"identity"===r.keyFormat?this.loadKeyHTTP(o,e):this.loadKeyEME(o,e);case"AES-128":return this.loadKeyHTTP(o,e);default:return Promise.reject(this.createKeyLoadError(e,cc.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${r.method}"`)))}}loadKeyEME(e,t){const i={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const t=this.emeController.loadKey(i);if(t)return(e.keyLoadPromise=t.then((t=>(e.mediaKeySessionContext=t,i)))).catch((t=>{throw e.keyLoadPromise=null,t}))}return Promise.resolve(i)}loadKeyHTTP(e,t){const i=this.config,s=new(0,i.loader)(i);return t.keyLoader=e.loader=s,e.keyLoadPromise=new Promise(((r,a)=>{const o={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},n=i.keyLoadPolicy.default,l={loadPolicy:n,timeout:n.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(e,t,i,s)=>{const{frag:o,keyInfo:n,url:l}=i;if(!o.decryptdata||n!==this.keyUriToKeyInfo[l])return a(this.createKeyLoadError(o,cc.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),s));n.decryptdata.key=o.decryptdata.key=new Uint8Array(e.data),o.keyLoader=null,n.loader=null,r({frag:o,keyInfo:n})},onError:(e,i,s,r)=>{this.resetLoader(i),a(this.createKeyLoadError(t,cc.KEY_LOAD_ERROR,new Error(`HTTP Error ${e.code} loading key ${e.text}`),s,ic({url:o.url,data:void 0},e)))},onTimeout:(e,i,s)=>{this.resetLoader(i),a(this.createKeyLoadError(t,cc.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),s))},onAbort:(e,i,s)=>{this.resetLoader(i),a(this.createKeyLoadError(t,cc.INTERNAL_ABORTED,new Error("key loading aborted"),s))}};s.load(o,l,d)}))}resetLoader(e){const{frag:t,keyInfo:i,url:s}=e,r=i.loader;t.keyLoader===r&&(t.keyLoader=null,i.loader=null),delete this.keyUriToKeyInfo[s],r&&r.destroy()}}function mA(){return self.SourceBuffer||self.WebKitSourceBuffer}function gA(){if(!zu())return!1;const e=mA();return!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove}class yA{constructor(e,t,i,s){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=i,this.hls=s}destroy(){this.media=null,this.hls=this.fragmentTracker=null}poll(e,t){const{config:i,media:s,stalled:r}=this;if(null===s)return;const{currentTime:a,seeking:o}=s,n=this.seeking&&!o,l=!this.seeking&&o;if(this.seeking=o,a!==e){if(this.moved=!0,o||(this.nudgeRetry=0),null!==r){if(this.stallReported){const e=self.performance.now()-r;gc.warn(`playback not stuck anymore @${a}, after ${Math.round(e)}ms`),this.stallReported=!1}this.stalled=null}return}if(l||n)return void(this.stalled=null);if(s.paused&&!o||s.ended||0===s.playbackRate||!Ff.getBuffered(s).length)return void(this.nudgeRetry=0);const d=Ff.bufferInfo(s,a,0),h=d.nextStart||0;if(o){const e=d.len>2,i=!h||t&&t.start<=a||h-a>2&&!this.fragmentTracker.getPartialFragment(a);if(e||i)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var c;if(!(d.len>0)&&!h)return;const e=Math.max(h,d.start||0)-a,t=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,i=(null==t||null==(c=t.details)?void 0:c.live)?2*t.details.targetduration:2,r=this.fragmentTracker.getPartialFragment(a);if(e>0&&(e<=i||r))return void(s.paused||this._trySkipBufferHole(r))}const u=self.performance.now();if(null===r)return void(this.stalled=u);const p=u-r;if(!o&&p>=250&&(this._reportStall(d),!this.media))return;const f=Ff.bufferInfo(s,a,i.maxBufferHole);this._tryFixBufferStall(f,p)}_tryFixBufferStall(e,t){const{config:i,fragmentTracker:s,media:r}=this;if(null===r)return;const a=r.currentTime,o=s.getPartialFragment(a);if(o){if(this._trySkipBufferHole(o)||!this.media)return}(e.len>i.maxBufferHole||e.nextStart&&e.nextStart-a<i.maxBufferHole)&&t>1e3*i.highBufferWatchdogPeriod&&(gc.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}_reportStall(e){const{hls:t,media:i,stallReported:s}=this;if(!s&&i){this.stallReported=!0;const s=new Error(`Playback stalling at @${i.currentTime} due to low buffer (${JSON.stringify(e)})`);gc.warn(s.message),t.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.BUFFER_STALLED_ERROR,fatal:!1,error:s,buffer:e.len})}}_trySkipBufferHole(e){const{config:t,hls:i,media:s}=this;if(null===s)return 0;const r=s.currentTime,a=Ff.bufferInfo(s,r,0),o=r<a.start?a.start:a.nextStart;if(o){const n=a.len<=t.maxBufferHole,l=a.len>0&&a.len<1&&s.readyState<3,d=o-r;if(d>0&&(n||l)){if(d>t.maxBufferHole){const{fragmentTracker:t}=this;let i=!1;if(0===r){const e=t.getAppendedFrag(0,gp);e&&o<e.end&&(i=!0)}if(!i){const i=e||t.getAppendedFrag(r,gp);if(i){let e=!1,s=i.end;for(;s<o;){const i=t.getPartialFragment(s);if(!i){e=!0;break}s+=i.duration}if(e)return 0}}}const a=Math.max(o+.05,r+.1);if(gc.warn(`skipping hole, adjusting currentTime from ${r} to ${a}`),this.moved=!0,this.stalled=null,s.currentTime=a,e&&!e.gap){const t=new Error(`fragment loaded with buffer holes, seeking from ${r} to ${a}`);i.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:t,reason:t.message,frag:e})}return a}}return 0}_tryNudgeBuffer(){const{config:e,hls:t,media:i,nudgeRetry:s}=this;if(null===i)return;const r=i.currentTime;if(this.nudgeRetry++,s<e.nudgeMaxRetry){const a=r+(s+1)*e.nudgeOffset,o=new Error(`Nudging 'currentTime' from ${r} to ${a}`);gc.warn(o.message),i.currentTime=a,t.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.BUFFER_NUDGE_ON_STALL,error:o,fatal:!1})}else{const i=new Error(`Playhead still not moving while enough data buffered @${r} after ${e.nudgeMaxRetry} nudges`);gc.error(i.message),t.trigger(dc.ERROR,{type:hc.MEDIA_ERROR,details:cc.BUFFER_STALLED_ERROR,error:i,fatal:!0})}}}class AA extends um{constructor(e,t,i){super(e,t,i,"[stream-controller]",gp),this.audioCodecSwap=!1,this.gapController=null,this.level=-1,this._forceStartLoad=!1,this.altAudio=!1,this.audioOnly=!1,this.fragPlaying=null,this.onvplaying=null,this.onvseeked=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(dc.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(dc.MANIFEST_PARSED,this.onManifestParsed,this),e.on(dc.LEVEL_LOADING,this.onLevelLoading,this),e.on(dc.LEVEL_LOADED,this.onLevelLoaded,this),e.on(dc.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(dc.ERROR,this.onError,this),e.on(dc.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(dc.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(dc.BUFFER_CREATED,this.onBufferCreated,this),e.on(dc.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(dc.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(dc.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(dc.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(dc.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(dc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(dc.MANIFEST_PARSED,this.onManifestParsed,this),e.off(dc.LEVEL_LOADED,this.onLevelLoaded,this),e.off(dc.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(dc.ERROR,this.onError,this),e.off(dc.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(dc.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(dc.BUFFER_CREATED,this.onBufferCreated,this),e.off(dc.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(dc.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(dc.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying()}startLoad(e){if(this.levels){const{lastCurrentTime:t,hls:i}=this;if(this.stopLoad(),this.setInterval(100),this.level=-1,!this.startFragRequested){let e=i.startLevel;-1===e&&(i.config.testBandwidth&&this.levels.length>1?(e=0,this.bitrateTest=!0):e=i.firstAutoLevel),i.nextLoadLevel=e,this.level=i.loadLevel,this.loadedmetadata=!1}t>0&&-1===e&&(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t),this.state=tm,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=em}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case cm:{const{levels:e,level:t}=this,i=null==e?void 0:e[t],s=null==i?void 0:i.details;if(s&&(!s.live||this.levelLastLoaded===i)){if(this.waitForCdnTuneIn(s))break;this.state=tm;break}if(this.hls.nextLoadLevel!==this.level){this.state=tm;break}break}case rm:{var e;const t=self.performance.now(),i=this.retryDate;if(!i||t>=i||null!=(e=this.media)&&e.seeking){const{levels:e,level:t}=this,i=null==e?void 0:e[t];this.resetStartWhenNotLoaded(i||null),this.state=tm}}}this.state===tm&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){super.onTickEnd(),this.checkBuffer(),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:i,media:s}=this;if(null===t||!s&&(this.startFragRequested||!e.config.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;const r=e.nextLoadLevel;if(null==i||!i[r])return;const a=i[r],o=this.getMainFwdBufferInfo();if(null===o)return;const n=this.getLevelDetails();if(n&&this._streamEnded(o,n)){const e={};return this.altAudio&&(e.type="video"),this.hls.trigger(dc.BUFFER_EOS,e),void(this.state=lm)}e.loadLevel!==r&&-1===e.manualLevel&&this.log(`Adapting to level ${r} from level ${this.level}`),this.level=e.nextLoadLevel=r;const l=a.details;if(!l||this.state===cm||l.live&&this.levelLastLoaded!==a)return this.level=r,void(this.state=cm);const d=o.len,h=this.getMaxBufferLength(a.maxBitrate);if(d>=h)return;this.backtrackFragment&&this.backtrackFragment.start>o.end&&(this.backtrackFragment=null);const c=this.backtrackFragment?this.backtrackFragment.start:o.end;let u=this.getNextFragment(c,l);if(this.couldBacktrack&&!this.fragPrevious&&u&&"initSegment"!==u.sn&&this.fragmentTracker.getState(u)!==If){var p;const e=(null!=(p=this.backtrackFragment)?p:u).sn-l.startSN,t=l.fragments[e-1];t&&u.cc===t.cc&&(u=t,this.fragmentTracker.removeFragment(t))}else this.backtrackFragment&&o.len&&(this.backtrackFragment=null);if(u&&this.isLoopLoading(u,c)){if(!u.gap){const e=this.audioOnly&&!this.altAudio?Sc:Tc,t=(e===Tc?this.videoBuffer:this.mediaBuffer)||this.media;t&&this.afterBufferFlushed(t,e,gp)}u=this.getNextFragmentLoopLoading(u,l,o,gp,h)}u&&(!u.initSegment||u.initSegment.data||this.bitrateTest||(u=u.initSegment),this.loadFragment(u,a,c))}loadFragment(e,t,i){const s=this.fragmentTracker.getState(e);this.fragCurrent=e,s===Rf||s===Lf?"initSegment"===e.sn?this._loadInitSegment(e,t):this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):(this.startFragRequested=!0,super.loadFragment(e,t,i)):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,gp)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(null!=t&&t.readyState){let i;const s=this.getAppendedFrag(t.currentTime);s&&s.start>1&&this.flushMainBuffer(0,s.start-1);const r=this.getLevelDetails();if(null!=r&&r.live){const e=this.getMainFwdBufferInfo();if(!e||e.len<2*r.targetduration)return}if(!t.paused&&e){const t=e[this.hls.nextLoadLevel],s=this.fragLastKbps;i=s&&this.fragCurrent?this.fragCurrent.duration*t.maxBitrate/(1e3*s)+1:0}else i=0;const a=this.getBufferedFrag(t.currentTime+i);if(a){const e=this.followingBufferedFrag(a);if(e){this.abortCurrentFrag();const t=e.maxStartPTS?e.maxStartPTS:e.start,i=e.duration,s=Math.max(a.end,t+Math.min(Math.max(i-this.config.maxFragLookUpTolerance,i*(this.couldBacktrack?.5:.125)),i*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(s,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case im:case sm:case rm:case om:case nm:this.state=tm}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const i=t.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),i.addEventListener("playing",this.onvplaying),i.addEventListener("seeked",this.onvseeked),this.gapController=new yA(this.config,i,this.fragmentTracker,this.hls)}onMediaDetaching(){const{media:e}=this;e&&this.onvplaying&&this.onvseeked&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),super.onMediaDetaching()}onMediaPlaying(){this.tick()}onMediaSeeked(){const e=this.media,t=e?e.currentTime:null;oc(t)&&this.log(`Media seeked to ${t.toFixed(3)}`);const i=this.getMainFwdBufferInfo();null!==i&&0!==i.len?this.tick():this.warn(`Main forward buffer length on "seeked" event ${i?i.len:"empty"})`)}onManifestLoading(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(dc.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=this.fragLastKbps=0,this.levels=this.fragPlaying=this.backtrackFragment=this.levelLastLoaded=null,this.altAudio=this.audioOnly=this.startFragRequested=!1}onManifestParsed(e,t){let i=!1,s=!1;t.levels.forEach((e=>{const t=e.audioCodec;t&&(i=i||-1!==t.indexOf("mp4a.40.2"),s=s||-1!==t.indexOf("mp4a.40.5"))})),this.audioCodecSwitch=i&&s&&!function(){var e;const t=mA();return"function"==typeof(null==t||null==(e=t.prototype)?void 0:e.changeType)}(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1}onLevelLoading(e,t){const{levels:i}=this;if(!i||this.state!==tm)return;const s=i[t.level];(!s.details||s.details.live&&this.levelLastLoaded!==s||this.waitForCdnTuneIn(s.details))&&(this.state=cm)}onLevelLoaded(e,t){var i;const{levels:s}=this,r=t.level,a=t.details,o=a.totalduration;if(!s)return void this.warn(`Levels were reset while loading level ${r}`);this.log(`Level ${r} loaded [${a.startSN},${a.endSN}]${a.lastPartSn?`[part-${a.lastPartSn}-${a.lastPartIndex}]`:""}, cc [${a.startCC}, ${a.endCC}] duration:${o}`);const n=s[r],l=this.fragCurrent;!l||this.state!==sm&&this.state!==rm||l.level!==t.level&&l.loader&&this.abortCurrentFrag();let d=0;if(a.live||null!=(i=n.details)&&i.live){var h;if(this.checkLiveUpdate(a),a.deltaUpdateFailed)return;d=this.alignPlaylists(a,n.details,null==(h=this.levelLastLoaded)?void 0:h.details)}if(n.details=a,this.levelLastLoaded=n,this.hls.trigger(dc.LEVEL_UPDATED,{details:a,level:r}),this.state===cm){if(this.waitForCdnTuneIn(a))return;this.state=tm}this.startFragRequested?a.live&&this.synchronizeToLiveEdge(a):this.setStartPosition(a,d),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:i,part:s,payload:r}=e,{levels:a}=this;if(!a)return void this.warn(`Levels were reset while fragment load was in progress. Fragment ${i.sn} of level ${i.level} will not be buffered`);const o=a[i.level],n=o.details;if(!n)return this.warn(`Dropping fragment ${i.sn} of level ${i.level} after level details were reset`),void this.fragmentTracker.removeFragment(i);const l=o.videoCodec,d=n.PTSKnown||!n.live,h=null==(t=i.initSegment)?void 0:t.data,c=this._getAudioCodec(o),u=this.transmuxer=this.transmuxer||new Ag(this.hls,gp,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),p=s?s.index:-1,f=-1!==p,m=new Of(i.level,i.sn,i.stats.chunkCount,r.byteLength,p,f),g=this.initPTS[i.cc];u.push(r,h,c,l,i,s,n.totalduration,d,m,g)}onAudioTrackSwitching(e,t){const i=this.altAudio;if(!!!t.url){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const e=this.fragCurrent;e&&(this.log("Switching to main audio track, cancel main fragment load"),e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();const e=this.hls;i&&(e.trigger(dc.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),e.trigger(dc.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const i=t.id,s=!!this.hls.audioTracks[i].url;if(s){const e=this.videoBuffer;e&&this.mediaBuffer!==e&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=e)}this.altAudio=s,this.tick()}onBufferCreated(e,t){const i=t.tracks;let s,r,a=!1;for(const e in i){const t=i[e];if("main"===t.id){if(r=e,s=t,"video"===e){const t=i[e];t&&(this.videoBuffer=t.buffer)}}else a=!0}a&&s?(this.log(`Alternate track found, use ${r}.buffered to schedule main fragment loading`),this.mediaBuffer=s.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:i,part:s}=t;if(i&&i.type!==gp)return;if(this.fragContextChanged(i))return this.warn(`Fragment ${i.sn}${s?" p: "+s.index:""} of level ${i.level} finished buffering, but was aborted. state: ${this.state}`),void(this.state===nm&&(this.state=tm));const r=s?s.stats:i.stats;this.fragLastKbps=Math.round(8*r.total/(r.buffering.end-r.loading.first)),"initSegment"!==i.sn&&(this.fragPrevious=i),this.fragBufferedComplete(i,s)}onError(e,t){var i;if(t.fatal)this.state=dm;else switch(t.details){case cc.FRAG_GAP:case cc.FRAG_PARSING_ERROR:case cc.FRAG_DECRYPT_ERROR:case cc.FRAG_LOAD_ERROR:case cc.FRAG_LOAD_TIMEOUT:case cc.KEY_LOAD_ERROR:case cc.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(gp,t);break;case cc.LEVEL_LOAD_ERROR:case cc.LEVEL_LOAD_TIMEOUT:case cc.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==cm||(null==(i=t.context)?void 0:i.type)!==pp||(this.state=tm);break;case cc.BUFFER_APPEND_ERROR:case cc.BUFFER_FULL_ERROR:if(!t.parent||"main"!==t.parent)return;if(t.details===cc.BUFFER_APPEND_ERROR)return void this.resetLoadingState();this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case cc.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}}checkBuffer(){const{media:e,gapController:t}=this;if(e&&t&&e.readyState){if(this.loadedmetadata||!Ff.getBuffered(e).length){const e=this.state!==tm?this.fragCurrent:null;t.poll(this.lastCurrentTime,e)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=tm,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==Sc||this.audioOnly&&!this.altAudio){const e=(t===Tc?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(e,t,gp),this.tick()}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let i=this.startPosition;if(i>=0&&t<i){if(e.seeking)return void this.log(`could not seek to ${i}, already seeking at ${t}`);const s=Ff.getBuffered(e),r=(s.length?s.start(0):0)-i;r>0&&(r<this.config.maxBufferHole||r<this.config.maxFragLookUpTolerance)&&(this.log(`adjusting start position by ${r} to match buffer start`),i+=r,this.startPosition=i),this.log(`seek to target start position ${i} from current time ${t}`),e.currentTime=i}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then((i=>{const{hls:s}=this;if(!i||this.fragContextChanged(e))return;t.fragmentError=0,this.state=tm,this.startFragRequested=!1,this.bitrateTest=!1;const r=e.stats;r.parsing.start=r.parsing.end=r.buffering.start=r.buffering.end=self.performance.now(),s.trigger(dc.FRAG_LOADED,i),e.bitrateTest=!1}))}_handleTransmuxComplete(e){var t;const i="main",{hls:s}=this,{remuxResult:r,chunkMeta:a}=e,o=this.getCurrentContext(a);if(!o)return void this.resetWhenMissingContext(a);const{frag:n,part:l,level:d}=o,{video:h,text:c,id3:u,initSegment:p}=r,{details:f}=d,m=this.altAudio?void 0:r.audio;if(this.fragContextChanged(n))this.fragmentTracker.removeFragment(n);else{if(this.state=om,p){if(null!=p&&p.tracks){const e=n.initSegment||n;this._bufferInitSegment(d,p.tracks,e,a),s.trigger(dc.FRAG_PARSING_INIT_SEGMENT,{frag:e,id:i,tracks:p.tracks})}const e=p.initPTS,t=p.timescale;oc(e)&&(this.initPTS[n.cc]={baseTime:e,timescale:t},s.trigger(dc.INIT_PTS_FOUND,{frag:n,id:i,initPTS:e,timescale:t}))}if(h&&f&&"initSegment"!==n.sn){const e=f.fragments[n.sn-1-f.startSN],t=n.sn===f.startSN,i=!e||n.cc>e.cc;if(!1!==r.independent){const{startPTS:e,endPTS:s,startDTS:r,endDTS:o}=h;if(l)l.elementaryStreams[h.type]={startPTS:e,endPTS:s,startDTS:r,endDTS:o};else if(h.firstKeyFrame&&h.independent&&1===a.id&&!i&&(this.couldBacktrack=!0),h.dropped&&h.independent){const r=this.getMainFwdBufferInfo(),a=(r?r.end:this.getLoadPosition())+this.config.maxBufferHole,l=h.firstKeyFramePTS?h.firstKeyFramePTS:e;if(!t&&a<l-this.config.maxBufferHole&&!i)return void this.backtrack(n);i&&(n.gap=!0),n.setElementaryStreamInfo(h.type,n.start,s,n.start,o,!0)}else t&&e>2&&(n.gap=!0);n.setElementaryStreamInfo(h.type,e,s,r,o),this.backtrackFragment&&(this.backtrackFragment=n),this.bufferFragmentData(h,n,l,a,t||i)}else{if(!t&&!i)return void this.backtrack(n);n.gap=!0}}if(m){const{startPTS:e,endPTS:t,startDTS:i,endDTS:s}=m;l&&(l.elementaryStreams[Sc]={startPTS:e,endPTS:t,startDTS:i,endDTS:s}),n.setElementaryStreamInfo(Sc,e,t,i,s),this.bufferFragmentData(m,n,l,a)}if(f&&null!=u&&null!=(t=u.samples)&&t.length){const e={id:i,frag:n,details:f,samples:u.samples};s.trigger(dc.FRAG_PARSING_METADATA,e)}if(f&&c){const e={id:i,frag:n,details:f,samples:c.samples};s.trigger(dc.FRAG_PARSING_USERDATA,e)}}}_bufferInitSegment(e,t,i,s){if(this.state!==om)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;const{audio:r,video:a,audiovideo:o}=t;if(r){let t=e.audioCodec;const i=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(t&&(t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),1!==r.metadata.channelCount&&-1===i.indexOf("firefox")&&(t="mp4a.40.5")),t&&-1!==t.indexOf("mp4a.40.5")&&-1!==i.indexOf("android")&&"audio/mpeg"!==r.container&&(t="mp4a.40.2",this.log(`Android: force audio codec to ${t}`)),e.audioCodec&&e.audioCodec!==t&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${t}"`),r.levelCodec=t,r.id="main",this.log(`Init audio buffer, container:${r.container}, codecs[selected/level/parsed]=[${t||""}/${e.audioCodec||""}/${r.codec}]`)}a&&(a.levelCodec=e.videoCodec,a.id="main",this.log(`Init video buffer, container:${a.container}, codecs[level/parsed]=[${e.videoCodec||""}/${a.codec}]`)),o&&this.log(`Init audiovideo buffer, container:${o.container}, codecs[level/parsed]=[${e.codecs}/${o.codec}]`),this.hls.trigger(dc.BUFFER_CODECS,t),Object.keys(t).forEach((e=>{const r=t[e].initSegment;null!=r&&r.byteLength&&this.hls.trigger(dc.BUFFER_APPENDING,{type:e,data:r,frag:i,part:null,chunkMeta:s,parent:i.type})})),this.tickImmediate()}getMainFwdBufferInfo(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,gp)}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=tm}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&!1===e.seeking){const i=e.currentTime;if(Ff.isBuffered(e,i)?t=this.getAppendedFrag(i):Ff.isBuffered(e,i+.1)&&(t=this.getAppendedFrag(i+.1)),t){this.backtrackFragment=null;const e=this.fragPlaying,i=t.level;e&&t.sn===e.sn&&e.level===i||(this.fragPlaying=t,this.hls.trigger(dc.FRAG_CHANGED,{frag:t}),e&&e.level===i||this.hls.trigger(dc.LEVEL_SWITCHED,{level:i}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){const e=this.media;return e?this.fragPlaying||this.getAppendedFrag(e.currentTime):null}get currentProgramDateTime(){const e=this.media;if(e){const t=e.currentTime,i=this.currentFrag;if(i&&oc(t)&&oc(i.programDateTime)){const e=i.programDateTime+1e3*(t-i.start);return new Date(e)}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class bA{static get version(){return"1.5.7"}static isMSESupported(){return gA()}static isSupported(){return function(){if(!gA())return!1;const e=zu();return"function"==typeof(null==e?void 0:e.isTypeSupported)&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some((t=>e.isTypeSupported(Wu(t,"video"))))||["mp4a.40.2","fLaC"].some((t=>e.isTypeSupported(Wu(t,"audio")))))}()}static getMediaSource(){return zu()}static get Events(){return dc}static get ErrorTypes(){return hc}static get ErrorDetails(){return cc}static get DefaultConfig(){return bA.defaultConfig?bA.defaultConfig:lA}static set DefaultConfig(e){bA.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this.started=!1,this._emitter=new yg,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null,this.triggeringException=void 0,function(e,t){if("object"==typeof console&&!0===e||"object"==typeof e){mc(e,"debug","log","info","warn","error");try{fc.log(`Debug logs enabled for "${t}" in hls.js version 1.5.7`)}catch(e){fc=pc}}else fc=pc}(e.debug||!1,"Hls instance");const t=this.config=function(e,t){if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==t.liveMaxLatencyDurationCount&&(void 0===t.liveSyncDurationCount||t.liveMaxLatencyDurationCount<=t.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==t.liveMaxLatencyDuration&&(void 0===t.liveSyncDuration||t.liveMaxLatencyDuration<=t.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const i=dA(e),s=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return["manifest","level","frag"].forEach((e=>{const r=`${"level"===e?"playlist":e}LoadPolicy`,a=void 0===t[r],o=[];s.forEach((s=>{const n=`${e}Loading${s}`,l=t[n];if(void 0!==l&&a){o.push(n);const e=i[r].default;switch(t[r]={default:e},s){case"TimeOut":e.maxLoadTimeMs=l,e.maxTimeToFirstByteMs=l;break;case"MaxRetry":e.errorRetry.maxNumRetry=l,e.timeoutRetry.maxNumRetry=l;break;case"RetryDelay":e.errorRetry.retryDelayMs=l,e.timeoutRetry.retryDelayMs=l;break;case"MaxRetryTimeout":e.errorRetry.maxRetryDelayMs=l,e.timeoutRetry.maxRetryDelayMs=l}}})),o.length&&gc.warn(`hls.js config: "${o.join('", "')}" setting(s) are deprecated, use "${r}": ${JSON.stringify(t[r])}`)})),ic(ic({},i),t)}(bA.DefaultConfig,e);this.userConfig=e,t.progressive&&hA(t);const{abrController:i,bufferController:s,capLevelController:r,errorController:a,fpsController:o}=t,n=new a(this),l=this.abrController=new i(this),d=this.bufferController=new s(this),h=this.capLevelController=new r(this),c=new o(this),u=new vp(this),p=new Bp(this),f=t.contentSteeringController,m=f?new f(this):null,g=this.levelController=new uA(this,m),y=new Pf(this),A=new fA(this.config),b=this.streamController=new AA(this,y,A);h.setStreamController(b),c.setStreamController(b);const _=[u,g,b];m&&_.splice(1,0,m),this.networkControllers=_;const v=[l,d,h,c,p,y];this.audioTrackController=this.createController(t.audioTrackController,_);const w=t.audioStreamController;w&&_.push(new w(this,y,A)),this.subtitleTrackController=this.createController(t.subtitleTrackController,_);const S=t.subtitleStreamController;S&&_.push(new S(this,y,A)),this.createController(t.timelineController,v),A.emeController=this.emeController=this.createController(t.emeController,v),this.cmcdController=this.createController(t.cmcdController,v),this.latencyController=this.createController(Mp,v),this.coreComponents=v,_.push(n);const T=n.onErrorOut;"function"==typeof T&&this.on(dc.ERROR,T,n)}createController(e,t){if(e){const i=new e(this);return t&&t.push(i),i}return null}on(e,t,i=this){this._emitter.on(e,t,i)}once(e,t,i=this){this._emitter.once(e,t,i)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,i=this,s){this._emitter.off(e,t,i,s)}listeners(e){return this._emitter.listeners(e)}emit(e,t,i){return this._emitter.emit(e,t,i)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(t){if(gc.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),!this.triggeringException){this.triggeringException=!0;const i=e===dc.ERROR;this.trigger(dc.ERROR,{type:hc.OTHER_ERROR,details:cc.INTERNAL_EXCEPTION,fatal:i,event:e,error:t}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){gc.log("destroy"),this.trigger(dc.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach((e=>e.destroy())),this.networkControllers.length=0,this.coreComponents.forEach((e=>e.destroy())),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){gc.log("attachMedia"),this._media=e,this.trigger(dc.MEDIA_ATTACHING,{media:e})}detachMedia(){gc.log("detachMedia"),this.trigger(dc.MEDIA_DETACHING,void 0),this._media=null}loadSource(e){this.stopLoad();const t=this.media,i=this.url,s=this.url=ec.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,gc.log(`loadSource:${s}`),t&&i&&(i!==s||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(dc.MANIFEST_LOADING,{url:e})}startLoad(e=-1){gc.log(`startLoad(${e})`),this.started=!0,this.networkControllers.forEach((t=>{t.startLoad(e)}))}stopLoad(){gc.log("stopLoad"),this.started=!1,this.networkControllers.forEach((e=>{e.stopLoad()}))}resumeBuffering(){this.started&&this.networkControllers.forEach((e=>{"fragmentLoader"in e&&e.startLoad(-1)}))}pauseBuffering(){this.networkControllers.forEach((e=>{"fragmentLoader"in e&&e.stopLoad()}))}swapAudioCodec(){gc.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){gc.log("recoverMediaError");const e=this._media;this.detachMedia(),e&&this.attachMedia(e)}removeLevel(e){this.levelController.removeLevel(e)}get levels(){const e=this.levelController.levels;return e||[]}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){gc.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){gc.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){gc.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){gc.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){const e=this.levelController.startLevel;return-1===e&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e}set startLevel(e){gc.log(`set startLevel:${e}`),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}set bandwidthEstimate(e){this.abrController.resetEstimator(e)}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(gc.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){(function(e){return Up.indexOf(e)>-1})(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return-1===this.levelController.manualLevel}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const i=e.length;for(let s=0;s<i;s++)if(e[s].maxBitrate>=t)return s;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:i}=this;let s;if(s=-1===t&&null!=e&&e.length?e.length-1:t,i)for(let t=s;t--;){const s=e[t].attrs["HDCP-LEVEL"];if(s&&s<=i)return t}return s}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}setAudioOption(e){var t;return null==(t=this.audioTrackController)?void 0:t.setAudioOption(e)}setSubtitleOption(e){var t;return null==(t=this.subtitleTrackController)||t.setSubtitleOption(e),null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return!!e&&e.subtitleDisplay}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}}bA.defaultConfig=void 0;class _A extends a{constructor(e){super(),this.player=e,this.TAG_NAME="HlsDecoder",e._opt,this.canVideoPlay=!1,this.$videoElement=null,this.canvasRenderInterval=null,this.bandwidthEstimateInterval=null,this.fpsInterval=null,this.hlsFps=0,this.hlsPrevFrams=0,this.isInitInfo=!1,this.eventsDestroy=[],this.supportVideoFrameCallbackHandle=null,this.player.isHlsCanVideoPlay()?(this.$videoElement=this.player.video.$videoElement,this.canVideoPlay=!0):bA.isSupported()?(this.$videoElement=this.player.video.$videoElement,this.hls=new bA({}),this._initHls(),this._bindEvents()):this.player.debug.error(this.TAG_NAME,"init hls error ,not support "),this.player.debug.log(this.TAG_NAME,"init")}destroy(){return new Promise(((e,t)=>{this.supportVideoFrameCallbackHandle&&this.$videoElement&&(this.$videoElement.cancelVideoFrameCallback(this.supportVideoFrameCallbackHandle),this.supportVideoFrameCallbackHandle=null),this.hls&&(this.hls.destroy(),this.hls=null),this.eventsDestroy.length&&(this.eventsDestroy.forEach((e=>e())),this.eventsDestroy=[]),this.isInitInfo=!1,this._stopCanvasRender(),this._stopBandwidthEstimateInterval(),this._stopFpsInterval(),this.$videoElement=null,this.hlsFps=0,this.player.debug.log(this.TAG_NAME,"destroy"),setTimeout((()=>{e()}),0)}))}checkHlsBufferedDelay(){const e=this.$videoElement;let t=0;const i=e.buffered,s=i.length?i.end(i.length-1):0;return t=s-e.currentTime,t<0&&(this.player.debug.warn(this.TAG_NAME,`checkHlsBufferedDelay ${t} < 0, and buffered is ${s} ,currentTime is ${e.currentTime} , try to seek ${e.currentTime} to ${s}`),e.currentTime=s,t=0),t}getFps(){return this.hlsFps}_startCanvasRender(){ko()?this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this)):(this._stopCanvasRender(),this.canvasRenderInterval=setInterval((()=>{this.player.video.render({$video:this.$videoElement,ts:parseInt(1e3*this.$videoElement.currentTime,10)||0})}),40))}_stopCanvasRender(){this.canvasRenderInterval&&(clearInterval(this.canvasRenderInterval),this.canvasRenderInterval=null)}videoFrameCallback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.player.isDestroyedOrClosed())return void this.player.debug.log(this.TAG_NAME,"videoFrameCallback() player is destroyed");const i=parseInt(1e3*Math.max(t.mediaTime,this.$videoElement.currentTime),10)||0;this.player.video.render({$video:this.$videoElement,ts:i}),this.player.handleRender(),this.player.updateStats({dts:i}),this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this))}_startBandwidthEstimateInterval(){this._stopBandwidthEstimateInterval(),this.bandwidthEstimateInterval=setInterval((()=>{let e=0;this.hls.bandwidthEstimate&&(e=this.hls.bandwidthEstimate),this.player.emit(lt.kBps,(e/1024/8/10).toFixed(2))}),1e3)}_stopBandwidthEstimateInterval(){this.bandwidthEstimateInterval&&(clearInterval(this.bandwidthEstimateInterval),this.bandwidthEstimateInterval=null)}_startFpsInterval(){this._stopCanvasRender(),this.fpsInterval=setInterval((()=>{if(this.$videoElement)if(to(this.$videoElement.getVideoPlaybackQuality)){const e=this.$videoElement.getVideoPlaybackQuality();this.hlsFps=e.totalVideoFrames-this.hlsPrevFrams,this.hlsPrevFrams=e.totalVideoFrames}else{const e=this.$videoElement.webkitDecodedFrameCount||0;this.hlsFps=e-this.hlsPrevFrams,this.hlsPrevFrams=e}}),1e3)}_stopFpsInterval(){this.fpsInterval&&(clearInterval(this.fpsInterval),this.fpsInterval=null)}_initHls(){this.player._opt.useCanvasRender&&(this.$videoElement=document.createElement("video"),this.$videoElement.muted=!0,Sa()&&(this.$videoElement.style.position="absolute"),this.initVideoEvents()),this.hls.attachMedia(this.$videoElement)}_bindEvents(){const e=this.player,{proxy:t}=this.player.events;this.hls;const i=this.$videoElement,s=ko(),r=t(i,ss,(t=>{if(this.hls){const i=parseInt(t.timeStamp,10);this.player._opt.useCanvasRender&&Ao(s)&&e.updateStats({ts:i,dts:i})}}));this.eventsDestroy.push(r),this._startBandwidthEstimateInterval(),this._startFpsInterval(),this.hls.on(bA.Events.ERROR,((e,t)=>{if(t.fatal)switch(t.type){case bA.ErrorTypes.NETWORK_ERROR:this.player.debug.warn(this.TAG_NAME,"fatal network error encountered, try to recover"),this.hls.startLoad();break;case bA.ErrorTypes.MEDIA_ERROR:this.player.debug.warn(this.TAG_NAME,"fatal media error encountered, try to recover"),this.hls.recoverMediaError()}})),this.hls.on(bA.Events.MEDIA_ATTACHING,(()=>{})),this.hls.on(bA.Events.MEDIA_ATTACHED,(()=>{})),this.hls.on(bA.Events.MEDIA_DETACHING,(()=>{})),this.hls.on(bA.Events.MEDIA_DETACHED,(()=>{})),this.hls.on(bA.Events.BUFFER_RESET,(()=>{})),this.hls.on(bA.Events.BUFFER_CODECS,(()=>{})),this.hls.on(bA.Events.BUFFER_CREATED,(()=>{})),this.hls.on(bA.Events.BUFFER_APPENDING,((e,t)=>{this.player.debug.log(this.TAG_NAME,"BUFFER_APPENDING",t.type)})),this.hls.on(bA.Events.BUFFER_APPENDED,(()=>{})),this.hls.on(bA.Events.BUFFER_EOS,(()=>{})),this.hls.on(bA.Events.BUFFER_FLUSHING,(()=>{})),this.hls.on(bA.Events.BUFFER_FLUSHED,(()=>{})),this.hls.on(bA.Events.MANIFEST_LOADING,(()=>{this.player.debug.log(this.TAG_NAME,"MANIFEST_LOADING 开始加载playlist m3u8资源")})),this.hls.on(bA.Events.MANIFEST_LOADED,((e,t)=>{this.player.debug.log(this.TAG_NAME,"MANIFEST_LOADED playlist m3u8文件加载完成",t.url)})),this.hls.on(bA.Events.MANIFEST_PARSED,(()=>{this.player.debug.log(this.TAG_NAME,"MANIFEST_PARSED playlist m3u8解析完成"),e._times.demuxStart||(e._times.demuxStart=ha())})),this.hls.on(bA.Events.LEVEL_LOADING,(()=>{})),this.hls.on(bA.Events.LEVEL_LOADED,((e,t)=>{})),this.hls.on(bA.Events.FRAG_LOADING,(()=>{})),this.hls.on(bA.Events.FRAG_LOADED,((t,i)=>{e._times.decodeStart||(e._times.decodeStart=ha())})),this.hls.on(bA.Events.BUFFER_APPENDING,(()=>{e._times.videoStart||(e._times.videoStart=ha(),e.handlePlayToRenderTimes())})),this.hls.on(bA.Events.FRAG_DECRYPTED,(()=>{})),this.hls.on(bA.Events.KEY_LOADING,(()=>{})),this.hls.on(bA.Events.KEY_LOADING,(()=>{})),this.hls.on(bA.Events.FPS_DROP,(e=>{})),this.hls.on(bA.Events.FPS_DROP_LEVEL_CAPPING,(e=>{})),this.hls.on(bA.Events.FRAG_PARSING_INIT_SEGMENT,((e,t)=>{this.player.debug.log(this.TAG_NAME,"FRAG_PARSING_INIT_SEGMENT",t);const i=!!(t&&t.tracks&&t.tracks.audio),s=!!(t&&t.tracks&&t.tracks.video);if(i&&t.tracks.audio){let e=t.tracks.audio;const i=e.metadata&&e.metadata.channelCount?e.metadata.channelCount:0,s=e.codec;this.player.audio&&this.player.audio.updateAudioInfo({encType:s,channels:i,sampleRate:44100})}if(s&&t.tracks.video){let e=t.tracks.video;const i={encTypeCode:-1!==e.codec.indexOf("avc")?vt:wt};e.metadata&&(i.width=e.metadata.width,i.height=e.metadata.height),this.player.video&&this.player.video.updateVideoInfo(i)}}))}initVideoPlay(e){this.player._opt.useCanvasRender&&(this.$videoElement=document.createElement("video"),this.initVideoEvents()),this.$videoElement.autoplay=!0,this.$videoElement.muted=!0,this.$videoElement.src=e}_initRenderSize(){this.isInitInfo||(this.player.video.updateVideoInfo({width:this.$videoElement.videoWidth,height:this.$videoElement.videoHeight}),this.player.video.initCanvasViewSize(),this.isInitInfo=!0)}initVideoEvents(){const{proxy:e}=this.player.events,t=e(this.$videoElement,ts,(()=>{this.player.debug.log(this.TAG_NAME,"video canplay"),this.$videoElement.play().then((()=>{this.player.debug.log(this.TAG_NAME,"video play"),this._startCanvasRender(),this._initRenderSize()})).catch((e=>{this.player.debug.warn(this.TAG_NAME,"video play error ",e)}))})),i=e(this.$videoElement,is,(()=>{this.player.debug.log(this.TAG_NAME,"video waiting")})),s=e(this.$videoElement,ss,(e=>{const t=parseInt(e.timeStamp,10);this.player.handleRender(),this.player.updateStats({ts:t}),this.$videoElement.paused&&(this.player.debug.warn(this.TAG_NAME,"video is paused and next try to replay"),this.$videoElement.play().then((()=>{this.player.debug.log(this.TAG_NAME,"video is paused and replay success")})).catch((e=>{this.player.debug.warn(this.TAG_NAME,"video is paused and replay error ",e)})))})),r=e(this.$videoElement,rs,(()=>{this.player.debug.log(this.TAG_NAME,"video playback Rate change",this.$videoElement&&this.$videoElement.playbackRate)}));this.eventsDestroy.push(t,i,s,r)}loadSource(e){return new Promise(((t,i)=>{this.canVideoPlay?(this.initVideoPlay(e),t()):this.hls.on(bA.Events.MEDIA_ATTACHED,(()=>{this.hls.loadSource(e),t()}))}))}}const vA=2097152,wA="fetch",SA="xhr",TA="arraybuffer",EA="text",kA="json",CA="real_time_speed",xA=Object.prototype.toString;function RA(e){if("[object Object]"!==xA.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function DA(e){if(!e||null===e[0]||void 0===e[0]||0===e[0]&&(null===e[1]||void 0===e[1]))return;let t="bytes="+e[0]+"-";return e[1]&&(t+=e[1]),t}function LA(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function IA(e,t){if(!e)return;if(!t)return e;let i;const s=Object.keys(t).map((e=>{if(i=t[e],null!=i)return Array.isArray(i)?e+="[]":i=[i],i.map((t=>{var i;return i=t,"[object Date]"===xA.call(i)?t=t.toISOString():function(e){return null!==e&&"object"==typeof e}(t)&&(t=JSON.stringify(t)),`${LA(e)}=${LA(t)}`})).join("&")})).filter(Boolean).join("&");if(s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}function PA(e,t,i,s,r,a,o,n,l,d,h){r=null!=r?parseFloat(r):null,s=parseInt(s||"0",10),Number.isNaN(s)&&(s=0);return{data:e,done:t,option:{range:l,vid:d,index:n,contentLength:s,age:r,startTime:a,firstByteTime:o,endTime:Date.now(),priOptions:h},response:i}}function BA(e,t){return Math.round(8*e*1e3/t/1024)}class MA extends Error{constructor(e,t,i,s){super(s),Jd(this,"retryCount",0),Jd(this,"isTimeout",!1),Jd(this,"loaderType",wA),Jd(this,"startTime",0),Jd(this,"endTime",0),Jd(this,"options",{}),this.url=e,this.request=t,this.response=i}}class UA extends a{constructor(e){super(),Jd(this,"_abortController",null),Jd(this,"_timeoutTimer",null),Jd(this,"_reader",null),Jd(this,"_response",null),Jd(this,"_aborted",!1),Jd(this,"_index",-1),Jd(this,"_range",null),Jd(this,"_receivedLength",0),Jd(this,"_running",!1),Jd(this,"_logger",null),Jd(this,"_vid",""),Jd(this,"_onProcessMinLen",0),Jd(this,"_onCancel",null),Jd(this,"_priOptions",null),Jd(this,"TAG_NAME","FetchLoader"),this.player=e}load(e){var t;let{url:i,vid:s,timeout:r,responseType:a,onProgress:o,index:n,onTimeout:l,onCancel:d,range:h,transformResponse:c,request:u,params:p,logger:f,method:m,headers:g,body:y,mode:A,credentials:b,cache:_,redirect:v,referrer:w,referrerPolicy:S,onProcessMinLen:T,priOptions:E}=e;this._aborted=!1,this._onProcessMinLen=T,this._onCancel=d,this._abortController="undefined"!=typeof AbortController&&new AbortController,this._running=!0,this._index=n,this._range=h||[0,0],this._vid=s||i,this._priOptions=E||{};const k={method:m,headers:g,body:y,mode:A,credentials:b,cache:_,redirect:v,referrer:w,referrerPolicy:S,signal:null===(t=this._abortController)||void 0===t?void 0:t.signal};let C=!1;clearTimeout(this._timeoutTimer),i=IA(i,p);const x=DA(h);x&&(g=u?u.headers:k.headers=k.headers||(Headers?new Headers:{}),Headers&&g instanceof Headers?g.append("Range",x):g.Range=x),r&&(this._timeoutTimer=setTimeout((()=>{if(C=!0,this.cancel(),l){const e=new MA(i,k,null,"timeout");e.isTimeout=!0,l(e,{index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions})}}),r));const R=Date.now();return(Oa(n)||Oa(h))&&this.player.debug.log(this.TAG_NAME,"[fetch load start], index,",n,",range,",h),new Promise(((e,t)=>{fetch(u||i,u?void 0:k).then((async s=>{if(clearTimeout(this._timeoutTimer),this._response=s,this._aborted||!this._running)return;if(c&&(s=c(s,i)||s),!s.ok)throw new MA(i,k,s,"bad network response");const r=Date.now();let l;if(a===EA)l=await s.text(),this._running=!1;else if(a===kA)l=await s.json(),this._running=!1;else{if(o)return this.resolve=e,this.reject=t,void this._loadChunk(s,o,R,r);{l=await s.arrayBuffer(),l=new Uint8Array(l),this._running=!1;const e=Date.now()-R,t=BA(l.byteLength,e);this.emit(CA,{speed:t,len:l.byteLength,time:e,vid:this._vid,index:this._index,range:this._range,priOptions:this._priOptions})}}(Oa(n)||Oa(h))&&this.player.debug.log(this.TAG_NAME,"[fetch load end], index,",n,",range,",h),e(PA(l,!0,s,s.headers.get("Content-Length"),s.headers.get("age"),R,r,n,h,this._vid,this._priOptions))})).catch((e=>{var s;clearTimeout(this._timeoutTimer),this._running=!1,this._aborted&&!C||((e=e instanceof MA?e:new MA(i,k,null,null===(s=e)||void 0===s?void 0:s.message)).startTime=R,e.endTime=Date.now(),e.isTimeout=C,e.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},t(e))}))}))}async cancel(){if(!this._aborted){if(this._aborted=!0,this._running=!1,this._response){try{this._reader&&await this._reader.cancel()}catch(e){}this._response=this._reader=null}if(this._abortController){try{this._abortController.abort()}catch(e){}this._abortController=null}this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions})}}_loadChunk(e,t,i,s){if(!e.body||!e.body.getReader){this._running=!1;const t=new MA(e.url,"",e,"onProgress of bad response.body.getReader");return t.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},void this.reject(t)}this._onProcessMinLen>0&&(this._cache=new Uint8Array(vA),this._writeIdx=0);const r=this._reader=e.body.getReader();let a,o,n;const l=async()=>{var d;o=Date.now();try{a=await r.read(),n=Date.now()}catch(e){return n=Date.now(),void(this._aborted||(this._running=!1,e.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this.reject(e)))}const h=(null===(d=this._range)||void 0===d?void 0:d.length)>0?this._range[0]:0,c=h+this._receivedLength;if(this._aborted)return this._running=!1,void t(void 0,!1,{range:[c,c],vid:this._vid,index:this._index,startTime:o,endTime:n,st:i,firstByteTime:s,priOptions:this._priOptions},e);const u=a.value?a.value.byteLength:0;let p;if(this._receivedLength+=u,this.player.debug.log(this.TAG_NAME,"【fetchLoader,onProgress call】,task,",this._range,", start,",c,", end,",h+this._receivedLength,", done,",a.done),this._onProcessMinLen>0){if(this._writeIdx+u>=this._onProcessMinLen||a.done)p=new Uint8Array(this._writeIdx+u),p.set(this._cache.slice(0,this._writeIdx),0),u>0&&p.set(a.value,this._writeIdx),this._writeIdx=0,this.player.debug.log(this.TAG_NAME,"【fetchLoader,onProgress enough】,done,",a.done,",len,",p.byteLength,", writeIdx,",this._writeIdx);else if(u>0&&this._writeIdx+u<vA)this._cache.set(a.value,this._writeIdx),this._writeIdx+=u,this.player.debug.log(this.TAG_NAME,"【fetchLoader,onProgress cache】,len,",u,", writeIdx,",this._writeIdx);else if(u>0){const e=new Uint8Array(this._writeIdx+u+2048);this.player.debug.log(this.TAG_NAME,"【fetchLoader,onProgress extra start】,size,",this._writeIdx+u+2048,", datalen,",u,", writeIdx,",this._writeIdx),e.set(this._cache.slice(0,this._writeIdx),0),u>0&&e.set(a.value,this._writeIdx),this._writeIdx+=u,delete this._cache,this._cache=e,this.player.debug.log(this.TAG_NAME,"【fetchLoader,onProgress extra end】,len,",u,", writeIdx,",this._writeIdx)}}else p=a.value;if((p&&p.byteLength>0||a.done)&&t(p,a.done,{range:[this._range[0]+this._receivedLength-(p?p.byteLength:0),this._range[0]+this._receivedLength],vid:this._vid,index:this._index,startTime:o,endTime:n,st:i,firstByteTime:s,priOptions:this._priOptions},e),a.done){const t=Date.now()-i,r=BA(this._receivedLength,t);this.emit(CA,{speed:r,len:this._receivedLength,time:t,vid:this._vid,index:this._index,range:this._range,priOptions:this._priOptions}),this._running=!1,this.player.debug.log(this.TAG_NAME,"[fetchLoader onProgress end],task,",this._range,",done,",a.done),this.resolve(PA(a,!0,e,e.headers.get("Content-Length"),e.headers.get("age"),i,s,this._index,this._range,this._vid,this._priOptions))}else l()};l()}get receiveLen(){return this._receivedLength}get running(){return this._running}set running(e){this._running=e}static isSupported(){return!("undefined"==typeof fetch)}}class FA{constructor(e,t,i){Jd(this,"TAG_NAME","Task"),this.promise=function(){let e,t;const i=new Promise(((i,s)=>{e=i,t=s}));return i.used=!1,i.resolve=function(){return i.used=!0,e(...arguments)},i.reject=function(){return i.used=!0,t(...arguments)},i}(),this.alive=!!t.onProgress,this._loaderType=e,this.player=i,this._loader=e===wA&&window.fetch?new UA(i):new OA(i),this._config=t,this._retryCount=0,this._retryTimer=null,this._canceled=!1,this._retryCheckFunc=t.retryCheckFunc}exec(){const{retry:e,retryDelay:t,onRetryError:i,transformError:s,...r}=this._config,a=async()=>{try{const e=await this._loader.load(r);this.promise.resolve(e)}catch(o){if(this._loader.running=!1,this.player.debug.log(this.TAG_NAME,"[task request catch err]",o),this._canceled)return;o.loaderType=this._loaderType,o.retryCount=this._retryCount;let n=o;s&&(n=s(n)||n),i&&this._retryCount>0&&i(n,this._retryCount,{index:r.index,vid:r.vid,range:r.range,priOptions:r.priOptions}),this._retryCount++;let l=!0;if(this._retryCheckFunc&&(l=this._retryCheckFunc(o)),l&&this._retryCount<=e)return clearTimeout(this._retryTimer),this.player.debug.log(this.TAG_NAME,"[task request setTimeout],retry",this._retryCount,",retry range,",r.range),void(this._retryTimer=setTimeout(a,t));this.promise.reject(n)}};return a(),this.promise}async cancel(){return clearTimeout(this._retryTimer),this._canceled=!0,this._loader.running=!1,this._loader.cancel()}get running(){return this._loader&&this._loader.running}get loader(){return this._loader}}class OA extends a{constructor(e){super(),Jd(this,"_xhr",null),Jd(this,"_aborted",!1),Jd(this,"_timeoutTimer",null),Jd(this,"_range",null),Jd(this,"_receivedLength",0),Jd(this,"_url",null),Jd(this,"_onProgress",null),Jd(this,"_index",-1),Jd(this,"_headers",null),Jd(this,"_currentChunkSizeKB",384),Jd(this,"_timeout",null),Jd(this,"_xhr",null),Jd(this,"_withCredentials",null),Jd(this,"_startTime",-1),Jd(this,"_loadCompleteResolve",null),Jd(this,"_loadCompleteReject",null),Jd(this,"_runing",!1),Jd(this,"_logger",!1),Jd(this,"_vid",""),Jd(this,"_responseType",void 0),Jd(this,"_credentials",void 0),Jd(this,"_method",void 0),Jd(this,"_transformResponse",void 0),Jd(this,"_firstRtt",void 0),Jd(this,"_onCancel",null),Jd(this,"_priOptions",null),Jd(this,"TAG_NAME","XhrLoader"),this.player=e}load(e){clearTimeout(this._timeoutTimer),this._range=e.range,this._onProgress=e.onProgress,this._index=e.index,this._headers=e.headers,this._withCredentials="include"===e.credentials||"same-origin"===e.credentials,this._body=e.body||null,e.method&&(this._method=e.method),this._timeout=e.timeout||null,this._runing=!0,this._vid=e.vid||e.url,this._responseType=e.responseType,this._firstRtt=-1,this._onTimeout=e.onTimeout,this._onCancel=e.onCancel,this._request=e.request,this._priOptions=e.priOptions||{},this.player.debug.log(this.TAG_NAME,"【xhrLoader task】, range",this._range),this._url=IA(e.url,e.params);const t=Date.now();return new Promise(((e,t)=>{this._loadCompleteResolve=e,this._loadCompleteReject=t,this._startLoad()})).catch((e=>{if(clearTimeout(this._timeoutTimer),this._runing=!1,!this._aborted)throw(e=e instanceof MA?e:new MA(this._url,this._request)).startTime=t,e.endTime=Date.now(),e.options={index:this._index,vid:this._vid,priOptions:this._priOptions},e}))}_startLoad(){let e=null;if(this._responseType===TA&&this._range&&this._range.length>1)if(this._onProgress){this._firstRtt=-1;const t=1024*this._currentChunkSizeKB,i=this._range[0]+this._receivedLength;let s=this._range[1];t<this._range[1]-i&&(s=i+t),e=[i,s],this.player.debug.log(this.TAG_NAME,"[xhr_loader->],tast :",this._range,", SubRange, ",e)}else e=this._range,this.player.debug.log(this.TAG_NAME,"[xhr_loader->],tast :",this._range,", allRange, ",e);this._internalOpen(e)}_internalOpen(e){try{this._startTime=Date.now();const t=this._xhr=new XMLHttpRequest;t.open(this._method||"GET",this._url,!0),t.responseType=this._responseType,this._timeout&&(t.timeout=this._timeout),t.withCredentials=this._withCredentials,t.onload=this._onLoad.bind(this),t.onreadystatechange=this._onReadyStatechange.bind(this),t.onerror=e=>{var t,i,s;this._running=!1;const r=new MA(this._url,this._request,null==e||null===(t=e.currentTarget)||void 0===t?void 0:t.response,"xhr.onerror.status:"+(null==e||null===(i=e.currentTarget)||void 0===i?void 0:i.status)+",statusText,"+(null==e||null===(s=e.currentTarget)||void 0===s?void 0:s.statusText));r.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(r)},t.ontimeout=e=>{this.cancel();const t=new MA(this._url,this._request,{status:408},"timeout");this._onTimeout&&(t.isTimeout=!0,this._onTimeout(t,{index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions})),t.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(t)};const i=this._headers||{},s=DA(e);s&&(i.Range=s),i&&Object.keys(i).forEach((e=>{t.setRequestHeader(e,i[e])})),this.player.debug.log(this.TAG_NAME,"[xhr.send->] tast,",this._range,",load sub range, ",e),t.send(this._body)}catch(t){t.options={index:this._index,range:e,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(t)}}_onReadyStatechange(e){2===e.target.readyState&&this._firstRtt<0&&(this._firstRtt=Date.now())}_onLoad(e){var t;const i=e.target.status;if(i<200||i>299){const t=new MA(this._url,null,{...e.target.response,status:i},"bad response,status:"+i);return t.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(t)}let s,r=null,a=!1;const o=(null===(t=this._range)||void 0===t?void 0:t.length)>0?this._range[0]:0;if(this._responseType===TA){var n;const t=new Uint8Array(e.target.response);if(s=o+this._receivedLength,t&&t.byteLength>0){this._receivedLength+=t.byteLength;const e=Date.now()-this._startTime,i=BA(this._receivedLength,e);this.emit(CA,{speed:i,len:this._receivedLength,time:e,vid:this._vid,index:this._index,range:[s,o+this._receivedLength],priOptions:this._priOptions})}r=t,a=!((null===(n=this._range)||void 0===n?void 0:n.length)>1&&this._range[1]&&this._receivedLength<this._range[1]-this._range[0]),this.player.debug.log(this.TAG_NAME,"[xhr load done->], tast :",this._range,", start",s,"end ",o+this._receivedLength,",dataLen,",t?t.byteLength:0,",receivedLength",this._receivedLength,",index,",this._index,", done,",a)}else a=!0,r=e.target.response;let l={ok:i>=200&&i<300,status:i,statusText:this._xhr.statusText,url:this._xhr.responseURL,headers:this._getHeaders(this._xhr),body:this._xhr.response};this._transformResponse&&(l=this._transformResponse(l,this._url)||l),this._onProgress&&this._onProgress(r,a,{index:this._index,vid:this._vid,range:[s,o+this._receivedLength],startTime:this._startTime,endTime:Date.now(),priOptions:this._priOptions},l),a?(this._runing=!1,this._loadCompleteResolve&&this._loadCompleteResolve(PA(this._onProgress?null:r,a,l,l.headers["content-length"],l.headers.age,this._startTime,this._firstRtt,this._index,this._range,this._vid,this._priOptions))):this._startLoad()}cancel(){if(!this._aborted)return this._aborted=!0,this._runing=!1,super.removeAllListeners(),this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions}),this._xhr?this._xhr.abort():void 0}static isSupported(){return"undefined"!=typeof XMLHttpRequest}get receiveLen(){return this._receivedLength}get running(){return this._running}set running(e){this._running=e}_getHeaders(e){const t=e.getAllResponseHeaders().trim().split("\r\n"),i={};for(const e of t){const t=e.split(": ");i[t[0].toLowerCase()]=t.slice(1).join(": ")}return i}}class NA extends a{constructor(e,t){super(),Jd(this,"type",wA),Jd(this,"_queue",[]),Jd(this,"_alive",[]),Jd(this,"_currentTask",null),Jd(this,"_config",void 0),this.player=t,this._config=function(e){return{loaderType:wA,retry:0,retryDelay:0,timeout:0,request:null,onTimeout:void 0,onProgress:void 0,onRetryError:void 0,transformRequest:void 0,transformResponse:void 0,transformError:void 0,responseType:EA,range:void 0,url:"",params:void 0,method:"GET",headers:{},body:void 0,mode:void 0,credentials:void 0,cache:void 0,redirect:void 0,referrer:void 0,referrerPolicy:void 0,integrity:void 0,onProcessMinLen:0,...e}}(e),this._config.loaderType!==SA&&UA.isSupported()||(this.type=SA)}destroy(){this._queue=[],this._alive=[],this._currentTask=null}isFetch(){return this.type===wA}static isFetchSupport(){return UA.isSupported()}load(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"!=typeof e&&e?t=e:t.url=e||t.url||this._config.url,t=Object.assign({},this._config,t),t.params&&(t.params=Object.assign({},t.params)),t.headers&&RA(t.headers)&&(t.headers=Object.assign({},t.headers)),t.body&&RA(t.body)&&(t.body=Object.assign({},t.body)),t.transformRequest&&(t=t.transformRequest(t)||t);const i=new FA(this.type,t,this.player);return i.loader.on(CA,(e=>{this.emit(CA,e)})),this._queue.push(i),1!==this._queue.length||this._currentTask&&this._currentTask.running||this._processTask(),i.promise}async cancel(){const e=this._queue.map((e=>e.cancel())).concat(this._alive.map((e=>e.cancel())));this._currentTask&&e.push(this._currentTask.cancel()),this._queue=[],this._alive=[],await Promise.all(e),await function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((t=>setTimeout(t,e)))}()}_processTask(){if(this._currentTask=this._queue.shift(),!this._currentTask)return;this._currentTask.alive&&this._alive.push(this._currentTask);const e=this._currentTask.exec().catch((e=>{}));e&&"function"==typeof e.finally&&e.finally((()=>{var e,t;null!==(e=this._currentTask)&&void 0!==e&&e.alive&&(null===(t=this._alive)||void 0===t?void 0:t.length)>0&&(this._alive=this._alive.filter((e=>e&&e!==this._currentTask))),this._processTask()}))}}const jA="network",GA="network_timeout",zA="other",$A="manifest",HA="hls",VA="demux";class WA extends Error{constructor(e,t,i,s,r){super(r||(null==i?void 0:i.message)),this.errorType=e===GA?jA:e,this.originError=i,this.ext=s,this.errorMessage=this.message}static create(e,t,i,s,r){return e instanceof WA?e:(e instanceof Error&&(i=e,e=""),e||(e=zA),new WA(e,t,i,s,r))}static network(e){var t;return new WA(null!=e&&e.isTimeout?GA:jA,null,e instanceof Error?e:null,{url:null==e?void 0:e.url,response:null==e?void 0:e.response,httpCode:null==e||null===(t=e.response)||void 0===t?void 0:t.status})}}const JA=/^#(EXT[^:]*)(?::(.*))?$/,qA=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g,KA=/^(?:[a-zA-Z0-9+\-.]+:)?\/\//,YA=/^((?:[a-zA-Z0-9+\-.]+:)?\/\/[^/?#]*)?([^?#]*\/)?/;function QA(e){const t=e.match(JA);if(t&&t[1])return[t[1].replace("EXT-X-",""),t[2]]}function XA(e){const t={};let i=qA.exec(e);for(;i;)t[i[1]]=i[2]||i[3],i=qA.exec(e);return t}function ZA(e,t){if(!t||!e||KA.test(e))return e;const i=YA.exec(t);return i?"/"===e[0]?i[1]+e:i[1]+i[2]+e:e}const eb={audio:[/^mp4a/,/^vorbis$/,/^opus$/,/^flac$/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function tb(e,t){const i=eb[e];if(i&&t&&t.length)for(let e=0;e<i.length;e++)for(let s=0;s<t.length;s++)if(i[e].test(t[s]))return t[s]}class ib{constructor(){this.version=0,this.streams=[],this.isMaster=!0}}const sb="AUDIO",rb="SUBTITLE";class ab{constructor(){Jd(this,"id",0),Jd(this,"url",""),Jd(this,"default",!1),Jd(this,"autoSelect",!1),Jd(this,"forced",!1),Jd(this,"group",""),Jd(this,"name",""),Jd(this,"lang",""),Jd(this,"segments",[]),Jd(this,"endSN",0)}}class ob extends ab{constructor(){super(...arguments),Jd(this,"mediaType",sb),Jd(this,"channels",0)}}class nb extends ab{constructor(){super(...arguments),Jd(this,"mediaType",rb)}}class lb{constructor(){Jd(this,"id",0),Jd(this,"bitrate",0),Jd(this,"width",0),Jd(this,"height",0),Jd(this,"name",""),Jd(this,"url",""),Jd(this,"audioCodec",""),Jd(this,"videoCodec",""),Jd(this,"textCodec",""),Jd(this,"audioGroup",""),Jd(this,"audioStreams",[]),Jd(this,"subtitleStreams",[]),Jd(this,"closedCaptionsStream",[])}}class db{constructor(){Jd(this,"version",0),Jd(this,"url",""),Jd(this,"type",""),Jd(this,"startCC",0),Jd(this,"endCC",0),Jd(this,"startSN",0),Jd(this,"endSN",0),Jd(this,"totalDuration",0),Jd(this,"targetDuration",0),Jd(this,"live",!0),Jd(this,"segments",[])}}class hb{constructor(){Jd(this,"sn",0),Jd(this,"cc",0),Jd(this,"url",""),Jd(this,"title",""),Jd(this,"start",0),Jd(this,"duration",0),Jd(this,"key",null),Jd(this,"byteRange",null),Jd(this,"isInitSegment",!1),Jd(this,"initSegment",null),Jd(this,"isLast",!1),Jd(this,"hasAudio",!1),Jd(this,"hasVideo",!1)}get end(){return this.start+this.duration}setTrackExist(e,t){this.hasVideo=e,this.hasAudio=t}setByteRange(e,t){this.byteRange=[0];const i=e.split("@");1===i.length&&t&&t.byteRange?(this.byteRange[0]=t.byteRange[1]||0,this.byteRange[0]&&(this.byteRange[0]+=1)):this.byteRange[0]=parseInt(i[1]),this.byteRange[1]=this.byteRange[0]+parseInt(i[0])-1}}class cb{constructor(e){Jd(this,"method",""),Jd(this,"url",""),Jd(this,"iv",null),Jd(this,"keyFormat",""),Jd(this,"keyFormatVersions",""),e instanceof cb&&(this.method=e.method,this.url=e.url,this.keyFormat=e.keyFormat,this.keyFormatVersions=e.keyFormatVersions,e.iv&&(this.iv=new Uint8Array(e.iv)))}clone(e){const t=new cb(this);return null!=e&&t.setIVFromSN(e),t}setIVFromSN(e){if(!this.iv&&"AES-128"===this.method&&"number"==typeof e&&this.url){this.iv=new Uint8Array(16);for(let t=12;t<16;t++)this.iv[t]=e>>8*(15-t)&255}}}class ub{static parse(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!e.includes("#EXTM3U"))throw new Error("Invalid m3u8 file");const i=function(e){return e.split(/[\r\n]/).map((e=>e.trim())).filter(Boolean)}(e);return ub.isMediaPlaylist(e)?function(e,t){const i=new db;i.url=t;let s,r=new hb,a=null,o=null,n=0,l=0,d=0,h=0,c=!1;for(;(s=e[h++])&&!c;){if("#"!==s[0]){r.sn=l,r.cc=d,r.url=ZA(s,t),o&&(r.key=o.clone(l)),a&&(r.initSegment=a),i.segments.push(r),r=new hb,l++;continue}const e=QA(s);if(!e)continue;const[h,u]=e;switch(h){case"VERSION":i.version=parseInt(u);break;case"PLAYLIST-TYPE":i.type=null==u?void 0:u.toUpperCase();break;case"TARGETDURATION":i.targetDuration=parseFloat(u);break;case"ENDLIST":{const e=i.segments[i.segments.length-1];e&&(e.isLast=!0),i.live=!1,c=!0}break;case"MEDIA-SEQUENCE":l=i.startSN=parseInt(u);break;case"DISCONTINUITY-SEQUENCE":d=i.startCC=parseInt(u);break;case"DISCONTINUITY":d++;break;case"BYTERANGE":r.setByteRange(u,i.segments[i.segments.length-1]);break;case"EXTINF":{const[e,t]=u.split(",");r.start=n,r.duration=parseFloat(e),n+=r.duration,r.title=t}break;case"KEY":{const e=XA(u);if("NONE"===e.METHOD){o=null;break}if("AES-128"!==e.METHOD)throw new Error(`encrypt ${e.METHOD}/${e.KEYFORMAT} is not supported`);if(o=new cb,o.method=e.METHOD,o.url=/^blob:/.test(e.URI)?e.URI:ZA(e.URI,t),o.keyFormat=e.KEYFORMAT||"identity",o.keyFormatVersions=e.KEYFORMATVERSIONS,e.IV){let t=e.IV.slice(2);t=(1&t.length?"0":"")+t,o.iv=new Uint8Array(t.length/2);for(let e=0,i=t.length/2;e<i;e++)o.iv[e]=parseInt(t.slice(2*e,2*e+2),16)}}break;case"MAP":{const e=XA(u);r.url=ZA(e.URI,t),e.BYTERANGE&&r.setByteRange(e.BYTERANGE),r.isInitSegment=!0,r.sn=0,o&&(r.key=o.clone(0)),a=r,r=new hb}}}const u=i.segments[i.segments.length-1];return u&&(i.endSN=u.sn),i.totalDuration=n,i.endCC=d,i}(i,t):function(e,t){const i=new ib;let s,r=0;const a=[],o=[];for(;s=e[r++];){const n=QA(s);if(!n)continue;const[l,d]=n;if("VERSION"===l)i.version=parseInt(d);else if("MEDIA"===l&&d){const e=XA(d);let i;switch(e.TYPE){case"AUDIO":i=new ob;break;case"SUBTITLES":i=new nb;break;default:i=new ab}i.url=ZA(e.URI,t),i.default="YES"===e.DEFAULT,i.autoSelect="YES"===e.AUTOSELECT,i.group=e["GROUP-ID"],i.name=e.NAME,i.lang=e.LANGUAGE,e.CHANNELS&&(i.channels=Number(e.CHANNELS.split("/")[0]),Number.isNaN(i.channels)&&(i.channels=0)),"AUDIO"===e.TYPE&&e.URI&&a.push(i),"SUBTITLES"===e.TYPE&&o.push(i)}else if("STREAM-INF"===l&&d){const s=new lb,a=XA(d);if(s.bitrate=parseInt(a["AVERAGE-BANDWIDTH"]||a.BANDWIDTH),s.name=a.NAME,s.url=ZA(e[r++],t),a.RESOLUTION){const[e,t]=a.RESOLUTION.split("x");s.width=parseInt(e),s.height=parseInt(t)}if(a.CODECS){const e=a.CODECS.split(/[ ,]+/).filter(Boolean);s.videoCodec=tb("video",e),s.audioCodec=tb("audio",e),s.textCodec=tb("text",e)}s.audioGroup=a.AUDIO,s.subtitleGroup=a.SUBTITLES,i.streams.push(s)}}return i.streams.forEach(((e,t)=>{e.id=t})),a.length&&(a.forEach(((e,t)=>{e.id=t})),i.streams.forEach((e=>{e.audioGroup&&(e.audioStreams=a.filter((t=>t.group===e.audioGroup)))}))),o.length&&(o.forEach(((e,t)=>{e.id=t})),i.streams.forEach((e=>{e.subtitleGroup&&(e.subtitleStreams=o.filter((t=>t.group===e.subtitleGroup)))}))),i}(i,t)}static isMediaPlaylist(e){return e.includes("#EXTINF:")||e.includes("#EXT-X-TARGETDURATION:")}}class pb{constructor(e){Jd(this,"_onLoaderRetry",((e,t)=>{this.hls.emit(Zs,{error:WA.network(e),retryTime:t})})),this.hls=e,this.player=e.player,this.TAG_NAME="HlsManifestLoader",this._timer=null;const{retryCount:t,retryDelay:i,loadTimeout:s,fetchOptions:r}=this.hls.config;this._loader=new NA({...r,responseType:"text",retry:t,retryDelay:i,timeout:s,onRetryError:this._onLoaderRetry},this.player),this._audioLoader=new NA({...r,responseType:"text",retry:t,retryDelay:i,timeout:s,onRetryError:this._onLoaderRetry},this.player),this._subtitleLoader=new NA({...r,responseType:"text",retry:t,retryDelay:i,timeout:s,onRetryError:this._onLoaderRetry},this.player)}async destroy(){await this.stopPoll(),this._audioLoader&&(this._audioLoader.destroy(),this._audioLoader=null),this._subtitleLoader&&(this._subtitleLoader.destroy(),this._subtitleLoader=null),this._loader&&(this._loader.destroy(),this._loader=null)}async load(e,t,i){this.player.debug.log(this.TAG_NAME,"load()",e,t,i);const s=[this._loader.load(e)];let r,a,o,n,l,d;t&&s.push(this._audioLoader.load(t)),i&&s.push(this._subtitleLoader.load(i));try{const[e,i,n]=await Promise.all(s);if(!e)return[];r=e.data,t?(a=null==i?void 0:i.data,o=null==n?void 0:n.data):o=null==i?void 0:i.data}catch(e){throw WA.network(e)}try{var h;if(n=ub.parse(r,e),!1===(null===(h=n)||void 0===h?void 0:h.live)&&n.segments&&!n.segments.length)throw new Error("empty segments list");a&&(l=ub.parse(a,t)),o&&(d=ub.parse(o,i))}catch(e){throw new WA($A,HA,e)}return n&&(n.isMaster?this.hls.emit(Js,{playlist:n}):this.hls.emit(qs,{playlist:n})),[n,l,d]}poll(e,t,i,s,r,a){clearTimeout(this._timer),a=a||3e3;let o=this.hls.config.pollRetryCount;const n=async()=>{clearTimeout(this._timer);try{const r=await this.load(e,t,i);if(!r[0])return;o=this.hls.config.pollRetryCount,s(r[0],r[1],r[2])}catch(e){o--,o<=0&&r(e)}this._timer=setTimeout(n,a)};this._timer=setTimeout(n,a)}stopPoll(){return clearTimeout(this._timer),this.cancel()}cancel(){return Promise.all([this._loader.cancel(),this._audioLoader.cancel()])}}class fb{constructor(){Jd(this,"_chunkSpeeds",[]),Jd(this,"_speeds",[])}addRecord(e,t){e&&t&&(this._speeds.push(8e3*e/t),this._speeds=this._speeds.slice(-3))}addChunkRecord(e,t){e&&t&&(this._chunkSpeeds.push(8e3*e/t),this._chunkSpeeds=this._chunkSpeeds.slice(-100))}getAvgSpeed(){return this._chunkSpeeds.length||this._speeds.length?this._speeds.length?this._speeds.reduce(((e,t)=>e+t))/this._speeds.length:this._chunkSpeeds.reduce(((e,t)=>e+t))/this._chunkSpeeds.length:0}getLatestSpeed(){return this._chunkSpeeds.length||this._speeds.length?this._speeds.length?this._speeds[this._speeds.length-1]:this._chunkSpeeds[this._chunkSpeeds.length-1]:0}reset(){this._chunkSpeeds=[],this._speeds=[]}}class mb{constructor(e){Jd(this,"_emitOnLoaded",((e,t)=>{const{data:i,response:s,option:r}=e,{firstByteTime:a,startTime:o,endTime:n,contentLength:l}=r||{},d=n-o;this._bandwidthService.addRecord(l||i.byteLength,d),this.hls.emit(tr,{time:d,byteLength:l,url:t}),this.hls.emit(ir,{url:t,elapsed:d||0}),this.hls.emit(Xs,{url:t,responseUrl:s.url,elapsed:a-o}),this.hls.emit(sr,{headers:s.headers})})),Jd(this,"_onLoaderRetry",((e,t)=>{this.hls.emit(Zs,{error:WA.network(e),retryTime:t})})),this.hls=e,this.player=e.player,this._bandwidthService=new fb;const{retryCount:t,retryDelay:i,loadTimeout:s,fetchOptions:r}=this.hls.config;this._segmentLoader=new NA({...r,responseType:"arraybuffer",retry:t,retryDelay:i,timeout:s,onRetryError:this._onLoaderRetry},this.player),this._audioSegmentLoader=new NA({...r,responseType:"arraybuffer",retry:t,retryDelay:i,timeout:s,onRetryError:this._onLoaderRetry},this.player),this._keyLoader=new NA({...r,responseType:"arraybuffer",retry:t,retryDelay:i,timeout:s,onRetryError:this._onLoaderRetry},this.player)}destroy(){this.reset(),this._keyLoader&&(this._keyLoader.destroy(),this._keyLoader=null),this._audioSegmentLoader&&(this._audioSegmentLoader.destroy(),this._audioSegmentLoader=null),this._segmentLoader&&(this._segmentLoader.destroy(),this._segmentLoader=null)}speedInfo(){return{speed:this._bandwidthService.getLatestSpeed(),avgSpeed:this._bandwidthService.getAvgSpeed()}}resetBandwidth(){this._bandwidthService.reset()}load(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i;const r=[];return e&&(r[0]=this.loadVideoSegment(e,i)),t&&(r[1]=this.loadAudioSegment(t,s)),Promise.all(r)}loadVideoSegment(e,t){return this._loadSegment(this._segmentLoader,e,t)}loadAudioSegment(e,t){return this._loadSegment(this._audioSegmentLoader,e,t)}async _loadSegment(e,t,i){var s;let r,a,o,n,l;const d=[];if(this.hls.emit(er,{url:t.url}),d[0]=e.load(t.url),i&&t.initSegment){var h;const i=t.initSegment.url;r=this._mapCache[i],r||(this.hls.emit(er,{url:i}),d[1]=e.load(i).then((e=>{if(e){Object.keys(this._mapCache)>30&&(this._mapCache={}),r=this._mapCache[i]=e.data,this._emitOnLoaded(e,i)}})));const s=null===(h=t.initSegment.key)||void 0===h?void 0:h.url;s&&(l=t.initSegment.key.iv,n=this._keyCache[s],n||(this.hls.emit(er,{url:s}),d[2]=this._keyLoader.load(s).then((e=>{e&&(n=this._keyCache[s]=e.data,this._emitOnLoaded(e,s))}))))}const c=null===(s=t.key)||void 0===s?void 0:s.url;c&&(o=t.key.iv,a=this._keyCache[c],a||(this.hls.emit(er,{url:c}),d[3]=this._keyLoader.load(c).then((e=>{e&&(a=this._keyCache[c]=e.data,this._emitOnLoaded(e,c))}))));const[u]=await Promise.all(d);if(!u)return;const p=u.data;return this._emitOnLoaded(u,t.url),{data:p,map:r,key:a,mapKey:n,keyIv:o,mapKeyIv:l}}reset(){this.error=null,this._mapCache={},this._keyCache={},this._bandwidthService.reset()}async cancel(){await Promise.all([this._keyLoader.cancel(),this._segmentLoader.cancel(),this._audioSegmentLoader.cancel()])}}class gb{constructor(e,t,i){this.live=void 0,this.id=0,this.bitrate=0,this.width=0,this.height=0,this.name="",this.url="",this.audioCodec="",this.videoCodec="",this.textCodec="",this.startCC=0,this.endCC=0,this.startSN=0,this.endSN=-1,this.totalDuration=0,this.targetDuration=0,this.snDiff=null,this.segments=[],this.audioStreams=[],this.subtitleStreams=[],this.closedCaptions=[],this.currentAudioStream=null,this.currentSubtitleStream=null,this.TAG_NAME="HlsStream",this.update(e,t,i)}get lastSegment(){return this.segments.length?this.segments[this.segments.length-1]:null}get segmentDuration(){var e;return this.targetDuration||(null===(e=this.segments[0])||void 0===e?void 0:e.duration)||0}get liveEdge(){return this.endTime}get endTime(){var e;return(null===(e=this.lastSegment)||void 0===e?void 0:e.end)||0}get currentSubtitleEndSn(){var e;return(null===(e=this.currentSubtitleStream)||void 0===e?void 0:e.endSN)||0}clearOldSegment(e,t){return this._clearSegments(e,t)}getAudioSegment(e){if(!e||!this.currentAudioStream)return;const t=e.sn-this.snDiff;return this.currentAudioStream.segments.find((e=>e.sn===t))}update(e,t){this.url=e.url,Array.isArray(e.segments)?(null!==this.live&&void 0!==this.live||(this.live=e.live),this._updateSegments(e,this),this.startCC=e.startCC,this.endCC=e.endCC,this.startSN=e.startSN,this.endSN=e.endSN||-1,this.totalDuration=e.totalDuration,this.targetDuration=e.targetDuration,this.live=e.live,t&&this.currentAudioStream&&Array.isArray(t.segments)&&(this._updateSegments(t,this.currentAudioStream),(null===this.snDiff||void 0===this.snDiff)&&e.segments.length&&t.segments.length&&(this.snDiff=e.segments[0].sn-t.segments[0].sn))):(this.id=e.id,this.bitrate=e.bitrate,this.width=e.width,this.height=e.height,this.name=e.name,this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.textCodec=e.textCodec,this.audioStreams=e.audioStreams,this.subtitleStreams=e.subtitleStreams,!this.currentAudioStream&&this.audioStreams.length&&(this.currentAudioStream=this.audioStreams.find((e=>e.default))||this.audioStreams[0]),!this.currentSubtitleStream&&this.subtitleStreams.length&&(this.currentSubtitleStream=this.subtitleStreams.find((e=>e.default))||this.subtitleStreams[0]))}updateSubtitle(e){if(!(e&&this.currentSubtitleStream&&Array.isArray(e.segments)))return;const t=this._updateSegments(e,this.currentSubtitleStream),i=this.currentSubtitleStream.segments;return i.length>100&&(this.currentSubtitleStream.segments=i.slice(100)),t?t.map((e=>({sn:e.sn,url:e.url,duration:e.duration,start:e.start,end:e.end,lang:this.currentSubtitleStream.lang}))):void 0}switchSubtitle(e){const t=this.subtitleStreams.find((t=>t.lang===e)),i=this.currentSubtitleStream;t&&(this.currentSubtitleStream=t,i.segments=[])}_clearSegments(e,t){let i=0;const s=this.segments;for(let t=0,r=s.length;t<r;t++)if(s[t].end>=e){i=t;break}return i>t&&(i=t),i&&(this.segments=this.segments.slice(i),this.currentAudioStream&&(this.currentAudioStream.segments=this.currentAudioStream.segments.slice(i))),t-i}_updateSegments(e,t){const i=t.segments;if(this.live){const s=i[i.length-1],r=(null==s?void 0:s.sn)||-1;if(r<e.endSN&&e.segments.length){const a=e.segments.findIndex((e=>e.sn===r)),o=a<0?e.segments:e.segments.slice(a+1);if(i.length&&o.length){let e=s.end;o.forEach((t=>{t.start=e,e=t.end}));const t=(null==s?void 0:s.cc)||-1;t>o[0].cc&&o.forEach((e=>e.cc+=t))}return t.endSN=e.endSN,t.segments=i.concat(o),o}}else t.segments=e.segments}}class yb{constructor(e){this.hls=e,this.player=e.player,this.streams=[],this.currentStream=null,this.dvrWindow=0,this._segmentPointer=-1,this.TAG_NAME="HlsPlaylist"}destroy(){this.reset()}get lastSegment(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.lastSegment}get currentSegment(){var e;return null===(e=this.currentSegments)||void 0===e?void 0:e[this._segmentPointer]}get nextSegment(){var e;return null===(e=this.currentSegments)||void 0===e?void 0:e[this._segmentPointer+1]}get currentSegments(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.segments}get currentSubtitleEndSn(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.currentSubtitleEndSn}get liveEdge(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.liveEdge}get totalDuration(){var e;return(null===(e=this.currentStream)||void 0===e?void 0:e.totalDuration)||0}get seekRange(){const e=this.currentSegments;if(e&&e.length)return[e[0].start,e[e.length-1].end]}get isEmpty(){var e;return!(null!==(e=this.currentSegments)&&void 0!==e&&e.length)}get isLive(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.live}get hasSubtitle(){var e;return!(null===(e=this.currentStream)||void 0===e||!e.currentSubtitleStream)}getAudioSegment(e){var t;return null===(t=this.currentStream)||void 0===t?void 0:t.getAudioSegment(e)}moveSegmentPointer(e){var t;null==e&&(e=this._segmentPointer+1),this._segmentPointer=ca(e,-1,null===(t=this.currentSegments)||void 0===t?void 0:t.length),this.player.debug.log(this.TAG_NAME,`moveSegmentPointer() and param pos is ${e} and clamp result is ${this._segmentPointer}`)}reset(){this.streams=[],this.currentStream=null,this.dvrWindow=0,this._segmentPointer=-1}getSegmentByIndex(e){var t;return null===(t=this.currentSegments)||void 0===t?void 0:t[e]}setNextSegmentByIndex(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this._segmentPointer=e-1,this.player.debug.log(this.TAG_NAME,"setNextSegmentByIndex()",e,this._segmentPointer)}findSegmentIndexByTime(e){const t=this.currentSegments;if(t){for(let i,s=0,r=t.length;s<r;s++)if(i=t[s],e>=i.start&&e<i.end)return s;const i=t[t.length-1];if(Math.abs(e-(null==i?void 0:i.end))<.2)return t.length-1}}upsertPlaylist(e,t,i){if(!e)return void this.player.debug.warn(this.TAG_NAME,"upsertPlaylist() playlist is null");if(e.isMaster)this.streams.length=e.streams.length,e.streams.filter((e=>e.url)).forEach(((e,t)=>{this.streams[t]?this.streams[t].update(e):this.streams[t]=new gb(e)})),this.currentStream=this.streams[0];else if(Array.isArray(e.segments)){const s=this.currentStream;if(s){s.update(e,t,i);const r=s.updateSubtitle(i);r&&this.hls.emit(Ws,{list:r})}else this.reset(),this.currentStream=this.streams[0]=new gb(e,t,i)}this.currentStream&&this.hls.isLive&&!this.dvrWindow&&(this.dvrWindow=this.currentSegments.reduce(((e,t)=>e+=t.duration),0))}switchSubtitle(e){var t;null===(t=this.currentStream)||void 0===t||t.switchSubtitle(e)}clearOldSegment(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;const t=this.currentStream;if(!this.dvrWindow||!t)return;const i=t.endTime-this.dvrWindow;if(i<=0)return void this.player.debug.log(this.TAG_NAME,`clearOldSegment() stream.endTime:${t.endTime}, this.dvrWindow:${this.dvrWindow} startTime <= 0`);const s=t.segments;if(s.length<=e)return void this.player.debug.log(this.TAG_NAME,`clearOldSegment() segments.length:${s.length} <= maxPlaylistSize:${e}`);const r=this._segmentPointer;this._segmentPointer=t.clearOldSegment(i,r),this.player.debug.log(this.TAG_NAME,"clearOldSegment() update _segmentPointer:",r,this._segmentPointer),this.player.debug.log(this.TAG_NAME,"currentSegments",this.currentSegments)}checkSegmentTrackChange(e,t){const i=this.findSegmentIndexByTime(e),s=this.getSegmentByIndex(i);if(!s)return;if(!s.hasAudio&&!s.hasVideo)return;if(2!==t&&s.hasAudio&&s.hasVideo)return s;if(s.end-e>.3)return;const r=this.getSegmentByIndex(i+1);return r&&(r.hasAudio||r.hasVideo)&&(r.hasAudio!==s.hasAudio||r.hasVideo!==s.hasVideo)?r:void 0}}class Ab{constructor(e,t){this.hls=e,this.player=t;const i=window.crypto||window.msCrypto;this.subtle=i&&(i.subtle||i.webkitSubtle),this.externalDecryptor=null}decrypt(e,t){if(!e&&!t)return;const i=[];return e&&(i[0]=this._decryptSegment(e)),t&&(i[1]=this._decryptSegment(t)),Promise.all(i)}async _decryptSegment(e){let t=e.data;return e.key&&(t=await this._decryptData(e.data,e.key,e.keyIv)),e.map?ih(e.map,t):t}async _decryptData(e,t,i){if(this.externalDecryptor)return await this.externalDecryptor.decrypt(e,t,i);if(this.subtle){const s=await this.subtle.importKey("raw",t,{name:"AES-CBC"},!1,["encrypt","decrypt"]),r=await this.subtle.decrypt({name:"AES-CBC",iv:i},s,e);return new Uint8Array(r)}e=Ad(e),t=Ad(t),i=Ad(i);return function(e){const{words:t}=e,{sigBytes:i}=e,s=new Uint8Array(i);for(let e=0;e<i;e+=1)s[e]=t[e>>>2]>>>24-e%4*8&255;return s}(gd.AES.decrypt({ciphertext:e},t,{iv:i,mode:gd.mode.CBC}))}}class bb extends Ud{constructor(e){super(e),this.player=e,this._pmtId=-1,this._remainingPacketData=null,this._videoPesData=[],this._audioPesData=[],this._gopId=0,this._videoPid=-1,this._audioPid=-1,this._codecType=vt,this._audioCodecType=Et,this._vps=null,this._sps=null,this._pps=null,this.TAG_NAME="HlsTsLoader",this._isForHls=!0,this.videoTrack=bb.initVideoTrack(),this.audioTrack=bb.initAudioTrack(),this._baseDts=-1,this._baseDtsInited=!1,this._basefps=25,this._baseFpsInterval=null,this._tempSampleTsList=[],this._hasAudio=!1,this._hasVideo=!1,this._audioNextPts=void 0,this._videoNextDts=void 0,this._audioTimestampBreak=!1,this._videoTimestampBreak=!1,this._lastAudioExceptionGapDot=0,this._lastAudioExceptionOverlapDot=0,this._lastAudioExceptionLargeGapDot=0,this._isSendAACSeqHeader=!1,this.workerClearTimeout=null,this.workerUrl=null,this.loopWorker=null,this.tempSampleListInfo={},this._isUseWorker()&&this._initLoopWorker(),this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.workerUrl&&(URL.revokeObjectURL(this.workerUrl),this.workerUrl=null),this.workerClearTimeout&&(clearTimeout(this.workerClearTimeout),this.workerClearTimeout=null),this.loopWorker&&(this.loopWorker.postMessage({cmd:"destroy"}),this.loopWorker.terminate(),this.loopWorker=null),this._stopDecodeLoopInterval(),this.videoTrack=null,this.audioTrack=null,this.tempSampleListInfo={},this._baseDts=-1,this._baseDtsInited=!1,this._basefps=25,this._hasCalcFps=!1,this._audioNextPts=void 0,this._videoNextDts=void 0,this._audioTimestampBreak=!1,this._videoTimestampBreak=!1,this._lastAudioExceptionGapDot=0,this._lastAudioExceptionOverlapDot=0,this._lastAudioExceptionLargeGapDot=0,this._isForHls=!0,this._isSendAACSeqHeader=!1,this.player.debug.log(this.TAG_NAME,"destroy")}static initVideoTrack(){return{samples:[]}}static initAudioTrack(){return{samples:[]}}static probe(e){return!!e.length&&(71===e[0]&&71===e[188]&&71===e[376])}_parsePES(e){const t=e[8];if(null==t||e.length<t+9)return;const i=e[0]<<16|e[1]<<8|e[2];if(1!==i)return this.player.debug.warn(this.TAG_NAME,`_parsePES startPrefix should be 1 but with value ${i}`),{error:!0,code:"startPrefixError"};const s=(e[4]<<8)+e[5];if(s&&s>e.length-6)return;let r,a;const o=e[7];return 192&o&&(r=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,64&o?(a=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2,r-a>54e5&&(r=a)):a=r),{data:e.subarray(9+t),pts:r,dts:a,originalPts:r,originalDts:a}}_demux(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];t&&(this._pmtId=-1,this.videoTrack=bb.initVideoTrack(),this.audioTrack=bb.initAudioTrack()),!i||t?(this._remainingPacketData=null,this._videoPesData=[],this._audioPesData=[]):(this.videoTrack.samples=[],this.audioTrack.samples=[],this._remainingPacketData&&(e=ih(this._remainingPacketData,e),this._remainingPacketData=null));let s=e.length;const r=s%188;r&&(this._remainingPacketData=e.subarray(s-r),s-=r);for(let t=0;t<s;t+=188){if(71!==e[t])throw new Error("TS packet did not start with 0x47");const i=!!(64&e[t+1]),s=((31&e[t+1])<<8)+e[t+2];let r;if((48&e[t+3])>>4>1){if(r=t+5+e[t+4],r===t+188)continue}else r=t+4;switch(s){case 0:i&&(r+=e[r]+1),this._pmtId=(31&e[r+10])<<8|e[r+11];break;case this._pmtId:{i&&(r+=e[r]+1);const t=r+3+((15&e[r+1])<<8|e[r+2])-4;for(r+=12+((15&e[r+10])<<8|e[r+11]);r<t;){const t=(31&e[r+1])<<8|e[r+2];switch(e[r]){case 15:this._audioPid=t,this._audioCodecType=Et;break;case 27:if(-1!==this._videoPid)break;this._videoPid=t,this._codecType=vt;break;case 36:if(-1!==this._videoPid)break;this._videoPid=t,this._codecType=wt;break;default:this.player.debug.log(this.TAG_NAME,`Unsupported stream. type: ${e[r]}, pid: ${t}`)}r+=5+((15&e[r+3])<<8|e[r+4])}}break;case this._videoPid:i&&this._videoPesData.length&&this._parseVideoData(),this._videoPesData.push(e.subarray(r,t+188));break;case this._audioPid:i&&this._audioPesData.length&&this._parseAudioData(),this._audioPesData.push(e.subarray(r,t+188));break;case 17:case 8191:break;default:this.player.debug.log(this.TAG_NAME,`Unknown pid: ${s}`)}}this._parseVideoData(),this._parseAudioData(),this.audioTrack.formatTimescale=this.videoTrack.formatTimescale=this.videoTrack.timescale=9e4,this.audioTrack.timescale=this.audioTrack.sampleRate||0}demuxAndFix(e,t,i,s){this.player._times.demuxStart||(this.player._times.demuxStart=ha()),this._demux(e,t,i),this._fix(s,t,i)}_parseVideoData(){if(!this._videoPesData.length)return void this.player.debug.log(this.TAG_NAME,"_parseVideoData","no video pes data");const e=this._parsePES(ih(...this._videoPesData));if(!e||e.error)return void(e&&"startPrefixError"===e.code&&(this._videoPesData=[]));const t=function(e){const t=e.length;let i=2,s=0;for(;null!==e[i]&&void 0!==e[i]&&1!==e[i];)i++;if(i++,s=i+2,s>=t)return[];const r=[];for(;s<t;)switch(e[s]){case 0:if(0!==e[s-1]){s+=2;break}if(0!==e[s-2]){s++;break}i!==s-2&&r.push(e.subarray(i,s-2));do{s++}while(1!==e[s]&&s<t);i=s+1,s=i+2;break;case 1:if(0!==e[s-1]||0!==e[s-2]){s+=3;break}i!==s-2&&r.push(e.subarray(i,s-2)),i=s+1,s=i+2;break;default:s+=3}return i<t&&r.push(e.subarray(i)),r}(e.data);t?this._createVideoSample(t,e.pts,e.dts):this.player.debug.warn(this.TAG_NAME,"Cannot parse avc units",e),this._videoPesData=[]}_createVideoSample(e,t,i){if(!e.length)return;const s=this._codecType===wt,r={isIFrame:!1,type:Ge,isHevc:s,vps:null,sps:null,pps:null,pts:t,dts:i,payload:null};e.forEach((e=>{const t=s?e[0]>>>1&63:31&e[0];switch(t){case 5:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:if(!s&&5!==t||s&&5===t)break;r.isIFrame=!0,this._gopId++;break;case 6:case 39:case 40:if(!s&&6!==t||s&&6===t)break;return void function(e,t){const i=e.length;let s=t?2:1,r=0,a=0,o="";for(;255===e[s];)r+=255,s++;for(r+=e[s++];255===e[s];)a+=255,s++;if(a+=e[s++],5===r&&i>s+16)for(let t=0;t<16;t++)o+=e[s].toString(16),s++;e.subarray(s)}(function(e){const t=e.byteLength,i=[];let s=1;for(;s<t-2;)0===e[s]&&0===e[s+1]&&3===e[s+2]?(i.push(s+2),s+=2):s++;if(!i.length)return e;const r=t-i.length,a=new Uint8Array(r);let o=0;for(s=0;s<r;o++,s++)o===i[0]&&(o++,i.shift()),a[s]=e[o];return a}(e),s);case 32:if(!s)break;r.vps||(r.vps=e);break;case 7:case 33:if(!s&&7!==t||s&&7===t)break;r.sps||(r.sps=e);break;case 8:case 34:if(!s&&8!==t||s&&8===t)break;r.pps||(r.pps=e)}if(s&&qn(t)||!s&&Mn(t)){const t=aa(e);if(r.payload){const e=new Uint8Array(r.payload.byteLength+t.byteLength);e.set(r.payload,0),e.set(t,r.payload.byteLength),r.payload=e}else r.payload=t}}));let a=null;s?r.sps&&r.vps&&r.pps&&(a=Vn({vps:r.vps,sps:r.sps,pps:r.pps})):r.sps&&r.pps&&(a=Ln({sps:r.sps,pps:r.pps})),a&&(this.player.debug.log(this.TAG_NAME,"_createVideoSample","seqHeader"),this._doDecodeByHls(a,Ge,Math.round(r.pts/90),!0,0)),r.isIFrame&&this.calcIframeIntervalTimestamp(Math.round(r.dts/90)),this.videoTrack.samples=this.videoTrack.samples.concat(r)}_parseAudioData(){if(!this._audioPesData.length)return;if(!this.player._opt.hasAudio)return;const e=this._parsePES(ih(...this._audioPesData));if(e&&!e.error){if(this._audioCodecType===Et){const t=function(e,t){const i=e.length;let s=0;for(;s+2<i&&(255!==e[s]||240!=(246&e[s+1]));)s++;if(s>=i)return;const r=s,a=[],o=(60&e[s+2])>>>2,n=zr[o];if(!n)throw new Error(`Invalid sampling index: ${o}`);const l=1+((192&e[s+2])>>>6),d=(1&e[s+2])<<2|(192&e[s+3])>>>6;let h,c,u=0;const p=Kr(n);for(;s+7<i;)if(255===e[s]&&240==(246&e[s+1])){if(c=(3&e[s+3])<<11|e[s+4]<<3|(224&e[s+5])>>5,i-s<c)break;h=2*(1&~e[s+1]),a.push({pts:t+u*p,data:e.subarray(s+7+h,s+c)}),u++,s+=c}else s++;return{skip:r,remaining:s>=i?void 0:e.subarray(s),frames:a,samplingFrequencyIndex:o,sampleRate:n,objectType:l,channelCount:d,originCodec:`mp4a.40.${l}`}}(e.data,e.originalPts);if(t){if(this.audioTrack.codec=t.codec,this.audioTrack.sampleRate=t.sampleRate,this.audioTrack.channelCount=t.channelCount,!this._isSendAACSeqHeader){const e=Vr({profile:t.objectType,sampleRate:t.samplingFrequencyIndex,channel:t.channelCount});this._isSendAACSeqHeader=!0,this.player.debug.log(this.TAG_NAME,"aac seq header",`profile: ${t.objectType}, sampleRate:${t.sampleRate},sampleRateIndex: ${t.samplingFrequencyIndex}, channel: ${t.channelCount}`),this._doDecodeByHls(e,je,0,!1,0)}if(this._isSendAACSeqHeader){const e=[];t.frames.forEach((t=>{const i=t.pts,s=new Uint8Array(t.data.length+2);s.set([175,1],0),s.set(t.data,2);const r={type:je,pts:i,dts:i,payload:s};e.push(r)})),this.audioTrack.samples=this.audioTrack.samples.concat(e)}else this.player.debug.warn(this.TAG_NAME,"aac seq header not send")}else this.player.debug.warn(this.TAG_NAME,"aac parseADTS error")}this._audioPesData=[]}else e&&"startPrefixError"===e.code&&(this._audioPesData=[])}_fix(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e=Math.round(9e4*e);const s=this.videoTrack,r=this.audioTrack,a=s.samples,o=r.samples;if(!a.length&&!o.length)return;const n=a[0],l=o[0];let d=0;if(a.length&&o.length&&(d=n.dts-l.pts),this._baseDtsInited||this._calculateBaseDts(),t&&(this._calculateBaseDts(),this._baseDts-=e),!i){this._videoNextDts=d>0?e+d:e,this._audioNextPts=d>0?e:e-d;const t=n?n.dts-this._baseDts-this._videoNextDts:0,i=l?l.pts-this._baseDts-this._audioNextPts:0;Math.abs(t||i)>Pr&&(this._calculateBaseDts(this.audioTrack,this.videoTrack),this._baseDts-=e)}this._resetBaseDtsWhenStreamBreaked(),this._fixAudio(r),this._fixVideo(s);let h=s.samples.concat(r.samples);h=h.map((e=>(e.dts=Math.round(e.dts/90),e.pts=Math.round(e.pts/90),e.cts=e.pts-e.dts,e))).sort(((e,t)=>e.dts-t.dts)),h.forEach((e=>{const t=new Uint8Array(e.payload);delete e.payload,this._isUseWorker()?this.loopWorker.postMessage({...e,payload:t,cmd:"sample"},[t.buffer]):e.type===Ge?this._doDecodeVideo({...e,payload:t}):e.type===je&&this._doDecodeAudio({...e,payload:t})})),Ao(this._hasCalcFps)&&this._isUseWorker()&&(this._hasCalcFps=!0,this._calcDecodeFps(h))}_isUseWorker(){return!this.player.isUseMSE()&&this.isForHls()}_calculateBaseDts(){const e=this.audioTrack,t=this.videoTrack,i=e.samples,s=t.samples;if(!i.length&&!s.length)return!1;let r=1/0,a=1/0;i.length&&(e.baseDts=r=i[0].pts),s.length&&(t.baseDts=a=s[0].dts),this._baseDts=Math.min(r,a);const o=a-r;return Number.isFinite(o)&&Math.abs(o)>45e3&&this.player.debug.warn(this.TAG_NAME,`large av first frame gap,\n video pts: ${a},\n audio pts: ${r},\n base dts: ${this._baseDts},\n detect is: ${o}`),this._baseDtsInited=!0,!0}_resetBaseDtsWhenStreamBreaked(){if(this._baseDtsInited&&this._videoTimestampBreak&&this._audioTimestampBreak){if(!this._calculateBaseDts(this.audioTrack,this.videoTrack))return;this._baseDts-=Math.min(this._audioNextPts,this._videoNextDts),this._audioLastSample=null,this._videoLastSample=null,this._videoTimestampBreak=!1,this._audioTimestampBreak=!1}}_fixAudio(e){const t=e.samples;t.length&&(t.forEach((e=>{e.pts-=this._baseDts,e.dts=e.pts})),this._doFixAudioInternal(e,t,9e4))}_fixVideo(e){const t=e.samples;if(!t.length)return;if(t.forEach((e=>{e.dts-=this._baseDts,e.pts-=this._baseDts})),void 0===this._videoNextDts){const e=t[0];this._videoNextDts=e.dts}const i=t.length;let s=0;const r=t[0],a=t[1],o=this._videoNextDts-r.dts;let n;Math.abs(o)>45e3&&(r.dts+=o,r.pts+=o,this.player.debug.warn(this.TAG_NAME,`large video gap between chunk,\n next dts is ${this._videoNextDts},\n first dts is ${r.dts},\n next dts is ${a.dts},\n duration is ${o}`),a&&Math.abs(a.dts-r.dts)>Pr&&(this._videoTimestampBreak=!0,t.forEach(((e,t)=>{0!==t&&(e.dts+=o,e.pts+=o)}))));const l=e.samples[0],d=e.samples[i-1];n=1===i?9e3:Math.floor((d.dts-l.dts)/(i-1));for(let r=0;r<i;r++){const a=t[r].dts,o=t[r+1];if(s=r<i-1?o.dts-a:t[r-1]?Math.min(a-t[r-1].dts,n):n,s>Pr||s<0){this._videoTimestampBreak=!0,s=this._audioTimestampBreak?n:Math.max(s,2700);const i=this._audioNextPts||0;o&&o.dts>i&&(s=n),this.player.debug.warn(this.TAG_NAME,`large video gap between frames,\n time is ${a/e.timescale},\n dts is ${a},\n origin dts is ${t[r].originalDts},\n next dts is ${this._videoNextDts},\n sample Duration is ${s} ,\n ref Sample DurationInt is ${n}`)}t[r].duration=s,this._videoNextDts+=s}}_doFixAudioInternal(e,t,i){e.sampleDuration||(e.sampleDuration=Kr(e.timescale,i));const s=e.sampleDuration;if(void 0===this._audioNextPts){const e=t[0];this._audioNextPts=e.pts}for(let i=0;i<t.length;i++){const r=this._audioNextPts,a=t[i],o=a.pts-r;if(!this._audioTimestampBreak&&o>=3*s&&o<=Lr&&!Sa()){qr(e.codec,e.channelCount)||t[0].data.subarray();const n=Math.floor(o/s);Math.abs(a.pts-this._lastAudioExceptionGapDot)>Ir&&(this._lastAudioExceptionGapDot=a.pts),this.player.debug.warn(this.TAG_NAME,`audio gap detected,\n pts is ${t.pts},\n originPts is ${t.originalPts},\n count is ${n},\n nextPts is ${r},\n ref sample duration is ${s}`);for(let e=0;e<n;e++)this._audioNextPts+=s,i++;i--}else o<=-3*s&&o>=-9e4?(Math.abs(a.pts-this._lastAudioExceptionOverlapDot)>Ir&&(this._lastAudioExceptionOverlapDot=a.pts,this.player.debug.warn(this.TAG_NAME,`audio overlap detected,\n pts is ${a.pts},\n originPts is ${a.originalPts},\n nextPts is ${r},\n ref sample duration is ${s}`)),t.splice(i,1),i--):(Math.abs(o)>=Lr&&(this._audioTimestampBreak=!0,Math.abs(a.pts-this._lastAudioExceptionLargeGapDot)>Ir&&(this._lastAudioExceptionLargeGapDot=a.pts,this.player.debug.warn(this.TAG_NAME,`large audio gap detected,\n time is ${a.pts/1e3}\n pts is ${a.pts},\n originPts is ${a.originalPts},\n nextPts is ${r},\n sample duration is ${o}\n ref sample duration is ${s}`))),a.dts=a.pts=r,this._audioNextPts+=s)}}_calcDecodeFps(e){const t=ho(e.map((e=>({ts:e.dts||e.pts,type:e.type}))),Ge);t&&(this.player.debug.log(this.TAG_NAME,`_calcDecodeFps() video fps is ${t}, update base fps is ${this._basefps}`),this._basefps=t),this._postMessageToLoopWorker("updateBaseFps",{baseFps:this._basefps})}_initLoopWorker(){this.player.debug.log(this.TAG_NAME,"_initLoopWorker()");const e=Eo(function(){const e=1,t=2;let i=new class{constructor(){this.baseFps=0,this.fpsInterval=null,this.preLoopTimestamp=null,this.startBpsTime=null,this.allSampleList=[]}destroy(){this._clearInterval(),this.baseFps=0,this.allSampleList=[],this.preLoopTimestamp=null,this.startBpsTime=null}updateBaseFps(e){this.baseFps=e,this._clearInterval(),this._startInterval()}pushSample(e){delete e.cmd,this.allSampleList.push(e)}_startInterval(){const e=Math.ceil(1e3/this.baseFps);this.fpsInterval=setInterval((()=>{let t=(new Date).getTime();this.preLoopTimestamp||(this.preLoopTimestamp=t),this.startBpsTime||(this.startBpsTime=t);const i=t-this.preLoopTimestamp;if(i>2*e&&console.warn(`JbPro:[TsLoader LoopWorker] loop interval is ${i}ms, more than ${e} * 2ms`),this._loop(),this.preLoopTimestamp=(new Date).getTime(),this.startBpsTime){t-this.startBpsTime>=1e3&&(this._calcSampleList(),this.startBpsTime=t)}}),e)}_clearInterval(){this.fpsInterval&&(clearInterval(this.fpsInterval),this.fpsInterval=null)}_calcSampleList(){const i={buferredDuration:0,allListLength:this.allSampleList.length,audioListLength:0,videoListLength:0};this.allSampleList.forEach((s=>{s.type===t?(i.videoListLength++,s.duration&&(i.buferredDuration+=Math.round(s.duration/90))):s.type===e&&i.audioListLength++})),postMessage({cmd:"sampleListInfo",...i})}_loop(){let i=null;if(this.allSampleList.length)if(i=this.allSampleList.shift(),i.type===t){postMessage({cmd:"decodeVideo",...i},[i.payload.buffer]);let t=this.allSampleList[0];for(;t&&t.type===e;)i=this.allSampleList.shift(),postMessage({cmd:"decodeAudio",...i},[i.payload.buffer]),t=this.allSampleList[0]}else i.type===e&&(postMessage({cmd:"decodeAudio",...i},[i.payload.buffer]),this.allSampleList.length&&this.allSampleList[0].type===t&&(i=this.allSampleList.shift(),postMessage({cmd:"decodeVideo",...i},[i.payload.buffer])))}};self.onmessage=e=>{const t=e.data;switch(t.cmd){case"updateBaseFps":i.updateBaseFps(t.baseFps);break;case"sample":i.pushSample(t);break;case"destroy":i.destroy(),i=null}}}.toString()),t=new Blob([e],{type:"text/javascript"}),i=URL.createObjectURL(t);let s=new Worker(i);this.workerUrl=i,this.workerClearTimeout=setTimeout((()=>{window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null,this.workerClearTimeout=null}),ie),s.onmessage=e=>{const t=e.data;switch(t.cmd){case"decodeVideo":this._doDecodeVideo(t);break;case"decodeAudio":this._doDecodeAudio(t);break;case"sampleListInfo":this.tempSampleListInfo=t}},this.loopWorker=s}_postMessageToLoopWorker(e,t){this._isUseWorker()&&(this.loopWorker?this.loopWorker.postMessage({cmd:e,...t}):this.player.debug.warn(this.TAG_NAME,"loop worker is not init, can not post message"))}_doDecodeAudio(e){const t=new Uint8Array(e.payload);this.player.updateStats({abps:t.byteLength});let i=t;yo(this.player._opt.m7sCryptoAudio)&&(i=this.cryptoPayloadAudio(t)),this.isForHls()?this._doDecodeByHls(i,je,e.dts,!1,0):this._doDecodeByTs(i,je,e.dts,!1,0)}_doDecodeVideo(e){const t=new Uint8Array(e.payload);let i=null;i=e.isHevc?Wn(t,e.isIFrame):In(t,e.isIFrame),this.player.updateStats({dts:e.dts,vbps:i.byteLength});const s=e.pts-e.dts;let r=this.cryptoPayload(i,e.isIFrame);this.isForHls()?this._doDecodeByHls(r,Ge,e.dts,e.isIFrame,s):this._doDecodeByTs(r,Ge,e.dts,e.isIFrame,s)}_stopDecodeLoopInterval(){this._baseFpsInterval&&(clearInterval(this._baseFpsInterval),this._baseFpsInterval=null)}getBuferredDuration(){return this.tempSampleListInfo.buferredDuration||0}getSampleListLength(){return this.tempSampleListInfo.allListLength||0}getSampleAudioListLength(){return this.tempSampleListInfo.audioListLength||0}getSampleVideoListLength(){return this.tempSampleListInfo.videoListLength||0}isForHls(){return this._isForHls}getInputByteLength(){return this._remainingPacketData&&this._remainingPacketData.byteLength||0}}function _b(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<8)+(e[t+1]||0)}function vb(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}function wb(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const i=Math.pow(2,32);return vb(e,t)*i+vb(e,t+4)}const Sb="aac",Tb="g7110a",Eb="g7110m",kb="avc",Cb="hevc";class xb{static getFrameDuration(e){return 1024*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4)/e}static getRateIndexByRate(e){return xb.FREQ.indexOf(e)}}function Rb(e,t,i,s,r,a){const o=[],n=null==r?void 0:r.entries,l=t.entries,d=s.entries,h=i.entrySizes,c=null==a?void 0:a.entries;let u,p,f;c&&(u={},c.forEach((e=>{u[e-1]=!0}))),n&&(p=[],n.forEach((e=>{let{count:t,offset:i}=e;for(let e=0;e<t;e++)p.push(i)})));let m=-1,g=0,y=0,A=0,b=0,_=0,v=l[0].samplesPerChunk,w=l[1]?l[1].firstChunk-1:1/0;return e.entries.forEach((e=>{let{count:t,delta:s}=e;for(let e=0;e<t;e++)f={dts:g,duration:s,size:h[y]||i.sampleSize,offset:d[A]+_,index:y},c&&(f.keyframe=u[y],f.keyframe&&m++,f.gopId=m),p&&y<p.length&&(f.pts=f.dts+p[y]),o.push(f),g+=s,y++,y<v?_+=f.size:(A++,_=0,A>=w&&(b++,w=l[b+1]?l[b+1].firstChunk-1:1/0),v+=l[b].samplesPerChunk)})),o}function Db(e,t){return e.dataReferenceIndex=_b(t,6),e.width=_b(t,24),e.height=_b(t,26),e.horizresolution=vb(t,28),e.vertresolution=vb(t,32),e.frameCount=_b(t,40),e.depth=_b(t,74),78}function Lb(e,t){return e.dataReferenceIndex=_b(t,6),e.channelCount=_b(t,16),e.sampleSize=_b(t,18),e.sampleRate=vb(t,24)/65536,28}function Ib(e,t,i){if(!e)return;if(e.size!==e.data.length)throw new Error(`box ${e.type} size !== data.length`);const s={start:e.start,size:e.size,headerSize:e.headerSize,type:e.type};return t&&(s.version=e.data[e.headerSize],s.flags=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<16)+(e[t+1]<<8)+(e[t+2]||0)}(e.data,e.headerSize+1),s.headerSize+=4),i(s,e.data.subarray(s.headerSize),s.start+s.headerSize),s}Jd(xb,"FREQ",[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350]);const Pb=function(e,t,i){const s=String(i),r=t>>0;let a=Math.ceil(r/s.length);const o=[],n=String(e);for(;a--;)o.push(s);return o.join("").substring(0,r-n.length)+n},Bb=function(){const e=[];for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return i.forEach((t=>{e.push(Pb(Number(t).toString(16),2,0))})),e[0]};class Mb{static probe(e){return!!Mb.findBox(e,["ftyp"])}static findBox(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s=[];if(!e)return s;let r=0,a="",o=0;for(;e.length>7;){if(r=vb(e),a=String.fromCharCode.apply(null,e.subarray(4,8)),o=8,1===r?(r=wb(e,8),o+=8):r||(r=e.length),!t[0]||a===t[0]){const n=e.subarray(0,r);if(!(t.length<2))return Mb.findBox(n.subarray(o),t.slice(1),i+o);s.push({start:i,size:r,headerSize:o,type:a,data:n})}i+=r,e=e.subarray(r)}return s}static tfhd(e){return Ib(e,!0,((e,t)=>{e.trackId=vb(t);let i=4;const s=1&e.flags,r=2&e.flags,a=8&e.flags,o=16&e.flags,n=32&e.flags;s&&(i+=4,e.baseDataOffset=vb(t,i),i+=4),r&&(e.sampleDescriptionIndex=vb(t,i),i+=4),a&&(e.defaultSampleDuration=vb(t,i),i+=4),o&&(e.defaultSampleSize=vb(t,i),i+=4),n&&(e.defaultSampleFlags=vb(t,i))}))}static sidx(e){return Ib(e,!0,((e,t)=>{let i=0;e.reference_ID=vb(t,i),i+=4,e.timescale=vb(t,i),i+=4,0===e.version?(e.earliest_presentation_time=vb(t,i),i+=4,e.first_offset=vb(t,i),i+=4):(e.earliest_presentation_time=wb(t,i),i+=8,e.first_offset=wb(t,i),i+=8),i+=2,e.references=[];const s=_b(t,i);i+=2;for(let r=0;r<s;r++){const s={};e.references.push(s);let r=vb(t,i);i+=4,s.reference_type=r>>31&1,s.referenced_size=2147483647&r,s.subsegment_duration=vb(t,i),i+=4,r=vb(t,i),i+=4,s.starts_with_SAP=r>>31&1,s.SAP_type=r>>28&7,s.SAP_delta_time=268435455&r}}))}static moov(e){return Ib(e,!1,((e,t,i)=>{e.mvhd=Mb.mvhd(Mb.findBox(t,["mvhd"],i)[0]),e.trak=Mb.findBox(t,["trak"],i).map((e=>Mb.trak(e))),e.pssh=Mb.pssh(Mb.findBox(t,["pssh"],i)[0])}))}static mvhd(e){return Ib(e,!0,((e,t)=>{let i=0;1===e.version?(e.timescale=vb(t,16),e.duration=wb(t,20),i+=28):(e.timescale=vb(t,8),e.duration=vb(t,12),i+=16),e.nextTrackId=vb(t,i+76)}))}static trak(e){return Ib(e,!1,((e,t,i)=>{e.tkhd=Mb.tkhd(Mb.findBox(t,["tkhd"],i)[0]),e.mdia=Mb.mdia(Mb.findBox(t,["mdia"],i)[0])}))}static tkhd(e){return Ib(e,!0,((e,t)=>{let i=0;1===e.version?(e.trackId=vb(t,16),e.duration=wb(t,24),i+=32):(e.trackId=vb(t,8),e.duration=vb(t,16),i+=20),e.width=vb(t,i+52),e.height=vb(t,i+56)}))}static mdia(e){return Ib(e,!1,((e,t,i)=>{e.mdhd=Mb.mdhd(Mb.findBox(t,["mdhd"],i)[0]),e.hdlr=Mb.hdlr(Mb.findBox(t,["hdlr"],i)[0]),e.minf=Mb.minf(Mb.findBox(t,["minf"],i)[0])}))}static mdhd(e){return Ib(e,!0,((e,t)=>{let i=0;1===e.version?(e.timescale=vb(t,16),e.duration=wb(t,20),i+=28):(e.timescale=vb(t,8),e.duration=vb(t,12),i+=16);const s=_b(t,i);e.language=String.fromCharCode(96+(s>>10&31),96+(s>>5&31),96+(31&s))}))}static hdlr(e){return Ib(e,!0,((e,t)=>{0===e.version&&(e.handlerType=String.fromCharCode.apply(null,t.subarray(4,8)))}))}static minf(e){return Ib(e,!1,((e,t,i)=>{e.vmhd=Mb.vmhd(Mb.findBox(t,["vmhd"],i)[0]),e.smhd=Mb.smhd(Mb.findBox(t,["smhd"],i)[0]),e.stbl=Mb.stbl(Mb.findBox(t,["stbl"],i)[0])}))}static vmhd(e){return Ib(e,!0,((e,t)=>{e.graphicsmode=_b(t),e.opcolor=[_b(t,2),_b(t,4),_b(t,6)]}))}static smhd(e){return Ib(e,!0,((e,t)=>{e.balance=_b(t)}))}static stbl(e){return Ib(e,!1,((e,t,i)=>{var s,r,a;e.stsd=Mb.stsd(Mb.findBox(t,["stsd"],i)[0]),e.stts=Mb.stts(Mb.findBox(t,["stts"],i)[0]),e.ctts=Mb.ctts(Mb.findBox(t,["ctts"],i)[0]),e.stsc=Mb.stsc(Mb.findBox(t,["stsc"],i)[0]),e.stsz=Mb.stsz(Mb.findBox(t,["stsz"],i)[0]),e.stco=Mb.stco(Mb.findBox(t,["stco"],i)[0]),e.stco||(e.co64=Mb.co64(Mb.findBox(t,["co64"],i)[0]),e.stco=e.co64);const o=null===(s=e.stsd.entries[0])||void 0===s||null===(r=s.sinf)||void 0===r||null===(a=r.schi)||void 0===a?void 0:a.tenc.default_IV_size;e.stss=Mb.stss(Mb.findBox(t,["stss"],i)[0]),e.senc=Mb.senc(Mb.findBox(t,["senc"],i)[0],o)}))}static senc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return Ib(e,!0,((e,i)=>{let s=0;const r=vb(i,s);s+=4,e.samples=[];for(let a=0;a<r;a++){const r={InitializationVector:[]};for(let e=0;e<t;e++)r.InitializationVector[e]=i[s+e];if(s+=t,2&e.flags){r.subsamples=[];const e=_b(i,s);s+=2;for(let t=0;t<e;t++){const e={};e.BytesOfClearData=_b(i,s),s+=2,e.BytesOfProtectedData=vb(i,s),s+=4,r.subsamples.push(e)}}e.samples.push(r)}}))}static pssh(e){return Ib(e,!0,((e,t)=>{const i=[],s=[];let r=0;for(let e=0;e<16;e++)s.push(Bb(t[r+e]));if(r+=16,e.version>0){const e=vb(t,r);r+=4;for(let s=0;s<(""+e).length;s++)for(let e=0;e<16;e++){const e=t[r];r+=1,i.push(Bb(e))}}const a=vb(t,r);e.data_size=a,r+=4,e.kid=i,e.system_id=s,e.buffer=t}))}static stsd(e){return Ib(e,!0,((e,t,i)=>{e.entryCount=vb(t),e.entries=Mb.findBox(t.subarray(4),[],i+4).map((e=>{switch(e.type){case"avc1":case"avc2":case"avc3":case"avc4":return Mb.avc1(e);case"hvc1":case"hev1":return Mb.hvc1(e);case"mp4a":return Mb.mp4a(e);case"alaw":case"ulaw":return Mb.alaw(e);case"enca":return Ib(e,!1,((e,t,i)=>{e.channelCount=_b(t,16),e.samplesize=_b(t,18),e.sampleRate=vb(t,24)/65536,t=t.subarray(28),e.sinf=Mb.sinf(Mb.findBox(t,["sinf"],i)[0]),e.esds=Mb.esds(Mb.findBox(t,["esds"],i)[0])}));case"encv":return Ib(e,!1,((e,t,i)=>{e.width=_b(t,24),e.height=_b(t,26),e.horizresolution=vb(t,28),e.vertresolution=vb(t,32),t=t.subarray(78),e.sinf=Mb.sinf(Mb.findBox(t,["sinf"],i)[0]),e.avcC=Mb.avcC(Mb.findBox(t,["avcC"],i)[0]),e.hvcC=Mb.hvcC(Mb.findBox(t,["hvcC"],i)[0]),e.pasp=Mb.pasp(Mb.findBox(t,["pasp"],i)[0])}))}})).filter(Boolean)}))}static tenc(e){return Ib(e,!1,((e,t)=>{let i=6;e.default_IsEncrypted=t[i],i+=1,e.default_IV_size=t[i],i+=1,e.default_KID=[];for(let s=0;s<16;s++)e.default_KID.push(Bb(t[i])),i+=1}))}static schi(e){return Ib(e,!1,((e,t,i)=>{e.tenc=Mb.tenc(Mb.findBox(t,["tenc"],i)[0])}))}static sinf(e){return Ib(e,!1,((e,t,i)=>{e.schi=Mb.schi(Mb.findBox(t,["schi"],i)[0]),e.frma=Mb.frma(Mb.findBox(t,["frma"],i)[0])}))}static frma(e){return Ib(e,!1,((e,t)=>{e.data_format="";for(let i=0;i<4;i++)e.data_format+=String.fromCharCode(t[i])}))}static avc1(e){return Ib(e,!1,((e,t,i)=>{const s=Db(e,t),r=t.subarray(s);i+=s,e.avcC=Mb.avcC(Mb.findBox(r,["avcC"],i)[0]),e.pasp=Mb.pasp(Mb.findBox(r,["pasp"],i)[0])}))}static avcC(e){return Ib(e,!1,((e,t)=>{e.configurationVersion=t[0],e.AVCProfileIndication=t[1],e.profileCompatibility=t[2],e.AVCLevelIndication=t[3],e.codec=function(e){let t,i="avc1.";for(let s=0;s<3;s++)t=e[s].toString(16),t.length<2&&(t=`0${t}`),i+=t;return i}([t[1],t[2],t[3]]),e.lengthSizeMinusOne=3&t[4],e.spsLength=31&t[5],e.sps=[];let i=6;for(let s=0;s<e.spsLength;s++){const s=_b(t,i);i+=2,e.sps.push(t.subarray(i,i+s)),i+=s}e.ppsLength=t[i],i+=1,e.pps=[];for(let s=0;s<e.ppsLength;s++){const s=_b(t,i);i+=2,e.pps.push(t.subarray(i,i+=s)),i+=s}}))}static hvc1(e){return Ib(e,!1,((e,t,i)=>{const s=Db(e,t),r=t.subarray(s);i+=s,e.hvcC=Mb.hvcC(Mb.findBox(r,["hvcC"],i)[0]),e.pasp=Mb.pasp(Mb.findBox(r,["pasp"],i)[0])}))}static hvcC(e){return Ib(e,!1,((t,i)=>{t.data=e.data,t.codec="hev1.1.6.L93.B0",t.configurationVersion=i[0];const s=i[1];t.generalProfileSpace=s>>6,t.generalTierFlag=(32&s)>>5,t.generalProfileIdc=31&s,t.generalProfileCompatibility=vb(i,2),t.generalConstraintIndicatorFlags=i.subarray(6,12),t.generalLevelIdc=i[12],t.avgFrameRate=_b(i,19),t.numOfArrays=i[22],t.vps=[],t.sps=[],t.pps=[];let r=23,a=0,o=0,n=0;for(let e=0;e<t.numOfArrays;e++){a=63&i[r],o=_b(i,r+1),r+=3;const e=[];for(let t=0;t<o;t++)n=_b(i,r),r+=2,e.push(i.subarray(r,r+n)),r+=n;32===a?t.vps.push(...e):33===a?t.sps.push(...e):34===a&&t.pps.push(...e)}}))}static pasp(e){return Ib(e,!1,((e,t)=>{e.hSpacing=vb(t),e.vSpacing=vb(t,4)}))}static mp4a(e){return Ib(e,!1,((e,t,i)=>{const s=Lb(e,t);e.esds=Mb.esds(Mb.findBox(t.subarray(s),["esds"],i+s)[0])}))}static esds(e){return Ib(e,!0,((e,t)=>{e.codec="mp4a.";let i=0,s=0,r=0,a=0;for(;t.length;){for(i=0,a=t[i],s=t[i+1],i+=2;128&s;)r=(127&s)<<7,s=t[i],i+=1;if(r+=127&s,3===a)t=t.subarray(i+3);else{if(4!==a){if(5===a){const s=e.config=t.subarray(i,i+r);let a=(248&s[0])>>3;return 31===a&&s.length>=2&&(a=32+((7&s[0])<<3)+((224&s[1])>>5)),e.objectType=a,e.codec+=a.toString(16),void("."===e.codec[e.codec.length-1]&&(e.codec=e.codec.substring(0,e.codec.length-1)))}return void("."===e.codec[e.codec.length-1]&&(e.codec=e.codec.substring(0,e.codec.length-1)))}e.codec+=(t[i].toString(16)+".").padStart(3,"0"),t=t.subarray(i+13)}}}))}static alaw(e){return Ib(e,!1,((e,t)=>{Lb(e,t)}))}static stts(e){return Ib(e,!0,((e,t)=>{const i=vb(t),s=[];let r=4;for(let e=0;e<i;e++)s.push({count:vb(t,r),delta:vb(t,r+4)}),r+=8;e.entryCount=i,e.entries=s}))}static ctts(e){return Ib(e,!0,((e,t)=>{const i=vb(t),s=[];let r=4;if(1===e.version)for(let e=0;e<i;e++)s.push({count:vb(t,r),offset:vb(t,r+4)}),r+=8;else for(let e=0;e<i;e++)s.push({count:vb(t,r),offset:-(1+~vb(t,r+4))}),r+=8;e.entryCount=i,e.entries=s}))}static stsc(e){return Ib(e,!0,((e,t)=>{const i=vb(t),s=[];let r=4;for(let e=0;e<i;e++)s.push({firstChunk:vb(t,r),samplesPerChunk:vb(t,r+4),sampleDescriptionIndex:vb(t,r+8)}),r+=12;e.entryCount=i,e.entries=s}))}static stsz(e){return Ib(e,!0,((e,t)=>{const i=vb(t),s=vb(t,4),r=[];if(!i){let e=8;for(let i=0;i<s;i++)r.push(vb(t,e)),e+=4}e.sampleSize=i,e.sampleCount=s,e.entrySizes=r}))}static stco(e){return Ib(e,!0,((e,t)=>{const i=vb(t),s=[];let r=4;for(let e=0;e<i;e++)s.push(vb(t,r)),r+=4;e.entryCount=i,e.entries=s}))}static co64(e){return Ib(e,!0,((e,t)=>{const i=vb(t),s=[];let r=4;for(let e=0;e<i;e++)s.push(wb(t,r)),r+=8;e.entryCount=i,e.entries=s}))}static stss(e){return Ib(e,!0,((e,t)=>{const i=vb(t),s=[];let r=4;for(let e=0;e<i;e++)s.push(vb(t,r)),r+=4;e.entryCount=i,e.entries=s}))}static moof(e){return Ib(e,!1,((e,t,i)=>{e.mfhd=Mb.mfhd(Mb.findBox(t,["mfhd"],i)[0]),e.traf=Mb.findBox(t,["traf"],i).map((e=>Mb.traf(e)))}))}static mfhd(e){return Ib(e,!0,((e,t)=>{e.sequenceNumber=vb(t)}))}static traf(e){return Ib(e,!1,((e,t,i)=>{e.tfhd=Mb.tfhd(Mb.findBox(t,["tfhd"],i)[0]),e.tfdt=Mb.tfdt(Mb.findBox(t,["tfdt"],i)[0]),e.trun=Mb.trun(Mb.findBox(t,["trun"],i)[0])}))}static trun(e){return Ib(e,!0,((e,t)=>{const{version:i,flags:s}=e,r=t.length,a=e.sampleCount=vb(t);let o=4;if(r>o&&1&s&&(e.dataOffset=-(1+~vb(t,o)),o+=4),r>o&&4&s&&(e.firstSampleFlags=vb(t,o),o+=4),e.samples=[],r>o){let r;for(let n=0;n<a;n++)r={},256&s&&(r.duration=vb(t,o),o+=4),512&s&&(r.size=vb(t,o),o+=4),1024&s&&(r.flags=vb(t,o),o+=4),2048&s&&(r.cts=i?-(1+~vb(t,o+4)):vb(t,o),o+=4),e.samples.push(r)}}))}static tfdt(e){return Ib(e,!0,((e,t)=>{1===e.version?e.baseMediaDecodeTime=wb(t):e.baseMediaDecodeTime=vb(t)}))}static probe(e){return!!Mb.findBox(e,["ftyp"])}static parseSampleFlags(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}}static moovToTrack(e,t,i){var s,r;const a=e.trak;if(!a||!a.length)return;const o=a.find((e=>{var t,i;return"vide"===(null===(t=e.mdia)||void 0===t||null===(i=t.hdlr)||void 0===i?void 0:i.handlerType)})),n=a.find((e=>{var t,i;return"soun"===(null===(t=e.mdia)||void 0===t||null===(i=t.hdlr)||void 0===i?void 0:i.handlerType)}));if(o&&t){var l,d,h,c,u,p,f;const i=t,s=null===(l=o.tkhd)||void 0===l?void 0:l.trackId;null!=s&&(i.id=o.tkhd.trackId),i.tkhdDuration=o.tkhd.duration,i.mvhdDurtion=e.mvhd.duration,i.mvhdTimecale=e.mvhd.timescale,i.timescale=i.formatTimescale=o.mdia.mdhd.timescale,i.duration=o.mdia.mdhd.duration||i.mvhdDurtion/i.mvhdTimecale*i.timescale;const r=o.mdia.minf.stbl.stsd.entries[0];if(i.width=r.width,i.height=r.height,r.pasp&&(i.sarRatio=[r.pasp.hSpacing,r.pasp.vSpacing]),r.hvcC)i.codecType=Cb,i.codec=r.hvcC.codec,i.vps=r.hvcC.vps,i.sps=r.hvcC.sps,i.pps=r.hvcC.pps,i.hvcC=r.hvcC.data;else{if(!r.avcC)throw new Error("unknown video stsd entry");i.codecType=kb,i.codec=r.avcC.codec,i.sps=r.avcC.sps,i.pps=r.avcC.pps}var m,g,y,A,b,_,v,w;if(i.present=!0,i.ext={},i.ext.stss=null===(d=o.mdia)||void 0===d||null===(h=d.minf)||void 0===h||null===(c=h.stbl)||void 0===c?void 0:c.stss,i.ext.ctts=null===(u=o.mdia)||void 0===u||null===(p=u.minf)||void 0===p||null===(f=p.stbl)||void 0===f?void 0:f.ctts,r&&"encv"===r.type)i.isVideoEncryption=!0,r.default_KID=null===(m=r.sinf)||void 0===m||null===(g=m.schi)||void 0===g?void 0:g.tenc.default_KID,r.default_IsEncrypted=null===(y=r.sinf)||void 0===y||null===(A=y.schi)||void 0===A?void 0:A.tenc.default_IsEncrypted,r.default_IV_size=null===(b=r.sinf)||void 0===b||null===(_=b.schi)||void 0===_?void 0:_.tenc.default_IV_size,i.videoSenc=o.mdia.minf.stbl.senc&&o.mdia.minf.stbl.senc.samples,r.data_format=null===(v=r.sinf)||void 0===v||null===(w=v.frma)||void 0===w?void 0:w.data_format,i.useEME=e.useEME,i.kidValue=e.kidValue,i.pssh=e.pssh,i.encv=r}if(n&&i){var S,T,E,k,C,x,R,D,L;const t=i,a=null===(S=n.tkhd)||void 0===S?void 0:S.trackId;null!=a&&(t.id=n.tkhd.trackId),t.tkhdDuration=n.tkhd.duration,t.mvhdDurtion=e.mvhd.duration,t.mvhdTimecale=e.mvhd.timescale,t.timescale=t.formatTimescale=n.mdia.mdhd.timescale,t.duration=n.mdia.mdhd.duration||t.mvhdDurtion/t.mvhdTimecale*t.timescale;const o=n.mdia.minf.stbl.stsd.entries[0];switch(t.sampleSize=o.sampleSize,t.sampleRate=o.sampleRate,t.channelCount=o.channelCount,t.present=!0,o.type){case"alaw":t.codecType=t.codec=Tb,t.sampleRate=8e3;break;case"ulaw":t.codecType=t.codec=Eb,t.sampleRate=8e3;break;default:t.codecType=Sb,t.sampleDuration=xb.getFrameDuration(t.sampleRate,t.timescale),t.sampleRateIndex=xb.getRateIndexByRate(t.sampleRate),t.objectType=(null===(s=o.esds)||void 0===s?void 0:s.objectType)||2,o.esds&&(t.config=Array.from(o.esds.config)),t.codec=(null===(r=o.esds)||void 0===r?void 0:r.codec)||"mp4a.40.2"}var I,P,B,M,U,F,O,N;if(t.sampleDuration=xb.getFrameDuration(t.sampleRate,t.timescale),t.objectType=(null===(T=o.esds)||void 0===T?void 0:T.objectType)||2,o.esds&&(o.esds.config?t.config=Array.from(o.esds.config):console.warn("esds config is null")),t.codec=(null===(E=o.esds)||void 0===E?void 0:E.codec)||"mp4a.40.2",t.sampleRateIndex=xb.getRateIndexByRate(t.sampleRate),t.ext={},t.ext.stss=null===(k=n.mdia)||void 0===k||null===(C=k.minf)||void 0===C||null===(x=C.stbl)||void 0===x?void 0:x.stss,t.ext.ctts=null===(R=n.mdia)||void 0===R||null===(D=R.minf)||void 0===D||null===(L=D.stbl)||void 0===L?void 0:L.ctts,t.present=!0,o&&"enca"===o.type)t.isAudioEncryption=!0,o.data_format=null===(I=o.sinf)||void 0===I||null===(P=I.frma)||void 0===P?void 0:P.data_format,o.default_KID=null===(B=o.sinf)||void 0===B||null===(M=B.schi)||void 0===M?void 0:M.tenc.default_KID,o.default_IsEncrypted=null===(U=o.sinf)||void 0===U||null===(F=U.schi)||void 0===F?void 0:F.tenc.default_IsEncrypted,o.default_IV_size=null===(O=o.sinf)||void 0===O||null===(N=O.schi)||void 0===N?void 0:N.tenc.default_IV_size,t.audioSenc=n.mdia.minf.stbl.senc&&n.mdia.minf.stbl.senc.samples,t.useEME=e.useEME,t.kidValue=e.kidValue,t.enca=o}if(i&&(i.isVideoEncryption=!!t&&t.isVideoEncryption),t&&(t.isAudioEncryption=!!i&&i.isAudioEncryption),null!=t&&t.encv||null!=i&&i.enca){var j,G;const e=null==t||null===(j=t.encv)||void 0===j?void 0:j.default_KID,s=null==i||null===(G=i.enca)||void 0===G?void 0:G.default_KID,r=e||s?(e||s).join(""):null;t&&(t.kid=r),i&&(i.kid=r)}return t&&(t.flags=3841),i&&(i.flags=1793),{videoTrack:t,audioTrack:i}}static evaluateDefaultDuration(e,t,i){var s;const r=null==t||null===(s=t.samples)||void 0===s?void 0:s.length;if(!r)return 1024;return 1024*r/t.timescale*e.timescale/i}static moofToSamples(e,t,i){const s={};return e.mfhd&&(t&&(t.sequenceNumber=e.mfhd.sequenceNumber),i&&(i.sequenceNumber=e.mfhd.sequenceNumber)),e.traf.forEach((e=>{let{tfhd:r,tfdt:a,trun:o}=e;if(!r||!o)return;a&&(t&&t.id===r.trackId&&(t.baseMediaDecodeTime=a.baseMediaDecodeTime),i&&i.id===r.trackId&&(i.baseMediaDecodeTime=a.baseMediaDecodeTime));const n=r.defaultSampleSize||0,l=r.defaultSampleDuration||Mb.evaluateDefaultDuration(t,i,o.samples.length||o.sampleCount);let d=o.dataOffset||0,h=0,c=-1;if(!o.samples.length&&o.sampleCount){s[r.trackId]=[];for(let e=0;e<o.sampleCount;e++)s[r.trackId].push({offset:d,dts:h,duration:l,size:n}),h+=l,d+=n}else s[r.trackId]=o.samples.map(((e,t)=>((e={offset:d,dts:h,pts:h+(e.cts||0),duration:e.duration||l,size:e.size||n,gopId:c,keyframe:0===t||null!==e.flags&&void 0!==e.flags&&(65536&e.flags)>>>0!=65536}).keyframe&&(c++,e.gopId=c),h+=e.duration,d+=e.size,e)))})),s}static moovToSamples(e){const t=e.trak;if(!t||!t.length)return;const i=t.find((e=>{var t,i;return"vide"===(null===(t=e.mdia)||void 0===t||null===(i=t.hdlr)||void 0===i?void 0:i.handlerType)})),s=t.find((e=>{var t,i;return"soun"===(null===(t=e.mdia)||void 0===t||null===(i=t.hdlr)||void 0===i?void 0:i.handlerType)}));if(!i&&!s)return;let r,a;if(i){var o,n;const e=null===(o=i.mdia)||void 0===o||null===(n=o.minf)||void 0===n?void 0:n.stbl;if(!e)return;const{stts:t,stsc:s,stsz:a,stco:l,stss:d,ctts:h}=e;if(!(t&&s&&a&&l&&d))return;r=Rb(t,s,a,l,h,d)}if(s){var l,d,h;const e=null===(l=s.mdia)||void 0===l||null===(d=l.minf)||void 0===d?void 0:d.stbl;if(!e)return;const t=null===(h=s.mdia.mdhd)||void 0===h?void 0:h.timescale,{stts:i,stsc:r,stsz:o,stco:n}=e;if(!(t&&i&&r&&o&&n))return;a=Rb(i,r,o,n)}return{videoSamples:r,audioSamples:a}}}class Ub extends Ud{constructor(e){super(e),this.player=e,this.TAG_NAME="HlsFmp4Loader",this.tempSampleListInfo={},this.isInitVideo=!1,this.isInitAudio=!1,this.videoTrack={id:1,samples:[],sps:[],pps:[],vps:[],codec:""},this.audioTrack={id:2,samples:[],sampleRate:0,channelCount:0,codec:"",codecType:""},this.workerClearTimeout=null,this.workerUrl=null,this.loopWorker=null,this._hasCalcFps=!1,this._basefps=25,this.player.isUseMSE()||this._initLoopWorker(),e.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.workerUrl&&(URL.revokeObjectURL(this.workerUrl),this.workerUrl=null),this.workerClearTimeout&&(clearTimeout(this.workerClearTimeout),this.workerClearTimeout=null),this.loopWorker&&(this.loopWorker.postMessage({cmd:"destroy"}),this.loopWorker.terminate(),this.loopWorker=null),this._hasCalcFps=!1,this.videoTrack=null,this.audioTrack=null,this.isInitVideo=!1,this.isInitAudio=!1,this._basefps=25,this.player.debug.log(this.TAG_NAME,"destroy")}demux(e,t){let i=this.audioTrack,s=this.videoTrack;if(this.checkInitAudio(),this.checkInitVideo(),i.samples=[],s.samples=[],t){if(this.player.updateStats({abps:t.byteLength}),Ao(this.isInitAudio)){const e=Mb.findBox(t,["moov"])[0];if(!e)return void this.player.debug.error(this.TAG_NAME,"cannot found moov box");Mb.moovToTrack(Mb.moov(e),null,i),this.checkInitAudio()&&(this.player.debug.log(this.TAG_NAME,"audioData audio init success"),this._sendAccADTSHeader(i))}const e=Mb.findBox(t,["moof"])[0];if(e){const s=Mb.moofToSamples(Mb.moof(e),null,i)[i.id],r=i.baseMediaDecodeTime;if(s){const a=e.start;s.map((e=>{e.offset+=a;const s=t.subarray(e.offset,e.offset+e.size),o=e.dts+r,n=new Uint8Array(s.length+2);n.set([175,1],0),n.set(s,2),i.samples.push({type:je,pts:o,dts:o,payload:n,duration:e.duration,size:n.byteLength})}))}}}if(e){if(this.player.updateStats({vbps:e.byteLength}),Ao(this.isInitVideo)&&Ao(this.isInitAudio)){const t=Mb.findBox(e,["moov"])[0];if(!t)throw new Error("cannot found moov box");if(Mb.moovToTrack(Mb.moov(t),s,i),Ao(this.isInitAudio)&&this.checkInitAudio()&&(this.player.debug.log(this.TAG_NAME,"videoData audio init success",i),this._sendAccADTSHeader(i)),this.checkInitVideo()){this.player.debug.log(this.TAG_NAME,"video init success");let e=null;s.codecType===os?s.sps.length&&s.vps.length&&s.pps.length&&(e=Vn({sps:s.sps[0],pps:s.pps[0],vps:s.vps[0]})):s.sps.length&&s.pps.length&&(e=Ln({sps:s.sps[0],pps:s.pps[0]})),e&&(this.player.debug.log(this.TAG_NAME,"seqHeader"),this._doDecodeByHls(e,Ge,0,!0,0))}}const t=Mb.findBox(e,["moof"])[0];if(t){const r=Mb.moofToSamples(Mb.moof(t),s,i),a=s.baseMediaDecodeTime,o=i.baseMediaDecodeTime,n=t.start;Object.keys(r).forEach((t=>{s.id==t?r[t].map((t=>{t.offset+=n;const i={type:Ge,pts:(t.pts||t.dts)+a,dts:t.dts+a,units:[],payload:null,isIFrame:!1};i.duration=t.duration,i.gopId=t.gopId,t.keyframe&&(i.isIFrame=!0);const r=e.subarray(t.offset,t.offset+t.size);i.payload=r,s.samples.push(i)})):i.id==t&&r[t].map((t=>{t.offset+=n;const s=e.subarray(t.offset,t.offset+t.size),r=t.dts+o,a=new Uint8Array(s.length+2);a.set([175,1],0),a.set(s,2),i.samples.push({type:je,pts:r,dts:r,payload:a,duration:t.duration,size:a.byteLength})}))}))}}const r=s.samples.concat(i.samples);r.sort(((e,t)=>e.dts-t.dts)),r.forEach((e=>{const t=new Uint8Array(e.payload);delete e.payload,this.player.isUseMSE()?e.type===Ge?this._doDecodeVideo({...e,payload:t}):e.type===je&&this._doDecodeAudio({...e,payload:t}):this.loopWorker.postMessage({...e,payload:t,cmd:"sample"},[t.buffer])})),Ao(this._hasCalcFps)&&(this._hasCalcFps=!0,this._calcDecodeFps(r))}checkInitAudio(){return this.isInitAudio=!!(this.audioTrack.sampleRate&&this.audioTrack.channelCount&&this.audioTrack.codec&&"aac"===this.audioTrack.codecType),this.isInitAudio}checkInitVideo(){return this.isInitVideo=!!(this.videoTrack.pps.length&&this.videoTrack.sps.length&&this.videoTrack.codec),this.isInitVideo}_sendAccADTSHeader(e){const t=Vr({profile:e.objectType,sampleRate:e.sampleRateIndex,channel:e.channelCount});this._doDecodeByHls(t,je,0,!0,0)}_calcDecodeFps(e){const t=ho(e.map((e=>({ts:e.dts||e.pts,type:e.type}))),Ge);t&&(this.player.debug.log(this.TAG_NAME,`_calcDecodeFps() video fps is ${t}, update base fps is ${this._basefps}`),this._basefps=t),this._postMessageToLoopWorker("updateBaseFps",{baseFps:this._basefps})}_initLoopWorker(){this.player.debug.log(this.TAG_NAME,"_initLoopWorker()");const e=Eo(function(){const e=1,t=2;let i=new class{constructor(){this.baseFps=0,this.fpsInterval=null,this.preLoopTimestamp=null,this.startBpsTime=null,this.allSampleList=[]}destroy(){this._clearInterval(),this.baseFps=0,this.allSampleList=[],this.preLoopTimestamp=null,this.startBpsTime=null}updateBaseFps(e){this.baseFps=e,this._clearInterval(),this._startInterval()}pushSample(e){delete e.cmd,this.allSampleList.push(e)}_startInterval(){const e=Math.ceil(1e3/this.baseFps);this.fpsInterval=setInterval((()=>{let t=(new Date).getTime();this.preLoopTimestamp||(this.preLoopTimestamp=t),this.startBpsTime||(this.startBpsTime=t);const i=t-this.preLoopTimestamp;if(i>2*e&&console.warn(`JbPro:[HlsFmp4Loader LoopWorker] loop interval is ${i}ms, more than ${e} * 2ms`),this._loop(),this.preLoopTimestamp=(new Date).getTime(),this.startBpsTime){t-this.startBpsTime>=1e3&&(this._calcSampleList(),this.startBpsTime=t)}}),e)}_clearInterval(){this.fpsInterval&&(clearInterval(this.fpsInterval),this.fpsInterval=null)}_calcSampleList(){const i={buferredDuration:0,allListLength:this.allSampleList.length,audioListLength:0,videoListLength:0};this.allSampleList.forEach((s=>{s.type===t?(i.videoListLength++,s.duration&&(i.buferredDuration+=s.duration)):s.type===e&&i.audioListLength++})),postMessage({cmd:"sampleListInfo",...i})}_loop(){let i=null;if(this.allSampleList.length)if(i=this.allSampleList.shift(),i.type===t){postMessage({cmd:"decodeVideo",...i},[i.payload.buffer]);let t=this.allSampleList[0];for(;t&&t.type===e;)i=this.allSampleList.shift(),postMessage({cmd:"decodeAudio",...i},[i.payload.buffer]),t=this.allSampleList[0]}else i.type===e&&(postMessage({cmd:"decodeAudio",...i},[i.payload.buffer]),this.allSampleList.length&&this.allSampleList[0].type===t&&(i=this.allSampleList.shift(),postMessage({cmd:"decodeVideo",...i},[i.payload.buffer])))}};self.onmessage=e=>{const t=e.data;switch(t.cmd){case"updateBaseFps":i.updateBaseFps(t.baseFps);break;case"sample":i.pushSample(t);break;case"destroy":i.destroy(),i=null}}}.toString()),t=new Blob([e],{type:"text/javascript"}),i=URL.createObjectURL(t);let s=new Worker(i);this.workerUrl=i,this.workerClearTimeout=setTimeout((()=>{window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null,this.workerClearTimeout=null}),ie),s.onmessage=e=>{const t=e.data;switch(t.cmd){case"decodeVideo":this._doDecodeVideo(t);break;case"decodeAudio":this._doDecodeAudio(t);break;case"sampleListInfo":this.tempSampleListInfo=t}},this.loopWorker=s}_postMessageToLoopWorker(e,t){this.player.isUseMSE()||(this.loopWorker?this.loopWorker.postMessage({cmd:e,...t}):this.player.debug.warn(this.TAG_NAME,"loop worker is not init, can not post message"))}_doDecodeAudio(e){const t=new Uint8Array(e.payload);this._doDecodeByHls(t,je,e.dts,!1,0)}_doDecodeVideo(e){const t=new Uint8Array(e.payload);let i=null;i=e.isHevc?Wn(t,e.isIFrame):In(t,e.isIFrame),this.player.updateStats({dts:e.dts});const s=e.pts-e.dts;this._doDecodeByHls(i,Ge,e.dts,e.isIFrame,s)}getBuferredDuration(){return this.tempSampleListInfo.buferredDuration||0}getSampleListLength(){return this.tempSampleListInfo.allListLength||0}getSampleAudioListLength(){return this.tempSampleListInfo.audioListLength||0}getSampleVideoListLength(){return this.tempSampleListInfo.videoListLength||0}}class Fb{constructor(e,t){this.hls=e,this.player=this.hls.player,this.isMP4=t,this._initSegmentId="",this.TAG_NAME="HlsTransmuxer",this._demuxer=t?new Ub(this.hls.player):new bb(this.hls.player),this.player.debug.log(this.TAG_NAME,`init and isMP4 is ${t}`)}destroy(){this._demuxer&&(this._demuxer.destroy(),this._demuxer=null)}transmux(e,t,i,s,r,a){this.player.debug.log(this.TAG_NAME,`transmux videoChunk:${e&&e.byteLength}, audioChunk:${t&&t.byteLength}, discontinuity:${i}, contiguous:${s}, startTime:${r}, needInit:${a}`);const o=this._demuxer;try{this.isMP4?o.demux(e,t):o.demuxAndFix(ih(e,t),i,s,r)}catch(e){throw new WA(VA,HA,e)}}}class Ob{constructor(e){this.hls=e,this.player=e.player,this._decryptor=new Ab(this.hls,this.player),this._transmuxer=null,this._mse=null,this._softVideo=null,this._sourceCreated=!1,this._needInitSegment=!0,this._directAppend=!1,this.TAG_NAME="HlsBufferService"}async destroy(){this._softVideo=null,this._transmuxer&&(this._transmuxer.destroy(),this._transmuxer=null)}get baseDts(){var e,t;return null===(e=this._transmuxer)||void 0===e||null===(t=e._demuxer)||void 0===t?void 0:t._baseDts}get nbSb(){return 0}async updateDuration(e){this.player.debug.log(this.TAG_NAME,"updateDuration()",e)}getBuferredDuration(){var e,t;return null===(e=this._transmuxer)||void 0===e||null===(t=e._demuxer)||void 0===t?void 0:t.getBuferredDuration()}getBufferedSegments(){var e,t;return null===(e=this._transmuxer)||void 0===e||null===(t=e._demuxer)||void 0===t?void 0:t.getSampleListLength()}getBufferedAudioSegments(){var e,t;return null===(e=this._transmuxer)||void 0===e||null===(t=e._demuxer)||void 0===t?void 0:t.getSampleAudioListLength()}getBufferedVideoSegments(){var e,t;return null===(e=this._transmuxer)||void 0===e||null===(t=e._demuxer)||void 0===t?void 0:t.getSampleVideoListLength()}createSource(e,t,i,s){if(this._sourceCreated)return;const r=e||t;r&&(bb.probe(r)?this._transmuxer||(this._transmuxer=new Fb(this.hls,!1)):Mb.probe(r)?this._transmuxer||(this._transmuxer=new Fb(this.hls,!0)):this.player.debug.error(this.TAG_NAME,"createSource error: chunk is not ts"))}async appendBuffer(e,t,i,s,r,a,o){if(null!=i&&i.length||null!=s&&s.length)return this._needInitSegment,this._transmuxer.transmux(i,s,r,a,o,this._needInitSegment||r),!0}async clearAllBuffer(){this.player.debug.log(this.TAG_NAME,"clearAllBuffer")}decryptBuffer(e,t){return this._decryptor.decrypt(e,t)}async reset(){this._transmuxer=null,this._needInitSegment=!0,this._directAppend=!1}async endOfStream(){this._softVideo&&this._softVideo.endOfStream()}async setLiveSeekableRange(e,t){}seamlessSwitch(){this._needInitSegment=!0}}class Nb{constructor(e){this.emitter=e,this._seiSet=new Set,e.on(rr,(e=>{e&&this._seiSet.add(e)}))}throw(e){if(null==e||!this._seiSet.size)return;const t=e-.2,i=e+.2,s=[];this._seiSet.forEach((e=>{e.time>=t&&e.time<=i&&s.push(e)})),s.forEach((e=>{this._seiSet.delete(e),this.emitter.emit(ar,e)}))}reset(){this._seiSet.clear()}}class jb{constructor(e){this._timescale=e,this.encodeType="",this.audioCodec="",this.videoCodec="",this.domain="",this.fps=0,this.bitrate=0,this.width=0,this.height=0,this.samplerate=0,this.channelCount=0,this.gop=0,this._bitsAccumulateSize=0,this._bitsAccumulateDuration=0}getStats(){return{encodeType:this.encodeType,audioCodec:this.audioCodec,videoCodec:this.videoCodec,domain:this.domain,fps:this.fps,bitrate:this.bitrate,width:this.width,height:this.height,samplerate:this.samplerate,channelCount:this.channelCount,gop:this.gop}}setEncodeType(e){this.encodeType=e}setFpsFromScriptData(e){var t;let{data:i}=e;const s=null==i||null===(t=i.onMetaData)||void 0===t?void 0:t.framerate;s&&s>0&&s<100&&(this.fps=s)}setVideoMeta(e){if(this.width=e.width,this.height=e.height,this.videoCodec=e.codec,this.encodeType=e.codecType,e.fpsNum&&e.fpsDen){const t=e.fpsNum/e.fpsDen;t>0&&t<100&&(this.fps=t)}}setAudioMeta(e){this.audioCodec=e.codec,this.samplerate=e.sampleRate,this.channelCount=e.channelCount}setDomain(e){this.domain=e.split("/").slice(2,3)[0]}updateBitrate(e){if((!this.fps||this.fps>=100)&&e.length){const t=e.reduce(((e,t)=>e+t.duration),0)/e.length;this.fps=Math.round(this._timescale/t)}e.forEach((e=>{1===e.gopId&&this.gop++,this._bitsAccumulateDuration+=e.duration/(this._timescale/1e3),this._bitsAccumulateSize+=e.units.reduce(((e,t)=>e+t.length),0),this._bitsAccumulateDuration>=1e3&&(this.bitrate=8*this._bitsAccumulateSize,this._bitsAccumulateDuration=0,this._bitsAccumulateSize=0)}))}}class Gb{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;Jd(this,"_core",null),Jd(this,"_samples",[]),this._core=e,this._timescale=t,this._stats=new jb(t),this._bindEvents()}getStats(){var e,t,i,s,r,a,o;const{currentTime:n=0,decodeFps:l=0}=(null===(e=this._core)||void 0===e?void 0:e.media)||{};return{...this._stats.getStats(),downloadSpeed:(null===(t=this._core)||void 0===t||null===(i=t.speedInfo)||void 0===i?void 0:i.call(t).speed)||0,avgSpeed:(null===(s=this._core)||void 0===s||null===(r=s.speedInfo)||void 0===r?void 0:r.call(s).avgSpeed)||0,currentTime:n,bufferEnd:(null===(a=this._core)||void 0===a||null===(o=a.bufferInfo())||void 0===o?void 0:o.remaining)||0,decodeFps:l}}_bindEvents(){this._core.on(Ks,(e=>this._stats.updateBitrate(e.samples))),this._core.on(Ys,(e=>{this._stats.setFpsFromScriptData(e)})),this._core.on(Qs,(e=>{"video"===e.type?this._stats.setVideoMeta(e.track):this._stats.setAudioMeta(e.track)})),this._core.on(Xs,(e=>{this._stats.setDomain(e.responseUrl)}))}reset(){this._samples=[],this._stats=new jb(this._timescale)}}class zb extends a{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),Jd(this,"_loadSegment",(async()=>{if(this._segmentProcessing)return void this.player.debug.warn("_loadSegment()","_segmentProcessing is ture and return");if(!this._playlist)return void this.player.debug.warn("_loadSegment()","this._playlist is null and return");const e=this._playlist.currentSegment,t=this._playlist.nextSegment;if(this.player.debug.log(this.TAG_NAME,"_loadSegment()","curSeg",e&&e.url,"nextSeg",t&&t.url),t)return this._loadSegmentDirect();this.player.debug.log(this.TAG_NAME,"nextSeg is null and return")})),this.player=e,this.config=null,this._manifestLoader=null,this._segmentLoader=null,this._playlist=null,this._bufferService=null,this._seiService=null,this._stats=null,this._prevSegSn=null,this._prevSegCc=null,this._tickTimer=null,this._tickInterval=500,this._segmentProcessing=!1,this._reloadOnPlay=!1,this._switchUrlOpts=null,this._disconnectTimer=null,this.TAG_NAME="Hls256",this.canVideoPlay=!1,this.$videoElement=null,this.config=t=function(e){return{isLive:!0,maxPlaylistSize:50,retryCount:3,retryDelay:1e3,pollRetryCount:2,loadTimeout:1e4,preloadTime:30,softDecode:!1,bufferBehind:10,maxJumpDistance:3,startTime:0,targetLatency:10,maxLatency:20,allowedStreamTrackChange:!0,...e}}(t),this._manifestLoader=new pb(this),this._segmentLoader=new mb(this),this._playlist=new yb(this),this._bufferService=new Ob(this),this._seiService=new Nb(this),this._stats=new Gb(this,9e4),this.player.debug.log(this.TAG_NAME,"init")}async destroy(){this.player.debug.log(this.TAG_NAME,"destroy()"),this._playlist.reset(),this._segmentLoader.reset(),this._seiService.reset(),await Promise.all([this._clear(),this._bufferService.destroy()]),this._manifestLoader&&(await this._manifestLoader.destroy(),this._manifestLoader=null),this._segmentLoader&&(this._segmentLoader.destroy(),this._segmentLoader=null),this._playlist&&(this._playlist.destroy(),this._playlist=null),this.player.debug.log(this.TAG_NAME,"destroy end")}_startTick(){this._stopTick(),this._tickTimer=setTimeout((()=>{this._tick()}),this._tickInterval)}_stopTick(){this._tickTimer&&clearTimeout(this._tickTimer),this._tickTimer=null}_tick(){this.player.isDestroyedOrClosed()?this.player.debug.log(this.TAG_NAME,"_tick() player is destroyed"):(this._startTick(),this._loadSegment())}get isLive(){return this._playlist.isLive}get streams(){return this._playlist.streams}get currentStream(){return this._playlist.currentStream}get hasSubtitle(){return this._playlist.hasSubtitle}get baseDts(){var e;return null===(e=this._bufferService)||void 0===e?void 0:e.baseDts}speedInfo(){return this._segmentLoader.speedInfo()}resetBandwidth(){this._segmentLoader.resetBandwidth()}getStats(){return this._stats.getStats()}async loadSource(e){return await this._reset(),await this._loadData(e),this._startTick(),!0}async _loadData(e){try{e&&(e=e.trim())}catch(e){}if(!e)throw this._emitError(new WA(zA,zA,null,null,"m3u8 url is missing"));const t=await this._loadM3U8(e),{currentStream:i}=this._playlist;if(this._urlSwitching){var s,r;if(0===i.bitrate&&null!==(s=this._switchUrlOpts)&&void 0!==s&&s.bitrate)i.bitrate=null===(r=this._switchUrlOpts)||void 0===r?void 0:r.bitrate;const e=this._getSeamlessSwitchPoint();this.config.startTime=e;const t=this._playlist.findSegmentIndexByTime(e),a=this._playlist.getSegmentByIndex(t+1);if(a){const e=a.start;this.player.debug.warn(this.TAG_NAME,`clear buffer from ${e}`)}}t&&(this.isLive?(this.player.debug.log(this.TAG_NAME,"is live"),this._bufferService.setLiveSeekableRange(0,4294967295),this.config.targetLatency<this._playlist.totalDuration&&(this.config.targetLatency=this._playlist.totalDuration,this.config.maxLatency=1.5*this.config.targetLatency),t.isMaster||this._pollM3U8(e)):(this.player.debug.log(this.TAG_NAME,`is vod and totalDuration is ${i.totalDuration} s`),await this._bufferService.updateDuration(i.totalDuration))),await this._loadSegment()}async _loadM3U8(e){let t;try{[t]=await this._manifestLoader.load(e)}catch(e){throw this._emitError(WA.create(e))}if(t){var i;if(this._playlist.upsertPlaylist(t),t.isMaster)null!==(i=this._playlist.currentStream.subtitleStreams)&&void 0!==i&&i.length&&this.emit(lr,{list:this._playlist.currentStream.subtitleStreams}),await this._refreshM3U8();else this.player.debug.warn(this.TAG_NAME,"_loadM3U8() is not master playlist");return this.emit(dr),t}this.player.debug.warn(this.TAG_NAME,"_loadM3U8() playlist is empty")}_refreshM3U8(){var e,t;this.player.debug.log(this.TAG_NAME,"_refreshM3U8()");const i=this._playlist.currentStream;if(!i||!i.url)throw this._emitError(WA.create(null,null,new Error("m3u8 url is not defined")));const s=i.url,r=null===(e=i.currentAudioStream)||void 0===e?void 0:e.url,a=null===(t=i.currentSubtitleStream)||void 0===t?void 0:t.url;return this._manifestLoader.load(s,r,a).then((e=>{let[t,i,o]=e;t?(this._playlist.upsertPlaylist(t,i,o),this.isLive&&this._pollM3U8(s,r,a)):this.player.debug.warn(this.TAG_NAME,"_refreshM3U8() mediaPlaylist is empty")})).catch((e=>{throw this._emitError(WA.create(e))}))}_pollM3U8(e,t,i){var s;let r=this._playlist.isEmpty;this._manifestLoader.poll(e,t,i,((e,t,i)=>{this._playlist.upsertPlaylist(e,t,i),this._playlist.clearOldSegment(),e&&r&&!this._playlist.isEmpty&&this._loadSegment(),r&&(r=this._playlist.isEmpty)}),(e=>{this._emitError(WA.create(e))}),1e3*((null===(s=this._playlist.lastSegment)||void 0===s?void 0:s.duration)||0))}async _loadSegmentDirect(){const e=this._playlist.nextSegment;if(!e)return void this.player.debug.log(this.TAG_NAME,"_loadSegmentDirect() !seg");let t=!1,i=null;try{this._segmentProcessing=!0,t=await this._reqAndBufferSegment(e,this._playlist.getAudioSegment(e))}catch(e){i=e}finally{this._segmentProcessing=!1}return i?this._emitError(WA.create(i)):(t?(this._urlSwitching&&(this._urlSwitching=!1,this.emit(nr,{url:this.config.url})),this._playlist.moveSegmentPointer(),this.player.debug.log(this.TAG_NAME,"_loadSegmentDirect()","seg.isLast",e.isLast),e.isLast?(this.player.debug.log(this.TAG_NAME,"_loadSegmentDirect()","seg.isLast"),this._end()):(this.player.debug.log(this.TAG_NAME,"_loadSegmentDirect()","and next _loadSegment()"),this._loadSegment())):this.player.debug.log(this.TAG_NAME,"_loadSegmentDirect() not appended"),t)}async _reqAndBufferSegment(e,t){this.player.debug.log(this.TAG_NAME,"video seg",e&&e.url,"audio seg",t&&t.url);const i=e?e.cc:t.cc,s=this._prevSegCc!==i;let r=[];try{r=await this._segmentLoader.load(e,t,s)}catch(e){throw e.fatal=!1,this._segmentLoader.error=e,e}if(!r[0])return;const a=await this._bufferService.decryptBuffer(...r);if(!a)return void this.player.debug.log(this.TAG_NAME,"decryptBuffer return null");const o=e?e.sn:t.sn,n=e?e.start:t.start,l=this._playlist.currentStream;return this._bufferService.createSource(a[0],a[1],null==l?void 0:l.videoCodec,null==l?void 0:l.audioCodec),await this._bufferService.appendBuffer(e,t,a[0],a[1],s,this._prevSegSn===o-1,n),this._prevSegCc=i,this._prevSegSn=o,!0}async _clear(){this.player.debug.log(this.TAG_NAME,"_clear()"),clearTimeout(this._disconnectTimer),this._stopTick(),await Promise.all([this._segmentLoader.cancel(),this._manifestLoader.stopPoll()]),this._segmentProcessing=!1}async _reset(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.player.debug.log(this.TAG_NAME,"_reset()"),this._reloadOnPlay=!1,this._prevSegSn=null,this._prevSegCc=null,this._switchUrlOpts=null,this._playlist.reset(),this._segmentLoader.reset(),this._seiService.reset(),this._stats.reset(),await this._clear(),this._bufferService.reset(e)}_end(){this.player.debug.log(this.TAG_NAME,"_end()"),this._clear()}_emitError(e){var t;let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var s;!1===(null===(t=e.originError)||void 0===t?void 0:t.fatal)?console.warn(e):(console.table(e),console.error(e),console.error(null===(s=this.media)||void 0===s?void 0:s.error),this._stopTick(),this._urlSwitching&&(this._urlSwitching=!1,this.emit(or,e)),i&&this._end(),this._seiService.reset(),this.emit(hr,e));return e}_getSeamlessSwitchPoint(){const{media:e}=this;let t=e.currentTime;if(!e.paused){var i;const s=this._playlist.findSegmentIndexByTime(e.currentTime),r=this._playlist.getSegmentByIndex(s),a=null===(i=this._stats)||void 0===i?void 0:i.getStats().downloadSpeed;if(a&&r){t+=r.duration*this._playlist.currentStream.bitrate/a+1}else t+=5}return t}getDemuxBuferredDuration(){return this._bufferService.getBuferredDuration()||0}getDemuxBufferedListLength(){return this._bufferService.getBufferedSegments()||0}getDemuxAudioBufferedListLength(){return this._bufferService.getBufferedAudioSegments()||0}getDemuxVideoBufferedListLength(){return this._bufferService.getBufferedVideoSegments()||0}}class $b extends a{constructor(e){super(),Jd(this,"TAG_NAME","Hls256Decoder"),this.player=e,this.$videoElement=this.player.video.$videoElement,this.hls=null,this.eventsDestroy=[],this.bandwidthEstimateInterval=null,this.hls=new zb(e),this._bindEvents()}async destroy(){return this._stopBandwidthEstimateInterval(),this.hls&&(await this.hls.destroy(),this.hls=null),this.eventsDestroy.length&&(this.eventsDestroy.forEach((e=>e())),this.eventsDestroy=[]),this.$videoElement=null,this.player.debug.log(this.TAG_NAME,"destroy"),!0}_bindEvents(){this.hls.on(hr,(e=>{this.player.emitError(ut.hlsError,e)})),this._startBandwidthEstimateInterval()}_startBandwidthEstimateInterval(){this._stopBandwidthEstimateInterval(),this.bandwidthEstimateInterval=setInterval((()=>{const e=this.hls.speedInfo();this.player.emit(lt.kBps,(e.avgSpeed/1024/8).toFixed(2)),this.hls.resetBandwidth()}),1e3)}_stopBandwidthEstimateInterval(){this.bandwidthEstimateInterval&&(clearInterval(this.bandwidthEstimateInterval),this.bandwidthEstimateInterval=null)}async loadSource(e){return this.url=e,await this.hls.loadSource(e),!0}checkHlsBufferedDelay(){let e=0;return this.hls&&(e=this.hls.getDemuxBuferredDuration()),e}getDemuxBufferedListLength(){let e=0;return this.hls&&(e=this.hls.getDemuxBufferedListLength()),e}getDemuxAudioBufferedListLength(){let e=0;return this.hls&&(e=this.hls.getDemuxAudioBufferedListLength()),e}getDemuxVideoBufferedListLength(){let e=0;return this.hls&&(e=this.hls.getDemuxVideoBufferedListLength()),e}}class Hb extends a{constructor(e){super(),this.player=e,this.TAG_NAME="CommonWebrtc",this.rtcPeerConnection=null,this.videoStream=null,this.isDisconnected=!1,this.isH264=this.player.isWebrtcH264(),this.eventsDestroy=[],this.supportVideoFrameCallbackHandle=null,this.isInitInfo=!1,this.$videoElement=this.player.video.$videoElement,this.bandwidthEstimateInterval=null,this.rtcPeerTrackVideoReceiver=null,this.rtcPeerTrackAudioReceiver=null,this.prevWebrtcVideoStats={},this.prevWebrtcAudioStats={},this.currentWebrtcStats={},this.player._opt.webrtcUseCanvasRender&&this.isH264&&(this.$videoElement=document.createElement("video"),Sa()&&(this.$videoElement.style.position="absolute"),this._initVideoEvents()),this.$videoElement.muted=!0,this._initRtcPeerConnection()}destroy(){this.isDisconnected=!1,this.isInitInfo=!1,this.prevWebrtcVideoStats={},this.currentWebrtcStats={},this.rtcPeerTrackVideoReceiver=null,this.rtcPeerTrackAudioReceiver=null,this._stopBandwidthEstimateInterval(),this.supportVideoFrameCallbackHandle&&this.$videoElement&&(this.$videoElement.cancelVideoFrameCallback(this.supportVideoFrameCallbackHandle),this.supportVideoFrameCallbackHandle=null),this.eventsDestroy.length&&(this.eventsDestroy.forEach((e=>e())),this.eventsDestroy=[]),this.isH264&&(this.videoStream&&(this.videoStream.getTracks().forEach((e=>e.stop())),this.videoStream=null),this.$videoElement.srcObject=null),this.rtcPeerConnection&&(this.rtcPeerConnection.onicecandidate=oa,this.rtcPeerConnection.ontrack=oa,this.rtcPeerConnection.onconnectionstatechange=oa,this.rtcPeerConnection.ondatachannel=oa,this.rtcPeerConnection.close(),this.rtcPeerConnection=null)}_initVideoEvents(){const{proxy:e}=this.player.events,t=e(this.$videoElement,ts,(()=>{this.player.debug.log(this.TAG_NAME,"video canplay"),this.$videoElement.play().then((()=>{this.player.debug.log(this.TAG_NAME,"video play"),this._startCanvasRender(),this._initRenderSize()})).catch((e=>{this.player.debug.warn(this.TAG_NAME,"video play error ",e)}))})),i=e(this.$videoElement,is,(()=>{this.player.debug.log("HlsDecoder","video waiting")})),s=e(this.$videoElement,ss,(e=>{const t=parseInt(e.timeStamp,10);this.player.handleRender(),this.player.updateStats({ts:t}),this.$videoElement.paused&&(this.player.debug.warn("HlsDecoder","video is paused and next try to replay"),this.$videoElement.play().then((()=>{this.player.debug.log("HlsDecoder","video is paused and replay success")})).catch((e=>{this.player.debug.warn("HlsDecoder","video is paused and replay error ",e)})))})),r=e(this.$videoElement,rs,(()=>{this.player.debug.log("HlsDecoder","video playback Rate change",this.$videoElement&&this.$videoElement.playbackRate)}));this.eventsDestroy.push(t,i,s,r)}_initRtcPeerConnection(){const e=new RTCPeerConnection,t=this.player;e.addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"}),e.onsignalingstatechange=e=>{this.player.debug.log(this.TAG_NAME,"onsignalingstatechange",e)},e.oniceconnectionstatechange=i=>{this.player.debug.log(this.TAG_NAME,"oniceconnectionstatechange",e.iceConnectionState);const s=e.iceConnectionState;switch(this.player.emit(lt.webrtcOnIceConnectionStateChange,s),this.isDisconnected="disconnected"===s,e.iceConnectionState){case"new":case"checking":case"closed":case"connected":case"completed":break;case"failed":t.emit(lt.webrtcFailed);break;case"disconnected":t.emit(lt.webrtcDisconnect);break;case"closed":t.emit(lt.webrtcClosed)}},e.onicecandidate=e=>{this.player.debug.log(this.TAG_NAME,"onicecandidate",e),e.candidate&&this.player.debug.log(this.TAG_NAME,"Remote ICE candidate: ",e.candidate.candidate)},e.ontrack=t=>{if(this.player.debug.log(this.TAG_NAME,"ontrack",t),"video"===t.track.kind){this.player.debug.log(this.TAG_NAME,"ontrack video"),this.rtcPeerTrackVideoReceiver=e.getReceivers().find((function(e){return e.track===t.track})),this.rtcPeerTrackVideoReceiver&&this._startBandwidthEstimateInterval();let i=t.streams[0];this.$videoElement.autoplay=!0,this.$videoElement.srcObject=i,this.videoStream=i}else"audio"===t.track.kind&&(this.player.debug.log(this.TAG_NAME,"ontrack audio"),this.rtcPeerTrackAudioReceiver=e.getReceivers().find((function(e){return e.track===t.track})),this.rtcPeerTrackAudioReceiver&&this._startBandwidthEstimateInterval())},e.onicecandidateerror=e=>{this.player.debug.log(this.TAG_NAME,"onicecandidateerror",e),this.player.emitError(ut.webrtcIceCandidateError,e)},e.onconnectionstatechange=i=>{switch(this.player.debug.log(this.TAG_NAME,"onconnectionstatechange",i),this.player.emit(lt.webrtcOnConnectionStateChange,e.connectionState),e.connectionState){case"new":case"connecting":case"connected":case"disconnected":break;case"failed":this.isDisconnected&&t.emit(lt.webrtcFailed)}},this.rtcPeerConnection=e}_startBandwidthEstimateInterval(){this.player.debug.log(this.TAG_NAME,"_startBandwidthEstimateInterval"),this._stopBandwidthEstimateInterval(),this.bandwidthEstimateInterval=setInterval((()=>{this.rtcPeerTrackVideoReceiver&&this.rtcPeerTrackVideoReceiver.getStats().then((e=>{let t={},i=0;e.forEach((e=>{if(e)switch(e.type){case kr:("succeeded"===e.state||e.bytesReceived)&&(this.currentWebrtcStats.timestamp=e.timestamp,this.currentWebrtcStats.rtt=e.currentRoundTripTime||-1,this.currentWebrtcStats.bytesReceived=e.bytesReceived||0,this.currentWebrtcStats.bytesSent=e.bytesSent||0);break;case Rr:this.currentWebrtcStats.remoteCandidate=e||{};break;case xr:this.currentWebrtcStats.localCandidate=e||{};break;case Cr:this.currentWebrtcStats.lastTimeStamp=e.timestamp;const s=((e.timestamp||0)-(this.prevWebrtcVideoStats.timestamp||0))/1e3,r=Number(e.bytesReceived||0)-Number(this.prevWebrtcVideoStats.bytesReceived||0),a=Math.floor(r/s);i+=a,t.vbps=a,this.prevWebrtcVideoStats=e;break;case Dr:e.frameWidth&&e.frameHeight&&(this.currentWebrtcStats.frameWidth=e.frameWidth||0,this.currentWebrtcStats.frameHeight=e.frameHeight||0)}})),this.rtcPeerTrackAudioReceiver?this.rtcPeerTrackAudioReceiver.getStats().then((e=>{e.forEach((e=>{if(e&&e.type===Cr){this.currentWebrtcStats.lastTimeStamp=e.timestamp;const s=((e.timestamp||0)-(this.prevWebrtcAudioStats.timestamp||0))/1e3,r=Number(e.bytesReceived||0)-Number(this.prevWebrtcAudioStats.bytesReceived||0),a=Math.floor(r/s);i+=a,t.abps=a,this.prevWebrtcAudioStats=e}})),this.player.updateStats(t),this.player.emit(lt.kBps,(i/1024).toFixed(2))})):(this.player.updateStats(t),this.player.emit(lt.kBps,(i/1024).toFixed(2)))}))}),1e3)}_stopBandwidthEstimateInterval(){this.player.debug.log(this.TAG_NAME,"_stopBandwidthEstimateInterval"),this.bandwidthEstimateInterval&&(clearInterval(this.bandwidthEstimateInterval),this.bandwidthEstimateInterval=null)}_startCanvasRender(){ko()?this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this)):(this._stopCanvasRender(),this.canvasRenderInterval=setInterval((()=>{this.player.video.render({$video:this.$videoElement,ts:0})}),40))}_stopCanvasRender(){this.canvasRenderInterval&&(clearInterval(this.canvasRenderInterval),this.canvasRenderInterval=null)}videoFrameCallback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.player.isDestroyedOrClosed()?this.player.debug.log(this.TAG_NAME,"videoFrameCallback() player is destroyed"):(this.player.video.render({$video:this.$videoElement,ts:t.mediaTime||0}),this.player.updateStats({dts:t.mediaTime||0}),this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this)))}_initRenderSize(){this.isInitInfo||(this.player.video.updateVideoInfo({width:this.$videoElement.videoWidth,height:this.$videoElement.videoHeight}),this.player.video.initCanvasViewSize(),this.isInitInfo=!0)}getVideoCurrentTime(){let e=0;return this.$videoElement&&(e=this.$videoElement.currentTime),e}}class Vb extends Hb{constructor(e){super(e),this.rtcPeerConnectionDataChannel=null,this.player.isWebrtcH265()&&(this.streamRate=ma((t=>{e.emit(lt.kBps,(t/1024).toFixed(2))}))),this.TAG_NAME="WebrtcForM7SDecoder",this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.stopStreamRateInterval(),this.rtcPeerConnectionDataChannel&&(this.rtcPeerConnectionDataChannel.onopen=oa,this.rtcPeerConnectionDataChannel.onclose=oa,this.rtcPeerConnectionDataChannel.onmessage=oa,this.rtcPeerConnectionDataChannel.close(),this.rtcPeerConnectionDataChannel=null),this.player.debug.log(this.TAG_NAME,"destroy")}_initRtcPeerConnection(){const e=new RTCPeerConnection,t=this.player;e.addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"}),e.onsignalingstatechange=e=>{this.player.debug.log(this.TAG_NAME,"onsignalingstatechange",e)},e.oniceconnectionstatechange=i=>{this.player.debug.log(this.TAG_NAME,"oniceconnectionstatechange",e.iceConnectionState);const s=e.iceConnectionState;switch(this.player.emit(lt.webrtcOnIceConnectionStateChange,s),this.isDisconnected="disconnected"===s,e.iceConnectionState){case"new":case"checking":case"closed":case"connected":case"completed":break;case"failed":t.emit(lt.webrtcFailed);break;case"disconnected":t.emit(lt.webrtcDisconnect);break;case"closed":t.emit(lt.webrtcClosed)}},e.onicecandidate=e=>{this.player.debug.log(this.TAG_NAME,"onicecandidate",e),e.candidate&&this.player.debug.log(this.TAG_NAME,"Remote ICE candidate: ",e.candidate.candidate)},e.ontrack=i=>{this.player.debug.log(this.TAG_NAME,"ontrack",i);const s=t.video.$videoElement;if(t.isWebrtcH264())if("video"===i.track.kind){this.player.debug.log(this.TAG_NAME,"ontrack video"),this.rtcPeerTrackVideoReceiver=e.getReceivers().find((function(e){return e.track===i.track})),this.rtcPeerTrackVideoReceiver&&this._startBandwidthEstimateInterval();let t=i.streams[0];s.autoplay=!0,s.srcObject=t,this.videoStream=t}else"audio"===i.track.kind&&(this.player.debug.log(this.TAG_NAME,"ontrack audio"),this.rtcPeerTrackAudioReceiver=e.getReceivers().find((function(e){return e.track===i.track})),this.rtcPeerTrackAudioReceiver&&this._startBandwidthEstimateInterval())},e.onicecandidateerror=e=>{this.player.debug.log(this.TAG_NAME,"onicecandidateerror",e),this.player.emitError(ut.webrtcIceCandidateError,e)},e.onconnectionstatechange=i=>{switch(t.debug.log(this.TAG_NAME,`sdp connect status ${e.connectionState}`),e.connectionState){case"new":case"connecting":case"connected":case"disconnected":break;case"failed":this.isDisconnected&&t.emit(lt.webrtcFailed)}},e.ondatachannel=e=>{const t=e.channel;this.player.debug.log(this.TAG_NAME,"ondatachannel"),t.onopen=()=>{this.player.debug.log(this.TAG_NAME,"ondatachannel and onopen")},t.onmessage=e=>{const t=e.data;if(this.player.isWebrtcH264())return this.player.debug.warn(this.TAG_NAME,"ondatachannel is H265 but decode is h264 so emit webrtcStreamH265 "),void this.player.emit(lt.webrtcStreamH265);this.player.isDestroyedOrClosed()?this.player.debug.warn(this.TAG_NAME,"ondatachannel and player is destroyed"):(this.streamRate&&this.streamRate(t.byteLength),this.player.demux&&this.player.demux.dispatch(t))},t.onclose=()=>{this.player.debug.warn(this.TAG_NAME,"ondatachannel and onclose")},this.rtcPeerConnectionDataChannel=t};e.createDataChannel("signal").onmessage=e=>{this.player.debug.log(this.TAG_NAME,"signalChannel,onmessage",e);JSON.parse(e.data).type},this.rtcPeerConnection=e}startStreamRateInterval(){this.stopStreamRateInterval(),this.streamRateInterval=setInterval((()=>{this.streamRate&&this.streamRate(0)}),1e3)}stopStreamRateInterval(){this.streamRateInterval&&(clearInterval(this.streamRateInterval),this.streamRateInterval=null)}loadSource(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,s)=>{const r=this.rtcPeerConnection;r.createOffer().then((a=>{r.setLocalDescription(a),this.player.debug.log(this.TAG_NAME,"getWebRtcRemoteSdp loadSource"),function(e,t,i){let s={"Content-Type":"application/sdp"};return i.username&&i.password&&(s.Authorization="Basic "+btoa(i.username+":"+i.password)),fetch(e,{method:"POST",mode:"cors",cache:"no-cache",credentials:"include",redirect:"follow",referrerPolicy:"no-referrer",headers:s,body:t})}(e,a.sdp,t).then((e=>{e.text().then((e=>{this.player.debug.log(this.TAG_NAME,"getWebRtcRemoteSdp response"),e?r.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:e})).then((()=>{this.player.isWebrtcH265()&&this.startStreamRateInterval(),i()})).catch((e=>{s(e)})):s("sdp is null")})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource response.text() error",e),s(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource getWebRtcRemoteSdp response error",e),s(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource rtcPeerConnection.createOffer() error",e),s(e)}))}))}}class Wb extends Hb{constructor(e){super(e),this.TAG_NAME="WebrtcForZLMDecoder",this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.player.debug.log(this.TAG_NAME,"destroy")}loadSource(e){return new Promise(((t,i)=>{const s=this.rtcPeerConnection;s.createOffer().then((r=>{s.setLocalDescription(r),this.player.debug.log(this.TAG_NAME,"getWebRtcRemoteSdp loadSource"),function(e,t){return El({url:e,type:"POST",data:t,contentType:"text/plain;charset=utf-8",processData:!1,dataType:"json"})}(e,r.sdp).then((e=>{this.player.debug.log(this.TAG_NAME,`getWebRtcRemoteSdp response and code is ${e.code}`);const r=e;if(r&&0!==r.code)return i(r.msg);r&&r.sdp?s.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:r.sdp})).then((()=>{t()})).catch((e=>{i(e)})):i("sdp is null")})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource getWebRtcRemoteSdp response error",e),i(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource rtcPeerConnection.createOffer() error",e),i(e)}))}))}}class Jb extends a{constructor(e,t){if(super(),this.player=e,this.player.$container.classList.add("jb-pro-container-playback"),this._showPrecision=null,this._startTime=null,this._playStartTime=null,this._playingTimestamp=null,this._fps=parseInt(t.fps,10)||e._opt.playbackFps,this._isUseFpsRender=!!yo(t.isUseFpsRender),this._rate=1,this._audioTimestamp=0,this._videoTimestamp=0,this.controlType=t.controlType||X.normal,t.controlType&&-1===[X.normal,X.simple].indexOf(t.controlType)&&(this.player.debug.warn("Playback","constructor()","controlType is not in [normal,simple]",t.controlType),this.controlType=X.normal),this._currentLocalTimestamp=0,this._localOneFrameTimestamp=t.localOneFrameTimestamp||40,this._localCalculateTimeInterval=null,this._isUseLocalCalculateTime=!!yo(t.isUseLocalCalculateTime),this._isPlaybackPauseClearCache=!Ao(t.isPlaybackPauseClearCache),this._isCacheBeforeDecodeForFpsRender=!!yo(t.isCacheBeforeDecodeForFpsRender),this._startfpsTime=null,this._startFpsTimestamp=null,this._checkStatsInterval=null,this._playbackTs=0,this._renderFps=0,this._isUseLocalCalculateTime?this._startLocalCalculateTime():this._listen(),this.playbackList=[],this._playbackListStartTimestamp=null,this._totalDuration=0,t.controlType===X.normal)this.initPlaybackList(t.playList,t.showPrecision,t.startTime);else if(t.controlType===X.simple){t.duration&&(this._totalDuration=1e3*t.duration);let e=t.startTime||0;e>this.totalDuration&&(e=this.totalDuration),this.setStartTime(e)}this.player.on(lt.playbackPause,(e=>{e?this.pause():this.resume()}));const i={fps:this._fps,isUseFpsRender:this._isUseFpsRender,localOneFrameTimestamp:this._localOneFrameTimestamp,isUseLocalCalculateTime:this._isUseLocalCalculateTime,uiUsePlaybackPause:t.uiUsePlaybackPause,showControl:t.showControl};e.debug.log("Playback","init",JSON.stringify(i))}destroy(){this._startTime=null,this._showPrecision=null,this._playStartTime=null,this._playingTimestamp=null,this._totalDuration=0,this._audioTimestamp=0,this._videoTimestamp=0,this._fps=null,this._isUseFpsRender=!1,this._rate=1,this.playbackList=[],this._playbackListStartTimestamp=null,this._localCalculateTimeInterval=null,this._currentLocalTimestamp=0,this._startfpsTime=null,this._startFpsTimestamp=null,this._renderFps=0,this._playbackTs=0,this._stopLocalCalculateTime(),this.clearStatsInterval(),this.player.$container&&this.player.$container.classList.remove("jb-pro-container-playback"),this.off(),this.player.debug.log("Playback","destroy")}_listen(){this.player.on(lt.stats,(e=>{const t=e.ts;this._playStartTime||(this._playStartTime=t-1e3);let i=t-this._playStartTime;this.setPlayingTimestamp(i)}))}pause(){this.clearStatsInterval()}resume(){this.startCheckStatsInterval()}updateStats(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._startFpsTimestamp||(this._startFpsTimestamp=ha()),Oa(e.ts)&&(this.player.updateStats({fps:!0,ts:e.ts}),this._playbackTs=e.ts,this._startfpsTime||(this._startfpsTime=e.ts),this._renderFps+=1);const t=ha(),i=t-this._startFpsTimestamp;if(i<1e3)return;let s=null;this._startfpsTime&&(s=this._playbackTs-this._startfpsTime),this.player.emit(lt.playbackStats,{fps:this._renderFps,rate:this.rate,start:this._startfpsTime,end:this._playbackTs,timestamp:i,dataTimestamp:s,audioBufferSize:this.player.audio?this.player.audio.bufferSize:0,videoBufferSize:this.player.video?this.player.video.bufferSize:0,ts:this._playbackTs}),this._renderFps=0,this._startfpsTime=this._playbackTs,this._startFpsTimestamp=t}updateLocalOneFrameTimestamp(e){this._localOneFrameTimestamp=e}_startLocalCalculateTime(){this._stopLocalCalculateTime(),this._localCalculateTimeInterval=setInterval((()=>{const e=this._currentLocalTimestamp;this._playStartTime||(this._playStartTime=e-1e3);let t=e-this._playStartTime;this.setPlayingTimestamp(t)}),1e3)}startCheckStatsInterval(){this.clearStatsInterval(),this._checkStatsInterval=setInterval((()=>{this.updateStats()}),1e3)}_stopLocalCalculateTime(){this._localCalculateTimeInterval&&(clearInterval(this._localCalculateTimeInterval),this._localCalculateTimeInterval=null)}clearStatsInterval(){this._checkStatsInterval&&(clearInterval(this._checkStatsInterval),this._checkStatsInterval=null)}increaseLocalTimestamp(){this._isUseLocalCalculateTime&&(this._currentLocalTimestamp+=this._localOneFrameTimestamp)}initPlaybackList(e,t,i){this.playbackList=e||[];let s=0;if(this.playbackList.forEach(((e,t)=>{10===Ja(e.start)&&(e.startTimestamp=1e3*e.start,e.startTime=Ta(e.startTimestamp)),10===Ja(e.end)&&(e.endTimestamp=1e3*e.end,e.endTime=Ta(e.endTimestamp)),e.duration=e.end-e.start,s+=e.duration})),this._totalDuration=s,this.player.debug.log("Playback",this.playbackList),this.playbackList.length>0){const e=this.playbackList[0].startTimestamp;this._playbackListStartTimestamp=e;let t=e;i&&(10===Ja(i)&&(i*=1e3),this._isTimeInPlaybackList(i)&&(t=i)),this.setStartTime(t)}const r=t||Si;this.setShowPrecision(r)}get totalDuration(){return(this._totalDuration||0)/1e3}get startTime(){return this._startTime||0}setStartTime(e){this._startTime=e,this._playingTimestamp=e,this._playStartTime=null}setRate(e){this._rate=e,this.player.emit(lt.playbackRateChange,e)}get fps(){return this._fps}get rate(){return this._rate}get isUseFpsRender(){return this._isUseFpsRender}get isUseLocalCalculateTime(){return this._isUseLocalCalculateTime}get showPrecision(){return this._showPrecision}get is60Min(){return this.showPrecision===Si}get is30Min(){return this.showPrecision===Ti}get is10Min(){return this.showPrecision===Ei}get is5Min(){return this.showPrecision===ki}get is1Min(){return this.showPrecision===ki}get isPlaybackPauseClearCache(){return this._isPlaybackPauseClearCache}get isCacheBeforeDecodeForFpsRender(){return this._isCacheBeforeDecodeForFpsRender}setShowPrecision(e){xi.includes(e)||(this.player.debug.warn("Playback","setShowPrecision()","type is not in PLAYBACK_CONTROL_TIME_PRECISION_ARRAY",e),e=Si),this._showPrecision&&this._showPrecision===e||(this._showPrecision=e,this.player.emit(lt.playbackPrecision,this._showPrecision,this.playbackList),this.player.emit(lt.playbackShowPrecisionChange,this._showPrecision))}setPlayingTimestamp(e){let t;if(this.controlType===X.normal){t=this.startTime+e,this._playingTimestamp=t,this.player.emit(lt.playbackTime,t);const i=new Date(t);this.player.emit(lt.playbackTimestamp,{ts:t,hour:i.getHours(),min:i.getMinutes(),second:i.getSeconds()})}else this.controlType===X.simple&&(t=this.startTime+Math.round(e/1e3),t>this.totalDuration&&(this.player.debug.log("Playback","setPlayingTimestamp()",`timestamp ${t} > this.totalDuration ${this.totalDuration}`),t=this.totalDuration),this._playingTimestamp=t,this.player.emit(lt.playbackTime,t),this.player.emit(lt.playbackTimestamp,{ts:t}))}get playingTimestamp(){return this._playingTimestamp}narrowPrecision(){const e=xi.indexOf(this.showPrecision)-1;if(e>=0){const t=xi[e];this.setShowPrecision(t)}}expandPrecision(){const e=xi.indexOf(this.showPrecision)+1;if(e<=xi.length-1){const t=xi[e];this.setShowPrecision(t)}}seek(e){if(this.player.debug.log("Playback","seek()",e),this.controlType===X.normal){if("true"===e.hasRecord){let t=e.time;"min"===e.type&&(t=60*e.time);let i=function(e){let t={};e>-1&&(t={hour:Math.floor(e/60/60)%60,min:Math.floor(e/60)%60,second:e%60});return t}(t);if(this._playbackListStartTimestamp){const e=new Date(this._playbackListStartTimestamp).setHours(i.hour,i.min,i.second,0);i.timestamp=e;const t=this._findMoreInfoByTimestamp(e);i&&t.more&&(i.more=t.more)}this.player.emit(lt.playbackSeek,i)}}else if(this.controlType===X.simple){let t=e.time;this.player.emit(lt.playbackSeek,{ts:t})}}currentTimeScroll(){this.player.emit(lt.playbackTimeScroll)}_findMoreInfoByTimestamp(e){let t=null;return this.playbackList.forEach(((i,s)=>{i.startTimestamp<=e&&i.endTimestamp>=e&&(t=i)})),t}_isTimeInPlaybackList(e){let t=!1;return this.playbackList.forEach(((i,s)=>{i.startTimestamp<=e&&i.endTimestamp>=e&&(t=!0)})),t}getControlType(){return this.controlType}isControlTypeNormal(){return this.controlType===X.normal}isControlTypeSimple(){return this.controlType===X.simple}}class qb extends a{constructor(e){super(),this.player=e,this.TAG_NAME="zoom",this.bindEvents=[],this.isDragging=!1,this.currentZoom=1,this.prevVideoElementStyleTransform=null,this.prevVideoElementStyleScale=null,this.maxScale=5,this.tempPosition={x:0,y:0},this.videoPosition={left:0,top:0};const{events:{proxy:t},debug:i}=this.player;this.player.on(lt.zooming,(e=>{if(e){this.player.$container.classList.add("jb-pro-zoom-control"),this._bindEvents();const e=this.player.video.$videoElement.style.transform;let t=this.player.video.$videoElement.offsetLeft,i=this.player.video.$videoElement.offsetTop;t=parseFloat(t),i=parseFloat(i),t&&(this.videoPosition.left=t),i&&(this.videoPosition.top=i),this.prevVideoElementStyleTransform=e;let s=e.match(/scale\([0-9., ]*\)/g);if(s&&s[0]){let e=s[0].replace("scale(","").replace(")","");this.prevVideoElementStyleScale=e.split(",")}}else{this.player.$container.classList.remove("jb-pro-zoom-control"),this._unbindEvents(),this._resetVideoPosition(),this.player.$container.style.cursor="auto";let e=this.prevVideoElementStyleTransform;this.player.video.$videoElement.style.transform=e,this.prevVideoElementStyleTransform=null,this.prevVideoElementStyleScale=null,ya()&&this.player._opt.useWebFullScreen&&this.player.resize()}}));const s=t(window,ya()?"touchend":"mouseup",(e=>{this.handleMouseUp(e)}));this.bindEvents.push(s),e.debug.log("zoom","init")}destroy(){this.bindEvents=[],this.isDragging=!1,this.currentZoom=1,this.prevVideoElementStyleTransform=null,this.prevVideoElementStyleScale=null,this.tempPosition={x:0,y:0},this.videoPosition={left:0,top:0},this.off(),this.player.debug.log("zoom","destroy")}_bindEvents(){const{events:{proxy:e},debug:t}=this.player,i=e(this.player.$container,ya()?"touchmove":"mousemove",(e=>{this.handleMouseMove(e)}));this.bindEvents.push(i);const s=e(this.player.$container,ya()?"touchstart":"mousedown",(e=>{this.handleMouseDown(e)}));this.bindEvents.push(s);const r=e(window,ya()?"touchend":"mouseup",(e=>{this.handleMouseUp(e)}));this.bindEvents.push(r)}_unbindEvents(){this.bindEvents.forEach((e=>{e&&e()}))}handleMouseMove(e){if(e.stopPropagation(),this.isDragging&&this.player.zooming){e.preventDefault();const{posX:t,posY:i}=io(e),s=this.tempPosition.x-t,r=this.tempPosition.y-i;this.videoPosition.left=this.videoPosition.left-s,this.videoPosition.top=this.videoPosition.top-r,this.tempPosition.x=t,this.tempPosition.y=i,this.updateVideoPosition()}}handleMouseDown(e){e.stopPropagation();const t=Za(e);if(this.player.zooming&&(t.matches("video")||t.matches("canvas"))){e.preventDefault();const{posX:t,posY:i}=io(e);this.player.$container.style.cursor="grabbing",this.tempPosition.x=t,this.tempPosition.y=i,this.isDragging=!0,this.player.debug.log("zoom","handleMouseDown is dragging true")}}handleMouseUp(e){e.stopPropagation(),this.isDragging&&this.player.zooming&&(e.preventDefault(),this.tempPosition={x:0,y:0},this.isDragging=!1,this.player.$container.style.cursor="grab",this.player.debug.log("zoom","handleMouseUp is dragging false"))}updateVideoPosition(){const e=this.player.video.$videoElement;e.style.left=this.videoPosition.left+"px",e.style.top=this.videoPosition.top+"px"}_resetVideoPosition(){this.player.resize(),this.tempPosition={x:0,y:0},this.videoPosition={left:0,top:0},this.currentZoom=1,this.isDragging=!1}narrowPrecision(){this.currentZoom<=1||(this.currentZoom-=1,this.updateVideoElementScale())}expandPrecision(){this.currentZoom>=this.maxScale||(this.currentZoom+=1,this.updateVideoElementScale())}updatePrevVideoElementStyleScale(e){this.prevVideoElementStyleScale=e}updateVideoElementScale(){const e=this.player.video.$videoElement;let t=e.style.transform,i=1,s=1;if(this.prevVideoElementStyleScale){const e=this.prevVideoElementStyleScale[0];void 0!==e&&(i=e,s=e);const t=this.prevVideoElementStyleScale[1];void 0!==t&&(s=t)}s=ka(s),i=ka(i);const r=.5*i*(this.currentZoom-1)+i,a=.5*s*(this.currentZoom-1)+s;let o;o=-1===t.indexOf("scale(")?t+` scale(${r},${a})`:t.replace(/scale\([0-9., ]*\)/,`scale(${r},${a})`),this.player.debug.log("zoom",`updateVideoElementScale end is ${r}, ${a} style is ${o}`),e.style.transform=o}}class Kb extends a{constructor(e){super(),this.player=e,this.faceDetector=null,this.objectDetector=null,this.imageDetector=null,this.occlusionDetector=null,this.initFaceDetector(),this.initObjectDetector(),this.initImageDetector(),this.initOcclusionDetector();let t="init";this.faceDetector&&(t+=" and use faceDetector"),this.objectDetector&&(t+=" and use objectDetector"),this.imageDetector&&(t+=" and use imageDetector"),this.occlusionDetector&&(t+=" and use occlusionDetector"),this.player.debug.log("AiLoader",t)}destroy(){this.off(),this.faceDetector&&(this.faceDetector.destroy(),this.faceDetector=null),this.objectDetector&&(this.objectDetector.destroy(),this.objectDetector=null),this.imageDetector&&(this.imageDetector.destroy(),this.imageDetector=null),this.occlusionDetector&&(this.occlusionDetector.destroy(),this.occlusionDetector=null),this.player.debug.log("AiLoader","destroy")}initFaceDetector(){if(this.player._opt.useFaceDetector&&window.JessibucaProFaceDetector){const e=new JessibucaProFaceDetector({detectWidth:this.player._opt.aiFaceDetectWidth,showRect:!1,debug:this.player._opt.debug,debugLevel:this.player._opt.debugLevel,debugUuid:this.player._opt.debugUuid});e.load().then((()=>{this.player.debug.log("AiLoader","init face detector success"),this.faceDetector=e,this.faceDetector.on("jessibuca-pro-face-detector-info",(e=>{if(this.player.emit(lt.aiFaceDetectorInfo,e),this.player._opt.aiFaceDetectShowRect){const t=this.player._opt.aiFaceDetectRectConfig||{},i=(e.list||[]).map((e=>(e.type="rect",e.color=t.borderColor||"#0000FF",e.lineWidth=t.borderWidth||2,e)));this.player.video&&this.player.video.addAiContentToCanvas(i)}}))}))}}initObjectDetector(){if(this.player._opt.useObjectDetector&&window.JessibucaProObjectDetector){const e=new JessibucaProObjectDetector({detectWidth:this.player._opt.aiObjectDetectWidth,showRect:!1,debug:this.player._opt.debug,debugLevel:this.player._opt.debugLevel,debugUuid:this.player._opt.debugUuid});e.load().then((()=>{this.player.debug.log("AiLoader","init object detector success"),this.objectDetector=e,this.objectDetector.on("jessibuca-pro-object-detector-info",(e=>{if(this.player.emit(lt.aiObjectDetectorInfo,e),this.player._opt.aiObjectDetectShowRect){const t=[],i=this.player._opt.aiObjectDetectRectConfig||{};(e.list||[]).forEach((e=>{const s={type:"rect",color:i.borderColor||"#0000FF",lineWidth:i.borderWidth||2,x:e.rect.x,y:e.rect.y,width:e.rect.width,height:e.rect.height},r={type:"text",color:i.color||"#000",fontSize:i.fontSize||14,text:e.zh,x:e.rect.x,y:e.rect.y-25};t.push(s,r)})),this.player.video&&this.player.video.addAiContentToCanvas(t)}}))}))}}initImageDetector(){if(this.player._opt.useImageDetector&&window.JessibucaProImageDetector){const e=new JessibucaProImageDetector({debug:this.player._opt.debug,debugLevel:this.player._opt.debugLevel,debugUuid:this.player._opt.debugUuid});e.load().then((()=>{this.player.debug.log("AiLoader","init image detector success"),this.imageDetector=e}))}}initOcclusionDetector(){if(this.player._opt.useOcclusionDetector&&window.JessibucaProOcclusionDetector){const e=new JessibucaProOcclusionDetector({debug:this.player._opt.debug,debugLevel:this.player._opt.debugLevel,debugUuid:this.player._opt.debugUuid});e.load().then((()=>{this.player.debug.log("AiLoader","init occlusion detector success"),this.occlusionDetector=e}))}}updateFaceDetectorConfig(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.faceDetector&&this.faceDetector.updateConfig(e)}updateObjectDetectorConfig(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.objectDetector&&this.objectDetector.updateConfig(e)}updateImageDetectorConfig(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.imageDetector&&this.imageDetector.updateConfig(e)}updateOcclusionDetectorConfig(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.occlusionDetector&&this.occlusionDetector.updateConfig(e)}}class Yb extends a{constructor(e){super(),this.player=e,this.LOG_NAME="Contextmenu",this.menuList=[],this.$contextmenus=e.control.$contextmenus,ya()?this.player.debug.warn(this.LOG_NAME,"not support mobile"):this.init(),e.debug.log(this.LOG_NAME,"init")}destroy(){this.menuList=[],this.player.debug.log(this.LOG_NAME,"destroy")}get isShow(){return e=this.player.$container,t="jb-pro-contextmenus-show",e.classList.contains(t);var e,t}show(){Ph(this.player.$container,"jb-pro-contextmenus-show")}hide(){var e,t;e=this.player.$container,t="jb-pro-contextmenus-show",e.classList.remove(t)}init(){const{events:{proxy:e},debug:t}=this.player;this.player._opt.contextmenuBtns.length>0&&this.player._opt.contextmenuBtns.forEach((e=>{this.addMenuItem(e)})),e(this.player.$container,"contextmenu",(e=>{e.preventDefault(),this.show();const t=e.clientX,i=e.clientY,{height:s,width:r,left:a,top:o}=this.player.$container.getBoundingClientRect(),{height:n,width:l}=this.$contextmenus.getBoundingClientRect();let d=t-a,h=i-o;t+l>a+r&&(d=r-l),i+n>o+s&&(h=s-n),ua(this.$contextmenus,{left:`${d}px`,top:`${h}px`})})),e(this.player.$container,"click",(e=>{Uh(e,this.$contextmenus)||this.hide()})),this.player.on(lt.blur,(()=>{this.hide()}))}_validateMenuItem(e){let t=!0;return e.content||(this.player.debug.warn(this.LOG_NAME,"content is required"),t=!1),t}addMenuItem(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=po(js);if(e=Object.assign({},t,e),!this._validateMenuItem(e))return;const{events:{proxy:i},debug:s}=this.player,r=Ca(),a=`\n <div class="jb-pro-contextmenu jb-pro-contextmenu-${r}">\n ${e.content}\n </div>\n `,o=Array.from(this.$contextmenus.children)[e.index];o?o.insertAdjacentHTML("beforebegin",a):Bh(this.$contextmenus,a);const n=this.$contextmenus.querySelector(`.jb-pro-contextmenu-${r}`);e.click&&i(n,"click",(t=>{t.preventDefault(),e.click.call(this.player,this,t),this.hide()})),this.menuList.push({uuid:r,$menuItem:n})}}class Qb extends Hb{constructor(e){super(e),this.TAG_NAME="WebrtcForSRSDecoder",this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.player.debug.log(this.TAG_NAME,"destroy")}loadSource(e){return new Promise(((t,i)=>{const s=this.rtcPeerConnection;s.createOffer().then((r=>{s.setLocalDescription(r),this.player.debug.log(this.TAG_NAME,"getWebRtcRemoteSdp loadSource"),function(e,t){return fetch(e,{method:"POST",mode:"cors",cache:"no-cache",credentials:"include",redirect:"follow",referrerPolicy:"no-referrer",headers:{"Content-Type":"application/sdp"},body:t})}(e,r.sdp).then((e=>{this.player.debug.log(this.TAG_NAME,`getWebRtcRemoteSdp response and code is ${e.code}`);const r=e;if(r&&0!==r.code)return i(r.msg);r?s.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:r})).then((()=>{t()})).catch((e=>{i(e)})):i("sdp is null")})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource getWebRtcRemoteSdp response error",e),i(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource rtcPeerConnection.createOffer() error",e),i(e)}))}))}}class Xb extends Hb{constructor(e){super(e),this.TAG_NAME="WebrtcForOthersDecoder",this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.player.debug.log(this.TAG_NAME,"destroy")}loadSource(e){return new Promise(((t,i)=>{const s=this.rtcPeerConnection;s.createOffer().then((r=>{s.setLocalDescription(r),this.player.debug.log(this.TAG_NAME,"getWebRtcRemoteSdp loadSource"),function(e,t){return fetch(e,{method:"POST",mode:"cors",cache:"no-cache",credentials:"include",redirect:"follow",referrerPolicy:"no-referrer",headers:{"Content-Type":"application/sdp"},body:t})}(e,r.sdp).then((e=>{this.player.debug.log(this.TAG_NAME,`getWebRtcRemoteSdp response and code is ${e.code}`),e.text().then((e=>{this.player.debug.log(this.TAG_NAME,"getWebRtcRemoteSdp response");try{let t=JSON.parse(e);this.player.debug.log(this.TAG_NAME,"this is json sdp response"),0!=t.code&&(this.player.debug.log(this.TAG_NAME,`response json code ${t.code}`),i(new Error(`response sdp json code: ${t.code}`))),e=t.sdp}catch(e){this.player.debug.log(this.TAG_NAME,"this is raw sdp response")}e?s.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:e})).then((()=>{t()})).catch((e=>{i(e)})):i("sdp is null")})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource response.text() error",e),i(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource getWebRtcRemoteSdp response error",e),i(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource rtcPeerConnection.createOffer() error",e),i(e)}))}))}}class Zb extends a{constructor(e){if(super(),this.TAG_NAME="AliyunRtc",this.player=e,!window.AliRTS)throw new Error("AliyunRtc is not defined");this.aliyunRtc=window.AliRTS.createClient(),this.aliyunRtcRemoteStream=null,this.$videoElement=this.player.video.$videoElement,this.listenEvents(),this.player.debug.log(this.TAG_NAME,"init")}destroy(){this.aliyunRtc&&(this.aliyunRtcRemoteStream&&(this.aliyunRtcRemoteStream=null),this.aliyunRtc.unsubscribe(),this.aliyunRtc=null),this.off(),this.player.debug.log(this.TAG_NAME,"destroy")}listenEvents(){this.aliyunRtc.on("onError",(e=>{this.player.debug.log(this.TAG_NAME,`onError and code is ${e.errorCode} and message: ${e.message}`),10400!==e.errorCode&&(this.player.debug.error(this.TAG_NAME,`onError and code is ${e.errorCode} and message: ${e.message}`),this.player.emitError(ut.aliyunRtcError,e))})),this.aliyunRtc.on("reconnect",(e=>{this.player.debug.log(this.TAG_NAME,"reconnect",e)}));const e="canplay",t="waiting",i="playing",s="media";this.aliyunRtc.on("onPlayEvent",(r=>{if(r.event===e)this.player.debug.log(this.TAG_NAME,"onPlayEvent and canplay");else if(r.event===t)this.player.debug.log(this.TAG_NAME,"onPlayEvent and playing - > waiting");else if(r.event===i)this.player.debug.log(this.TAG_NAME,"onPlayEvent and waiting -> playing");else if(r.event===s){const e=r.data;let t={},i=0;if(e.audio){const s=Math.floor(e.audio.bytesReceivedPerSecond);i+=s,t.abps=s}if(e.video){const s=Math.floor(e.video.bytesReceivedPerSecond);i+=s,t.vbps=s}this.player.updateStats(t),this.player.emit(lt.kBps,(i/1024).toFixed(2))}}))}loadSource(e){return new Promise(((t,i)=>{this.aliyunRtc.isSupport({isReceiveVideo:!0}).then((()=>{this.aliyunRtc.subscribe(e,{}).then((e=>{this.aliyunRtcRemoteStream=e,e.play(this.$videoElement),t()})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource and subscribe is not success: ",e.message),i(e.message)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource and is not support: ",e.message),i(e.message)}))}))}getVideoCurrentTime(){let e=0;return this.$videoElement&&(e=this.$videoElement.currentTime),e}}class e_{constructor(e){this.player=e,this.TAG_NAME="PressureObserverCpu",this.observer=null,this.latestCpuInfo=null,this.currentLevel=-1,this._init(),this.player.debug.log(this.TAG_NAME,"init")}destroy(){this.observer&&(this.observer.disconnect(),this.observer=null),this.latestCpuInfo=null,this.currentLevel=-1,this.player.debug.log(this.TAG_NAME,"destroy")}getCurrentCpuState(){return this.currentLevel}_init(){Ao(Co())?this.player.debug.log(this.TAG_NAME,"not support PressureObserver"):(this.observer=new PressureObserver((e=>{const t=(e||[]).find((e=>"cpu"===e.source));if(t){switch(this.latestCpuInfo=t,t.state){case"nominal":this.currentLevel=0;break;case"fair":this.currentLevel=1;break;case"serious":this.currentLevel=2;break;case"critical":this.currentLevel=3;break;default:this.currentLevel=-1}this.player.emit(lt.pressureObserverCpu,this.currentLevel)}})),this.observer&&this.observer.observe("cpu"))}}class t_ extends Oo{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e),this.TAG_NAME="DynamicWatermark",this.isPauseAnimation=!1,this.isStopAnimation=!1,this.rafID=null,this.speed=t.speed||.2,this.isDynamic=!0,this.shadowRootDynamicDom=null,this.isGhost=!0===t.isGhost,this.ghostConfig={on:t.on||5,off:t.off||5},this.waterMarkWillRemove=!1,this.waterMarkWillAdd=!1,this.player.once(lt.start,(()=>{const e=t.content;let i=this.player.getVideoInfo();i||(i={width:200,height:200}),this.update({text:{content:e,fontSize:t.fontSize||18,color:t.color||"white"},left:i.width*Math.random(),top:i.height*Math.random(),opacity:t.opacity||.15}),this.startAnimation()})),this.player.debug.log(this.TAG_NAME,"int")}destroy(){super.destroy(),this.shadowRootDynamicDom=null,this.stopAnimation(),this.rafID&&(cancelAnimationFrame(this.rafID),this.rafID=null)}startAnimation(){if(!this.rafID){let e=1,t=1,i=Math.random(),s={width:0,height:0};const r=()=>{try{if(Ao(this.isPauseAnimation)&&this.shadowRootDynamicDom&&this.shadowRootInnerDom){const a=this.shadowRootInnerDom,o=this.shadowRootDynamicDom,n=a.getBoundingClientRect(),l=o.getBoundingClientRect();if(l.width&&l.height&&(s.width=l.width,s.height=l.height),!this.shadowRootInnerDom.contains(this.shadowRootDynamicDom))return this.isGhost?Ao(this.waterMarkWillAdd)&&(this.waterMarkWillAdd=!0,setTimeout((()=>{this._addDom(n,s),this.waterMarkWillAdd=!1}),1e3*this.ghostConfig.off)):this._addDom(n,s),void(0!==this.speed&&requestAnimationFrame(r));const d=Math.min(1,0===this.speed?0:this.speed?this.speed:.2);let h=l.left-n.left,c=l.top-n.top;h+=d*t*i,c+=d*e*(1-i),h+s.width>n.width?(t=-1,i=Math.random()):h<0&&(t=1,i=Math.random()),c+s.height>n.height?(e=-1,i=Math.random()):c<0&&(e=1,i=Math.random()),h=Math.min(n.width-s.width,h),c=Math.min(n.height-s.height,c);const u=h/n.width*100,p=c/n.height*100;this.shadowRootDynamicDom.style.left=`${u}%`,this.shadowRootDynamicDom.style.top=`${p}%`,Ao(this.waterMarkWillRemove)&&this.isGhost&&(this.waterMarkWillRemove=!0,setTimeout((()=>{this._removeDom(),this.waterMarkWillRemove=!1}),1e3*this.ghostConfig.on))}}catch(e){}if(this.isStopAnimation)return this.isStopAnimation=!1,cancelAnimationFrame(this.rafID),void(this.rafID=null);0!==this.speed&&requestAnimationFrame(r)};this.rafID=requestAnimationFrame(r)}}_addDom(e,t){if(this.shadowRootInnerDom&&this.shadowRootDynamicDom){this.shadowRootInnerDom.appendChild(this.shadowRootDynamicDom);let i=e.width*Math.random(),s=e.height*Math.random();i=Math.min(e.width-2*t.width,i),s=Math.min(e.height-2*t.height,s),this.shadowRootDynamicDom.style.left=`${i}px`,this.shadowRootDynamicDom.style.top=`${s}px`}}resumeAnimation(){this.isPauseAnimation=!1}pauseAnimation(){this.isPauseAnimation=!0}stopAnimation(){this.isStopAnimation=!0}}class i_ extends a{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),this._opt={},this.TAG_NAME="Player",this.$container=e;const i=mo();if(this._opt=Object.assign({},i,t),this.debug=new Fr(this),this.debug.log(this.TAG_NAME,"init"),this._opt.forceNoOffscreen=!0,this._canPlayAppleMpegurl=!1,(Sa()||wa())&&(this._canPlayAppleMpegurl=so(),this.debug.log(this.TAG_NAME,"isIOS or isSafari and canPlayAppleMpegurl",this._canPlayAppleMpegurl)),ya()&&(this.debug.log(this.TAG_NAME,"isMobile and set _opt.controlAutoHide false"),this._opt.controlAutoHide=!1,yo(jr.isEnabled)&&yo(this._opt.useWebFullScreen)&&(this.debug.log(this.TAG_NAME,"screenfull.isEnabled is true and _opt.useWebFullScreen is true , set _opt.useWebFullScreen false"),this._opt.useWebFullScreen=!1),Ao(jr.isEnabled)&&Ao(this._opt.useWebFullScreen)&&(this.debug.log(this.TAG_NAME,"screenfull.isEnabled is false and _opt.useWebFullScreen is false , set _opt.useWebFullScreen true"),this._opt.useWebFullScreen=!0)),wo()&&(this.debug.log(this.TAG_NAME,"isIphone and set _opt.videoRenderSupportScale false"),this._opt.videoRenderSupportScale=!1,Qa()&&yo(this._opt.isHls)&&Ao(this._opt.supportHls265)&&(this.debug.log(this.TAG_NAME,"isIphone and is in wechat and is hls so set supportHls265 true"),this._opt.supportHls265=!0)),Ao(this._opt.playFailedAndReplay)&&(this.debug.log(this.TAG_NAME,"_opt.playFailedAndReplay is false and set others replay params false"),this._opt.webglAlignmentErrorReplay=!1,this._opt.webglContextLostErrorReplay=!1,this._opt.autoWasm=!1,this._opt.mseDecodeErrorReplay=!1,this._opt.mediaSourceTsIsMaxDiffReplay=!1,this._opt.wcsDecodeErrorReplay=!1,this._opt.wasmDecodeErrorReplay=!1,this._opt.simdDecodeErrorReplay=!1,this._opt.videoElementPlayingFailedReplay=!1,this._opt.networkDelayTimeoutReplay=!1,this._opt.widthOrHeightChangeReplay=!1,this._opt.simdH264DecodeVideoWidthIsTooLargeReplay=!1,this._opt.mediaSourceUseCanvasRenderPlayFailedReplay=!1,this._opt.heartTimeoutReplay=!1,this._opt.loadingTimeoutReplay=!1,this._opt.websocket1006ErrorReplay=!1,this._opt.streamErrorReplay=!1,this._opt.streamEndReplay=!1),this._opt.hiddenControl&&(this.debug.log(this.TAG_NAME,"_opt.hiddenControl is true and set others show btn to false"),Object.keys(this._opt.operateBtns).forEach((e=>{this._opt.operateBtns[e]&&-1===(""+e).indexOf("Fn")&&(this._opt.operateBtns[e]=!1)})),this._opt.showBandwidth=!1,this._opt.extendOperateBtns=[],this._opt.controlHtml="",this.isPlayback()&&(this._opt.playbackConfig.showControl=!1)),this._opt.forceNoOffscreen||("undefined"==typeof OffscreenCanvas?(this._opt.forceNoOffscreen=!0,this._opt.useOffscreen=!1):this._opt.useOffscreen=!0),this._opt.isMpeg4&&(this.debug.log(this.TAG_NAME,"isMpeg4 is true, so set _opt.useWasm true and others params false"),this._opt.useWCS=!1,this._opt.useMSE=!1,this._opt.isNakedFlow=!1,this._opt.useSIMD=!1,this._opt.isFmp4=!1,this._opt.useWasm=!0),this.isPlayback()&&(this._opt.mseDecoderUseWorker=!1),this._opt.poster&&(this._opt.background=this._opt.poster),Ao(this._opt.muted)&&(this._opt.isNotMute=!0),this._opt.mseDecoderUseWorker&&(this._opt.mseDecoderUseWorker=!!(self.Worker&&self.MediaSource&&"canConstructInDedicatedWorker"in self.MediaSource&&!0===self.MediaSource.canConstructInDedicatedWorker),Ao(this._opt.mseDecoderUseWorker)&&this.debug.log(this.TAG_NAME,"mseDecoderUseWorker is true but not support so set _opt.mseDecoderUseWorker = false")),(this.isOldHls()||this.isWebrtcH264()||this.isAliyunRtc())&&(this.debug.log(this.TAG_NAME,"isOldHls or isWebrtcH264 or isAliyunRtc is true, so set some params false and _opt.recordType is webm"),this._opt.useWCS=!1,this._opt.useMSE=!1,this._opt.isNakedFlow=!1,this._opt.useSIMD=!1,this._opt.isFmp4=!1,this._opt.useWasm=!1,this._opt.recordType=T),this._opt.isNakedFlow&&(this.debug.log(this.TAG_NAME,"isNakedFlow is true, so set _opt.mseDecodeAudio false"),this._opt.mseDecodeAudio=!1),_a()&&(this.debug.log(this.TAG_NAME,"isFirefox is true, so set _opt.mseDecodeAudio false"),this._opt.mseDecodeAudio=!1),!this.isOldHls()&&!this.isWebrtcH264()){if(this._opt.useWCS){const e="VideoEncoder"in window,t=Ia();this._opt.useWCS=e,this._opt.useWCS&&this._opt.isH265&&(this._opt.useWCS=t),this._opt.useWCS||this.debug.warn(this.TAG_NAME,`\n useWCS is true,\n and supportWCS is ${e}, supportHevcWCS is ${t} , _opt.isH265 is ${this._opt.isH265}\n so set useWCS false`),this._opt.useWCS&&(this._opt.useOffscreen?this._opt.wcsUseVideoRender=!1:this._opt.wcsUseVideoRender&&(this._opt.wcsUseVideoRender=Pa()&&Ba(),this._opt.wcsUseVideoRender||this.debug.warn(this.TAG_NAME,"wcsUseVideoRender is true, but not support so set wcsUseVideoRender false")))}if(this._opt.useMSE){const e=function(){let e=!1;return"MediaSource"in self&&(e=!0),e}()||function(){let e=!1;return!("MediaSource"in self)&&"ManagedMediaSource"in self&&(e=!0),e}(),t=La()||function(){let e=!1;return!("MediaSource"in self)&&"ManagedMediaSource"in self&&(self.ManagedMediaSource.isTypeSupported(ui)||self.ManagedMediaSource.isTypeSupported(pi)||self.ManagedMediaSource.isTypeSupported(fi)||self.ManagedMediaSource.isTypeSupported(mi)||self.ManagedMediaSource.isTypeSupported(gi))&&(e=!0),e}();this._opt.useMSE=e,this._opt.useMSE&&this._opt.isH265&&(this._opt.useMSE=t),this._opt.useMSE||this.debug.warn(this.TAG_NAME,`\n useMSE is true,\n and supportMSE is ${e}, supportHevcMSE is ${t} , _opt.isH265 is ${this._opt.isH265}\n so set useMSE false`)}}if(Ao(this._opt.useMSE)&&(this._opt.mseDecodeAudio=!1),this._opt.useMSE?(this._opt.useWCS&&this.debug.warn(this.TAG_NAME,"useMSE is true and useWCS is true then useWCS set true->false"),this._opt.forceNoOffscreen||this.debug.warn(this.TAG_NAME,"useMSE is true and forceNoOffscreen is false then forceNoOffscreen set false->true"),this._opt.useWCS=!1,this._opt.forceNoOffscreen=!0):this._opt.useWCS,this._opt.isWebrtc&&this._opt.demuxUseWorker&&(this.debug.warn(this.TAG_NAME,"isWebrtc is true and demuxUseWorker is true then demuxUseWorker set true->false"),this._opt.demuxUseWorker=!1),this._opt.isHls&&this._opt.demuxUseWorker&&(this.debug.warn(this.TAG_NAME,"isHls is true and demuxUseWorker is true then demuxUseWorker set true->false"),this._opt.demuxUseWorker=!1),this._opt.isAliyunRtc&&this._opt.demuxUseWorker&&(this.debug.warn(this.TAG_NAME,"isAliyunRtc is true and demuxUseWorker is true then demuxUseWorker set true->false"),this._opt.demuxUseWorker=!1),this.isStreamWebTransport()&&this._opt.demuxUseWorker&&(this.debug.warn(this.TAG_NAME,"is stream use webTransport is true and demuxUseWorker is true then demuxUseWorker set true->false"),this._opt.demuxUseWorker=!1),Ao(this._opt.demuxUseWorker)&&(this._opt.mseDecoderUseWorker=!1),this.isPlayback()&&(this._opt.mseDecoderUseWorker=!1),this._opt.useMThreading&&(this._opt.useMThreading="undefined"!=typeof SharedArrayBuffer,this._opt.useMThreading||this.debug.warn(this.TAG_NAME,"useMThreading is true, but not support so set useMThreading false")),this._opt.useSIMD||-1!==this._opt.decoder.indexOf("-simd")){const e=WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),t=wo();this._opt.useSIMD=e&&Ao(t),this._opt.useSIMD||this.debug.warn(this.TAG_NAME,`useSIMD is true, but not support(isSupportSimd is ${e} ,isIphone is ${t}) so set useSIMD false`)}var s;if(this._opt.useSIMD?-1===this._opt.decoder.indexOf("-simd")?this._opt.useMThreading?this._opt.decoder=this._opt.decoder.replace("decoder-pro.js","decoder-pro-simd-mt.js"):this._opt.decoder=this._opt.decoder.replace("decoder-pro.js","decoder-pro-simd.js"):this._opt.useMThreading&&(this._opt.decoder=this._opt.decoder.replace("decoder-pro-simd.js","decoder-pro-simd-mt.js")):-1!==this._opt.decoder.indexOf("-simd")?this._opt.useMThreading?this._opt.decoder=this._opt.decoder.replace("decoder-pro-simd.js","decoder-pro-mt.js"):this._opt.decoder=this._opt.decoder.replace("decoder-pro-simd.js","decoder-pro.js"):this._opt.useMThreading&&(this._opt.decoder=this._opt.decoder.replace("decoder-pro.js","decoder-pro-mt.js")),-1!==this._opt.decoder.indexOf("-simd")?this._opt.useMThreading?(this._opt.decoderAudio=this._opt.decoder.replace("decoder-pro-simd-mt.js","decoder-pro-audio.js"),this._opt.decoderHard=this._opt.decoder.replace("decoder-pro-simd-mt.js","decoder-pro-hard.js"),this._opt.decoderHardNotWasm=this._opt.decoder.replace("decoder-pro-simd-mt.js","decoder-pro-hard-not-wasm.js")):(this._opt.decoderAudio=this._opt.decoder.replace("decoder-pro-simd.js","decoder-pro-audio.js"),this._opt.decoderHard=this._opt.decoder.replace("decoder-pro-simd.js","decoder-pro-hard.js"),this._opt.decoderHardNotWasm=this._opt.decoder.replace("decoder-pro-simd.js","decoder-pro-hard-not-wasm.js")):this._opt.useMThreading?(this._opt.decoderAudio=this._opt.decoder.replace("decoder-pro-mt.js","decoder-pro-audio.js"),this._opt.decoderHard=this._opt.decoder.replace("decoder-pro-mt.js","decoder-pro-hard.js"),this._opt.decoderHardNotWasm=this._opt.decoder.replace("decoder-pro-mt.js","decoder-pro-hard-not-wasm.js")):(this._opt.decoderAudio=this._opt.decoder.replace("decoder-pro.js","decoder-pro-audio.js"),this._opt.decoderHard=this._opt.decoder.replace("decoder-pro.js","decoder-pro-hard.js"),this._opt.decoderHardNotWasm=this._opt.decoder.replace("decoder-pro.js","decoder-pro-hard-not-wasm.js")),Ao(this._opt.hasAudio)&&(this._opt.operateBtns.audio=!1),Ao(this._opt.hasVideo)&&(this._opt.operateBtns.fullscreen=!1,this._opt.operateBtns.screenshot=!1,this._opt.operateBtns.record=!1,this._opt.operateBtns.ptz=!1,this._opt.operateBtns.quality=!1,this._opt.operateBtns.zoom=!1),this._opt.qualityConfig&&0===this._opt.qualityConfig.length&&this._opt.operateBtns.quality&&(this._opt.operateBtns.quality=!1,this.debug.warn(this.TAG_NAME,"_opt.qualityConfig is empty, so set operateBtns.quality false")),yo(this._opt.useWebGPU)&&(this._opt.useWebGPU=function(){let e=!1;return"gpu"in navigator&&(e=!0),e}(),Ao(this._opt.useWebGPU)&&this.debug.warn(this.TAG_NAME,"useWebGPU is true, but not support so set useWebGPU false")),this._opt.hasControl=this._hasControl(),this._loading=!1,this._playing=!1,this._playbackPause=!1,this._hasLoaded=!1,this._zooming=!1,this._destroyed=!1,this._closed=!1,this._checkHeartTimeout=null,this._checkLoadingTimeout=null,this._checkStatsInterval=null,this._checkVisibleHiddenTimeout=null,this._startBpsTime=null,this._isPlayingBeforePageHidden=!1,this._stats={buf:0,netBuf:0,fps:0,maxFps:0,dfps:0,abps:0,vbps:0,ts:0,mseTs:0,currentPts:0,pTs:0,dts:0,mseVideoBufferDelayTime:0,isDropping:!1},this._allStatsData={},this._faceDetectActive=!1,this._objectDetectActive=!1,this._occlusionDetectActive=!1,this._imageDetectActive=!1,this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},this._videoTimestamp=0,this._audioTimestamp=0,this._latestAudioTimestamp=0,this._videoIframeIntervalTs=0,this._streamQuality=this._opt.defaultStreamQuality||"",!this._streamQuality&&this._opt.qualityConfig.length>0&&(this._streamQuality=this._opt.qualityConfig[0]||""),this._visibility=!0,this._lastestVisibilityChangeTimestamp=null,this._tempWorkerStats=null,this._historyFpsList=[],this._historyVideoDiffList=[],this._tempStreamList=[],this._tempInnerPlayBgobj=null,this._flvMetaData=null,this._flvMetaDataFps=null,this._mseWorkerData={},Ao(this._opt.useMSE)&&Ao(this._opt.useWCS)&&!this.isWebrtcH264()&&!this.isOldHls()&&(this._opt.useWasm=!0),(this.isOldHls()||this.isWebrtcH264())&&(this._opt.hasVideo=!0,this._opt.hasAudio=!0),this._opt.hasVideo||(this._opt.useMSE=!1,this._opt.useWCS=!1),this._opt.useWasm&&(this._opt.useOffscreen?this._opt.wasmUseVideoRender=!1:this._opt.wasmUseVideoRender&&(this._opt.wasmUseVideoRender=Ea()&&Pa()&&Ba(),this._opt.wasmUseVideoRender||this.debug.warn(this.TAG_NAME,"use wasm video render, but not support so set wasmUseVideoRender false")),this._opt.useSIMD?this.debug.log(this.TAG_NAME,"use simd wasm"):this.debug.log(this.TAG_NAME,"use wasm")),this._opt.useWasm&&(this._opt.useFaceDetector&&window.JessibucaProFaceDetector||this._opt.useObjectDetector&&window.JessibucaProObjectDetector||this._opt.useOcclusionDetector&&window.JessibucaProOcclusionDetector||this._opt.useImageDetector&&window.JessibucaProImageDetector)?(this.ai=new Kb(this),this._opt.useFaceDetector&&window.JessibucaProFaceDetector||(this._opt.operateBtns.aiFace=!1),this._opt.useObjectDetector&&window.JessibucaProObjectDetector||(this._opt.operateBtns.aiObject=!1),this._opt.useOcclusionDetector&&window.JessibucaProOcclusionDetector||(this._opt.operateBtns.aiOcclusion=!1),this._opt.useImageDetector&&this._opt.aiImageDetectActive&&window.JessibucaProImageDetector&&(this.imageDetectActive=!0)):(this._opt.operateBtns.aiObject=!1,this._opt.operateBtns.aiFace=!1,this._opt.operateBtns.aiOcclusion=!1),this._opt.useFaceDetector&&(this._opt.useWasm&&window.JessibucaProFaceDetector||this.debug.warn(this.TAG_NAME,`use face detector, useWasm is ${this._opt.useWasm} and window.JbProFaceDetector is null`)),this._opt.useObjectDetector&&(this._opt.useWasm&&window.JessibucaProObjectDetector||this.debug.warn(this.TAG_NAME,`use object detector, useWasm is ${this._opt.useWasm} and window.JbProObjectDetector is null`)),this._opt.useOcclusionDetector&&(this._opt.useWasm&&window.JessibucaProOcclusionDetector||this.debug.warn(this.TAG_NAME,`use occlusion detector, useWasm is ${this._opt.useWasm} and window.JessibucaProOcclusionDetector is null`)),this._opt.useImageDetector&&(this._opt.useWasm&&window.JessibucaProImageDetector||this.debug.warn(this.TAG_NAME,`use image detector, useWasm is ${this._opt.useWasm} and window.JessibucaProImageDetector is null`)),this._opt.useVideoRender&&(this._opt.useWasm&&!this._opt.useOffscreen?(this._opt.wasmUseVideoRender=Ea()&&Pa()&&Ba(),this._opt.wasmUseVideoRender||this.debug.warn(this.TAG_NAME,"use wasm video render, but not support so set wasmUseVideoRender false")):this._opt.useWCS&&!this._opt.useOffscreen&&(this._opt.wcsUseVideoRender=Pa()&&Ba(),this._opt.wcsUseVideoRender||this.debug.warn(this.TAG_NAME,"use wcs video render, but not support so set wcsUseVideoRender false"))),this._opt.useCanvasRender&&(this._opt.useMSE&&Ao(this._opt.mseDecoderUseWorker)&&(this._opt.mseUseCanvasRender=!0),this._opt.useWasm&&(this._opt.wasmUseVideoRender=!1),this._opt.useWCS&&(this._opt.wcsUseVideoRender=!1),this.isOldHls()&&!Sa()&&(this._opt.hlsUseCanvasRender=!0),this.isWebrtcH264()&&(this._opt.webrtcUseCanvasRender=!0)),this._opt.useVideoRender=!1,this._opt.useCanvasRender=!1,this._opt.useWasm?this._opt.wasmUseVideoRender?this._opt.useVideoRender=!0:this._opt.useCanvasRender=!0:this._opt.useWCS?this._opt.wcsUseVideoRender?this._opt.useVideoRender=!0:this._opt.useCanvasRender=!0:this._opt.useMSE?this._opt.mseUseCanvasRender?this._opt.useCanvasRender=!0:this._opt.useVideoRender=!0:this.isOldHls()?this._opt.hlsUseCanvasRender?this._opt.useCanvasRender=!0:this._opt.useVideoRender=!0:this.isWebrtcH264()&&(this._opt.webrtcUseCanvasRender?this._opt.useCanvasRender=!0:this._opt.useVideoRender=!0),s=this,Object.defineProperty(s,"rect",{get:()=>{let e={};return s.$container&&(e=s.$container.getBoundingClientRect(),e.width=Math.max(e.width,s.$container.clientWidth),e.height=Math.max(e.height,s.$container.clientHeight)),e}}),["bottom","height","left","right","top","width"].forEach((e=>{Object.defineProperty(s,e,{get:()=>s.rect[e]||0})})),this.events=new xo(this),this._opt.hasVideo&&(this.video=new Qo(this),this.recorder=new ol(this)),this.isOldHls()?(this.hlsDecoder=new _A(this),this.loaded=!0):this.isWebrtcH264()?(this._opt.isWebrtcForZLM?this.webrtc=new Wb(this):this._opt.isWebrtcForSRS?this.webrtc=new Qb(this):this._opt.isWebrtcForOthers?this.webrtc=new Xb(this):this.webrtc=new Vb(this),this.loaded=!0):this.isAliyunRtc()?(this.aliyunRtcDecoder=new Zb(this),this.loaded=!0):(this.isUseHls265()&&(this.hlsDecoder=new $b(this)),this.isWebrtcH265()&&(this.webrtc=new Vb(this)),Ao(ro(this._opt))?this.decoderWorker=new ul(this):this.loaded=!0),this._opt.hasAudio&&(this.audio=new yn(this)),this.stream=null,this.demux=null,this._lastVolume=null,this._isMute=null,this._isInZoom=!1,this._playingStartTimestamp=null,this.isMSEVideoDecoderInitializationFailedNotSupportHevc=!1,this.isMSEAudioDecoderError=!1,this.isMSEPlaybackRateChangePause=!1,this.isPlayFailedAndPaused=!1,this._opt.useWCS&&(this.webcodecsDecoder=new wh(this),!this._opt.hasAudio&&Ao(this._opt.demuxUseWorker)&&(this.loaded=!0)),this._opt.useMSE&&Ao(this._opt.mseDecoderUseWorker)&&(this.mseDecoder=new Kh(this),!this._opt.hasAudio&&Ao(this._opt.demuxUseWorker)&&(this.loaded=!0)),this.control=new jh(this),this._opt.contextmenuBtns.length>0&&Ao(this._opt.disableContextmenu)&&Aa()?this.contextmenu=new Yb(this):yo(this._opt.disableContextmenu)&&this._opt.contextmenuBtns.length>0&&Aa()&&this.debug.warn(this.TAG_NAME,"disableContextmenu is true, but contextmenuBtns is not empty, so Contextmenu can not be created,please check"),this.isPlayback()&&(this.playback=new Jb(this,this._opt.playbackConfig)),this._opt.operateBtns.zoom&&(this.zoom=new qb(this)),/(iphone|ipad|ipod|ios|android)/i.test(window.navigator.userAgent.toLowerCase())&&Ao(this._opt.supportLockScreenPlayAudio&&wa())&&(this.keepScreenOn=new Qh(this)),(e=>{try{const t=t=>{Za(t)===e.$container&&(e.emit(dt.fullscreen,e.fullscreen),e.fullscreen?e._opt.useMSE&&e.resize():e.resize())};jr.on("change",t),e.events.destroys.push((()=>{jr.off("change",t)}))}catch(e){}if(e.on(lt.decoderWorkerInit,(()=>{e.debug.log("player","listen decoderWorkerInit and set loaded true"),e.loaded=!0})),e.on(lt.play,(()=>{e.loading=!1})),e.on(lt.fullscreen,(t=>{if(t)try{jr.request(e.$container).then((()=>{})).catch((t=>{e.debug.error("player","fullscreen request error",t),ya()&&e._opt.useWebFullScreen&&(e.webFullscreen=!0)}))}catch(t){ya()&&e._opt.useWebFullScreen&&(e.webFullscreen=!0)}else try{jr.exit().then((()=>{e.webFullscreen&&(e.webFullscreen=!1)})).catch((t=>{e.debug.error("player","fullscreen exit error",t),e.webFullscreen&&(e.webFullscreen=!1)}))}catch(t){e.webFullscreen&&(e.webFullscreen=!1)}})),ya()&&e.on(lt.webFullscreen,(t=>{t?e.$container.classList.add("jb-pro-fullscreen-web"):e.$container.classList.remove("jb-pro-fullscreen-web"),e.emit(dt.fullscreen,e.fullscreen)})),e.on(lt.resize,(()=>{e.video&&e.video.resize()})),e._opt.debug){const t=[lt.timeUpdate,lt.currentPts,lt.videoSEI],i=[lt.stats,lt.playbackStats,lt.playbackTimestamp,lt.flvMetaData,lt.playToRenderTimes,lt.audioInfo,lt.videoInfo];Object.keys(lt).forEach((s=>{e.on(lt[s],(function(r){if(!t.includes(s)){i.includes(s)&&(r=JSON.stringify(r));for(var a=arguments.length,o=new Array(a>1?a-1:0),n=1;n<a;n++)o[n-1]=arguments[n];e.debug.log("player events",lt[s],r,...o)}}))})),Object.keys(ut).forEach((t=>{e.on(ut[t],(function(){for(var i=arguments.length,s=new Array(i),r=0;r<i;r++)s[r]=arguments[r];e.debug.warn("player event error",ut[t],...s)}))}))}})(this),Gh(this),this.singleWatermark=new Oo(this),this._opt.ghostWatermarkConfig.content){const e=Object.assign({},this._opt.ghostWatermarkConfig,{isGhost:!0});this.ghostWatermark=new t_(this,e)}this._opt.dynamicWatermarkConfig.content&&(this.dynamicWatermark=new t_(this,this._opt.dynamicWatermarkConfig)),this._opt.watermarkConfig&&this.updateWatermark(this._opt.watermarkConfig),Co()&&(this.pressureObserverCpu=new e_(this)),this._opt.useWCS&&this.debug.log(this.TAG_NAME,"use WCS"),this._opt.useMSE&&(this._opt.mseDecoderUseWorker?this.debug.log(this.TAG_NAME,"use worker MSE"):this.debug.log(this.TAG_NAME,"use MSE")),this._opt.useOffscreen&&this.debug.log(this.TAG_NAME,"use offscreen"),this._opt.isHls&&(this._opt.supportHls265?this.debug.log(this.TAG_NAME,"use hls 265"):this.debug.log(this.TAG_NAME,"use hls")),this._opt.isWebrtc&&(this._opt.isWebrtcH265?this.debug.log(this.TAG_NAME,"use webrtc h265"):this._opt.isWebrtcForZLM?this.debug.log(this.TAG_NAME,"use webrtc for ZLM"):this._opt.isWebrtcForSRS?this.debug.log(this.TAG_NAME,"use webrtc for SRS"):this._opt.isWebrtcForOthers?this.debug.log(this.TAG_NAME,"use webrtc for Others"):this.debug.log(this.TAG_NAME,"use webrtc for M7S")),this.isAliyunRtc()&&this.debug.log(this.TAG_NAME,"use aliyun rtc"),this._opt.isFmp4&&this.debug.log(this.TAG_NAME,"use fmp4"),this._opt.isMpeg4&&this.debug.log(this.TAG_NAME,"use mpeg4"),this.isPlayback()&&this.debug.log(this.TAG_NAME,"use playback"),this._opt.hasVideo&&(0===this.width&&this.debug.warn(this.TAG_NAME,"container width is 0, please check the container width"),0===this.height&&this.debug.warn(this.TAG_NAME,"container height is 0, please check the container height")),this.debug.log("Player options",JSON.stringify(this._opt))}async destroy(){this._destroyed=!0,this.emit(lt.destroy),this.off(),this.events&&(this.events.destroy(),this.events=null),this.clearCheckLoadingTimeout(),this.clearStatsInterval(),this.clearVisibilityHiddenTimeout(),this.decoderWorker&&(await this.decoderWorker.destroy(),this.decoderWorker=null),await this._destroy()}async _destroy(){this._loading=!1,this._playing=!1,this._playbackPause=!1,this._hasLoaded=!1,this._lastVolume=null,this._isMute=null,this._zooming=!1,this._faceDetectActive=!1,this._objectDetectActive=!1,this._occlusionDetectActive=!1,this._imageDetectActive=!1,this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},this.singleWatermark&&(this.singleWatermark.destroy(),this.singleWatermark=null),this.ghostWatermark&&(this.ghostWatermark.destroy(),this.ghostWatermark=null),this.dynamicWatermark&&(this.dynamicWatermark.destroy(),this.dynamicWatermark=null),this.pressureObserverCpu&&(this.pressureObserverCpu.destroy(),this.pressureObserverCpu=null),this.stream&&(await this.stream.destroy(),this.stream=null),this.hlsDecoder&&(await this.hlsDecoder.destroy(),this.hlsDecoder=null),this.mseDecoder&&(this.mseDecoder.destroy(),this.mseDecoder=null),this.webrtc&&(this.webrtc.destroy(),this.webrtc=null),this.aliyunRtcDecoder&&(this.aliyunRtcDecoder.destroy(),this.aliyunRtcDecoder=null),this.video&&(await this.video.destroy(),this.video=null),this.audio&&(await this.audio.destroy(),this.audio=null),this.recorder&&(this.recorder.destroy(),this.recorder=null),this.control&&(this.control.destroy(),this.control=null),this.webcodecsDecoder&&(this.webcodecsDecoder.destroy(),this.webcodecsDecoder=null),this.demux&&(this.demux.destroy(),this.demux=null),this.playback&&(this.playback.destroy(),this.playback=null),this.zoom&&(this.zoom.destroy(),this.zoom=null),this.ai&&(this.ai.destroy(),this.ai=null),this.keepScreenOn&&(this.releaseWakeLock(),this.keepScreenOn.destroy(),this.keepScreenOn=null),this.resetStats(),this._audioTimestamp=0,this._latestAudioTimestamp=0,this._videoTimestamp=0,this._streamQuality="",this._visibility=!0,this._isInZoom=!1,this._playingStartTimestamp=null,this._lastestVisibilityChangeTimestamp=null,this._videoIframeIntervalTs=null,this._tempWorkerStats=null,this._tempStreamList=[],this._tempInnerPlayBgobj={},this._flvMetaData=null,this._flvMetaDataFps=null,this._mseWorkerData={},this.isMSEVideoDecoderInitializationFailedNotSupportHevc=!1,this.isMSEAudioDecoderError=!1,this.isMSEPlaybackRateChangePause=!1,this.isPlayFailedAndPaused=!1,this.debug.log("play","destroy end"),this._opt=null,this.$container=null,this.debug=null}set fullscreen(e){ya()&&this._opt.useWebFullScreen?this.webFullscreen=e:this.emit(lt.fullscreen,e)}get fullscreen(){return jr.isFullscreen||this.webFullscreen}set webFullscreen(e){this.emit(lt.webFullscreen,e),setTimeout((()=>{this.updateOption({rotate:e?270:0}),this.resize()}),10)}get webFullscreen(){return this.$container.classList.contains("jb-pro-fullscreen-web")}set loaded(e){this._hasLoaded=e}get loaded(){return this._hasLoaded||this.isOldHls()||this.isWebrtcH264()||this._opt.useMSE&&Ao(this._opt.hasAudio)&&Ao(this._opt.demuxUseWorker)||this._opt.useWCS&&!this._opt.hasAudio&&Ao(this._opt.demuxUseWorker)}set playing(e){this.isClosed()&&e?this.debug.log(this.TAG_NAME,"player is closed, so can not play"):(e&&yo(this.loading)&&(this.loading=!1),this.playing!==e&&(this._playing=e,this.emit(lt.playing,e),this.emit(lt.volumechange,this.volume),e?this.emit(lt.play):this.emit(lt.pause)))}get playing(){return this._playing}get volume(){return this.audio&&this.audio.volume||0}set volume(e){e!==this.volume&&(this.audio?(this.audio.setVolume(e),this._lastVolume=this.volume,this._isMute=0===this.volume):this.debug.warn(this.TAG_NAME,"set volume error, audio is null"))}get lastVolume(){return this._lastVolume}set loading(e){this.loading!==e&&(this._loading=e,this.emit(lt.loading,this._loading))}get loading(){return this._loading}set zooming(e){this.zooming!==e&&(this.zoom||(this.zoom=new qb(this)),this._zooming=e,this.emit(lt.zooming,this.zooming))}get zooming(){return this._zooming}set recording(e){e?this.playing&&!this.recording&&(this.recorder&&this.recorder.startRecord(),this.isDemuxInWorker()&&this.decoderWorker&&this.decoderWorker.updateWorkConfig({key:"isRecording",value:!0})):this.recording&&(this.isDemuxInWorker()&&this.decoderWorker&&this.decoderWorker.updateWorkConfig({key:"isRecording",value:!1}),this.recorder&&this.recorder.stopRecordAndSave().then((()=>{})).catch((e=>{})))}get recording(){return!!this.recorder&&this.recorder.isRecording}set audioTimestamp(e){null!==e&&(this._audioTimestamp=e)}get audioTimestamp(){return this._audioTimestamp}set latestAudioTimestamp(e){null!==e&&(this._latestAudioTimestamp=e)}get latestAudioTimestamp(){return this._latestAudioTimestamp}get videoTimestamp(){return this._stats.currentPts||this._stats.ts}set streamQuality(e){this.streamQuality!==e&&(this._streamQuality=e,this.emit(lt.streamQualityChange,e))}get streamQuality(){return this._streamQuality}get isDebug(){return yo(this._opt.debug)}get scaleType(){const e=this._opt,t=e.isResize,i=e.isFullResize;let s=Xt;return Ao(i)&&Ao(t)?s=Xt:Ao(i)&&yo(t)?s=Zt:yo(i)&&yo(t)&&(s=ei),s}set visibility(e){this._visibility!==e&&(this._visibility=e,this.emit(lt.visibilityChange,e),this._lastestVisibilityChangeTimestamp=ha(),e?this.clearVisibilityHiddenTimeout():this.startVisibilityHiddenTimeout())}get visibility(){return this._visibility}set playbackPause(e){this._playbackPause!==e&&(this._playbackPause=e,this.emit(lt.playbackPause,e),this.emit(lt.playbackPauseOrResume,e))}get playbackPause(){return this.isPlayback()&&this._playbackPause}set videoIframeIntervalTs(e){this._videoIframeIntervalTs=e}get videoIframeIntervalTs(){return this._videoIframeIntervalTs}set faceDetectActive(e){this._faceDetectActive!==e&&(this._faceDetectActive=e,this.emit(lt.faceDetectActive,e))}get faceDetectActive(){return this._faceDetectActive}set objectDetectActive(e){this._objectDetectActive!==e&&(this._objectDetectActive=e,this.emit(lt.objectDetectActive,e))}get objectDetectActive(){return this._objectDetectActive}set occlusionDetectActive(e){this._occlusionDetectActive!==e&&(this._occlusionDetectActive=e,this.emit(lt.occlusionDetectActive,e))}get occlusionDetectActive(){return this._occlusionDetectActive}set imageDetectActive(e){this._imageDetectActive!==e&&(this._imageDetectActive=e)}get imageDetectActive(){return this._imageDetectActive}get isUseWorkerDemuxAndDecode(){return this.stream&&this.stream.getStreamType()===A}isDestroyed(){return this._destroyed}isClosed(){return this._closed}isDestroyedOrClosed(){return this.isDestroyed()||this.isClosed()}isPlaying(){let e=!1;return this._opt.playType===_?e=this.playing:this._opt.playType===w&&(e=Ao(this.playbackPause)&&this.playing),e}updateOption(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._opt=Object.assign({},this._opt,e),yo(t)&&this.decoderWorker&&Object.keys(e).forEach((t=>{this.decoderWorker.updateWorkConfig({key:t,value:e[t]})}))}init(){return new Promise(((e,t)=>{this.video||this._opt.hasVideo&&(this.video=new Qo(this)),this.audio||this._opt.hasAudio&&(this.audio=new yn(this)),this.stream||(this.stream=new kn(this)),this.isOldHls()?(this.hlsDecoder||(this.hlsDecoder=new _A(this),this.loaded=!0),e()):this.isWebrtcH264()?(this.webrtc||(this._opt.isWebrtcForZLM?this.webrtc=new Wb(this):this._opt.isWebrtcForSRS?this.webrtc=new Qb(this):this._opt.isWebrtcForOthers?this.webrtc=new Xb(this):this.webrtc=new Vb(this),this.loaded=!0),e()):this.isAliyunRtc()?(this.aliyunRtcDecoder||(this.aliyunRtcDecoder=new Zb(this),this.loaded=!0),e()):(this.demux||this._opt.hasVideo&&!this.isUseWorkerDemuxAndDecode&&(this.demux=new vh(this)),this._opt.useWCS&&(this.webcodecsDecoder||(this.webcodecsDecoder=new wh(this))),this._opt.useMSE&&Ao(this._opt.mseDecoderUseWorker)&&(this.mseDecoder||(this.mseDecoder=new Kh(this))),this.isUseHls265()&&(this.hlsDecoder||(this.hlsDecoder=new $b(this))),this.isWebrtcH265()&&(this.webrtc||(this.webrtc=new Vb(this))),this.decoderWorker?this.loaded?e():this.once(lt.decoderWorkerInit,(()=>{this.isDestroyedOrClosed()?(this.debug.error(this.TAG_NAME,"init() failed and player is destroyed"),t("init() failed and player is destroyed")):(this.loaded=!0,e())})):ro(this._opt)?e():(this.decoderWorker=new ul(this),this.once(lt.decoderWorkerInit,(()=>{this.isDestroyedOrClosed()?(this.debug.error(this.TAG_NAME,"init() failed and player is destroyed"),t("init() failed and player is destroyed")):(this.loaded=!0,e())}))))}))}play(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,s)=>{if(!e&&!this._opt.url)return s("url is empty");this._closed=!1,this.loading=!0,this.playing=!1,this._times.playInitStart=ha(),e||(e=this._opt.url),this._opt.url=e,this.control&&this._opt.loadingBackground&&this.control.initLoadingBackground(),this.init().then((()=>{this.debug.log(this.TAG_NAME,"play() init and next fetch stream"),this._times.playStart=ha(),this._opt.isNotMute&&this.mute(!1),this.enableWakeLock(),this.checkLoadingTimeout(),this.stream?(this.stream.once(ut.fetchError,(e=>{this.emitError(ut.fetchError,e)})),this.stream.once(ut.websocketError,(e=>{this.emitError(ut.websocketError,e)})),this.stream.once(lt.streamEnd,(e=>{this.emit(lt.streamEnd,e)})),this.stream.once(ut.hlsError,(e=>{this.emitError(ut.hlsError,e)})),this.stream.once(ut.webrtcError,(e=>{this.emitError(ut.webrtcError,e)})),this.stream.once(lt.streamSuccess,(()=>{i(),this._times.streamResponse=ha(),this.video&&this.video.play(),this.checkStatsInterval(),this.isPlayback()&&this.playback&&this.playback.startCheckStatsInterval()})),this.stream.fetchStream(e,t)):(this.debug.warn(this.TAG_NAME,`play() this.stream is null and is isDestroyedOrClosed is ${this.isDestroyedOrClosed()}`),s("this.stream is null"))})).catch((e=>{s(e)}))}))}playForControl(){return new Promise(((e,t)=>{this.debug.log(this.TAG_NAME,`playForControl() and pauseAndNextPlayUseLastFrameShow is ${this._opt.pauseAndNextPlayUseLastFrameShow}`),this._opt.pauseAndNextPlayUseLastFrameShow&&this._tempInnerPlayBgobj&&this._tempInnerPlayBgobj.loadingBackground&&this.updateOption({loadingBackground:this._tempInnerPlayBgobj.loadingBackground,loadingBackgroundWidth:this._tempInnerPlayBgobj.loadingBackgroundWidth,loadingBackgroundHeight:this._tempInnerPlayBgobj.loadingBackgroundHeight}),this.play().then((t=>{e(t)})).catch((e=>{t(e)}))}))}close(){return new Promise(((e,t)=>{this._close().then((()=>{this.video&&this.video.clearView(),e()})).catch((e=>{t(e)}))}))}resumeAudioAfterPause(){this.lastVolume&&Ao(this._isMute)&&(this.volume=this.lastVolume)}async _close(){this._closed=!0,this.video&&(this.video.resetInit(),this.video.pause(!0)),this.loading=!1,this.recording=!1,this.zooming=!1,this.playing=!1,this.clearCheckLoadingTimeout(),this.clearStatsInterval(),this.isPlayback()&&this.playback&&this.playback.clearStatsInterval(),this.releaseWakeLock(),this.resetStats(),this._audioTimestamp=0,this._videoTimestamp=0,this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},this.decoderWorker&&(await this.decoderWorker.destroy(),this.decoderWorker=null),this.stream&&(await this.stream.destroy(),this.stream=null),this.demux&&(this.demux.destroy(),this.demux=null),this.webcodecsDecoder&&(this.webcodecsDecoder.destroy(),this.webcodecsDecoder=null),this.mseDecoder&&(this.mseDecoder.destroy(),this.mseDecoder=null),this.hlsDecoder&&(await this.hlsDecoder.destroy(),this.hlsDecoder=null),this.webrtc&&(this.webrtc.destroy(),this.webrtc=null),this.aliyunRtcDecoder&&(this.aliyunRtcDecoder.destroy(),this.aliyunRtcDecoder=null),this.audio&&(await this.audio.destroy(),this.audio=null)}pause(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise(((t,i)=>{e?this.close().then((()=>{t()})).catch((e=>{i(e)})):this._close().then((()=>{t()})).catch((e=>{i(e)}))}))}pauseForControl(){return new Promise(((e,t)=>{if(this.debug.log(this.TAG_NAME,"_pauseInner()"),this._opt.pauseAndNextPlayUseLastFrameShow&&this.video){const e=this.video.screenshot("","png",.92,"base64");if(e){const t=this.getVideoInfo();t?(this.debug.log(this.TAG_NAME,`pauseForControl() and loadingBackground width is ${t.width} and height is ${t.height}`),this._tempInnerPlayBgobj={loadingBackground:e,loadingBackgroundWidth:t.width,loadingBackgroundHeight:t.height}):this.debug.warn(this.TAG_NAME,"pauseForControl() and videoInfo is null")}else this.debug.warn(this.TAG_NAME,"pauseForControl() and loadingBackground is null")}this.pause().then((t=>{e(t)})).catch((e=>{t(e)}))}))}isAudioMute(){let e=!0;return this.audio&&(e=this.audio.isMute),e}isAudioNotMute(){return!this.isAudioMute()}mute(e){this.audio&&this.audio.mute(e)}resize(){this.video&&this.video.resize()}startRecord(e,t){this.recording||(this.recorder.setFileName(e,t),this.recording=!0)}stopRecordAndSave(e,t){return new Promise(((i,s)=>{this.recorder||s("recorder is null"),this.recording?(this._opt.useWasm&&this.decoderWorker&&this.decoderWorker.updateWorkConfig({key:"isRecording",value:!1}),this.recorder.stopRecordAndSave(e,t).then((e=>{i(e)})).catch((e=>{s(e)}))):s("recorder is not recording")}))}_hasControl(){let e=!1,t=!1;return Object.keys(this._opt.operateBtns).forEach((e=>{this._opt.operateBtns[e]&&-1===(""+e).indexOf("Fn")&&(t=!0)})),(this._opt.showBandwidth||t)&&(e=!0),this._opt.extendOperateBtns&&this._opt.extendOperateBtns.length>0&&(e=!0),this.isPlayback()&&this._opt.playbackConfig.showControl&&(e=!0),this._opt.controlHtml&&(e=!0),e}useWasmDecode(){return Ao(this._opt.useMSE)&&Ao(this._opt.useWCS)}canVideoTrackWritter(){const e=this._opt;return!this.isOldHls()&&!this.isWebrtcH264()&&Ao(e.useMSE)&&!this.isAliyunRtc()&&(e.useWCS&&Ao(e.useOffscreen)&&e.wcsUseVideoRender||this.useWasmDecode())}checkHeartTimeout$2(){if(Ao(this.playbackPause)&&this.playing){if(this.isDestroyedOrClosed())return void(this.debug&&this.debug.warn(this.TAG_NAME,"checkHeartTimeout$2 but player is destroyed"));if(Ao(this.isHistoryFpsListAllZero()))return void(this.debug&&this.debug.warn(this.TAG_NAME,"checkHeartTimeout$2 but fps is not all zero"));if(0!==this._stats.fps)return void(this.debug&&this.debug.warn(this.TAG_NAME,`checkHeartTimeout$2 but fps is ${this._stats.fps}`));if(Ao(this.visibility)&&0!==this._stats.vbps)return void(this.debug&&this.debug.warn(this.TAG_NAME,`checkHeartTimeout$2 but page is not visibility and vbps is ${this._stats.vbps}`));const e=this._historyFpsList.join(",");this.debug.warn(this.TAG_NAME,`checkHeartTimeout$2 and\n pause and emit delayTimeout event and\n current vbps is ${this._stats.vbps} and\n current fps is ${this._stats.fps} and\n history FpsList is ${e} and\n current visibility is ${this.visibility} and`),this.emit(lt.timeout,lt.delayTimeout),this.emit(lt.delayTimeout)}else this.debug.log(this.TAG_NAME,`checkHeartTimeout$2 playbackPause is ${this.playbackPause}, playing is ${this.playing}`)}checkStatsInterval(){this._checkStatsInterval=setInterval((()=>{this.updateStats()}),1e3)}checkLoadingTimeout(){this._checkLoadingTimeout=setTimeout((()=>{this.playing?this.debug.warn(this.TAG_NAME,`checkLoadingTimeout but loading is ${this.loading} and playing is ${this.playing}`):this.isDestroyedOrClosed()?this.debug&&this.debug.warn(this.TAG_NAME,"checkLoadingTimeout but player is destroyed"):(this.debug.warn(this.TAG_NAME,"checkLoadingTimeout and pause and emit loadingTimeout event"),this.emit(lt.timeout,lt.loadingTimeout),this.emit(lt.loadingTimeout))}),1e3*this._opt.loadingTimeout)}clearCheckLoadingTimeout(){this._checkLoadingTimeout&&(this.debug.log(this.TAG_NAME,"clearCheckLoadingTimeout"),clearTimeout(this._checkLoadingTimeout),this._checkLoadingTimeout=null)}clearStatsInterval(){this._checkStatsInterval&&(clearInterval(this._checkStatsInterval),this._checkStatsInterval=null)}handleRender(){this.isDestroyedOrClosed()?this.debug&&this.debug.warn(this.TAG_NAME,"handleRender but player is destroyed"):(this.loading&&(this.clearCheckLoadingTimeout(),this.loading=!1,this.emit(lt.start)),this.playing||(this.playing=!0))}updateStats(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._startBpsTime||(this._startBpsTime=ha()),Oa(e.ts)){const t=parseInt(e.ts,10);this._stats.ts=t,null===this._playingStartTimestamp&&t>0&&(this._playingStartTimestamp=t)}Oa(e.dts)&&(this._stats.dts=parseInt(e.dts,10)),Oa(e.mseTs)&&(this._stats.mseTs=e.mseTs),Oa(e.buf)&&(this._stats.buf=e.buf),Oa(e.netBuf)&&(this._stats.netBuf=e.netBuf),Oa(e.currentPts)&&(this._stats.currentPts=e.currentPts),e.fps&&(this._stats.fps+=1),e.dfps&&(this._stats.dfps+=1),e.abps&&(this._stats.abps+=e.abps),e.vbps&&(this._stats.vbps+=e.vbps),e.workerStats&&(this._tempWorkerStats=e.workerStats),e.isDropping&&(this._stats.isDropping=e.isDropping),e.mseVideoBufferDelayTime&&(this._stats.mseVideoBufferDelayTime=parseInt(1e3*e.mseVideoBufferDelayTime,10));const t=ha();if(t-this._startBpsTime<1e3)return;null!==this._playingStartTimestamp&&this._stats.fps>0&&(this._stats.pTs+=1);let i=0,s=0,r=0,a=0,o=0;this._opt.useMSE&&(this.mseDecoder?(i=this.mseDecoder.checkSourceBufferDelay(),i=parseInt(1e3*i,10),s=this.mseDecoder.checkSourceBufferStore(),s=s.toFixed(2),r=this.mseDecoder.getDecodeDiffTimes(),a=this.mseDecoder.getDecodePlaybackRate(),o=this.mseDecoder.getPendingSegmentsLength()):this.isMseDecoderUseWorker()&&(i=this.video.checkSourceBufferDelay(),i=parseInt(1e3*i,10),s=this.video.checkSourceBufferStore(),s=s.toFixed(2),a=this.video.getDecodePlaybackRate())),this._opt.useWCS&&this.webcodecsDecoder&&(r=this.webcodecsDecoder.getDecodeDiffTimes()),this.isOldHls()&&this.hlsDecoder&&(i=this.hlsDecoder.checkHlsBufferedDelay(),i=parseInt(1e3*i,10));let n=0,l=0,d=0;this.isUseHls265()&&this.hlsDecoder&&(i=this.hlsDecoder.checkHlsBufferedDelay(),i=i.toFixed(2),n=this.hlsDecoder.getDemuxBufferedListLength(),d=this.hlsDecoder.getDemuxVideoBufferedListLength(),l=this.hlsDecoder.getDemuxAudioBufferedListLength());let h=0,c=0,u=0,p=!1,f=0;this._opt.useWasm||this._opt.demuxUseWorker?this._tempWorkerStats&&(c=this._tempWorkerStats.demuxBufferDelay,u=this._tempWorkerStats.audioDemuxBufferDelay,h=this._tempWorkerStats.streamBufferByteLength,this._stats.netBuf=this._tempWorkerStats.netBuf,f=this._tempWorkerStats.pushLatestDelay,p=this._tempWorkerStats.isStreamTsMoreThanLocal,this._stats.buf=this._tempWorkerStats.latestDelay):this.demux&&(h=this.demux.getInputByteLength(),f=this.demux.getPushLatestDelay(),p=this.demux.getIsStreamTsMoreThanLocal(),this.demux.bufferList&&(c=this.demux.bufferList.length));let m=0,g=0;this.audio&&this.audio.bufferList&&(m=this.audio.bufferList.length,g=parseInt(m*this.audio.oneBufferDuration,10));let y=0,A=0;if(this.isPlayback()&&this.video){this._opt.playbackConfig.isUseFpsRender&&(y=this.video.bufferList&&this.video.bufferList.length||0);let e=this.video.getStreamFps();const t=e>0?1e3/e:0;A=parseInt(t*y+t*c,10)}let b=0;this.videoTimestamp>0&&(b=this._stats.dts-this.videoTimestamp);const _=b+this._stats.netBuf;this.isOldHls()&&(this._stats.fps=this.hlsDecoder.getFps()),this._stats.fps>this._stats.maxFps&&(this._stats.maxFps=this._stats.fps);let v=this.getVideoCurrentTime();const w=this._stats.videoCurrentTime;let S=-1;w&&v&&(S=(v-w).toFixed(2),v=v.toFixed(2));let T=0;this.audioTimestamp>0&&(T=this.audioTimestamp-this.getRenderCurrentPts()),this._allStatsData=Object.assign(this._stats,{audioBuffer:m,audioBufferDelayTs:g,audioTs:this.audioTimestamp,latestAudioTs:this.latestAudioTimestamp,playbackVideoBuffer:y,playbackVideoWaitingBuffer:0,playbackAudioWaitingBuffer:0,playbackCacheDataDuration:A,demuxBuffer:c,pushLatestDelay:f,audioDemuxBuffer:u,streamBuffer:h,mseDelay:i,mseStore:s,mseDecodeDiffTimes:r,mseDecodePlaybackRate:a,msePendingBuffer:o,wcsDecodeDiffTimes:r,hlsDelay:i,hlsDemuxLength:n,hlsDemuxAudioLength:l,hlsDemuxVideoLength:d,delayTs:b,totalDelayTs:_,isStreamTsMoreThanLocal:p,videoCurrentTime:v,videoCurrentTimeDiff:S,audioSyncVideo:T});let E=null,C=null,x="";if(this.isPlayer()&&this._opt.hasVideo&&this.playing){E=function(e,t){let i=3;const s=t||25;return e<.33*s?i=0:e<.5*s?i=1:e<.83*s&&(i=2),i}(this._stats.fps,this._flvMetaDataFps),this._allStatsData.performance=E;const e=this.checkVideoSmooth(this._allStatsData);x=e.reason,C=e.result,this._allStatsData.videoSmooth=C}this.emit(lt.stats,this._allStatsData),this._allStatsData.streamBuffer>this._opt.flvDemuxBufferSizeMaxLarge&&this.getDemuxType()===k&&this.emit(ut.flvDemuxBufferSizeTooLarge,this._allStatsData.streamBuffer),this._opt.hasVideo?(this.updateHistoryFpsList(this._stats.fps,this._stats.videoCurrentTimeDiff),Oa(E)&&this.emit(lt.performance,E),Oa(C)&&this.emit(lt.videoSmooth,C,x)):this._opt.hasAudio&&this.updateHistoryFpsList(this._stats.abps,0),this._stats.fps=0,this._stats.dfps=0,this._stats.abps=0,this._stats.vbps=0,this._stats.isDropping=!1,this._startBpsTime=t}resetStats(){this._startBpsTime=null,this._playingStartTimestamp=null,this._historyFpsList=[],this._historyVideoDiffList=[],this._stats={buf:0,netBuf:0,fps:0,maxFps:0,dfps:0,abps:0,vbps:0,ts:0,mseTs:0,currentPts:0,pTs:0,dts:0,mseVideoBufferDelayTime:0,isDropping:!1},this._allStatsData={}}checkVideoSmooth(e){let t=!0,i="";if(this._opt.videoBuffer,this._opt.videoBufferDelay,this.isWebrtcH264()||this.isOldHls())return{result:t,reason:i};if(0===e.vbps&&Ao(this._opt.isHls)&&(i="vbpsIsZero",this.debug.log(this.TAG_NAME,`checkVideoSmooth false because ${i}`),t=!1),t&&e.isDropping&&(i="isDroppingIsTrue",this.debug.log(this.TAG_NAME,`checkVideoSmooth false because ${i}`),t=!1),t&&this.visibility&&this._historyFpsList.length>=this._opt.heartTimeout){const s=function(e){const t=Math.max(...e),i=Math.min(...e);return e.filter((e=>e!==t&&e!==i))}(this._historyFpsList),r=s.reduce(((e,t)=>e+t),0)/s.length,a=.83*r;e.fps<a&&(i="fpsIsLow",this.debug.log(this.TAG_NAME,`checkVideoSmooth false because fps is ${e.fps} < min fix is ${a} and avgFps is ${r}`),t=!1)}return t&&this.visibility&&this._opt.useMSE&&(e.videoCurrentTimeDiff>=1.5||e.videoCurrentTimeDiff<=.5)&&-1!==e.videoCurrentTimeDiff&&(i="videoCurrentTimeDiffIsNotNormal",this.debug.log(this.TAG_NAME,`checkVideoSmooth false because videoCurrentTimeDiff is ${e.videoCurrentTimeDiff}`),t=!1),{result:t,reason:i}}enableWakeLock(){this._opt.keepScreenOn&&this.keepScreenOn&&this.keepScreenOn.enable()}releaseWakeLock(){this._opt.keepScreenOn&&this.keepScreenOn&&this.keepScreenOn.disable()}clearBufferDelay(){this._opt.useWasm?this.decoderWorker&&this.decoderWorker.clearWorkBuffer(!0):this.demux&&this.demux.clearBuffer(!0)}doDestroy(){this.emit(lt.beforeDestroy)}handlePlayToRenderTimes(){if(this.isDestroyedOrClosed())return void this.debug.log(this.TAG_NAME,"handlePlayToRenderTimes but player is closed or destroyed");const e=this.getPlayToRenderTimes();this.emit(lt.playToRenderTimes,e)}getPlayToRenderTimes(){const e=this._times;return e.playTimestamp=e.playStart-e.playInitStart,e.streamTimestamp=e.streamStart-e.playStart,e.streamResponseTimestamp=e.streamResponse-e.streamStart>0?e.streamResponse-e.streamStart:0,e.demuxTimestamp=e.demuxStart-e.streamResponse>0?e.demuxStart-e.streamResponse:0,e.decodeTimestamp=e.decodeStart-e.demuxStart>0?e.decodeStart-e.demuxStart:0,e.videoTimestamp=e.videoStart-e.decodeStart,e.allTimestamp=e.videoStart-e.playInitStart,e}getOption(){return this._opt}getPlayType(){return this._opt.playType}isPlayer(){return this._opt.playType===_}isPlayback(){return this._opt.playType===w}isDemuxSetCodecInit(){let e=!0,t=this._opt;return t.useWCS&&!t.useOffscreen?e=!!this.webcodecsDecoder&&this.webcodecsDecoder.hasInit:t.useMSE&&(e=!!this.mseDecoder&&this.mseDecoder.hasInit),e}isDemuxDecodeFirstIIframeInit(){let e=!0,t=this._opt;return t.useWCS&&!t.useOffscreen?e=!!this.webcodecsDecoder&&this.webcodecsDecoder.isDecodeFirstIIframe:t.useMSE&&(e=!!this.mseDecoder&&this.mseDecoder.isDecodeFirstIIframe),e}isAudioPlaybackRateSpeed(){let e=!1;return this.audio&&(e=this.audio.isPlaybackRateSpeed()),e}getPlayingTimestamp(){return this._stats.pTs}getRecordingType(){let e=null;return this.recorder&&(e=this.recorder.getType()),e}getRecordingByteLength(){let e=0;return this.recording&&(e=this.recorder.getToTalByteLength()),e}getRecordingDuration(){let e=0;return this.recording&&(e=this.recorder.getTotalDuration()),e}getDecodeType(){let e="";const t=this.getOption();return this.isWebrtcH264()?$:this.isAliyunRtc()?V:this.isOldHls()?H:(t.useMSE&&(e+=F+" ",t.mseDecoderUseWorker&&(e+="worker")),t.useWCS&&(e+=O+" "),t.useWasm&&(e+=j+" ",t.useSIMD&&(e+=G+" "),t.useMThreading&&(e+=z+" ")),t.useOffscreen&&(e+=N+" "),e)}getDemuxType(){return this._opt.demuxType}getRenderType(){let e="";return this.video&&(e=this.video.getType()),e}getCanvasRenderType(){let e="";return this.video&&(e=this.video.getCanvasType()),e}getAudioEngineType(){let e="";return this.audio&&(e=this.audio.getEngineType()),e}getStreamType(){let e="";return this.stream&&(e=this.stream.getStreamType()),e}getAllStatsData(){return this._allStatsData}isFlvDemux(){return this._opt.demuxType===k}isM7SDemux(){return this._opt.demuxType===C}isNakedFlowDemux(){return this._opt.demuxType===L}isMpeg4Demux(){return this._opt.demuxType===P}isTsDemux(){return this._opt.demuxType===M}isFmp4Demux(){return this._opt.demuxType===I}togglePerformancePanel(e){this.updateOption({showPerformance:e}),this.emit(lt.togglePerformancePanel,e)}setScaleMode(e){let t={isFullResize:!1,isResize:!1,aspectRatio:"default"};switch(e=Number(e)){case Xt:t.isFullResize=!1,t.isResize=!1;break;case Zt:t.isFullResize=!1,t.isResize=!0;break;case ei:t.isFullResize=!0,t.isResize=!0}this.updateOption(t),this.resize(),this.emit(lt.viewResizeChange,e)}startVisibilityHiddenTimeout(){this.clearVisibilityHiddenTimeout(),this._opt.pageVisibilityHiddenTimeout>0&&(this.visibilityHiddenTimeout=setTimeout((()=>{this.emit(lt.visibilityHiddenTimeout)}),1e3*this._opt.pageVisibilityHiddenTimeout))}clearVisibilityHiddenTimeout(){this._checkVisibleHiddenTimeout&&(clearTimeout(this._checkVisibleHiddenTimeout),this._checkVisibleHiddenTimeout=null)}faceDetect(e){this.faceDetectActive=e,Ao(e)&&this.video&&this.video.addAiContentToCanvas([])}objectDetect(e){this.objectDetectActive=e,Ao(e)&&this.video&&this.video.addAiContentToCanvas([])}occlusionDetect(e){this.occlusionDetectActive=e}downloadNakedFlowFile(){this.demux&&this.demux.downloadNakedFlowFile&&this.demux.downloadNakedFlowFile()}downloadFmp4File(){this.demux&&this.demux.downloadFmp4File&&this.demux.downloadFmp4File()}downloadMpeg4File(){const e=new Blob([this._tempStreamList]);try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=Date.now()+".mpeg4",t.click(),window.URL.revokeObjectURL(t.href)}catch(e){console.error("downloadMpeg4File",e)}}hasCacheOnGopBuffer(){const e=this.videoIframeIntervalTs,t=this._allStatsData.demuxBuffer,i=this._allStatsData.maxFps;let s=!1;if(e&&t&&i){s=1e3/i*t>e}return s}addContentToCanvas(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.video&&this.video.addContentToCanvas(e)}addContentToContainer(){}sendWebsocketMessage(e){const t=this.getStreamType();t===m||t===A+" "+m?this.stream.sendMessage(e):this.debug.warn(this.TAG_NAME,`sendWebsocketMessage: stream type is not websocket, current stream type is ${this.getStreamType()}`)}checkIsInRender(){const e=this._stats;return e.vbps>0&&e.fps>0}setControlHtml(e){this.control&&this.control.$controlHtml&&(this.control.$controlHtml.innerHTML=e)}clearControlHtml(){this.control&&this.control.$controlHtml&&(this.control.$controlHtml.innerHTML="")}updateWatermark(e){this.singleWatermark&&this.singleWatermark.update(e)}removeWatermark(){this.singleWatermark&&this.singleWatermark.remove()}getVideoInfo(){let e=null;return this.video&&(e=this.video.getVideoInfo()),e}getAudioInfo(){let e=null;return this.audio&&(e=this.audio.getAudioInfo()),e}getVideoPlaybackQuality(){let e=null;return this.video&&(e=this.video.getPlaybackQuality()),e}emitError(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.emit(lt.error,e,t),this.emit(e,t)}updateHistoryFpsList(e,t){this.playbackPause||(this._historyFpsList.length>this._opt.heartTimeout&&(this._historyFpsList.shift(),this._historyVideoDiffList.shift()),this._historyFpsList.push(e),this._historyVideoDiffList.push(t),this.isHistoryFpsListAllZero()&&this.checkHeartTimeout$2())}isHistoryFpsListAllZero(){let e=!0;if(this._historyFpsList.length<this._opt.heartTimeout&&(e=!1),e)for(let t=0;t<this._historyFpsList.length;t++)if(this._historyFpsList[t]>0){e=!1;break}if(e)for(let t=0;t<this._historyVideoDiffList.length;t++)if(this._historyVideoDiffList[t]>0){e=!1;break}return e}isUseHls265(){return yo(this._opt.isHls)&&yo(this._opt.supportHls265)}isHls(){return yo(this._opt.isHls)}isOldHls(){return yo(this._opt.isHls)&&Ao(this._opt.supportHls265)}isWebrtcNotH265(){return yo(this._opt.isWebrtc)&&Ao(this._opt.isWebrtcH265)}isWebrtcH264(){return yo(this._opt.isWebrtc)&&Ao(this._opt.isWebrtcH265)}isWebrtcH265(){return yo(this._opt.isWebrtc)&&yo(this._opt.isWebrtcH265)}isAliyunRtc(){return yo(this._opt.isAliyunRtc)}isUseHls265UseMse(){return this.isUseHls265()&&this.isUseMSE()}isStreamWebTransport(){return this.getStreamType()===y}isPlaybackCacheBeforeDecodeForFpsRender(){return this.isPlayback()&&yo(this._opt.playbackConfig.isCacheBeforeDecodeForFpsRender)&&yo(this._opt.useWCS)}isPlaybackUseWCS(){return this.isPlayback()&&yo(this._opt.useWCS)}isPlaybackUseMSE(){return this.isPlayback()&&yo(this._opt.useMSE)}isPlayUseMSE(){return this.isPlayer()&&yo(this._opt.useMSE)}isInWebFullscreen(){return this._opt.useWebFullScreen&&ya()&&this.fullscreen}getPlaybackRate(){let e=1;return yo(this.isPlayback())&&this.playback&&(e=this.playback.rate),e}isPlaybackOnlyDecodeIFrame(){return yo(this.isPlayback())&&this.getPlaybackRate()>=this._opt.playbackForwardMaxRateDecodeIFrame}pushTempStream(e){const t=new Uint8Array(e);this._tempStreamList.push(t)}updateLoadingText(e){this.loading&&this.control&&this.control.updateLoadingText(e)}getVideoCurrentTime(){let e=0;return this.video&&(this._opt.useMSE?this.mseDecoder?e=this.mseDecoder.getVideoCurrentTime():this.isMseDecoderUseWorker()&&(e=this.video.getVideoCurrentTime()):this.isWebrtcH264()&&this.webrtc?e=this.webrtc.getVideoCurrentTime():this.isAliyunRtc()&&this.aliyunRtcDecoder&&(e=this.aliyunRtcDecoder.getVideoCurrentTime())),e}addMemoryLog(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];this.emit(lt.memoryLog,` [${e}] `,...i)}downloadMemoryLog(){this.emit(lt.downloadMemoryLog)}isInMulti(){return-1!==this._opt.multiIndex}isWebrtcForM7S(){return Ao(this._opt.isWebrtcForZLM)&&Ao(this._opt.isWebrtcForSRS)&&Ao(this._opt.isWebrtcForOthers)}updateMetaData(e){if(this.debug.log(this.TAG_NAME,"updateMetaData",JSON.stringify(e)),this._flvMetaData=e,this._flvMetaData){const e=this._flvMetaData;if(Da(e.framerate)){const t=Math.floor(1e3*e.framerate);if(t>0){const e=t/1e3;this._flvMetaDataFps=e}}Fa(e.hasAudio)&&Ao(e.hasAudio)&&(this.debug.log("updateMetaData","hasAudio",e.hasAudio,"and update _opt.hasAudio"),this._opt.hasAudio=e.hasAudio),Fa(e.hasVideo)&&Ao(e.hasVideo)&&(this.debug.log("updateMetaData","hasVideo",e.hasVideo,"and update _opt.hasVideo"),this._opt.hasVideo=e.hasVideo)}this.emit(lt.flvMetaData,e)}getMetaData(){return this._flvMetaData}getExtendBtnList(){return this.control.getExtendBtnList().map((e=>({name:e.name,$container:e.$iconContainer,$btn:e.$iconWrap,$activeBtn:e.$activeIconWrap})))}getCpuLevel(){let e=null;return this.pressureObserverCpu&&(e=this.pressureObserverCpu.getCurrentCpuState()),e}isRecordTypeFlv(){return this.recorder&&this._opt.recordType===E}isRecordTypeMp4(){return this.recorder&&this._opt.recordType===S}isRecordTypeWebm(){return this.recorder&&this._opt.recordType===T}isDemuxInWorker(){return this._opt.useWasm||this._opt.demuxUseWorker}isUseMSE(){return yo(this._opt.useMSE)}isUseWCS(){return yo(this._opt.useWCS)}isUseWASM(){return yo(this._opt.useWasm)}isMseDecoderUseWorker(){return this.isUseMSE()&&yo(this._opt.mseDecoderUseWorker)}getAudioSyncVideoDiff(){return this.audioTimestamp-this.getRenderCurrentPts()}getMseVideoBufferDelayTime(){let e=0;return this._opt.useMSE&&this.mseDecoder&&(this.mseDecoder?e=this.mseDecoder.getVideoBufferDelayTime():this.isMseDecoderUseWorker()&&(e=this.video.getVideoBufferDelayTime()),e=parseInt(1e3*e,10)),e}updateCurrentPts(e){this.updateStats({currentPts:e}),this.emit(lt.currentPts,e)}getRenderCurrentPts(){let e=0;return e=this._stats.currentPts?this._stats.currentPts:this.videoTimestamp-this.getMseVideoBufferDelayTime(),e}openSyncAudioAndVideo(){return this._opt.syncAudioAndVideo&&this._opt.hasVideo}showTipsMessageByCode(e){if(this.control){const t=this._opt.showMessageConfig[e]||"未知异常";this.control.showTipsMessage(t,e)}}showTipsMessageByContent(e){this.control&&e&&this.control.showTipsMessage(e)}hideTipsMessage(){this.control&&this.control.hideTipsMessage()}decoderCheckFirstIFrame(){yo(this._opt.checkFirstIFrame)&&(this.mseDecoder?this.mseDecoder.isDecodeFirstIIframe=!1:this.webcodecsDecoder&&(this.webcodecsDecoder.isDecodeFirstIIframe=!1))}isHlsCanVideoPlay(){return this._canPlayAppleMpegurl&&this.isOldHls()}setPtzPosition(e){this.control&&this.control.updatePtzPosition(e)}setPlayFailedAndPaused(){this.isPlayFailedAndPaused=!0}getMseMineType(){let e={};return this.mseDecoder&&(e=this.mseDecoder.getMimeType()),e}getMaxDelayTs(){return this._opt.videoBuffer+this._opt.videoBufferDelay}isMseVideoStateInited(){return!this.video||this.video.getReadyStateInited()}}class s_{constructor(e){const{fromSampleRate:t,toSampleRate:i,channels:s,inputBufferSize:r}=e;if(!t||!i||!s)throw new Error("Invalid settings specified for the resampler.");this.resampler=null,this.fromSampleRate=t,this.toSampleRate=i,this.channels=s||0,this.inputBufferSize=r,this.initialize()}initialize(){this.fromSampleRate==this.toSampleRate?(this.resampler=e=>e,this.ratioWeight=1):(this.fromSampleRate<this.toSampleRate?(this.linearInterpolation(),this.lastWeight=1):(this.multiTap(),this.tailExists=!1,this.lastWeight=0),this.initializeBuffers(),this.ratioWeight=this.fromSampleRate/this.toSampleRate)}bufferSlice(e){try{return this.outputBuffer.subarray(0,e)}catch(t){try{return this.outputBuffer.length=e,this.outputBuffer}catch(t){return this.outputBuffer.slice(0,e)}}}initializeBuffers(){this.outputBufferSize=Math.ceil(this.inputBufferSize*this.toSampleRate/this.fromSampleRate/this.channels*1.0000004768371582)+this.channels+this.channels;try{this.outputBuffer=new Float32Array(this.outputBufferSize),this.lastOutput=new Float32Array(this.channels)}catch(e){this.outputBuffer=[],this.lastOutput=[]}}linearInterpolation(){this.resampler=e=>{let t,i,s,r,a,o,n,l,d,h=e.length,c=this.channels;if(h%c!=0)throw new Error("Buffer was of incorrect sample length.");if(h<=0)return[];for(t=this.outputBufferSize,i=this.ratioWeight,s=this.lastWeight,r=0,a=0,o=0,n=0,l=this.outputBuffer;s<1;s+=i)for(a=s%1,r=1-a,this.lastWeight=s%1,d=0;d<this.channels;++d)l[n++]=this.lastOutput[d]*r+e[d]*a;for(s-=1,h-=c,o=Math.floor(s)*c;n<t&&o<h;){for(a=s%1,r=1-a,d=0;d<this.channels;++d)l[n++]=e[o+(d>0?d:0)]*r+e[o+(c+d)]*a;s+=i,o=Math.floor(s)*c}for(d=0;d<c;++d)this.lastOutput[d]=e[o++];return this.bufferSlice(n)}}multiTap(){this.resampler=e=>{let t,i,s,r,a,o,n,l,d,h,c,u=e.length,p=this.channels;if(u%p!=0)throw new Error("Buffer was of incorrect sample length.");if(u<=0)return[];for(t=this.outputBufferSize,i=[],s=this.ratioWeight,r=0,o=0,n=0,l=!this.tailExists,this.tailExists=!1,d=this.outputBuffer,h=0,c=0,a=0;a<p;++a)i[a]=0;do{if(l)for(r=s,a=0;a<p;++a)i[a]=0;else{for(r=this.lastWeight,a=0;a<p;++a)i[a]=this.lastOutput[a];l=!0}for(;r>0&&o<u;){if(n=1+o-c,!(r>=n)){for(a=0;a<p;++a)i[a]+=e[o+(a>0?a:0)]*r;c+=r,r=0;break}for(a=0;a<p;++a)i[a]+=e[o++]*n;c=o,r-=n}if(0!==r){for(this.lastWeight=r,a=0;a<p;++a)this.lastOutput[a]=i[a];this.tailExists=!0;break}for(a=0;a<p;++a)d[h++]=i[a]/s}while(o<u&&h<t);return this.bufferSlice(h)}}resample(e){return this.fromSampleRate==this.toSampleRate?this.ratioWeight=1:(this.fromSampleRate<this.toSampleRate?this.lastWeight=1:(this.tailExists=!1,this.lastWeight=0),this.initializeBuffers(),this.ratioWeight=this.fromSampleRate/this.toSampleRate),this.resampler(e)}}const r_=[255,511,1023,2047,4095,8191,16383,32767];function a_(e,t,i){for(let s=0;s<i;s++)if(e<=t[s])return s;return i}function o_(e){const t=[];return Array.prototype.slice.call(e).forEach(((e,i)=>{t[i]=function(e){let t,i,s;return e>=0?t=213:(t=85,(e=-e-1)<0&&(e=32767)),i=a_(e,r_,8),i>=8?127^t:(s=i<<4,s|=i<2?e>>4&15:e>>i+3&15,s^t)}(e)})),t}function n_(e){const t=[];return Array.prototype.slice.call(e).forEach(((e,i)=>{t[i]=function(e){let t=0;e<0?(e=132-e,t=127):(e+=132,t=255);let i=a_(e,r_,8);return i>=8?127^t:(i<<4|e>>i+3&15)^t}(e)})),t}class l_ extends a{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),this._opt={},e&&(this.player=e),this.TAG_NAME="talk";const i=po(Ms);this._opt=Object.assign({},i,t),this._opt.sampleRate=parseInt(this._opt.sampleRate,10),this._opt.sampleBitsWidth=parseInt(this._opt.sampleBitsWidth,10),this.audioContext=null,this.gainNode=null,this.recorder=null,this.workletRecorder=null,this.biquadFilter=null,this.userMediaStream=null,this.clearWorkletUrlTimeout=null,this.bufferSize=512,this._opt.audioBufferLength=this.calcAudioBufferLength(),this.audioBufferList=[],this.socket=null,this.socketStatus=pt,this.mediaStreamSource=null,this.heartInterval=null,this.checkGetUserMediaTimeout=null,this.wsUrl=null,this.startTimestamp=0,this.sequenceId=0,this.tempTimestamp=null,this.tempG711BufferList=[],this.tempRtpBufferList=[],this.tempPcmBufferList=[],this.events=new xo(this),this._initTalk(),this.player||(this.debug=new Fr(this)),this._opt.encType!==Hi&&this._opt.encType!==Vi||8e3===this._opt.sampleRate&&16===this._opt.sampleBitsWidth||this.warn(this.TAG_NAME,`\n encType is ${this._opt.encType} and sampleBitsWidth is ${this._opt.sampleBitsWidth}, set sampleBitsWidth to ${this._opt.sampleBitsWidth}。\n ${this._opt.encType} only support sampleRate 8000 and sampleBitsWidth 16`),this.log(this.TAG_NAME,"init",JSON.stringify(this._opt))}destroy(){this.clearWorkletUrlTimeout&&(clearTimeout(this.clearWorkletUrlTimeout),this.clearWorkletUrlTimeout=null),this.userMediaStream&&(this.userMediaStream.getTracks&&this.userMediaStream.getTracks().forEach((e=>{e.stop()})),this.userMediaStream=null),this.mediaStreamSource&&(this.mediaStreamSource.disconnect(),this.mediaStreamSource=null),this.recorder&&(this.recorder.disconnect(),this.recorder.onaudioprocess=null,this.recorder=null),this.biquadFilter&&(this.biquadFilter.disconnect(),this.biquadFilter=null),this.gainNode&&(this.gainNode.disconnect(),this.gainNode=null),this.workletRecorder&&(this.workletRecorder.disconnect(),this.workletRecorder=null),this.socket&&(this.socketStatus===ft&&this._sendClose(),this.socket.close(),this.socket=null),this._stopHeartInterval(),this._stopCheckGetUserMediaTimeout(),this.audioContext=null,this.gainNode=null,this.recorder=null,this.audioBufferList=[],this.sequenceId=0,this.wsUrl=null,this.tempTimestamp=null,this.tempRtpBufferList=[],this.tempG711BufferList=[],this.tempPcmBufferList=[],this.startTimestamp=0,this.log(this.TAG_NAME,"destroy")}addRtpToBuffer(e){const t=e.length+this.tempRtpBufferList.length,i=new Uint8Array(t);i.set(this.tempRtpBufferList,0),i.set(e,this.tempRtpBufferList.length),this.tempRtpBufferList=i}addG711ToBuffer(e){const t=e.length+this.tempG711BufferList.length,i=new Uint8Array(t);i.set(this.tempG711BufferList,0),i.set(e,this.tempG711BufferList.length),this.tempG711BufferList=i}addPcmToBuffer(e){const t=e.length+this.tempPcmBufferList.length,i=new Uint8Array(t);i.set(this.tempPcmBufferList,0),i.set(e,this.tempPcmBufferList.length),this.tempG711ButempPcmBufferListfferList=i}downloadRtpFile(){this.debug.log(this.TAG_NAME,"downloadRtpFile");const e=new Blob([this.tempRtpBufferList]);try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=Date.now()+".rtp",t.click(),window.URL.revokeObjectURL(t.href)}catch(e){console.error("downloadRtpFile",e)}}downloadG711File(){this.debug.log(this.TAG_NAME,"downloadG711File");const e=new Blob([this.tempG711BufferList]);try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=Date.now()+"."+this._opt.encType,t.click(),window.URL.revokeObjectURL(t.href)}catch(e){console.error("downloadG711File",e)}}downloadPcmFile(){this.debug.log(this.TAG_NAME,"downloadPcmFile");const e=new Blob([this.tempPcmBufferList]);try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=Date.now()+"."+this._opt.encType,t.click(),window.URL.revokeObjectURL(t.href)}catch(e){console.error("downloadRtpFile",e)}}downloadFile(){this._opt.packetType===Cs?this.downloadRtpFile():this._opt.encType===Hi||this._opt.encType===Vi?this.downloadG711File():this.downloadPcmFile()}calcAudioBufferLength(){const{sampleRate:e,sampleBitsWidth:t}=this._opt;return 8*e*.02/8}get socketStatusOpen(){return this.socketStatus===ft}log(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this._log("log",...t)}warn(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this._log("warn",...t)}error(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this._log("error",...t)}_log(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];this.player?this.player.debug[e](...i):this.debug?this.debug[e](...i):console[e](...i)}_getSequenceId(){return++this.sequenceId}_createWebSocket(){return new Promise(((e,t)=>{const i=this.events.proxy;this.socket=new WebSocket(this.wsUrl),this.socket.binaryType="arraybuffer",this.emit(lt.talkStreamStart),i(this.socket,Rs,(()=>{this.socketStatus=ft,this.log(this.TAG_NAME,"websocket open -> do talk"),this.emit(lt.talkStreamOpen),e(),this._doTalk()})),i(this.socket,Is,(e=>{this.log(this.TAG_NAME,"websocket message",e.data)})),i(this.socket,Ds,(e=>{this.socketStatus=mt,this.warn(this.TAG_NAME,"websocket close -> reject",e),this.emit(lt.talkStreamClose),t(e)})),i(this.socket,Ls,(e=>{this.socketStatus=gt,this.error(this.TAG_NAME,"websocket error -> reject",e),this.emit(lt.talkStreamError,e),t(e)}))}))}_sendClose(){}_initTalk(){this._initMethods(),this._opt.engine===Ps?this._initWorklet():this._opt.engine===Bs&&this._initScriptProcessor(),this.log(this.TAG_NAME,"audioContext samplerate",this.audioContext.sampleRate)}_initMethods(){this.audioContext=new(window.AudioContext||window.webkitAudioContext)({sampleRate:48e3}),this.gainNode=this.audioContext.createGain(),this.gainNode.gain.value=1,this.biquadFilter=this.audioContext.createBiquadFilter(),this.biquadFilter.type="lowpass",this.biquadFilter.frequency.value=3e3,this.resampler=new s_({fromSampleRate:this.audioContext.sampleRate,toSampleRate:this._opt.sampleRate,channels:this._opt.numberChannels,inputBufferSize:this.bufferSize})}_initScriptProcessor(){const e=this.audioContext.createScriptProcessor||this.audioContext.createJavaScriptNode;this.recorder=e.apply(this.audioContext,[this.bufferSize,this._opt.numberChannels,this._opt.numberChannels]),this.recorder.onaudioprocess=e=>this._onaudioprocess(e)}_initWorklet(){const e=ao((function(){class e extends AudioWorkletProcessor{constructor(e){super(),this._cursor=0,this._bufferSize=e.processorOptions.bufferSize,this._buffer=new Float32Array(this._bufferSize)}process(e,t,i){if(!e.length||!e[0].length)return!0;for(let t=0;t<e[0][0].length;t++)this._cursor+=1,this._cursor===this._bufferSize&&(this._cursor=0,this.port.postMessage({eventType:"data",buffer:this._buffer})),this._buffer[this._cursor]=e[0][0][t];return!0}}registerProcessor("talk-processor",e)}));this.audioContext.audioWorklet&&this.audioContext.audioWorklet.addModule(e).then((()=>{const e=new AudioWorkletNode(this.audioContext,"talk-processor",{processorOptions:{bufferSize:this.bufferSize}});e.connect(this.gainNode),e.port.onmessage=e=>{"data"===e.data.eventType&&this._encodeAudioData(e.data.buffer)},this.workletRecorder=e})),this.clearWorkletUrlTimeout=setTimeout((()=>{URL.revokeObjectURL(e),this.clearWorkletUrlTimeout=null}),ie)}_onaudioprocess(e){const t=e.inputBuffer.getChannelData(0);this._encodeAudioData(new Float32Array(t))}_encodeAudioData(e){if(0===e[0]&&0===e[1])return void this.log(this.TAG_NAME,"empty audio data");const t=this.resampler.resample(e);let i=t;if(16===this._opt.sampleBitsWidth?i=function(e){let t=e.length,i=new Int16Array(t);for(;t--;){let s=Math.max(-1,Math.min(1,e[t]));i[t]=s<0?32768*s:32767*s}return i}(t):8===this._opt.sampleBitsWidth&&(i=function(e){let t=e.length,i=new Int8Array(t);for(;t--;){let s=Math.max(-1,Math.min(1,e[t]));const r=s<0?32768*s:32767*s;i[t]=parseInt(255/(65535/(32768+r)),10)}return i}(t)),null!==i.buffer){let e=null;this._opt.encType===Hi?e=o_(i):this._opt.encType===Vi?e=n_(i):this._opt.encType===Wi&&(e=i);const t=new Uint8Array(e);for(let e=0;e<t.length;e++){let i=this.audioBufferList.length;this.audioBufferList[i++]=t[e],this.audioBufferList.length===this._opt.audioBufferLength&&(this._sendTalkMsg(new Uint8Array(this.audioBufferList)),this.audioBufferList=[])}}}_parseAudioMsg(e){let t=null;return this._opt.packetType!==Cs||this._opt.encType!==Hi&&this._opt.encType!==Vi?this._opt.packetType===ks&&(t=e):t=this.rtpPacket(e),t}rtpPacket(e){const t=[];let i=0,s=0,r=0;const a=this._opt.rtpSsrc,o=e.length;this._opt.encType===Hi?i=Ss:this._opt.encType===Vi?i=Ts:this._opt.encType===Ji&&(i=Es),this.startTimestamp||(this.startTimestamp=ha()),r=ha()-this.startTimestamp,s=this._getSequenceId();let n=0;if(this._opt.packetTcpSendType===xs){const e=o+12;t[n++]=255&e>>8,t[n++]=255&e>>0}t[n++]=128,t[n++]=128+i,t[n++]=s/256,t[n++]=s%256,t[n++]=r/65536/256,t[n++]=r/65536%256,t[n++]=r%65536/256,t[n++]=r%65536%256,t[n++]=a/65536/256,t[n++]=a/65536%256,t[n++]=a%65536/256,t[n++]=a%65536%256;let l=t.concat([...e]),d=new Uint8Array(l.length);for(let e=0;e<l.length;e++)d[e]=l[e];return d}opusPacket(e){return e}_sendTalkMsg(e){null===this.tempTimestamp&&(this.tempTimestamp=ha());const t=ha(),i=t-this.tempTimestamp,s=this._parseAudioMsg(e);this.log(this.TAG_NAME,`send talk msg and diff is ${i} and byteLength is ${s.byteLength} and length is ${s.length}, and ${this._opt.encType} length is ${e.length}`),yo(this._opt.saveToTempFile)&&yo(this._opt.debug)&&(this._opt.packetType===Cs?this.addRtpToBuffer(s):this._opt.encType===Hi||this._opt.encType===Vi?this.addG711ToBuffer(s):this.addPcmToBuffer(s)),s&&(this.socketStatusOpen?this.socket.send(s.buffer):this.emit(ut.tallWebsocketClosedByError)),this.tempTimestamp=t}_doTalk(){this._getUserMedia()}_getUserMedia(){this.log(this.TAG_NAME,"getUserMedia"),void 0===window.navigator.mediaDevices&&(window.navigator.mediaDevices={}),void 0===window.navigator.mediaDevices.getUserMedia&&(this.log(this.TAG_NAME,"window.navigator.mediaDevices.getUserMedia is undefined and init function"),window.navigator.mediaDevices.getUserMedia=function(e){var t=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return t?new Promise((function(i,s){t.call(navigator,e,i,s)})):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}),this._opt.checkGetUserMediaTimeout&&this._startCheckGetUserMediaTimeout(),window.navigator.mediaDevices.getUserMedia({audio:this._opt.audioConstraints,video:!1}).then((e=>{this.log(this.TAG_NAME,"getUserMedia success"),this.userMediaStream=e,this.mediaStreamSource=this.audioContext.createMediaStreamSource(e),this.mediaStreamSource.connect(this.biquadFilter),this.recorder?(this.biquadFilter.connect(this.recorder),this.recorder.connect(this.gainNode)):this.workletRecorder&&(this.biquadFilter.connect(this.workletRecorder),this.workletRecorder.connect(this.gainNode)),this.gainNode.connect(this.audioContext.destination),this.emit(lt.talkGetUserMediaSuccess),null===e.oninactive&&(e.oninactive=e=>{this._handleStreamInactive(e)})})).catch((e=>{this.error(this.TAG_NAME,"getUserMedia error",e.toString()),this.emit(lt.talkGetUserMediaFail,e.toString())})).finally((()=>{this.log(this.TAG_NAME,"getUserMedia finally"),this._stopCheckGetUserMediaTimeout()}))}_getUserMedia2(){this.log(this.TAG_NAME,"getUserMedia"),navigator.mediaDevices?navigator.mediaDevices.getUserMedia({audio:!0}).then((e=>{this.log(this.TAG_NAME,"getUserMedia2 success")})):navigator.getUserMedia({audio:!0},this.log(this.TAG_NAME,"getUserMedia2 success"),this.log(this.TAG_NAME,"getUserMedia2 fail"))}async _getUserMedia3(){this.log(this.TAG_NAME,"getUserMedia3");try{const e=await navigator.mediaDevices.getUserMedia({audio:{latency:!0,noiseSuppression:!0,autoGainControl:!0,echoCancellation:!0,sampleRate:48e3,channelCount:1},video:!1});console.log("getUserMedia() got stream:",e),this.log(this.TAG_NAME,"getUserMedia3 success")}catch(e){this.log(this.TAG_NAME,"getUserMedia3 fail")}}_handleStreamInactive(e){this.userMediaStream&&(this.warn(this.TAG_NAME,"stream oninactive",e),this.emit(lt.talkStreamInactive))}_startCheckGetUserMediaTimeout(){this._stopCheckGetUserMediaTimeout(),this.checkGetUserMediaTimeout=setTimeout((()=>{this.log(this.TAG_NAME,"check getUserMedia timeout"),this.emit(lt.talkGetUserMediaTimeout)}),this._opt.getUserMediaTimeout)}_stopCheckGetUserMediaTimeout(){this.checkGetUserMediaTimeout&&(this.log(this.TAG_NAME,"stop checkGetUserMediaTimeout"),clearTimeout(this.checkGetUserMediaTimeout),this.checkGetUserMediaTimeout=null)}_startHeartInterval(){this.heartInterval=setInterval((()=>{this.log(this.TAG_NAME,"heart interval");let e=[35,36,0,0,0,0,0,0];e=new Uint8Array(e),this.socket.send(e.buffer)}),15e3)}_stopHeartInterval(){this.heartInterval&&(this.log(this.TAG_NAME,"stop heart interval"),clearInterval(this.heartInterval),this.heartInterval=null)}startTalk(e){return new Promise(((t,i)=>{if(!function(){let e=!1;const t=window.navigator;return t&&(e=!(!t.mediaDevices||!t.mediaDevices.getUserMedia),e||(e=!!(t.getUserMedia||t.webkitGetUserMedia||t.mozGetUserMedia||t.msGetUserMedia))),e}())return i("not support getUserMedia");if(this.wsUrl=e,this._opt.testMicrophone)this._doTalk();else{if(!this.wsUrl)return i("wsUrl is null");this._createWebSocket().catch((e=>{i(e)}))}this.once(lt.talkGetUserMediaFail,(()=>{i("getUserMedia fail")})),this.once(lt.talkGetUserMediaSuccess,(()=>{t()}))}))}setVolume(e){e=parseFloat(e).toFixed(2),isNaN(e)||(e=ca(e,0,1),this.gainNode.gain.value=e)}getOption(){return this._opt}get volume(){return this.gainNode?parseFloat(100*this.gainNode.gain.value).toFixed(0):null}}class d_{constructor(e){this.player=e,this.globalSetting=null;const t=Ca();this.defaultSettings={watermark_id:`JbPro_${t}`,watermark_prefix:`JbPro_mask_${t}`,watermark_txt:"JbPro 测试水印",watermark_x:0,watermark_y:0,watermark_rows:0,watermark_cols:0,watermark_x_space:0,watermark_y_space:0,watermark_font:"微软雅黑",watermark_color:"black",watermark_fontsize:"18px",watermark_alpha:.15,watermark_width:150,watermark_height:100,watermark_angle:15,watermark_parent_width:0,watermark_parent_height:0,watermark_parent_node:null},this.player.debug.log("Watermark","int")}destroy(){this._removeMark(),this.globalSetting=null,this.defaultSettings=null,this.player.debug.log("Watermark","destroy")}remove(){this._removeMark()}load(e){this.globalSetting=e,this._loadMark(e)}resize(){this.player.debug.log("Watermark","resize()"),this.globalSetting&&this._loadMark(this.globalSetting)}_loadMark(){let e=this.defaultSettings;if(1===arguments.length&&"object"==typeof arguments[0]){var t=arguments[0]||{};for(let i in t)t[i]&&e[i]&&t[i]===e[i]||(t[i]||0===t[i])&&(e[i]=t[i])}var i=document.getElementById(e.watermark_id);i&&i.parentNode&&i.parentNode.removeChild(i);var s="string"==typeof e.watermark_parent_node?document.getElementById(e.watermark_parent_node):e.watermark_parent_node,r=s||document.body;const a=r.getBoundingClientRect();var o=Math.max(r.scrollWidth,r.clientWidth,a.width),n=Math.max(r.scrollHeight,r.clientHeight,a.height),l=arguments[0]||{},d=r;(l.watermark_parent_width||l.watermark_parent_height)&&d&&(e.watermark_x=e.watermark_x+0,e.watermark_y=e.watermark_y+0);var h=document.getElementById(e.watermark_id),c=null;if(h)h.shadowRoot&&(c=h.shadowRoot);else{(h=document.createElement("div")).id=e.watermark_id,h.setAttribute("style","pointer-events: none !important; display: block !important"),c="function"==typeof h.attachShadow?h.attachShadow({mode:"open"}):h;var u=r.children,p=Math.floor(Math.random()*(u.length-1))+1;u[p]?r.insertBefore(h,u[p]):r.appendChild(h)}e.watermark_cols=parseInt((o-e.watermark_x)/(e.watermark_width+e.watermark_x_space));var f,m=parseInt((o-e.watermark_x-e.watermark_width*e.watermark_cols)/e.watermark_cols);e.watermark_x_space=m?e.watermark_x_space:m,e.watermark_rows=parseInt((n-e.watermark_y)/(e.watermark_height+e.watermark_y_space));var g,y,A,b=parseInt((n-e.watermark_y-e.watermark_height*e.watermark_rows)/e.watermark_rows);e.watermark_y_space=b?e.watermark_y_space:b,s?(f=e.watermark_x+e.watermark_width*e.watermark_cols+e.watermark_x_space*(e.watermark_cols-1),g=e.watermark_y+e.watermark_height*e.watermark_rows+e.watermark_y_space*(e.watermark_rows-1)):(f=0+e.watermark_x+e.watermark_width*e.watermark_cols+e.watermark_x_space*(e.watermark_cols-1),g=0+e.watermark_y+e.watermark_height*e.watermark_rows+e.watermark_y_space*(e.watermark_rows-1));for(var _=0;_<e.watermark_rows;_++){A=s?0+e.watermark_y+(n-g)/2+(e.watermark_y_space+e.watermark_height)*_:e.watermark_y+(n-g)/2+(e.watermark_y_space+e.watermark_height)*_;for(var v=0;v<e.watermark_cols;v++){y=s?0+e.watermark_x+(o-f)/2+(e.watermark_width+e.watermark_x_space)*v:e.watermark_x+(o-f)/2+(e.watermark_width+e.watermark_x_space)*v;var w=document.createElement("div"),S=document.createTextNode(e.watermark_txt);w.appendChild(S),w.id=e.watermark_prefix+_+v,w.style.webkitTransform="rotate("+e.watermark_angle+"deg)",w.style.MozTransform="rotate("+e.watermark_angle+"deg)",w.style.msTransform="rotate("+e.watermark_angle+"deg)",w.style.OTransform="rotate("+e.watermark_angle+"deg)",w.style.transform="rotate("+e.watermark_angle+"deg)",w.style.visibility="",w.style.position="absolute",w.style.left=y+"px",w.style.top=A+"px",w.style.overflow="hidden",w.style.zIndex="9999999",w.style.opacity=e.watermark_alpha,w.style.fontSize=e.watermark_fontsize,w.style.fontFamily=e.watermark_font,w.style.color=e.watermark_color,w.style.textAlign="center",w.style.width=e.watermark_width+"px",w.style.height=e.watermark_height+"px",w.style.display="block",w.style["-ms-user-select"]="none",c.appendChild(w)}}}_removeMark(){const e=this.defaultSettings;var t=document.getElementById(e.watermark_id);if(t){var i=t.parentNode;i&&i.removeChild(t)}}}class h_{constructor(e){this.player=e,this.globalSetting=null;const t=Ca();this.defaultSettings={watermark_id:`JbPro_${t}`,watermark_prefix:`JbPro_mask_${t}`,watermark_txt:"JbPro 测试水印",watermark_x:0,watermark_y:0,watermark_rows:0,watermark_cols:0,watermark_x_space:100,watermark_y_space:100,watermark_font:"微软雅黑",watermark_color:"black",watermark_fontsize:18,watermark_alpha:.15,watermark_width:150,watermark_height:100,watermark_angle:-15,watermark_parent_width:0,watermark_parent_height:0,watermark_parent_node:null},this.player.debug.log("Watermark","int")}destroy(){this._removeMark(),this.globalSetting=null,this.defaultSettings=null,this.player.debug.log("Watermark","destroy")}remove(){this._removeMark()}load(e){this.globalSetting=e,this._loadMark(e)}resize(){this.player.debug.log("Watermark","resize()"),this.globalSetting&&this._loadMark(this.globalSetting)}_loadMark(){let e=this.defaultSettings;if(1===arguments.length&&"object"==typeof arguments[0]){var t=arguments[0]||{};for(let i in t)t[i]&&e[i]&&t[i]===e[i]||(t[i]||0===t[i])&&(e[i]=t[i])}var i=document.getElementById(e.watermark_id);i&&i.parentNode&&i.parentNode.removeChild(i);var s="string"==typeof e.watermark_parent_node?document.getElementById(e.watermark_parent_node):e.watermark_parent_node,r=s||document.body;const a=r.getBoundingClientRect();var o=Math.max(r.scrollWidth,r.clientWidth,a.width),n=Math.max(r.scrollHeight,r.clientHeight,a.height),l=arguments[0]||{},d=r;(l.watermark_parent_width||l.watermark_parent_height)&&d&&(e.watermark_x=e.watermark_x+0,e.watermark_y=e.watermark_y+0);var h=document.getElementById(e.watermark_id),c=null;if(h)h.shadowRoot&&(c=h.shadowRoot);else{(h=document.createElement("div")).id=e.watermark_id,h.setAttribute("style","pointer-events: none !important; display: block !important"),c="function"==typeof h.attachShadow?h.attachShadow({mode:"open"}):h;var u=r.children,p=Math.floor(Math.random()*(u.length-1))+1;u[p]?r.insertBefore(h,u[p]):r.appendChild(h)}const f=this._calcTextSize(),m=this.defaultSettings,g=m.watermark_x_space+f.width,y=m.watermark_y_space+f.height,A=2*y,b=g/2,_=`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="none">\n <defs>\n <pattern id="pattern1" x="0" y="0" width="${g}" height="${A}" patternUnits="userSpaceOnUse" patternTransform="rotate(${m.watermark_angle})">\n <text x="0" y="${m.watermark_fontsize}" style="font-family:${m.watermark_font}; font-size:${m.watermark_fontsize}; fill:${m.watermark_color}; fill-opacity:${m.watermark_alpha}">${m.watermark_txt}</text>\n </pattern>\n <pattern id="pattern2" x="${b}" y="${y}" width="${g}" height="${A}" patternUnits="userSpaceOnUse" patternTransform="rotate(${m.watermark_angle})">\n <text x="0" y="${m.watermark_fontsize}" style="font-family:${m.watermark_font}; font-size:${m.watermark_fontsize}; fill:${m.watermark_color}; fill-opacity:${m.watermark_alpha}">${m.watermark_txt}</text>\n </pattern>\n </defs>\n <rect x="0" y="0" width="100%" height="100%" style="fill:url(#pattern1); fill-opacity:1;" />\n <rect x="0" y="0" width="100%" height="100%" style="fill:url(#pattern2); fill-opacity:1;" />\n </svg>`,v=window.btoa(unescape(encodeURIComponent(_)));var w=document.createElement("div");w.style.position="absolute",w.style.left="0px",w.style.top="0px",w.style.overflow="hidden",w.style.zIndex="9999999",w.style.width=o+"px",w.style.height=n+"px",w.style.display="block",w.style["-ms-user-select"]="none",w.style.backgroundImage=`url(data:image/svg+xml;base64,${v})`,c.appendChild(w)}_removeMark(){const e=this.defaultSettings;var t=document.getElementById(e.watermark_id);if(t){var i=t.parentNode;i&&i.removeChild(t)}}_calcTextSize(){const{watermark_txt:e,watermark_font:t,watermark_fontsize:i}=this.globalSetting,s=document.createElement("span");s.innerHTML=e,s.setAttribute("style",`font-family: ${t}; font-size: ${i}px; visibility: hidden; display: inline-block`),document.querySelector("body").appendChild(s);const r={width:s.offsetWidth,height:s.offsetHeight};return s.remove(),r}}const c_="right",u_="left",p_="up",f_="down",m_="leftUp",g_="leftDown",y_="rightUp",A_="rightDown",b_="zoomExpand",__="zoomNarrow",v_="apertureFar",w_="apertureNear",S_="focusFar",T_="focusNear",E_="setPos",k_="calPos",C_="delPos",x_="wiperOpen",R_="wiperClose",D_="cruiseStart",L_={stop:0,fiStop:0,right:1,left:2,up:8,down:4,leftUp:10,leftDown:6,rightUp:9,rightDown:5,zoomExpand:16,zoomNarrow:32,apertureFar:72,apertureNear:68,focusFar:66,focusNear:65,setPos:129,calPos:130,delPos:131,wiperOpen:140,wiperClose:141,setCruise:132,decCruise:133,cruiseStart:136,cruiseStop:0},I_=[25,50,75,100,125,150,175,200,225,250],P_=[1,2,3,4,5,6,7,8,9,16],B_=[16,48,80,112,144,160,176,192,208,224];function M_(e){const{type:t,speed:i=5,index:s=0}=e,r=function(e){return I_[(e=e||5)-1]||I_[4]}(i);let a,o,n,l;if(a=L_[t],!a)return"";switch(t){case p_:case f_:case v_:case w_:n=r;break;case c_:case u_:case S_:case T_:o=r;break;case m_:case g_:case y_:case A_:o=r,n=r;break;case b_:case __:l=function(e){return B_[(e=e||5)-1]||B_[4]}(i);break;case k_:case C_:case E_:n=U_(s);break;case R_:case x_:o=1;break;case D_:o=U_(s)}return function(e,t,i,s){let r=[];r[0]=165,r[1]=15,r[2]=1,r[3]=0,r[4]=0,r[5]=0,r[6]=0,e&&(r[3]=e);t&&(r[4]=t);i&&(r[5]=i);s&&(r[6]=s);return r[7]=(r[0]+r[1]+r[2]+r[3]+r[4]+r[5]+r[6])%256,function(e){let t="";for(let i=0;i<e.length;i++){let s=e[i].toString(16);1===s.length&&(s="0"+s),t+=s.toUpperCase()}return t}(r)}(a,o,n,l)}function U_(e){return P_[e-1]}const F_=["Boolean","Number","String","Undefined","Null","Date","Object"];function O_(e){if("object"!=typeof e)return e;const t=Object.prototype.toString.call(e).slice(8,-1);switch(t){case"Array":case"Uint8Array":case"ArrayBuffer":return t+"["+e.length+"]";case"Object":return"{}";default:return t}}function N_(e,t,i){i||(i=1),t||(t=2);const s={};if(!e||"object"!=typeof e)return e;const r=Object.prototype.toString.call(e).slice(8,-1);if(!F_.includes(r))return r;if(!(i>t)){for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i===t?s[r]=O_(e[r]):"object"==typeof e[r]?s[r]=N_(e[r],t,i+1):s[r]=e[r]);return s}}function j_(){return(new Date).toLocaleString()}class G_{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.player=e,this.TAG_NAME="MemoryLogger",this.logMaxSize=(null==t?void 0:t.logMaxSize)||204800,this.logSize=0,this.logTextArray=[],this.player.debug.log(this.TAG_NAME,"init")}destroy(){this.clear(),this.player.debug.log(this.TAG_NAME,"destroy")}clear(){this.logSize=0,this.logTextArray=[]}logCache(){let e="";try{for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];const r=i.map((e=>N_(e)));e="[JbPro] "+j_()+JSON.stringify(r)}catch(e){return}if(this.logSize+=e.length,this.logTextArray.push(e),this.logSize>this.logMaxSize){const e=this.logTextArray.shift();this.logSize-=e.length}}getLog(){return this.logTextArray.join("\n")}getLogBlob(){const e=this.getLog();return new Blob([e],{type:"text/plain"})}download(){const e=this.getLog();this.clear();const t=new Blob([e],{type:"text/plain"});Vo(t,"JbPro-"+j_()+".log")}}class z_ extends a{constructor(e){super(),this.player=e,this.TAG_NAME="Network",this.online=this.isOnline(),this.prevOnline=this.online,this.interval=null,this._initListener(),this.player.debug.log(this.TAG_NAME,"init")}destroy(){this.off(),this._stopCheck(),window.removeEventListener("online",this._updateOnlineStatus),window.removeEventListener("offline",this._updateOfflineStatus),this.player.debug.log(this.TAG_NAME,"destroy")}_initListener(){window.addEventListener("online",this._updateOnlineStatus.bind(this)),window.addEventListener("offline",this._updateOfflineStatus.bind(this))}_stopCheck(){this.interval&&(clearInterval(this.interval),this.interval=null)}_startCheck(){this.interval=setInterval((()=>{this.isOnline()!==this.prevOnline&&(this.isOnline()?this._updateOnlineStatus():this._updateOfflineStatus())}),1e3)}_updateOnlineStatus(){this.prevOnline=this.online,this.online=!0,this.logStatus(),this.emit("online")}_updateOfflineStatus(){this.prevOnline=this.online,this.online=!1,this.logStatus(),this.emit("offline")}logStatus(){const e=this.prevOnline?"online":"offline",t=this.online?"online":"offline";this.player.debug.log(this.TAG_NAME,`prevOnline: ${this.prevOnline}, online: ${this.online}, status: ${e} -> ${t}`)}isOnline(){return void 0===navigator.onLine||navigator.onLine}isOffline(){return!this.isOnline()}}class $_ extends a{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this._opt={},this.TAG_NAME="JbPro",this.$container=null,Object.keys(e).forEach((t=>{if(void 0===e[t])throw new Error(`JbPro option "${t}" can not be undefined`)})),this.originalOptions=e;const t=fo();let i=Object.assign({},t,e);i.url="",i.isMulti&&(i.debugUuid="xxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))),this.debug=new Fr(this),this.debug.log("JbPro","init");let s=e.container;if("string"==typeof e.container&&(s=document.querySelector(e.container)),!s)throw this.debug.error("JbPro","JbPro need container option and now container is",e.container),new Error("JbPro need container option");if(i.decoder&&Ao(-1!==i.decoder.indexOf("decoder-pro.js")||-1!==i.decoder.indexOf("decoder-pro-simd.js")))throw this.debug.error("JbPro",`JbPro decoder ${i.decoder} must be decoder-pro.js or decoder-pro-simd.js`),new Error(`JbPro decoder ${i.decoder} must be decoder-pro.js or decoder-pro-simd.js`);if("CANVAS"===s.nodeName||"VIDEO"===s.nodeName)throw this.debug.error("JbPro",`JbPro container type can not be ${s.nodeName} type`),new Error(`JbPro container type can not be ${s.nodeName} type`);if(i.videoBuffer>=i.heartTimeout)throw this.debug.error("JbPro",`JbPro videoBuffer ${i.videoBuffer}s must be less than heartTimeout ${i.heartTimeout}s`),new Error(`JbPro videoBuffer ${i.videoBuffer}s must be less than heartTimeout ${i.heartTimeout}s`);if(this._checkHasCreated(s))throw this.debug.error("JbPro","JbPro container has been created and can not be created again",s),new Error("JbPro container has been created and can not be created again",s);if(!s.classList)throw this.debug.error(this.TAG_NAME,"JbPro container is invalid, must be a DOM Element",s),new Error("JbPro container is invalid, must be a DOM Element",s);if(i.videoBuffer>10&&console.warn("JbPro",`videoBuffer ${i.videoBuffer}s is too long, will black screen for ${i.videoBuffer}s , it is recommended to set it to less than 10s`),s.classList.add("jb-pro-container"),bo(s,te,Ca()),Ao(i.isLive)){const e=document.createElement("video");return e.muted=!0,e.setAttribute("controlsList","nodownload"),e.disablePictureInPicture="disablePictureInPicture",e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.height="100%",e.style.width="100%",s.appendChild(e),this.$videoElement=e,this.$container=s,void(this._opt=i)}if(delete i.container,Oa(i.videoBuffer)&&(i.videoBuffer=1e3*Number(i.videoBuffer)),Oa(i.videoBufferDelay)&&(i.videoBufferDelay=1e3*Number(i.videoBufferDelay)),Oa(i.networkDelay)&&(i.networkDelay=1e3*Number(i.networkDelay)),Oa(i.aiFaceDetectInterval)&&(i.aiFaceDetectInterval=1e3*Number(i.aiFaceDetectInterval)),Oa(i.aiObjectDetectInterval)&&(i.aiObjectDetectInterval=1e3*Number(i.aiObjectDetectInterval)),Oa(i.timeout)&&(Ua(i.loadingTimeout)&&(i.loadingTimeout=i.timeout),Ua(i.heartTimeout)&&(i.heartTimeout=i.timeout)),Oa(i.autoWasm)&&(Ua(i.decoderErrorAutoWasm)&&(i.decoderErrorAutoWasm=i.autoWasm),Ua(i.hardDecodingNotSupportAutoWasm)&&(i.hardDecodingNotSupportAutoWasm=i.autoWasm)),Oa(i.aiFaceDetectLevel)&&Ua(i.aiFaceDetectWidth)){const e=cr[i.aiFaceDetectLevel];e&&(i.aiFaceDetectWidth=e)}if(Oa(i.aiObjectDetectLevel)&&Ua(i.aiObjectDetectWidth)){const e=ur[i.aiObjectDetectLevel];e&&(i.aiObjectDetectWidth=e)}yo(i.isCrypto)&&(i.isM7sCrypto=!0),this._opt=i,this._destroyed=!1,this.$container=s,this._tempPlayBgObj={},this._tempVideoLastIframeInfo={},this._tempPlayerIsMute=!0,this._loadingTimeoutReplayTimes=0,this._heartTimeoutReplayTimes=0,this._streamErrorReplayTimes=0,this._streamEndReplayTimes=0,this._websocket1006ErrorReplayTimes=0,this.events=new xo(this),this._opt.isUseNewFullscreenWatermark?this.watermark=new h_(this):this.watermark=new d_(this),this.memoryLogger=new G_(this),this.network=new z_(this),this._websocket1006ErrorRetryLog=[],this._mseDecodeErrorRetryLog=[],this._wcsDecodeErrorRetryLog=[],this._isNetworkOfflinePaused=!1,this._isNetworkOfflinePausedAndNextPlayConfig={},this.widthOrHeightChangeReplayDelayTimeout=null,this.streamErrorReplayDelayTimeout=null,this.streamEndReplayDelayTimeout=null,this.$loadingBgImage=null,this.$loadingBg=null,this._initPlayer(s,i),this._initWatermark(),this._initNetwork(),this.debug.log("JbPro",'init success and version is "4-1-2024"'),console.log('JbPro Version is "4-1-2024"')}destroy(){return new Promise(((e,t)=>{this.debug.log("JbPro","destroy()"),this._destroyed=!0,this.off(),this._removeTimeout(),this.$videoElement&&(this.$videoElement.pause(),this.$videoElement.currentTime=0,this.$videoElement.srcObject&&(this.$videoElement.srcObject=null,this.$videoElement.removeAttribute("srcObject")),this.$videoElement.src&&(this.$videoElement.src="",this.$videoElement.removeAttribute("src")),this.$container&&this.$container.removeChild(this.$videoElement),this.$videoElement=null),this._removeLoadingBackgroundForIOS(),this.player?this.player.destroy().then((()=>{this.player=null,this._destroy(),e()})).catch((()=>{t()})):(this._destroy(),e())}))}_removeTimeout(){this.widthOrHeightChangeReplayDelayTimeout&&(clearTimeout(this.widthOrHeightChangeReplayDelayTimeout),this.widthOrHeightChangeReplayDelayTimeout=null),this.streamErrorReplayDelayTimeout&&(clearTimeout(this.streamErrorReplayDelayTimeout),this.streamErrorReplayDelayTimeout=null),this.streamEndReplayDelayTimeout&&(clearTimeout(this.streamEndReplayDelayTimeout),this.streamEndReplayDelayTimeout=null)}_destroy(){var e,t;this.events&&(this.events.destroy(),this.events=null),this.talk&&(this.talk.destroy(),this.talk=null),this.watermark&&(this.watermark.destroy(),this.watermark=null),this.network&&(this.network.destroy(),this.network=null),this.memoryLogger&&(this.memoryLogger.destroy(),this.memoryLogger=null),this.$container&&(this.$container.classList.remove("jb-pro-container"),this.$container.classList.remove("jb-pro-fullscreen-web"),e=this.$container,t=te,e&&(e.dataset?delete e.dataset[t]:e.removeAttribute("data-"+t)),this.$container=null),this._tempPlayBgObj=null,this._tempVideoLastIframeInfo=null,this._isNetworkOfflinePaused=!1,this._isNetworkOfflinePausedAndNextPlayConfig={},this._tempPlayerIsMute=!0,this._resetReplayTimes(),this.debug&&this.debug.log("JbPro","destroy end"),this._opt=null,this.debug=null}_resetReplayTimes(){this._loadingTimeoutReplayTimes=0,this._heartTimeoutReplayTimes=0,this._streamErrorReplayTimes=0,this._streamEndReplayTimes=0,this._websocket1006ErrorReplayTimes=0,this._websocket1006ErrorRetryLog=[],this._mseDecodeErrorRetryLog=[],this._wcsDecodeErrorRetryLog=[]}_getOriginalOpt(){const e=fo();return Object.assign({},e,this.originalOptions)}_initPlayer(e,t){this.player=new i_(e,t),this._bindEvents()}_initTalk(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.talk&&(this.talk.destroy(),this.talk=null),this.player&&(e.debug=this.player._opt.debug),this.talk=new l_(this.player,e),this.debug.log("JbPro","_initTalk",this.talk.getOption()),this._bindTalkEvents()}_resetPlayer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(((t,i)=>{this.debug.log(this.TAG_NAME,"_resetPlayer()",JSON.stringify(e));const s=()=>{this._opt.url="",this._opt.playOptions={},this._opt=Object.assign(this._opt,e),this._initPlayer(this.$container,this._opt)};this.player?this.player.destroy().then((()=>{this.player=null,s(),this.debug.log(this.TAG_NAME,"_resetPlayer() end"),t()})).catch((()=>{i()})):(s(),this.debug.log(this.TAG_NAME,"_resetPlayer() end"),t())}))}_bindEvents(){var e=this;Object.keys(dt).forEach((t=>{this.player.on(dt[t],(function(){for(var i=arguments.length,s=new Array(i),r=0;r<i;r++)s[r]=arguments[r];e.emit(t,...s)}))})),this._opt.playFailedAndPausedShowMessage&&this.on(lt.playFailedAndPaused,(e=>{this.player&&this.player.showTipsMessageByCode(e)})),this.player.once(lt.beforeDestroy,(()=>{this.emit(lt.close),this.destroy().then((()=>{})).catch((e=>{}))})),this.player.on(lt.resize,(()=>{this.watermark&&this.watermark.resize()})),this.player.on(lt.fullscreen,(()=>{this.watermark&&this.watermark.resize()})),this.player.on(lt.videoInfo,(()=>{this.player&&(this.player.singleWatermark&&this.player.singleWatermark.resize(),this.player.ghostWatermark&&this.player.ghostWatermark.resize(),this.player.dynamicWatermark&&this.player.dynamicWatermark.resize())})),this.player.on(lt.memoryLog,(function(){e.memoryLogger.logCache(...arguments)})),this.player.on(lt.downloadMemoryLog,(()=>{this.downloadMemoryLog()}))}_bindTalkEvents(){Object.keys(ht).forEach((e=>{this.player.on(ht[e],(t=>{this.emit(e,t)}))}))}_initWatermark(){if(Ka(this._opt.fullscreenWatermarkConfig)){const e=ja(this.$container,this._opt.fullscreenWatermarkConfig);if(!e.watermark_txt)return void this.debug.warn("JbPro","fullscreenWatermarkConfig text is empty");this.watermark.load(e)}}_initNetwork(){this.network.on(lt.online,(()=>{if(this.emit(lt.networkState,lt.online),this.isDestroyed())this.debug.log(this.TAG_NAME,"network online and JbPro is destroyed");else if(this._isNetworkOfflinePaused&&this._isNetworkOfflinePausedAndNextPlayConfig&&this._isNetworkOfflinePausedAndNextPlayConfig.url){const e=this._isNetworkOfflinePausedAndNextPlayConfig.url,t=this._isNetworkOfflinePausedAndNextPlayConfig.playOptions;this._streamErrorReplayTimes++;const i=this._isNetworkOfflinePausedAndNextPlayConfig.type||"unknown";this._isNetworkOfflinePaused=!1,this._isNetworkOfflinePausedAndNextPlayConfig={},this.debug.log(this.TAG_NAME,`${i} and network online and reset player and play`),this.play(e,t).then((()=>{this.debug.log(this.TAG_NAME,`${i} and network online and play success`)})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.fetchError,{},error),this.debug.error(this.TAG_NAME,`${i} and network online and play error`,e)}))}})),this.network.on(lt.offline,(()=>{this.emit(lt.networkState,lt.offline)}))}_checkHasCreated(e){if(!e)return!1;return!!_o(e,te)}isDestroyed(){return this._destroyed}getOption(){return this.player?this.player.getOption():{}}setDebug(e){this.debug.log("JbPro",`setDebug() ${e}`),this._opt.debug=!!e,this.player?this.player.updateOption({debug:!!e},!0):this.debug.warn("JbPro","player is not init")}getIsDebug(){let e=!1;return this.player&&(e=this.player._opt.debug),e}mute(){this.debug.log("JbPro","mute()"),this.player&&this.player.mute(!0)}cancelMute(){this.debug.log("JbPro","cancelMute()"),this.player&&this.player.mute(!1)}setVolume(e){this.debug.log("JbPro",`setVolume() ${e}`),this.player&&(this.player.volume=e)}getVolume(){let e=null;return this.player&&(e=this.player.volume,e=parseFloat(e).toFixed(2)),e}audioResume(){this.debug.log("JbPro","audioResume()"),this.player&&this.player.audio?this.player.audio.audioEnabled(!0):this.debug.warn("JbPro","audioResume error")}setTimeout(e){this.debug.log("JbPro",`setTimeout() ${e}`),e=Number(e),isNaN(e)?this.debug.warn("JbPro",`setTimeout error: ${e} is not a number`):(this._opt.timeout=e,this._opt.loadingTimeout=e,this._opt.heartTimeout=e,this.player&&this.player.updateOption({timeout:e,loadingTimeout:e,heartTimeout:e}))}setScaleMode(e){this.debug.log("JbPro",`setScaleMode() ${e}`),this.player?this.player.setScaleMode(e):this.debug.warn("JbPro","setScaleMode() player is null")}pause(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise(((t,i)=>{this.debug.log("JbPro",`pause() ${e}`),(this._opt.pauseAndNextPlayUseLastFrameShow||this._opt.replayUseLastFrameShow)&&(this._tempPlayBgObj=this._getVideoLastIframeInfo()),this._tempPlayerIsMute=this.isMute(),this._pause(e).then((e=>{t(e)})).catch((e=>{i(e)}))}))}_pause(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise(((t,i)=>{if(this.debug.log("JbPro",`_pause() ${e}`),this.isDestroyed())return i("JbPro is destroyed");this._resetReplayTimes(),this.player?this.player.pause(e).then((e=>{t(e)})).catch((e=>{i(e)})):i("player is null")}))}close(){return new Promise(((e,t)=>{this.debug.log("JbPro","close()"),this._opt.url="",this._resetReplayTimes(),this.player?this.player.close().then((()=>{e()})).catch((e=>{t(e)})):t("player is null")}))}clearView(){this.debug.log("JbPro","clearView()"),this.player&&this.player.video?this.getRenderType()===W?this.player.video.clearView():this.debug.warn("JbPro","clearView","render type is video, not support clearView, please use canvas render type"):this.debug.warn("JbPro","clearView","player is null")}play(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,s)=>{if(this.debug.log("JbPro",`play() ${e}`,JSON.stringify(t)),!e&&!this._opt.url)return this.emit(lt.error,ut.playError),void s("url is null and this._opt.url is null");if(e&&(e=(""+e).trim(),-1===e.indexOf("http:")&&-1===e.indexOf("https:")&&-1===e.indexOf("webrtc:")&&-1===e.indexOf("ws:")&&-1===e.indexOf("wss:")&&-1===e.indexOf("wt:")&&-1===e.indexOf("artc:")))return s(`url ${e} must be "http:" or "https:" or "webrtc:" or "ws:" or "wss:" or "wt:" or "artc:" protocol`);if(Ao(this._opt.isLive))return this.$videoElement.controls="controls",this.$videoElement.muted=!1,this.$videoElement.src=e,this.$videoElement.play(),void i(this.$videoElement);if(this._opt.isM7sCrypto){let r=t.cryptoKey||this._opt.playOptions.cryptoKey,a=t.cryptoIV||this._opt.playOptions.cryptoIV;if(this._opt.m7sCryptoKey&&(!r||!a)){const e=this._opt.m7sCryptoKey.split(".");r=co(e[0]),a=co(e[1])}if(!r||!a){const r=e||this._opt.url;return void this._cryptoPlay(r).then((r=>{let{cryptoIV:a,cryptoKey:o}=r;this._opt.playOptions.cryptoKey=o,this._opt.playOptions.cryptoIV=a,t.cryptoIV=a,t.cryptoKey=o,this._playBefore(e,t).then((()=>{i()})).catch((e=>{s(e)}))})).catch((e=>{s(e)}))}this._opt.playOptions.cryptoKey=r,this._opt.playOptions.cryptoIV=a,t.cryptoIV=a,t.cryptoKey=r}else if(this._opt.isXorCrypto){let e=t.cryptoKey||this._opt.playOptions.cryptoKey,i=t.cryptoIV||this._opt.playOptions.cryptoIV;if(this._opt.xorCryptoKey&&(!e||!i)){const t=this._opt.xorCryptoKey.split(".");e=co(t[0]),i=co(t[1])}e&&i&&(this._opt.playOptions.cryptoKey=e,this._opt.playOptions.cryptoIV=i,t.cryptoIV=i,t.cryptoKey=e)}this._playBefore(e,t).then((()=>{i()})).catch((e=>{s(e)}))}))}_playBefore(e,t){return new Promise(((i,s)=>{if(this.player)if(e)if(this._opt.url)if(e===this._opt.url)if(this.player.playing)this.debug.log("JbPro","_playBefore","playing and resolve()"),i();else{this.debug.log("JbPro","_playBefore","this._opt.url === url and pause -> play and destroy play");let e=this._getOriginalOpt();(this._opt.pauseAndNextPlayUseLastFrameShow||this._opt.replayUseLastFrameShow)&&this._tempPlayBgObj&&this._tempPlayBgObj.loadingBackground&&(e=Object.assign(e,this._tempPlayBgObj)),Ao(this._tempPlayerIsMute)&&(e.isNotMute=!0,this._tempPlayerIsMute=!0);const t=this._opt.url,r=this._opt.playOptions;this._resetPlayer(e).then((()=>{this._play(t,r).then((()=>{i()})).catch((e=>{this.debug.error("JbPro","_playBefore this.player.play error",e),this.emit(lt.crashLog,this.getCrashLog("this.player.play 1",e)),s(e)}))})).catch((e=>{this.debug.error("JbPro","_resetPlayer error",e)}))}else{this.debug.log("JbPro","_playBefore",`\n this._url.url is ${this._opt.url}\n and new url is ${e}\n and destroy and play new url`);const r=this._getOriginalOpt();this._resetPlayer(r).then((()=>{this._play(e,t).then((()=>{i()})).catch((e=>{this.debug.error("JbPro","_playBefore _play error",e),this.emit(lt.crashLog,this.getCrashLog("this.player.play 2",e)),s(e)}))})).catch((e=>{this.debug.error("JbPro","_resetPlayer error",e)}))}else this._play(e,t).then((()=>{i()})).catch((e=>{this.debug.error("JbPro","_playBefore _play error",e),this.emit(lt.crashLog,this.getCrashLog("this.player.play 3",e)),s(e)}));else{let e=this._getOriginalOpt();(this._opt.pauseAndNextPlayUseLastFrameShow||this._opt.replayUseLastFrameShow)&&this._tempPlayBgObj&&this._tempPlayBgObj.loadingBackground&&(e=Object.assign(e,this._tempPlayBgObj)),Ao(this._tempPlayerIsMute)&&(e.isNotMute=!0,this._tempPlayerIsMute=!0);const t=this._opt.url,r=this._opt.playOptions;this._resetPlayer(e).then((()=>{this._play(t,r).then((()=>{i()})).catch((e=>{this.debug.error("JbPro","_playBefore _play error",e),this.emit(lt.crashLog,this.getCrashLog("this.player.play 4",e)),s(e)}))})).catch((e=>{this.debug.error("JbPro","_resetPlayer error",e)}))}else e?this._play(e,t).then((()=>{i()})).catch((e=>{this.debug.error("JbPro","_playBefore _play error",e),this.emit(lt.crashLog,this.getCrashLog("this.player.play 5",e)),s(e)})):this._play(this._opt.url,this._opt.playOptions).then((()=>{i()})).catch((e=>{this.debug.error("JbPro","_playBefore _play error",e),this.emit(lt.crashLog,this.getCrashLog("this.player.play 6",e)),s(e)}))}))}_cryptoPlay(e){return new Promise(((t,i)=>{const s=function(e){const t=(e||document.location.toString()).split("//"),i=t[1].indexOf("/");let s=t[1].substring(i);return-1!=s.indexOf("?")&&(s=s.split("?")[0]),s}(e);let r=this._opt.cryptoKeyUrl,a="";const o=uo(e);if(r){if(a=r,this._opt.isM7sCrypto&&-1===a.indexOf("/crypto/?stream=")){const e=uo(r);a=e.origin+ee+`?stream=${s}`}}else r=o.origin+ee,a=r+`?stream=${s}`;var n;this.player.debug.log("JbPro",`_cryptoPlay() cryptoKeyUrl: ${a} and opt.cryptoKeyUrl: ${this._opt.cryptoKeyUrl}`),(n=a,new Promise(((e,t)=>{El.get(n).then((t=>{e(t)})).catch((e=>{t(e)}))}))).then((e=>{if(e){const s=e.split("."),r=co(s[0]),a=co(s[1]);a&&r?t({cryptoIV:a,cryptoKey:r}):i("get cryptoIV or cryptoKey error")}else i(`cryptoKeyUrl: getM7SCryptoStreamKey ${a} res is null`)})).catch((e=>{i(e)}))}))}playback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,s)=>{if(this.debug.log("JbPro",`playback() ${e}, options: ${JSON.stringify(t)}`),Ao(this._opt.isLive))return s("this._opt.isLive is false, can not playback");const r=mo(),a=Object.assign({},r.playbackConfig,this._opt.playbackConfig,t);a.isUseFpsRender||a.isCacheBeforeDecodeForFpsRender&&(a.isCacheBeforeDecodeForFpsRender=!1,this.debug.warn("JbPro","playbackConfig.isUseFpsRender is false, isCacheBeforeDecodeForFpsRender can not be ture, isCacheBeforeDecodeForFpsRender is set to false")),0===a.rateConfig.length&&a.showRateBtn&&(a.showRateBtn=!1,this.debug.warn("JbPro","playbackConfig.rateConfig.length is 0, showRateBtn can not be ture, showRateBtn is set to false")),a.controlType,X.simple,this._resetPlayer({videoBuffer:0,playbackConfig:a,playType:w,openWebglAlignment:!0,useMSE:a.useMSE,useWCS:a.useWCS,useSIMD:!0}).then((()=>{this.play(e,t).then((()=>{i()})).catch((e=>{s(e)}))})).catch((e=>{s(e)}))}))}playbackPause(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.debug.log("JbPro",`playbackPause() ${e}`),this._opt.playType===_?Promise.reject("playType is player, can not call playbackPause method"):new Promise(((t,i)=>{if(!this.player)return i("player is null");yo(e)?this._pause().then((()=>{t()})).catch((e=>{i(e)})):(this.player.playbackPause=!0,t())}))}playbackResume(){return this.debug.log("JbPro","playbackResume()"),this._opt.playType===_?Promise.reject("playType is player, can not call playbackResume method"):new Promise(((e,t)=>{if(!this.player)return t("player is null");this.player.playbackPause=!1,e()}))}forward(e){return this.debug.log("JbPro",`forward() ${e}`),Ao(this._opt.isLive)||this._opt.playType===_?Promise.reject("forward() method only just for playback type"):Da(Number(e))?new Promise(((t,i)=>{this.player?(e=ca(Number(e),.1,32),this.player.decoderWorker&&this.player.decoderWorker.updateWorkConfig({key:"playbackRate",value:e}),this.player.playback.setRate(e),this.player.video&&this.player.video.setRate(e),this.player.audio&&this.player.audio.setRate(e),(this.player.isPlaybackUseWCS()||this.player.isPlaybackUseMSE())&&(this.player.demux.dropBuffer$2(),this.player.isPlaybackCacheBeforeDecodeForFpsRender()&&this.player.demux.initPlaybackCacheLoop()),t()):i("player is not playing")})):Promise.reject(`forward() params "rate": ${e} must be number type`)}playbackForward(e){return this.forward(e)}normal(){return this.forward(1)}playbackNormal(){return this.normal()}updatePlaybackForwardMaxRateDecodeIFrame(e){this.debug.log("JbPro",`updatePlaybackForwardMaxRateDecodeIFrame() ${e}`),e=Number(e),e=ca(e=parseInt(e,10),1,8),this._opt.playbackForwardMaxRateDecodeIFrame=e,this.player?this.player.updateOption({playbackForwardMaxRateDecodeIFrame:e},!0):this.debug.warn("JbPro","updatePlaybackForwardMaxRateDecodeIFrame() player is null")}setPlaybackStartTime(e){this.debug.log("JbPro",`setPlaybackStartTime() ${e}`);const t=Ja(e);this.player?this.player.isPlayback()?t<10&&0!==e&&this.player.playback.isControlTypeNormal()?this.debug.warn("JbPro",`setPlaybackStartTime() control type is normal and timestamp: ${e} is not valid`):this.player.playback.isControlTypeSimple()&&e>this.player.playback.totalDuration?this.debug.warn("JbPro",`setPlaybackStartTime() control type is simple and timestamp: ${e} is more than ${this.player.playback.totalDuration}`):this.player.playing&&(this.player.playback.isControlTypeNormal()&&10===t&&(e*=1e3),this.player.playback.setStartTime(e),this.playbackClearCacheBuffer()):this.debug.warn("JbPro","setPlaybackStartTime() playType is not playback"):this.debug.warn("JbPro","setPlaybackStartTime() player is null")}setPlaybackShowPrecision(e){this.debug.log("JbPro",`setPlaybackShowPrecision() ${e}`),this.player?this.player.isPlayback()?this.player.playback.isControlTypeNormal()?this.player.playback.setShowPrecision(e):this.debug.warn("JbPro","control type is not normal , not support!"):this.debug.warn("JbPro","playType is not playback"):this.debug.warn("JbPro","player is null")}playbackCurrentTimeScroll(){this.debug.log("JbPro","playbackCurrentTimeScroll()"),this.player?this.player.isPlayback()?this.player.playback.isControlTypeNormal()?this.player.playback.currentTimeScroll():this.debug.warn("JbPro","control type is not normal , not support!"):this.debug.warn("JbPro","playType is not playback"):this.debug.warn("JbPro","player is null")}playbackClearCacheBuffer(){this.debug.log("JbPro","playbackClearCacheBuffer()"),this.player?this.player.isPlayback()?(this.player.video&&this.player.video.clear(),this.player.audio&&this.player.audio.clear(),this.clearBufferDelay()):this.debug.warn("JbPro","playType is not playback"):this.debug.warn("JbPro","player is null")}getPlaybackCurrentRate(){if(this.player){if(this.player.isPlayback())return this.player.getPlaybackRate();this.debug.warn("JbPro","playType is not playback")}else this.debug.warn("JbPro","player is null")}updatePlaybackLocalOneFrameTimestamp(e){this.debug.log("JbPro",`updatePlaybackLocalOneFrameTimestamp() ${e}`),this.player?this.player.isPlayback()?this.player.playback.updateLocalOneFrameTimestamp(e):this.debug.warn("JbPro","playType is not playback"):this.debug.warn("JbPro","player is null")}setStreamQuality(e){if(this.debug.log("JbPro",`setStreamQuality() ${e}`),!this.player)return void this.debug.warn("JbPro","player is null");if(!this.player._opt.operateBtns.quality)return void this.debug.warn("JbPro","player._opt.operateBtns.quality is false");(this.player._opt.qualityConfig||[]).includes(e)?this.player.streamQuality=e:this.debug.warn("JbPro",`quality: ${e} is not in qualityList`)}_play(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((s,r)=>{if(!this.player)return r("player is null");let a=!1;this._opt.url&&this._opt.url!==t&&(a=!0),this._opt.url=t,this._opt.playOptions=i;const p=t.split("?")[0],f=p.startsWith("http://")||p.startsWith("https://"),m=p.startsWith("webrtc://"),g=p.startsWith("artc://"),y=p.startsWith("wt://"),A=p.startsWith("ws://")||p.startsWith("wss://"),b=f||A,_=f&&p.endsWith(".m3u8"),v=b&&p.endsWith(".flv"),w=b&&(p.endsWith(".fmp4")||p.endsWith(".mp4")),S=b&&p.endsWith(".mpeg4"),T=b&&(p.endsWith(".h264")||p.endsWith(".h265")),E=b&&p.endsWith(".ts");let U=this._opt.isWebrtcForZLM||!1,F=this._opt.isWebrtcForSRS||!1,O=this._opt.isWebrtcForOthers||!1;m&&(-1!==t.indexOf("/index/api/webrtc")?(U=!0,F=!1,O=!1):-1!==t.indexOf("/rtc/v1/play/")&&(F=!0,U=!1,O=!1));let N=null,G=null;if(v&&Ao(this._opt.isFlv)&&this._resetDemuxType("isFlv"),w&&Ao(this._opt.isFmp4)&&this._resetDemuxType("isFmp4"),S&&Ao(this._opt.isMpeg4)&&this._resetDemuxType("isMpeg4"),T&&Ao(this._opt.isNakedFlow)&&this._resetDemuxType("isNakedFlow"),E&&Ao(this._opt.isTs)&&this._resetDemuxType("isTs"),f?N=_?l:n:y?N=h:m?N=d:g?N=c:A&&(N=o),this._opt.isNakedFlow?G=L:this._opt.isFmp4?G=I:this._opt.isMpeg4?G=P:this._opt.isFlv?G=k:this._opt.isTs?G=M:_?G=x:m?G=R:g?G=B:y?G=D:A&&(G=C),!N||!G)return this._opt.playFailedAndPausedShowMessage&&this.showErrorMessageTips("url is not support"),r(`play url ${t} is invalid, protocol is ${u[N]}, demuxType is ${G}`);this.debug.log("JbPro",`play url ${t} protocol is ${u[N]}, demuxType is ${G}`);const z=()=>{this.player.once(ut.webglAlignmentError,(e=>{if(this.isDestroyed())this.debug.log("JbPro","webglAlignmentError but player is destroyed");else if(this.emit(lt.crashLog,this.getCrashLog(ut.webglAlignmentError,e)),this.player&&this.player._opt.webglAlignmentErrorReplay){this.debug.log("JbPro","webglAlignmentError");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({openWebglAlignment:!0}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","webglAlignmentError and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.webglAlignmentError,{},e),this.debug.error("JbPro","webglAlignmentError and play error",t)}))})).catch((e=>{this.debug.error("JbPro","webglAlignmentError and _resetPlayer error",e)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.webglAlignmentError,{},e),this.debug.log("JbPro","webglAlignmentError and webglAlignmentErrorReplay is false")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.webglAlignmentError,{},e),this.debug.error("JbPro","webglAlignmentError and pause error",t)}))}})),this.player.once(ut.webglContextLostError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","webglContextLostError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.webglContextLostError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.webglContextLostErrorReplay){this.debug.log("JbPro","webglContextLostError");const i=this._opt.url,s=this._opt.playOptions;let r={};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","webglContextLostError and play success")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.webglContextLostError,t,e),this.debug.error("JbPro","webglContextLostError and play error",i)}))})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.webglContextLostError,t,e),this.debug.error("JbPro","webglContextLostError and _resetPlayer error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.webglContextLostError,t,e),this.debug.log("JbPro","webglContextLostError and webglContextLostErrorReplay is false")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.webglContextLostError,t,e),this.debug.error("JbPro","webglAlignmentError and pause error",i)}))}})),this.player.once(ut.mediaSourceH265NotSupport,(e=>{if(this.isDestroyed())this.debug.log("JbPro","mediaSourceH265NotSupport but player is destroyed");else if(this.emit(lt.crashLog,this.getCrashLog(ut.mediaSourceH265NotSupport,e)),this.player&&this.player._opt.hardDecodingNotSupportAutoWasm){this.debug.log("JbPro","mediaSourceH265NotSupport auto wasm [mse-> wasm] reset player and play");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({useMSE:!1,useWCS:!1}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","mediaSourceH265NotSupport auto wasm [mse-> wasm] reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceH265NotSupport,e),this.debug.error("JbPro","mediaSourceH265NotSupport auto wasm [mse-> wasm] reset player and play error",t)}))})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceH265NotSupport,{},e),this.debug.error("JbPro","mediaSourceH265NotSupport auto wasm [mse-> wasm] _resetPlayer error",t)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceH265NotSupport,{},e),this.debug.log("JbPro","mediaSourceH265NotSupport and autoWasm is false")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceH265NotSupport,{},e),this.debug.error("JbPro","mediaSourceH265NotSupport and pause error",t)}))}})),this.player.once(ut.mediaSourceFull,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceFull but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.mediaSourceFull,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mseDecodeErrorReplay){const i=this._opt.url,s=this._opt.playOptions;let r={},a=this.player._opt.decoderErrorAutoWasm,o=!0;a?r={useMSE:!1,useWCS:!1}:this._checkIsMeaningfulRetry(Mr)?this._mseDecodeErrorRetryLog.push(ha()):(a=!0,o=!1,r={useMSE:!1,useWCS:!1}),this.debug.log("JbPro",`mediaSourceFull and auto wasm ${Ao(o)?" and is not meaningful Retry":""} [mse-> ${a?"wasm":"mse"}] reset player and play`),this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","mediaSourceFull and reset player and play success")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceFull,t,e),this.debug.error("JbPro","mediaSourceFull and reset player and play error",i)}))})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceFull,t,e),this.debug.error("JbPro","mediaSourceFull and _resetPlayer error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceFull,t,e),this.debug.log("JbPro","mediaSourceFull and autoWasm is false")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceFull,t,e),this.debug.error("JbPro","mediaSourceFull and pause error",i)}))}})),this.player.once(ut.mediaSourceAppendBufferError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceAppendBufferError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.mediaSourceAppendBufferError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mseDecodeErrorReplay){const i=this._opt.url,s=this._opt.playOptions;let r={},a=this.player._opt.decoderErrorAutoWasm,o=!0;a?r={useMSE:!1,useWCS:!1}:this._checkIsMeaningfulRetry(Mr)?this._mseDecodeErrorRetryLog.push(ha()):(a=!0,o=!1,r={useMSE:!1,useWCS:!1}),this.player.isMSEAudioDecoderError&&(this.player.debug.log("JbPro","mediaSourceAppendBufferError and isMSEAudioDecoderError is true so set mseDecodeAudio = false"),r.mseDecodeAudio=!1),this.debug.log("JbPro",`mediaSourceAppendBufferError and auto wasm ${Ao(o)?" and is not meaningful Retry":""} [mse-> ${a?"wasm":"mse"}] reset player and play`),this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","mediaSourceAppendBufferError and reset player and play success")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAppendBufferError,t,e),this.debug.error("JbPro","mediaSourceAppendBufferError and reset player and play error",i)}))})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAppendBufferError,t,e),this.debug.error("JbPro","mediaSourceAppendBufferError and _resetPlayer error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAppendBufferError,t,e),this.debug.log("JbPro","mediaSourceAppendBufferError and autoWasm is false")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAppendBufferError,t,e),this.debug.error("JbPro","mediaSourceAppendBufferError and pause error",i)}))}})),this.player.once(ut.mseSourceBufferError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","mseSourceBufferError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.mseSourceBufferError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mseDecodeErrorReplay){const i=this._opt.url,s=this._opt.playOptions;let r={};if(this.player._opt.mseDecoderUseWorker)r={mseDecoderUseWorker:!1},this.debug.log("JbPro","mseSourceBufferError auto wasm [mse worker -> mse] reset player and play");else{let e=this.player._opt.decoderErrorAutoWasm,t=!0;e?r={useMSE:!1,useWCS:!1}:this._checkIsMeaningfulRetry(Mr)?this._mseDecodeErrorRetryLog.push(ha()):(e=!0,t=!1,r={useMSE:!1,useWCS:!1}),this.player.isMSEVideoDecoderInitializationFailedNotSupportHevc&&(this.debug.log("JbPro","mseSourceBufferError and isMSEVideoDecoderInitializationFailedNotSupportHevc is true so auto wasm"),r={useMSE:!1,useWCS:!1}),this.debug.log("JbPro",`mseSourceBufferError auto wasm ${Ao(t)?" and is not meaningful Retry":""} [mse-> ${e?"wasm":"mse"}] reset player and play`)}this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","mseSourceBufferError reset player and play success")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mseSourceBufferError,t,e),this.debug.error("JbPro","mseSourceBufferError reset player and play error",i)}))})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mseSourceBufferError,t,e),this.debug.error("JbPro","mseSourceBufferError _resetPlayer and play error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.mseSourceBufferError,t,e),this.debug.log("JbPro","mseSourceBufferError and autoWasm is false")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mseSourceBufferError,t,e),this.debug.error("JbPro","mseSourceBufferError and pause error:",i)}))}})),this.player.once(ut.mediaSourceBufferedIsZeroError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceBufferedIsZeroError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.mediaSourceBufferedIsZeroError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mseDecodeErrorReplay){const i=this._opt.url,s=this._opt.playOptions;let r={},a=this.player._opt.decoderErrorAutoWasm,o=!0;a?r={useMSE:!1,useWCS:!1}:this._checkIsMeaningfulRetry(Mr)?this._mseDecodeErrorRetryLog.push(ha()):(a=!0,o=!1,r={useMSE:!1,useWCS:!1}),this.debug.log("JbPro",`mediaSourceBufferedIsZeroError auto wasm ${Ao(o)?" and is not meaningful Retry":""} [mse-> ${a?"wasm":"mse"}] reset player and play`),this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","mediaSourceBufferedIsZeroError reset player and play success")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceBufferedIsZeroError,t,e),this.debug.error("JbPro","mediaSourceBufferedIsZeroError reset player and play error",i)}))})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceBufferedIsZeroError,t,e),this.debug.error("JbPro","mediaSourceBufferedIsZeroError _resetPlayer and play error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceBufferedIsZeroError,t,e),this.debug.log("JbPro","mediaSourceBufferedIsZeroError and autoWasm is false")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceBufferedIsZeroError,t,e),this.debug.error("JbPro","mediaSourceBufferedIsZeroError and pause error:",i)}))}})),this.player.once(ut.mseAddSourceBufferError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","mseAddSourceBufferError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.mseAddSourceBufferError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.hardDecodingNotSupportAutoWasm){this.debug.log("JbPro","mseAddSourceBufferError auto wasm [mse-> wasm] reset player and play");const i=this._opt.url,s=this._opt.playOptions;let r={useMSE:!1,useWCS:!1};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","mseAddSourceBufferError auto wasm [mse-> wasm] reset player and play success")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mseAddSourceBufferError,t,e),this.debug.error("JbPro","mseAddSourceBufferError auto wasm [mse-> wasm] reset player and play error",i)}))})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mseAddSourceBufferError,t,e),this.debug.error("JbPro","mseAddSourceBufferError auto wasm [mse-> wasm] _resetPlayer and play error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.mseAddSourceBufferError,t,e),this.debug.log("JbPro","mseAddSourceBufferError and autoWasm is false")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mseAddSourceBufferError,t,e),this.debug.error("JbPro","mseAddSourceBufferError and pause error",i)}))}})),this.player.once(ut.mediaSourceDecoderConfigurationError,(e=>{if(this.isDestroyed())this.debug.log("JbPro","mediaSourceDecoderConfigurationError but player is destroyed");else if(this.emit(lt.crashLog,this.getCrashLog(ut.mediaSourceDecoderConfigurationError,e)),this.player&&this.player._opt.hardDecodingNotSupportAutoWasm){this.debug.log("JbPro","mediaSourceDecoderConfigurationError auto wasm [mse-> wasm] reset player and play");const t=this._opt.url,i=this._opt.playOptions;let s={useMSE:!1,useWCS:!1};this._resetPlayer(s).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","mediaSourceDecoderConfigurationError auto wasm [mse-> wasm] reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceDecoderConfigurationError,e),this.debug.error("JbPro","mediaSourceDecoderConfigurationError auto wasm [mse-> wasm] reset player and play error",t)}))})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceDecoderConfigurationError,e),this.debug.error("JbPro","mediaSourceDecoderConfigurationError auto wasm [mse-> wasm] _resetPlayer and play error",t)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceDecoderConfigurationError,e),this.debug.log("JbPro","mediaSourceDecoderConfigurationError and autoWasm is false")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceDecoderConfigurationError,e),this.debug.error("JbPro","mediaSourceDecoderConfigurationError and pause error",t)}))}})),this.player.once(ut.mediaSourceTsIsMaxDiff,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceTsIsMaxDiff but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.mediaSourceTsIsMaxDiff,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mediaSourceTsIsMaxDiffReplay){this.debug.log("JbPro","mediaSourceTsIsMaxDiff reset player and play");const i=this._opt.url,s=this._opt.playOptions;let r={};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","mediaSourceTsIsMaxDiff replay success")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceTsIsMaxDiff,t,e),this.debug.error("JbPro","mediaSourceTsIsMaxDiff replay error",i)}))})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceTsIsMaxDiff,t,e),this.debug.error("JbPro","mediaSourceTsIsMaxDiff _resetPlayer error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceTsIsMaxDiff,t,e),this.debug.log("JbPro","mediaSourceTsIsMaxDiff and replay is false")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceTsIsMaxDiff,t,e),this.debug.error("JbPro","mediaSourceTsIsMaxDiff and pause error",i)}))}})),this.player.once(ut.mseWidthOrHeightChange,(t=>{if(this.isDestroyed())return void this.debug.log("JbPro","mseWidthOrHeightChange but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.mseWidthOrHeightChange,t));const i=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.widthOrHeightChangeReplay){this.debug.log("JbPro","mseWidthOrHeightChange and reset player and play");const e=this._opt.url,s=this._opt.playOptions;let r={};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,i,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.player._opt.widthOrHeightChangeReplayDelayTime>0?this.widthOrHeightChangeReplayDelayTimeout=setTimeout((()=>{this.isDestroyed()?this.debug.log("JbPro","mseWidthOrHeightChange and widthOrHeightChangeReplayDelayTime but player is destroyed"):this.play(e,s).then((()=>{this.debug.log("JbPro","mseWidthOrHeightChange and reset player and play success")})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mseWidthOrHeightChange,i,t),this.debug.error("JbPro","mseWidthOrHeightChange and reset player and play error",e)}))}),1e3*this.player._opt.widthOrHeightChangeReplayDelayTime):this.play(e,s).then((()=>{this.debug.log("JbPro","mseWidthOrHeightChange and reset player and play success")})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mseWidthOrHeightChange,i,t),this.debug.error("JbPro","mseWidthOrHeightChange and reset player and play error",e)}))})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mseWidthOrHeightChange,i,t),this.debug.error("JbPro","mseWidthOrHeightChange and _resetPlayer error",e)}))}else{const s=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(s).then((()=>{this.emit(lt.playFailedAndPaused,ut.mseWidthOrHeightChange,i,t),this.debug.error("JbPro","mseWidthOrHeightChange and _resetPlayer error",e)})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mseWidthOrHeightChange,i,t),this.debug.error("JbPro","mseWidthOrHeightChange error and pause error",e)}))}})),this.player.once(ut.mediaSourceAudioG711NotSupport,(t=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceAudioG711NotSupport but player is destroyed");const i=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mediaSourceAudioG711NotSupportReplay){this.debug.log("JbPro","mediaSourceAudioG711NotSupport and reset player and play");const e=this._opt.url,s=this._opt.playOptions;let r={mseDecodeAudio:!1};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,i,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(e,s).then((()=>{this.debug.log("JbPro","mediaSourceAudioG711NotSupport and reset player and play success")})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAudioG711NotSupport,i,t),this.debug.error("JbPro","mediaSourceAudioG711NotSupport and reset player and play error",e)}))})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAudioG711NotSupport,i,t),this.debug.error("JbPro","mediaSourceAudioG711NotSupport and _resetPlayer error",e)}))}else{const s=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(s).then((()=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAudioG711NotSupport,i,t),this.debug.error("JbPro","mediaSourceAudioG711NotSupport and _resetPlayer error",e)})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAudioG711NotSupport,i,t),this.debug.error("JbPro","mediaSourceAudioG711NotSupport error and pause error",e)}))}})),this.player.once(ut.mediaSourceAudioInitTimeout,(t=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceAudioInitTimeout but player is destroyed");const i=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mediaSourceAudioInitTimeoutReplay){this.debug.log("JbPro","mediaSourceAudioInitTimeout and reset player and play");const e=this._opt.url,s=this._opt.playOptions;let r={mseDecodeAudio:!1};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,i,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(e,s).then((()=>{this.debug.log("JbPro","mediaSourceAudioInitTimeout and reset player and play success")})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAudioInitTimeout,i,t),this.debug.error("JbPro","mediaSourceAudioInitTimeout and reset player and play error",e)}))})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAudioInitTimeout,i,t),this.debug.error("JbPro","mediaSourceAudioInitTimeout and _resetPlayer error",e)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAudioInitTimeout,i),this.debug.error("JbPro","mediaSourceAudioInitTimeout and _resetPlayer error",e)})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAudioInitTimeout,i),this.debug.error("JbPro","mediaSourceAudioInitTimeout error and pause error",e)}))}})),this.player.once(ut.mediaSourceAudioNoDataTimeout,(t=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceAudioNoDataTimeout but player is destroyed");const i=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mediaSourceAudioInitTimeoutReplay){this.debug.log("JbPro","mediaSourceAudioNoDataTimeout and reset player and play");const e=this._opt.url,s=this._opt.playOptions;let r={mseDecodeAudio:!1};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,i,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(e,s).then((()=>{this.debug.log("JbPro","mediaSourceAudioNoDataTimeout and reset player and play success")})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAudioNoDataTimeout,i,t),this.debug.error("JbPro","mediaSourceAudioNoDataTimeout and reset player and play error",e)}))})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAudioNoDataTimeout,i,t),this.debug.error("JbPro","mediaSourceAudioNoDataTimeout and _resetPlayer error",e)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAudioNoDataTimeout,i),this.debug.error("JbPro","mediaSourceAudioNoDataTimeout and _resetPlayer error",e)})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceAudioNoDataTimeout,i),this.debug.error("JbPro","mediaSourceAudioNoDataTimeout error and pause error",e)}))}})),this.player.once(ut.mediaSourceUseCanvasRenderPlayFailed,(e=>{if(this.isDestroyed())this.debug.log("JbPro","mediaSourceUseCanvasRenderPlayFailed but player is destroyed");else if(this.emit(lt.crashLog,this.getCrashLog(ut.mediaSourceUseCanvasRenderPlayFailed,e)),this.player&&this.player._opt.mediaSourceUseCanvasRenderPlayFailedReplay&&this.player._opt.mediaSourceUseCanvasRenderPlayFailedReplayType){this.debug.log("JbPro",`mediaSourceUseCanvasRenderPlayFailed relayType is ${this.player._opt.mediaSourceUseCanvasRenderPlayFailedReplayType} and reset player and play`);const t=this._opt.url,i=this._opt.playOptions;let s={};const r=this.player._opt.mediaSourceUseCanvasRenderPlayFailedReplayType;r===W?s={useMSE:!1,useWCS:!1}:r===J&&(s={useVideoRender:!0,useCanvasRender:!1}),this._resetPlayer(s).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","mediaSourceUseCanvasRenderPlayFailed and reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceUseCanvasRenderPlayFailed,e),this.debug.error("JbPro","mediaSourceUseCanvasRenderPlayFailed and reset player and play error",t)}))})).catch((e=>{this.debug.error("JbPro","mediaSourceUseCanvasRenderPlayFailed auto and _resetPlayer and play error",e)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.debug.log("JbPro","mediaSourceUseCanvasRenderPlayFailed and pause player success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.mediaSourceUseCanvasRenderPlayFailed,e),this.debug.error("JbPro","mediaSourceUseCanvasRenderPlayFailed and pause",t)}))}})),this.player.once(ut.webcodecsH265NotSupport,(e=>{if(this.isDestroyed())this.debug.log("JbPro","webcodecsH265NotSupport but player is destroyed");else if(this.emit(lt.crashLog,this.getCrashLog(ut.webcodecsH265NotSupport,e)),this.player&&this.player._opt.hardDecodingNotSupportAutoWasm){this.debug.log("JbPro","webcodecsH265NotSupport auto wasm [wcs-> wasm] reset player and play");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({useMSE:!1,useWCS:!1}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","webcodecsH265NotSupport auto wasm [wcs-> wasm] reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.webcodecsH265NotSupport,e),this.debug.error("JbPro","webcodecsH265NotSupport auto wasm [wcs-> wasm] reset player and play error",t)}))})).catch((e=>{this.debug.error("JbPro","webcodecsH265NotSupport auto wasm [wcs-> wasm] _resetPlayer and play error",e)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.webcodecsH265NotSupport,e),this.debug.log("JbPro","webcodecsH265NotSupport and autoWasm is false")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.webcodecsH265NotSupport,e),this.debug.error("JbPro","webcodecsH265NotSupport and pause error",t)}))}})),this.player.once(ut.webcodecsUnsupportedConfigurationError,(e=>{if(this.isDestroyed())this.debug.log("JbPro","webcodecsUnsupportedConfigurationError but player is destroyed");else if(this.emit(lt.crashLog,this.getCrashLog(ut.webcodecsUnsupportedConfigurationError,e)),this.player&&this.player._opt.hardDecodingNotSupportAutoWasm){this.debug.log("JbPro","webcodecsUnsupportedConfigurationError auto wasm [wcs-> wasm] reset player and play");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({useMSE:!1,useWCS:!1}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","webcodecsUnsupportedConfigurationError auto wasm [wcs-> wasm] reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.webcodecsUnsupportedConfigurationError,e),this.debug.error("JbPro","webcodecsUnsupportedConfigurationError auto wasm [wcs-> wasm] reset player and play error",t)}))})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.webcodecsUnsupportedConfigurationError,e),this.debug.error("JbPro","webcodecsUnsupportedConfigurationError auto wasm [wcs-> wasm] _resetPlayer and play error",t)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.webcodecsUnsupportedConfigurationError,e),this.debug.log("JbPro","webcodecsUnsupportedConfigurationError and autoWasm is false")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.webcodecsUnsupportedConfigurationError,e),this.debug.error("JbPro","webcodecsUnsupportedConfigurationError and pause error",t)}))}})),this.player.once(ut.webcodecsDecodeConfigureError,(e=>{if(this.isDestroyed())this.debug.log("JbPro","webcodecsDecodeConfigureError but player is destroyed");else if(this.emit(lt.crashLog,this.getCrashLog(ut.webcodecsDecodeConfigureError,e)),this.player&&this.player._opt.hardDecodingNotSupportAutoWasm){this.debug.log("JbPro","webcodecsDecodeConfigureError auto wasm [wcs-> wasm] reset player and play");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({useMSE:!1,useWCS:!1}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","webcodecsDecodeConfigureError auto wasm [wcs-> wasm] reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.webcodecsDecodeConfigureError,e),this.debug.error("JbPro","webcodecsDecodeConfigureError auto wasm [wcs-> wasm] reset player and play error",t)}))})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.webcodecsDecodeConfigureError,e),this.debug.error("JbPro","webcodecsDecodeConfigureError auto wasm [wcs-> wasm] _resetPlayer and play error",t)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.webcodecsDecodeConfigureError,e),this.debug.log("JbPro","webcodecsDecodeConfigureError and autoWasm is false")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.webcodecsDecodeConfigureError,e),this.debug.error("JbPro","webcodecsDecodeConfigureError and pause error",t)}))}})),this.player.once(ut.webcodecsDecodeError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","webcodecsDecodeError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.webcodecsDecodeError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.wcsDecodeErrorReplay){const i=this._opt.url,s=this._opt.playOptions;let r={},a=this.player._opt.decoderErrorAutoWasm,o=!0;a?r={useMSE:!1,useWCS:!1}:this._checkIsMeaningfulRetry(Ur)?this._wcsDecodeErrorRetryLog.push(ha()):(a=!0,o=!1,r={useMSE:!1,useWCS:!1}),this.debug.log("JbPro",`webcodecs decode error autoWasm ${Ao(o)?" and is not meaningful Retry":""} [wcs-> ${a?"wasm":"wcs"}] reset player and play`),this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","webcodecs decode error reset player and play success")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.webcodecsDecodeError,t,e),this.debug.error("JbPro","webcodecs decode error reset player and play error",i)}))})).catch((()=>{this.emit(lt.playFailedAndPaused,ut.webcodecsDecodeError,t,e),this.debug.error("JbPro","webcodecs decode error _resetPlayer error")}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.webcodecsDecodeError,t,e),this.debug.log("JbPro","webcodecs decode error and autoWasm is false")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.webcodecsDecodeError,t,e),this.debug.error("JbPro","webcodecs decode error and pause error",i)}))}})),this.player.once(ut.wcsWidthOrHeightChange,(t=>{if(this.isDestroyed())return void this.debug.log("JbPro","wcsWidthOrHeightChange but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.wcsWidthOrHeightChange,t));const i=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.widthOrHeightChangeReplay){this.debug.log("JbPro","wcsWidthOrHeightChange and reset player and play");const e=this._opt.url,s=this._opt.playOptions;let r={};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,i,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this._opt.widthOrHeightChangeReplayDelayTime>0?this.widthOrHeightChangeReplayDelayTimeout=setTimeout((()=>{this.isDestroyed()?this.debug.log("JbPro","wcsWidthOrHeightChange and widthOrHeightChangeReplayDelayTime but player is destroyed"):this.play(e,s).then((()=>{this.debug.log("JbPro","wcsWidthOrHeightChange and reset player and play success")})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.wcsWidthOrHeightChange,i,t),this.debug.error("JbPro","wcsWidthOrHeightChange and reset player and play error",e)}))}),1e3*this._opt.widthOrHeightChangeReplayDelayTime):this.play(e,s).then((()=>{this.debug.log("JbPro","wcsWidthOrHeightChange and reset player and play success")})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.wcsWidthOrHeightChange,i,t),this.debug.error("JbPro","wcsWidthOrHeightChange and reset player and play error",e)}))})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.wcsWidthOrHeightChange,i,t),this.debug.error("JbPro","wcsWidthOrHeightChange and _resetPlayer error",e)}))}else{const s=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(s).then((()=>{this.emit(lt.playFailedAndPaused,ut.wcsWidthOrHeightChange,i,t),this.debug.error("JbPro","wcsWidthOrHeightChange and _resetPlayer error",e)})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.wcsWidthOrHeightChange,i,t),this.debug.error("JbPro","wcsWidthOrHeightChange error and pause error",e)}))}})),this.player.once(ut.wasmDecodeError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","wasmDecodeError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.wasmDecodeError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.wasmDecodeErrorReplay){this.debug.log("JbPro","wasm decode error and reset player and play");const i=this._opt.url,s=this._opt.playOptions;let r={};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","wasm decode error and reset player and play success")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.wasmDecodeError,t,e),this.debug.error("JbPro","wasm decode error and reset player and play error",i)}))})).catch((()=>{this.emit(lt.playFailedAndPaused,ut.wasmDecodeError,t,e),this.debug.error("JbPro","wasm decode error and _resetPlayer error")}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.wasmDecodeError,t,e),this.debug.log("JbPro","wasm decode error and wasmDecodeErrorReplay is false")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.wasmDecodeError,t,e),this.debug.error("JbPro","wasm decode error and pause error",i)}))}})),this.player.once(ut.simdDecodeError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","simdDecodeError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.simdDecodeError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.simdDecodeErrorReplay){this.debug.log("JbPro",`simdDecodeError error simdDecodeErrorReplayType is ${this.player._opt.simdDecodeErrorReplayType} and reset player and play`);const i=this._opt.url,s=this._opt.playOptions;let r={};this.player._opt.simdDecodeErrorReplayType===j&&(r={useSIMD:!1}),this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","simdDecodeError and reset player and play success")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.simdDecodeError,t,e),this.debug.error("JbPro","simdDecodeError and reset player and play error",i)}))})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.simdDecodeError,t,e),this.debug.error("JbPro","simdDecodeError and _resetPlayer error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.simdDecodeError,t,e),this.debug.error("JbPro","simdDecodeError and simdDecodeErrorReplay is false")})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.simdDecodeError,t,e),this.debug.error("JbPro","simdDecodeError error and pause error",i)}))}})),this.player.once(ut.wasmWidthOrHeightChange,(t=>{if(this.isDestroyed())return void this.debug.log("JbPro","wasmWidthOrHeightChange but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.wasmWidthOrHeightChange,t));const i=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.widthOrHeightChangeReplay){this.debug.log("JbPro","wasmWidthOrHeightChange and reset player and play");const e=this._opt.url,s=this._opt.playOptions;let r={};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,i,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this._opt.widthOrHeightChangeReplayDelayTime>0?this.widthOrHeightChangeReplayDelayTimeout=setTimeout((()=>{this.isDestroyed()?this.debug.log("JbPro","wasmWidthOrHeightChange and widthOrHeightChangeReplayDelayTime but player is destroyed"):this.play(e,s).then((()=>{this.debug.log("JbPro","wasmWidthOrHeightChange and reset player and play success")})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.wasmWidthOrHeightChange,i,t),this.debug.error("JbPro","wasmWidthOrHeightChange and reset player and play error",e)}))}),1e3*this._opt.widthOrHeightChangeReplayDelayTime):this.play(e,s).then((()=>{this.debug.log("JbPro","wasmWidthOrHeightChange and reset player and play success")})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.wasmWidthOrHeightChange,i,t),this.debug.error("JbPro","wasmWidthOrHeightChange and reset player and play error",e)}))})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.wasmWidthOrHeightChange,i,t),this.debug.error("JbPro","wasmWidthOrHeightChange and _resetPlayer error",e)}))}else{const s=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(s).then((()=>{this.emit(lt.playFailedAndPaused,ut.wasmWidthOrHeightChange,i,t),this.debug.error("JbPro","wasmWidthOrHeightChange and _resetPlayer error",e)})).catch((e=>{this.emit(lt.playFailedAndPaused,ut.wasmWidthOrHeightChange,i),this.debug.error("JbPro","wasmWidthOrHeightChange error and pause error",e)}))}})),this.player.once(ut.wasmUseVideoRenderError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","wasmUseVideoRenderError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.wasmUseVideoRenderError,e)),this.debug.log("JbPro","wasmUseVideoRenderError and reset player and play");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({useVideoRender:!1,useCanvasRender:!0}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","wasmUseVideoRenderError and reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.wasmUseVideoRenderError,{},e),this.debug.error("JbPro","wasmUseVideoRenderError and reset player and play error",t)}))})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.wasmUseVideoRenderError,{},e),this.debug.error("JbPro","wasmUseVideoRenderError and _resetPlayer error",t)}))})),this.player.once(ut.videoElementPlayingFailed,(e=>{if(this.isDestroyed())this.debug.log("JbPro","videoElementPlayingFailed but player is destroyed");else if(this.emit(lt.crashLog,this.getCrashLog(ut.videoElementPlayingFailed,e)),this.player&&this.player._opt.videoElementPlayingFailedReplay){this.debug.log("JbPro",`videoElementPlayingFailed and useMSE is ${this._opt.useMSE} and reset player and play`);const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({useMSE:!1,useVideoRender:!1,useCanvasRender:!0}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","videoElementPlayingFailed and reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.videoElementPlayingFailed,{},e),this.debug.error("JbPro","videoElementPlayingFailed and reset player and play error",t)}))})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.videoElementPlayingFailed,{},e),this.debug.error("JbPro","videoElementPlayingFailed and _resetPlayer error",t)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.videoElementPlayingFailed,{},e),this.debug.error("JbPro","videoElementPlayingFailed and videoElementPlayingFailedReplay is false")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.videoElementPlayingFailed,{},e),this.debug.error("JbPro","videoElementPlayingFailed and _pause error",t)}))}})),this.player.once(ut.simdH264DecodeVideoWidthIsTooLarge,(e=>{if(this.isDestroyed())this.debug.log("JbPro","simdH264DecodeVideoWidthIsTooLarge but player is destroyed");else if(this.emit(lt.crashLog,this.getCrashLog(ut.simdH264DecodeVideoWidthIsTooLarge,e)),this.player&&this.player._opt.simdH264DecodeVideoWidthIsTooLargeReplay){this.debug.log("JbPro","simdH264DecodeVideoWidthIsTooLarge and reset player and play");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({useSIMD:!1}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","simdH264DecodeVideoWidthIsTooLarge and reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.simdH264DecodeVideoWidthIsTooLarge,{},e),this.debug.error("JbPro","simdH264DecodeVideoWidthIsTooLarge and reset player and play error",t)}))})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.simdH264DecodeVideoWidthIsTooLarge,{},e),this.debug.error("JbPro","simdH264DecodeVideoWidthIsTooLarge and _resetPlayer error",t)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.simdH264DecodeVideoWidthIsTooLarge,{},e),this.debug.error("JbPro","simdH264DecodeVideoWidthIsTooLarge and simdDecodeErrorReplay is false")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.simdH264DecodeVideoWidthIsTooLarge,{},e),this.debug.error("JbPro","simdH264DecodeVideoWidthIsTooLarge and pause error",t)}))}})),this.player.once(lt.networkDelayTimeout,(e=>{if(this.player._opt.networkDelayTimeoutReplay){if(this.isDestroyed())return void this.debug.log("JbPro","networkDelayTimeout but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(lt.networkDelayTimeout,e));const t=this._getVideoLastIframeInfo();this.debug.log("JbPro","network delay time out and reset player and play");const i=this._opt.url,s=this._opt.playOptions;let r={};this.player&&this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","wasm decode error and reset player and play success")})).catch((i=>{this.emit(lt.playFailedAndPaused,lt.networkDelayTimeout,t,e),this.debug.error("JbPro","wasm decode error and reset player and play error",i)}))})).catch((()=>{this.emit(lt.playFailedAndPaused,lt.networkDelayTimeout,t,e),this.debug.error("JbPro","wasm decode error and _resetPlayer error")}))}})),this.player.once(lt.flvDemuxBufferSizeTooLarge,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","flvDemuxBufferSizeTooLarge but player is destroyed");const t=this._getVideoLastIframeInfo();if(this.player._opt.flvDemuxBufferSizeTooLargeReplay){this.emit(lt.crashLog,this.getCrashLog(lt.flvDemuxBufferSizeTooLarge,e)),this.debug.log("JbPro","flv Demux Buffer Size Too Large and flvDemuxBufferSizeTooLargeReplay = true and reset player and play");const i=this._opt.url,s=this._opt.playOptions;let r={};this.player&&this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log(this.TAG_NAME,"flv Demux Buffer Size Too Large and reset player and play success")})).catch((i=>{this.emit(lt.playFailedAndPaused,lt.flvDemuxBufferSizeTooLarge,t,e),this.debug.error(this.TAG_NAME,"flv Demux Buffer Size Too Large and reset player and play error",i)}))})).catch((()=>{this.emit(lt.playFailedAndPaused,lt.flvDemuxBufferSizeTooLarge,t,e),this.debug.error(this.TAG_NAME,"flv Demux Buffer Size Too Large and _resetPlayer error")}))}else if(this._opt.flvDemuxBufferSizeTooLargeEmitFailed){this.debug.log(this.TAG_NAME,"flv Demux Buffer Size Too Large and flvDemuxBufferSizeTooLargeEmitFailed = true and pause player");const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.flvDemuxBufferSizeTooLarge,t,e)})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.flvDemuxBufferSizeTooLarge,t,e),this.debug.error(this.TAG_NAME,"flv Demux Buffer Size Too Large",i)}))}})),this.player.once(ut.fetchError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","fetchError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.fetchError,e));const t=this._getVideoLastIframeInfo(),i=this._isNeedNetworkDisconnectReplay();if(this.player._opt.streamErrorReplay||i){i?this.debug.log("JbPro","fetch error and network is disconnect and reset player and play"):this.debug.log("JbPro",`fetch error and streamErrorReplay is true and _streamErrorReplayTimes is ${this._streamErrorReplayTimes}, streamErrorReplayDelayTime is ${this._opt.streamErrorReplayDelayTime}, next replay`);let s={};this.player._opt.replayUseLastFrameShow&&(s=Object.assign({},s,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(s.isNotMute=!0);const r=this._opt.playOptions,a=this._opt.url,o=i?1:this._opt.streamErrorReplayDelayTime;this._resetPlayer(s).then((()=>{this.streamErrorReplayDelayTimeout=setTimeout((()=>{if(this.isDestroyed())this.debug.log("JbPro","fetch error and _resetPlayer but player is destroyed and return");else{if(this.network.isOffline())return this.debug.log("JbPro","fetch error and network is offline and wait network online to play , so return"),this._isNetworkOfflinePaused=!0,void(this._isNetworkOfflinePausedAndNextPlayConfig={url:a,options:r,type:ut.fetchError});this._streamErrorReplayTimes++,this.play(a,r).then((()=>{this.debug.log("JbPro","fetch error and reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.fetchError,{},e),this.debug.error("JbPro","fetch error and reset player and play error",t)}))}}),1e3*o)})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.fetchError,{},e),this.debug.error("JbPro","fetch error and _resetPlayer error",t)}))}else{this.debug.log("JbPro","fetch error and pause player");const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.fetchError,t,e)})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.fetchError,t,e),this.debug.error("JbPro","fetch error and pause",i)}))}})),this.player.once(lt.streamEnd,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","streamEnd but player is destroyed and return");this.emit(lt.crashLog,this.getCrashLog(lt.streamEnd,e));const t=this._getVideoLastIframeInfo(),i=this._checkIsMeaningfulRetry(Br),s=""+e=="1006"&&this.player._opt.websocket1006ErrorReplay,r=s&&i,a=this.player._opt.streamEndReplay,o=this._isNeedNetworkDisconnectReplay();if(r||a||o){o?this.debug.log("JbPro","streamEnd and network is disconnect and reset player and play"):r?this.debug.log("JbPro",`streamEnd and websocket1006ErrorReplay is true and error is 1006 and _websocket1006ErrorReplayTimes is ${this._websocket1006ErrorReplayTimes} , delay ${this._opt.websocket1006ErrorReplayDelayTime}s reset player and play`):this.debug.log("JbPro",`streamEnd and isStreamEndReplay is true and and _streamEndReplayTimes is ${this._streamEndReplayTimes} , delay ${this._opt.streamEndReplayDelayTime}s reset player and play`);const i=this._opt.playOptions,s=this._opt.url;this._websocket1006ErrorRetryLog.push(ha());let a={};this.player._opt.replayUseLastFrameShow&&(a=Object.assign({},a,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(a.isNotMute=!0);let n=r?this._opt.websocket1006ErrorReplayDelayTime:this._opt.streamEndReplayDelayTime;o&&(n=1),this._initLoadingBackgroundForIOS(t),this._resetPlayer(a).then((()=>{this.streamEndReplayDelayTimeout=setTimeout((()=>{if(this._removeLoadingBackgroundForIOS(),this.isDestroyed())o?this.debug.log("JbPro","streamEnd and network is disconnect and _resetPlayer() but player is destroyed and return"):r?this.debug.log("JbPro","streamEnd and 1006 error and _resetPlayer() but player is destroyed and return"):this.debug.log("JbPro","streamEnd and _resetPlayer() but player is destroyed and return");else{if(this.network.isOffline())return r?this.debug.log("JbPro","streamEnd and 1006 error network is offline and wait network online to play , so return"):this.debug.log("JbPro","streamEnd and network is offline and wait network online to play , so return"),this._isNetworkOfflinePaused=!0,void(this._isNetworkOfflinePausedAndNextPlayConfig={url:s,options:i,type:r?ut.websocket1006Error:ut.streamEnd});r?this._websocket1006ErrorReplayTimes++:this._streamEndReplayTimes++,this.play(s,i).then((()=>{r?this.debug.log("JbPro","streamEnd and 1006 error and reset player and play success"):this.debug.log("JbPro","streamEnd and reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.streamEnd,{},e),r?this.debug.error("JbPro","streamEnd and 1006 error and reset player and play error",t):this.debug.error("JbPro","streamEnd and reset player and play error",t)}))}}),1e3*n)})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.streamEnd,{},e),r?this.debug.error("JbPro","streamEnd and 1006 and _resetPlayer error",t):this.debug.error("JbPro","streamEnd and _resetPlayer error",t)}))}else{s?this.debug.log("JbPro","streamEnd pause player "+(Ao(i)?"and is not meaningful retry":"")):this.debug.log("JbPro","streamEnd pause player");const r=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(r).then((()=>{this.emit(lt.playFailedAndPaused,lt.streamEnd,t,e)})).catch((i=>{this.emit(lt.playFailedAndPaused,lt.streamEnd,t,e),this.debug.error("JbPro","streamEnd pause",i)}))}})),this.player.once(ut.websocketError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","websocketError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.websocketError,e));const t=this._getVideoLastIframeInfo(),i=this._isNeedNetworkDisconnectReplay();if(this.player._opt.streamErrorReplay||i){i?this.debug.log("JbPro","websocketError error and network is disconnect and reset player and play"):this.debug.log("JbPro",`websocketError error and streamErrorReplay is true and _streamErrorReplayTimes is ${this._streamErrorReplayTimes} and streamErrorReplayDelayTime is ${this._opt.streamErrorReplayDelayTime}, next replay`);let s={};this.player._opt.replayUseLastFrameShow&&(s=Object.assign({},s,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(s.isNotMute=!0);const r=this._opt.playOptions,a=this._opt.url,o=i?1:this._opt.streamErrorReplayDelayTime;this._resetPlayer(s).then((()=>{this.streamErrorReplayDelayTimeout=setTimeout((()=>{if(this.isDestroyed())i?this.debug.log("JbPro","websocketError error and network is disconnect and _resetPlayer() but player is destroyed and return"):this.debug.log("JbPro","websocketError error and _resetPlayer() but player is destroyed and return");else{if(this.network.isOffline())return this.debug.log("JbPro","websocketError error and network is offline and wait network online to play , so return"),this._isNetworkOfflinePaused=!0,void(this._isNetworkOfflinePausedAndNextPlayConfig={url:a,options:r,type:ut.websocketError});this._streamErrorReplayTimes++,this.play(a,r).then((()=>{this.debug.log("JbPro","websocketError error and reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.fetchError,{},e),this.debug.error("JbPro","websocketError error and reset player and play error",t)}))}}),1e3*o)})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.fetchError,{},e),this.debug.error("JbPro","websocketError error and _resetPlayer error",t)}))}else{this.debug.log("JbPro","websocketError and pause player");const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.websocketError,t,e)})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.websocketError,t,e),this.debug.error("JbPro","websocketError and pause",i)}))}})),this.player.once(ut.webrtcError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","webrtcError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.webrtcError,e));const t=this._getVideoLastIframeInfo();this.debug.log("JbPro","webrtcError and pause player");const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.webrtcError,t,e)})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.webrtcError,t,e),this.debug.error("JbPro","webrtcError and pause",i)}))})),this.player.once(ut.hlsError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","hlsError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.hlsError,e));const t=this._getVideoLastIframeInfo();this.debug.log("JbPro","hlsError and pause player");const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.hlsError,t,e)})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.hlsError,t,e),this.debug.error("JbPro","hlsError and pause",i)}))})),this.player.once(ut.aliyunRtcError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","aliyunRtcError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.aliyunRtcError,e));const t=this._getVideoLastIframeInfo();this.debug.log("JbPro","aliyunRtcError and pause player");const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,ut.aliyunRtcError,t,e)})).catch((i=>{this.emit(lt.playFailedAndPaused,ut.aliyunRtcError,t,e),this.debug.error("JbPro","aliyunRtcError and pause",i)}))})),this.player.once(ut.decoderWorkerInitError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","decoderWorkerInitError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.decoderWorkerInitError,e)),this.debug.log("JbPro","decoderWorkerInitError and pause player");const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.decoderWorkerInitError,{},e)})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.decoderWorkerInitError,{},e),this.debug.error("JbPro","decoderWorkerInitError and pause",t)}))})),this.player.once(ut.videoElementPlayingFailedForWebrtc,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","videoElementPlayingFailedForWebrtc but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.videoElementPlayingFailedForWebrtc,e)),this.debug.log("JbPro","videoElementPlayingFailedForWebrtc and pause player");const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.videoElementPlayingFailedForWebrtc,{},e)})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.videoElementPlayingFailedForWebrtc,{},e),this.debug.error("JbPro","videoElementPlayingFailedForWebrtc and pause",t)}))})),this.player.once(ut.videoInfoError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","videoInfoError but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(ut.videoInfoError,e)),this.debug.log("JbPro","videoInfoError and pause player");const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,ut.videoInfoError,{},e)})).catch((t=>{this.emit(lt.playFailedAndPaused,ut.videoInfoError,{},e),this.debug.error("JbPro","videoInfoError and pause",t)}))})),this.player.once(lt.webrtcStreamH265,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","webrtcStreamH265 but player is destroyed");this.debug.log("JbPro","webrtcStreamH265 and reset player and play");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({isWebrtcH265:!0}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","webrtcStreamH265 and reset player and play success")})).catch((t=>{this.emit(lt.playFailedAndPaused,lt.webrtcStreamH265,{},e),this.debug.error("JbPro","webrtcStreamH265 and reset player and play error",t)}))})).catch((()=>{this.emit(lt.playFailedAndPaused,lt.webrtcStreamH265,{},e),this.debug.error("JbPro","webrtcStreamH265 and _resetPlayer error")}))})),this.player.on(lt.delayTimeout,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","delay timeout but player is destroyed");this.emit(lt.crashLog,this.getCrashLog(lt.delayTimeout,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.heartTimeoutReplay&&(this._heartTimeoutReplayTimes<this.player._opt.heartTimeoutReplayTimes||-1===this.player._opt.heartTimeoutReplayTimes)){if(this.debug.log("JbPro",`delay timeout replay time is ${this._heartTimeoutReplayTimes} and heartTimeoutReplayTimes is ${this.player._opt.heartTimeoutReplayTimes}`),this.isDestroyed())return void(this.debug&&this.debug.warn("JbPro","delay timeout replay but player is destroyed"));this._heartTimeoutReplayTimes+=1;const i=this._opt.url,s=this._opt.playOptions;let r={};(this.player._opt.heartTimeoutReplayUseLastFrameShow||this.player._opt.replayUseLastFrameShow)&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),Ao(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{if(this._isNeedNetworkDisconnectReplay())return this.debug.log("JbPro","delayTimeout and network is offline and wait network online to play , so return"),this._isNetworkOfflinePaused=!0,void(this._isNetworkOfflinePausedAndNextPlayConfig={url:i,options:s,type:lt.delayTimeout});this.play(i,s).then((()=>{})).catch((i=>{this.emit(lt.playFailedAndPaused,lt.delayTimeout,t,e),this.debug.error("JbPro","delay timeout replay error",i)}))})).catch((i=>{this.emit(lt.playFailedAndPaused,lt.delayTimeout,t,e),this.debug.error("JbPro","delay timeout _resetPlayer error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(lt.playFailedAndPaused,lt.delayTimeout,t,e),this.player&&(this.emit(lt.delayTimeoutRetryEnd),this.emit(lt.playFailedAndPaused,lt.delayTimeoutRetryEnd)),this.debug.warn("JbPro",`delayTimeoutRetryEnd and\n opt.heartTimeout is ${this.player&&this.player._opt.heartTimeout} and\n opt.heartTimeoutReplay is ${this.player&&this.player._opt.heartTimeoutReplay} and\n opt.heartTimeoutReplayTimes is ${this.player&&this.player._opt.heartTimeoutReplayTimes},and\n local._heartTimeoutReplayTimes is ${this._heartTimeoutReplayTimes}`)})).catch((i=>{this.emit(lt.playFailedAndPaused,lt.delayTimeout,t,e),this.debug.error("JbPro","delay timeout and pause error",i)}))}})),this.player.on(lt.loadingTimeout,(e=>{if(this.emit(lt.crashLog,this.getCrashLog(lt.loadingTimeout,e)),this.isDestroyed())this.debug.log("JbPro","loading timeout but player is destroyed");else if(this.player&&this.player._opt.loadingTimeoutReplay&&(this._loadingTimeoutReplayTimes<this.player._opt.loadingTimeoutReplayTimes||-1===this.player._opt.loadingTimeoutReplayTimes)){if(this.debug.log("JbPro",`loading timeout and\n replay time is ${this._loadingTimeoutReplayTimes} and\n loadingTimeoutReplayTimes is ${this.player._opt.loadingTimeoutReplayTimes}`),this.isDestroyed())return void(this.debug&&this.debug.warn("JbPro","delay timeout replay but player is destroyed"));this._loadingTimeoutReplayTimes+=1;const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer().then((()=>{if(this._isNeedNetworkDisconnectReplay())return this.debug.log("JbPro","loadingTimeout and network is offline and wait network online to play , so return"),this._isNetworkOfflinePaused=!0,void(this._isNetworkOfflinePausedAndNextPlayConfig={url:t,options:i,type:lt.loadingTimeout});this.play(t,i).then((()=>{})).catch((t=>{this.emit(lt.playFailedAndPaused,lt.loadingTimeout,{},e),this.debug.error("JbPro","loading timeout replay error",t)}))})).catch((t=>{this.emit(lt.playFailedAndPaused,lt.loadingTimeout,{},e),this.debug.error("JbPro","loading timeout _resetPlayer error",t)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(lt.playFailedAndPaused,lt.loadingTimeout,{},e),this.player&&(this.emit(lt.loadingTimeoutRetryEnd),this.emit(lt.playFailedAndPaused,lt.loadingTimeoutRetryEnd,{},e)),this.debug.log("JbPro",`loadingTimeoutRetryEnd and\n opt.loadingTimeout is ${this.player&&this.player._opt.loadingTimeout} and\n opt.loadingTimeoutReplay is ${this.player&&this.player._opt.loadingTimeoutReplay} and\n local._loadingTimeoutReplayTimes time is ${this._loadingTimeoutReplayTimes} and\n opt.loadingTimeoutReplayTimes is ${this.player&&this.player._opt.loadingTimeoutReplayTimes}`)})).catch((t=>{this.emit(lt.playFailedAndPaused,lt.loadingTimeout,{},e),this.debug.error("JbPro","loading timeout and pause error",t)}))}})),this._hasLoaded()?this.player.play(t,i).then((()=>{s()})).catch((e=>{this.debug.error("JbPro","_hasLoaded() and play error",e),this.emit(lt.crashLog,this.getCrashLog("_hasLoaded() and play error",e)),this.player&&this.player.pause().then((()=>{r(e)})).catch((e=>{r(e),this.debug.error("JbPro","_hasLoaded() and play error and next pause error",e)}))})):this.player.once(lt.decoderWorkerInit,(()=>{this.player.play(t,i).then((()=>{s()})).catch((e=>{this.debug.error("JbPro","decoderWorkerInit and play error",e),this.emit(lt.crashLog,this.getCrashLog("decoderWorkerInit and play error",e)),this.player&&this.player.pause().then((()=>{r(e)})).catch((e=>{r(e),this.debug.error("JbPro","decoderWorkerInit and play error and next pause error",e)}))}))}))},$=this.player.getOption(),H=_&&Ao(this._opt.supportHls265),V=m&&Ao(this._opt.isWebrtcH265),q=_&&!!so(),K=_&&$.demuxUseWorker;if(H||V||g||a||S||q||K)this.debug.log("JbPro",`need reset player and\n isOldHls is ${H} and isOldWebrtc is ${V} and\n isAliyunRtc is ${g} and\n needResetPlayer(url change) is ${a} and\n isMpeg4 is ${S} and\n isHlsCanVideoPlay is ${q} and\n isHlsButDemuxUseWorker is ${K}`),this._resetPlayer({protocol:N,demuxType:G,isHls:_,isWebrtc:m,isWebrtcForZLM:U,isWebrtcForSRS:F,isWebrtcForOthers:O,isAliyunRtc:g,cryptoKey:i.cryptoKey||"",cryptoIV:i.cryptoIV||"",url:t,playOptions:i}).then((()=>{z()})).catch((e=>{r("reset player error")}));else{const e={protocol:N,demuxType:G,isHls:_,isWebrtc:m,isAliyunRtc:g,isFlv:this._opt.isFlv,isFmp4:this._opt.isFmp4,isMpeg4:this._opt.isMpeg4,isNakedFlow:this._opt.isNakedFlow,isTs:this._opt.isTs,cryptoKey:i.cryptoKey||"",cryptoIV:i.cryptoIV||""};this._opt.isNakedFlow&&(e.mseDecodeAudio=!1),this.player.updateOption(e),i.cryptoKey&&i.cryptoIV&&this.player.decoderWorker&&(this.player.decoderWorker.updateWorkConfig({key:"cryptoKey",value:i.cryptoKey}),this.player.decoderWorker.updateWorkConfig({key:"cryptoIV",value:i.cryptoIV})),z()}}))}_resetDemuxType(e){this._opt.isFlv=!1,this._opt.isFmp4=!1,this._opt.isMpeg4=!1,this._opt.isNakedFlow=!1,this._opt.isHls=!1,this._opt.isWebrtc=!1,this._opt.isWebrtcForZLM=!1,this._opt.isWebrtcForSRS=!1,this._opt.isWebrtcForOthers=!1,this._opt.isAliyunRtc=!1,this._opt.isTs=!1,e&&(this._opt[e]=!0),"isFmp4"!==e&&(this._opt.isFmp4Private=!1)}resize(){this.debug.log("JbPro","resize()"),this.player&&this.player.resize()}setBufferTime(e){this.debug.log("JbPro",`setBufferTime() ${e}`),(e=Number(e))>10&&this.debug.warn("JbPro",`setBufferTime() buffer time is ${e} second, is too large, video will show blank screen until cache ${e} second buffer data`);const t=1e3*e;this._opt.videoBuffer=t,this.player?this.player.updateOption({videoBuffer:t},!0):this.debug.warn("JbPro","setBufferTime() player is null")}setBufferDelayTime(e){this.debug.log("JbPro",`setBufferDelayTime() ${e}`),(e=Number(e))<.2&&this.debug.warn("JbPro",`setBufferDelayTime() buffer time delay is ${e} second, is too small`);const t=1e3*(e=ca(e,.2,100));this._opt.videoBufferDelay=t,this.player?this.player.updateOption({videoBufferDelay:t},!0):this.debug.warn("JbPro","setBufferDelayTime() player is null")}setRotate(e){this.debug.log("JbPro",`setRotate() ${e}`),e=parseInt(e,10);this._opt.rotate!==e&&-1!==[0,90,180,270].indexOf(e)?(this._opt.rotate=e,this.player?(this.player.updateOption({rotate:e}),this.resize()):this.debug.warn("JbPro","setRotate() player is null")):this.debug.warn("JbPro",`setRotate() rotate is ${e} and this._opt.rotate is ${this._opt.rotate}`)}setMirrorRotate(e){this.debug.log("JbPro",`setMirrorRotate() ${e}`);e||(e="none"),this._opt.mirrorRotate!==e&&-1!==["none","level","vertical"].indexOf(e)?(this._opt.mirrorRotate=e,this.player?(this.player.updateOption({mirrorRotate:e}),this.resize()):this.debug.warn("JbPro","setMirrorRotate() player is null")):this.debug.warn("JbPro",`setMirrorRotate() mirrorRotate is ${e} and this._opt.mirrorRotate is ${this._opt.mirrorRotate}`)}setAspectRatio(e){this.debug.log("JbPro",`setAspectRatio() ${e}`);e||(e="default"),this._opt.aspectRatio!==e&&-1!==["default","4:3","16:9"].indexOf(e)?(this._opt.aspectRatio=e,this.player?(this.player.updateOption({aspectRatio:e}),this.resize()):this.debug.warn("JbPro","setAspectRatio() player is null")):this.debug.warn("JbPro",`setAspectRatio() aspectRatio is ${e} and this._opt.aspectRatio is ${this._opt.mirrorRotate}`)}hasLoaded(){return!0}_hasLoaded(){return this.player&&this.player.loaded||!1}setKeepScreenOn(){this.debug.log("JbPro","setKeepScreenOn()"),this._opt.keepScreenOn=!0,this.player?this.player.updateOption({keepScreenOn:!0}):this.debug.warn("JbPro","setKeepScreenOn() player is not ready")}setFullscreen(e){this.debug.log("JbPro",`setFullscreen() ${e}`);const t=!!e;this.player?this.player.fullscreen!==t?this.player.fullscreen=t:this.debug.warn("JbPro",`setFullscreen() fullscreen is ${t} and this.player.fullscreen is ${this.player.fullscreen}`):this.debug.warn("JbPro","setFullscreen() player is not ready")}setWebFullscreen(e){this.debug.log("JbPro",`setWebFullscreen() ${e}`);const t=!!e;this.player?this.player.webFullscreen=t:this.debug.warn("JbPro","setWebFullscreen() player is not ready")}screenshot(e,t,i,s){return this.debug.log("JbPro",`screenshot() ${e} ${t} ${i} ${s}`),this.player&&this.player.video?this.player.video.screenshot(e,t,i,s):(this.debug.warn("JbPro","screenshot() player is not ready"),null)}screenshotWatermark(e){return new Promise(((t,i)=>{this.debug.log("JbPro","screenshotWatermark()",e),this.player&&this.player.video?this.player.video.screenshotWatermark(e).then((e=>{t(e)})).catch((e=>{i(e)})):(this.debug.warn("JbPro","screenshotWatermark() player is not ready"),i("player is not ready"))}))}startRecord(e,t){return new Promise(((i,s)=>{if(this.debug.log("JbPro",`startRecord() ${e} ${t}`),!this.player)return this.debug.warn("JbPro","startRecord() player is not ready"),s("player is not ready");this.player.playing?(this.player.startRecord(e,t),i()):(this.debug.warn("JbPro","startRecord() player is not playing"),s("not playing"))}))}stopRecordAndSave(e,t){return new Promise(((i,s)=>{this.debug.log("JbPro",`stopRecordAndSave() ${e} ${t}`),this.player&&this.player.recording?this.player.stopRecordAndSave(e,t).then((e=>{i(e)})).catch((e=>{s(e)})):s("not recording")}))}isPlaying(){let e=!1;return this.player&&(e=this.player.isPlaying()),e}isLoading(){return!!this.player&&this.player.loading}isPause(){let e=!1;return this._opt.playType===_?e=!this.isPlaying()&&!this.isLoading():this._opt.playType===w&&this.player&&(e=this.player.playbackPause),e}isPaused(){return this.isPause()}isPlaybackPause(){let e=!1;return this._opt.playType===w&&this.player&&(e=this.player.playbackPause),e}isMute(){let e=!0;return this.player&&(e=this.player.isAudioMute()),e}isRecording(){return this.player&&this.player.recorder&&this.player.recorder.recording||!1}isFullscreen(){let e=!1;return this.player&&(e=this.player.fullscreen),e}isWebFullscreen(){let e=!1;return this.player&&(e=this.player.webFullscreen),e}clearBufferDelay(){this.debug.log("JbPro","clearBufferDelay()"),this.player?this.player.clearBufferDelay():this.debug.warn("JbPro","clearBufferDelay() player is not init")}setNetworkDelayTime(e){this.debug.log("JbPro",`setNetworkDelayTime() ${e}`),(e=Number(e))<1&&this.debug.warn("JbPro",`setNetworkDelayTime() network delay is ${e} second, is too small`);const t=1e3*(e=ca(e,1,100));this._opt.networkDelay=t,this.player?this.player.updateOption({networkDelay:t},!0):this.debug.warn("JbPro","setNetworkDelayTime() player is null")}getDecodeType(){let e="";return this.player&&(e=this.player.getDecodeType()),e}getRenderType(){let e="";return this.player&&(e=this.player.getRenderType()),e}getAudioEngineType(){let e="";return this.player&&(e=this.player.getAudioEngineType()),e}getPlayingTimestamp(){let e=0;return this.player&&(e=this.player.getPlayingTimestamp()),e}getStatus(){let e=_s;return this.player&&(e=this.player.loading?ys:this.player.playing?As:bs),e}getPlayType(){return this.player?this.player._opt.playType:_}togglePerformancePanel(e){this.debug.log("JbPro",`togglePerformancePanel() ${e}`);const t=this.player._opt.showPerformance;let i=!t;Fa(e)&&(i=e),i!==t?this.player?this.player.togglePerformancePanel(i):this.debug.warn("JbPro","togglePerformancePanel() failed, this.player is not init"):this.debug.warn("JbPro",`togglePerformancePanel() failed, showPerformance is prev: ${t} === now: ${i}`)}openZoom(){this.debug.log("JbPro","openZoom()"),this.player?this.player.zooming=!0:this.debug.warn("JbPro","openZoom() failed, this.player is not init")}closeZoom(){this.debug.log("JbPro","closeZoom()"),this.player?this.player.zooming=!1:this.debug.warn("JbPro","closeZoom() failed, this.player is not init")}isZoomOpen(){let e=!1;return this.player&&(e=this.player.zooming),e}toggleZoom(e){this.debug.log("JbPro",`toggleZoom() ${e}`),Fa(e)||(e=!this.isZoomOpen()),yo(e)?this.openZoom():Ao(!1)&&this.closeZoom()}expandZoom(){this.debug.log("JbPro","expandZoom()"),this.player&&this.player.zoom&&this.player.zooming?this.player.zoom.expandPrecision():this.debug.warn("JbPro","expandZoom() failed, zoom is not open or not init")}narrowZoom(){this.debug.log("JbPro","narrowZoom()"),this.player&&this.player.zoom&&this.player.zooming?this.player.zoom.narrowPrecision():this.debug.warn("JbPro","narrowZoom failed, zoom is not open or not init")}getCurrentZoomIndex(){let e=1;return this.player&&this.player.zoom&&(e=this.player.zoom.currentZoom),e}startTalk(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,s)=>{this.debug.log("JbPro","startTalk()",e,t),this._initTalk(t),this.talk.startTalk(e).then((()=>{i(),this.talk.once(lt.talkStreamClose,(()=>{this.debug.warn("JbPro","talk stream close"),this.stopTalk().catch((e=>{}))})),this.talk.once(lt.talkStreamError,(e=>{this.debug.warn("JbPro","talk stream error",e),this.stopTalk().catch((e=>{}))})),this.talk.once(lt.talkStreamInactive,(()=>{this.debug.warn("JbPro","talk stream inactive"),this.stopTalk().catch((e=>{}))}))})).catch((e=>{s(e)}))}))}stopTalk(){return new Promise(((e,t)=>{if(this.debug.log("JbPro","stopTalk()"),!this.talk)return t("stopTalk() talk is not init");this.talk.destroy(),e()}))}getTalkVolume(){return new Promise(((e,t)=>{if(!this.talk)return t("getTalkVolume() talk is not init");e(this.talk.volume)}))}setTalkVolume(e){return new Promise(((t,i)=>{if(this.debug.log("JbPro","setTalkVolume()",e),!this.talk)return i("setTalkVolume() talk is not init");this.talk.setVolume(e/100),t()}))}setNakedFlowFps(e){return new Promise(((t,i)=>{if(this.debug.log("JbPro","setNakedFlowFps()",e),Ua(e))return i("setNakedFlowFps() fps is empty");let s=Number(e);s=ca(s,1,100),this._opt.nakedFlowFps=s,this.player?this.player.updateOption({nakedFlowFps:s}):this.debug.warn("JbPro","setNakedFlowFps() player is null"),t()}))}getCrashLog(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!this.player)return;const i=this.player.getAllStatsData(),s=this.player;let r={url:this._opt.url,playType:s.isPlayback()?"playback":"live",demuxType:s.getDemuxType(),decoderType:s.getDecodeType(),renderType:s.getRenderType(),videoInfo:{encType:"",width:"",height:""},audioInfo:{encType:"",sampleRate:"",channels:""},audioEngine:s.getAudioEngineType(),allTimes:i.pTs,timestamp:ha(),type:e,error:lo(t)||e};if(s.video){const e=s.video.videoInfo||{};r.videoInfo={encType:e.encType||"",width:e.width||"",height:e.height||""}}if(s.audio){const e=s.audio.audioInfo||{};r.audioInfo={encType:e.encType||"",sampleRate:e.sampleRate||"",channels:e.channels||""}}return r}updateDebugLevel(e){this.debug.log("JbPro","updateDebugLevel()",e),e===q||e===K?e!==this.player._opt.debugLevel?(this._opt.debugLevel=e,this.player?this.player.updateOption({debugLevel:e},!0):this.debug.warn("JbPro","updateDebugLevel() player is null")):this.debug.warn("JbPro",`updateDebugLevel() level is same, level: ${e}`):this.debug.warn("JbPro",`updateDebugLevel() level is not valid, level: ${e}`)}updateWatermark(e){this.debug.log("JbPro","updateWatermark()",e),this.player?this.player.updateWatermark(e):this.debug.warn("JbPro","updateWatermark() player is not init")}removeWatermark(){this.debug.log("JbPro","removeWatermark()"),this.player?this.player.removeWatermark():this.debug.warn("JbPro","removeWatermark() player is not init")}updateFullscreenWatermark(e){if(this.debug.log("JbPro","updateFullscreenWatermark()",e),Ka(e)){this._opt.fullscreenWatermarkConfig=e;const t=ja(this.$container,e);if(!t.watermark_txt)return void this.debug.warn("JbPro","fullscreenWatermarkConfig text is empty");this.watermark.load(t)}else this.debug.warn("JbPro",`updateFullscreenWatermark() config is not valid, config: ${e}`)}removeFullscreenWatermark(){this.debug.log("JbPro","removeFullscreenWatermark()"),this.watermark?this.watermark.remove():this.debug.warn("JbPro","removeFullscreenWatermark() watermark is not init")}faceDetectOpen(){this.debug.log("JbPro","faceDetectOpen()"),this.player?this.player.faceDetect(!0):this.debug.warn("JbPro","faceDetectOpen() player is not init")}faceDetectClose(){this.debug.log("JbPro","faceDetectClose()"),this.player?this.player.faceDetect(!1):this.debug.warn("JbPro","faceDetectClose() player is not init")}objectDetectOpen(){this.debug.log("JbPro","objectDetectOpen()"),this.player?this.player.objectDetect(!0):this.debug.warn("JbPro","objectDetectOpen() player is not init")}objectDetectClose(){this.debug.log("JbPro","objectDetectClose()"),this.player?this.player.objectDetect(!1):this.debug.warn("JbPro","objectDetectClose() player is not init")}sendWebsocketMessage(e){this.debug.log("JbPro","sendWebsocketMessage()",e),this.player?this.player.sendWebsocketMessage(e):this.debug.warn("JbPro","sendWebsocketMessage() player is not init")}addContentToCanvas(e){this.debug.log("JbPro","addContentToCanvas()"),this.player?this.player.addContentToCanvas(e):this.debug.warn("JbPro","addContentToCanvas() player is not init")}clearContentToCanvas(){this.debug.log("JbPro","clearContentToCanvas()"),this.player?this.player.addContentToCanvas([]):this.debug.warn("JbPro","clearContentToCanvas() player is not init")}addContentToContainer(e){this.debug.log("JbPro","addContentToContainer()"),this.player?this.player.addContentToContainer(e):this.debug.warn("JbPro","addContentToContainer() player is not init")}clearContentToContainer(){this.debug.log("JbPro","clearContentToContainer()"),this.player?this.player.addContentToContainer([]):this.debug.warn("JbPro","clearContentToContainer() player is not init")}setControlHtml(e){this.debug.log("JbPro","setControlHtml()",e),this.player?this.player.setControlHtml(e):this.debug.warn("JbPro","setControlHtml() player is not init")}clearControlHtml(){this.debug.log("JbPro","clearControlHtml()"),this.player?this.player.clearControlHtml():this.debug.warn("JbPro","clearControlHtml() player is not init")}getVideoInfo(){let e=null;return this.player&&(e=this.player.getVideoInfo()),e}getAudioInfo(){let e=null;return this.player&&(e=this.player.getAudioInfo()),e}setSm4CryptoKey(e){this.debug.log("JbPro","setSm4CryptoKey()",e),32===(e=""+e).length?(this._opt.sm4CryptoKey=e,this.player?this.player.updateOption({sm4CryptoKey:e},!0):this.debug.warn("JbPro","setSm4CryptoKey() player is null")):this.debug.warn("JbPro",`setSm4CryptoKey() key is invalid and length is ${e.length} !== 32`)}setM7sCryptoKey(e){this.debug.log("JbPro","setM7sCryptoKey()",e),e=""+e,this._opt.m7sCryptoKey=e,this.player?this.player.updateOption({m7sCryptoKey:e},!0):this.debug.warn("JbPro","setM7sCryptoKey() player is null")}setXorCryptoKey(e){this.debug.log("JbPro","setXorCryptoKey()",e),e=""+e,this._opt.xorCryptoKey=e,this.player?this.player.updateOption({xorCryptoKey:e},!0):this.debug.warn("JbPro","setXorCryptoKey() player is null")}updateLoadingText(e){this.debug.log("JbPro","updateLoadingText()",e),this.player?this.player.updateLoadingText(e):this.debug.warn("JbPro","updateLoadingText() player is null")}updateIsEmitSEI(e){this.debug.log("JbPro","updateIsEmitSEI()",e),this._opt.isEmitSEI=e,this.player?this.player.updateOption({isEmitSEI:e},!0):this.debug.warn("JbPro","updateIsEmitSEI() player is null")}getPTZCmd(e,t){if(this.debug.log("JbPro","getPTZCmd()",e),e)return this.player?M_({type:e,index:0,speed:t}):void this.debug.warn("JbPro","getPTZCmd() player is null");this.debug.warn("JbPro","getPTZCmd() ptz is null")}downloadTempNakedFlowFile(){return new Promise(((e,t)=>{this.player?(this.player.downloadNakedFlowFile(),e()):t("player is not init")}))}downloadTempFmp4File(){return new Promise(((e,t)=>{this.player?(this.player.downloadFmp4File(),e()):t("player is not init")}))}downloadTempMpeg4File(){return new Promise(((e,t)=>{this.player?(this.player.downloadMpeg4File(),e()):t("player is not init")}))}downloadTempRtpFile(){return new Promise(((e,t)=>{this.talk?(this.talk.downloadRtpFile(),e()):t("talk is not init")}))}downloadMemoryLog(){this.memoryLogger&&this.memoryLogger.download()}_getVideoLastIframeInfo(){const e=this.getVideoInfo()||{},t={loadingBackground:this.screenshot("","png",.92,"base64"),loadingBackgroundWidth:e.width||0,loadingBackgroundHeight:e.height||0};return t.loadingBackground&&t.loadingBackgroundWidth&&t.loadingBackgroundHeight&&(this._tempVideoLastIframeInfo=t),this._tempVideoLastIframeInfo||{}}getExtendBtnList(){this.debug.log("JbPro","getExtendBtnList()");let e=[];return this.player?e=this.player.getExtendBtnList():this.debug.warn("JbPro","getExtendBtnList() player is null"),e}getFlvMetaData(){this.debug.log("JbPro","getFlvMetaData()");let e=null;return this.player?e=this.player.getMetaData():this.debug.warn("JbPro","getFlvMetaData() player is null"),e}updateAiFaceDetectInterval(e){this.debug.log("JbPro","updateAiFaceDetectInterval()",e);const t=1e3*(e=Number(e));this._opt.aiFaceDetectInterval=t,this.player?this.player.updateOption({aiFaceDetectInterval:t}):this.debug.warn("JbPro","updateAiFaceDetectInterval() player is null")}updateAiFaceDetectLevel(e){if(this.debug.log("JbPro","updateAiFaceDetectLevel()",e),!cr[e])return void this.debug.warn("JbPro",`'updateAiFaceDetectLevel() level ${e} is invalid'`);const t=cr[e];this._opt.aiFaceDetectWidth=t,this.player?(this.player.updateOption({aiFaceDetectWidth:t}),this.player.ai&&this.player.ai.updateFaceDetectorConfig({detectWidth:t})):this.debug.warn("JbPro","updateAiFaceDetectLevel() player is null")}updateAiObjectDetectInterval(e){this.debug.log("JbPro","updateAiObjectDetectInterval()",e);const t=1e3*(e=Number(e));this._opt.aiObjectDetectInterval=t,this.player?this.player.updateOption({aiObjectDetectInterval:t}):this.debug.warn("JbPro","updateAiObjectDetectInterval() player is null")}updateAiObjectDetectLevel(e){if(this.debug.log("JbPro","updateAiObjectDetectLevel()",e),!ur[e])return void this.debug.warn("JbPro",`'updateAiObjectDetectLevel() level ${e} is invalid'`);const t=ur[e];this._opt.aiObjectDetectWidth=t,this.player?(this.player.updateOption({aiObjectDetectWidth:t}),this.player.ai&&this.player.ai.updateObjectDetectorConfig({detectWidth:t})):this.debug.warn("JbPro","updateAiObjectDetectLevel() player is null")}setCryptoKeyUrl(e){this.debug.log("JbPro","setCryptoKeyUrl()",e),e&&(this._opt.cryptoKeyUrl=e)}showErrorMessageTips(e){this.debug.log("JbPro","showErrorMessageTips()",e),e&&(this.player?this.player.showTipsMessageByContent(e):this.debug.warn("JbPro","showErrorMessageTips() player is null"))}setPtzPosition(e){this.debug.log("JbPro","setPtzPosition()",e),e&&!qa(e)&&(this.player?this.player.setPtzPosition(e):this.debug.warn("JbPro","setPtzPosition() player is null"))}hideErrorMessageTips(){this.debug.log("JbPro","hideErrorMessageTips()"),this.player?this.player.hideTipsMessage():this.debug.warn("JbPro","hideErrorMessageTips() player is null")}getContainerRect(){return this._getContainerRect()}proxy(e,t,i,s){return this.events.proxy(e,t,i,s)}_checkIsMeaningfulRetry(e){let t=!0,i=[];if(e===Br?i=this._websocket1006ErrorRetryLog:e===Mr?i=this._mseDecodeErrorRetryLog:e===Ur&&(i=this._wcsDecodeErrorRetryLog),this.debug.log(this.TAG_NAME,`_checkIsMeaningfulRetry() type is ${e}, and retryLog is ${i.join(",")}`),i.length>=5){const s=i[0],r=i[i.length-1],a=r-s;a<=1e4&&(this.debug.warn(this.TAG_NAME,`retry type is ${e}, and retry length is ${i.length}, and start is ${s} and end is ${r} and diff is ${a}`),t=!1)}return t}_initLoadingBackgroundForIOS(e){(wa()||Sa())&&e.loadingBackground&&e.loadingBackgroundWidth&&e.loadingBackgroundHeight&&(this.debug.log(this.TAG_NAME,"_initLoadingBackgroundForIOS"),this._initLoadingBg(),"default"===this.player._opt.aspectRatio||ya()?this._doInitLoadingBackground(e):this._doInitLoadingBackgroundForRatio(e))}_doInitLoadingBackground(e){const t=this._getContainerRect();let i=t.height;const s=this.player._opt;if(s.hasControl&&!s.controlAutoHide){i-=s.playType===w?Qt:Yt}let r=t.width,a=i;const o=s.rotate;270!==o&&90!==o||(r=i,a=t.width),this.$loadingBgImage.width=r,this.$loadingBgImage.height=a,this.$loadingBgImage.src=e.loadingBackground;let n=(t.width-r)/2,l=(i-a)/2,d="contain";s.isResize||(d="fill"),s.isFullResize&&(d="none");let h="";"none"===s.mirrorRotate&&o&&(h+=" rotate("+o+"deg)"),"level"===s.mirrorRotate?h+=" rotateY(180deg)":"vertical"===s.mirrorRotate&&(h+=" rotateX(180deg)"),this._opt.videoRenderSupportScale&&(this.$loadingBgImage.style.objectFit=d),this.$loadingBgImage.style.transform=h,this.$loadingBgImage.style.padding="0",this.$loadingBgImage.style.left=n+"px",this.$loadingBgImage.style.top=l+"px",this.$loadingBgImage.complete?Ph(this.$loadingBg,"show"):this.$loadingBgImage.onload=()=>{Ph(this.$loadingBg,"show"),this.$loadingBgImage.onload=null}}_doInitLoadingBackgroundForRatio(e){const t=this.player._opt.aspectRatio.split(":").map(Number),i=this._getContainerRect();let s=i.width,r=i.height;const a=this.player._opt;let o=0;a.hasControl&&!a.controlAutoHide&&(o=a.playType===w?Qt:Yt,r-=o);const n=e.loadingBackgroundWidth,l=e.loadingBackgroundHeight,d=n/l,h=t[0]/t[1];if(this.$loadingBgImage.src=e.loadingBackground,d>h){const e=h*l/n;this.$loadingBgImage.style.width=100*e+"%",this.$loadingBgImage.style.height=`calc(100% - ${o}px)`,this.$loadingBgImage.style.padding=`0 ${(s-s*e)/2}px`}else{const e=n/h/l;this.$loadingBgImage.style.width="100%",this.$loadingBgImage.style.height=`calc(${100*e}% - ${o}px)`,this.$loadingBgImage.style.padding=(r-r*e)/2+"px 0"}this.$loadingBgImage.complete?Ph(this.$loadingBg,"show"):this.$loadingBgImage.onload=()=>{Ph(this.$loadingBg,"show"),this.$loadingBgImage.onload=null}}_initLoadingBg(){if(!this.$loadingBg){const e=document.createElement("div"),t=document.createElement("img");e.className="jb-pro-loading-bg-for-ios",this.$loadingBg=e,this.$loadingBgImage=t,e.appendChild(t),this.$container.appendChild(e)}}_removeLoadingBackgroundForIOS(){if(this.$loadingBg){this.debug.log(this.TAG_NAME,"_removeLoadingBackgroundForIOS()");if(!Fh(this.$loadingBg)){const e=this.$container.querySelector(".jb-pro-loading-bg-for-ios");e&&this.$container&&this.$container.removeChild(e)}this.$loadingBg=null,this.$loadingBgImage=null}}_getContainerRect(){let e={};return this.$container&&(e=this.$container.getBoundingClientRect(),e.width=Math.max(e.width,this.$container.clientWidth),e.height=Math.max(e.height,this.$container.clientHeight)),e}_isNeedNetworkDisconnectReplay(){return this._opt.networkDisconnectReplay&&this.network.isOffline()}}$_.ERROR=ut,$_.EVENTS=dt,window.JessibucaPro=$_,window.JbPro=$_,window.WebPlayerPro=$_;Nh('.jb-pro-multi-container .jb-pro-multi-player-container-v2{overflow:hidden;width:100%;height:100%;position:relative;display:grid;grid-template-columns:repeat(var(--split),1fr);grid-template-rows:repeat(var(--split),1fr)}.jb-pro-multi-container .jb-pro-multi-player-container-v2 .jb-pro-multi-player{overflow:hidden;position:relative;width:100%;height:100%}.jb-pro-multi-container .jb-pro-multi-player-container-v2 .jb-pro-multi-player .jb-pro-multi-player-draw-window{position:absolute;z-index:1;width:calc(100% - 2px);height:calc(100% - 2px);color:#fff;transition:all .25s}.jb-pro-multi-container .jb-pro-multi-player-container-v2 .jb-pro-multi-player .jb-pro-multi-player-video-window{position:absolute;left:1px;top:1px;z-index:2;width:calc(100% - 2px);height:calc(100% - 2px)}.jb-pro-multi-container .jb-pro-multi-player[fullscreen="1"]{grid-column-start:1;grid-column-end:9;grid-row-start:1;grid-row-end:9}.jb-pro-multi-container .jb-pro-multi-layout-6 .jb-pro-multi-player[order="0"]{grid-column-start:1;grid-column-end:3;grid-row-start:1;grid-row-end:3}.jb-pro-multi-container .jb-pro-multi-layout-9 .jb-pro-multi-player[order="0"]{grid-column-start:1;grid-column-end:4;grid-row-start:1;grid-row-end:4}');class H_ extends a{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this._opt={},Object.keys(e).forEach((t=>{if(void 0===e[t])throw new Error(`jb-pro-multi option "${t}" can not be undefined`)}));const t=po(Gs);this._opt=Object.assign({},t,e),this.LOG_TAG="jbProMulti";let i=e.container;if("string"==typeof e.container&&(i=document.querySelector(e.container)),!i)throw new Error("Jb-pro-multi need container option");if("CANVAS"===i.nodeName||"VIDEO"===i.nodeName)throw new Error(`Jb-pro-multi container type can not be ${i.nodeName} type`);i.classList.add("jb-pro-multi-container"),this.maxWindowSize=this._opt.maxSplit*this._opt.maxSplit,this.currentWindowIndex=-1,this.currentWindowUuid=null,this.specialLayoutType=null,this.startDragWindowItem=null,this.windowList=[],this.$container=i,this.debug=new Fr(this),this.events=new xo(this),this._opt.split||(this._opt.split=1),yo(this._opt.draggable)?this._initWindows$2():this._initWindows(),this._innerArrangeWindow(this._opt.split,!0),this._initEvents(),this._handleWindowSelect(0),this._listenFullscreenChange()}destroy(){return new Promise(((e,t)=>{if(this.debug.log(this.LOG_TAG,"destroy()"),this.off(),this.events&&(this.events.destroy(),this.events=null),this.specialLayoutType=null,this.startDragWindowItem=null,this.currentWindowUuid=null,this.currentWindowIndex=-1,this.$container&&(this.$container.classList.remove("jb-pro-multi-container"),this.$container=null),this.windowList){const i=[];this.windowList.forEach((e=>{e.$playerContainerEvents.forEach((e=>{e()})),e.player&&i.push(e.player.destroy())})),Promise.all(i).then((()=>{this.windowList.forEach((e=>{e.player=null})),this.windowList=[],e()})).catch((e=>{t(e)}))}else e();this.debug&&this.debug.log(this.LOG_TAG,"destroy")}))}_createPlayer(e){var t=this;const i=this._findWindowItemIndex(e);e.uuid;const s=this._opt;s.supportDblclickContainerFullscreen&&(s.supportDblclickFullscreen=!1);const r=new $_({...s,isMulti:!0,multiIndex:i,container:e.$player});return Object.keys(dt).forEach((e=>{r.on(dt[e],(function(){for(var s=arguments.length,r=new Array(s),a=0;a<s;a++)r[a]=arguments[a];t.emit(e,i,...r)}))})),r.on(lt.close,(()=>{this.emit(lt.close,i),e.player=null})),r}_initWindows(){let e="";for(let t=0;t<this.maxWindowSize;t++)e+=`\n <div class="jb-pro-multi-player" wid="${t}" style='float: left;position:relative;overflow: hidden; background-color:${this._opt.style.background};'>\n <div class="jb-pro-multi-player-draw-window" wid="${t}" style='position:absolute; z-index: 1; border: 1px solid ${this._opt.style.border};'></div>\n <div class="jb-pro-multi-player-video-window" wid="${t}" style='position:absolute;left: 1px;top:1px; z-index: 2;'></div>\n </div>\n `;const t=`<div class="jb-pro-multi-player-container" style="overflow: hidden;width:100%; height:100%; position: relative;">${e}</div>`;this.$container.innerHTML=t;const i=this.$container.querySelectorAll(".jb-pro-multi-player");for(let e=0;e<this.maxWindowSize;e++){const t=i[e],s=t.querySelector(".jb-pro-multi-player-draw-window"),r=t.querySelector(".jb-pro-multi-player-video-window"),a=Ca();bo(t,"uuid",a),this.windowList[e]={uuid:a,isContainerFullscreen:!1,$playerContainer:t,$playerBorder:s,$player:r,$playerContainerEvents:[],player:null}}}_initWindows$2(){let e="";const t=this._opt.split;for(let t=0;t<this.maxWindowSize;t++)e+=`\n <div class="jb-pro-multi-player" wid="${t}" order='${t}' style='order:${t};background-color:${this._opt.style.background};'>\n <div class="jb-pro-multi-player-draw-window" wid="${t}"></div>\n <div class="jb-pro-multi-player-video-window" wid="${t}"></div>\n </div>\n `;const i=`<div class="jb-pro-multi-player-container-v2" style="--split:${t}">\n ${e}\n </div>`;this.$container.innerHTML=i,this.$multiContainer=this.$container.querySelector(".jb-pro-multi-player-container-v2");const s=this.$container.querySelectorAll(".jb-pro-multi-player");for(let e=0;e<this.maxWindowSize;e++){const t=s[e],i=t.querySelector(".jb-pro-multi-player-draw-window"),r=t.querySelector(".jb-pro-multi-player-video-window"),a=Ca();bo(t,"uuid",a),this.windowList[e]={uuid:a,isContainerFullscreen:!1,$playerContainer:t,$playerBorder:i,$player:r,$playerContainerEvents:[],player:null}}}_initEvents(){const{proxy:e}=this.events;this.windowList.forEach(((t,i)=>{const s=t.$playerContainer,r=e(s,"click",(e=>{const t=_o(s,"uuid"),i=this._findWindowItemIndexByUuid(t);if(this.emit(zs.selected,i,e),this.getSelectedWindowUuid()===t){if(this._getWindowItem(t).isContainerFullscreen)return}1!==this._opt.split&&this._handleWindowSelect(i)})),a=e(s,"dblclick",(e=>{const t=_o(s,"uuid"),i=this._findWindowItemIndexByUuid(t);this.emit(zs.dblSelected,i,e),this._opt.supportDblclickContainerFullscreen&&1!==this._opt.split&&this._handleWindowContainerFullscreen(i)})),o=e(s,"mouseup",(e=>{const t=_o(s,"uuid"),i=this._findWindowItemIndexByUuid(t);this.emit(zs.mouseup,i,e)})),n=e(s,"mouseover",(e=>{const t=_o(s,"uuid"),i=this._findWindowItemIndexByUuid(t);this.emit(zs.mouseover,i,e)})),l=e(s,"mouseout",(e=>{const t=_o(s,"uuid"),i=this._findWindowItemIndexByUuid(t);this.emit(zs.mouseout,i,e)})),d=e(s,"mousedown",(e=>{const t=_o(s,"uuid"),i=this._findWindowItemIndexByUuid(t);this.emit(zs.mousedown,i,e)})),h=e(s,"dragover",(e=>{e.preventDefault()})),c=e(s,"dragenter",(e=>{const t=_o(s,"uuid"),i=this._findWindowItemIndexByUuid(t);this.emit(zs.dragenter,i,e)})),u=e(s,"dragleave",(e=>{const t=_o(s,"uuid"),i=this._findWindowItemIndexByUuid(t);this.emit(zs.dragleave,i,e)})),p=e(s,"drop",(e=>{const t=_o(s,"uuid"),i=this._findWindowItemIndexByUuid(t);if(e.preventDefault(),this._opt.draggable&&this.startDragWindowItem){const e=this.startDragWindowItem.$playerContainer,t=e.style.order;e.style.order=s.style.order,e.setAttribute("order",e.style.order),s.setAttribute("order",t),s.style.order=t,this.debug.log(this.LOG_TAG,`player Drop ${t} -> ${e.style.order}`),this._sortWindows()}this.emit(zs.drop,i,e)}));if(t.$playerContainerEvents=[r,o,n,l,d,a,h,c,u,p],this._opt.draggable){const i=e(s,"dragstart",(e=>{const t=_o(s,"uuid"),i=this._findWindowItemIndexByUuid(t);this._handleWindowSelect(i),this.startDragWindowItem=this._getWindowItem(i),this.emit(zs.dragstart,i,e,s)}));t.$playerContainerEvents.push(i)}if(this._opt.supportMousemoveEvent){const i=e(s,"mousemove",(e=>{const t=_o(s,"uuid"),i=this._findWindowItemIndexByUuid(t);this.emit(zs.mousemove,i,e)}));t.$playerContainerEvents.push(i)}}))}_getContainerRect(){const e=this.$container.getBoundingClientRect();return{width:parseInt(e.width),height:parseInt(e.height)}}_updateWindows(){const e=this._getContainerRect(),t=e.width,i=e.height,s=this._opt.split,r=t%s,a=i%s,o=(t-r-2*s)/s,n=(i-a-2*s)/s,l=(t-r)/s,d=(i-a)/s;let h=this._getCurrentMaxSplit();for(let e=0;e<h;e++){const t=this.windowList[e];t.isContainerFullscreen=!1;const i=t.$playerContainer;i.style.position="relative",i.style.left="auto",i.style.top="auto",i.style.zIndex="auto";const h=t.$playerBorder,c=t.$player,u=o+(e%s==s-1?r:0),p=n+(e+s>=Math.pow(s,2)?a:0),f=l+(e%s==s-1?r:0),m=d+(e+s>=Math.pow(s,2)?a:0);i.style.width=f+"px",i.style.height=m+"px",i.style.display="block",c.style.width=u+"px",c.style.height=p+"px",c.style.display="block",h.style.width=u+"px",h.style.height=p+"px",h.style.display="block",t.player&&t.player.resize()}if(this.specialLayoutType){const e=this.windowList[0],t=e.$playerContainer,i=e.$player,s=e.$playerBorder,r=t.style.width.replace("px",""),a=t.style.height.replace("px",""),o=i.style.width.replace("px",""),n=i.style.height.replace("px","");let l,d,c,u;this.specialLayoutType===$s?(l=2*r,d=2*a,c=2*o+2,u=2*n+2):this.specialLayoutType===Hs&&(l=3*r,d=3*a,c=3*o+4,u=3*n+4),t.style.width=l+"px",t.style.height=d+"px",i.style.width=c+"px",i.style.height=u+"px",s.style.width=c+"px",s.style.height=u+"px",e.player&&e.player.resize(),h=this._getSpecialMaxSplit()}for(let e=h;e<this.maxWindowSize;e++){const t=this.windowList[e];t.player&&(t.player.destroy(),t.player=null),t.$playerContainer.style.display="none",t.$playerContainer.style.width="0",t.$playerContainer.style.height="0",t.$player.style.display="none",t.$playerBorder.style.display="none"}if(1===this._opt.split){this.windowList[0].$playerBorder.style.display="none"}}_updateWindows$2(){const e=this._opt.split;let t=this._getCurrentMaxSplit();if(this.$multiContainer){const t="jb-pro-multi-layout-6",i="jb-pro-multi-layout-9";this.$multiContainer.classList.remove(t,i),this.specialLayoutType===$s?this.$multiContainer.classList.add(t):this.specialLayoutType===Hs&&this.$multiContainer.classList.add(i),this.$multiContainer.style.setProperty("--split",`${e}`)}this._sortWindows();for(let e=t;e<this.maxWindowSize;e++){const t=this.windowList[e];t&&t.player&&(t.player.destroy(),t.player=null)}if(1===this._opt.split){this.windowList[0].$playerBorder.style.display="none"}this.windowList.forEach((e=>{e.$playerContainer.draggable=this._opt.split>1}))}_sortWindows(){const e=[];for(let t=0;t<this.maxWindowSize;t++){const i=this.windowList[t];e[i.$playerContainer.style.order]=i}this.windowList=e}_handleWindowSelect(e){const t=this._getWindowItem(e);t?(this.currentWindowIndex=this._findWindowItemIndex(t),this.currentWindowUuid=t.uuid,this.windowList.length>1&&(this.windowList.forEach((e=>{t.$playerBorder.style.display="block",e.$playerBorder.style.border=`1px solid ${this._opt.style.border}`})),this._opt.showSelectedBorder&&(t.$playerBorder.style.border=`1px solid ${this._opt.style.borderSelect}`))):this.debug.warn(this.LOG_TAG,`_handleWindowSelect() ${e} is not exist`),1===this._opt.split&&(t.$playerBorder.style.display="none")}_handleWindowContainerFullscreen(e,t){const i=this._getWindowItem(e);if(i){if(Fa(t)&&t===i.isContainerFullscreen)return;if(this._opt.draggable)i.isContainerFullscreen?(i.$playerContainer.setAttribute("fullscreen","0"),i.$playerContainer.style.fullscreen="0"):(i.$playerContainer.setAttribute("fullscreen","1"),i.$playerContainer.style.fullscreen="1");else if(i.isContainerFullscreen)i.$playerContainer.style.position="relative",i.$playerContainer.style.left="auto",i.$playerContainer.style.top="auto",i.$playerContainer.style.zIndex="auto",i.$playerContainer.style.width=i.prevInfo.playerContainerWidth,i.$playerContainer.style.height=i.prevInfo.playerContainerHeight,i.$player.style.width=i.prevInfo.playerWidth,i.$player.style.height=i.prevInfo.playerHeight,this.getSelectedWindowUuid()===i.uuid&&(i.$playerBorder.style.display="block");else{const e=this._getContainerRect(),t=e.width,s=e.height;i.prevInfo={playerContainerWidth:i.$playerContainer.style.width,playerContainerHeight:i.$playerContainer.style.height,playerWidth:i.$player.style.width,playerHeight:i.$player.style.height},i.$playerContainer.style.position="absolute",i.$playerContainer.style.top="0",i.$playerContainer.style.left="0",i.$playerContainer.style.zIndex="10",i.$playerContainer.style.width=t+"px",i.$playerContainer.style.height=s+"px",i.$player.style.width=t+"px",i.$player.style.height=s+"px",i.$playerBorder.style.display="none"}i.isContainerFullscreen=!i.isContainerFullscreen,i.player&&i.player.resize()}else this.debug.warn(this.LOG_TAG,`handleWindowContainerFullscreen() ${e} is not exist`)}_handleFullscreenResize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5,t=this._getContainerRect(),i=0;const s=setInterval((()=>{const r=jr.isFullscreen,a=this._getContainerRect(),o={width:screen.width,height:screen.height};this.debug.log(this.LOG_TAG,`isInFullscreen ${r} , checkRectInterval times : ${i} nowRect:${JSON.stringify(a)}, prevRect:${JSON.stringify(t)} ,window screen rect:${JSON.stringify(o)}`);const n=a.width===t.width&&a.height===t.height,l=!r||o.width-a.width<10&&o.height-a.height<10;if(n&&l||i>=e)return this.resize(),void clearInterval(s);t=a,i++}),1e3)}_listenFullscreenChange(){try{const e=e=>{Za(e)===this.$container&&(this.emit(zs.multiFullscreen,jr.isFullscreen),jr.isFullscreen||-1!==window.navigator.userAgent.indexOf("Edg")?this._handleFullscreenResize():this.resize())};jr.on("change",e),this.events.destroys.push((()=>{jr.off("change",e)}))}catch(e){}}play(e,t,i){return new Promise(((s,r)=>{(Da(t)||Ya(t))&&(i=t,t={});const a=this._getWindowItem(i);if(a)if(a.player)a.player.play(e,t).then((()=>{s()})).catch((e=>{r(e)}));else{const i=this._createPlayer(a);a.player=i,i.play(e,t).then((()=>{s()})).catch((e=>{r(e)}))}else r(`play() windowIndex ${selectedWindowIndex} is not exist`)}))}getOption(e){const t=this._getWindowItem(e);return t&&t.player?t.player.getOption():(this.debug.warn(this.LOG_TAG,`getOption() windowIndex ${e} is not exist`),{})}setDebug(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setDebug(e):this.debug.warn(this.LOG_TAG,`setDebug() windowIndex ${t} is not exist`)}mute(e){const t=this._getWindowItem(e);t&&t.player?t.player.mute():this.debug.warn(this.LOG_TAG,`mute() windowIndex ${e} is not exist`)}cancelMute(e){const t=this._getWindowItem(e);t&&t.player?t.player.cancelMute():this.debug.warn(this.LOG_TAG,`cancelMute() windowIndex ${e} is not exist`)}setVolume(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setVolume(e):this.debug.warn(this.LOG_TAG,`setVolume() windowIndex ${t} is not exist`)}audioResume(e){const t=this._getWindowItem(e);t&&t.player?t.player.audioResume():this.debug.warn(this.LOG_TAG,`audioResume() windowIndex ${e} is not exist`)}setTimeout(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setTimeout(e):this.debug.warn(this.LOG_TAG,`setTimeout() windowIndex ${t} is not exist`)}setScaleMode(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setScaleMode(e):this.debug.warn(this.LOG_TAG,`setScaleMode() windowIndex ${t} is not exist`)}pause(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return new Promise(((i,s)=>{const r=this._getWindowItem(t);r&&r.player?r.player.pause(e).then((()=>{i()})).catch((e=>{s(e)})):s(`pause() windowIndex ${t} is not exist`)}))}close(e){return new Promise(((t,i)=>{const s=this._getWindowItem(e);s&&s.player?s.player.close().then((()=>{t()})).catch((e=>{i(e)})):i(`close() windowIndex ${e} is not exist`)}))}clearView(e){const t=this._getWindowItem(e);t&&t.player?t.player.clearView():this.debug.warn(this.LOG_TAG,`clearView() windowIndex ${e} is not exist`)}setStreamQuality(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setStreamQuality(e):this.debug.warn(this.LOG_TAG,`setStreamQuality() windowIndex ${t} is not exist`)}resize(){this._opt.draggable?this._updateWindows$2():this._updateWindows()}setBufferTime(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setBufferTime(e):this.debug.warn(this.LOG_TAG,`setBufferTime() windowIndex ${t} is not exist`)}setBufferDelayTime(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setBufferDelayTime(e):this.debug.warn(this.LOG_TAG,`setBufferDelayTime() windowIndex ${t} is not exist`)}setRotate(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setRotate(e):this.debug.warn(this.LOG_TAG,`setRotate() windowIndex ${t} is not exist`)}setMirrorRotate(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setMirrorRotate(e):this.debug.warn(this.LOG_TAG,`setMirrorRotate() windowIndex ${t} is not exist`)}updateIsEmitSEI(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.updateIsEmitSEI(e):this.debug.warn(this.LOG_TAG,`updateIsEmitSEI() windowIndex ${t} is not exist`)}setAspectRatio(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setAspectRatio(e):this.debug.warn(this.LOG_TAG,`setAspectRatio() windowIndex ${t} is not exist`)}hasLoaded(e){const t=this._getWindowItem(e);return!(!t||!t.player)&&t.player.hasLoaded()}setKeepScreenOn(e){const t=this._getWindowItem(e);t&&t.player?t.player.setKeepScreenOn():this.debug.warn(this.LOG_TAG,`setKeepScreenOn() windowIndex ${e} is not exist`)}setFullscreen(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setFullscreen(e):this.debug.warn(this.LOG_TAG,`setFullscreen() windowIndex ${t} is not exist`)}screenshot(e,t){const i=this._getWindowItem(t);return i&&i.player?i.player.screenshot(e.filename,e.format,e.quality,e.type):null}screenshotWatermark(e,t){const i=this._getWindowItem(t);return i&&i.player?i.player.screenshotWatermark(e):null}startRecord(e,t,i){return new Promise(((s,r)=>{const a=this._getWindowItem(i);a&&a.player?a.player.startRecord(e,t).then((()=>{s()})).catch((e=>{r(e)})):(this.debug.warn(this.LOG_TAG,`startRecord() windowIndex ${i} is not exist`),r(`windowIndex ${i} is not exist`))}))}stopRecordAndSave(e,t,i){return new Promise(((s,r)=>{const a=this._getWindowItem(i);a&&a.player?a.player.stopRecordAndSave(e,t).then((e=>{s(e)})).catch((e=>{r(e)})):(this.debug.warn(this.LOG_TAG,`stopRecordAndSave() windowIndex ${i} is not exist`),r(`windowIndex ${i} is not exist`))}))}isPlaying(e){const t=this._getWindowItem(e);return t&&t.player?t.player.isPlaying():(this.debug.warn(this.LOG_TAG,`isPlaying() windowIndex ${e} is not exist`),!1)}isLoading(e){const t=this._getWindowItem(e);return t&&t.player?t.player.isLoading():(this.debug.warn(this.LOG_TAG,`isLoading() windowIndex ${e} is not exist`),!1)}isPaused(e){const t=this._getWindowItem(e);return t&&t.player?t.player.isPaused():(this.debug.warn(this.LOG_TAG,`windowIndex ${e} is not exist`),!1)}isMute(e){const t=this._getWindowItem(e);return t&&t.player?t.player.isMute():(this.debug.warn(this.LOG_TAG,`isMute() windowIndex ${e} is not exist`),!1)}isRecording(e){const t=this._getWindowItem(e);return t&&t.player?t.player.isRecording():(this.debug.warn(this.LOG_TAG,`isRecording() windowIndex ${e} is not exist`),!1)}clearBufferDelay(e){const t=this._getWindowItem(e);t&&t.player?t.player.clearBufferDelay():this.debug.warn(this.LOG_TAG,`clearBufferDelay() windowIndex ${e} is not exist`)}setNetworkDelayTime(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setNetworkDelayTime(e):this.debug.warn(this.LOG_TAG,`setNetworkDelayTime() windowIndex ${t} is not exist`)}getDecodeType(e){const t=this._getWindowItem(e);return t&&t.player?t.player.getDecodeType():(this.debug.warn(this.LOG_TAG,`getDecodeType() windowIndex ${e} is not exist`),null)}getRenderType(e){const t=this._getWindowItem(e);return t&&t.player?t.player.getRenderType():(this.debug.warn(this.LOG_TAG,`windowIndex ${e} is not exist`),null)}getAudioEngineType(e){const t=this._getWindowItem(e);return t&&t.player?t.player.getAudioEngineType():(this.debug.warn(this.LOG_TAG,`windowIndex ${e} is not exist`),null)}getPlayingTimestamp(e){const t=this._getWindowItem(e);return t&&t.player?t.player.getPlayingTimestamp():(this.debug.warn(this.LOG_TAG,`windowIndex ${e} is not exist`),null)}getStatus(e){const t=this._getWindowItem(e);return t&&t.player?t.player.getStatus():(this.debug.warn(this.LOG_TAG,`getStatus() windowIndex ${e} is not exist`),null)}getPlayType(e){const t=this._getWindowItem(e);return t&&t.player?t.player.getPlayType():(this.debug.warn(this.LOG_TAG,`getPlayType() windowIndex ${e} is not exist`),null)}togglePerformancePanel(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.togglePerformancePanel(e):this.debug.warn(this.LOG_TAG,`togglePerformancePanel() windowIndex ${t} is not exist`)}openZoom(e){const t=this._getWindowItem(e);t&&t.player?t.player.openZoom():this.debug.warn(this.LOG_TAG,`openZoom() windowIndex ${e} is not exist`)}closeZoom(e){const t=this._getWindowItem(e);t&&t.player?t.player.closeZoom():this.debug.warn(this.LOG_TAG,`closeZoom() windowIndex ${e} is not exist`)}isZoomOpen(e){const t=this._getWindowItem(e);return t&&t.player?t.player.isZoomOpen():(this.debug.warn(this.LOG_TAG,`isZoomOpen() windowIndex ${e} is not exist`),!1)}expandZoom(e){const t=this._getWindowItem(e);t&&t.player?t.player.expandZoom():this.debug.warn(this.LOG_TAG,`expandZoom() windowIndex ${e} is not exist`)}narrowZoom(e){const t=this._getWindowItem(e);t&&t.player?t.player.narrowZoom():this.debug.warn(this.LOG_TAG,`narrowZoom() windowIndex ${e} is not exist`)}getCurrentZoomIndex(e){const t=this._getWindowItem(e);return t&&t.player?t.player.getCurrentZoomIndex():(this.debug.warn(this.LOG_TAG,`getCurrentZoomIndex() windowIndex ${e} is not exist`),0)}setNakedFlowFps(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setNakedFlowFps(e):this.debug.warn(this.LOG_TAG,`setNakedFlowFps() windowIndex ${t} is not exist`)}updateDebugLevel(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.updateDebugLevel(e):this.debug.warn(this.LOG_TAG,`updateDebugLevel() windowIndex ${t} is not exist`)}updateWatermark(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.updateWatermark(e):this.debug.warn(this.LOG_TAG,`updateWatermark() windowIndex ${t} is not exist`)}removeWatermark(e){const t=this._getWindowItem(e);t&&t.player?t.player.removeWatermark():this.debug.warn(this.LOG_TAG,`removeWatermark() windowIndex ${e} is not exist`)}updateFullscreenWatermark(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.updateFullscreenWatermark(e):this.debug.warn(this.LOG_TAG,`updateFullscreenWatermark() windowIndex ${t} is not exist`)}removeFullscreenWatermark(e){const t=this._getWindowItem(e);t&&t.player?t.player.removeFullscreenWatermark():this.debug.warn(this.LOG_TAG,`removeFullscreenWatermark() windowIndex ${e} is not exist`)}faceDetectOpen(e){const t=this._getWindowItem(e);t&&t.player?t.player.faceDetectOpen():this.debug.warn(this.LOG_TAG,`faceDetectOpen() windowIndex ${e} is not exist`)}faceDetectClose(e){const t=this._getWindowItem(e);t&&t.player?t.player.faceDetectClose():this.debug.warn(this.LOG_TAG,`faceDetectClose() windowIndex ${e} is not exist`)}objectDetectOpen(e){const t=this._getWindowItem(e);t&&t.player?t.player.objectDetectOpen():this.debug.warn(this.LOG_TAG,`objectDetectOpen() windowIndex ${e} is not exist`)}objectDetectClose(e){const t=this._getWindowItem(e);t&&t.player?t.player.objectDetectClose():this.debug.warn(this.LOG_TAG,`objectDetectClose() windowIndex ${e} is not exist`)}sendWebsocketMessage(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.sendWebsocketMessage(e):this.debug.warn(this.LOG_TAG,`sendWebsocketMessage() windowIndex ${t} is not exist`)}addContentToCanvas(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.addContentToCanvas(e):this.debug.warn(this.LOG_TAG,`addContentToCanvas() windowIndex ${t} is not exist`)}clearContentToCanvas(e){const t=this._getWindowItem(e);t&&t.player?t.player.clearContentToCanvas():this.debug.warn(this.LOG_TAG,`clearContentToCanvas() windowIndex ${e} is not exist`)}setControlHtml(e,t){const i=this._getWindowItem(t);i&&i.player?i.player.setControlHtml(e):this.debug.warn(this.LOG_TAG,`setControlHtml() windowIndex ${t} is not exist`)}clearControlHtml(e){const t=this._getWindowItem(e);t&&t.player?t.player.clearControlHtml():this.debug.warn(this.LOG_TAG,`clearControlHtml() windowIndex ${e} is not exist`)}getFlvMetaData(e){const t=this._getWindowItem(e);return t&&t.player?t.player.getFlvMetaData():(this.debug.warn(this.LOG_TAG,`getFlvMetaData() windowIndex ${e} is not exist`),null)}getExtendBtnList(e){const t=this._getWindowItem(e);return t&&t.player?t.player.getExtendBtnList():(this.debug.warn(this.LOG_TAG,`getExtendBtnList() windowIndex ${e} is not exist`),null)}updateAiFaceDetectInterval(e,t){const i=this._getWindowItem(t);if(!i||!i.player)return this.debug.warn(this.LOG_TAG,`updateAiFaceDetectInterval() windowIndex ${t} is not exist`),null;i.player.updateAiFaceDetectInterval(e)}updateAiFaceDetectLevel(e,t){const i=this._getWindowItem(t);if(!i||!i.player)return this.debug.warn(this.LOG_TAG,`updateAiFaceDetectLevel() windowIndex ${t} is not exist`),null;i.player.updateAiFaceDetectLevel(e)}updateAiObjectDetectInterval(e,t){const i=this._getWindowItem(t);if(!i||!i.player)return this.debug.warn(this.LOG_TAG,`updateAiObjectDetectInterval() windowIndex ${t} is not exist`),null;i.player.updateAiObjectDetectInterval(e)}updateAiObjectDetectLevel(e,t){const i=this._getWindowItem(t);if(!i||!i.player)return this.debug.warn(this.LOG_TAG,`updateAiObjectDetectLevel() windowIndex ${t} is not exist`),null;i.player.updateAiObjectDetectLevel(e)}setCryptoKeyUrl(e,t){const i=this._getWindowItem(t);if(!i||!i.player)return this.debug.warn(this.LOG_TAG,`setCryptoKeyUrl() windowIndex ${t} is not exist`),null;i.player.setCryptoKeyUrl(e)}showErrorMessageTips(e,t){const i=this._getWindowItem(t);if(!i||!i.player)return this.debug.warn(this.LOG_TAG,`showErrorMessageTips() windowIndex ${t} is not exist`),null;i.player.showErrorMessageTips(e)}hideErrorMessageTips(e){const t=this._getWindowItem(e);if(!t||!t.player)return this.debug.warn(this.LOG_TAG,`hideErrorMessageTips() windowIndex ${e} is not exist`),null;t.player.hideErrorMessageTips()}destroySingle(e){return new Promise(((t,i)=>{const s=this._getWindowItem(e);s?s.player&&s.player.destroy().then((()=>{s.player=null,t()})).catch((e=>{i(e)})):(i("windowIndex is not exist"),this.debug.warn(this.LOG_TAG,`destroySingle() windowIndex ${e} is not exist`))}))}initSingle(e){return new Promise(((t,i)=>{const s=this._getWindowItem(e);if(s)if(s.player)s.player.destroy().then((()=>{s.player=null;const e=this._createPlayer(s);s.player=e,t()})).catch((e=>{i(e)}));else{const e=this._createPlayer(s);s.player=e,t()}else i("windowIndex is not exist"),this.debug.warn(this.LOG_TAG,`destroySingle() windowIndex ${e} is not exist`)}))}setFullscreenMulti(e){return new Promise(((t,i)=>{if(this.debug.log(this.LOG_TAG,"setFullscreenMulti",e),e)try{jr.request(this.$container).then((()=>{t()})).catch((e=>{this.debug.error(this.LOG_TAG,"fullscreen request inner error",e),i(e)}))}catch(e){this.debug.error(this.LOG_TAG,"fullscreen request error",e),i(e)}else try{jr.exit().then((()=>{t()})).catch((e=>{this.debug.error(this.LOG_TAG,"fullscreen exit inner error",e),i(e)}))}catch(e){this.debug.error(this.LOG_TAG,"fullscreen exit error",e),i(e)}}))}toggleSingleWindowContainerFullscreen(e,t){this.debug.log(this.LOG_TAG,"setSingleWindowContainerFullscreen",t);const i=this._getWindowItem(t);this.windowList.forEach((e=>{e.uuid!==i.uuid&&this._handleWindowContainerFullscreen(e.uuid,!1)})),this._handleWindowContainerFullscreen(i.uuid,e)}selectWindow(e){this.debug.log(this.LOG_TAG,"selectWindow",e),this._handleWindowSelect(e)}arrangeWindow(e){this.debug.log(this.LOG_TAG,"arrangeWindow",e),this._innerArrangeWindow(e)}_innerArrangeWindow(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return void this.debug.warn(this.LOG_TAG,`arrangeWindow() split ${e} is not valid`);if([$s,Hs].includes(e))this._arrangeSpecialWindow(e);else{if(this._opt.split===e&&null===this.specialLayoutType&&Ao(t))return void this.debug.warn(this.LOG_TAG,`arrangeWindow() split ${e} is not changed`);this.specialLayoutType=null,this._arrangeWindow(e)}}_arrangeWindow(e){(e=ka(e))<1||!Da(e)?this.debug.warn(this.LOG_TAG,`arrangeWindow() split ${e} is not valid`):(e>this._opt.maxSplit&&(e=this._opt.maxSplit),this._opt.split=e,this.currentWindowIndex=0,this._opt.draggable?this._updateWindows$2():this._updateWindows(),this._handleWindowSelect(this.currentWindowIndex))}_arrangeSpecialWindow(e){this._opt.maxSplit<=3&&e===Hs||this._opt.maxSplit<=2&&e===$s?this.debug.warn(this.LOG_TAG,`_arrangeSpecialWindow() type ${e} is not valid because maxSplit is ${this._opt.maxSplit}`):this.specialLayoutType&&this.specialLayoutType===e?this.debug.warn(this.LOG_TAG,`_arrangeSpecialWindow() type ${e} is not changed`):(this.specialLayoutType=e,e===$s?this._arrangeWindow(3):e===Hs?this._arrangeWindow(4):this.debug.warn(this.LOG_TAG,`_arrangeSpecialWindow() type ${e} is not valid`))}getCurrentSplit(){return this.specialLayoutType?this.specialLayoutType:this._opt.split}_getCurrentMaxSplit(){if(this.specialLayoutType){let e=0;return this.specialLayoutType===$s?e=9:this.specialLayoutType===Hs&&(e=16),e}return this._opt.split*this._opt.split}_getSpecialMaxSplit(){let e=0;return this.specialLayoutType===$s?e=6:this.specialLayoutType===Hs&&(e=8),e}getSelectedWindowIndex(){return this.currentWindowIndex}getSelectedWindowUuid(){return this.currentWindowUuid}getWindowItem(e){let t=this._getWindowItem(e),i=null;return t&&(i={index:e,$player:t.$player,$playerContainer:t.$playerContainer,player:t.player,uuid:t.uuid}),i}getNextWindowItem(e){let t=null,i=this._getWindowItem(e);if(i){const e=this._getWindowUuidList()||[],s=e.findIndex((e=>e===i.uuid));if(s<e.length-1){const i=s+1,r=this._findWindowItemByUuid(e[i]);r&&(t={index:i,$player:r.$player,$playerContainer:r.$playerContainer,player:r.player,uuid:r.uuid})}}return t}getPrevWindowItem(e){let t=null,i=this._getWindowItem(e);if(i){const e=this._getWindowUuidList()||[],s=e.findIndex((e=>e===i.uuid));if(s>0){const i=s-1,r=this._findWindowItemByUuid(e[i]);r&&(t={index:i,$player:r.$player,$playerContainer:r.$playerContainer,player:r.player,uuid:r.uuid})}}return t}isWindowItemHasInitPlayer(e){let t=!1,i=this._getWindowItem(e);return i&&i.player&&(t=!0),t}_getWindowItem(e){let t=null;const i=Ya(e)&&16===e.length;return t=i||!Da(e)?this._findWindowItemByUuid(i?e:this.currentWindowUuid):this.windowList[e],t}_getWindowUuidList(){return this.windowList.filter(((e,t)=>t<this._getCurrentMaxSplit())).map((e=>e.uuid))}_findWindowItemIndex(e){return e&&e.uuid?this._findWindowItemIndexByUuid(e.uuid):null}_findWindowItemIndexByUuid(e){return this.windowList.findIndex((t=>t.uuid===e))}_findWindowItemByUuid(e){return this.windowList.find((t=>t.uuid===e))}}return H_.MULTI_EVENTS=zs,H_.EVENTS={...dt,...zs},H_.ERROR=ut,window.JessibucaProMulti=H_,window.JbProMulti=H_,window.WebPlayerProMulti=H_,H_})); diff --git a/vue/src/views/components/player/public/web-player-pro-talk.js b/vue/src/views/components/player/public/web-player-pro-talk.js deleted file mode 100644 index c3b5bd66..00000000 --- a/vue/src/views/components/player/public/web-player-pro-talk.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self)["web-player-pro-talk"]=t()}(this,(function(){"use strict";class e{on(e,t,i){const s=this.e||(this.e={});return(s[e]||(s[e]=[])).push({fn:t,ctx:i}),this}once(e,t,i){const s=this;function r(){s.off(e,r);for(var o=arguments.length,n=new Array(o),a=0;a<o;a++)n[a]=arguments[a];t.apply(i,n)}return r._=t,this.on(e,r,i)}emit(e){const t=((this.e||(this.e={}))[e]||[]).slice();for(var i=arguments.length,s=new Array(i>1?i-1:0),r=1;r<i;r++)s[r-1]=arguments[r];for(let e=0;e<t.length;e+=1)t[e].fn.apply(t[e].ctx,s);return this}off(e,t){const i=this.e||(this.e={});if(!e)return Object.keys(i).forEach((e=>{delete i[e]})),void delete this.e;const s=i[e],r=[];if(s&&t)for(let e=0,i=s.length;e<i;e+=1)s[e].fn!==t&&s[e].fn._!==t&&r.push(s[e]);return r.length?i[e]=r:delete i[e],this}}const t="debug",i="warn",s="talkGetUserMediaSuccess",r="talkGetUserMediaFail",o="talkGetUserMediaTimeout",n="talkStreamStart",a="talkStreamOpen",l="talkStreamClose",h="talkStreamError",u="talkStreamInactive",c="talkFailedAndStop",d={talkStreamClose:l,talkStreamError:h,talkStreamInactive:u,talkGetUserMediaTimeout:o,talkFailedAndStop:c},p={playError:"playIsNotPauseOrUrlIsNull",fetchError:"fetchError",websocketError:"websocketError",webcodecsH265NotSupport:"webcodecsH265NotSupport",webcodecsDecodeError:"webcodecsDecodeError",webcodecsUnsupportedConfigurationError:"webcodecsUnsupportedConfigurationError",webcodecsDecodeConfigureError:"webcodecsDecodeConfigureError",mediaSourceH265NotSupport:"mediaSourceH265NotSupport",mediaSourceAudioG711NotSupport:"mediaSourceAudioG711NotSupport",mediaSourceAudioInitTimeout:"mediaSourceAudioInitTimeout",mediaSourceAudioNoDataTimeout:"mediaSourceAudioNoDataTimeout",mediaSourceDecoderConfigurationError:"mediaSourceDecoderConfigurationError",mediaSourceFull:"mseSourceBufferFull",mseSourceBufferError:"mseSourceBufferError",mseAddSourceBufferError:"mseAddSourceBufferError",mediaSourceAppendBufferError:"mediaSourceAppendBufferError",mediaSourceTsIsMaxDiff:"mediaSourceTsIsMaxDiff",mediaSourceUseCanvasRenderPlayFailed:"mediaSourceUseCanvasRenderPlayFailed",mediaSourceBufferedIsZeroError:"mediaSourceBufferedIsZeroError",wasmDecodeError:"wasmDecodeError",wasmUseVideoRenderError:"wasmUseVideoRenderError",hlsError:"hlsError",webrtcError:"webrtcError",webrtcClosed:"webrtcClosed",webrtcIceCandidateError:"webrtcIceCandidateError",webglAlignmentError:"webglAlignmentError",wasmWidthOrHeightChange:"wasmWidthOrHeightChange",mseWidthOrHeightChange:"mseWidthOrHeightChange",wcsWidthOrHeightChange:"wcsWidthOrHeightChange",widthOrHeightChange:"widthOrHeightChange",tallWebsocketClosedByError:"tallWebsocketClosedByError",flvDemuxBufferSizeTooLarge:"flvDemuxBufferSizeTooLarge",wasmDecodeVideoNoResponseError:"wasmDecodeVideoNoResponseError",audioChannelError:"audioChannelError",simdH264DecodeVideoWidthIsTooLarge:"simdH264DecodeVideoWidthIsTooLarge",simdDecodeError:"simdDecodeError",webglContextLostError:"webglContextLostError",videoElementPlayingFailed:"videoElementPlayingFailed",videoElementPlayingFailedForWebrtc:"videoElementPlayingFailedForWebrtc",decoderWorkerInitError:"decoderWorkerInitError",videoInfoError:"videoInfoError",videoCodecIdError:"videoCodecIdError",streamEnd:"streamEnd",websocket1006Error:"websocket1006Error",delayTimeout:"delayTimeout",loadingTimeout:"loadingTimeout",networkDelayTimeout:"networkDelayTimeout",aliyunRtcError:"aliyunRtcError",...{talkStreamError:h,talkStreamClose:l}},f="notConnect",m="open",g="close",w="error",k="g711a",T="g711u",b="pcm",_="opus",S=8,y=0,E=98,A="empty",v="rtp",M="tcp",G="open",U="close",B="error",L="message",R="worklet",F="script",C={encType:k,packetType:v,packetTcpSendType:M,rtpSsrc:"0000000000",numberChannels:1,sampleRate:8e3,sampleBitsWidth:16,sendInterval:20,debug:!1,debugLevel:i,testMicrophone:!1,saveToTempFile:!1,audioBufferLength:160,engine:R,checkGetUserMediaTimeout:!1,getUserMediaTimeout:1e4,audioConstraints:{latency:!0,noiseSuppression:!0,autoGainControl:!0,echoCancellation:!0,sampleRate:48e3,channelCount:1}};function N(){return(new Date).getTime()}function W(e){let t="";if("object"==typeof e)try{t=JSON.stringify(e),t=JSON.parse(t)}catch(i){t=e}else t=e;return t}function x(e){return!0===e||"true"===e}(function(e,t){return e(t={exports:{}},t.exports),t.exports})((function(e){!function(){var t="undefined"!=typeof window&&void 0!==window.document?window.document:{},i=e.exports,s=function(){for(var e,i=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],s=0,r=i.length,o={};s<r;s++)if((e=i[s])&&e[1]in t){for(s=0;s<e.length;s++)o[i[0][s]]=e[s];return o}return!1}(),r={change:s.fullscreenchange,error:s.fullscreenerror},o={request:function(e,i){return new Promise(function(r,o){var n=function(){this.off("change",n),r()}.bind(this);this.on("change",n);var a=(e=e||t.documentElement)[s.requestFullscreen](i);a instanceof Promise&&a.then(n).catch(o)}.bind(this))},exit:function(){return new Promise(function(e,i){if(this.isFullscreen){var r=function(){this.off("change",r),e()}.bind(this);this.on("change",r);var o=t[s.exitFullscreen]();o instanceof Promise&&o.then(r).catch(i)}else e()}.bind(this))},toggle:function(e,t){return this.isFullscreen?this.exit():this.request(e,t)},onchange:function(e){this.on("change",e)},onerror:function(e){this.on("error",e)},on:function(e,i){var s=r[e];s&&t.addEventListener(s,i,!1)},off:function(e,i){var s=r[e];s&&t.removeEventListener(s,i,!1)},raw:s};s?(Object.defineProperties(o,{isFullscreen:{get:function(){return Boolean(t[s.fullscreenElement])}},element:{enumerable:!0,get:function(){return t[s.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(t[s.fullscreenEnabled])}}}),i?e.exports=o:window.screenfull=o):i?e.exports={isEnabled:!1}:window.screenfull={isEnabled:!1}}()})).isEnabled,(()=>{try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch(e){}})();class O{constructor(e){const{fromSampleRate:t,toSampleRate:i,channels:s,inputBufferSize:r}=e;if(!t||!i||!s)throw new Error("Invalid settings specified for the resampler.");this.resampler=null,this.fromSampleRate=t,this.toSampleRate=i,this.channels=s||0,this.inputBufferSize=r,this.initialize()}initialize(){this.fromSampleRate==this.toSampleRate?(this.resampler=e=>e,this.ratioWeight=1):(this.fromSampleRate<this.toSampleRate?(this.linearInterpolation(),this.lastWeight=1):(this.multiTap(),this.tailExists=!1,this.lastWeight=0),this.initializeBuffers(),this.ratioWeight=this.fromSampleRate/this.toSampleRate)}bufferSlice(e){try{return this.outputBuffer.subarray(0,e)}catch(t){try{return this.outputBuffer.length=e,this.outputBuffer}catch(t){return this.outputBuffer.slice(0,e)}}}initializeBuffers(){this.outputBufferSize=Math.ceil(this.inputBufferSize*this.toSampleRate/this.fromSampleRate/this.channels*1.0000004768371582)+this.channels+this.channels;try{this.outputBuffer=new Float32Array(this.outputBufferSize),this.lastOutput=new Float32Array(this.channels)}catch(e){this.outputBuffer=[],this.lastOutput=[]}}linearInterpolation(){this.resampler=e=>{let t,i,s,r,o,n,a,l,h,u=e.length,c=this.channels;if(u%c!=0)throw new Error("Buffer was of incorrect sample length.");if(u<=0)return[];for(t=this.outputBufferSize,i=this.ratioWeight,s=this.lastWeight,r=0,o=0,n=0,a=0,l=this.outputBuffer;s<1;s+=i)for(o=s%1,r=1-o,this.lastWeight=s%1,h=0;h<this.channels;++h)l[a++]=this.lastOutput[h]*r+e[h]*o;for(s-=1,u-=c,n=Math.floor(s)*c;a<t&&n<u;){for(o=s%1,r=1-o,h=0;h<this.channels;++h)l[a++]=e[n+(h>0?h:0)]*r+e[n+(c+h)]*o;s+=i,n=Math.floor(s)*c}for(h=0;h<c;++h)this.lastOutput[h]=e[n++];return this.bufferSlice(a)}}multiTap(){this.resampler=e=>{let t,i,s,r,o,n,a,l,h,u,c,d=e.length,p=this.channels;if(d%p!=0)throw new Error("Buffer was of incorrect sample length.");if(d<=0)return[];for(t=this.outputBufferSize,i=[],s=this.ratioWeight,r=0,n=0,a=0,l=!this.tailExists,this.tailExists=!1,h=this.outputBuffer,u=0,c=0,o=0;o<p;++o)i[o]=0;do{if(l)for(r=s,o=0;o<p;++o)i[o]=0;else{for(r=this.lastWeight,o=0;o<p;++o)i[o]=this.lastOutput[o];l=!0}for(;r>0&&n<d;){if(a=1+n-c,!(r>=a)){for(o=0;o<p;++o)i[o]+=e[n+(o>0?o:0)]*r;c+=r,r=0;break}for(o=0;o<p;++o)i[o]+=e[n++]*a;c=n,r-=a}if(0!==r){for(this.lastWeight=r,o=0;o<p;++o)this.lastOutput[o]=i[o];this.tailExists=!0;break}for(o=0;o<p;++o)h[u++]=i[o]/s}while(n<d&&u<t);return this.bufferSlice(u)}}resample(e){return this.fromSampleRate==this.toSampleRate?this.ratioWeight=1:(this.fromSampleRate<this.toSampleRate?this.lastWeight=1:(this.tailExists=!1,this.lastWeight=0),this.initializeBuffers(),this.ratioWeight=this.fromSampleRate/this.toSampleRate),this.resampler(e)}}const P=[255,511,1023,2047,4095,8191,16383,32767];function I(e,t,i){for(let s=0;s<i;s++)if(e<=t[s])return s;return i}function D(e){const t=[];return Array.prototype.slice.call(e).forEach(((e,i)=>{t[i]=function(e){let t,i,s;return e>=0?t=213:(t=85,(e=-e-1)<0&&(e=32767)),i=I(e,P,8),i>=8?127^t:(s=i<<4,s|=i<2?e>>4&15:e>>i+3&15,s^t)}(e)})),t}function z(e){const t=[];return Array.prototype.slice.call(e).forEach(((e,i)=>{t[i]=function(e){let t=0;e<0?(e=132-e,t=127):(e+=132,t=255);let i=I(e,P,8);return i>=8?127^t:(i<<4|e>>i+3&15)^t}(e)})),t}class q{constructor(e){this.log=function(i){if(e._opt.debug&&e._opt.debugLevel==t){const t=e._opt.debugUuid?`[${e._opt.debugUuid}]`:"";for(var s=arguments.length,r=new Array(s>1?s-1:0),o=1;o<s;o++)r[o-1]=arguments[o];console.log(`JbPro${t}[✅✅✅][${i}]`,...r)}},this.warn=function(s){if(e._opt.debug&&(e._opt.debugLevel==t||e._opt.debugLevel==i)){const t=e._opt.debugUuid?`[${e._opt.debugUuid}]`:"";for(var r=arguments.length,o=new Array(r>1?r-1:0),n=1;n<r;n++)o[n-1]=arguments[n];console.log(`JbPro${t}[❗❗❗][${s}]`,...o)}},this.error=function(t){const i=e._opt.debugUuid?`[${e._opt.debugUuid}]`:"";for(var s=arguments.length,r=new Array(s>1?s-1:0),o=1;o<s;o++)r[o-1]=arguments[o];console.error(`JbPro${i}[❌❌❌][${t}]`,...r)}}}class j{constructor(e){this.destroys=[],this.proxy=this.proxy.bind(this),this.master=e}proxy(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!e)return;if(Array.isArray(t))return t.map((t=>this.proxy(e,t,i,s)));e.addEventListener(t,i,s);const r=()=>{"function"==typeof e.removeEventListener&&e.removeEventListener(t,i,s)};return this.destroys.push(r),r}destroy(){this.master.debug&&this.master.debug.log("Events","destroy"),this.destroys.forEach((e=>e())),this.destroys=[]}}class $ extends e{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),this._opt={},e&&(this.player=e),this.TAG_NAME="talk";const i=W(C);this._opt=Object.assign({},i,t),this._opt.sampleRate=parseInt(this._opt.sampleRate,10),this._opt.sampleBitsWidth=parseInt(this._opt.sampleBitsWidth,10),this.audioContext=null,this.gainNode=null,this.recorder=null,this.workletRecorder=null,this.biquadFilter=null,this.userMediaStream=null,this.clearWorkletUrlTimeout=null,this.bufferSize=512,this._opt.audioBufferLength=this.calcAudioBufferLength(),this.audioBufferList=[],this.socket=null,this.socketStatus=f,this.mediaStreamSource=null,this.heartInterval=null,this.checkGetUserMediaTimeout=null,this.wsUrl=null,this.startTimestamp=0,this.sequenceId=0,this.tempTimestamp=null,this.tempG711BufferList=[],this.tempRtpBufferList=[],this.tempPcmBufferList=[],this.events=new j(this),this._initTalk(),this.player||(this.debug=new q(this)),this._opt.encType!==k&&this._opt.encType!==T||8e3===this._opt.sampleRate&&16===this._opt.sampleBitsWidth||this.warn(this.TAG_NAME,`\n encType is ${this._opt.encType} and sampleBitsWidth is ${this._opt.sampleBitsWidth}, set sampleBitsWidth to ${this._opt.sampleBitsWidth}。\n ${this._opt.encType} only support sampleRate 8000 and sampleBitsWidth 16`),this.log(this.TAG_NAME,"init",JSON.stringify(this._opt))}destroy(){this.clearWorkletUrlTimeout&&(clearTimeout(this.clearWorkletUrlTimeout),this.clearWorkletUrlTimeout=null),this.userMediaStream&&(this.userMediaStream.getTracks&&this.userMediaStream.getTracks().forEach((e=>{e.stop()})),this.userMediaStream=null),this.mediaStreamSource&&(this.mediaStreamSource.disconnect(),this.mediaStreamSource=null),this.recorder&&(this.recorder.disconnect(),this.recorder.onaudioprocess=null,this.recorder=null),this.biquadFilter&&(this.biquadFilter.disconnect(),this.biquadFilter=null),this.gainNode&&(this.gainNode.disconnect(),this.gainNode=null),this.workletRecorder&&(this.workletRecorder.disconnect(),this.workletRecorder=null),this.socket&&(this.socketStatus===m&&this._sendClose(),this.socket.close(),this.socket=null),this._stopHeartInterval(),this._stopCheckGetUserMediaTimeout(),this.audioContext=null,this.gainNode=null,this.recorder=null,this.audioBufferList=[],this.sequenceId=0,this.wsUrl=null,this.tempTimestamp=null,this.tempRtpBufferList=[],this.tempG711BufferList=[],this.tempPcmBufferList=[],this.startTimestamp=0,this.log(this.TAG_NAME,"destroy")}addRtpToBuffer(e){const t=e.length+this.tempRtpBufferList.length,i=new Uint8Array(t);i.set(this.tempRtpBufferList,0),i.set(e,this.tempRtpBufferList.length),this.tempRtpBufferList=i}addG711ToBuffer(e){const t=e.length+this.tempG711BufferList.length,i=new Uint8Array(t);i.set(this.tempG711BufferList,0),i.set(e,this.tempG711BufferList.length),this.tempG711BufferList=i}addPcmToBuffer(e){const t=e.length+this.tempPcmBufferList.length,i=new Uint8Array(t);i.set(this.tempPcmBufferList,0),i.set(e,this.tempPcmBufferList.length),this.tempG711ButempPcmBufferListfferList=i}downloadRtpFile(){this.debug.log(this.TAG_NAME,"downloadRtpFile");const e=new Blob([this.tempRtpBufferList]);try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=Date.now()+".rtp",t.click(),window.URL.revokeObjectURL(t.href)}catch(e){console.error("downloadRtpFile",e)}}downloadG711File(){this.debug.log(this.TAG_NAME,"downloadG711File");const e=new Blob([this.tempG711BufferList]);try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=Date.now()+"."+this._opt.encType,t.click(),window.URL.revokeObjectURL(t.href)}catch(e){console.error("downloadG711File",e)}}downloadPcmFile(){this.debug.log(this.TAG_NAME,"downloadPcmFile");const e=new Blob([this.tempPcmBufferList]);try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=Date.now()+"."+this._opt.encType,t.click(),window.URL.revokeObjectURL(t.href)}catch(e){console.error("downloadRtpFile",e)}}downloadFile(){this._opt.packetType===v?this.downloadRtpFile():this._opt.encType===k||this._opt.encType===T?this.downloadG711File():this.downloadPcmFile()}calcAudioBufferLength(){const{sampleRate:e,sampleBitsWidth:t}=this._opt;return 8*e*.02/8}get socketStatusOpen(){return this.socketStatus===m}log(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this._log("log",...t)}warn(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this._log("warn",...t)}error(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this._log("error",...t)}_log(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];this.player?this.player.debug[e](...i):this.debug?this.debug[e](...i):console[e](...i)}_getSequenceId(){return++this.sequenceId}_createWebSocket(){return new Promise(((e,t)=>{const i=this.events.proxy;this.socket=new WebSocket(this.wsUrl),this.socket.binaryType="arraybuffer",this.emit(n),i(this.socket,G,(()=>{this.socketStatus=m,this.log(this.TAG_NAME,"websocket open -> do talk"),this.emit(a),e(),this._doTalk()})),i(this.socket,L,(e=>{this.log(this.TAG_NAME,"websocket message",e.data)})),i(this.socket,U,(e=>{this.socketStatus=g,this.warn(this.TAG_NAME,"websocket close -> reject",e),this.emit(l),t(e)})),i(this.socket,B,(e=>{this.socketStatus=w,this.error(this.TAG_NAME,"websocket error -> reject",e),this.emit(h,e),t(e)}))}))}_sendClose(){}_initTalk(){this._initMethods(),this._opt.engine===R?this._initWorklet():this._opt.engine===F&&this._initScriptProcessor(),this.log(this.TAG_NAME,"audioContext samplerate",this.audioContext.sampleRate)}_initMethods(){this.audioContext=new(window.AudioContext||window.webkitAudioContext)({sampleRate:48e3}),this.gainNode=this.audioContext.createGain(),this.gainNode.gain.value=1,this.biquadFilter=this.audioContext.createBiquadFilter(),this.biquadFilter.type="lowpass",this.biquadFilter.frequency.value=3e3,this.resampler=new O({fromSampleRate:this.audioContext.sampleRate,toSampleRate:this._opt.sampleRate,channels:this._opt.numberChannels,inputBufferSize:this.bufferSize})}_initScriptProcessor(){const e=this.audioContext.createScriptProcessor||this.audioContext.createJavaScriptNode;this.recorder=e.apply(this.audioContext,[this.bufferSize,this._opt.numberChannels,this._opt.numberChannels]),this.recorder.onaudioprocess=e=>this._onaudioprocess(e)}_initWorklet(){const e=function(e){const t=e.toString().trim().match(/^function\s*\w*\s*\([\w\s,]*\)\s*{([\w\W]*?)}$/)[1],i=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(i)}((function(){class e extends AudioWorkletProcessor{constructor(e){super(),this._cursor=0,this._bufferSize=e.processorOptions.bufferSize,this._buffer=new Float32Array(this._bufferSize)}process(e,t,i){if(!e.length||!e[0].length)return!0;for(let t=0;t<e[0][0].length;t++)this._cursor+=1,this._cursor===this._bufferSize&&(this._cursor=0,this.port.postMessage({eventType:"data",buffer:this._buffer})),this._buffer[this._cursor]=e[0][0][t];return!0}}registerProcessor("talk-processor",e)}));this.audioContext.audioWorklet&&this.audioContext.audioWorklet.addModule(e).then((()=>{const e=new AudioWorkletNode(this.audioContext,"talk-processor",{processorOptions:{bufferSize:this.bufferSize}});e.connect(this.gainNode),e.port.onmessage=e=>{"data"===e.data.eventType&&this._encodeAudioData(e.data.buffer)},this.workletRecorder=e})),this.clearWorkletUrlTimeout=setTimeout((()=>{URL.revokeObjectURL(e),this.clearWorkletUrlTimeout=null}),1e4)}_onaudioprocess(e){const t=e.inputBuffer.getChannelData(0);this._encodeAudioData(new Float32Array(t))}_encodeAudioData(e){if(0===e[0]&&0===e[1])return void this.log(this.TAG_NAME,"empty audio data");const t=this.resampler.resample(e);let i=t;if(16===this._opt.sampleBitsWidth?i=function(e){let t=e.length,i=new Int16Array(t);for(;t--;){let s=Math.max(-1,Math.min(1,e[t]));i[t]=s<0?32768*s:32767*s}return i}(t):8===this._opt.sampleBitsWidth&&(i=function(e){let t=e.length,i=new Int8Array(t);for(;t--;){let s=Math.max(-1,Math.min(1,e[t]));const r=s<0?32768*s:32767*s;i[t]=parseInt(255/(65535/(32768+r)),10)}return i}(t)),null!==i.buffer){let e=null;this._opt.encType===k?e=D(i):this._opt.encType===T?e=z(i):this._opt.encType===b&&(e=i);const t=new Uint8Array(e);for(let e=0;e<t.length;e++){let i=this.audioBufferList.length;this.audioBufferList[i++]=t[e],this.audioBufferList.length===this._opt.audioBufferLength&&(this._sendTalkMsg(new Uint8Array(this.audioBufferList)),this.audioBufferList=[])}}}_parseAudioMsg(e){let t=null;return this._opt.packetType!==v||this._opt.encType!==k&&this._opt.encType!==T?this._opt.packetType===A&&(t=e):t=this.rtpPacket(e),t}rtpPacket(e){const t=[];let i=0,s=0,r=0;const o=this._opt.rtpSsrc,n=e.length;this._opt.encType===k?i=S:this._opt.encType===T?i=y:this._opt.encType===_&&(i=E),this.startTimestamp||(this.startTimestamp=N()),r=N()-this.startTimestamp,s=this._getSequenceId();let a=0;if(this._opt.packetTcpSendType===M){const e=n+12;t[a++]=255&e>>8,t[a++]=255&e>>0}t[a++]=128,t[a++]=128+i,t[a++]=s/256,t[a++]=s%256,t[a++]=r/65536/256,t[a++]=r/65536%256,t[a++]=r%65536/256,t[a++]=r%65536%256,t[a++]=o/65536/256,t[a++]=o/65536%256,t[a++]=o%65536/256,t[a++]=o%65536%256;let l=t.concat([...e]),h=new Uint8Array(l.length);for(let e=0;e<l.length;e++)h[e]=l[e];return h}opusPacket(e){return e}_sendTalkMsg(e){null===this.tempTimestamp&&(this.tempTimestamp=N());const t=N(),i=t-this.tempTimestamp,s=this._parseAudioMsg(e);this.log(this.TAG_NAME,`send talk msg and diff is ${i} and byteLength is ${s.byteLength} and length is ${s.length}, and ${this._opt.encType} length is ${e.length}`),x(this._opt.saveToTempFile)&&x(this._opt.debug)&&(this._opt.packetType===v?this.addRtpToBuffer(s):this._opt.encType===k||this._opt.encType===T?this.addG711ToBuffer(s):this.addPcmToBuffer(s)),s&&(this.socketStatusOpen?this.socket.send(s.buffer):this.emit(p.tallWebsocketClosedByError)),this.tempTimestamp=t}_doTalk(){this._getUserMedia()}_getUserMedia(){this.log(this.TAG_NAME,"getUserMedia"),void 0===window.navigator.mediaDevices&&(window.navigator.mediaDevices={}),void 0===window.navigator.mediaDevices.getUserMedia&&(this.log(this.TAG_NAME,"window.navigator.mediaDevices.getUserMedia is undefined and init function"),window.navigator.mediaDevices.getUserMedia=function(e){var t=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return t?new Promise((function(i,s){t.call(navigator,e,i,s)})):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}),this._opt.checkGetUserMediaTimeout&&this._startCheckGetUserMediaTimeout(),window.navigator.mediaDevices.getUserMedia({audio:this._opt.audioConstraints,video:!1}).then((e=>{this.log(this.TAG_NAME,"getUserMedia success"),this.userMediaStream=e,this.mediaStreamSource=this.audioContext.createMediaStreamSource(e),this.mediaStreamSource.connect(this.biquadFilter),this.recorder?(this.biquadFilter.connect(this.recorder),this.recorder.connect(this.gainNode)):this.workletRecorder&&(this.biquadFilter.connect(this.workletRecorder),this.workletRecorder.connect(this.gainNode)),this.gainNode.connect(this.audioContext.destination),this.emit(s),null===e.oninactive&&(e.oninactive=e=>{this._handleStreamInactive(e)})})).catch((e=>{this.error(this.TAG_NAME,"getUserMedia error",e.toString()),this.emit(r,e.toString())})).finally((()=>{this.log(this.TAG_NAME,"getUserMedia finally"),this._stopCheckGetUserMediaTimeout()}))}_getUserMedia2(){this.log(this.TAG_NAME,"getUserMedia"),navigator.mediaDevices?navigator.mediaDevices.getUserMedia({audio:!0}).then((e=>{this.log(this.TAG_NAME,"getUserMedia2 success")})):navigator.getUserMedia({audio:!0},this.log(this.TAG_NAME,"getUserMedia2 success"),this.log(this.TAG_NAME,"getUserMedia2 fail"))}async _getUserMedia3(){this.log(this.TAG_NAME,"getUserMedia3");try{const e=await navigator.mediaDevices.getUserMedia({audio:{latency:!0,noiseSuppression:!0,autoGainControl:!0,echoCancellation:!0,sampleRate:48e3,channelCount:1},video:!1});console.log("getUserMedia() got stream:",e),this.log(this.TAG_NAME,"getUserMedia3 success")}catch(e){this.log(this.TAG_NAME,"getUserMedia3 fail")}}_handleStreamInactive(e){this.userMediaStream&&(this.warn(this.TAG_NAME,"stream oninactive",e),this.emit(u))}_startCheckGetUserMediaTimeout(){this._stopCheckGetUserMediaTimeout(),this.checkGetUserMediaTimeout=setTimeout((()=>{this.log(this.TAG_NAME,"check getUserMedia timeout"),this.emit(o)}),this._opt.getUserMediaTimeout)}_stopCheckGetUserMediaTimeout(){this.checkGetUserMediaTimeout&&(this.log(this.TAG_NAME,"stop checkGetUserMediaTimeout"),clearTimeout(this.checkGetUserMediaTimeout),this.checkGetUserMediaTimeout=null)}_startHeartInterval(){this.heartInterval=setInterval((()=>{this.log(this.TAG_NAME,"heart interval");let e=[35,36,0,0,0,0,0,0];e=new Uint8Array(e),this.socket.send(e.buffer)}),15e3)}_stopHeartInterval(){this.heartInterval&&(this.log(this.TAG_NAME,"stop heart interval"),clearInterval(this.heartInterval),this.heartInterval=null)}startTalk(e){return new Promise(((t,i)=>{if(!function(){let e=!1;const t=window.navigator;return t&&(e=!(!t.mediaDevices||!t.mediaDevices.getUserMedia),e||(e=!!(t.getUserMedia||t.webkitGetUserMedia||t.mozGetUserMedia||t.msGetUserMedia))),e}())return i("not support getUserMedia");if(this.wsUrl=e,this._opt.testMicrophone)this._doTalk();else{if(!this.wsUrl)return i("wsUrl is null");this._createWebSocket().catch((e=>{i(e)}))}this.once(r,(()=>{i("getUserMedia fail")})),this.once(s,(()=>{t()}))}))}setVolume(e){var t,i,s;(e=parseFloat(e).toFixed(2),isNaN(e))||(t=e,i=0,s=1,e=Math.max(Math.min(t,Math.max(i,s)),Math.min(i,s)),this.gainNode.gain.value=e)}getOption(){return this._opt}get volume(){return this.gainNode?parseFloat(100*this.gainNode.gain.value).toFixed(0):null}}class H extends e{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this.talk=null,this._opt=e,this.LOG_TAG="JbProTalk",this.debug=new q(this),this.debug.log(this.LOG_TAG,"init",JSON.stringify(e))}destroy(){this.debug.log(this.LOG_TAG,"destroy()"),this.off(),this.talk&&(this.talk.destroy(),this.talk=null),this.debug.log(this.LOG_TAG,"destroy")}_initTalk(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.talk&&(this.debug.log(this.LOG_TAG,"_initTalk this.talk is not null and destroy"),this.talk.destroy(),this.talk=null);const t=Object.assign({},W(this._opt),e);this.talk=new $(null,t),this.debug.log(this.LOG_TAG,"_initTalk",this.talk.getOption()),this._bindTalkEvents()}_bindTalkEvents(){Object.keys(d).forEach((e=>{this.talk.on(d[e],(t=>{this.emit(e,t)}))}))}startTalk(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,s)=>{this.debug.log(this.LOG_TAG,"startTalk",e,JSON.stringify(t)),this._initTalk(t),this.talk.startTalk(e).then((()=>{i(),this.talk.once(l,(()=>{this.debug.warn(this.LOG_TAG,"talkStreamClose -> stopTalk"),this.stopTalk().catch((e=>{this.debug.warn(this.LOG_TAG,"talkStreamClose stopTalk",e)})).finally((()=>{this.emit(c,l)}))})),this.talk.once(h,(e=>{this.debug.error(this.LOG_TAG,"talkStreamError -> stopTalk"),this.stopTalk().catch((e=>{this.debug.warn(this.LOG_TAG,"talkStreamError stopTalk",e)})).finally((()=>{this.emit(c,h)}))})),this.talk.once(u,(()=>{this.debug.warn(this.LOG_TAG,"talkStreamInactive -> stopTalk"),this.stopTalk().catch((e=>{this.debug.warn(this.LOG_TAG,"talkStreamInactive stopTalk",e)})).finally((()=>{this.emit(c,u)}))})),this.talk.once(o,(()=>{this.debug.warn(this.LOG_TAG,"talkGetUserMediaTimeout -> stopTalk"),this.stopTalk().catch((e=>{this.debug.warn(this.LOG_TAG,"talkGetUserMediaTimeout stopTalk",e)})).finally((()=>{this.emit(c,o)}))}))})).catch((e=>{s(e)}))}))}stopTalk(){return new Promise(((e,t)=>{this.debug.log(this.LOG_TAG,"stopTalk()"),this.talk||t("talk is not init"),this.talk.destroy(),this.talk=null,e()}))}getTalkVolume(){return new Promise(((e,t)=>{this.talk||t("talk is not init"),e(this.talk.volume)}))}setTalkVolume(e){return new Promise(((t,i)=>{this.debug.log(this.LOG_TAG,"setTalkVolume",e),this.talk||i("talk is not init"),this.talk.setVolume(e/100),t()}))}downloadTempRtpFile(){return new Promise(((e,t)=>{this.talk?(this.talk.downloadRtpFile(),e()):t("talk is not init")}))}downloadTempG711File(){return new Promise(((e,t)=>{this.talk?(this.talk.downloadG711File(),e()):t("talk is not init")}))}downloadTempPcmFile(){return new Promise(((e,t)=>{this.talk?(this.talk.downloadPcmFile(),e()):t("talk is not init")}))}downloadTempFile(){return new Promise(((e,t)=>{this.talk?(this.talk.downloadFile(),e()):t("talk is not init")}))}}return H.EVENTS=d,window.JessibucaProTalk=H,window.JbProTalk=H,window.WebPlayerProTalk=H,H})); diff --git a/vue/src/views/components/player/public/web-player-pro.js b/vue/src/views/components/player/public/web-player-pro.js deleted file mode 100644 index 6fd796a8..00000000 --- a/vue/src/views/components/player/public/web-player-pro.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("crypto")):"function"==typeof define&&define.amd?define(["crypto"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["web-player-pro"]=t(e.crypto$1)}(this,(function(t){"use strict";function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=s(t);const a=1,o=2,n=3,l=4,d=5,h=6,c=["","websocket","fetch","hls","webrtc","webTransport","aliyunRtc","ts"],u="fetch",p="hls",f="websocket",m="webrtc",g="webTransport",y="worker",A="aliyunRtc",b="player",v="playerAudio",_="playbackTF",S="mp4",w="webm",E="flv",T="flv",k="m7s",C="hls",x="webrtc",R="webTransport",D="nakedFlow",L="fmp4",P="mpeg4",B="aliyunRtc",I="ts",M={flv:"FLV",m7s:"M7S",hls:"HLS",fmp4:"FMP4",mpeg4:"MPEG4",webrtc:"Webrtc",webTransport:"WebTransport",nakedFlow:"裸流",aliyunRtc:"AliyunRtc",ts:"TS"},U="mse",F="wcs",O="offscreen",N="wasm",j="simd",z="mt",G="webrtc",H="hls",V="aliyunRtc",$="canvas",W="video",J="debug",q="warn",K="click",Y="mouseDownAndUp",Q={normal:"normal",simple:"simple"},X=36e5,Z="/crypto/",ee="jbprov",te=1e4,ie={url:"",playbackConfig:{},fullscreenWatermarkConfig:{},playType:b,playbackForwardMaxRateDecodeIFrame:4,playOptions:{},isLive:!0,isMulti:!0,isM7sCrypto:!1,supportHls265:!1,playFailedUseLastFrameShow:!0,playFailedAndPausedShowMessage:!1,pauseAndNextPlayUseLastFrameShow:!1,widthOrHeightChangeReplayDelayTime:0,isUseNewFullscreenWatermark:!1,websocket1006ErrorReplay:!1,websocket1006ErrorReplayDelayTime:1,streamErrorReplay:!1,streamErrorReplayDelayTime:1,streamEndReplay:!1,streamEndReplayDelayTime:1,networkDisconnectReplay:!1},se={playType:b,container:"",videoBuffer:1e3,videoBufferDelay:1e3,networkDelay:1e4,isResize:!0,isFullResize:!1,isFlv:!1,isHls:!1,isFmp4:!1,isFmp4Private:!1,isWebrtc:!1,isWebrtcForZLM:!1,isWebrtcForSRS:!1,isWebrtcForOthers:!1,isNakedFlow:!1,isMpeg4:!1,isAliyunRtc:!1,isTs:!1,debug:!1,debugLevel:q,debugUuid:"",isMulti:!0,multiIndex:-1,hotKey:!1,loadingTimeout:10,heartTimeout:10,timeout:10,pageVisibilityHiddenTimeout:300,loadingTimeoutReplay:!0,heartTimeoutReplay:!0,loadingTimeoutReplayTimes:3,heartTimeoutReplayTimes:3,heartTimeoutReplayUseLastFrameShow:!0,replayUseLastFrameShow:!0,replayShowLoadingIcon:!1,supportDblclickFullscreen:!1,showBandwidth:!1,showPerformance:!1,mseCorrectTimeDuration:20,mseCorrectAudioTimeDuration:20,keepScreenOn:!0,isNotMute:!1,muted:!0,hasAudio:!0,hasVideo:!0,operateBtns:{fullscreen:!1,screenshot:!1,play:!1,audio:!1,record:!1,ptz:!1,quality:!1,zoom:!1,close:!1,scale:!1,performance:!1,logSave:!1,aiFace:!1,aiObject:!1,aiOcclusion:!1,fullscreenFn:null,fullscreenExitFn:null,screenshotFn:null,playFn:null,pauseFn:null,recordFn:null,recordStopFn:null},extendOperateBtns:[],contextmenuBtns:[],watermarkConfig:{},controlAutoHide:!1,hasControl:!1,loadingIcon:!0,loadingIconStyle:{},loadingText:"",background:"",poster:"",backgroundLoadingShow:!0,loadingBackground:"",loadingBackgroundWidth:0,loadingBackgroundHeight:0,decoder:"decoder-pro.js",decoderAudio:"decoder-pro-audio.js",decoderHard:"decoder-pro-hard.js",decoderHardNotWasm:"decoder-pro-hard-not-wasm.js",wasmMp4RecorderDecoder:"jessibuca-pro-mp4-recorder-decoder.js",decoderWASM:"",isDecoderUseCDN:!1,url:"",rotate:0,mirrorRotate:"none",aspectRatio:"default",playbackConfig:{playList:[],fps:"",showControl:!0,controlType:Q.normal,duration:0,startTime:"",showRateBtn:!1,rateConfig:[],showPrecision:"",showPrecisionBtn:!0,isCacheBeforeDecodeForFpsRender:!1,uiUsePlaybackPause:!1,isPlaybackPauseClearCache:!0,isUseFpsRender:!1,isUseLocalCalculateTime:!1,localOneFrameTimestamp:40,supportWheel:!1,useWCS:!1,useMSE:!1},qualityConfig:[],defaultStreamQuality:"",scaleConfig:["拉伸","缩放","正常"],forceNoOffscreen:!0,hiddenAutoPause:!1,protocol:o,demuxType:T,useWasm:!1,useMSE:!1,useWCS:!1,useSIMD:!0,useMThreading:!1,wcsUseVideoRender:!0,wcsUseWebgl2Render:!0,wasmUseVideoRender:!0,mseUseCanvasRender:!1,hlsUseCanvasRender:!1,webrtcUseCanvasRender:!1,useOffscreen:!1,useWebGPU:!1,mseDecodeErrorReplay:!0,wcsDecodeErrorReplay:!0,wasmDecodeErrorReplay:!0,simdDecodeErrorReplay:!0,simdDecodeErrorReplayType:N,autoWasm:!0,decoderErrorAutoWasm:!0,hardDecodingNotSupportAutoWasm:!0,webglAlignmentErrorReplay:!0,webglContextLostErrorReplay:!0,openWebglAlignment:!1,syncAudioAndVideo:!1,syncAudioAndVideoDiff:500,playbackDelayTime:1e3,playbackFps:25,playbackForwardMaxRateDecodeIFrame:4,playbackCurrentTimeMove:!0,useVideoRender:!0,useCanvasRender:!1,networkDelayTimeoutReplay:!1,recordType:S,checkFirstIFrame:!0,nakedFlowFps:25,audioEngine:null,isShowRecordingUI:!0,isShowZoomingUI:!0,useFaceDetector:!1,useObjectDetector:!1,useImageDetector:!1,useOcclusionDetector:!1,ptzPositionConfig:{},ptzShowType:"vertical",ptzClickType:K,ptzStopEmitDelay:.3,ptzZoomShow:!1,ptzApertureShow:!1,ptzFocusShow:!1,ptzMoreArrowShow:!1,ptzCruiseShow:!1,ptzFogShow:!1,ptzWiperShow:!1,ptzSupportDraggable:!1,weiXinInAndroidAudioBufferSize:4800,isM7sCrypto:!1,m7sCryptoAudio:!1,isSm4Crypto:!1,isXorCrypto:!1,sm4CryptoKey:"",m7sCryptoKey:"",xorCryptoKey:"",cryptoKey:"",cryptoIV:"",cryptoKeyUrl:"",autoResize:!1,useWebFullScreen:!1,ptsMaxDiff:3600,aiFaceDetectLevel:2,aiFaceDetectWidth:240,aiFaceDetectShowRect:!0,aiFaceDetectInterval:1e3,aiFaceDetectRectConfig:{},aiObjectDetectLevel:2,aiObjectDetectWidth:240,aiObjectDetectShowRect:!0,aiObjectDetectInterval:1e3,aiObjectDetectRectConfig:{},aiOcclusionDetectInterval:1e3,aiImageDetectDrop:!1,aiImageDetectActive:!1,videoRenderSupportScale:!0,mediaSourceTsIsMaxDiffReplay:!0,controlHtml:"",isH265:!1,isWebrtcH265:!1,supportLockScreenPlayAudio:!0,supportHls265:!1,isEmitSEI:!1,pauseAndNextPlayUseLastFrameShow:!1,demuxUseWorker:!0,playFailedAndReplay:!0,showMessageConfig:{webglAlignmentError:"Webgl 渲染失败",webglContextLostError:"webgl 上下文丢失",mediaSourceH265NotSupport:"不支持硬解码H265",mediaSourceFull:"缓冲区已满",mediaSourceAppendBufferError:"初始化解码器失败",mseSourceBufferError:"解码失败",mseAddSourceBufferError:"初始化解码器失败",mediaSourceDecoderConfigurationError:"初始化解码器失败",mediaSourceTsIsMaxDiff:"流异常",mseWidthOrHeightChange:"流异常",mediaSourceAudioG711NotSupport:"硬解码不支持G711a/u音频格式",mediaSourceUseCanvasRenderPlayFailed:"MediaSource解码使用canvas渲染失败",webcodecsH265NotSupport:"不支持硬解码H265",webcodecsUnsupportedConfigurationError:"初始化解码器失败",webcodecsDecodeConfigureError:"初始化解码器失败",webcodecsDecodeError:"解码失败",wcsWidthOrHeightChange:"解码失败",wasmDecodeError:"解码失败",simdDecodeError:"解码失败",wasmWidthOrHeightChange:"流异常",wasmUseVideoRenderError:"video自动渲染失败",videoElementPlayingFailed:"video自动渲染失败",simdH264DecodeVideoWidthIsTooLarge:"不支持该分辨率的视频",networkDelayTimeout:"网络超时重播失败",fetchError:"请求失败",streamEnd:"请求结束",websocketError:"请求失败",webrtcError:"请求失败",hlsError:"请求失败",decoderWorkerInitError:"初始化worker失败",videoElementPlayingFailedForWebrtc:"video自动渲染失败",videoInfoError:"解析视频分辨率失败",webrtcStreamH265:"webrtc不支持H265",delayTimeout:"播放超时重播失败",loadingTimeout:"加载超时重播失败",loadingTimeoutRetryEnd:"加载超时重播失败",delayTimeoutRetryEnd:"播放超时重播失败"},videoElementPlayingFailedReplay:!0,mp4RecordUseWasm:!0,mseAutoCleanupSourceBuffer:!0,mseAutoCleanupMaxBackwardDuration:30,mseAutoCleanupMinBackwardDuration:10,widthOrHeightChangeReplay:!0,simdH264DecodeVideoWidthIsTooLargeReplay:!0,mediaSourceAudioG711NotSupportReplay:!0,mediaSourceAudioInitTimeoutReplay:!0,mediaSourceUseCanvasRenderPlayFailedReplay:!0,mediaSourceUseCanvasRenderPlayFailedReplayType:W,widthOrHeightChangeReplayDelayTime:0,ghostWatermarkConfig:{on:5,off:5,content:"",fontSize:12,color:"white",opacity:.15,speed:.2},dynamicWatermarkConfig:{content:"",speed:.2,fontSize:12,color:"white",opacity:.15},isDropSameTimestampGop:!1,mseDecodeAudio:!1,nakedFlowH265DemuxUseNew:!0,extendDomConfig:{html:"",showBeforePlay:!1,showAfterLoading:!0},disableContextmenu:!1,mseDecoderUseWorker:!1,openMemoryLog:!1,mainThreadFetchUseWorker:!0,playFailedAndPausedShowPlayBtn:!0,mseCorrectionTimestamp:!0,flvDemuxBufferSizeTooLargeReplay:!1,flvDemuxBufferSizeTooLargeEmitFailed:!1,flvDemuxBufferSizeMaxLarge:1048576,isCheckInView:!1,hiddenControl:!1},re="init",ae="initVideo",oe="render",ne="playAudio",le="initAudio",de="audioCode",he="audioNalu",ce="audioAACSequenceHeader",ue="videoCode",pe="videoCodec",fe="videoNalu",me="videoPayload",ge="audioPayload",ye="wasmError",Ae="workerFetch",be="iframeIntervalTs",ve="isDropping",_e="workerEnd",Se="playbackStreamVideoFps",we="wasmDecodeVideoNoResponseError",Ee="wasmWidthOrHeightChange",Te="simdDecodeError",ke="simdH264DecodeVideoWidthIsTooLarge",Ce="closeEnd",xe="tempStream",Re="videoSEI",De="flvScriptData",Le="aacSequenceHeader",Pe="videoSequenceHeader",Be="flvBufferData",Ie="checkFirstIFrame",Me="mseHandle",Ue="mseFirstRenderTime",Fe="mseError",Oe="Invalid NAL unit size",Ne=1,je=2,ze=8,Ge=9,He=18,Ve="init",$e="decode",We="audioDecode",Je="videoDecode",qe="close",Ke="updateConfig",Ye="clearBuffer",Qe="fetchStream",Xe="sendWsMessage",Ze="mseUpdateVideoTimestamp",et="fetch",tt="destroy",it="destroyEnd",st="buffer",rt="fetchError",at="fetchClose",ot="fetchSuccess",nt={fullscreen:"fullscreen$2",webFullscreen:"webFullscreen",decoderWorkerInit:"decoderWorkerInit",play:"play",playing:"playing",pause:"pause",mute:"mute",load:"load",loading:"loading",zooming:"zooming",videoInfo:"videoInfo",timeUpdate:"timeUpdate",audioInfo:"audioInfo",log:"log",error:"error",kBps:"kBps",timeout:"timeout",delayTimeout:"delayTimeout",delayTimeoutRetryEnd:"delayTimeoutRetryEnd",loadingTimeout:"loadingTimeout",loadingTimeoutRetryEnd:"loadingTimeoutRetryEnd",stats:"stats",performance:"performance",videoSmooth:"videoSmooth",faceDetectActive:"faceDetectActive",objectDetectActive:"objectDetectActive",occlusionDetectActive:"occlusionDetectActive",imageDetectActive:"imageDetectActive",record:"record",recording:"recording",recordingTimestamp:"recordingTimestamp",recordStart:"recordStart",recordEnd:"recordEnd",recordCreateError:"recordCreateError",recordBlob:"recordBlob",buffer:"buffer",videoFrame:"videoFrame",videoSEI:"videoSEI",start:"start",metadata:"metadata",resize:"resize",volumechange:"volumechange",volume:"volume",destroy:"destroy",beforeDestroy:"beforeDestroy",streamEnd:"streamEnd",streamRate:"streamRate",streamAbps:"streamAbps",streamVbps:"streamVbps",streamDts:"streamDts",streamSuccess:"streamSuccess",streamMessage:"streamMessage",streamError:"streamError",streamStats:"streamStats",mseSourceOpen:"mseSourceOpen",mseSourceClose:"mseSourceClose",mseSourceended:"mseSourceended",mseSourceStartStreaming:"mseSourceStartStreaming",mseSourceEndStreaming:"mseSourceEndStreaming",mseSourceBufferError:"mseSourceBufferError",mseAddSourceBufferError:"mseAddSourceBufferError",mseSourceBufferBusy:"mseSourceBufferBusy",mseSourceBufferFull:"mseSourceBufferFull",videoWaiting:"videoWaiting",videoTimeUpdate:"videoTimeUpdate",videoSyncAudio:"videoSyncAudio",playToRenderTimes:"playToRenderTimes",playbackTime:"playbackTime",playbackTimestamp:"playbackTimestamp",playbackTimeScroll:"playbackTimeScroll",playbackPrecision:"playbackPrecision",playbackShowPrecisionChange:"playbackShowPrecisionChange",playbackJustTime:"playbackJustTime",playbackStats:"playbackStats",playbackSeek:"playbackSeek",playbackPause:"playbackPause",playbackPauseOrResume:"playbackPauseOrResume",playbackRateChange:"playbackRateChange",playbackPreRateChange:"playbackPreRateChange",ptz:"ptz",streamQualityChange:"streamQualityChange",visibilityChange:"visibilityChange",netBuf:"netBuf",close:"close",networkDelayTimeout:"networkDelayTimeout",togglePerformancePanel:"togglePerformancePanel",viewResizeChange:"viewResizeChange",flvDemuxBufferSizeTooLarge:"flvDemuxBufferSizeTooLarge",talkGetUserMediaSuccess:"talkGetUserMediaSuccess",talkGetUserMediaFail:"talkGetUserMediaFail",talkGetUserMediaTimeout:"talkGetUserMediaTimeout",talkStreamStart:"talkStreamStart",talkStreamOpen:"talkStreamOpen",talkStreamClose:"talkStreamClose",talkStreamError:"talkStreamError",talkStreamInactive:"talkStreamInactive",webrtcDisconnect:"webrtcDisconnect",webrtcFailed:"webrtcFailed",webrtcClosed:"webrtcClosed",webrtcOnConnectionStateChange:"webrtcOnConnectionStateChange",webrtcOnIceConnectionStateChange:"webrtcOnIceConnectionStateChange",crashLog:"crashLog",focus:"focus",blur:"blur",inView:"inView",visibilityHiddenTimeout:"visibilityHiddenTimeout",websocketOpen:"websocketOpen",websocketClose:"websocketClose",websocketError:"websocketError",websocketMessage:"websocketMessage",aiObjectDetectorInfo:"aiObjectDetectorInfo",aiFaceDetectorInfo:"aiFaceDetectorInfo",aiOcclusionDetectResult:"aiOcclusionDetectResult",aiImageDetectResult:"aiImageDetectResult",playFailedAndPaused:"playFailedAndPaused",audioResumeState:"audioResumeState",webrtcStreamH265:"webrtcStreamH265",flvMetaData:"flvMetaData",talkFailedAndStop:"talkFailedAndStop",removeLoadingBgImage:"removeLoadingBgImage",memoryLog:"memoryLog",downloadMemoryLog:"downloadMemoryLog",pressureObserverCpu:"pressureObserverCpu",currentPts:"currentPts",online:"online",offline:"offline",networkState:"networkState"},lt={load:nt.load,timeUpdate:nt.timeUpdate,videoInfo:nt.videoInfo,audioInfo:nt.audioInfo,error:nt.error,kBps:nt.kBps,start:nt.start,timeout:nt.timeout,loadingTimeout:nt.loadingTimeout,loadingTimeoutRetryEnd:nt.loadingTimeoutRetryEnd,delayTimeout:nt.delayTimeout,delayTimeoutRetryEnd:nt.delayTimeoutRetryEnd,fullscreen:"fullscreen",webFullscreen:nt.webFullscreen,play:nt.play,pause:nt.pause,mute:nt.mute,stats:nt.stats,performance:nt.performance,recordingTimestamp:nt.recordingTimestamp,recordStart:nt.recordStart,recordCreateError:nt.recordCreateError,recordEnd:nt.recordEnd,recordBlob:nt.recordBlob,playToRenderTimes:nt.playToRenderTimes,playbackSeek:nt.playbackSeek,playbackStats:nt.playbackStats,playbackTimestamp:nt.playbackTimestamp,playbackPauseOrResume:nt.playbackPauseOrResume,playbackPreRateChange:nt.playbackPreRateChange,playbackRateChange:nt.playbackRateChange,playbackShowPrecisionChange:nt.playbackShowPrecisionChange,ptz:nt.ptz,streamQualityChange:nt.streamQualityChange,zooming:nt.zooming,crashLog:nt.crashLog,focus:nt.focus,blur:nt.blur,visibilityHiddenTimeout:nt.visibilityHiddenTimeout,visibilityChange:nt.visibilityChange,websocketOpen:nt.websocketOpen,websocketClose:nt.websocketClose,networkDelayTimeout:nt.networkDelayTimeout,aiObjectDetectorInfo:nt.aiObjectDetectorInfo,aiFaceDetectorInfo:nt.aiFaceDetectorInfo,aiOcclusionDetectResult:nt.aiOcclusionDetectResult,aiImageDetectResult:nt.aiImageDetectResult,playFailedAndPaused:nt.playFailedAndPaused,streamEnd:nt.streamEnd,audioResumeState:nt.audioResumeState,videoSEI:nt.videoSEI,flvMetaData:nt.flvMetaData,webrtcOnConnectionStateChange:nt.webrtcOnConnectionStateChange,webrtcOnIceConnectionStateChange:nt.webrtcOnIceConnectionStateChange,currentPts:nt.currentPts,videoSmooth:nt.videoSmooth,networkState:nt.networkState,volume:nt.volume},dt={talkStreamClose:nt.talkStreamClose,talkStreamError:nt.talkStreamError,talkStreamInactive:nt.talkStreamInactive,talkGetUserMediaTimeout:nt.talkGetUserMediaTimeout,talkFailedAndStop:nt.talkFailedAndStop},ht={talkStreamError:nt.talkStreamError,talkStreamClose:nt.talkStreamClose},ct={playError:"playIsNotPauseOrUrlIsNull",fetchError:"fetchError",websocketError:"websocketError",webcodecsH265NotSupport:"webcodecsH265NotSupport",webcodecsDecodeError:"webcodecsDecodeError",webcodecsUnsupportedConfigurationError:"webcodecsUnsupportedConfigurationError",webcodecsDecodeConfigureError:"webcodecsDecodeConfigureError",mediaSourceH265NotSupport:"mediaSourceH265NotSupport",mediaSourceAudioG711NotSupport:"mediaSourceAudioG711NotSupport",mediaSourceAudioInitTimeout:"mediaSourceAudioInitTimeout",mediaSourceAudioNoDataTimeout:"mediaSourceAudioNoDataTimeout",mediaSourceDecoderConfigurationError:"mediaSourceDecoderConfigurationError",mediaSourceFull:nt.mseSourceBufferFull,mseSourceBufferError:nt.mseSourceBufferError,mseAddSourceBufferError:nt.mseAddSourceBufferError,mediaSourceAppendBufferError:"mediaSourceAppendBufferError",mediaSourceTsIsMaxDiff:"mediaSourceTsIsMaxDiff",mediaSourceUseCanvasRenderPlayFailed:"mediaSourceUseCanvasRenderPlayFailed",mediaSourceBufferedIsZeroError:"mediaSourceBufferedIsZeroError",wasmDecodeError:"wasmDecodeError",wasmUseVideoRenderError:"wasmUseVideoRenderError",hlsError:"hlsError",webrtcError:"webrtcError",webrtcClosed:nt.webrtcClosed,webrtcIceCandidateError:"webrtcIceCandidateError",webglAlignmentError:"webglAlignmentError",wasmWidthOrHeightChange:"wasmWidthOrHeightChange",mseWidthOrHeightChange:"mseWidthOrHeightChange",wcsWidthOrHeightChange:"wcsWidthOrHeightChange",widthOrHeightChange:"widthOrHeightChange",tallWebsocketClosedByError:"tallWebsocketClosedByError",flvDemuxBufferSizeTooLarge:nt.flvDemuxBufferSizeTooLarge,wasmDecodeVideoNoResponseError:"wasmDecodeVideoNoResponseError",audioChannelError:"audioChannelError",simdH264DecodeVideoWidthIsTooLarge:"simdH264DecodeVideoWidthIsTooLarge",simdDecodeError:"simdDecodeError",webglContextLostError:"webglContextLostError",videoElementPlayingFailed:"videoElementPlayingFailed",videoElementPlayingFailedForWebrtc:"videoElementPlayingFailedForWebrtc",decoderWorkerInitError:"decoderWorkerInitError",videoInfoError:"videoInfoError",videoCodecIdError:"videoCodecIdError",streamEnd:nt.streamEnd,websocket1006Error:"websocket1006Error",delayTimeout:nt.delayTimeout,loadingTimeout:nt.loadingTimeout,networkDelayTimeout:nt.networkDelayTimeout,aliyunRtcError:"aliyunRtcError",...ht},ut="notConnect",pt="open",ft="close",mt="error",gt={download:"download",base64:"base64",blob:"blob"},yt="download",At="blob",bt={7:"H264(AVC)",12:"H265(HEVC)",99:"MPEG4"},vt=7,_t=12,St="H264(AVC)",wt="H265(HEVC)",Et=10,Tt=2,kt={AAC:"AAC",ALAW:"ALAW(g711a)",MULAW:"MULAW(g711u)",MP3:"MP3"},Ct={10:"AAC",7:"ALAW",8:"MULAW",2:"MP3"},xt=7,Rt=8,Dt=5,Lt=1,Pt=5,Bt=6,It=7,Mt=8,Ut=14,Ft=19,Ot=20,Nt=21,jt=32,zt=32,Gt=33,Ht=33,Vt=34,$t=34,Wt=39,Jt=39,qt=40,Kt=38,Yt=48,Qt=0,Xt=1,Zt=2,ei="webcodecs",ti="webgl",ii="webgl2",si="webgpu",ri="offscreen",ai="mse",oi="hls",ni="webrtc",li="key",di="delta",hi='video/mp4; codecs="avc1.64002A"',ci='video/mp4; codecs="hev1.1.6.L123.b0"',ui='video/mp4;codecs="hev1.1.6.L120.90"',pi='video/mp4;codecs="hev1.2.4.L120.90"',fi='video/mp4;codecs="hev1.3.E.L120.90"',mi='video/mp4;codecs="hev1.4.10.L120.90"',gi="ended",yi="open",Ai="closed",bi=27,vi=38,_i=40,Si="oneHour",wi="halfHour",Ei="tenMin",Ti="fiveMin",ki={oneHour:"one-hour",halfHour:"half-hour",tenMin:"ten-min",fiveMin:"five-min"},Ci=["oneHour","halfHour","tenMin","fiveMin"],xi=["up","right","down","left","left-up","right-up","left-down","right-down"],Ri="stop",Di="fiStop",Li="zoomExpand",Pi="zoomNarrow",Bi="apertureFar",Ii="apertureNear",Mi="focusFar",Ui="focusNear",Fi="cruiseStart",Oi="cruiseStop",Ni="fogOpen",ji="fogClose",zi="wiperOpen",Gi="wiperClose",Hi="g711a",Vi="g711u",$i="pcm",Wi="opus",Ji={png:"image/png",jpeg:"image/jpeg",webp:"image/webp"},qi="sourceclose",Ki="sourceopen",Yi="sourceended",Qi="startstreaming",Xi="endstreaming",Zi="qualitychange",es="canplay",ts="waiting",is="timeupdate",ss="ratechange",rs="avc",as="hevc",os="A key frame is required after configure() or flush()",ns="Cannot call 'decode' on a closed codec",ls="Unsupported configuration",ds="Decoder failure",hs="Decoding error",cs="Decoder error",us="HEVC decoding is not supported",ps="The user aborted a request",fs="AbortError",ms="AbortError",gs="loading",ys="playing",As="paused",bs="destroy",vs=0,_s=1,Ss=8,ws=0,Es=98,Ts="empty",ks="rtp",Cs="tcp",xs="open",Rs="close",Ds="error",Ls="message",Ps="worklet",Bs="script",Is={encType:Hi,packetType:ks,packetTcpSendType:Cs,rtpSsrc:"0000000000",numberChannels:1,sampleRate:8e3,sampleBitsWidth:16,sendInterval:20,debug:!1,debugLevel:q,testMicrophone:!1,saveToTempFile:!1,audioBufferLength:160,engine:Ps,checkGetUserMediaTimeout:!1,getUserMediaTimeout:1e4,audioConstraints:{latency:!0,noiseSuppression:!0,autoGainControl:!0,echoCancellation:!0,sampleRate:48e3,channelCount:1}},Ms="worklet",Us="script",Fs="active",Os={name:"",index:0,icon:"",iconHover:"",iconTitle:"",activeIcon:"",activeIconHover:"",activeIconTitle:"",click:null,activeClick:null},Ns={content:"",click:null,index:0},js=1,zs="subtitle-segments",Gs="hls-manifest-loaded",Hs="hls-level-loaded",Vs="demuxed-track",$s="flv-script-data",Ws="metadata-parsed",Js="ttfb",qs="load-retry",Ks="load-start",Ys="speed",Qs="load-complete",Xs="load-response-headers",Zs="sei",er="sei-in-time",tr="switch-url-failed",ir="switch-url-success",sr="subtitle-playlist",rr="stream-parsed",ar="error",or=[0,160,240,320,480,640],nr=[0,160,240,320,480,640],lr=["轻松","正常","较高","高"],dr="idle",hr="buffering",cr="complete",ur={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"},pr="video decoder initialization failed",fr="audio packet",mr=1,gr=2,yr=0,Ar=1,br=3,vr=16,_r="candidate-pair",Sr="inbound-rtp",wr="local-candidate",Er="remote-candidate",Tr="track",kr=9e4,Cr=45e4,xr=9e4,Rr="ws1006",Dr="mseDecodeError",Lr="wcsDecodeError";class Pr{constructor(e){this.log=function(t){if(e._opt.debug&&e._opt.debugLevel==J){const a=e._opt.debugUuid?`[${e._opt.debugUuid}]`:"";for(var i=arguments.length,s=new Array(i>1?i-1:0),r=1;r<i;r++)s[r-1]=arguments[r];console.log(`JbPro${a}[✅✅✅][${t}]`,...s)}},this.warn=function(t){if(e._opt.debug&&(e._opt.debugLevel==J||e._opt.debugLevel==q)){const a=e._opt.debugUuid?`[${e._opt.debugUuid}]`:"";for(var i=arguments.length,s=new Array(i>1?i-1:0),r=1;r<i;r++)s[r-1]=arguments[r];console.log(`JbPro${a}[❗❗❗][${t}]`,...s)}},this.error=function(t){const i=e._opt.debugUuid?`[${e._opt.debugUuid}]`:"";for(var s=arguments.length,r=new Array(s>1?s-1:0),a=1;a<s;a++)r[a-1]=arguments[a];console.error(`JbPro${i}[❌❌❌][${t}]`,...r)}}}var Br="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Ir(e,t){return e(t={exports:{}},t.exports),t.exports}var Mr=Ir((function(e){!function(){var t="undefined"!=typeof window&&void 0!==window.document?window.document:{},i=e.exports,s=function(){for(var e,i=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],s=0,r=i.length,a={};s<r;s++)if((e=i[s])&&e[1]in t){for(s=0;s<e.length;s++)a[i[0][s]]=e[s];return a}return!1}(),r={change:s.fullscreenchange,error:s.fullscreenerror},a={request:function(e,i){return new Promise(function(r,a){var o=function(){this.off("change",o),r()}.bind(this);this.on("change",o);var n=(e=e||t.documentElement)[s.requestFullscreen](i);n instanceof Promise&&n.then(o).catch(a)}.bind(this))},exit:function(){return new Promise(function(e,i){if(this.isFullscreen){var r=function(){this.off("change",r),e()}.bind(this);this.on("change",r);var a=t[s.exitFullscreen]();a instanceof Promise&&a.then(r).catch(i)}else e()}.bind(this))},toggle:function(e,t){return this.isFullscreen?this.exit():this.request(e,t)},onchange:function(e){this.on("change",e)},onerror:function(e){this.on("error",e)},on:function(e,i){var s=r[e];s&&t.addEventListener(s,i,!1)},off:function(e,i){var s=r[e];s&&t.removeEventListener(s,i,!1)},raw:s};s?(Object.defineProperties(a,{isFullscreen:{get:function(){return Boolean(t[s.fullscreenElement])}},element:{enumerable:!0,get:function(){return t[s.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(t[s.fullscreenEnabled])}}}),i?e.exports=a:window.screenfull=a):i?e.exports={isEnabled:!1}:window.screenfull={isEnabled:!1}}()}));Mr.isEnabled;class Ur{constructor(e){this._buffer=e,this._buffer_index=0,this._total_bytes=e.byteLength,this._total_bits=8*e.byteLength,this._current_word=0,this._current_word_bits_left=0}destroy(){this._buffer=null}_fillCurrentWord(){let e=this._total_bytes-this._buffer_index;if(e<=0)return void console.error("ExpGolomb: _fillCurrentWord() but no bytes available",this._total_bytes,this._buffer_index);let t=Math.min(4,e),i=new Uint8Array(4);i.set(this._buffer.subarray(this._buffer_index,this._buffer_index+t)),this._current_word=new DataView(i.buffer).getUint32(0,!1),this._buffer_index+=t,this._current_word_bits_left=8*t}readBits(e){if(e>32&&console.error("ExpGolomb: readBits() bits exceeded max 32bits!"),e<=this._current_word_bits_left){let t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}let t=this._current_word_bits_left?this._current_word:0;t>>>=32-this._current_word_bits_left;let i=e-this._current_word_bits_left;this._fillCurrentWord();let s=Math.min(i,this._current_word_bits_left),r=this._current_word>>>32-s;return this._current_word<<=s,this._current_word_bits_left-=s,t=t<<s|r,t}readBool(){return 1===this.readBits(1)}readByte(){return this.readBits(8)}_skipLeadingZero(){let e;for(e=0;e<this._current_word_bits_left;e++)if(0!=(this._current_word&2147483648>>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}readUEG(){let e=this._skipLeadingZero();return this.readBits(e+1)-1}readSEG(){let e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}const Fr=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,-1,-1,-1],Or=Fr,Nr=Fr;function jr(e){let{profile:t,sampleRate:i,channel:s}=e;return new Uint8Array([175,0,t<<3|(14&i)>>1,(1&i)<<7|s<<3])}function zr(e){return Gr(e)&&e[1]===vs}function Gr(e){return e[0]>>4===Et}function Hr(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}}function Vr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4;return 1024*t/e}const $r=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];class Wr{constructor(e){this.buffer=e,this.buflen=e.length,this.bufpos=0,this.bufoff=0,this.iserro=!1}read(e){let t=0,i=0;for(;e;){if(e<0||this.bufpos>=this.buflen)return this.iserro=!0,0;this.iserro=!1,i=this.bufoff+e>8?8-this.bufoff:e,t<<=i,t+=this.buffer[this.bufpos]>>8-this.bufoff-i&255>>8-i,this.bufoff+=i,e-=i,8==this.bufoff&&(this.bufpos++,this.bufoff=0)}return t}look(e){let t=this.bufpos,i=this.bufoff,s=this.read(e);return this.bufpos=t,this.bufoff=i,s}read_golomb(){let e;for(e=0;0==this.read(1)&&!this.iserro;e++);return(1<<e)+this.read(e)-1}}function Jr(e){let t=e.read(5);return 31===t&&(t=e.read(6)+32),t}function qr(e,t){return t.sampling_index=e.read(4),15==t.sampling_index?e.read(24):Kr[t.sampling_index]}const Kr=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,0,0,0],Yr=[0,1,2,3,4,5,6,8];class Qr{constructor(e){this.data_=e,this.eof_flag_=!1,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&console.error("Could not found ADTS syncword until payload end")}findNextSyncwordOffset(e){let t=e,i=this.data_;for(;;){if(t+7>=i.byteLength)return this.eof_flag_=!0,i.byteLength;if(4095===(i[t+0]<<8|i[t+1])>>>4)return t;t++}}readNextAACFrame(){let e=this.data_,t=null;for(;null==t&&!this.eof_flag_;){let i=this.current_syncword_offset_,s=(8&e[i+1])>>>3,r=(6&e[i+1])>>>1,a=1&e[i+1],o=(192&e[i+2])>>>6,n=(60&e[i+2])>>>2,l=(1&e[i+2])<<2|(192&e[i+3])>>>6,d=(3&e[i+3])<<11|e[i+4]<<3|(224&e[i+5])>>>5;if(e[i+6],i+d>this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}let h=1===a?7:9,c=d-h;i+=h;let u=this.findNextSyncwordOffset(i+c);if(this.current_syncword_offset_=u,0!==s&&1!==s||0!==r)continue;let p=e.subarray(i,i+c);t={},t.audio_object_type=o+1,t.sampling_freq_index=n,t.sampling_frequency=Or[n],t.channel_config=l,t.data=p}return t}hasIncompleteData(){return this.has_last_incomplete_data}getIncompleteData(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null}}class Xr{constructor(e){this.data_=e,this.eof_flag_=!1,this.current_syncword_offset_=this.findNextSyncwordOffset(0),this.eof_flag_&&console.error("Could not found ADTS syncword until payload end")}findNextSyncwordOffset(e){let t=e,i=this.data_;for(;;){if(t+1>=i.byteLength)return this.eof_flag_=!0,i.byteLength;if(695===(i[t+0]<<3|i[t+1]>>>5))return t;t++}}getLATMValue(e){let t=e.readBits(2),i=0;for(let s=0;s<=t;s++)i<<=8,i|=e.readByte();return i}readNextAACFrame(e){let t=this.data_,i=null;for(;null==i&&!this.eof_flag_;){let s=this.current_syncword_offset_,r=(31&t[s+1])<<8|t[s+2];if(s+3+r>=this.data_.byteLength){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}let a=new Ur(t.subarray(s+3,s+3+r)),o=null;if(a.readBool()){if(null==e){console.warn("StreamMuxConfig Missing"),this.current_syncword_offset_=this.findNextSyncwordOffset(s+3+r),a.destroy();continue}o=e}else{let e=a.readBool();if(e&&a.readBool()){console.error("audioMuxVersionA is Not Supported"),a.destroy();break}if(e&&this.getLATMValue(a),!a.readBool()){console.error("allStreamsSameTimeFraming zero is Not Supported"),a.destroy();break}if(0!==a.readBits(6)){console.error("more than 2 numSubFrames Not Supported"),a.destroy();break}if(0!==a.readBits(4)){console.error("more than 2 numProgram Not Supported"),a.destroy();break}if(0!==a.readBits(3)){console.error("more than 2 numLayer Not Supported"),a.destroy();break}let t=e?this.getLATMValue(a):0,i=a.readBits(5);t-=5;let s=a.readBits(4);t-=4;let r=a.readBits(4);t-=4,a.readBits(3),t-=3,t>0&&a.readBits(t);let n=a.readBits(3);if(0!==n){console.error(`frameLengthType = ${n}. Only frameLengthType = 0 Supported`),a.destroy();break}a.readByte();let l=a.readBool();if(l)if(e)this.getLATMValue(a);else{let e=0;for(;;){e<<=8;let t=a.readBool();if(e+=a.readByte(),!t)break}console.log(e)}a.readBool()&&a.readByte(),o={},o.audio_object_type=i,o.sampling_freq_index=s,o.sampling_frequency=Or[o.sampling_freq_index],o.channel_config=r,o.other_data_present=l}let n=0;for(;;){let e=a.readByte();if(n+=e,255!==e)break}let l=new Uint8Array(n);for(let e=0;e<n;e++)l[e]=a.readByte();i={},i.audio_object_type=o.audio_object_type,i.sampling_freq_index=o.sampling_freq_index,i.sampling_frequency=Or[o.sampling_freq_index],i.channel_config=o.channel_config,i.other_data_present=o.other_data_present,i.data=l,this.current_syncword_offset_=this.findNextSyncwordOffset(s+3+r)}return i}hasIncompleteData(){return this.has_last_incomplete_data}getIncompleteData(){return this.has_last_incomplete_data?this.data_.subarray(this.current_syncword_offset_):null}}function Zr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}function ea(e){const t=e.byteLength,i=new Uint8Array(4);i[0]=t>>>24&255,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t;const s=new Uint8Array(t+4);return s.set(i,0),s.set(e,4),s}function ta(){}function ia(e){let t=null;const i=["webgl","experimental-webgl","moz-webgl","webkit-3d"];let s=0;for(;!t&&s<i.length;){const r=i[s];try{let i={preserveDrawingBuffer:!0};t=e.getContext(r,i)}catch(e){console.error(e),t=null}t&&"function"==typeof t.getParameter||(t=null),++s}return t}function sa(e){let t=null;return t=e.getContext("webgl2"),t}function ra(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=e.split(","),i=atob(t[1]),s=t[0].replace("data:","").replace(";base64","");let r=i.length,a=new Uint8Array(r);for(;r--;)a[r]=i.charCodeAt(r);return new File([a],"file",{type:s})}function aa(){return(new Date).getTime()}function oa(e,t,i){return Math.max(Math.min(e,Math.max(t,i)),Math.min(t,i))}function na(e,t,i){if(e)return"object"==typeof t&&Object.keys(t).forEach((i=>{na(e,i,t[i])})),e.style[t]=i,e}function la(e,t){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e)return 0;const s=getComputedStyle(e,null).getPropertyValue(t);return i?parseFloat(s):s}function da(){return performance&&"function"==typeof performance.now?performance.now():Date.now()}function ha(e){let t=0,i=da();return s=>{if(!Ta(s))return;t+=s;const r=da(),a=r-i;a>=1e3&&(e(t/a*1e3),i=r,t=0)}}(()=>{try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch(e){}})();const ca='"4-1-2024"';function ua(){return/iphone|ipod|android.*mobile|windows.*phone|blackberry.*mobile/i.test(window.navigator.userAgent.toLowerCase())}function pa(){return!(ua()||/ipad|android(?!.*mobile)|tablet|kindle|silk/i.test(window.navigator.userAgent.toLowerCase()))}function fa(){const e=window.navigator.userAgent.toLowerCase();return/android/i.test(e)}function ma(){const e=window.navigator.userAgent.toLowerCase();return/firefox/i.test(e)}function ga(){const e=window.navigator.userAgent.toLowerCase()||"",t={type:"",version:""},i={IE:window.ActiveXObject||"ActiveXObject"in window,Chrome:e.indexOf("chrome")>-1&&e.indexOf("safari")>-1,Firefox:e.indexOf("firefox")>-1,Opera:e.indexOf("opera")>-1,Safari:e.indexOf("safari")>-1&&-1==e.indexOf("chrome"),Edge:e.indexOf("edge")>-1,QQBrowser:/qqbrowser/.test(e),WeixinBrowser:/MicroMessenger/i.test(e)};for(let s in i)if(i[s]){let i="";if("IE"===s){const t=e.match(/(msie\s|trident.*rv:)([\w.]+)/);t&&t.length>2&&(i=e.match(/(msie\s|trident.*rv:)([\w.]+)/)[2])}else if("Chrome"===s){for(let e in navigator.mimeTypes)"application/360softmgrplugin"===navigator.mimeTypes[e].type&&(s="360");const t=e.match(/chrome\/([\d.]+)/);t&&t.length>1&&(i=t[1])}else if("Firefox"===s){const t=e.match(/firefox\/([\d.]+)/);t&&t.length>1&&(i=t[1])}else if("Opera"===s){const t=e.match(/opera\/([\d.]+)/);t&&t.length>1&&(i=t[1])}else if("Safari"===s){const t=e.match(/version\/([\d.]+)/);t&&t.length>1&&(i=t[1])}else if("Edge"===s){const t=e.match(/edge\/([\d.]+)/);t&&t.length>1&&(i=t[1])}else if("QQBrowser"===s){const t=e.match(/qqbrowser\/([\d.]+)/);t&&t.length>1&&(i=t[1])}t.type=s,t.version=parseInt(i)}return t}function ya(){const e=window.navigator.userAgent.toLowerCase();return e&&/iphone|ipad|ipod|ios/.test(e)}function Aa(){const e=window.navigator.userAgent;return!e.match(/Chrome/gi)&&!!e.match(/Safari/gi)}function ba(e,t){if(0===arguments.length)return null;var i,s=t||"{y}-{m}-{d} {h}:{i}:{s}";"object"==typeof e?i=e:(10===(""+e).length&&(e=1e3*parseInt(e)),e=+e,i=new Date(e));var r={y:i.getFullYear(),m:i.getMonth()+1,d:i.getDate(),h:i.getHours(),i:i.getMinutes(),s:i.getSeconds(),a:i.getDay()},a=s.replace(/{(y|m|d|h|i|s|a)+}/g,((e,t)=>{var i=r[t];return"a"===t?["一","二","三","四","五","六","日"][i-1]:(e.length>0&&i<10&&(i="0"+i),i||0)}));return a}function va(){return"VideoFrame"in window}function _a(e){if("string"!=typeof e)return e;var t=Number(e);return isNaN(t)?e:t}function Sa(){return"xxxxxxxxxxxx4xxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}function wa(e,t){let i,s,r=!1;return function a(){for(var o=arguments.length,n=new Array(o),l=0;l<o;l++)n[l]=arguments[l];if(r)return i=n,void(s=this);r=!0,e.apply(this,n),setTimeout((()=>{r=!1,i&&(a.apply(s,i),i=null,s=null)}),t)}}function Ea(e){if(null==e||""==e)return"0 Bytes";const t=new Array("Bytes","KB","MB","GB","TB","PB","EB","ZB","YB");let i=0;const s=parseFloat(e);i=Math.floor(Math.log(s)/Math.log(1024));var r=s/Math.pow(1024,i);return(r=r.toFixed(2))+t[i]}function Ta(e){return"[object Number]"===Object.prototype.toString.call(e)}function ka(){let e=!1;return"MediaSource"in self&&(self.MediaSource.isTypeSupported(ci)||self.MediaSource.isTypeSupported(ui)||self.MediaSource.isTypeSupported(pi)||self.MediaSource.isTypeSupported(fi)||self.MediaSource.isTypeSupported(mi))&&(e=!0),e}function Ca(){const e=ga();return"chrome"===e.type.toLowerCase()&&e.version>=107}function xa(){let e=!1;return"MediaStreamTrackGenerator"in window&&(e=!0),e}function Ra(){let e=!1;return"MediaStream"in window&&(e=!0),e}function Da(e,t){let i=window.URL.createObjectURL(t),s=window.document.createElement("a");s.download=e,s.href=i;let r=window.document.createEvent("MouseEvents");r.initEvent("click",!0,!0),s.dispatchEvent(r),setTimeout((()=>{window.URL.revokeObjectURL(i)}),ya()?1e3:0)}function La(e){return null==e}function Pa(e){return!0===e||!1===e}function Ba(e){return!La(e)}function Ia(e){let t={left:"",right:"",top:"",bottom:"",opacity:1,backgroundColor:"",image:{src:"",width:"100",height:"60"},text:{content:"",fontSize:"14",color:"#000",width:"",height:""},rect:{color:"green",lineWidth:2,width:"",height:"",fill:"",fillOpacity:.2},line:{x1:"",y1:"",x2:"",y2:"",color:"green",lineWidth:2},polygon:{color:"green",lineWidth:2,list:[],fill:"",fillOpacity:.2},html:""};const i=Object.assign(t.image,e.image||{}),s=Object.assign(t.text,e.text||{}),r=Object.assign(t.rect,e.rect||{}),a=Object.assign(t.line,e.line||{});return t=Object.assign(t,e,{image:i,text:s,rect:r,line:a}),t}function Ma(e,t){let i={container:e||"",text:"",opacity:"",angle:"",color:"",fontSize:"",fontFamily:""};return i=Object.assign(i,t),{watermark_parent_node:i.container,watermark_alpha:i.opacity,watermark_angle:i.angle,watermark_fontsize:i.fontSize,watermark_color:i.color,watermark_font:i.fontFamily,watermark_txt:i.text}}function Ua(e,t){return new Promise(((i,s)=>{let r=Ia(t);if(!r.image.src&&!r.text.content)return i(e);let a=document.createElement("canvas");a.width=t.width,a.height=t.height;let o=a.getContext("2d"),n=0,l=0;Ta(r.left)?n=r.left:Ta(r.right)&&(n=a.width-r.right),Ta(r.top)?l=r.top:Ta(r.bottom)&&(l=a.height-r.bottom);const d=new Image;d.src=e,d.onload=()=>{if(o.drawImage(d,0,0),r.image&&r.image.src){const e=new Image;e.src=r.image.src,e.setAttribute("crossOrigin","Anonymous"),e.onload=()=>{n-=r.image.width,o.drawImage(e,n,l,r.image.width,r.image.height),i(a.toDataURL(t.format,t.quality))},e.onerror=e=>{s()}}else r.text&&r.text.content&&(o.font=r.text.fontSize+"px 宋体",o.fillStyle=r.text.color,o.textAlign="right",o.fillText(r.text.content,n,l),i(a.toDataURL(t.format,t.quality)))},d.onerror=e=>{s(e)}}))}function Fa(e){var t;if(e>-1){var i=Math.floor(e/3600),s=Math.floor(e/60)%60,r=e%60;t=i<10?"0"+i+":":i+":",s<10&&(t+="0"),t+=s+":",(r=Math.round(r))<10&&(t+="0"),t+=r.toFixed(0)}return t}function Oa(e,t){let i="";if(e>-1){const s=Math.floor(e/60)%60;let r=e%60;r=Math.round(r),i=s<10?"0"+s+":":s+":",r<10&&(i+="0"),i+=r,La(t)||(t<10&&(t="0"+t),i+=":"+t)}return i}function Na(e){let t="";if(e>-1){const i=Math.floor(e/60/60)%60;let s=Math.floor(e/60)%60,r=e%60;s=Math.round(s),t=i<10?"0"+i+":":i+":",s<10&&(t+="0"),t+=s+":",r<10&&(t+="0"),t+=r}return t}function ja(e,t){const i=Math.floor(t/60)%60,s=Math.floor(t%60);return new Date(e).setHours(i,s,0,0)}function za(e,t){const i=Math.floor(t/60/60)%60,s=Math.floor(t/60)%60,r=t%60;return new Date(e).setHours(i,s,r,0)}function Ga(e){return(""+e).length}function Ha(e){return e&&0===Object.keys(e).length}function Va(e){return!Ha(e)}function $a(e){return"string"==typeof e}const Wa=()=>{const e=window.navigator.userAgent;return/MicroMessenger/i.test(e)},Ja=()=>{const e=window.navigator.userAgent;return/Chrome/i.test(e)};function qa(e){const t=e||window.event;return t.target||t.srcElement}function Ka(){return ma()&&function(){const e=navigator.userAgent.toLowerCase();return/macintosh|mac os x/i.test(e)}()}function Ya(e){return"function"==typeof e}function Qa(e){if(ua()){let t=0,i=0;if(1===e.touches.length){let s=e.touches[0];t=s.clientX,i=s.clientY}return{posX:t,posY:i}}let t=0,i=0;const s=e||window.event;return s.pageX||s.pageY?(t=s.pageX,i=s.pageY):(s.clientX||s.clientY)&&(t=e.clientX+document.documentElement.scrollLeft+document.body.scrollLeft,i=e.clientY+document.documentElement.scrollTop+document.body.scrollTop),{posX:t,posY:i}}function Xa(){let e=document.createElement("video"),t=e.canPlayType("application/vnd.apple.mpegurl");return e=null,t}function Za(e){let t=po(e.hasAudio)&&(e.useMSE||e.useWCS&&!e.useOffscreen)&&po(e.demuxUseWorker);return!!(po(t)&&e.useMSE&&e.mseDecodeAudio&&po(e.demuxUseWorker))||t}function eo(e){const t=e.toString().trim().match(/^function\s*\w*\s*\([\w\s,]*\)\s*{([\w\W]*?)}$/)[1];const i=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(i)}function to(e){e.close()}function io(){return"https:"===window.location.protocol||"localhost"===window.location.hostname}function so(e){const t=Object.prototype.toString;return function(e){switch(t.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:try{return e instanceof Error}catch(e){return!1}}}(e)?e.message:null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function ro(e,t){t&&(e=e.filter((e=>e.type&&e.type===t)));let i=e[0],s=null,r=1;if(e.length>0){let t=e[1];t&&t.ts-i.ts>1e5&&(i=t,r=2)}if(i)for(let a=r;a<e.length;a++){let r=e[a];if(t&&r.type&&r.type!==t&&(r=null),r){if(r.ts-i.ts>=1e3){e[a-1].ts-i.ts<1e3&&(s=a+1)}}}return s}function ao(e){for(var t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),i=window.atob(t),s=new Uint8Array(i.length),r=0;r<i.length;++r)s[r]=i.charCodeAt(r);return s}function oo(e){const t=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");let s=e;return t&&(i.setAttribute("href",s),s=i.href),i.setAttribute("href",s),{origin:i.origin,href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}function no(e){let t="";if("object"==typeof e)try{t=JSON.stringify(e),t=JSON.parse(t)}catch(i){t=e}else t=e;return t}function lo(){return no(ie)}function ho(){return no(se)}function co(e){return e[0]>>4===_s&&e[1]===vs}function uo(e){return!0===e||"true"===e}function po(e){return!0!==e&&"true"!==e}function fo(e){return e.replace(/-([a-z])/g,(function(e,t){return t.toUpperCase()}))}function mo(){return/iphone/i.test(navigator.userAgent)}function go(){return window.performance&&window.performance.memory?window.performance.memory:null}function yo(){try{var e=document.createElement("canvas");return!(!window.WebGL2RenderingContext||!e.getContext("webgl2"))}catch(e){return!1}}function Ao(e){return e.trim().match(/^function\s*\w*\s*\([\w\s,]*\)\s*{([\w\W]*?)}$/)[1]}function bo(){let e=!1;return"requestVideoFrameCallback"in HTMLVideoElement.prototype&&(e=!0),e}function vo(){let e=!1;return"PressureObserver"in window&&(e=!0),e}class _o{constructor(e){this.destroys=[],this.proxy=this.proxy.bind(this),this.master=e}proxy(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!e)return;if(Array.isArray(t))return t.map((t=>this.proxy(e,t,i,s)));e.addEventListener(t,i,s);const r=()=>{Ya(e.removeEventListener)&&e.removeEventListener(t,i,s)};return this.destroys.push(r),r}destroy(){this.master.debug&&this.master.debug.log("Events","destroy"),this.destroys.forEach((e=>e())),this.destroys=[]}}class So{on(e,t,i){const s=this.e||(this.e={});return(s[e]||(s[e]=[])).push({fn:t,ctx:i}),this}once(e,t,i){const s=this;function r(){s.off(e,r);for(var a=arguments.length,o=new Array(a),n=0;n<a;n++)o[n]=arguments[n];t.apply(i,o)}return r._=t,this.on(e,r,i)}emit(e){const t=((this.e||(this.e={}))[e]||[]).slice();for(var i=arguments.length,s=new Array(i>1?i-1:0),r=1;r<i;r++)s[r-1]=arguments[r];for(let e=0;e<t.length;e+=1)t[e].fn.apply(t[e].ctx,s);return this}off(e,t){const i=this.e||(this.e={});if(!e)return Object.keys(i).forEach((e=>{delete i[e]})),void delete this.e;const s=i[e],r=[];if(s&&t)for(let e=0,i=s.length;e<i;e+=1)s[e].fn!==t&&s[e].fn._!==t&&r.push(s[e]);return r.length?i[e]=r:delete i[e],this}}var wo=1e-6,Eo="undefined"!=typeof Float32Array?Float32Array:Array;function To(){var e=new Eo(16);return Eo!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function ko(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var Co,xo=function(e,t,i,s,r,a,o){var n=1/(t-i),l=1/(s-r),d=1/(a-o);return e[0]=-2*n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*d,e[11]=0,e[12]=(t+i)*n,e[13]=(r+s)*l,e[14]=(o+a)*d,e[15]=1,e};function Ro(e,t,i){var s=new Eo(3);return s[0]=e,s[1]=t,s[2]=i,s}Co=new Eo(3),Eo!=Float32Array&&(Co[0]=0,Co[1]=0,Co[2]=0);class Do{constructor(e,t){this.gl=e,t&&this.gl.pixelStorei(this.gl.UNPACK_ALIGNMENT,1);const i=this._initShaderProgram();this._programInfo={program:i,attribLocations:{vertexPosition:e.getAttribLocation(i,"aVertexPosition"),texturePosition:e.getAttribLocation(i,"aTexturePosition")},uniformLocations:{projectionMatrix:e.getUniformLocation(i,"uProjectionMatrix"),modelMatrix:e.getUniformLocation(i,"uModelMatrix"),viewMatrix:e.getUniformLocation(i,"uViewMatrix"),rgbatexture:e.getUniformLocation(i,"rgbaTexture"),ytexture:e.getUniformLocation(i,"yTexture"),utexture:e.getUniformLocation(i,"uTexture"),vtexture:e.getUniformLocation(i,"vTexture"),isyuv:e.getUniformLocation(i,"isyuv")}},this._buffers=this._initBuffers(),this._rgbatexture=this._createTexture(),this._ytexture=this._createTexture(),this._utexture=this._createTexture(),this._vtexture=this._createTexture()}destroy(){this.gl.deleteProgram(this._programInfo.program),this.gl.deleteBuffer(this._buffers.position),this.gl.deleteBuffer(this._buffers.texPosition),this.gl.deleteBuffer(this._buffers.indices),this.gl.deleteTexture(this._rgbatexture),this.gl.deleteTexture(this._ytexture),this.gl.deleteTexture(this._utexture),this.gl.deleteTexture(this._vtexture),this._programInfo=null,this._buffers=null,this._rgbatexture=null,this._ytexture=null,this._utexture=null,this._vtexture=null}_initShaderProgram(){const e=this._loadShader(this.gl.VERTEX_SHADER,"\n attribute vec4 aVertexPosition;\n attribute vec2 aTexturePosition;\n varying lowp vec2 vTexturePosition;\n void main(void) {\n gl_Position = aVertexPosition;\n vTexturePosition = aTexturePosition;\n }\n "),t=this._loadShader(this.gl.FRAGMENT_SHADER,"\n precision highp float;\n varying highp vec2 vTexturePosition;\n uniform int isyuv;\n uniform sampler2D rgbaTexture;\n uniform sampler2D yTexture;\n uniform sampler2D uTexture;\n uniform sampler2D vTexture;\n\n const mat4 YUV2RGB = mat4( 1.1643828125, 0, 1.59602734375, -.87078515625,\n 1.1643828125, -.39176171875, -.81296875, .52959375,\n 1.1643828125, 2.017234375, 0, -1.081390625,\n 0, 0, 0, 1);\n\n\n void main(void) {\n\n if (isyuv>0) {\n\n highp float y = texture2D(yTexture, vTexturePosition).r;\n highp float u = texture2D(uTexture, vTexturePosition).r;\n highp float v = texture2D(vTexture, vTexturePosition).r;\n gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;\n\n } else {\n gl_FragColor = texture2D(rgbaTexture, vTexturePosition);\n }\n }\n "),i=this.gl.createProgram();return this.gl.attachShader(i,e),this.gl.attachShader(i,t),this.gl.linkProgram(i),this.gl.getProgramParameter(i,this.gl.LINK_STATUS)?i:(console.log("Unable to initialize the shader program: "+this.gl.getProgramInfoLog(i)),null)}_loadShader(e,t){const i=this.gl,s=i.createShader(e);return i.shaderSource(s,t),i.compileShader(s),i.getShaderParameter(s,i.COMPILE_STATUS)?s:(console.log("An error occurred compiling the shaders: "+i.getShaderInfoLog(s)),i.deleteShader(s),null)}_initBuffers(){const e=this.gl,t=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,t);const i=[-1,-1,1,-1,1,1,-1,1];e.bufferData(e.ARRAY_BUFFER,new Float32Array(i),e.STATIC_DRAW);var s=[];s=s.concat([0,1],[1,1],[1,0],[0,0]);const r=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,r),e.bufferData(e.ARRAY_BUFFER,new Float32Array(s),e.STATIC_DRAW);const a=e.createBuffer();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a);return e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,0,2,3]),e.STATIC_DRAW),{positions:i,position:t,texPosition:r,indices:a}}_createTexture(){let e=this.gl.createTexture();return this.gl.bindTexture(this.gl.TEXTURE_2D,e),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),e}_drawScene(e,t,i){this.gl.viewport(0,0,e,t),this.gl.enable(this.gl.BLEND),this.gl.blendFunc(this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this._buffers.position),this.gl.bufferData(this.gl.ARRAY_BUFFER,new Float32Array(this._buffers.positions),this.gl.STATIC_DRAW),this.gl.vertexAttribPointer(this._programInfo.attribLocations.vertexPosition,2,this.gl.FLOAT,!1,0,0),this.gl.enableVertexAttribArray(this._programInfo.attribLocations.vertexPosition),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this._buffers.texPosition),this.gl.vertexAttribPointer(this._programInfo.attribLocations.texturePosition,2,this.gl.FLOAT,!1,0,0),this.gl.enableVertexAttribArray(this._programInfo.attribLocations.texturePosition),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this._buffers.indices);i?(this.gl.activeTexture(this.gl.TEXTURE0+3),this.gl.bindTexture(this.gl.TEXTURE_2D,this._ytexture),this.gl.activeTexture(this.gl.TEXTURE0+4),this.gl.bindTexture(this.gl.TEXTURE_2D,this._utexture),this.gl.activeTexture(this.gl.TEXTURE0+5),this.gl.bindTexture(this.gl.TEXTURE_2D,this._vtexture)):(this.gl.activeTexture(this.gl.TEXTURE0+2),this.gl.bindTexture(this.gl.TEXTURE_2D,this._rgbatexture)),this.gl.useProgram(this._programInfo.program),this.gl.uniform1i(this._programInfo.uniformLocations.rgbatexture,2),this.gl.uniform1i(this._programInfo.uniformLocations.ytexture,3),this.gl.uniform1i(this._programInfo.uniformLocations.utexture,4),this.gl.uniform1i(this._programInfo.uniformLocations.vtexture,5),this.gl.uniform1i(this._programInfo.uniformLocations.isyuv,i?1:0),this.gl.drawElements(this.gl.TRIANGLES,6,this.gl.UNSIGNED_SHORT,0)}_calRect(e,t,i,s,r,a){let o=2*e/r-1,n=2*(a-t-s)/a-1,l=2*(e+i)/r-1,d=2*(a-t)/a-1;return[o,n,l,n,l,d,o,d]}_clear(){this.gl.clearColor(0,0,0,1),this.gl.clearDepth(1),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}render(e,t,i,s,r){const a=this.gl;this._clear(),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,this._ytexture),a.texImage2D(a.TEXTURE_2D,0,a.LUMINANCE,e,t,0,a.LUMINANCE,a.UNSIGNED_BYTE,i),a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,this._utexture),a.texImage2D(a.TEXTURE_2D,0,a.LUMINANCE,e/2,t/2,0,a.LUMINANCE,a.UNSIGNED_BYTE,s),a.activeTexture(a.TEXTURE2),a.bindTexture(a.TEXTURE_2D,this._vtexture),a.texImage2D(a.TEXTURE_2D,0,a.LUMINANCE,e/2,t/2,0,a.LUMINANCE,a.UNSIGNED_BYTE,r),this._buffers.positions=[-1,-1,1,-1,1,1,-1,1],this._drawScene(e,t,!0)}renderYUV(e,t,i){let s=i.slice(0,e*t),r=i.slice(e*t,e*t*5/4),a=i.slice(e*t*5/4,e*t*3/2);const o=this.gl;this._clear(),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,this._ytexture),o.texImage2D(o.TEXTURE_2D,0,o.LUMINANCE,e,t,0,o.LUMINANCE,o.UNSIGNED_BYTE,s),o.activeTexture(o.TEXTURE1),o.bindTexture(o.TEXTURE_2D,this._utexture),o.texImage2D(o.TEXTURE_2D,0,o.LUMINANCE,e/2,t/2,0,o.LUMINANCE,o.UNSIGNED_BYTE,r),o.activeTexture(o.TEXTURE2),o.bindTexture(o.TEXTURE_2D,this._vtexture),o.texImage2D(o.TEXTURE_2D,0,o.LUMINANCE,e/2,t/2,0,o.LUMINANCE,o.UNSIGNED_BYTE,a),this._buffers.positions=[-1,-1,1,-1,1,1,-1,1],this._drawScene(e,t,!0)}drawDom(e,t,i,s,r){const a=this.gl;a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,this._rgbatexture),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,r),this._buffers.positions=this._calRect(i,s,r.width,r.height,e,t),this._drawScene(e,t,!1)}}class Lo{constructor(e){this.gpu=e,this.pipeline=null,this.matrixGroupInfo=null,this.depthTexture=null,this.textureGroupInfo=null,this.hasInited=!1,this.buffers=this._initBuffer(),this._initPipeline().then((e=>{this.pipeline=e,this.matrixGroupInfo=this._initMatrixGroupInfo(),this.hasInited=!0}))}destroy(){this.gpu&&(this.gpu.device.destroy(),this.gpu=null),this.hasInited=!1,this.pipeline=null,this.matrixGroupInfo=null,this.depthTexture=null,this.textureGroupInfo=null}_initBuffer(){const e=this.gpu.device,t=new Float32Array([-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1]),i=e.createBuffer({size:t.byteLength,usage:window.GPUBufferUsage.VERTEX|window.GPUBufferUsage.COPY_DST});e.queue.writeBuffer(i,0,t);const s=new Float32Array([0,1,1,1,1,0,0,0]),r=e.createBuffer({size:s.byteLength,usage:window.GPUBufferUsage.VERTEX|window.GPUBufferUsage.COPY_DST});e.queue.writeBuffer(r,0,s);const a=new Uint16Array([0,1,2,0,2,3]),o=e.createBuffer({size:a.byteLength,usage:window.GPUBufferUsage.INDEX|window.GPUBufferUsage.COPY_DST});return e.queue.writeBuffer(o,0,a),{positionBuffer:i,texpositionBuffer:r,indexBuffer:o}}_initPipeline(){return new Promise(((e,t)=>{const i=this.gpu.device,s=this.gpu.format,r={layout:"auto",vertex:{module:i.createShaderModule({code:"\n\n @binding(0) @group(0) var<uniform> uModelMatrix : mat4x4<f32>;\n @binding(1) @group(0) var<uniform> uViewMatrix : mat4x4<f32>;\n @binding(2) @group(0) var<uniform> uProjectionMatrix : mat4x4<f32>;\n\n struct VertexOutput {\n @builtin(position) Position : vec4<f32>,\n @location(0) vTexturePosition : vec2<f32>,\n }\n\n @vertex\n fn main(\n @location(0) aVertexPosition : vec4<f32>,\n @location(1) aTexturePosition : vec2<f32>\n ) -> VertexOutput {\n var output : VertexOutput;\n var tmppos : vec4<f32> = uProjectionMatrix * uViewMatrix * uModelMatrix * aVertexPosition;\n output.Position = vec4<f32>(tmppos.x, tmppos.y, (tmppos.z+1.)/2., tmppos.w); // webgl z [-1, 1], webgpu z [0, 1], 这里z做下调整 z-webgpu = (z-webgl+1)/2\n output.vTexturePosition = aTexturePosition;\n return output;\n }\n\n "}),entryPoint:"main",buffers:[{arrayStride:12,attributes:[{shaderLocation:0,offset:0,format:"float32x3"}]},{arrayStride:8,attributes:[{shaderLocation:1,offset:0,format:"float32x2"}]}]},primitive:{topology:"triangle-list"},fragment:{module:i.createShaderModule({code:"\n @group(1) @binding(0) var mySampler: sampler;\n @group(1) @binding(1) var yTexture: texture_2d<f32>;\n @group(1) @binding(2) var uTexture: texture_2d<f32>;\n @group(1) @binding(3) var vTexture: texture_2d<f32>;\n\n const YUV2RGB : mat4x4<f32> = mat4x4<f32>( 1.1643828125, 0, 1.59602734375, -.87078515625,\n 1.1643828125, -.39176171875, -.81296875, .52959375,\n 1.1643828125, 2.017234375, 0, -1.081390625,\n 0, 0, 0, 1);\n\n @fragment\n fn main(\n @location(0) vTexturePosition: vec2<f32>\n ) -> @location(0) vec4<f32> {\n\n var y : f32= textureSample(yTexture, mySampler, vTexturePosition).r;\n var u : f32 = textureSample(uTexture, mySampler, vTexturePosition).r;\n var v : f32 = textureSample(vTexture, mySampler, vTexturePosition).r;\n\n return vec4<f32>(y, u, v, 1.0)*YUV2RGB;\n }\n\n "}),entryPoint:"main",targets:[{format:s}]},depthStencil:{depthWriteEnabled:!0,depthCompare:"less",format:"depth24plus"}};i.createRenderPipelineAsync(r).then((t=>{e(t)})).catch((e=>{t(e)}))}))}_initMatrixGroupInfo(){const e=this.gpu.device,t=this.pipeline,i=To();xo(i,-1,1,-1,1,.1,100);const s=To();ko(s);const r=To();!function(e,t,i,s){var r,a,o,n,l,d,h,c,u,p,f=t[0],m=t[1],g=t[2],y=s[0],A=s[1],b=s[2],v=i[0],_=i[1],S=i[2];Math.abs(f-v)<wo&&Math.abs(m-_)<wo&&Math.abs(g-S)<wo?ko(e):(h=f-v,c=m-_,u=g-S,r=A*(u*=p=1/Math.hypot(h,c,u))-b*(c*=p),a=b*(h*=p)-y*u,o=y*c-A*h,(p=Math.hypot(r,a,o))?(r*=p=1/p,a*=p,o*=p):(r=0,a=0,o=0),n=c*o-u*a,l=u*r-h*o,d=h*a-c*r,(p=Math.hypot(n,l,d))?(n*=p=1/p,l*=p,d*=p):(n=0,l=0,d=0),e[0]=r,e[1]=n,e[2]=h,e[3]=0,e[4]=a,e[5]=l,e[6]=c,e[7]=0,e[8]=o,e[9]=d,e[10]=u,e[11]=0,e[12]=-(r*f+a*m+o*g),e[13]=-(n*f+l*m+d*g),e[14]=-(h*f+c*m+u*g),e[15]=1)}(r,Ro(0,0,0),Ro(0,0,-1),Ro(0,1,0));const a=e.createBuffer({size:64,usage:window.GPUBufferUsage.UNIFORM|window.GPUBufferUsage.COPY_DST});e.queue.writeBuffer(a,0,s);const o=e.createBuffer({size:64,usage:window.GPUBufferUsage.UNIFORM|window.GPUBufferUsage.COPY_DST});e.queue.writeBuffer(o,0,r);const n=e.createBuffer({size:64,usage:window.GPUBufferUsage.UNIFORM|window.GPUBufferUsage.COPY_DST});e.queue.writeBuffer(n,0,i);return{modelMatrixBuffer:a,viewMatrixBuffer:o,projectMatrixBuffer:n,group:e.createBindGroup({label:"group0",layout:t.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:a}},{binding:1,resource:{buffer:o}},{binding:2,resource:{buffer:n}}]})}}_initTextureGroupInfo(e,t){const i=this.gpu.device,s=this.pipeline,r=i.createTexture({size:[e,t],format:"r8unorm",usage:window.GPUTextureUsage.TEXTURE_BINDING|window.GPUTextureUsage.COPY_DST|window.GPUTextureUsage.RENDER_ATTACHMENT}),a=i.createTexture({size:[e/2,t/2],format:"r8unorm",usage:window.GPUTextureUsage.TEXTURE_BINDING|window.GPUTextureUsage.COPY_DST|window.GPUTextureUsage.RENDER_ATTACHMENT}),o=i.createTexture({size:[e/2,t/2],format:"r8unorm",usage:window.GPUTextureUsage.TEXTURE_BINDING|window.GPUTextureUsage.COPY_DST|window.GPUTextureUsage.RENDER_ATTACHMENT}),n=i.createSampler({magFilter:"linear",minFilter:"linear"}),l=i.createBindGroup({label:"group1",layout:s.getBindGroupLayout(1),entries:[{binding:0,resource:n},{binding:1,resource:r.createView()},{binding:2,resource:a.createView()},{binding:3,resource:o.createView()}]});return{yTexture:r,uTexture:a,vTexture:o,group:l}}_drawScene(){const e=this.gpu.device,t=this.gpu.context,i=e.createCommandEncoder(),s={colorAttachments:[{view:t.getCurrentTexture().createView(),clearValue:{r:0,g:0,b:0,a:0},loadOp:"clear",storeOp:"store"}],depthStencilAttachment:{view:this.depthTexture.createView(),depthClearValue:1,depthLoadOp:"clear",depthStoreOp:"store"}},r=i.beginRenderPass(s);r.setPipeline(this.pipeline),r.setBindGroup(0,this.matrixGroupInfo.group),r.setBindGroup(1,this.textureGroupInfo.group),r.setVertexBuffer(0,this.buffers.positionBuffer),r.setVertexBuffer(1,this.buffers.texpositionBuffer),r.setIndexBuffer(this.buffers.indexBuffer,"uint16"),r.drawIndexed(6),r.end(),e.queue.submit([i.finish()])}renderYUV(e,t,i){if(!this.hasInited)return;let s=i.slice(0,e*t),r=i.slice(e*t,e*t*5/4),a=i.slice(e*t*5/4,e*t*3/2);const o=this.gpu.device;this.depthTexture||(this.depthTexture=this.gpu.device.createTexture({size:[e,t],format:"depth24plus",usage:window.GPUTextureUsage.RENDER_ATTACHMENT})),this.textureGroupInfo||(this.textureGroupInfo=this._initTextureGroupInfo(e,t)),o.queue.writeTexture({texture:this.textureGroupInfo.yTexture},s,{bytesPerRow:e,rowsPerImage:t},[e,t]),o.queue.writeTexture({texture:this.textureGroupInfo.uTexture},r,{bytesPerRow:e/2,rowsPerImage:t/2},[e/2,t/2]),o.queue.writeTexture({texture:this.textureGroupInfo.vTexture},a,{bytesPerRow:e/2,rowsPerImage:t/2},[e/2,t/2]),this._drawScene()}clear(){}}class Po{constructor(e){this.player=e,this.TAG_NAME="SingleWatermark",this.configList=[],this.shadowRoot=null,this.shadowRootRealDom=null,this.shadowRootInnerDom=null,this.scale=1,this.isDynamic=!1,this._initDom(),this.player.debug.log(this.TAG_NAME,"int")}destroy(){this.configList=[],this.shadowRootInnerDom=null,this.isDynamic=!1,this.scale=1,this.shadowRoot&&(this.player.$container.removeChild(this.shadowRootRealDom),this.shadowRoot=null,this.shadowRootRealDom=null),this.player.debug.log(this.TAG_NAME,"destroy")}resize(){this.player.debug.log(this.TAG_NAME,"resize()"),"default"===this.player._opt.aspectRatio||ua()?this.player.getRenderType()===$?this._resizeDomForCanvas():this.player.getRenderType()===W&&this._resizeDomForVideo():this._resizeDomRatio()}_initDom(){const e=this.player.$container;let t=null;const i=document.createElement("div");i.setAttribute("style","pointer-events: none !important;display: block !important;"),t="function"==typeof i.attachShadow?i.attachShadow({mode:"open"}):i.shadowRoot?i.shadowRoot:i;const s=document.createElement("div");s.setAttribute("style","position: absolute; top: 0; left: 0; width: 0; height: 0;display: none;"),t.appendChild(s);const r=e.children,a=Math.floor(Math.random()*(r.length-1))+1;r[a]?e.insertBefore(i,r[a]):e.appendChild(i),this.shadowRootInnerDom=s,this.shadowRootRealDom=i,this.shadowRoot=t}update(e){this._removeDom();let t=[];Array.isArray(e)?t=e:Va(e)&&t.push(e);let i=t.map((e=>Ia(e)));this.configList=i,this._updateDom()}_resizeDomForVideo(){const e=this.player.width,t=this.player.height,i=this.player.getVideoInfo();if(!(i&&i.height>0&&i.width>0))return;let s=i.width,r=i.height;const a=this.player._opt;let o=t,n=e;if(a.hasControl&&!a.controlAutoHide){const e=a.playType===_?Yt:Kt;ua()&&this.player.fullscreen&&a.useWebFullScreen?n-=e:o-=e}const l=a.rotate;let d=(n-s)/2,h=(o-r)/2;270!==l&&90!==l||(s=i.height,r=i.width);const c=n/s,u=o/r;let p=c>u?u:c;a.isResize||c!==u&&(p=c+","+u),a.isFullResize&&(p=c>u?c:u);let f="scale("+p+")";"none"===a.mirrorRotate&&l&&(f+=" rotate("+l+"deg)"),"level"===a.mirrorRotate?f+=" rotateY(180deg)":"vertical"===a.mirrorRotate&&(f+=" rotateX(180deg)"),this.scale=-1!==(""+p).indexOf(",")?c:p,this.shadowRootInnerDom.style.transform=f,this.shadowRootInnerDom.style.left=d+"px",this.shadowRootInnerDom.style.top=h+"px",this.shadowRootInnerDom.style.width=i.width+"px",this.shadowRootInnerDom.style.height=i.height+"px",this.shadowRootInnerDom.style.display="block"}_resizeDomForCanvas(){const e=this.player.getVideoInfo();if(!(e&&e.height>0&&e.width>0))return;const t=this.player._opt;let i=this.player.width,s=this.player.height;if(t.hasControl&&!t.controlAutoHide){const e=t.playType===_?Yt:Kt;ua()&&this.player.fullscreen&&t.useWebFullScreen?i-=e:s-=e}let r=e.width,a=e.height;const o=t.rotate;let n=(i-r)/2,l=(s-a)/2;270!==o&&90!==o||(r=e.height,a=e.width);const d=i/r,h=s/a;let c=d>h?h:d;t.isResize||d!==h&&(c=d+","+h),t.isFullResize&&(c=d>h?d:h);let u="scale("+c+")";"none"===t.mirrorRotate&&o&&(u+=" rotate("+o+"deg)"),"level"===t.mirrorRotate?u+=" rotateY(180deg)":"vertical"===t.mirrorRotate&&(u+=" rotateX(180deg)"),this.shadowRootInnerDom.style.height=e.height+"px",this.shadowRootInnerDom.style.width=e.width+"px",this.shadowRootInnerDom.style.padding="0",this.shadowRootInnerDom.style.transform=u,this.shadowRootInnerDom.style.left=n+"px",this.shadowRootInnerDom.style.top=l+"px",this.shadowRootInnerDom.style.display="block"}_resizeDomRatio(){const e=this.player.getVideoInfo();if(!(e&&e.height>0&&e.width>0))return;const t=this.player._opt.aspectRatio.split(":").map(Number);let i=this.player.width,s=this.player.height;const r=this.player._opt;let a=0;r.hasControl&&!r.controlAutoHide&&(a=r.playType===_?Yt:Kt,s-=a);const o=e.width/e.height,n=t[0]/t[1];if(o>n){const t=n*e.height/e.width;this.shadowRootInnerDom.style.width=100*t+"%",this.shadowRootInnerDom.style.height=`calc(100% - ${a}px)`,this.shadowRootInnerDom.style.padding=`0 ${(i-i*t)/2}px`}else{const t=e.width/n/e.height;this.shadowRootInnerDom.style.width="100%",this.shadowRootInnerDom.style.height=`calc(${100*t}% - ${a}px)`,this.shadowRootInnerDom.style.padding=(s-s*t)/2+"px 0"}this.shadowRootInnerDom.style.display="block"}_updateDom(){this.shadowRoot&&this.configList.forEach((e=>{const t=document.createElement("div");let i=null;if(e.image&&e.image.src?(i=document.createElement("img"),i.style.height="100%",i.style.width="100%",i.style.objectFit="contain",i.src=e.image.src):e.text&&e.text.content?i=document.createTextNode(e.text.content):(e.rect&&e.rect.color&&e.rect.width||e.html||e.line&&e.line.x1&&e.line.y1&&e.line.x2&&e.line.y2||e.polygon&&e.polygon.list&&e.polygon.list.length>=3)&&(i=document.createElement("div")),i){if(t.appendChild(i),t.style.visibility="",t.style.position="absolute",t.style.display="block",t.style["-ms-user-select"]="none",t.style["-moz-user-select"]="none",t.style["-webkit-user-select"]="none",t.style["-o-user-select"]="none",t.style["user-select"]="none",t.style["-webkit-touch-callout"]="none",t.style["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",t.style["-webkit-text-size-adjust"]="none",t.style["-webkit-touch-callout"]="none",t.style.opacity=e.opacity,Ba(e.left)&&(Ta(e.left)?t.style.left=e.left+"px":t.style.left=e.left),Ba(e.right)&&(Ta(e.right)?t.style.right=e.right+"px":t.style.right=e.right),Ba(e.top)&&(Ta(e.top)?t.style.top=e.top+"px":t.style.top=e.top),Ba(e.bottom)&&(Ta(e.bottom)?t.style.bottom=e.bottom+"px":t.style.bottom=e.bottom),e.backgroundColor&&(t.style.backgroundColor=e.backgroundColor),t.style.overflow="hidden",t.style.zIndex="9999999",e.image&&e.image.src)t.style.width=e.image.width+"px",t.style.height=e.image.height+"px";else if(e.text&&e.text.content)t.style.fontSize=e.text.fontSize+"px",t.style.color=e.text.color,e.text.width&&(t.style.width=e.text.width+"px"),e.text.height&&(t.style.height=e.text.height+"px");else if(e.rect&&e.rect.color&&e.rect.width){if(t.style.width=e.rect.width+"px",t.style.height=e.rect.height+"px",t.style.borderWidth=e.rect.lineWidth+"px",t.style.borderStyle="solid",t.style.borderColor=e.rect.color,e.rect.fill){const i=document.createElement("div");i.style.position="absolute",i.style.width="100%",i.style.height="100%",i.style.backgroundColor=e.rect.fill,e.rect.fillOpacity&&(i.style.opacity=e.rect.fillOpacity),t.appendChild(i)}}else if(e.html)t.style.width="100%",t.style.height="100%",t.innerHTML=e.html;else if(e.line&&e.line.x1&&e.line.y1&&e.line.x2&&e.line.y2)this.settingLine(t,e.line);else if(e.polygon&&e.polygon.list&&e.polygon.list.length>=3){t.style.width="100%",t.style.height="100%";let i=e.polygon.list;const s=e.polygon.color,r=e.polygon.lineWidth;if(i=i.sort(((e,t)=>(e.index||0)-(t.index||0))),e.polygon.fill){const s=document.createElement("div");s.style.position="absolute",s.style.width="100%",s.style.height="100%";const r="polygon("+i.map((e=>`${e.x}px ${e.y}px`)).join(", ")+")";s.style.clipPath=r,s.style.backgroundColor=e.polygon.fill,e.polygon.fillOpacity&&(s.style.opacity=e.polygon.fillOpacity),t.appendChild(s)}i.forEach(((e,a)=>{const o=document.createElement("div");if(a===i.length-1){const a=i[0],n={x1:e.x,y1:e.y,x2:a.x,y2:a.y,color:s,lineWidth:r};return this.settingLine(o,n),void t.appendChild(o)}const n=i[a+1],l={x1:e.x,y1:e.y,x2:n.x,y2:n.y,color:s,lineWidth:r};this.settingLine(o,l),t.appendChild(o)}))}this.isDynamic&&(this.shadowRootDynamicDom=t),this.shadowRootInnerDom.appendChild(t)}}))}settingLine(e,t){const i=t.x1,s=t.y1,r=t.x2,a=t.y2;var o=Math.sqrt((i-r)**2+(s-a)**2),n=180*Math.atan2(a-s,r-i)/Math.PI;e.style.backgroundColor=t.color,e.style.width=o+"px",e.style.height=t.lineWidth+"px",e.style.position="absolute",e.style.top=s+"px",e.style.left=i+"px",e.style.transform="rotate("+n+"deg)",e.style.transformOrigin="0 0"}remove(){this._removeDom()}_removeDom(){this.shadowRootInnerDom&&(this.shadowRootInnerDom.innerHTML="")}}class Bo extends So{constructor(){super(),this.videoInfo={width:null,height:null,encType:null,encTypeCode:null},this.init=!1,this.prevAiFaceDetectTime=null,this.prevAiObjectDetectTime=null,this.prevOcclusionDetectTime=null,this.contentWatermark=null,this.aiContentWatermark=null,this.tempContentList=[],this.tempAiContentList=[],this.streamFps=0}destroy(){this.resetInit(),this.contentWatermark&&(this.contentWatermark.destroy(),this.contentWatermark=null),this.tempContentList=[],this.aiContentWatermark&&(this.aiContentWatermark.destroy(),this.aiContentWatermark=null),this.tempAiContentList=[],this.prevAiFaceDetectTime=null,this.prevAiObjectDetectTime=null,this.streamFps=0,this.off()}resetInit(){this.videoInfo={width:null,height:null,encType:null,encTypeCode:null},this.init=!1}getHasInit(){return this.init}updateVideoInfo(e){Ba(e.encTypeCode)&&(this.videoInfo.encType=bt[e.encTypeCode],this.videoInfo.encTypeCode=e.encTypeCode),Ba(e.encType)&&(this.videoInfo.encType=e.encType),Ba(e.width)&&(this.videoInfo.width=e.width),Ba(e.height)&&(this.videoInfo.height=e.height),Ba(this.videoInfo.encType)&&Ba(this.videoInfo.height)&&Ba(this.videoInfo.width)&&!this.init&&(this.player.emit(nt.videoInfo,this.videoInfo),this.init=!0)}getVideoInfo(){return this.videoInfo}clearView(){this.tempContentList=[],this.tempAiContentList=[]}resize(){if(this.player.debug.log("CommonVideo","resize()"),"default"===this.player._opt.aspectRatio||ua()?this._resize():this._resizeRatio(),this.contentWatermark&&this.contentWatermark.resize(),this.aiContentWatermark&&this.aiContentWatermark.resize(),this.player.singleWatermark&&this.player.singleWatermark.resize(),this.player.ghostWatermark&&this.player.ghostWatermark.resize(),this.player.dynamicWatermark&&this.player.dynamicWatermark.resize(),this.player.zoom&&this.player.zooming){const e=this._getStyleScale();this.player.zoom.updatePrevVideoElementStyleScale(e),this.player.zoom.updateVideoElementScale()}}_resizeRatio(){this.player.debug.log("CommonVideo","_resizeRatio()");const e=this.player._opt.aspectRatio.split(":").map(Number);let t=this.player.width,i=this.player.height;const s=this.player._opt;let r=0;s.hasControl&&!s.controlAutoHide&&(r=s.playType===_?Yt:Kt,i-=r);const a=this.videoInfo,o=a.width/a.height,n=e[0]/e[1];if(this.getType()===$&&(this.$videoElement.style.left="0",this.$videoElement.style.top="0",this.$videoElement.style.transform="none"),this.getType()===W&&this.player._opt.videoRenderSupportScale&&(this.$videoElement.style.objectFit="fill"),o>n){const e=n*a.height/a.width;this.$videoElement.style.width=100*e+"%",this.$videoElement.style.height=`calc(100% - ${r}px)`,this.$videoElement.style.padding=`0 ${(t-t*e)/2}px`}else{const e=a.width/n/a.height;this.$videoElement.style.width="100%",this.$videoElement.style.height=`calc(${100*e}% - ${r}px)`,this.$videoElement.style.padding=(i-i*e)/2+"px 0"}}play(){}pause(){}setRate(e){}getType(){return""}getCanvasType(){return""}getCurrentTime(){return 0}getStreamFps(){return this.streamFps}isPlaying(){return!0}getPlaybackQuality(){return null}setStreamFps(e){this.player.debug.log("CommonVideo","setStreamFps",e),this.streamFps=e}addContentToCanvas(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.tempContentList=e}addAiContentToCanvas(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.tempAiContentList=e}doAddContentToWatermark(){if(this.tempContentList.length>0){this.contentWatermark||(this.contentWatermark=new Po(this.player),this.contentWatermark.resize());const e=[];this.tempContentList.forEach((t=>{let i={left:t.x||0,top:t.y||0};"text"===t.type?i.text={content:t.text,fontSize:t.fontSize||"14",color:t.color||"#000"}:"rect"===t.type?i.rect={width:t.width,height:t.height,color:t.color||"green",lineWidth:t.lineWidth||2,fill:t.fill||"",fillOpacity:t.fillOpacity||.2}:"polygon"===t.type?i.polygon={list:t.list,color:t.color||"green",lineWidth:t.lineWidth||2,fill:t.fill,fillOpacity:t.fillOpacity||.2}:"line"===t.type&&(i.line={color:t.color||"green",lineWidth:t.lineWidth||2,x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}),e.push(i)})),this.contentWatermark.update(e)}else this.contentWatermark&&this.contentWatermark.remove()}doAddAiContentToWatermark(){if(this.tempAiContentList.length>0){this.aiContentWatermark||(this.aiContentWatermark=new Po(this.player),this.aiContentWatermark.resize());const e=this.tempAiContentList.map((e=>{let t={left:e.x,top:e.y};return"text"===e.type?t.text={content:e.text,fontSize:e.fontSize,color:e.color}:"rect"===e.type&&(t.rect={width:e.width,height:e.height,color:e.color,lineWidth:e.lineWidth}),t}));this.aiContentWatermark.update(e)}else this.aiContentWatermark&&this.aiContentWatermark.remove()}_getStyleScale(){let e=this.$videoElement.style.transform.match(/scale\([0-9., ]*\)/g),t="";if(e&&e[0]){t=e[0].replace("scale(","").replace(")","").split(",")}return t}getReadyStateInited(){return!0}}var Io="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0;function Mo(e,t,i){var s=new XMLHttpRequest;s.open("GET",e),s.responseType="blob",s.onload=function(){No(s.response,t,i)},s.onerror=function(){console.error("could not download file")},s.send()}function Uo(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return t.status>=200&&t.status<=299}function Fo(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(i){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var Oo=Io.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),No="object"!=typeof window||window!==Io?function(){}:"download"in HTMLAnchorElement.prototype&&!Oo?function(e,t,i){var s=Io.URL||Io.webkitURL,r=document.createElementNS("http://www.w3.org/1999/xhtml","a");t=t||e.name||"download",r.download=t,r.rel="noopener","string"==typeof e?(r.href=e,r.origin!==location.origin?Uo(r.href)?Mo(e,t,i):Fo(r,r.target="_blank"):Fo(r)):(r.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(r.href)}),4e4),setTimeout((function(){Fo(r)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,t,i){if(t=t||e.name||"download","string"==typeof e)if(Uo(e))Mo(e,t,i);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){Fo(s)}))}else navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}(e,i),t)}:function(e,t,i,s){if((s=s||open("","_blank"))&&(s.document.title=s.document.body.innerText="downloading..."),"string"==typeof e)return Mo(e,t,i);var r="application/octet-stream"===e.type,a=/constructor/i.test(Io.HTMLElement)||Io.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||r&&a||Oo)&&"undefined"!=typeof FileReader){var n=new FileReader;n.onloadend=function(){var e=n.result;e=o?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),s?s.location.href=e:location=e,s=null},n.readAsDataURL(e)}else{var l=Io.URL||Io.webkitURL,d=l.createObjectURL(e);s?s.location=d:location.href=d,s=null,setTimeout((function(){l.revokeObjectURL(d)}),4e4)}};class jo{constructor(e,t){this.canvas=e,this.gl=t;const i=t.createShader(t.VERTEX_SHADER);if(t.shaderSource(i,"\n attribute vec2 xy;\n varying highp vec2 uv;\n void main(void) {\n gl_Position = vec4(xy, 0.0, 1.0);\n // Map vertex coordinates (-1 to +1) to UV coordinates (0 to 1).\n // UV coordinates are Y-flipped relative to vertex coordinates.\n uv = vec2((1.0 + xy.x) / 2.0, (1.0 - xy.y) / 2.0);\n }\n "),t.compileShader(i),!t.getShaderParameter(i,t.COMPILE_STATUS))throw t.getShaderInfoLog(i);const s=t.createShader(t.FRAGMENT_SHADER);if(t.shaderSource(s,"\n varying highp vec2 uv;\n uniform sampler2D texture;\n void main(void) {\n gl_FragColor = texture2D(texture, uv);\n }\n "),t.compileShader(s),!t.getShaderParameter(s,t.COMPILE_STATUS))throw t.getShaderInfoLog(s);const r=t.createProgram();if(t.attachShader(r,i),t.attachShader(r,s),t.linkProgram(r),!t.getProgramParameter(r,t.LINK_STATUS))throw t.getProgramInfoLog(r);t.useProgram(r);const a=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,a),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),t.STATIC_DRAW);const o=t.getAttribLocation(r,"xy");t.vertexAttribPointer(o,2,t.FLOAT,!1,0,0),t.enableVertexAttribArray(o);const n=t.createTexture();t.bindTexture(t.TEXTURE_2D,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),this.program=r,this.buffer=a,this.vertexShader=i,this.fragmentShader=s,this.texture=n}destroy(){this.gl.deleteProgram(this.program),this.gl.deleteBuffer(this.buffer),this.gl.deleteTexture(this.texture),this.gl.deleteShader(this.vertexShader),this.gl.deleteShader(this.fragmentShader),this.program=null,this.buffer=null,this.vertexShader=null,this.fragmentShader=null,this.texture=null}render(e){this.canvas.width=e.displayWidth,this.canvas.height=e.displayHeight;const t=this.gl;t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e),t.viewport(0,0,t.drawingBufferWidth,t.drawingBufferHeight),t.clearColor(1,0,0,1),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4)}}class zo extends Bo{constructor(e){super(),this.player=e;const t=document.createElement("canvas");t.style.position="absolute",t.style.top=0,t.style.left=0,this.$videoElement=t,e.$container.appendChild(this.$videoElement),this.context2D=null,this.contextGl=null,this.webglRender=null,this.webglRectRender=null,this.webGPURender=null,this.isWebglContextLost=!1,this.isWcsWebgl2=!1,this.bitmaprenderer=null,this.renderType=null,this.controlHeight=0,this.proxyDestroyList=[],this._initCanvasRender()}destroy(){super.destroy(),this.proxyDestroyList.length>0&&(this.proxyDestroyList.forEach((e=>{e&&e()})),this.proxyDestroyList=[]),this.contextGl&&(this.contextGl=null),this.context2D&&(this.context2D=null),this.webglRender&&(this.webglRender.destroy(),this.webglRender=null),this.webglRectRender&&(this.webglRectRender.destroy(),this.webglRectRender=null),this.webGPURender&&(this.webGPURender.destroy(),this.webGPURender=null),this.bitmaprenderer&&(this.bitmaprenderer=null),this.renderType=null,this.isWebglContextLost=!1,this.videoInfo={width:"",height:"",encType:""},this.player.$container.removeChild(this.$videoElement),this.init=!1,this.off()}_initContext2D(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.context2D=this.$videoElement.getContext("2d",e)}_initContextGl(){if(this.player.events,this.contextGl=ia(this.$videoElement),!this.contextGl)throw this.player.debug.error("CommonCanvasLoader","_initContextGl() createContextGL error"),new Error("CommonCanvasLoader and _initContextGl createContextGL error");this._bindContextGlEvents(),this.webglRender=new Do(this.contextGl,this.player._opt.openWebglAlignment)}_initContextGl2(){if(this.contextGl=sa(this.$videoElement),this.contextGl){this._bindContextGlEvents(2);try{this.webglRender=new jo(this.$videoElement,this.contextGl)}catch(e){this.player.debug.error("CommonCanvasLoader",`create webgl2Render error is ${e} and next use context2d.draw render`),this.contextGl=null,this.webglRender=null,this._initContext2D()}}else this.player.debug.error("CommonCanvasLoader","_initContextGl2() createContextGL2 error")}_bindContextGlEvents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;const{proxy:t}=this.player.events,i=t(this.$videoElement,"webglcontextlost",(t=>{t.preventDefault(),this.player.debug.error("canvasVideo","webglcontextlost error",t),this.isWebglContextLost=!0,this.webglRender&&(this.player.debug.log("CommonCanvasLoader","webglcontextlost error and destroy webglRender"),this.webglRender.destroy(),this.webglRender=null),this.webglRectRender&&(this.player.debug.log("CommonCanvasLoader","webglcontextlost error and destroy webglRectRender"),this.webglRectRender.destroy(),this.webglRectRender=null),this.contextGl=null,setTimeout((()=>{if(this.player.debug.log("CommonCanvasLoader",`createContextGL() version ${e}`),1===e?this.contextGl=ia(this.$videoElement):2===e&&(this.contextGl=sa(this.$videoElement)),this.player.debug.log("CommonCanvasLoader","createContextGL success"),this.contextGl&&this.contextGl.getContextAttributes){const t=this.contextGl.getContextAttributes();t&&t.stencil?(1===e?this.webglRender=new Do(this.contextGl,this.player._opt.openWebglAlignment):2===e&&(this.webglRender=new jo(this.$videoElement,this.contextGl)),this.isWebglContextLost=!1,this.player.debug.log("CommonCanvasLoader","webglcontextlost error reset and getContextAttributes().stencil is true")):(this.player.debug.error("CommonCanvasLoader","webglcontextlost error, getContextAttributes().stencil is false"),this.player.emitError(ct.webglContextLostError))}else this.player.debug.error("CommonCanvasLoader","webglcontextlost error, getContextAttributes().stencil is false"),this.player.emitError(ct.webglContextLostError)}),500)})),s=t(this.$videoElement,"webglcontextrestored",(e=>{e.preventDefault(),this.player.debug.log("CommonCanvasLoader","webglcontextrestored ",e)}));this.proxyDestroyList.push(i,s)}_initContextGPU(){var t;(t=this.$videoElement,new Promise(((e,i)=>{navigator.gpu?navigator.gpu.requestAdapter().then((s=>{s?s.requestDevice().then((r=>{if(r){const a=t.getContext("webgpu");if(a){const t=navigator.gpu.getPreferredCanvasFormat();a.configure({device:r,format:t,alphaMode:"opaque"}),e({adapter:s,device:r,context:a,format:t})}else i('WebGPU "context" create fail')}else i('WebGPU "device" request fail')})).catch((e=>{i('WebGPU "adapter.requestDevice()" fail')})):i('WebGPU "adapter" request fail is empty')})).catch((e=>{i('WebGPU "navigator.gpu.requestAdapter()" fail')})):i("WebGPU not support!!")}))).then((t=>{t?(this.webGPURender=new Lo(t),this.player.debug.log("CommonCanvasLoader","webGPURender init success")):(this.player.debug.warn("CommonCanvasLoader",`createWebGPUContext error is ${e} and next use webgl render`),this.renderType=ti,this._initContextGl())})).catch((e=>{this.player.debug.warn("CommonCanvasLoader",`createWebGPUContext error is ${e} and next use webgl render`),this.renderType=ti,this._initContextGl()}))}initCanvasViewSize(){this.$videoElement.width=this.videoInfo.width,this.$videoElement.height=this.videoInfo.height,this.resize()}screenshot(e,t,i,s){e=e||aa(),s=s||gt.download;let r=.92;!Ji[t]&>[t]&&(s=t,t="png",i=void 0),"string"==typeof i&&(s=i,i=void 0),void 0!==i&&(r=Number(i));const a=Ji[t]||Ji.png,o=this.$videoElement.toDataURL(a,r);if(s===gt.base64)return o;{const t=ra(o);if(s===gt.blob)return t;if(s===gt.download){const i=a.split("/")[1];No(t,e+"."+i)}}}screenshotWatermark(e){return new Promise(((t,i)=>{$a(e)&&(e={filename:e}),(e=e||{}).width=this.videoInfo.width,e.height=this.videoInfo.height,e.filename=e.filename||aa(),e.format=e.format?Ji[e.format]:Ji.png,e.quality=Number(e.quality)||.92,e.type=e.type||gt.download;const s=this.$videoElement.toDataURL(e.format,e.quality);Ua(s,e).then((i=>{if(e.type===gt.base64)t(s);else{const s=ra(i);if(e.type===gt.blob)t(s);else if(e.type===gt.download){t();const i=e.format.split("/")[1];No(s,e.filename+"."+i)}}})).catch((e=>{i(e)}))}))}render(){}clearView(){super.clearView()}play(){}pause(){}_resize(){this.player.debug.log("canvasVideo","_resize()");const e=this.player._opt;let t=this.player.width,i=this.player.height;if(e.hasControl&&!e.controlAutoHide){const s=this.controlHeight;ua()&&this.player.fullscreen&&e.useWebFullScreen?t-=s:i-=s}let s=this.$videoElement.width,r=this.$videoElement.height;const a=e.rotate;let o=(t-s)/2,n=(i-r)/2;270!==a&&90!==a||(s=this.$videoElement.height,r=this.$videoElement.width);const l=t/s,d=i/r;let h=l>d?d:l;po(e.isResize)&&l!==d&&(h=l+","+d),e.isFullResize&&(h=l>d?l:d);let c="scale("+h+")";"none"===e.mirrorRotate&&a&&(c+=" rotate("+a+"deg)"),"level"===e.mirrorRotate?c+=" rotateY(180deg)":"vertical"===e.mirrorRotate&&(c+=" rotateX(180deg)"),this.$videoElement.style.height=this.videoInfo.height+"px",this.$videoElement.style.width=this.videoInfo.width+"px",this.$videoElement.style.padding="0",this.$videoElement.style.transform=c,this.$videoElement.style.left=o+"px",this.$videoElement.style.top=n+"px"}initFps(){}setStreamFps(e){}getStreamFps(){return 25}getType(){return $}getCanvasType(){let e=this.renderType===si?si:ti;return this.isWcsWebgl2&&(e=ii),e}}class Go extends zo{constructor(e){super(e),this.yuvList=[],this.controlHeight=Kt,this.tempTextCanvas=null,this.tempTextCanvasCtx=null,this.player.debug.log("CanvasVideo","init")}async destroy(){super.destroy(),this.yuvList=[],this.tempTextCanvas&&(this.tempTextCanvasCtx.clearRect(0,0,this.tempTextCanvas.width,this.tempTextCanvas.height),this.tempTextCanvas.width=0,this.tempTextCanvas.height=0,this.tempTextCanvas=null),this.player.debug.log("CanvasVideoLoader","destroy")}_initCanvasRender(){this.player._opt.useWCS&&!this._supportOffscreen()?(this.renderType=ei,yo()&&this.player._opt.wcsUseWebgl2Render?(this._initContextGl2(),this.webglRender&&(this.isWcsWebgl2=!0)):this._initContext2D()):this.player._opt.useMSE&&this.player._opt.mseUseCanvasRender?(this.renderType=ai,this._initContext2D()):this.player.isOldHls()&&this.player._opt.useCanvasRender?(this.renderType=oi,this._initContext2D()):this.player.isWebrtcH264()&&this.player._opt.webrtcUseCanvasRender?(this.renderType=ni,this._initContext2D()):this._supportOffscreen()?(this.renderType=ri,this._bindOffscreen()):this.player._opt.useWebGPU?(this.renderType=si,this._initContextGPU()):(this.renderType=ti,this._initContextGl())}_supportOffscreen(){return"function"==typeof this.$videoElement.transferControlToOffscreen&&this.player._opt.useOffscreen}_bindOffscreen(){this.bitmaprenderer=this.$videoElement.getContext("bitmaprenderer")}render(e){this.yuvList.push(e),this.startRender()}startRender(){for(;!(this.yuvList.length<=0);){const e=this.yuvList.shift();this.doRender(e)}}doRender(e){if(this.renderType!==ai){const t={ts:e.ts||0,fps:!0};this.player.updateStats(t)}switch(this.renderType){case ri:this.bitmaprenderer.transferFromImageBitmap(e.buffer);break;case ti:case si:if(this.isWebglContextLost)return void this.player.debug.warn("CanvasVideoLoader","doRender() and webgl context is lost");let t=e.output;if(this.player.faceDetectActive&&this.player.ai&&this.player.ai.faceDetector){null===this.prevAiFaceDetectTime&&(this.prevAiFaceDetectTime=aa());const i=aa();i-this.prevAiFaceDetectTime>=this.player._opt.aiFaceDetectInterval&&(t=this.player.ai.faceDetector.detect({width:this.$videoElement.width,height:this.$videoElement.height,data:e.output,ts:e.ts||0}),this.prevAiFaceDetectTime=i)}if(this.player.objectDetectActive&&this.player.ai&&this.player.ai.objectDetector){null===this.prevAiObjectDetectTime&&(this.prevAiObjectDetectTime=aa());const i=aa();i-this.prevAiObjectDetectTime>=this.player._opt.aiObjectDetectInterval&&(t=this.player.ai.objectDetector.detect({width:this.$videoElement.width,height:this.$videoElement.height,data:e.output,ts:e.ts||0}),this.prevAiObjectDetectTime=i)}if(this.player.occlusionDetectActive&&this.player.ai&&this.player.ai.occlusionDetector){null===this.prevAiOcclusionDetectTime&&(this.prevAiOcclusionDetectTime=aa());const t=aa();if(t-this.prevAiOcclusionDetectTime>=this.player._opt.aiOcclusionDetectInterval){const i=this.player.ai.occlusionDetector.check({width:this.$videoElement.width,height:this.$videoElement.height,data:e.output});this.prevAiOcclusionDetectTime=t,i&&this.player.emit(nt.aiOcclusionDetectResult,{ts:e.ts||0})}}if(this.player.imageDetectActive&&this.player.ai&&this.player.ai.imageDetector){const t=this.player.ai.imageDetector.check({width:this.$videoElement.width,height:this.$videoElement.height,data:e.output});if(t&&t.data&&(this.player.emit(nt.aiOcclusionDetectResult,{type:t.type,ts:e.ts||0}),this.player._opt.aiImageDetectDrop))return void this.player.debug.log("CanvasVideoLoader",`doRender() and ai image detect result type is ${t.type} and drop`)}if(this.renderType===si)try{if(!this.webGPURender)return void this.player.debug.warn("CanvasVideoLoader","doRender webgpu render is not init");this.webGPURender.renderYUV(this.$videoElement.width,this.$videoElement.height,t)}catch(e){this.player.debug.error("CanvasVideoLoader",`doRender webgpu render and error: ${e.toString()}`)}else if(this.renderType===ti)try{this.webglRender.renderYUV(this.$videoElement.width,this.$videoElement.height,t)}catch(e){this.player.debug.error("CanvasVideoLoader",`doRender webgl render context is lost ${this.contextGl&&this.contextGl.isContextLost()} and error: ${e.toString()}`)}break;case ei:if(this.webglRender)this.webglRender.render(e.videoFrame),to(e.videoFrame);else if(this.context2D)if(Ya(e.videoFrame.createImageBitmap))try{e.videoFrame.createImageBitmap().then((t=>{this.context2D.drawImage(t,0,0,this.$videoElement.width,this.$videoElement.height),to(e.videoFrame)}))}catch(e){}else this.context2D.drawImage(e.videoFrame,0,0,this.$videoElement.width,this.$videoElement.height),to(e.videoFrame);else this.player.debug.warn("CanvasVideoLoader","doRender() and webcodecs context is lost");break;case ai:case oi:case ni:this.context2D.drawImage(e.$video,0,0,this.$videoElement.width,this.$videoElement.height)}let t=e.ts||0;this.renderType===ai&&(t=parseInt(1e3*e.$video.currentTime,10)+(this.player.mseDecoder.firstRenderTime||0)),this.player.updateCurrentPts(t),this.doAddContentToWatermark(),this.doAddAiContentToWatermark()}clearView(){switch(super.clearView(),this.renderType){case ri:(function(e,t){const i=document.createElement("canvas");i.width=e,i.height=t;const s=window.createImageBitmap(i,0,0,e,t);return i.width=0,i.height=0,s})(this.$videoElement.width,this.$videoElement.height).then((e=>{this.bitmaprenderer.transferFromImageBitmap(e)}));break;case ti:this.contextGl.clear(this.contextGl.COLOR_BUFFER_BIT);break;case si:this.webGPURender.clear();break;case ei:this.contextGl?this.contextGl.clear(this.contextGl.COLOR_BUFFER_BIT):this.context2D&&this.context2D.clearRect(0,0,this.$videoElement.width,this.$videoElement.height);break;case ai:case oi:case ni:this.context2D.clearRect(0,0,this.$videoElement.width,this.$videoElement.height)}}_initTempTextCanvas(){this.tempTextCanvas=document.createElement("canvas"),this.tempTextCanvasCtx=this.tempTextCanvas.getContext("2d"),this.tempTextCanvas.width=600,this.tempTextCanvas.height=20}doAddContentToCanvas(){this.tempContentList.length>0&&this.context2D&&function(e){let{ctx:t,list:i}=e;t.save(),(i||[]).forEach((e=>{"text"===e.type?(t.font=`${e.fontSize||12}px Arial`,t.fillStyle=e.color||"green",t.fillText(e.text,e.x,e.y)):"rect"===e.type&&(t.strokeStyle=e.color||"green",t.lineWidth=e.lineWidth||2,t.strokeRect(e.x,e.y,e.width,e.height))})),t.restore()}({ctx:this.context2D,list:this.tempContentList})}doAddContentToWebGlCanvas(){this.tempContentList.length>0&&this.contextGl&&this.webglRectRender&&this.tempContentList.forEach((e=>{const t=e.x,i=e.y;if("rect"===e.type){const r=e.width,a=e.height,o=(s=e.color||"#008000",[parseInt(s.substring(1,3),16)/255,parseInt(s.substring(3,5),16)/255,parseInt(s.substring(5,7),16)/255,1]),n=e.lineWidth||4;if(!r||!a)return;this.webglRectRender.drawBox({x:t,y:i,width:r,height:a,lineColor:o,lineWidth:n,canvasWidth:this.$videoElement.width,canvasHeight:this.$videoElement.height})}else if("text"===e.type){const s=e.text||"";if(!s)return;const r=e.fontSize||20,a=e.color||"#008000";this.tempTextCanvas||this._initTempTextCanvas(),this.tempTextCanvasCtx.clearRect(0,0,this.tempTextCanvas.width,this.tempTextCanvas.height),this.tempTextCanvasCtx.font=`${r}px Arial`,this.tempTextCanvasCtx.fillStyle=a,this.tempTextCanvasCtx.textBaseline="top",this.tempTextCanvasCtx.fillText(s,0,0),this.webglRender.drawDom(this.$videoElement.width,this.$videoElement.height,t,i,this.tempTextCanvas)}var s}))}}class Ho extends Bo{constructor(e){super(),this.player=e,this.TAG_NAME="Video";const t=document.createElement("video"),i=document.createElement("canvas");t.muted=!0,t.style.position="absolute",t.style.top=0,t.style.left=0,this._delayPlay=!1,e.$container.appendChild(t),this.$videoElement=t,this.$canvasElement=i,this.canvasContext=i.getContext("2d"),this.mediaStream=null,this.vwriter=null,e.canVideoTrackWritter()&&xa()&&Ra()&&(this.trackGenerator=new MediaStreamTrackGenerator({kind:"video"}),this.mediaStream=new MediaStream([this.trackGenerator]),t.srcObject=this.mediaStream,this.vwriter=this.trackGenerator.writable.getWriter()),this.fixChromeVideoFlashBug(),this.fixMobileAutoFullscreen(),this.resize(),this.eventListenList=[],this.isRenderRetryPlaying=!1,this.isRenderRetryPlayingTimes=0,this.isRetryPlaying=!1,this.isRetryPlayingTimes=0,this.canplayReceived=!1,this.progressProxyDestroy=null,this.checkVideoCanplayTimeout=null;const s=bo();this.supportVideoFrameCallbackHandle=null;const{proxy:r}=this.player.events,a=r(this.$videoElement,"canplay",(()=>{this.player.debug.log("Video","canplay"),this.player.isDestroyedOrClosed()||(this.canplayReceived=!0,this._delayPlay?(this.clearCheckVideoCanplayTimeout(),this._play(),bo()?this.supportVideoFrameCallbackHandle||(this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this))):this.player.debug.warn("Video","not support requestVideoFrameCallback and use timeupdate event to update stats")):this.$videoElement.paused&&this.player.isMSEPlaybackRateChangePause&&(this.player.debug.log("Video",`canplay and video is paused and isMSEPlaybackRateChangePause is ${this.player.isMSEPlaybackRateChangePause} so next try to play`),this.player.isMSEPlaybackRateChangePause=!1,this.$videoElement.play()))})),o=r(this.$videoElement,"waiting",(()=>{this.player.debug.log("Video","waiting")})),n=r(this.$videoElement,"loadedmetadata",(()=>{this.player.debug.log("Video","loadedmetadata")})),l=r(this.$videoElement,"timeupdate",(t=>{if(!this.player.isDestroyedOrClosed()){if(po(s)){const t=parseInt(1e3*this.getCurrentTime(),10);(e.isWebrtcH264()||this.player.isOldHls()||this.player.isAliyunRtc())&&(this.player.emit(nt.timeUpdate,t),e.handleRender(),e.updateStats({fps:!0,ts:t,dts:t}))}this.player.isMseDecoderUseWorker()&&(this.player.decoderWorker.updateVideoTimestamp(this.getCurrentTime()),this._handleUpdatePlaybackRate())}})),d=r(this.$videoElement,"error",(()=>{let e={};if(this.player.isUseMSE()&&(e=this.player.getMseMineType()),this.player.debug.error("Video","Error Code "+this.$videoElement.error.code+" "+ur[this.$videoElement.error.code]+"; Details: "+this.$videoElement.error.message+"; Video Info: "+JSON.stringify(this.videoInfo)+"; Mse Mine Type: "+e.video+"; "),this.player.isUseMSE()){this.$videoElement.error.code;const e=this.$videoElement.error.message;-1!==e.indexOf(pr)&&(this.player.isMSEVideoDecoderInitializationFailedNotSupportHevc=!0),-1!==e.indexOf(fr)&&(this.player.isMSEAudioDecoderError=!0)}this.player.isHlsCanVideoPlay()})),h=r(this.$videoElement,"stalled",(()=>{this._detectAndFixStuckPlayback(!0)}));if(this.progressProxyDestroy=r(this.$videoElement,"progress",(()=>{this._detectAndFixStuckPlayback()})),this.eventListenList.push(a,o,l,d,n,h),this.player.isUseMSE()){const e=r(this.$videoElement,ss,(()=>{this.player.debug.log(this.TAG_NAME,"video playback Rate change",this.$videoElement&&this.$videoElement.playbackRate),this.$videoElement&&this.$videoElement.paused&&(this.player.debug.warn(this.TAG_NAME,"ratechange and video is paused and sent isMSEPlaybackRateChangePause true"),this.player.isMSEPlaybackRateChangePause=!0)}));this.eventListenList.push(e),this.player.on(nt.visibilityChange,(e=>{e&&setTimeout((()=>{if(this.player.isPlaying()&&this.$videoElement){const e=this.getVideoBufferLastTime();e-this.$videoElement.currentTime>this.getBufferMaxDelayTime()&&(this.player.debug.log(this.TAG_NAME,`visibilityChange is true and lastTime is ${e} and currentTime is ${this.$videoElement.currentTime} so set currentTime to lastTime`),this.$videoElement.currentTime=e)}}),300)}))}this.player.debug.log("Video","init")}async destroy(){if(super.destroy(),this.clearCheckVideoCanplayTimeout(),this._cancelVideoFrameCallback(),this._removeProgressProxyDestroy(),this.eventListenList.length&&(this.eventListenList.forEach((e=>{e()})),this.eventListenList=[]),this.isRenderRetryPlaying=!1,this.isRenderRetryPlayingTimes=0,this.isRetryPlaying=!1,this.isRetryPlayingTimes=0,this.canplayReceived=!1,this.player._opt.videoRenderSupportScale&&this._isNeedAddBackDropFilter()){const e=this.player.$container;e.style.backdropFilter="none",e.style.transform="none"}if(this.$canvasElement.height=0,this.$canvasElement.width=0,this.$canvasElement=null,this.canvasContext=null,this.$videoElement){this.$videoElement.pause(),this.$videoElement.currentTime=0,this.$videoElement.srcObject&&(this.$videoElement.srcObject=null,this.$videoElement.removeAttribute("srcObject")),this.$videoElement.src&&(this.$videoElement.src="",this.$videoElement.removeAttribute("src"));try{this.$videoElement.load()}catch(e){}this.player.$container.removeChild(this.$videoElement),this.$videoElement=null}this.trackGenerator&&(this.trackGenerator.stop(),this.trackGenerator=null),this.vwriter&&(await this.vwriter.close(),this.vwriter=null),this._delayPlay=!1,this.mediaStream&&(this.mediaStream.getTracks().forEach((e=>e.stop())),this.mediaStream=null),this.off(),this.player.debug.log("Video","destroy")}videoFrameCallback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.player.isDestroyedOrClosed())return void this.player.debug.log("Video","videoFrameCallback() and isDestroyedOrClosed and return");this.player.handleRender();const i=parseInt(1e3*Math.max(t.mediaTime,this.getCurrentTime()),10)||0;if(this.player.isUseHls265UseMse())this.player.updateStats({fps:!0,ts:i});else if(this.player.isMseDecoderUseWorker()){this.player._times.videoStart||(this.player._times.videoStart=aa(),this.player.handlePlayToRenderTimes());const e=i+(this.player._mseWorkerData.firstRenderTime||0);if(this.player.updateStats({fps:!0,dfps:!0,ts:e,mseTs:i}),this.player.emit(nt.timeUpdate,e),po(this.getHasInit())&&t.width&&t.height){const e={width:t.width,height:t.height};this.updateVideoInfo(e),this.initCanvasViewSize()}}if(this.player.isWebrtcH264()||this.player.isOldHls()||this.player.isAliyunRtc()){if(this.player.emit(nt.timeUpdate,i),po(this.getHasInit())&&t.width&&t.height){const e={width:t.width,height:t.height};this.videoInfo.encTypeCode||this.player.isOldHls()||(e.encTypeCode=vt),this.updateVideoInfo(e)}this.player.updateStats({fps:!0,ts:i,dts:i}),this.player.updateCurrentPts(i),this.doAddContentToWatermark()}else if(uo(this.player._opt.useMSE)&&po(this.player._opt.mseUseCanvasRender)){if(this.player.mseDecoder){let e=parseInt(1e3*Math.max(t.mediaTime,this.getCurrentTime()),10)+(this.player.mseDecoder.firstRenderTime||0);this.player.updateCurrentPts(e)}else if(this.player._opt.mseDecoderUseWorker){let e=parseInt(1e3*Math.max(t.mediaTime,this.getCurrentTime()),10)+(this.player._mseWorkerData.firstRenderTime||0);this.player.updateCurrentPts(e)}this.doAddContentToWatermark()}this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this))}fixChromeVideoFlashBug(){if(this.player._opt.videoRenderSupportScale&&this._isNeedAddBackDropFilter()){const e=this.player.$container;e.style.backdropFilter="blur(0px)",e.style.transform="translateZ(0)"}}fixMobileAutoFullscreen(){const e=ya(),t=fa();(e||t)&&(this.player.debug.log("Video",`fixMobileAutoFullscreen and isIOS ${e} and isAndroid ${t}`),this.$videoElement.setAttribute("webkit-playsinline","true"),this.$videoElement.setAttribute("playsinline","true"),this.$videoElement.setAttribute("x5-video-player-type","h5-page"))}_detectAndFixStuckPlayback(e){const t=this.$videoElement,i=t.buffered,s=t.readyState;this.player.debug.log(this.TAG_NAME,`_detectAndFixStuckPlayback() and isStalled is ${e} ,canplayReceived is ${this.canplayReceived} ,videoReadyState is ${s}`),e||po(this.canplayReceived)||s<2?i.length>0&&t.currentTime<i.start(0)&&(this.player.debug.warn(this.TAG_NAME,`_detectAndFixStuckPlayback() and video is stuck and currentTime is ${t.currentTime} ,seek to ${i.start(0)}`),t.currentTime=i.start(0),this._removeProgressProxyDestroy()):this._removeProgressProxyDestroy()}_removeProgressProxyDestroy(){this.progressProxyDestroy&&(this.player.debug.log(this.TAG_NAME,"_removeProgressProxyDestroy()"),this.progressProxyDestroy(),this.progressProxyDestroy=null)}_isNeedAddBackDropFilter(){const e=ga().type.toLowerCase();return"chrome"===e||"edge"===e}isPaused(){let e=!0;return this.$videoElement&&(e=this.$videoElement.paused),e}isPause(){return this.isPaused()}_getVideoReadyState(){let e=0;return this.$videoElement&&(e=this.$videoElement.readyState),e}_getVideoCurrentTime(){let e=0;return this.$videoElement&&(e=this.$videoElement.currentTime),e}play(){if(this.$videoElement){const e=this._getVideoReadyState();if(this.player.debug.log("Video",`play and readyState: ${e}`),0===e)return this.player.debug.log("Video","readyState is 0 and set _delayPlay to true and listen canplay event to play"),this._delayPlay=!0,void(null===this.checkVideoCanplayTimeout&&(this.checkVideoCanplayTimeout=setTimeout((()=>{if(this.clearCheckVideoCanplayTimeout(),!this.player.isDestroyedOrClosed()&&po(this.isPlaying())){const e=this._getBufferStore();this.player.debug.warn("Video",`checkVideoCanplayTimeout and video is not playing and buffer store is ${e} and retry play`),this.$videoElement.currentTime=e,this._replay()}}),1e3)));this._play()}}_play(){this.$videoElement&&this.$videoElement.play().then((()=>{this._delayPlay=!1,this.player.debug.log("Video","_play success"),this.isPlaying()?(this.player.emit(nt.removeLoadingBgImage),this.isRetryPlayingTimes=0,this.isRetryPlaying=!1):setTimeout((()=>{this._replay()}),100)})).catch((e=>{this.player.isDestroyedOrClosed()?this.player.debug.log("Video","_play error and player is isDestroyedOrClosed and return"):(this.player.debug.error("Video","_play error",e),this.isRetryPlaying=!1,setTimeout((()=>{this._replay()}),100))}))}_replay(){if(!this.isPlaying()&&po(this.player.isDestroyedOrClosed())&&po(this.isRetryPlaying)){if(this.isRetryPlaying=!0,this.isRetryPlayingTimes>=3)return void(this.player.isWebrtcH264()?(this.player.debug.error("Video",`_replay(webrtc H264) then but not playing and retry play times is ${this.isRetryPlayingTimes} and emit error`),this.player.emitError(ct.videoElementPlayingFailedForWebrtc)):(this.player.debug.error("Video",`_replay then but not playing and retry play times is ${this.isRetryPlayingTimes} and emit error to use canvas render`),this.player.emitError(ct.videoElementPlayingFailed)));this.player.debug.warn("Video",`_play then but not playing and retry play and isRetryPlayingTimes is ${this.isRetryPlayingTimes}`),this._play(),this.isRetryPlayingTimes++}else this.player.debug.log("Video",`_replay() and isPlaying is ${this.isPlaying()} and isRetryPlaying is ${this.isRetryPlaying} and isDestroyedOrClosed is ${this.player.isDestroyedOrClosed()} and return;`)}pause(e){this.player.debug.log(this.TAG_NAME,"pause and isNow is "+e),this.isPlaying()&&(e?(this.$videoElement&&this.$videoElement.pause(),this._cancelVideoFrameCallback()):setTimeout((()=>{this.$videoElement&&this.$videoElement.pause(),this._cancelVideoFrameCallback()}),100))}clearView(){super.clearView(),this.$videoElement&&(this.$videoElement.pause(),this.$videoElement.currentTime=0,this.$videoElement.src&&(this.$videoElement.src="",this.$videoElement.removeAttribute("src")),this.$videoElement.srcObject&&(this.$videoElement.srcObject=null,this.$videoElement.removeAttribute("srcObject")))}screenshot(e,t,i,s){if(!this._canScreenshot())return this.player.debug.warn("Video",`screenshot failed, video is not ready and stats is ${this._getVideoReadyState()}`),null;e=e||aa(),s=s||gt.download;let r=.92;!Ji[t]&>[t]&&(s=t,t="png",i=void 0),"string"==typeof i&&(s=i,i=void 0),void 0!==i&&(r=Number(i));const a=this.$videoElement;let o=this.$canvasElement;o.width=a.videoWidth,o.height=a.videoHeight,this.canvasContext.drawImage(a,0,0,o.width,o.height);const n=Ji[t]||Ji.png,l=o.toDataURL(n,r);if(this.canvasContext.clearRect(0,0,o.width,o.height),o.width=0,o.height=0,s===gt.base64)return l;{const t=ra(l);if(s===gt.blob)return t;if(s===gt.download){const i=n.split("/")[1];No(t,e+"."+i)}}}screenshotWatermark(e){return new Promise(((t,i)=>{if($a(e)&&(e={filename:e}),!this._canScreenshot())return this.player.debug.warn("Video","screenshot failed, video is not ready"),i("screenshot failed, video is not ready");const s=this.$videoElement;(e=e||{}).width=s.videoWidth,e.height=s.videoHeight,e.filename=e.filename||aa(),e.format=e.format?Ji[e.format]:Ji.png,e.quality=Number(e.quality)||.92,e.type=e.type||gt.download;let r=this.$canvasElement;r.width=s.videoWidth,r.height=s.videoHeight,this.canvasContext.drawImage(s,0,0,r.width,r.height);const a=r.toDataURL(e.format,e.quality);this.canvasContext.clearRect(0,0,r.width,r.height),r.width=0,r.height=0,Ua(a,e).then((i=>{if(e.type===gt.base64)t(a);else{const s=ra(i);if(e.type===gt.blob)t(s);else if(e.type===gt.download){t();const i=e.format.split("/")[1];No(s,e.filename+"."+i)}}})).catch((e=>{i(e)}))}))}initCanvasViewSize(){this.resize()}clear(){const e=this.$videoElement,t=e.buffered,i=t.length?t.end(t.length-1):0;e.currentTime=i}render(e){if(this.vwriter){if(this.$videoElement.srcObject||(this.$videoElement.srcObject=this.mediaStream),this.isPaused()){const e=this._getVideoReadyState();if(this.player.debug.warn("Video","render() error, video is paused and readyState is "+e),4===e&&po(this.isRenderRetryPlaying)){if(this.isRenderRetryPlaying=!0,this.isRenderRetryPlayingTimes>3)return this.player.debug.error("Video","render() error, video is paused and readyState is "+e+", retry times is "+this.isRenderRetryPlayingTimes+", emit error and use canvas render"),void this.player.emitError(ct.videoElementPlayingFailed);this.$videoElement.play().then((()=>{this.isRenderRetryPlayingTimes=0,this.isRenderRetryPlaying=!1,this.player.debug.log("Video","render() video is paused and replay success")})).catch((e=>{this.isRenderRetryPlaying=!1,this.isRenderRetryPlayingTimes++,this.player.debug.warn("Video","render() error, video is paused and replay error ",e)}))}}if(this.player.updateStats({fps:!0,ts:e.ts||0}),e.videoFrame)this.vwriter.write(e.videoFrame),to(e.videoFrame);else if(e.output){let s=e.output;if(this.player.faceDetectActive&&this.player.ai&&this.player.ai.faceDetector){null===this.prevAiFaceDetectTime&&(this.prevAiFaceDetectTime=aa());const t=aa();t-this.prevAiFaceDetectTime>this.player._opt.aiFaceDetectInterval&&(s=this.player.ai.faceDetector.detect({width:this.videoInfo.width,height:this.videoInfo.height,data:e.output,ts:e.ts||0}),this.prevAiFaceDetectTime=t)}if(this.player.objectDetectActive&&this.player.ai&&this.player.ai.objectDetector){null===this.prevAiObjectDetectTime&&(this.prevAiObjectDetectTime=aa());const t=aa();t-this.prevAiObjectDetectTime>this.player._opt.aiObjectDetectInterval&&(s=this.player.ai.objectDetector.detect({width:this.videoInfo.width,height:this.videoInfo.height,data:e.output,ts:e.ts||0}),this.prevAiObjectDetectTime=t)}if(this.player.occlusionDetectActive&&this.player.ai&&this.player.ai.occlusionDetector){null===this.prevAiOcclusionDetectTime&&(this.prevAiOcclusionDetectTime=aa());const t=aa();if(t-this.prevAiOcclusionDetectTime>=this.player._opt.aiOcclusionDetectInterval){const i=this.player.ai.occlusionDetector.check({width:this.videoInfo.width,height:this.videoInfo.height,data:e.output,ts:e.ts||0});this.prevAiOcclusionDetectTime=t,i&&(this.player.debug.log("Video","render() and ai occlusion detect result is true"),this.player.emit(nt.aiOcclusionDetectResult,{ts:e.ts||0}))}}if(this.player.imageDetectActive&&this.player.ai&&this.player.ai.imageDetector){const t=this.player.ai.imageDetector.check({width:this.videoInfo.width,height:this.videoInfo.height,data:e.output,ts:e.ts||0});if(t&&t.data&&(this.player.emit(nt.aiOcclusionDetectResult,{type:t.type,ts:e.ts||0}),this.player._opt.aiImageDetectDrop))return void this.player.debug.log("Video",`render() and ai image detect result type is ${t.type} and drop`)}try{const r=(t=s,i={format:"I420",codedWidth:this.videoInfo.width,codedHeight:this.videoInfo.height,timestamp:e.ts},new VideoFrame(t,i));this.vwriter.write(r),to(r)}catch(e){this.player.debug.error("Video","render error",e),this.player.emitError(ct.wasmUseVideoRenderError,e)}}this.player.updateCurrentPts(e.ts||0),this.doAddContentToWatermark(),this.doAddAiContentToWatermark()}else this.player.debug.warn("Video","render and this.vwriter is null");var t,i}_resize(){this.player.debug.log("Video","_resize()");let e=this.player.width,t=this.player.height;const i=this.player._opt,s=i.rotate;if(i.hasControl&&!i.controlAutoHide){const s=i.playType===_?Yt:Kt;ua()&&this.player.fullscreen&&i.useWebFullScreen?e-=s:t-=s}this.$videoElement.width=e,this.$videoElement.height=t,this.$videoElement.style.width=e+"px",this.$videoElement.style.height=t+"px",270!==s&&90!==s||(this.$videoElement.width=t,this.$videoElement.height=e,this.$videoElement.style.width=t+"px",this.$videoElement.style.height=e+"px");let r=(e-this.$videoElement.width)/2,a=(t-this.$videoElement.height)/2,o="contain";po(i.isResize)&&(o="fill"),i.isFullResize&&(o="none");let n="";"none"===i.mirrorRotate&&s&&(n+=" rotate("+s+"deg)"),"level"===i.mirrorRotate?n+=" rotateY(180deg)":"vertical"===i.mirrorRotate&&(n+=" rotateX(180deg)"),this.player._opt.videoRenderSupportScale&&(this.$videoElement.style.objectFit=o),this.$videoElement.style.transform=n,this.$videoElement.style.padding="0",this.$videoElement.style.left=r+"px",this.$videoElement.style.top=a+"px"}getType(){return W}getCurrentTime(){return this.$videoElement.currentTime}isPlaying(){return this.$videoElement&&po(this.$videoElement.paused)&&po(this.$videoElement.ended)&&0!==this.$videoElement.playbackRate&&0!==this.$videoElement.readyState}_canScreenshot(){return this.$videoElement&&this.$videoElement.readyState>=1}getPlaybackQuality(){let e=null;if(this.$videoElement){if(Ya(this.$videoElement.getVideoPlaybackQuality)){const t=this.$videoElement.getVideoPlaybackQuality();e={droppedVideoFrames:t.droppedVideoFrames||t.corruptedVideoFrames,totalVideoFrames:t.totalVideoFrames,creationTime:t.creationTime}}else e={droppedVideoFrames:this.$videoElement.webkitDroppedFrameCount,totalVideoFrames:this.$videoElement.webkitDecodedFrameCount,creationTime:aa()};e&&(e.renderedVideoFrames=e.totalVideoFrames-e.droppedVideoFrames)}return e}setRate(e){this.$videoElement&&(this.$videoElement.playbackRate=e)}get rate(){let e=1;return this.$videoElement&&(e=this.$videoElement.playbackRate),e}clearCheckVideoCanplayTimeout(){this.checkVideoCanplayTimeout&&(clearTimeout(this.checkVideoCanplayTimeout),this.checkVideoCanplayTimeout=null)}_cancelVideoFrameCallback(){this.supportVideoFrameCallbackHandle&&this.$videoElement&&(this.$videoElement.cancelVideoFrameCallback(this.supportVideoFrameCallbackHandle),this.supportVideoFrameCallbackHandle=null)}_getBufferStore(){const e=this.$videoElement;let t=0;return e.buffered.length>0&&(t=e.buffered.start(0)),t}_handleUpdatePlaybackRate(){const e=this.$videoElement,t=e.buffered;t.length&&t.start(0);const i=t.length?t.end(t.length-1):0;let s=e.currentTime;const r=i-s,a=this.getBufferMaxDelayTime();if(this.player.updateStats({mseVideoBufferDelayTime:r}),r>a)this.player.debug.log(this.TAG_NAME,`handleUpdatePlaybackRate and buffered is ${i} and current is ${s} , delay buffer is more than ${a} is ${r} and new time is ${i}`),e.currentTime=i,s=e.currentTime;else if(r<0){if(this.player.debug.warn(this.TAG_NAME,`handleUpdatePlaybackRate and delay buffer is ${i} - current is ${s} = ${r} < 0 and check video is paused : ${e.paused} `),0===i)return void this.player.emit(ct.mediaSourceBufferedIsZeroError,"video.buffered is empty");e.paused&&e.play()}const o=this._getPlaybackRate(i-s);e.playbackRate!==o&&(this.player.debug.log(this.TAG_NAME,`handleUpdatePlaybackRate and buffered is ${i} and current time is ${s} and delay is ${i-s} set playbackRate is ${o} `),e.playbackRate=o)}_getPlaybackRate(e){const t=this.$videoElement;let i=this.player._opt.videoBufferDelay+this.player._opt.videoBuffer;const s=Math.max(i,1e3),r=s/2;return e*=1e3,1===t.playbackRate?e>s?1.2:1:e<=r?1:t.playbackRate}getVideoCurrentTime(){let e=0;return this.$videoElement&&(e=this.$videoElement.currentTime),e}getVideoBufferLastTime(){const e=this.$videoElement;let t=0;if(e){const i=e.buffered;i.length&&i.start(0);t=i.length?i.end(i.length-1):0}return t}getVideoBufferDelayTime(){const e=this.$videoElement;const t=this.getVideoBufferLastTime()-e.currentTime;return t>0?t:0}checkSourceBufferDelay(){const e=this.$videoElement;let t=0,i=0;return e.buffered.length>0&&(i=e.buffered.end(e.buffered.length-1),t=i-e.currentTime),t<0&&(this.player.debug.warn(this.TAG_NAME,`checkVideoSourceBufferDelay ${t} < 0, and buffered is ${i} ,currentTime is ${e.currentTime} , try to seek ${e.currentTime} to ${i}`),e.currentTime=i,t=0),t}checkSourceBufferStore(){const e=this.$videoElement;let t=0;return e.buffered.length>0&&(t=e.currentTime-e.buffered.start(0)),t}getDecodePlaybackRate(){let e=0;const t=this.$videoElement;return t&&(e=t.playbackRate),e}getBufferMaxDelayTime(){let e=(this.player._opt.videoBuffer+this.player._opt.videoBufferDelay)/1e3;return Math.max(5,e+3)}getReadyStateInited(){return this._getVideoReadyState()>=1}}class Vo extends zo{constructor(e){super(e),this.controlHeight=Yt,this.bufferList=[],this.playing=!1,this.playInterval=null,this.fps=1,this.preFps=1,this.streamFps=0,this.playbackRate=1,this._firstTimestamp=null,this._renderFps=0,this._startfpsTime=null,this._startFpsTimestamp=null,this._hasCalcFps=!1,this.player.on(nt.playbackPause,(e=>{e?(this.pause(),this.player.playback.isPlaybackPauseClearCache&&this.clear()):this.resume()})),this.player.debug.log("CanvasPlaybackLoader","init")}async destroy(){this._stopSync(),this._firstTimestamp=null,this.playing=!1,this.playbackRate=1,this.fps=1,this.preFps=1,this.bufferList=[],this._renderFps=0,this._startfpsTime=null,this._startFpsTimestamp=null,this._hasCalcFps=!1,super.destroy(),this.player.debug.log("CanvasPlaybackLoader","destroy")}_initCanvasRender(){this.player._opt.useWCS?(this.renderType=ei,yo()&&this.player._opt.wcsUseWebgl2Render?(this._initContextGl2(),this.webglRender&&(this.isWcsWebgl2=!0)):this._initContext2D()):this.player._opt.useWebGPU?(this.renderType=si,this._initContextGPU()):(this.renderType=ti,this._initContextGl())}_sync(){this._stopSync(),this._doPlay(),this.playInterval=setInterval((()=>{this._doPlay()}),this.fragDuration)}_doPlay(){if(this.bufferList.length>0&&!this.player.seeking){const e=this.bufferList.shift();e&&e.buffer&&(this._doRender(e.buffer),this.player.handleRender(),this.player.playback.updateStats({ts:e.ts,tfTs:e.tfTs}))}}_stopSync(){this.playInterval&&(clearInterval(this.playInterval),this.playInterval=null)}_doRender(e){if(this.player._opt.useWCS)if(this.webglRender)this.webglRender.render(e),to(e);else if(Ya(e.createImageBitmap))try{e.createImageBitmap().then((t=>{this.context2D.drawImage(t,0,0,this.$videoElement.width,this.$videoElement.height),to(e)}))}catch(e){}else this.context2D.drawImage(e,0,0,this.$videoElement.width,this.$videoElement.height),to(e);else if(this.getCanvasType()===ti)try{this.webglRender.renderYUV(this.$videoElement.width,this.$videoElement.height,e)}catch(e){this.player.debug.error("CanvasPlaybackLoader",`doRender webgl render context is lost ${this.contextGl&&this.contextGl.isContextLost()} and error: ${e.toString()}`)}else if(this.getCanvasType()===si)try{if(!this.webGPURender)return void this.player.debug.warn("CanvasVideoLoader","doRender webgpu render is not init");this.webGPURender.renderYUV(this.$videoElement.width,this.$videoElement.height,e)}catch(e){this.player.debug.error("CanvasPlaybackLoader",`doRender webgpu render and error: ${e.toString()}`)}}get rate(){return this.playbackRate}get fragDuration(){return Math.ceil(1e3/(this.fps*this.playbackRate))}get bufferSize(){return this.bufferList.length}getStreamFps(){return this.streamFps}initFps(){this._hasCalcFps?this.player.debug.log("CanvasPlaybackLoader","initFps, has calc fps"):(this.preFps=oa(this.player.playback.fps,1,100),this.fps=this.preFps)}setFps(e){e!==this.fps?(e>100&&this.player.debug.warn("CanvasPlaybackLoader","setFps max",e),e<0&&this.player.debug.warn("CanvasPlaybackLoader","setFps min",e),this.fps=oa(e,1,100),this.player.debug.log("CanvasPlaybackLoader",`setFps ${this.preFps} -> ${this.fps}`),this.player.playback.isUseFpsRender&&this._sync()):this.player.debug.log("CanvasPlaybackLoader",`setFps, same fps ${e}`)}setStreamFps(e){this.player.debug.log("CanvasPlaybackLoader","setStreamFps",e),this._hasCalcFps=!0,this.streamFps=e,this.preFps=e,this.setFps(e)}setRate(e){e!==this.playbackRate&&(this.playbackRate=e,this.player.playback.isUseFpsRender&&this._sync())}render$2(e){null===this._firstTimestamp&&(this._firstTimestamp=e.ts);const t={tfTs:e.ts-this._firstTimestamp,ts:e.ts};e.videoFrame?t.buffer=e.videoFrame:t.buffer=e.output,this.bufferList.push(t),this.startRender(),this.player.handleRender(),this.player.playback.updateStats({ts:e.ts,tfTs:t.tfTs})}startRender(){for(;!(this.bufferList.length<=0);){const e=this.bufferList.shift();this._doRender(e.buffer)}}pushData(e){null===this._firstTimestamp&&(this._firstTimestamp=e.ts);const t={tfTs:e.ts-this._firstTimestamp,ts:e.ts};e.videoFrame?t.buffer=e.videoFrame:t.buffer=e.output;const i=this.player._opt.playbackConfig.isCacheBeforeDecodeForFpsRender;if(i||this.bufferSize>this.fps*this.playbackRate*2&&(this.player.debug.warn("CanvasPlaybackLoader",`buffer size is ${this.bufferSize}`),this._doPlay()),this.bufferList.push(t),!this._hasCalcFps){const e=ro(this.bufferList);null!==e&&e!==this.preFps&&(this.player.debug.log("CanvasPlaybackLoader",`calc fps is ${e} pre fps is ${this.preFps} and updatePreFps`),this.setStreamFps(e))}if(!i){const e=this.bufferList.length,t=e/(this.fps*this.playbackRate);this.player.debug.log("CanvasPlaybackLoader","rate is",t),t<=1?this.setFps(this.preFps):(this.setFps(this.fps+Math.floor(t*this.playbackRate)),this.player.debug.warn("CanvasPlaybackLoader","rate is",t,"fps is",this.fps,"bufferListLength is",e))}}initVideo(){this.player.playback&&this.player.playback.isUseFpsRender&&this._sync(),this.playing=!0}initVideoDelay(){const e=this.player._opt.playbackDelayTime;e>0?this.delayTimeout=setTimeout((()=>{this.initVideo()}),e):this.initVideo()}clearView(){super.clearView(),this.contextGl.clear(this.contextGl.COLOR_BUFFER_BIT)}clear(){this.player._opt.useWCS&&this.bufferList.forEach((e=>{e.buffer&&to(e.buffer)})),this.bufferList=[]}resume(){this.player.playback.isUseFpsRender&&this._sync(),this.playing=!0}pause(){this.player.playback.isUseFpsRender&&this._stopSync(),this.playing=!1}}class $o{constructor(e){return new($o.getLoaderFactory(e._opt))(e)}static getLoaderFactory(e){return e.useMSE?e.mseUseCanvasRender?Go:Ho:e.isHls&&po(e.supportHls265)||e.isWebrtc&&po(e.isWebrtcH265)?e.useCanvasRender?Go:Ho:e.isAliyunRtc?Ho:e.useWCS?e.playType===_?Vo:!e.useOffscreen&&e.wcsUseVideoRender?Ho:Go:e.playType===_?Vo:e.wasmUseVideoRender&&!e.useOffscreen?Ho:Go}}class Wo extends So{constructor(e){super(),this.bufferList=[],this.player=e,this.$audio=null,this.scriptNode=null,this.workletProcessorNode=null,this.workletWorkerCloseTimeout=null,this.hasInitScriptNode=!1,this.audioContext=new(window.AudioContext||window.webkitAudioContext)({sampleRate:48e3}),this.gainNode=this.audioContext.createGain();const t=this.audioContext.createBufferSource();t.buffer=this.audioContext.createBuffer(1,1,22050),t.connect(this.audioContext.destination),t.noteOn?t.noteOn(0):t.start(0),this.audioBufferSourceNode=t,this.mediaStreamAudioDestinationNode=this.audioContext.createMediaStreamDestination(),this.gainNode.gain.value=0,this._prevVolume=null,this.playing=!1,this.audioInfo={encTypeCode:"",encType:"",channels:"",sampleRate:"",depth:""},this.init=!1,this.hasAudio=!1,this.audioResumeStateTimeout=null}async destroy(){return this.closeAudio(),this.resetInit(),this.clearAudioResumeStateTimeout(),this.audioContext&&(await this.audioContext.close(),this.audioContext=null),this.gainNode&&(this.gainNode.disconnect(),this.gainNode=null),this.hasAudio=!1,this.playing=!1,this.scriptNode&&(this.scriptNode.disconnect(),this.scriptNode.onaudioprocess=ta,this.scriptNode=null),await this._destroyWorklet(),this.workletProcessorNode&&(this.workletProcessorNode.disconnect(),this.workletProcessorNode.port.onmessage=ta,this.workletProcessorNode=null),this.audioBufferSourceNode&&(this.audioBufferSourceNode.stop(),this.audioBufferSourceNode=null),this.mediaStreamAudioDestinationNode&&(this.mediaStreamAudioDestinationNode.disconnect(),this.mediaStreamAudioDestinationNode=null),this.hasInitScriptNode=!1,this._prevVolume=null,this.off(),!0}_destroyWorklet(){return new Promise(((e,t)=>{this.workletProcessorNode?(this.workletProcessorNode.port.postMessage({type:"destroy"}),this.workletWorkerCloseTimeout=setTimeout((()=>{this.player.debug.log(this.TAG_NAME,"send close and wait 10ms destroy directly"),this.workletWorkerCloseTimeout&&(clearTimeout(this.workletWorkerCloseTimeout),this.workletWorkerCloseTimeout=null),e()}),10)):e()}))}resetInit(){this.audioInfo={encTypeCode:"",encType:"",channels:"",sampleRate:"",depth:""},this.init=!1}getAudioInfo(){return this.audioInfo}updateAudioInfo(e){e.encTypeCode&&(this.audioInfo.encTypeCode=e.encTypeCode,this.audioInfo.encType=Ct[e.encTypeCode]),e.channels&&(this.audioInfo.channels=e.channels),e.sampleRate&&(this.audioInfo.sampleRate=e.sampleRate),e.depth&&(this.audioInfo.depth=e.depth),this.audioInfo.sampleRate&&this.audioInfo.channels&&this.audioInfo.encType&&!this.init&&(this.player.emit(nt.audioInfo,this.audioInfo),this.init=!0)}get isPlaying(){return this.playing}get isMute(){return 0===this.gainNode.gain.value}get volume(){return this.gainNode.gain.value}get bufferSize(){return this.bufferList.length}get audioContextState(){let e=null;return this.audioContext&&(e=this.audioContext.state),e}initScriptNode(){}initMobileScriptNode(){}initWorkletScriptNode(){}getEngineType(){return""}mute(e){e?(this.setVolume(0),this.clear()):this.setVolume(this.player.lastVolume||.5)}setVolume(e){e=parseFloat(e).toFixed(2),isNaN(e)||(this.audioEnabled(!0),e=oa(e,0,1),null===this._prevVolume?this.player.emit(nt.mute,0===e):0===this._prevVolume&&e>0?this.player.emit(nt.mute,!1):this._prevVolume>0&&0===e&&this.player.emit(nt.mute,!0),this.gainNode.gain.value=e,this.player.emit(nt.volumechange,this.player.volume),this.player.emit(nt.volume,this.player.volume),this._prevVolume=e)}closeAudio(){this.hasInitScriptNode&&(this.scriptNode&&this.scriptNode.disconnect(this.gainNode),this.workletProcessorNode&&this.workletProcessorNode.disconnect(this.gainNode),this.gainNode&&(this.gainNode.disconnect(this.mediaStreamAudioDestinationNode),this.$audio||this.gainNode.disconnect(this.audioContext.destination))),this.clear()}audioEnabled(e){e?this.isStateSuspended()&&(this.audioContext.resume().then((()=>{this.player.emit(nt.audioResumeState,{state:this.audioContextState,isRunning:this.isStateRunning()})})),this.audioResumeStateTimeout=setTimeout((()=>{this.clearAudioResumeStateTimeout(),this.isStateSuspended()&&this.player.emit(nt.audioResumeState,{state:this.audioContextState,isRunning:this.isStateRunning()})}),1e3)):this.isStateRunning()&&this.audioContext.suspend()}isStateRunning(){return"running"===this.audioContextState}isStateSuspended(){return"suspended"===this.audioContextState}clearAudioResumeStateTimeout(){this.audioResumeStateTimeout&&(clearTimeout(this.audioResumeStateTimeout),this.audioResumeStateTimeout=null)}clear(){this.bufferList=[]}play(e,t){}pause(){this.playing=!1}resume(){this.playing=!0}setRate(e){}getAudioBufferSize(){return 0}}class Jo{constructor(e,t,i,s){this.player=e,this.audio=t,this.channel=i,this.bufferSize=s}destroy(){this.buffer=null,this.channel=null}extract(e,t){let i=this.provide(t);for(let t=0;t<i.size;t++)e[2*t]=i.left[t],e[2*t+1]=i.right[t];return this.audio.tempAudioTimestamp=i.ts,i.size}provide(e){let t=new Float32Array(e),i=new Float32Array(e),s=0,r=0,a=0,o=e/this.bufferSize;const n=this.audio.bufferList;if(o&&n.length>=o){try{for(let e=0;e<o;e++){const e=n.shift();2===this.channel?(t.set(e.buffer[0],a),i.set(e.buffer[1],a)):(t.set(e.buffer[0],a),i.set(e.buffer[0],a)),a+=this.bufferSize,r=e.ts}}catch(e){this.player.debug.warn("Processor","provide()",e),t=new Float32Array(0),i=new Float32Array(0)}s=t.length}return{size:s,ts:r,left:t,right:i}}}class qo{constructor(){this._vector=new Float32Array,this._position=0,this._frameCount=0}destroy(){this.clear(),this._vector=null}get vector(){return this._vector}get position(){return this._position}get startIndex(){return 2*this._position}get frameCount(){return this._frameCount}get endIndex(){return 2*(this._position+this._frameCount)}clear(){this.receive(this._frameCount),this.rewind()}put(e){this._frameCount+=e}putSamples(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s=2*(t=t||0);i>=0||(i=(e.length-s)/2);const r=2*i;this.ensureCapacity(i+this._frameCount);const a=this.endIndex;this.vector.set(e.subarray(s,s+r),a),this._frameCount+=i}putBuffer(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t=t||0,i>=0||(i=e.frameCount-t),this.putSamples(e.vector,e.position+t,i)}receive(e){e>=0&&!(e>this._frameCount)||(e=this.frameCount),this._frameCount-=e,this._position+=e}receiveSamples(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const i=2*t,s=this.startIndex;e.set(this._vector.subarray(s,s+i)),this.receive(t)}extract(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s=this.startIndex+2*t,r=2*i;e.set(this._vector.subarray(s,s+r))}ensureCapacity(){const e=parseInt(2*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0));if(this._vector.length<e){const t=new Float32Array(e);t.set(this._vector.subarray(this.startIndex,this.endIndex)),this._vector=t,this._position=0}else this.rewind()}ensureAdditionalCapacity(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.ensureCapacity(this._frameCount+e)}rewind(){this._position>0&&(this._vector.set(this._vector.subarray(this.startIndex,this.endIndex)),this._position=0)}}class Ko{constructor(e){e?(this._inputBuffer=new qo,this._outputBuffer=new qo):this._inputBuffer=this._outputBuffer=null}destroy(){this.clear(),this._outputBuffer&&(this._outputBuffer.destroy(),this._outputBuffer=null),this._inputBuffer&&(this._inputBuffer.destroy(),this._inputBuffer=null)}get inputBuffer(){return this._inputBuffer}set inputBuffer(e){this._inputBuffer=e}get outputBuffer(){return this._outputBuffer}set outputBuffer(e){this._outputBuffer=e}clear(){this._inputBuffer.clear(),this._outputBuffer.clear()}}class Yo extends Ko{constructor(e){super(e),this.reset(),this._rate=1}destroy(){super.destroy()}set rate(e){this._rate=e}reset(){this.slopeCount=0,this.prevSampleL=0,this.prevSampleR=0}clone(){const e=new Yo;return e.rate=this._rate,e}process(){const e=this._inputBuffer.frameCount;this._outputBuffer.ensureAdditionalCapacity(e/this._rate+1);const t=this.transpose(e);this._inputBuffer.receive(),this._outputBuffer.put(t)}transpose(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(0===e)return 0;const t=this._inputBuffer.vector,i=this._inputBuffer.startIndex,s=this._outputBuffer.vector,r=this._outputBuffer.endIndex;let a=0,o=0;for(;this.slopeCount<1;)s[r+2*o]=(1-this.slopeCount)*this.prevSampleL+this.slopeCount*t[i],s[r+2*o+1]=(1-this.slopeCount)*this.prevSampleR+this.slopeCount*t[i+1],o+=1,this.slopeCount+=this._rate;if(this.slopeCount-=1,1!==e)e:for(;;){for(;this.slopeCount>1;)if(this.slopeCount-=1,a+=1,a>=e-1)break e;const n=i+2*a;s[r+2*o]=(1-this.slopeCount)*t[n]+this.slopeCount*t[n+2],s[r+2*o+1]=(1-this.slopeCount)*t[n+1]+this.slopeCount*t[n+3],o+=1,this.slopeCount+=this._rate}return this.prevSampleL=t[i+2*e-2],this.prevSampleR=t[i+2*e-1],o}}class Qo{constructor(e){this._pipe=e}destroy(){}get pipe(){return this._pipe}get inputBuffer(){return this._pipe.inputBuffer}get outputBuffer(){return this._pipe.outputBuffer}fillInputBuffer(){throw new Error("fillInputBuffer() not overridden")}fillOutputBuffer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;for(;this.outputBuffer.frameCount<e;){const e=16384-this.inputBuffer.frameCount;if(this.fillInputBuffer(e),this.inputBuffer.frameCount<16384)break;this._pipe.process()}}clear(){this._pipe.clear()}}const Xo=function(){};class Zo extends Qo{constructor(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Xo;super(t),this.callback=i,this.sourceSound=e,this.historyBufferSize=22050,this._sourcePosition=0,this.outputBufferPosition=0,this._position=0}destroy(){this.clear(),this.sourceSound.destroy(),this.sourceSound=null,this._sourcePosition=0,this.outputBufferPosition=0,this._position=0}get position(){return this._position}set position(e){if(e>this._position)throw new RangeError("New position may not be greater than current position");const t=this.outputBufferPosition-(this._position-e);if(t<0)throw new RangeError("New position falls outside of history buffer");this.outputBufferPosition=t,this._position=e}get sourcePosition(){return this._sourcePosition}set sourcePosition(e){this.clear(),this._sourcePosition=e}onEnd(){this.callback()}fillInputBuffer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const t=new Float32Array(2*e),i=this.sourceSound.extract(t,e,this._sourcePosition);this._sourcePosition+=i,this.inputBuffer.putSamples(t,0,i)}extract(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.fillOutputBuffer(this.outputBufferPosition+t);const i=Math.min(t,this.outputBuffer.frameCount-this.outputBufferPosition);this.outputBuffer.extract(e,this.outputBufferPosition,i);const s=this.outputBufferPosition+i;return this.outputBufferPosition=Math.min(this.historyBufferSize,s),this.outputBuffer.receive(Math.max(s-this.historyBufferSize,0)),this._position+=i,i}handleSampleData(e){this.extract(e.data,4096)}clear(){super.clear(),this.outputBufferPosition=0}}const en=[[124,186,248,310,372,434,496,558,620,682,744,806,868,930,992,1054,1116,1178,1240,1302,1364,1426,1488,0],[-100,-75,-50,-25,25,50,75,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-20,-15,-10,-5,5,10,15,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-4,-3,-2,-1,1,2,3,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],tn=-10/1.5;class sn extends Ko{constructor(e){super(e),this._quickSeek=!0,this.midBufferDirty=!1,this.midBuffer=null,this.refMidBuffer=null,this.overlapLength=0,this.autoSeqSetting=!0,this.autoSeekSetting=!0,this._tempo=1,this.setParameters(44100,0,0,8)}destroy(){this.clear(),super.destroy()}clear(){super.clear(),this.clearMidBuffer(),this.refMidBuffer=null}clearMidBuffer(){this.midBufferDirty&&(this.midBufferDirty=!1),this.midBuffer=null}setParameters(e,t,i,s){e>0&&(this.sampleRate=e),s>0&&(this.overlapMs=s),t>0?(this.sequenceMs=t,this.autoSeqSetting=!1):this.autoSeqSetting=!0,i>0?(this.seekWindowMs=i,this.autoSeekSetting=!1):this.autoSeekSetting=!0,this.calculateSequenceParameters(),this.calculateOverlapLength(this.overlapMs),this.tempo=this._tempo}set tempo(e){let t;this._tempo=e,this.calculateSequenceParameters(),this.nominalSkip=this._tempo*(this.seekWindowLength-this.overlapLength),this.skipFract=0,t=Math.floor(this.nominalSkip+.5),this.sampleReq=Math.max(t+this.overlapLength,this.seekWindowLength)+this.seekLength}get tempo(){return this._tempo}get inputChunkSize(){return this.sampleReq}get outputChunkSize(){return this.overlapLength+Math.max(0,this.seekWindowLength-2*this.overlapLength)}calculateOverlapLength(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;e=this.sampleRate*t/1e3,e=e<16?16:e,e-=e%8,this.overlapLength=e,this.refMidBuffer=new Float32Array(2*this.overlapLength),this.midBuffer=new Float32Array(2*this.overlapLength)}checkLimits(e,t,i){return e<t?t:e>i?i:e}calculateSequenceParameters(){let e,t;this.autoSeqSetting&&(e=150+-50*this._tempo,e=this.checkLimits(e,50,125),this.sequenceMs=Math.floor(e+.5)),this.autoSeekSetting&&(t=28.333333333333332+tn*this._tempo,t=this.checkLimits(t,15,25),this.seekWindowMs=Math.floor(t+.5)),this.seekWindowLength=Math.floor(this.sampleRate*this.sequenceMs/1e3),this.seekLength=Math.floor(this.sampleRate*this.seekWindowMs/1e3)}set quickSeek(e){this._quickSeek=e}clone(){const e=new sn;return e.tempo=this._tempo,e.setParameters(this.sampleRate,this.sequenceMs,this.seekWindowMs,this.overlapMs),e}seekBestOverlapPosition(){return this._quickSeek?this.seekBestOverlapPositionStereoQuick():this.seekBestOverlapPositionStereo()}seekBestOverlapPositionStereo(){let e,t,i,s=0;for(this.preCalculateCorrelationReferenceStereo(),e=0,t=Number.MIN_VALUE;s<this.seekLength;s+=1)i=this.calculateCrossCorrelationStereo(2*s,this.refMidBuffer),i>t&&(t=i,e=s);return e}seekBestOverlapPositionStereoQuick(){let e,t,i,s,r,a=0;for(this.preCalculateCorrelationReferenceStereo(),t=Number.MIN_VALUE,e=0,s=0,r=0;a<4;a+=1){let o=0;for(;en[a][o]&&(r=s+en[a][o],!(r>=this.seekLength));)i=this.calculateCrossCorrelationStereo(2*r,this.refMidBuffer),i>t&&(t=i,e=r),o+=1;s=e}return e}preCalculateCorrelationReferenceStereo(){let e,t,i=0;for(;i<this.overlapLength;i+=1)t=i*(this.overlapLength-i),e=2*i,this.refMidBuffer[e]=this.midBuffer[e]*t,this.refMidBuffer[e+1]=this.midBuffer[e+1]*t}calculateCrossCorrelationStereo(e,t){const i=this._inputBuffer.vector;e+=this._inputBuffer.startIndex;let s=0,r=2;const a=2*this.overlapLength;let o;for(;r<a;r+=2)o=r+e,s+=i[o]*t[r]+i[o+1]*t[r+1];return s}overlap(e){this.overlapStereo(2*e)}overlapStereo(e){const t=this._inputBuffer.vector;e+=this._inputBuffer.startIndex;const i=this._outputBuffer.vector,s=this._outputBuffer.endIndex;let r,a,o=0;const n=1/this.overlapLength;let l,d,h;for(;o<this.overlapLength;o+=1)a=(this.overlapLength-o)*n,l=o*n,r=2*o,d=r+e,h=r+s,i[h+0]=t[d+0]*l+this.midBuffer[r+0]*a,i[h+1]=t[d+1]*l+this.midBuffer[r+1]*a}process(){let e,t,i;if(null===this.midBuffer){if(this._inputBuffer.frameCount<this.overlapLength)return;this.midBuffer=new Float32Array(2*this.overlapLength),this._inputBuffer.receiveSamples(this.midBuffer,this.overlapLength)}for(;this._inputBuffer.frameCount>=this.sampleReq;){e=this.seekBestOverlapPosition(),this._outputBuffer.ensureAdditionalCapacity(this.overlapLength),this.overlap(Math.floor(e)),this._outputBuffer.put(this.overlapLength),t=this.seekWindowLength-2*this.overlapLength,t>0&&this._outputBuffer.putBuffer(this._inputBuffer,e+this.overlapLength,t);const s=this._inputBuffer.startIndex+2*(e+this.seekWindowLength-this.overlapLength);this.midBuffer.set(this._inputBuffer.vector.subarray(s,s+2*this.overlapLength)),this.skipFract+=this.nominalSkip,i=Math.floor(this.skipFract),this.skipFract-=i,this._inputBuffer.receive(i)}}}const rn=function(e,t){return(e>t?e-t:t-e)>1e-10};class an{constructor(){this.transposer=new Yo(!1),this.stretch=new sn(!1),this._inputBuffer=new qo,this._intermediateBuffer=new qo,this._outputBuffer=new qo,this._rate=0,this._tempo=0,this.virtualPitch=1,this.virtualRate=1,this.virtualTempo=1,this.calculateEffectiveRateAndTempo()}destroy(){this.clear(),this._inputBuffer.destroy(),this._intermediateBuffer.destroy(),this._outputBuffer.destroy(),this._inputBuffer=null,this._intermediateBuffer=null,this._outputBuffer=null}clear(){this.transposer.clear(),this.stretch.clear()}clone(){const e=new an;return e.rate=this.rate,e.tempo=this.tempo,e}get rate(){return this._rate}set rate(e){this.virtualRate=e,this.calculateEffectiveRateAndTempo()}set rateChange(e){this._rate=1+.01*e}get tempo(){return this._tempo}set tempo(e){this.virtualTempo=e,this.calculateEffectiveRateAndTempo()}set tempoChange(e){this.tempo=1+.01*e}set pitch(e){this.virtualPitch=e,this.calculateEffectiveRateAndTempo()}set pitchOctaves(e){this.pitch=Math.exp(.69314718056*e),this.calculateEffectiveRateAndTempo()}set pitchSemitones(e){this.pitchOctaves=e/12}get inputBuffer(){return this._inputBuffer}get outputBuffer(){return this._outputBuffer}calculateEffectiveRateAndTempo(){const e=this._tempo,t=this._rate;this._tempo=this.virtualTempo/this.virtualPitch,this._rate=this.virtualRate*this.virtualPitch,rn(this._tempo,e)&&(this.stretch.tempo=this._tempo),rn(this._rate,t)&&(this.transposer.rate=this._rate),this._rate>1?this._outputBuffer!=this.transposer.outputBuffer&&(this.stretch.inputBuffer=this._inputBuffer,this.stretch.outputBuffer=this._intermediateBuffer,this.transposer.inputBuffer=this._intermediateBuffer,this.transposer.outputBuffer=this._outputBuffer):this._outputBuffer!=this.stretch.outputBuffer&&(this.transposer.inputBuffer=this._inputBuffer,this.transposer.outputBuffer=this._intermediateBuffer,this.stretch.inputBuffer=this._intermediateBuffer,this.stretch.outputBuffer=this._outputBuffer)}process(){this._rate>1?(this.stretch.process(),this.transposer.process()):(this.transposer.process(),this.stretch.process())}}class on{constructor(e,t,i){this.player=e,this.audio=t,this.soundTouch=new an,this.soundTouch.tempo=1,this.soundTouch.rate=1,this.filter=new Zo(i,this.soundTouch)}destroy(){this.filter&&(this.filter.destroy(),this.filter=null),this.soundTouch&&(this.soundTouch.destroy(),this.soundTouch=null)}setRate(e){e!==this.soundTouch.rate&&(this.soundTouch.tempo=e)}provide(e){let t=new Float32Array(2*e),i=this.filter.extract(t,e),s=new Float32Array(i),r=new Float32Array(i);for(let e=0;e<i;e++)s[e]=t[2*e],r[e]=t[2*e+1];return{size:i,left:s,right:r,ts:this.audio.tempAudioTimestamp||0}}}class nn extends Wo{constructor(e){super(e),this.defaultPlaybackRate=1,this.playbackRate=1,this.rateProcessor=null,this.processor=null,this.scriptNodeInterval=null,this.engineType=this.getAutoAudioEngineType(),this.audioBufferSize=this.getAudioBufferSizeByType(),this.$audio=null,this._delayPlay=!1,this.eventListenList=[],this.workletUrl=null,this.clearWorkletUrlTimeout=null,this.player._opt.supportLockScreenPlayAudio&&ya()&&(this.$audio=document.createElement("audio"),Object.assign(this.$audio.style,{position:"absolute",left:"-100%",top:"-100%"}),e.$container?e.$container.appendChild(this.$audio):document.body.appendChild(this.$audio),this._bindAudioProxy(),this.player.debug.log("AudioContext","create audio element")),this.scriptStartTime=0,this.player.debug.log("AudioContext","init",`engineType: ${this.engineType}, audioBufferSize: ${this.audioBufferSize}`)}async destroy(){return await super.destroy(),this.workletUrl&&(URL.revokeObjectURL(this.workletUrl),this.workletUrl=null),this.clearWorkletUrlTimeout&&(clearTimeout(this.clearWorkletUrlTimeout),this.clearWorkletUrlTimeout=null),this.eventListenList.length&&(this.eventListenList.forEach((e=>{e()})),this.eventListenList=[]),this.$audio&&(this.$audio.pause(),this.$audio.srcObject=null,this.$audio.parentNode&&this.$audio.parentNode.removeChild(this.$audio),this.$audio=null),this.processor&&(this.processor.destroy(),this.processor=null),this.rateProcessor&&(this.rateProcessor.destroy(),this.rateProcessor=null),this.scriptNodeInterval&&(clearInterval(this.scriptNodeInterval),this.scriptNodeInterval=null),this.defaultPlaybackRate=1,this.playbackRate=1,this.scriptStartTime=0,this.audioBufferSize=0,this.engineType=Us,this.player.debug.log("AudioContext","destroy"),!0}isAudioPlaying(){return this.$audio&&po(this.$audio.paused)&&po(this.$audio.ended)&&0!==this.$audio.playbackRate&&0!==this.$audio.readyState}_bindAudioProxy(){const{proxy:e}=this.player.events,t=e(this.$audio,"canplay",(()=>{this.player.debug.log("AudioContext","canplay"),this._delayPlay&&this._audioElementPlay()}));this.eventListenList.push(t)}_getAudioElementReadyState(){let e=0;return this.$audio&&(e=this.$audio.readyState),e}audioElementPlay(){if(this.$audio){const e=this._getAudioElementReadyState();if(this.player.debug.log("AudioContext",`play and readyState: ${e}`),!(0!==e||Wa()&&ya()))return this.player.debug.warn("AudioContext","readyState is 0 and set _delayPlay to true"),void(this._delayPlay=!0);this._audioElementPlay()}}_audioElementPlay(){this.$audio&&this.$audio.play().then((()=>{this._delayPlay=!1,this.player.debug.log("AudioContext","_audioElementPlay success"),setTimeout((()=>{this.isAudioPlaying()||(this.player.debug.warn("AudioContext","play failed and retry play"),this._audioElementPlay())}),100),this.isAudioPlaying()&&(this.player.debug.log("AudioContext","play success and remove document click event listener"),document.removeEventListener("click",this._audioElementPlay.bind(this)))})).catch((e=>{this.player.debug.error("AudioContext","_audioElementPlay error",e),document.addEventListener("click",this._audioElementPlay.bind(this))}))}getAudioBufferSize(){return this.audioBufferSize}get oneBufferDuration(){return this.audioBufferSize/this.audioContext.sampleRate*1e3}get isActiveEngineType(){return this.engineType===Fs}getBufferListDuration(){return this.bufferList.length*this.oneBufferDuration}isMoreThanMinBufferDuration(){return this.getBufferListDuration()>=100*this.playbackRate}initProcessor(){this.processor=new Jo(this.player,this,this.audioInfo.channels,this.audioBufferSize),this.rateProcessor=new on(this.player,this,this.processor)}getAutoAudioEngineType(){let e=this.player._opt.audioEngine||Us;const t=()=>{e=Wa()&&fa()?Fs:(ya()&&this.player._opt.supportLockScreenPlayAudio||io()&&this.supportAudioWorklet(),Us)};return this.player._opt.audioEngine?this.player._opt.audioEngine===Ms&&io()&&this.supportAudioWorklet()?e=Ms:this.player._opt.audioEngine===Fs?e=Fs:this.player._opt.audioEngine===Us?e=Us:t():t(),e}getAudioBufferSizeByType(){const e=this.engineType;this.player._opt.hasVideo;const t=this.player._opt.weiXinInAndroidAudioBufferSize;return e===Ms?1024:e===Fs?t||4800:1024}supportAudioWorklet(){return this.audioContext&&this.audioContext.audioWorklet}initScriptNode(){this.playing=!0,this.hasInitScriptNode||(this.initProcessor(),this.engineType===Ms?this.initWorkletScriptNode():this.engineType===Fs?this.initIntervalScriptNode():this.engineType===Us&&this.initProcessScriptNode(),this.audioElementPlay())}getEngineType(){return this.engineType}isPlaybackRateSpeed(){return this.playbackRate>this.defaultPlaybackRate}initProcessScriptNode(){const e=this.audioContext.createScriptProcessor(this.audioBufferSize,0,this.audioInfo.channels);e.onaudioprocess=e=>{const t=e.outputBuffer;this.handleScriptNodeCallback(t)},e.connect(this.gainNode),this.scriptNode=e,this.gainNode.connect(this.mediaStreamAudioDestinationNode),this.$audio?this.$audio.srcObject=this.mediaStreamAudioDestinationNode.stream:this.gainNode.connect(this.audioContext.destination),this.hasInitScriptNode=!0}initIntervalScriptNode(){this.scriptStartTime=0;const e=1e3*this.audioBufferSize/this.audioContext.sampleRate;this.scriptNodeInterval=setInterval((()=>{if(0===this.bufferList.length||po(this.playing)||this.isMute)return void(this.playing&&po(this.isMute)&&this.player.debug.log("AudioContext",`interval script node and bufferList is ${this.bufferList.length} or playing is ${this.playing}`));const e=this.audioContext.createBufferSource(),t=this.audioContext.createBuffer(this.audioInfo.channels,this.audioBufferSize,this.audioContext.sampleRate);this.handleScriptNodeCallback(t,(()=>{this.scriptStartTime<this.audioContext.currentTime&&(this.player.debug.log("AudioContext",`script start time ${this.scriptStartTime} is less than current time ${this.audioContext.currentTime}`),this.scriptStartTime=this.audioContext.currentTime),e.buffer=t,e.connect(this.gainNode),e.start(this.scriptStartTime),this.scriptStartTime+=t.duration}))}),e),this.gainNode.connect(this.mediaStreamAudioDestinationNode),this.$audio?this.$audio.srcObject=this.mediaStreamAudioDestinationNode.stream:this.gainNode.connect(this.audioContext.destination),this.hasInitScriptNode=!0}initWorkletScriptNode(){let e=eo((function(){class e extends AudioWorkletProcessor{constructor(){super(),this.audioBufferSize=1024,this.start=!1,this.channels=1,this.samplesArray=[],this.offset=0,this.state=0,this.port.onmessage=e=>{"init"===e.data.message?(this.audioBufferSize=e.data.audioBufferSize,this.start=e.data.start,this.channels=e.data.channels,this.state=0,this.offset=0,this.samplesArray=[]):"stop"===e.data.message?(this.state=0,this.start=!1,this.offset=0,this.samplesArray=[]):"data"===e.data.message?this.samplesArray.push(e.data.buffer):"zero"===e.data.message&&this.samplesArray.push({left:new Float32Array(this.audioBufferSize).fill(0),right:new Float32Array(this.audioBufferSize).fill(0)})}}process(e,t,i){const s=t[0][0],r=t[0][1];if(0===this.offset&&this.port.postMessage({message:"beep"}),0===this.state)this.state=1;else if(1===this.state&&this.samplesArray.length>=4)this.state=2;else if(2===this.state){const e=this.samplesArray[0];for(let t=0;t<s.length;t++)1===this.channels?s[t]=e.left[t+this.offset]:2===this.channels&&(s[t]=e.left[t+this.offset],r&&(r[t]=e.right[t+this.offset]))}else 1===this.channels?s.fill(0):2===this.channels&&(s.fill(0),r&&r.fill(0));return this.offset+=128,this.offset===this.audioBufferSize&&(this.offset=0,2===this.state&&this.samplesArray.shift(),0===this.samplesArray.length&&(this.state=0)),this.start}}registerProcessor("worklet-processor",e)}));this.workletUrl=e,this.audioContext.audioWorklet.addModule(e).then((()=>{if(this.player.isDestroyedOrClosed())return void this.player.debug.log("AudioContext","initWorkletScriptNode() player is destroyed");if(!this.audioContext)return void this.player.debug.warn("AudioContext","initWorkletScriptNode audioContext is null");let e=[1];2===this.audioInfo.channels&&(e=[1,1]);try{this.workletProcessorNode=new AudioWorkletNode(this.audioContext,"worklet-processor",{numberOfOutputs:this.audioInfo.channels,outputChannelCount:e})}catch(e){this.player.debug.error("AudioContext","initWorkletScriptNode error",e),this.workletProcessorNode=null,this.tierDownToProcessScript()}this.workletProcessorNode&&(this.workletProcessorNode.connect(this.gainNode),this.gainNode.connect(this.mediaStreamAudioDestinationNode),this.$audio?this.$audio.srcObject=this.mediaStreamAudioDestinationNode.stream:this.gainNode.connect(this.audioContext.destination),this.hasInitScriptNode=!0,this.workletProcessorNode.port.postMessage({message:"init",audioBufferSize:this.audioBufferSize,start:!0,channels:this.audioInfo.channels}),this.workletProcessorNode.port.onmessage=e=>{this.workletProcessorNode?this.audioContext?this.handleScriptNodeCallback(this.workletProcessorNode,null,!0):this.workletProcessorNode.port.postMessage({message:"zero"}):this.player.debug.error("AudioContext","workletProcessorNode is null")})})),this.clearWorkletUrlTimeout=setTimeout((()=>{URL.revokeObjectURL(this.workletUrl),this.workletUrl=null,this.clearWorkletUrlTimeout=null}),te)}tierDownToProcessScript(){this.player.debug.log("AudioContext","tierDownToProcessScript"),this.engineType=Us,this.audioBufferSize=this.getAudioBufferSizeByType(),this.initProcessScriptNode(),this.audioElementPlay()}handleScriptNodeCallback(e,t){let i,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=t||ta;let r=e.length;s&&(i=e,r=this.audioBufferSize);const a=this.audioInfo.channels;if(this.playing&&this.isMoreThanMinBufferDuration()){if(this.player._opt,this.player.openSyncAudioAndVideo()&&uo(this.player.visibility)){this.calcPlaybackRateBySync();const r=this.player.getAudioSyncVideoDiff();if(r>this.player._opt.syncAudioAndVideoDiff)return this.player.debug.warn("AudioContext",`audioSyncVideoOption more than diff :${r}, waiting and bufferList is ${this.bufferList.length}`),s?i.port.postMessage({message:"zero"}):this.fillScriptNodeOutputBuffer(e,a),void t()}let o=this._provide(r);if(0===o.size)return po(this.player.isPlaybackOnlyDecodeIFrame())&&this.player.debug.warn("AudioContext",`bufferList size is ${this.bufferList.length} outputBufferLength is ${r},and bufferItem.size is 0`),s?i.port.postMessage({message:"zero"}):this.fillScriptNodeOutputBuffer(e,a),void t();o&&o.ts&&(this.player.audioTimestamp=o.ts),s?i.port.postMessage({message:"data",buffer:o}):this.fillScriptNodeOutputBuffer(e,a,o),t()}else 0===this.bufferList.length&&this.playing&&po(this.isMute)&&po(this.player.isPlaybackOnlyDecodeIFrame())&&this.player.debug.warn("AudioContext",`bufferList size is 0 and outputBufferLength is ${r}`),s?i.port.postMessage({message:"zero"}):this.fillScriptNodeOutputBuffer(e,a),t()}fillScriptNodeOutputBuffer(e,t,i){if(1===t){const t=e.getChannelData(0);i?0===i.size?t.fill(0):t.set(i.left):t.fill(0)}else if(2===t){const t=e.getChannelData(0),s=e.getChannelData(1);i?0===i.size?(t.fill(0),s.fill(0)):(t.set(i.left),s.set(i.right)):(t.fill(0),s.fill(0))}}play(e,t){this.isMute||(this.hasInitScriptNode?(this.hasAudio=!0,this.player.latestAudioTimestamp=t,this.bufferList.push({buffer:e,ts:t}),po(this.player.openSyncAudioAndVideo())&&this.calcPlaybackRateByBuffer()):this.player.debug.warn("AudioContext","play has not init script node"))}calcPlaybackRateBySync(){if(this.isMute)return;if(!this.playing)return;const e=Math.floor(2e3/this.oneBufferDuration);if(this.bufferList.length>e)return this.player.debug.warn("AudioContext",`bufferList length ${this.bufferList.length} more than ${e}, and drop`),void this.clear();const t=this.player.getAudioSyncVideoDiff();if(this.getEngineType()===Fs){if(t<-this.player._opt.syncAudioAndVideoDiff){this.player.debug.warn("AudioContext",`engine active , audioSyncVideoOption ${-this.player._opt.syncAudioAndVideoDiff} less than diff :${t},\n and bufferlist is ${this.bufferList.length}`);const e=this.player.getRenderCurrentPts();for(;this.bufferList.length>0;){const t=this.bufferList[0],i=t.ts-e;if(i>-this.player._opt.syncAudioAndVideoDiff/2){this.player.audioTimestamp=t.ts,this.player.debug.log("AudioContext",`engine active , audioSyncVideoOption\n item.ts is ${t.ts} and currentVideoTimestamp is ${e}, diff is ${i} > -${this.player._opt.syncAudioAndVideoDiff/2} and end`);break}this.bufferList.shift(),this.player.audioTimestamp=t.ts}}}else{let e=this.playbackRate;t<-this.player._opt.syncAudioAndVideoDiff?e===this.defaultPlaybackRate&&(this.player.debug.log("AudioContext",`audioSyncVideoOption ${-this.player._opt.syncAudioAndVideoDiff} less than diff :${t},\n speed up, playbackRate is ${e},\n and bufferList is ${this.bufferList.length}`),e=this.defaultPlaybackRate+.2):t>-this.player._opt.syncAudioAndVideoDiff/2&&e!==this.defaultPlaybackRate&&(this.player.debug.log("AudioContext",`diff is ${t} > -${this.player._opt.syncAudioAndVideoDiff/2} and speed to 1`),e=this.defaultPlaybackRate),this.updatePlaybackRate(e)}}calcPlaybackRateByBuffer(){if(this.isMute)return;if(!this.playing)return;let e=this.playbackRate,t=1e3,i=5e3;this.isAudioPlayer&&(t=this.player._opt.videoBufferDelay,i=this.player._opt.videoBufferMax);const s=Math.floor(t/this.oneBufferDuration),r=Math.floor(i/this.oneBufferDuration);if(this.bufferList.length>r)return this.player.debug.warn("AudioContext",`bufferList length ${this.bufferList.length} more than ${r}, and drop`),void this.clear();this.getEngineType()!==Fs&&(this.bufferList.length>s?(e=this.defaultPlaybackRate+.2,this.player.debug.log("AudioContext",`bufferList length ${this.bufferList.length} more than ${s}, speed up, playbackRate is ${e}`)):this.bufferList.length<s/2&&(e=this.defaultPlaybackRate),this.updatePlaybackRate(e))}updatePlaybackRate(e){this.rateProcessor&&(this.playbackRate=e,this.rateProcessor.setRate(this.playbackRate))}_provide(e){return(1===this.playbackRate?this.processor:this.rateProcessor).provide(e)}}class ln extends So{constructor(e){super(),this.player=e,this.$video=e.video.$videoElement,this.init=!1,this.player._opt.hlsUseCanvasRender&&(this.$video=this.player.hlsDecoder.$videoElement),this.player._opt.webrtcUseCanvasRender&&(this.$video=this.player.webrtc.$videoElement),this.audioInfo={encTypeCode:"",encType:"",channels:"",sampleRate:"",depth:""},this._prevVolume=null,this.player.debug.log("Audio","init")}async destroy(){return this.resetInit(),this.off(),this._prevVolume=null,this.player.debug.log("Audio","destroy"),!0}resetInit(){this.init=!1,this.audioInfo={encTypeCode:"",encType:"",channels:"",sampleRate:"",depth:""}}getAudioInfo(){return this.audioInfo}updateAudioInfo(e){e.encTypeCode&&(this.audioInfo.encTypeCode=e.encTypeCode,this.audioInfo.encType=Ct[e.encTypeCode]),e.encType&&(this.audioInfo.encType=e.encType),e.channels&&(this.audioInfo.channels=e.channels),e.sampleRate&&(this.audioInfo.sampleRate=e.sampleRate),e.depth&&(this.audioInfo.depth=e.depth),this.audioInfo.sampleRate&&this.audioInfo.channels&&this.audioInfo.encType&&!this.init&&(this.player.debug.log("Audio","audioInfo",JSON.stringify(this.audioInfo)),this.player.emit(nt.audioInfo,this.audioInfo),this.init=!0)}get isPlaying(){return!0}get volume(){return uo(this.$video.muted)?0:this.$video.volume}get isMute(){return 0===this.$video.volume||uo(this.$video.muted)}mute(e){this.setVolume(e?0:this.player.lastVolume||.5)}setVolume(e){e=parseFloat(e),isNaN(e)||(e=oa(e,0,1),this.$video.muted&&(this.$video.muted=!1),ya()&&(this.$video.muted=0===e),this.player.isAliyunRtc()&&this.player.aliyunRtcDecoder&&this.player.aliyunRtcDecoder.aliyunRtcRemoteStream&&(this.player.aliyunRtcDecoder.aliyunRtcRemoteStream.muted=0===e),null===this._prevVolume?this.player.emit(nt.mute,0===e):0===this._prevVolume&&e>0?this.player.emit(nt.mute,!1):this._prevVolume>0&&0===e&&this.player.emit(nt.mute,!0),this.$video.volume=e,this.player.emit(nt.volumechange,this.player.volume),this.player.emit(nt.volume,this.player.volume),this._prevVolume=e)}clear(){}play(){}pause(){}resume(){}getEngineType(){return"audio"}isPlaybackRateSpeed(){return!1}getAudioBufferSize(){return 0}setRate(){}initScriptNode(){}initScriptNodeDelay(){}audioEnabled(){this.mute(!1)}}class dn extends nn{constructor(e){super(e),this.delayTimeout=null,this.player.on(nt.playbackPause,(e=>{this.listenPlaybackPause(e)})),this.player.debug.log("AudioPlaybackContext","init")}async destroy(){return this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null),await super.destroy(),this.player.debug.log("AudioPlaybackLoader","destroy"),!0}listenPlaybackPause(e){e?(this.pause(),this.player.playback.isPlaybackPauseClearCache&&this.clear()):this.resume()}initScriptNodeDelay(){const e=this.player._opt.playbackDelayTime;e>0?this.delayTimeout=setTimeout((()=>{this.initScriptNode()}),e):this.initScriptNode()}setRate(e){e!==this.defaultPlaybackRate&&this.rateProcessor&&(this.player.debug.log("AudioPlaybackContext","setRate",e),this.defaultPlaybackRate=e,this.updatePlaybackRate(e))}}class hn extends nn{constructor(e){super(e),this.TAG_NAME="AudioPlayerLoader",this.isAudioPlayer=!0,this.player.debug.log(this.TAG_NAME,"init")}async destroy(){return await super.destroy(),this.player.debug.log(this.TAG_NAME,"destroy"),!0}play(e,t){po(this.playing)||super.play(e,t)}pause(){this.player.debug.log(this.TAG_NAME,"pause"),this.playing=!1,this.clear()}resume(){this.player.debug.log(this.TAG_NAME,"resume"),this.playing=!0}}class cn{constructor(e){return new(cn.getLoaderFactory(e._opt))(e)}static getLoaderFactory(e){return e.playType===_?e.useMSE&&e.mseDecodeAudio?ln:dn:e.playType===v?hn:e.isHls&&po(e.supportHls265)||e.isWebrtc&&po(e.isWebrtcH265)||e.useMSE&&e.mseDecodeAudio||e.isAliyunRtc?ln:nn}}class un extends So{constructor(e){super(),this.player=e,this.playing=!1,this._requestAbort=!1,this._status=dr,this.writableStream=null,this.abortController=new AbortController,this.streamRate=ha((t=>{e.emit(nt.kBps,(t/1024).toFixed(2))})),this.streamRateInterval=null,e.debug.log("FetchStream","init")}async destroy(){return this.abort(),this.writableStream&&po(this.writableStream.locked)&&this.writableStream.close().catch((e=>{this.player.debug.log("FetchStream","destroy and writableStream.close()",e)})),this.writableStream=null,this.off(),this._status=dr,this.streamRate=null,this.stopStreamRateInterval(),this.player.debug.log("FetchStream","destroy"),!0}startStreamRateInterval(){this.stopStreamRateInterval(),this.streamRateInterval=setInterval((()=>{this.streamRate&&this.streamRate(0)}),1e3)}stopStreamRateInterval(){this.streamRateInterval&&(clearInterval(this.streamRateInterval),this.streamRateInterval=null)}fetchStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{demux:i}=this.player;this.player._times.streamStart=aa();const s=Object.assign({signal:this.abortController.signal},{headers:t.headers||{}});fetch(e,s).then((e=>{if(this._requestAbort)return this._status=dr,void e.body.cancel();if(!function(e){return e.ok&&e.status>=200&&e.status<=299}(e))return this.player.debug.error("FetchStream",`fetch response status is ${e.status} and ok is ${e.ok} and emit error and next abort()`),this.abort(),void this.emit(ct.fetchError,`fetch response status is ${e.status} and ok is ${e.ok}`);if(this.emit(nt.streamSuccess),this.startStreamRateInterval(),"undefined"!=typeof WritableStream)this.player.debug.log("FetchStream","use WritableStream() to read stream"),this.writableStream=new WritableStream({write:e=>this.abortController&&this.abortController.signal&&this.abortController.signal.aborted?(this.player.debug.log("FetchStream","writableStream.write() and this.abortController.signal.aborted so return"),void(this._status=cr)):uo(this._requestAbort)?(this.player.debug.log("FetchStream","writableStream.write() and this._requestAbort is true so return"),void(this._status=cr)):"string"!=typeof e?(this._status=hr,this.streamRate&&this.streamRate(e.byteLength),i.dispatch(e)):void this.player.debug.warn("FetchStream",`writableStream.write() and value is "${e}" string so return`),close:()=>{this._status=cr,i.close(),this.emit(nt.streamEnd,"fetch done")},abort:e=>{if(this.abortController&&this.abortController.signal&&this.abortController.signal.aborted)return this.player.debug.log("FetchStream","writableStream.abort() and this.abortController.signal.aborted so return"),void(this._status=cr);i.close();const t=e.toString();-1===t.indexOf(ps)&&-1===t.indexOf(fs)&&e.name!==ms&&(this.abort(),this.emit(ct.fetchError,e))}}),e.body.pipeTo(this.writableStream);else{this.player.debug.log("FetchStream","not support WritableStream and use getReader() to read stream");const t=e.body.getReader(),s=()=>{t.read().then((e=>{let{done:t,value:r}=e;return t?(this._status=cr,i.close(),void this.emit(nt.streamEnd,"fetch done")):this.abortController&&this.abortController.signal&&this.abortController.signal.aborted?(this.player.debug.log("FetchStream","reader.read() and this.abortController.signal.aborted so return"),void(this._status=cr)):uo(this._requestAbort)?(this.player.debug.log("FetchStream","reader.read() and this._requestAbort is true so return"),void(this._status=cr)):void("string"!=typeof r?(this._status=hr,this.streamRate&&this.streamRate(r.byteLength),i.dispatch(r),s()):this.player.debug.warn("FetchStream",`reader.read() and value is "${r}" string so return`))})).catch((e=>{if(this.abortController&&this.abortController.signal&&this.abortController.signal.aborted)return this.player.debug.log("FetchStream","reader.read().catch() and this.abortController.signal.aborted so return"),void(this._status=cr);i.close();const t=e.toString();-1===t.indexOf(ps)&&-1===t.indexOf(fs)&&e.name!==ms&&(this.abort(),this.emit(ct.fetchError,e))}))};s()}})).catch((e=>{this.abortController&&this.abortController.signal&&this.abortController.signal.aborted||"AbortError"!==e.name&&(i.close(),this.abort(),this.emit(ct.fetchError,e))}))}abort(){this._requestAbort=!0;const e=Ja();if(this._status!==hr||po(e)){if(this.abortController){try{this.abortController.abort()}catch(e){}this.abortController=null}}else this.abortController=null,this.player.debug.log("FetchStream",`abort() and not abortController.abort() _status is ${this._status} and _isChrome is ${e}`)}getStreamType(){return u}}class pn extends So{constructor(e){super(),this.TAG_NAME="FetchWorkerLoader",this.player=e,this.playing=!1,this.fetchWorker=null,this.workerClearTimeout=null,this.workerUrl=null,this.destroyResolve=null,this.decoderWorkerCloseTimeout=null,this.abortController=new AbortController,this.streamRate=ha((t=>{e.emit(nt.kBps,(t/1024).toFixed(2))})),this.streamRateInterval=null,this._initFetchWorker(),e.debug.log(this.TAG_NAME,"init")}destroy(){return new Promise(((e,t)=>{this.fetchWorker?(this.player.debug.log(this.TAG_NAME,"send destroy"),this.fetchWorker.postMessage({cmd:tt}),this.destroyResolve=e,this.decoderWorkerCloseTimeout=setTimeout((()=>{this.player.debug.warn(this.TAG_NAME,"send close but not response and destroy directly"),this.decoderWorkerCloseTimeout&&(clearTimeout(this.decoderWorkerCloseTimeout),this.decoderWorkerCloseTimeout=null),this._destroy(),setTimeout((()=>{e()}),0)}),2e3)):(this._destroy(),setTimeout((()=>{e()}),0))}))}_destroy(){this.off(),this.decoderWorkerCloseTimeout&&(clearTimeout(this.decoderWorkerCloseTimeout),this.decoderWorkerCloseTimeout=null),this.workerUrl&&(window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null),this.workerClearTimeout&&(clearTimeout(this.workerClearTimeout),this.workerClearTimeout=null),this._stopStreamRateInterval(),this.streamRate=null,this.fetchWorker&&(this.fetchWorker.terminate(),this.fetchWorker.onmessage=null,this.fetchWorker=null),this.destroyResolve&&(this.destroyResolve(),this.destroyResolve=null),this.player.debug.log(this.TAG_NAME,"destroy")}_initFetchWorker(){const e=Ao(function(){function e(e){return!0===e||"true"===e}function t(e){return!1===e||"false"===e}const i="The user aborted a request",s="AbortError",r="AbortError",a="fetch",o="destroy",n="destroyEnd",l="buffer",d="fetchError",h="fetchClose",c="fetchSuccess",u="idle",p="buffering",f="complete";let m=new class{constructor(){this._requestAbort=!1,this._status=u,this.writableStream=null,this.isChrome=!1,this.abortController=new AbortController}destroy(){this.abort(),this.writableStream&&t(this.writableStream.locked)&&this.writableStream.close().catch((e=>{})),this.writableStream=null,this._status=u}fetchStream(t){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=Object.assign({signal:this.abortController.signal},{headers:a.headers||{}});fetch(t,o).then((t=>{if(this._requestAbort)return this._status=u,void t.body.cancel();if(!function(e){return e.ok&&e.status>=200&&e.status<=299}(t))return this.abort(),void postMessage({cmd:d,message:`fetch response status is ${t.status} and ok is ${t.ok}`});if(postMessage({cmd:c}),"undefined"!=typeof WritableStream)this.writableStream=new WritableStream({write:t=>{this.abortController&&this.abortController.signal&&this.abortController.signal.aborted||e(this._requestAbort)?this._status=f:"string"!=typeof t&&(this._status=p,postMessage({cmd:l,buffer:t},[t.buffer]))},close:()=>{this._status=f,postMessage({cmd:h})},abort:e=>{if(this.abortController&&this.abortController.signal&&this.abortController.signal.aborted)return void(this._status=f);const t=e.toString();-1===t.indexOf(i)&&-1===t.indexOf(s)&&e.name!==r&&(this.abort(),postMessage({cmd:d,message:e.toString()}))}}),t.body.pipeTo(this.writableStream);else{const a=t.body.getReader(),o=()=>{a.read().then((t=>{let{done:i,value:s}=t;if(i)return this._status=f,void postMessage({cmd:h});this.abortController&&this.abortController.signal&&this.abortController.signal.aborted||e(this._requestAbort)?this._status=f:"string"!=typeof s&&(this._status=p,postMessage({cmd:l,buffer:s},[s.buffer]),o())})).catch((e=>{if(this.abortController&&this.abortController.signal&&this.abortController.signal.aborted)return void(this._status=f);const t=e.toString();-1===t.indexOf(i)&&-1===t.indexOf(s)&&e.name!==r&&(this.abort(),postMessage({cmd:d,message:e.toString()}))}))};o()}})).catch((e=>{this.abortController&&this.abortController.signal&&this.abortController.signal.aborted||"AbortError"!==e.name&&(this.abort(),postMessage({cmd:d,message:e.toString()}))}))}abort(){if(this._requestAbort=!0,this._status!==p||t(m.isChrome)){if(this.abortController){try{this.abortController.abort()}catch(e){}this.abortController=null}}else this.abortController=null}};self.onmessage=t=>{const i=t.data;switch(i.cmd){case a:m.isChrome=e(i.isChrome),m.fetchStream(i.url,JSON.parse(i.options));break;case o:m.destroy(),m=null,postMessage({cmd:n})}}}.toString()),t=new Blob([e],{type:"text/javascript"});let i=URL.createObjectURL(t);const s=new Worker(i);this.workerUrl=i,this.workerClearTimeout=setTimeout((()=>{window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null,this.workerClearTimeout=null}),te),s.onmessage=e=>{const{demux:t}=this.player,i=e.data;switch(i.cmd){case st:this.streamRate&&this.streamRate(i.buffer.byteLength),t.dispatch(i.buffer);break;case ot:this.emit(nt.streamSuccess),this._startStreamRateInterval();break;case at:t.close(),this.emit(nt.streamEnd,"fetch done");break;case rt:t.close(),this.emit(ct.fetchError,i.message);break;case it:this._destroy()}},this.fetchWorker=s}_startStreamRateInterval(){this._stopStreamRateInterval(),this.streamRateInterval=setInterval((()=>{this.streamRate&&this.streamRate(0)}),1e3)}_stopStreamRateInterval(){this.streamRateInterval&&(clearInterval(this.streamRateInterval),this.streamRateInterval=null)}fetchStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.player._times.streamStart=aa(),this.fetchWorker.postMessage({cmd:et,url:e,isChrome:Ja(),options:JSON.stringify(t)})}getStreamType(){return u}}class fn extends So{constructor(e){super(),this.player=e,this.socket=null,this.socketStatus=ut,this.wsUrl=null,this.requestAbort=!1,this.socketDestroyFnList=[],this.streamRate=ha((t=>{e.emit(nt.kBps,(t/1024).toFixed(2))})),this.streamRateInterval=null,e.debug.log("WebsocketStream","init")}async destroy(){this._closeWebSocket(),this.stopStreamRateInterval(),this.wsUrl=null,this.off(),this.player.debug.log("WebsocketStream","destroy")}startStreamRateInterval(){this.stopStreamRateInterval(),this.streamRateInterval=setInterval((()=>{this.streamRate&&this.streamRate(0)}),1e3)}stopStreamRateInterval(){this.streamRateInterval&&(clearInterval(this.streamRateInterval),this.streamRateInterval=null)}_createWebSocket(){const e=this.player,{debug:t,events:{proxy:i},demux:s}=e;this.socket=new WebSocket(this.wsUrl),this.socket.binaryType="arraybuffer";const r=i(this.socket,"open",(()=>{t.log("WebsocketStream","socket open"),this.socketStatus=pt,this.emit(nt.streamSuccess),this.player.emit(nt.websocketOpen),this.startStreamRateInterval()})),a=i(this.socket,"message",(e=>{"string"!=typeof e.data?(this.streamRate&&this.streamRate(e.data.byteLength),this._handleMessage(e.data)):this.player.debug.warn("WebsocketStream",`websocket handle message message is "${e.data}" string so return`)})),o=i(this.socket,"close",(e=>{if(this.socketStatus!==mt){if(t.log("WebsocketStream",`socket close and code is ${e.code}`),1006===e.code&&t.error("WebsocketStream",`socket close abnormally and code is ${e.code}`),uo(this.requestAbort))return this.requestAbort=!1,void t.log("WebsocketStream","socket close and requestAbort is true");s.close(),this.socketStatus=ft,this.player.emit(nt.websocketClose,e.code),this.emit(nt.streamEnd,e.code)}else t.log("WebsocketStream","socket close and status is error, so return")})),n=i(this.socket,"error",(e=>{t.error("WebsocketStream","socket error",e),this.socketStatus=mt,this.emit(ct.websocketError,e),s.close(),t.log("WebsocketStream","socket error:",e.isTrusted?"websocket user aborted":"websocket error")}));this.socketDestroyFnList.push(r,a,o,n)}_closeWebSocket(){this.socketDestroyFnList.forEach((e=>e())),!this.socket||0!==this.socket.readyState&&1!==this.socket.readyState?this.socket&&this.player.debug.log("WebsocketStream",`_closeWebSocket() socket is null or socket status is ${this.socket&&this.socket.readyState}`):(this.requestAbort=!0,this.socket.close(1e3,"Client disconnecting")),this.socket=null,this.socketStatus=ut,this.streamRate=null}_handleMessage(e){const{demux:t}=this.player;t?t.dispatch(e):this.player.debug.warn("WebsocketStream","websocket handle message demux is null so return")}fetchStream(e,t){this.player._times.streamStart=aa(),this.wsUrl=e,this._createWebSocket()}sendMessage(e){this.socket?this.socketStatus===pt?this.socket.send(e):this.player.debug.error("WebsocketStream",`websocket send message error and socket status is ${this.socketStatus}`):this.player.debug.error("WebsocketStream","websocket send message socket is null")}resetFetchStream(){this._closeWebSocket(),this._createWebSocket()}getStreamType(){return f}}class mn extends So{constructor(e){super(),this.player=e,e.debug.log("HlsStream","init")}async destroy(){return this.off(),this.player.debug.log("HlsStream","destroy"),!0}fetchStream(e){const{hlsDecoder:t,debug:i}=this.player;this.player._times.streamStart=aa(),t.loadSource(e).then((()=>{this.player.debug.log("HlsStream","loadSource success"),this.emit(nt.streamSuccess)})).catch((e=>{this.emit(ct.hlsError,e)}))}getStreamType(){return p}}class gn extends So{constructor(e){super(),this.player=e,this.webrctUrl=null,e.debug.log("WebrtcStream","init")}async destroy(){return this.webrctUrl=null,this.off(),this.player.debug.log("WebrtcStream","destroy"),!0}fetchStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{webrtc:i,debug:s}=this.player;if(this.player._times.streamStart=aa(),this.webrctUrl=e.replace("webrtc:",window.location.protocol),-1===this.webrctUrl.indexOf("/webrtc/play")&&this.player.isWebrtcForM7S()){const t=new URL(this.webrctUrl),i="/webrtc/play"+t.pathname;this.webrctUrl=t.origin+i+t.search,this.player.debug.log("WebrtcStream",`original url is ${e}, and new url is: ${this.webrctUrl}`)}i.loadSource(this.webrctUrl,t).then((()=>{this.player.debug.log("WebrtcStream","loadSource success"),this.emit(nt.streamSuccess)})).catch((e=>{this.player.debug.error("WebrtcStream","loadSource error",e),this.emit(ct.webrtcError,e)}))}getStreamType(){return m}}class yn extends So{constructor(e){super(),this.player=e,this.transport=null,this.wtUrl=null,this.streamRate=ha((t=>{e.emit(nt.kBps,(t/1024).toFixed(2))})),this.streamRateInterval=null,e.debug.log("WebTransportLoader","init")}async destroy(){return this.abort(),this.off(),this.player.debug.log("WebTransportLoader","destroy"),!0}startStreamRateInterval(){this.stopStreamRateInterval(),this.streamRateInterval=setInterval((()=>{this.streamRate&&this.streamRate(0)}),1e3)}stopStreamRateInterval(){this.streamRateInterval&&(clearInterval(this.streamRateInterval),this.streamRateInterval=null)}_createWebTransport(){const e=this.player,{debug:t,events:{proxy:i},demux:s}=e;try{this.transport=new WebTransport(this.wtUrl),this.transport.ready.then((()=>{this.emit(nt.streamSuccess),this.startStreamRateInterval(),this.transport.createBidirectionalStream().then((e=>{e.readable.pipeTo(new WritableStream(s.input))}))})).catch((e=>{this.player.debug.warn("WebTransportLoader","_createWebTransport-ready",e)}))}catch(e){this.player.debug.warn("WebTransportLoader","_createWebTransport",e)}}fetchStream(e){this.player._times.streamStart=aa(),this.wtUrl=e.replace(/^wt:/,"https:"),this._createWebTransport()}abort(){if(this.transport)try{this.transport.close(),this.transport=null}catch(e){this.transport=null}}getStreamType(){return g}}class An extends So{constructor(e){super(),this.player=e,this.workUrl=null,e.debug.log("WorkerStream","init")}async destroy(){return this.workUrl=null,this.off(),this.player.debug.log("WorkerStream","destroy"),!0}sendMessage(e){this.player.decoderWorker.workerSendMessage(e)}fetchStream(e){this.workUrl=e,this.player._times.streamStart=aa(),this.player.decoderWorker.workerFetchStream(e)}getStreamType(){const e=this.player._opt.protocol;return y+" "+(e===o?u:f)}}class bn extends So{constructor(e){super(),this.TAG_NAME="AliyunRtcLoader",this.player=e,e.debug.log(this.TAG_NAME,"init")}async destroy(){return this.off(),this.player.debug.log(this.TAG_NAME,"destroy"),!0}fetchStream(e){const{aliyunRtcDecoder:t}=this.player;this.player._times.streamStart=aa(),t.loadSource(e).then((()=>{this.player.debug.log(this.TAG_NAME,"loadSource success"),this.emit(nt.streamSuccess)})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource error",e),this.emit(ct.aliyunRtcError,e)}))}getStreamType(){return A}}class vn{constructor(e){return new(vn.getLoaderFactory(e._opt))(e)}static getLoaderFactory(e){const{protocol:t,useWasm:i,playType:s,useWCS:r,useMSE:c,demuxUseWorker:u,mainThreadFetchUseWorker:p}=e;return t===o?s===v?An:s===b?i&&!Za(e)||u?An:p?pn:un:r||c?u?An:p?pn:un:An:t===a?s===v?An:s===b?i&&!Za(e)||u?An:fn:r||c?u?An:fn:An:t===n?mn:t===l?gn:t===d?yn:t===h?bn:void 0}}var _n=Ir((function(e){function t(e,r){if(!e)throw"First parameter is required.";r=new i(e,r=r||{type:"video"});var a=this;function o(t){t&&(r.initCallback=function(){t(),t=r.initCallback=null});var i=new s(e,r);(p=new i(e,r)).record(),u("recording"),r.disableLogs||console.log("Initialized recorderType:",p.constructor.name,"for output-type:",r.type)}function n(e){if(e=e||function(){},p){if("paused"===a.state)return a.resumeRecording(),void setTimeout((function(){n(e)}),1);"recording"===a.state||r.disableLogs||console.warn('Recording state should be: "recording", however current state is: ',a.state),r.disableLogs||console.log("Stopped recording "+r.type+" stream."),"gif"!==r.type?p.stop(t):(p.stop(),t()),u("stopped")}else m();function t(t){if(p){Object.keys(p).forEach((function(e){"function"!=typeof p[e]&&(a[e]=p[e])}));var i=p.blob;if(!i){if(!t)throw"Recording failed.";p.blob=i=t}if(i&&!r.disableLogs&&console.log(i.type,"->",y(i.size)),e){var s;try{s=h.createObjectURL(i)}catch(e){}"function"==typeof e.call?e.call(a,s):e(s)}r.autoWriteToDisk&&d((function(e){var t={};t[r.type+"Blob"]=e,R.Store(t)}))}else"function"==typeof e.call?e.call(a,""):e("")}}function l(e){postMessage((new FileReaderSync).readAsDataURL(e))}function d(e,t){if(!e)throw"Pass a callback function over getDataURL.";var i=t?t.blob:(p||{}).blob;if(!i)return r.disableLogs||console.warn("Blob encoder did not finish its job yet."),void setTimeout((function(){d(e,t)}),1e3);if("undefined"==typeof Worker||navigator.mozGetUserMedia){var s=new FileReader;s.readAsDataURL(i),s.onload=function(t){e(t.target.result)}}else{var a=function(e){try{var t=h.createObjectURL(new Blob([e.toString(),"this.onmessage = function (eee) {"+e.name+"(eee.data);}"],{type:"application/javascript"})),i=new Worker(t);return h.revokeObjectURL(t),i}catch(e){}}(l);a.onmessage=function(t){e(t.data)},a.postMessage(i)}}function c(e){e=e||0,"paused"!==a.state?"stopped"!==a.state&&(e>=a.recordingDuration?n(a.onRecordingStopped):(e+=1e3,setTimeout((function(){c(e)}),1e3))):setTimeout((function(){c(e)}),1e3)}function u(e){a&&(a.state=e,"function"==typeof a.onStateChanged.call?a.onStateChanged.call(a,e):a.onStateChanged(e))}var p,f='It seems that recorder is destroyed or "startRecording" is not invoked for '+r.type+" recorder.";function m(){!0!==r.disableLogs&&console.warn(f)}var g={startRecording:function(t){return r.disableLogs||console.log("RecordRTC version: ",a.version),t&&(r=new i(e,t)),r.disableLogs||console.log("started recording "+r.type+" stream."),p?(p.clearRecordedData(),p.record(),u("recording"),a.recordingDuration&&c(),a):(o((function(){a.recordingDuration&&c()})),a)},stopRecording:n,pauseRecording:function(){p?"recording"===a.state?(u("paused"),p.pause(),r.disableLogs||console.log("Paused recording.")):r.disableLogs||console.warn("Unable to pause the recording. Recording state: ",a.state):m()},resumeRecording:function(){p?"paused"===a.state?(u("recording"),p.resume(),r.disableLogs||console.log("Resumed recording.")):r.disableLogs||console.warn("Unable to resume the recording. Recording state: ",a.state):m()},initRecorder:o,setRecordingDuration:function(e,t){if(void 0===e)throw"recordingDuration is required.";if("number"!=typeof e)throw"recordingDuration must be a number.";return a.recordingDuration=e,a.onRecordingStopped=t||function(){},{onRecordingStopped:function(e){a.onRecordingStopped=e}}},clearRecordedData:function(){p?(p.clearRecordedData(),r.disableLogs||console.log("Cleared old recorded data.")):m()},getBlob:function(){if(p)return p.blob;m()},getDataURL:d,toURL:function(){if(p)return h.createObjectURL(p.blob);m()},getInternalRecorder:function(){return p},save:function(e){p?A(p.blob,e):m()},getFromDisk:function(e){p?t.getFromDisk(r.type,e):m()},setAdvertisementArray:function(e){r.advertisement=[];for(var t=e.length,i=0;i<t;i++)r.advertisement.push({duration:i,image:e[i]})},blob:null,bufferSize:0,sampleRate:0,buffer:null,reset:function(){"recording"!==a.state||r.disableLogs||console.warn("Stop an active recorder."),p&&"function"==typeof p.clearRecordedData&&p.clearRecordedData(),p=null,u("inactive"),a.blob=null},onStateChanged:function(e){r.disableLogs||console.log("Recorder state changed:",e)},state:"inactive",getState:function(){return a.state},destroy:function(){var e=r.disableLogs;r={disableLogs:!0},a.reset(),u("destroyed"),g=a=null,S.AudioContextConstructor&&(S.AudioContextConstructor.close(),S.AudioContextConstructor=null),r.disableLogs=e,r.disableLogs||console.log("RecordRTC is destroyed.")},version:"5.6.2"};if(!this)return a=g,g;for(var b in g)this[b]=g[b];return a=this,g}function i(e,t){return t.recorderType||t.type||(t.audio&&t.video?t.type="video":t.audio&&!t.video&&(t.type="audio")),t.recorderType&&!t.type&&(t.recorderType===C||t.recorderType===k||t.recorderType===B?t.type="video":t.recorderType===D?t.type="gif":t.recorderType===T?t.type="audio":t.recorderType===E&&(v(e,"audio").length&&v(e,"video").length||!v(e,"audio").length&&v(e,"video").length?t.type="video":v(e,"audio").length&&!v(e,"video").length&&(t.type="audio"))),"undefined"!=typeof MediaRecorder&&"requestData"in MediaRecorder.prototype&&(t.mimeType||(t.mimeType="video/webm"),t.type||(t.type=t.mimeType.split("/")[0]),t.bitsPerSecond),t.type||(t.mimeType&&(t.type=t.mimeType.split("/")[0]),t.type||(t.type="audio")),t}function s(e,t){var i;return(f||c||u)&&(i=T),"undefined"!=typeof MediaRecorder&&"requestData"in MediaRecorder.prototype&&!f&&(i=E),"video"===t.type&&(f||u)&&(i=C,"undefined"!=typeof ReadableStream&&(i=B)),"gif"===t.type&&(i=D),"canvas"===t.type&&(i=k),w()&&i!==k&&i!==D&&"undefined"!=typeof MediaRecorder&&"requestData"in MediaRecorder.prototype&&(v(e,"video").length||v(e,"audio").length)&&("audio"===t.type?"function"==typeof MediaRecorder.isTypeSupported&&MediaRecorder.isTypeSupported("audio/webm")&&(i=E):"function"==typeof MediaRecorder.isTypeSupported&&MediaRecorder.isTypeSupported("video/webm")&&(i=E)),e instanceof Array&&e.length&&(i=P),t.recorderType&&(i=t.recorderType),!t.disableLogs&&i&&i.name&&console.log("Using recorderType:",i.name||i.constructor.name),!i&&m&&(i=E),i}function r(e){this.addStream=function(t){t&&(e=t)},this.mediaType={audio:!0,video:!0},this.startRecording=function(){var i,s=this.mediaType,r=this.mimeType||{audio:null,video:null,gif:null};if("function"!=typeof s.audio&&w()&&!v(e,"audio").length&&(s.audio=!1),"function"!=typeof s.video&&w()&&!v(e,"video").length&&(s.video=!1),"function"!=typeof s.gif&&w()&&!v(e,"video").length&&(s.gif=!1),!s.audio&&!s.video&&!s.gif)throw"MediaStream must have either audio or video tracks.";if(s.audio&&(i=null,"function"==typeof s.audio&&(i=s.audio),this.audioRecorder=new t(e,{type:"audio",bufferSize:this.bufferSize,sampleRate:this.sampleRate,numberOfAudioChannels:this.numberOfAudioChannels||2,disableLogs:this.disableLogs,recorderType:i,mimeType:r.audio,timeSlice:this.timeSlice,onTimeStamp:this.onTimeStamp}),s.video||this.audioRecorder.startRecording()),s.video){i=null,"function"==typeof s.video&&(i=s.video);var a=e;if(w()&&s.audio&&"function"==typeof s.audio){var o=v(e,"video")[0];p?((a=new g).addTrack(o),i&&i===C&&(i=E)):(a=new g).addTrack(o)}this.videoRecorder=new t(a,{type:"video",video:this.video,canvas:this.canvas,frameInterval:this.frameInterval||10,disableLogs:this.disableLogs,recorderType:i,mimeType:r.video,timeSlice:this.timeSlice,onTimeStamp:this.onTimeStamp,workerPath:this.workerPath,webAssemblyPath:this.webAssemblyPath,frameRate:this.frameRate,bitrate:this.bitrate}),s.audio||this.videoRecorder.startRecording()}if(s.audio&&s.video){var n=this,l=!0===w();(s.audio instanceof T&&s.video||!0!==s.audio&&!0!==s.video&&s.audio!==s.video)&&(l=!1),!0===l?(n.audioRecorder=null,n.videoRecorder.startRecording()):n.videoRecorder.initRecorder((function(){n.audioRecorder.initRecorder((function(){n.videoRecorder.startRecording(),n.audioRecorder.startRecording()}))}))}s.gif&&(i=null,"function"==typeof s.gif&&(i=s.gif),this.gifRecorder=new t(e,{type:"gif",frameRate:this.frameRate||200,quality:this.quality||10,disableLogs:this.disableLogs,recorderType:i,mimeType:r.gif}),this.gifRecorder.startRecording())},this.stopRecording=function(e){e=e||function(){},this.audioRecorder&&this.audioRecorder.stopRecording((function(t){e(t,"audio")})),this.videoRecorder&&this.videoRecorder.stopRecording((function(t){e(t,"video")})),this.gifRecorder&&this.gifRecorder.stopRecording((function(t){e(t,"gif")}))},this.pauseRecording=function(){this.audioRecorder&&this.audioRecorder.pauseRecording(),this.videoRecorder&&this.videoRecorder.pauseRecording(),this.gifRecorder&&this.gifRecorder.pauseRecording()},this.resumeRecording=function(){this.audioRecorder&&this.audioRecorder.resumeRecording(),this.videoRecorder&&this.videoRecorder.resumeRecording(),this.gifRecorder&&this.gifRecorder.resumeRecording()},this.getBlob=function(e){var t={};return this.audioRecorder&&(t.audio=this.audioRecorder.getBlob()),this.videoRecorder&&(t.video=this.videoRecorder.getBlob()),this.gifRecorder&&(t.gif=this.gifRecorder.getBlob()),e&&e(t),t},this.destroy=function(){this.audioRecorder&&(this.audioRecorder.destroy(),this.audioRecorder=null),this.videoRecorder&&(this.videoRecorder.destroy(),this.videoRecorder=null),this.gifRecorder&&(this.gifRecorder.destroy(),this.gifRecorder=null)},this.getDataURL=function(e){function t(e,t){if("undefined"!=typeof Worker){var i=function(e){var t,i=h.createObjectURL(new Blob([e.toString(),"this.onmessage = function (eee) {"+e.name+"(eee.data);}"],{type:"application/javascript"})),s=new Worker(i);if(void 0!==h)t=h;else{if("undefined"==typeof webkitURL)throw"Neither URL nor webkitURL detected.";t=webkitURL}return t.revokeObjectURL(i),s}((function(e){postMessage((new FileReaderSync).readAsDataURL(e))}));i.onmessage=function(e){t(e.data)},i.postMessage(e)}else{var s=new FileReader;s.readAsDataURL(e),s.onload=function(e){t(e.target.result)}}}this.getBlob((function(i){i.audio&&i.video?t(i.audio,(function(s){t(i.video,(function(t){e({audio:s,video:t})}))})):i.audio?t(i.audio,(function(t){e({audio:t})})):i.video&&t(i.video,(function(t){e({video:t})}))}))},this.writeToDisk=function(){t.writeToDisk({audio:this.audioRecorder,video:this.videoRecorder,gif:this.gifRecorder})},this.save=function(e){(e=e||{audio:!0,video:!0,gif:!0}).audio&&this.audioRecorder&&this.audioRecorder.save("string"==typeof e.audio?e.audio:""),e.video&&this.videoRecorder&&this.videoRecorder.save("string"==typeof e.video?e.video:""),e.gif&&this.gifRecorder&&this.gifRecorder.save("string"==typeof e.gif?e.gif:"")}}t.version="5.6.2",e.exports=t,t.getFromDisk=function(e,t){if(!t)throw"callback is mandatory.";console.log("Getting recorded "+("all"===e?"blobs":e+" blob ")+" from disk!"),R.Fetch((function(i,s){"all"!==e&&s===e+"Blob"&&t&&t(i),"all"===e&&t&&t(i,s.replace("Blob",""))}))},t.writeToDisk=function(e){console.log("Writing recorded blob(s) to disk!"),(e=e||{}).audio&&e.video&&e.gif?e.audio.getDataURL((function(t){e.video.getDataURL((function(i){e.gif.getDataURL((function(e){R.Store({audioBlob:t,videoBlob:i,gifBlob:e})}))}))})):e.audio&&e.video?e.audio.getDataURL((function(t){e.video.getDataURL((function(e){R.Store({audioBlob:t,videoBlob:e})}))})):e.audio&&e.gif?e.audio.getDataURL((function(t){e.gif.getDataURL((function(e){R.Store({audioBlob:t,gifBlob:e})}))})):e.video&&e.gif?e.video.getDataURL((function(t){e.gif.getDataURL((function(e){R.Store({videoBlob:t,gifBlob:e})}))})):e.audio?e.audio.getDataURL((function(e){R.Store({audioBlob:e})})):e.video?e.video.getDataURL((function(e){R.Store({videoBlob:e})})):e.gif&&e.gif.getDataURL((function(e){R.Store({gifBlob:e})}))},r.getFromDisk=t.getFromDisk,r.writeToDisk=t.writeToDisk,t.MRecordRTC=r;var a;(a=void 0!==Br?Br:null)&&"undefined"==typeof window&&void 0!==Br&&(Br.navigator={userAgent:"Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45",getUserMedia:function(){}},Br.console||(Br.console={}),void 0!==Br.console.log&&void 0!==Br.console.error||(Br.console.error=Br.console.log=Br.console.log||function(){console.log(arguments)}),"undefined"==typeof document&&(a.document={documentElement:{appendChild:function(){return""}}},document.createElement=document.captureStream=document.mozCaptureStream=function(){var e={getContext:function(){return e},play:function(){},pause:function(){},drawImage:function(){},toDataURL:function(){return""},style:{}};return e},a.HTMLVideoElement=function(){}),"undefined"==typeof location&&(a.location={protocol:"file:",href:"",hash:""}),"undefined"==typeof screen&&(a.screen={width:0,height:0}),void 0===h&&(a.URL={createObjectURL:function(){return""},revokeObjectURL:function(){return""}}),a.window=Br);var o=window.requestAnimationFrame;if(void 0===o)if("undefined"!=typeof webkitRequestAnimationFrame)o=webkitRequestAnimationFrame;else if("undefined"!=typeof mozRequestAnimationFrame)o=mozRequestAnimationFrame;else if("undefined"!=typeof msRequestAnimationFrame)o=msRequestAnimationFrame;else if(void 0===o){var n=0;o=function(e,t){var i=(new Date).getTime(),s=Math.max(0,16-(i-n)),r=setTimeout((function(){e(i+s)}),s);return n=i+s,r}}var l=window.cancelAnimationFrame;void 0===l&&("undefined"!=typeof webkitCancelAnimationFrame?l=webkitCancelAnimationFrame:"undefined"!=typeof mozCancelAnimationFrame?l=mozCancelAnimationFrame:"undefined"!=typeof msCancelAnimationFrame?l=msCancelAnimationFrame:void 0===l&&(l=function(e){clearTimeout(e)}));var d=window.AudioContext;void 0===d&&("undefined"!=typeof webkitAudioContext&&(d=webkitAudioContext),"undefined"!=typeof mozAudioContext&&(d=mozAudioContext));var h=window.URL;void 0===h&&"undefined"!=typeof webkitURL&&(h=webkitURL),"undefined"!=typeof navigator&&void 0===navigator.getUserMedia&&(void 0!==navigator.webkitGetUserMedia&&(navigator.getUserMedia=navigator.webkitGetUserMedia),void 0!==navigator.mozGetUserMedia&&(navigator.getUserMedia=navigator.mozGetUserMedia));var c=!(-1===navigator.userAgent.indexOf("Edge")||!navigator.msSaveBlob&&!navigator.msSaveOrOpenBlob),u=!!window.opera||-1!==navigator.userAgent.indexOf("OPR/"),p=navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&"netscape"in window&&/ rv:/.test(navigator.userAgent),f=!u&&!c&&!!navigator.webkitGetUserMedia||b()||-1!==navigator.userAgent.toLowerCase().indexOf("chrome/"),m=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);m&&!f&&-1!==navigator.userAgent.indexOf("CriOS")&&(m=!1,f=!0);var g=window.MediaStream;function y(e){if(0===e)return"0 Bytes";var t=parseInt(Math.floor(Math.log(e)/Math.log(1e3)),10);return(e/Math.pow(1e3,t)).toPrecision(3)+" "+["Bytes","KB","MB","GB","TB"][t]}function A(e,t){if(!e)throw"Blob object is required.";if(!e.type)try{e.type="video/webm"}catch(e){}var i=(e.type||"video/webm").split("/")[1];if(-1!==i.indexOf(";")&&(i=i.split(";")[0]),t&&-1!==t.indexOf(".")){var s=t.split(".");t=s[0],i=s[1]}var r=(t||Math.round(9999999999*Math.random())+888888888)+"."+i;if(void 0!==navigator.msSaveOrOpenBlob)return navigator.msSaveOrOpenBlob(e,r);if(void 0!==navigator.msSaveBlob)return navigator.msSaveBlob(e,r);var a=document.createElement("a");a.href=h.createObjectURL(e),a.download=r,a.style="display:none;opacity:0;color:transparent;",(document.body||document.documentElement).appendChild(a),"function"==typeof a.click?a.click():(a.target="_blank",a.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0}))),h.revokeObjectURL(a.href)}function b(){return"undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type||(!("undefined"==typeof process||"object"!=typeof process.versions||!process.versions.electron)||"object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Electron")>=0)}function v(e,t){return e&&e.getTracks?e.getTracks().filter((function(e){return e.kind===(t||"audio")})):[]}function _(e,t){"srcObject"in t?t.srcObject=e:"mozSrcObject"in t?t.mozSrcObject=e:t.srcObject=e}void 0===g&&"undefined"!=typeof webkitMediaStream&&(g=webkitMediaStream),void 0!==g&&void 0===g.prototype.stop&&(g.prototype.stop=function(){this.getTracks().forEach((function(e){e.stop()}))}),t.invokeSaveAsDialog=A,t.getTracks=v,t.getSeekableBlob=function(e,t){if("undefined"==typeof EBML)throw new Error("Please link: https://www.webrtc-experiment.com/EBML.js");var i=new EBML.Reader,s=new EBML.Decoder,r=EBML.tools,a=new FileReader;a.onload=function(e){s.decode(this.result).forEach((function(e){i.read(e)})),i.stop();var a=r.makeMetadataSeekable(i.metadatas,i.duration,i.cues),o=this.result.slice(i.metadataSize),n=new Blob([a,o],{type:"video/webm"});t(n)},a.readAsArrayBuffer(e)},t.bytesToSize=y,t.isElectron=b;var S={};function w(){if(p||m||c)return!0;var e,t,i=navigator.userAgent,s=""+parseFloat(navigator.appVersion),r=parseInt(navigator.appVersion,10);return(f||u)&&(e=i.indexOf("Chrome"),s=i.substring(e+7)),-1!==(t=s.indexOf(";"))&&(s=s.substring(0,t)),-1!==(t=s.indexOf(" "))&&(s=s.substring(0,t)),r=parseInt(""+s,10),isNaN(r)&&(s=""+parseFloat(navigator.appVersion),r=parseInt(navigator.appVersion,10)),r>=49}function E(e,t){var i=this;if(void 0===e)throw'First argument "MediaStream" is required.';if("undefined"==typeof MediaRecorder)throw"Your browser does not support the Media Recorder API. Please try other modules e.g. WhammyRecorder or StereoAudioRecorder.";if("audio"===(t=t||{mimeType:"video/webm"}).type){var s;if(v(e,"video").length&&v(e,"audio").length)navigator.mozGetUserMedia?(s=new g).addTrack(v(e,"audio")[0]):s=new g(v(e,"audio")),e=s;t.mimeType&&-1!==t.mimeType.toString().toLowerCase().indexOf("audio")||(t.mimeType=f?"audio/webm":"audio/ogg"),t.mimeType&&"audio/ogg"!==t.mimeType.toString().toLowerCase()&&navigator.mozGetUserMedia&&(t.mimeType="audio/ogg")}var r,a=[];function o(){i.timestamps.push((new Date).getTime()),"function"==typeof t.onTimeStamp&&t.onTimeStamp(i.timestamps[i.timestamps.length-1],i.timestamps)}function n(e){return r&&r.mimeType?r.mimeType:e.mimeType||"video/webm"}function l(){a=[],r=null,i.timestamps=[]}this.getArrayOfBlobs=function(){return a},this.record=function(){i.blob=null,i.clearRecordedData(),i.timestamps=[],d=[],a=[];var s=t;t.disableLogs||console.log("Passing following config over MediaRecorder API.",s),r&&(r=null),f&&!w()&&(s="video/vp8"),"function"==typeof MediaRecorder.isTypeSupported&&s.mimeType&&(MediaRecorder.isTypeSupported(s.mimeType)||(t.disableLogs||console.warn("MediaRecorder API seems unable to record mimeType:",s.mimeType),s.mimeType="audio"===t.type?"audio/webm":"video/webm"));try{r=new MediaRecorder(e,s),t.mimeType=s.mimeType}catch(t){r=new MediaRecorder(e)}s.mimeType&&!MediaRecorder.isTypeSupported&&"canRecordMimeType"in r&&!1===r.canRecordMimeType(s.mimeType)&&(t.disableLogs||console.warn("MediaRecorder API seems unable to record mimeType:",s.mimeType)),r.ondataavailable=function(e){if(e.data&&d.push("ondataavailable: "+y(e.data.size)),"number"!=typeof t.timeSlice)!e.data||!e.data.size||e.data.size<100||i.blob?i.recordingCallback&&(i.recordingCallback(new Blob([],{type:n(s)})),i.recordingCallback=null):(i.blob=t.getNativeBlob?e.data:new Blob([e.data],{type:n(s)}),i.recordingCallback&&(i.recordingCallback(i.blob),i.recordingCallback=null));else if(e.data&&e.data.size&&(a.push(e.data),o(),"function"==typeof t.ondataavailable)){var r=t.getNativeBlob?e.data:new Blob([e.data],{type:n(s)});t.ondataavailable(r)}},r.onstart=function(){d.push("started")},r.onpause=function(){d.push("paused")},r.onresume=function(){d.push("resumed")},r.onstop=function(){d.push("stopped")},r.onerror=function(e){e&&(e.name||(e.name="UnknownError"),d.push("error: "+e),t.disableLogs||(-1!==e.name.toString().toLowerCase().indexOf("invalidstate")?console.error("The MediaRecorder is not in a state in which the proposed operation is allowed to be executed.",e):-1!==e.name.toString().toLowerCase().indexOf("notsupported")?console.error("MIME type (",s.mimeType,") is not supported.",e):-1!==e.name.toString().toLowerCase().indexOf("security")?console.error("MediaRecorder security error",e):"OutOfMemory"===e.name?console.error("The UA has exhaused the available memory. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"IllegalStreamModification"===e.name?console.error("A modification to the stream has occurred that makes it impossible to continue recording. An example would be the addition of a Track while recording is occurring. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"OtherRecordingError"===e.name?console.error("Used for an fatal error other than those listed above. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"GenericError"===e.name?console.error("The UA cannot provide the codec or recording option that has been requested.",e):console.error("MediaRecorder Error",e)),function(e){if(!i.manuallyStopped&&r&&"inactive"===r.state)return delete t.timeslice,void r.start(6e5);setTimeout(void 0,1e3)}(),"inactive"!==r.state&&"stopped"!==r.state&&r.stop())},"number"==typeof t.timeSlice?(o(),r.start(t.timeSlice)):r.start(36e5),t.initCallback&&t.initCallback()},this.timestamps=[],this.stop=function(e){e=e||function(){},i.manuallyStopped=!0,r&&(this.recordingCallback=e,"recording"===r.state&&r.stop(),"number"==typeof t.timeSlice&&setTimeout((function(){i.blob=new Blob(a,{type:n(t)}),i.recordingCallback(i.blob)}),100))},this.pause=function(){r&&"recording"===r.state&&r.pause()},this.resume=function(){r&&"paused"===r.state&&r.resume()},this.clearRecordedData=function(){r&&"recording"===r.state&&i.stop(l),l()},this.getInternalRecorder=function(){return r},this.blob=null,this.getState=function(){return r&&r.state||"inactive"};var d=[];this.getAllStates=function(){return d},void 0===t.checkForInactiveTracks&&(t.checkForInactiveTracks=!1);i=this;!function s(){if(r&&!1!==t.checkForInactiveTracks)return!1===function(){if("active"in e){if(!e.active)return!1}else if("ended"in e&&e.ended)return!1;return!0}()?(t.disableLogs||console.log("MediaStream seems stopped."),void i.stop()):void setTimeout(s,1e3)}(),this.name="MediaStreamRecorder",this.toString=function(){return this.name}}function T(e,i){if(!v(e,"audio").length)throw"Your stream has no audio tracks.";var s,r=this,a=[],o=[],n=!1,l=0,d=2,c=(i=i||{}).desiredSampRate;function u(){if(!1===i.checkForInactiveTracks)return!0;if("active"in e){if(!e.active)return!1}else if("ended"in e&&e.ended)return!1;return!0}function p(e,t){function i(e,t){var i,s=e.numberOfAudioChannels,r=e.leftBuffers.slice(0),a=e.rightBuffers.slice(0),o=e.sampleRate,n=e.internalInterleavedLength,l=e.desiredSampRate;function d(e,t,i){var s=Math.round(e.length*(t/i)),r=[],a=Number((e.length-1)/(s-1));r[0]=e[0];for(var o=1;o<s-1;o++){var n=o*a,l=Number(Math.floor(n)).toFixed(),d=Number(Math.ceil(n)).toFixed(),c=n-l;r[o]=h(e[l],e[d],c)}return r[s-1]=e[e.length-1],r}function h(e,t,i){return e+(t-e)*i}function c(e,t){for(var i=new Float64Array(t),s=0,r=e.length,a=0;a<r;a++){var o=e[a];i.set(o,s),s+=o.length}return i}function u(e,t,i){for(var s=i.length,r=0;r<s;r++)e.setUint8(t+r,i.charCodeAt(r))}2===s&&(r=c(r,n),a=c(a,n),l&&(r=d(r,l,o),a=d(a,l,o))),1===s&&(r=c(r,n),l&&(r=d(r,l,o))),l&&(o=l),2===s&&(i=function(e,t){for(var i=e.length+t.length,s=new Float64Array(i),r=0,a=0;a<i;)s[a++]=e[r],s[a++]=t[r],r++;return s}(r,a)),1===s&&(i=r);var p=i.length,f=new ArrayBuffer(44+2*p),m=new DataView(f);u(m,0,"RIFF"),m.setUint32(4,36+2*p,!0),u(m,8,"WAVE"),u(m,12,"fmt "),m.setUint32(16,16,!0),m.setUint16(20,1,!0),m.setUint16(22,s,!0),m.setUint32(24,o,!0),m.setUint32(28,o*s*2,!0),m.setUint16(32,2*s,!0),m.setUint16(34,16,!0),u(m,36,"data"),m.setUint32(40,2*p,!0);for(var g=p,y=44,A=0;A<g;A++)m.setInt16(y,32767*i[A],!0),y+=2;if(t)return t({buffer:f,view:m});postMessage({buffer:f,view:m})}if(e.noWorker)i(e,(function(e){t(e.buffer,e.view)}));else{var s,r,a,o=(s=i,r=h.createObjectURL(new Blob([s.toString(),";this.onmessage = function (eee) {"+s.name+"(eee.data);}"],{type:"application/javascript"})),(a=new Worker(r)).workerURL=r,a);o.onmessage=function(e){t(e.data.buffer,e.data.view),h.revokeObjectURL(o.workerURL),o.terminate()},o.postMessage(e)}}!0===i.leftChannel&&(d=1),1===i.numberOfAudioChannels&&(d=1),(!d||d<1)&&(d=2),i.disableLogs||console.log("StereoAudioRecorder is set to record number of channels: "+d),void 0===i.checkForInactiveTracks&&(i.checkForInactiveTracks=!0),this.record=function(){if(!1===u())throw"Please make sure MediaStream is active.";_(),w=b=!1,n=!0,void 0!==i.timeSlice&&T()},this.stop=function(e){e=e||function(){},n=!1,p({desiredSampRate:c,sampleRate:A,numberOfAudioChannels:d,internalInterleavedLength:l,leftBuffers:a,rightBuffers:1===d?[]:o,noWorker:i.noWorker},(function(t,i){r.blob=new Blob([i],{type:"audio/wav"}),r.buffer=new ArrayBuffer(i.buffer.byteLength),r.view=i,r.sampleRate=c||A,r.bufferSize=y,r.length=l,w=!1,e&&e(r.blob)}))},void 0===t.Storage&&(t.Storage={AudioContextConstructor:null,AudioContext:window.AudioContext||window.webkitAudioContext}),t.Storage.AudioContextConstructor&&"closed"!==t.Storage.AudioContextConstructor.state||(t.Storage.AudioContextConstructor=new t.Storage.AudioContext);var f=t.Storage.AudioContextConstructor,m=f.createMediaStreamSource(e),g=[0,256,512,1024,2048,4096,8192,16384],y=void 0===i.bufferSize?4096:i.bufferSize;if(-1===g.indexOf(y)&&(i.disableLogs||console.log("Legal values for buffer-size are "+JSON.stringify(g,null,"\t"))),f.createJavaScriptNode)s=f.createJavaScriptNode(y,d,d);else{if(!f.createScriptProcessor)throw"WebAudio API has no support on this browser.";s=f.createScriptProcessor(y,d,d)}m.connect(s),i.bufferSize||(y=s.bufferSize);var A=void 0!==i.sampleRate?i.sampleRate:f.sampleRate||44100;(A<22050||A>96e3)&&(i.disableLogs||console.log("sample-rate must be under range 22050 and 96000.")),i.disableLogs||i.desiredSampRate&&console.log("Desired sample-rate: "+i.desiredSampRate);var b=!1;function _(){a=[],o=[],l=0,w=!1,n=!1,b=!1,f=null,r.leftchannel=a,r.rightchannel=o,r.numberOfAudioChannels=d,r.desiredSampRate=c,r.sampleRate=A,r.recordingLength=l,E={left:[],right:[],recordingLength:0}}function S(){s&&(s.onaudioprocess=null,s.disconnect(),s=null),m&&(m.disconnect(),m=null),_()}this.pause=function(){b=!0},this.resume=function(){if(!1===u())throw"Please make sure MediaStream is active.";if(!n)return i.disableLogs||console.log("Seems recording has been restarted."),void this.record();b=!1},this.clearRecordedData=function(){i.checkForInactiveTracks=!1,n&&this.stop(S),S()},this.name="StereoAudioRecorder",this.toString=function(){return this.name};var w=!1;s.onaudioprocess=function(e){if(!b)if(!1===u()&&(i.disableLogs||console.log("MediaStream seems stopped."),s.disconnect(),n=!1),n){w||(w=!0,i.onAudioProcessStarted&&i.onAudioProcessStarted(),i.initCallback&&i.initCallback());var t=e.inputBuffer.getChannelData(0),h=new Float32Array(t);if(a.push(h),2===d){var c=e.inputBuffer.getChannelData(1),p=new Float32Array(c);o.push(p)}l+=y,r.recordingLength=l,void 0!==i.timeSlice&&(E.recordingLength+=y,E.left.push(h),2===d&&E.right.push(p))}else m&&(m.disconnect(),m=null)},f.createMediaStreamDestination?s.connect(f.createMediaStreamDestination()):s.connect(f.destination),this.leftchannel=a,this.rightchannel=o,this.numberOfAudioChannels=d,this.desiredSampRate=c,this.sampleRate=A,r.recordingLength=l;var E={left:[],right:[],recordingLength:0};function T(){n&&"function"==typeof i.ondataavailable&&void 0!==i.timeSlice&&(E.left.length?(p({desiredSampRate:c,sampleRate:A,numberOfAudioChannels:d,internalInterleavedLength:E.recordingLength,leftBuffers:E.left,rightBuffers:1===d?[]:E.right},(function(e,t){var s=new Blob([t],{type:"audio/wav"});i.ondataavailable(s),setTimeout(T,i.timeSlice)})),E={left:[],right:[],recordingLength:0}):setTimeout(T,i.timeSlice))}}function k(e,t){if("undefined"==typeof html2canvas)throw"Please link: https://www.webrtc-experiment.com/screenshot.js";(t=t||{}).frameInterval||(t.frameInterval=10);var i=!1;["captureStream","mozCaptureStream","webkitCaptureStream"].forEach((function(e){e in document.createElement("canvas")&&(i=!0)}));var s,r,a,o=!(!window.webkitRTCPeerConnection&&!window.webkitGetUserMedia||!window.chrome),n=50,l=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);if(o&&l&&l[2]&&(n=parseInt(l[2],10)),o&&n<52&&(i=!1),t.useWhammyRecorder&&(i=!1),i)if(t.disableLogs||console.log("Your browser supports both MediRecorder API and canvas.captureStream!"),e instanceof HTMLCanvasElement)s=e;else{if(!(e instanceof CanvasRenderingContext2D))throw"Please pass either HTMLCanvasElement or CanvasRenderingContext2D.";s=e.canvas}else navigator.mozGetUserMedia&&(t.disableLogs||console.error("Canvas recording is NOT supported in Firefox."));this.record=function(){if(a=!0,i&&!t.useWhammyRecorder){var e;"captureStream"in s?e=s.captureStream(25):"mozCaptureStream"in s?e=s.mozCaptureStream(25):"webkitCaptureStream"in s&&(e=s.webkitCaptureStream(25));try{var o=new g;o.addTrack(v(e,"video")[0]),e=o}catch(e){}if(!e)throw"captureStream API are NOT available.";(r=new E(e,{mimeType:t.mimeType||"video/webm"})).record()}else p.frames=[],u=(new Date).getTime(),c();t.initCallback&&t.initCallback()},this.getWebPImages=function(i){if("canvas"===e.nodeName.toLowerCase()){var s=p.frames.length;p.frames.forEach((function(e,i){var r=s-i;t.disableLogs||console.log(r+"/"+s+" frames remaining"),t.onEncodingCallback&&t.onEncodingCallback(r,s);var a=e.image.toDataURL("image/webp",1);p.frames[i].image=a})),t.disableLogs||console.log("Generating WebM"),i()}else i()},this.stop=function(e){a=!1;var s=this;i&&r?r.stop(e):this.getWebPImages((function(){p.compile((function(i){t.disableLogs||console.log("Recording finished!"),s.blob=i,s.blob.forEach&&(s.blob=new Blob([],{type:"video/webm"})),e&&e(s.blob),p.frames=[]}))}))};var d=!1;function h(){p.frames=[],a=!1,d=!1}function c(){if(d)return u=(new Date).getTime(),setTimeout(c,500);if("canvas"===e.nodeName.toLowerCase()){var i=(new Date).getTime()-u;return u=(new Date).getTime(),p.frames.push({image:(s=document.createElement("canvas"),r=s.getContext("2d"),s.width=e.width,s.height=e.height,r.drawImage(e,0,0),s),duration:i}),void(a&&setTimeout(c,t.frameInterval))}var s,r;html2canvas(e,{grabMouse:void 0===t.showMousePointer||t.showMousePointer,onrendered:function(e){var i=(new Date).getTime()-u;if(!i)return setTimeout(c,t.frameInterval);u=(new Date).getTime(),p.frames.push({image:e.toDataURL("image/webp",1),duration:i}),a&&setTimeout(c,t.frameInterval)}})}this.pause=function(){d=!0,r instanceof E&&r.pause()},this.resume=function(){d=!1,r instanceof E?r.resume():a||this.record()},this.clearRecordedData=function(){a&&this.stop(h),h()},this.name="CanvasRecorder",this.toString=function(){return this.name};var u=(new Date).getTime(),p=new x.Video(100)}function C(e,t){function i(e){e=void 0!==e?e:10;var t=(new Date).getTime()-l;return t?a?(l=(new Date).getTime(),setTimeout(i,100)):(l=(new Date).getTime(),n.paused&&n.play(),c.drawImage(n,0,0,h.width,h.height),d.frames.push({duration:t,image:h.toDataURL("image/webp")}),void(r||setTimeout(i,e,e))):setTimeout(i,e,e)}function s(e,t,i,s,r){var a=document.createElement("canvas");a.width=h.width,a.height=h.height;var o=a.getContext("2d"),n=[],l=-1===t,d=t&&t>0&&t<=e.length?t:e.length,c=0,u=0,p=0,f=Math.sqrt(Math.pow(255,2)+Math.pow(255,2)+Math.pow(255,2)),m=i&&i>=0&&i<=1?i:0,g=s&&s>=0&&s<=1?s:0,y=!1;!function(e){var t=-1,i=e.length;!function s(){++t!==i?setTimeout((function(){e.functionToLoop(s,t)}),1):e.callback()}()}({length:d,functionToLoop:function(t,i){var s,r,a,d=function(){!y&&a-s<=a*g||(l&&(y=!0),n.push(e[i])),t()};if(y)d();else{var A=new Image;A.onload=function(){o.drawImage(A,0,0,h.width,h.height);var e=o.getImageData(0,0,h.width,h.height);s=0,r=e.data.length,a=e.data.length/4;for(var t=0;t<r;t+=4){var i={r:e.data[t],g:e.data[t+1],b:e.data[t+2]};Math.sqrt(Math.pow(i.r-c,2)+Math.pow(i.g-u,2)+Math.pow(i.b-p,2))<=f*m&&s++}d()},A.src=e[i].image}},callback:function(){(n=n.concat(e.slice(d))).length<=0&&n.push(e[e.length-1]),r(n)}})}(t=t||{}).frameInterval||(t.frameInterval=10),t.disableLogs||console.log("Using frames-interval:",t.frameInterval),this.record=function(){t.width||(t.width=320),t.height||(t.height=240),t.video||(t.video={width:t.width,height:t.height}),t.canvas||(t.canvas={width:t.width,height:t.height}),h.width=t.canvas.width||320,h.height=t.canvas.height||240,c=h.getContext("2d"),t.video&&t.video instanceof HTMLVideoElement?(n=t.video.cloneNode(),t.initCallback&&t.initCallback()):(n=document.createElement("video"),_(e,n),n.onloadedmetadata=function(){t.initCallback&&t.initCallback()},n.width=t.video.width,n.height=t.video.height),n.muted=!0,n.play(),l=(new Date).getTime(),d=new x.Video,t.disableLogs||(console.log("canvas resolutions",h.width,"*",h.height),console.log("video width/height",n.width||h.width,"*",n.height||h.height)),i(t.frameInterval)};var r=!1;this.stop=function(e){e=e||function(){},r=!0;var i=this;setTimeout((function(){s(d.frames,-1,null,null,(function(s){d.frames=s,t.advertisement&&t.advertisement.length&&(d.frames=t.advertisement.concat(d.frames)),d.compile((function(t){i.blob=t,i.blob.forEach&&(i.blob=new Blob([],{type:"video/webm"})),e&&e(i.blob)}))}))}),10)};var a=!1;function o(){d.frames=[],r=!0,a=!1}this.pause=function(){a=!0},this.resume=function(){a=!1,r&&this.record()},this.clearRecordedData=function(){r||this.stop(o),o()},this.name="WhammyRecorder",this.toString=function(){return this.name};var n,l,d,h=document.createElement("canvas"),c=h.getContext("2d")}void 0!==d?S.AudioContext=d:"undefined"!=typeof webkitAudioContext&&(S.AudioContext=webkitAudioContext),t.Storage=S,t.MediaStreamRecorder=E,t.StereoAudioRecorder=T,t.CanvasRecorder=k,t.WhammyRecorder=C;var x=function(){function e(e){this.frames=[],this.duration=e||1,this.quality=.8}function t(e){function t(e,t,i){return[{data:e,id:231}].concat(i.map((function(e){var i=function(e){var t=0;e.keyframe&&(t|=128);e.invisible&&(t|=8);e.lacing&&(t|=e.lacing<<1);e.discardable&&(t|=1);if(e.trackNum>127)throw"TrackNumber > 127 not supported";return[128|e.trackNum,e.timecode>>8,255&e.timecode,t].map((function(e){return String.fromCharCode(e)})).join("")+e.frame}({discardable:0,frame:e.data.slice(4),invisible:0,keyframe:1,lacing:0,trackNum:1,timecode:Math.round(t)});return t+=e.duration,{data:i,id:163}})))}function i(e){for(var t=[];e>0;)t.push(255&e),e>>=8;return new Uint8Array(t.reverse())}function s(e){var t=[];e=(e.length%8?new Array(9-e.length%8).join("0"):"")+e;for(var i=0;i<e.length;i+=8)t.push(parseInt(e.substr(i,8),2));return new Uint8Array(t)}function r(e){for(var t=[],a=0;a<e.length;a++){var o=e[a].data;"object"==typeof o&&(o=r(o)),"number"==typeof o&&(o=s(o.toString(2))),"string"==typeof o&&(o=new Uint8Array(o.split("").map((function(e){return e.charCodeAt(0)}))));var n=o.size||o.byteLength||o.length,l=Math.ceil(Math.ceil(Math.log(n)/Math.log(2))/8),d=n.toString(2),h=new Array(7*l+7+1-d.length).join("0")+d,c=new Array(l).join("0")+"1"+h;t.push(i(e[a].id)),t.push(s(c)),t.push(o)}return new Blob(t,{type:"video/webm"})}function a(e,t){return parseInt(e.substr(t+4,4).split("").map((function(e){var t=e.charCodeAt(0).toString(2);return new Array(8-t.length+1).join("0")+t})).join(""),2)}function o(e){for(var t=0,i={};t<e.length;){var s=e.substr(t,4),r=a(e,t),n=e.substr(t+4+4,r);t+=8+r,i[s]=i[s]||[],"RIFF"===s||"LIST"===s?i[s].push(o(n)):i[s].push(n)}return i}var n=new function(e){var i=function(e){if(!e[0])return void postMessage({error:"Something went wrong. Maybe WebP format is not supported in the current browser."});for(var t=e[0].width,i=e[0].height,s=e[0].duration,r=1;r<e.length;r++)s+=e[r].duration;return{duration:s,width:t,height:i}}(e);if(!i)return[];for(var s,a=[{id:440786851,data:[{data:1,id:17030},{data:1,id:17143},{data:4,id:17138},{data:8,id:17139},{data:"webm",id:17026},{data:2,id:17031},{data:2,id:17029}]},{id:408125543,data:[{id:357149030,data:[{data:1e6,id:2807729},{data:"whammy",id:19840},{data:"whammy",id:22337},{data:(s=i.duration,[].slice.call(new Uint8Array(new Float64Array([s]).buffer),0).map((function(e){return String.fromCharCode(e)})).reverse().join("")),id:17545}]},{id:374648427,data:[{id:174,data:[{data:1,id:215},{data:1,id:29637},{data:0,id:156},{data:"und",id:2274716},{data:"V_VP8",id:134},{data:"VP8",id:2459272},{data:1,id:131},{id:224,data:[{data:i.width,id:176},{data:i.height,id:186}]}]}]}]}],o=0,n=0;o<e.length;){var l=[],d=0;do{l.push(e[o]),d+=e[o].duration,o++}while(o<e.length&&d<3e4);var h={id:524531317,data:t(n,0,l)};a[1].data.push(h),n+=d}return r(a)}(e.map((function(e){var t=function(e){for(var t=e.RIFF[0].WEBP[0],i=t.indexOf("*"),s=0,r=[];s<4;s++)r[s]=t.charCodeAt(i+3+s);return{width:16383&(r[1]<<8|r[0]),height:16383&(r[3]<<8|r[2]),data:t,riff:e}}(o(atob(e.image.slice(23))));return t.duration=e.duration,t})));postMessage(n)}return e.prototype.add=function(e,t){if("canvas"in e&&(e=e.canvas),"toDataURL"in e&&(e=e.toDataURL("image/webp",this.quality)),!/^data:image\/webp;base64,/gi.test(e))throw"Input must be formatted properly as a base64 encoded DataURI of type image/webp";this.frames.push({image:e,duration:t||this.duration})},e.prototype.compile=function(e){var i,s,r,a=(i=t,s=h.createObjectURL(new Blob([i.toString(),"this.onmessage = function (eee) {"+i.name+"(eee.data);}"],{type:"application/javascript"})),r=new Worker(s),h.revokeObjectURL(s),r);a.onmessage=function(t){t.data.error?console.error(t.data.error):e(t.data)},a.postMessage(this.frames)},{Video:e}}();t.Whammy=x;var R={init:function(){var e=this;if("undefined"!=typeof indexedDB&&void 0!==indexedDB.open){var t,i=this.dbName||location.href.replace(/\/|:|#|%|\.|\[|\]/g,""),s=indexedDB.open(i,1);s.onerror=e.onError,s.onsuccess=function(){((t=s.result).onerror=e.onError,t.setVersion)?1!==t.version?t.setVersion(1).onsuccess=function(){r(t),a()}:a():a()},s.onupgradeneeded=function(e){r(e.target.result)}}else console.error("IndexedDB API are not available in this browser.");function r(t){t.createObjectStore(e.dataStoreName)}function a(){var i=t.transaction([e.dataStoreName],"readwrite");function s(t){i.objectStore(e.dataStoreName).get(t).onsuccess=function(i){e.callback&&e.callback(i.target.result,t)}}e.videoBlob&&i.objectStore(e.dataStoreName).put(e.videoBlob,"videoBlob"),e.gifBlob&&i.objectStore(e.dataStoreName).put(e.gifBlob,"gifBlob"),e.audioBlob&&i.objectStore(e.dataStoreName).put(e.audioBlob,"audioBlob"),s("audioBlob"),s("videoBlob"),s("gifBlob")}},Fetch:function(e){return this.callback=e,this.init(),this},Store:function(e){return this.audioBlob=e.audioBlob,this.videoBlob=e.videoBlob,this.gifBlob=e.gifBlob,this.init(),this},onError:function(e){console.error(JSON.stringify(e,null,"\t"))},dataStoreName:"recordRTC",dbName:null};function D(e,t){if("undefined"==typeof GIFEncoder){var i=document.createElement("script");i.src="https://www.webrtc-experiment.com/gif-recorder.js",(document.body||document.documentElement).appendChild(i)}t=t||{};var s=e instanceof CanvasRenderingContext2D||e instanceof HTMLCanvasElement;this.record=function(){"undefined"!=typeof GIFEncoder&&d?(s||(t.width||(t.width=h.offsetWidth||320),t.height||(t.height=h.offsetHeight||240),t.video||(t.video={width:t.width,height:t.height}),t.canvas||(t.canvas={width:t.width,height:t.height}),a.width=t.canvas.width||320,a.height=t.canvas.height||240,h.width=t.video.width||320,h.height=t.video.height||240),(u=new GIFEncoder).setRepeat(0),u.setDelay(t.frameRate||200),u.setQuality(t.quality||10),u.start(),"function"==typeof t.onGifRecordingStarted&&t.onGifRecordingStarted(),p=o((function e(i){if(!0!==f.clearedRecordedData){if(r)return setTimeout((function(){e(i)}),100);p=o(e),void 0===typeof c&&(c=i),i-c<90||(!s&&h.paused&&h.play(),s||n.drawImage(h,0,0,a.width,a.height),t.onGifPreview&&t.onGifPreview(a.toDataURL("image/png")),u.addFrame(n),c=i)}})),t.initCallback&&t.initCallback()):setTimeout(f.record,1e3)},this.stop=function(e){e=e||function(){},p&&l(p),this.blob=new Blob([new Uint8Array(u.stream().bin)],{type:"image/gif"}),e(this.blob),u.stream().bin=[]};var r=!1;this.pause=function(){r=!0},this.resume=function(){r=!1},this.clearRecordedData=function(){f.clearedRecordedData=!0,u&&(u.stream().bin=[])},this.name="GifRecorder",this.toString=function(){return this.name};var a=document.createElement("canvas"),n=a.getContext("2d");s&&(e instanceof CanvasRenderingContext2D?a=(n=e).canvas:e instanceof HTMLCanvasElement&&(n=e.getContext("2d"),a=e));var d=!0;if(!s){var h=document.createElement("video");h.muted=!0,h.autoplay=!0,h.playsInline=!0,d=!1,h.onloadedmetadata=function(){d=!0},_(e,h),h.play()}var c,u,p=null,f=this}function L(e,t){t=t||"multi-streams-mixer";var i=[],s=!1,r=document.createElement("canvas"),a=r.getContext("2d");r.style.opacity=0,r.style.position="absolute",r.style.zIndex=-1,r.style.top="-1000em",r.style.left="-1000em",r.className=t,(document.body||document.documentElement).appendChild(r),this.disableLogs=!1,this.frameInterval=10,this.width=360,this.height=240,this.useGainNode=!0;var o=this,n=window.AudioContext;void 0===n&&("undefined"!=typeof webkitAudioContext&&(n=webkitAudioContext),"undefined"!=typeof mozAudioContext&&(n=mozAudioContext));var l=window.URL;void 0===l&&"undefined"!=typeof webkitURL&&(l=webkitURL),"undefined"!=typeof navigator&&void 0===navigator.getUserMedia&&(void 0!==navigator.webkitGetUserMedia&&(navigator.getUserMedia=navigator.webkitGetUserMedia),void 0!==navigator.mozGetUserMedia&&(navigator.getUserMedia=navigator.mozGetUserMedia));var d=window.MediaStream;void 0===d&&"undefined"!=typeof webkitMediaStream&&(d=webkitMediaStream),void 0!==d&&void 0===d.prototype.stop&&(d.prototype.stop=function(){this.getTracks().forEach((function(e){e.stop()}))});var h={};function c(){if(!s){var e=i.length,t=!1,a=[];if(i.forEach((function(e){e.stream||(e.stream={}),e.stream.fullcanvas?t=e:a.push(e)})),t)r.width=t.stream.width,r.height=t.stream.height;else if(a.length){r.width=e>1?2*a[0].width:a[0].width;var n=1;3!==e&&4!==e||(n=2),5!==e&&6!==e||(n=3),7!==e&&8!==e||(n=4),9!==e&&10!==e||(n=5),r.height=a[0].height*n}else r.width=o.width||360,r.height=o.height||240;t&&t instanceof HTMLVideoElement&&u(t),a.forEach((function(e,t){u(e,t)})),setTimeout(c,o.frameInterval)}}function u(e,t){if(!s){var i=0,r=0,o=e.width,n=e.height;1===t&&(i=e.width),2===t&&(r=e.height),3===t&&(i=e.width,r=e.height),4===t&&(r=2*e.height),5===t&&(i=e.width,r=2*e.height),6===t&&(r=3*e.height),7===t&&(i=e.width,r=3*e.height),void 0!==e.stream.left&&(i=e.stream.left),void 0!==e.stream.top&&(r=e.stream.top),void 0!==e.stream.width&&(o=e.stream.width),void 0!==e.stream.height&&(n=e.stream.height),a.drawImage(e,i,r,o,n),"function"==typeof e.stream.onRender&&e.stream.onRender(a,i,r,o,n,t)}}function p(e){var i=document.createElement("video");return function(e,t){"srcObject"in t?t.srcObject=e:"mozSrcObject"in t?t.mozSrcObject=e:t.srcObject=e}(e,i),i.className=t,i.muted=!0,i.volume=0,i.width=e.width||o.width||360,i.height=e.height||o.height||240,i.play(),i}function f(t){i=[],(t=t||e).forEach((function(e){if(e.getTracks().filter((function(e){return"video"===e.kind})).length){var t=p(e);t.stream=e,i.push(t)}}))}void 0!==n?h.AudioContext=n:"undefined"!=typeof webkitAudioContext&&(h.AudioContext=webkitAudioContext),this.startDrawingFrames=function(){c()},this.appendStreams=function(t){if(!t)throw"First parameter is required.";t instanceof Array||(t=[t]),t.forEach((function(t){var s=new d;if(t.getTracks().filter((function(e){return"video"===e.kind})).length){var r=p(t);r.stream=t,i.push(r),s.addTrack(t.getTracks().filter((function(e){return"video"===e.kind}))[0])}if(t.getTracks().filter((function(e){return"audio"===e.kind})).length){var a=o.audioContext.createMediaStreamSource(t);o.audioDestination=o.audioContext.createMediaStreamDestination(),a.connect(o.audioDestination),s.addTrack(o.audioDestination.stream.getTracks().filter((function(e){return"audio"===e.kind}))[0])}e.push(s)}))},this.releaseStreams=function(){i=[],s=!0,o.gainNode&&(o.gainNode.disconnect(),o.gainNode=null),o.audioSources.length&&(o.audioSources.forEach((function(e){e.disconnect()})),o.audioSources=[]),o.audioDestination&&(o.audioDestination.disconnect(),o.audioDestination=null),o.audioContext&&o.audioContext.close(),o.audioContext=null,a.clearRect(0,0,r.width,r.height),r.stream&&(r.stream.stop(),r.stream=null)},this.resetVideoStreams=function(e){!e||e instanceof Array||(e=[e]),f(e)},this.name="MultiStreamsMixer",this.toString=function(){return this.name},this.getMixedStream=function(){s=!1;var t=function(){var e;f(),"captureStream"in r?e=r.captureStream():"mozCaptureStream"in r?e=r.mozCaptureStream():o.disableLogs||console.error("Upgrade to latest Chrome or otherwise enable this flag: chrome://flags/#enable-experimental-web-platform-features");var t=new d;return e.getTracks().filter((function(e){return"video"===e.kind})).forEach((function(e){t.addTrack(e)})),r.stream=t,t}(),i=function(){h.AudioContextConstructor||(h.AudioContextConstructor=new h.AudioContext);o.audioContext=h.AudioContextConstructor,o.audioSources=[],!0===o.useGainNode&&(o.gainNode=o.audioContext.createGain(),o.gainNode.connect(o.audioContext.destination),o.gainNode.gain.value=0);var t=0;if(e.forEach((function(e){if(e.getTracks().filter((function(e){return"audio"===e.kind})).length){t++;var i=o.audioContext.createMediaStreamSource(e);!0===o.useGainNode&&i.connect(o.gainNode),o.audioSources.push(i)}})),!t)return;return o.audioDestination=o.audioContext.createMediaStreamDestination(),o.audioSources.forEach((function(e){e.connect(o.audioDestination)})),o.audioDestination.stream}();return i&&i.getTracks().filter((function(e){return"audio"===e.kind})).forEach((function(e){t.addTrack(e)})),e.forEach((function(e){e.fullcanvas})),t}}function P(e,t){e=e||[];var i,s,r=this;(t=t||{elementClass:"multi-streams-mixer",mimeType:"video/webm",video:{width:360,height:240}}).frameInterval||(t.frameInterval=10),t.video||(t.video={}),t.video.width||(t.video.width=360),t.video.height||(t.video.height=240),this.record=function(){var r;i=new L(e,t.elementClass||"multi-streams-mixer"),(r=[],e.forEach((function(e){v(e,"video").forEach((function(e){r.push(e)}))})),r).length&&(i.frameInterval=t.frameInterval||10,i.width=t.video.width||360,i.height=t.video.height||240,i.startDrawingFrames()),t.previewStream&&"function"==typeof t.previewStream&&t.previewStream(i.getMixedStream()),(s=new E(i.getMixedStream(),t)).record()},this.stop=function(e){s&&s.stop((function(t){r.blob=t,e(t),r.clearRecordedData()}))},this.pause=function(){s&&s.pause()},this.resume=function(){s&&s.resume()},this.clearRecordedData=function(){s&&(s.clearRecordedData(),s=null),i&&(i.releaseStreams(),i=null)},this.addStreams=function(r){if(!r)throw"First parameter is required.";r instanceof Array||(r=[r]),e.concat(r),s&&i&&(i.appendStreams(r),t.previewStream&&"function"==typeof t.previewStream&&t.previewStream(i.getMixedStream()))},this.resetVideoStreams=function(e){i&&(!e||e instanceof Array||(e=[e]),i.resetVideoStreams(e))},this.getMixer=function(){return i},this.name="MultiStreamRecorder",this.toString=function(){return this.name}}function B(e,t){var i,s,r;function a(){return new ReadableStream({start:function(s){var r=document.createElement("canvas"),a=document.createElement("video"),o=!0;a.srcObject=e,a.muted=!0,a.height=t.height,a.width=t.width,a.volume=0,a.onplaying=function(){r.width=t.width,r.height=t.height;var e=r.getContext("2d"),n=1e3/t.frameRate,l=setInterval((function(){if(i&&(clearInterval(l),s.close()),o&&(o=!1,t.onVideoProcessStarted&&t.onVideoProcessStarted()),e.drawImage(a,0,0),"closed"!==s._controlledReadableStream.state)try{s.enqueue(e.getImageData(0,0,t.width,t.height))}catch(e){}}),n)},a.play()}})}function o(e,l){if(!t.workerPath&&!l)return i=!1,void fetch("https://unpkg.com/webm-wasm@latest/dist/webm-worker.js").then((function(t){t.arrayBuffer().then((function(t){o(e,t)}))}));if(!t.workerPath&&l instanceof ArrayBuffer){var d=new Blob([l],{type:"text/javascript"});t.workerPath=h.createObjectURL(d)}t.workerPath||console.error("workerPath parameter is missing."),(s=new Worker(t.workerPath)).postMessage(t.webAssemblyPath||"https://unpkg.com/webm-wasm@latest/dist/webm-wasm.wasm"),s.addEventListener("message",(function(e){"READY"===e.data?(s.postMessage({width:t.width,height:t.height,bitrate:t.bitrate||1200,timebaseDen:t.frameRate||30,realtime:t.realtime}),a().pipeTo(new WritableStream({write:function(e){i?console.error("Got image, but recorder is finished!"):s.postMessage(e.data.buffer,[e.data.buffer])}}))):e.data&&(r||n.push(e.data))}))}"undefined"!=typeof ReadableStream&&"undefined"!=typeof WritableStream||console.error("Following polyfill is strongly recommended: https://unpkg.com/@mattiasbuelens/web-streams-polyfill/dist/polyfill.min.js"),(t=t||{}).width=t.width||640,t.height=t.height||480,t.frameRate=t.frameRate||30,t.bitrate=t.bitrate||1200,t.realtime=t.realtime||!0,this.record=function(){n=[],r=!1,this.blob=null,o(e),"function"==typeof t.initCallback&&t.initCallback()},this.pause=function(){r=!0},this.resume=function(){r=!1};var n=[];this.stop=function(e){i=!0;var t=this;!function(e){s?(s.addEventListener("message",(function(t){null===t.data&&(s.terminate(),s=null,e&&e())})),s.postMessage(null)):e&&e()}((function(){t.blob=new Blob(n,{type:"video/webm"}),e(t.blob)}))},this.name="WebAssemblyRecorder",this.toString=function(){return this.name},this.clearRecordedData=function(){n=[],r=!1,this.blob=null},this.blob=null}t.DiskStorage=R,t.GifRecorder=D,t.MultiStreamRecorder=P,t.RecordRTCPromisesHandler=function(e,i){if(!this)throw'Use "new RecordRTCPromisesHandler()"';if(void 0===e)throw'First argument "MediaStream" is required.';var s=this;s.recordRTC=new t(e,i),this.startRecording=function(){return new Promise((function(e,t){try{s.recordRTC.startRecording(),e()}catch(e){t(e)}}))},this.stopRecording=function(){return new Promise((function(e,t){try{s.recordRTC.stopRecording((function(i){s.blob=s.recordRTC.getBlob(),s.blob&&s.blob.size?e(i):t("Empty blob.",s.blob)}))}catch(e){t(e)}}))},this.pauseRecording=function(){return new Promise((function(e,t){try{s.recordRTC.pauseRecording(),e()}catch(e){t(e)}}))},this.resumeRecording=function(){return new Promise((function(e,t){try{s.recordRTC.resumeRecording(),e()}catch(e){t(e)}}))},this.getDataURL=function(e){return new Promise((function(e,t){try{s.recordRTC.getDataURL((function(t){e(t)}))}catch(e){t(e)}}))},this.getBlob=function(){return new Promise((function(e,t){try{e(s.recordRTC.getBlob())}catch(e){t(e)}}))},this.getInternalRecorder=function(){return new Promise((function(e,t){try{e(s.recordRTC.getInternalRecorder())}catch(e){t(e)}}))},this.reset=function(){return new Promise((function(e,t){try{e(s.recordRTC.reset())}catch(e){t(e)}}))},this.destroy=function(){return new Promise((function(e,t){try{e(s.recordRTC.destroy())}catch(e){t(e)}}))},this.getState=function(){return new Promise((function(e,t){try{e(s.recordRTC.getState())}catch(e){t(e)}}))},this.blob=null,this.version="5.6.2"},t.WebAssemblyRecorder=B}));class Sn{static _ebsp2rbsp(e){let t=e,i=t.byteLength,s=new Uint8Array(i),r=0;for(let e=0;e<i;e++)e>=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(s[r]=t[e],r++);return new Uint8Array(s.buffer,0,r)}static parseSPS(e){let t=Sn._ebsp2rbsp(e),i=new Ur(t);i.readByte();let s=i.readByte();i.readByte();let r=i.readByte();i.readUEG();let a=Sn.getProfileString(s),o=Sn.getLevelString(r),n=1,l=420,d=[0,420,422,444],h=8;if((100===s||110===s||122===s||244===s||44===s||83===s||86===s||118===s||128===s||138===s||144===s)&&(n=i.readUEG(),3===n&&i.readBits(1),n<=3&&(l=d[n]),h=i.readUEG()+8,i.readUEG(),i.readBits(1),i.readBool())){let e=3!==n?8:12;for(let t=0;t<e;t++)i.readBool()&&(t<6?Sn._skipScalingList(i,16):Sn._skipScalingList(i,64))}i.readUEG();let c=i.readUEG();if(0===c)i.readUEG();else if(1===c){i.readBits(1),i.readSEG(),i.readSEG();let e=i.readUEG();for(let t=0;t<e;t++)i.readSEG()}let u=i.readUEG();i.readBits(1);let p=i.readUEG(),f=i.readUEG(),m=i.readBits(1);0===m&&i.readBits(1),i.readBits(1);let g=0,y=0,A=0,b=0;i.readBool()&&(g=i.readUEG(),y=i.readUEG(),A=i.readUEG(),b=i.readUEG());let v=1,_=1,S=0,w=!0,E=0,T=0;if(i.readBool()){if(i.readBool()){let e=i.readByte(),t=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],s=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];e>0&&e<16?(v=t[e-1],_=s[e-1]):255===e&&(v=i.readByte()<<8|i.readByte(),_=i.readByte()<<8|i.readByte())}if(i.readBool()&&i.readBool(),i.readBool()&&(i.readBits(4),i.readBool()&&i.readBits(24)),i.readBool()&&(i.readUEG(),i.readUEG()),i.readBool()){let e=i.readBits(32),t=i.readBits(32);w=i.readBool(),E=t,T=2*e,S=E/T}}let k=1;1===v&&1===_||(k=v/_);let C=0,x=0;if(0===n)C=1,x=2-m;else{C=3===n?1:2,x=(1===n?2:1)*(2-m)}let R=16*(p+1),D=16*(f+1)*(2-m);R-=(g+y)*C,D-=(A+b)*x;let L=Math.ceil(R*k);return i.destroy(),i=null,{profile_string:a,level_string:o,bit_depth:h,ref_frames:u,chroma_format:l,chroma_format_string:Sn.getChromaFormatString(l),frame_rate:{fixed:w,fps:S,fps_den:T,fps_num:E},sar_ratio:{width:v,height:_},codec_size:{width:R,height:D},present_size:{width:L,height:D}}}static parseSPS$2(e){let t=e.subarray(1,4),i="avc1.";for(let e=0;e<3;e++){let s=t[e].toString(16);s.length<2&&(s="0"+s),i+=s}let s=Sn._ebsp2rbsp(e),r=new Ur(s);r.readByte();let a=r.readByte();r.readByte();let o=r.readByte();r.readUEG();let n=Sn.getProfileString(a),l=Sn.getLevelString(o),d=1,h=420,c=[0,420,422,444],u=8,p=8;if((100===a||110===a||122===a||244===a||44===a||83===a||86===a||118===a||128===a||138===a||144===a)&&(d=r.readUEG(),3===d&&r.readBits(1),d<=3&&(h=c[d]),u=r.readUEG()+8,p=r.readUEG()+8,r.readBits(1),r.readBool())){let e=3!==d?8:12;for(let t=0;t<e;t++)r.readBool()&&(t<6?Sn._skipScalingList(r,16):Sn._skipScalingList(r,64))}r.readUEG();let f=r.readUEG();if(0===f)r.readUEG();else if(1===f){r.readBits(1),r.readSEG(),r.readSEG();let e=r.readUEG();for(let t=0;t<e;t++)r.readSEG()}let m=r.readUEG();r.readBits(1);let g=r.readUEG(),y=r.readUEG(),A=r.readBits(1);0===A&&r.readBits(1),r.readBits(1);let b=0,v=0,_=0,S=0;r.readBool()&&(b=r.readUEG(),v=r.readUEG(),_=r.readUEG(),S=r.readUEG());let w=1,E=1,T=0,k=!0,C=0,x=0;if(r.readBool()){if(r.readBool()){let e=r.readByte(),t=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],i=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];e>0&&e<16?(w=t[e-1],E=i[e-1]):255===e&&(w=r.readByte()<<8|r.readByte(),E=r.readByte()<<8|r.readByte())}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(4),r.readBool()&&r.readBits(24)),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool()){let e=r.readBits(32),t=r.readBits(32);k=r.readBool(),C=t,x=2*e,T=C/x}}let R=1;1===w&&1===E||(R=w/E);let D=0,L=0;if(0===d)D=1,L=2-A;else{D=3===d?1:2,L=(1===d?2:1)*(2-A)}let P=16*(g+1),B=16*(y+1)*(2-A);P-=(b+v)*D,B-=(_+S)*L;let I=Math.ceil(P*R);return r.destroy(),r=null,{codec_mimetype:i,profile_idc:a,level_idc:o,profile_string:n,level_string:l,chroma_format_idc:d,bit_depth:u,bit_depth_luma:u,bit_depth_chroma:p,ref_frames:m,chroma_format:h,chroma_format_string:Sn.getChromaFormatString(h),frame_rate:{fixed:k,fps:T,fps_den:x,fps_num:C},sar_ratio:{width:w,height:E},codec_size:{width:P,height:B},present_size:{width:I,height:B}}}static _skipScalingList(e,t){let i=8,s=8,r=0;for(let a=0;a<t;a++)0!==s&&(r=e.readSEG(),s=(i+r+256)%256),i=0===s?i:s}static getProfileString(e){switch(e){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}static getLevelString(e){return(e/10).toFixed(1)}static getChromaFormatString(e){switch(e){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}class wn{constructor(e){this.buffer=e,this.buflen=e.length,this.bufpos=0,this.bufoff=0,this.iserro=!1}read(e){let t=0,i=0;for(;e;){if(e<0||this.bufpos>=this.buflen)return this.iserro=!0,0;this.iserro=!1,i=this.bufoff+e>8?8-this.bufoff:e,t<<=i,t+=this.buffer[this.bufpos]>>8-this.bufoff-i&255>>8-i,this.bufoff+=i,e-=i,8==this.bufoff&&(this.bufpos++,this.bufoff=0)}return t}look(e){let t=this.bufpos,i=this.bufoff,s=this.read(e);return this.bufpos=t,this.bufoff=i,s}read_golomb(){let e;for(e=0;0===this.read(1)&&!this.iserro;e++);return(1<<e)+this.read(e)-1}}function En(e){const t={};let i=function(){let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}();const s=new DataView(e.buffer);let r=s.getUint8(0),a=s.getUint8(1);if(s.getUint8(2),s.getUint8(3),1!==r||0===a)return{};const o=1+(3&s.getUint8(4));if(3!==o&&4!==o)return{};let n=31&s.getUint8(5);if(0===n)return{};let l=6;for(let r=0;r<n;r++){let a=s.getUint16(l,!i);if(l+=2,0===a)continue;let o=new Uint8Array(e.buffer,l,a);l+=a;let n=Sn.parseSPS(o);if(0!==r)continue;t.sps=o,t.timescale=1e3,t.codecWidth=n.codec_size.width,t.codecHeight=n.codec_size.height,t.presentWidth=n.present_size.width,t.presentHeight=n.present_size.height,t.profile=n.profile_string,t.level=n.level_string,t.bitDepth=n.bit_depth,t.chromaFormat=n.chroma_format,t.sarRatio=n.sar_ratio,t.frameRate=n.frame_rate,!1!==n.frame_rate.fixed&&0!==n.frame_rate.fps_num&&0!==n.frame_rate.fps_den||(t.frameRate={fixed:!0,fps:25,fps_num:25e3,fps_den:1e3});let d=t.frameRate.fps_den,h=t.frameRate.fps_num;t.refSampleDuration=t.timescale*(d/h);let c=o.subarray(1,4),u="avc1.";for(let e=0;e<3;e++){let t=c[e].toString(16);t.length<2&&(t="0"+t),u+=t}t.codec=u}let d=s.getUint8(l);if(0===d)return{};l++;for(let r=0;r<d;r++){let r=s.getUint16(l,!i);if(l+=2,0===r)continue;let a=new Uint8Array(e.buffer,l,r);l+=r,t.pps=a}if(t.videoType=rs,t.sps){const e=t.sps.byteLength,i=new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e]),s=new Uint8Array(e+4);s.set(i,0),s.set(t.sps,4),t.sps=s}if(t.pps){const e=t.pps.byteLength,i=new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e]),s=new Uint8Array(e+4);s.set(i,0),s.set(t.pps,4),t.pps=s}return t}function Tn(e){let{sps:t,pps:i}=e,s=8+t.byteLength+1+2+i.byteLength,r=!1;const a=Sn.parseSPS$2(t);66!==t[3]&&77!==t[3]&&88!==t[3]&&(r=!0,s+=4);let o=new Uint8Array(s);o[0]=1,o[1]=t[1],o[2]=t[2],o[3]=t[3],o[4]=255,o[5]=225;let n=t.byteLength;o[6]=n>>>8,o[7]=255&n;let l=8;o.set(t,8),l+=n,o[l]=1;let d=i.byteLength;o[l+1]=d>>>8,o[l+2]=255&d,o.set(i,l+3),l+=3+d,r&&(o[l]=252|a.chroma_format_idc,o[l+1]=248|a.bit_depth_luma-8,o[l+2]=248|a.bit_depth_chroma-8,o[l+3]=0,l+=4);const h=[23,0,0,0,0],c=new Uint8Array(h.length+o.byteLength);return c.set(h,0),c.set(o,h.length),c}function kn(e,t){let i=[];i[0]=t?23:39,i[1]=1,i[2]=0,i[3]=0,i[4]=0;const s=new Uint8Array(i.length+e.byteLength);return s.set(i,0),s.set(e,i.length),s}function Cn(e){return 31&e[0]}function xn(e){return e===Bt}function Rn(e){return!function(e){return e===xt||e===Rt}(e)&&!xn(e)}function Dn(e){return e===Dt}class Ln{constructor(e){this.data=e,this.eofFlag=!1,this.currentStartcodeOffset=this.findNextStartCodeOffset(0),this.eofFlag&&console.error("Could not find H264 startcode until payload end!")}findNextStartCodeOffset(e){let t=e,i=this.data;for(;;){if(t+3>=i.byteLength)return this.eofFlag=!0,i.byteLength;let e=i[t+0]<<24|i[t+1]<<16|i[t+2]<<8|i[t+3],s=i[t+0]<<16|i[t+1]<<8|i[t+2];if(1===e||1===s)return t;t++}}readNextNaluPayload(){let e=this.data,t=null;for(;null==t&&!this.eofFlag;){let i=this.currentStartcodeOffset;i+=1===(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3])?4:3;let s=31&e[i],r=(128&e[i])>>>7,a=this.findNextStartCodeOffset(i);this.currentStartcodeOffset=a,s>=Ut||0===r&&(t={type:s,data:e.subarray(i,a)})}return t}}class Pn{constructor(e){let t=e.data.byteLength;this.type=e.type,this.data=new Uint8Array(4+t),new DataView(this.data.buffer).setUint32(0,t),this.data.set(e.data,4)}}const Bn=e=>{let t=e,i=t.byteLength,s=new Uint8Array(i),r=0;for(let e=0;e<i;e++)e>=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(s[r]=t[e],r++);return new Uint8Array(s.buffer,0,r)},In=e=>{switch(e){case 0:return"4:0:0";case 1:return"4:2:0";case 2:return"4:2:2";case 3:return"4:4:4";default:return"Unknown"}};class Mn{static _ebsp2rbsp(e){let t=e,i=t.byteLength,s=new Uint8Array(i),r=0;for(let e=0;e<i;e++)e>=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(s[r]=t[e],r++);return new Uint8Array(s.buffer,0,r)}static parseVPS(e){let t=Mn._ebsp2rbsp(e),i=new Ur(t);return i.readByte(),i.readByte(),i.readBits(4),i.readBits(2),i.readBits(6),{num_temporal_layers:i.readBits(3)+1,temporal_id_nested:i.readBool()}}static parseSPS(e){let t=Mn._ebsp2rbsp(e),i=new Ur(t);i.readByte(),i.readByte();let s=0,r=0,a=0,o=0;i.readBits(4);let n=i.readBits(3);i.readBool();let l=i.readBits(2),d=i.readBool(),h=i.readBits(5),c=i.readByte(),u=i.readByte(),p=i.readByte(),f=i.readByte(),m=i.readByte(),g=i.readByte(),y=i.readByte(),A=i.readByte(),b=i.readByte(),v=i.readByte(),_=i.readByte(),S=[],w=[];for(let e=0;e<n;e++)S.push(i.readBool()),w.push(i.readBool());if(n>0)for(let e=n;e<8;e++)i.readBits(2);for(let e=0;e<n;e++)S[e]&&(i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte()),w[e]&&i.readByte();i.readUEG();let E=i.readUEG();3==E&&i.readBits(1);let T=i.readUEG(),k=i.readUEG();i.readBool()&&(s+=i.readUEG(),r+=i.readUEG(),a+=i.readUEG(),o+=i.readUEG());let C=i.readUEG(),x=i.readUEG(),R=i.readUEG();for(let e=i.readBool()?0:n;e<=n;e++)i.readUEG(),i.readUEG(),i.readUEG();if(i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readBool()){if(i.readBool())for(let e=0;e<4;e++)for(let t=0;t<(3===e?2:6);t++){if(i.readBool()){let t=Math.min(64,1<<4+(e<<1));e>1&&i.readSEG();for(let e=0;e<t;e++)i.readSEG()}else i.readUEG()}}i.readBool(),i.readBool(),i.readBool()&&(i.readByte(),i.readUEG(),i.readUEG(),i.readBool());let D=i.readUEG(),L=0;for(let e=0;e<D;e++){let t=!1;if(0!==e&&(t=i.readBool()),t){e===D&&i.readUEG(),i.readBool(),i.readUEG();let t=0;for(let e=0;e<=L;e++){let e=i.readBool(),s=!1;e||(s=i.readBool()),(e||s)&&t++}L=t}else{let e=i.readUEG(),t=i.readUEG();L=e+t;for(let t=0;t<e;t++)i.readUEG(),i.readBool();for(let e=0;e<t;e++)i.readUEG(),i.readBool()}}if(i.readBool()){let e=i.readUEG();for(let t=0;t<e;t++){for(let e=0;e<R+4;e++)i.readBits(1);i.readBits(1)}}let P=!1,B=0,I=1,M=1,U=!1,F=1,O=1;if(i.readBool(),i.readBool(),i.readBool()){if(i.readBool()){let e=i.readByte(),t=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],s=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];e>0&&e<=16?(I=t[e-1],M=s[e-1]):255===e&&(I=i.readBits(16),M=i.readBits(16))}if(i.readBool()&&i.readBool(),i.readBool()){i.readBits(3),i.readBool(),i.readBool()&&(i.readByte(),i.readByte(),i.readByte())}if(i.readBool()&&(i.readUEG(),i.readUEG()),i.readBool(),i.readBool(),i.readBool(),P=i.readBool(),P&&(i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG()),i.readBool()){if(F=i.readBits(32),O=i.readBits(32),i.readBool()&&i.readUEG(),i.readBool()){let e=!1,t=!1,s=!1;e=i.readBool(),t=i.readBool(),(e||t)&&(s=i.readBool(),s&&(i.readByte(),i.readBits(5),i.readBool(),i.readBits(5)),i.readBits(4),i.readBits(4),s&&i.readBits(4),i.readBits(5),i.readBits(5),i.readBits(5));for(let r=0;r<=n;r++){let r=i.readBool();U=r;let a=!0,o=1;r||(a=i.readBool());let n=!1;if(a?i.readUEG():n=i.readBool(),n||(o=i.readUEG()+1),e){for(let e=0;e<o;e++)i.readUEG(),i.readUEG(),s&&(i.readUEG(),i.readUEG());i.readBool()}if(t){for(let e=0;e<o;e++)i.readUEG(),i.readUEG(),s&&(i.readUEG(),i.readUEG());i.readBool()}}}}i.readBool()&&(i.readBool(),i.readBool(),i.readBool(),B=i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG())}i.readBool();let N=`hvc1.${h}.1.L${_}.B0`,j=T-(s+r)*(1===E||2===E?2:1),z=k-(a+o)*(1===E?2:1),G=1;return 1!==I&&1!==M&&(G=I/M),i.destroy(),i=null,{codec_mimetype:N,profile_string:Mn.getProfileString(h),level_string:Mn.getLevelString(_),profile_idc:h,bit_depth:C+8,ref_frames:1,chroma_format:E,chroma_format_string:Mn.getChromaFormatString(E),general_level_idc:_,general_profile_space:l,general_tier_flag:d,general_profile_idc:h,general_profile_compatibility_flags_1:c,general_profile_compatibility_flags_2:u,general_profile_compatibility_flags_3:p,general_profile_compatibility_flags_4:f,general_constraint_indicator_flags_1:m,general_constraint_indicator_flags_2:g,general_constraint_indicator_flags_3:y,general_constraint_indicator_flags_4:A,general_constraint_indicator_flags_5:b,general_constraint_indicator_flags_6:v,min_spatial_segmentation_idc:B,constant_frame_rate:0,chroma_format_idc:E,bit_depth_luma_minus8:C,bit_depth_chroma_minus8:x,frame_rate:{fixed:U,fps:O/F,fps_den:F,fps_num:O},sar_ratio:{width:I,height:M},codec_size:{width:j,height:z},present_size:{width:j*G,height:z}}}static parsePPS(e){let t=Mn._ebsp2rbsp(e),i=new Ur(t);i.readByte(),i.readByte(),i.readUEG(),i.readUEG(),i.readBool(),i.readBool(),i.readBits(3),i.readBool(),i.readBool(),i.readUEG(),i.readUEG(),i.readSEG(),i.readBool(),i.readBool(),i.readBool()&&i.readUEG(),i.readSEG(),i.readSEG(),i.readBool(),i.readBool(),i.readBool(),i.readBool();let s=i.readBool(),r=i.readBool(),a=1;return r&&s?a=0:r?a=3:s&&(a=2),{parallelismType:a}}static getChromaFormatString(e){switch(e){case 0:return"4:0:0";case 1:return"4:2:0";case 2:return"4:2:2";case 3:return"4:4:4";default:return"Unknown"}}static getProfileString(e){switch(e){case 1:return"Main";case 2:return"Main10";case 3:return"MainSP";case 4:return"Rext";case 9:return"SCC";default:return"Unknown"}}static getLevelString(e){return(e/30).toFixed(1)}}function Un(e){let t={codecWidth:0,codecHeight:0,videoType:as,width:0,height:0,profile:0,level:0};e=e.slice(5);do{let i={};if(e.length<23){console.warn("parseHEVCDecoderConfigurationRecord$2",`arrayBuffer.length ${e.length} < 23`);break}if(i.configurationVersion=e[0],1!=i.configurationVersion)break;i.general_profile_space=e[1]>>6&3,i.general_tier_flag=e[1]>>5&1,i.general_profile_idc=31&e[1],i.general_profile_compatibility_flags=e[2]<<24|e[3]<<16|e[4]<<8|e[5],i.general_constraint_indicator_flags=e[6]<<24|e[7]<<16|e[8]<<8|e[9],i.general_constraint_indicator_flags=i.general_constraint_indicator_flags<<16|e[10]<<8|e[11],i.general_level_idc=e[12],i.min_spatial_segmentation_idc=(15&e[13])<<8|e[14],i.parallelismType=3&e[15],i.chromaFormat=3&e[16],i.bitDepthLumaMinus8=7&e[17],i.bitDepthChromaMinus8=7&e[18],i.avgFrameRate=e[19]<<8|e[20],i.constantFrameRate=e[21]>>6&3,i.numTemporalLayers=e[21]>>3&7,i.temporalIdNested=e[21]>>2&1,i.lengthSizeMinusOne=3&e[21];let s=e[22],r=e.slice(23);for(let e=0;e<s&&!(r.length<3);e++){let e=63&r[0],s=r[1]<<8|r[2];r=r.slice(3);for(let a=0;a<s&&!(r.length<2);a++){let s=r[0]<<8|r[1];if(r.length<2+s)break;if(r=r.slice(2),33==e){let e=new Uint8Array(s);e.set(r.slice(0,s),0),i.psps=On(e,i),t.profile=i.general_profile_idc,t.level=i.general_level_idc/30,t.width=i.psps.pic_width_in_luma_samples-(i.psps.conf_win_left_offset+i.psps.conf_win_right_offset),t.height=i.psps.pic_height_in_luma_samples-(i.psps.conf_win_top_offset+i.psps.conf_win_bottom_offset)}r=r.slice(s)}}}while(0);return t.codecWidth=t.width||1920,t.codecHeight=t.height||1080,t.presentHeight=t.codecHeight,t.presentWidth=t.codecWidth,t.timescale=1e3,t.refSampleDuration=1e3/23976*1e3,t}function Fn(e){const t=e;if(t.length<22)return console.error(`Invalid HEVCDecoderConfigurationRecord, lack of data! ${t.length} < 22`),{};let i={codecWidth:0,codecHeight:0,videoType:as},s=function(){let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}(),r=new DataView(t.buffer),a=r.getUint8(0),o=31&r.getUint8(1);if(1!==a||0===o)return console.error(`Invalid HEVCDecoderConfigurationRecord,version is ${a}, hevcProfile is ${o}`),{};let n=1+(3&r.getUint8(21));if(3!==n&&4!==n)return console.error("Invalid HEVCDecoderConfigurationRecord, Strange NaluLengthSizeMinusOne: "+(n-1)),{};let l=r.getUint8(22);for(let e=0,a=23;e<l;e++){let e=63&r.getUint8(a+0),o=r.getUint16(a+1,!s);a+=3;for(let n=0;n<o;n++){let o=r.getUint16(a+0,!s);if(0===n)if(33===e){a+=2;let e=new Uint8Array(t.buffer,a,o),s=Mn.parseSPS(e);i.codecWidth=s.codec_size.width,i.codecHeight=s.codec_size.height,i.presentWidth=s.present_size.width,i.presentHeight=s.present_size.height,i.profile=s.profile_string,i.level=s.level_string,i.bitDepth=s.bit_depth,i.chromaFormat=s.chroma_format,i.sarRatio=s.sar_ratio,i.frameRate=s.frame_rate,!1!==s.frame_rate.fixed&&0!==s.frame_rate.fps_num&&0!==s.frame_rate.fps_den||(i.frameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3}),i.frameRate.fps_den,i.frameRate.fps_num,i.codec=s.codec_mimetype,a+=o}else a+=2+o;else a+=2+o}}return i.hvcc=new Uint8Array(t),i}function On(e,t){let i={},s=e.length,r=[],a=new wn(e);a.read(1),a.read(6),a.read(6),a.read(3);for(let e=2;e<s;e++)e+2<s&&3==a.look(24)?(r.push(a.read(8)),r.push(a.read(8)),e+=2,a.read(8)):r.push(a.read(8));let o=new Uint8Array(r),n=new wn(o);if(i.sps_video_parameter_set_id=n.read(4),i.sps_max_sub_layers_minus1=n.read(3),i.sps_temporal_id_nesting_flag=n.read(1),i.profile_tier_level=function(e,t,i){let s={};s.profile_space=e.read(2),s.tier_flag=e.read(1),s.profile_idc=e.read(5),s.profile_compatibility_flags=e.read(32),s.general_progressive_source_flag=e.read(1),s.general_interlaced_source_flag=e.read(1),s.general_non_packed_constraint_flag=e.read(1),s.general_frame_only_constraint_flag=e.read(1),e.read(32),e.read(12),s.level_idc=e.read(8),s.sub_layer_profile_present_flag=[],s.sub_layer_level_present_flag=[];for(let t=0;t<i;t++)s.sub_layer_profile_present_flag[t]=e.read(1),s.sub_layer_level_present_flag[t]=e.read(1);if(i>0)for(let t=i;t<8;t++)e.read(2);s.sub_layer_profile_space=[],s.sub_layer_tier_flag=[],s.sub_layer_profile_idc=[],s.sub_layer_profile_compatibility_flag=[],s.sub_layer_progressive_source_flag=[],s.sub_layer_interlaced_source_flag=[],s.sub_layer_non_packed_constraint_flag=[],s.sub_layer_frame_only_constraint_flag=[],s.sub_layer_level_idc=[];for(let t=0;t<i;t++)s.sub_layer_profile_present_flag[t]&&(s.sub_layer_profile_space[t]=e.read(2),s.sub_layer_tier_flag[t]=e.read(1),s.sub_layer_profile_idc[t]=e.read(5),s.sub_layer_profile_compatibility_flag[t]=e.read(32),s.sub_layer_progressive_source_flag[t]=e.read(1),s.sub_layer_interlaced_source_flag[t]=e.read(1),s.sub_layer_non_packed_constraint_flag[t]=e.read(1),s.sub_layer_frame_only_constraint_flag[t]=e.read(1),e.read(32),e.read(12)),s.sub_layer_level_present_flag[t]?s.sub_layer_level_idc[t]=e.read(8):s.sub_layer_level_idc[t]=1;return s}(n,0,i.sps_max_sub_layers_minus1),i.sps_seq_parameter_set_id=n.read_golomb(),i.chroma_format_idc=n.read_golomb(),3==i.chroma_format_idc?i.separate_colour_plane_flag=n.read(1):i.separate_colour_plane_flag=0,i.pic_width_in_luma_samples=n.read_golomb(),i.pic_height_in_luma_samples=n.read_golomb(),i.conformance_window_flag=n.read(1),i.conformance_window_flag){let e=1+(i.chroma_format_idc<2),t=1+(i.chroma_format_idc<3);i.conf_win_left_offset=n.read_golomb()*t,i.conf_win_right_offset=n.read_golomb()*t,i.conf_win_top_offset=n.read_golomb()*e,i.conf_win_bottom_offset=n.read_golomb()*e}else i.conf_win_left_offset=0,i.conf_win_right_offset=0,i.conf_win_top_offset=0,i.conf_win_bottom_offset=0;return i}function Nn(e){let{vps:t,pps:i,sps:s}=e,r={configurationVersion:1};const a=(e=>{let t=Bn(e),i=new Ur(t);return i.readByte(),i.readByte(),i.readBits(4),i.readBits(2),i.readBits(6),{num_temporal_layers:i.readBits(3)+1,temporal_id_nested:i.readBool()}})(t),o=(e=>{let t=Bn(e),i=new Ur(t);i.readByte(),i.readByte();let s=0,r=0,a=0,o=0;i.readBits(4);let n=i.readBits(3);i.readBool();let l=i.readBits(2),d=i.readBool(),h=i.readBits(5),c=i.readByte(),u=i.readByte(),p=i.readByte(),f=i.readByte(),m=i.readByte(),g=i.readByte(),y=i.readByte(),A=i.readByte(),b=i.readByte(),v=i.readByte(),_=i.readByte(),S=[],w=[];for(let e=0;e<n;e++)S.push(i.readBool()),w.push(i.readBool());if(n>0)for(let e=n;e<8;e++)i.readBits(2);for(let e=0;e<n;e++)S[e]&&(i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte(),i.readByte()),S[e]&&i.readByte();i.readUEG();let E=i.readUEG();3==E&&i.readBits(1);let T=i.readUEG(),k=i.readUEG();i.readBool()&&(s+=i.readUEG(),r+=i.readUEG(),a+=i.readUEG(),o+=i.readUEG());let C=i.readUEG(),x=i.readUEG(),R=i.readUEG();for(let e=i.readBool()?0:n;e<=n;e++)i.readUEG(),i.readUEG(),i.readUEG();if(i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readBool()&&i.readBool())for(let e=0;e<4;e++)for(let t=0;t<(3===e?2:6);t++)if(i.readBool()){let t=Math.min(64,1<<4+(e<<1));e>1&&i.readSEG();for(let e=0;e<t;e++)i.readSEG()}else i.readUEG();i.readBool(),i.readBool(),i.readBool()&&(i.readByte(),i.readUEG(),i.readUEG(),i.readBool());let D=i.readUEG(),L=0;for(let e=0;e<D;e++){let t=!1;if(0!==e&&(t=i.readBool()),t){e===D&&i.readUEG(),i.readBool(),i.readUEG();let t=0;for(let e=0;e<=L;e++){let e=i.readBool(),s=!1;e||(s=i.readBool()),(e||s)&&t++}L=t}else{let e=i.readUEG(),t=i.readUEG();L=e+t;for(let t=0;t<e;t++)i.readUEG(),i.readBool();for(let e=0;e<t;e++)i.readUEG(),i.readBool()}}if(i.readBool()){let e=i.readUEG();for(let t=0;t<e;t++){for(let e=0;e<R+4;e++)i.readBits(1);i.readBits(1)}}let P=!1,B=0,I=1,M=1,U=!1,F=1,O=1;if(i.readBool(),i.readBool(),i.readBool()){if(i.readBool()){let e=i.readByte(),t=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],s=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];e>0&&e<16?(I=t[e-1],M=s[e-1]):255===e&&(I=i.readBits(16),M=i.readBits(16))}if(i.readBool()&&i.readBool(),i.readBool()&&(i.readBits(3),i.readBool(),i.readBool()&&(i.readByte(),i.readByte(),i.readByte())),i.readBool()&&(i.readUEG(),i.readUEG()),i.readBool(),i.readBool(),i.readBool(),P=i.readBool(),P&&(s+=i.readUEG(),r+=i.readUEG(),a+=i.readUEG(),o+=i.readUEG()),i.readBool()&&(F=i.readBits(32),O=i.readBits(32),i.readBool()&&(i.readUEG(),i.readBool()))){let e=!1,t=!1,s=!1;e=i.readBool(),t=i.readBool(),(e||t)&&(s=i.readBool(),s&&(i.readByte(),i.readBits(5),i.readBool(),i.readBits(5)),i.readBits(4),i.readBits(4),s&&i.readBits(4),i.readBits(5),i.readBits(5),i.readBits(5));for(let r=0;r<=n;r++){let r=i.readBool();U=r;let a=!1,o=1;r||(a=i.readBool());let n=!1;if(a?i.readSEG():n=i.readBool(),n||(cpbcnt=i.readUEG()+1),e)for(let e=0;e<o;e++)i.readUEG(),i.readUEG(),s&&(i.readUEG(),i.readUEG());if(t)for(let e=0;e<o;e++)i.readUEG(),i.readUEG(),s&&(i.readUEG(),i.readUEG())}}i.readBool()&&(i.readBool(),i.readBool(),i.readBool(),B=i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG(),i.readUEG())}i.readBool();let N=`hvc1.${h}.1.L${_}.B0`,j=T,z=k,G=1;return 1!==I&&1!==M&&(G=I/M),i.destroy(),i=null,{codec_mimetype:N,level_string:(H=_,(H/30).toFixed(1)),profile_idc:h,bit_depth:C+8,ref_frames:1,chroma_format:E,chroma_format_string:In(E),general_level_idc:_,general_profile_space:l,general_tier_flag:d,general_profile_idc:h,general_profile_compatibility_flags_1:c,general_profile_compatibility_flags_2:u,general_profile_compatibility_flags_3:p,general_profile_compatibility_flags_4:f,general_constraint_indicator_flags_1:m,general_constraint_indicator_flags_2:g,general_constraint_indicator_flags_3:y,general_constraint_indicator_flags_4:A,general_constraint_indicator_flags_5:b,general_constraint_indicator_flags_6:v,min_spatial_segmentation_idc:B,constant_frame_rate:0,chroma_format_idc:E,bit_depth_luma_minus8:C,bit_depth_chroma_minus8:x,frame_rate:{fixed:U,fps:O/F,fps_den:F,fps_num:O},sar_ratio:{width:I,height:M},codec_size:{width:j,height:z},present_size:{width:j*G,height:z}};var H})(s),n=(e=>{let t=Bn(e),i=new Ur(t);i.readByte(),i.readByte(),i.readUEG(),i.readUEG(),i.readBool(),i.readBool(),i.readBits(3),i.readBool(),i.readBool(),i.readUEG(),i.readUEG(),i.readSEG(),i.readBool(),i.readBool(),i.readBool()&&i.readUEG(),i.readSEG(),i.readSEG(),i.readBool(),i.readBool(),i.readBool(),i.readBool();let s=i.readBool(),r=i.readBool(),a=1;return r&&s?a=0:r?a=3:s&&(a=2),{parallelismType:a}})(i);r=Object.assign(r,a,o,n);let l=23+(5+t.byteLength)+(5+s.byteLength)+(5+i.byteLength),d=new Uint8Array(l);d[0]=1,d[1]=(3&r.general_profile_space)<<6|(r.general_tier_flag?1:0)<<5|31&r.general_profile_idc,d[2]=r.general_profile_compatibility_flags_1||0,d[3]=r.general_profile_compatibility_flags_2||0,d[4]=r.general_profile_compatibility_flags_3||0,d[5]=r.general_profile_compatibility_flags_4||0,d[6]=r.general_constraint_indicator_flags_1||0,d[7]=r.general_constraint_indicator_flags_2||0,d[8]=r.general_constraint_indicator_flags_3||0,d[9]=r.general_constraint_indicator_flags_4||0,d[10]=r.general_constraint_indicator_flags_5||0,d[11]=r.general_constraint_indicator_flags_6||0,d[12]=60,d[13]=240|(3840&r.min_spatial_segmentation_idc)>>8,d[14]=255&r.min_spatial_segmentation_idc,d[15]=252|3&r.parallelismType,d[16]=252|3&r.chroma_format_idc,d[17]=248|7&r.bit_depth_luma_minus8,d[18]=248|7&r.bit_depth_chroma_minus8,d[19]=0,d[20]=0,d[21]=(3&r.constant_frame_rate)<<6|(7&r.num_temporal_layers)<<3|(r.temporal_id_nested?1:0)<<2|3,d[22]=3,d[23]=128|jt,d[24]=0,d[25]=1,d[26]=(65280&t.byteLength)>>8,d[27]=(255&t.byteLength)>>0,d.set(t,28),d[23+(5+t.byteLength)+0]=128|Gt,d[23+(5+t.byteLength)+1]=0,d[23+(5+t.byteLength)+2]=1,d[23+(5+t.byteLength)+3]=(65280&s.byteLength)>>8,d[23+(5+t.byteLength)+4]=(255&s.byteLength)>>0,d.set(s,23+(5+t.byteLength)+5),d[23+(5+t.byteLength+5+s.byteLength)+0]=128|Vt,d[23+(5+t.byteLength+5+s.byteLength)+1]=0,d[23+(5+t.byteLength+5+s.byteLength)+2]=1,d[23+(5+t.byteLength+5+s.byteLength)+3]=(65280&i.byteLength)>>8,d[23+(5+t.byteLength+5+s.byteLength)+4]=(255&i.byteLength)>>0,d.set(i,23+(5+t.byteLength+5+s.byteLength)+5);const h=[28,0,0,0,0],c=new Uint8Array(h.length+d.byteLength);return c.set(h,0),c.set(d,h.length),c}function jn(e,t){let i=[];i[0]=t?28:44,i[1]=1,i[2]=0,i[3]=0,i[4]=0;const s=new Uint8Array(i.length+e.byteLength);return s.set(i,0),s.set(e,i.length),s}function zn(e){return(126&e[0])>>1}function Gn(e){return!function(e){return e>=32&&e<=40}(e)}function Hn(e){return e>=16&&e<=21}class Vn{constructor(e){this.data=e,this.eofFlag=!1,this.currentStartcodeOffset=this.findNextStartCodeOffset(0),this.eofFlag&&console.error("Could not find H265 startcode until payload end!")}findNextStartCodeOffset(e){let t=e,i=this.data;for(;;){if(t+3>=i.byteLength)return this.eofFlag=!0,i.byteLength;let e=i[t+0]<<24|i[t+1]<<16|i[t+2]<<8|i[t+3],s=i[t+0]<<16|i[t+1]<<8|i[t+2];if(1===e||1===s)return t;t++}}readNextNaluPayload(){let e=this.data,t=null;for(;null==t&&!this.eofFlag;){let i=this.currentStartcodeOffset;i+=1===(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3])?4:3;let s=e[i]>>1&63,r=(128&e[i])>>>7,a=this.findNextStartCodeOffset(i);this.currentStartcodeOffset=a,0===r&&(t={type:s,data:e.subarray(i,a)})}return t}}class $n{constructor(e){let t=e.data.byteLength;this.type=e.type,this.data=new Uint8Array(4+t),new DataView(this.data.buffer).setUint32(0,t),this.data.set(e.data,4)}}class Wn extends So{constructor(e){super(),this.TAG_NAME="recorderCommon",this.player=e,this.fileName="",this._isRecording=!1,this._recordingTimestamp=0,this.recordingInterval=null,this.sps=null,this.pps=null,this.vps=null,this.codecId=null,this.audioCodeId=null,this.metaInfo={codecWidth:0,codecHeight:0,presentWidth:0,presentHeight:0,refSampleDuration:0,timescale:1e3,avcc:null,videoType:""},this.audioMetaInfo={timescale:1e3,sampleRate:0,refSampleDuration:0,channelCount:0,codec:"",originalCodec:"",audioType:"",extraData:new Uint8Array(0)}}destroy(){this._reset(),this.sps=null,this.pps=null,this.vps=null,this.codecId=null,this.audioCodeId=null,this.metaInfo=null,this.audioMetaInfo=null}get isH264(){return this.codecId===vt}get isH265(){return this.codecId===_t}setFileName(e){this.fileName=e}get isRecording(){return this._isRecording}get recording(){return this._isRecording}get recordTime(){return this._recordingTimestamp}startRecord(){}handleAddNaluTrack(e,t,i,s){}handleAddAudioTrack(e,t){}handleAddTrack(e){}stopRecordAndSave(){}startRecordingInterval(){}isWasmMp4(){return!1}stopRecordingInterval(){this.recordingInterval&&clearInterval(this.recordingInterval),this.recordingInterval=null}getToTalByteLength(){return 0}_reset(){this.fileName="",this._isRecording=!1,this._recordingTimestamp=0,this.stopRecordingInterval()}initMetaData(e,t){let i;const s=e.slice(5);if(this.codecId=t,this.metaInfo.avcc=s,t===vt)i=En(s);else if(t===_t){i=function(e){let t=23;const i=e[t];if((63&i)!==jt)return console.warn(`parseHEVCDecoderVPSAndSPSAndPPS and vpsTag is ${i}`),{};t+=2,t+=1;const s=e[t+1]|e[t]<<8;t+=2;const r=e.slice(t,t+s);t+=s;const a=e[t];if((63&a)!==Gt)return console.warn(`parseHEVCDecoderVPSAndSPSAndPPS and sps tag is ${a}`),{};t+=2,t+=1;const o=e[t+1]|e[t]<<8;t+=2;const n=e.slice(t,t+o);t+=o;const l=e[t];if((63&l)!==Vt)return console.warn(`parseHEVCDecoderVPSAndSPSAndPPS and pps tag is ${l}`),{};t+=2,t+=1;const d=e[t+1]|e[t]<<8;t+=2;const h=e.slice(t,t+d),c=new Uint8Array([o>>>24&255,o>>>16&255,o>>>8&255,255&o]),u=new Uint8Array([d>>>24&255,d>>>16&255,d>>>8&255,255&d]),p=new Uint8Array([s>>>24&255,s>>>16&255,s>>>8&255,255&s]),f=new Uint8Array(o+4);f.set(c,0),f.set(n,4);const m=new Uint8Array(d+4);m.set(u,0),m.set(h,4);const g=new Uint8Array(s+4);return g.set(p,0),g.set(r,4),{sps:f,pps:m,vps:g}}(s);const t=Un(e);i=Object.assign(i,t)}i&&(i.vps&&(this.vps=i.vps),i.pps&&(this.pps=i.pps),i.sps&&(this.sps=i.sps),i.presentWidth&&(this.metaInfo.presentWidth=i.presentWidth),i.presentHeight&&(this.metaInfo.presentHeight=i.presentHeight),i.codecWidth&&(this.metaInfo.codecWidth=i.codecWidth),i.codecHeight&&(this.metaInfo.codecHeight=i.codecHeight),i.timescale&&(this.metaInfo.timescale=i.timescale),i.refSampleDuration&&(this.metaInfo.refSampleDuration=i.refSampleDuration),i.videoType&&(this.metaInfo.videoType=i.videoType))}initAudioMetaData(e,t){this.audioCodeId=t;const i=e[0]>>1&1;let s=null;t===Et?(s=function(e){let t={},i=new Wr(e);return i.read(16),t.object_type=Jr(i),t.sample_rate=qr(i,t),t.chan_config=i.read(4),t.chan_config<Yr.length&&(t.channels=Yr[t.chan_config]),t.sbr=-1,t.ps=-1,5!=t.object_type&&29!=t.object_type||(29==t.object_type&&(t.ps=1),t.ext_object_type=5,t.sbr=1,t.sample_rate=qr(i,t),t.object_type=Jr(i)),{...t,channelCount:t.channels,sampleRate:t.sample_rate}}(e),s&&(s.channelCount&&(this.audioMetaInfo.channelCount=s.channelCount),s.codec&&(this.audioMetaInfo.codec=s.codec),s.originalCodec&&(this.audioMetaInfo.originalCodec=s.originalCodec),s.config&&(this.audioMetaInfo.config=s.config),s.sampleRate&&(this.audioMetaInfo.sampleRate=s.sampleRate),this.audioMetaInfo.sampleRate&&this.audioMetaInfo.timescale&&(this.audioMetaInfo.refSampleDuration=1024/this.audioMetaInfo.sampleRate*this.audioMetaInfo.timescale)),this.audioMetaInfo.depth=i?16:8,this.audioMetaInfo.extraData=e.slice(2)):this.audioMetaInfo.depth=0===i?8:16}initAudioAacExtraData(e){this.audioMetaInfo.extraData=new Uint8Array(e)}}class Jn extends Wn{constructor(e){super(e),this.totalByteLength=0,this._startRecordingTimestamp=null,e.debug.log("RecorderRTC","init")}destroy(){super.destroy(),this._reset(),this.player.debug.log("RecorderRTC","destroy")}_reset(){super._reset(),this.totalByteLength=0,this._startRecordingTimestamp=null,this.recorder&&(this.recorder.destroy(),this.recorder=null)}getSeekableBlob(e){const t=new EBML.Reader,i=new EBML.Decoder,s=EBML.tools,r=new FileReader;return new Promise(((a,o)=>{r.onload=function(e){i.decode(this.result).forEach((function(e){t.read(e)})),t.stop();const r=s.makeMetadataSeekable(t.metadatas,t.duration,t.cues),o=this.result.slice(t.metadataSize),n=new Blob([r,o],{type:"video/webm"});a(n)},r.readAsArrayBuffer(e)}))}startRecord(){const e=this.player.debug,t={type:"video",mimeType:"video/webm;codecs=h264",timeSlice:1e3,onTimeStamp:t=>{e.log("RecorderRTC","record timestamp :"+t),null===this._startRecordingTimestamp&&(this._startRecordingTimestamp=t),this._recordingTimestamp=(t-this._startRecordingTimestamp)/1e3},ondataavailable:t=>{this.totalByteLength+=t.size,e.log("RecorderRTC","ondataavailable",t.size)},disableLogs:!this.player._opt.debug};try{let i=null;if(this.player.getRenderType()===$?i=this.player.video.$videoElement.captureStream(25):this.player.video.mediaStream?i=this.player.video.mediaStream:this.player.isOldHls()||this.player._opt.useMSE||this.player._opt.useWCS?i=this.player.video.$videoElement.captureStream(25):this.player.isWebrtcH264()?i=this.player.webrtc.videoStream:this.player.isAliyunRtc()&&(i=this.player.video.$videoElement.captureStream(25)),!i)return e.error("RecorderRTC","startRecord error and can not create stream"),void this.player.emitError(nt.recordCreateError,"can not create stream");if(this.player.audio&&this.player.audio.mediaStreamAudioDestinationNode&&this.player.audio.mediaStreamAudioDestinationNode.stream&&!this.player.audio.isStateSuspended()&&this.player.audio.hasAudio&&this.player._opt.hasAudio){const e=this.player.audio.mediaStreamAudioDestinationNode.stream;if(e.getAudioTracks().length>0){const t=e.getAudioTracks()[0];t&&t.enabled&&i.addTrack(t)}}this.recorder=_n(i,t)}catch(t){return e.error("RecorderRTC","startRecord error",t),void this.player.emitError(nt.recordCreateError,t)}this.recorder&&(this._isRecording=!0,this.player.emit(nt.recording,!0),this.recorder.startRecording(),e.log("RecorderRTC","start recording"),this.player.emit(nt.recordStart),this.startRecordingInterval())}startRecordingInterval(){this.stopRecordingInterval(),this.recordingInterval=window.setInterval((()=>{this.player.emit(nt.recordingTimestamp,this._recordingTimestamp)}),1e3)}stopRecordAndSave(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yt,t=arguments.length>1?arguments[1]:void 0;return new Promise(((i,s)=>{this.recorder&&this._isRecording||s("recorder is not ready"),t&&this.setFileName(t),this.recorder.stopRecording((()=>{this.player.debug.log("RecorderRTC","stop recording");const t=(this.fileName||aa())+"."+w;if(this.recorder.getBlob(),e===At){const e=this.recorder.getBlob();i(e),this.player.emit(nt.recordBlob,e)}else i(),this.recorder.save(t);this.player.emit(nt.recordEnd),this._reset(),this.player.emit(nt.recording,!1)}))}))}getToTalByteLength(){return this.totalByteLength}getTotalDuration(){return this.recordTime}getType(){return w}initMetaData(){}}class qn{static init(){qn.types={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[],free:[],edts:[],elst:[],stss:[]};for(let e in qn.types)qn.types.hasOwnProperty(e)&&(qn.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);let e=qn.constants={};e.FTYP=new Uint8Array([105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,97,118,99,49,109,112,52,49,0,0,0,0]),e.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),e.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSC=e.STCO=e.STTS,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),e.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),e.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(e){let t=8,i=null,s=Array.prototype.slice.call(arguments,1),r=s.length;for(let e=0;e<r;e++)t+=s[e].byteLength;i=new Uint8Array(t),i[0]=t>>>24&255,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i.set(e,4);let a=8;for(let e=0;e<r;e++)i.set(s[e],a),a+=s[e].byteLength;return i}static generateInitSegment(e,t,i){let s=qn.box(qn.types.ftyp,qn.constants.FTYP),r=qn.box(qn.types.free),a=8,o=new Uint8Array;i+a>=Math.pow(2,32)-1?(a=16,o=new Uint8Array(i+a),o.set(new Uint8Array([0,0,0,1]),0),o.set(qn.types.mdat,4),o.set(new Uint8Array([i+8>>>56&255,i+8>>>48&255,i+8>>>40&255,i+8>>>32&255,i+8>>>24&255,i+8>>>16&255,i+8>>>8&255,i+8&255]),8)):(o=new Uint8Array(i+a),o[0]=i+8>>>24&255,o[1]=i+8>>>16&255,o[2]=i+8>>>8&255,o[3]=i+8&255,o.set(qn.types.mdat,4));for(let e=0;e<t.length;e++){let i=t[e];i.duration=i.refSampleDuration*i.sequenceNumber;for(let e=0;e<i.sequenceNumber;e++){let t=i.samples[e];t.chunkOffset=s.byteLength+r.byteLength+a;let n=t.data;o.set(n,a),a+=n.byteLength}}let n=qn.moov(e,t),l=new Uint8Array(s.byteLength+n.byteLength+o.byteLength+r.byteLength);return l.set(s,0),l.set(r,s.byteLength),l.set(o,s.byteLength+r.byteLength),l.set(n,s.byteLength+o.byteLength+r.byteLength),l}static moov(e,t){let i=e.timescale,s=e.duration,r=t.length,a=qn.mvhd(i,s),o=new Uint8Array;for(let e=0;e<r;e++){let i=qn.trak(t[e]),s=new Uint8Array(i.byteLength+o.byteLength);s.set(o,0),s.set(i,o.byteLength),o=new Uint8Array(s.byteLength),o.set(s,0)}return qn.box(qn.types.moov,a,o)}static mvhd(e,t){return qn.box(qn.types.mvhd,new Uint8Array([0,0,0,0,206,186,253,168,206,186,253,168,e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3]))}static trak(e){return qn.box(qn.types.trak,qn.tkhd(e),qn.mdia(e))}static tkhd(e){let t=e.id,i=e.duration,s=e.presentWidth,r=e.presentHeight;return qn.box(qn.types.tkhd,new Uint8Array([0,0,0,15,206,186,253,168,206,186,253,168,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,s>>>8&255,255&s,0,0,r>>>8&255,255&r,0,0]))}static edts(e,t){return qn.box(qn.types.edts,qn.elst(e,t))}static elst(e,t){let i=0;for(let s=0;s<t;s++)"video"===e[s].type&&(i+=e[s].duration);let s=e[t].duration;return 0===i&&(i=e[t].refSampleDuration),qn.box(qn.types.elst,new Uint8Array([0,0,0,0,0,0,0,2,i>>>24&255,i>>>16&255,i>>>8&255,255&i,255,255,255,255,0,1,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s,0,0,0,0,0,1,0,0]))}static mdia(e){return qn.box(qn.types.mdia,qn.mdhd(e),qn.hdlr(e),qn.minf(e))}static mdhd(e){let t=e.timescale/e.refSampleDuration,i=t*e.duration/e.timescale;return qn.box(qn.types.mdhd,new Uint8Array([0,0,0,0,206,186,253,168,206,186,253,168,t>>>24&255,t>>>16&255,t>>>8&255,255&t,i>>>24&255,i>>>16&255,i>>>8&255,255&i,85,196,0,0]))}static hdlr(e){let t=null;return t=qn.constants.HDLR_VIDEO,qn.box(qn.types.hdlr,t)}static minf(e){let t=null;return t=qn.box(qn.types.vmhd,qn.constants.VMHD),qn.box(qn.types.minf,t,qn.dinf(),qn.stbl(e))}static dinf(){return qn.box(qn.types.dinf,qn.box(qn.types.dref,qn.constants.DREF))}static stbl(e){let t=e.samples,i=[{No:1,num:0,sampleDelte:1,chunkNo:1,duration:t[0].duration}],s=[t[0].duration],r=t.length;for(let e=0;e<r;e++)for(let r=0;r<i.length;r++)t[e].duration===i[r].duration?i[r].num++:s.indexOf(t[e].duration)<0&&(s.push(t[e].duration),i.push({No:2,num:0,sampleDelte:1,chunkNo:e+1,duration:t[e].duration}));return qn.box(qn.types.stbl,qn.stsd(e),qn.stts(i),qn.stss(t),qn.stsc(i),qn.stsz(t),qn.stco(i,t))}static stts(e){let t=e.length,i=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]),s=i.byteLength,r=new Uint8Array(s+8*t);r.set(i,0);for(let i=0;i<t;i++)r.set(new Uint8Array([e[i].num>>>24&255,e[i].num>>>16&255,e[i].num>>>8&255,255&e[i].num,e[i].sampleDelte>>>24&255,e[i].sampleDelte>>>16&255,e[i].sampleDelte>>>8&255,255&e[i].sampleDelte]),s),s+=8;return qn.box(qn.types.stts,r)}static stss(e){let t=[],i=e.length;for(let s=0;s<i;s++)!0===e[s].isKeyframe&&t.push(s+1);let s=t.length,r=new Uint8Array([0,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s]),a=r.byteLength,o=new Uint8Array(a+4*s);o.set(r,0);for(let e=0;e<s;e++)o.set(new Uint8Array([t[e]>>>24&255,t[e]>>>16&255,t[e]>>>8&255,255&t[e]]),a),a+=4;return qn.box(qn.types.stss,o)}static stsc(e){let t=e.length,i=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]),s=i.byteLength,r=new Uint8Array(s+12*t);r.set(i,0);for(let i=0;i<t;i++){let t=e[i].chunkNo,a=e[i].num,o=e[i].sampleDelte;r.set(new Uint8Array([t>>>24&255,t>>>16&255,t>>>8&255,255&t,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o]),s),s+=12}return qn.box(qn.types.stsc,r)}static stsz(e){let t=e.length,i=new Uint8Array([0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]),s=i.byteLength,r=new Uint8Array(s+4*t);r.set(i,0);for(let i=0;i<t;i++){let t=e[i].data.byteLength;r.set(new Uint8Array([t>>>24&255,t>>>16&255,t>>>8&255,255&t]),s),s+=4}return qn.box(qn.types.stsz,r)}static stco(e,t){let i=t[0].chunkOffset;return qn.box(qn.types.stco,new Uint8Array([0,0,0,0,0,0,0,1,i>>>24&255,i>>>16&255,i>>>8&255,255&i]))}static stsd(e){return"audio"===e.type?"mp3"===e.codec?qn.box(qn.types.stsd,qn.constants.STSD_PREFIX,qn.mp3(e)):qn.box(qn.types.stsd,qn.constants.STSD_PREFIX,qn.mp4a(e)):"avc"===e.videoType?qn.box(qn.types.stsd,qn.constants.STSD_PREFIX,qn.avc1(e)):qn.box(qn.types.stsd,qn.constants.STSD_PREFIX,qn.hvc1(e))}static mp3(e){let t=e.channelCount,i=e.sampleRate,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return qn.box(qn.types[".mp3"],s)}static mp4a(e){let t=e.channelCount,i=e.sampleRate,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return qn.box(qn.types.mp4a,s,qn.esds(e))}static esds(e){let t=e.config||[],i=t.length,s=new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(t).concat([6,1,2]));return qn.box(qn.types.esds,s)}static avc1(e){let t=e.avcc,i=e.codecWidth,s=e.codecHeight,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,s>>>8&255,255&s,0,72,0,0,0,72,0,0,0,0,0,0,0,1,13,106,101,115,115,105,98,117,99,97,45,112,114,111,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return qn.box(qn.types.avc1,r,qn.box(qn.types.avcC,t))}static hvc1(e){let t=e.avcc;const i=e.codecWidth,s=e.codecHeight;let r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,s>>>8&255,255&s,0,72,0,0,0,72,0,0,0,0,0,0,0,1,13,106,101,115,115,105,98,117,99,97,45,112,114,111,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return qn.box(qn.types.hvc1,r,qn.box(qn.types.hvcC,t))}static mvex(e){return qn.box(qn.types.mvex,qn.trex(e))}static trex(e){let t=e.id,i=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return qn.box(qn.types.trex,i)}static moof(e,t){return qn.box(qn.types.moof,qn.mfhd(e.sequenceNumber),qn.traf(e,t))}static mfhd(e){let t=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return qn.box(qn.types.mfhd,t)}static traf(e,t){let i=e.id,s=qn.box(qn.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),r=qn.box(qn.types.tfdt,new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),a=qn.sdtp(e),o=qn.trun(e,a.byteLength+16+16+8+16+8+8);return qn.box(qn.types.traf,s,r,o,a)}static sdtp(e){let t=e.samples||[],i=t.length,s=new Uint8Array(4+i);for(let e=0;e<i;e++){let i=t[e].flags;s[e+4]=i.isLeading<<6|i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy}return qn.box(qn.types.sdtp,s)}static trun(e,t){let i=e.samples||[],s=i.length,r=12+16*s,a=new Uint8Array(r);t+=8+r,a.set([0,0,15,1,s>>>24&255,s>>>16&255,s>>>8&255,255&s,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0);for(let e=0;e<s;e++){let t=i[e].duration,s=i[e].size,r=i[e].flags,o=i[e].cts;a.set([t>>>24&255,t>>>16&255,t>>>8&255,255&t,s>>>24&255,s>>>16&255,s>>>8&255,255&s,r.isLeading<<2|r.dependsOn,r.isDependedOn<<6|r.hasRedundancy<<4|r.isNonSync,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o],12+16*e)}return qn.box(qn.types.trun,a)}static mdat(e){return qn.box(qn.types.mdat,e)}}qn.init();class Kn extends Wn{constructor(e){super(e),this.TAG_NAME="recorderMP4",this._reset(),e.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this._reset(),this.player.debug.log(this.TAG_NAME,"destroy")}_reset(){super._reset(),this.totalDuration=0,this.totalAudioDuration=0,this.totalByteLength=0,this.totalAudioByteLength=0,this.bufferList=[],this.audioBufferList=[],this.cacheTrack={},this.audioCacheTrack={},this.sequenceNumber=0,this.audioSequenceNumber=0}startRecord(){const e=this.player.debug;this._isRecording=!0,this.player.emit(nt.recording,!0),e.log(this.TAG_NAME,"start recording"),this.player.emit(nt.recordStart),this.startRecordingInterval()}startRecordingInterval(){this.stopRecordingInterval(),this.recordingInterval=window.setInterval((()=>{this.player.emit(nt.recordingTimestamp,this.getTotalDuration())}),1e3)}formatFmp4Track(e,t,i,s){return{id:1,sequenceNumber:++this.sequenceNumber,size:e.byteLength,dts:i,cts:s,isKeyframe:t,data:e,duration:0,flags:{isLeading:0,dependsOn:t?2:1,isDependedOn:t?1:0,hasRedundancy:0,isNonSync:t?0:1}}}formatAudioFmp4Track(e,t){return{id:2,sequenceNumber:++this.audioSequenceNumber,size:e.byteLength,dts:t,pts:t,cts:0,data:new Uint8Array(e),duration:0,originalDts:t,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}}handleAddNaluTrack(e,t,i,s){this.cacheTrack.id&&i>=this.cacheTrack.dts?(this.cacheTrack.duration=i-this.cacheTrack.dts,this.handleAddFmp4Track(this.cacheTrack)):this.cacheTrack={},this.cacheTrack=this.formatFmp4Track(e,t,i,s)}handleAddAudioTrack(e,t){}handleAddFmp4Track(e){if(!this.isRecording)return void this.player.debug.error(this.TAG_NAME,"handleAddFmp4Track, isRecording is false ");if((null===this.sps||null===this.pps)&&this.isH264)return void this.player.debug.error(this.TAG_NAME,"handleAddFmp4Track, is h264 and this.sps or this.pps is null ");if((null===this.sps||null===this.pps||null===this.vps)&&this.isH265)return void this.player.debug.error(this.TAG_NAME,"handleAddFmp4Track, is h265 and this.sps or this.pps or this.vps is null ");const t=Object.assign({},e);t.pts=t.dts+t.cts;const i=t.data;if(t.isKeyframe)if(this.isH264){const e=new Uint8Array(this.sps.byteLength+this.pps.byteLength);e.set(this.sps,0),e.set(this.pps,this.sps.byteLength);const s=new Uint8Array(e.byteLength+i.byteLength);s.set(e,0),s.set(i,e.byteLength),t.data=s}else if(this.isH265){const e=new Uint8Array(this.sps.byteLength+this.pps.byteLength+this.vps.byteLength);e.set(this.vps,0),e.set(this.sps,this.vps.byteLength),e.set(this.pps,this.vps.byteLength+this.sps.byteLength);const s=new Uint8Array(e.byteLength+i.byteLength);s.set(e,0),s.set(i,e.byteLength),t.data=s}t.size=t.data.byteLength,this.totalDuration+=t.duration,this.totalByteLength+=t.data.byteLength,t.duration=0,t.originalDts=t.dts,delete t.id,delete t.sequenceNumber,this.bufferList.push(t)}handleAddFmp4AudioTrack(e){const t=Object.assign({},e);t.pts=t.dts+t.cts,t.size=t.data.byteLength,this.totalAudioDuration+=t.duration,this.totalAudioByteLength+=t.data.byteLength,t.duration=0,t.originalDts=t.dts,delete t.id,delete t.sequenceNumber,this.audioBufferList.push(t)}getTotalDuration(){return this.totalDuration/1e3}getType(){return S}getToTalByteLength(){return this.totalByteLength+this.totalAudioByteLength}stopRecordAndSave(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yt,t=arguments.length>1?arguments[1]:void 0;return new Promise(((i,s)=>{if(!this.isRecording)return this.player.debug.error(this.TAG_NAME,"stop recording fail, isRecording is false "),s("stop recording fail, isRecording is false ");if(0===this.bufferList.length)return this.player.debug.error(this.TAG_NAME,"stop recording fail, this.bufferList.length is 0 "),s("stop recording fail, this.bufferList.length is 0 ");t&&this.setFileName(t);const r={id:1,type:"video",sps:this.sps,pps:this.pps,samples:this.bufferList,sequenceNumber:this.bufferList.length,length:0,addSampleNum:1,duration:0,...this.metaInfo},a={id:2,type:"audio",sequenceNumber:this.audioBufferList.length,samples:this.audioBufferList,...this.audioMetaInfo},o=[r];a.samples.length>0&&o.push(a),this.player.debug.log(this.TAG_NAME,`trackList length is ${o.length}`);const n=qn.generateInitSegment({timescale:1e3,duration:this.totalDuration},o,this.totalByteLength+this.totalAudioByteLength);this.player.debug.log(this.TAG_NAME,"stop recording");const l=new Blob([n],{type:"application/octet-stream"});if(e===At)i(l),this.player.emit(nt.recordBlob,l);else{i();Da((this.fileName||aa())+"."+S,l)}this._reset(),this.player.emit(nt.recording,!1)}))}}class Yn extends Wn{constructor(e){super(e),this.TAG_NAME="FlvRecorderLoader",this.player=e,this._init(),this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this._init(),this.player.debug.log(this.TAG_NAME,"destroy")}_init(){this.hasAudio=!1,this.hasVideo=!1,this.startTime=null,this.currentTime=0,this.prevTimestamp=0,this.totalByteLength=0,this.totalDuration=0,this.flvMetaData=null,this.aacSequenceHeader=null,this.videoSequenceHeader=null,this.bufferList=[]}_reset(){super._reset(),this._init()}startRecord(){const e=this.player.debug;this._isRecording=!0,this.player.emit(nt.recording,!0),e.log(this.TAG_NAME,"start recording"),this.player.emit(nt.recordStart),this.startRecordingInterval()}startRecordingInterval(){this.stopRecordingInterval(),this.recordingInterval=window.setInterval((()=>{this.player.emit(nt.recordingTimestamp,this.getTotalDuration())}),1e3)}addMetaData(e){this.flvMetaData=e}addAACSequenceHeader(e){this.aacSequenceHeader=e}addVideoSequenceHeader(e){this.videoSequenceHeader=e}addVideo(e,t){this._setStartTime(t);const i=this._getBufferTs(t);this.hasVideo=!0,this._createBufferItem(e,Ge,i)}addAudio(e,t){this._setStartTime(t);const i=this._getBufferTs(t);this.hasAudio=!0,this._createBufferItem(e,ze,i)}_setStartTime(e){null===this.startTime&&this._isRecording&&(this.startTime=e,this.player.debug.log(this.TAG_NAME,`_setStartTime is ${e}`))}_getBufferTs(e){e>this.currentTime&&(this.currentTime=e);let t=0;return this.startTime&&e>=this.startTime&&(t=e-this.startTime),t>this.prevTimestamp?this.prevTimestamp=t:t=this.prevTimestamp,t}_createBufferItem(e,t,i){const s=this._createFlvPacket(e,t,i),r=this._createFlvTag(s);this.totalByteLength+=r.byteLength,this.bufferList.push(r)}_createFlvTag(e){let t=11+e.header.length,i=new Uint8Array(t+4);i[0]=e.header.type;let s=new DataView(i.buffer);return i[1]=e.header.length>>16&255,i[2]=e.header.length>>8&255,i[3]=255&e.header.length,i[4]=e.header.timestamp>>16&255,i[5]=e.header.timestamp>>8&255,i[6]=255&e.header.timestamp,i[7]=e.header.timestamp>>24&255,i[8]=0,i[9]=0,i[10]=0,s.setUint32(t,t),i.set(e.payload.subarray(0,e.header.length),11),i}_createFlvPacket(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{header:{length:e?e.length:0,timestamp:i,type:t},payload:e}}stopRecordAndSave(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yt,t=arguments.length>1?arguments[1]:void 0;return new Promise(((i,s)=>{if(!this.isRecording)return this.player.debug.error(this.TAG_NAME,"stop recording fail, isRecording is false "),s("stop recording fail, isRecording is false ");if(0===this.bufferList.length)return this.player.debug.error(this.TAG_NAME,"stop recording fail, this.bufferList.length is 0 "),s("stop recording fail, this.bufferList.length is 0 ");t&&this.setFileName(t);const r=new Uint8Array([70,76,86,1,0,0,0,0,9,0,0,0,0]);this.hasVideo&&(r[4]|=1),this.hasAudio&&(r[4]|=4);let a=[r];if(this.flvMetaData){const e=this._createFlvPacket(this.flvMetaData,He),t=this._createFlvTag(e);a.push(t)}if(this.videoSequenceHeader){const e=this._createFlvPacket(this.videoSequenceHeader,Ge),t=this._createFlvTag(e);a.push(t)}if(this.aacSequenceHeader){const e=this._createFlvPacket(this.aacSequenceHeader,ze),t=this._createFlvTag(e);a.push(t)}const o=function(e){const t=e[0].constructor;return e.reduce(((e,i)=>{const s=new t((0|e.byteLength)+(0|i.byteLength));return s.set(e,0),s.set(i,0|e.byteLength),s}),new t)}(a.concat(this.bufferList));this.player.debug.log(this.TAG_NAME,"stop recording");const n=new Blob([o],{type:"application/octet-stream"});if(e===At)i(n),this.player.emit(nt.recordBlob,n);else{i();Da((this.fileName||aa())+"."+E,n)}this._reset(),this.player.emit(nt.recording,!1)}))}getTotalDuration(){let e=0;return null!==this.startTime&&null!==this.currentTime&&(e=this.currentTime-this.startTime),Math.round(e/1e3)}getType(){return E}getToTalByteLength(){return this.totalByteLength}}const Qn={init:0,findFirstStartCode:1,findSecondStartCode:2};class Xn extends So{constructor(e){super(),this.player=e,this.isDestroyed=!1,this.reset()}destroy(){this.isDestroyed=!1,this.off(),this.reset()}reset(){this.stats=Qn.init,this.tempBuffer=new Uint8Array(0),this.parsedOffset=0,this.versionLayer=0}dispatch(e,t){let i=new Uint8Array(this.tempBuffer.length+e.length);for(i.set(this.tempBuffer,0),i.set(e,this.tempBuffer.length),this.tempBuffer=i;!this.isDestroyed;){if(this.state==Qn.Init){let e=!1;for(;this.tempBuffer.length-this.parsedOffset>=2&&!this.isDestroyed;)if(255==this.tempBuffer[this.parsedOffset]){if(!(!1&this.tempBuffer[this.parsedOffset+1])){this.versionLayer=this.tempBuffer[this.parsedOffset+1],this.state=Qn.findFirstStartCode,this.fisrtStartCodeOffset=this.parsedOffset,this.parsedOffset+=2,e=!0;break}this.parsedOffset++}else this.parsedOffset++;if(e)continue;break}if(this.state==Qn.findFirstStartCode){let e=!1;for(;this.tempBuffer.length-this.parsedOffset>=2&&!this.isDestroyed;)if(255==this.tempBuffer[this.parsedOffset]){if(this.tempBuffer[this.parsedOffset+1]==this.versionLayer){this.state=Qn.findSecondStartCode,this.secondStartCodeOffset=this.parsedOffset,this.parsedOffset+=2,e=!0;break}this.parsedOffset++}else this.parsedOffset++;if(e)continue;break}if(this.state==Qn.findSecondStartCode){let e=this.tempBuffer.slice(this.fisrtStartCodeOffset,this.secondStartCodeOffset);this.emit("data",e,t),this.tempBuffer=this.tempBuffer.slice(this.secondStartCodeOffset),this.fisrtStartCodeOffset=0,this.parsedOffset=2,this.state=Qn.findFirstStartCode}}}}class Zn extends Wn{constructor(e){super(e),this.TAG_NAME="recorderWasmMP4",this._reset(),this.wasmMp4Recorder=new window.JessibucaProMp4Recorder({debug:e._opt.debug,debugLevel:e._opt.debugLevel,debugUuid:e._opt.debugUuid,decoder:e._opt.wasmMp4RecorderDecoder}),this.wasmMp4Recorder.on("recordingTimestamp",(e=>{this._recordingTimestamp=e/1e3})),this.mp3Demuxer=null,e.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.mp3Demuxer&&(this.mp3Demuxer.destroy(),this.mp3Demuxer=null),this._reset(),this.player.debug.log(this.TAG_NAME,"destroy")}_reset(){super._reset(),this.cacheTrack={},this.audioCacheTrack={},this.totalDuration=0,this.totalAudioDuration=0,this.totalByteLength=0,this.totalAudioByteLength=0,this.hasAudio=!1,this.hasVideo=!1}getType(){return S}isWasmMp4(){return!0}getTotalDuration(){return this.totalDuration/1e3}getToTalByteLength(){return this.totalByteLength+this.totalAudioByteLength}startRecord(){const e=this.player.debug,t=this.player.getAudioInfo(),i=this.player.getVideoInfo(),s={};if(this.codecId){const e={type:this.codecId,width:i.width,height:i.height,extraData:this.metaInfo.avcc};s.video=e,this.hasVideo=!0}if(t.encTypeCode){const e={type:t.encTypeCode,sampleRate:t.sampleRate,channels:t.channels,extraData:this.audioMetaInfo.extraData,depth:t.depth};this.audioCodeId=t.encTypeCode,s.audio=e,this.hasAudio=!0}this.wasmMp4Recorder.startRecord(s).then((()=>{this._isRecording=!0,this.player.emit(nt.recording,!0),e.log(this.TAG_NAME,"start recording"),this.player.emit(nt.recordStart),this.startRecordingInterval()})).catch((t=>{e.error(this.TAG_NAME,"startRecord error",t),this.player.emitError(nt.recordCreateError,t)}))}startRecordingInterval(){this.stopRecordingInterval(),this.recordingInterval=window.setInterval((()=>{this.player.emit(nt.recordingTimestamp,this.recordTime)}),1e3)}stopRecordAndSave(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yt,t=arguments.length>1?arguments[1]:void 0;return new Promise(((i,s)=>this.isRecording?0===this.totalDuration?(this.player.debug.error(this.TAG_NAME,"stop recording fail, totalDuration is 0 "),s("stop recording fail, totalDuration is 0 ")):(t&&this.setFileName(t),void this.wasmMp4Recorder.stopRecord().then((t=>{if(e===At)i(t),this.player.emit(nt.recordBlob,t);else{i();Da((this.fileName||aa())+"."+S,t)}})).catch((e=>{this.player.debug.error(this.TAG_NAME,"stopRecord error",e),s(e)})).finally((()=>{this._reset(),this.player.emit(nt.recording,!1)}))):(this.player.debug.error(this.TAG_NAME,"stop recording fail, isRecording is false "),s("stop recording fail, isRecording is false "))))}handleAddAudioTrack(e,t){this.audioCodeId===Tt?(this.mp3Demuxer||(this.mp3Demuxer=new Xn(this.player),this.mp3Demuxer.on("data",((e,t)=>{this._handleAddAudioTrack(e,t)}))),this.mp3Demuxer.dispatch(e,t)):this._handleAddAudioTrack(e,t)}_handleAddAudioTrack(e,t){po(this.hasAudio)||(this.audioCacheTrack.id&&t>=this.audioCacheTrack.dts?(this.audioCacheTrack.duration=t-this.audioCacheTrack.dts,this.totalAudioDuration+=this.audioCacheTrack.duration,this.totalAudioByteLength+=this.audioCacheTrack.payload.byteLength,this.wasmMp4Recorder.sendAudioFrame(this.audioCacheTrack.payload,this.audioCacheTrack.dts)):this.audioCacheTrack={},this.audioCacheTrack={id:2,payload:e,dts:t})}handleAddNaluTrack(e,t,i,s){po(this.hasVideo)||(this.cacheTrack.id&&i>=this.cacheTrack.dts?(this.cacheTrack.duration=i-this.cacheTrack.dts,this.totalDuration+=this.cacheTrack.duration,this.totalByteLength+=this.cacheTrack.payload.byteLength,this.wasmMp4Recorder.sendVideoFrame(this.cacheTrack.payload,this.cacheTrack.isIFrame,this.cacheTrack.dts,this.cacheTrack.cts)):this.cacheTrack={},this.cacheTrack={id:1,payload:e,isIFrame:t,dts:i,cts:s})}}class el{constructor(e){return new(el.getLoaderFactory(e._opt))(e)}static getLoaderFactory(e){if(e.recordType===S){if(e.useWasm||e.useMSE||e.useWCS)return window.JessibucaProMp4Recorder&&e.mp4RecordUseWasm?Zn:Kn}else if(e.recordType===E)return Yn;return Jn}}function tl(e,t,i){let s=e;if(t+i<s.length){for(;i--;)if(128!=(192&s[++t]))return!1;return!0}return!1}function il(e){let t=[],i=e,s=0,r=e.length;for(;s<r;)if(i[s]<128)t.push(String.fromCharCode(i[s])),++s;else{if(i[s]<192);else if(i[s]<224){if(tl(i,s,1)){let e=(31&i[s])<<6|63&i[s+1];if(e>=128){t.push(String.fromCharCode(65535&e)),s+=2;continue}}}else if(i[s]<240){if(tl(i,s,2)){let e=(15&i[s])<<12|(63&i[s+1])<<6|63&i[s+2];if(e>=2048&&55296!=(63488&e)){t.push(String.fromCharCode(65535&e)),s+=3;continue}}}else if(i[s]<248&&tl(i,s,3)){let e=(7&i[s])<<18|(63&i[s+1])<<12|(63&i[s+2])<<6|63&i[s+3];if(e>65536&&e<1114112){e-=65536,t.push(String.fromCharCode(e>>>10|55296)),t.push(String.fromCharCode(1023&e|56320)),s+=4;continue}}t.push(String.fromCharCode(65533)),++s}return t.join("")}let sl=function(){let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}();class rl{static parseScriptData(e,t,i){let s={};try{let r=rl.parseValue(e,t,i),a=rl.parseValue(e,t+r.size,i-r.size);s[r.data]=a.data}catch(e){console.error("AMF",e.toString())}return s}static parseObject(e,t,i){let s=rl.parseString(e,t,i),r=rl.parseValue(e,t+s.size,i-s.size),a=r.objectEnd;return{data:{name:s.data,value:r.data},size:s.size+r.size,objectEnd:a}}static parseVariable(e,t,i){return rl.parseObject(e,t,i)}static parseString(e,t,i){let s,r=new DataView(e,t,i).getUint16(0,!sl);return s=r>0?il(new Uint8Array(e,t+2,r)):"",{data:s,size:2+r}}static parseLongString(e,t,i){let s,r=new DataView(e,t,i).getUint32(0,!sl);return s=r>0?il(new Uint8Array(e,t+4,r)):"",{data:s,size:4+r}}static parseDate(e,t,i){let s=new DataView(e,t,i),r=s.getFloat64(0,!sl);return r+=60*s.getInt16(8,!sl)*1e3,{data:new Date(r),size:10}}static parseValue(e,t,i){let s,r=new DataView(e,t,i),a=1,o=r.getUint8(0),n=!1;try{switch(o){case 0:s=r.getFloat64(1,!sl),a+=8;break;case 1:s=!!r.getUint8(1),a+=1;break;case 2:{let r=rl.parseString(e,t+1,i-1);s=r.data,a+=r.size;break}case 3:{s={};let o=0;for(9==(16777215&r.getUint32(i-4,!sl))&&(o=3);a<i-4;){let r=rl.parseObject(e,t+a,i-a-o);if(r.objectEnd)break;s[r.data.name]=r.data.value,a+=r.size}if(a<=i-3){9===(16777215&r.getUint32(a-1,!sl))&&(a+=3)}break}case 8:{s={},a+=4;let o=0;for(9==(16777215&r.getUint32(i-4,!sl))&&(o=3);a<i-8;){let r=rl.parseVariable(e,t+a,i-a-o);if(r.objectEnd)break;s[r.data.name]=r.data.value,a+=r.size}if(a<=i-3){9===(16777215&r.getUint32(a-1,!sl))&&(a+=3)}break}case 9:s=void 0,a=1,n=!0;break;case 10:{s=[];let o=r.getUint32(1,!sl);a+=4;for(let r=0;r<o;r++){let r=rl.parseValue(e,t+a,i-a);s.push(r.data),a+=r.size}break}case 11:{let r=rl.parseDate(e,t+1,i-1);s=r.data,a+=r.size;break}case 12:{let r=rl.parseString(e,t+1,i-1);s=r.data,a+=r.size;break}default:a=i,console.warn("AMF","Unsupported AMF value type "+o)}}catch(e){console.error("AMF",e.toString())}return{data:s,size:a,objectEnd:n}}}function al(e){return rl.parseScriptData(e.buffer,e.byteOffset,e.byteLength)}class ol{constructor(e){this.player=e,this.destroyResolve=null,this.workerClearTimeout=null,this.workerUrl=null;let t=e._opt.decoder;if(this.decoderWorkerCloseTimeout=null,po(this.player._opt.useWasm)&&(t=this.player._opt.demuxUseWorker?this.player._opt.mseDecodeAudio||po(this.player._opt.hasAudio)?e._opt.decoderHardNotWasm:e._opt.decoderHard:e._opt.decoderAudio),0===t.indexOf("http")&&this.player._opt.isDecoderUseCDN){const e=new Blob([`importScripts("${t}")`],{type:"application/javascript"});t=window.URL.createObjectURL(e),this.workerUrl=t,this.workerClearTimeout=setTimeout((()=>{window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null,this.workerClearTimeout=null}),te)}this.decoderWorker=new Worker(t),this._initDecoderWorker(),e.debug.log("decoderWorker",`init and decoder url is ${t}`),e.on(nt.visibilityChange,(()=>{this.updateWorkConfig({key:"visibility",value:e.visibility})}))}destroy(){return new Promise(((e,t)=>{if(this.player.loaded)if(this.player.debug.log("decoderWorker","has loaded and post message to destroy"),this.decoderWorker){const t={};this.player.isMseDecoderUseWorker()&&(t.isVideoInited=this.player.isMseVideoStateInited()),this.decoderWorker.postMessage({cmd:qe,options:t}),this.destroyResolve=e,this.decoderWorkerCloseTimeout=setTimeout((()=>{this.player.debug.warn("decoderWorker","send close but not response and destroy directly"),this.decoderWorkerCloseTimeout&&(clearTimeout(this.decoderWorkerCloseTimeout),this.decoderWorkerCloseTimeout=null),this._destroy(),setTimeout((()=>{e()}),0)}),2e3)}else this.player.debug.warn("decoderWorker","has loaded but decoderWorker is null and destroy directly"),this._destroy(),setTimeout((()=>{e()}),0);else this.player.debug.log("decoderWorker","has not loaded and destroy directly"),this._destroy(),setTimeout((()=>{e()}),0)}))}_destroy(){this.decoderWorkerCloseTimeout&&(clearTimeout(this.decoderWorkerCloseTimeout),this.decoderWorkerCloseTimeout=null),this.workerUrl&&(window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null),this.workerClearTimeout&&(clearTimeout(this.workerClearTimeout),this.workerClearTimeout=null),this.decoderWorker&&(this.decoderWorker.terminate(),this.decoderWorker.onerror=null,this.decoderWorker.onmessageerror=null,this.decoderWorker.onmessage=null,this.decoderWorker=null),this.player.debug.log("decoderWorker","destroy"),this.destroyResolve&&(this.destroyResolve(),this.destroyResolve=null)}_initDecoderWorker(){const{debug:e,events:{proxy:t}}=this.player;this.decoderWorker.onerror=e=>{this.player.debug.error("decoderWorker","onerror",e),this.player.emitError(ct.decoderWorkerInitError,e)},this.decoderWorker.onmessageerror=e=>{this.player.debug.error("decoderWorker","onmessageerror",e)},this.decoderWorker.onmessage=t=>{const i=t.data;switch(i.cmd){case re:e.log("decoderWorker","onmessage:",re),this.decoderWorker&&this._initWork(),this.player.loaded||this.player.emit(nt.load),this.player.emit(nt.decoderWorkerInit);break;case ue:e.log("decoderWorker","onmessage:",ue,i.code),this.player._times.decodeStart||(this.player._times.decodeStart=aa()),this.player.video.updateVideoInfo({encTypeCode:i.code});break;case pe:e.log("decoderWorker","onmessage:",pe,i.codecId),this.player.recorder&&this.player.recorder.initMetaData(i.buffer,i.codecId),this.player.video.updateVideoInfo({encTypeCode:i.codecId});break;case de:e.log("decoderWorker","onmessage:",de,i.code),this.player.audio&&this.player.audio.updateAudioInfo({encTypeCode:i.code});break;case ce:e.log("decoderWorker","onmessage:",ce),this.player.recorder&&this.player.recorder.initAudioAacExtraData(i.buffer);break;case ae:if(e.log("decoderWorker","onmessage:",ae,`width:${i.w},height:${i.h}`),La(i.w)||La(i.h))return void this.player.emitError(ct.videoInfoError,`video width ${i.w} or height ${i.h} is empty`);if(this.player.video.updateVideoInfo({width:i.w,height:i.h}),!this.player._opt.openWebglAlignment&&i.w/2%4!=0&&this.player.getRenderType()===$)return void this.player.emitError(ct.webglAlignmentError);this.player.video.initCanvasViewSize(),this.player._opt.playType===_&&(this.player.video.initFps(),this.player.video.initVideoDelay());break;case le:if(e.log("decoderWorker","onmessage:",le,`channels:${i.channels},sampleRate:${i.sampleRate}`),i.channels>2)return void this.player.emitError(ct.audioChannelError,`audio channel is ${i.channels}, max is 2`);this.player.audio&&(this.player.audio.updateAudioInfo(i),this.player._opt.playType===b?this.player.audio.initScriptNode():this.player._opt.playType===_&&this.player.audio.initScriptNodeDelay());break;case oe:if(!this.player.video)return void e.warn("decoderWorker","onmessage render but video is null");if(this.player.isPlayer()){if(po(this.player.video.getHasInit()))return void e.warn("decoderWorker","onmessage render but video has not init");this.player.video.render(i),this.player.handleRender(),this.player.emit(nt.timeUpdate,i.ts),this.player.updateStats({dfps:!0,buf:i.delay}),this.player._times.videoStart||(this.player._times.videoStart=aa(),this.player.handlePlayToRenderTimes())}else this.player.isPlayback()&&(this.player.updateStats({dfps:!0}),po(this.player.playbackPause)?(this.player.playback.isUseLocalCalculateTime&&this.player.playback.increaseLocalTimestamp(),this.player.playback.isUseFpsRender?this.player.video.pushData(i):this.player.video.render$2(i)):!this.player.playback.isPlaybackPauseClearCache&&this.player.playback.isCacheBeforeDecodeForFpsRender&&this.player.playback.isUseFpsRender&&this.player.video.pushData(i));break;case fe:this.player.recorder&&this.player.recorder.isRecording&&this.player._opt.recordType===S&&this.player.recorder.handleAddNaluTrack(i.buffer,i.isIFrame,i.ts,i.cts);break;case he:this.player.recorder&&this.player.recorder.isRecording&&this.player._opt.recordType===S&&this.player.recorder.isWasmMp4()&&this.player.recorder.handleAddAudioTrack(i.buffer,i.ts);break;case me:const{webcodecsDecoder:t,mseDecoder:s}=this.player;this.player.updateStats({buf:i.delay});const r=new Uint8Array(i.payload);this.player._opt.useWCS&&!this.player._opt.useOffscreen?t.decodeVideo(r,i.ts,i.isIFrame,i.cts):this.player._opt.useMSE&&s.decodeVideo(r,i.ts,i.isIFrame,i.cts);break;case ge:if(this.player._opt.useMSE){const e=new Uint8Array(i.payload);this.player.mseDecoder.decodeAudio(e,i.ts,i.cts)}break;case ne:if(!this.player.audio)return void e.warn("decoderWorker","onmessage playAudio but audio is null");(this.player.playing&&this.player.audio||!this.player.video)&&(this.player._opt.hasVideo||this.player.handleRender(),(this.player._opt.playType===b||this.player._opt.playType===_&&(po(this.player.playbackPause)||!this.player.playback.isPlaybackPauseClearCache&&this.player.playback.isCacheBeforeDecodeForFpsRender&&this.player.playback.isUseFpsRender))&&this.player.audio.play(i.buffer,i.ts));break;case Ae:if(i.type===nt.streamSuccess)this.player.stream?this.player.stream.emit(nt.streamSuccess):e.warn("decoderWorker","onmessage and workerFetch response stream success but stream is null");else if(i.type===nt.streamRate)this.player.emit(nt.kBps,(i.value/1024).toFixed(2));else if(i.type===nt.streamEnd)this.player?(i.value===f&&this.player.emit(nt.websocketClose,i.msg),this.player.stream?this.player.stream.emit(nt.streamEnd,i.msg):e&&e.warn("decoderWorker","onmessage and workerFetch response stream end but player.stream is null")):e&&e.warn("decoderWorker","onmessage and workerFetch response stream end but player is null");else if(i.type===ct.websocketError)this.player&&this.player.stream?this.player.stream.emit(ct.websocketError,i.value):e&&e.warn("decoderWorker","onmessage and workerFetch response websocket error but stream is null");else if(i.type===ct.fetchError)this.player&&this.player.stream?this.player.stream.emit(ct.fetchError,i.value):e&&e.warn("decoderWorker","onmessage and workerFetch response fetch error but stream is null");else if(i.type===nt.streamAbps)this.player.updateStats({abps:i.value});else if(i.type===nt.streamVbps)this.player._times.demuxStart||(this.player._times.demuxStart=aa()),this.player.updateStats({vbps:i.value});else if(i.type===nt.streamDts)this.player.updateStats({dts:i.value});else if(i.type===nt.netBuf)this.player.updateStats({netBuf:i.value});else if(i.type===nt.networkDelayTimeout)this.player.emit(nt.networkDelayTimeout,i.value);else if(i.type===nt.streamStats){const e=JSON.parse(i.value);this.player.updateStats({workerStats:e})}else i.type===nt.websocketOpen&&this.player.emit(nt.websocketOpen);break;case be:this.player&&(this.player.videoIframeIntervalTs=i.value);break;case ve:this.player&&this.player.updateStats({isDropping:!0});break;case Ie:this.player.decoderCheckFirstIFrame();break;case Se:this.player&&this.player.video&&this.player.video.setStreamFps(i.value);break;case ye:i.message&&-1!==i.message.indexOf(Oe)&&this.player.emitError(ct.wasmDecodeError,"");break;case we:this.player.emitError(ct.wasmDecodeVideoNoResponseError);break;case ke:this.player.emitError(ct.simdH264DecodeVideoWidthIsTooLarge);break;case Ee:this.player.emitError(ct.wasmWidthOrHeightChange);break;case Te:this.player.emitError(ct.simdDecodeError);break;case _e:e.log("decoderWorker","onmessage:",_e);break;case Ce:e.log("decoderWorker","onmessage:",Ce),this._destroy();break;case xe:this.player&&this.player.pushTempStream(i.buffer);break;case Re:this.player&&this.player.emit(nt.videoSEI,{ts:i.ts,data:new Uint8Array(i.buffer)});break;case De:if(this.player){if(this.player.isRecordTypeFlv()){const e=new Uint8Array(i.buffer);this.player.recorder.addMetaData(e)}const e=al(new Uint8Array(i.buffer));e&&e.onMetaData&&this.player.updateMetaData(e.onMetaData)}break;case Le:if(this.player&&this.player.isRecordTypeFlv()){const e=new Uint8Array(i.buffer);this.player.recorder.addAACSequenceHeader(e,i.ts)}break;case Pe:if(this.player&&this.player.isRecordTypeFlv()){const e=new Uint8Array(i.buffer);this.player.recorder.addVideoSequenceHeader(e,i.ts)}break;case Be:if(this.player&&this.player.isRecordTypeFlv()&&this.player.recording){const e=new Uint8Array(i.buffer);i.type===je?this.player.recorder.addVideo(e,i.ts):i.type===Ne&&this.player.recorder.addAudio(e,i.ts)}break;case Me:this.player&&(this.player.debug.log("decoderWorker","onmessage:",Me),this.player.video.$videoElement.srcObject=i.mseHandle);break;case Ue:this.player&&(this.player.debug.log("decoderWorker","onmessage:",Ue,i.value),this.player._mseWorkerData.firstRenderTime=Number(i.value));break;case Fe:this.player&&(this.player.debug.log("decoderWorker","onmessage:",Fe,i.value,i.msg),this.player.emitError(i.value,i.msg));break;default:this.player[i.cmd]&&this.player[i.cmd](i)}}}_initWork(){const e={debug:this.player._opt.debug,debugLevel:this.player._opt.debugLevel,debugUuid:this.player._opt.debugUuid,useOffscreen:this.player._opt.useOffscreen,useWCS:this.player._opt.useWCS,useMSE:this.player._opt.useMSE,videoBuffer:this.player._opt.videoBuffer,videoBufferDelay:this.player._opt.videoBufferDelay,openWebglAlignment:this.player._opt.openWebglAlignment,playType:this.player._opt.playType,hasAudio:this.player._opt.hasAudio,hasVideo:this.player._opt.hasVideo,playbackRate:1,playbackForwardMaxRateDecodeIFrame:this.player._opt.playbackForwardMaxRateDecodeIFrame,playbackIsCacheBeforeDecodeForFpsRender:this.player._opt.playbackConfig.isCacheBeforeDecodeForFpsRender,sampleRate:this.player.audio&&this.player.audio.audioContext&&this.player.audio.audioContext.sampleRate||0,audioBufferSize:this.player.audio&&this.player.audio.getAudioBufferSize()||1024,networkDelay:this.player._opt.networkDelay,visibility:this.player.visibility,useSIMD:this.player._opt.useSIMD,recordType:this.player._opt.recordType,checkFirstIFrame:this.player._opt.checkFirstIFrame,isM7sCrypto:this.player._opt.isM7sCrypto,isXorCrypto:this.player._opt.isXorCrypto,isSm4Crypto:this.player._opt.isSm4Crypto,sm4CryptoKey:this.player._opt.sm4CryptoKey,m7sCryptoAudio:this.player._opt.m7sCryptoAudio,isFlv:this.player._opt.isFlv,isFmp4:this.player._opt.isFmp4,isMpeg4:this.player._opt.isMpeg4,isTs:this.player._opt.isTs,isNakedFlow:this.player._opt.isNakedFlow,isHls265:this.player.isUseHls265(),isFmp4Private:this.player._opt.isFmp4Private,isEmitSEI:this.player._opt.isEmitSEI,isRecordTypeFlv:this.player.isRecordTypeFlv(),isWasmMp4:this.player.recorder&&this.player.recorder.isWasmMp4()||!1,isChrome:Ja(),isDropSameTimestampGop:this.player._opt.isDropSameTimestampGop,mseDecodeAudio:this.player._opt.mseDecodeAudio,nakedFlowH265DemuxUseNew:this.player._opt.nakedFlowH265DemuxUseNew,mseDecoderUseWorker:this.player._opt.mseDecoderUseWorker,mseAutoCleanupMinBackwardDuration:this.player._opt.mseAutoCleanupMinBackwardDuration,mseAutoCleanupMaxBackwardDuration:this.player._opt.mseAutoCleanupMaxBackwardDuration,mseCorrectTimeDuration:this.player._opt.mseCorrectTimeDuration,mseCorrectAudioTimeDuration:this.player._opt.mseCorrectAudioTimeDuration};this.decoderWorker.postMessage({cmd:Ve,opt:JSON.stringify(e)}),this.player._opt.isM7sCrypto&&(this.updateWorkConfig({key:"cryptoKey",value:this.player._opt.cryptoKey}),this.updateWorkConfig({key:"cryptoIV",value:this.player._opt.cryptoIV}))}decodeVideo(e,t,i){this.player._opt.playType===b?this.player.isUseHls265()?this._decodeVideoNoDelay(e,t,i):this._decodeVideo(e,t,i):this.player._opt.playType===_&&(this.player.video.rate>=this.player._opt.playbackForwardMaxRateDecodeIFrame?i&&(this.player.debug.log("decoderWorker",`current rate is ${this.player.video.rate},only decode i frame`),this._decodeVideoNoDelay(e,t,i)):1===this.player.video.rate?this._decodeVideo(e,t,i):this._decodeVideoNoDelay(e,t,i))}_decodeVideo(e,t,i){const s={type:je,ts:Math.max(t,0),isIFrame:i};this.decoderWorker.postMessage({cmd:$e,buffer:e,options:s},[e.buffer])}_decodeVideoNoDelay(e,t,i){this.decoderWorker.postMessage({cmd:Je,buffer:e,ts:Math.max(t,0),isIFrame:i},[e.buffer])}decodeAudio(e,t){this.player._opt.playType===b?this.player._opt.useWCS||this.player._opt.useMSE||this.player.isUseHls265()?this._decodeAudioNoDelay(e,t):this._decodeAudio(e,t):this.player._opt.playType===_&&(1===this.player.video.rate?this._decodeAudio(e,t):this._decodeAudioNoDelay(e,t))}_decodeAudio(e,t){const i={type:Ne,ts:Math.max(t,0)};this.decoderWorker.postMessage({cmd:$e,buffer:e,options:i},[e.buffer])}_decodeAudioNoDelay(e,t){this.decoderWorker.postMessage({cmd:We,buffer:e,ts:Math.max(t,0)},[e.buffer])}updateWorkConfig(e){this.decoderWorker&&this.decoderWorker.postMessage({cmd:Ke,key:e.key,value:e.value})}workerFetchStream(e){const{_opt:t}=this.player,i={protocol:t.protocol,isFlv:t.isFlv,isFmp4:t.isFmp4,isMpeg4:t.isMpeg4,isNakedFlow:t.isNakedFlow,isTs:t.isTs};this.decoderWorker.postMessage({cmd:Qe,url:e,opt:JSON.stringify(i)})}clearWorkBuffer(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.decoderWorker.postMessage({cmd:Ye,needClear:e})}workerSendMessage(e){this.decoderWorker.postMessage({cmd:Xe,message:e})}updateVideoTimestamp(e){this.decoderWorker.postMessage({cmd:Ze,message:e})}}var nl,ll="application/json, text/javascript",dl="text/html",hl=/^(?:text|application)\/xml/i,cl=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,ul=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,pl=/^\s*$/,fl={},ml={},gl="",yl={type:"GET",beforeSend:Al,success:Al,error:Al,complete:Al,context:null,xhr:function(){return new window.XMLHttpRequest},accepts:{json:ll,xml:"application/xml, text/xml",html:dl,text:"text/plain","*":"*/".concat("*")},crossDomain:!1,timeout:0,username:null,password:null,processData:!0,promise:Al,contentType:"application/x-www-form-urlencoded; charset=UTF-8"};function Al(){}var bl=function(e,t){"object"==typeof e&&(t=e,e=void 0);var i=Cl({},t=t||{});for(var s in yl)void 0===i[s]&&(i[s]=yl[s]);try{var r={},a=new Promise((function(e,t){r.resolve=e,r.reject=t}));a.resolve=r.resolve,a.reject=r.reject,i.promise=a}catch(e){i.promise={resolve:Al,reject:Al}}var o=ul.exec(window.location.href.toLowerCase())||[];i.url=((e||i.url||window.location.href)+"").replace(/#.*$/,"").replace(/^\/\//,o[1]+"//");var n=i.url;i.crossDomain||(i.crossDomain=/^([\w-]+:)?\/\/([^\/]+)/.test(i.url)&&RegExp.$2!==window.location.href);var l=i.dataType;if("jsonp"===l){if(!/=\?/.test(i.url)){var d=(i.jsonp||"callback")+"=?";i.url=El(i.url,d)}return function(e){var t,i=e.jsonpCallback||"jsonp"+Dl(),s=window.document.createElement("script"),r={abort:function(){i in window&&(window[i]=Al)}},a=window.document.getElementsByTagName("head")[0]||window.document.documentElement;function o(i){window.clearTimeout(t),r.abort(),Sl(i.type,r,i.type,e),n()}s.onerror=function(e){o(e)},window[i]=function(i){window.clearTimeout(t),vl(i,r,e),n()},Tl(e),s.src=e.url.replace(/=\?/,"="+i),s.src=El(s.src,"_="+(new Date).getTime()),s.async=!0,e.scriptCharset&&(s.charset=e.scriptCharset);a.insertBefore(s,a.firstChild),e.timeout>0&&(t=window.setTimeout((function(){r.abort(),Sl("timeout",r,"timeout",e),n()}),e.timeout));function n(){s.clearAttributes?s.clearAttributes():s.onload=s.onreadystatechange=s.onerror=null,s.parentNode&&s.parentNode.removeChild(s),s=null,delete window[i]}return e.promise.abort=function(){r.abort()},e.promise.xhr=r,e.promise}(i)}Tl(i);var h=i.accepts[l]||i.accepts["*"],c={};/^([\w-]+:)\/\//.test(i.url)?RegExp.$1:window.location.protocol;var u,p=yl.xhr();i.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest"),i.ifModified&&(fl[n]&&(c["If-Modified-Since"]=fl[n]),ml[n]&&(c["If-None-Match"]=ml[n])),h&&(c.Accept=h,h.indexOf(",")>-1&&(h=h.split(",",2)[0]),p.overrideMimeType&&p.overrideMimeType(h));var f=!/^(?:GET|HEAD)$/.test(i.type.toUpperCase());if((i.data&&f&&!1!==i.contentType||t.contentType)&&(c["Content-Type"]=i.contentType),!1===i.cache&&!f){var m=/([?&])_=[^&]*/;i.url=m.test(n)?n.replace(m,"$1_="+Dl()):n+(/\?/.test(n)?"&":"?")+"_="+Dl()}i.headers=Cl(c,i.headers||{}),p.onreadystatechange=function(){if(4===p.readyState){var e;clearTimeout(u);var t=!1;if(p.status>=200&&p.status<300||304===p.status){if(gl=p.getAllResponseHeaders(),i.ifModified){var s=wl("Last-Modified");s&&(fl[n]=s),(s=wl("etag"))&&(ml[n]=s)}l=l||function(e){return e&&(e===dl?"html":e===ll?"json":hl.test(e)&&"xml")||"text"}(p.getResponseHeader("content-type")),e=p.responseText;try{"xml"===l?e=p.responseXML:"json"===l&&(e=pl.test(e)?null:JSON.parse(e))}catch(e){t=e}t?Sl(t,"parseerror",p,i):vl(e,p,i)}else Sl(null,"error",p,i)}};var g=!("async"in i)||i.async;if(p.open(i.type,i.url,g,i.username,i.password),i.xhrFields)for(var y in i.xhrFields)p[y]=i.xhrFields[y];for(var y in i.mimeType&&p.overrideMimeType&&p.overrideMimeType(i.mimeType),i.headers)void 0!==i.headers[y]&&p.setRequestHeader(y,i.headers[y]+"");return!1===function(e,t){var i=t.context;if(!1===t.beforeSend.call(i,e,t))return!1}(p,i)?(p.abort(),!1):(i.timeout>0&&(u=window.setTimeout((function(){p.onreadystatechange=Al,p.abort(),Sl(null,"timeout",p,i)}),i.timeout)),p.send(i.data?i.data:null),i.promise.abort=function(){p.abort()},i.promise)};function vl(e,t,i){var s=i.context,r="success";i.success.call(s,e,r,t),i.promise.resolve(e,r,t),_l(r,t,i)}function _l(e,t,i){var s=i.context;i.complete.call(s,t,e)}function Sl(e,t,i,s){var r=s.context;s.error.call(r,i,t,e),s.promise.reject(i,t,e),_l(t,i,s)}function wl(e){var t;if(!nl){for(nl={};t=cl.exec(gl);)nl[t[1].toLowerCase()]=t[2];t=nl[e.toLowerCase()]}return null===t?null:t}function El(e,t){return(e+"&"+t).replace(/[&?]{1,2}/,"?")}function Tl(e){!xl(e)||e.data instanceof FormData||!e.processData||(e.data=function(e,t){var i=[];return i.add=function(e,t){this.push(encodeURIComponent(e)+"="+encodeURIComponent(t))},kl(i,e,t),i.join("&").replace("%20","+")}(e.data)),!e.data||e.type&&"GET"!==e.type.toUpperCase()||(e.url=El(e.url,e.data))}function kl(e,t,i,s){var r=function(e){return"[object Array]"===Object.prototype.toString.call(e)}(t);for(var a in t){var o=t[a];s&&(a=i?s:s+"["+(r?"":a)+"]"),!s&&r?e.add(o.name,o.value):(i?r(o):xl(o))?kl(e,o,i,a):e.add(a,o)}}function Cl(e){for(var t=Array.prototype.slice,i=t.call(arguments,1),s=0,r=i.length;s<r;s++){var a=i[s]||{};for(var o in a)a.hasOwnProperty(o)&&void 0!==a[o]&&(e[o]=a[o])}return e}function xl(e){var t=typeof e;return"function"===t||"object"===t&&!!e}function Rl(e){return"function"==typeof e}function Dl(){return(new Date).getTime()}function Ll(e){return parseInt(e)===e}function Pl(e){if(!Ll(e.length))return!1;for(var t=0;t<e.length;t++)if(!Ll(e[t])||e[t]<0||e[t]>255)return!1;return!0}function Bl(e,t){if(e.buffer&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!Pl(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(Ll(e.length)&&Pl(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function Il(e){return new Uint8Array(e)}function Ml(e,t,i,s,r){null==s&&null==r||(e=e.slice?e.slice(s,r):Array.prototype.slice.call(e,s,r)),t.set(e,i)}bl.get=function(e,t,i,s){return Rl(t)&&(s=s||i,i=t,t=void 0),bl({url:e,data:t,success:i,dataType:s})},bl.post=function(e,t,i,s){return Rl(t)&&(s=s||i,i=t,t=void 0),bl({type:"POST",url:e,data:t,success:i,dataType:s})},bl.getJSON=function(e,t,i){return Rl(t)&&(i=t,t=void 0),bl({url:e,data:t,success:i,dataType:"json"})},bl.ajaxSetup=function(e,t){return t?Cl(Cl(e,yl),t):Cl(yl,e)};var Ul={toBytes:function(e){var t=[],i=0;for(e=encodeURI(e);i<e.length;){var s=e.charCodeAt(i++);37===s?(t.push(parseInt(e.substr(i,2),16)),i+=2):t.push(s)}return Bl(t)},fromBytes:function(e){for(var t=[],i=0;i<e.length;){var s=e[i];s<128?(t.push(String.fromCharCode(s)),i++):s>191&&s<224?(t.push(String.fromCharCode((31&s)<<6|63&e[i+1])),i+=2):(t.push(String.fromCharCode((15&s)<<12|(63&e[i+1])<<6|63&e[i+2])),i+=3)}return t.join("")}},Fl=function(){var e="0123456789abcdef";return{toBytes:function(e){for(var t=[],i=0;i<e.length;i+=2)t.push(parseInt(e.substr(i,2),16));return t},fromBytes:function(t){for(var i=[],s=0;s<t.length;s++){var r=t[s];i.push(e[(240&r)>>4]+e[15&r])}return i.join("")}}}(),Ol={16:10,24:12,32:14},Nl=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],jl=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],zl=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],Gl=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],Hl=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],Vl=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],$l=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],Wl=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],Jl=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],ql=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],Kl=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],Yl=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],Ql=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],Xl=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],Zl=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function ed(e){for(var t=[],i=0;i<e.length;i+=4)t.push(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]);return t}var td=function(e){if(!(this instanceof td))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:Bl(e,!0)}),this._prepare()};td.prototype._prepare=function(){var e=Ol[this.key.length];if(null==e)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var t=0;t<=e;t++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);var i,s=4*(e+1),r=this.key.length/4,a=ed(this.key);for(t=0;t<r;t++)i=t>>2,this._Ke[i][t%4]=a[t],this._Kd[e-i][t%4]=a[t];for(var o,n=0,l=r;l<s;){if(o=a[r-1],a[0]^=jl[o>>16&255]<<24^jl[o>>8&255]<<16^jl[255&o]<<8^jl[o>>24&255]^Nl[n]<<24,n+=1,8!=r)for(t=1;t<r;t++)a[t]^=a[t-1];else{for(t=1;t<r/2;t++)a[t]^=a[t-1];o=a[r/2-1],a[r/2]^=jl[255&o]^jl[o>>8&255]<<8^jl[o>>16&255]<<16^jl[o>>24&255]<<24;for(t=r/2+1;t<r;t++)a[t]^=a[t-1]}for(t=0;t<r&&l<s;)d=l>>2,h=l%4,this._Ke[d][h]=a[t],this._Kd[e-d][h]=a[t++],l++}for(var d=1;d<e;d++)for(var h=0;h<4;h++)o=this._Kd[d][h],this._Kd[d][h]=Yl[o>>24&255]^Ql[o>>16&255]^Xl[o>>8&255]^Zl[255&o]},td.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,i=[0,0,0,0],s=ed(e),r=0;r<4;r++)s[r]^=this._Ke[0][r];for(var a=1;a<t;a++){for(r=0;r<4;r++)i[r]=Gl[s[r]>>24&255]^Hl[s[(r+1)%4]>>16&255]^Vl[s[(r+2)%4]>>8&255]^$l[255&s[(r+3)%4]]^this._Ke[a][r];s=i.slice()}var o,n=Il(16);for(r=0;r<4;r++)o=this._Ke[t][r],n[4*r]=255&(jl[s[r]>>24&255]^o>>24),n[4*r+1]=255&(jl[s[(r+1)%4]>>16&255]^o>>16),n[4*r+2]=255&(jl[s[(r+2)%4]>>8&255]^o>>8),n[4*r+3]=255&(jl[255&s[(r+3)%4]]^o);return n},td.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,i=[0,0,0,0],s=ed(e),r=0;r<4;r++)s[r]^=this._Kd[0][r];for(var a=1;a<t;a++){for(r=0;r<4;r++)i[r]=Wl[s[r]>>24&255]^Jl[s[(r+3)%4]>>16&255]^ql[s[(r+2)%4]>>8&255]^Kl[255&s[(r+1)%4]]^this._Kd[a][r];s=i.slice()}var o,n=Il(16);for(r=0;r<4;r++)o=this._Kd[t][r],n[4*r]=255&(zl[s[r]>>24&255]^o>>24),n[4*r+1]=255&(zl[s[(r+3)%4]>>16&255]^o>>16),n[4*r+2]=255&(zl[s[(r+2)%4]>>8&255]^o>>8),n[4*r+3]=255&(zl[255&s[(r+1)%4]]^o);return n};var id=function(e){if(!(this instanceof id))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new td(e)};id.prototype.encrypt=function(e){if((e=Bl(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=Il(e.length),i=Il(16),s=0;s<e.length;s+=16)Ml(e,i,0,s,s+16),Ml(i=this._aes.encrypt(i),t,s);return t},id.prototype.decrypt=function(e){if((e=Bl(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=Il(e.length),i=Il(16),s=0;s<e.length;s+=16)Ml(e,i,0,s,s+16),Ml(i=this._aes.decrypt(i),t,s);return t};var sd=function(e,t){if(!(this instanceof sd))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else t=Il(16);this._lastCipherblock=Bl(t,!0),this._aes=new td(e)};sd.prototype.encrypt=function(e){if((e=Bl(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=Il(e.length),i=Il(16),s=0;s<e.length;s+=16){Ml(e,i,0,s,s+16);for(var r=0;r<16;r++)i[r]^=this._lastCipherblock[r];this._lastCipherblock=this._aes.encrypt(i),Ml(this._lastCipherblock,t,s)}return t},sd.prototype.decrypt=function(e){if((e=Bl(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=Il(e.length),i=Il(16),s=0;s<e.length;s+=16){Ml(e,i,0,s,s+16),i=this._aes.decrypt(i);for(var r=0;r<16;r++)t[s+r]=i[r]^this._lastCipherblock[r];Ml(e,this._lastCipherblock,0,s,s+16)}return t};var rd=function(e,t,i){if(!(this instanceof rd))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 size)")}else t=Il(16);i||(i=1),this.segmentSize=i,this._shiftRegister=Bl(t,!0),this._aes=new td(e)};rd.prototype.encrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var t,i=Bl(e,!0),s=0;s<i.length;s+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var r=0;r<this.segmentSize;r++)i[s+r]^=t[r];Ml(this._shiftRegister,this._shiftRegister,0,this.segmentSize),Ml(i,this._shiftRegister,16-this.segmentSize,s,s+this.segmentSize)}return i},rd.prototype.decrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var t,i=Bl(e,!0),s=0;s<i.length;s+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var r=0;r<this.segmentSize;r++)i[s+r]^=t[r];Ml(this._shiftRegister,this._shiftRegister,0,this.segmentSize),Ml(e,this._shiftRegister,16-this.segmentSize,s,s+this.segmentSize)}return i};var ad=function(e,t){if(!(this instanceof ad))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else t=Il(16);this._lastPrecipher=Bl(t,!0),this._lastPrecipherIndex=16,this._aes=new td(e)};ad.prototype.encrypt=function(e){for(var t=Bl(e,!0),i=0;i<t.length;i++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),t[i]^=this._lastPrecipher[this._lastPrecipherIndex++];return t},ad.prototype.decrypt=ad.prototype.encrypt;var od=function(e){if(!(this instanceof od))throw Error("Counter must be instanitated with `new`");0===e||e||(e=1),"number"==typeof e?(this._counter=Il(16),this.setValue(e)):this.setBytes(e)};od.prototype.setValue=function(e){if("number"!=typeof e||parseInt(e)!=e)throw new Error("invalid counter value (must be an integer)");if(e>Number.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var t=15;t>=0;--t)this._counter[t]=e%256,e=parseInt(e/256)},od.prototype.setBytes=function(e){if(16!=(e=Bl(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},od.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var nd=function(e,t){if(!(this instanceof nd))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof od||(t=new od(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new td(e)};nd.prototype.encrypt=function(e){for(var t=Bl(e,!0),i=0;i<t.length;i++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),t[i]^=this._remainingCounter[this._remainingCounterIndex++];return t},nd.prototype.decrypt=nd.prototype.encrypt;const ld={AES:td,Counter:od,ModeOfOperation:{ecb:id,cbc:sd,cfb:rd,ofb:ad,ctr:nd},utils:{hex:Fl,utf8:Ul},padding:{pkcs7:{pad:function(e){var t=16-(e=Bl(e,!0)).length%16,i=Il(e.length+t);Ml(e,i);for(var s=e.length;s<i.length;s++)i[s]=t;return i},strip:function(e){if((e=Bl(e,!0)).length<16)throw new Error("PKCS#7 invalid length");var t=e[e.length-1];if(t>16)throw new Error("PKCS#7 padding byte out of range");for(var i=e.length-t,s=0;s<t;s++)if(e[i+s]!==t)throw new Error("PKCS#7 invalid padding byte");var r=Il(i);return Ml(e,r,0,0,i),r}}},_arrayTest:{coerceArray:Bl,createArray:Il,copyArray:Ml}};var dd=Ir((function(e,t){var i;e.exports=(i=i||function(e,t){var i;if("undefined"!=typeof window&&window.crypto&&(i=window.crypto),"undefined"!=typeof self&&self.crypto&&(i=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(i=globalThis.crypto),!i&&"undefined"!=typeof window&&window.msCrypto&&(i=window.msCrypto),!i&&void 0!==Br&&Br.crypto&&(i=Br.crypto),!i)try{i=r.default}catch(e){}var s=function(){if(i){if("function"==typeof i.getRandomValues)try{return i.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof i.randomBytes)try{return i.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function e(){}return function(t){var i;return e.prototype=t,i=new e,e.prototype=null,i}}(),o={},n=o.lib={},l=n.Base={extend:function(e){var t=a(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},d=n.WordArray=l.extend({init:function(e,i){e=this.words=e||[],this.sigBytes=i!=t?i:4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,i=e.words,s=this.sigBytes,r=e.sigBytes;if(this.clamp(),s%4)for(var a=0;a<r;a++){var o=i[a>>>2]>>>24-a%4*8&255;t[s+a>>>2]|=o<<24-(s+a)%4*8}else for(var n=0;n<r;n+=4)t[s+n>>>2]=i[n>>>2];return this.sigBytes+=r,this},clamp:function(){var t=this.words,i=this.sigBytes;t[i>>>2]&=4294967295<<32-i%4*8,t.length=e.ceil(i/4)},clone:function(){var e=l.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],i=0;i<e;i+=4)t.push(s());return new d.init(t,e)}}),h=o.enc={},c=h.Hex={stringify:function(e){for(var t=e.words,i=e.sigBytes,s=[],r=0;r<i;r++){var a=t[r>>>2]>>>24-r%4*8&255;s.push((a>>>4).toString(16)),s.push((15&a).toString(16))}return s.join("")},parse:function(e){for(var t=e.length,i=[],s=0;s<t;s+=2)i[s>>>3]|=parseInt(e.substr(s,2),16)<<24-s%8*4;return new d.init(i,t/2)}},u=h.Latin1={stringify:function(e){for(var t=e.words,i=e.sigBytes,s=[],r=0;r<i;r++){var a=t[r>>>2]>>>24-r%4*8&255;s.push(String.fromCharCode(a))}return s.join("")},parse:function(e){for(var t=e.length,i=[],s=0;s<t;s++)i[s>>>2]|=(255&e.charCodeAt(s))<<24-s%4*8;return new d.init(i,t)}},p=h.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},f=n.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new d.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var i,s=this._data,r=s.words,a=s.sigBytes,o=this.blockSize,n=a/(4*o),l=(n=t?e.ceil(n):e.max((0|n)-this._minBufferSize,0))*o,h=e.min(4*l,a);if(l){for(var c=0;c<l;c+=o)this._doProcessBlock(r,c);i=r.splice(0,l),s.sigBytes-=h}return new d.init(i,h)},clone:function(){var e=l.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});n.Hasher=f.extend({cfg:l.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,i){return new e.init(i).finalize(t)}},_createHmacHelper:function(e){return function(t,i){return new m.HMAC.init(e,i).finalize(t)}}});var m=o.algo={};return o}(Math),i)})),hd=(Ir((function(e,t){var i,s,r,a,o,n,l;e.exports=(r=(s=l=dd).lib,a=r.Base,o=r.WordArray,(n=s.x64={}).Word=a.extend({init:function(e,t){this.high=e,this.low=t}}),n.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=t!=i?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,i=[],s=0;s<t;s++){var r=e[s];i.push(r.high),i.push(r.low)}return o.create(i,this.sigBytes)},clone:function(){for(var e=a.clone.call(this),t=e.words=this.words.slice(0),i=t.length,s=0;s<i;s++)t[s]=t[s].clone();return e}}),l)})),Ir((function(e,t){var i;e.exports=(i=dd,function(){if("function"==typeof ArrayBuffer){var e=i.lib.WordArray,t=e.init,s=e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var i=e.byteLength,s=[],r=0;r<i;r++)s[r>>>2]|=e[r]<<24-r%4*8;t.call(this,s,i)}else t.apply(this,arguments)};s.prototype=e}}(),i.lib.WordArray)})),Ir((function(e,t){var i;e.exports=(i=dd,function(){var e=i,t=e.lib.WordArray,s=e.enc;function r(e){return e<<8&4278255360|e>>>8&16711935}s.Utf16=s.Utf16BE={stringify:function(e){for(var t=e.words,i=e.sigBytes,s=[],r=0;r<i;r+=2){var a=t[r>>>2]>>>16-r%4*8&65535;s.push(String.fromCharCode(a))}return s.join("")},parse:function(e){for(var i=e.length,s=[],r=0;r<i;r++)s[r>>>1]|=e.charCodeAt(r)<<16-r%2*16;return t.create(s,2*i)}},s.Utf16LE={stringify:function(e){for(var t=e.words,i=e.sigBytes,s=[],a=0;a<i;a+=2){var o=r(t[a>>>2]>>>16-a%4*8&65535);s.push(String.fromCharCode(o))}return s.join("")},parse:function(e){for(var i=e.length,s=[],a=0;a<i;a++)s[a>>>1]|=r(e.charCodeAt(a)<<16-a%2*16);return t.create(s,2*i)}}}(),i.enc.Utf16)})),Ir((function(e,t){var i;e.exports=(i=dd,function(){var e=i,t=e.lib.WordArray;function s(e,i,s){for(var r=[],a=0,o=0;o<i;o++)if(o%4){var n=s[e.charCodeAt(o-1)]<<o%4*2|s[e.charCodeAt(o)]>>>6-o%4*2;r[a>>>2]|=n<<24-a%4*8,a++}return t.create(r,a)}e.enc.Base64={stringify:function(e){var t=e.words,i=e.sigBytes,s=this._map;e.clamp();for(var r=[],a=0;a<i;a+=3)for(var o=(t[a>>>2]>>>24-a%4*8&255)<<16|(t[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|t[a+2>>>2]>>>24-(a+2)%4*8&255,n=0;n<4&&a+.75*n<i;n++)r.push(s.charAt(o>>>6*(3-n)&63));var l=s.charAt(64);if(l)for(;r.length%4;)r.push(l);return r.join("")},parse:function(e){var t=e.length,i=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var a=0;a<i.length;a++)r[i.charCodeAt(a)]=a}var o=i.charAt(64);if(o){var n=e.indexOf(o);-1!==n&&(t=n)}return s(e,t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),i.enc.Base64)})),Ir((function(e,t){var i;e.exports=(i=dd,function(){var e=i,t=e.lib.WordArray;function s(e,i,s){for(var r=[],a=0,o=0;o<i;o++)if(o%4){var n=s[e.charCodeAt(o-1)]<<o%4*2|s[e.charCodeAt(o)]>>>6-o%4*2;r[a>>>2]|=n<<24-a%4*8,a++}return t.create(r,a)}e.enc.Base64url={stringify:function(e,t){void 0===t&&(t=!0);var i=e.words,s=e.sigBytes,r=t?this._safe_map:this._map;e.clamp();for(var a=[],o=0;o<s;o+=3)for(var n=(i[o>>>2]>>>24-o%4*8&255)<<16|(i[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|i[o+2>>>2]>>>24-(o+2)%4*8&255,l=0;l<4&&o+.75*l<s;l++)a.push(r.charAt(n>>>6*(3-l)&63));var d=r.charAt(64);if(d)for(;a.length%4;)a.push(d);return a.join("")},parse:function(e,t){void 0===t&&(t=!0);var i=e.length,r=t?this._safe_map:this._map,a=this._reverseMap;if(!a){a=this._reverseMap=[];for(var o=0;o<r.length;o++)a[r.charCodeAt(o)]=o}var n=r.charAt(64);if(n){var l=e.indexOf(n);-1!==l&&(i=l)}return s(e,i,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"}}(),i.enc.Base64url)})),Ir((function(e,t){var i;e.exports=(i=dd,function(e){var t=i,s=t.lib,r=s.WordArray,a=s.Hasher,o=t.algo,n=[];!function(){for(var t=0;t<64;t++)n[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=o.MD5=a.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var i=0;i<16;i++){var s=t+i,r=e[s];e[s]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var a=this._hash.words,o=e[t+0],l=e[t+1],p=e[t+2],f=e[t+3],m=e[t+4],g=e[t+5],y=e[t+6],A=e[t+7],b=e[t+8],v=e[t+9],_=e[t+10],S=e[t+11],w=e[t+12],E=e[t+13],T=e[t+14],k=e[t+15],C=a[0],x=a[1],R=a[2],D=a[3];C=d(C,x,R,D,o,7,n[0]),D=d(D,C,x,R,l,12,n[1]),R=d(R,D,C,x,p,17,n[2]),x=d(x,R,D,C,f,22,n[3]),C=d(C,x,R,D,m,7,n[4]),D=d(D,C,x,R,g,12,n[5]),R=d(R,D,C,x,y,17,n[6]),x=d(x,R,D,C,A,22,n[7]),C=d(C,x,R,D,b,7,n[8]),D=d(D,C,x,R,v,12,n[9]),R=d(R,D,C,x,_,17,n[10]),x=d(x,R,D,C,S,22,n[11]),C=d(C,x,R,D,w,7,n[12]),D=d(D,C,x,R,E,12,n[13]),R=d(R,D,C,x,T,17,n[14]),C=h(C,x=d(x,R,D,C,k,22,n[15]),R,D,l,5,n[16]),D=h(D,C,x,R,y,9,n[17]),R=h(R,D,C,x,S,14,n[18]),x=h(x,R,D,C,o,20,n[19]),C=h(C,x,R,D,g,5,n[20]),D=h(D,C,x,R,_,9,n[21]),R=h(R,D,C,x,k,14,n[22]),x=h(x,R,D,C,m,20,n[23]),C=h(C,x,R,D,v,5,n[24]),D=h(D,C,x,R,T,9,n[25]),R=h(R,D,C,x,f,14,n[26]),x=h(x,R,D,C,b,20,n[27]),C=h(C,x,R,D,E,5,n[28]),D=h(D,C,x,R,p,9,n[29]),R=h(R,D,C,x,A,14,n[30]),C=c(C,x=h(x,R,D,C,w,20,n[31]),R,D,g,4,n[32]),D=c(D,C,x,R,b,11,n[33]),R=c(R,D,C,x,S,16,n[34]),x=c(x,R,D,C,T,23,n[35]),C=c(C,x,R,D,l,4,n[36]),D=c(D,C,x,R,m,11,n[37]),R=c(R,D,C,x,A,16,n[38]),x=c(x,R,D,C,_,23,n[39]),C=c(C,x,R,D,E,4,n[40]),D=c(D,C,x,R,o,11,n[41]),R=c(R,D,C,x,f,16,n[42]),x=c(x,R,D,C,y,23,n[43]),C=c(C,x,R,D,v,4,n[44]),D=c(D,C,x,R,w,11,n[45]),R=c(R,D,C,x,k,16,n[46]),C=u(C,x=c(x,R,D,C,p,23,n[47]),R,D,o,6,n[48]),D=u(D,C,x,R,A,10,n[49]),R=u(R,D,C,x,T,15,n[50]),x=u(x,R,D,C,g,21,n[51]),C=u(C,x,R,D,w,6,n[52]),D=u(D,C,x,R,f,10,n[53]),R=u(R,D,C,x,_,15,n[54]),x=u(x,R,D,C,l,21,n[55]),C=u(C,x,R,D,b,6,n[56]),D=u(D,C,x,R,k,10,n[57]),R=u(R,D,C,x,y,15,n[58]),x=u(x,R,D,C,E,21,n[59]),C=u(C,x,R,D,m,6,n[60]),D=u(D,C,x,R,S,10,n[61]),R=u(R,D,C,x,p,15,n[62]),x=u(x,R,D,C,v,21,n[63]),a[0]=a[0]+C|0,a[1]=a[1]+x|0,a[2]=a[2]+R|0,a[3]=a[3]+D|0},_doFinalize:function(){var t=this._data,i=t.words,s=8*this._nDataBytes,r=8*t.sigBytes;i[r>>>5]|=128<<24-r%32;var a=e.floor(s/4294967296),o=s;i[15+(r+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),i[14+(r+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(i.length+1),this._process();for(var n=this._hash,l=n.words,d=0;d<4;d++){var h=l[d];l[d]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}return n},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function d(e,t,i,s,r,a,o){var n=e+(t&i|~t&s)+r+o;return(n<<a|n>>>32-a)+t}function h(e,t,i,s,r,a,o){var n=e+(t&s|i&~s)+r+o;return(n<<a|n>>>32-a)+t}function c(e,t,i,s,r,a,o){var n=e+(t^i^s)+r+o;return(n<<a|n>>>32-a)+t}function u(e,t,i,s,r,a,o){var n=e+(i^(t|~s))+r+o;return(n<<a|n>>>32-a)+t}t.MD5=a._createHelper(l),t.HmacMD5=a._createHmacHelper(l)}(Math),i.MD5)})),Ir((function(e,t){var i,s,r,a,o,n,l,d;e.exports=(s=(i=d=dd).lib,r=s.WordArray,a=s.Hasher,o=i.algo,n=[],l=o.SHA1=a.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var i=this._hash.words,s=i[0],r=i[1],a=i[2],o=i[3],l=i[4],d=0;d<80;d++){if(d<16)n[d]=0|e[t+d];else{var h=n[d-3]^n[d-8]^n[d-14]^n[d-16];n[d]=h<<1|h>>>31}var c=(s<<5|s>>>27)+l+n[d];c+=d<20?1518500249+(r&a|~r&o):d<40?1859775393+(r^a^o):d<60?(r&a|r&o|a&o)-1894007588:(r^a^o)-899497514,l=o,o=a,a=r<<30|r>>>2,r=s,s=c}i[0]=i[0]+s|0,i[1]=i[1]+r|0,i[2]=i[2]+a|0,i[3]=i[3]+o|0,i[4]=i[4]+l|0},_doFinalize:function(){var e=this._data,t=e.words,i=8*this._nDataBytes,s=8*e.sigBytes;return t[s>>>5]|=128<<24-s%32,t[14+(s+64>>>9<<4)]=Math.floor(i/4294967296),t[15+(s+64>>>9<<4)]=i,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}}),i.SHA1=a._createHelper(l),i.HmacSHA1=a._createHmacHelper(l),d.SHA1)})),Ir((function(e,t){var i;e.exports=(i=dd,function(e){var t=i,s=t.lib,r=s.WordArray,a=s.Hasher,o=t.algo,n=[],l=[];!function(){function t(t){for(var i=e.sqrt(t),s=2;s<=i;s++)if(!(t%s))return!1;return!0}function i(e){return 4294967296*(e-(0|e))|0}for(var s=2,r=0;r<64;)t(s)&&(r<8&&(n[r]=i(e.pow(s,.5))),l[r]=i(e.pow(s,1/3)),r++),s++}();var d=[],h=o.SHA256=a.extend({_doReset:function(){this._hash=new r.init(n.slice(0))},_doProcessBlock:function(e,t){for(var i=this._hash.words,s=i[0],r=i[1],a=i[2],o=i[3],n=i[4],h=i[5],c=i[6],u=i[7],p=0;p<64;p++){if(p<16)d[p]=0|e[t+p];else{var f=d[p-15],m=(f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3,g=d[p-2],y=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;d[p]=m+d[p-7]+y+d[p-16]}var A=s&r^s&a^r&a,b=(s<<30|s>>>2)^(s<<19|s>>>13)^(s<<10|s>>>22),v=u+((n<<26|n>>>6)^(n<<21|n>>>11)^(n<<7|n>>>25))+(n&h^~n&c)+l[p]+d[p];u=c,c=h,h=n,n=o+v|0,o=a,a=r,r=s,s=v+(b+A)|0}i[0]=i[0]+s|0,i[1]=i[1]+r|0,i[2]=i[2]+a|0,i[3]=i[3]+o|0,i[4]=i[4]+n|0,i[5]=i[5]+h|0,i[6]=i[6]+c|0,i[7]=i[7]+u|0},_doFinalize:function(){var t=this._data,i=t.words,s=8*this._nDataBytes,r=8*t.sigBytes;return i[r>>>5]|=128<<24-r%32,i[14+(r+64>>>9<<4)]=e.floor(s/4294967296),i[15+(r+64>>>9<<4)]=s,t.sigBytes=4*i.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=a._createHelper(h),t.HmacSHA256=a._createHmacHelper(h)}(Math),i.SHA256)})),Ir((function(e,t){var i,s,r,a,o,n;e.exports=(s=(i=n=dd).lib.WordArray,r=i.algo,a=r.SHA256,o=r.SHA224=a.extend({_doReset:function(){this._hash=new s.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=a._doFinalize.call(this);return e.sigBytes-=4,e}}),i.SHA224=a._createHelper(o),i.HmacSHA224=a._createHmacHelper(o),n.SHA224)})),Ir((function(e,t){var i;e.exports=(i=dd,function(){var e=i,t=e.lib.Hasher,s=e.x64,r=s.Word,a=s.WordArray,o=e.algo;function n(){return r.create.apply(r,arguments)}var l=[n(1116352408,3609767458),n(1899447441,602891725),n(3049323471,3964484399),n(3921009573,2173295548),n(961987163,4081628472),n(1508970993,3053834265),n(2453635748,2937671579),n(2870763221,3664609560),n(3624381080,2734883394),n(310598401,1164996542),n(607225278,1323610764),n(1426881987,3590304994),n(1925078388,4068182383),n(2162078206,991336113),n(2614888103,633803317),n(3248222580,3479774868),n(3835390401,2666613458),n(4022224774,944711139),n(264347078,2341262773),n(604807628,2007800933),n(770255983,1495990901),n(1249150122,1856431235),n(1555081692,3175218132),n(1996064986,2198950837),n(2554220882,3999719339),n(2821834349,766784016),n(2952996808,2566594879),n(3210313671,3203337956),n(3336571891,1034457026),n(3584528711,2466948901),n(113926993,3758326383),n(338241895,168717936),n(666307205,1188179964),n(773529912,1546045734),n(1294757372,1522805485),n(1396182291,2643833823),n(1695183700,2343527390),n(1986661051,1014477480),n(2177026350,1206759142),n(2456956037,344077627),n(2730485921,1290863460),n(2820302411,3158454273),n(3259730800,3505952657),n(3345764771,106217008),n(3516065817,3606008344),n(3600352804,1432725776),n(4094571909,1467031594),n(275423344,851169720),n(430227734,3100823752),n(506948616,1363258195),n(659060556,3750685593),n(883997877,3785050280),n(958139571,3318307427),n(1322822218,3812723403),n(1537002063,2003034995),n(1747873779,3602036899),n(1955562222,1575990012),n(2024104815,1125592928),n(2227730452,2716904306),n(2361852424,442776044),n(2428436474,593698344),n(2756734187,3733110249),n(3204031479,2999351573),n(3329325298,3815920427),n(3391569614,3928383900),n(3515267271,566280711),n(3940187606,3454069534),n(4118630271,4000239992),n(116418474,1914138554),n(174292421,2731055270),n(289380356,3203993006),n(460393269,320620315),n(685471733,587496836),n(852142971,1086792851),n(1017036298,365543100),n(1126000580,2618297676),n(1288033470,3409855158),n(1501505948,4234509866),n(1607167915,987167468),n(1816402316,1246189591)],d=[];!function(){for(var e=0;e<80;e++)d[e]=n()}();var h=o.SHA512=t.extend({_doReset:function(){this._hash=new a.init([new r.init(1779033703,4089235720),new r.init(3144134277,2227873595),new r.init(1013904242,4271175723),new r.init(2773480762,1595750129),new r.init(1359893119,2917565137),new r.init(2600822924,725511199),new r.init(528734635,4215389547),new r.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var i=this._hash.words,s=i[0],r=i[1],a=i[2],o=i[3],n=i[4],h=i[5],c=i[6],u=i[7],p=s.high,f=s.low,m=r.high,g=r.low,y=a.high,A=a.low,b=o.high,v=o.low,_=n.high,S=n.low,w=h.high,E=h.low,T=c.high,k=c.low,C=u.high,x=u.low,R=p,D=f,L=m,P=g,B=y,I=A,M=b,U=v,F=_,O=S,N=w,j=E,z=T,G=k,H=C,V=x,$=0;$<80;$++){var W,J,q=d[$];if($<16)J=q.high=0|e[t+2*$],W=q.low=0|e[t+2*$+1];else{var K=d[$-15],Y=K.high,Q=K.low,X=(Y>>>1|Q<<31)^(Y>>>8|Q<<24)^Y>>>7,Z=(Q>>>1|Y<<31)^(Q>>>8|Y<<24)^(Q>>>7|Y<<25),ee=d[$-2],te=ee.high,ie=ee.low,se=(te>>>19|ie<<13)^(te<<3|ie>>>29)^te>>>6,re=(ie>>>19|te<<13)^(ie<<3|te>>>29)^(ie>>>6|te<<26),ae=d[$-7],oe=ae.high,ne=ae.low,le=d[$-16],de=le.high,he=le.low;J=(J=(J=X+oe+((W=Z+ne)>>>0<Z>>>0?1:0))+se+((W+=re)>>>0<re>>>0?1:0))+de+((W+=he)>>>0<he>>>0?1:0),q.high=J,q.low=W}var ce,ue=F&N^~F&z,pe=O&j^~O&G,fe=R&L^R&B^L&B,me=D&P^D&I^P&I,ge=(R>>>28|D<<4)^(R<<30|D>>>2)^(R<<25|D>>>7),ye=(D>>>28|R<<4)^(D<<30|R>>>2)^(D<<25|R>>>7),Ae=(F>>>14|O<<18)^(F>>>18|O<<14)^(F<<23|O>>>9),be=(O>>>14|F<<18)^(O>>>18|F<<14)^(O<<23|F>>>9),ve=l[$],_e=ve.high,Se=ve.low,we=H+Ae+((ce=V+be)>>>0<V>>>0?1:0),Ee=ye+me;H=z,V=G,z=N,G=j,N=F,j=O,F=M+(we=(we=(we=we+ue+((ce+=pe)>>>0<pe>>>0?1:0))+_e+((ce+=Se)>>>0<Se>>>0?1:0))+J+((ce+=W)>>>0<W>>>0?1:0))+((O=U+ce|0)>>>0<U>>>0?1:0)|0,M=B,U=I,B=L,I=P,L=R,P=D,R=we+(ge+fe+(Ee>>>0<ye>>>0?1:0))+((D=ce+Ee|0)>>>0<ce>>>0?1:0)|0}f=s.low=f+D,s.high=p+R+(f>>>0<D>>>0?1:0),g=r.low=g+P,r.high=m+L+(g>>>0<P>>>0?1:0),A=a.low=A+I,a.high=y+B+(A>>>0<I>>>0?1:0),v=o.low=v+U,o.high=b+M+(v>>>0<U>>>0?1:0),S=n.low=S+O,n.high=_+F+(S>>>0<O>>>0?1:0),E=h.low=E+j,h.high=w+N+(E>>>0<j>>>0?1:0),k=c.low=k+G,c.high=T+z+(k>>>0<G>>>0?1:0),x=u.low=x+V,u.high=C+H+(x>>>0<V>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,i=8*this._nDataBytes,s=8*e.sigBytes;return t[s>>>5]|=128<<24-s%32,t[30+(s+128>>>10<<5)]=Math.floor(i/4294967296),t[31+(s+128>>>10<<5)]=i,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(h),e.HmacSHA512=t._createHmacHelper(h)}(),i.SHA512)})),Ir((function(e,t){var i,s,r,a,o,n,l,d;e.exports=(s=(i=d=dd).x64,r=s.Word,a=s.WordArray,o=i.algo,n=o.SHA512,l=o.SHA384=n.extend({_doReset:function(){this._hash=new a.init([new r.init(3418070365,3238371032),new r.init(1654270250,914150663),new r.init(2438529370,812702999),new r.init(355462360,4144912697),new r.init(1731405415,4290775857),new r.init(2394180231,1750603025),new r.init(3675008525,1694076839),new r.init(1203062813,3204075428)])},_doFinalize:function(){var e=n._doFinalize.call(this);return e.sigBytes-=16,e}}),i.SHA384=n._createHelper(l),i.HmacSHA384=n._createHmacHelper(l),d.SHA384)})),Ir((function(e,t){var i;e.exports=(i=dd,function(e){var t=i,s=t.lib,r=s.WordArray,a=s.Hasher,o=t.x64.Word,n=t.algo,l=[],d=[],h=[];!function(){for(var e=1,t=0,i=0;i<24;i++){l[e+5*t]=(i+1)*(i+2)/2%64;var s=(2*e+3*t)%5;e=t%5,t=s}for(e=0;e<5;e++)for(t=0;t<5;t++)d[e+5*t]=t+(2*e+3*t)%5*5;for(var r=1,a=0;a<24;a++){for(var n=0,c=0,u=0;u<7;u++){if(1&r){var p=(1<<u)-1;p<32?c^=1<<p:n^=1<<p-32}128&r?r=r<<1^113:r<<=1}h[a]=o.create(n,c)}}();var c=[];!function(){for(var e=0;e<25;e++)c[e]=o.create()}();var u=n.SHA3=a.extend({cfg:a.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new o.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var i=this._state,s=this.blockSize/2,r=0;r<s;r++){var a=e[t+2*r],o=e[t+2*r+1];a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),(x=i[r]).high^=o,x.low^=a}for(var n=0;n<24;n++){for(var u=0;u<5;u++){for(var p=0,f=0,m=0;m<5;m++)p^=(x=i[u+5*m]).high,f^=x.low;var g=c[u];g.high=p,g.low=f}for(u=0;u<5;u++){var y=c[(u+4)%5],A=c[(u+1)%5],b=A.high,v=A.low;for(p=y.high^(b<<1|v>>>31),f=y.low^(v<<1|b>>>31),m=0;m<5;m++)(x=i[u+5*m]).high^=p,x.low^=f}for(var _=1;_<25;_++){var S=(x=i[_]).high,w=x.low,E=l[_];E<32?(p=S<<E|w>>>32-E,f=w<<E|S>>>32-E):(p=w<<E-32|S>>>64-E,f=S<<E-32|w>>>64-E);var T=c[d[_]];T.high=p,T.low=f}var k=c[0],C=i[0];for(k.high=C.high,k.low=C.low,u=0;u<5;u++)for(m=0;m<5;m++){var x=i[_=u+5*m],R=c[_],D=c[(u+1)%5+5*m],L=c[(u+2)%5+5*m];x.high=R.high^~D.high&L.high,x.low=R.low^~D.low&L.low}x=i[0];var P=h[n];x.high^=P.high,x.low^=P.low}},_doFinalize:function(){var t=this._data,i=t.words;this._nDataBytes;var s=8*t.sigBytes,a=32*this.blockSize;i[s>>>5]|=1<<24-s%32,i[(e.ceil((s+1)/a)*a>>>5)-1]|=128,t.sigBytes=4*i.length,this._process();for(var o=this._state,n=this.cfg.outputLength/8,l=n/8,d=[],h=0;h<l;h++){var c=o[h],u=c.high,p=c.low;u=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),d.push(p),d.push(u)}return new r.init(d,n)},clone:function(){for(var e=a.clone.call(this),t=e._state=this._state.slice(0),i=0;i<25;i++)t[i]=t[i].clone();return e}});t.SHA3=a._createHelper(u),t.HmacSHA3=a._createHmacHelper(u)}(Math),i.SHA3)})),Ir((function(e,t){var i;e.exports=(i=dd,function(e){var t=i,s=t.lib,r=s.WordArray,a=s.Hasher,o=t.algo,n=r.create([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=r.create([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]),d=r.create([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]),h=r.create([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=r.create([0,1518500249,1859775393,2400959708,2840853838]),u=r.create([1352829926,1548603684,1836072691,2053994217,0]),p=o.RIPEMD160=a.extend({_doReset:function(){this._hash=r.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var i=0;i<16;i++){var s=t+i,r=e[s];e[s]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var a,o,p,v,_,S,w,E,T,k,C,x=this._hash.words,R=c.words,D=u.words,L=n.words,P=l.words,B=d.words,I=h.words;for(S=a=x[0],w=o=x[1],E=p=x[2],T=v=x[3],k=_=x[4],i=0;i<80;i+=1)C=a+e[t+L[i]]|0,C+=i<16?f(o,p,v)+R[0]:i<32?m(o,p,v)+R[1]:i<48?g(o,p,v)+R[2]:i<64?y(o,p,v)+R[3]:A(o,p,v)+R[4],C=(C=b(C|=0,B[i]))+_|0,a=_,_=v,v=b(p,10),p=o,o=C,C=S+e[t+P[i]]|0,C+=i<16?A(w,E,T)+D[0]:i<32?y(w,E,T)+D[1]:i<48?g(w,E,T)+D[2]:i<64?m(w,E,T)+D[3]:f(w,E,T)+D[4],C=(C=b(C|=0,I[i]))+k|0,S=k,k=T,T=b(E,10),E=w,w=C;C=x[1]+p+T|0,x[1]=x[2]+v+k|0,x[2]=x[3]+_+S|0,x[3]=x[4]+a+w|0,x[4]=x[0]+o+E|0,x[0]=C},_doFinalize:function(){var e=this._data,t=e.words,i=8*this._nDataBytes,s=8*e.sigBytes;t[s>>>5]|=128<<24-s%32,t[14+(s+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),e.sigBytes=4*(t.length+1),this._process();for(var r=this._hash,a=r.words,o=0;o<5;o++){var n=a[o];a[o]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}return r},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function f(e,t,i){return e^t^i}function m(e,t,i){return e&t|~e&i}function g(e,t,i){return(e|~t)^i}function y(e,t,i){return e&i|t&~i}function A(e,t,i){return e^(t|~i)}function b(e,t){return e<<t|e>>>32-t}t.RIPEMD160=a._createHelper(p),t.HmacRIPEMD160=a._createHmacHelper(p)}(),i.RIPEMD160)})),Ir((function(e,t){var i,s,r;e.exports=(s=(i=dd).lib.Base,r=i.enc.Utf8,void(i.algo.HMAC=s.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var i=e.blockSize,s=4*i;t.sigBytes>s&&(t=e.finalize(t)),t.clamp();for(var a=this._oKey=t.clone(),o=this._iKey=t.clone(),n=a.words,l=o.words,d=0;d<i;d++)n[d]^=1549556828,l[d]^=909522486;a.sigBytes=o.sigBytes=s,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,i=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(i))}})))})),Ir((function(e,t){var i,s,r,a,o,n,l,d,h;e.exports=(s=(i=h=dd).lib,r=s.Base,a=s.WordArray,o=i.algo,n=o.SHA256,l=o.HMAC,d=o.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:n,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var i=this.cfg,s=l.create(i.hasher,e),r=a.create(),o=a.create([1]),n=r.words,d=o.words,h=i.keySize,c=i.iterations;n.length<h;){var u=s.update(t).finalize(o);s.reset();for(var p=u.words,f=p.length,m=u,g=1;g<c;g++){m=s.finalize(m),s.reset();for(var y=m.words,A=0;A<f;A++)p[A]^=y[A]}r.concat(u),d[0]++}return r.sigBytes=4*h,r}}),i.PBKDF2=function(e,t,i){return d.create(i).compute(e,t)},h.PBKDF2)})),Ir((function(e,t){var i,s,r,a,o,n,l,d;e.exports=(s=(i=d=dd).lib,r=s.Base,a=s.WordArray,o=i.algo,n=o.MD5,l=o.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:n,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var i,s=this.cfg,r=s.hasher.create(),o=a.create(),n=o.words,l=s.keySize,d=s.iterations;n.length<l;){i&&r.update(i),i=r.update(e).finalize(t),r.reset();for(var h=1;h<d;h++)i=r.finalize(i),r.reset();o.concat(i)}return o.sigBytes=4*l,o}}),i.EvpKDF=function(e,t,i){return l.create(i).compute(e,t)},d.EvpKDF)})),Ir((function(e,t){var i;e.exports=void((i=dd).lib.Cipher||function(e){var t=i,s=t.lib,r=s.Base,a=s.WordArray,o=s.BufferedBlockAlgorithm,n=t.enc;n.Utf8;var l=n.Base64,d=t.algo.EvpKDF,h=s.Cipher=o.extend({cfg:r.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,i){this.cfg=this.cfg.extend(i),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?b:y}return function(t){return{encrypt:function(i,s,r){return e(s).encrypt(t,i,s,r)},decrypt:function(i,s,r){return e(s).decrypt(t,i,s,r)}}}}()});s.StreamCipher=h.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var c=t.mode={},u=s.BlockCipherMode=r.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),p=c.CBC=function(){var t=u.extend();function i(t,i,s){var r,a=this._iv;a?(r=a,this._iv=e):r=this._prevBlock;for(var o=0;o<s;o++)t[i+o]^=r[o]}return t.Encryptor=t.extend({processBlock:function(e,t){var s=this._cipher,r=s.blockSize;i.call(this,e,t,r),s.encryptBlock(e,t),this._prevBlock=e.slice(t,t+r)}}),t.Decryptor=t.extend({processBlock:function(e,t){var s=this._cipher,r=s.blockSize,a=e.slice(t,t+r);s.decryptBlock(e,t),i.call(this,e,t,r),this._prevBlock=a}}),t}(),f=(t.pad={}).Pkcs7={pad:function(e,t){for(var i=4*t,s=i-e.sigBytes%i,r=s<<24|s<<16|s<<8|s,o=[],n=0;n<s;n+=4)o.push(r);var l=a.create(o,s);e.concat(l)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};s.BlockCipher=h.extend({cfg:h.cfg.extend({mode:p,padding:f}),reset:function(){var e;h.reset.call(this);var t=this.cfg,i=t.iv,s=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=s.createEncryptor:(e=s.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,i&&i.words):(this._mode=e.call(s,this,i&&i.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var m=s.CipherParams=r.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),g=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,i=e.salt;return(i?a.create([1398893684,1701076831]).concat(i).concat(t):t).toString(l)},parse:function(e){var t,i=l.parse(e),s=i.words;return 1398893684==s[0]&&1701076831==s[1]&&(t=a.create(s.slice(2,4)),s.splice(0,4),i.sigBytes-=16),m.create({ciphertext:i,salt:t})}},y=s.SerializableCipher=r.extend({cfg:r.extend({format:g}),encrypt:function(e,t,i,s){s=this.cfg.extend(s);var r=e.createEncryptor(i,s),a=r.finalize(t),o=r.cfg;return m.create({ciphertext:a,key:i,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:s.format})},decrypt:function(e,t,i,s){return s=this.cfg.extend(s),t=this._parse(t,s.format),e.createDecryptor(i,s).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),A=(t.kdf={}).OpenSSL={execute:function(e,t,i,s,r){if(s||(s=a.random(8)),r)o=d.create({keySize:t+i,hasher:r}).compute(e,s);else var o=d.create({keySize:t+i}).compute(e,s);var n=a.create(o.words.slice(t),4*i);return o.sigBytes=4*t,m.create({key:o,iv:n,salt:s})}},b=s.PasswordBasedCipher=y.extend({cfg:y.cfg.extend({kdf:A}),encrypt:function(e,t,i,s){var r=(s=this.cfg.extend(s)).kdf.execute(i,e.keySize,e.ivSize,s.salt,s.hasher);s.iv=r.iv;var a=y.encrypt.call(this,e,t,r.key,s);return a.mixIn(r),a},decrypt:function(e,t,i,s){s=this.cfg.extend(s),t=this._parse(t,s.format);var r=s.kdf.execute(i,e.keySize,e.ivSize,t.salt,s.hasher);return s.iv=r.iv,y.decrypt.call(this,e,t,r.key,s)}})}())})),Ir((function(e,t){var i;e.exports=((i=dd).mode.CFB=function(){var e=i.lib.BlockCipherMode.extend();function t(e,t,i,s){var r,a=this._iv;a?(r=a.slice(0),this._iv=void 0):r=this._prevBlock,s.encryptBlock(r,0);for(var o=0;o<i;o++)e[t+o]^=r[o]}return e.Encryptor=e.extend({processBlock:function(e,i){var s=this._cipher,r=s.blockSize;t.call(this,e,i,r,s),this._prevBlock=e.slice(i,i+r)}}),e.Decryptor=e.extend({processBlock:function(e,i){var s=this._cipher,r=s.blockSize,a=e.slice(i,i+r);t.call(this,e,i,r,s),this._prevBlock=a}}),e}(),i.mode.CFB)})),Ir((function(e,t){var i,s,r;e.exports=((r=dd).mode.CTR=(i=r.lib.BlockCipherMode.extend(),s=i.Encryptor=i.extend({processBlock:function(e,t){var i=this._cipher,s=i.blockSize,r=this._iv,a=this._counter;r&&(a=this._counter=r.slice(0),this._iv=void 0);var o=a.slice(0);i.encryptBlock(o,0),a[s-1]=a[s-1]+1|0;for(var n=0;n<s;n++)e[t+n]^=o[n]}}),i.Decryptor=s,i),r.mode.CTR)})),Ir((function(e,t){var i;e.exports=((i=dd).mode.CTRGladman=function(){var e=i.lib.BlockCipherMode.extend();function t(e){if(255==(e>>24&255)){var t=e>>16&255,i=e>>8&255,s=255&e;255===t?(t=0,255===i?(i=0,255===s?s=0:++s):++i):++t,e=0,e+=t<<16,e+=i<<8,e+=s}else e+=1<<24;return e}function s(e){return 0===(e[0]=t(e[0]))&&(e[1]=t(e[1])),e}var r=e.Encryptor=e.extend({processBlock:function(e,t){var i=this._cipher,r=i.blockSize,a=this._iv,o=this._counter;a&&(o=this._counter=a.slice(0),this._iv=void 0),s(o);var n=o.slice(0);i.encryptBlock(n,0);for(var l=0;l<r;l++)e[t+l]^=n[l]}});return e.Decryptor=r,e}(),i.mode.CTRGladman)})),Ir((function(e,t){var i,s,r;e.exports=((r=dd).mode.OFB=(i=r.lib.BlockCipherMode.extend(),s=i.Encryptor=i.extend({processBlock:function(e,t){var i=this._cipher,s=i.blockSize,r=this._iv,a=this._keystream;r&&(a=this._keystream=r.slice(0),this._iv=void 0),i.encryptBlock(a,0);for(var o=0;o<s;o++)e[t+o]^=a[o]}}),i.Decryptor=s,i),r.mode.OFB)})),Ir((function(e,t){var i,s;e.exports=((s=dd).mode.ECB=((i=s.lib.BlockCipherMode.extend()).Encryptor=i.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),i.Decryptor=i.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),i),s.mode.ECB)})),Ir((function(e,t){var i;e.exports=((i=dd).pad.AnsiX923={pad:function(e,t){var i=e.sigBytes,s=4*t,r=s-i%s,a=i+r-1;e.clamp(),e.words[a>>>2]|=r<<24-a%4*8,e.sigBytes+=r},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},i.pad.Ansix923)})),Ir((function(e,t){var i;e.exports=((i=dd).pad.Iso10126={pad:function(e,t){var s=4*t,r=s-e.sigBytes%s;e.concat(i.lib.WordArray.random(r-1)).concat(i.lib.WordArray.create([r<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},i.pad.Iso10126)})),Ir((function(e,t){var i;e.exports=((i=dd).pad.Iso97971={pad:function(e,t){e.concat(i.lib.WordArray.create([2147483648],1)),i.pad.ZeroPadding.pad(e,t)},unpad:function(e){i.pad.ZeroPadding.unpad(e),e.sigBytes--}},i.pad.Iso97971)})),Ir((function(e,t){var i;e.exports=((i=dd).pad.ZeroPadding={pad:function(e,t){var i=4*t;e.clamp(),e.sigBytes+=i-(e.sigBytes%i||i)},unpad:function(e){var t=e.words,i=e.sigBytes-1;for(i=e.sigBytes-1;i>=0;i--)if(t[i>>>2]>>>24-i%4*8&255){e.sigBytes=i+1;break}}},i.pad.ZeroPadding)})),Ir((function(e,t){var i;e.exports=((i=dd).pad.NoPadding={pad:function(){},unpad:function(){}},i.pad.NoPadding)})),Ir((function(e,t){var i;e.exports=(i=dd,function(e){var t=i,s=t.lib.CipherParams,r=t.enc.Hex;t.format.Hex={stringify:function(e){return e.ciphertext.toString(r)},parse:function(e){var t=r.parse(e);return s.create({ciphertext:t})}}}(),i.format.Hex)})),Ir((function(e,t){var i;e.exports=(i=dd,function(){var e=i,t=e.lib.BlockCipher,s=e.algo,r=[],a=[],o=[],n=[],l=[],d=[],h=[],c=[],u=[],p=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var i=0,s=0;for(t=0;t<256;t++){var f=s^s<<1^s<<2^s<<3^s<<4;f=f>>>8^255&f^99,r[i]=f,a[f]=i;var m=e[i],g=e[m],y=e[g],A=257*e[f]^16843008*f;o[i]=A<<24|A>>>8,n[i]=A<<16|A>>>16,l[i]=A<<8|A>>>24,d[i]=A,A=16843009*y^65537*g^257*m^16843008*i,h[f]=A<<24|A>>>8,c[f]=A<<16|A>>>16,u[f]=A<<8|A>>>24,p[f]=A,i?(i=m^e[e[e[y^m]]],s^=e[e[s]]):i=s=1}}();var f=[0,1,2,4,8,16,32,64,128,27,54],m=s.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,i=e.sigBytes/4,s=4*((this._nRounds=i+6)+1),a=this._keySchedule=[],o=0;o<s;o++)o<i?a[o]=t[o]:(d=a[o-1],o%i?i>6&&o%i==4&&(d=r[d>>>24]<<24|r[d>>>16&255]<<16|r[d>>>8&255]<<8|r[255&d]):(d=r[(d=d<<8|d>>>24)>>>24]<<24|r[d>>>16&255]<<16|r[d>>>8&255]<<8|r[255&d],d^=f[o/i|0]<<24),a[o]=a[o-i]^d);for(var n=this._invKeySchedule=[],l=0;l<s;l++){if(o=s-l,l%4)var d=a[o];else d=a[o-4];n[l]=l<4||o<=4?d:h[r[d>>>24]]^c[r[d>>>16&255]]^u[r[d>>>8&255]]^p[r[255&d]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,n,l,d,r)},decryptBlock:function(e,t){var i=e[t+1];e[t+1]=e[t+3],e[t+3]=i,this._doCryptBlock(e,t,this._invKeySchedule,h,c,u,p,a),i=e[t+1],e[t+1]=e[t+3],e[t+3]=i},_doCryptBlock:function(e,t,i,s,r,a,o,n){for(var l=this._nRounds,d=e[t]^i[0],h=e[t+1]^i[1],c=e[t+2]^i[2],u=e[t+3]^i[3],p=4,f=1;f<l;f++){var m=s[d>>>24]^r[h>>>16&255]^a[c>>>8&255]^o[255&u]^i[p++],g=s[h>>>24]^r[c>>>16&255]^a[u>>>8&255]^o[255&d]^i[p++],y=s[c>>>24]^r[u>>>16&255]^a[d>>>8&255]^o[255&h]^i[p++],A=s[u>>>24]^r[d>>>16&255]^a[h>>>8&255]^o[255&c]^i[p++];d=m,h=g,c=y,u=A}m=(n[d>>>24]<<24|n[h>>>16&255]<<16|n[c>>>8&255]<<8|n[255&u])^i[p++],g=(n[h>>>24]<<24|n[c>>>16&255]<<16|n[u>>>8&255]<<8|n[255&d])^i[p++],y=(n[c>>>24]<<24|n[u>>>16&255]<<16|n[d>>>8&255]<<8|n[255&h])^i[p++],A=(n[u>>>24]<<24|n[d>>>16&255]<<16|n[h>>>8&255]<<8|n[255&c])^i[p++],e[t]=m,e[t+1]=g,e[t+2]=y,e[t+3]=A},keySize:8});e.AES=t._createHelper(m)}(),i.AES)})),Ir((function(e,t){var i;e.exports=(i=dd,function(){var e=i,t=e.lib,s=t.WordArray,r=t.BlockCipher,a=e.algo,o=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],n=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],d=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],h=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],c=a.DES=r.extend({_doReset:function(){for(var e=this._key.words,t=[],i=0;i<56;i++){var s=o[i]-1;t[i]=e[s>>>5]>>>31-s%32&1}for(var r=this._subKeys=[],a=0;a<16;a++){var d=r[a]=[],h=l[a];for(i=0;i<24;i++)d[i/6|0]|=t[(n[i]-1+h)%28]<<31-i%6,d[4+(i/6|0)]|=t[28+(n[i+24]-1+h)%28]<<31-i%6;for(d[0]=d[0]<<1|d[0]>>>31,i=1;i<7;i++)d[i]=d[i]>>>4*(i-1)+3;d[7]=d[7]<<5|d[7]>>>27}var c=this._invSubKeys=[];for(i=0;i<16;i++)c[i]=r[15-i]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,i){this._lBlock=e[t],this._rBlock=e[t+1],u.call(this,4,252645135),u.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),u.call(this,1,1431655765);for(var s=0;s<16;s++){for(var r=i[s],a=this._lBlock,o=this._rBlock,n=0,l=0;l<8;l++)n|=d[l][((o^r[l])&h[l])>>>0];this._lBlock=o,this._rBlock=a^n}var c=this._lBlock;this._lBlock=this._rBlock,this._rBlock=c,u.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),u.call(this,16,65535),u.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function u(e,t){var i=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=i,this._lBlock^=i<<e}function p(e,t){var i=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=i,this._rBlock^=i<<e}e.DES=r._createHelper(c);var f=a.TripleDES=r.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),i=e.length<4?e.slice(0,2):e.slice(2,4),r=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=c.createEncryptor(s.create(t)),this._des2=c.createEncryptor(s.create(i)),this._des3=c.createEncryptor(s.create(r))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=r._createHelper(f)}(),i.TripleDES)})),Ir((function(e,t){var i;e.exports=(i=dd,function(){var e=i,t=e.lib.StreamCipher,s=e.algo,r=s.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,i=e.sigBytes,s=this._S=[],r=0;r<256;r++)s[r]=r;r=0;for(var a=0;r<256;r++){var o=r%i,n=t[o>>>2]>>>24-o%4*8&255;a=(a+s[r]+n)%256;var l=s[r];s[r]=s[a],s[a]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=a.call(this)},keySize:8,ivSize:0});function a(){for(var e=this._S,t=this._i,i=this._j,s=0,r=0;r<4;r++){i=(i+e[t=(t+1)%256])%256;var a=e[t];e[t]=e[i],e[i]=a,s|=e[(e[t]+e[i])%256]<<24-8*r}return this._i=t,this._j=i,s}e.RC4=t._createHelper(r);var o=s.RC4Drop=r.extend({cfg:r.cfg.extend({drop:192}),_doReset:function(){r._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)a.call(this)}});e.RC4Drop=t._createHelper(o)}(),i.RC4)})),Ir((function(e,t){var i;e.exports=(i=dd,function(){var e=i,t=e.lib.StreamCipher,s=e.algo,r=[],a=[],o=[],n=s.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,i=0;i<4;i++)e[i]=16711935&(e[i]<<8|e[i]>>>24)|4278255360&(e[i]<<24|e[i]>>>8);var s=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,i=0;i<4;i++)l.call(this);for(i=0;i<8;i++)r[i]^=s[i+4&7];if(t){var a=t.words,o=a[0],n=a[1],d=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),h=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),c=d>>>16|4294901760&h,u=h<<16|65535&d;for(r[0]^=d,r[1]^=c,r[2]^=h,r[3]^=u,r[4]^=d,r[5]^=c,r[6]^=h,r[7]^=u,i=0;i<4;i++)l.call(this)}},_doProcessBlock:function(e,t){var i=this._X;l.call(this),r[0]=i[0]^i[5]>>>16^i[3]<<16,r[1]=i[2]^i[7]>>>16^i[5]<<16,r[2]=i[4]^i[1]>>>16^i[7]<<16,r[3]=i[6]^i[3]>>>16^i[1]<<16;for(var s=0;s<4;s++)r[s]=16711935&(r[s]<<8|r[s]>>>24)|4278255360&(r[s]<<24|r[s]>>>8),e[t+s]^=r[s]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,i=0;i<8;i++)a[i]=t[i];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<a[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<a[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<a[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<a[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<a[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<a[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<a[6]>>>0?1:0)|0,this._b=t[7]>>>0<a[7]>>>0?1:0,i=0;i<8;i++){var s=e[i]+t[i],r=65535&s,n=s>>>16,l=((r*r>>>17)+r*n>>>15)+n*n,d=((4294901760&s)*s|0)+((65535&s)*s|0);o[i]=l^d}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}e.Rabbit=t._createHelper(n)}(),i.Rabbit)})),Ir((function(e,t){var i;e.exports=(i=dd,function(){var e=i,t=e.lib.StreamCipher,s=e.algo,r=[],a=[],o=[],n=s.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,i=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],s=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var r=0;r<4;r++)l.call(this);for(r=0;r<8;r++)s[r]^=i[r+4&7];if(t){var a=t.words,o=a[0],n=a[1],d=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),h=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),c=d>>>16|4294901760&h,u=h<<16|65535&d;for(s[0]^=d,s[1]^=c,s[2]^=h,s[3]^=u,s[4]^=d,s[5]^=c,s[6]^=h,s[7]^=u,r=0;r<4;r++)l.call(this)}},_doProcessBlock:function(e,t){var i=this._X;l.call(this),r[0]=i[0]^i[5]>>>16^i[3]<<16,r[1]=i[2]^i[7]>>>16^i[5]<<16,r[2]=i[4]^i[1]>>>16^i[7]<<16,r[3]=i[6]^i[3]>>>16^i[1]<<16;for(var s=0;s<4;s++)r[s]=16711935&(r[s]<<8|r[s]>>>24)|4278255360&(r[s]<<24|r[s]>>>8),e[t+s]^=r[s]},blockSize:4,ivSize:2});function l(){for(var e=this._X,t=this._C,i=0;i<8;i++)a[i]=t[i];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<a[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<a[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<a[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<a[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<a[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<a[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<a[6]>>>0?1:0)|0,this._b=t[7]>>>0<a[7]>>>0?1:0,i=0;i<8;i++){var s=e[i]+t[i],r=65535&s,n=s>>>16,l=((r*r>>>17)+r*n>>>15)+n*n,d=((4294901760&s)*s|0)+((65535&s)*s|0);o[i]=l^d}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}e.RabbitLegacy=t._createHelper(n)}(),i.RabbitLegacy)})),Ir((function(e,t){var i;e.exports=(i=dd,function(){var e=i,t=e.lib.BlockCipher,s=e.algo;const r=16,a=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],o=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var n={pbox:[],sbox:[]};function l(e,t){let i=t>>24&255,s=t>>16&255,r=t>>8&255,a=255&t,o=e.sbox[0][i]+e.sbox[1][s];return o^=e.sbox[2][r],o+=e.sbox[3][a],o}function d(e,t,i){let s,a=t,o=i;for(let t=0;t<r;++t)a^=e.pbox[t],o=l(e,a)^o,s=a,a=o,o=s;return s=a,a=o,o=s,o^=e.pbox[r],a^=e.pbox[r+1],{left:a,right:o}}function h(e,t,i){let s,a=t,o=i;for(let t=r+1;t>1;--t)a^=e.pbox[t],o=l(e,a)^o,s=a,a=o,o=s;return s=a,a=o,o=s,o^=e.pbox[1],a^=e.pbox[0],{left:a,right:o}}function c(e,t,i){for(let t=0;t<4;t++){e.sbox[t]=[];for(let i=0;i<256;i++)e.sbox[t][i]=o[t][i]}let s=0;for(let o=0;o<r+2;o++)e.pbox[o]=a[o]^t[s],s++,s>=i&&(s=0);let n=0,l=0,h=0;for(let t=0;t<r+2;t+=2)h=d(e,n,l),n=h.left,l=h.right,e.pbox[t]=n,e.pbox[t+1]=l;for(let t=0;t<4;t++)for(let i=0;i<256;i+=2)h=d(e,n,l),n=h.left,l=h.right,e.sbox[t][i]=n,e.sbox[t][i+1]=l;return!0}var u=s.Blowfish=t.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var e=this._keyPriorReset=this._key,t=e.words,i=e.sigBytes/4;c(n,t,i)}},encryptBlock:function(e,t){var i=d(n,e[t],e[t+1]);e[t]=i.left,e[t+1]=i.right},decryptBlock:function(e,t){var i=h(n,e[t],e[t+1]);e[t]=i.left,e[t+1]=i.right},blockSize:2,keySize:4,ivSize:2});e.Blowfish=t._createHelper(u)}(),i.Blowfish)})),Ir((function(e,t){e.exports=dd})));function cd(e){return e[3]|e[2]<<8|e[1]<<16|e[0]<<24}function ud(e){const t=[];for(let i=0;i<e.length;i+=1)t[i>>>2]|=e[i]<<24-i%4*8;return hd.lib.WordArray.create(t,e.length)}const pd=16,fd=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],md=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function gd(e){const t=[];for(let i=0,s=e.length;i<s;i+=2)t.push(parseInt(e.substr(i,2),16));return t}function yd(e){return e.map((e=>1===(e=e.toString(16)).length?"0"+e:e)).join("")}function Ad(e){const t=[];for(let i=0,s=e.length;i<s;i++){const s=e.codePointAt(i);if(s<=127)t.push(s);else if(s<=2047)t.push(192|s>>>6),t.push(128|63&s);else if(s<=55295||s>=57344&&s<=65535)t.push(224|s>>>12),t.push(128|s>>>6&63),t.push(128|63&s);else{if(!(s>=65536&&s<=1114111))throw t.push(s),new Error("input is not supported");i++,t.push(240|s>>>18&28),t.push(128|s>>>12&63),t.push(128|s>>>6&63),t.push(128|63&s)}}return t}function bd(e){const t=[];for(let i=0,s=e.length;i<s;i++)e[i]>=240&&e[i]<=247?(t.push(String.fromCodePoint(((7&e[i])<<18)+((63&e[i+1])<<12)+((63&e[i+2])<<6)+(63&e[i+3]))),i+=3):e[i]>=224&&e[i]<=239?(t.push(String.fromCodePoint(((15&e[i])<<12)+((63&e[i+1])<<6)+(63&e[i+2]))),i+=2):e[i]>=192&&e[i]<=223?(t.push(String.fromCodePoint(((31&e[i])<<6)+(63&e[i+1]))),i++):t.push(String.fromCodePoint(e[i]));return t.join("")}function vd(e,t){const i=31&t;return e<<i|e>>>32-i}function _d(e){return(255&fd[e>>>24&255])<<24|(255&fd[e>>>16&255])<<16|(255&fd[e>>>8&255])<<8|255&fd[255&e]}function Sd(e){return e^vd(e,2)^vd(e,10)^vd(e,18)^vd(e,24)}function wd(e){return e^vd(e,13)^vd(e,23)}function Ed(e,t,i){const s=new Array(4),r=new Array(4);for(let t=0;t<4;t++)r[0]=255&e[4*t],r[1]=255&e[4*t+1],r[2]=255&e[4*t+2],r[3]=255&e[4*t+3],s[t]=r[0]<<24|r[1]<<16|r[2]<<8|r[3];for(let e,t=0;t<32;t+=4)e=s[1]^s[2]^s[3]^i[t+0],s[0]^=Sd(_d(e)),e=s[2]^s[3]^s[0]^i[t+1],s[1]^=Sd(_d(e)),e=s[3]^s[0]^s[1]^i[t+2],s[2]^=Sd(_d(e)),e=s[0]^s[1]^s[2]^i[t+3],s[3]^=Sd(_d(e));for(let e=0;e<16;e+=4)t[e]=s[3-e/4]>>>24&255,t[e+1]=s[3-e/4]>>>16&255,t[e+2]=s[3-e/4]>>>8&255,t[e+3]=255&s[3-e/4]}function Td(e,t,i){const s=new Array(4),r=new Array(4);for(let t=0;t<4;t++)r[0]=255&e[0+4*t],r[1]=255&e[1+4*t],r[2]=255&e[2+4*t],r[3]=255&e[3+4*t],s[t]=r[0]<<24|r[1]<<16|r[2]<<8|r[3];s[0]^=2746333894,s[1]^=1453994832,s[2]^=1736282519,s[3]^=2993693404;for(let e,i=0;i<32;i+=4)e=s[1]^s[2]^s[3]^md[i+0],t[i+0]=s[0]^=wd(_d(e)),e=s[2]^s[3]^s[0]^md[i+1],t[i+1]=s[1]^=wd(_d(e)),e=s[3]^s[0]^s[1]^md[i+2],t[i+2]=s[2]^=wd(_d(e)),e=s[0]^s[1]^s[2]^md[i+3],t[i+3]=s[3]^=wd(_d(e));if(0===i)for(let e,i=0;i<16;i++)e=t[i],t[i]=t[31-i],t[31-i]=e}function kd(e,t,i){let{padding:s="pkcs#7",mode:r,iv:a=[],output:o="string"}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("cbc"===r&&("string"==typeof a&&(a=gd(a)),16!==a.length))throw new Error("iv is invalid");if("string"==typeof t&&(t=gd(t)),16!==t.length)throw new Error("key is invalid");if(e="string"==typeof e?0!==i?Ad(e):gd(e):[...e],("pkcs#5"===s||"pkcs#7"===s)&&0!==i){const t=pd-e.length%pd;for(let i=0;i<t;i++)e.push(t)}const n=new Array(32);Td(t,n,i);const l=[];let d=a,h=e.length,c=0;for(;h>=pd;){const t=e.slice(c,c+16),s=new Array(16);if("cbc"===r)for(let e=0;e<pd;e++)0!==i&&(t[e]^=d[e]);Ed(t,s,n);for(let e=0;e<pd;e++)"cbc"===r&&0===i&&(s[e]^=d[e]),l[c+e]=s[e];"cbc"===r&&(d=0!==i?s:t),h-=pd,c+=pd}if(("pkcs#5"===s||"pkcs#7"===s)&&0===i){const e=l.length,t=l[e-1];for(let i=1;i<=t;i++)if(l[e-i]!==t)throw new Error("padding is invalid");l.splice(e-t,t)}return"array"!==o?0!==i?yd(l):bd(l):l}function Cd(e){return e[3]|e[2]<<8|e[1]<<16|e[0]<<24}function xd(e,t,i){for(let s=2;s<e.length;++s){const r=s-2,a=t[r%t.length],o=i[r%i.length];e[s]=e[s]^a^o}return e}function Rd(e){return e[3]|e[2]<<8|e[1]<<16|e[0]<<24}class Dd extends So{constructor(e){super(),this.TAG_NAME="CommonDemux",this.player=e,this.stopId=null,this.firstTimestamp=null,this.startTimestamp=null,this.preDelayTimestamp=null,this.preLoopTimestamp=null,this.bufferStartDts=null,this.bufferStartLocalTs=null,this.preIframeTs=null,this.preFrameTs=null,this.preTimestamp=null,this.preTimestampDuration=0,this.prevPayloadBufferSize=0,this.isStreamTsMoreThanLocal=!1,this.delay=-1,this.pushLatestDelay=-1,this.bufferList=[],this.historyIntervalDiffTimeList=[],this.playbackStreamFps=null,this.playbackStreamAudioFps=null,this.playbackStreamVideoFps=null,this.dropping=!1,this.isPushDropping=!1,this.nalUnitSize=null,this.initInterval(),this.player.debug.log("CommonDemux","init")}destroy(){this.bufferList=[],this.historyIntervalDiffTimeList=[],this.playbackStreamFps=null,this.playbackStreamAudioFps=null,this.playbackStreamVideoFps=null,this.clearStopInterval(),this.firstTimestamp=null,this.startTimestamp=null,this.bufferStartDts=null,this.bufferStartLocalTs=null,this.preDelayTimestamp=null,this.preLoopTimestamp=null,this.preIframeTs=null,this.preTimestamp=null,this.preTimestampDuration=0,this.prevPayloadBufferSize=0,this.isStreamTsMoreThanLocal=!1,this.delay=-1,this.pushLatestDelay=-1,this.dropping=!1,this.isPushDropping=!1,this.nalUnitSize=null,this.off(),this.player.debug.log("CommonDemux","destroy")}isDropping(){return this.dropping||this.isPushDropping}getDelay(e,t){if(!e||!this.player.isDemuxDecodeFirstIIframeInit())return-1;if(t===Ne)return this.delay;if(this.preDelayTimestamp&&this.preDelayTimestamp>e)return this.preDelayTimestamp-e>1e3&&this.player.debug.warn("CommonDemux",`getDelay() and preDelayTimestamp is ${this.preDelayTimestamp} > timestamp is ${e} more than ${this.preDelayTimestamp-e}ms and return ${this.delay}`),this.preDelayTimestamp=e,this.delay;if(this.firstTimestamp){if(e){const t=Date.now()-this.startTimestamp,i=e-this.firstTimestamp;t>=i?(this.isStreamTsMoreThanLocal=!1,this.delay=t-i):(this.isStreamTsMoreThanLocal=!0,this.delay=i-t)}}else this.firstTimestamp=e,this.startTimestamp=Date.now(),this.delay=-1;return this.preDelayTimestamp=e,this.delay}getDelayNotUpdateDelay(e,t){if(!e||!this.player.isDemuxDecodeFirstIIframeInit())return-1;if(t===Ne)return this.pushLatestDelay;if(this.preDelayTimestamp&&this.preDelayTimestamp-e>1e3)return this.player.debug.warn("CommonDemux",`getDelayNotUpdateDelay() and preDelayTimestamp is ${this.preDelayTimestamp} > timestamp is ${e} more than ${this.preDelayTimestamp-e}ms and return -1`),-1;if(this.firstTimestamp){let t=-1;if(e){const i=Date.now()-this.startTimestamp,s=e-this.firstTimestamp;t=i>=s?i-s:s-i}return t}return-1}resetDelay(){this.firstTimestamp=null,this.startTimestamp=null,this.delay=-1,this.dropping=!1}resetAllDelay(){this.resetDelay(),this.preDelayTimestamp=null}initInterval(){this.player.isUseHls265()?this.player.debug.log("CommonDemux","initInterval() and is hls and support hls265 so return"):-1===this.player.getStreamType().indexOf(y)?this.player.isPlaybackCacheBeforeDecodeForFpsRender()?this.player.debug.log("CommonDemux","initInterval() and playback and playbackIsCacheBeforeDecodeForFpsRender is true so return"):(this.player.debug.log("CommonDemux","setInterval()"),this._loop(),this.stopId=setInterval((()=>{let e=(new Date).getTime();this.preLoopTimestamp||(this.preLoopTimestamp=e);const t=e-this.preLoopTimestamp;this.updateHistoryIntervalDiffTimeList(t),t>100&&this.player.debug.warn("CommonDemux",`loop demux diff time is ${t}`),this._loop(),this.preLoopTimestamp=(new Date).getTime()}),20)):this.player.debug.log("CommonDemux","initInterval() and is worker stream so return")}clearStopInterval(){this.stopId&&(clearInterval(this.stopId),this.stopId=null)}updateHistoryIntervalDiffTimeList(e){this.historyIntervalDiffTimeList.length>5&&this.historyIntervalDiffTimeList.shift(),this.historyIntervalDiffTimeList.push(e)}isHistoryIntervalDiffTimeAllLarge(){if(this.historyIntervalDiffTimeList.length<5)return!1;for(let e=0;e<this.historyIntervalDiffTimeList.length;e++)if(this.historyIntervalDiffTimeList[e]<900)return!1;return!0}initPlaybackCacheLoop(){this.clearStopInterval();const e=()=>{let e=null;this.bufferList.length&&(e=this.bufferList.shift(),this._doDecoderDecode(e))};e();const t=Math.ceil(1e3/(this.playbackStreamFps*this.player.getPlaybackRate()));this.player.debug.log("CommonDemux",`initPlaybackCacheLoop() and fragDuration is ${t}, playbackStreamFps is ${this.playbackStreamFps}, playbackRate is ${this.player.getPlaybackRate()}`),this.stopId=setInterval(e,t)}_loop(){let e;const t=this.player._opt.videoBuffer,i=this.player._opt.videoBufferDelay,s=this.player._opt.playType===b;if(this.bufferList.length){if(this.isPushDropping)return void this.player.debug.warn("CommonDemux",`_loop isPushDropping is true and bufferList length is ${this.bufferList.length}`);if(this.dropping){for(e=this.bufferList.shift(),this.player.debug.warn("CommonDemux",`_loop is dropping and data.ts is ${e.ts}, data.type is ${e.type}, data.isIFrame is ${e.isIFrame}, delay is ${this.delay} ,buffer list is ${this.bufferList.length}`);!e.isIFrame&&this.bufferList.length;)e=this.bufferList.shift();const t=this.getDelayNotUpdateDelay(e.ts,e.type);e.isIFrame&&t<=this.getNotDroppingDelayTs()&&(this.player.debug.log("CommonDemux",`_loop data isIFrame is true and delay is ${this.delay}`),this.dropping=!1,this._doDecoderDecode(e),this._decodeNext(e))}else if(this.player.isPlayback()||this.player.isPlayUseMSE()||0===t)for(;this.bufferList.length;)e=this.bufferList.shift(),this._doDecoderDecode(e);else if(e=this.bufferList[0],-1===this.getDelay(e.ts,e.type))this.player.debug.log("CommonDemux",`delay is -1 and data.ts is ${e.ts} data.type is ${e.type}`),this.bufferList.shift(),this._doDecoderDecode(e),this._decodeNext(e);else if(this.delay>i+t&&s)this.hasIframeInBufferList()?(this.player.debug.warn("CommonDemux",`_loop delay is ${this.delay}, set dropping is true`),this.resetAllDelay(),this.dropping=!0,this.player.updateStats({isDropping:!0})):(this.bufferList.shift(),this._doDecoderDecode(e),this._decodeNext(e));else for(;this.bufferList.length;){if(e=this.bufferList[0],!(this.getDelay(e.ts,e.type)>t)){this.delay<0&&this.player.debug.warn("CommonDemux",`_loop delay is ${this.delay} bufferList is ${this.bufferList}`);break}this.bufferList.shift(),this._doDecoderDecode(e)}}else-1!==this.delay&&this.player.debug.log("CommonDemux","loop() bufferList is empty and reset delay"),this.resetAllDelay()}_doDecode(e,t,i,s){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;const a=this.player;let o={ts:i,cts:r,type:t,isIFrame:!1};this.player.isPlayer()?(t===je&&a._opt.playType===b&&this.calcNetworkDelay(i),a._opt.useWCS&&!a._opt.useOffscreen||a._opt.useMSE?(t===je&&(o.isIFrame=s),this.pushBuffer(e,o)):t===je?a.decoderWorker&&a.decoderWorker.decodeVideo(e,i,s):t===Ne&&a._opt.hasAudio&&a.decoderWorker&&a.decoderWorker.decodeAudio(e,i)):this.player.isPlayback()&&(t===je&&(o.isIFrame=s),this.player.isPlaybackOnlyDecodeIFrame()?t===je&&s&&this.pushBuffer(e,o):this.player.isPlaybackCacheBeforeDecodeForFpsRender()||1===this.player.getPlaybackRate()?this.pushBuffer(e,o):this.pushBuffer(e,o,!1))}_doDecodeByHls(e,t,i,s){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=!1;if(t===Ne&&zr(e)&&(this.player.debug.log("CommonDemux",`hls pushBuffer audio ts is ${i}, isAacCodecPacket is true`),a=!0,this.player.isRecordTypeFlv())){const t=new Uint8Array(e);this.player.recorder.addAACSequenceHeader(t,i)}let o=!1;if(t===je&&s&&co(e)&&(this.player.debug.log("CommonDemux",`hls pushBuffer video ts is ${i}, isVideoSequenceHeader is true`),o=!0,this.player.isRecordTypeFlv())){const t=new Uint8Array(e);this.player.recorder.addVideoSequenceHeader(t,i)}this.player.recording&&po(o)&&po(a)&&this.handleRecording(e,t,i,s,r),t===je?this._doDecoderDecode({ts:i,cts:r,payload:e,type:je,isIFrame:s}):t===Ne&&this._doDecoderDecode({ts:i,payload:e,type:Ne})}_doDecodeByFmp4(e,t,i,s){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;this._doDecode(e,t,i,s,r)}_doDecodeByTs(e,t,i,s){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;this._doDecode(e,t,i,s,r)}_doDecodeByPs(e,t,i,s){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;this._doDecode(e,t,i,s,r)}_decodeNext(e){const t=e.ts;if(0===this.bufferList.length)return;let i=this.bufferList[0];const s=i.ts-t,r=e.type===je&&i.type===Ne,a=e.type===je&&co(e.payload);(s<=20||r||a)&&(this.player.debug.log("CommonDemux",`decode data type is ${e.type} and\n ts is ${t} next data type is ${i.type} ts is ${i.ts}\n diff is ${s} and isVideoAndNextAudio is ${r} and isVideoSqeHeader is ${a}`),this.bufferList.shift(),this._doDecoderDecode(i))}_doDecoderDecode(e){const t=this.player,{webcodecsDecoder:i,mseDecoder:s}=t;this.player.isPlayer()&&this.player.updateStats({buf:this.delay}),e.type===Ne?t._opt.hasAudio&&(t._opt.useMSE&&t._opt.mseDecodeAudio?s.decodeAudio(e.payload,e.ts):t.decoderWorker&&t.decoderWorker.decodeAudio(e.payload,e.ts)):e.type===je&&(t._opt.isEmitSEI&&this.findSei(e.payload,e.ts),t._opt.useWCS&&!t._opt.useOffscreen?i.decodeVideo(e.payload,e.ts,e.isIFrame,e.cts):t._opt.useMSE?s.decodeVideo(e.payload,e.ts,e.isIFrame,e.cts):t.decoderWorker&&t.decoderWorker.decodeVideo(e.payload,e.ts,e.isIFrame))}pushBuffer(e,t){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=this.player._opt.videoBuffer,r=this.player._opt.videoBufferDelay,a=this.player.isPlayer();if(t.type===Ne&&zr(e)){if(this.player.debug.log("CommonDemux",`pushBuffer() audio ts is ${t.ts}, isAacCodecPacket is true`),this.player.isRecordTypeFlv()){const i=new Uint8Array(e);this.player.recorder.addAACSequenceHeader(i,t.ts)}this._doDecoderDecode({ts:t.ts,payload:e,type:Ne})}else if(t.type===je&&t.isIFrame&&co(e)){if(this.player.debug.log("CommonDemux",`pushBuffer() video ts is ${t.ts}, isVideoSequenceHeader is true`),this.player.isRecordTypeFlv()){const i=new Uint8Array(e);this.player.recorder.addVideoSequenceHeader(i,t.ts)}this._doDecoderDecode({ts:t.ts,payload:e,type:je,isIFrame:t.isIFrame,cts:t.cts})}else{if(this.player.recording&&this.handleRecording(e,t.type,t.ts,t.isIFrame,t.cts),a){if(this.preTimestampDuration>0&&this.preTimestamp>0&&t.type===je){const e=t.ts-this.preTimestamp,i=this.preTimestampDuration+this.preTimestampDuration/2;e>=i&&this.player.debug.log("CommonDemux",`pushBuffer() video\n ts is ${t.ts}, preTimestamp is ${this.preTimestamp},\n diff is ${e} and preTimestampDuration is ${this.preTimestampDuration} and maxDiff is ${i}\n maybe trigger black screen or flower screen`)}if(this.preTimestamp>0&&t.ts<this.preTimestamp&&t.type===je&&this.preTimestamp-t.ts>X&&(this.player.debug.warn("CommonDemux",`pushBuffer() video\n ts is ${t.ts}, preTimestamp is ${this.preTimestamp},\n diff is ${this.preTimestamp-t.ts} more than 3600000\n and resetAllDelay()`),this.resetAllDelay()),t.ts<=this.preTimestamp&&this.preTimestamp>0&&t.type===je&&(this.player.debug.warn("CommonDemux",`pushBuffer() video and isIFrame is ${t.isIFrame} and\n ts is ${t.ts} less than (or equal) preTimestamp is ${this.preTimestamp} and\n payloadBufferSize is ${e.byteLength} and prevPayloadBufferSize is ${this.prevPayloadBufferSize}`),this.player._opt.isDropSameTimestampGop&&po(t.isIFrame)&&this.player.isDemuxDecodeFirstIIframeInit())){const e=this.hasIframeInBufferList(),t=po(this.isPushDropping);return this.player.debug.log("CommonDemux",`pushBuffer(), isDropSameTimestampGop is true and\n hasIframe is ${e} and isNotPushDropping is ${t} and next drop buffer`),void(e&&t?this.dropBuffer$2():this.clearBuffer(!0))}if(this.player.isDemuxDecodeFirstIIframeInit()){let e=this.getDelayNotUpdateDelay(t.ts,t.type);this.pushLatestDelay=e;const i=r+s;this.player._opt.useMSE?e>i&&this.delay<i&&this.delay>0&&this.hasIframeInBufferList()&&!1===this.isPushDropping&&(this.player.debug.warn("CommonDemux",`useMSE, pushLatestDelay is ${e} > ${r+s}, bufferList is ${this.bufferList.length}, delay is ${this.delay} and dropBuffer$2()`),this.dropBuffer$2()):e>i&&this.delay<i&&this.delay>0&&this.hasIframeInBufferList()&&!1===this.isPushDropping&&(this.player.debug.warn("CommonDemux",`useWCS, pushLatestDelay is ${e} > ${r+s},bufferList is ${this.bufferList.length}, delay is ${this.delay} and dropBuffer$2()`),this.dropBuffer$2()),this.isHistoryIntervalDiffTimeAllLarge()&&po(this.player.visibility)&&(this.player._opt.useMSE?this.hasIframeInBufferList()&&!1===this.isPushDropping&&(this.player.debug.warn("CommonDemux",`useMSE, page visibility is false and\n history interval diff is ${this.historyIntervalDiffTimeList.join(",")} and\n bufferList is ${this.bufferList.length},\n delay is ${this.delay} and dropBuffer$2()`),this.dropBuffer$2()):this.hasIframeInBufferList()&&!1===this.isPushDropping&&(this.player.debug.warn("CommonDemux",`useWCS, page visibility is false and\n history interval diff is ${this.historyIntervalDiffTimeList.join(",")} and\n bufferList is ${this.bufferList.length},\n delay is ${this.delay} and dropBuffer$2()`),this.dropBuffer$2()))}t.type===je&&(this.preTimestamp>0&&(this.preTimestampDuration=t.ts-this.preTimestamp),this.prevPayloadBufferSize=e.byteLength,this.preTimestamp=t.ts)}if(i?t.type===Ne?this.bufferList.push({ts:t.ts,payload:e,type:Ne}):t.type===je&&this.bufferList.push({ts:t.ts,cts:t.cts,payload:e,type:je,isIFrame:t.isIFrame}):t.type===je?this._doDecoderDecode({ts:t.ts,cts:t.cts,payload:e,type:je,isIFrame:t.isIFrame}):t.type===Ne&&this._doDecoderDecode({ts:t.ts,payload:e,type:Ne}),this.player.isPlaybackCacheBeforeDecodeForFpsRender()&&(La(this.playbackStreamVideoFps)||La(this.playbackStreamAudioFps))){let e=this.playbackStreamVideoFps,t=this.playbackStreamAudioFps;if(La(this.playbackStreamVideoFps)&&(e=ro(this.bufferList,je),e>0&&(this.playbackStreamVideoFps=e,this.player.video&&this.player.video.setStreamFps(this.playbackStreamVideoFps),this.playbackStreamFps=t?e+t:e,po(this.player._opt.hasAudio)&&(this.player.debug.log(this.TAG_NAME,"playbackCacheBeforeDecodeForFpsRender,_opt.hasAudio is false and set streamAudioFps is 0"),this.playbackStreamAudioFps=0),this.initPlaybackCacheLoop())),La(this.playbackStreamAudioFps)&&(t=ro(this.bufferList,Ne),t>0&&(this.playbackStreamAudioFps=t,this.playbackStreamFps=e?e+t:t,this.initPlaybackCacheLoop())),La(this.playbackStreamVideoFps)&&La(this.playbackStreamAudioFps)){const i=this.bufferList.map((e=>({type:e.type,ts:e.ts})));this.player.debug.log("CommonDemux",`playbackCacheBeforeDecodeForFpsRender, calc streamAudioFps is ${t}, streamVideoFps is ${e}, bufferListLength is ${this.bufferList.length} and ts list is ${JSON.stringify(i)}`)}const i=this.getAudioBufferLength()>0,s=i?60:40;this.bufferList.length>=s&&(this.debug.warn("CommonDemux",`playbackCacheBeforeDecodeForFpsRender, bufferListLength is ${this.bufferList.length} more than ${s}, and hasAudio is ${i} an set streamFps is 25`),this.playbackStreamVideoFps=e,this.player.video&&this.player.video.setStreamFps(this.playbackStreamVideoFps),i?(this.playbackStreamAudioFps=25,this.playbackStreamFps=this.playbackStreamVideoFps+this.playbackStreamAudioFps):this.playbackStreamFps=this.playbackStreamVideoFps,this.initPlaybackCacheLoop())}}}dropBuffer$2(){if(this.bufferList.length>0){let e=this.bufferList.findIndex((e=>uo(e.isIFrame)&&e.type===je));if(this.isAllIframeInBufferList())for(let t=0;t<this.bufferList.length;t++){const i=this.bufferList[t],s=this.getDelayNotUpdateDelay(i.ts,i.type);if(s>=this.getNotDroppingDelayTs()){this.player.debug.log("CommonDemux",`dropBuffer$2() isAllIframeInBufferList() is true, and index is ${t} and tempDelay is ${s} and notDroppingDelayTs is ${this.getNotDroppingDelayTs()}`),e=t;break}}if(e>=0){this.isPushDropping=!0,this.player.updateStats({isDropping:!0});const t=this.bufferList.length;this.bufferList=this.bufferList.slice(e);const i=this.bufferList.shift();this.resetAllDelay(),this.getDelay(i.ts,i.type),this._doDecoderDecode(i),this.isPushDropping=!1,this.player.debug.log("CommonDemux",`dropBuffer$2() iFrameIndex is ${e},and old bufferList length is ${t} ,and new bufferList length is ${this.bufferList.length} and new delay is ${this.delay} `)}else this.isPushDropping=!1}0===this.bufferList.length&&(this.isPushDropping=!1)}clearBuffer(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.player.debug.log("CommonDemux",`clearBuffer,buffer length is ${this.bufferList.length}, need clear is ${e} and _opt.checkFirstIFrame is ${this.player._opt.checkFirstIFrame}`),e&&(this.bufferList=[]),this.player.isPlayer()&&(this.resetAllDelay(),uo(this.player._opt.checkFirstIFrame)&&(this.dropping=!0,this.player.updateStats({isDropping:!0}))),this.player.decoderCheckFirstIFrame()}calcNetworkDelay(e){if(!(this.player.isDemuxDecodeFirstIIframeInit()&&e>0))return;null===this.bufferStartDts?(this.bufferStartDts=e,this.bufferStartLocalTs=aa()):e<this.bufferStartDts&&(this.player.debug.warn("CommonDemux",`calcNetworkDelay dts is ${e} and bufferStartDts is ${this.bufferStartDts}`),this.bufferStartDts=e,this.bufferStartLocalTs=aa());let t=e-this.bufferStartDts,i=aa()-this.bufferStartLocalTs,s=i>t?i-t:0;s>this.player._opt.networkDelay&&this.player._opt.playType===b&&(this.player.debug.warn("CommonDemux",`delay is more than networkDelay and now dts:${e},start dts is ${this.bufferStartDts}, vs start is ${t},local diff is ${i} ,delay is ${s}, _opt.networkDelay is ${this.player._opt.networkDelay}`),this.player.emit(nt.networkDelayTimeout,s)),this.player.updateStats({netBuf:s})}calcIframeIntervalTimestamp(e){if(null===this.preIframeTs)this.preIframeTs=e;else if(this.preIframeTs<e){const t=e-this.preIframeTs;this.player&&(this.player.videoIframeIntervalTs=t),this.preIframeTs=e}}calcBufferFps(e){}getNotDroppingDelayTs(){return this.player._opt.videoBuffer+this.player._opt.videoBufferDelay/2}getMaxDelayTs(){return this.player._opt.videoBuffer+this.player._opt.videoBufferDelay}getPushLatestDelay(){return this.pushLatestDelay}getVideoBufferLength(){let e=0;return this.bufferList.forEach((t=>{t.type===je&&(e+=1)})),e}getAudioBufferLength(){let e=0;return this.bufferList.forEach((t=>{t.type===Ne&&(e+=1)})),e}hasIframeInBufferList(){return this.bufferList.some((e=>e.type===je&&e.isIFrame))}isAllIframeInBufferList(){const e=this.getVideoBufferLength();let t=0;return this.bufferList.forEach((e=>{e.type===je&&e.isIFrame&&(t+=1)})),e===t}getInputByteLength(){return 0}getIsStreamTsMoreThanLocal(){return this.isStreamTsMoreThanLocal}close(){}reset(){}findSei(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=4;Ba(this.nalUnitSize)&&(s=this.nalUnitSize);const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(e.length<4)return;const i=e.length,s=[];let r,a=0;for(;a+t<i;)if(r=Zr(e,a),3===t&&(r>>>=8),a+=t,r){if(a+r>i)break;s.push(e.subarray(a,a+r)),a+=r}return s}(e.slice(5),s);if(po(i)){const e=this.player.getVideoInfo();e&&e.encType&&(i=e.encType===wt)}r.forEach((e=>{const s=i?e[0]>>>1&63:31&e[0];(i&&(s===qt||s===Jt)||po(i)&&s===Bt)&&this.player.emit(nt.videoSEI,{ts:t,data:e})}))}handleRecording(e,t,i,s,r){if(this.player.isRecordTypeFlv()){const s=new Uint8Array(e);t===je?this.player.recorder.addVideo(s,i):t===Ne&&this.player.recorder.addAudio(s,i)}else if(this.player.isRecordTypeMp4()){const a=new Uint8Array(e);if(this.player.recorder.isWasmMp4()){if(t===je)this.player.recorder.handleAddNaluTrack(a.slice(5),s,i,r);else if(t===Ne){const t=new Uint8Array(e);this.player.recorder.handleAddAudioTrack(Gr(t)?t.slice(2):t.slice(1),i)}}else t===je&&this.player.recorder.handleAddNaluTrack(a.slice(5),s,i,r)}}updateNalUnitSize(e){const t=15&e[0];this.player.video.updateVideoInfo({encTypeCode:t});const i=t===_t;this.nalUnitSize=function(e,t){let i=null;return t?e.length>=28&&(i=1+(3&e[26])):e.length>=12&&(i=1+(3&e[9])),i}(e,i),this.player.debug.log(this.TAG_NAME,`demux() isVideoSequenceHeader is true and isHevc is ${i} and nalUnitSize is ${this.nalUnitSize}`)}cryptoPayload(e,t){let i=e,s=this.player;if(s._opt.isM7sCrypto)if(s._opt.cryptoKey&&s._opt.cryptoKey.byteLength>0&&s._opt.cryptoIV&&s._opt.cryptoIV.byteLength>0){const t=this.player.video.getVideoInfo();t.encTypeCode?i=function(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t=new Uint8Array(t),i=new Uint8Array(i);const r=e.byteLength;let a=5;for(;a<r;){let o=cd(e.slice(a,a+4));if(o>r)break;let n=e[a+4],l=!1;if(s?(n=n>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(n)):(n&=31,l=1===n||5===n),l){const s=e.slice(a+4+2,a+4+o);let r=new ld.ModeOfOperation.ctr(t,new ld.Counter(i));const n=r.decrypt(s);r=null,e.set(n,a+4+2)}a=a+4+o}return e}(e,s._opt.cryptoKey,s._opt.cryptoIV,t.encTypeCode===_t):s.debug.warn(this.TAG_NAME,`videoInfo.encTypeCode is ${t.encTypeCode}`)}else s.debug.error(this.TAG_NAME,`isM7sCrypto cryptoKey.length is ${s._opt.cryptoKey&&s._opt.cryptoKey.byteLength} or cryptoIV.length is ${s._opt.cryptoIV&&s._opt.cryptoIV.byteLength} null`);else if(s._opt.isSm4Crypto)s._opt.sm4CryptoKey&&t?i=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=e.byteLength;let r=5;for(;r<s;){let a=Cd(e.slice(r,r+4));if(a>s)break;let o=e[r+4],n=!1;if(i?(o=o>>>1&63,n=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(o)):(o&=31,n=1===o||5===o),n){const i=kd(e.slice(r+4+2,r+4+a),t,0,{padding:"none",output:"array"});e.set(i,r+4+2)}r=r+4+a}return e}(e,s._opt.sm4CryptoKey):s._opt.sm4CryptoKey||s.debug.error(this.TAG_NAME,"isSm4Crypto opt.sm4CryptoKey is null");else if(s._opt.isXorCrypto)if(s._opt.cryptoKey&&s._opt.cryptoKey.byteLength>0&&s._opt.cryptoIV&&s._opt.cryptoIV.byteLength>0){const t=this.player.video.getVideoInfo();i=function(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=e.byteLength;let a=5;for(;a<r;){let o=Rd(e.slice(a,a+4));if(o>r)break;let n=e[a+4],l=!1;if(s?(n=n>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(n)):(n&=31,l=1===n||5===n),l){const s=xd(e.slice(a+4,a+4+o),t,i);e.set(s,a+4)}a=a+4+o}return e}(e,s._opt.cryptoKey,s._opt.cryptoIV,t.encTypeCode===_t)}else s.debug.error(this.TAG_NAME,"isXorCrypto opt.xorCryptoKey is null");return i}cryptoPayloadAudio(e){let t=e,i=this.player;if(i._opt.isM7sCrypto)if(i._opt.cryptoKey&&i._opt.cryptoKey.byteLength>0&&i._opt.cryptoIV&&i._opt.cryptoIV.byteLength>0){e[0]>>4===Et&&(t=function(e,t,i){if(e.byteLength<=30)return e;const s=e.slice(32);let r=new ld.ModeOfOperation.ctr(t,new ld.Counter(i));const a=r.decrypt(s);return r=null,e.set(a,32),e}(e,i._opt.cryptoKey,i._opt.cryptoIV))}else i.debug.error(this.TAG_NAME,`isM7sCrypto cryptoKey.length is ${i._opt.cryptoKey&&i._opt.cryptoKey.byteLength} or cryptoIV.length is ${i._opt.cryptoIV&&i._opt.cryptoIV.byteLength} null`);return t}_decodeEnhancedH265Video(e,t){const i=e[0],s=48&i,r=15&i,a=e.slice(1,5),o=new ArrayBuffer(4),n=new Uint32Array(o),l="a"==String.fromCharCode(a[0]);if(r===yr){if(s===vr){const t=e.slice(5);if(l);else{const e=new Uint8Array(5+t.length);e.set([28,0,0,0,0],0),e.set(t,5),this.updateNalUnitSize(e),this.player.debug.log(this.TAG_NAME,`demux() isVideoSequenceHeader(enhancedH265) is true and nalUnitSize is ${this.nalUnitSize}`),this._doDecode(e,je,0,!0,0)}}}else if(r===Ar){let i=e,r=0;const a=s===vr;if(a&&this.calcIframeIntervalTimestamp(t),l);else{n[0]=e[4],n[1]=e[3],n[2]=e[2],n[3]=0,r=n[0];i=jn(e.slice(8),a),i=this.cryptoPayload(i,a),this._doDecode(i,je,t,a,r)}}else if(r===br){const i=s===vr,r=e.slice(5);i&&this.calcIframeIntervalTimestamp(t);let a=jn(r,i);a=this.cryptoPayload(a,i),this._doDecode(a,je,t,i,0)}}_isEnhancedH265Header(e){return 128==(128&e)}}var Ld=function(e,t,i,s){return new(i||(i=Promise))((function(r,a){function o(e){try{l(s.next(e))}catch(e){a(e)}}function n(e){try{l(s.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,n)}l((s=s.apply(e,t||[])).next())}))};const Pd=Symbol(32),Bd=Symbol(16),Id=Symbol(8);class Md{constructor(e){this.g=e,this.consumed=0,e&&(this.need=e.next().value)}setG(e){this.g=e,this.demand(e.next().value,!0)}consume(){this.buffer&&this.consumed&&(this.buffer.copyWithin(0,this.consumed),this.buffer=this.buffer.subarray(0,this.buffer.length-this.consumed),this.consumed=0)}demand(e,t){return t&&this.consume(),this.need=e,this.flush()}read(e){return Ld(this,void 0,void 0,(function*(){return this.lastReadPromise&&(yield this.lastReadPromise),this.lastReadPromise=new Promise(((t,i)=>{var s;this.reject=i,this.resolve=e=>{delete this.lastReadPromise,delete this.resolve,delete this.need,t(e)};this.demand(e,!0)||null===(s=this.pull)||void 0===s||s.call(this,e)}))}))}readU32(){return this.read(Pd)}readU16(){return this.read(Bd)}readU8(){return this.read(Id)}close(){var e;this.g&&this.g.return(),this.buffer&&this.buffer.subarray(0,0),null===(e=this.reject)||void 0===e||e.call(this,new Error("EOF")),delete this.lastReadPromise}flush(){if(!this.buffer||!this.need)return;let e=null;const t=this.buffer.subarray(this.consumed);let i=0;const s=e=>t.length<(i=e);if("number"==typeof this.need){if(s(this.need))return;e=t.subarray(0,i)}else if(this.need===Pd){if(s(4))return;e=t[0]<<24|t[1]<<16|t[2]<<8|t[3]}else if(this.need===Bd){if(s(2))return;e=t[0]<<8|t[1]}else if(this.need===Id){if(s(1))return;e=t[0]}else if("buffer"in this.need){if("byteOffset"in this.need){if(s(this.need.byteLength-this.need.byteOffset))return;new Uint8Array(this.need.buffer,this.need.byteOffset).set(t.subarray(0,i)),e=this.need}else if(this.g)return void this.g.throw(new Error("Unsupported type"))}else{if(s(this.need.byteLength))return;new Uint8Array(this.need).set(t.subarray(0,i)),e=this.need}return this.consumed+=i,this.g?this.demand(this.g.next(e).value,!0):this.resolve&&this.resolve(e),e}write(e){if(e instanceof Uint8Array?this.malloc(e.length).set(e):"buffer"in e?this.malloc(e.byteLength).set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)):this.malloc(e.byteLength).set(new Uint8Array(e)),!this.g&&!this.resolve)return new Promise((e=>this.pull=e));this.flush()}writeU32(e){this.malloc(4).set([e>>24&255,e>>16&255,e>>8&255,255&e]),this.flush()}writeU16(e){this.malloc(2).set([e>>8&255,255&e]),this.flush()}writeU8(e){this.malloc(1)[0]=e,this.flush()}malloc(e){if(this.buffer){const t=this.buffer.length,i=t+e;if(i<=this.buffer.buffer.byteLength-this.buffer.byteOffset)this.buffer=new Uint8Array(this.buffer.buffer,this.buffer.byteOffset,i);else{const e=new Uint8Array(i);e.set(this.buffer),this.buffer=e}return this.buffer.subarray(t,i)}return this.buffer=new Uint8Array(e),this.buffer}}Md.U32=Pd,Md.U16=Bd,Md.U8=Id;class Ud extends Dd{constructor(e){super(e),this.TAG_NAME="FlvDemux",this.input=new Md(this.demux()),e.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.input=null,this.player.debug.log(this.TAG_NAME,"destroy")}dispatch(e){this.input?this.input.write(e):this.player&&this.player.debug.warn(this.TAG_NAME,"dispatch() this.input is null")}*demux(){yield 9;const e=new ArrayBuffer(4),t=new Uint8Array(e),i=new Uint32Array(e),s=this.player;for(;;){if(!this.input)return;t[3]=0;const e=yield 15,r=e[4];t[0]=e[7],t[1]=e[6],t[2]=e[5];const a=i[0];t[0]=e[10],t[1]=e[9],t[2]=e[8],t[3]=e[11];let o=i[0];const n=(yield a).slice();if(!s)return;switch(r){case ze:if(s._opt.hasAudio&&(s.updateStats({abps:n.byteLength}),n.byteLength>0)){let e=n;uo(this.player._opt.m7sCryptoAudio)&&(e=this.cryptoPayloadAudio(n)),this._doDecode(e,Ne,o)}break;case Ge:if(s._opt.hasVideo&&n.length>=6){let e=o;s.updateStats({vbps:n.byteLength,dts:e}),s._times.demuxStart||(s._times.demuxStart=aa());const t=n[0];if(this._isEnhancedH265Header(t))this._decodeEnhancedH265Video(n,e);else{const e=15&t;let s=(t>>4&15)===js;const r=e===vt;if(po(e===_t||r))return void this.player.debug.warn(this.TAG_NAME,`demux() codecId is ${e} and ignore`);s&&(this.calcIframeIntervalTimestamp(o),null===this.nalUnitSize&&co(n)&&this.updateNalUnitSize(n)),i[0]=n[4],i[1]=n[3],i[2]=n[2],i[3]=0;let a=i[0],l=this.cryptoPayload(n,s);this._doDecode(l,je,o,s,a)}}else n.length<6&&s.debug.warn(this.TAG_NAME,`payload.length is ${n.length} less than 6 and ignore`);break;case He:if(this.player.isRecordTypeFlv()){const e=new Uint8Array(n);this.player.recorder.addMetaData(e)}const e=al(n);e&&e.onMetaData&&s.updateMetaData(e.onMetaData);break;default:s.debug.log(this.TAG_NAME,`demux() type is ${r}`)}}}close(){this.input=null}getInputByteLength(){let e=0;return this.input&&this.input.buffer&&(e=this.input.buffer.byteLength),e}}class Fd extends Dd{constructor(e){super(e),this.TAG_NAME="M7sDemux",e.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.player.debug.log(this.TAG_NAME,"destroy")}dispatch(e){const t=this.player,i=new DataView(e),s=i.getUint8(0),r=i.getUint32(1,!1),a=new ArrayBuffer(4),o=new Uint32Array(a);switch(s){case Ne:if(t._opt.hasAudio){const i=new Uint8Array(e,5);t.updateStats({abps:i.byteLength}),i.byteLength>0&&this._doDecode(i,s,r)}break;case je:if(t._opt.hasVideo)if(t._times.demuxStart||(t._times.demuxStart=aa()),i.byteLength>=11){const a=new Uint8Array(e,5);let n=r;t.updateStats({vbps:a.byteLength,dts:n});const l=a[0];if(this._isEnhancedH265Header(l))this._decodeEnhancedH265Video(a,r);else{const e=i.getUint8(5)>>4==1;e&&this.calcIframeIntervalTimestamp(r),o[0]=a[4],o[1]=a[3],o[2]=a[2],o[3]=0;let t=o[0],n=this.cryptoPayload(a,e);this._doDecode(n,s,r,e,t)}}else this.player.debug.warn(this.TAG_NAME,"dispatch","dv byteLength is",i.byteLength,"and return")}}}class Od extends Ud{constructor(e){super(e),e.debug.log("WebTransportDemux","init")}destroy(){this.player.debug.log("WebTransportDemux","destroy"),super.destroy()}}var Nd,jd=Ir((function(e){e.exports=function(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e},e.exports.__esModule=!0,e.exports.default=e.exports})),zd=(Nd=jd)&&Nd.__esModule&&Object.prototype.hasOwnProperty.call(Nd,"default")?Nd.default:Nd;class Gd extends Dd{constructor(e){super(e),zd(this,"TAG_NAME","NakedFlowDemux"),this.lastBuf=null,this.vps=null,this.sps=null,this.pps=null,this.streamVideoType=null,this.streamAudioType=null,this.tempNaluBufferList=new Uint8Array(0),this.localDts=0,this.isSendSeqHeader=!1,this.isSendAACSeqHeader=!1,e.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.lastBuf=null,this.vps=null,this.sps=null,this.pps=null,this.streamVideoType=null,this.streamAudioType=null,this.tempNaluBufferList=new Uint8Array(0),this.localDts=0,this.localAudioDts=0,this.isSendSeqHeader=!1,this.isSendAACSeqHeader=!1,this.player.debug.log(this.TAG_NAME,"destroy")}dispatch(e){this.player;const t=new Uint8Array(e);this.extractNALu$2(t)}addNaluToBuffer(e){const t=e.byteLength+this.tempNaluBufferList.byteLength,i=new Uint8Array(t);i.set(this.tempNaluBufferList,0),i.set(e,this.tempNaluBufferList.byteLength),this.tempNaluBufferList=i}downloadNakedFlowFile(){const e=new Blob([this.tempNaluBufferList]);try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=Date.now()+".h264",t.click(),window.URL.revokeObjectURL(t.href)}catch(e){console.error("downloadTempNalu",e)}}getNaluDts(){const e=this.player._opt.nakedFlowFps;return this.localDts=this.localDts+parseInt(1e3/e),this.localDts}getNaluAudioDts(){const e=this.player.audio.audioContext.sampleRate,t=this.player.audio.audioBufferSize;return this.localDts+parseInt(t/e*1e3)}extractNALu(e){let t,i,s=0,r=e.byteLength,a=0,o=[];for(;s<r;)switch(t=e[s++],a){case 0:0===t&&(a=1);break;case 1:a=0===t?2:0;break;case 2:case 3:0===t?a=3:1===t&&s<r?(e[s],i&&o.push(e.subarray(i,s-a-1)),i=s,a=0):a=0}return i&&o.push(e.subarray(i,r)),o}extractNALu$2(e){let t=null;if(!e||e.byteLength<1)return;this.lastBuf?(t=new Uint8Array(e.byteLength+this.lastBuf.length),t.set(this.lastBuf),t.set(new Uint8Array(e),this.lastBuf.length)):t=new Uint8Array(e);let i=0,s=-1,r=-2;const a=new Array;for(let e=0;e<t.length;e+=2){const i=t[e],o=t[e+1];0==s&&0==i&&0==o?a.push(e-1):1==o&&0==i&&0==s&&0==r&&a.push(e-2),r=i,s=o}if(a.length>1)for(let e=0;e<a.length-1;++e){const s=t.subarray(a[e],a[e+1]+1);this.handleNALu(s),i=a[e+1]}else i=a[0];if(0!=i&&i<t.length)this.lastBuf=t.subarray(i);else{this.lastBuf||(this.lastBuf=t);const i=new Uint8Array(this.lastBuf.length+e.byteLength);i.set(this.lastBuf),i.set(new Uint8Array(e),this.lastBuf.length),this.lastBuf=i}}handleNALu(e){e.byteLength<4?this.player.debug.warn(this.TAG_NAME,`handleNALu nalu byteLength is ${e.byteLength} <= 4`):(e=e.slice(4),this.handleVideoNalu(e))}handleVideoNalu(e){const t=new Uint8Array(e);if(this.streamVideoType||(this.streamVideoType=function(e){let t=null,i=31&e[0];return i!==xt&&i!==Rt||(t=St),t||(i=(126&e[0])>>1,i!==jt&&i!==Gt&&i!==Vt||(t=wt)),t}(t)),this.streamVideoType===St){const e=this.handleAddNaluStartCode(t),i=this.extractNALu(e);if(0===i.length)return void this.player.debug.warn(this.TAG_NAME,"handleVideoNalu","naluList.length === 0");const s=[];if(i.forEach((e=>{const t=Cn(e);t===Rt||t===xt?this.handleVideoH264Nalu(e):Rn(t)&&s.push(e)})),1===s.length)this.handleVideoH264Nalu(s[0]);else{const e=function(e){if(0===e.length)return!1;const t=Cn(e[0]);for(let i=1;i<e.length;i++)if(t!==Cn(e[i]))return!1;return!0}(s);if(e){const e=Cn(s[0]),t=Dn(e);this.handleVideoH264NaluList(s,t,e)}else s.forEach((e=>{this.handleVideoH264Nalu(e)}))}}else if(this.streamVideoType===wt)if(this.player._opt.nakedFlowH265DemuxUseNew){const e=this.handleAddNaluStartCode(t),i=this.extractNALu(e);if(0===i.length)return void this.player.debug.warn(this.TAG_NAME,"handleVideoNalu","h265 naluList.length === 0");const s=[];if(i.forEach((e=>{const t=zn(e);t===Vt||t===Gt||t===jt?this.handleVideoH265Nalu(e):Gn(t)&&s.push(e)})),1===s.length)this.handleVideoH265Nalu(s[0]);else{const e=function(e){if(0===e.length)return!1;const t=zn(e[0]);for(let i=1;i<e.length;i++)if(t!==zn(e[i]))return!1;return!0}(s);if(e){const e=zn(s[0]),t=Hn(e);this.handleVideoH265NaluList(s,t,e)}else s.forEach((e=>{this.handleVideoH265Nalu(e)}))}}else{zn(t)===Vt?this.extractH265PPS(t):this.handleVideoH265Nalu(t)}else this.player.debug.error(this.TAG_NAME," this.streamVideoType is null")}extractH264PPS(e){const t=this.handleAddNaluStartCode(e);this.extractNALu(t).forEach((e=>{xn(Cn(e))?this.extractH264SEI(e):this.handleVideoH264Nalu(e)}))}extractH265PPS(e){const t=this.handleAddNaluStartCode(e);this.extractNALu(t).forEach((e=>{const t=zn(e);t===Wt?this.extractH265SEI(e):this.handleVideoH265Nalu(e)}))}extractH264SEI(e){const t=this.handleAddNaluStartCode(e);this.extractNALu(t).forEach((e=>{this.handleVideoH264Nalu(e)}))}extractH265SEI(e){const t=this.handleAddNaluStartCode(e);this.extractNALu(t).forEach((e=>{this.handleVideoH265Nalu(e)}))}handleAddNaluStartCode(e){const t=[0,0,0,1],i=new Uint8Array(e.length+t.length);return i.set(t),i.set(e,t.length),i}handleAudioAACNalu(e){if(!e||e.byteLength<1)return;this.streamAudioType||(this.streamAudioType=kt.AAC);let t=new Uint8Array(e);const i=t.slice(0,7);if(t=t.slice(7),!this.isSendAACSeqHeader){const e=(192&i[2])>>6,t=(60&i[2])>>2,s=(1&i[2])<<2|(192&i[3])>>6,r=new Uint8Array([175,0,e<<3|(14&t)>>1,(1&t)<<7|s<<3]);this.isSendAACSeqHeader=!0,this._doDecode(r,Ne,0,!1,0)}const s=this.getNaluAudioDts(),r=new Uint8Array(t.length+2);r.set([175,1],0),r.set(t,2),this._doDecode(r,Ne,s,!1,0)}handleAudioG711ANalu(e){if(!e||e.byteLength<1)return;this.streamAudioType||(this.streamAudioType=kt.ALAW);let t=new Uint8Array(e);const i=this.getNaluAudioDts(),s=new Uint8Array(t.length+1);s.set([114],0),s.set(t,1),this._doDecode(s,Ne,i,!1,0)}handleAudioG711UNalu(e){if(!e||e.byteLength<1)return;this.streamAudioType||(this.streamAudioType=kt.MULAW);let t=new Uint8Array(e);const i=this.getNaluAudioDts(),s=new Uint8Array(t.length+1);s.set([130],0),s.set(t,1),this._doDecode(s,Ne,i,!1,0)}handleVideoH264Nalu(e){const t=Cn(e);switch(t){case xt:this.sps=e;break;case Rt:this.pps=e}if(this.isSendSeqHeader){if(this.sps&&this.pps){const e=Tn({sps:this.sps,pps:this.pps}),t=this.getNaluDts();this._doDecode(e,je,t,!0,0),this.sps=null,this.pps=null}if(Rn(t)){this.player._times.demuxStart||(this.player._times.demuxStart=aa());const i=Dn(t),s=this.getNaluDts(),r=function(e,t){let i=[];i[0]=t?23:39,i[1]=1,i[2]=0,i[3]=0,i[4]=0,i[5]=e.byteLength>>24&255,i[6]=e.byteLength>>16&255,i[7]=e.byteLength>>8&255,i[8]=255&e.byteLength;const s=new Uint8Array(i.length+e.byteLength);return s.set(i,0),s.set(e,i.length),s}(e,i);this._preDoDecode(r,je,s,i,0)}else this.player.debug.warn(this.TAG_NAME,`handleVideoH264Nalu is avc seq head nalType is ${t}`)}else if(this.sps&&this.pps){this.isSendSeqHeader=!0;const e=Tn({sps:this.sps,pps:this.pps});this._doDecode(e,je,0,!0,0),this.sps=null,this.pps=null}}handleVideoH264NaluList(e,t,i){if(this.isSendSeqHeader){this.player._times.demuxStart||(this.player._times.demuxStart=aa());const i=this.getNaluDts(),s=kn(e.reduce(((e,t)=>{const i=ea(e),s=ea(t),r=new Uint8Array(i.byteLength+s.byteLength);return r.set(i,0),r.set(s,i.byteLength),r})),t);this._preDoDecode(s,je,i,t,0)}else this.player.debug.warn(this.TAG_NAME,"handleVideoH264NaluList isSendSeqHeader is false")}handleVideoH265Nalu(e){const t=zn(e);switch(t){case jt:this.vps=e;break;case Gt:this.sps=e;break;case Vt:this.pps=e}if(this.isSendSeqHeader){if(this.vps&&this.sps&&this.pps){const e=Nn({vps:this.vps,sps:this.sps,pps:this.pps}),t=this.getNaluDts();this._doDecode(e,je,t,!0,0),this.vps=null,this.sps=null,this.pps=null}if(Gn(t)){this.player._times.demuxStart||(this.player._times.demuxStart=aa());const i=Hn(t),s=this.getNaluDts(),r=function(e,t){let i=[];i[0]=t?28:44,i[1]=1,i[2]=0,i[3]=0,i[4]=0,i[5]=e.byteLength>>24&255,i[6]=e.byteLength>>16&255,i[7]=e.byteLength>>8&255,i[8]=255&e.byteLength;const s=new Uint8Array(i.length+e.byteLength);return s.set(i,0),s.set(e,i.length),s}(e,i);this._preDoDecode(r,je,s,i,0)}}else if(this.vps&&this.sps&&this.pps){this.isSendSeqHeader=!0;const e=Nn({vps:this.vps,sps:this.sps,pps:this.pps});this._doDecode(e,je,0,!0,0),this.vps=null,this.sps=null,this.pps=null}}handleVideoH265NaluList(e,t,i){if(this.isSendSeqHeader){this.player._times.demuxStart||(this.player._times.demuxStart=aa());const i=this.getNaluDts(),s=jn(e.reduce(((e,t)=>{const i=ea(e),s=ea(t),r=new Uint8Array(i.byteLength+s.byteLength);return r.set(i,0),r.set(s,i.byteLength),r})),t);this._preDoDecode(s,je,i,t,0)}else this.player.debug.warn(this.TAG_NAME,"handleVideoH265NaluList isSendSeqHeader is false")}_preDoDecode(e,t,i,s,r){this.player.updateStats({vbps:e.byteLength,dts:i}),s&&this.calcIframeIntervalTimestamp(i),this._doDecode(e,je,i,s,r)}getInputByteLength(){let e=0;return this.lastBuf&&(e=this.lastBuf.byteLength),e}}class Hd extends Dd{constructor(e){super(e),this.player=e,e.debug.log("EmptyDemux","init")}destroy(){super.destroy(),this.player.debug.log("EmptyDemux","destroy")}}var Vd=Ir((function(e,t){var s,r,a,o=(s=new Date,r=4,a={setLogLevel:function(e){r=e==this.debug?1:e==this.info?2:e==this.warn?3:(this.error,4)},debug:function(e,t){void 0===console.debug&&(console.debug=console.log),1>=r&&console.debug("["+o.getDurationString(new Date-s,1e3)+"]","["+e+"]",t)},log:function(e,t){this.debug(e.msg)},info:function(e,t){2>=r&&console.info("["+o.getDurationString(new Date-s,1e3)+"]","["+e+"]",t)},warn:function(e,t){3>=r&&console.warn("["+o.getDurationString(new Date-s,1e3)+"]","["+e+"]",t)},error:function(e,t){4>=r&&console.error("["+o.getDurationString(new Date-s,1e3)+"]","["+e+"]",t)}},a);o.getDurationString=function(e,t){var i;function s(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 r=e/(t||1),a=Math.floor(r/3600);r-=3600*a;var o=Math.floor(r/60),n=1e3*(r-=60*o);return n-=1e3*(r=Math.floor(r)),n=Math.floor(n),(i?"-":"")+a+":"+s(o,2)+":"+s(r,2)+"."+s(n,3)},o.printRanges=function(e){var t=e.length;if(t>0){for(var i="",s=0;s<t;s++)s>0&&(i+=","),i+="["+o.getDurationString(e.start(s))+","+o.getDurationString(e.end(s))+"]";return i}return"(empty)"},t.Log=o;var n=function(e){if(!(e instanceof ArrayBuffer))throw"Needs an array buffer";this.buffer=e,this.dataview=new DataView(e),this.position=0};n.prototype.getPosition=function(){return this.position},n.prototype.getEndPosition=function(){return this.buffer.byteLength},n.prototype.getLength=function(){return this.buffer.byteLength},n.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},n.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()},n.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+1)<<8,i|=this.dataview.getUint8(this.position+2);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+4);break;default:throw"readInt method not implemented for size: "+e}return this.position+=e,i}throw"Not enough bytes in buffer"},n.prototype.readUint8=function(){return this.readAnyInt(1,!1)},n.prototype.readUint16=function(){return this.readAnyInt(2,!1)},n.prototype.readUint24=function(){return this.readAnyInt(3,!1)},n.prototype.readUint32=function(){return this.readAnyInt(4,!1)},n.prototype.readUint64=function(){return this.readAnyInt(8,!1)},n.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"},n.prototype.readCString=function(){for(var e=[];;){var t=this.readUint8();if(0===t)break;e.push(t)}return String.fromCharCode.apply(null,e)},n.prototype.readInt8=function(){return this.readAnyInt(1,!0)},n.prototype.readInt16=function(){return this.readAnyInt(2,!0)},n.prototype.readInt32=function(){return this.readAnyInt(4,!0)},n.prototype.readInt64=function(){return this.readAnyInt(8,!1)},n.prototype.readUint8Array=function(e){for(var t=new Uint8Array(e),i=0;i<e;i++)t[i]=this.readUint8();return t},n.prototype.readInt16Array=function(e){for(var t=new Int16Array(e),i=0;i<e;i++)t[i]=this.readInt16();return t},n.prototype.readUint16Array=function(e){for(var t=new Int16Array(e),i=0;i<e;i++)t[i]=this.readUint16();return t},n.prototype.readUint32Array=function(e){for(var t=new Uint32Array(e),i=0;i<e;i++)t[i]=this.readUint32();return t},n.prototype.readInt32Array=function(e){for(var t=new Int32Array(e),i=0;i<e;i++)t[i]=this.readInt32();return t},t.MP4BoxStream=n;var l=function(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?l.LITTLE_ENDIAN:i};l.prototype={},l.prototype.getPosition=function(){return this.position},l.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 s=new ArrayBuffer(i),r=new Uint8Array(this._buffer);new Uint8Array(s,0,r.length).set(r),this.buffer=s,this._byteLength=t}}},l.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}},l.BIG_ENDIAN=!1,l.LITTLE_ENDIAN=!0,l.prototype._byteLength=0,Object.defineProperty(l.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(l.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(e){this._buffer=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(e){this._byteOffset=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"dataView",{get:function(){return this._dataView},set:function(e){this._byteOffset=e.byteOffset,this._buffer=e.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+e.byteLength}}),l.prototype.seek=function(e){var t=Math.max(0,Math.min(this.byteLength,e));this.position=isNaN(t)||!isFinite(t)?0:t},l.prototype.isEof=function(){return this.position>=this._byteLength},l.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},l.prototype.readInt32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Int32Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readInt16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var i=new Int16Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readInt8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Int8Array(e);return l.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},l.prototype.readUint32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Uint32Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readUint16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var i=new Uint16Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readUint8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Uint8Array(e);return l.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},l.prototype.readFloat64Array=function(e,t){e=null==e?this.byteLength-this.position/8:e;var i=new Float64Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readFloat32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Float32Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readInt32=function(e){var t=this._dataView.getInt32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readInt16=function(e){var t=this._dataView.getInt16(this.position,null==e?this.endianness:e);return this.position+=2,t},l.prototype.readInt8=function(){var e=this._dataView.getInt8(this.position);return this.position+=1,e},l.prototype.readUint32=function(e){var t=this._dataView.getUint32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readUint16=function(e){var t=this._dataView.getUint16(this.position,null==e?this.endianness:e);return this.position+=2,t},l.prototype.readUint8=function(){var e=this._dataView.getUint8(this.position);return this.position+=1,e},l.prototype.readFloat32=function(e){var t=this._dataView.getFloat32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readFloat64=function(e){var t=this._dataView.getFloat64(this.position,null==e?this.endianness:e);return this.position+=8,t},l.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,l.memcpy=function(e,t,i,s,r){var a=new Uint8Array(e,t,r),o=new Uint8Array(i,s,r);a.set(o)},l.arrayToNative=function(e,t){return t==this.endianness?e:this.flipArrayEndianness(e)},l.nativeToEndian=function(e,t){return this.endianness==t?e:this.flipArrayEndianness(e)},l.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 s=i+e.BYTES_PER_ELEMENT-1,r=i;s>r;s--,r++){var a=t[r];t[r]=t[s],t[s]=a}return e},l.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)},l.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))},l.prototype.readCString=function(e){var t=this.byteLength-this.position,i=new Uint8Array(this._buffer,this._byteOffset+this.position),s=t;null!=e&&(s=Math.min(e,t));for(var r=0;r<s&&0!==i[r];r++);var a=String.fromCharCodeUint8.apply(null,[this.mapUint8Array(r)]);return null!=e?this.position+=s-r:r!=t&&(this.position+=1),a};var d=Math.pow(2,32);l.prototype.readInt64=function(){return this.readInt32()*d+this.readUint32()},l.prototype.readUint64=function(){return this.readUint32()*d+this.readUint32()},l.prototype.readInt64=function(){return this.readUint32()*d+this.readUint32()},l.prototype.readUint24=function(){return(this.readUint8()<<16)+(this.readUint8()<<8)+this.readUint8()},t.DataStream=l,l.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),s=document.createElement("a");document.body.appendChild(s),s.setAttribute("href",i),s.setAttribute("download",e),s.setAttribute("target","_self"),s.click(),window.URL.revokeObjectURL(i)},l.prototype._dynamicSize=!0,Object.defineProperty(l.prototype,"dynamicSize",{get:function(){return this._dynamicSize},set:function(e){e||this._trimAlloc(),this._dynamicSize=e}}),l.prototype.shift=function(e){var t=new ArrayBuffer(this._byteLength-e),i=new Uint8Array(t),s=new Uint8Array(this._buffer,e,i.length);i.set(s),this.buffer=t,this.position-=e},l.prototype.writeInt32Array=function(e,t){if(this._realloc(4*e.length),e instanceof Int32Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.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)},l.prototype.writeInt16Array=function(e,t){if(this._realloc(2*e.length),e instanceof Int16Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.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)},l.prototype.writeInt8Array=function(e){if(this._realloc(1*e.length),e instanceof Int8Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.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])},l.prototype.writeUint32Array=function(e,t){if(this._realloc(4*e.length),e instanceof Uint32Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.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)},l.prototype.writeUint16Array=function(e,t){if(this._realloc(2*e.length),e instanceof Uint16Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.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)},l.prototype.writeUint8Array=function(e){if(this._realloc(1*e.length),e instanceof Uint8Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.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])},l.prototype.writeFloat64Array=function(e,t){if(this._realloc(8*e.length),e instanceof Float64Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.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)},l.prototype.writeFloat32Array=function(e,t){if(this._realloc(4*e.length),e instanceof Float32Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)l.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)},l.prototype.writeInt32=function(e,t){this._realloc(4),this._dataView.setInt32(this.position,e,null==t?this.endianness:t),this.position+=4},l.prototype.writeInt16=function(e,t){this._realloc(2),this._dataView.setInt16(this.position,e,null==t?this.endianness:t),this.position+=2},l.prototype.writeInt8=function(e){this._realloc(1),this._dataView.setInt8(this.position,e),this.position+=1},l.prototype.writeUint32=function(e,t){this._realloc(4),this._dataView.setUint32(this.position,e,null==t?this.endianness:t),this.position+=4},l.prototype.writeUint16=function(e,t){this._realloc(2),this._dataView.setUint16(this.position,e,null==t?this.endianness:t),this.position+=2},l.prototype.writeUint8=function(e){this._realloc(1),this._dataView.setUint8(this.position,e),this.position+=1},l.prototype.writeFloat32=function(e,t){this._realloc(4),this._dataView.setFloat32(this.position,e,null==t?this.endianness:t),this.position+=4},l.prototype.writeFloat64=function(e,t){this._realloc(8),this._dataView.setFloat64(this.position,e,null==t?this.endianness:t),this.position+=8},l.prototype.writeUCS2String=function(e,t,i){null==i&&(i=e.length);for(var s=0;s<e.length&&s<i;s++)this.writeUint16(e.charCodeAt(s),t);for(;s<i;s++)this.writeUint16(0)},l.prototype.writeString=function(e,t,i){var s=0;if(null==t||"ASCII"==t)if(null!=i){var r=Math.min(e.length,i);for(s=0;s<r;s++)this.writeUint8(e.charCodeAt(s));for(;s<i;s++)this.writeUint8(0)}else for(s=0;s<e.length;s++)this.writeUint8(e.charCodeAt(s));else this.writeUint8Array(new TextEncoder(t).encode(e.substring(0,i)))},l.prototype.writeCString=function(e,t){var i=0;if(null!=t){var s=Math.min(e.length,t);for(i=0;i<s;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)}},l.prototype.writeStruct=function(e,t){for(var i=0;i<e.length;i+=2){var s=e[i+1];this.writeType(s,t[e[i]],t)}},l.prototype.writeType=function(e,t,i){var s;if("function"==typeof e)return e(this,t);if("object"==typeof e&&!(e instanceof Array))return e.set(this,t,i);var r=null,a="ASCII",o=this.position;switch("string"==typeof e&&/:/.test(e)&&(s=e.split(":"),e=s[0],r=parseInt(s[1])),"string"==typeof e&&/,/.test(e)&&(s=e.split(","),e=s[0],a=parseInt(s[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,l.BIG_ENDIAN);break;case"int16be":this.writeInt16(t,l.BIG_ENDIAN);break;case"uint32be":this.writeUint32(t,l.BIG_ENDIAN);break;case"int32be":this.writeInt32(t,l.BIG_ENDIAN);break;case"float32be":this.writeFloat32(t,l.BIG_ENDIAN);break;case"float64be":this.writeFloat64(t,l.BIG_ENDIAN);break;case"uint16le":this.writeUint16(t,l.LITTLE_ENDIAN);break;case"int16le":this.writeInt16(t,l.LITTLE_ENDIAN);break;case"uint32le":this.writeUint32(t,l.LITTLE_ENDIAN);break;case"int32le":this.writeInt32(t,l.LITTLE_ENDIAN);break;case"float32le":this.writeFloat32(t,l.LITTLE_ENDIAN);break;case"float64le":this.writeFloat64(t,l.LITTLE_ENDIAN);break;case"cstring":this.writeCString(t,r);break;case"string":this.writeString(t,a,r);break;case"u16string":this.writeUCS2String(t,this.endianness,r);break;case"u16stringle":this.writeUCS2String(t,l.LITTLE_ENDIAN,r);break;case"u16stringbe":this.writeUCS2String(t,l.BIG_ENDIAN,r);break;default:if(3==e.length){for(var n=e[1],d=0;d<t.length;d++)this.writeType(n,t[d]);break}this.writeStruct(e,t)}null!=r&&(this.position=o,this._realloc(r),this.position=o+r)},l.prototype.writeUint64=function(e){var t=Math.floor(e/d);this.writeUint32(t),this.writeUint32(4294967295&e)},l.prototype.writeUint24=function(e){this.writeUint8((16711680&e)>>16),this.writeUint8((65280&e)>>8),this.writeUint8(255&e)},l.prototype.adjustUint32=function(e,t){var i=this.position;this.seek(e),this.writeUint32(t),this.seek(i)},l.prototype.mapInt32Array=function(e,t){this._realloc(4*e);var i=new Int32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i},l.prototype.mapInt16Array=function(e,t){this._realloc(2*e);var i=new Int16Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=2*e,i},l.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},l.prototype.mapUint32Array=function(e,t){this._realloc(4*e);var i=new Uint32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i},l.prototype.mapUint16Array=function(e,t){this._realloc(2*e);var i=new Uint16Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=2*e,i},l.prototype.mapFloat64Array=function(e,t){this._realloc(8*e);var i=new Float64Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=8*e,i},l.prototype.mapFloat32Array=function(e,t){this._realloc(4*e);var i=new Float32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i};var h=function(e){this.buffers=[],this.bufferIndex=-1,e&&(this.insertBuffer(e),this.bufferIndex=0)};(h.prototype=new l(new ArrayBuffer,0,l.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,o.debug("MultiBufferStream","Stream ready for parsing"),!0):(o.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(o.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1))},ArrayBuffer.concat=function(e,t){o.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},h.prototype.reduceBuffer=function(e,t,i){var s;return(s=new Uint8Array(i)).set(new Uint8Array(e,t,i)),s.buffer.fileStart=e.fileStart+t,s.buffer.usedBytes=0,s.buffer},h.prototype.insertBuffer=function(e){for(var t=!0,i=0;i<this.buffers.length;i++){var s=this.buffers[i];if(e.fileStart<=s.fileStart){if(e.fileStart===s.fileStart){if(e.byteLength>s.byteLength){this.buffers.splice(i,1),i--;continue}o.warn("MultiBufferStream","Buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+") already appended, ignoring")}else e.fileStart+e.byteLength<=s.fileStart||(e=this.reduceBuffer(e,0,s.fileStart-e.fileStart)),o.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<s.fileStart+s.byteLength){var r=s.fileStart+s.byteLength-e.fileStart,a=e.byteLength-r;if(!(a>0)){t=!1;break}e=this.reduceBuffer(e,r,a)}}t&&(o.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.push(e),0===i&&(this.buffer=e))},h.prototype.logBufferLevel=function(e){var t,i,s,r,a,n=[],l="";for(s=0,r=0,t=0;t<this.buffers.length;t++)i=this.buffers[t],0===t?(a={},n.push(a),a.start=i.fileStart,a.end=i.fileStart+i.byteLength,l+="["+a.start+"-"):a.end===i.fileStart?a.end=i.fileStart+i.byteLength:((a={}).start=i.fileStart,l+=n[n.length-1].end-1+"], ["+a.start+"-",a.end=i.fileStart+i.byteLength,n.push(a)),s+=i.usedBytes,r+=i.byteLength;n.length>0&&(l+=a.end-1+"]");var d=e?o.info:o.debug;0===this.buffers.length?d("MultiBufferStream","No more buffer in memory"):d("MultiBufferStream",this.buffers.length+" stored buffer(s) ("+s+"/"+r+" bytes), continuous ranges: "+l)},h.prototype.cleanBuffers=function(){var e,t;for(e=0;e<this.buffers.length;e++)(t=this.buffers[e]).usedBytes===t.byteLength&&(o.debug("MultiBufferStream","Removing buffer #"+e),this.buffers.splice(e,1),e--)},h.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,s=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=s,o.debug("ISOFile","Concatenating buffer for box parsing (length: "+t+"->"+this.buffer.byteLength+")"),!0}return!1}return!1},h.prototype.findPosition=function(e,t,i){var s,r=null,a=-1;for(s=!0===e?0:this.bufferIndex;s<this.buffers.length&&(r=this.buffers[s]).fileStart<=t;)a=s,i&&(r.fileStart+r.byteLength<=t?r.usedBytes=r.byteLength:r.usedBytes=t-r.fileStart,this.logBufferLevel()),s++;return-1!==a&&(r=this.buffers[a]).fileStart+r.byteLength>=t?(o.debug("MultiBufferStream","Found position in existing buffer #"+a),a):-1},h.prototype.findEndContiguousBuf=function(e){var t,i,s,r=void 0!==e?e:this.bufferIndex;if(i=this.buffers[r],this.buffers.length>r+1)for(t=r+1;t<this.buffers.length&&(s=this.buffers[t]).fileStart===i.fileStart+i.byteLength;t++)i=s;return i.fileStart+i.byteLength},h.prototype.getEndFilePositionAfter=function(e){var t=this.findPosition(!0,e,!1);return-1!==t?this.findEndContiguousBuf(t):e},h.prototype.addUsedBytes=function(e){this.buffer.usedBytes+=e,this.logBufferLevel()},h.prototype.setAllUsedBytes=function(){this.buffer.usedBytes=this.buffer.byteLength,this.logBufferLevel()},h.prototype.seek=function(e,t,i){var s;return-1!==(s=this.findPosition(t,e,i))?(this.buffer=this.buffers[s],this.bufferIndex=s,this.position=e-this.buffer.fileStart,o.debug("MultiBufferStream","Repositioning parser at buffer position: "+this.position),!0):(o.debug("MultiBufferStream","Position "+e+" not found in buffered data"),!1)},h.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},h.prototype.getLength=function(){return this.byteLength},h.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},h.prototype.destroy=function(){this.buffers=[],this.bufferIndex},t.MultiBufferStream=h;var c=function(){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 s,r,a,n=0;for(s=t.readUint8(),a=t.readUint8();128&a;)n=(127&a)<<7,a=t.readUint8();return n+=127&a,o.debug("MPEG4DescriptorParser","Found "+(e[s]||"Descriptor "+s)+", size "+n+" at position "+t.getPosition()),(r=e[s]?new i[e[s]](n):new i.Descriptor(n)).parse(t),r},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 s=t.parseOneDescriptor(e);this.descs.push(s)}},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 s=(248&i.data[0])>>3;return 31===s&&i.data.length>=2&&(s=32+((7&i.data[0])<<3)+((224&i.data[1])>>5)),s}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.upStream=0!=(this.streamType>>1&1),this.streamType=this.streamType>>>2,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};t.MPEG4DescriptorParser=c;var u={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"],["grpl"],["j2kH"],["etyp",["tyco"]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){u.FullBox.prototype=new u.Box,u.ContainerBox.prototype=new u.Box,u.SampleEntry.prototype=new u.Box,u.TrackGroupTypeBox.prototype=new u.FullBox,u.BASIC_BOXES.forEach((function(e){u.createBoxCtor(e)})),u.FULL_BOXES.forEach((function(e){u.createFullBoxCtor(e)})),u.CONTAINER_BOXES.forEach((function(e){u.createContainerBoxCtor(e[0],null,e[1])}))},Box:function(e,t,i){this.type=e,this.size=t,this.uuid=i},FullBox:function(e,t,i){u.Box.call(this,e,t,i),this.flags=0,this.version=0},ContainerBox:function(e,t,i){u.Box.call(this,e,t,i),this.boxes=[]},SampleEntry:function(e,t,i,s){u.ContainerBox.call(this,e,t),this.hdr_size=i,this.start=s},SampleGroupEntry:function(e){this.grouping_type=e},TrackGroupTypeBox:function(e,t){u.FullBox.call(this,e,t)},createBoxCtor:function(e,t){u.boxCodes.push(e),u[e+"Box"]=function(t){u.Box.call(this,e,t)},u[e+"Box"].prototype=new u.Box,t&&(u[e+"Box"].prototype.parse=t)},createFullBoxCtor:function(e,t){u[e+"Box"]=function(t){u.FullBox.call(this,e,t)},u[e+"Box"].prototype=new u.FullBox,u[e+"Box"].prototype.parse=function(e){this.parseFullHeader(e),t&&t.call(this,e)}},addSubBoxArrays:function(e){if(e){this.subBoxNames=e;for(var t=e.length,i=0;i<t;i++)this[e[i]+"s"]=[]}},createContainerBoxCtor:function(e,t,i){u[e+"Box"]=function(t){u.ContainerBox.call(this,e,t),u.addSubBoxArrays.call(this,i)},u[e+"Box"].prototype=new u.ContainerBox,t&&(u[e+"Box"].prototype.parse=t)},createMediaSampleEntryCtor:function(e,t,i){u.sampleEntryCodes[e]=[],u[e+"SampleEntry"]=function(e,t){u.SampleEntry.call(this,e,t),u.addSubBoxArrays.call(this,i)},u[e+"SampleEntry"].prototype=new u.SampleEntry,t&&(u[e+"SampleEntry"].prototype.parse=t)},createSampleEntryCtor:function(e,t,i,s){u.sampleEntryCodes[e].push(t),u[t+"SampleEntry"]=function(i){u[e+"SampleEntry"].call(this,t,i),u.addSubBoxArrays.call(this,s)},u[t+"SampleEntry"].prototype=new u[e+"SampleEntry"],i&&(u[t+"SampleEntry"].prototype.parse=i)},createEncryptedSampleEntryCtor:function(e,t,i){u.createSampleEntryCtor.call(this,e,t,i,["sinf"])},createSampleGroupCtor:function(e,t){u[e+"SampleGroupEntry"]=function(t){u.SampleGroupEntry.call(this,e,t)},u[e+"SampleGroupEntry"].prototype=new u.SampleGroupEntry,t&&(u[e+"SampleGroupEntry"].prototype.parse=t)},createTrackGroupCtor:function(e,t){u[e+"TrackGroupTypeBox"]=function(t){u.TrackGroupTypeBox.call(this,e,t)},u[e+"TrackGroupTypeBox"].prototype=new u.TrackGroupTypeBox,t&&(u[e+"TrackGroupTypeBox"].prototype.parse=t)},createUUIDBox:function(e,t,i,s){u.UUIDs.push(e),u.UUIDBoxes[e]=function(s){t?u.FullBox.call(this,"uuid",s,e):i?u.ContainerBox.call(this,"uuid",s,e):u.Box.call(this,"uuid",s,e)},u.UUIDBoxes[e].prototype=t?new u.FullBox:i?new u.ContainerBox:new u.Box,s&&(u.UUIDBoxes[e].prototype.parse=t?function(e){this.parseFullHeader(e),s&&s.call(this,e)}:s)}};function p(e,t){this.x=e,this.y=t}function f(e,t){this.bad_pixel_row=e,this.bad_pixel_column=t}u.initialize(),u.TKHD_FLAG_ENABLED=1,u.TKHD_FLAG_IN_MOVIE=2,u.TKHD_FLAG_IN_PREVIEW=4,u.TFHD_FLAG_BASE_DATA_OFFSET=1,u.TFHD_FLAG_SAMPLE_DESC=2,u.TFHD_FLAG_SAMPLE_DUR=8,u.TFHD_FLAG_SAMPLE_SIZE=16,u.TFHD_FLAG_SAMPLE_FLAGS=32,u.TFHD_FLAG_DUR_EMPTY=65536,u.TFHD_FLAG_DEFAULT_BASE_IS_MOOF=131072,u.TRUN_FLAGS_DATA_OFFSET=1,u.TRUN_FLAGS_FIRST_FLAG=4,u.TRUN_FLAGS_DURATION=256,u.TRUN_FLAGS_SIZE=512,u.TRUN_FLAGS_FLAGS=1024,u.TRUN_FLAGS_CTS_OFFSET=2048,u.Box.prototype.add=function(e){return this.addBox(new u[e+"Box"])},u.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},u.Box.prototype.set=function(e,t){return this[e]=t,this},u.Box.prototype.addEntry=function(e,t){var i=t||"entries";return this[i]||(this[i]=[]),this[i].push(e),this},t.BoxParser=u,u.parseUUID=function(e){return u.parseHex16(e)},u.parseHex16=function(e){for(var t="",i=0;i<16;i++){var s=e.readUint8().toString(16);t+=1===s.length?"0"+s:s}return t},u.parseOneBox=function(e,t,i){var s,r,a,n=e.getPosition(),l=0;if(e.getEndPosition()-n<8)return o.debug("BoxParser","Not enough data in stream to parse the type and size of the box"),{code:u.ERR_NOT_ENOUGH_DATA};if(i&&i<8)return o.debug("BoxParser","Not enough bytes left in the parent box to parse a new box"),{code:u.ERR_NOT_ENOUGH_DATA};var d=e.readUint32(),h=e.readString(4),c=h;if(o.debug("BoxParser","Found box of type '"+h+"' and size "+d+" at position "+n),l=8,"uuid"==h){if(e.getEndPosition()-e.getPosition()<16||i-l<16)return e.seek(n),o.debug("BoxParser","Not enough bytes left in the parent box to parse a UUID box"),{code:u.ERR_NOT_ENOUGH_DATA};l+=16,c=a=u.parseUUID(e)}if(1==d){if(e.getEndPosition()-e.getPosition()<8||i&&i-l<8)return e.seek(n),o.warn("BoxParser",'Not enough data in stream to parse the extended size of the "'+h+'" box'),{code:u.ERR_NOT_ENOUGH_DATA};d=e.readUint64(),l+=8}else if(0===d)if(i)d=i;else if("mdat"!==h)return o.error("BoxParser","Unlimited box size not supported for type: '"+h+"'"),s=new u.Box(h,d),{code:u.OK,box:s,size:s.size};return 0!==d&&d<l?(o.error("BoxParser","Box of type "+h+" has an invalid size "+d+" (too small to be a box)"),{code:u.ERR_NOT_ENOUGH_DATA,type:h,size:d,hdr_size:l,start:n}):0!==d&&i&&d>i?(o.error("BoxParser","Box of type '"+h+"' has a size "+d+" greater than its container size "+i),{code:u.ERR_NOT_ENOUGH_DATA,type:h,size:d,hdr_size:l,start:n}):0!==d&&n+d>e.getEndPosition()?(e.seek(n),o.info("BoxParser","Not enough data in stream to parse the entire '"+h+"' box"),{code:u.ERR_NOT_ENOUGH_DATA,type:h,size:d,hdr_size:l,start:n}):t?{code:u.OK,type:h,size:d,hdr_size:l,start:n}:(u[h+"Box"]?s=new u[h+"Box"](d):"uuid"!==h?(o.warn("BoxParser","Unknown box type: '"+h+"'"),(s=new u.Box(h,d)).has_unparsed_data=!0):u.UUIDBoxes[a]?s=new u.UUIDBoxes[a](d):(o.warn("BoxParser","Unknown uuid type: '"+a+"'"),(s=new u.Box(h,d)).uuid=a,s.has_unparsed_data=!0),s.hdr_size=l,s.start=n,s.write===u.Box.prototype.write&&"mdat"!==s.type&&(o.info("BoxParser","'"+c+"' box writing not yet implemented, keeping unparsed data in memory for later write"),s.parseDataAndRewind(e)),s.parse(e),(r=e.getPosition()-(s.start+s.size))<0?(o.warn("BoxParser","Parsing of box '"+c+"' did not read the entire indicated box data size (missing "+-r+" bytes), seeking forward"),e.seek(s.start+s.size)):r>0&&(o.error("BoxParser","Parsing of box '"+c+"' read "+r+" more bytes than the indicated box data size, seeking backwards"),0!==s.size&&e.seek(s.start+s.size)),{code:u.OK,box:s,size:s.size})},u.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)},u.Box.prototype.parseDataAndRewind=function(e){this.data=e.readUint8Array(this.size-this.hdr_size),e.position-=this.size-this.hdr_size},u.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},u.FullBox.prototype.parseFullHeader=function(e){this.version=e.readUint8(),this.flags=e.readUint24(),this.hdr_size+=4},u.FullBox.prototype.parse=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},u.ContainerBox.prototype.parse=function(e){for(var t,i;e.getPosition()<this.start+this.size;){if((t=u.parseOneBox(e,!1,this.size-(e.getPosition()-this.start))).code!==u.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 s="uuid"!==i.type?i.type:i.uuid;this[s]?o.warn("Box of type "+s+" already stored in field of this type"):this[s]=i}}},u.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)},u.SAMPLE_ENTRY_TYPE_VISUAL="Visual",u.SAMPLE_ENTRY_TYPE_AUDIO="Audio",u.SAMPLE_ENTRY_TYPE_HINT="Hint",u.SAMPLE_ENTRY_TYPE_METADATA="Metadata",u.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",u.SAMPLE_ENTRY_TYPE_SYSTEM="System",u.SAMPLE_ENTRY_TYPE_TEXT="Text",u.SampleEntry.prototype.parseHeader=function(e){e.readUint8Array(6),this.data_reference_index=e.readUint16(),this.hdr_size+=8},u.SampleEntry.prototype.parse=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},u.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},u.SampleEntry.prototype.parseFooter=function(e){u.ContainerBox.prototype.parse.call(this,e)},u.createMediaSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_HINT),u.createMediaSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_METADATA),u.createMediaSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_SUBTITLE),u.createMediaSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_SYSTEM),u.createMediaSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_TEXT),u.createMediaSampleEntryCtor(u.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)})),u.createMediaSampleEntryCtor(u.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)})),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"dav1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"hvt1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"lhe1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"dvh1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"dvhe"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"vvc1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"vvi1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"vvs1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"vvcN"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"vp08"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"vp09"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"avs3"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"j2ki"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"mjp2"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"mjpg"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"uncv"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"ac-4"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"Opus"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"mha1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"mha2"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"mhm1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"mhm2"),u.createEncryptedSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),u.createEncryptedSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),u.createEncryptedSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),u.createEncryptedSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),u.createEncryptedSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_TEXT,"enct"),u.createEncryptedSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_METADATA,"encm"),u.createBoxCtor("a1lx",(function(e){var t=16*(1+(1&(1&e.readUint8())));this.layer_size=[];for(var i=0;i<3;i++)this.layer_size[i]=16==t?e.readUint16():e.readUint32()})),u.createBoxCtor("a1op",(function(e){this.op_index=e.readUint8()})),u.createFullBoxCtor("auxC",(function(e){this.aux_type=e.readCString();var t=this.size-this.hdr_size-(this.aux_type.length+1);this.aux_subtype=e.readUint8Array(t)})),u.createBoxCtor("av1C",(function(e){var t=e.readUint8();if(t>>7&!1)o.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 o.error("av1C reserved_2 parsing problem");var i=this.size-this.hdr_size-4;this.configOBUs=e.readUint8Array(i)}else o.error("av1C reserved_1 parsing problem");else o.error("av1C version "+this.version+" not supported")})),u.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))})),u.createBoxCtor("btrt",(function(e){this.bufferSizeDB=e.readUint32(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32()})),u.createFullBoxCtor("ccst",(function(e){var t=e.readUint8();this.all_ref_pics_intra=128==(128&t),this.intra_pred_used=64==(64&t),this.max_ref_per_pic=(63&t)>>2,e.readUint24()})),u.createBoxCtor("cdef",(function(e){var t;for(this.channel_count=e.readUint16(),this.channel_indexes=[],this.channel_types=[],this.channel_associations=[],t=0;t<this.channel_count;t++)this.channel_indexes.push(e.readUint16()),this.channel_types.push(e.readUint16()),this.channel_associations.push(e.readUint16())})),u.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()})),u.createBoxCtor("clli",(function(e){this.max_content_light_level=e.readUint16(),this.max_pic_average_light_level=e.readUint16()})),u.createFullBoxCtor("cmex",(function(e){1&this.flags&&(this.pos_x=e.readInt32()),2&this.flags&&(this.pos_y=e.readInt32()),4&this.flags&&(this.pos_z=e.readInt32()),8&this.flags&&(0==this.version?16&this.flags?(this.quat_x=e.readInt32(),this.quat_y=e.readInt32(),this.quat_z=e.readInt32()):(this.quat_x=e.readInt16(),this.quat_y=e.readInt16(),this.quat_z=e.readInt16()):this.version),32&this.flags&&(this.id=e.readUint32())})),u.createFullBoxCtor("cmin",(function(e){this.focal_length_x=e.readInt32(),this.principal_point_x=e.readInt32(),this.principal_point_y=e.readInt32(),1&this.flags&&(this.focal_length_y=e.readInt32(),this.skew_factor=e.readInt32())})),u.createBoxCtor("cmpd",(function(e){for(this.component_count=e.readUint32(),this.component_types=[],this.component_type_urls=[],i=0;i<this.component_count;i++){var t=e.readUint16();this.component_types.push(t),t>=32768&&this.component_type_urls.push(e.readCString())}})),u.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())})),u.createFullBoxCtor("CoLL",(function(e){this.maxCLL=e.readUint16(),this.maxFALL=e.readUint16()})),u.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))})),u.createFullBoxCtor("cprt",(function(e){this.parseLanguage(e),this.notice=e.readCString()})),u.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())})),u.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 s=e.readInt32();s<0&&o.warn("BoxParser","ctts box uses negative values without using version 1"),this.sample_offsets.push(s)}else if(1==this.version)for(i=0;i<t;i++)this.sample_counts.push(e.readUint32()),this.sample_offsets.push(e.readInt32())})),u.createBoxCtor("dac3",(function(e){var t=e.readUint8(),i=e.readUint8(),s=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|s>>5&7})),u.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 s={};this.ind_subs.push(s);var r=e.readUint8(),a=e.readUint8(),o=e.readUint8();s.fscod=r>>6,s.bsid=r>>1&31,s.bsmod=(1&r)<<4|a>>4&15,s.acmod=a>>1&7,s.lfeon=1&a,s.num_dep_sub=o>>1&15,s.num_dep_sub>0&&(s.chan_loc=(1&o)<<8|e.readUint8())}})),u.createFullBoxCtor("dfLa",(function(e){var t=[],i=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];for(this.parseFullHeader(e);;){var s=e.readUint8(),r=Math.min(127&s,i.length-1);if(r?e.readUint8Array(e.readUint24()):(e.readUint8Array(13),this.samplerate=e.readUint32()>>12,e.readUint8Array(20)),t.push(i[r]),128&s)break}this.numMetadataBlocks=t.length+" ("+t.join(", ")+")"})),u.createBoxCtor("dimm",(function(e){this.bytessent=e.readUint64()})),u.createBoxCtor("dmax",(function(e){this.time=e.readUint32()})),u.createBoxCtor("dmed",(function(e){this.bytessent=e.readUint64()})),u.createBoxCtor("dOps",(function(e){if(this.Version=e.readUint8(),this.OutputChannelCount=e.readUint8(),this.PreSkip=e.readUint16(),this.InputSampleRate=e.readUint32(),this.OutputGain=e.readInt16(),this.ChannelMappingFamily=e.readUint8(),0!==this.ChannelMappingFamily){this.StreamCount=e.readUint8(),this.CoupledCount=e.readUint8(),this.ChannelMapping=[];for(var t=0;t<this.OutputChannelCount;t++)this.ChannelMapping[t]=e.readUint8()}})),u.createFullBoxCtor("dref",(function(e){var t,i;this.entries=[];for(var s=e.readUint32(),r=0;r<s;r++){if((t=u.parseOneBox(e,!1,this.size-(e.getPosition()-this.start))).code!==u.OK)return;i=t.box,this.entries.push(i)}})),u.createBoxCtor("drep",(function(e){this.bytessent=e.readUint64()})),u.createFullBoxCtor("elng",(function(e){this.extended_language=e.readString(this.size-this.hdr_size)})),u.createFullBoxCtor("elst",(function(e){this.entries=[];for(var t=e.readUint32(),i=0;i<t;i++){var s={};this.entries.push(s),1===this.version?(s.segment_duration=e.readUint64(),s.media_time=e.readInt64()):(s.segment_duration=e.readUint32(),s.media_time=e.readInt32()),s.media_rate_integer=e.readInt16(),s.media_rate_fraction=e.readInt16()}})),u.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)})),u.createEntityToGroupCtor=function(e,t){u[e+"Box"]=function(t){u.FullBox.call(this,e,t)},u[e+"Box"].prototype=new u.FullBox,u[e+"Box"].prototype.parse=function(e){if(this.parseFullHeader(e),t)t.call(this,e);else for(this.group_id=e.readUint32(),this.num_entities_in_group=e.readUint32(),this.entity_ids=[],i=0;i<this.num_entities_in_group;i++){var s=e.readUint32();this.entity_ids.push(s)}}},u.createEntityToGroupCtor("aebr"),u.createEntityToGroupCtor("afbr"),u.createEntityToGroupCtor("albc"),u.createEntityToGroupCtor("altr"),u.createEntityToGroupCtor("brst"),u.createEntityToGroupCtor("dobr"),u.createEntityToGroupCtor("eqiv"),u.createEntityToGroupCtor("favc"),u.createEntityToGroupCtor("fobr"),u.createEntityToGroupCtor("iaug"),u.createEntityToGroupCtor("pano"),u.createEntityToGroupCtor("slid"),u.createEntityToGroupCtor("ster"),u.createEntityToGroupCtor("tsyn"),u.createEntityToGroupCtor("wbbr"),u.createEntityToGroupCtor("prgr"),u.createFullBoxCtor("esds",(function(e){var t=e.readUint8Array(this.size-this.hdr_size),i=new c;this.esd=i.parseOneDescriptor(new l(t.buffer,0,l.BIG_ENDIAN))})),u.createBoxCtor("fiel",(function(e){this.fieldCount=e.readUint8(),this.fieldOrdering=e.readUint8()})),u.createBoxCtor("frma",(function(e){this.data_format=e.readString(4)})),u.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++})),u.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)))})),u.createBoxCtor("hvcC",(function(e){var t,i,s,r;this.configurationVersion=e.readUint8(),r=e.readUint8(),this.general_profile_space=r>>6,this.general_tier_flag=(32&r)>>5,this.general_profile_idc=31&r,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(),r=e.readUint8(),this.constantFrameRate=r>>6,this.numTemporalLayers=(13&r)>>3,this.temporalIdNested=(4&r)>>2,this.lengthSizeMinusOne=3&r,this.nalu_arrays=[];var a=e.readUint8();for(t=0;t<a;t++){var o=[];this.nalu_arrays.push(o),r=e.readUint8(),o.completeness=(128&r)>>7,o.nalu_type=63&r;var n=e.readUint16();for(i=0;i<n;i++){var l={};o.push(l),s=e.readUint16(),l.data=e.readUint8Array(s)}}})),u.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=u.parseOneBox(e,!1,this.size-(e.getPosition()-this.start))).code!==u.OK)return;"infe"!==t.box.type&&o.error("BoxParser","Expected 'infe' box, got "+t.box.type),this.item_infos[i]=t.box}})),u.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 s=0;s<i;s++){var r={};if(this.items.push(r),this.version<2)r.item_ID=e.readUint16();else{if(2!==this.version)throw"version of iloc box not supported";r.item_ID=e.readUint32()}switch(1===this.version||2===this.version?r.construction_method=15&e.readUint16():r.construction_method=0,r.data_reference_index=e.readUint16(),this.base_offset_size){case 0:r.base_offset=0;break;case 4:r.base_offset=e.readUint32();break;case 8:r.base_offset=e.readUint64();break;default:throw"Error reading base offset size"}var a=e.readUint16();r.extents=[];for(var o=0;o<a;o++){var n={};if(r.extents.push(n),1===this.version||2===this.version)switch(this.index_size){case 0:n.extent_index=0;break;case 4:n.extent_index=e.readUint32();break;case 8:n.extent_index=e.readUint64();break;default:throw"Error reading extent index"}switch(this.offset_size){case 0:n.extent_offset=0;break;case 4:n.extent_offset=e.readUint32();break;case 8:n.extent_offset=e.readUint64();break;default:throw"Error reading extent index"}switch(this.length_size){case 0:n.extent_length=0;break;case 4:n.extent_length=e.readUint32();break;case 8:n.extent_length=e.readUint64();break;default:throw"Error reading extent index"}}}})),u.createBoxCtor("imir",(function(e){var t=e.readUint8();this.reserved=t>>7,this.axis=1&t})),u.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),o.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()))})),u.createFullBoxCtor("ipma",(function(e){var t,i;for(entry_count=e.readUint32(),this.associations=[],t=0;t<entry_count;t++){var s={};this.associations.push(s),this.version<1?s.id=e.readUint16():s.id=e.readUint32();var r=e.readUint8();for(s.props=[],i=0;i<r;i++){var a=e.readUint8(),o={};s.props.push(o),o.essential=(128&a)>>7==1,1&this.flags?o.property_index=(127&a)<<8|e.readUint8():o.property_index=127&a}}})),u.createFullBoxCtor("iref",(function(e){var t,i;for(this.references=[];e.getPosition()<this.start+this.size;){if((t=u.parseOneBox(e,!0,this.size-(e.getPosition()-this.start))).code!==u.OK)return;(i=0===this.version?new u.SingleItemTypeReferenceBox(t.type,t.size,t.hdr_size,t.start):new u.SingleItemTypeReferenceBoxLarge(t.type,t.size,t.hdr_size,t.start)).write===u.Box.prototype.write&&"mdat"!==i.type&&(o.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)}})),u.createBoxCtor("irot",(function(e){this.angle=3&e.readUint8()})),u.createFullBoxCtor("ispe",(function(e){this.image_width=e.readUint32(),this.image_height=e.readUint32()})),u.createFullBoxCtor("kind",(function(e){this.schemeURI=e.readCString(),this.value=e.readCString()})),u.createFullBoxCtor("leva",(function(e){var t=e.readUint8();this.levels=[];for(var i=0;i<t;i++){var s={};this.levels[i]=s,s.track_ID=e.readUint32();var r=e.readUint8();switch(s.padding_flag=r>>7,s.assignment_type=127&r,s.assignment_type){case 0:s.grouping_type=e.readString(4);break;case 1:s.grouping_type=e.readString(4),s.grouping_type_parameter=e.readUint32();break;case 2:case 3:break;case 4:s.sub_track_id=e.readUint32();break;default:o.warn("BoxParser","Unknown leva assignement type")}}})),u.createBoxCtor("lsel",(function(e){this.layer_id=e.readUint16()})),u.createBoxCtor("maxr",(function(e){this.period=e.readUint32(),this.bytes=e.readUint32()})),p.prototype.toString=function(){return"("+this.x+","+this.y+")"},u.createBoxCtor("mdcv",(function(e){this.display_primaries=[],this.display_primaries[0]=new p(e.readUint16(),e.readUint16()),this.display_primaries[1]=new p(e.readUint16(),e.readUint16()),this.display_primaries[2]=new p(e.readUint16(),e.readUint16()),this.white_point=new p(e.readUint16(),e.readUint16()),this.max_display_mastering_luminance=e.readUint32(),this.min_display_mastering_luminance=e.readUint32()})),u.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()})),u.createFullBoxCtor("mehd",(function(e){1&this.flags&&(o.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()})),u.createFullBoxCtor("meta",(function(e){this.boxes=[],u.ContainerBox.prototype.parse.call(this,e)})),u.createFullBoxCtor("mfhd",(function(e){this.sequence_number=e.readUint32()})),u.createFullBoxCtor("mfro",(function(e){this._size=e.readUint32()})),u.createFullBoxCtor("mskC",(function(e){this.bits_per_pixel=e.readUint8()})),u.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()})),u.createBoxCtor("npck",(function(e){this.packetssent=e.readUint32()})),u.createBoxCtor("nump",(function(e){this.packetssent=e.readUint64()})),u.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()})),u.createBoxCtor("pasp",(function(e){this.hSpacing=e.readUint32(),this.vSpacing=e.readUint32()})),u.createBoxCtor("payl",(function(e){this.text=e.readString(this.size-this.hdr_size)})),u.createBoxCtor("payt",(function(e){this.payloadID=e.readUint32();var t=e.readUint8();this.rtpmap_string=e.readString(t)})),u.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()})),u.createFullBoxCtor("pitm",(function(e){0===this.version?this.item_id=e.readUint16():this.item_id=e.readUint32()})),u.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()})),u.createBoxCtor("pmax",(function(e){this.bytes=e.readUint32()})),u.createFullBoxCtor("prdi",(function(e){if(this.step_count=e.readUint16(),this.item_count=[],2&this.flags)for(var t=0;t<this.step_count;t++)this.item_count[t]=e.readUint16()})),u.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()})),u.createFullBoxCtor("pssh",(function(e){if(this.system_id=u.parseHex16(e),this.version>0){var t=e.readUint32();this.kid=[];for(var i=0;i<t;i++)this.kid[i]=u.parseHex16(e)}var s=e.readUint32();s>0&&(this.data=e.readUint8Array(s))})),u.createFullBoxCtor("clef",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),u.createFullBoxCtor("enof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),u.createFullBoxCtor("prof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),u.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),u.createBoxCtor("rtp ",(function(e){this.descriptionformat=e.readString(4),this.sdptext=e.readString(this.size-this.hdr_size-4)})),u.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()})),u.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()})),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_METADATA,"mett",(function(e){this.parseHeader(e),this.content_encoding=e.readCString(),this.mime_format=e.readCString(),this.parseFooter(e)})),u.createSampleEntryCtor(u.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)})),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_SUBTITLE,"sbtt",(function(e){this.parseHeader(e),this.content_encoding=e.readCString(),this.mime_format=e.readCString(),this.parseFooter(e)})),u.createSampleEntryCtor(u.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)})),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_SUBTITLE,"stxt",(function(e){this.parseHeader(e),this.content_encoding=e.readCString(),this.mime_format=e.readCString(),this.parseFooter(e)})),u.createSampleEntryCtor(u.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)})),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_METADATA,"wvtt",(function(e){this.parseHeader(e),this.parseFooter(e)})),u.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 s=this.description_length-4-4*i;for(this.num_output_samples=[],this.num_total_samples=[],t=0;t<s/4;t++)this.num_output_samples[t]=e.readUint16(),this.num_total_samples[t]=e.readUint16()})),u.createSampleGroupCtor("avll",(function(e){this.layerNumber=e.readUint8(),this.accurateStatisticsFlag=e.readUint8(),this.avgBitRate=e.readUint16(),this.avgFrameRate=e.readUint16()})),u.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(),s=0;s<i;s++){var r={};this.dependency.push(r),r.subSeqDirectionFlag=e.readUint8(),r.layerNumber=e.readUint8(),r.subSequenceIdentifier=e.readUint16()}})),u.createSampleGroupCtor("dtrt",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.createSampleGroupCtor("mvif",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.createSampleGroupCtor("prol",(function(e){this.roll_distance=e.readInt16()})),u.createSampleGroupCtor("rap ",(function(e){var t=e.readUint8();this.num_leading_samples_known=t>>7,this.num_leading_samples=127&t})),u.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)o.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()}})),u.createSampleGroupCtor("roll",(function(e){this.roll_distance=e.readInt16()})),u.SampleGroupEntry.prototype.parse=function(e){o.warn("BoxParser","Unknown Sample Group type: "+this.grouping_type),this.data=e.readUint8Array(this.description_length)},u.createSampleGroupCtor("scif",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.createSampleGroupCtor("scnm",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.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=u.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))})),u.createSampleGroupCtor("stsa",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.createSampleGroupCtor("sync",(function(e){var t=e.readUint8();this.NAL_unit_type=63&t})),u.createSampleGroupCtor("tele",(function(e){var t=e.readUint8();this.level_independently_decodable=t>>7})),u.createSampleGroupCtor("tsas",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.createSampleGroupCtor("tscl",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.createSampleGroupCtor("vipr",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.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 s={};this.entries.push(s),s.sample_count=e.readInt32(),s.group_description_index=e.readInt32()}})),f.prototype.toString=function(){return"[row: "+this.bad_pixel_row+", column: "+this.bad_pixel_column+"]"},u.createFullBoxCtor("sbpm",(function(e){var t;for(this.component_count=e.readUint16(),this.component_index=[],t=0;t<this.component_count;t++)this.component_index.push(e.readUint16());var i=e.readUint8();for(this.correction_applied=128==(128&i),this.num_bad_rows=e.readUint32(),this.num_bad_cols=e.readUint32(),this.num_bad_pixels=e.readUint32(),this.bad_rows=[],this.bad_columns=[],this.bad_pixels=[],t=0;t<this.num_bad_rows;t++)this.bad_rows.push(e.readUint32());for(t=0;t<this.num_bad_cols;t++)this.bad_columns.push(e.readUint32());for(t=0;t<this.num_bad_pixels;t++){var s=e.readUint32(),r=e.readUint32();this.bad_pixels.push(new f(s,r))}})),u.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))})),u.createBoxCtor("sdp ",(function(e){this.sdptext=e.readString(this.size-this.hdr_size)})),u.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 s=0;s<i;s++)t=e.readUint8(),this.is_leading[s]=t>>6,this.sample_depends_on[s]=t>>4&3,this.sample_is_depended_on[s]=t>>2&3,this.sample_has_redundancy[s]=3&t})),u.createFullBoxCtor("senc"),u.createFullBoxCtor("sgpd",(function(e){this.grouping_type=e.readString(4),o.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 s;s=u[this.grouping_type+"SampleGroupEntry"]?new u[this.grouping_type+"SampleGroupEntry"](this.grouping_type):new u.SampleGroupEntry(this.grouping_type),this.entries.push(s),1===this.version&&0===this.default_length?s.description_length=e.readUint32():s.description_length=this.default_length,s.write===u.SampleGroupEntry.prototype.write&&(o.info("BoxParser","SampleGroup for type "+this.grouping_type+" writing not yet implemented, keeping unparsed data in memory for later write"),s.data=e.readUint8Array(s.description_length),e.position-=s.description_length),s.parse(e)}})),u.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 s={};this.references.push(s);var r=e.readUint32();s.reference_type=r>>31&1,s.referenced_size=2147483647&r,s.subsegment_duration=e.readUint32(),r=e.readUint32(),s.starts_with_SAP=r>>31&1,s.SAP_type=r>>28&7,s.SAP_delta_time=268435455&r}})),u.SingleItemTypeReferenceBox=function(e,t,i,s){u.Box.call(this,e,t),this.hdr_size=i,this.start=s},u.SingleItemTypeReferenceBox.prototype=new u.Box,u.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]={},this.references[i].to_item_ID=e.readUint16()},u.SingleItemTypeReferenceBoxLarge=function(e,t,i,s){u.Box.call(this,e,t),this.hdr_size=i,this.start=s},u.SingleItemTypeReferenceBoxLarge.prototype=new u.Box,u.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]={},this.references[i].to_item_ID=e.readUint32()},u.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()})),u.createFullBoxCtor("smhd",(function(e){this.balance=e.readUint16(),e.readUint16()})),u.createFullBoxCtor("ssix",(function(e){this.subsegments=[];for(var t=e.readUint32(),i=0;i<t;i++){var s={};this.subsegments.push(s),s.ranges=[];for(var r=e.readUint32(),a=0;a<r;a++){var o={};s.ranges.push(o),o.level=e.readUint8(),o.range_size=e.readUint24()}}})),u.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())})),u.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()})),u.createFullBoxCtor("sthd"),u.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()})),u.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())})),u.createFullBoxCtor("stsd",(function(e){var t,i,s,r;for(this.entries=[],s=e.readUint32(),t=1;t<=s;t++){if((i=u.parseOneBox(e,!0,this.size-(e.getPosition()-this.start))).code!==u.OK)return;u[i.type+"SampleEntry"]?((r=new u[i.type+"SampleEntry"](i.size)).hdr_size=i.hdr_size,r.start=i.start):(o.warn("BoxParser","Unknown sample entry type: "+i.type),r=new u.SampleEntry(i.type,i.size,i.hdr_size,i.start)),r.write===u.SampleEntry.prototype.write&&(o.info("BoxParser","SampleEntry "+r.type+" box writing not yet implemented, keeping unparsed data in memory for later write"),r.parseDataAndRewind(e)),r.parse(e),this.entries.push(r)}})),u.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()})),u.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())})),u.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())})),u.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})),u.createFullBoxCtor("stts",(function(e){var t,i,s;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()),(s=e.readInt32())<0&&(o.warn("BoxParser","File uses negative stts sample delta, using value 1 instead, sync may be lost!"),s=1),this.sample_deltas.push(s)})),u.createFullBoxCtor("stvi",(function(e){var t=e.readUint32();this.single_view_allowed=3&t,this.stereo_scheme=e.readUint32();var i,s,r=e.readUint32();for(this.stereo_indication_type=e.readString(r),this.boxes=[];e.getPosition()<this.start+this.size;){if((i=u.parseOneBox(e,!1,this.size-(e.getPosition()-this.start))).code!==u.OK)return;s=i.box,this.boxes.push(s),this[s.type]=s}})),u.createBoxCtor("styp",(function(e){u.ftypBox.prototype.parse.call(this,e)})),u.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 s=e.readUint8();this.sample_sizes[t]=s>>4&15,this.sample_sizes[t+1]=15&s}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 o.error("BoxParser","Error in length field in stz2 box")})),u.createFullBoxCtor("subs",(function(e){var t,i,s,r;for(s=e.readUint32(),this.entries=[],t=0;t<s;t++){var a={};if(this.entries[t]=a,a.sample_delta=e.readUint32(),a.subsamples=[],(r=e.readUint16())>0)for(i=0;i<r;i++){var o={};a.subsamples.push(o),1==this.version?o.size=e.readUint32():o.size=e.readUint16(),o.priority=e.readUint8(),o.discardable=e.readUint8(),o.codec_specific_parameters=e.readUint32()}}})),u.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=u.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))})),u.createFullBoxCtor("tfdt",(function(e){1==this.version?this.baseMediaDecodeTime=e.readUint64():this.baseMediaDecodeTime=e.readUint32()})),u.createFullBoxCtor("tfhd",(function(e){var t=0;this.track_id=e.readUint32(),this.size-this.hdr_size>t&&this.flags&u.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&u.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&u.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&u.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&u.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=e.readUint32(),t+=4):this.default_sample_flags=0})),u.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(),s=0;s<i;s++)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)]()})),u.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()})),u.createBoxCtor("tmax",(function(e){this.time=e.readUint32()})),u.createBoxCtor("tmin",(function(e){this.time=e.readUint32()})),u.createBoxCtor("totl",(function(e){this.bytessent=e.readUint32()})),u.createBoxCtor("tpay",(function(e){this.bytessent=e.readUint32()})),u.createBoxCtor("tpyl",(function(e){this.bytessent=e.readUint64()})),u.TrackGroupTypeBox.prototype.parse=function(e){this.parseFullHeader(e),this.track_group_id=e.readUint32()},u.createTrackGroupCtor("msrc"),u.TrackReferenceTypeBox=function(e,t,i,s){u.Box.call(this,e,t),this.hdr_size=i,this.start=s},u.TrackReferenceTypeBox.prototype=new u.Box,u.TrackReferenceTypeBox.prototype.parse=function(e){this.track_ids=e.readUint32Array((this.size-this.hdr_size)/4)},u.trefBox.prototype.parse=function(e){for(var t,i;e.getPosition()<this.start+this.size;){if((t=u.parseOneBox(e,!0,this.size-(e.getPosition()-this.start))).code!==u.OK)return;(i=new u.TrackReferenceTypeBox(t.type,t.size,t.hdr_size,t.start)).write===u.Box.prototype.write&&"mdat"!==i.type&&(o.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)}},u.createFullBoxCtor("trep",(function(e){for(this.track_ID=e.readUint32(),this.boxes=[];e.getPosition()<this.start+this.size;){if(ret=u.parseOneBox(e,!1,this.size-(e.getPosition()-this.start)),ret.code!==u.OK)return;box=ret.box,this.boxes.push(box)}})),u.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()})),u.createBoxCtor("trpy",(function(e){this.bytessent=e.readUint64()})),u.createFullBoxCtor("trun",(function(e){var t=0;if(this.sample_count=e.readUint32(),t+=4,this.size-this.hdr_size>t&&this.flags&u.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=e.readInt32(),t+=4):this.data_offset=0,this.size-this.hdr_size>t&&this.flags&u.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&u.TRUN_FLAGS_DURATION&&(this.sample_duration[i]=e.readUint32()),this.flags&u.TRUN_FLAGS_SIZE&&(this.sample_size[i]=e.readUint32()),this.flags&u.TRUN_FLAGS_FLAGS&&(this.sample_flags[i]=e.readUint32()),this.flags&u.TRUN_FLAGS_CTS_OFFSET&&(0===this.version?this.sample_composition_time_offset[i]=e.readUint32():this.sample_composition_time_offset[i]=e.readInt32())})),u.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()})),u.createFullBoxCtor("txtC",(function(e){this.config=e.readCString()})),u.createBoxCtor("tyco",(function(e){var t=(this.size-this.hdr_size)/4;this.compatible_brands=[];for(var i=0;i<t;i++)this.compatible_brands[i]=e.readString(4)})),u.createFullBoxCtor("udes",(function(e){this.lang=e.readCString(),this.name=e.readCString(),this.description=e.readCString(),this.tags=e.readCString()})),u.createFullBoxCtor("uncC",(function(e){var t;if(this.profile=e.readUint32(),1==this.version);else if(0==this.version){for(this.component_count=e.readUint32(),this.component_index=[],this.component_bit_depth_minus_one=[],this.component_format=[],this.component_align_size=[],t=0;t<this.component_count;t++)this.component_index.push(e.readUint16()),this.component_bit_depth_minus_one.push(e.readUint8()),this.component_format.push(e.readUint8()),this.component_align_size.push(e.readUint8());this.sampling_type=e.readUint8(),this.interleave_type=e.readUint8(),this.block_size=e.readUint8();var i=e.readUint8();this.component_little_endian=i>>7&1,this.block_pad_lsb=i>>6&1,this.block_little_endian=i>>5&1,this.block_reversed=i>>4&1,this.pad_unknown=i>>3&1,this.pixel_size=e.readUint32(),this.row_align_size=e.readUint32(),this.tile_align_size=e.readUint32(),this.num_tile_cols_minus_one=e.readUint32(),this.num_tile_rows_minus_one=e.readUint32()}})),u.createFullBoxCtor("url ",(function(e){1!==this.flags&&(this.location=e.readCString())})),u.createFullBoxCtor("urn ",(function(e){this.name=e.readCString(),this.size-this.hdr_size-this.name.length-1>0&&(this.location=e.readCString())})),u.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,(function(e){this.LiveServerManifest=e.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")})),u.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,(function(e){this.system_id=u.parseHex16(e);var t=e.readUint32();t>0&&(this.data=e.readUint8Array(t))})),u.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),u.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,(function(e){this.default_AlgorithmID=e.readUint24(),this.default_IV_size=e.readUint8(),this.default_KID=u.parseHex16(e)})),u.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,(function(e){this.fragment_count=e.readUint8(),this.entries=[];for(var t=0;t<this.fragment_count;t++){var i={},s=0,r=0;1===this.version?(s=e.readUint64(),r=e.readUint64()):(s=e.readUint32(),r=e.readUint32()),i.absolute_time=s,i.absolute_duration=r,this.entries.push(i)}})),u.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())})),u.createFullBoxCtor("vmhd",(function(e){this.graphicsmode=e.readUint16(),this.opcolor=e.readUint16Array(3)})),u.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))})),u.createBoxCtor("vttC",(function(e){this.text=e.readString(this.size-this.hdr_size)})),u.createFullBoxCtor("vvcC",(function(e){var t,i,s={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(e){this.held_bits=e.readUint8(),this.num_held_bits=8},stream_read_2_bytes:function(e){this.held_bits=e.readUint16(),this.num_held_bits=16},extract_bits:function(e){var t=this.held_bits>>this.num_held_bits-e&(1<<e)-1;return this.num_held_bits-=e,t}};if(s.stream_read_1_bytes(e),s.extract_bits(5),this.lengthSizeMinusOne=s.extract_bits(2),this.ptl_present_flag=s.extract_bits(1),this.ptl_present_flag){if(s.stream_read_2_bytes(e),this.ols_idx=s.extract_bits(9),this.num_sublayers=s.extract_bits(3),this.constant_frame_rate=s.extract_bits(2),this.chroma_format_idc=s.extract_bits(2),s.stream_read_1_bytes(e),this.bit_depth_minus8=s.extract_bits(3),s.extract_bits(5),s.stream_read_2_bytes(e),s.extract_bits(2),this.num_bytes_constraint_info=s.extract_bits(6),this.general_profile_idc=s.extract_bits(7),this.general_tier_flag=s.extract_bits(1),this.general_level_idc=e.readUint8(),s.stream_read_1_bytes(e),this.ptl_frame_only_constraint_flag=s.extract_bits(1),this.ptl_multilayer_enabled_flag=s.extract_bits(1),this.general_constraint_info=new Uint8Array(this.num_bytes_constraint_info),this.num_bytes_constraint_info){for(t=0;t<this.num_bytes_constraint_info-1;t++){var r=s.extract_bits(6);s.stream_read_1_bytes(e);var a=s.extract_bits(2);this.general_constraint_info[t]=r<<2|a}this.general_constraint_info[this.num_bytes_constraint_info-1]=s.extract_bits(6)}else s.extract_bits(6);if(this.num_sublayers>1){for(s.stream_read_1_bytes(e),this.ptl_sublayer_present_mask=0,i=this.num_sublayers-2;i>=0;--i){var o=s.extract_bits(1);this.ptl_sublayer_present_mask|=o<<i}for(i=this.num_sublayers;i<=8&&this.num_sublayers>1;++i)s.extract_bits(1);for(this.sublayer_level_idc=[],i=this.num_sublayers-2;i>=0;--i)this.ptl_sublayer_present_mask&1<<i&&(this.sublayer_level_idc[i]=e.readUint8())}if(this.ptl_num_sub_profiles=e.readUint8(),this.general_sub_profile_idc=[],this.ptl_num_sub_profiles)for(t=0;t<this.ptl_num_sub_profiles;t++)this.general_sub_profile_idc.push(e.readUint32());this.max_picture_width=e.readUint16(),this.max_picture_height=e.readUint16(),this.avg_frame_rate=e.readUint16()}this.nalu_arrays=[];var n=e.readUint8();for(t=0;t<n;t++){var l=[];this.nalu_arrays.push(l),s.stream_read_1_bytes(e),l.completeness=s.extract_bits(1),s.extract_bits(2),l.nalu_type=s.extract_bits(5);var d=1;for(13!=l.nalu_type&&12!=l.nalu_type&&(d=e.readUint16()),i=0;i<d;i++){var h=e.readUint16();l.push({data:e.readUint8Array(h),length:h})}}})),u.createFullBoxCtor("vvnC",(function(e){var t=strm.readUint8();this.lengthSizeMinusOne=3&t})),u.SampleEntry.prototype.isVideo=function(){return!1},u.SampleEntry.prototype.isAudio=function(){return!1},u.SampleEntry.prototype.isSubtitle=function(){return!1},u.SampleEntry.prototype.isMetadata=function(){return!1},u.SampleEntry.prototype.isHint=function(){return!1},u.SampleEntry.prototype.getCodec=function(){return this.type.replace(".","")},u.SampleEntry.prototype.getWidth=function(){return""},u.SampleEntry.prototype.getHeight=function(){return""},u.SampleEntry.prototype.getChannelCount=function(){return""},u.SampleEntry.prototype.getSampleRate=function(){return""},u.SampleEntry.prototype.getSampleSize=function(){return""},u.VisualSampleEntry.prototype.isVideo=function(){return!0},u.VisualSampleEntry.prototype.getWidth=function(){return this.width},u.VisualSampleEntry.prototype.getHeight=function(){return this.height},u.AudioSampleEntry.prototype.isAudio=function(){return!0},u.AudioSampleEntry.prototype.getChannelCount=function(){return this.channel_count},u.AudioSampleEntry.prototype.getSampleRate=function(){return this.samplerate},u.AudioSampleEntry.prototype.getSampleSize=function(){return this.samplesize},u.SubtitleSampleEntry.prototype.isSubtitle=function(){return!0},u.MetadataSampleEntry.prototype.isMetadata=function(){return!0},u.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},u.avc1SampleEntry.prototype.getCodec=u.avc2SampleEntry.prototype.getCodec=u.avc3SampleEntry.prototype.getCodec=u.avc4SampleEntry.prototype.getCodec=function(){var e=u.SampleEntry.prototype.getCodec.call(this);return this.avcC?e+"."+u.decimalToHex(this.avcC.AVCProfileIndication)+u.decimalToHex(this.avcC.profile_compatibility)+u.decimalToHex(this.avcC.AVCLevelIndication):e},u.hev1SampleEntry.prototype.getCodec=u.hvc1SampleEntry.prototype.getCodec=function(){var e,t=u.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,s=0;for(e=0;e<32&&(s|=1&i,31!=e);e++)s<<=1,i>>=1;t+=u.decimalToHex(s,0),t+=".",0===this.hvcC.general_tier_flag?t+="L":t+="H",t+=this.hvcC.general_level_idc;var r=!1,a="";for(e=5;e>=0;e--)(this.hvcC.general_constraint_indicator[e]||r)&&(a="."+u.decimalToHex(this.hvcC.general_constraint_indicator[e],0)+a,r=!0);t+=a}return t},u.vvc1SampleEntry.prototype.getCodec=u.vvi1SampleEntry.prototype.getCodec=function(){var e,t=u.SampleEntry.prototype.getCodec.call(this);if(this.vvcC){t+="."+this.vvcC.general_profile_idc,this.vvcC.general_tier_flag?t+=".H":t+=".L",t+=this.vvcC.general_level_idc;var i="";if(this.vvcC.general_constraint_info){var s,r=[],a=0;for(a|=this.vvcC.ptl_frame_only_constraint<<7,a|=this.vvcC.ptl_multilayer_enabled<<6,e=0;e<this.vvcC.general_constraint_info.length;++e)a|=this.vvcC.general_constraint_info[e]>>2&63,r.push(a),a&&(s=e),a=this.vvcC.general_constraint_info[e]>>2&3;if(void 0===s)i=".CA";else{i=".C";var o="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",n=0,l=0;for(e=0;e<=s;++e)for(n=n<<8|r[e],l+=8;l>=5;){i+=o[n>>l-5&31],n&=(1<<(l-=5))-1}l&&(i+=o[31&(n<<=5-l)])}}t+=i}return t},u.mp4aSampleEntry.prototype.getCodec=function(){var e=u.SampleEntry.prototype.getCodec.call(this);if(this.esds&&this.esds.esd){var t=this.esds.esd.getOTI(),i=this.esds.esd.getAudioConfig();return e+"."+u.decimalToHex(t)+(i?"."+i:"")}return e},u.stxtSampleEntry.prototype.getCodec=function(){var e=u.SampleEntry.prototype.getCodec.call(this);return this.mime_format?e+"."+this.mime_format:e},u.vp08SampleEntry.prototype.getCodec=u.vp09SampleEntry.prototype.getCodec=function(){var e=u.SampleEntry.prototype.getCodec.call(this),t=this.vpcC.level;0==t&&(t="00");var i=this.vpcC.bitDepth;return 8==i&&(i="08"),e+".0"+this.vpcC.profile+"."+t+"."+i},u.av01SampleEntry.prototype.getCodec=function(){var e,t=u.SampleEntry.prototype.getCodec.call(this),i=this.av1C.seq_level_idx_0;return i<10&&(i="0"+i),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+"."+i+(this.av1C.seq_tier_0?"H":"M")+"."+e},u.Box.prototype.writeHeader=function(e,t){this.size+=8,this.size>d&&(this.size+=8),"uuid"===this.type&&(this.size+=16),o.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+e.getPosition()+(t||"")),this.size>d?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>d&&e.writeUint64(this.size)},u.FullBox.prototype.writeHeader=function(e){this.size+=4,u.Box.prototype.writeHeader.call(this,e," v="+this.version+" f="+this.flags),e.writeUint8(this.version),e.writeUint24(this.flags)},u.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))},u.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);o.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size)},u.TrackReferenceTypeBox.prototype.write=function(e){this.size=4*this.track_ids.length,this.writeHeader(e),e.writeUint32Array(this.track_ids)},u.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)},u.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])},u.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)},u.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])},u.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;o.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size)},u.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)},u.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)}},u.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)},u.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)},u.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)},u.hvcCBox.prototype.write=function(e){var t,i;for(this.size=23,t=0;t<this.nalu_arrays.length;t++)for(this.size+=3,i=0;i<this.nalu_arrays[t].length;i++)this.size+=2+this.nalu_arrays[t][i].data.length;for(this.writeHeader(e),e.writeUint8(this.configurationVersion),e.writeUint8(this.general_profile_space<<6+this.general_tier_flag<<5+this.general_profile_idc),e.writeUint32(this.general_profile_compatibility),e.writeUint8Array(this.general_constraint_indicator),e.writeUint8(this.general_level_idc),e.writeUint16(this.min_spatial_segmentation_idc+(15<<24)),e.writeUint8(this.parallelismType+252),e.writeUint8(this.chroma_format_idc+252),e.writeUint8(this.bit_depth_luma_minus8+248),e.writeUint8(this.bit_depth_chroma_minus8+248),e.writeUint16(this.avgFrameRate),e.writeUint8((this.constantFrameRate<<6)+(this.numTemporalLayers<<3)+(this.temporalIdNested<<2)+this.lengthSizeMinusOne),e.writeUint8(this.nalu_arrays.length),t=0;t<this.nalu_arrays.length;t++)for(e.writeUint8((this.nalu_arrays[t].completeness<<7)+this.nalu_arrays[t].nalu_type),e.writeUint16(this.nalu_arrays[t].length),i=0;i<this.nalu_arrays[t].length;i++)e.writeUint16(this.nalu_arrays[t][i].data.length),e.writeUint8Array(this.nalu_arrays[t][i].data)},u.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)},u.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)},u.mehdBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=4,this.writeHeader(e),e.writeUint32(this.fragment_duration)},u.mfhdBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=4,this.writeHeader(e),e.writeUint32(this.sequence_number)},u.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)},u.SampleEntry.prototype.writeHeader=function(e){this.size=8,u.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)},u.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;o.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size)},u.SampleEntry.prototype.write=function(e){this.writeHeader(e),e.writeUint8Array(this.data),this.size+=this.data.length,o.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size)},u.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)},u.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)},u.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)},u.SampleGroupEntry.prototype.write=function(e){e.writeUint8Array(this.data)},u.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)}},u.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)},u.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)}},u.smhdBox.prototype.write=function(e){this.version=0,this.flags=1,this.size=4,this.writeHeader(e),e.writeUint16(this.balance),e.writeUint16(0)},u.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)},u.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])},u.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;o.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),e.adjustUint32(this.sizePosition,this.size)},u.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])},u.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)},u.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)},u.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])},u.tfdtBox.prototype.write=function(e){var t=Math.pow(2,32)-1;this.version=this.baseMediaDecodeTime>t?1: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)},u.tfhdBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&u.TFHD_FLAG_BASE_DATA_OFFSET&&(this.size+=8),this.flags&u.TFHD_FLAG_SAMPLE_DESC&&(this.size+=4),this.flags&u.TFHD_FLAG_SAMPLE_DUR&&(this.size+=4),this.flags&u.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&u.TFHD_FLAG_SAMPLE_FLAGS&&(this.size+=4),this.writeHeader(e),e.writeUint32(this.track_id),this.flags&u.TFHD_FLAG_BASE_DATA_OFFSET&&e.writeUint64(this.base_data_offset),this.flags&u.TFHD_FLAG_SAMPLE_DESC&&e.writeUint32(this.default_sample_description_index),this.flags&u.TFHD_FLAG_SAMPLE_DUR&&e.writeUint32(this.default_sample_duration),this.flags&u.TFHD_FLAG_SAMPLE_SIZE&&e.writeUint32(this.default_sample_size),this.flags&u.TFHD_FLAG_SAMPLE_FLAGS&&e.writeUint32(this.default_sample_flags)},u.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)},u.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)},u.trunBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&u.TRUN_FLAGS_DATA_OFFSET&&(this.size+=4),this.flags&u.TRUN_FLAGS_FIRST_FLAG&&(this.size+=4),this.flags&u.TRUN_FLAGS_DURATION&&(this.size+=4*this.sample_duration.length),this.flags&u.TRUN_FLAGS_SIZE&&(this.size+=4*this.sample_size.length),this.flags&u.TRUN_FLAGS_FLAGS&&(this.size+=4*this.sample_flags.length),this.flags&u.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(e),e.writeUint32(this.sample_count),this.flags&u.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=e.getPosition(),e.writeInt32(this.data_offset)),this.flags&u.TRUN_FLAGS_FIRST_FLAG&&e.writeUint32(this.first_sample_flags);for(var t=0;t<this.sample_count;t++)this.flags&u.TRUN_FLAGS_DURATION&&e.writeUint32(this.sample_duration[t]),this.flags&u.TRUN_FLAGS_SIZE&&e.writeUint32(this.sample_size[t]),this.flags&u.TRUN_FLAGS_FLAGS&&e.writeUint32(this.sample_flags[t]),this.flags&u.TRUN_FLAGS_CTS_OFFSET&&(0===this.version?e.writeUint32(this.sample_composition_time_offset[t]):e.writeInt32(this.sample_composition_time_offset[t]))},u["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)},u["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)},u.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)},u.cttsBox.prototype.unpack=function(e){var t,i,s;for(s=0,t=0;t<this.sample_counts.length;t++)for(i=0;i<this.sample_counts[t];i++)e[s].pts=e[s].dts+this.sample_offsets[t],s++},u.sttsBox.prototype.unpack=function(e){var t,i,s;for(s=0,t=0;t<this.sample_counts.length;t++)for(i=0;i<this.sample_counts[t];i++)e[s].dts=0===s?0:e[s-1].dts+this.sample_deltas[t],s++},u.stcoBox.prototype.unpack=function(e){var t;for(t=0;t<this.chunk_offsets.length;t++)e[t].offset=this.chunk_offsets[t]},u.stscBox.prototype.unpack=function(e){var t,i,s,r,a;for(r=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++,s=0;s<this.samples_per_chunk[t];s++){if(!e[r])return;e[r].description_index=this.sample_description_index[t],e[r].chunk_index=a,r++}},u.stszBox.prototype.unpack=function(e){var t;for(t=0;t<this.sample_sizes.length;t++)e[t].size=this.sample_sizes[t]},u.DIFF_BOXES_PROP_NAMES=["boxes","entries","references","subsamples","items","item_infos","extents","associations","subsegments","ranges","seekLists","seekPoints","esd","levels"],u.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"],u.boxEqualFields=function(e,t){if(e&&!t)return!1;var i;for(i in e)if(!(u.DIFF_BOXES_PROP_NAMES.indexOf(i)>-1||e[i]instanceof u.Box||t[i]instanceof u.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||u.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(i)>-1||e[i]===t[i]))return!1;return!0},u.boxEqual=function(e,t){if(!u.boxEqualFields(e,t))return!1;for(var i=0;i<u.DIFF_BOXES_PROP_NAMES.length;i++){var s=u.DIFF_BOXES_PROP_NAMES[i];if(e[s]&&t[s]&&!u.boxEqual(e[s],t[s]))return!1}return!0};var m=function(){};m.prototype.parseSample=function(e){var t,i={};i.resources=[];var s=new n(e.data.buffer);if(e.subsamples&&0!==e.subsamples.length){if(i.documentString=s.readString(e.subsamples[0].size),e.subsamples.length>1)for(t=1;t<e.subsamples.length;t++)i.resources[t]=s.readUint8Array(e.subsamples[t].size)}else i.documentString=s.readString(e.data.length);return"undefined"!=typeof DOMParser&&(i.document=(new DOMParser).parseFromString(i.documentString,"application/xml")),i};var g=function(){};g.prototype.parseSample=function(e){return new n(e.data.buffer).readString(e.data.length)},g.prototype.parseConfig=function(e){var t=new n(e.buffer);return t.readUint32(),t.readCString()},t.XMLSubtitlein4Parser=m,t.Textin4Parser=g;var y=function(e){this.stream=e||new h,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};y.prototype.destroy=function(){this.stream&&(this.stream.destroy(),this.stream=null),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},y.prototype.setSegmentOptions=function(e,t,i){var s=this.getTrackById(e);if(s){var r={};this.fragmentedTracks.push(r),r.id=e,r.user=t,r.trak=s,s.nextSample=0,r.segmentStream=null,r.nb_samples=1e3,r.rapAlignement=!0,i&&(i.nbSamples&&(r.nb_samples=i.nbSamples),i.rapAlignement&&(r.rapAlignement=i.rapAlignement))}},y.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)},y.prototype.setExtractionOptions=function(e,t,i){var s=this.getTrackById(e);if(s){var r={};this.extractedTracks.push(r),r.id=e,r.user=t,r.trak=s,s.nextSample=0,r.nb_samples=1e3,r.samples=[],i&&i.nbSamples&&(r.nb_samples=i.nbSamples)}},y.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)},y.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=u.parseOneBox(this.stream,false)).code===u.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]&&o.warn("ISOFile","Duplicate Box of type: "+i+", overriding previous occurrence"),this[i]=t}this.updateUsedBytes&&this.updateUsedBytes(t,e)}},y.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?(o.warn("ISOFile","Ignoring empty buffer (fileStart: "+e.fileStart+")"),this.stream.logBufferLevel(),!1):(o.info("ISOFile","Processing buffer (fileStart: "+e.fileStart+")"),e.usedBytes=0,this.stream.insertBuffer(e),this.stream.logBufferLevel(),!!this.stream.initialized()||(o.warn("ISOFile","Not ready to start parsing"),!1))},y.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&&(o.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),o.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),i},y.prototype.getInfo=function(){var e,t,i,s,r,a,o={},n=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(o.hasMoov=!0,o.duration=this.moov.mvhd.duration,o.timescale=this.moov.mvhd.timescale,o.isFragmented=null!=this.moov.mvex,o.isFragmented&&this.moov.mvex.mehd&&(o.fragment_duration=this.moov.mvex.mehd.fragment_duration),o.isProgressive=this.isProgressive,o.hasIOD=null!=this.moov.iods,o.brands=[],o.brands.push(this.ftyp.major_brand),o.brands=o.brands.concat(this.ftyp.compatible_brands),o.created=new Date(n+1e3*this.moov.mvhd.creation_time),o.modified=new Date(n+1e3*this.moov.mvhd.modification_time),o.tracks=[],o.audioTracks=[],o.videoTracks=[],o.subtitleTracks=[],o.metadataTracks=[],o.hintTracks=[],o.otherTracks=[],e=0;e<this.moov.traks.length;e++){if(a=(i=this.moov.traks[e]).mdia.minf.stbl.stsd.entries[0],s={},o.tracks.push(s),s.id=i.tkhd.track_id,s.name=i.mdia.hdlr.name,s.references=[],i.tref)for(t=0;t<i.tref.boxes.length;t++)r={},s.references.push(r),r.type=i.tref.boxes[t].type,r.track_ids=i.tref.boxes[t].track_ids;i.edts&&(s.edits=i.edts.elst.entries),s.created=new Date(n+1e3*i.tkhd.creation_time),s.modified=new Date(n+1e3*i.tkhd.modification_time),s.movie_duration=i.tkhd.duration,s.movie_timescale=o.timescale,s.layer=i.tkhd.layer,s.alternate_group=i.tkhd.alternate_group,s.volume=i.tkhd.volume,s.matrix=i.tkhd.matrix,s.track_width=i.tkhd.width/65536,s.track_height=i.tkhd.height/65536,s.timescale=i.mdia.mdhd.timescale,s.cts_shift=i.mdia.minf.stbl.cslg,s.duration=i.mdia.mdhd.duration,s.samples_duration=i.samples_duration,s.codec=a.getCodec(),s.kind=i.udta&&i.udta.kinds.length?i.udta.kinds[0]:{schemeURI:"",value:""},s.language=i.mdia.elng?i.mdia.elng.extended_language:i.mdia.mdhd.languageString,s.nb_samples=i.samples.length,s.size=i.samples_size,s.bitrate=8*s.size*s.timescale/s.samples_duration,a.isAudio()?(s.type="audio",o.audioTracks.push(s),s.audio={},s.audio.sample_rate=a.getSampleRate(),s.audio.channel_count=a.getChannelCount(),s.audio.sample_size=a.getSampleSize()):a.isVideo()?(s.type="video",o.videoTracks.push(s),s.video={},s.video.width=a.getWidth(),s.video.height=a.getHeight()):a.isSubtitle()?(s.type="subtitles",o.subtitleTracks.push(s)):a.isHint()?(s.type="metadata",o.hintTracks.push(s)):a.isMetadata()?(s.type="metadata",o.metadataTracks.push(s)):(s.type="metadata",o.otherTracks.push(s))}else o.hasMoov=!1;if(o.mime="",o.hasMoov&&o.tracks){for(o.videoTracks&&o.videoTracks.length>0?o.mime+='video/mp4; codecs="':o.audioTracks&&o.audioTracks.length>0?o.mime+='audio/mp4; codecs="':o.mime+='application/mp4; codecs="',e=0;e<o.tracks.length;e++)0!==e&&(o.mime+=","),o.mime+=o.tracks[e].codec;o.mime+='"; profiles="',o.mime+=this.ftyp.compatible_brands.join(),o.mime+='"'}return o},y.prototype.setNextSeekPositionFromSample=function(e){e&&(this.nextSeekPosition?this.nextSeekPosition=Math.min(e.offset+e.alreadyRead,this.nextSeekPosition):this.nextSeekPosition=e.offset+e.alreadyRead)},y.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 s=this.fragmentedTracks[t];for(i=s.trak;i.nextSample<i.samples.length&&this.sampleProcessingStarted;){o.debug("ISOFile","Creating media fragment on track #"+s.id+" for sample "+i.nextSample);var r=this.createFragment(s.id,i.nextSample,s.segmentStream);if(!r)break;if(s.segmentStream=r,i.nextSample++,(i.nextSample%s.nb_samples==0||e||i.nextSample>=i.samples.length)&&(o.info("ISOFile","Sending fragmented data on track #"+s.id+" for samples ["+Math.max(0,i.nextSample-s.nb_samples)+","+(i.nextSample-1)+"]"),o.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(s.id,s.user,s.segmentStream.buffer,i.nextSample,e||i.nextSample>=i.samples.length),s.segmentStream=null,s!==this.fragmentedTracks[t]))break}}if(null!==this.onSamples)for(t=0;t<this.extractedTracks.length;t++){var a=this.extractedTracks[t];for(i=a.trak;i.nextSample<i.samples.length&&this.sampleProcessingStarted;){o.debug("ISOFile","Exporting on track #"+a.id+" sample #"+i.nextSample);var n=this.getSample(i,i.nextSample);if(!n){this.setNextSeekPositionFromSample(i.samples[i.nextSample]);break}if(i.nextSample++,a.samples.push(n),(i.nextSample%a.nb_samples==0||i.nextSample>=i.samples.length)&&(o.debug("ISOFile","Sending samples on track #"+a.id+" for sample "+i.nextSample),this.onSamples&&this.onSamples(a.id,a.user,a.samples),a.samples=[],a!==this.extractedTracks[t]))break}}}},y.prototype.getBox=function(e){var t=this.getBoxes(e,!0);return t.length?t[0]:null},y.prototype.getBoxes=function(e,t){var i=[];return y._sweep.call(this,e,i,t),i},y._sweep=function(e,t,i){for(var s in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&i)return;y._sweep.call(this.boxes[s],e,t,i)}},y.prototype.getTrackSamplesInfo=function(e){var t=this.getTrackById(e);return t?t.samples:void 0},y.prototype.getTrackSample=function(e,t){var i=this.getTrackById(e);return this.getSample(i,t)},y.prototype.releaseUsedSamples=function(e,t){var i=0,s=this.getTrackById(e);s.lastValidSample||(s.lastValidSample=0);for(var r=s.lastValidSample;r<t;r++)i+=this.releaseSample(s,r);o.info("ISOFile","Track #"+e+" released samples up to "+t+" (released size: "+i+", remaining: "+this.samplesDataSize+")"),s.lastValidSample=t},y.prototype.start=function(){this.sampleProcessingStarted=!0,this.processSamples(!1)},y.prototype.stop=function(){this.sampleProcessingStarted=!1},y.prototype.flush=function(){o.info("ISOFile","Flushing remaining samples"),this.updateSampleLists(),this.processSamples(!0),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0)},y.prototype.seekTrack=function(e,t,i){var s,r,a,n,l=0,d=0;if(0===i.samples.length)return o.info("ISOFile","No sample in track, cannot seek! Using time "+o.getDurationString(0,1)+" and offset: 0"),{offset:0,time:0};for(s=0;s<i.samples.length;s++){if(r=i.samples[s],0===s)d=0,n=r.timescale;else if(r.cts>e*r.timescale){d=s-1;break}t&&r.is_sync&&(l=s)}for(t&&(d=l),e=i.samples[d].cts,i.nextSample=d;i.samples[d].alreadyRead===i.samples[d].size&&i.samples[d+1];)d++;return a=i.samples[d].offset+i.samples[d].alreadyRead,o.info("ISOFile","Seeking to "+(t?"RAP":"")+" sample #"+i.nextSample+" on track "+i.tkhd.track_id+", time "+o.getDurationString(e,n)+" and offset: "+a),{offset:a,time:e/n}},y.prototype.getTrackDuration=function(e){var t;return e.samples?((t=e.samples[e.samples.length-1]).cts+t.duration)/t.timescale:1/0},y.prototype.seek=function(e,t){var i,s,r,a=this.moov,n={offset:1/0,time:1/0};if(this.moov){for(r=0;r<a.traks.length;r++)i=a.traks[r],e>this.getTrackDuration(i)||((s=this.seekTrack(e,t,i)).offset<n.offset&&(n.offset=s.offset),s.time<n.time&&(n.time=s.time));return o.info("ISOFile","Seeking at time "+o.getDurationString(n.time,1)+" needs a buffer with a fileStart position of "+n.offset),n.offset===1/0?n={offset:this.nextParsePosition,time:0}:n.offset=this.stream.getEndFilePositionAfter(n.offset),o.info("ISOFile","Adjusted seek position (after checking data already in buffer): "+n.offset),n}throw"Cannot seek: moov not received!"},y.prototype.equal=function(e){for(var t=0;t<this.boxes.length&&t<e.boxes.length;){var i=this.boxes[t],s=e.boxes[t];if(!u.boxEqual(i,s))return!1;t++}return!0},t.ISOFile=y,y.prototype.lastBoxStartPosition=0,y.prototype.parsingMdat=null,y.prototype.nextParsePosition=0,y.prototype.discardMdatData=!1,y.prototype.processIncompleteBox=function(e){var t;return"mdat"===e.type?(t=new u[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))},y.prototype.hasIncompleteMdat=function(){return null!==this.parsingMdat},y.prototype.processIncompleteMdat=function(){var e;return e=this.parsingMdat,this.stream.seek(e.start+e.size,!1,this.discardMdatData)?(o.debug("ISOFile","Found 'mdat' end in buffered data"),this.parsingMdat=null,!0):(this.nextParsePosition=this.stream.findEndContiguousBuf(),!1)},y.prototype.restoreParsePosition=function(){return this.stream.seek(this.lastBoxStartPosition,!0,this.discardMdatData)},y.prototype.saveParsePosition=function(){this.lastBoxStartPosition=this.stream.getPosition()},y.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))},y.prototype.add=u.Box.prototype.add,y.prototype.addBox=u.Box.prototype.addBox,y.prototype.init=function(e){var t=e||{};this.add("ftyp").set("major_brand",t.brands&&t.brands[0]||"iso4").set("minor_version",0).set("compatible_brands",t.brands||["iso4"]);var i=this.add("moov");return i.add("mvhd").set("timescale",t.timescale||600).set("rate",t.rate||65536).set("creation_time",0).set("modification_time",0).set("duration",t.duration||0).set("volume",t.width?0:256).set("matrix",[65536,0,0,0,65536,0,0,0,1073741824]).set("next_track_id",1),i.add("mvex"),this},y.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",u.TKHD_FLAG_ENABLED|u.TKHD_FLAG_IN_MOVIE|u.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<<16).set("height",t.height<<16);var s=i.add("mdia");s.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||"und"),s.add("hdlr").set("handler",t.hdlr||"vide").set("name",t.name||"Track created with MP4Box.js"),s.add("elng").set("extended_language",t.language||"fr-FR");var r=s.add("minf");if(void 0!==u[t.type+"SampleEntry"]){var a=new u[t.type+"SampleEntry"];a.data_reference_index=1;var o="";for(var l in u.sampleEntryCodes)for(var d=u.sampleEntryCodes[l],h=0;h<d.length;h++)if(d.indexOf(t.type)>-1){o=l;break}switch(o){case"Visual":if(r.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),t.avcDecoderConfigRecord){var c=new u.avcCBox;c.parse(new n(t.avcDecoderConfigRecord)),a.addBox(c)}else if(t.hevcDecoderConfigRecord){var p=new u.hvcCBox;p.parse(new n(t.hevcDecoderConfigRecord)),a.addBox(p)}break;case"Audio":r.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":r.add("hmhd");break;case"Subtitle":if(r.add("sthd"),"stpp"===t.type)a.set("namespace",t.namespace||"nonamespace").set("schema_location",t.schema_location||"").set("auxiliary_mime_types",t.auxiliary_mime_types||"");break;default:r.add("nmhd")}t.description&&a.addBox(t.description),t.description_boxes&&t.description_boxes.forEach((function(e){a.addBox(e)})),r.add("dinf").add("dref").addEntry((new u["url Box"]).set("flags",1));var f=r.add("stbl");return f.add("stsd").addEntry(a),f.add("stts").set("sample_counts",[]).set("sample_deltas",[]),f.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),f.add("stco").set("chunk_offsets",[]),f.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}},u.Box.prototype.computeSize=function(e){var t=e||new l;t.endianness=l.BIG_ENDIAN,this.write(t)},y.prototype.addSample=function(e,t,i){var s=i||{},r={},a=this.getTrackById(e);if(null!==a){r.number=a.samples.length,r.track_id=a.tkhd.track_id,r.timescale=a.mdia.mdhd.timescale,r.description_index=s.sample_description_index?s.sample_description_index-1:0,r.description=a.mdia.minf.stbl.stsd.entries[r.description_index],r.data=t,r.size=t.byteLength,r.alreadyRead=r.size,r.duration=s.duration||1,r.cts=s.cts||0,r.dts=s.dts||0,r.is_sync=s.is_sync||!1,r.is_leading=s.is_leading||0,r.depends_on=s.depends_on||0,r.is_depended_on=s.is_depended_on||0,r.has_redundancy=s.has_redundancy||0,r.degradation_priority=s.degradation_priority||0,r.offset=0,r.subsamples=s.subsamples,a.samples.push(r),a.samples_size+=r.size,a.samples_duration+=r.duration,void 0===a.first_dts&&(a.first_dts=s.dts),this.processSamples();var o=this.createSingleSampleMoof(r);return this.addBox(o),o.computeSize(),o.trafs[0].truns[0].data_offset=o.size+8,this.add("mdat").data=new Uint8Array(t),r}},y.prototype.createSingleSampleMoof=function(e){var t=0;t=e.is_sync?1<<25:65536;var i=new u.moofBox;i.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var s=i.add("traf"),r=this.getTrackById(e.track_id);return s.add("tfhd").set("track_id",e.track_id).set("flags",u.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),s.add("tfdt").set("baseMediaDecodeTime",e.dts-(r.first_dts||0)),s.add("trun").set("flags",u.TRUN_FLAGS_DATA_OFFSET|u.TRUN_FLAGS_DURATION|u.TRUN_FLAGS_SIZE|u.TRUN_FLAGS_FLAGS|u.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",[t]).set("sample_composition_time_offset",[e.cts-e.dts]),i},y.prototype.lastMoofIndex=0,y.prototype.samplesDataSize=0,y.prototype.resetTables=function(){var e,t,i,s,r,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=[],(s=t.mdia.minf.stbl.stts).sample_counts=[],s.sample_deltas=[],(r=t.mdia.minf.stbl.ctts)&&(r.sample_counts=[],r.sample_offsets=[]),a=t.mdia.minf.stbl.stss;var o=t.mdia.minf.stbl.boxes.indexOf(a);-1!=o&&(t.mdia.minf.stbl.boxes[o]=null)}},y.initSampleGroups=function(e,t,i,s,r){var a,o,n,l;function d(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=[]),o=0;o<i.length;o++){for(l=i[o].grouping_type+"/"+i[o].grouping_type_parameter,n=new d(i[o].grouping_type,i[o].grouping_type_parameter,i[o]),t&&(t.sample_groups_info[l]=n),e.sample_groups_info[l]||(e.sample_groups_info[l]=n),a=0;a<s.length;a++)s[a].grouping_type===i[o].grouping_type&&(n.description=s[a],n.description.used=!0);if(r)for(a=0;a<r.length;a++)r[a].grouping_type===i[o].grouping_type&&(n.fragment_description=r[a],n.fragment_description.used=!0,n.is_fragment=!0)}if(t){if(r)for(o=0;o<r.length;o++)!r[o].used&&r[o].version>=2&&(l=r[o].grouping_type+"/0",(n=new d(r[o].grouping_type,0)).is_fragment=!0,t.sample_groups_info[l]||(t.sample_groups_info[l]=n))}else for(o=0;o<s.length;o++)!s[o].used&&s[o].version>=2&&(l=s[o].grouping_type+"/0",n=new d(s[o].grouping_type,0),e.sample_groups_info[l]||(e.sample_groups_info[l]=n))},y.setSampleGroupProperties=function(e,t,i,s){var r,a;for(r in t.sample_groups=[],s){var o;if(t.sample_groups[r]={},t.sample_groups[r].grouping_type=s[r].grouping_type,t.sample_groups[r].grouping_type_parameter=s[r].grouping_type_parameter,i>=s[r].last_sample_in_run&&(s[r].last_sample_in_run<0&&(s[r].last_sample_in_run=0),s[r].entry_index++,s[r].entry_index<=s[r].sbgp.entries.length-1&&(s[r].last_sample_in_run+=s[r].sbgp.entries[s[r].entry_index].sample_count)),s[r].entry_index<=s[r].sbgp.entries.length-1?t.sample_groups[r].group_description_index=s[r].sbgp.entries[s[r].entry_index].group_description_index:t.sample_groups[r].group_description_index=-1,0!==t.sample_groups[r].group_description_index)o=s[r].fragment_description?s[r].fragment_description:s[r].description,t.sample_groups[r].group_description_index>0?(a=t.sample_groups[r].group_description_index>65535?(t.sample_groups[r].group_description_index>>16)-1:t.sample_groups[r].group_description_index-1,o&&a>=0&&(t.sample_groups[r].description=o.entries[a])):o&&o.version>=2&&o.default_group_description_index>0&&(t.sample_groups[r].description=o.entries[o.default_group_description_index-1])}},y.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))},y.prototype.buildSampleLists=function(){var e,t;for(e=0;e<this.moov.traks.length;e++)t=this.moov.traks[e],this.buildTrakSampleLists(t)},y.prototype.buildTrakSampleLists=function(e){var t,i,s,r,a,o,n,l,d,h,c,u,p,f,m,g,A,b,v,_,S,w,E,T;if(e.samples=[],e.samples_duration=0,e.samples_size=0,i=e.mdia.minf.stbl.stco||e.mdia.minf.stbl.co64,s=e.mdia.minf.stbl.stsc,r=e.mdia.minf.stbl.stsz||e.mdia.minf.stbl.stz2,a=e.mdia.minf.stbl.stts,o=e.mdia.minf.stbl.ctts,n=e.mdia.minf.stbl.stss,l=e.mdia.minf.stbl.stsd,d=e.mdia.minf.stbl.subs,u=e.mdia.minf.stbl.stdp,h=e.mdia.minf.stbl.sbgps,c=e.mdia.minf.stbl.sgpds,b=-1,v=-1,_=-1,S=-1,w=0,E=0,T=0,y.initSampleGroups(e,null,h,c),void 0!==r){for(t=0;t<r.sample_sizes.length;t++){var k={};k.number=t,k.track_id=e.tkhd.track_id,k.timescale=e.mdia.mdhd.timescale,k.alreadyRead=0,e.samples[t]=k,k.size=r.sample_sizes[t],e.samples_size+=k.size,0===t?(f=1,p=0,k.chunk_index=f,k.chunk_run_index=p,A=s.samples_per_chunk[p],g=0,m=p+1<s.first_chunk.length?s.first_chunk[p+1]-1:1/0):t<A?(k.chunk_index=f,k.chunk_run_index=p):(f++,k.chunk_index=f,g=0,f<=m||(m=++p+1<s.first_chunk.length?s.first_chunk[p+1]-1:1/0),k.chunk_run_index=p,A+=s.samples_per_chunk[p]),k.description_index=s.sample_description_index[k.chunk_run_index]-1,k.description=l.entries[k.description_index],k.offset=i.chunk_offsets[k.chunk_index-1]+g,g+=k.size,t>b&&(v++,b<0&&(b=0),b+=a.sample_counts[v]),t>0?(e.samples[t-1].duration=a.sample_deltas[v],e.samples_duration+=e.samples[t-1].duration,k.dts=e.samples[t-1].dts+e.samples[t-1].duration):k.dts=0,o?(t>=_&&(S++,_<0&&(_=0),_+=o.sample_counts[S]),k.cts=e.samples[t].dts+o.sample_offsets[S]):k.cts=k.dts,n?(t==n.sample_numbers[w]-1?(k.is_sync=!0,w++):(k.is_sync=!1,k.degradation_priority=0),d&&d.entries[E].sample_delta+T==t+1&&(k.subsamples=d.entries[E].subsamples,T+=d.entries[E].sample_delta,E++)):k.is_sync=!0,y.process_sdtp(e.mdia.minf.stbl.sdtp,k,k.number),k.degradation_priority=u?u.priority[t]:0,d&&d.entries[E].sample_delta+T==t&&(k.subsamples=d.entries[E].subsamples,T+=d.entries[E].sample_delta),(h.length>0||c.length>0)&&y.setSampleGroupProperties(e,k,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)}},y.prototype.updateSampleLists=function(){var e,t,i,s,r,a,o,n,l,d,h,c,p,f,m;if(void 0!==this.moov)for(;this.lastMoofIndex<this.moofs.length;)if(l=this.moofs[this.lastMoofIndex],this.lastMoofIndex++,"moof"==l.type)for(d=l,e=0;e<d.trafs.length;e++){for(h=d.trafs[e],c=this.getTrackById(h.tfhd.track_id),p=this.getTrexById(h.tfhd.track_id),s=h.tfhd.flags&u.TFHD_FLAG_SAMPLE_DESC?h.tfhd.default_sample_description_index:p?p.default_sample_description_index:1,r=h.tfhd.flags&u.TFHD_FLAG_SAMPLE_DUR?h.tfhd.default_sample_duration:p?p.default_sample_duration:0,a=h.tfhd.flags&u.TFHD_FLAG_SAMPLE_SIZE?h.tfhd.default_sample_size:p?p.default_sample_size:0,o=h.tfhd.flags&u.TFHD_FLAG_SAMPLE_FLAGS?h.tfhd.default_sample_flags:p?p.default_sample_flags:0,h.sample_number=0,h.sbgps.length>0&&y.initSampleGroups(c,h,h.sbgps,c.mdia.minf.stbl.sgpds,h.sgpds),t=0;t<h.truns.length;t++){var g=h.truns[t];for(i=0;i<g.sample_count;i++){(f={}).moof_number=this.lastMoofIndex,f.number_in_traf=h.sample_number,h.sample_number++,f.number=c.samples.length,h.first_sample_index=c.samples.length,c.samples.push(f),f.track_id=c.tkhd.track_id,f.timescale=c.mdia.mdhd.timescale,f.description_index=s-1,f.description=c.mdia.minf.stbl.stsd.entries[f.description_index],f.size=a,g.flags&u.TRUN_FLAGS_SIZE&&(f.size=g.sample_size[i]),c.samples_size+=f.size,f.duration=r,g.flags&u.TRUN_FLAGS_DURATION&&(f.duration=g.sample_duration[i]),c.samples_duration+=f.duration,c.first_traf_merged||i>0?f.dts=c.samples[c.samples.length-2].dts+c.samples[c.samples.length-2].duration:(h.tfdt?f.dts=h.tfdt.baseMediaDecodeTime:f.dts=0,c.first_traf_merged=!0),f.cts=f.dts,g.flags&u.TRUN_FLAGS_CTS_OFFSET&&(f.cts=f.dts+g.sample_composition_time_offset[i]),m=o,g.flags&u.TRUN_FLAGS_FLAGS?m=g.sample_flags[i]:0===i&&g.flags&u.TRUN_FLAGS_FIRST_FLAG&&(m=g.first_sample_flags),f.is_sync=!(m>>16&1),f.is_leading=m>>26&3,f.depends_on=m>>24&3,f.is_depended_on=m>>22&3,f.has_redundancy=m>>20&3,f.degradation_priority=65535&m;var A=!!(h.tfhd.flags&u.TFHD_FLAG_BASE_DATA_OFFSET),b=!!(h.tfhd.flags&u.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),v=!!(g.flags&u.TRUN_FLAGS_DATA_OFFSET),_=0;_=A?h.tfhd.base_data_offset:b||0===t?d.start:n,f.offset=0===t&&0===i?v?_+g.data_offset:_:n,n=f.offset+f.size,(h.sbgps.length>0||h.sgpds.length>0||c.mdia.minf.stbl.sbgps.length>0||c.mdia.minf.stbl.sgpds.length>0)&&y.setSampleGroupProperties(c,f,f.number_in_traf,h.sample_groups_info)}}if(h.subs){c.has_fragment_subsamples=!0;var S=h.first_sample_index;for(t=0;t<h.subs.entries.length;t++)S+=h.subs.entries[t].sample_delta,(f=c.samples[S-1]).subsamples=h.subs.entries[t].subsamples}}},y.prototype.getSample=function(e,t){var i,s=e.samples[t];if(!this.moov)return null;if(s.data){if(s.alreadyRead==s.size)return s}else s.data=new Uint8Array(s.size),s.alreadyRead=0,this.samplesDataSize+=s.size,o.debug("ISOFile","Allocating sample #"+t+" on track #"+e.tkhd.track_id+" of size "+s.size+" (total: "+this.samplesDataSize+")");for(;;){var r=this.stream.findPosition(!0,s.offset+s.alreadyRead,!1);if(!(r>-1))return null;var a=(i=this.stream.buffers[r]).byteLength-(s.offset+s.alreadyRead-i.fileStart);if(s.size-s.alreadyRead<=a)return o.debug("ISOFile","Getting sample #"+t+" data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-i.fileStart)+" read size: "+(s.size-s.alreadyRead)+" full size: "+s.size+")"),l.memcpy(s.data.buffer,s.alreadyRead,i,s.offset+s.alreadyRead-i.fileStart,s.size-s.alreadyRead),i.usedBytes+=s.size-s.alreadyRead,this.stream.logBufferLevel(),s.alreadyRead=s.size,s;if(0===a)return null;o.debug("ISOFile","Getting sample #"+t+" partial data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-i.fileStart)+" read size: "+a+" full size: "+s.size+")"),l.memcpy(s.data.buffer,s.alreadyRead,i,s.offset+s.alreadyRead-i.fileStart,a),s.alreadyRead+=a,i.usedBytes+=a,this.stream.logBufferLevel()}},y.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},y.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize},y.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},y.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},y.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},y.prototype.items=[],y.prototype.entity_groups=[],y.prototype.itemsDataSize=0,y.prototype.flattenItemInfo=function(){var e,t,i,s=this.items,r=this.entity_groups,a=this.meta;if(null!=a&&void 0!==a.hdlr&&void 0!==a.iinf){for(e=0;e<a.iinf.item_infos.length;e++)(i={}).id=a.iinf.item_infos[e].item_ID,s[i.id]=i,i.ref_to=[],i.name=a.iinf.item_infos[e].item_name,a.iinf.item_infos[e].protection_index>0&&(i.protection=a.ipro.protections[a.iinf.item_infos[e].protection_index-1]),a.iinf.item_infos[e].item_type?i.type=a.iinf.item_infos[e].item_type:i.type="mime",i.content_type=a.iinf.item_infos[e].content_type,i.content_encoding=a.iinf.item_infos[e].content_encoding;if(a.grpl)for(e=0;e<a.grpl.boxes.length;e++)entity_group={},entity_group.id=a.grpl.boxes[e].group_id,entity_group.entity_ids=a.grpl.boxes[e].entity_ids,entity_group.type=a.grpl.boxes[e].type,r[entity_group.id]=entity_group;if(a.iloc)for(e=0;e<a.iloc.items.length;e++){var n=a.iloc.items[e];switch(i=s[n.item_ID],0!==n.data_reference_index&&(o.warn("Item storage with reference to other files: not supported"),i.source=a.dinf.boxes[n.data_reference_index-1]),n.construction_method){case 0:break;case 1:case 2:o.warn("Item storage with construction_method : not supported")}for(i.extents=[],i.size=0,t=0;t<n.extents.length;t++)i.extents[t]={},i.extents[t].offset=n.extents[t].extent_offset+n.base_offset,i.extents[t].length=n.extents[t].extent_length,i.extents[t].alreadyRead=0,i.size+=i.extents[t].length}if(a.pitm&&(s[a.pitm.item_id].primary=!0),a.iref)for(e=0;e<a.iref.references.length;e++){var l=a.iref.references[e];for(t=0;t<l.references.length;t++)s[l.from_item_ID].ref_to.push({type:l.type,id:l.references[t]})}if(a.iprp)for(var d=0;d<a.iprp.ipmas.length;d++){var h=a.iprp.ipmas[d];for(e=0;e<h.associations.length;e++){var c=h.associations[e];if((i=s[c.id])||(i=r[c.id]),i)for(void 0===i.properties&&(i.properties={},i.properties.boxes=[]),t=0;t<c.props.length;t++){var u=c.props[t];if(u.property_index>0&&u.property_index-1<a.iprp.ipco.boxes.length){var p=a.iprp.ipco.boxes[u.property_index-1];i.properties[p.type]=p,i.properties.boxes.push(p)}}}}}},y.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,o.debug("ISOFile","Allocating item #"+e+" of size "+i.size+" (total: "+this.itemsDataSize+")");else if(i.alreadyRead===i.size)return i;for(var s=0;s<i.extents.length;s++){var r=i.extents[s];if(r.alreadyRead!==r.length){var a=this.stream.findPosition(!0,r.offset+r.alreadyRead,!1);if(!(a>-1))return null;var n=(t=this.stream.buffers[a]).byteLength-(r.offset+r.alreadyRead-t.fileStart);if(!(r.length-r.alreadyRead<=n))return o.debug("ISOFile","Getting item #"+e+" extent #"+s+" partial data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-t.fileStart)+" read size: "+n+" full extent size: "+r.length+" full item size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,t,r.offset+r.alreadyRead-t.fileStart,n),r.alreadyRead+=n,i.alreadyRead+=n,t.usedBytes+=n,this.stream.logBufferLevel(),null;o.debug("ISOFile","Getting item #"+e+" extent #"+s+" data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-t.fileStart)+" read size: "+(r.length-r.alreadyRead)+" full extent size: "+r.length+" full item size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,t,r.offset+r.alreadyRead-t.fileStart,r.length-r.alreadyRead),t.usedBytes+=r.length-r.alreadyRead,this.stream.logBufferLevel(),i.alreadyRead+=r.length-r.alreadyRead,r.alreadyRead=r.length}}return i.alreadyRead===i.size?i:null},y.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},y.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)}},y.prototype.hasItem=function(e){for(var t in this.items){var i=this.items[t];if(i.name===e)return i.id}return-1},y.prototype.getMetaHandler=function(){return this.meta?this.meta.hdlr.handler:null},y.prototype.getPrimaryItem=function(){return this.meta&&this.meta.pitm?this.getItem(this.meta.pitm.item_id):null},y.prototype.itemToFragmentedTrackFile=function(e){var t=e||{},i=null;if(null==(i=t.itemId?this.getItem(t.itemId):this.getPrimaryItem()))return null;var s=new y;s.discardMdatData=!1;var r={type:i.type,description_boxes:i.properties.boxes};i.properties.ispe&&(r.width=i.properties.ispe.image_width,r.height=i.properties.ispe.image_height);var a=s.addTrack(r);return a?(s.addSample(a,i.data),s):null},y.prototype.write=function(e){for(var t=0;t<this.boxes.length;t++)this.boxes[t].write(e)},y.prototype.createFragment=function(e,t,i){var s=this.getTrackById(e),r=this.getSample(s,t);if(null==r)return this.setNextSeekPositionFromSample(s.samples[t]),null;var a=i||new l;a.endianness=l.BIG_ENDIAN;var n=this.createSingleSampleMoof(r);n.write(a),n.trafs[0].truns[0].data_offset=n.size+8,o.debug("MP4Box","Adjusting data_offset with new value "+n.trafs[0].truns[0].data_offset),a.adjustUint32(n.trafs[0].truns[0].data_offset_position,n.trafs[0].truns[0].data_offset);var d=new u.mdatBox;return d.data=r.data,d.write(a),a},y.writeInitializationSegment=function(e,t,i,s){var r;o.debug("ISOFile","Generating initialization segment");var a=new l;a.endianness=l.BIG_ENDIAN,e.write(a);var n=t.add("mvex");for(i&&n.add("mehd").set("fragment_duration",i),r=0;r<t.traks.length;r++)n.add("trex").set("track_id",t.traks[r].tkhd.track_id).set("default_sample_description_index",1).set("default_sample_duration",s).set("default_sample_size",0).set("default_sample_flags",65536);return t.write(a),a.buffer},y.prototype.save=function(e){var t=new l;t.endianness=l.BIG_ENDIAN,this.write(t),t.save(e)},y.prototype.getBuffer=function(){var e=new l;return e.endianness=l.BIG_ENDIAN,this.write(e),e.buffer},y.prototype.initializeSegmentation=function(){var e,t,i,s;for(null===this.onSegment&&o.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 r=new u.moovBox;r.mvhd=this.moov.mvhd,r.boxes.push(r.mvhd),i=this.getTrackById(this.fragmentedTracks[e].id),r.boxes.push(i),r.traks.push(i),(s={}).id=i.tkhd.track_id,s.user=this.fragmentedTracks[e].user,s.buffer=y.writeInitializationSegment(this.ftyp,r,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(s)}return t},u.Box.prototype.printHeader=function(e){this.size+=8,this.size>d&&(this.size+=8),"uuid"===this.type&&(this.size+=16),e.log(e.indent+"size:"+this.size),e.log(e.indent+"type:"+this.type)},u.FullBox.prototype.printHeader=function(e){this.size+=4,u.Box.prototype.printHeader.call(this,e),e.log(e.indent+"version:"+this.version),e.log(e.indent+"flags:"+this.flags)},u.Box.prototype.print=function(e){this.printHeader(e)},u.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}},y.prototype.print=function(e){e.indent="";for(var t=0;t<this.boxes.length;t++)this.boxes[t]&&this.boxes[t].print(e)},u.mvhdBox.prototype.print=function(e){u.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)},u.tkhdBox.prototype.print=function(e){u.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 A={createFile:function(e,t){var i=void 0===e||e,s=new y(t);return s.discardMdatData=!i,s}};t.createFile=A.createFile}));function $d(e){return e.reduce(((e,t)=>256*e+t))}function Wd(e){const t=[101,103,119,99],i=e.length-28,s=e.slice(i,i+t.length);return t.every(((e,t)=>e===s[t]))}Vd.Log,Vd.MP4BoxStream,Vd.DataStream,Vd.MultiBufferStream,Vd.MPEG4DescriptorParser,Vd.BoxParser,Vd.XMLSubtitlein4Parser,Vd.Textin4Parser,Vd.ISOFile,Vd.createFile;class Jd{constructor(){this.s=null,this.a=null,this.l=0,this.c=0,this.u=1/0,this.A=!1,this.d=!1,this.r=4194304,this.n=new Uint8Array([30,158,90,33,244,57,83,165,2,70,35,87,215,231,226,108]),this.t=this.n.slice().reverse()}destroy(){this.s=null,this.a=null,this.l=0,this.c=0,this.u=1/0,this.A=!1,this.d=!1,this.r=4194304,this.n=null,this.t=null}transport(e){if(!this.s&&this.l>50)return e;if(this.l++,this.d)return e;const t=new Uint8Array(e);if(this.A){if(!(this.c<this.u))return this.a&&this.s?(this.a.set(t,this.r),this.s.parse(null,this.r,t.byteLength),this.a.slice(this.r,this.r+t.byteLength)):(console.error("video_error_2"),this.d=!0,e);Wd(t)&&this.c++}else{const i=function(e,t){const i=function(e,t){for(let i=0;i<e.byteLength-t.length;i++)for(let s=0;s<t.length&&e[i+s]===t[s];s++)if(s===t.length-1)return i;return null}(e,t);if(i){const t=$d(e.slice(i+16,i+16+8));return[t,$d(e.slice(i+24,i+24+8)),function(e){return e.map((e=>~e))}(e.slice(i+32,i+32+t))]}return null}(t,this.t);if(!i)return e;const s=function(e){try{if("object"!=typeof WebAssembly||"function"!=typeof WebAssembly.instantiate)throw null;{const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(!(e instanceof WebAssembly.Module&&new WebAssembly.Instance(e)instanceof WebAssembly.Instance))throw null}}catch(e){return new Error("video_error_4")}let t;try{t={env:{__handle_stack_overflow:()=>e(new Error("video_error_1")),memory:new WebAssembly.Memory({initial:256,maximum:256})}}}catch(e){return new Error("video_error_5")}return t}(e);if(s instanceof Error)return console.error(s.message),this.d=!0,e;this.A=!0,this.u=i[1],Wd(t)&&this.c++,WebAssembly.instantiate(i[2],s).then((e=>{if(!function(e){return"function"==typeof e.parse&&"object"==typeof e.memory}(e.instance.exports))return this.d=!0,void console.error("video_error_3");this.s=e.instance.exports,this.a=new Uint8Array(this.s.memory.buffer)})).catch((e=>{this.d=!0,console.error("video_error_6")}))}return e}}class qd extends Dd{constructor(e){super(e),this.TAG_NAME="Fmp4Loader",this.player=e,this.mp4Box=Vd.createFile(),this.tempFmp4List=[],this.offset=0,this.videoTrackId=null,this.audioTrackId=null,this.isHevc=!1,this.transportDescarmber=null,this.player._opt.isFmp4Private&&(this.transportDescarmber=new Jd),this._listenMp4Box(),e.debug.log(this.TAG_NAME,"init")}destroy(){this.mp4Box&&(this.mp4Box.stop(),this.mp4Box.flush(),this.mp4Box.destroy(),this.mp4Box=null),this.transportDescarmber&&(this.transportDescarmber.destroy(),this.transportDescarmber=null),this.tempFmp4List=[],this.offset=0,this.videoTrackId=null,this.audioTrackId=null,this.isHevc=!1,this.player.debug.log(this.TAG_NAME,"destroy")}_listenMp4Box(){this.mp4Box.onReady=this.onReady.bind(this),this.mp4Box.onError=this.onError.bind(this),this.mp4Box.onSamples=this.onSamples.bind(this)}onReady(e){this.player.debug.log(this.TAG_NAME,"onReady",e);const t=e.videoTracks[0],i=e.audioTracks[0];if(t){this.videoTrackId=t.id;const e=this.getSeqHeader(t);e&&(this.player.debug.log(this.TAG_NAME,"seqHeader",e),this._doDecodeByFmp4(e,je,0,!0,0)),this.mp4Box.setExtractionOptions(t.id)}if(i&&this.player._opt.hasAudio){this.audioTrackId=i.id;const e=i.audio||{},t=Nr.indexOf(e.sample_rate),s=i.codec.replace("mp4a.40.","");this.mp4Box.setExtractionOptions(i.id);const r={profile:parseInt(s,10),sampleRate:t,channel:e.channel_count},a=jr(r);this.player.debug.log(this.TAG_NAME,"aacADTSHeader",a,"config",r),this._doDecodeByFmp4(a,Ne,0,!1,0)}this.mp4Box.start()}onError(e){this.player.debug.error(this.TAG_NAME,"mp4Box onError",e)}onSamples(e,t,i){if(e===this.videoTrackId)for(const t of i){const i=t.data,s=t.is_sync,r=1e3*t.cts/t.timescale;t.duration,t.timescale,this.player.updateStats({vbps:i.byteLength,dts:r}),s&&this.calcIframeIntervalTimestamp(r);let a=null;a=this.isHevc?jn(i,s):kn(i,s);let o=this.cryptoPayload(a,s);this._doDecodeByFmp4(o,je,r,s,0),this.mp4Box.releaseUsedSamples(e,t.number)}else if(e===this.audioTrackId){if(this.player._opt.hasAudio)for(const t of i){const i=t.data;this.player.updateStats({abps:i.byteLength});const s=1e3*t.cts/t.timescale;t.duration,t.timescale;const r=new Uint8Array(i.byteLength+2);r.set([175,1],0),r.set(i,2),this._doDecodeByFmp4(r,Ne,s,!1,0),this.mp4Box.releaseUsedSamples(e,t.number)}}else this.player.debug.warn(this.TAG_NAME,"onSamples() trackId error",e)}getSeqHeader(e){const t=this.mp4Box.getTrackById(e.id);for(const e of t.mdia.minf.stbl.stsd.entries)if(e.avcC||e.hvcC){const t=new Vd.DataStream(void 0,0,Vd.DataStream.BIG_ENDIAN);let i=[];e.avcC?(e.avcC.write(t),i=[23,0,0,0,0]):(this.isHevc=!0,e.hvcC.write(t),i=[28,0,0,0,0]);const s=new Uint8Array(t.buffer,8),r=new Uint8Array(i.length+s.length);return r.set(i,0),r.set(s,i.length),r}return null}dispatch(e){let t=new Uint8Array(e);this.transportDescarmber&&(t=this.transportDescarmber.transport(t)),t.buffer.fileStart=this.offset,this.offset+=t.byteLength,this.mp4Box.appendBuffer(t.buffer)}downloadFmp4File(){const e=new Blob(this.tempFmp4List,{type:'video/mp4; codecs="avc1.640028,mp4a.40.2"'}),t=URL.createObjectURL(e),i=document.createElement("a");i.href=t,i.download=aa()+".fmp4",i.click(),URL.revokeObjectURL(t)}getInputByteLength(){let e=0;return this.mp4Box&&(e=this.mp4Box.getAllocatedSampleDataSize()),e}}class Kd extends Dd{constructor(e){super(e),zd(this,"LOG_NAME","Mpeg4Loader"),this.player=e,this.player.debug.log(this.LOG_NAME,"init")}destroy(){super.destroy(),this.player.debug.log(this.LOG_NAME,"destroy")}}function Yd(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if((t=t.filter(Boolean)).length<2)return t[0];const s=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let r=0;return t.forEach((e=>{s.set(e,r),r+=e.byteLength})),s}const Qd=3,Xd=4,Zd=6,eh=15,th=17,ih=129,sh=135,rh=21,ah=134,oh=27,nh=36;class lh{constructor(){this.slices=[],this.total_length=0,this.expected_length=0,this.random_access_indicator=0}}class dh{constructor(){this.pid=null,this.data=null,this.stream_type=null,this.random_access_indicator=null}}class hh{constructor(){this.pid=null,this.stream_id=null,this.len=null,this.data=null,this.pts=null,this.nearest_pts=null,this.dts=null}}const ch=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];class uh{constructor(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}isComplete(){let e=!1===this.hasAudio||!0===this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,t=!1===this.hasVideo||!0===this.hasVideo&&null!=this.videoCodec&&null!=this.width&&null!=this.height&&null!=this.fps&&null!=this.profile&&null!=this.level&&null!=this.refFrames&&null!=this.chromaFormat&&null!=this.sarNum&&null!=this.sarDen;return null!=this.mimeType&&e&&t}isSeekable(){return!0===this.hasKeyframesIndex}getNearestKeyframe(e){if(null==this.keyframesIndex)return null;let t=this.keyframesIndex,i=this._search(t.times,e);return{index:i,milliseconds:t.times[i],fileposition:t.filepositions[i]}}_search(e,t){let i=0,s=e.length-1,r=0,a=0,o=s;for(t<e[0]&&(i=0,a=o+1);a<=o;){if(r=a+Math.floor((o-a)/2),r===s||t>=e[r]&&t<e[r+1]){i=r;break}e[r]<t?a=r+1:o=r-1}return i}}class ph{constructor(e){let t=null,i=e.audio_object_type,s=e.audio_object_type,r=e.sampling_freq_index,a=e.channel_config,o=0,n=navigator.userAgent.toLowerCase();-1!==n.indexOf("firefox")?r>=6?(s=5,t=new Array(4),o=r-3):(s=2,t=new Array(2),o=r):-1!==n.indexOf("android")?(s=2,t=new Array(2),o=r):(s=5,o=r,t=new Array(4),r>=6?o=r-3:1===a&&(s=2,t=new Array(2),o=r)),t[0]=s<<3,t[0]|=(15&r)>>>1,t[1]=(15&r)<<7,t[1]|=(15&a)<<3,5===s&&(t[1]|=(15&o)>>>1,t[2]=(1&o)<<7,t[2]|=8,t[3]=0),this.config=t,this.sampling_rate=ch[r],this.sampling_index=r,this.channel_count=a,this.object_type=s,this.original_object_type=i,this.codec_mimetype="mp4a.40."+s,this.original_codec_mimetype="mp4a.40."+i}}class fh extends Dd{constructor(e){super(e),this.player=e,this.TAG_NAME="TsLoaderV2",this.first_parse_=!0,this.tsPacketSize=0,this.syncOffset=0,this.pmt_=null,this.config_=null,this.media_info_=new uh,this.timescale_=90,this.duration_=0,this.pat_={version_number:0,network_pid:0,program_map_pid:{}},this.current_program_=null,this.current_pmt_pid_=-1,this.program_pmt_map_={},this.pes_slice_queues_={},this.section_slice_queues_={},this.video_metadata_={vps:null,sps:null,pps:null,details:null},this.audio_metadata_={codec:null,audio_object_type:null,sampling_freq_index:null,sampling_frequency:null,channel_config:null},this.last_pcr_=null,this.audio_last_sample_pts_=void 0,this.aac_last_incomplete_data_=null,this.has_video_=!1,this.has_audio_=!1,this.video_init_segment_dispatched_=!1,this.audio_init_segment_dispatched_=!1,this.video_metadata_changed_=!1,this.audio_metadata_changed_=!1,this.loas_previous_frame=null,this.video_track_={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this.audio_track_={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._remainingPacketData=null,this.player.debug.log(this.TAG_NAME,"init")}destroy(){this.media_info_=null,this.pes_slice_queues_=null,this.section_slice_queues_=null,this.video_metadata_=null,this.audio_metadata_=null,this.aac_last_incomplete_data_=null,this.video_track_=null,this.audio_track_=null,this._remainingPacketData=null,super.destroy()}probe(e){let t=new Uint8Array(e),i=-1,s=188;if(t.byteLength<=3*s)return{needMoreData:!0};for(;-1===i;){let e=Math.min(1e3,t.byteLength-3*s);for(let r=0;r<e;){if(71===t[r]&&71===t[r+s]&&71===t[r+2*s]){i=r;break}r++}if(-1===i)if(188===s)s=192;else{if(192!==s)break;s=204}}return-1===i?{match:!1}:(192===s&&i>=4&&(i-=4),{match:!0,consumed:0,ts_packet_size:s,sync_offset:i})}_initPmt(){return{program_number:0,version_number:0,pcr_pid:0,pid_stream_type:{},common_pids:{h264:void 0,h265:void 0,adts_aac:void 0,loas_aac:void 0,opus:void 0,ac3:void 0,eac3:void 0,mp3:void 0},pes_private_data_pids:{},timed_id3_pids:{},synchronous_klv_pids:{},asynchronous_klv_pids:{},scte_35_pids:{},smpte2038_pids:{}}}dispatch(e){let t=new Uint8Array(e);this._remainingPacketData&&(t=Yd(this._remainingPacketData,t),this._remainingPacketData=null);let i=t.buffer;const s=this.parseChunks(i);s?this._remainingPacketData=t.subarray(s):t.length<this.tsPacketSize&&(this._remainingPacketData=t)}parseChunks(e){let t=0;if(this.first_parse_){this.first_parse_=!1;const i=this.probe(e);i.match&&(this.tsPacketSize=i.ts_packet_size,this.syncOffset=i.sync_offset),t=this.syncOffset,this.player.debug.log(this.TAG_NAME,`isFirstDispatch and tsPacketSize = ${this.tsPacketSize}, syncOffset = ${this.syncOffset}`)}for(;t+this.tsPacketSize<=e.byteLength;){192===this.tsPacketSize&&(t+=4);const i=new Uint8Array(e,t,188);let s=i[0];if(71!==s){this.player.debug.warn(this.TAG_NAME,`parseChunks() sync_byte = ${s}, not start with 0x47, so break`);break}let r=(64&i[1])>>>6;i[1];let a=(31&i[1])<<8|i[2],o=(48&i[3])>>>4,n=15&i[3],l=!(!this.pmt_||this.pmt_.pcr_pid!==a),d={},h=4;if(2==o||3==o){let e=i[4];if(e>0&&(l||3==o)){if(d.discontinuity_indicator=(128&i[5])>>>7,d.random_access_indicator=(64&i[5])>>>6,d.elementary_stream_priority_indicator=(32&i[5])>>>5,(16&i[5])>>>4){let e=300*(i[6]<<25|i[7]<<17|i[8]<<9|i[9]<<1|i[10]>>>7)+((1&i[10])<<8|i[11]);this.last_pcr_=e}}if(2==o||5+e===188){t+=188,204===this.tsPacketSize&&(t+=16);continue}h=5+e}if(1==o||3==o)if(0===a||a===this.current_pmt_pid_||null!=this.pmt_&&this.pmt_.pid_stream_type[a]===ah){let i=188-h;this.handleSectionSlice(e,t+h,i,{pid:a,payload_unit_start_indicator:r,continuity_conunter:n,random_access_indicator:d.random_access_indicator})}else if(null!=this.pmt_&&null!=this.pmt_.pid_stream_type[a]){let i=188-h,s=this.pmt_.pid_stream_type[a];a!==this.pmt_.common_pids.h264&&a!==this.pmt_.common_pids.h265&&a!==this.pmt_.common_pids.adts_aac&&a!==this.pmt_.common_pids.loas_aac&&a!==this.pmt_.common_pids.ac3&&a!==this.pmt_.common_pids.eac3&&a!==this.pmt_.common_pids.opus&&a!==this.pmt_.common_pids.mp3&&!0!==this.pmt_.pes_private_data_pids[a]&&!0!==this.pmt_.timed_id3_pids[a]&&!0!==this.pmt_.synchronous_klv_pids[a]&&!0!==this.pmt_.asynchronous_klv_pids[a]||this.handlePESSlice(e,t+h,i,{pid:a,stream_type:s,payload_unit_start_indicator:r,continuity_conunter:n,random_access_indicator:d.random_access_indicator})}t+=188,204===this.tsPacketSize&&(t+=16)}return this.dispatchAudioVideoMediaSegment(),t}handleSectionSlice(e,t,i,s){let r=new Uint8Array(e,t,i),a=this.section_slice_queues_[s.pid];if(s.payload_unit_start_indicator){let o=r[0];if(null!=a&&0!==a.total_length){let r=new Uint8Array(e,t+1,Math.min(i,o));a.slices.push(r),a.total_length+=r.byteLength,a.total_length===a.expected_length?this.emitSectionSlices(a,s):this.clearSlices(a,s)}for(let n=1+o;n<r.byteLength;){if(255===r[n+0])break;let o=(15&r[n+1])<<8|r[n+2];this.section_slice_queues_[s.pid]=new lh,a=this.section_slice_queues_[s.pid],a.expected_length=o+3,a.random_access_indicator=s.random_access_indicator;let l=new Uint8Array(e,t+n,Math.min(i-n,a.expected_length-a.total_length));a.slices.push(l),a.total_length+=l.byteLength,a.total_length===a.expected_length?this.emitSectionSlices(a,s):a.total_length>=a.expected_length&&this.clearSlices(a,s),n+=l.byteLength}}else if(null!=a&&0!==a.total_length){let r=new Uint8Array(e,t,Math.min(i,a.expected_length-a.total_length));a.slices.push(r),a.total_length+=r.byteLength,a.total_length===a.expected_length?this.emitSectionSlices(a,s):a.total_length>=a.expected_length&&this.clearSlices(a,s)}}handlePESSlice(e,t,i,s){let r=new Uint8Array(e,t,i),a=r[0]<<16|r[1]<<8|r[2];r[3];let o=r[4]<<8|r[5];if(s.payload_unit_start_indicator){if(1!==a)return void this.player.debug.warn(this.TAG_NAME,`handlePESSlice: packet_start_code_prefix should be 1 but with value ${a}`);let e=this.pes_slice_queues_[s.pid];e&&(0===e.expected_length||e.expected_length===e.total_length?this.emitPESSlices(e,s):this.clearSlices(e,s)),this.pes_slice_queues_[s.pid]=new lh,this.pes_slice_queues_[s.pid].random_access_indicator=s.random_access_indicator}if(null==this.pes_slice_queues_[s.pid])return;let n=this.pes_slice_queues_[s.pid];n.slices.push(r),s.payload_unit_start_indicator&&(n.expected_length=0===o?0:o+6),n.total_length+=r.byteLength,n.expected_length>0&&n.expected_length===n.total_length?this.emitPESSlices(n,s):n.expected_length>0&&n.expected_length<n.total_length&&this.clearSlices(n,s)}emitSectionSlices(e,t){let i=new Uint8Array(e.total_length);for(let t=0,s=0;t<e.slices.length;t++){let r=e.slices[t];i.set(r,s),s+=r.byteLength}e.slices=[],e.expected_length=-1,e.total_length=0;let s={};s.pid=t.pid,s.data=i,s.file_position=e.file_position,s.random_access_indicator=e.random_access_indicator,this.parseSection(s)}emitPESSlices(e,t){let i=new Uint8Array(e.total_length);for(let t=0,s=0;t<e.slices.length;t++){let r=e.slices[t];i.set(r,s),s+=r.byteLength}e.slices=[],e.expected_length=-1,e.total_length=0;let s=new dh;s.pid=t.pid,s.data=i,s.stream_type=t.stream_type,s.random_access_indicator=e.random_access_indicator,this.parsePES(s)}clearSlices(e){e.slices=[],e.expected_length=-1,e.total_length=0}parseSection(e){let t=e.data,i=e.pid;0===i?this.parsePAT(t):i===this.current_pmt_pid_?this.parsePMT(t):null!=this.pmt_&&this.pmt_.scte_35_pids[i]&&this.parseSCTE35(t)}parsePES(e){let t=e.data,i=t[0]<<16|t[1]<<8|t[2],s=t[3],r=t[4]<<8|t[5];if(1===i){if(188!==s&&190!==s&&191!==s&&240!==s&&241!==s&&255!==s&&242!==s&&248!==s){t[6];let i,a,o=(192&t[7])>>>6,n=t[8];2!==o&&3!==o||(i=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,a=3===o?536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2:i);let l,d=9+n;if(0!==r){if(r<3+n)return void this.player.debug.warn(this.TAG_NAME,"Malformed PES: PES_packet_length < 3 + PES_header_data_length");l=r-3-n}else l=t.byteLength-d;let h=t.subarray(d,d+l);switch(e.stream_type){case Qd:case Xd:this.parseMP3Payload(h,i);break;case Zd:this.pmt_.common_pids.opus===e.pid?this.parseOpusPayload(h,i):this.pmt_.common_pids.ac3===e.pid?this.parseAC3Payload(h,i):this.pmt_.common_pids.eac3===e.pid?this.parseEAC3Payload(h,i):this.pmt_.asynchronous_klv_pids[e.pid]?this.parseAsynchronousKLVMetadataPayload(h,e.pid,s):this.pmt_.smpte2038_pids[e.pid]?this.parseSMPTE2038MetadataPayload(h,i,a,e.pid,s):this.parsePESPrivateDataPayload(h,i,a,e.pid,s);break;case eh:this.parseADTSAACPayload(h,i);break;case th:this.parseLOASAACPayload(h,i);break;case ih:this.parseAC3Payload(h,i);break;case sh:this.parseEAC3Payload(h,i);break;case rh:this.pmt_.timed_id3_pids[e.pid]?this.parseTimedID3MetadataPayload(h,i,a,e.pid,s):this.pmt_.synchronous_klv_pids[e.pid]&&this.parseSynchronousKLVMetadataPayload(h,i,a,e.pid,s);break;case oh:this.parseH264Payload(h,i,a,e.random_access_indicator);break;case nh:this.parseH265Payload(h,i,a,e.random_access_indicator)}}else if((188===s||191===s||240===s||241===s||255===s||242===s||248===s)&&e.stream_type===Zd){let i,a=6;i=0!==r?r:t.byteLength-a;let o=t.subarray(a,a+i);this.parsePESPrivateDataPayload(o,void 0,void 0,e.pid,s)}}else this.player.debug.error(this.TAG_NAME,`parsePES: packet_start_code_prefix should be 1 but with value ${i}`)}parsePAT(e){let t=e[0];if(0!==t)return void Log.e(this.TAG,`parsePAT: table_id ${t} is not corresponded to PAT!`);let i=(15&e[1])<<8|e[2];e[3],e[4];let s=(62&e[5])>>>1,r=1&e[5],a=e[6];e[7];let o=null;if(1===r&&0===a)o={version_number:0,network_pid:0,program_pmt_pid:{}},o.version_number=s;else if(o=this.pat_,null==o)return;let n=i-5-4,l=-1,d=-1;for(let t=8;t<8+n;t+=4){let i=e[t]<<8|e[t+1],s=(31&e[t+2])<<8|e[t+3];0===i?o.network_pid=s:(o.program_pmt_pid[i]=s,-1===l&&(l=i),-1===d&&(d=s))}1===r&&0===a&&(null==this.pat_&&this.player.debug.log(this.TAG_NAME,`Parsed first PAT: ${JSON.stringify(o)}`),this.pat_=o,this.current_program_=l,this.current_pmt_pid_=d)}parsePMT(e){let t=e[0];if(2!==t)return void this.player.debug.error(this.TAG_NAME,`parsePMT: table_id ${t} is not corresponded to PMT!`);let i,s=(15&e[1])<<8|e[2],r=e[3]<<8|e[4],a=(62&e[5])>>>1,o=1&e[5],n=e[6];if(e[7],1===o&&0===n)i=this._initPmt(),i.program_number=r,i.version_number=a,this.program_pmt_map_[r]=i;else if(i=this.program_pmt_map_[r],null==i)return;i.pcr_pid=(31&e[8])<<8|e[9];let l=(15&e[10])<<8|e[11],d=12+l,h=s-9-l-4;for(let t=d;t<d+h;){let s=e[t],r=(31&e[t+1])<<8|e[t+2],a=(15&e[t+3])<<8|e[t+4];i.pid_stream_type[r]=s;let o=i.common_pids.h264||i.common_pids.h265,n=i.common_pids.adts_aac||i.common_pids.loas_aac||i.common_pids.ac3||i.common_pids.eac3||i.common_pids.opus||i.common_pids.mp3;if(s!==oh||o)if(s!==nh||o)if(s!==eh||n)if(s!==th||n)if(s!==ih||n)if(s!==sh||n)if(s!==Qd&&s!==Xd||n)if(s===Zd){if(i.pes_private_data_pids[r]=!0,a>0){for(let s=t+5;s<t+5+a;){let t=e[s+0],a=e[s+1];if(5===t){let t=String.fromCharCode(...Array.from(e.subarray(s+2,s+2+a)));"VANC"===t?i.smpte2038_pids[r]=!0:"Opus"===t?i.common_pids.opus=r:"KLVA"===t&&(i.asynchronous_klv_pids[r]=!0)}else if(127===t&&r===i.common_pids.opus){let t=null;if(128===e[s+2]&&(t=e[s+3]),null==t){Log.e(this.TAG,"Not Supported Opus channel count.");continue}const i={codec:"opus",channel_count:0==(15&t)?2:15&t,channel_config_code:t,sample_rate:48e3},r={codec:"opus",meta:i};0==this.audio_init_segment_dispatched_?(this.audio_metadata_=i,this.dispatchAudioInitSegment(r)):this.detectAudioMetadataChange(r)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(r))}s+=2+a}let o=e.subarray(t+5,t+5+a);this.dispatchPESPrivateDataDescriptor(r,s,o)}}else if(s===rh){if(a>0)for(let s=t+5;s<t+5+a;){let t=e[s+0],a=e[s+1];if(38===t){let t=e[s+2]<<8|e[s+3]<<0,a=null;65535===t&&(a=String.fromCharCode(...Array.from(e.subarray(s+4,s+4+4))));let o=null;if(255===e[s+4+(65535===t?4:0)]){let i=4+(65535===t?4:0)+1;o=String.fromCharCode(...Array.from(e.subarray(s+i,s+i+4)))}"ID3 "===a&&"ID3 "===o?i.timed_id3_pids[r]=!0:"KLVA"===o&&(i.synchronous_klv_pids[r]=!0)}s+=2+a}}else s===ah&&(i.scte_35_pids[r]=!0);else i.common_pids.mp3=r;else i.common_pids.eac3=r;else i.common_pids.ac3=r;else i.common_pids.loas_aac=r;else i.common_pids.adts_aac=r;else i.common_pids.h265=r;else i.common_pids.h264=r;t+=5+a}r===this.current_program_&&(null==this.pmt_&&this.player.debug.log(this.TAG_NAME,`Parsed first PMT: ${JSON.stringify(i)}`),this.pmt_=i,(i.common_pids.h264||i.common_pids.h265)&&(this.has_video_=!0),(i.common_pids.adts_aac||i.common_pids.loas_aac||i.common_pids.ac3||i.common_pids.opus||i.common_pids.mp3)&&(this.has_audio_=!0))}parseSCTE35(e){}parseH264Payload(e,t,i,s){let r=new Ln(e),a=null,o=null,n=[],l=0,d=!1;for(;null!=(a=r.readNextNaluPayload());){let e=new Pn(a);if(e.type===It){let t=Sn.parseSPS$2(a.data);this.video_init_segment_dispatched_?!0===this.detectVideoMetadataChange(e,t)&&(this.player.debug.log(this.TAG_NAME,"H264: Critical h264 metadata has been changed, attempt to re-generate InitSegment"),this.video_metadata_changed_=!0,this.video_metadata_={vps:void 0,sps:e,pps:void 0,details:t}):(this.video_metadata_.sps=e,this.video_metadata_.details=t)}else e.type===Mt?this.video_init_segment_dispatched_&&!this.video_metadata_changed_||(this.video_metadata_.pps=e,this.video_metadata_.sps&&this.video_metadata_.pps&&(this.video_metadata_changed_&&this.dispatchVideoMediaSegment(),this.dispatchVideoInitSegment())):(e.type===Pt||e.type===Lt&&1===s)&&(d=!0);this.video_init_segment_dispatched_&&(n.push(e),l+=e.data.byteLength)}let h=Math.floor(t/this.timescale_),c=Math.floor(i/this.timescale_);if(n.length){let e=this.video_track_;for(let e=0;e<n.length;e++){let t=n[e];if(null==o)o=t.data;else{let e=new Uint8Array(o.byteLength+t.data.byteLength);e.set(o,0),e.set(t.data,o.byteLength),o=e}}let t={length:l,isIFrame:d,dts:c,pts:h,cts:h-c,payload:o,type:je,isHevc:!1};e.samples.push(t),e.length=o.byteLength}}parseH265Payload(e,t,i,s){let r=new Vn(e),a=null,o=null,n=[],l=0,d=!1;for(;null!=(a=r.readNextNaluPayload());){let e=new $n(a);if(e.type===zt){if(!this.video_init_segment_dispatched_){let t=Mn.parseVPS(a.data);this.video_metadata_.vps=e,this.video_metadata_.details={...this.video_metadata_.details,...t}}}else if(e.type===Ht){let t=Mn.parseSPS(a.data);this.video_init_segment_dispatched_?!0===this.detectVideoMetadataChange(e,t)&&(this.player.debug.log(this.TAG_NAME,"H265: Critical h265 metadata has been changed, attempt to re-generate InitSegment"),this.video_metadata_changed_=!0,this.video_metadata_={vps:void 0,sps:e,pps:void 0,details:t}):(this.video_metadata_.sps=e,this.video_metadata_.details={...this.video_metadata_.details,...t})}else if(e.type===$t){if(!this.video_init_segment_dispatched_||this.video_metadata_changed_){let t=Mn.parsePPS(a.data);this.video_metadata_.pps=e,this.video_metadata_.details={...this.video_metadata_.details,...t},this.video_metadata_.vps&&this.video_metadata_.sps&&this.video_metadata_.pps&&(this.video_metadata_changed_&&this.dispatchVideoMediaSegment(),this.dispatchVideoInitSegment())}}else e.type!==Ft&&e.type!==Ot&&e.type!==Nt||(d=!0);this.video_init_segment_dispatched_&&(n.push(e),l+=e.data.byteLength)}let h=Math.floor(t/this.timescale_),c=Math.floor(i/this.timescale_);if(n.length){let e=this.video_track_;for(let e=0;e<n.length;e++){let t=n[e];if(null==o)o=t.data;else{let e=new Uint8Array(o.byteLength+t.data.byteLength);e.set(o,0),e.set(t.data,o.byteLength),o=e}}let t={type:je,length:l,isIFrame:d,dts:c,pts:h,cts:h-c,payload:o,isHevc:!0};e.samples.push(t),e.length=o.byteLength}}detectVideoMetadataChange(e,t){if(t.codec_mimetype!==this.video_metadata_.details.codec_mimetype)return this.player.debug.log(this.TAG_NAME,`Video: Codec mimeType changed from ${this.video_metadata_.details.codec_mimetype} to ${t.codec_mimetype}`),!0;if(t.codec_size.width!==this.video_metadata_.details.codec_size.width||t.codec_size.height!==this.video_metadata_.details.codec_size.height){let e=this.video_metadata_.details.codec_size,i=t.codec_size;return this.player.debug.log(this.TAG_NAME,`Video: Coded Resolution changed from ${e.width}x${e.height} to ${i.width}x${i.height}`),!0}return t.present_size.width!==this.video_metadata_.details.present_size.width&&(this.player.debug.log(this.TAG_NAME,`Video: Present resolution width changed from ${this.video_metadata_.details.present_size.width} to ${t.present_size.width}`),!0)}isInitSegmentDispatched(){return this.has_video_&&this.has_audio_?this.video_init_segment_dispatched_&&this.audio_init_segment_dispatched_:this.has_video_&&!this.has_audio_?this.video_init_segment_dispatched_:!(this.has_video_||!this.has_audio_)&&this.audio_init_segment_dispatched_}dispatchVideoInitSegment(){let e=this.video_metadata_.details,t={type:"video"};t.id=this.video_track_.id,t.timescale=1e3,t.duration=this.duration_,t.codecWidth=e.codec_size.width,t.codecHeight=e.codec_size.height,t.presentWidth=e.present_size.width,t.presentHeight=e.present_size.height,t.profile=e.profile_string,t.level=e.level_string,t.bitDepth=e.bit_depth,t.chromaFormat=e.chroma_format,t.sarRatio=e.sar_ratio,t.frameRate=e.frame_rate;let i=t.frameRate.fps_den,s=t.frameRate.fps_num;t.refSampleDuration=i/s*1e3,t.codec=e.codec_mimetype;let r=!1;if(this.video_metadata_.vps){r=!0;let e=this.video_metadata_.vps.data.subarray(4),i=this.video_metadata_.sps.data.subarray(4),s=this.video_metadata_.pps.data.subarray(4);t.hvcc=Nn({vps:e,sps:i,pps:s}),0==this.video_init_segment_dispatched_&&this.player.debug.log(this.TAG_NAME,`Generated first HEVCDecoderConfigurationRecord for mimeType: ${t.codec}`),t.hvcc&&this._doDecodeByTs(t.hvcc,je,0,!0,0)}else{let e=this.video_metadata_.sps.data.subarray(4),i=this.video_metadata_.pps.data.subarray(4);t.avcc=Tn({sps:e,pps:i}),0==this.video_init_segment_dispatched_&&this.player.debug.log(this.TAG_NAME,`Generated first AVCDecoderConfigurationRecord for mimeType: ${t.codec}`),t.avcc&&this._doDecodeByTs(t.avcc,je,0,!0,0)}this.video_init_segment_dispatched_=!0,this.video_metadata_changed_=!1;let a=this.media_info_;a.hasVideo=!0,a.width=t.codecWidth,a.height=t.codecHeight,a.fps=t.frameRate.fps,a.profile=t.profile,a.level=t.level,a.refFrames=e.ref_frames,a.chromaFormat=e.chroma_format_string,a.sarNum=t.sarRatio.width,a.sarDen=t.sarRatio.height,a.videoCodec=t.codec,a.hasAudio&&a.audioCodec?a.mimeType=`video/mp2t; codecs="${a.videoCodec},${a.audioCodec}"`:a.mimeType=`video/mp2t; codecs="${a.videoCodec}"`,this.player.video.updateVideoInfo({width:t.codecWidth,height:t.codecHeight,encTypeCode:r?_t:vt})}dispatchVideoMediaSegment(){this.isInitSegmentDispatched()&&this.video_track_.length&&this._preDoDecode()}dispatchAudioMediaSegment(){this.isInitSegmentDispatched()&&this.audio_track_.length&&this._preDoDecode()}dispatchAudioVideoMediaSegment(){this.isInitSegmentDispatched()&&(this.audio_track_.length||this.video_track_.length)&&this._preDoDecode()}parseADTSAACPayload(e,t){if(this.has_video_&&!this.video_init_segment_dispatched_)return;if(this.aac_last_incomplete_data_){let t=new Uint8Array(e.byteLength+this.aac_last_incomplete_data_.byteLength);t.set(this.aac_last_incomplete_data_,0),t.set(e,this.aac_last_incomplete_data_.byteLength),e=t}let i,s;if(null!=t&&(s=t/this.timescale_),"aac"===this.audio_metadata_.codec){if(null==t&&null!=this.audio_last_sample_pts_)i=1024/this.audio_metadata_.sampling_frequency*1e3,s=this.audio_last_sample_pts_+i;else if(null==t)return void this.player.debug.warn(this.TAG_NAME,"AAC: Unknown pts");if(this.aac_last_incomplete_data_&&this.audio_last_sample_pts_){i=1024/this.audio_metadata_.sampling_frequency*1e3;let e=this.audio_last_sample_pts_+i;Math.abs(e-s)>1&&(this.player.debug.warn(this.TAG_NAME,`AAC: Detected pts overlapped, expected: ${e}ms, PES pts: ${s}ms`),s=e)}}let r,a=new Qr(e),o=null,n=s;for(;null!=(o=a.readNextAACFrame());){i=1024/o.sampling_frequency*1e3;const e={codec:"aac",data:o};0==this.audio_init_segment_dispatched_?(this.audio_metadata_={codec:"aac",audio_object_type:o.audio_object_type,sampling_freq_index:o.sampling_freq_index,sampling_frequency:o.sampling_frequency,channel_config:o.channel_config},this.dispatchAudioInitSegment(e)):this.detectAudioMetadataChange(e)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(e)),r=n;let t=Math.floor(n);const s=new Uint8Array(o.data.length+2);s.set([175,1],0),s.set(o.data,2);let a={payload:s,length:s.byteLength,pts:t,dts:t,type:Ne};this.audio_track_.samples.push(a),this.audio_track_.length+=s.byteLength,n+=i}a.hasIncompleteData()&&(this.aac_last_incomplete_data_=a.getIncompleteData()),r&&(this.audio_last_sample_pts_=r)}parseLOASAACPayload(e,t){if(this.has_video_&&!this.video_init_segment_dispatched_)return;if(this.aac_last_incomplete_data_){let t=new Uint8Array(e.byteLength+this.aac_last_incomplete_data_.byteLength);t.set(this.aac_last_incomplete_data_,0),t.set(e,this.aac_last_incomplete_data_.byteLength),e=t}let i,s;if(null!=t&&(s=t/this.timescale_),"aac"===this.audio_metadata_.codec){if(null==t&&null!=this.audio_last_sample_pts_)i=1024/this.audio_metadata_.sampling_frequency*1e3,s=this.audio_last_sample_pts_+i;else if(null==t)return void this.player.debug.warn(this.TAG_NAME,"AAC: Unknown pts");if(this.aac_last_incomplete_data_&&this.audio_last_sample_pts_){i=1024/this.audio_metadata_.sampling_frequency*1e3;let e=this.audio_last_sample_pts_+i;Math.abs(e-s)>1&&(this.player.debug.warn(this.TAG,`AAC: Detected pts overlapped, expected: ${e}ms, PES pts: ${s}ms`),s=e)}}let r,a=new Xr(e),o=null,n=s;for(;null!=(o=a.readNextAACFrame(La(this.loas_previous_frame)?void 0:this.loas_previous_frame));){this.loas_previous_frame=o,i=1024/o.sampling_frequency*1e3;const e={codec:"aac",data:o};0==this.audio_init_segment_dispatched_?(this.audio_metadata_={codec:"aac",audio_object_type:o.audio_object_type,sampling_freq_index:o.sampling_freq_index,sampling_frequency:o.sampling_frequency,channel_config:o.channel_config},this.dispatchAudioInitSegment(e)):this.detectAudioMetadataChange(e)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(e)),r=n;let t=Math.floor(n);const s=new Uint8Array(o.data.length+2);s.set([175,1],0),s.set(o.data,2);let a={payload:s,length:s.byteLength,pts:t,dts:t,type:Ne};this.audio_track_.samples.push(a),this.audio_track_.length+=s.byteLength,n+=i}a.hasIncompleteData()&&(this.aac_last_incomplete_data_=a.getIncompleteData()),r&&(this.audio_last_sample_pts_=r)}parseAC3Payload(e,t){}parseEAC3Payload(e,t){}parseOpusPayload(e,t){}parseMP3Payload(e,t){if(this.has_video_&&!this.video_init_segment_dispatched_)return;let i=[44100,48e3,32e3,0],s=[22050,24e3,16e3,0],r=[11025,12e3,8e3,0],a=e[1]>>>3&3,o=(6&e[1])>>1;e[2];let n=(12&e[2])>>>2,l=3!==(e[3]>>>6&3)?2:1,d=0,h=34;switch(a){case 0:d=r[n];break;case 2:d=s[n];break;case 3:d=i[n]}switch(o){case 1:h=34;break;case 2:h=33;break;case 3:h=32}const c={};c.object_type=h,c.sample_rate=d,c.channel_count=l,c.data=e;const u={codec:"mp3",data:c};0==this.audio_init_segment_dispatched_?(this.audio_metadata_={codec:"mp3",object_type:h,sample_rate:d,channel_count:l},this.dispatchAudioInitSegment(u)):this.detectAudioMetadataChange(u)&&(this.dispatchAudioMediaSegment(),this.dispatchAudioInitSegment(u));let p={payload:e,length:e.byteLength,pts:t/this.timescale_,dts:t/this.timescale_,type:Ne};this.audio_track_.samples.push(p),this.audio_track_.length+=e.byteLength}detectAudioMetadataChange(e){if(e.codec!==this.audio_metadata_.codec)return this.player.debug.log(this.TAG_NAME,`Audio: Audio Codecs changed from ${this.audio_metadata_.codec} to ${e.codec}`),!0;if("aac"===e.codec&&"aac"===this.audio_metadata_.codec){const t=e.data;if(t.audio_object_type!==this.audio_metadata_.audio_object_type)return this.player.debug.log(this.TAG_NAME,`AAC: AudioObjectType changed from ${this.audio_metadata_.audio_object_type} to ${t.audio_object_type}`),!0;if(t.sampling_freq_index!==this.audio_metadata_.sampling_freq_index)return this.player.debug.log(this.TAG_NAME,`AAC: SamplingFrequencyIndex changed from ${this.audio_metadata_.sampling_freq_index} to ${t.sampling_freq_index}`),!0;if(t.channel_config!==this.audio_metadata_.channel_config)return this.player.debug.log(this.TAG_NAME,`AAC: Channel configuration changed from ${this.audio_metadata_.channel_config} to ${t.channel_config}`),!0}else if("ac-3"===e.codec&&"ac-3"===this.audio_metadata_.codec){const t=e.data;if(t.sampling_frequency!==this.audio_metadata_.sampling_frequency)return this.player.debug.log(this.TAG_NAME,`AC3: Sampling Frequency changed from ${this.audio_metadata_.sampling_frequency} to ${t.sampling_frequency}`),!0;if(t.bit_stream_identification!==this.audio_metadata_.bit_stream_identification)return this.player.debug.log(this.TAG_NAME,`AC3: Bit Stream Identification changed from ${this.audio_metadata_.bit_stream_identification} to ${t.bit_stream_identification}`),!0;if(t.bit_stream_mode!==this.audio_metadata_.bit_stream_mode)return this.player.debug.log(this.TAG_NAME,`AC3: BitStream Mode changed from ${this.audio_metadata_.bit_stream_mode} to ${t.bit_stream_mode}`),!0;if(t.channel_mode!==this.audio_metadata_.channel_mode)return this.player.debug.log(this.TAG_NAME,`AC3: Channel Mode changed from ${this.audio_metadata_.channel_mode} to ${t.channel_mode}`),!0;if(t.low_frequency_effects_channel_on!==this.audio_metadata_.low_frequency_effects_channel_on)return this.player.debug.log(this.TAG_NAME,`AC3: Low Frequency Effects Channel On changed from ${this.audio_metadata_.low_frequency_effects_channel_on} to ${t.low_frequency_effects_channel_on}`),!0}else if("opus"===e.codec&&"opus"===this.audio_metadata_.codec){const t=e.meta;if(t.sample_rate!==this.audio_metadata_.sample_rate)return this.player.debug.log(this.TAG_NAME,`Opus: SamplingFrequencyIndex changed from ${this.audio_metadata_.sample_rate} to ${t.sample_rate}`),!0;if(t.channel_count!==this.audio_metadata_.channel_count)return this.player.debug.log(this.TAG_NAME,`Opus: Channel count changed from ${this.audio_metadata_.channel_count} to ${t.channel_count}`),!0}else if("mp3"===e.codec&&"mp3"===this.audio_metadata_.codec){const t=e.data;if(t.object_type!==this.audio_metadata_.object_type)return this.player.debug.log(this.TAG_NAME,`MP3: AudioObjectType changed from ${this.audio_metadata_.object_type} to ${t.object_type}`),!0;if(t.sample_rate!==this.audio_metadata_.sample_rate)return this.player.debug.log(this.TAG_NAME,`MP3: SamplingFrequencyIndex changed from ${this.audio_metadata_.sample_rate} to ${t.sample_rate}`),!0;if(t.channel_count!==this.audio_metadata_.channel_count)return this.player.debug.log(this.TAG_NAME,`MP3: Channel count changed from ${this.audio_metadata_.channel_count} to ${t.channel_count}`),!0}return!1}dispatchAudioInitSegment(e){let t={type:"audio"};t.id=this.audio_track_.id,t.timescale=1e3,t.duration=this.duration_;let i="";if("aac"===this.audio_metadata_.codec){let s="aac"===e.codec?e.data:null,r=new ph(s);t.audioSampleRate=r.sampling_rate,t.audioSampleRateIndex=r.sampling_index,t.channelCount=r.channel_count,t.codec=r.codec_mimetype,t.originalCodec=r.original_codec_mimetype,t.config=r.config,t.refSampleDuration=1024/t.audioSampleRate*t.timescale,i=Et;const a=jr({profile:this.player._opt.mseDecodeAudio?r.object_type:r.original_object_type,sampleRate:t.audioSampleRateIndex,channel:t.channelCount});console.error("aacADTSHeader",`profile: ${r.object_type}, sampleRate: ${t.audioSampleRateIndex}, channel: ${t.channelCount}`),this._doDecodeByTs(a,Ne,0,!1,0)}else"ac-3"===this.audio_metadata_.codec||"ec-3"===this.audio_metadata_.codec||"opus"===this.audio_metadata_.codec||"mp3"===this.audio_metadata_.codec&&(t.audioSampleRate=this.audio_metadata_.sample_rate,t.channelCount=this.audio_metadata_.channel_count,t.codec="mp3",t.originalCodec="mp3",t.config=void 0,i=Tt);0==this.audio_init_segment_dispatched_&&this.player.debug.log(this.TAG_NAME,`Generated first AudioSpecificConfig for mimeType: ${t.codec}`),this.audio_init_segment_dispatched_=!0,this.video_metadata_changed_=!1;let s=this.media_info_;s.hasAudio=!0,s.audioCodec=t.originalCodec,s.audioSampleRate=t.audioSampleRate,s.audioChannelCount=t.channelCount,s.hasVideo&&s.videoCodec?s.mimeType=`video/mp2t; codecs="${s.videoCodec},${s.audioCodec}"`:s.mimeType=`video/mp2t; codecs="${s.audioCodec}"`,i&&this.player.audio.updateAudioInfo({encTypeCode:i,channels:t.channelCount,sampleRate:t.audioSampleRate})}dispatchPESPrivateDataDescriptor(e,t,i){}parsePESPrivateDataPayload(e,t,i,s,r){let a=new hh;if(a.pid=s,a.stream_id=r,a.len=e.byteLength,a.data=e,null!=t){let e=Math.floor(t/this.timescale_);a.pts=e}else a.nearest_pts=this.getNearestTimestampMilliseconds();if(null!=i){let e=Math.floor(i/this.timescale_);a.dts=e}}parseTimedID3MetadataPayload(e,t,i,s,r){this.player.debug.log(this.TAG_NAME,`Timed ID3 Metadata: pid=${s}, pts=${t}, dts=${i}, stream_id=${r}`)}parseSynchronousKLVMetadataPayload(e,t,i,s,r){this.player.debug.log(this.TAG_NAME,`Synchronous KLV Metadata: pid=${s}, pts=${t}, dts=${i}, stream_id=${r}`)}parseAsynchronousKLVMetadataPayload(e,t,i){this.player.debug.log(this.TAG_NAME,`Asynchronous KLV Metadata: pid=${t}, stream_id=${i}`)}parseSMPTE2038MetadataPayload(e,t,i,s,r){this.player.debug.log(this.TAG_NAME,`SMPTE 2038 Metadata: pid=${s}, pts=${t}, dts=${i}, stream_id=${r}`)}getNearestTimestampMilliseconds(){if(null!=this.audio_last_sample_pts_)return Math.floor(this.audio_last_sample_pts_);if(null!=this.last_pcr_){return Math.floor(this.last_pcr_/300/this.timescale_)}}_preDoDecode(){const e=this.video_track_,t=this.audio_track_;let i=e.samples;t.samples.length>0&&(i=e.samples.concat(t.samples),i=i.sort(((e,t)=>e.dts-t.dts))),i.forEach((e=>{const t=new Uint8Array(e.payload);delete e.payload,e.type===je?this._doDecodeVideo({...e,payload:t}):e.type===Ne&&this._doDecodeAudio({...e,payload:t})})),e.samples=[],e.length=0,t.samples=[],t.length=0}_doDecodeVideo(e){const t=new Uint8Array(e.payload);let i=null;i=e.isHevc?jn(t,e.isIFrame):kn(t,e.isIFrame),this.player.updateStats({dts:e.dts,vbps:i.byteLength}),e.isIFrame&&this.calcIframeIntervalTimestamp(e.dts);let s=this.cryptoPayload(i,e.isIFrame);this._doDecodeByTs(s,je,e.dts,e.isIFrame,e.cts)}_doDecodeAudio(e){const t=new Uint8Array(e.payload);this.player.updateStats({abps:t.byteLength});let i=t;uo(this.player._opt.m7sCryptoAudio)&&(i=this.cryptoPayloadAudio(t)),this._doDecodeByTs(i,Ne,e.dts,!1,0)}getInputByteLength(){return this._remainingPacketData&&this._remainingPacketData.byteLength||0}}class mh{constructor(e){return new(mh.getLoaderFactory(e))(e)}static getLoaderFactory(e){const t=e._opt.demuxType;return t===k?Fd:t===T||e.isWebrtcH265()?Ud:t===R?Od:t===D?Gd:t===L?qd:t===P?Kd:t===I?fh:Hd}}class gh extends So{constructor(e){super(),this.player=e,this.TAG_NAME="Webcodecs",this.hasInit=!1,this.isDecodeFirstIIframe=!!po(e._opt.checkFirstIFrame),this.isInitInfo=!1,this.prevTimestamp=null,this.decodeDiffTimestamp=null,this.prevDts=null,this.decoder=null,this.isWidthOrHeightChanged=!1,this.initDecoder(),e.debug.log(this.TAG_NAME,"init")}destroy(){this.decoder&&(po(this.isDecodeStateClosed())&&this.decoder.close(),this.decoder=null),this.prevTimestamp=null,this.decodeDiffTimestamp=null,this.prevDts=null,this.hasInit=!1,this.isInitInfo=!1,this.isDecodeFirstIIframe=!1,this.isWidthOrHeightChanged=!1,this.off(),this.player.debug.log(this.TAG_NAME,"destroy")}initDecoder(){const e=this;this.decoder=new VideoDecoder({output(t){e.handleDecode(t)},error(t){e.handleError(t)}})}handleDecode(e){this.isInitInfo||(this.player.video.updateVideoInfo({width:e.codedWidth,height:e.codedHeight}),this.player.video.initCanvasViewSize(),this.isInitInfo=!0),this.player.isPlayer()?(this.player.updateStats({dfps:!0}),this.player._times.videoStart||(this.player._times.videoStart=aa(),this.player.handlePlayToRenderTimes()),this.player.video.render({videoFrame:e,ts:e.timestamp}),this.player.handleRender()):this.player.isPlayback()&&(this.player.updateStats({dfps:!0}),po(this.player.playbackPause)?(this.player.playback.isUseLocalCalculateTime&&this.player.playback.increaseLocalTimestamp(),this.player.playback.isUseFpsRender?this.player.video.pushData({videoFrame:e,ts:e.timestamp}):this.player.video.render$2({videoFrame:e,ts:e.timestamp})):po(this.player.playback.isPlaybackPauseClearCache)&&this.player.playback.isCacheBeforeDecodeForFpsRender&&this.player.playback.isUseFpsRender&&this.player.video.pushData({videoFrame:e,ts:e.timestamp}))}handleError(e){this.player.debug.error(this.TAG_NAME,"VideoDecoder handleError:",e.code,e);const t=e.toString();-1!==t.indexOf(ls)?this.player.emitError(ct.webcodecsUnsupportedConfigurationError,t):-1!==t.indexOf(ds)||-1!==t.indexOf(hs)||-1!==t.indexOf(cs)?this.player.emitError(ct.webcodecsDecodeError,t):-1!==t.indexOf(us)&&this.player.emitError(ct.webcodecsH265NotSupport)}decodeVideo(e,t,i,s){if(this.player)if(this.player.isDestroyedOrClosed())this.player.debug.warn(this.TAG_NAME,"decodeVideo() player is destroyed");else if(this.hasInit)if(!this.isDecodeFirstIIframe&&i&&(this.isDecodeFirstIIframe=!0),this.isDecodeFirstIIframe){if(this.isDecodeStateClosed())return void this.player.debug.warn(this.TAG_NAME,"VideoDecoder isDecodeStateClosed true");if(i&&0===e[1]){const t=15&e[0];let i={};if(t===vt){i=En(e.slice(5))}else t===_t&&(i=Un(e));const s=this.player.video.videoInfo;s&&s.width&&s.height&&i&&i.codecWidth&&i.codecHeight&&(i.codecWidth!==s.width||i.codecHeight!==s.height)&&(this.player.debug.warn(this.TAG_NAME,`decodeVideo: video width or height is changed,\n old width is ${s.width}, old height is ${s.height},\n new width is ${i.codecWidth}, new height is ${i.codecHeight},\n and emit change event`),this.isWidthOrHeightChanged=!0,this.player.emitError(ct.wcsWidthOrHeightChange))}if(this.isWidthOrHeightChanged)return void this.player.debug.warn(this.TAG_NAME,"decodeVideo: video width or height is changed, and return");if(co(e))return void this.player.debug.warn(this.TAG_NAME,"decodeVideo and payload is video sequence header so drop this frame");if(e.byteLength<12)return void this.player.debug.warn(this.TAG_NAME,`decodeVideo and payload is too small , payload length is ${e.byteLength}`);let s=!1,r=(new Date).getTime();this.prevTimestamp||(this.prevTimestamp=r,s=!0);const a=r-this.prevTimestamp;this.decodeDiffTimestamp=a,a>500&&!s&&this.player.isPlayer()&&this.player.debug.warn(this.TAG_NAME,"decodeVideo diff time is ",a);const o=e.slice(5),n=new EncodedVideoChunk({data:o,timestamp:t,type:i?li:di});this.player.emit(nt.timeUpdate,t);try{this.decoder.decode(n)}catch(e){this.player.debug.error(this.TAG_NAME,"VideoDecoder",e);const t=e.toString();(-1!==t.indexOf(os)||-1!==t.indexOf(ns))&&this.player.emitError(ct.webcodecsDecodeError)}this.prevTimestamp=(new Date).getTime()}else this.player.debug.log(this.TAG_NAME,"VideoDecoder first frame is not iFrame");else if(i&&e[1]===vs){const t=15&e[0];if(this.player.video.updateVideoInfo({encTypeCode:t}),t===_t&&!Ca()){const e=ga();return this.player.debug.warn(this.TAG_NAME,"WebcodecsDecoder not support hevc decode",e.type,e.version),void this.player.emitError(ct.webcodecsH265NotSupport)}this.player._times.decodeStart||(this.player._times.decodeStart=aa());let i=null,s=null;const r=e.slice(5);if(t===vt?(s=En(r),i={codec:s.codec,description:r}):t===_t&&(s=Fn(r),i={codec:s.codec,description:r}),!i||i&&!i.codec)return this.player.debug.warn(this.TAG_NAME,"decodeVideo and webcodecs configure is",JSON.stringify(i)),void this.player.emitError(ct.webcodecsDecodeConfigureError);s&&s.codecWidth&&s.codecHeight&&(i.codedHeight=s.codecHeight,i.codedWidth=s.codecWidth),this.player.recorder&&this.player._opt.recordType===S&&this.player.recorder.initMetaData(e,t),this.player.debug.log(this.TAG_NAME,`decoder.configure() and codec is ${i.codec}`);try{this.decoder.configure(i),this.hasInit=!0}catch(e){this.player.debug.log(this.TAG_NAME,"configure error",e.code,e);-1!==e.toString().indexOf(us)?this.player.emitError(ct.webcodecsH265NotSupport):this.player.emitError(ct.webcodecsDecodeConfigureError)}}}getDecodeDiffTimes(){return this.decodeDiffTimestamp}isDecodeStateClosed(){return"closed"===this.decoder.state}isDecodeStateConfigured(){return"configured"===this.decoder.state}isDecodeStateUnConfigured(){return"unconfigured"===this.decoder.state}}const yh={play:"播放",pause:"暂停",audio:"",mute:"",screenshot:"截图",loading:"",fullscreen:"全屏",fullscreenExit:"退出全屏",record:"录制",recordStop:"停止录制",narrow:"缩小",expand:"放大",ptz:"操作盘",ptzActive:"操作盘激活",zoom:"电子放大",zoomStop:"关闭电子放大",close:"关闭",performance:"性能面板",performanceActive:"性能面板激活",face:"人脸识别",faceActive:"人脸识别激活",object:"物品识别",objectActive:"物品识别激活",occlusion:"遮挡物检查",occlusionActive:"遮挡物检查激活",logSave:"保存日志"};var Ah=Object.keys(yh).reduce(((e,t)=>(e[t]=`\n <i class="jb-pro-icon jb-pro-icon-${t}"></i>\n ${yh[t]?`<span class="icon-title-tips"><span class="icon-title">${yh[t]}</span></span>`:""}\n`,e)),{});function bh(e,t){let i=!1;return e.forEach((e=>{i||e.startTimestamp<=t&&e.endTimestamp>t&&(i=!0)})),i}function vh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;const s=e.length,r=t.length,a=Math.max(s,r),o=2e3,n=Math.ceil(a/o);let l=0,d=0;function h(){let r="",a="";for(let i=0;i<o;i++){const i=e[d];i&&(r+=`\n <div class="jb-pro-playback-time-minute-one${i.hasRecord?" active":""}${i.isStart?" start":""}" data-has-record="${i.hasRecord}"\n data-time="${i.timestamp}" data-type="${i.dataType}">\n <span class="jb-pro-playback-time-title-tips ${d>s-60?"jb-pro-playback-time-title-tips-left":""}"><span class="jb-pro-playback-time-title">${i.title}</span></span>\n </div>\n `);const o=t[d];o&&(a+=`\n <div class="jb-pro-playback-time-hour" data-hour="${o.hour}" data-min="${o.min}" data-second="${o.second}"><span class="jb-pro-playback-time-hour-text">${o.title}</span></div>\n `),d+=1}r&&i.$playbackTimeListOne.insertAdjacentHTML("beforeend",r),a&&i.$playbackTimeListSecond.insertAdjacentHTML("beforeend",a),l+=1,l<n&&(i.rafId=window.requestAnimationFrame(h))}h()}function _h(e,t){const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];const i=(e[0]||{}).startTimestamp;for(let s=0;s<1440;s++){const r=s%60==0;let a=!1;i&&(a=bh(e,ja(i,s))),t.push({title:Oa(s),timestamp:s,dataType:"min",hasRecord:a,isStart:r})}return t}(e);vh(i,function(){let e=[];for(let t=0;t<24;t++){let i=t+":00";t<10&&(i="0"+i),e.push({title:i,hour:t,min:0,second:0})}return e}(),t)}function Sh(e,t){const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];const i=(e[0]||{}).startTimestamp;for(let s=0;s<1440;s++){let r=60*s,a=r%1800==0,o=!1;i&&(o=bh(e,za(i,r))),t.push({title:Na(r),timestamp:r,dataType:"second",hasRecord:o,isStart:a});let n=60*s+30;a=n%1800==0,i&&(o=bh(e,za(i,n))),t.push({title:Na(n),timestamp:n,dataType:"second",hasRecord:o,isStart:a})}return t}(e);vh(i,function(){let e=[];for(let t=0;t<24;t++){let i=t+":00",s=t+":30";t<10&&(i="0"+i,s="0"+s),e.push({title:i,hour:t,min:0,second:0}),e.push({title:s,hour:t,min:30,second:0})}return e}(),t)}function wh(e,t){const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];const i=(e[0]||{}).startTimestamp;for(let s=0;s<144;s++)for(let r=0;r<60;r++){let a=10*r+600*s,o=a%600==0,n=!1;i&&(n=bh(e,za(i,a))),t.push({title:Na(a),timestamp:a,dataType:"second",isStart:o,hasRecord:n})}return t}(e);vh(i,function(){let e=[];for(let t=0;t<24;t++){let i=t+":00";t<10&&(i="0"+i),e.push({title:i,hour:t,min:0,second:0});for(let s=1;s<6;s++){let r=s+"0";e.push({title:i.replace(":00",":"+r),hour:t,min:10*s,second:0})}}return e}(),t)}function Eh(e,t){const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];const i=(e[0]||{}).startTimestamp;for(let s=0;s<288;s++)for(let r=0;r<60;r++){let a=5*r+300*s,o=a%300==0,n=!1;i&&(n=bh(e,za(i,a))),t.push({title:Na(a),timestamp:a,dataType:"second",isStart:o,hasRecord:n})}return t}(e);vh(i,function(){let e=[];for(let t=0;t<24;t++){let i=t+":00";t<10&&(i="0"+i),e.push({title:i,hour:t,min:0,second:0}),e.push({title:i.replace(":00",":05"),hour:t,min:5,second:0});for(let s=1;s<6;s++){let r=s+"0",a=s+"5";e.push({title:i.replace(":00",":"+r),hour:t,min:10*s,second:0}),e.push({title:i.replace(":00",":"+a),hour:t,min:10*s+5,second:0})}}return e}(),t)}function Th(e){const t=Math.floor(e/3600),i=Math.floor((e-3600*t)/60),s=Math.floor(e-3600*t-60*i);return(t>0?[t,i,s]:[i,s]).map((e=>e<10?`0${e}`:String(e))).join(":")}function kh(e,t,i){const s=e.$playbackProgress,{left:r}=s.getBoundingClientRect(),a=oa((ua()?i.touches[0].clientX:i.pageX)-r,0,s.clientWidth),o=parseInt(a/s.clientWidth*t,10);return{second:o,time:Th(o),width:a,percentage:oa(a/s.clientWidth,0,1)}}function Ch(e,t){return e.classList.add(t)}function xh(e,t){return t instanceof Element?e.appendChild(t):e.insertAdjacentHTML("beforeend",String(t)),e.lastElementChild||e.lastChild}function Rh(e,t,i){return e&&e.style&&Ba(t)&&(e.style[t]=i),e}function Dh(e,t){return e.composedPath&&e.composedPath().indexOf(t)>-1}function Lh(e){let t=!1;return e&&e.parentNode&&(e.parentNode.removeChild(e),t=!0),t}var Ph=(e,t)=>{const{events:{proxy:i}}=e,s=document.createElement("object");s.setAttribute("aria-hidden","true"),s.setAttribute("tabindex",-1),s.type="text/html",s.data="about:blank",na(s,{display:"block",position:"absolute",top:"0",left:"0",height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:"-1"});let r=e.width,a=e.height;const o=wa((()=>{e.width===r&&e.height===a||(r=e.width,a=e.height,e.emit(nt.resize),c())}),500);i(s,"load",(()=>{i(s.contentDocument.defaultView,"resize",(()=>{o()}))})),e.$container.appendChild(s),e.on(nt.destroy,(()=>{e.$container.removeChild(s)})),e.on(nt.volumechange,(()=>{!function(e){if(0===e)na(t.$volumeOn,"display","none"),na(t.$volumeOff,"display","flex"),na(t.$volumeHandle,"top","48px");else if(t.$volumeHandle&&t.$volumePanel){const i=la(t.$volumePanel,"height")||60,s=la(t.$volumeHandle,"height"),r=i-(i-s)*e-s;na(t.$volumeHandle,"top",`${r}px`),na(t.$volumeOn,"display","flex"),na(t.$volumeOff,"display","none")}t.$volumePanelText&&(t.$volumePanelText.innerHTML=parseInt(100*e))}(e.volume)})),e.on(nt.loading,(i=>{na(t.$loading,"display",i?"flex":"none"),(po(e._opt.backgroundLoadingShow)&&uo(i)||po(i))&&na(t.$poster,"display","none"),i&&(na(t.$playBig,"display","none"),na(t.$tipsMessage,"display","none")),i||e._opt.extendDomConfig.showAfterLoading&&t.$extendDom&&na(t.$extendDom,"display","block"),i||e.getRenderType()===$&&po(e._opt.useMSE)&&n()})),e.on(nt.removeLoadingBgImage,(()=>{n()}));const n=()=>{t.$loadingBgImage&&t.$loadingBg&&t.$loadingBgImage.src&&(e.debug&&e.debug.log("Control","remove loading bg image"),t.$loadingBgImage.width=0,t.$loadingBgImage.height=0,t.$loadingBgImage.src="",na(t.$loadingBg,"display","none"))},l=t=>{e.fullscreen?qa(t)===e.$container&&d():d()},d=i=>{let s=Pa(i)?i:e.fullscreen;na(t.$fullscreenExit,"display",s?"flex":"none"),na(t.$fullscreen,"display",s?"none":"flex")},h=()=>e._opt.playType===_&&e._opt.playbackConfig.showControl,c=i=>{ua()&&t.$controls&&e._opt.useWebFullScreen&&setTimeout((()=>{if(e.fullscreen){const i=h()?Yt:Kt;let s=e.height/2-e.width+i/2,r=e.height/2-i/2;if(t.$controls.style.transform=`translateX(${-s}px) translateY(-${r}px) rotate(-90deg)`,t.$zoomControls){const i=156,s=30,r=e.width/2+i/2-s/2;t.$zoomControls.style.transform=`translateX(${-r}px) translateY(${e.height/2}px) rotate(-90deg)`}if(t.$recording){const i=101,s=20,r=e.width/2+i/2-s/2;t.$recording.style.transform=`translateX(${-r}px) translateY(${e.height/2}px) rotate(-90deg)`}}else t.$controls.style.transform="translateX(0) translateY(0) rotate(0)",t.$zoomControls&&(t.$zoomControls.style.transform="translateX(-50%) translateY(0) rotate(0)"),t.$recording&&(t.$recording.style.transform="translateX(-50%) translateY(0) rotate(0)");i&&i()}),10)};try{Mr.on("change",l),e.events.destroys.push((()=>{Mr.off("change",l)}))}catch(e){}e.on(nt.webFullscreen,(e=>{ua()&&(d(e),c((()=>{p()})))})),e.on(nt.recording,(()=>{e.playing&&(na(t.$record,"display",e.recording?"none":"flex"),na(t.$recordStop,"display",e.recording?"flex":"none"),(e._opt.hasControl||e._opt.isShowRecordingUI)&&(na(t.$recording,"display",e.recording?"flex":"none"),po(e.recording)&&t.$recordingTime&&(t.$recordingTime.innerHTML=Fa(0))))})),e.on(nt.recordingTimestamp,(e=>{t.$recordingTime&&(t.$recordingTime.innerHTML=Fa(e))})),e.on(nt.zooming,(()=>{e.playing&&(na(t.$zoom,"display",e.zooming?"none":"flex"),na(t.$zoomStop,"display",e.zooming?"flex":"none"),(e._opt.hasControl||e._opt.isShowZoomingUI)&&na(t.$zoomControls,"display",e.zooming?"flex":"none"))})),e.on(nt.playing,(e=>{u(e)}));const u=i=>{i||e.isPlayFailedAndPaused&&po(e._opt.playFailedAndPausedShowPlayBtn)?(na(t.$play,"display","none"),na(t.$playBig,"display","none")):(na(t.$play,"display","flex"),na(t.$playBig,"display","block")),na(t.$pause,"display",i?"flex":"none"),na(t.$screenshot,"display",i?"flex":"none"),na(t.$record,"display",i?"flex":"none"),na(t.$qualityMenu,"display",i?"flex":"none"),na(t.$volume,"display",i?"flex":"none"),na(t.$ptz,"display",i?"flex":"none"),na(t.$zoom,"display",i?"flex":"none"),na(t.$scaleMenu,"display",i?"flex":"none"),na(t.$faceDetect,"display",i?"flex":"none"),na(t.$objectDetect,"display",i?"flex":"none"),na(t.$occlusionDetect,"display",i?"flex":"none"),na(t.$controlHtml,"display",i?"flex":"none"),e.isPlayback()&&na(t.$speedMenu,"display",i?"flex":"none"),d(),t.extendBtnList.forEach((e=>{e.$iconWrap&&na(e.$iconWrap,"display",i?"flex":"none"),e.$activeIconWrap&&na(e.$activeIconWrap,"display","none")})),e._opt.showPerformance?na(t.$performanceActive,"display",i?"flex":"none"):(na(t.$performance,"display",i?"flex":"none"),na(t.$performanceActive,"display","none")),na(t.$poster,"display","none"),na(t.$ptzActive,"display","none"),na(t.$recordStop,"display","none"),na(t.$zoomStop,"display","none"),na(t.$faceDetectActive,"display","none"),na(t.$objectDetectActive,"display","none"),i||(t.$speed&&(t.$speed.innerHTML=function(e){if(null==e||""===e)return"0 KB/s";let t=parseFloat(e);return t=t.toFixed(2),t+"KB/s"}("")),na(t.$zoomControls,"display","none"),na(t.$recording,"display","none"),t.$ptzControl&&t.$ptzControl.classList.remove("jb-pro-ptz-controls-show")),p(),i&&f()};e.on(nt.playbackPause,(e=>{u(!e)})),e.on(nt.kBps,(i=>{const s=function(e){if(null==e||""===e||0===parseFloat(e)||"NaN"===e)return"0 KB/s";const t=["KB/s","MB/s","GB/s","TB/s","PB/s","EB/s","ZB/s","YB/s"];let i=0;const s=parseFloat(e);i=Math.floor(Math.log(s)/Math.log(1024));let r=s/Math.pow(1024,i);return r=r.toFixed(2),r+(t[i]||t[0])}(i);t.kbpsShow=s,e._opt.showBandwidth&&(t.$speed&&(t.$speed.innerHTML=s),p())}));const p=()=>{if(h()&&e._opt.playbackConfig.controlType===Q.normal){let i=t.controlsInnerRect.width-t.controlsLeftRect.width-t.controlsRightRect.width-t.controlsPlaybackBtnsRect.width;ua()&&e.webFullscreen&&(i=t.controlsInnerRect.height-t.controlsLeftRect.height-t.controlsRightRect.height-t.controlsPlaybackBtnsRect.height),t.$playbackTimeInner.style.width=i+"px"}},f=()=>{if(!h()||e._opt.playbackConfig.controlType!==Q.normal)return;const i=t.$playbackCurrentTime.style.left;let s=parseInt(i,10);const r=t.controlsPlaybackTimeInner.width;s=s-r/2>0?parseInt(s-r/2,10):0,t.$playbackTimeInner.scrollLeft=s};if(h()){const i=()=>{if(h()){let i=0;const s=e.playback&&e.playback.playingTimestamp;if(s){const r=new Date(s),a=r.getHours(),o=r.getMinutes(),n=r.getSeconds();e.playback.is60Min?i=60*a+o:e.playback.is30Min?i=2*(60*a+o)+parseInt(n/30,10):e.playback.is10Min?i=6*(60*a+o)+parseInt(n/10,10):e.playback.is5Min?i=12*(60*a+o)+parseInt(n/5,10):e.playback.is1Min&&(i=60*(60*a+o)+parseInt(n,10)),t.$playbackCurrentTime.style.left=i+"px"}}},s=e=>{t.$playbackNarrow.classList.remove("disabled"),t.$playbackExpand.classList.remove("disabled"),e===Si&&t.$playbackNarrow.classList.add("disabled"),e===Ti&&t.$playbackExpand.classList.add("disabled")};e.on(nt.playbackTime,(s=>{if(e._opt.playbackConfig.controlType===Q.normal)t.$playbackCurrentTimeText&&(t.$playbackCurrentTimeText.innerText=ba(s,"{h}:{i}:{s}")),i();else if(e._opt.playbackConfig.controlType===Q.simple){const i=(r=s,a=e.playback.totalDuration,oa(r/a,0,1));t.$playbackProgressPlayed.style.width=100*i+"%",t.$playbackProgressIndicator.style.left=`calc(${100*i}% - 7px)`,t.$playbackProgressTime.innerText=`${Th(s)} / ${Th(e.playback.totalDuration)}`}var r,a})),e.on(nt.playbackPrecision,((r,a)=>{h()&&e._opt.playbackConfig.controlType===Q.normal&&(t.$playbackTimeScroll.classList.remove(ki.oneHour,ki.halfHour,ki.fiveMin,ki.tenMin),t.$playbackTimeScroll.classList.add(ki[r]),t.rafId&&(window.cancelAnimationFrame(t.rafId),t.rafId=null),t.changePercisitionInterval&&(clearTimeout(t.changePercisitionInterval),t.changePercisitionInterval=null),t.$playbackTimeListOne.innerHTML="",t.$playbackTimeListSecond.innerHTML="",t.changePercisitionInterval=setTimeout((()=>{switch(t.$playbackTimeListOne.innerHTML="",t.$playbackTimeListSecond.innerHTML="",r){case Si:_h(a,t);break;case wi:Sh(a,t);break;case Ei:wh(a,t);break;case Ti:Eh(a,t)}i(),e._opt.playbackConfig.showPrecisionBtn&&s(r),f()}),16))})),e.on(nt.resize,(()=>{p()})),e.on(nt.playbackTimeScroll,(()=>{f()})),p()}if(e._opt.operateBtns.quality&&e._opt.qualityConfig.length>0){e.on(nt.streamQualityChange,(e=>{i(e)}));const i=e=>{t.$qualityText.innerText=e,t.$qualityMenuItems.forEach((t=>{const i=t.dataset.quality;t.classList.remove("jb-pro-quality-menu-item-active"),i===e&&t.classList.add("jb-pro-quality-menu-item-active")}))};(()=>{const i=e._opt.qualityConfig||[];let s="";i.forEach((e=>{s+=`\n <div class="jb-pro-quality-menu-item" data-quality="${e}">${e}</div>\n `})),s&&(t.$qualityMenuList.insertAdjacentHTML("beforeend",s),Object.defineProperty(t,"$qualityMenuItems",{value:e.$container.querySelectorAll(".jb-pro-quality-menu-item")}))})(),e.streamQuality&&i(e.streamQuality)}if(e._opt.operateBtns.scale&&e._opt.scaleConfig.length>0){e.on(nt.viewResizeChange,(e=>{i(e)}));const i=i=>{const s=e._opt.scaleConfig[i];t.$scaleText.innerText=s,t.$scaleMenuItems.forEach((e=>{const t=e.dataset.scale;e.classList.remove("jb-pro-scale-menu-item-active"),_a(t)===_a(i)&&e.classList.add("jb-pro-scale-menu-item-active")}))};(()=>{const i=e._opt.scaleConfig||[];let s="";i.forEach(((e,t)=>{s+=`\n <div class="jb-pro-scale-menu-item" data-scale="${t}">${e}</div>\n `})),s&&(t.$scaleMenuList.insertAdjacentHTML("beforeend",s),Object.defineProperty(t,"$scaleMenuItems",{value:e.$container.querySelectorAll(".jb-pro-scale-menu-item")}))})(),i(e.scaleType)}if(e.isPlayback()&&e._opt.playbackConfig.showRateBtn&&e._opt.playbackConfig.rateConfig.length>0){e.on(nt.playbackRateChange,(e=>{i(e)}));const i=i=>{const s=e._opt.playbackConfig.rateConfig.find((e=>_a(e.value)===_a(i)));s&&(t.$speedText.innerText=s.label,t.$speedMenuItems.forEach((e=>{const t=e.dataset.speed;e.classList.remove("jb-pro-speed-menu-item-active"),_a(t)===_a(i)&&e.classList.add("jb-pro-speed-menu-item-active")})))};(()=>{const i=e._opt.playbackConfig.rateConfig;let s="";i.forEach(((e,t)=>{s+=`\n <div class="jb-pro-speed-menu-item" data-speed="${e.value}">${e.label}</div>\n `})),s&&(t.$speedMenuList.insertAdjacentHTML("beforeend",s),Object.defineProperty(t,"$speedMenuItems",{value:e.$container.querySelectorAll(".jb-pro-speed-menu-item")}))})();const s=e.playback?e.playback.playbackRate:1;i(s)}e.on(nt.stats,(function(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e._opt.showPerformance){na(t.$performancePanel,"display","block"),t.$performancePanel.innerHTML="";const s=ca,r=go(),a=e.getCpuLevel(),o=Ba(a)&&-1!==a?`${lr[a]}`:"",n=e.video&&e.video.videoInfo||{},l=e.audio&&e.audio.audioInfo||{},d=e._times||{},h=e.getRenderType(),c=e.getCanvasRenderType(),u=e.getDecodeType(),p=e.getDemuxType(),f=e.getStreamType(),m=e.getAudioEngineType();let g=e.getRecordingDuration(),y=e.getRecordingByteLength();const A=e.isAudioPlaybackRateSpeed(),b=e.videoIframeIntervalTs;g=Fa(g),y=Ea(y);const v=e.isPlayback()?"录播":"直播";let _=i.isDropping;const S=e._opt.useMSE&&e._opt.mseDecodeAudio,w=e.control?e.control.kbpsShow:"0 KB/s",E=e.getVideoPlaybackQuality(),T=`\n <div class="jb-pro-performance-item">\n <span>版本 ${s}</span>\n </div>\n ${e._opt.isMulti?`\n <div class="jb-pro-performance-item">\n <span>UUid ${e._opt.debugUuid}</span>\n </div>\n `:""}\n ${e.isInMulti()?`\n <div class="jb-pro-performance-item">\n <span>窗口下标 ${e._opt.multiIndex}</span>\n </div>\n `:""}\n ${r?`\n <div class="jb-pro-performance-item">\n <span>内存大小限制 ${Ea(r.jsHeapSizeLimit)}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>可使用的内存 ${Ea(r.totalJSHeapSize)}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>已使用的内存 ${Ea(r.usedJSHeapSize)}</span>\n </div>\n `:""}\n ${o?`\n <div class="jb-pro-performance-item">\n <span>CPU压力情况 ${o}</span>\n </div>\n `:""}\n\n ${r&&r.usedJSHeapSize>r.totalJSHeapSize?'\n <div class="jb-pro-performance-item">\n <span>可能内存泄漏 是}</span>\n </div>\n ':""}\n <div class="jb-pro-performance-item">\n <span>播放模式 ${v}</span>\n </div>\n ${e.isPlayback()?`\n <div class="jb-pro-performance-item">\n <span>播放倍率 ${e.playback.rate}倍</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>播放模式 ${e.playback.isUseFpsRender?"固定FPS":"动态FPS"}</span>\n </div>\n ${e.playback.isUseFpsRender?`\n <div class="jb-pro-performance-item">\n <span>固定FPS ${e.video.getStreamFps()}</span>\n </div>\n `:""}\n `:""}\n <div class="jb-pro-performance-item">\n <span>解封装模式 ${M[p]}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>解码模式 ${u}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>渲染组件 ${h}</span>\n </div>\n ${h===$?`\n <div class="jb-pro-performance-item">\n <span>渲染引擎 ${c}</span>\n </div>\n `:""}\n <div class="jb-pro-performance-item">\n <span>网络请求组件 ${f}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>视频格式 ${n.encType||"-"}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>视频(宽x高) ${n.width||"-"}x${n.height||"-"}</span>\n </div>\n ${e.isPlayer()?`\n <div class="jb-pro-performance-item">\n <span>视频GOP(ms) ${b||"-"}</span>\n </div>\n `:""}\n <div class="jb-pro-performance-item">\n <span>音频格式 ${kt[l.encType]||"-"}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>音频引擎 ${m||"-"}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>音频通道 ${l.channels||"-"}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>音频采样率 ${l.sampleRate||"-"}</span>\n </div>\n ${e.isPlayer()?`\n <div class="jb-pro-performance-item">\n <span>播放器初始化(ms) ${d.playTimestamp}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>开始请求地址(ms) ${d.streamTimestamp}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>请求响应(ms) ${d.streamResponseTimestamp}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>解封装(ms) ${d.demuxTimestamp}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>解码(ms) ${d.decodeTimestamp}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>页面开始渲染(ms) ${d.videoTimestamp}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>初始化到页面渲染(ms) ${d.allTimestamp}</span>\n </div>\n ${e.recording?`\n <div class="jb-pro-performance-item">\n <span>视频录制时间 ${g}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>视频录制大小 ${y}</span>\n </div>\n `:""}\n `:""}\n <div class="jb-pro-performance-item">\n <span>音频码率(bit) ${i.abps}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>视频码率(bit) ${i.vbps}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>视频帧率(fps) ${i.fps}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>视频峰值帧率(fps) ${i.maxFps}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>解码帧率(fps) ${i.dfps}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>音频缓冲帧 ${i.audioBuffer}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>音频缓冲时长(ms) ${i.audioBufferDelayTs}</span>\n </div>\n ${e.isPlayer()?`\n <div class="jb-pro-performance-item">\n <span>视频待解码帧 ${i.demuxBuffer}</span>\n </div>\n `:`\n <div class="jb-pro-performance-item">\n <span>缓存时长(ms) ${i.playbackCacheDataDuration}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>视频待渲染帧 ${i.playbackVideoBuffer}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>视频待解码帧 ${i.demuxBuffer}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>音频待解码帧 ${i.audioDemuxBuffer}</span>\n </div>\n `}\n <div class="jb-pro-performance-item">\n <span>待解封装数据(byte) ${i.streamBuffer}</span>\n </div>\n ${e._opt.useMSE?`\n <div class="jb-pro-performance-item">\n <span>MSE缓冲时长(ms) ${i.mseDelay}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>MSE待解码帧 ${i.msePendingBuffer}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>MSE缓存时长(s) ${i.mseStore}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>MSE解码间隔(ms) ${i.mseDecodeDiffTimes}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>MSE解码时间(ms) ${i.mseTs}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>MSE播放模式 ${i.mseDecodePlaybackRate>1?"加速":"正常"}</span>\n </div>\n `:""}\n ${e._opt.useWCS?`\n <div class="jb-pro-performance-item">\n <span>WCS解码间隔(ms) ${i.wcsDecodeDiffTimes}</span>\n </div>\n `:""}\n ${e.isOldHls()?`<div class="jb-pro-performance-item">\n <span>HLS缓冲时长(ms) ${i.hlsDelay}</span>\n </div>\n `:""}\n ${e.isUseHls265()?`<div class="jb-pro-performance-item">\n <span>HLS缓冲时长(ms) ${i.hlsDelay}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>HLS待解码帧 ${i.hlsDemuxLength}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>HLS待解码视频帧 ${i.hlsDemuxVideoLength}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>HLS待解码音频帧 ${i.hlsDemuxAudioLength}</span>\n </div>\n `:""}\n ${e.isPlayer()&&E?`\n <div class="jb-pro-performance-item">\n <span>Video已渲染帧 ${E.renderedVideoFrames}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>Video已丢弃帧 ${E.droppedVideoFrames}</span>\n </div>\n `:""}\n ${e.isPlayer()?`\n <div class="jb-pro-performance-item">\n <span>网络延迟(ms) ${i.netBuf}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>缓冲时长(ms) ${i.buf}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>最新缓冲时长(ms) ${i.pushLatestDelay}</span>\n </div>\n `:""}\n ${e._opt.useMSE||e.isWebrtcH264()||e.isAliyunRtc()?`\n <div class="jb-pro-performance-item">\n <span>video显示时间(s) ${i.videoCurrentTime}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>video间隔时间(s) ${i.videoCurrentTimeDiff}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>videoBuffer缓存时间(ms) ${i.mseVideoBufferDelayTime}</span>\n </div>\n `:""}\n <div class="jb-pro-performance-item">\n <span>视频显示时间(ms) ${i.currentPts||i.ts}</span>\n </div>\n ${e._opt.hasAudio&&e.isAudioNotMute()&&po(S)?`\n <div class="jb-pro-performance-item">\n <span>音频显示时间(ms) ${i.audioTs}</span>\n </div>\n ${e._opt.hasVideo?`\n <div class="jb-pro-performance-item">\n <span>音视频同步时间戳(ms) ${i.audioSyncVideo}</span>\n </div>\n `:""}\n <div class="jb-pro-performance-item">\n <span>音频播放模式 ${A?"加速":"正常"}</span>\n </div>\n `:""}\n <div class="jb-pro-performance-item">\n <span>视频解码时间(ms) ${i.dts}</span>\n </div>\n ${e.isPlayer()?`\n <div class="jb-pro-performance-item">\n <span>解码前-解码后延迟(ms) ${i.delayTs}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>总延迟(网络+解码)(ms) ${i.totalDelayTs}</span>\n </div>\n `:""}\n ${e.isPlayer()&&i.isStreamTsMoreThanLocal?'<div class="jb-pro-performance-item">\n <span>是否超过一倍率推流 是</span>\n </div>\n ':""}\n ${e.isPlayer()?`\n <div class="jb-pro-performance-item">\n <span>是否播放流畅 ${i.videoSmooth}</span>\n </div>\n `:""}\n ${e.isPlayer()?`\n <div class="jb-pro-performance-item">\n <span>是否在丢帧 ${_}</span>\n </div>\n `:""}\n <div class="jb-pro-performance-item">\n <span>网速 ${w}</span>\n </div>\n <div class="jb-pro-performance-item">\n <span>播放时长(s) ${Fa(i.pTs)}</span>\n </div>\n <div class="jb-pro-performance-item-block"></div>\n `;t.$performancePanel.insertAdjacentHTML("beforeend",T)}else t.$performancePanel.innerHTML="",na(t.$performancePanel,"display","none")})),e.on(nt.togglePerformancePanel,(e=>{na(t.$performance,"display",e?"none":"flex"),na(t.$performanceActive,"display",e?"flex":"none")})),e.on(nt.faceDetectActive,(e=>{na(t.$faceDetect,"display",e?"none":"flex"),na(t.$faceDetectActive,"display",e?"flex":"none")})),e.on(nt.objectDetectActive,(e=>{na(t.$objectDetect,"display",e?"none":"flex"),na(t.$objectDetectActive,"display",e?"flex":"none")})),e.on(nt.occlusionDetectActive,(e=>{na(t.$occlusionDetect,"display",e?"none":"flex"),na(t.$occlusionDetectActive,"display",e?"flex":"none")}))};function Bh(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&s.firstChild?s.insertBefore(r,s.firstChild):s.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}Bh('@keyframes rotation{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes magentaPulse{0%{background-color:#630030;-webkit-box-shadow:0 0 9px #333}50%{background-color:#a9014b;-webkit-box-shadow:0 0 18px #a9014b}to{background-color:#630030;-webkit-box-shadow:0 0 9px #333}}.jb-pro-container video::-webkit-media-controls{display:none!important}.jb-pro-container .jb-pro-icon{cursor:pointer;width:16px;height:16px;display:inline-block}.jb-pro-container .jb-pro-ptz-controls{position:absolute;width:156px;height:156px;visibility:hidden;opacity:0;border-radius:78px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATgAAAE4BAMAAAA9UfJZAAAAMFBMVEUAAABHcEy0tLRZWVmysrKoqKi1tbWvr6+2traBgYG1tbWWlpa1tbW1tbVUVFS1tbVGCHqkAAAAD3RSTlMzAO9U3LSWySp3aZcVRDUDw823AAAJYUlEQVR42u3d32sbVxYH8EPHxgg/lBsa7SBkukmpSbwLI2KbEPpgZ5MQtwmM0wRMmgdhP6RgEuwlSVnYlmGMYaEvMU1KKX4QNq0pocVmm7CYfRBaQguFpbg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Dfpgd7eiOmjSEf1ZdpSC3ozMuht3LA3wIPeOjDSTRdfKb7M21VCb/QJvUUq9uay0NvyYm9oHFFKdDvaChp6E23s7cehN25nh5G3vE8aZ8LGDdjMIY49zoc9dPpFx7ikHnIh7sjnHOPYTMj36oxjzDlO1UI9Xe9oUICb49iMDTBwzXCqFuKsG2gycM1wYtaFlrCK3mTgmuJU7UzkA9cUx2bDGjpFH2FucUk9pA57onGNa4lj31uhnJzEtA+ZexxLh3KpkykwL7g4D+GUuJuPe8Kx5RCuJtJbzBuuJ/hyMmCtecSx2aBzIqaNMK+4pBHwtU7WznnGiZwI9Oykq1U2tMWxxSD7hKL3MT84VQ/wwGbzpi8c+47fCsp2kt9g/nDsp6AyNqb1Mb+4pBFQKU7bpm8cS/DjQdg+aXT/wTWOzfLL8m2DfITJwLFFS/oZQHf7CecQpxq25GqnGO0nnEMcS2iSq13WWmCycKLaHZebDDeYPBz7mb8tz3aff8Rk4tiivJQd5H1MLo5NyNIN8t6cbJw6ZV2WYys6tTnHCZ2MsRM2k8nHSdG5srnBMTXNr/qzfcYLLmyucEyd8FdR7vNeNzZ3OJZc5G967mTKu7wvx4LDMfYFtz2efMYM/o7LL3OLY080byVlULNusqBx7AeDX3B9aJWH3P6aBY8rpUX+W3e2t3SXqeAZVzq0/JyLmRe7wt0fUs849t8Jzv/u8Ngq/+K8d42FhxODp/P8VQc85VPxjzc9folXHFO/1Lh1rc3BjT0S//SeycLGCd6Sxvm51abDp8xf4dyaNL1/gw+caBhLuvj6O6v36mWn5scEPe+H5hMn4uP3hUEAr63e6y+PYX//qflHY+U/fvCVzw/3ixPD98vSbV4X5ye/yfn+aP+4MvDpg+tjZ4+K8bKOnr1z/cFTU8rH/g92biFxn2S73AAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%;transition:visibility .3s,opacity .3s;right:43px;bottom:135px}.jb-pro-container .jb-pro-ptz-controls.show-vertical{right:43px}.jb-pro-container .jb-pro-ptz-controls.show-vertical .jb-pro-ptz-btns{left:0;top:156px}.jb-pro-container .jb-pro-ptz-controls.show-level{right:163px}.jb-pro-container .jb-pro-ptz-controls.show-level .jb-pro-ptz-btns{min-height:156px;left:144px;top:0;display:flex;flex-direction:column;justify-content:center}.jb-pro-container .jb-pro-ptz-controls.jb-pro-ptz-controls-show{visibility:visible;opacity:1}.jb-pro-container .jb-pro-ptz-bg-active{visibility:hidden;opacity:0;width:156px;height:156px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATgAAAE4CAMAAAD4oR9YAAAAM1BMVEX///////////////////////////9HcEz///////////////////////////////////85yRS0AAAAEXRSTlO5DCgVgZBxAK2fQDRkBR5XTPLKM/gAABnnSURBVHja7F0Jkqs6DGQPO9z/tD8Jq6WWbCCvIjKfzAGmulrW3ooedr6ui+M4TdP++SXPr1l/SdL3aRrHhv7ZyA5qb9xe0L3Am+DrkzeCL/BeX908MezTuPsfOArdgl3KsZuhq99fk/Tx3waum+ByAHua5QbYilkzY1aP728YhrH5InrfBa57OLAtVjpRbYaumex04dq4APeC7vnVSfo/45bXLe33jGscMx3f0A1vyg3t69e2dRL/NeA6wrgdcCvjyPM2U25mXDt9xVD3f/qN0yi3Mm6P20S54vlXtGPS/R3GPSbYOsC4ZAvmJtiaGiL3Zlzx/Ht+Y/KXTJXbqmaqe9za1VYn3N7YpX/OVGev2qduOLIiB7xqOzGuWCiXFVmWtU3368A5lkqeOJI21I5XXaORxVRnxmUTdNnY/4U3riNvHMJts9XRtdXVUttipdzrK/4x7UyY6sK4Gbo+nU21T1zKcd9AGJetlMvyLKvj3zXVfeqQElMljINx3MK4xVQ3xj2Ry7N/6CiMOIfYyVUXWxUyBx7HuZRbcHt9bf/Lb9zsHlzKzabauJaK47iVcC7jJujS33/joKkmxDnM4QiJ4xDjZuT+DXQW3jgxV012qcPuiePhCGfchlv1/P0D6Czmqmuq2gPGkbIS8Q4ZsNU3dGP3Y2+cW1RyKpkrbAnwqhi3iXHFHrU3bFVV5c3vBsCsOALjkX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AdfV9wu3l+x2V0R36INSvWAUbvuMvzydRprWogTmfVO+AI4uB+XF/JvxK4UHekMZRucHdkQhsQvdqPuwGurV95cl+LhUR3hPfjTN5lkFa78bUH97StdEdcOJC277h0bvgO24ty6RkQV5OtG5Pn0GIy19S8/OCeKofojlu47gjVT+4/EjZvdu9grnq1uVxAB1il1beEzRtBJJQICv1VMeKU93a0OzItbzq5k90RgLhl+XGCqy3ERdYrO0fftXnb2T3VqjfE5aigMbf3YANirN54co93XMjJT20rhWteP5Hrr/NbT+7xjoPMctOzJkqq6/Luk3u84+7vuGUBSzeBweoE3yPTm8Hm444LiA5gyMXuuJU56G3NR07uAXHVwwo5fgBTf1Xo2rjVnzq7r6yK1LwSr5HHHTdt9fy5k5/R7XLcJdX7FbeOy2dP7trPweQ57FRZx7r6+Mndq3ldEzrAY938ysl9uiQ1cJNVa2SO16X6tZP/dj8uDqJW2VfM/O/ftf7FmPkK3OMZ3MAu8G3T6ytiTTU7OK8jxMlfuN1idg/X91/9VUZ81WOVo8P+Bw+0DogP6NDPAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-up{transform:rotate(-90deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-left{transform:rotate(180deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-down{transform:rotate(90deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-left-up{transform:rotate(-135deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-right-up{transform:rotate(-45deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-left-down{transform:rotate(135deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-right-down{transform:rotate(45deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-show{visibility:visible;opacity:1}.jb-pro-container .jb-pro-ptz-control{position:absolute;left:53px;top:53px;width:50px;height:50px;background:#fff;border-radius:50%;transition:left .3s,top .3s}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-left{left:33px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-up{top:33px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-right{left:73px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-down{top:73px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-left-up{top:39px;left:39px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-left-down{left:39px;top:67px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-right-up{top:39px;left:67px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-right-down{top:67px;left:67px}.jb-pro-container .jb-pro-ptz-icon{position:relative}.jb-pro-container .jb-pro-ptz-icon:hover .icon-title-tips{visibility:visible;opacity:1}.jb-pro-container .jb-pro-ptz-btns{display:block;position:absolute;left:0;top:156px;width:156px;box-sizing:border-box;padding:0 30px}.jb-pro-container .jb-pro-ptz-btns .jb-pro-ptz-btn{display:flex;justify-content:space-between}.jb-pro-container .jb-pro-ptz-expand .jb-pro-ptz-expand-icon{display:inline-block;width:28px;height:28px;cursor:pointer;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAANlBMVEVfX19fX19fX19fX19fX19fX19fX19HcExfX19fX19fX1/////Pz8+oqKjCwsKhoaHn5+eWlpaOqTaDAAAAC3RSTlP/3CaKxwJiAELtp4ri/s4AAACuSURBVCjPfZPREoUgCERXBdPRyv7/Z6/Z1aQp9oWJMyYLiKUrOIpAJBdGCldgbzBkPM/QEoTI3jBEPBRDhwEvChe08Q1Ge0ImvIq4Qj8ljrLdH77CyQPWlCdHC0Q1e9rmmuC+oQN9Q4LwcQg40L6eyqm0uEpXSUqe3fKpkkqL+Y/o+07SrahNEO0T0LBsvOitf4xsLqiNTB32wtqaVKosGLO2mhUrS93+PZ4D99wPqzMJVcbEyA8AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-expand:hover .jb-pro-ptz-expand-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAM1BMVEVHcEyZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZn////i4uLZ2dnIyMjExMS8vLy+iXNeAAAACnRSTlMAYomLxwEm9+NCLo6DKwAAALNJREFUKM99k9kWgyAMRIMmEMLm/39tKaVKFJkXl3sYJ4sAXeQ3ZOcYd0+gRYblFBuFLYoS2ot5lpvYn8zJQ65TO2GVNmdCmQq/qczw4gjpejD14BgmhziEIvCjVRlPioftHW6A7xBB1a8CCUMvsuSqEkPM7eZX6h8GrQ67bYpNIbRL6rb4/k2EfVXKsgmqfQrW9qnGq96a28jGQG1ky2HXpVysyYyeDIhWq7le6ua9P36HD6+2GRi8iBZBAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-narrow .jb-pro-ptz-narrow-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAM1BMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX1/9/f2/v7/y8vLUObqxAAAADXRSTlMA3IrE6SZi9wI+y0gNXAn3CgAAAI5JREFUKM+Fk1kOwyAMBQ04bJHT3P+0JVUMNMWv8zvSk1cipfjAKXHwhR7k6KTjYp7dVuWLug1XWB5wz96T/JD2O3Phmv0k5ypL6lVVFIPYpLOka5WKSSFvS0/BloHYlkza5HkMzrvVLo8ZlRr7mtFYWBBsBQ4BjC//GTxcGVw2PpOVHQ6fJj7qS4936OoN2K4e5yE6N1UAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-narrow:hover .jb-pro-ptz-narrow-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcBAMAAACAI8KnAAAAJ1BMVEVHcEyZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZn+/v7X19ckk9ihAAAACnRSTlMA9+NCAsuKJsRiPv/2GwAAAJlJREFUGNNjYAAC5gxFoTYDBijw1FoFBIumQHjsUavAYGkBmGu0CgqUwRqlYNyFIO2Fq+BAnIGBJQrBXerAwLkKCUxgYELmKjBYIXMXM2Qhc5cxdCFzVzBoIXMXMYAcsRsMdgEdgs4FKT4DBqdAitGMQrMIzRkojlRB9wKaB9G8z+CMGjgshjCuMCjoWNxRAxYt2KGRYgJiAQAnZcjElaB/xwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-aperture-far .jb-pro-ptz-aperture-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAASFBMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX1////9fX1+kpKRzc3ODg4PFxcW1tbXW1tbk5OT29vaVlZVmZmZ8vCMFAAAADHRSTlMAxGJ5Mssm9+NCiYtiH91SAAABAklEQVQoz41T7Q6DIAyEJQooUL55/zddhVazzZjdHyqXXo8DhWCYTWqltNyN+MZLuxP69UGti/vAsl6c0e4L+tQ2yv1AEbvecMhO5cXdYhk+6aO3WGrNAMwentlMz/ZAKIlNoRsqY2wtFWu9t8wasc0iYVN0LkQfrG1zbxNyrIBcntOQrH1Ukkb60QcxYF1xMA2dh8zWj6ZDsLCsIrL4Ds5Hm9FMbCEROWUB0COaLXEIZJKV7CKybGO7UuxjxY2C/TkMbxboKBQCxgMN6MCJQ6Ch/QjOZg/B13LGx8FDTe3IFvl+Bc9XBi3UWoex68qeL/vxmdyxyvz3NJ8f9dDef36HN7koIK2LjxB0AAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-aperture-far:hover .jb-pro-ptz-aperture-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAOVBMVEVHcEyZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZn+/v6cnJzr6+u/v7+xsbGlpaXNzc3b29vqh7uRAAAAC3RSTlMAyRjKA59J/3PzPhe1wxwAAAD2SURBVCjPjZPrssMgCIR1mkYtisD7P+zBCyZpM5mzv5hs0M8VnZvaok9BlXzc3FXbO5z0vtifFC5Kn8OL4UfxwVvuHm61d5Z0b6ZGZZwZpQAUosWsjVZntVS1sH3ZFo1IRVYfGXgx+VGwNkkIVbhq9/jm3cAhaNv1Uk3IA8mNn7D3kbQeWK3TLH2jCthrDFcTMwUWaKiClc9mJtJWhS3SF5BpJqMQW1b3xwnkDahMoHYomkeJRgSENA/MFsKML7fgoCBVbGvM+Cx4JcKWbWHKK/h1ZYS1Jy/nK3u8bB3KhzG5deMxtfv3aO7/Heq+9ms8h9fxHP4AHzAWU9zlWNgAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-aperture-near .jb-pro-ptz-aperture-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAQlBMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX1////9fX1+FhYWbm5vz8/Nzc3OwsLDi4uLDw8PW1tZmZmYgm6a+AAAAC3RSTlMAYmOLx4kn9+NCIVJiPGAAAAD+SURBVCjPjVPttoMgDMOJAqOU8uH7v+qKFN2c597lF5LTJg1VqQG3aGuM1bNTV0wWDtjpg3pq+IB+npyzcIE9ejsDXzDCrjccs+tOariF3n2OLyw5xko0vh9MDjNb9Q0hp2GK3cixlIApe4/JD9appR8SFxWAUFLg6n63iB1irnY1Jv0mlrok7nUdcZRa1YeshxBA9iijChlxI6iZEaBgSEL2tkRcymPGGJpqlbZ6uDg0WR/F0DwuMpxDkYwiIXA8hO2uMJdGCCK6teB8RQoY8xGfevQjxYQt25qoRwDT25MRBjZ7GtP/P/afa3LHmrflXa+ruf661Hvv+et3eAF6Fh3v+sSUGgAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-aperture-near:hover .jb-pro-ptz-aperture-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAM1BMVEWZmZmZmZmZmZmZmZmZmZmZmZmZmZlHcEyZmZmZmZn///+qqqq9vb3z8/PMzMzo6Oja2tpXGg+mAAAACnRSTlP/JomLxwJiAONCr+rW2wAAAOtJREFUKM99U9sWhCAInEpLBS///7WLEWy7p9O8qEzCMBIOQ15DAlLYsoegS9yFMKQ93skl4Adh+ZI54Q8pG5nxgKzkgkcsk4zhmQxRyN1OPHqtncjOu5AuppcJ6s1EHTA1YzC3Wgq3YmzGqpsmlwZAo7F8oLEVKoeE6+TbSxK0JJ/3FLOwFnUxzXuoltYDDMLoAlmYXLAWIrkqbdZKs+q4KBfkNV1uwGaBim9TdLWS3R7iGRvCNTPB7JvGlc5EXK8cKbrxooint73RzXh7Msl6Oj/uT/b62O9j8sj6gMXX0Xwf6jP3Zr9DtNAHTYMMXrXSK0YAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-focus-far .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAPFBMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX1////92dnbs7OyFhYWjo6Pe3t7Ly8uxsbG8vLyG+Q0EAAAAC3RSTlMAiWJjx9wm/0Lti7mfpe0AAADaSURBVCjPfVMJDoQgDERFC/bg8P9/XUSO6CqTqA0TptNDpSrMpC2A1btRT8wrNKzzjdo03KC3zhkLD9imbeAFhd3sG2kvZQ2v0NknfGBJZKkhBM9MxOxDKBV1N4iHi0TRHYjN01Qi7/kK2PtyNDU7DAEJgDAAN0u1jsQEFEkcVVmrqjeXrkWRmC67eqbgG7bJyvkQSQkvUvec7szpek6t9ubWJSK/uJVSm+APzHKCh++DWWuH4plQKNYOpfappcjy2VvJn9744cjGwx6uyXjBxqs5Xuqsvf/9Dj8rLhRg+bQ5VAAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-focus-far:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAOVBMVEWZmZmZmZmZmZmZmZmZmZmZmZmZmZlHcEyZmZmZmZmZmZn///+xsbGoqKjt7e309PTExMTQ0NDe3t774OlGAAAAC3RSTlP/itxixwImAELtp8B2gZgAAADmSURBVCjPjZMLjsUgCEVpq60G8Lf/xQ62gvNeOmZuUiWeKHC1cKnC5iJAdFuwJXgmf+xg2g//G54OPuTOCUOEL8WgMMCLwgPP+Abj2aF38CrnBR7whw6Bo4fWUk7MMrQ2OrpAq0GspTLLgKg1wTailNITZA0EaTkZGjIAY5NwlATah5CGRMJYj50tFtlWiapsLvAPRdtL/WOmET7QzZyl5ywzp7NWsjBJ1odsragJqeJ9HGFNZoLaJw71hMTm0O7NeDE1Z6YsU5rGL69sedmXXz0ToW8PzA/oV09T8OJR32fb7+B17Qe3WwtC9PVbHAAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-focus-near .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAARVBMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX1/////t7e2dnZ3W1tbGxsa3t7eDg4Oqqqri4uKTk5NImu/5AAAADXRSTlMAYieJ3MvE/0Lti4oh87zNagAAAOtJREFUKM+NU1sOwyAMY30FtoWS8Lj/UZe2gWpVh2aJH1wcO0mNqbDj4gDc8rLmiscEDdPji3rP8IX5fXLWwQWuaVu4gbKDuyPdsJMz3GLefcIPbJ6PDCEAFDlUAJiORM3NigQFAXAFlqOeRhWJyFFIHxNGvRrN0mp470U++3axGM2RAmXcXqKnkDSN0a9WIk5Sa01MpDXBQAdVtrA8lBhFnnKpsmoo5VBrhszV0KuJ5N2tP92O50iQjpzcctravoihdoi0Q1NrfN56m0VWzFBoje+OrD/s7pr0F0yUr6s5/LvUu/bz+B2ep+IHdMIV2SUZfCsAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-focus-near:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAQlBMVEVHcEyZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZn////c3Nz09PTp6enR0dHFxcW7u7uwsLAUKT0cAAAADXRSTlMA3IrE6WIm9wI+y0gNQZpqdwAAAOdJREFUKM99U9GShCAMQ8BF3Cmlpfz/r15dAe88l8zwQiQkoRrTEa3zIXhno7lhWxcYWNbtN/fa4Q/218VFDzf4of0O8A/h3TQfOGU/ytsOj9gPVyt8warkmYEQQAgABYDxTKROz88koS6AVIB1fRCNbSI1cVUy15Jq27LGjTtyzipPeWw40/IXQkrHyZSRmqw3LaQgctFNKYzYyGACfEXossLMojFEj7J0WfdwJ3dD9uY2X25tL0Hj45mTR87Y66u9IQFsDS1bL57o7JbUDNIofvpk08eej8kTe3Hz0ZwP9UFfv8OgfgBUByCEUZhYtAAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-cruise-play .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJWSURBVHgBtZe/b9pAFMefbSYWMjCjdOtmYEYqXVC3umMlBFRiT7qxkexITcdKSDUSYna2iqX+E/DG6LCQgcETUiR+5Pv8I3Kc+McF5ysZ3x2++9x79/zuLFEG9Xq9s/1+r8my/AnVJq4z/2LZfB0Oh1tFUQxd1+208aQ0GAa7kCTpMgRJk4kJXk+nU5NEoe12W8PM/wrAotIx2Z+w3MkE7XQ6Q3S4otNlY5zPUZdL7wiMBUsRIK/fDeWvhQ92XS0HrQia83cCsqoIyMug8gQ9Ho/DpF7FYpEajQa9VTBoyIZxWeEfv6IndSqVSjQYDKhcLtNqtaLtdkuigmGSZVn/XKiqqr9wqyZ1YEtbrRZVKhX3zvX1ei0Eh7Ufa7Xan8C9VRIUg9lyQZfzO19VOOugkBpAgaXRtnq97oLZ5ZvNJm0YQkBZ8m63E7YyKl5ntrrf77vlJCF/qzLlKLZ4NBqRpmmuF2LBlLOyBFYBchDKlIeWyyWNx+PUtS2Qtx+eJA6i2WzmQtMEA+8KnA+73a6N+jkJil1pGAbN5/PMfRBIZsGn3+LFvSABMYiBgpnJgZEeFHQD4EzQrOsWI4N/nrY2uPg/eeefV8WvAKfALOsWJ3jzA++rcqjhB25OXAd244nA62AjV4LGxWLhIBk/oPiF8pc9mUy+BZVnyQEzueEZUb5yjyvhBiX6BCw2YTGvdZNyAkYPZsprT/rgO/K2vDcdQQH7jes7gPcv/kvqyCcKbEVX6PxVAG76QWPGPZAIDcEZqGECTQyokpe9wp8VfNqzyA2L9M+KRzm19l1i6ZQBAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-cruise-play:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAdCAYAAABWk2cPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJ5SURBVHgBtZe7buJAFIYPjsVFAok3wBUlYcUDLNvQISUSDVVCA0IUYZ8gmzcgBeIiJLwdFau8QToaQKygovI20CJBARKX/Y/jICPAF3B+yRpjZvzNOWfOzLGLLKrZbAaXy+WdKIq32+1WcrlcQe0vZb1e/8XvQT6ff7fyLpdZh0qlEr+5uXne7XZxMpciCIKMSfzGBBSyCwVMAqxpEXYEhzdeAJYtQ2u12h2aJq4gXadSLpf7aQptNBoPm81GJofEsc5ms9/0zwT9j3K5HHUSyEJ4ovV6vXkSyjHEyvxDXyCAHxGy4hEUq+4JjWQ02O/30xV65rTbQ9lKNEWjEYFAgFKpFMViMbpQnOfFPRSKWxnldrtVaDqdpnA4THalefMDinx8sDOYrY7H45RIJOy6PMibjch3F24AJEmSeo3HY+p2u7RYLEzHwNqogOUcpSvFrk4mk5Zcjry9FZCX1+46qj5dzvEOhUKGfQVyWAyPRCLqojsnEYtohpiSE5rP59TpdEhRFMN+Itw7Q3DpGq1WKxqNRurF90YC75+gnXszulBsVbvdpl6vZwpkwasDNWVw9r3BWlu5Op1OVdBkMrEzTD11RO1exmUJytb0+30aDodkV7DyjT2rBpNrG8zg3WwQW9ZqtS4CatASt/sVhAC/GA3glWk1bqcEo+TPwm0P5QeYySt9jRS9UQe54vF4fqEZkMNCdXivrw4PoJlMZoad5IeDYE7F+0KhcPC+syVotVotIQ5PdLm4CD8CGkJZfAIhzlw3SWRdM+T9q9frLbHnTnUwrfBZfPCiecQG8v3MBHj/HvAm4/P55HMwW1C9tG8a/RmsGH1CnNJ/17UakVMOx7kAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-cruise-pause .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHySURBVHgBxZc7bsJAEIbHdprQJAU1ckln3FM4J4jTIkSMRB9uQDhBlBPECIk2yQ1MSeeIxg0KZQoKKpSCR/4xtsXTNmA7v2ThHe/ut7M7O7sIFEOGYdzO5/OSJEn3KGp4ZDy33ucxP6vVqo86H71ez47qT4iCLZfLJ0EQmhuQKNlo89rtdk06FVqtVjV49kZrr86RicG2TdMcx4LWarUWGjzT5Rqjn7tdsJAi8Ch4C4op1TGl75S8GKwCPOWC6FsRNDKAL5SOZER30HcAhbFFEUFTLBapXC5v2fL5/J7tiOCXofHLlVfikRhRrSqVChUKBXIchyaTiWtrNBruYLjM9jB5jlmup4vFQqMYyuVydKE03vsuVBTFR8pIcFD317REGQlRXBJ5PSl+iktCskgZC57eZA5l/Q/Uy4lTykjYq1++p5EHb1LC9rRdKA7dT8pO64yERG/SmVM8m81OqW7yckr8Ztv2r6Io1whnLawF59fhcLiVY0ejkWsfDAYUJfRfB+snOE85J2KRvym9RGF2Op06vwRbhg9YHgmlIz7E235B2vwC1x1VVdl7jZLT3nVF2q0BsJUg+ODFTDpU0wP3PfC5a2wB+BD7CuqLgws/TQQYn7cyxYfxfdc6ViEUujMAHUlER4cKHfhbATvPjBUG8/UH1xXJDxHoYGQAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-cruise-pause:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH/SURBVHgBxVY7bsJAEJ01CAkJKUhUULmiDSnpoKYINyBuQIgi3AA4QZQKIQq4QaChhhuQCxAXSERUSDSIb944axSS+CPA5kn27o7X+2Z2dz6CXKDT6URXq1UqGAw+Hg6HDB4V4qj8rAsh9N1uN9rv971KpTJ2Wk84kW2322csVv1BYr+gEGMo8Foul7uWc6w+NJvNjKIoHXRVOgMg74K8AXLdFWm73a7BujpdDh3rZH8TCw8JLYlPSFutVh7NG10feigUetA0bcEDxZTiDFU0L+QN1M1mc1z7SBoIBGrkcGkSiQQlk8kTWSQS+SP7D3CzJ76c3A/yi61kodOP6XSaYrEYzWYzWi6XhiybzVI8HjfGLLeDNGxoWpohF8C50CXgwMK+r0gNCuQTENnyitQgRT4BQSOlyFvrKsRdCapC/uPuFqR0G1IZExfkH94NSzkHkk+Ap4wNUiTqPvmH74gUDoe7dOYWr9dr13M5sfNxBnjQ7/dXuVwuDGHG7ieOr9Pp9CTGzudzQz6ZTMgJ2FFtMBh8HvMpx0Ro/UEeBQq2slgsatw/uoxMsBp5A64WG+bgxE9LpVIPpUWDrgv7csUE4nEdlWCNPCC0JJXEF5Wg8MchHs11CWpCVvZVkBfckksyrneHVnMEuQRXitiqPBS4lwpEJYmORkc7Qju0IzPxBZ2t+3mW/JtqAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-fog-open .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAdCAYAAABWk2cPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAKgSURBVHgBtZe/jtpAEMYH28WJioIa+URDF8MTkAalO6cH4YIiFbk8QXS8QO6oUlCAkGjDtTRHJBoa4nQ0KBZdJApoEAV/Mp9jkAF7bXPcJ5ndtdf725nZWdYxiijDMBKr1SqhKIqKNpdms9mcRxkjFqZTsVjMy7J8x1WdL9WjC6D97Xb73G63m0HjxULAvnI1T+FlMfxBBPeEwoW73Q6we7pcViwWe8+utwKhDFQZ+IOrGr1eAH9ksOkLdSz8Rd5xu1RzBmfdFkvupwz8dmUgBENeYNAZtFQqGVwY9DZSnTVi6+Decrn8h0JYWSgUKJfLHdrL5ZKm0ykNBgOazWbCd9nNt3CzgoZjpUohlEqlKJPJHN3DJHRdp16vR51Ox/ddTiVkw70NlSTp7rRDMpmkWq1G4/HYvmANSpHghXg8To1Gw/M5W1oGVEZD07TvXNy4O8Btw+GQFouFbV06nabRaGRbhbaf8AzvTiYTr8c32Wz2p8KrSuMgJ7x6IEa4AIuivau9tNlsNGm9XqsBY9gxhOvCCi728wa7OCHhRzQAZl2pVGyXRZEoBAoFCDGs1+v2QooiUfpIHE+LBEL+VatVezVfDcp/whYJhAWBVHFvCEFCfz8op6cpORuxJRokajz98tSRae+97OJnUS/RanQLkwNQ4FrzsA2yyU0Gf/br2e12A90LlwYAkS5Pdrm/wRs+/rh1ChAshuV7wTqAQoTAarVat6gorll8YWvzXBXmbdTUcY3/sK/L+4ppmnPeF/9SCGsvAXIsH8+gDthkMFyepyuJgS0GHh3w5NNOzO0zeMHVD/R64BMDP53d93vBORW+0GVnpvmpS0NBXXDDSacwR9K5kxaPok+NUJ8VDlzlQucJvKNj63G2/U3/E78fZqx/rk0w4ggu8jUAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-fog-open:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAdCAYAAABWk2cPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAK2SURBVHgBtVa9jtpAEB58/EqArqCBBqehorgTVDQxPVJOiD5QAEJUeYLjniBcgRACKeQJQsQDBBoqkIigookraC1BwT+ZcQBBsNd7Ovgk2LV3vd/M7PyZgBPlclnc7XZPFovFv91uRZPJdL9fktfr9W987udyuRbPWSajDUgm3d3dPSOhBMaQUaAXu93eSKVSCryVtFQqPaBWXznJNMlR8zo3aa1W+7zZbIo4vYd3QBCEQjqdfjEkrVarzyhlAa4EvOt6JpNJ6ZJWKpUnHH7A9VHMZrNfLkjJO9Ecv3Aqwg2A1osevFs4vCQP5SF0Op3g9XrPflar1egzut9vCNVHzPS3j8EkcCAcDkMgELh4PxqNoNvtwmw20/tUXC6XSRyLqqZ7LS80CgaDqiY8IEESiQSIoqi7B53qE40qqVYsolTgdrshEokAeh9IkgRGIDPTPhJYC8SD4eg3k52RQNQi7XQ66txms+kepEUcjUah2Wxqrq9Wq6h5Pp8/4CUzD1osFuqPFwfnIsE1IBKbyDqANIzFYhCPx+EtYPmCGQxAppJlGQaDAVwLaFlBgRtAx7T/SNGNZWCg1WqpoeP3+4EX0+kUJpOJNiEqKWA49HGusA6gwPd4PMCLXq+nu4bpsK+6LVV9YMDlcqnkPKD7JyF1oFD+PSSHV9ZB4/EYQqEQGGE4HEK73dZdR+Ua6nh4gWXtD3AkfCL3+XzHZ4pfyrekIQnHApr2A2oqn4YM1TvDWkr3xbozPVAxJ0KaH1MRFllSvQG3gYztz7FtOct/mLqorZDhulD2BVzWJKW2kTZckVjBnviM8IKUQBtQ40ck/w7vAIUhnvGYz+cvwpHZbGNHkcQMwtXGnICs9YrCF/Q2GHb4e3IJBxLgo44ACsY6afbT4XDUWd09N+kpqOhTDT55Jf9/Z0b4C/UJLQCcLGi1AAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-fog-close .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAIjSURBVHgBtZe9UsJAEMc3l1Q0WvAA2NEp1MyInVbGnoE8AVrSqW+gT2CY4QGwpTEFNcaOEqksKKiYcYYP/xsSJoRwx8f5n7nRu9u73+7lbu8waAc5jnM6m81sIcQlqhcoOZTTsHvAZT6fv5um2XZdd6Caz1DBMNm9YRgPMYhKHhx8brVaHu0LrVQqNjx/2wOWlAtnn9MiT4VWq9VHDHii4zXAPFdJsPGPwK1gIwHk7/dC+sXgAsBjroioFZsmpznCuHKLxeIxqqwirdVqvGmcbaOy2SyVSqW1tuFwGJTRaES7CEGd8TJbXOEo4YkjG8BQ27ZT+7rdLrXbbSUcx4+P3oOIVQ4Wr0Cj0aBMJiO1Q6Q1PvsirFzSkeKVqNfrKjM+8xeCybRMbUcrn88HRSasqs2R5kijisWitB+reiKm0+mhaS5VvMwqCdIs1WYKoJZljUmj+NwqobS8D7Wp1+tJ+5EPvkWYD33SIE4S/X5faoOHgCdC+jsdKc5GnJUUGiNIzwrpbjwh76tOpxMAJ5OJyjTwKp7wP/CnvM06LeFzdPwNd4AFihL+Chom/U86/HmiAr4CGOR4M2r0fX9cKBR+8e816deg2WzeRJW15ABPXvgxRXoVPFfiDWbSAhF7iJiXvUyagMmHmZlmGYK/aXn7HPSNAWui3AH4s9EnG8ibiy94DL6l3W8jL3zvetsMpNCEAw4cKGPCc9r8WeGj/YuBMlikP+yn3EGZYjlWAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-fog-close:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAI5SURBVHgBxZZLjtpAEIbLjUFih8QFnBUrJCIOEHOCROIACStALBhOMMwJMlkgBCyYnCDMCUJWrJCQYB+zBwkJFiBe+QvZyEz86IEezSc1dj/w76pyV5dGEnS73cR6vf4SiUQ+HY9HE0MJu5GmaSNcFrvd7hn3vXK5bIU9TwsTw8Oqh8PhzhGRoIf1tSBxX9F2u12FVfVXiL3ksVgs1khWtNVqfcfljm7HgtW5l1Zrbyh4Fo7FYh8LhcLCGRDu2U6nc69YkDG22+0v98DZ0mazaQgh/tLbUUOMHy9E8eH8treDJ8lkkgzDuBibz+c0m81otVqRBAu4+QO7WecerDSDBB3RbDbrOTcej2kwGFAIvNc5dPVTTLHpv9INpNNpyufzBEsC1yF81dOVf8KslCHIEy4SjUYjIxDLDDoGKYAtDrNW13VT7Pf7azOOJ6lUKnAeySLB7jVIIezmMAS9A/igxIIUwns3VBQ+HpFCLMsKnGcjhX0CKLF2MpnQcrkMXIPzuX+KKax9phthtw6Hw7BlVqVSGel25wntqqy02WxOFnLj+xB6/HNTwmdXTqdTGTHmfKA7lhKSxAOCbPr9g90n82X6AcGfTgVxUTngtKlD+J4UAw/2S6VSzulfJAe8SZ3fiNRiQbTgHvgvI0H4Gxb9IAVwTexVmHmmQbiCD1suHy26En7xaDSa86p/A4ttrpuIT3ohpLcTxw/tAWJ9vzUaSWCLm3DXZzS+z7hELFzYjX/i8fiTu9T04x9LgQk+PbvDKQAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-wiper-open .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAALxSURBVHgBtVYrrBpBFJ0FFAqBqCIrUXRBk5QaUleewBBIlwSDoW1CUlzz0CSlaJJHA8FgqMBg4CWIKkpRuEfQCDAYAvSeYYfsLgss6fYkk5ndmXvP/c1HYjaQTqdjbrf7PQ0VarLWgBW1Cdput3tutVrdW7qka5OZTEZ1uVwfaBhj9jDf7/ePzWazwe4hVFVVPhwOT3cQnRFLkvS20WjMzRMuCzKFyH7/AxkAg18oQp/ME24LsgENfcwBkJfvQqHQejqd/jr905HJGpnMHIYW3iHGp5AS2df/QabpfiKHfCdCVCN1qh1hv9/PIpEIi0ajLBgMskAgcDZfKBTMYjJVL8+nh7MeS/8ioFiQbDYbtlgseA/lXq+Xt9lsxrrdLkulUmw8Hp/poLB+JC+rkpa7FysiKEokEpyo3+/zBiIrr2EU1kKmWCxariMvsy46IRJWZFBSLpf5GApgvZUSYLlcstFoxMfwHnKQN4Mi+cYdDoe/IGpmslKpxJV0Oh223W7ZLcTjcb6uVqtxLxFayJtkfSga2Sycy+X4YnhlBzAQhGI9euTRqnhAaNjkKA5Unl0yALlD0SC0Au12m/fIvx5nRxsEYV2lUrHMgxmiYMwGwmiE1qzDrSiKSv0r8QMxF2Wdz+fZer3mhXAJCP9gMOCGAiBJJpM8h6jqXq9nWO+hLfGH9ohiVoTFIEbxwFqECMoQInwLy4V3mEMe0SB7YWtMJJzoVK7fLnkgKg65BVBM8Bj5gjHwDORoGNfrdUMu9SDnfl7d+HqAEArFCYNQYoxtAODfJSIBimTWpV2Swxt8PLwiRAgjGrwXuEVGmBNXw6MxP5KXMWYTCKs4U+2COH6g59tCu6uG7A7AYxteCcypVU+EmgVZbcJxkO4HcmplIEQuMcGOTz8nyT6T7on4Npw0mMBzgDnkqUZWNfyzWujQM/FB79lVQh2xeudbZ0VE36mvipzdRagjjtFtnSBlr9nxuS9uGCidk1HPdFp1xcvsGv4CcbeEIeSIw9MAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-wiper-open:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAM0SURBVHgBtVa/SyNREJ7dBLVQELU4bdwrtFJOUCxsXEG0Ue4OK6tLKhEb/QsO/4LzChVtvGvE0sPOxtiYJuFyJBBICtOlSSAQCEnIj5tvyC676ybZYPLB4y373ptv5puZt6uQB1xeXup+v/9zs9lc4qHxK621VFAUJYbRaDSeDw4O7rvZUroQBXw+3zcm0ckbMkx8enh4+It6IWQijYlueiByI95g4oxzQXW+OD8/X1JV9e87yACNbbxeXV0dOxcUJxnn6okfx6l/OOHcnr0hhIzsFcg06jNa8obwbErKOfs+CDIhUdUbxrhJiGrknAW8HB4bGyNN02h+fp6mp6dpcnLStj46OkpbW1vOY1q5XJZ8iqTX19dPnYpkZmZGSObm5qharVI+n5cZ5ENDQzKy2SxFIhFaW1ujTCZDqVTKaabA+z4qrdy9uhHB0PLyskSTSCRkVCoV16gRLfYODw/T7e2tOOQE5zKocmRf3Mggzd7eHvEtQnd3dxSNRl3JgGKxaEaE6HEO553gOllXuQ3W3ch2d3fFyMvLS1siKxYXF0XWh4cHOYfzUMgKpE1t3Y026LouhxCVF8DBhYUFcz9m5HF7e9u5VUOV2pp8dnaWpqamPJMBKysrEh2kNRAOh2VG/q14c7XhILzb3993zYMT2IOCcTo4MTEhkqKgrPCx1gGePxgv6vW6EKJYNjc3qVQqSSG0A+RPJpPiKACS1dVVaQ9UdSwWs+33c6n+47ZYchqKx+NCvLOzI80NiWAMEkFyeM75lx5FdFhD4SCXIEJluxRbTLm4uDjmcv3RLgIYgrfILZBOpymXy0m+UImIDLLCATyHQiFbLq1gB/90bHwrcNPAILwGAaREcz8+Pso6CNsRGZDGx0eS8xXqRgh5DYkgIwZuFQPdyGACfwJ+PHGhnHKUOnkEetS4U72Co/uNWdoC3yovUVqBiD1EZW4fGRk5MwkBjjKIBRoAarXa12AwWLARIpdY4McC9RcnR0dHZjPabhosMOkG9S9S2/8MMLDfRKhljawjoYU4wNXby79OgavxJwrEyFlPhBZinasYH+pPPOMaNL4wMJphJZ553Bt/Zp3wHwTYnvHjbDCuAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-wiper-close .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAA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EHpxPIJRDDH6qFA2UmrSSrg0SO5HJLjhDdUxue+bLtQG7QqR8ggVvC4beCFHumRMSxVJxEJvEfnFm91YrgD/sAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-wiper-close:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAANwSURBVHgBtZa/SyNBFMffboJaKAS10SZ7hXqFegGbCyjmUPTAH3eHlZWmULG6u/Kqi/9BLEQRIdoKigf2l1Q2ChGtBLmtFAQloPgL1HvfRyZuJhuzBvOFzezOj/eZee/NZAzyoMXFxYjf7+99enqK8GNxlZVtyhiGYXOZ5vo/MzMzW17sGaVgPp/vN2DkTbZpmqs8wfloNJqh10AZZjEs8QpYAfzx8TE6Ozub9AQFkGf7l55dWLbYTmxqamruRehbAl8CG5UEOvTNmWSmekHCVAgIJVgB9eHHD1bJSTPp7NXe3k68Hejg4CBvdF1dHTU0NFBVVRVdXl7S/f09nZ+fl2BS4Pb29geXMXyIe5eXlxM6FMaHh4dpY2ODGhsbybIsamlpyUFQog/geE5PT2l3d5eurq6KgTPc7x22kpGN5T+3Xl1dXdTa2ipGDw8P5bm7uyvoB3hTU5P0t22b9vb2ZFIu+smxjSOmEbfW2tpaAcJgMpkUQ25ACG4+Ojqi7e1tqq6uprGxMRmvi8P1BaXJLyE34MjIiBja2dmhzs5O8iLAMUGMw3h4yCkOobDYs+YHfXAkEpGBWJ1KJMTUqzAObh4cHNSbAisrK0FTrw0Gg5I4GKiEBAmHwwUzV2pubpZJOV0KD0EIkS6TlxxwViALMcvx8fGcEdQhKzs6OvIGYxLIcEwIxuFSvEP19fXSjpzQ5RsdHf3M5XtV8fDwIFDs0f7+frq+vpYtAjAMwu3oA/X09MgqEcf9/X1pQ/wBQhuyPZ1O56/SNOO+oaGhMAM+6rM5Ozuj4+NjiS+M4B2ZGQqFBHRyckLd3d2USqWor6+Pbm5uZAySqa2tjdbX1+VbU2Z6evoX3JumIoIBHA6ATUxMyCl1cXEhQOxD1ON9c3NT9qjufl2K5a+pqdliA4liHWEc7kOiwMXOvYpvwJA02KOILwS3FoGuoTTlWDKMJJUQ4qwfDmoyAwMDkkiYIBIOsS2iJH7k7MW1JPu3VpbUyYWVw91u4oWtcjyjOSi0tLQU54bvVBnh+vKJry82PnKHAydFDI1UATFwTgHzoIgtZvPW4Cxw1VlX0YtZFhjT6wvOXrgBK+ZnjcqXimHMrbHUZXuSV43kCpE3IUTzvPfjr75s61pYWAgx/Ctndy9/WlxaCsKPzZs+xc8Ww9IvwZT+A8hTw5fcMmXrAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-arrow{cursor:pointer;position:absolute;width:0;height:0}.jb-pro-container .jb-pro-ptz-arrow-up{left:71px;top:15px;border:7px solid transparent;border-bottom:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-right{top:71px;right:15px;border:7px solid transparent;border-left:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-left{left:15px;top:71px;border:7px solid transparent;border-right:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-down{left:71px;bottom:15px;border:7px solid transparent;border-top:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-left-up{transform:rotate(45deg);left:32px;top:33px;border:7px solid transparent;border-right:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-right-up{transform:rotate(-45deg);right:32px;top:33px;border:7px solid transparent;border-left:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-left-down{transform:rotate(45deg);left:32px;bottom:33px;border:7px solid transparent;border-top:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-right-down{transform:rotate(-45deg);right:32px;bottom:33px;border:7px solid transparent;border-top:10px solid #fff}.jb-pro-container .jb-pro-loading-bg{display:none}.jb-pro-container .jb-pro-loading-bg,.jb-pro-container .jb-pro-poster{position:absolute;z-index:10;left:0;top:0;right:0;bottom:0;height:100%;width:100%;background-position:50%;background-repeat:no-repeat;background-size:contain;pointer-events:none}.jb-pro-container .jb-pro-play-big{position:absolute;display:none;height:100%;width:100%;z-index:1;background:rgba(0,0,0,.4)}.jb-pro-container .jb-pro-play-big:after{cursor:pointer;content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;width:48px;height:48px;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAIVBMVEVHcEzMzMzMzMzNzc3MzMzPz8/Nzc3MzMzMzMzMzMzMzMzLVn6fAAAACnRSTlMA+duduRUwSGSD8toSsAAAAI9JREFUOMvV07ENgzAQhWG3lLSp6MwCViYIRSpG8AiM4FWMaPymDBKESMF/cQ0S136F353vnLuo3gp1kOYEoCXW4LFKIZAnqAXYICeASoAdzgG+cApwgF4EfwF+oDkCqIwA6gnyAKA8AaizQhsBAjzuqUHofInGIQbjRxXjMrTJuHDestR4Bng4eGrN0929PqNfzC6h06weAAAAAElFTkSuQmCC");background-repeat:no-repeat;background-position:50%}.jb-pro-container .jb-pro-play-big:hover:after{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEVHcEz///////////////////////////////////////////8Uel1nAAAAC3RSTlMA+rbVFUecgC7rYhEEz+4AAACbSURBVDjL1dMhDsJAEIXhdeiGpKYWQVKDWc8ReojFc4ReAlPFFQazad7lIGkb0jK/WEPSsZ+YN5mZEP5UrZIP0vgE0Kv3oPlIJlAk8AJM4ASYwAkww2+ABfQg0ImgugPYsfNBVl99kA0AsjOArAPQpRTGHiBB8whxM0y+3skXNltsvMYriIWrpWPA80mFJ5qL3gAfB1/tcAt7rzdiV+HEgs1oBgAAAABJRU5ErkJggg==")}.jb-pro-container .jb-pro-recording{display:none;position:absolute;box-sizing:border-box;left:50%;top:0;padding:0 3px;transform:translateX(-50%);justify-content:space-around;align-items:center;width:101px;height:20px;background:#000;opacity:1;border-radius:0 0 8px 8px;z-index:1}.jb-pro-container .jb-pro-recording .jb-pro-recording-red-point{width:8px;height:8px;background:#ff1f1f;border-radius:50%;animation:magentaPulse 1s linear infinite}.jb-pro-container .jb-pro-recording .jb-pro-recording-time{font-size:14px;font-weight:500;color:#ddd}.jb-pro-container .jb-pro-recording .jb-pro-recording-stop{height:100%}.jb-pro-container .jb-pro-recording .jb-pro-icon-recordStop{width:16px;height:16px;cursor:pointer}.jb-pro-container .jb-pro-zoom-controls{display:none;position:absolute;box-sizing:border-box;left:50%;top:0;padding:0 3px;transform:translateX(-50%);justify-content:space-around;align-items:center;width:156px;height:30px;background:#000;opacity:1;border-radius:0 0 8px 8px;z-index:1}.jb-pro-container .jb-pro-zoom-controls .jb-pro-icon{vertical-align:top}.jb-pro-container .jb-pro-zoom-controls .jb-pro-zoom-narrow{width:16px;height:16px;cursor:pointer}.jb-pro-container .jb-pro-zoom-controls .jb-pro-zoom-tips{font-size:14px;font-weight:500;color:#ddd}.jb-pro-container .jb-pro-zoom-controls .jb-pro-zoom-expand,.jb-pro-container .jb-pro-zoom-controls .jb-pro-zoom-stop2{width:16px;height:16px;cursor:pointer}.jb-pro-container .jb-pro-loading{display:none;flex-direction:column;justify-content:center;align-items:center;position:absolute;z-index:20;left:0;top:0;right:0;bottom:0;width:100%;height:100%;pointer-events:none}.jb-pro-container .jb-pro-loading-text{line-height:20px;font-size:13px;color:#fff;margin-top:10px}.jb-pro-container .jb-pro-controls{background-color:#161616;box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-end;position:absolute;z-index:40;left:0;right:0;bottom:0;height:38px;width:100%;padding-left:13px;padding-right:13px;font-size:14px;color:#fff;opacity:0;visibility:hidden;transition:all .2s ease-in-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:width .5s ease-in}.jb-pro-container .jb-pro-controls .jb-pro-controls-item{position:relative;display:flex;justify-content:center;padding:0 8px}.jb-pro-container .jb-pro-controls .jb-pro-controls-item:hover .icon-title-tips{visibility:visible;opacity:1}.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-face,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-face-active,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-fullscreen,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-fullscreen-exit,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-icon-audio,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-microphone-close,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-object,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-object-active,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-occlusion,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-occlusion-active,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-pause,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-performance,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-performance-active,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-play,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-ptz,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-ptz-active,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-quality-menu,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-record,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-record-stop,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-scale-menu,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-screenshot,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-speed-menu,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-template-menu,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-volume,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-zoom,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-zoom-stop{display:none}.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-speed{padding:0}.jb-pro-container .jb-pro-controls .jb-pro-controls-item-html{position:relative;display:none;justify-content:center}.jb-pro-container .jb-pro-controls .jb-pro-playback-control-time{position:relative;justify-content:center;padding:0 8px}.jb-pro-container .jb-pro-controls .jb-pro-icon-audio,.jb-pro-container .jb-pro-controls .jb-pro-icon-mute{z-index:1}.jb-pro-container .jb-pro-controls .jb-pro-controls-bottom{display:flex;justify-content:space-between;height:100%}.jb-pro-container .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-left,.jb-pro-container .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-right{display:flex;align-items:center}.jb-pro-container.jb-pro-controls-show .jb-pro-controls{opacity:1;visibility:visible}.jb-pro-container.jb-pro-controls-show-auto-hide .jb-pro-controls{opacity:.8;visibility:visible;display:none}.jb-pro-container.jb-pro-hide-cursor *{cursor:none!important}.jb-pro-container .jb-pro-icon-loading{width:50px;height:50px;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8BAMAAADI0sRBAAAAIVBMVEVHcEx4eHh4eHh4eHh4eHh3d3d4eHh4eHh4eHh4eHh4eHiqaCaRAAAACnRSTlMAikwX3CxpwZ7zIGi5xgAAAZ9JREFUOMt9lb9Lw0AUx2Njqm4iGEqmEnBxslKUdhJctFMVcW5wKZ0CLpJJQRw6iVqQbg3FtPdX+l5+XHJ3796bQj557773fe8ujtOI+6jz5p84dHjTkYD4+RhT9CIRZWRPJr1bChnbY532GhT4oUpbI6HEuqvgIH9544dh9J4/rpr0Ms8oV3zMNT7X1MXSmaznzfHjM4n72moe5n8ryYrW9rKRvgf0S93JA7yKa9lbzUg3keJb8OVCtwkrFmoO4MnsAuj5rGqnZg+GZXUXkl9NjEui9n3YA9XgpMgakLXz6ujMTIgrCkPVv0Jil8KgKQN/wRN69hLcb1vrbR2nQkxwiZTGQ5Teb7TO8PUaS8Q03sE+zkjP8qbjzgJtEhRbV4gnlkOFeM7hDYNdxPbiYFvKSHN6L2NmY5WzMYPtplZdTxncRvn2sI+DHIoug22jWMaA12Y7BrXzrG8BX32XPMDKWVzw1bdMOnH1KNqNi8toqn7JGumZnStXLi0e4tcP6R3I635Nc/mzsMxl9aux9b78UVmn2pve8u6eR50j9c0/ywzyVl5+z84AAAAASUVORK5CYII=");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;animation-name:rotation;animation-duration:1s;animation-timing-function:linear;animation-iteration-count:infinite}.jb-pro-container .jb-pro-icon-screenshot{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEVHcEzMzMzMzMzMzMzMzMzNzc3MzMzMzMzNzc3Nzc3MzMzMzMwv5ahDAAAAC3RSTlMAW+8S2UGVwyyZnOTRhEMAAAEfSURBVDjLzZKxbsJADIYdBQpsSCyVMlXAdEuQYGKpWFk6dWHJgsQ7sMDSpUv3PgITAQT0f7ly57ucQ45KXRAZot+/89k+X4ju9KzL4XOhlm3pR0enYrWViSRPXQIQSASkRSkIJEFRimYCuQAHSW89IOv6SH5TCsuAj68Ab1wDzqkAzqoC7AUAPtgsABgkBBgkCJiNHehGok//KRVsHqd+3Dj1/vukt3AH/Jj05s5/AmyZhFVWXDls44iVvfQWkCvgxU6g9ZdJfCLvjJbYaT3GvjOY4mQSG3SJGjhr/Y1Xohp+TGKqqzexZ/1GVGdNCitt6R8zVvb9d+JmKdl8o5sPWbtxT6zFuJcDQtk92MNmYiXHquYlZlVt1j4P6cd7fgHFW7Nhqu29TwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-screenshot:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEVHcEz////////////////////////////////////////////////////////NXt0CAAAADnRSTlMAWe+X2TINXUYZvctoYyuS2NgAAAEVSURBVDjLzZKhDsJADIZLCAsEg8WgEGCWGSwCgZxB4MgEAonB8wQEXoBH4BEWXgPJgEBG0mdgR3u77raRYAgnlq+9+/t3TQF+dKbZcJXSYSnzlViT457lRScKmBqILSFA3GoO8S4E+Ex5JiSJ4CbVdyOQdZNomX9D4dl+ko3NC8vFFmhPy8FIsi0ZlwLBW/LY5BxYYreUSgoFAEmhB5Rc9OCbUoXmTmDadQKTn4y6A/XTaoSKdb6KyGU6RJ7eHgpb3ABinAoil303xB6vQnRahNhXvMdre+fzOgxVrokX4jHAnBh8PALU8Eq8BqgTg/vePF8tpuPy9/NFaalSc273RizarYqfkswjifNMQ/TyTGMv4v87L+ks5gqDbc9OAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-play{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAIVBMVEVHcEzMzMzMzMzNzc3MzMzPz8/Nzc3MzMzMzMzMzMzMzMzLVn6fAAAACnRSTlMA+duduRUwSGSD8toSsAAAAI9JREFUOMvV07ENgzAQhWG3lLSp6MwCViYIRSpG8AiM4FWMaPymDBKESMF/cQ0S136F353vnLuo3gp1kOYEoCXW4LFKIZAnqAXYICeASoAdzgG+cApwgF4EfwF+oDkCqIwA6gnyAKA8AaizQhsBAjzuqUHofInGIQbjRxXjMrTJuHDestR4Bng4eGrN0929PqNfzC6h06weAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-play:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEVHcEz///////////////////////////////////////////8Uel1nAAAAC3RSTlMA+rbVFUecgC7rYhEEz+4AAACbSURBVDjL1dMhDsJAEIXhdeiGpKYWQVKDWc8ReojFc4ReAlPFFQazad7lIGkb0jK/WEPSsZ+YN5mZEP5UrZIP0vgE0Kv3oPlIJlAk8AJM4ASYwAkww2+ABfQg0ImgugPYsfNBVl99kA0AsjOArAPQpRTGHiBB8whxM0y+3skXNltsvMYriIWrpWPA80mFJ5qL3gAfB1/tcAt7rzdiV+HEgs1oBgAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-pause{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEVHcEzMzMzHx8fMzMzMzMzOzs7MzMz4IlKVAAAABnRSTlMA6xIU1hVqIuOVAAAAMUlEQVQ4y2NgGFYgLS3RAEQziQFZoxKjEqMSaBJpEAkgIw1ZQlBQRAEs4QhkDeIMDgAWx1gMHyIL4wAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-pause:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEVHcEz///////////////////////+3ygHaAAAABnRSTlMA7OgSFBXMmAA4AAAAM0lEQVQ4y2NgGFYgLS3JAUQzi6WlJY5KjEqMSqBJpEEkgIw0ZAklJSUDsISikpLQIM7gAJjhWp6XcaOxAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-record{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEVHcEzGxsbMzMzMzMzLy8vMzMzMzMzNzc3MzMzMzMxEZ/aQAAAACXRSTlMADPKKKeBxlV6neZ4mAAAArUlEQVQ4y2NgGDZgJhpowCURAJeYpIQENJEkCgWRgCeShAGyjfgl2EqwS7BFToZJiLg4ICTEImdOh0pwRM6cDJcIjpw5E6aDFeh8B5gECBCUYAkKCoMbNXNSOlyCgUEQ4apJJmxIEkjOVWFgxi4RgEsikGQJnEYp4pLA6VxUDyJLIAUJcRLIwY7qXKSIQvOHWCQODzKIleBPPjgTHM4kijNR48oGkajiYUMykwMAAfmZhUjBISQAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-record:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJ1BMVEVHcEz///////////////////////////////////////////////8NopmKAAAADHRSTlMA8gyMLeRw1x2DBpWGN2QDAAAAt0lEQVQ4y2NgGDbgDBpIwCVRAJc4KIgEZM4EwCU2KSEBHySJCcg29iBJGCBLgHUs24FdYlnNYZiESksDXKJALebMaagES8yZw3CJypgzZ2A6WIHOd4BJgABMgh2XBEtpaBjcqDMHs+ESDFyLEK46aMGGkEB2rgQDJ3aJAFwSUSRL4DQKp+VHcTkXxYMoEkhBQpwEcrCjSCBHFJo/1GIO408MOJMPzgSHM4niTNS4skENqnjYkMzkAEgzyFpeX6L3AAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-recordStop{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAOVBMVEVHcEz///////////////////////////////////////////////////////////////////////99PJZNAAAAEnRSTlMAMPndsnZj1CSYPcmL6wsdoU80pOJLAAABu0lEQVRIx5VV26KEIAhMA++p9f8fezatFDPr8LSrjMxwiWlqzRuMYKW0ENH46c3WuGyVLXEduuO83UyK59fl1jX5EEUXD9DOaSh43XEP5zUIdZ4pAecTofVnWSt3ip4rx7N61vjnY1D30CpH4QQR8vsP+RA5Rs3KpjfMU/pMim/LgbvH7DF2F8sU0owqapKLqgnhuGWwImUagn2zhUX6WQQoYkXG9WxSAJd700/ygsCpAoliaDsPiG48GM1X5Ft/06sfp8DrDE+3DpekWjxM6366fgEcnklC+AIIWYQmPEeAaUmjFOnhCLDfxZRH+w1gU5b/DYjfNcyJ0p7dxX8B+FwxQVtvAGB5ig0d5gFA5KbzS91hI8CenvlHflfN/XvzJQnxbBEko1gbvVnPii+FadSVRUEaYylQfJtpLB+aRG4LY/80yKdUbCraM0lozGR4ewZ0Wtnj1iC7hjWKNnjYmR62W15cLlL3+2pyMR09jccyuyUrHKsvthc5xsY1iWJ0Xk3t+2XP7AnWwrAQmBH6asXubmL1Z5Lz6o992jWiu9lnMSiQsK27FS9NxhCumZgB2fTBPFsFolhZr5B/D3o9sJAI6skAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-recordStop:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEVHcEwimP0imPwimP8imPwimP0imPsimP0imfsimPwimP0imPwimf8imPwimPwimPxLmg1rAAAAD3RSTlMA15sisGUvdz3szYwMT8H+hDJEAAABx0lEQVQ4y3WUO08CQRCADxBQchBiMDE24KswFlw0Wtig/oHzUWglJBZWio3GDjUxlhhrEzT+ABMrO2iptLLVRluDggI+xtmdXW73LkxxNzvfzuzszNwZhhDzdOxqaPGgYrgkOgFczh90ezAJQmpL2v6OHYnqk2aWxOTtAnu/O/Y5XNZXmTZjo3ot7aESwLdFeqAM0MoJkMf9ltwVQJ9PcQN0UFIJogvdJgLQVFMsAlxyBaPmVBDCE8W7qd+2SDsx0q4OwhSrCG134W54jDfKLjDNxaL8/9AAMM/solptRnoALBbwEPWYrOEzLnrZsTGoMW+fBHG2SiLPUNI6KMOH8QS/XsCMBYQekIEv7NGZF/Rht2yqmA4i3UG9O0iTqgMfhirDhRdU8XJZqqEO8tDAqje8IIt1r+I5HmBjfD9AxQ1MgJQRpc6GJRALHOAS1WRlhMs4VaSFzwIWzCUF3op71kdNsNs/FDCuA58YqCQl7IhN3WbDnlLtfjnuON515WM17c7w41QPOuBIzDT5wqi0T4ESGV3gjtTjkuPATwHoX9+cPRlmmvJ57YAir2qKy459QL/UhrS/uAu3xf8KiX3DI+b22t6jc9F/qfaum9E1pJ4AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-fullscreen{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEVHcEzMzMzOzs7Pz8/MzMzMzMzNzc3MzMzMzMzMzMzMzMzMzMzNzc3MzMzMzMxdHBitAAAADnRSTlMA8AwGYt0aUcg+til5kgmZywUAAAGWSURBVDjL1VM9SwNBEB12IcGkMagxNktQSZFCYimIJAqKpZ3Vco3YBYs0NkKQgBg4ECtLFSFVCGgQrERBsLayPE0Ip7n5De73BdKLTrE3ezPvze6+GYDfsAQKy/Rz0i/OZJjY9XREuohTKulS+ZFGiADfyZXU5uHktI44VH5apDx554aXwJqloiIwiEsStAjCAsRNF1jCmGqa4Vc+BvS4JkjwzyPE6xiwzsxxeTbZxqjkANSWZFkoIj5bQBl4aBDfkPDNpeRRialB+SRAFz8UU1sAaEUjSCDoJ7iukZJ1V+c01bFczM1pWaa+a0Rp7MHn4V8Z1R9vLLCv9WjKdVFfk77JP+bZdz35YAfKXx6KhKp93abUYVbrj49g9aAYSuFCLbPUwzdCsYEWTloXgw1oGwQbENeuKwxzXhxwAADRMFd+zzRc6AAASY6RH8VjUHaXTrlOpDgCUP3gelc01e2d+f16cWbnQ46BGCRNVsWAWQJVw2xGfUXVv2k1OsLfazXqblzS99u1FwKFvBJioXBY2+r82U75Ab7O0ypVV0wKAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-fullscreen:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEz///////////////////////////////////////////////////////////////////+GUsxbAAAAEXRSTlMA3clDHfdfDQbsVG00u4Cqkr04dRsAAAGaSURBVEjH7VXLdsQgCPUBAROdjP//s1UTDUxsz3TRTc+wC94bHsLVmP9hkE8LIdvgupt2tFhcpy2CMZyVxNePEoqDp4hwEGz5PTqWoZNzLrmD9riltBEYzzpZQ8bweXy56Qy6Tivsp5JQYtawuMH3eJlSxIJtdSSa4xer4lMB89pK23mKrwjZVpsRzLq35vEE3+r26h6w5EKppcp3fP2lIpTPWJvoXoobeNI1sM3haHvx56tu2sdElJ54GbnPQ7RZ1sCpl8qPEMXBNQ8vN82jNbzLCPzGSDOZj/2Bqd19R1rELIEbDFrUJfKYdlALbDuDMko/hz7t8DqtCfr8h1Vt4rn7eh/6Ph37ch20aW8McsfGCOXzcr+GOlQG1rJ2HSHUDO/4Mu01qVAqTCpCJfgZ3phTS2pKm5aZOMUbs7Q6nk6L8UzRh6W78jH+gD/VRxHokPuNgUGTaPPR+zDR1mrlvcGgwkAVacSbeoN4Z0rb5/6XLrW/2GTLk2NhXHRKzrqAt9cD4rr4ddvae0NAYgOICdZyvPj4UYRf2BdfbB8iWvnTUwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-fullscreenExit{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAG1BMVEVHcEzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxi4XDRAAAACHRSTlMAf3WqJmy+7azWNnMAAADNSURBVDjLxZQ9E4IwDIaLfMzCOTDSOz07OjLir5CR0dmJFVHIzzZtnMzbOzcyZHnuaXpJWmO2ji4GhpAzzZeQzw8FKCj1pMHss9OgpwsGOS0YGOcVUMPsfBVkmJoVCBJW0FFB6SFIaMKAlRGDnEiDkuM00lP3SmL6H5QSh+iIr9ZWVWntUV9Z4qWbHAWrhcUYNLC4Wwm3xb1r2mOQYoVn2EKFAVb81KHiQQq6L3vSUoMBUmSzgCKbVeiL3eTp3Odf8H1sxRAZZNZt/Vt8AHcPQbiQQVF+AAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-fullscreenExit:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJ1BMVEVHcEz///////////////////////////////////////////////8NopmKAAAADHRSTlMAe4Fzh7MZbKPtN8gpX19xAAAA3klEQVQ4y8XUIQ7CQBAF0CWhKQHDGtQKQFcURUgqEARBED0Aoqp3IKnoATAEW8MNOACmhQYKcyi6uyjmr+aLqXj56bSbVoh/J3HBxcw0ZfA2c3FiQLGeQcWh1lOVDDJTAeCbCgAR6QqCDj0xCEU5Bl2BIALKMwhdKjGILRUYfCIOEynlvABANk64M5jabJxHfJY2I76yzYu/ZCc0s1WbNYAQ3jxqwMoGHoqWGHpUQajEgcYYcKWFtjLE4FGJQewoxODRDQOqKPPcHl9sfzSXa/0L349tEDsOsp/8+2/xAY+BZBY9KhM5AAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-audio{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAIVBMVEVHcEzKysrMzMzMzMzMzMzMzMzMzMzMzMzMzMzNzc3MzMz8gU00AAAACnRSTlMAL0jMZKt96hGJsSKv1QAAAJ9JREFUOMvN078KQFAYBfCbJEw2q6SUyWxTnsJT2JTJ6D38Gb6n5PpT6BwbuaNfTnz3fEp9fZwAP7czD0MsGCzBYJcEYsGwBEHQQRB0EII1CMAWdAOzyJUvJ4jyDVyZVHKGpj9guEI2IuhaDFadYnCkIm9I+kPgn8t+kI7kOsT72HcwQnJR9Gofy8DrwwtHK8pLzdeALg5fNb6cdJ1fOjOGYrl5CLFcggAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-audio:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJ1BMVEVHcEz///////////////////////////////////////////////8NopmKAAAADHRSTlMAL0TQf2frEaZYt8E+idL4AAAAnUlEQVQ4y2NgoDdgUcAuzr4Hh4TaGQHsBp3BLsG+BoeE2hnsEkCDsEqADMIqATIImwTYICwSEIPQJFhnBjKInUGSUA2CSPCcOcIwB1ki5xRM4iiDDrKEzQlsEuUF2CVY0jbgkDhjMLQkEkj0IM4gQQ1EHMHOOXMiakRpTiQQtXgTA+7kgzvB4UyiuBM17myAM+Pgzmq4MyfO7EwjAAAEf+BAxqI/agAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-mute{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEVHcEzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMztXryaAAAAD3RSTlMAHd4P7ztyiy1OnKhdx7uY2gyAAAAB8ElEQVQ4y72Uu0vDQBzHE45C3SJFaSGjUEiRpJRCBifXokkpSv0DfOBrEKxUUSoFH9ClFAUfU7c4OARRCs5WjThIsJuDlLo4ldvPe8SYxGyCt1zgw+dev+8vHPcvYybvfCR2OgUv2CoLdI62bUn3gq5UJxOomZofXPUNrIChJRklfcDSiKK2bYQ6PiCaREk0EQoYPFYa3F73F+DGsBJLmAjBAMBKakG15KAxqIhd2KuK5reRccBDNbqGJhfSlnNc/kBh4OY+vaoR5QrRC0afKgxMrKdXNKI8yxRENpyd+i0VA6wMm5IOBmORCwfAFjGwolofevbuPrvpGhRgpVaqiJflrLuUQQFRToS9l894EMDe7q6yL7/G5wMATc5mQCiAvQo3HAbwLtyYHQZgTxhohgGUa/CP12EA16W2/Ou4ZEj1dNG9oPMkZGiwJWQ8j+huPoJy9Z/XHTfUFSbAURveCtE5px5vs7hQDKS25FSDn2KR5Up1/lRmIHne7BvKd82LMRJbSjr5M40lmaYZ5/PRpiCpizjJyk+CwOGOzACLpSdz02QxkiuRhd8dNOwkV7zl2YX1mcySKJrQiPkXY9klSt6rkJPRwIlmzrcWSGyzHuTb11V/N0y/S6SdwdCR4m/47OIN7XOQCfwJwHGp8IcfyRdBLEZK4Uxp6wAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-mute:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAP1BMVEVHcEz///////////////////////////////////////////////////////////////////////////////9KjZoYAAAAFHRSTlMAbk2o8o0P5TsGnVojFi/XHcV9urLaq0oAAAIQSURBVEjH3ZZZkqswDEXxLM8T+1/rkw0BuwM0f131+IvDyZVk6SrL8p88QCHp8UAnWmoWoG8AwQRN4/vOiqwUuwWqiob646MMhEW+KnMLMIXffgiZoODBusb7kCzjByF7OOszkOyp4amJ7fWVPwCN6BpyWRypvANPCvi7u4aTXe13YI+KkYA5bMRTSMlLnSyGwisSH40B0FJOrKVB6iAw2U7sGgPgQ/DTPQjitCOZT4Q6gWCtGwGFbSM34ENUNSpAKTACmC31rnRgJwjDdkFAJpfkAsZcAJvCSVQB2FaWWKdB/ATMAHwIUYL21lRBZRDiC5AnsBHBUqxEyaraFMoz0AnvHNa6xDWS34FGgNf6PYAEZoCt+BroUWFVbeb5HbCqSvB2cToyca+Adjlycdawt0C/HeyScl1W/w3gsU3aAd7JF8AuAN6isr7NAogXAFeq59Ec7ifAm49hF8wCMWfVNXAeCAkjEGuBr6R5ZGJzBrl4gGniBME+w8aMMyCsNZtfaemnmYaAQ6I3Rz0fnDhHJxc93Vrr7sHWjP3XRtTba2L3EkdFVaPC6YmXxKI9DGF1YPLdiwfD2r37cL5nDVw+uKzU5K27hsXCXPtyC2uyyl0D0p2TY7VaIvFYWU0Dm8TdOXmrVp52HG4lU4K/N38PpS/Kw70dbmb/sC0WCcQwNNzzjrzUj7veUyIIyL/4m/EP8V829O8zh5EAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-ptz{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAM1BMVEVHcEzMzMzMzMzMzMzMzMzMzMzNzc3MzMzNzc3MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxDm1AzAAAAEXRSTlMAHqw+E8It/gjxc03jhGDTlgAjE2kAAAI6SURBVEjHpVbZkoQgDBwg3Of/f+12gtfMbK1Yy4NampCju4Ov1y8ruNyyo9fyCibVlNW6vUu29GpWQwTVdPTernqwffHex0WP4Nro3k+PrMKCvew/PcZ95aoNsY9yua+cGxTZsnf2K7ch4CAdGnWwYx/5LgKZCgxGdrhH3BeqNmnwviFXPZbQJmcM25HJ5n7/Pczr2QqksMJfO7BJOHLKLWFdMiL1QXYRwFagMklb4GB1zS7s8Le3fqH7Q28tVLkKdIzeaOJB2OKtY8KfTQCUa4++dNsLbrqpTR7xguHGt8hfg8P+seuaEkNdBjahzOD7g1cHP21SL2LtMNBKMdTRJjffTX1wVgrsEb1ITJU6QknwYJAcQky2cE02NbzPp70KyKggtpu9xM7Ik+CBIqY+8FrYyRUkrs+MEm1TG6tG9LZxNDNFGDue63TYGgIHqUUcuNhvhyZtn5LnlDq3Juxa4noCuX0scErOpNMDCrVcHPCS5rFGuQR9KZpxnB6CQ0ZO+AIBcTPk3UdbTx1L7jLEEHsMW7ZYm8NlIFyxn8+xdL7MURYEhzd5k2N2TabxIAORwC2r00QQfNSgrnqTJfh7cDmDu9ggtV0EZFr7kGu4KAxtNDln406TLwF9iZCIwn9EfjPuncRHYm5x3NfK3cFAS5kWxljSnTFlPHBAUFg5HsCCVOd9cdwXq+027un2QJlMjqISJutCDceRtTTuT4+1Q3HWHR8cu0fh9sGvADTYH9iLah/9nPz5+/MDJnQfoIVoAnQAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-ptz:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAQlBMVEVHcEz////////////////////////////////////////////////////////////////////////////////////1bZCPAAAAFXRSTlMAeVoYDS1pBiPv4/g6lkzO2qSxvoixscijAAACi0lEQVRIx51W2ZLcIAwcLnPf+P9/NS2wp5xkq0ziF3ZRC3R0i/l8fvi04oxx89n+RBi1sqB38TKw7lw7lNzDa3U0e57bHhJ4d567HlqGC08eLAj9Gv8XD4/OwtsdhlfCW2s9LfWtuNrMhG1uLWP17Xh14LF4m8dx1OJ9jkm85YCYch5JzDVy81on3MFYkpTNYGmHHloYI+aqlNhlh5ZSvmH1AyBUwPcMX+u/clW3XYvA2YgRGXyZIZX6PXv0l3GlV9Jp9FKcK7mytJIg8xEeBdaBtV4P8tAixexnp73tY7ZBkrk9WEL8t7ZUDqtIA3jXa8sODSeUVqw5aztT+g4QeNAgM0PGTA0+EmfVeUvU0CEW4hX+lt/zseE7jJKDSmi0EUKBhr7EAMKPvNjOA9Fz4Yk/CFgcGRSdkYOHCLRxQfzKRN5SB/b5Ot8SzzQiKqcb6ipFdCfi1JI84OBdxzarhJ8RkpxHOQszl7bpn0GpmnXq6R4OfTkwwlyUWzeQg7rSLNhNUzEUEqJF3DMHeeXgqRIaYwHimLKipK8hMZOYVfJ5oKtIFSgXk5z4KcNx3GOIPGYfPigh9YGHBNQKVKbZhxMnqq+OHfWBHARZfWm1dnfSXfJuXInplse8wy39zkisdQ5kuLY+Bpc5hwGiH8Mx1rE24DFaLqXkfrNVkjk+8JPTPF0bUw+R9MCVuA8ks/xDyF/9orMqpBQeiob5RbIbmv7/TxvoX1Oqa914TsYg7QUWx8Y7R89JQY8mY6Dat1G5GARuMOgYHY9cbL1vNvc++fk67olLk4nrQSl7457OPqdeKn+vEwm4LPzW87DyXvqIyei9znHS+cZz9SxV+Qf8nNbjn37NkDx4+PmCXzHOLUMtjgmUAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-ptzActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEwgmv8imPwimPwhmP8imP8imPwimPwmmf8imPwimPwhmP0imPwimPwimPwimPsimP0imPoLqfILAAAAEnRSTlMADprCJBnU/gXwh3LiUKxAXjJ/ELXKAAACbklEQVRIx5VW2bbjIAwLa1jM9v8/O7Iht+09MwPlpS2VwLZkJ9f1lxVG1joPdZ0u1ZIxurhv8DH6dMpQI5t439GAEc7xYPgTRnAtV7plReRhd5kDP8+fd+wzt70yPhIJzWT7/6DCJCAYLReZPMIuJC4pClSktHqbNpJO1aTmmAme3cvtWs9NSfq52CPhnJNjlbVHwgmWSWGHeQHcKFjj7fygwidf2fa4mbVOuladcnsoDn9/CKKAWf6HEtpANiJvUp9Fgr0SvocPP/sqjOCK9ktpyCAo4Kt/d4n4/6baseNKAt5XrauPN1A4ZLAd30RUI4kNfELVx+yd3lrXYIg1Bp/B/dGs5N8mPsJoVyiwkofQSlm+K9aiwmoQMDoI4wefoK/rhkESrSuV+BR2i6HZH9juLzxCtBmn6rFmB66gNJQwBOSxncT/N3FAlxAoLQfJDy2+6rMLI3aznl9fhOcGSdZzoNhex2K3TXJEVe3M4Zb6QhHuJc5BWakYIqqietcPw6FK+EHofUHRqtLEQ5X8dKVENXXgEpLOpcjwkFI30YFVHE8fyx2ShZJ/ydTKlZwZ4BCOv/af9uMi0DILe4kieynScgPbhai+DRDckTT6N6zJpI3HMghM3BMg+q9pHmwrbR0Q0D5wc0JHPy0E5Ur7Nf3Rk68LnR0NHfO28/T5P4cNr+uLFR7eEdiNxvMRbd5Onlqsis4iIVdme4di3akWOz+3T0aUnFWHa8QZrO51NO69MeLPafrNuBenxel/3d21j8k/jyxf+75OQabFxOtuT94G3Lpjzb0zBn2Dl0ep/waPidQ/p/XB60Dp7e8F/QO7WSJg4zEzdwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-ptzActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcExru/9ru/9qu/9ru/9ru/9ru/9ru/9svP9ruv9ru/9ru/9ru/9ru/9ru/9ru/9ru/9ru/+3uxEqAAAAEnRSTlMA5q0cR/PC/ggSKtN5OIhaa5izIOiAAAACV0lEQVRIx5VW2ZLjMAiMToNu/f/PboNsJ5PaKWv8kKRkWkDTQF6v/zyUfO+JX9sP1dKKd/v2acQcm992kbo1R4il7iHIif0BRNtCUOozH4cikAdt2YfjRLTnzN15/8I85wFCI2xDzlnyMLO7R0aFoTzbFGB+jIkYLkyePvmW8d2fs2ZfZuv8It9s6zvV5uSr2LmKb9oVh37QvpjYOcf8fcO3Cb1jGqOU0SvTTd6X2KUBLgKdLzaiDtE2n+isTh8/+AX7E6/Vh/NNSyfVm10RXIe1nxXRapmsDQB7SMnkmE0IxgqvUn0jteEf1T2CHXgr0gjZllGk1HoJL7lD7fRpD20CgJcwQ6EdSh3lLK0zVfuqz2WvPlPJh7HqnCQ4MysxoAYQE0vHub/toRuqzRy5pEUvbg62MzlJQn1MHBe1x7WSAddpNDSN1c9wRMhKfi2jrICwAIsQvHkD7Al41bOrBNC1Y7QdmSg15LDokGETJB/imxYJKfmFMDqI3FjUkDS3NSEDjBaxknRYSb+4nj4kC43W2OKrkqGB8jV2Fq03YiWbhHQTpUV1mMHXWYf8HlNX7ZUQRC6iwBAIK0r0ILr1UxqKsPattAkhwSIiMl76bT/Ft/TbTy2jHQoM7Cz9isHVMb6GILl0H4DGivbw7xNc8rAtiJn3O/qvD6JT/wgs7Y370ZSdWmbZWEKiG1lXImldW7Q1jGMbZW9tUVKZmGjjGvf+EXAqzWiX5OfFSHVp/zjbfGPc3whdcbTF67V2N1e79qYMru2/AnzVYFsdWFt/+nOypv8vQvoHou4gOtSrG5EAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-performance{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAnUExURUdwTM7OzszMzM3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3NzW8hQDoAAAAMdFJOUwC/gO8ra6tUQNmVEKtAA1gAAAE4SURBVDjLzZMhT8RAEIWnpS3tXcWdQ6wgOJIKfFdUICv6AyruB5w4EuSJCwRXgUBWkGArLsEi6JVuaZkfxawguSWz/p7azLdtdt97C3ASagp+PpeXPDjHVx7McMWDCBc8qPCZB4m44YFIeOBh+ckCf9z+sCCYqi8WvA/5Nwu26cfA+JRBs4h7WmX/tr9AXcQHAPdgzEPZh5idTQBOZ3zyiModISKQGxZ7dd85E0SKfMGjM7vXeI/5AE5LvrwpcK9IOrQYB5BlCsFIvjzgrkaSjsBZbmC9XsGsAxfn8gKXpL9sSlnQFBwFTTuaKWXgI5Ar+sfHTrW6DUDO+2jEEtCNQ9wL6gNujMvvdFS3eugxGT51fBXxTvF1wLLngbT0BGphKalAy0MQ3Z4Ha2V7UoMFJKkFVAWcvH4B0OJfd9YsTl0AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-performance:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAzUExURUdwTP///////////////////////////////////////////////////////////////8/RimEAAAAQdFJOUwD2qdfrViyAwW2XORBGtSCsD6SyAAABN0lEQVRIx+2VzQ7DIAyDYfxToH7/p10CbQ+T2s33Rb1MijM3/qDG/EurolD9zSNRggBU0hFelMABmenfADhGkJDhGUFGgiX6I1AAQlDgZK/td8ELtQORiTmIq42I2bYdCD8NjzPmYQxO+rbn2S5qzEUF6YjkgcJude56X3s0SoL7LRAeylyaVPiFq0Jyx230mpeXmXVOHssRbhackhCq25Sny++xcBW1n6Snqw6BTgrqRP6kzfDcgmRLGonDWSf2OecwB491dOrEVZpNsxiyiHzWJ0Z+BbBwzaoWVb49HrqVfSkxHen7WNznLhzl8xpQlT3E9oHUtYaufB+7NY9g9ctbjFfj/h1DwXUrzDltMn1Ql9M814EQWPLmEBg4R7JSzpFQxTmSBMkLvJKOhFHfKEEnv3L/+qw3DuMPzAFH9pIAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-performanceActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAtUExURUdwTBGW2xKV2hKW3BKW2xGW3BKW2xGW3BGW2xKW2xKV3RGW2xGW2xGW3BKW2+P2IvgAAAAOdFJOUwC/gCvzq1RAleURc9VmrA9rXAAAAT9JREFUOMvNkzFLw1AUhU+SxtTahnZyC+IsIeAenDuE/oJQcS/FTYTi6hKcHYpDZ/EXBME95BeURpM0Me39Db4Mgk/u23umcL8kvHfOucBBKEr5eW95xoMjeuBBlyY86NOQBwt654HrPPHAca/YuUHrDQsG9eybBWa1+GLBqvS3LJiNX0vGJw/R0N6LJ+/f6x9I3uwG0D+luRU0FnmdCtBy6ZM7KvQdjgXwJYuNZVNrFfqF8IX+nFm/oBvyS2iZ8OWxgH4u1IZmU4kgfoa5E77c0jwhoTYCbTRFGE7QrXFCveCURkK/2cRBCp2gFYiyWk7Jw4AgXOmQZMAqa9uAeCP+JsViihtb9OKIPtBUuvy8jeqyHRpMhvc5X0W6Lvg60HrPg0DREySOoqQJKRbByRWbExaqlSoVwB0rwCLFwesHquttxhcsa64AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-performanceActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAnUExURUdwTH3G63zE6n3G7H3F633G7H3F633G633F7H3F7HvG7H3G7H3F6xOzy+EAAAAMdFJOUwC/hKbvK0BT2XURZct0z00AAAE3SURBVDjLzZMhU8NAEIX3LiSUNqI1qBMMChFRgYxAd07E4CI6HQwzEUXgKjC4CH5ABAKJyA+oaHqBJO3+KPaYYSZh9nyfyuyXu7l77x3ASSgu+flYX/HgHOc8kC4wwikPMnzhQaTueKAiHvi43bFg0m4OLPBM9sWCjyb9ZsHm8NkwPiUQT8MjfSX/fn+F/C3syJf9YB7oLsDkjIaiHix5QCNbGBmAFPve+3lXi/0viLB3ZnmDz5g2ICry5daAvCbZhSE2oIsFeC35ssJljiQbgZitIY7nIGu4wLG+xBnpL5tClxQhCANR1Q5TSmCCQK7YjftOVbYNUOxot0EsHl0uwHdFfcD14PJLG9W9HfpMho81X0V8MnwdcHvkgS4cBcqVo6QKHQ9B1a6XY1zAcSiIFg6QlXDy+gEd714RcAqEowAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-face{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAeUExURUdwTL+/v76+vsDAwL+/v7+/v7+/v8DAwL+/v7+/v96T4QgAAAAJdFJOUwBAgSCbs9hZap+hQJoAAADvSURBVDjLY2AYRkAJCAygbEZBQUEBKJtpJhDAOJpA9kSYxESgKphuIaBuhASqyYzESjC2hDRilQBZ64BFgm2qMLPYNCwSkQpAwlMBWYIRzJsKYrKCxZSRncKSDFYzBSNY2MD2MqRhSFgqgClPAwwJBxwSbAk4jGKZDCKZp2JIsEOcOx0ztjQDYL5ENwsYJKrTsMSvGSgepzVg2pE5qSikPRPT8sopBuDod0ATZ54JsbZyBrJgAVAp1Ax2oPXMykjxYQaLA2CMoERUZQDMrgBUCc8CKIdzAvHJhyQJpLQLSu0TCaV2lPwBSu0KQy+LAwBuJj5UbruNggAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-face:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAnUExURUdwTP///////////////////////////////////////////////w2imYoAAAAMdFJOUwBAgBvfrFmcw4wrbtGliFoAAAD2SURBVDjLY2AYRkAJCAygbEZBQUEBKJvpDBDAODpA9kGYxEGgKphuIaBuhASqyYzESjBu79yIVWIP0NoCLBIsR4WZJY5gkYiZACRqFJAlGMG8EyAmK1hMGdkp7M4gkus4RrCwBIApFwwJmwlgqsYAQ6IAIrEAwygHHEaxngJbfhRDgg0sxHoMM7Z0AmC+RAPsJ4S5NE5gid8VoHg8sgHTDh/PzM60HkzLc44bgKMf3RKuMwoQ+dNIgswJDAycUDPYjhgwMCsjxYcJLA6AMYISUTkBMLsaUCVqEqAcngPEJx+SJJDSLii1HySU2lHyByi1Kwy9LA4AqflRBKNSA88AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-faceActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAhUExURUdwTBCT2xKV2hGY2hKW2xGW2xGW2xGW2xKX3BGX3BKW23povfoAAAAKdFJOUwBAgRybs9hZLG6hrV9tAAAA80lEQVQ4y2NgGEZACQgMoGxGQUFBASibaRUQwDhaQPZCmMRCoCqYbiGgboQEqsmMxEowTgmZiFViFtBaBywSbEuFmcWWYZGIUgASXgrIEoxg3lIQkxUspozsFJZkEMmxBCNY2MD2MqRhSFgpgCkvAwwJBxwSbAk4jGJZAbZ8KYYEO8S5yzFjSysA5kt0s5YKc6guwxK/baB4XDYB045Vi4pCyrMwLa9aYgCOfgc0cY5VEGurViIJMhcAlULNYF9mwMCsjBQfZrA4AMYISkRVBcDsCkCV8CqAcrgWEJ98SJJASrug1L6QUGpHyR+g1K4w9LI4ALk0RHtSETFcAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-faceActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAhUExURUdwTHzD63zE6n7H7H3F7H3F633G63zF7H3G7H3F7H3F68TinBIAAAAKdFJOUwBAgR+Z31ipwW4yAjb9AAAA+UlEQVQ4y2NgGEZACQgMoGxGQUFBASibaRUQwDhaQPZCmMRCoCqYbiGgboQEqsmMxEowTmmZiFViFtBaBywSrMuFmSWWYpGoUgASXgrIEowgHtsKEJMDLKaM7BSWYLCaJRjBwloAploxJKwUwJSXAYYE2KUMVRgSrAFgKhTDKPbFIJJ5OYYEG1iIfRlmbGkVwHyJBlhWCDNrrMASvxageFw6AdOOqKCklrQuTMuzlhiAo98BTZx5FcTarJXIgglApVBr2ZYaMDArI8WHKSwOgDGCElFZBTC7GlAlvBKgHK4FxCcfkiSQ0i4otS8klNpR8gcotSsMvSwOAIs+RIlIrewIAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-object{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA51JREFUaEPtmT1oFEEUx9/bnRALGxE70btkZjcR7QMiRisRbCzEQvxCLGyEhCDRBC/RoNaWFgYLFUSwUBAUDKKFFqIQ3OzNJpfCyspS8HaejNyG87J7t7N3l03gttydefP/vbcz8+YNwhZ/cIvrhx5A3hFMjEAQBDwMwzOmAi3LWhBCLDTr5/t+ycSubdtLnPOncX1iAfQAlmXdNBmkru2RVgBSSspg+5kQ4lRjv1iAIAgqRFTIMIju0i2AWNvrAKSUowDwLqP4tACm9rWmbABCiFxXKimlhu0BtPFHtdc19wj4vn/Wtu3XnPOfWVByA5BSngCAuwCwryb8Hud8EhGNltANB/B9/5BlWXcA4GCMx/8g4jjn/H7aaGwYgOd5BxhjcwCgPd/0QcRVAJhM2l3rO3cdQEq5GxFvEdH5VsLX7aKIH8MwLLmu+zapb9cAFhcXt/f3988AwJip8Jj2L2zbLg0MDHxr/NY1gCAIpohIJ2V2BwC0iUd9fX2lQqFQ6cQvtJbICSGOxHhlVOdKjuPMl8vlqzrxI6IdWUAQ8Um1Wp0ZGhryiYghYrUtgDQionxJT0al1IwGkVJeBAANvieNDQB4joglzvmilHIXAIwrpX67rmuUamfKcxoTvnoQ3/dP27Z9g4j2J4C81KBCiC9LS0suY2yMiC7rttoZuQBEQhsiopfT6wAwUvv+hjE2XSwWP0kpRxBxgohO1kPmDhAHEgTBUaVU1XGc98vLy8eVUhoqbpPLPwIx6/wqEV2ovX8AALzZ/Ng0EWgQGa1iLQ8xPYCUyx8YHjt7EWjm2I7sAy0it7ERqNWEDkeiklIJg8pFWwC1ZC6SM9NYc1oXgcaiVlxVYmVlZW8YhlMAcCnFvOkEQPqqRBqASLTneTsZY3pjapZSpwF4Y1nW7ODg4Ie202kTgGiwSqWyrVqtXgOA6Zj0OhGAiF4R0azrup87dqDJAlA/eLlcnkDESQCI0us4gOdEdNtxnK+tfkHjA027AJEgKeUVANBROVd7p3fixwAwJ4T43kp4nR2zylynAOoE/JuAiPiDcx6kFb5pAEwF5zKJ2xXZrH9uc6BTUD0AAGh639Xo6bjUI+G/NglS+p3Y87wCY+y/2ozJSGkuRDLekQFjbEexWPxVryfpjuxhllKhNtwtAESc55xHx9M1hsR0WlcOlFLHTLyv26Ypi5hesyql5oeHh3VBeN2T6TxgCtXN9j2Abno3je0tH4G/KbtRT7VUKs8AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-object:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAwdJREFUaEPtmTuIFTEUhv8fLSxsFrET3UIQRHtBRNdKBBsLsRBfiIWNoIisD1xfqLWlhYuFCiJYKAgKLqKFFqIgoiBoYWVlKbjwy4HMJXs3M5Nk7tzZCzfdvZPk/F9OHicnxIgXjrh+jAG69mCpByStB3AgQ+AcybmqdpJmEvv9SvJhqE0QwBm4lGikqD4VAaCMvh+R3NffrgzgB4DJDCPWpC2AYN+LACTtAPAqU3wsQGr/pikPgGSnO5Ukgx0DNJhRzZp27gFJBwE8J/k7B6UzAEl7ANwEsNEJvwVgmmTSFjp0AEnbANwAsDUw4v8AnCZ5O9YbQwOQtBnAdQA28nXlp/NG8HT1G7cOIGkNgKsADtepDnx/C2CG5Muytq0BSFoJ4DKAUxnC+5s8cSCf+j+0CXDBjAJYNgAA6+Keg7AwpldyAXqBHMmpwKjYyThJclbSSQBWfyIT5IF5kuQ3SctJzjcCiBHhxUu2GM24gRx1IGtj+gDw2I34Z0mrbXcC8JdkUqidFecEAj4fZD+A8wA2lYA8NVCSHyRtcGvouKtrg9EJQKHVB7Ht9ByALe7jCwAXSb6TZP+dAbC3D7JzgBDITgDzJF9L2u2gQoectV0yAD7IEffjDgC7plaVJQdgYotdLOYSMwaI2gETr51jD1SN6qDOgSobw/WAywltLxRVhBIxi7LxInaxUCHHFvmCpFkorWInoR8LheqsA2DB3LGIRdPIAznBXC1AIVrSKncwVYXUMQB2Sl8h+SYQOCanVaIBPJAVAM5aqBAIr6sAnjnh78s82aoHQkYlWYwz7YXXIQCLRK+R/Fg3BYcO4HnlhPPKIfefTYX7dm8m+aVOuNdP+1OoSow79KzKL5LfY4UvGYBUwZ0s4qYiazzY7RRqCtfZIm4qfGBrAEDle1e/0FDoUTKvUxiT3gfsaWlBbibFUsyDiKSkBK9nf4LkH19P2RvZ3cxUIVoEmCVZXE97DFXPrJY52JUy+lY3Ji2S8cxq4i3jsahk3QdSodqsPwZoc3Rj+h55D/wH5CHfQHNA9EUAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-objectActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA9JJREFUaEPtmU+IE1ccx7+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amUuzBJqJsY59Jz/9wh6+iJpFoIKXzIAqoI7solbFdksvmN7YKGgugAMNH3vqp9pN+vhtq5VMqT2PpAbjwrW59VmVAYL8iASCfdGBvm/bpQPrCvP1eP+RpYrXA5XKgTaBkA0Voqb1eupL4DToFo5YLlVZfadtkHKIqrPrFLIsXL8s0k3LaHuA6pQ7WzfBWjn7Abpe9ln4C11Qo9Pmb2aMgAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-objectActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA8hJREFUaEPtmU1oU1kUx//nvthx4cJqX3RgGLsQBNG1tq8Z7axkwM0sxIX4hbhwIygibfPMeyapunY5iymzGAURZjEDAwoVm8SPhSiIKAjtQtAmiooLiyb3yEtNm76+5L37kjQp5C2Te879/+65H+eeS1jlH61y/egCtDuCNSOQyH3cWirNHVIXKO6kYvqdenbxqVlLxS8J8Txp6Ne9bDwBnA5IiIRKJ5W2LDHsB2BmC6zqmxk3UkP6AbedJ4CZfTsNcL9qJ077VgHU8r0MID5V2EsCk2HEBwbIFdT8M/aGBkgaelt3KtOB7QKEnU9NsGt7BMyp2cOa4P8tY3M+DE/bAC7cK+xnxmUwtjvCCXzFHtRHiEhpC11xADOTjwG4BCLDY8S/MvhsyoheDRqNFQMwc292QmppEPb7i6MZgEdqna7V9i0HSNx/95MscRLgo/7CXS0IWS6VrFRs8+1ati0DSEzm18kesgGcURa+3OAfSGklY5ueuP9qGYCZzceZySKC1gQAgPkvXtNjpXatn258CmlYSOSSg/qwW+B8usH9SSM6Ec/lTxM7iR/3hgEh4Jpk2Kkh/UVikiP2MBUbAggiYjFfchajtB0QM/fuOFg64D8H8QHQTQ3CsowNT8cffdLnPn8+KyXPpWKb1FLtYJ0tbbU84asCyRYOEmiMwTtq+P63JJAYH9AfxTOFbUTlNXRyPlmTdpsAKlIXQZyDDJJGGbx7/l++BSHM5EDfg7HMm91CRM6B+fdqyA4AWA5iZd/++hWymDaid+OZ/G8EGgXB65DrhAi4Jw3NsORj5VRC4A8AW+tN2Q6KwKJM54b2HcD3EtMFCLojqVw7uxHwGdVQ992OjkC5JqSJPRXw2qlEsMpFo1OonMx9/7gE211z8iirLC1qeVUlxrLvtwgU4wBO+K2bpgCoVSX8ASqiRx682hgp/jBaL6UOBsC3pMTFdCyaaUI6HRyg0llicnptqWfdeTBMd3pdH4D/kyQupgf7HtaKZIj7gDpAdefxzOw5IjECoJxeewEQ6CZBpmwj+thvCq44QEWQmZ09BYjzLHFk4SQm/C2KIm3/svGZn/AFP+qVucYi4BbmbLnOb5rGr+zB6MugwjsGQFVwWxZxoyLr2bdtDTQLqgsAQt33LvdIe6UenvNaJUQqJ3Hi3ut+KSNLajMqfQV5EAnzRuZoEF8ivfZw74dqPbXeyP4MVSoE0DoAmkgafeXrqS+A08CpHBDTPpXRd9oGKYuoPrNqETlhD/w446Ul1H1AFaqV7bsArRzdIL5XfQS+AaeCtE+rbksUAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-occlusion{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAACCVJREFUaEO9Wn2MXFUVP+e96X5oa9UoYpUszrzzZlqLKDYhgAFaaKU2+M2W9Q8TNUQSQEsiRUjFVaHGNmoBMTUmaPwD2iIhqKR8WEBFGkLFUjbtzDtvpjYrVhpCXAtm1867x5zxvnXm9c28mR13b7LpdO65557fveeez0GYp1Gr1d4VRdF7lL3rui/n8/lX5mMr/H8wDcPwIgC4QkQuAwAVWv9eA4BJy/8sAHg7ALysf4i4DwAe9Tzvj/3uP2cA5XL5CsdxNiLi5QBwUkQeQcRHrNB/JaKZZuGYeRAA3gsAZ4nIBkTcAABLROS3xpjdpVLp0bmA6RlApVI5FxE3OY4zGkXRdkTc6/v+c3PZPAiC80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e79To6Fj7j9PCdmX2TvF6vzYzLqtrgyX2MWk8M5sXcaNDRLQjeft8Vaxj4bQSLSJbEFHjsraNjZg+E4AS2obHTzRb0kxsvirXVm1vBoAT9Xr9y2kNjeQtdAVAF9kQW5PseW+zzszMjCcbGe1UsmsAMYOURveTc62nap1TRNYsSKM7eQIaO7mu+zkAWAsArwPA45oXdPNTAxutaillsTqoKIruW7CfGqRdpRaHReSj2lvo8scezyDiY1qc7dda9axC3W64UD+3+Q/fZENVhTDr2gAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-occlusion:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABphJREFUaEO9WmnIVVUUXSuiuahopOLLIqTBBgtCC01Ty8JmS/sRVESBNgiVJVZaaag0WBlGYNEPrSyiQdTKskEjpNKSCBqlzAqJSAsbYMV67vt13/3uffe+93pvw+Mb7rn77HXOPntY5xEdEkkHAjgk1G8k+VMnpuL/oVTSaQDOBnBmGG3DfwHwXeg/DMC+ADbGZwWAZSRXtTt/ywAk2eDLAIwAsAXAkvjY6O9J/pk2TtLOAA4FYDDnxmdPAG8AeJbkslbANA1A0gkAbgJwKYA5AJaS/KCVySWdCmA0gFsAPAfgIZLrmtFVGYCk3QBMDeNfAjCb5MfNTFY0VtJJAG4FcL5BALiX5B9VdFcCEBPMB7ALgPtIPlNFebNjJI0DcDuAbQCuq7JApQBC6SIAiwFMJPlzs4Y1M17SAQAeBTAWwPiyxWoIQNJdAKbZbUjObcaQdsdKujHcaTpJ25ArhQAkDQKwmmTpLrVjrKQdANwJ4FOSL2R1SRKAwSTfz5sn1zhJhwP4BsAokq+3Y2CjdyXtBMDueRGAv32ISS7NhN+RAF4D0I/kt1l9fQCE0lcArCPpyNARkbQrAAeD81IT/ArgQpIrMyBmA3D4HkPyr/SzPAAzIzYPJflbJ6yX5ARm48/J0f+DdySdWyTtBeDty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VNLMkJzKRUViaTdNHYlgSf+jxJk8R1DY3byQ05GS/vMNaSSvii/VEkaxlUUjr5JMY6gt3QluX/eYZLlJ6k+KvUUkpyqj8+OirH300pALWiLSHAJJnVMK/kusqs9RqSTjptS3C0+S1lrF5TTX266uw0gxf2FTf1McDkUWVapZsAKtEqAcIu4FJhZBkT3S0AwVib4lxCspjYCgC+yLBf+0DXYnuRdBGAI5trK+efuouPInLXodMhtCGt3g0AKZp9YB5f1Yhe923JokaHs0sATK8XXnSUXXAkbWEuzd6oXm83ZkpKaPVpSY7J01l6eZFcdESX5cu3jjDWiXHBRLvpcV1WeLGRjC8FEAfbienx6JZmdZC5tttOBuBkeW3ehUZ2FyoBCBAurWv3ZdEPd/Ka1W5Td5FR5JKVAaS2OHvRbX6mJT41eE5TM52/6M6uQNDxlzvhAdga91gusat81cDVquurPQA4QS3s2lcN8rYyyOGzfLdQ8cseLsiWu7NrN1o17UJVJ+zW123+BfogD+TkdLQFAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-occlusionActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAACItJREFUaEO9Wn+MVNUV/s59+wOqyM7bFaxAsDBvFqnWak0MYhBQUEqUVssi/aNJawg7bxaKScFqqKyt0gip4sK8XUKqjX/IL43RlqBSxLZWYqwWdWNh3oIlFClkebMUaXfZefc0983MMjv7Zt7MLrvvn93MPec753v33HPuPfcRhukZt+3YeCndCQpeCO3kmWVTTg+HKbocoKHWjpnEuBfMd4GgnJ7ADAcCJzx8iUlE0AGcBOMkiPYz4c1kNPzXodofNAE9fvheQCyBoLvBOA/wHunSHq7CiXM9+BdWGj39nGuxq8dWYyJdxCSh8UKAFoIwBpL/CMidTmzam4MhUzaBmpYjNwmNVoFEA9jdSEx7zzZFPhiM8dotiduYeAFIWw2Wu6TLm7pW1n9SDlbJBK7d+rev/c8du5aAVQC/L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tjVYE6ns3thaZ0pAhkMtvkUdq5OfkXHwWau96FxsdBbfWRIJBts0vCLX79qoKt8+zFRrH2+ogQsGwudtFR/IIjeyws0GYvtl8fajbKttVBaM7WGD/MwMuL7EUHwBuRoqeGq2PdV1C9TjSvBWh1sYuNrHwgAS+9pi88tgIYx0TPDFfnOhO2jwI4Iym13O9CI38WSiLgKe1qrwp1VjePxDVrsq6nOf8io1BIlk4gg5B/0S01emew/VSvz+ny3BG56M5/A6odz6T9kIB5DHwFxtsssbuUTw1IYDEI8wm4koF9xO7LI/apgd9UquYwS74HzHeU+LHHeyToLdWcHWq2KjuESjU4Up/b/B9u0kgtWdqPkwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-occlusionActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAACJpJREFUaEO9WntsW9UZ/33HaZJCX7S5TmhalQ1NaAzGYJUgvk7pe5QKusGa0v0xaZvQkKBbK60BWl/b8XWKaLWtUJg6IcG0P+hrCMHWlcdK2OLrFPFYGdU0ac+q9BHfFPoC2sQ+33SufVPXvfa1kyaWolg+3+t3zznfd87vu4Qx+nQfONc8yF+0KvP1NPHoxjsm9Y+FK7oSRo2+fh0I3AUpFwHUyoxWIv6EiI4o+8w8m5mmE+EowEchxH4g95rZ1myN1v+IAUR6M3eRwCqAFgM4C8ZeZuyFmHDk9OmpH2+7my4UB7fmj9wwderpWZBDs4mwHOoPmAzwn1hiV7I9+NpIwNQMwOjtvwWC1gLUwVJuIfA+s73lnZE4N3pP3M6gZSTEeoB3Q/JWs735w1psVQ0g/t6xq+T5uogkrCXQKyDebIaCf63FWTlZI525FUydDF4hGFtFYzYZnzvz82psVwVAOSCI7QA3MuMJU9d2VmO8VhnDsh8gwuMAnWfIh6p5QL4AlFEAO5ixp45yj8T1lkytgdUiH7dOBLMceIYIKwGs9ntYFQFELDtGQJyJ1yZD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6kRyrBhrNwrFRHNWRpiwvlJjw5WvqvuSb3gEfs2gIAFPjhVznU+VeJTAGSFyP/ZqaJQ+7qoAKCXV+OBTdnw82qw0TYuXNjLKrZOqAbgGShvdLOitkfKpiuckyQvHpdFd+gQUHQ9B3yPGEhDOAfwGS9pT1asGgldCNTgYk5igCtSL4/aqgddUKnIY4G8xc7ialz2IKAXQ64qcHW22qnkJVetwvF63+T9nAHfjRfzL0gAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-logSave{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA1RJREFUaEPtmT1oFEEUx9/bFLFKJzG2WiknZObFxlO8RtFC8SuFWlrYGBtRRNCghV9YmFQWgoVaaAS1ULRRRKvbmYBBQezVYBOIGFMkT0ZuYXPufOxdspuDO7jibmfe/H/z3sy8eYvQ4R/scP3QBSjbg8EemJyc3La4uHgUETcx82YAWNum+N8A8IWZrxLR41ZtBQForUeY+Xarg/j6MfMVIrroa5f13AuglOJWDLfQ56aU8mzefk4ApdR9ADiW12ir7RFxXAgxkqe/FUBrvYeZXzQbY+bh3t7ed5VKZTrPQM2eNHYQ8VGGjTtSypOhtq0AcRyPIeKptCEppTfkbAM3AxhbcRwfyYJg5nEiCvKEVZBS6hUA7EoEIeJ+IcTz0JlpbpcFYNrYIBDxlhDijG88lwd+IGJ/YoCZ1xPRd5/BUA/Mzc31VavVWRcEM18jovOuMV0eWLL7tBM+RoBS6isAbEzERFFUHRwc/JD8dnjishDikg2iSIAJADiU8uhdIjqRFuZYEweI6Gmuc8AWs6EhVK/XR3t6eg4zMyKiEQ/MvOSwQsS3iHhhZmbmY61W++UIp/dSyu2FAmit3zDzTjMoItaFEFuVUt8AYCB0ElLtZqWUfYUCZHlQKXUQAJ60AAC2Nbhia8AWglprAoB7jYQwmGXVACSKzRqJomgLAJjvBh/JqgPwCQ7dRAoPIZ/w5HkXIHQGQlOHvCd56PjdEOpoD6TShT/MfD19OXeFQCPnOYeIaxYWFiaGhoZGQ9Pv5nZthVA6XWjkOsMJRGj+b/IhIURtVQCkIUJvYKUCONLf/+67tjuw+T+rLlTYLmSDCDmwbOIbF6CgC1Vba8B3m3JBuMQXDuC4iGQy+MSXAhAKESK+NAAfRKj4UgFsEHnElw5gBGit9wFAUqy9kbco1vY2Gsfxsha2QrbV1K42gIimAPDvw8zTRLQuy0ZhpcU8AMZ7zPws1ee1lHJ3LoDlLu7mAcioZFuLvYWV130AU1NT/fPz8zuyqtWIuFcI8TKXBxo7QaEvOCyQD6SUx20T4K33F/iKKVOj7yrqBWhsiSv6ki8zNBBPCyHGfKEXBGCMrMBr1mZtPxHxEzN/jqLoYbr07oIIBvDNRFnPuwBlzXwybsd74C95KWhPrxIhsgAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-logSave:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAthJREFUaEPtmTuMTUEYx3//TrWdeLRUJCrReISGUBCvLVAqNGiEiASh8IoClUKyBQqPBAWhsREqnYRE9NgoV0T3yci5m9mzc2bmnHvvOXuTO8ktbs7MN//ffPP45hsx4kUjrp8xQNcezPaAmW0EDgFrgLXA0j7F/wG+AlckPW5qKwvAzE4At5p2ktHusqTzGfUWVEkCmJk1MdygzQ1Jp+u2iwKY2X3gcF2jfdS/I8l5O7tUApjZTuBlwNIk8E7STHYvQMCTzs6jgI27ko7l2o4B3AaO+4YkJadcVcdlAGfLzA5WQGR7IgbwGtjuCdoj6UXuyJTrhQBcnQjETUmnUv3FAH4CyzwDKyX9SBnM9QAwIWk2AXFV0tlYnzGAebtPP9OnEPkNWO2J2STpQ+9/xBOXJF2ogmgT4Amw3xNyT9JRX1gEYq+kZyGIoQGY2UXgAPyPt5x4V8qH1TRwDvgk6XdkOr2XtLltgLfA1qLTj5I2mNl3YEWDdTQraaJtgAVryMz2AU8bAFC1Boc5hYKbgJmtB6aKgDCbZdEAeLuOWyPrit+qFMmiA0gJrjr4yu1an0Ip4Z6Hss6hMUBu6FD3JB9PodwRGGkPeOHCX+CafzmPDUAR85wBlrgwQ5LbUueV3AHsaxGbmR8uOAGTPYga8f+0pG2LBWAOosYNrFOAqith6L5bdQee81optG7nHIjE8DlnVlB8EVa3AxCJ4VMAleJbB2gAERXfCUANiKT4zgAyILLEdwoQgcgW3zlAIWA30EvWXq+bFBvESTzQxFZqSyqdAe7i7xIAvTIjaXnIRmupxZoAznvPvTZvJO2oCzDQ5G5NgPKbRGWyt7X0egrAzFwedktFtnqXpFe1PFAsxLYfOEIaH0g6UjUAyXx/i09MQY2pq2gSoPDEsB/5QuJPSnLrMFqyAAqIQT+zloX9Aj4DX4CHfuo9RpANkBqJrr6PAboa+V6/I++Bf0in3kCazcMZAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-zoom{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAkUExURUdwTMDAwL+/v7+/v7+/v76+vr+/v7+/v7+/v7+/v7+/v7+/vxtcv/AAAAALdFJOUwBVdZCpGdZE7C3B0wnY6AAAAV9JREFUOMt1lDtPwzAQx20ghGwVsHVJhQRDlsywWKqEULsw8FhRJ2iWiglGGJvFCw8xIVVCSEwkKU25L4ftpOHs2Cclsu7v370smxCLecRh+xOH8Ja5kGEs/6dtYf1XONcWZurbwwRCQjYZ9l7uHAPAOBHpI1QC/QSY9g84ldmnAn7Z3htwsfZnvSe54eJd5hlcC7gccxTwSETZEr5+714vLRdfkFraVNtetXLpR7ha+mkHCV1Y/q8ZOW8AgDkecsIaAEIcGbIGyLUq4KcBYl0o7QAB4FZACBMrQKpaJOCZQqyAIhgayYEpgD1DZghXCvBTNJFKmCvgzmhcCEsBwMjSRx6BslYftRX0JLYKrAsLqzDC54EFMwvy58QhMM8hFNq0UpwET+sLC9/4BmEBTytyRCIbDoAEiR1Qp1dbRxfoyv9g3ogaKVuXhVZZbtqX6Ez6H23PxG4CM259QDwt/h8ABfK8nDqSAAAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-zoom:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAzUExURUdwTP///////////////////////////////////////////////////////////////8/RimEAAAAQdFJOUwCCyreU7KZVRCDaZnETLwj6WaYVAAABUUlEQVRIx5WV2Q6EIAxFoVBWxf7/184AOnGUsvTBqDmXrqRCzNou1kwGtyZIQNuiD0P6evWTURFUMtIoPO+iVoGIZPkMqkdKA0jZgoJ6suQc2EoiGBldOoQ9HSDk5+GTs1Fqo9IlcEpvNv3qv0MBhSalIFSv3+MCJCY8fUaCxasycrMu9dp5VTUhubXZ6CqsAvn66ZAsx+e8fON37oT3bZ4aiRU0kDlavGSrQI95HPBZACt8FuCL16IruBVkzBeBW+CLYHvyfiDQd96IpHpOMqP++fAq9VMQ7rwrM5+6gjwG/3y/D/m8ylPYpvpAeqO7DfvwMPO9D6jnBabG56YFZx77fEjD+9AyLdYEhp8nxoNh5wmJtfY8AS+wzIZZrJNcC4h3wV8IH1p87Iyfnc6XVaAd7ICHAsebw97zgDSxZ/yvViiPuYUfTe650knM2+7Ywz9yOCklzohLOwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-zoomStop{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAzUExURUdwTP///////////////////////////////////////////////////////////////8/RimEAAAAQdFJOUwDjmTC6Y0KBVakX8s8iC3JYR1wyAAABVUlEQVRIx62V2baFIAiGcwJRS97/aU/Zbtht0VzrcJOuvl/AAabpXy1RF0F/m2h2PX5mzucEuO9gMon1MY7KlG8w4LImC1XFQmxDGVkm1DYpXi0qS1gXTEGzKoqNS1ajAxPqJDikFLcFS+aukYJffRfXnAj9kYUXFVi86wzzPjuCFRXBwS3KaC/Pt02Ww7uf1jz3BVYtX/OsyDQFDn7yswPXb+Ovs39eJJWwxrOXV4thgC+//QBf/uMAXwAa4AuRBvgdWR58CB2B+eaRG5e8QO7Jn2sIAvzhbdsDnXzev8q0BengGXv8EciH3y1CY5++yI/BRNx82g/La7lc7b0Am/tUC6n3HoZ4SbDyy5BgzSNivV6wbPXeIPOpHlOU+CjkTQKvQOpXdRdJvn+5xttWQa4EZUOzluonT6+q72X6Zb0+T/lNhQd7hg9vm8LWUhW5gT4iN7c/0ZUo8Q3AttYAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-zoomStop:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAqUExURUdwTBKV2hGW2xKW2xKW2xKW2xGV3BGW2xGW3BGX2xKW3BKW2xCX2xKW2yDN61kAAAANdFJOUwCAVKxm3T/DmhrxKw97YQBGAAABaklEQVQ4y2NgIA6wGqCLMCqAqV4HdIm9F0Ek22UMM9hiG4AkVzQDA+cmx+YyJJnDlw8wMNQaNpfevbu0QgxJgrN3JQPD3VvhjU57kESnOZqvvXuJgcEXxVFMEkDt1w11gZYwoVgue3d5SzaQSgCydZG1TMkBU8vBuq9guBcqNBNDgj0GQrMEb0CVYEmA2ViANRQZ795tQPZduADciXcVUNSthGu4hGrAJawagBIXsWoAClzGqgEocRWrBqDIrQNQDTPRXZ8A0cB41wBNQgGiQfbubTQJAagGDB0GIA0OsnevbkCTCADiu4J374ahW34JqAEIbiXMRJOAgkvMKJYgJBx6717AKiF4F4eOu+jxgQCXGHBIKPDgkBC8JYCURJDtQHYWN4oEcvpZiyR+C9lZtkgSKKG1CyGOGrxItleixjrcLFBWRAYcMIkG9NQMiY67N7AlcxAQwMwA6SBxM2xZQ3jtVRPsRQ83sg8ACMIUxzzE8wsAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-close{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAeUExURUdwTM3Nzc7Ozs7Ozs3Nzc3NzcrKys3Nzc3Nzc3NzePZJxkAAAAJdFJOUwCtKdPBGAmNTt3jdDcAAADfSURBVDjL1dOxDoIwEADQgwR07GTCZtI/IGHgAzBhM9EPkMTB0Y3V0ZXIcn/rtRR6pefgSKeSu3ellyvA9lZ/5F9p/3K7PZY8oPG5BD6MpPUSgIITzdIStifAshjRQV1PCFT8TxaicTzzwEwINOEdHVmDmcTAkRhMhMAp7iQRjcMtDhCp8SA1v0ARGIIK/gnkv0p1OBTS4QRUIpE7DiYYXTBrzcld3JIrAarXrps4AVNwRSZgExoJmIyAaAdsShUMn/JF2fh4YEkpAcgvnuwYCIb6EbbbP4PsDfLD2dD6Av1qTvAQlzUTAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-close:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAeUExURUdwTP///////////////////////////////////8kBMKEAAAAJdFJOUwCt0igUwJdJePGbgLgAAADcSURBVDjL1ZMxEoIwFESTCaOWFDapqeicnAALTiANnaWlnVewDTMW/7b+aCAb8jkAVIHN2/lsNkrt73lf8M08nnF1pAYFR/dFmAAx7SIoi4iDbRrWDMAuQFzmmxAGbjjJgjj6dCjMCAND/o8RWQMzUgIRKYE/wsC5TJIRR74rBUZaqqXwLZEXT0WTDGwLW1aavJWQir9qadw++NgykWoMNtcykh8Q5EECgr5C+jjpGjHjPGhPU5eVzyfPJitfnUyhPg6ywMKZ7BygcYcsPCj1Kc8uXYPqpeSLs6PnC4w8S+8OJ9MLAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-narrow{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABm1JREFUaEPVWWuIVVUUXmvfYRosHzUZUUqKjkSXSe5Z+5qJhfawLELCR5ohPhKjjB4EWgkpkopRSWEPS1Mqy7Gkd0iPGaKy6ey9Z3z0opwEQytSMiS5NZ4Ve7j3dubMOfecO96buf/cx17rW+vba52919oH4RQfeIr7DxUjoLW+BhHHAsAAZh5gPwGghpl/TKVSHZ7n7T9+/Ph+ANg/atQo+1mRcUIEtNYzAWAiM09ExLPK8KgNADYw8wYp5Z9l6PUQ7RWBvON3AMClJ2Kcmb9DxAKR33qDVRYBrfUNzLwQESf0xliUDjPvR8T1RLSsXNzEBIwxc5l5fYSBnxGxxfO8bQCwN5VKHc7lcofr6+tzR44cGcTMg4UQgxDRfp8IAJdH4KwlooXlkEhEQGv9EAAsDQF+GwDWEdE75Rg1xlwFADcx83QAOCOg29SvX79ZDQ0NuSSYsQS01h8BwBUBsF45HnTIGHMBM9uFmR2Ya0bEWxzHORBHoiQBY8xmZp4RAFlNRIvigMuZN8asYOb7Azq7hBCTMpnMvlJYkQSMMUuYeblf2fO8ZdlsNiyVyvE3VNZ13XFCiGb/JCK+6DjOrLIJ2N0GAN4KKG4hIpuzVRtKqf6I+HvAwAIiWhdlNDQCSqntga3yUyK6rGqe+4Db2tqu8zzv3cJfiPiLfQYdx/k6zH4PAvlD6iWf8B7P8yZls9mO/4KAtaG1fhgAHvCReN1xnClJCXweOGFLhrAapJqamlLDhg372H9eMPNMKeXmoL1uEVBKTUXEJp+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J2L6cDsNfh7iLiXme1VjG3GOwFguOd5DYg4HAAa7O/Q3QTRXiavchxnhzHmIgCw3V6xWYoiURYBa9h13atTqdTssJxNEoEImQeJaIV/LimJsgkUjCilLrGXToho33mFrmoMod2I+LLneW9KKb8Nk01CotcE/AaVUmOFENcz8zgAGAIA54Y4dAgADiCifejtjcQnSSIWRgIAniIi+5q3cm/q/c40NzfX9e3bd4gQ4kxEPFhbW3sgnU7/lcThJJHwV8kViUBvHStHz0aCme2qe7W1tasbGxu7rkFPGQKR50Q5q/B/lP0HjgOoT/ydvaYAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-narrow:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABS1JREFUaEPVmgmoVVUUhr+fosKC5ogGSsqIpKQwMqjIBpsICdMGQ7ISo4wGApugJCoxLClssElpNEuaI5okKjOI5onKhEQrSiKiaKA/Vu3zOu+8c88593qvj7fgcO99e6/h33udtdda+4khThri9tM1ALaPAQ4Btso9GwNfAyuBb7JHUnzvCq0XANuTgePSs00bFr0L3BuPpF/b4BswtSMAyfDzgYPXRznweQ7ID53IaguA7ROBGcC4TpRV8IRL3SNpVrtyGwOwfVYoaaHgW2AZsBT4CliXnt+BXYBd02d8D5c7rIWc+ZJigRpTIwC2rwauKZH6NLBA0jONNQK2jwJOAU4FtijwPgpMkRTga6kWgO2XgSMKkjoyvGiN7d3SwpxZGHsVOEPSmjoElQBsPwScVhAyR9LMOsHtjNu+Hri8wPMBMF7SqipZLQHYvgq4tsA8S1KZK7Vjb+lc24cDsfJ5ul/SlLYBpGjzVIFxsaTw2Z6R7S2BnwoKpkta0Epp6Q7YfqEQKl+XdGjPLM8Jtn088GzuT9/FOyjpkzL9AwCkQ+qB3OSPki9GOrBByPZ1wBU5ZY9LOrkpgDcLJ2zlFvYCke2NgFcK58VkSRFU+lG/HbA9EYg4nNE7kk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rYFIBNdI+qOJwQ13oi8/68oOdGpYO3xpJ2LV/45zI/t3hSEDoBXYIQ/gH99H3EBePlczAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-expand{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABvJJREFUaEPVWWmIXEUQrnqzZseYxGM9QBNF4hrJEDfzqieuAY/gFRXPyMYbzUHwQBQUzx+KeBAJKhrRqEhEQWMU75AYXREPlunu3bjxIDGraIwiuJpFkL26pMK84eXtm3lvZieGFAzsTtf1VVd3V9Ug7OOE+7j/0BAAnZ2d2UmTJl2cyWTaAOBA+TDzgYjYDAB/y4eZ5fNjc3Pze7NmzfqlUYEbFwBr7TUAcAEzXwAA2bROIeKnzrkNALBeKWXTysXx1QXAGHMVANwEACePxzgzjyLi057nrczn81vr0VUTAGOMRPtmRDy7HmOVZBDxL+fcyr6+vgc7OjqGatGdGoC19hZmfrKC8t9LafEWAGzLZDL9g4OD/S0tLYM7d+6cyszTPM+biojy97kAcGoFPV8ODw8vbG9v354WRCoAxpiXAUDyPUrvAcAqIno/rUHhs9aeCQALmflyAJgUlkXEf5xzp6U9G4kAjDHcKMejeqy1xzDz/QBwXYyNViL6ISkwVQEYY74AgLkRJcuJ6M4kxbWsW2sfZua7ozJNTU1HtLW1/VFNV0UAxpjlAHBHWNg590ChUJCINZyKxeLpnud1RhSvmzJlyiWtra2DFS+AuAW5bQDg3cja60QkObvHSGstj588fGVi5heVUktqAqC1Xh+5Kj8nolP2mOchxd3d3ec55z6I2JpPROvj7I9JodIj9UqIebNz7qJCodD3fwAQG8aYhwDgnpC99UQ0Py2ALyMv7DIiWvV/OS921qxZk5k+ffon4fcCEZf4vv9i1I/ddkBrfSUivhpiMkSkanXeWnsFAFwCADNHR0fX1nPwYzJhAxGdkwTgJUQM38l1Rd8Y8yYAXFoytoOIjqo1CFrriQDwCyIeEsh6nndsPp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ifCSpq4B9WvBoCaISQDC2PQKIN5GPF6MqjCuOsqOpn6bK2R5fKB3K75QpHpPouUAkvrTPaAqiFoACRMxpwuqNniE3WsxrXk++0EQzHr3rwVGSZP+WGTymD3MlrbEdLerzdUDUBtCQaDvSeXyQKPPZTrwpztwuKS1h4tZrgWgbQALkaOCy4hNrn1FHTRTxdmKQ8LKksjdWC0THADK/jtQ/BQhQBwBl7Wi4VNRWoXhMJN6tA7TJTSyQFJ95u/OlPlfEdjzOALI7EIVgzEfb+nyaGSh3p4h+Pd1jV26gjiUHuqe4ibD6eklRqvfQkAHQzABDHsB/7aMVT352GH8AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-menu-icon-text,.jb-pro-container .jb-pro-quality-icon-text,.jb-pro-container .jb-pro-scale-icon-text,.jb-pro-container .jb-pro-speed-icon-text{font-size:14px;min-width:30px;height:20px;line-height:20px;cursor:pointer;text-align:center}.jb-pro-container .jb-pro-speed{box-sizing:border-box;text-align:center;font-size:14px;color:#fff;width:90px}.jb-pro-container .jb-pro-menu-list,.jb-pro-container .jb-pro-quality-menu-list,.jb-pro-container .jb-pro-scale-menu-list,.jb-pro-container .jb-pro-speed-menu-list{position:absolute;left:50%;bottom:100%;visibility:hidden;opacity:0;transform:translateX(-50%);transition:visibility .3s,opacity .3s;background-color:rgba(0,0,0,.5);border-radius:4px;overflow:hidden;width:-moz-max-content;width:max-content}.jb-pro-container .jb-pro-menu-list.jb-pro-menu-shown,.jb-pro-container .jb-pro-menu-list.jb-pro-quality-menu-shown,.jb-pro-container .jb-pro-menu-list.jb-pro-scale-menu-shown,.jb-pro-container .jb-pro-menu-list.jb-pro-speed-menu-shown,.jb-pro-container .jb-pro-quality-menu-list.jb-pro-menu-shown,.jb-pro-container .jb-pro-quality-menu-list.jb-pro-quality-menu-shown,.jb-pro-container .jb-pro-quality-menu-list.jb-pro-scale-menu-shown,.jb-pro-container .jb-pro-quality-menu-list.jb-pro-speed-menu-shown,.jb-pro-container .jb-pro-scale-menu-list.jb-pro-menu-shown,.jb-pro-container .jb-pro-scale-menu-list.jb-pro-quality-menu-shown,.jb-pro-container .jb-pro-scale-menu-list.jb-pro-scale-menu-shown,.jb-pro-container .jb-pro-scale-menu-list.jb-pro-speed-menu-shown,.jb-pro-container .jb-pro-speed-menu-list.jb-pro-menu-shown,.jb-pro-container .jb-pro-speed-menu-list.jb-pro-quality-menu-shown,.jb-pro-container .jb-pro-speed-menu-list.jb-pro-scale-menu-shown,.jb-pro-container .jb-pro-speed-menu-list.jb-pro-speed-menu-shown{visibility:visible;opacity:1}.jb-pro-container .icon-title-tips{pointer-events:none;position:absolute;left:50%;bottom:100%;visibility:hidden;opacity:0;transform:translateX(-50%);transition:visibility .3s ease 0s,opacity .3s ease 0s;background-color:rgba(0,0,0,.5);border-radius:4px}.jb-pro-container .icon-title{display:inline-block;padding:5px 10px;font-size:12px;white-space:nowrap;color:#fff}.jb-pro-container .jb-pro-quality-menu{padding:8px 0}.jb-pro-container .jb-pro-menu-item,.jb-pro-container .jb-pro-quality-menu-item,.jb-pro-container .jb-pro-scale-menu-item,.jb-pro-container .jb-pro-speed-menu-item{display:block;height:25px;line-height:25px;margin:0;padding:0 10px;cursor:pointer;font-size:14px;text-align:center;width:50px;color:hsla(0,0%,100%,.5);transition:color .3s,background-color .3s}.jb-pro-container .jb-pro-menu-item:hover,.jb-pro-container .jb-pro-quality-menu-item:hover,.jb-pro-container .jb-pro-scale-menu-item:hover,.jb-pro-container .jb-pro-speed-menu-item:hover{background-color:hsla(0,0%,100%,.2)}.jb-pro-container .jb-pro-menu-item:focus,.jb-pro-container .jb-pro-quality-menu-item:focus,.jb-pro-container .jb-pro-scale-menu-item:focus,.jb-pro-container .jb-pro-speed-menu-item:focus{outline:none}.jb-pro-container .jb-pro-menu-item.jb-pro-menu-item-active,.jb-pro-container .jb-pro-menu-item.jb-pro-quality-menu-item-active,.jb-pro-container .jb-pro-menu-item.jb-pro-scale-menu-item-active,.jb-pro-container .jb-pro-menu-item.jb-pro-speed-menu-item-active,.jb-pro-container .jb-pro-quality-menu-item.jb-pro-menu-item-active,.jb-pro-container .jb-pro-quality-menu-item.jb-pro-quality-menu-item-active,.jb-pro-container .jb-pro-quality-menu-item.jb-pro-scale-menu-item-active,.jb-pro-container .jb-pro-quality-menu-item.jb-pro-speed-menu-item-active,.jb-pro-container .jb-pro-scale-menu-item.jb-pro-menu-item-active,.jb-pro-container .jb-pro-scale-menu-item.jb-pro-quality-menu-item-active,.jb-pro-container .jb-pro-scale-menu-item.jb-pro-scale-menu-item-active,.jb-pro-container .jb-pro-scale-menu-item.jb-pro-speed-menu-item-active,.jb-pro-container .jb-pro-speed-menu-item.jb-pro-menu-item-active,.jb-pro-container .jb-pro-speed-menu-item.jb-pro-quality-menu-item-active,.jb-pro-container .jb-pro-speed-menu-item.jb-pro-scale-menu-item-active,.jb-pro-container .jb-pro-speed-menu-item.jb-pro-speed-menu-item-active{color:#2298fc}.jb-pro-container .jb-pro-volume-panel-wrap{position:absolute;left:50%;bottom:100%;visibility:hidden;opacity:0;transform:translateX(-50%) translateY(22%);transition:visibility .3s,opacity .3s;background-color:rgba(0,0,0,.5);border-radius:4px;height:120px;width:50px;overflow:hidden}.jb-pro-container .jb-pro-volume-panel-wrap.jb-pro-volume-panel-wrap-show{visibility:visible;opacity:1}.jb-pro-container .jb-pro-volume-panel{cursor:pointer;position:absolute;top:21px;height:60px;width:50px;overflow:hidden}.jb-pro-container .jb-pro-volume-panel-text{position:absolute;left:0;top:0;width:50px;height:20px;line-height:20px;text-align:center;color:#fff;font-size:12px}.jb-pro-container .jb-pro-volume-panel-handle{position:absolute;top:48px;left:50%;width:12px;height:12px;border-radius:12px;margin-left:-6px;background:#fff}.jb-pro-container .jb-pro-volume-panel-handle:before{bottom:-54px;background:#fff}.jb-pro-container .jb-pro-volume-panel-handle:after{bottom:6px;background:hsla(0,0%,100%,.2)}.jb-pro-container .jb-pro-volume-panel-handle:after,.jb-pro-container .jb-pro-volume-panel-handle:before{content:"";position:absolute;display:block;left:50%;width:3px;margin-left:-1px;height:60px}.jb-pro-container.jb-pro-fullscreen-web .jb-pro-controls{width:100vh}.jb-pro-container.jb-pro-fullscreen-web .jb-pro-play-big:after{transform:translate(-50%,-50%) rotate(270deg)}.jb-pro-container.jb-pro-fullscreen-web .jb-pro-loading{flex-direction:row}.jb-pro-container.jb-pro-fullscreen-web .jb-pro-loading-text{transform:rotate(270deg)}.jb-pro-container .jb-pro-contextmenus{display:none;flex-direction:column;position:absolute;z-index:120;left:10px;top:10px;min-width:200px;padding:5px 0;background-color:rgba(0,0,0,.9);border-radius:3px}.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu{cursor:pointer;font-size:12px;display:block;color:#fff;padding:10px 15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 0 2px rgba(0,0,0,.5);border-bottom:1px solid hsla(0,0%,100%,.1)}.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu a{color:#fff;text-decoration:none}.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu span{display:inline-block;padding:0 7px}.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu span.art-current,.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu span:hover{color:var(--theme)}.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu:hover{background-color:hsla(0,0%,100%,.1)}.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu:last-child{border-bottom:none}.jb-pro-container.jb-pro-contextmenus-show .jb-pro-contextmenus{display:flex}.jb-pro-container .jb-pro-extend-dom{display:block;position:relative;width:100%;height:100%;display:none}.jb-pro-container-playback .jb-pro-controls{height:48px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center{flex:1;display:flex;box-sizing:border-box;justify-content:space-between;font-size:12px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time{box-sizing:border-box;flex:1;position:relative;height:100%}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-inner{width:300px;height:100%;overflow-y:hidden;overflow-x:auto}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-current-time{position:absolute;left:0;top:0;height:15px;width:1px;background-color:red;text-align:center;z-index:1}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-current-time-text{position:absolute;box-sizing:border-box;padding:0 5px;width:60px;left:-25px;top:15px;border:1px solid red;height:15px;line-height:15px;cursor:move;background-color:#fff;color:#000;-webkit-user-select:none;-moz-user-select:none;user-select:none}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-scroll{position:relative;width:1440px;margin:0 auto}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-scroll.one-hour{width:1440px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-scroll.half-hour{width:2880px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-scroll.ten-min{width:8640px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-scroll.five-min{width:17280px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-scroll.one-min{width:86400px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-list{position:relative;background-color:#ccc;height:48px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-day{height:100%;overflow:hidden}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-one-wrap{height:8px;z-index:1}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-second-wrap{height:25px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-btns{display:flex;align-items:center}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute-one,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-second-one{float:left;width:1px;height:8px;margin:0;cursor:default;position:relative;z-index:1}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute-one.active,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-second-one.active{background-color:orange;cursor:pointer}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute-one.start,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-second-one.start{background-color:#999}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute-one:hover .jb-pro-playback-time-title-tips,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-second-one:hover .jb-pro-playback-time-title-tips{visibility:visible;opacity:1}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-title-tips{pointer-events:none;position:absolute;left:0;top:100%;visibility:hidden;opacity:0;transform:translateX(13%);transition:visibility .3s ease 0s,opacity .3s ease 0s;background-color:#000;border-radius:4px;z-index:1}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-title-tips.jb-pro-playback-time-title-tips-left{transform:translateX(-100%)}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-title-tips .jb-pro-playback-time-title{display:inline-block;padding:2px 5px;font-size:12px;white-space:nowrap;color:#fff}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-hour,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute{float:left;position:relative;width:60px;box-sizing:border-box;border-top:1px solid #999;-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:left;height:25px;line-height:25px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-hour:first-child,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute:first-child{border-left:0}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-hour:first-child .jb-pro-playback-time-hour-text,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute:first-child .jb-pro-playback-time-hour-text{left:0}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-hour:after,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute:after{content:"";position:absolute;left:0;top:-8px;width:1px;height:14px;background-color:#999}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-hour-text,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute-text{position:absolute;left:-13px}.jb-pro-container-playback .jb-pro-playback-expand.disabled .jb-pro-icon-expand,.jb-pro-container-playback .jb-pro-playback-narrow.disabled .jb-pro-icon-narrow{cursor:no-drop}.jb-pro-container-playback .jb-pro-control-progress-simple{position:absolute;box-sizing:border-box;left:0;top:-2px;width:100%;display:flex;flex-direction:row;align-items:center;height:8px;cursor:pointer}.jb-pro-container-playback .jb-pro-control-progress-simple:hover{top:0;align-items:flex-start}.jb-pro-container-playback .jb-pro-control-progress-simple:hover .jb-pro-control-progress-inner{height:100%}.jb-pro-container-playback .jb-pro-control-progress-simple:hover .jb-pro-control-progress-inner .jb-pro-progress-indicator{transform:scale(1);visibility:visible}.jb-pro-container-playback .jb-pro-control-progress-inner{display:flex;align-items:center;position:relative;height:50%;width:100%;transition:all .2s ease;background:hsla(0,0%,100%,.5)}.jb-pro-container-playback .jb-pro-progress-hover{display:none;width:0}.jb-pro-container-playback .jb-pro-progress-played{position:absolute;left:0;top:0;right:0;bottom:0;height:100%;width:0;background-color:orange}.jb-pro-container-playback .jb-pro-progress-indicator{visibility:hidden;align-items:center;justify-content:center;position:absolute;z-index:40;border-radius:50%;transform:scale(.1);transition:transform .1s ease-in-out}.jb-pro-container-playback .jb-pro-progress-indicator .jb-pro-icon{width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.jb-pro-container-playback .jb-pro-progress-indicator:hover{transform:scale(1.2)!important}.jb-pro-container-playback .jb-pro-progress-tip{display:none;position:absolute;z-index:50;top:-25px;left:0;height:20px;padding:0 5px;line-height:20px;color:#fff;font-size:12px;text-align:center;background:rgba(0,0,0,.7);border-radius:3px;font-weight:700;white-space:nowrap}.jb-pro-container-playback.jb-pro-fullscreen-web .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-playback-time-inner{overflow-y:auto}.jb-pro-zoom-control{cursor:grab}.jb-pro-performance-panel{position:absolute;box-sizing:border-box;z-index:10000;left:0;top:0;padding:5px;font-size:10px;background:rgba(0,0,0,.2);color:#fff;max-height:100%;overflow-y:auto;display:none}.jb-pro-performance-panel .jb-pro-performance-item{display:flex;align-items:center;margin-top:3px;color:#fff}.jb-pro-performance-panel .jb-pro-performance-item-block{height:10px}.jb-pro-tips-message{position:absolute;top:0;left:0;width:100%;height:100%;background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto;box-sizing:content-box;display:none}.jb-pro-tips-message:before{color:hsla(0,0%,100%,.3);content:"X";font-family:Arial,Helvetica,sans-serif;font-size:40px;left:0;line-height:1;margin-top:-20px;position:absolute;text-shadow:2em 2em 4em #000;text-align:center;top:50%;vertical-align:middle;width:100%}.jb-pro-tips-message .jb-pro-tips-message-close{position:absolute;z-index:99999;right:0;top:0;width:40px;height:40px;display:flex;align-items:center;justify-content:center}.jb-pro-tips-message .jb-pro-tips-message-close .jb-pro-tips-message-close-icon{width:20px;height:20px;border-radius:10px;cursor:pointer;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAeUExURUdwTM3Nzc7Ozs7Ozs3Nzc3NzcrKys3Nzc3Nzc3NzePZJxkAAAAJdFJOUwCtKdPBGAmNTt3jdDcAAADfSURBVDjL1dOxDoIwEADQgwR07GTCZtI/IGHgAzBhM9EPkMTB0Y3V0ZXIcn/rtRR6pefgSKeSu3ellyvA9lZ/5F9p/3K7PZY8oPG5BD6MpPUSgIITzdIStifAshjRQV1PCFT8TxaicTzzwEwINOEdHVmDmcTAkRhMhMAp7iQRjcMtDhCp8SA1v0ARGIIK/gnkv0p1OBTS4QRUIpE7DiYYXTBrzcld3JIrAarXrps4AVNwRSZgExoJmIyAaAdsShUMn/JF2fh4YEkpAcgvnuwYCIb6EbbbP4PsDfLD2dD6Av1qTvAQlzUTAAAAAElFTkSuQmCC") no-repeat 50%;background-color:#fff;background-size:100% 100%}.jb-pro-tips-message .jb-pro-tips-message-content{overflow:auto;padding:35px;box-sizing:border-box;width:100%;height:100%}.jb-pro-tips-message .jb-pro-tips-message-content .jb-pro-tips-message-content-item{font-size:14px;color:#fff;text-align:center;line-height:1.5}');class Ih{constructor(e){var t;this.player=e,this.TAG_NAME="Control",this.extendBtnList=[],((e,t)=>{e._opt.hasControl&&e._opt.controlAutoHide?e.$container.classList.add("jb-pro-controls-show-auto-hide"):e.$container.classList.add("jb-pro-controls-show");const i=e._opt,s=i.operateBtns,r=`\n <div class="jb-pro-controls-center">\n <div class="jb-pro-controls-playback-time">\n <div class="jb-pro-controls-playback-time-inner">\n <div class="jb-pro-controls-playback-time-scroll">\n <div class="jb-pro-controls-playback-time-list">\n <div class="jb-pro-playback-time-day">\n <div class="jb-pro-playback-time-one-wrap"></div>\n <div class="jb-pro-playback-time-second-wrap"></div>\n </div>\n </div>\n <div class="jb-pro-controls-playback-current-time">\n <div class="jb-pro-controls-playback-current-time-text">00:00:00</div>\n </div>\n </div>\n </div>\n </div>\n ${i.playbackConfig.showPrecisionBtn?`\n <div class="jb-pro-controls-playback-btns">\n <div class="jb-pro-controls-item jb-pro-playback-narrow">${Ah.narrow}</div>\n <div class="jb-pro-controls-item jb-pro-playback-expand">${Ah.expand}</div>\n </div>\n `:""}\n </div>\n `;e.$container.insertAdjacentHTML("beforeend",`\n ${i.background?`<div class="jb-pro-poster" style="background-image: url(${i.background})"></div>`:""}\n <div class="jb-pro-loading-bg">\n <img class="jb-pro-loading-bg-image" src="" alt="">\n </div>\n ${i.loadingIcon?`\n <div class="jb-pro-loading">\n ${Ah.loading}\n <div class="jb-pro-loading-text">${i.loadingText}</div>\n </div>\n `:""}\n ${i.hasControl&&s.play?'<div class="jb-pro-play-big"></div>':""}\n ${i.hasControl&&s.ptz?`\n <div class="jb-pro-ptz-controls show-${i.ptzShowType}">\n <div class="jb-pro-ptz-bg-active"></div>\n <div class="jb-pro-ptz-arrow jb-pro-ptz-arrow-up" data-arrow="up"></div>\n <div class="jb-pro-ptz-arrow jb-pro-ptz-arrow-right" data-arrow="right"></div>\n <div class="jb-pro-ptz-arrow jb-pro-ptz-arrow-down" data-arrow="down"></div>\n <div class="jb-pro-ptz-arrow jb-pro-ptz-arrow-left" data-arrow="left"></div>\n ${i.ptzMoreArrowShow?'\n <div class="jb-pro-ptz-arrow jb-pro-ptz-arrow-left-up" data-arrow="left-up"></div>\n <div class="jb-pro-ptz-arrow jb-pro-ptz-arrow-right-up" data-arrow="right-up"></div>\n <div class="jb-pro-ptz-arrow jb-pro-ptz-arrow-left-down" data-arrow="left-down"></div>\n <div class="jb-pro-ptz-arrow jb-pro-ptz-arrow-right-down" data-arrow="right-down"></div>\n ':""}\n <div class="jb-pro-ptz-control"></div>\n <div class="jb-pro-ptz-btns">\n ${i.ptzZoomShow?'\n <div class="jb-pro-ptz-btn">\n <div class="jb-pro-ptz-expand jb-pro-ptz-icon">\n <i class="jb-pro-ptz-expand-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">缩放+</span>\n </span>\n </div>\n <div class="jb-pro-ptz-narrow jb-pro-ptz-icon">\n <i class="jb-pro-ptz-narrow-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">缩放-</span>\n </span>\n </div>\n </div>\n ':""}\n ${i.ptzApertureShow?'\n <div class="jb-pro-ptz-btn">\n <div class="jb-pro-ptz-aperture-far jb-pro-ptz-icon">\n <i class="jb-pro-ptz-aperture-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">光圈+</span>\n </span>\n </div>\n <div class="jb-pro-ptz-aperture-near jb-pro-ptz-icon">\n <i class="jb-pro-ptz-aperture-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">光圈-</span>\n </span>\n </div>\n </div>\n ':""}\n ${i.ptzFocusShow?'\n <div class="jb-pro-ptz-btn">\n <div class="jb-pro-ptz-focus-far jb-pro-ptz-icon">\n <i class="jb-pro-ptz-focus-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">聚焦+</span>\n </span>\n </div>\n <div class="jb-pro-ptz-focus-near jb-pro-ptz-icon">\n <i class="jb-pro-ptz-focus-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">聚焦-</span>\n </span>\n </div>\n </div>\n ':""}\n ${i.ptzCruiseShow?'\n <div class="jb-pro-ptz-btn">\n <div class="jb-pro-ptz-cruise-play jb-pro-ptz-icon">\n <i class="jb-pro-ptz-focus-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">巡航开</span>\n </span>\n </div>\n <div class="jb-pro-ptz-cruise-pause jb-pro-ptz-icon">\n <i class="jb-pro-ptz-focus-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">巡航关</span>\n </span>\n </div>\n </div>\n ':""}\n ${i.ptzFogShow?'\n <div class="jb-pro-ptz-btn">\n <div class="jb-pro-ptz-fog-open jb-pro-ptz-icon">\n <i class="jb-pro-ptz-focus-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">透雾开</span>\n </span>\n </div>\n <div class="jb-pro-ptz-fog-close jb-pro-ptz-icon">\n <i class="jb-pro-ptz-focus-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">透雾关</span>\n </span>\n </div>\n </div>\n ':""}\n\n ${i.ptzWiperShow?'\n <div class="jb-pro-ptz-btn">\n <div class="jb-pro-ptz-wiper-open jb-pro-ptz-icon">\n <i class="jb-pro-ptz-focus-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">雨刷开</span>\n </span>\n </div>\n <div class="jb-pro-ptz-wiper-close jb-pro-ptz-icon">\n <i class="jb-pro-ptz-focus-icon"></i>\n <span class="icon-title-tips">\n <span class="icon-title">雨刷关</span>\n </span>\n </div>\n </div>\n ':""}\n </div>\n </div>\n `:""}\n ${i.hasVideo?`\n <div class="jb-pro-zoom-controls">\n <div class="jb-pro-zoom-narrow">${Ah.narrow}</div>\n <div class="jb-pro-zoom-tips">电子放大</div>\n <div class="jb-pro-zoom-expand">${Ah.expand}</div>\n <div class="jb-pro-zoom-stop2">${Ah.zoomStop}</div>\n </div>\n <div class="jb-pro-recording">\n <div class="jb-pro-recording-red-point"></div>\n <div class="jb-pro-recording-time">00:00:00</div>\n <div class="jb-pro-recording-stop">${Ah.recordStop}</div>\n </div>\n `:""}\n\n ${i.hasControl?`\n <div class="jb-pro-controls">\n <div class="jb-pro-controls-bottom">\n <div class="jb-pro-controls-left">\n ${i.showBandwidth?'<div class="jb-pro-controls-item jb-pro-speed"></div>':""}\n <div class="jb-pro-playback-control-time"></div>\n <div class="jb-pro-controls-item-html">${i.controlHtml}</div>\n </div>\n ${i.playType===_&&i.playbackConfig.showControl&&i.playbackConfig.controlType===Q.normal?r:""}\n ${i.playType===_&&i.playbackConfig.showControl&&i.playbackConfig.controlType===Q.simple?'\n <div class="jb-pro-control-progress-simple">\n <div class="jb-pro-control-progress-inner">\n <div class="jb-pro-progress-hover"></div>\n <div class="jb-pro-progress-played"></div>\n <div class="jb-pro-progress-indicator"></div>\n <div class="jb-pro-progress-tip">00:00</div>\n </div>\n </div>\n ':""}\n <div class="jb-pro-controls-right">\n ${i.playType===_&&i.playbackConfig.showRateBtn?'\n <div class="jb-pro-controls-item-wrap">\n <div class="jb-pro-controls-item jb-pro-speed-menu">\n <div class="jb-pro-speed-icon-text"></div>\n <div class="jb-pro-speed-menu-list"></div>\n </div>\n </div>\n ':""}\n ${s.close?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-close">${Ah.close}</div></div>`:""}\n ${s.logSave?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-logSave">${Ah.logSave}</div></div>`:""}\n ${s.performance?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-performance">${Ah.performance}</div><div class="jb-pro-controls-item jb-pro-performance-active">${Ah.performanceActive}</div></div>`:""}\n ${s.aiFace?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-face">${Ah.face}</div><div class="jb-pro-controls-item jb-pro-face-active">${Ah.faceActive}</div></div>`:""}\n ${s.aiObject?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-object">${Ah.object}</div><div class="jb-pro-controls-item jb-pro-object-active">${Ah.objectActive}</div></div>`:""}\n ${s.aiOcclusion?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-occlusion">${Ah.occlusion}</div><div class="jb-pro-controls-item jb-pro-occlusion-active">${Ah.occlusionActive}</div></div>`:""}\n ${s.quality?'\n <div class="jb-pro-controls-item-wrap">\n <div class="jb-pro-controls-item jb-pro-quality-menu">\n <div class="jb-pro-quality-icon-text"></div>\n <div class="jb-pro-quality-menu-list"></div>\n </div>\n </div>\n ':""}\n ${s.scale?'\n <div class="jb-pro-controls-item-wrap">\n <div class="jb-pro-controls-item jb-pro-scale-menu">\n <div class="jb-pro-scale-icon-text"></div>\n <div class="jb-pro-scale-menu-list"></div>\n </div>\n </div>\n ':""}\n ${s.audio?`\n <div class="jb-pro-controls-item-wrap">\n <div class="jb-pro-controls-item jb-pro-volume">\n ${Ah.audio}\n ${Ah.mute}\n <div class="jb-pro-volume-panel-wrap">\n <div class="jb-pro-volume-panel">\n <div class="jb-pro-volume-panel-handle"></div>\n </div>\n <div class="jb-pro-volume-panel-text"></div>\n </div>\n </div>\n </div>\n `:""}\n ${s.play?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-play">${Ah.play}</div><div class="jb-pro-controls-item jb-pro-pause">${Ah.pause}</div></div>`:""}\n ${s.screenshot?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-screenshot">${Ah.screenshot}</div></div>`:""}\n ${s.record?` <div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-record">${Ah.record}</div><div class="jb-pro-controls-item jb-pro-record-stop">${Ah.recordStop}</div></div>`:""}\n ${s.ptz?` <div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-ptz">${Ah.ptz}</div><div class="jb-pro-controls-item jb-pro-ptz-active">${Ah.ptzActive}</div></div>`:""}\n ${s.zoom?` <div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-zoom">${Ah.zoom}</div><div class="jb-pro-controls-item jb-pro-zoom-stop">${Ah.zoomStop}</div></div>`:""}\n ${s.fullscreen?`<div class="jb-pro-controls-item-wrap"><div class="jb-pro-controls-item jb-pro-fullscreen">${Ah.fullscreen}</div><div class="jb-pro-controls-item jb-pro-fullscreen-exit">${Ah.fullscreenExit}</div></div>`:""}\n </div>\n </div>\n </div>\n `:""}\n <div class="jb-pro-performance-panel"></div>\n <div class="jb-pro-contextmenus"></div>\n <div class="jb-pro-tips-message">\n <div class="jb-pro-tips-message-close">\n <div class="jb-pro-tips-message-close-icon"></div>\n </div>\n <div class="jb-pro-tips-message-content"></div>\n </div>\n `),Object.defineProperty(t,"$poster",{value:e.$container.querySelector(".jb-pro-poster")}),Object.defineProperty(t,"$loadingBg",{value:e.$container.querySelector(".jb-pro-loading-bg")}),Object.defineProperty(t,"$loadingBgImage",{value:e.$container.querySelector(".jb-pro-loading-bg-image")}),Object.defineProperty(t,"$loading",{value:e.$container.querySelector(".jb-pro-loading")}),Object.defineProperty(t,"$loadingText",{value:e.$container.querySelector(".jb-pro-loading-text")}),Object.defineProperty(t,"$play",{value:e.$container.querySelector(".jb-pro-play")}),Object.defineProperty(t,"$playBig",{value:e.$container.querySelector(".jb-pro-play-big")}),Object.defineProperty(t,"$recording",{value:e.$container.querySelector(".jb-pro-recording")}),Object.defineProperty(t,"$recordingTime",{value:e.$container.querySelector(".jb-pro-recording-time")}),Object.defineProperty(t,"$recordingStop",{value:e.$container.querySelector(".jb-pro-recording-stop")}),Object.defineProperty(t,"$pause",{value:e.$container.querySelector(".jb-pro-pause")}),Object.defineProperty(t,"$controls",{value:e.$container.querySelector(".jb-pro-controls")}),Object.defineProperty(t,"$controlsInner",{value:e.$container.querySelector(".jb-pro-controls-bottom")}),Object.defineProperty(t,"$controlsLeft",{value:e.$container.querySelector(".jb-pro-controls-left")}),Object.defineProperty(t,"$controlsRight",{value:e.$container.querySelector(".jb-pro-controls-right")}),Object.defineProperty(t,"$volume",{value:e.$container.querySelector(".jb-pro-volume")}),Object.defineProperty(t,"$volumePanelWrap",{value:e.$container.querySelector(".jb-pro-volume-panel-wrap")}),Object.defineProperty(t,"$volumePanelText",{value:e.$container.querySelector(".jb-pro-volume-panel-text")}),Object.defineProperty(t,"$volumePanel",{value:e.$container.querySelector(".jb-pro-volume-panel")}),Object.defineProperty(t,"$volumeHandle",{value:e.$container.querySelector(".jb-pro-volume-panel-handle")}),Object.defineProperty(t,"$volumeOn",{value:e.$container.querySelector(".jb-pro-icon-audio")}),Object.defineProperty(t,"$volumeOff",{value:e.$container.querySelector(".jb-pro-icon-mute")}),Object.defineProperty(t,"$fullscreen",{value:e.$container.querySelector(".jb-pro-fullscreen")}),Object.defineProperty(t,"$fullscreenExit",{value:e.$container.querySelector(".jb-pro-fullscreen-exit")}),Object.defineProperty(t,"$record",{value:e.$container.querySelector(".jb-pro-record")}),Object.defineProperty(t,"$recordStop",{value:e.$container.querySelector(".jb-pro-record-stop")}),Object.defineProperty(t,"$screenshot",{value:e.$container.querySelector(".jb-pro-screenshot")}),Object.defineProperty(t,"$speed",{value:e.$container.querySelector(".jb-pro-speed")}),Object.defineProperty(t,"$controlHtml",{value:e.$container.querySelector(".jb-pro-controls-item-html")}),Object.defineProperty(t,"$playbackTime",{value:e.$container.querySelector(".jb-pro-controls-playback-time")}),Object.defineProperty(t,"$playbackTimeInner",{value:e.$container.querySelector(".jb-pro-controls-playback-time-inner")}),Object.defineProperty(t,"$playbackTimeScroll",{value:e.$container.querySelector(".jb-pro-controls-playback-time-scroll")}),Object.defineProperty(t,"$playbackTimeList",{value:e.$container.querySelector(".jb-pro-controls-playback-time-list")}),Object.defineProperty(t,"$playbackTimeListOne",{value:e.$container.querySelector(".jb-pro-playback-time-one-wrap")}),Object.defineProperty(t,"$playbackTimeListSecond",{value:e.$container.querySelector(".jb-pro-playback-time-second-wrap")}),Object.defineProperty(t,"$playbackCurrentTime",{value:e.$container.querySelector(".jb-pro-controls-playback-current-time")}),Object.defineProperty(t,"$playbackCurrentTimeText",{value:e.$container.querySelector(".jb-pro-controls-playback-current-time-text")}),Object.defineProperty(t,"$controlsPlaybackBtns",{value:e.$container.querySelector(".jb-pro-controls-playback-btns")}),Object.defineProperty(t,"$playbackNarrow",{value:e.$container.querySelector(".jb-pro-playback-narrow")}),Object.defineProperty(t,"$playbackExpand",{value:e.$container.querySelector(".jb-pro-playback-expand")}),Object.defineProperty(t,"$ptz",{value:e.$container.querySelector(".jb-pro-ptz")}),Object.defineProperty(t,"$ptzActive",{value:e.$container.querySelector(".jb-pro-ptz-active")}),Object.defineProperty(t,"$ptzControl",{value:e.$container.querySelector(".jb-pro-ptz-controls")}),Object.defineProperty(t,"$ptzBgActive",{value:e.$container.querySelector(".jb-pro-ptz-bg-active")}),Object.defineProperty(t,"$ptzControlCircular",{value:e.$container.querySelector(".jb-pro-ptz-control")}),Object.defineProperty(t,"$ptzArrows",{value:e.$container.querySelectorAll(".jb-pro-ptz-arrow")}),Object.defineProperty(t,"$ptzExpand",{value:e.$container.querySelector(".jb-pro-ptz-expand")}),Object.defineProperty(t,"$ptzNarrow",{value:e.$container.querySelector(".jb-pro-ptz-narrow")}),Object.defineProperty(t,"$ptzApertureFar",{value:e.$container.querySelector(".jb-pro-ptz-aperture-far")}),Object.defineProperty(t,"$ptzApertureNear",{value:e.$container.querySelector(".jb-pro-ptz-aperture-near")}),Object.defineProperty(t,"$ptzFocusFar",{value:e.$container.querySelector(".jb-pro-ptz-focus-far")}),Object.defineProperty(t,"$ptzFocusNear",{value:e.$container.querySelector(".jb-pro-ptz-focus-near")}),Object.defineProperty(t,"$ptzCruisePlay",{value:e.$container.querySelector(".jb-pro-ptz-cruise-play")}),Object.defineProperty(t,"$ptzCruisePause",{value:e.$container.querySelector(".jb-pro-ptz-cruise-pause")}),Object.defineProperty(t,"$ptzFogOpen",{value:e.$container.querySelector(".jb-pro-ptz-fog-open")}),Object.defineProperty(t,"$ptzFogClose",{value:e.$container.querySelector(".jb-pro-ptz-fog-close")}),Object.defineProperty(t,"$ptzWiperOpen",{value:e.$container.querySelector(".jb-pro-ptz-wiper-open")}),Object.defineProperty(t,"$ptzWiperClose",{value:e.$container.querySelector(".jb-pro-ptz-wiper-close")}),Object.defineProperty(t,"$qualityText",{value:e.$container.querySelector(".jb-pro-quality-icon-text")}),Object.defineProperty(t,"$qualityMenu",{value:e.$container.querySelector(".jb-pro-quality-menu")}),Object.defineProperty(t,"$qualityMenuList",{value:e.$container.querySelector(".jb-pro-quality-menu-list")}),Object.defineProperty(t,"$scaleText",{value:e.$container.querySelector(".jb-pro-scale-icon-text")}),Object.defineProperty(t,"$scaleMenu",{value:e.$container.querySelector(".jb-pro-scale-menu")}),Object.defineProperty(t,"$scaleMenuList",{value:e.$container.querySelector(".jb-pro-scale-menu-list")}),Object.defineProperty(t,"$zoom",{value:e.$container.querySelector(".jb-pro-zoom")}),Object.defineProperty(t,"$zoomStop",{value:e.$container.querySelector(".jb-pro-zoom-stop")}),Object.defineProperty(t,"$zoomNarrow",{value:e.$container.querySelector(".jb-pro-zoom-narrow")}),Object.defineProperty(t,"$zoomExpand",{value:e.$container.querySelector(".jb-pro-zoom-expand")}),Object.defineProperty(t,"$zoomStop2",{value:e.$container.querySelector(".jb-pro-zoom-stop2")}),Object.defineProperty(t,"$close",{value:e.$container.querySelector(".jb-pro-close")}),Object.defineProperty(t,"$zoomControls",{value:e.$container.querySelector(".jb-pro-zoom-controls")}),Object.defineProperty(t,"$performancePanel",{value:e.$container.querySelector(".jb-pro-performance-panel")}),Object.defineProperty(t,"$performance",{value:e.$container.querySelector(".jb-pro-performance")}),Object.defineProperty(t,"$performanceActive",{value:e.$container.querySelector(".jb-pro-performance-active")}),Object.defineProperty(t,"$faceDetect",{value:e.$container.querySelector(".jb-pro-face")}),Object.defineProperty(t,"$faceDetectActive",{value:e.$container.querySelector(".jb-pro-face-active")}),Object.defineProperty(t,"$objectDetect",{value:e.$container.querySelector(".jb-pro-object")}),Object.defineProperty(t,"$objectDetectActive",{value:e.$container.querySelector(".jb-pro-object-active")}),Object.defineProperty(t,"$occlusionDetect",{value:e.$container.querySelector(".jb-pro-occlusion")}),Object.defineProperty(t,"$occlusionDetectActive",{value:e.$container.querySelector(".jb-pro-occlusion-active")}),Object.defineProperty(t,"$contextmenus",{value:e.$container.querySelector(".jb-pro-contextmenus")}),Object.defineProperty(t,"$speedText",{value:e.$container.querySelector(".jb-pro-speed-icon-text")}),Object.defineProperty(t,"$speedMenu",{value:e.$container.querySelector(".jb-pro-speed-menu")}),Object.defineProperty(t,"$speedMenuList",{value:e.$container.querySelector(".jb-pro-speed-menu-list")}),Object.defineProperty(t,"$logSave",{value:e.$container.querySelector(".jb-pro-logSave")}),Object.defineProperty(t,"$playbackProgress",{value:e.$container.querySelector(".jb-pro-control-progress-simple")}),Object.defineProperty(t,"$playbackProgressTip",{value:e.$container.querySelector(".jb-pro-progress-tip")}),Object.defineProperty(t,"$playbackProgressHover",{value:e.$container.querySelector(".jb-pro-progress-hover")}),Object.defineProperty(t,"$playbackProgressPlayed",{value:e.$container.querySelector(".jb-pro-progress-played")}),Object.defineProperty(t,"$playbackProgressIndicator",{value:e.$container.querySelector(".jb-pro-progress-indicator")}),Object.defineProperty(t,"$playbackProgressTime",{value:e.$container.querySelector(".jb-pro-playback-control-time")}),Object.defineProperty(t,"$tipsMessage",{value:e.$container.querySelector(".jb-pro-tips-message")}),Object.defineProperty(t,"$tipsMessageClose",{value:e.$container.querySelector(".jb-pro-tips-message-close")}),Object.defineProperty(t,"$tipsMessageContent",{value:e.$container.querySelector(".jb-pro-tips-message-content")})})(e,this),e._opt.extendOperateBtns.length>0&&e._opt.extendOperateBtns.forEach((e=>{this.addExtendBtn(e)})),e._opt.extendDomConfig&&e._opt.extendDomConfig.html&&this.addExtendDom(e._opt.extendDomConfig),t=this,Object.defineProperty(t,"controlsRect",{get:()=>t.$controls.getBoundingClientRect()}),Object.defineProperty(t,"controlsInnerRect",{get:()=>t.$controlsInner.getBoundingClientRect()}),Object.defineProperty(t,"controlsLeftRect",{get:()=>t.$controlsLeft.getBoundingClientRect()}),Object.defineProperty(t,"controlsRightRect",{get:()=>t.$controlsRight.getBoundingClientRect()}),Object.defineProperty(t,"controlsPlaybackTimeInner",{get:()=>t.$playbackTimeInner&&t.$playbackTimeInner.getBoundingClientRect()||{}}),Object.defineProperty(t,"controlsPlaybackBtnsRect",{get:()=>t.$controlsPlaybackBtns&&t.$controlsPlaybackBtns.getBoundingClientRect()||{width:0}}),Ph(e,this),((e,t)=>{const{events:{proxy:i},debug:s}=e,r=e._opt,a=r.operateBtns;function o(e){const{bottom:i,height:s}=t.$volumePanel.getBoundingClientRect(),{height:r}=t.$volumeHandle.getBoundingClientRect();return oa(i-e.y-r/2,0,s-r/2)/(s-r)}if(pa()&&i(window,["click","contextmenu"],(i=>{i.composedPath().indexOf(e.$container)>-1?t.isFocus=!0:t.isFocus=!1})),i(t.$controls,"click",(e=>{e.stopPropagation()})),a.play&&(i(t.$pause,"click",(t=>{r.playType===_&&r.playbackConfig.uiUsePlaybackPause?e.playbackPause=!0:Ya(a.pauseFn)?a.pauseFn():e.pauseForControl()})),i(t.$play,"click",(t=>{r.playType===_&&e.playbackPause?e.playbackPause=!1:Ya(a.playFn)?a.playFn():e.playForControl().then((()=>{e.resumeAudioAfterPause()}))}))),i(t.$playBig,"click",(t=>{r.playType===_&&e.playbackPause?e.playbackPause=!1:Ya(a.playFn)?a.playFn():e.playForControl().then((()=>{e.resumeAudioAfterPause()}))})),a.screenshot&&i(t.$screenshot,"click",(t=>{t.stopPropagation(),Ya(a.screenshotFn)?a.screenshotFn():e.video.screenshot()})),a.audio&&(pa()&&(i(t.$volume,"mouseover",(()=>{t.$volumePanelWrap.classList.add("jb-pro-volume-panel-wrap-show")})),i(t.$volume,"mouseout",(()=>{t.$volumePanelWrap.classList.remove("jb-pro-volume-panel-wrap-show")})),i(t.$volumePanel,"click",(t=>{t.stopPropagation(),e.volume=o(t)})),i(t.$volumeHandle,"mousedown",(e=>{e.stopPropagation(),t.isVolumeDroging=!0})),i(t.$volumeHandle,"mousemove",(i=>{t.isVolumeDroging&&(e.volume=o(i))})),i(document,"mouseup",(()=>{t.isVolumeDroging&&(t.isVolumeDroging=!1)}))),i(t.$volumeOn,"click",(i=>{i.stopPropagation(),na(t.$volumeOn,"display","none"),na(t.$volumeOff,"display","block");const s=e.volume;e.volume=0,e._lastVolume=pa()?s:1})),i(t.$volumeOff,"click",(i=>{i.stopPropagation(),na(t.$volumeOn,"display","block"),na(t.$volumeOff,"display","none"),e.volume=pa()?e.lastVolume||.5:1}))),a.record&&(i(t.$record,"click",(t=>{t.stopPropagation(),Ya(a.recordFn)?a.recordFn():e.recording=!0})),i(t.$recordStop,"click",(t=>{t.stopPropagation(),Ya(a.recordStopFn)?a.recordStopFn():e.recording=!1}))),i(t.$recordingStop,"click",(t=>{t.stopPropagation(),Ya(a.recordStopFn)?a.recordStopFn():e.recording=!1})),a.fullscreen&&(i(t.$fullscreen,"click",(t=>{t.stopPropagation(),Ya(a.fullscreenFn)?a.fullscreenFn():e.fullscreen=!0})),i(t.$fullscreenExit,"click",(t=>{t.stopPropagation(),Ya(a.fullscreenExitFn)?a.fullscreenExitFn():e.fullscreen=!1}))),a.ptz){if(i(t.$ptz,"click",(e=>{e.stopPropagation(),na(t.$ptzActive,"display","flex"),na(t.$ptz,"display","none"),t.$ptzControl.classList.add("jb-pro-ptz-controls-show")})),i(t.$ptzActive,"click",(e=>{e.stopPropagation(),na(t.$ptz,"display","flex"),na(t.$ptzActive,"display","none"),t.$ptzControl.classList.remove("jb-pro-ptz-controls-show")})),t.$ptzArrows.forEach((s=>{if(r.ptzClickType===K)i(s,"click",(i=>{i.stopPropagation();const s=i.currentTarget.dataset.arrow;t.$ptzBgActive.classList.add("jb-pro-ptz-bg-active-show"),t.$ptzBgActive.classList.add(`jb-pro-ptz-bg-active-${s}`),t.$ptzControlCircular.classList.add(`jb-pro-ptz-control-${s}`),e.emit(nt.ptz,fo(s)),setTimeout((()=>{t.$ptzBgActive.classList.remove("jb-pro-ptz-bg-active-show"),xi.forEach((e=>{t.$ptzBgActive.classList.remove(`jb-pro-ptz-bg-active-${e}`),t.$ptzControlCircular.classList.remove(`jb-pro-ptz-control-${e}`)})),e.emit(nt.ptz,Ri)}),1e3*r.ptzStopEmitDelay)}));else if(r.ptzClickType===Y){let r=!1;i(s,"mousedown",(i=>{i.stopPropagation(),r=!0;const s=i.currentTarget.dataset.arrow;t.$ptzBgActive.classList.add("jb-pro-ptz-bg-active-show"),t.$ptzBgActive.classList.add(`jb-pro-ptz-bg-active-${s}`),t.$ptzControlCircular.classList.add(`jb-pro-ptz-control-${s}`),e.emit(nt.ptz,fo(s))}));const a=()=>{r=!1,t.$ptzBgActive.classList.remove("jb-pro-ptz-bg-active-show"),xi.forEach((e=>{t.$ptzBgActive.classList.remove(`jb-pro-ptz-bg-active-${e}`),t.$ptzControlCircular.classList.remove(`jb-pro-ptz-control-${e}`)})),e.emit(nt.ptz,Ri)};i(s,"mouseup",(e=>{e.stopPropagation(),r&&a()})),i(window,"mouseup",(e=>{e.stopPropagation(),r&&a()}))}})),r.ptzZoomShow)if(r.ptzClickType===K)i(t.$ptzExpand,"click",(t=>{t.stopPropagation(),e.emit(nt.ptz,Li),setTimeout((()=>{e.emit(nt.ptz,Ri)}),1e3*r.ptzStopEmitDelay)})),i(t.$ptzNarrow,"click",(t=>{t.stopPropagation(),e.emit(nt.ptz,Pi),setTimeout((()=>{e.emit(nt.ptz,Ri)}),1e3*r.ptzStopEmitDelay)}));else if(r.ptzClickType===Y){let n=!1,l=!1;i(t.$ptzExpand,"mousedown",(t=>{t.stopPropagation(),n=!0,e.emit(nt.ptz,Li)})),i(t.$ptzNarrow,"mousedown",(t=>{t.stopPropagation(),l=!0,e.emit(nt.ptz,Pi)}));const d=()=>{n=!1,l=!1,e.emit(nt.ptz,Ri)};i(t.$ptzExpand,"mouseup",(e=>{e.stopPropagation(),n&&d()})),i(t.$ptzNarrow,"mouseup",(e=>{e.stopPropagation(),l&&d()})),i(window,"mouseup",(e=>{e.stopPropagation(),(n||l)&&d()}))}if(r.ptzApertureShow)if(r.ptzClickType===K)i(t.$ptzApertureFar,"click",(t=>{t.stopPropagation(),e.emit(nt.ptz,Bi),setTimeout((()=>{e.emit(nt.ptz,Di)}),1e3*r.ptzStopEmitDelay)})),i(t.$ptzApertureNear,"click",(t=>{t.stopPropagation(),e.emit(nt.ptz,Ii),setTimeout((()=>{e.emit(nt.ptz,Di)}),1e3*r.ptzStopEmitDelay)}));else if(r.ptzClickType===Y){let h=!1,c=!1;i(t.$ptzApertureFar,"mousedown",(t=>{t.stopPropagation(),h=!0,e.emit(nt.ptz,Bi)})),i(t.$ptzApertureNear,"mousedown",(t=>{t.stopPropagation(),c=!0,e.emit(nt.ptz,Ii)}));const u=()=>{h=!1,c=!1,e.emit(nt.ptz,Di)};i(t.$ptzApertureFar,"mouseup",(e=>{e.stopPropagation(),h&&u()})),i(t.$ptzApertureNear,"mouseup",(e=>{e.stopPropagation(),c&&u()})),i(window,"mouseup",(e=>{e.stopPropagation(),(h||c)&&u()}))}if(r.ptzFocusShow)if(r.ptzClickType===K)i(t.$ptzFocusFar,"click",(t=>{t.stopPropagation(),e.emit(nt.ptz,Mi),setTimeout((()=>{e.emit(nt.ptz,Di)}),1e3*r.ptzStopEmitDelay)})),i(t.$ptzFocusNear,"click",(t=>{t.stopPropagation(),e.emit(nt.ptz,Ui),setTimeout((()=>{e.emit(nt.ptz,Di)}),1e3*r.ptzStopEmitDelay)}));else if(r.ptzClickType===Y){let p=!1,f=!1;i(t.$ptzFocusFar,"mousedown",(t=>{t.stopPropagation(),p=!0,e.emit(nt.ptz,Mi)})),i(t.$ptzFocusNear,"mousedown",(t=>{t.stopPropagation(),f=!0,e.emit(nt.ptz,Ui)}));const m=()=>{p=!1,f=!1,e.emit(nt.ptz,Di)};i(t.$ptzFocusFar,"mouseup",(e=>{e.stopPropagation(),p&&m()})),i(t.$ptzFocusNear,"mouseup",(e=>{e.stopPropagation(),f&&m()})),i(window,"mouseup",(e=>{e.stopPropagation(),(p||f)&&m()}))}if(r.ptzCruiseShow&&(i(t.$ptzCruisePlay,"click",(t=>{t.stopPropagation(),e.emit(nt.ptz,Fi)})),i(t.$ptzCruisePause,"click",(t=>{t.stopPropagation(),e.emit(nt.ptz,Oi)}))),r.ptzFogShow&&(i(t.$ptzFogOpen,"click",(t=>{t.stopPropagation(),e.emit(nt.ptz,Ni)})),i(t.$ptzFogClose,"click",(t=>{t.stopPropagation(),e.emit(nt.ptz,ji)}))),r.ptzWiperShow&&(i(t.$ptzWiperOpen,"click",(t=>{t.stopPropagation(),e.emit(nt.ptz,zi)})),i(t.$ptzWiperClose,"click",(t=>{t.stopPropagation(),e.emit(nt.ptz,Gi)}))),r.ptzSupportDraggable){function g(){t.isPtzControlDroging&&(t.isPtzControlDroging=!1,t.$ptzControl.style.cursor="grab",t.tempPtzPosition={x:0,y:0})}t.isPtzControlDroging=!1,t.tempPtzPosition={x:0,y:0},i(t.$ptzControl,ua()?"touchstart":"mousedown",(e=>{e.stopPropagation(),t.isPtzControlDroging=!0,t.$ptzControl.style.cursor="grabbing";const{posX:i,posY:s}=Qa(e);t.tempPtzPosition={x:i,y:s}})),i(t.$ptzControl,ua()?"touchmove":"mousemove",(e=>{if(t.isPtzControlDroging){e.stopPropagation();const{posX:i,posY:s}=Qa(e),r=t.tempPtzPosition.x-i,a=t.tempPtzPosition.y-s;t.$ptzControl.style.left=t.$ptzControl.offsetLeft-r+"px",t.$ptzControl.style.top=t.$ptzControl.offsetTop-a+"px",t.tempPtzPosition={x:i,y:s}}})),i(t.$ptzControl,ua()?"touchend":"mouseup",(e=>{e.stopPropagation(),g()})),i(window,ua()?"touchend":"mouseup",(e=>{e.stopPropagation(),g()}))}}if(a.performance&&(i(t.$performance,"click",(t=>{t.stopPropagation(),e.togglePerformancePanel(!0)})),i(t.$performanceActive,"click",(t=>{t.stopPropagation(),e.togglePerformancePanel(!1)}))),a.logSave&&i(t.$logSave,"click",(t=>{t.stopPropagation(),e.downloadMemoryLog()})),a.aiFace&&(i(t.$faceDetect,"click",(t=>{t.stopPropagation(),e.faceDetect(!0)})),i(t.$faceDetectActive,"click",(t=>{t.stopPropagation(),e.faceDetect(!1)}))),a.aiObject&&(i(t.$objectDetect,"click",(t=>{t.stopPropagation(),e.objectDetect(!0)})),i(t.$objectDetectActive,"click",(t=>{t.stopPropagation(),e.objectDetect(!1)}))),a.aiOcclusion&&(i(t.$occlusionDetect,"click",(t=>{t.stopPropagation(),e.occlusionDetect(!0)})),i(t.$occlusionDetectActive,"click",(t=>{t.stopPropagation(),e.occlusionDetect(!1)}))),e._opt.hasControl&&e._opt.controlAutoHide){i(e.$container,"mouseover",(()=>{e.fullscreen||(na(t.$controls,"display","block"),A())})),i(e.$container,"mousemove",(()=>{e.$container&&t.$controls&&(e.fullscreen,"none"===t.$controls.style.display&&(na(t.$controls,"display","block"),A()))})),i(e.$container,"mouseout",(()=>{b(),na(t.$controls,"display","none")}));let y=null;const A=()=>{b(),y=setTimeout((()=>{na(t.$controls,"display","none")}),5e3)},b=()=>{y&&(clearTimeout(y),y=null)}}if(e._opt.playType===_){let v=e._opt.playbackConfig.controlType;e._opt.playbackConfig.showRateBtn&&(i(t.$speedMenu,"mouseover",(()=>{t.$speedMenuList.classList.add("jb-pro-speed-menu-shown")})),i(t.$speedMenu,"mouseout",(()=>{t.$speedMenuList.classList.remove("jb-pro-speed-menu-shown")})),i(t.$speedMenuList,"click",(t=>{const i=qa(t);if(i.matches("div.jb-pro-speed-menu-item")){const t=i.dataset;e.emit(nt.playbackPreRateChange,t.speed)}}))),v===Q.normal?(i(t.$playbackNarrow,"click",(t=>{t.stopPropagation(),e.playback&&e.playback.narrowPrecision()})),i(t.$playbackExpand,"click",(t=>{t.stopPropagation(),e.playback&&e.playback.expandPrecision()})),i(t.$playbackTimeList,"click",(t=>{const i=qa(t);i.matches("div.jb-pro-playback-time-minute-one")&&e.playback&&e.playback.seek(i.dataset)})),e._opt.playbackConfig.supportWheel&&i(t.$playbackTimeInner,"wheel",(t=>{t.preventDefault(),(t.wheelDelta?t.wheelDelta/120:-(t.detail||0)/3)>0?e.playback&&e.playback.expandPrecision():e.playback&&e.playback.narrowPrecision()}))):v===Q.simple&&(t.isDroging=!1,i(t.$playbackProgress,"click",(i=>{if(i.target!==t.$playbackProgressIndicator){let s=0,r=0;if(e.isInWebFullscreen())s=i.touches[0].clientY/e.height,r=s*e.playback.totalDuration;else{const a=kh(t,e.playback.totalDuration,i);s=a.percentage,r=a.second}e.playback&&e.playback.seek({time:r})}})),i(t.$playbackProgress,"mousemove",(i=>{na(t.$playbackProgressTip,"display","block");const{width:s,time:r}=kh(t,e.playback.totalDuration,i);t.$playbackProgressTip.innerHTML=r;const a=t.$playbackProgressTip.clientWidth;s<=a/2?na(t.$playbackProgressTip,"left",0):s>t.$playbackProgress.clientWidth-a/2?na(t.$playbackProgressTip,"left",t.$playbackProgress-a+"px"):na(t.$playbackProgressTip,"left",s-a/2+"px")})),i(t.$playbackProgress,"mouseout",(()=>{na(t.$playbackProgressTip,"display","none")})),i(t.$playbackProgressIndicator,"mousedown",(e=>{t.isDroging=!0})),i(t.$playbackProgress,"mousemove",(i=>{if(t.isDroging){const{second:s,percentage:r}=kh(t,e.playback.totalDuration,i);e.playback&&e.playback.seek({time:s})}})),i(t.$playbackProgress,"mouseup",(e=>{t.isDroging&&(t.isDroging=!1)})))}a.quality&&(i(t.$qualityMenu,"mouseover",(()=>{t.$qualityMenuList.classList.add("jb-pro-quality-menu-shown")})),i(t.$qualityMenu,"mouseout",(()=>{t.$qualityMenuList.classList.remove("jb-pro-quality-menu-shown")})),i(t.$qualityMenuList,"click",(t=>{const i=qa(t);if(i.matches("div.jb-pro-quality-menu-item")){const t=i.dataset;e.streamQuality=t.quality}}))),a.scale&&(i(t.$scaleMenu,"mouseover",(()=>{t.$scaleMenuList.classList.add("jb-pro-scale-menu-shown")})),i(t.$scaleMenu,"mouseout",(()=>{t.$scaleMenuList.classList.remove("jb-pro-scale-menu-shown")})),i(t.$scaleMenuList,"click",(t=>{const i=qa(t);if(i.matches("div.jb-pro-scale-menu-item")){const t=i.dataset;e.setScaleMode(t.scale)}}))),a.zoom&&(i(t.$zoom,"click",(t=>{t.stopPropagation(),e.zooming=!0})),i(t.$zoomStop,"click",(t=>{t.stopPropagation(),e.zooming=!1}))),i(t.$zoomExpand,"click",(t=>{t.stopPropagation(),e.zoom&&e.zoom.expandPrecision()})),i(t.$zoomNarrow,"click",(t=>{t.stopPropagation(),e.zoom&&e.zoom.narrowPrecision()})),i(t.$zoomStop2,"click",(t=>{t.stopPropagation(),e.zooming=!1})),a.close&&i(t.$close,"click",(t=>{t.stopPropagation(),e.doDestroy()})),i(t.$tipsMessageClose,"click",(e=>{e.stopPropagation(),t.$tipsMessageContent.innerHTML="",na(t.$tipsMessage,"display","none")}))})(e,this),e._opt.hotKey&&((e,t)=>{const{events:{proxy:i}}=e,s={};function r(e,t){s[e]?s[e].push(t):s[e]=[t]}r(bi,(()=>{e.fullscreen&&(e.fullscreen=!1)})),r(vi,(()=>{e.volume+=.05})),r(_i,(()=>{e.volume-=.05})),i(window,"keydown",(e=>{if(t.isFocus){const t=document.activeElement.tagName.toUpperCase(),i=document.activeElement.getAttribute("contenteditable");if("INPUT"!==t&&"TEXTAREA"!==t&&""!==i&&"true"!==i){const t=s[e.keyCode];t&&(e.preventDefault(),t.forEach((e=>e())))}}}))})(e,this),this.btnIndex=0,this.initLoadingBackground(),Va(e._opt.loadingIconStyle)&&this.initLoadingIconStyle(e._opt.loadingIconStyle),Va(e._opt.ptzPositionConfig)&&this.updatePtzPosition(e._opt.ptzPositionConfig),this.kbpsShow="0 KB/s",this.player.debug.log("Control","init")}destroy(){if(this.$performancePanel){this.$performancePanel.innerHTML="";if(!Lh(this.$performancePanel)){const e=this.player.$container.querySelector(".jb-pro-performance-panel");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$poster){if(!Lh(this.$poster)){const e=this.player.$container.querySelector(".jb-pro-poster");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$loading){if(!Lh(this.$loading)){const e=this.player.$container.querySelector(".jb-pro-loading");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$loadingBg){if(!Lh(this.$loadingBg)){const e=this.player.$container.querySelector(".jb-pro-loading-bg");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$controls){if(!Lh(this.$controls)){const e=this.player.$container.querySelector(".jb-pro-controls");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$playBig){if(!Lh(this.$playBig)){const e=this.player.$container.querySelector(".jb-pro-play-big");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$recording){if(!Lh(this.$recording)){const e=this.player.$container.querySelector(".jb-pro-recording");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$ptzControl){if(!Lh(this.$ptzControl)){const e=this.player.$container.querySelector(".jb-pro-ptz-controls");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$zoomControls){if(!Lh(this.$zoomControls)){const e=this.player.$container.querySelector(".jb-pro-zoom-controls");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$contextmenus){this.$contextmenus.innerHTML="";if(!Lh(this.$contextmenus)){const e=this.player.$container.querySelector(".jb-pro-contextmenus");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$tipsMessage){if(!Lh(this.$tipsMessage)){const e=this.player.$container.querySelector(".jb-pro-tips-message");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$extendDom){if(!Lh(this.$extendDom)){const e=this.player.$container.querySelector(".jb-pro-extend-dom");e&&this.player.$container&&this.player.$container.removeChild(e)}}this.btnIndex=0,this.extendBtnList=[],this.kbpsShow="0 KB/s",this.player.$container&&(this.player.$container.classList.remove("jb-pro-controls-show-auto-hide"),this.player.$container.classList.remove("jb-pro-controls-show")),this.player.debug.log("Control","destroy")}getBtnIndex(){return this.btnIndex++}autoSize(){const e=this.player;e.$container.style.padding="0 0";const t=e.width,i=e.height,s=t/i,r=e.video.$videoElement.width/e.video.$videoElement.height;if(s>r){const s=(t-i*r)/2;e.$container.style.padding=`0 ${s}px`}else{const s=(i-t/r)/2;e.$container.style.padding=`${s}px 0`}}initLoadingBackground(){const e=this.player;e._opt.loadingBackground&&e._opt.loadingBackgroundWidth&&e._opt.loadingBackgroundHeight&&(e.debug.log("Control","initLoadingBackground()"),"default"===this.player._opt.aspectRatio||ua()?(e.getRenderType()===$||e.getRenderType()===W)&&this._initLoadingBackground():this._initLoadingBackgroundForRatio(),Rh(this.$loadingBg,"display","block"),e._opt.loadingBackground="",e._opt.loadingBackgroundWidth=0,e._opt.loadingBackgroundHeight=0)}initLoadingIconStyle(e){const t=this.player.$container.querySelector(".jb-pro-icon-loading");t&&(e.width&&Rh(t,"width",`${e.width}px`),e.height&&Rh(t,"height",`${e.height}px`),e.background&&Rh(t,"backgroundImage",`url("${e.background}")`),!1===e.hasAnimation&&(Rh(t,"animationName","none"),Rh(t,"animationDuration",0),Rh(t,"animationTimingFunction","ease"),Rh(t,"animationIterationCount",1)))}_initLoadingBackgroundForRatio(){const e=this.player._opt.aspectRatio.split(":").map(Number);let t=this.player.width,i=this.player.height;const s=this.player._opt;let r=0;s.hasControl&&!s.controlAutoHide&&(r=s.playType===_?Yt:Kt,i-=r);const a=this.player._opt.loadingBackgroundWidth,o=this.player._opt.loadingBackgroundHeight,n=a/o,l=e[0]/e[1];if(this.$loadingBgImage.src=this.player._opt.loadingBackground,n>l){const e=l*o/a;this.$loadingBgImage.style.width=100*e+"%",this.$loadingBgImage.style.height=`calc(100% - ${r}px)`,this.$loadingBgImage.style.padding=`0 ${(t-t*e)/2}px`}else{const e=a/l/o;this.$loadingBgImage.style.width="100%",this.$loadingBgImage.style.height=`calc(${100*e}% - ${r}px)`,this.$loadingBgImage.style.padding=(i-i*e)/2+"px 0"}}_initLoadingBackground(){const e=this.player;let t=e.height;const i=e._opt;if(i.hasControl&&!i.controlAutoHide){t-=i.playType===_?Yt:Kt}let s=e.width,r=t;const a=i.rotate;270!==a&&90!==a||(s=t,r=e.width),this.$loadingBgImage.width=s,this.$loadingBgImage.height=r,this.$loadingBgImage.src=e._opt.loadingBackground;let o=(e.width-s)/2,n=(t-r)/2,l="contain";i.isResize||(l="fill"),i.isFullResize&&(l="none");let d="";"none"===i.mirrorRotate&&a&&(d+=" rotate("+a+"deg)"),"level"===i.mirrorRotate?d+=" rotateY(180deg)":"vertical"===i.mirrorRotate&&(d+=" rotateX(180deg)"),this.player._opt.videoRenderSupportScale&&(this.$loadingBgImage.style.objectFit=l),this.$loadingBgImage.style.transform=d,this.$loadingBgImage.style.padding="0",this.$loadingBgImage.style.left=o+"px",this.$loadingBgImage.style.top=n+"px"}_validateExtendBtn(e){let t=!0;if(e.name||(this.player.debug.warn("Control","extend button name is required"),t=!1),t){-1!==this.extendBtnList.findIndex((t=>t.name===e.name))&&(this.player.debug.warn("Control",`extend button name: ${e.name} is already exist`),t=!1)}return t&&(e.icon||(this.player.debug.warn("Control","extend button icon is required"),t=!1)),t}addExtendBtn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=no(Os);if(e=Object.assign({},t,e),!this._validateExtendBtn(e))return;const i=e.name||"",s=this.$controlsRight,r=e.activeIcon&&e.activeClick,a=`\n <div class="jb-pro-controls-item-wrap jb-pro-controls-item-wrap-${i}">\n ${e.icon?`<div class="jb-pro-controls-item jb-pro-control-extend-${i}">\n <i class="jb-pro-icon jb-pro-icon-extend-${i}"></i>\n ${e.iconTitle?`\n <span class="icon-title-tips"><span class="icon-title">${e.iconTitle}</span></span>\n `:""}\n </div>`:""}\n ${e.activeIcon?`<div class="jb-pro-controls-item jb-pro-control-extend-${i}-active">\n <i class="jb-pro-icon jb-pro-icon-extend-${i}-active"></i>\n ${e.activeIconTitle?`\n <span class="icon-title-tips"><span class="icon-title">${e.activeIconTitle}</span></span>\n `:""}\n </div>`:""}\n </div>\n `,o=Array.from(s.children)[e.index];o?o.insertAdjacentHTML("beforebegin",a):xh(s,a);const n=s.querySelector(`.jb-pro-controls-item-wrap-${i}`),l=e.icon?s.querySelector(`.jb-pro-icon-extend-${i}`):null,d=e.icon?s.querySelector(`.jb-pro-control-extend-${i}`):null,h=e.activeIcon?s.querySelector(`.jb-pro-icon-extend-${i}-active`):null,c=e.activeIcon?s.querySelector(`.jb-pro-control-extend-${i}-active`):null,{events:{proxy:u},debug:p}=this.player;e.icon&&(Rh(l,"background",`url(${e.icon}) no-repeat center`),Rh(l,"background-size","100% 100%"),Rh(d,"display","none"),e.iconHover&&(u(l,"mouseover",(()=>{Rh(l,"background",`url(${e.iconHover}) no-repeat center`),Rh(l,"background-size","100% 100%")})),u(l,"mouseout",(()=>{Rh(l,"background",`url(${e.icon}) no-repeat center`),Rh(l,"background-size","100% 100%")})))),e.activeIcon&&(Rh(h,"background",`url(${e.activeIcon}) no-repeat center`),Rh(h,"background-size","100% 100%"),Rh(c,"display","none"),e.activeIconHover&&(u(h,"mouseover",(()=>{Rh(h,"background",`url(${e.activeIconHover}) no-repeat center`),Rh(h,"background-size","100% 100%")})),u(h,"mouseout",(()=>{Rh(h,"background",`url(${e.activeIcon}) no-repeat center`),Rh(h,"background-size","100% 100%")})))),e.click&&l&&u(l,"click",(t=>{t.preventDefault(),r&&(Rh(d,"display","none"),Rh(c,"display","flex")),this.player.isInMulti()?e.click.call(this.player,t,this.player._opt.multiIndex):e.click.call(this.player,t)})),e.activeClick&&h&&u(h,"click",(t=>{t.preventDefault(),Rh(d,"display","flex"),Rh(c,"display","none"),this.player.isInMulti()?e.activeClick.call(this.player,t,this.player._opt.multiIndex):e.activeClick.call(this.player,t)})),this.extendBtnList.push({name:i,$iconContainer:n,$iconWrap:d,$activeIconWrap:c})}addExtendDom(e){if(this.player.debug.log(this.TAG_NAME,"addExtendDom"),e.html){const t=`\n <div class="jb-pro-extend-dom">\n ${e.html}\n </div>\n `;this.player.$container.insertAdjacentHTML("beforeend",t),Object.defineProperty(this,"$extendDom",{value:this.player.$container.querySelector(".jb-pro-extend-dom")}),e.showBeforePlay&&Rh(this.$extendDom,"display","block")}}toggleExtendDom(e){this.$extendDom&&(Pa(e)||(e="none"===this.$extendDom.style.display),Rh(this.$extendDom,"display",e?"block":"none"))}updateExtendDom(e){this.player.debug.log(this.TAG_NAME,"updateExtendDom"),this.$extendDom&&(this.$extendDom.innerHTML=e)}removeExtendDom(){this.player.debug.log(this.TAG_NAME,"removeExtendDom"),this.$extendDom&&(this.$extendDom.innerHTML="")}updateLoadingText(e){this.$loadingText&&(this.$loadingText.innerText=e)}getExtendBtnList(){return this.extendBtnList}showTipsMessage(e,t){const i=this.$tipsMessage,s=this.$tipsMessageContent;if(i){const r=`\n <div class="jb-pro-tips-message-content-item">${e}</div>\n ${t?`<div class="jb-pro-tips-message-content-item">Error Type:${t}</div>`:""}\n `;s.innerHTML=r,Rh(i,"display","block")}}hideTipsMessage(){const e=this.$tipsMessage;e&&($tipsMessageContent.innerHTML="",Rh(e,"display","none"))}updatePtzPosition(e){const t=this.$ptzControl;if(Va(e)&&t){let i="auto";e.left&&(i=Number(e.left)===e.left?e.left+"px":e.left),Rh(t,"left",i);let s="auto";e.top&&(s=Number(e.top)===e.top?e.top+"px":e.top),Rh(t,"top",s);let r="auto";e.bottom&&(r=Number(e.bottom)===e.bottom?e.bottom+"px":e.bottom),Rh(t,"bottom",r);let a="auto";e.right&&(a=Number(e.right)===e.right?e.right+"px":e.right),Rh(t,"right",a)}}}Bh(".jb-pro-container{position:relative;width:100%;height:100%;overflow:hidden}.jb-pro-container.jb-pro-fullscreen-web{position:fixed;z-index:9999;left:0;top:0;right:0;bottom:0;width:100vw!important;height:100vh!important;background:#000}.jb-pro-container .jb-pro-loading-bg-for-ios{position:absolute;z-index:100;left:0;top:0;right:0;bottom:0;height:100%;width:100%;opacity:0;visibility:hidden;background-position:50%;background-repeat:no-repeat;background-size:contain;pointer-events:none}.jb-pro-container .jb-pro-loading-bg-for-ios.show{opacity:1;visibility:visible}");var Mh=e=>{const{_opt:t,debug:i,events:{proxy:s}}=e;if(t.supportDblclickFullscreen&&s(e.$container,"dblclick",(t=>{const i=qa(t).nodeName.toLowerCase();"canvas"!==i&&"video"!==i||(e.fullscreen=!e.fullscreen)})),s(document,"visibilitychange",(()=>{e.visibility="visible"===document.visibilityState,i.log("visibilitychange",document.visibilityState),t.hiddenAutoPause&&(i.log("visibilitychange","hiddenAutoPause is true ",document.visibilityState,e._isPlayingBeforePageHidden),"visible"===document.visibilityState?e._isPlayingBeforePageHidden&&e.play():(e._isPlayingBeforePageHidden=e.playing,e.playing&&e.pause()))})),pa()&&s(document,["click","contextmenu"],(t=>{Dh(t,e.$container)?(uo(e._opt.disableContextmenu)&&"contextmenu"===t.type&&t.preventDefault(),e.isInput="INPUT"===t.target.tagName,e.isFocus=!0,e.emit(nt.focus)):(e.isInput=!1,e.isFocus=!1,e.emit(nt.blur))})),t.isCheckInView){const t=wa((()=>{e.emit(nt.inView,function(e){const t=e.getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight,s=window.innerWidth||document.documentElement.clientWidth,r=t.top<=i&&t.top+t.height>=0,a=t.left<=s&&t.left+t.width>=0;return r&&a}(e.$container))}),200);s(window,"scroll",(()=>t()))}if(t.autoResize){const t=wa((()=>{e.resize()}),500);s(window,["resize","orientationchange"],(()=>{t()})),screen&&screen.orientation&&screen.orientation.onchange&&s(screen.orientation,"change",(()=>{t()}))}};class Uh{static init(){Uh.types={avc1:[],avcC:[],hvc1:[],hvcC:[],av01:[],av1C:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[],Opus:[],dOps:[],"ac-3":[],dac3:[],"ec-3":[],dec3:[]};for(let e in Uh.types)Uh.types.hasOwnProperty(e)&&(Uh.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);let e=Uh.constants={};e.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),e.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),e.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSC=e.STCO=e.STTS,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),e.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),e.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(e){let t=8,i=null,s=Array.prototype.slice.call(arguments,1),r=s.length;for(let e=0;e<r;e++)t+=s[e].byteLength;i=new Uint8Array(t),i[0]=t>>>24&255,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i.set(e,4);let a=8;for(let e=0;e<r;e++)i.set(s[e],a),a+=s[e].byteLength;return i}static generateInitSegment(e){let t=Uh.box(Uh.types.ftyp,Uh.constants.FTYP),i=Uh.moov(e),s=new Uint8Array(t.byteLength+i.byteLength);return s.set(t,0),s.set(i,t.byteLength),s}static moov(e){let t=Uh.mvhd(e.timescale,e.duration),i=Uh.trak(e),s=Uh.mvex(e);return Uh.box(Uh.types.moov,t,i,s)}static mvhd(e,t){return Uh.box(Uh.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static trak(e){return Uh.box(Uh.types.trak,Uh.tkhd(e),Uh.mdia(e))}static tkhd(e){let t=e.id,i=e.duration,s=e.presentWidth,r=e.presentHeight;return Uh.box(Uh.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,s>>>8&255,255&s,0,0,r>>>8&255,255&r,0,0]))}static mdia(e){return Uh.box(Uh.types.mdia,Uh.mdhd(e),Uh.hdlr(e),Uh.minf(e))}static mdhd(e){let t=e.timescale,i=e.duration;return Uh.box(Uh.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,i>>>24&255,i>>>16&255,i>>>8&255,255&i,85,196,0,0]))}static hdlr(e){let t=null;return t="audio"===e.type?Uh.constants.HDLR_AUDIO:Uh.constants.HDLR_VIDEO,Uh.box(Uh.types.hdlr,t)}static minf(e){let t=null;return t="audio"===e.type?Uh.box(Uh.types.smhd,Uh.constants.SMHD):Uh.box(Uh.types.vmhd,Uh.constants.VMHD),Uh.box(Uh.types.minf,t,Uh.dinf(),Uh.stbl(e))}static dinf(){return Uh.box(Uh.types.dinf,Uh.box(Uh.types.dref,Uh.constants.DREF))}static stbl(e){return Uh.box(Uh.types.stbl,Uh.stsd(e),Uh.box(Uh.types.stts,Uh.constants.STTS),Uh.box(Uh.types.stsc,Uh.constants.STSC),Uh.box(Uh.types.stsz,Uh.constants.STSZ),Uh.box(Uh.types.stco,Uh.constants.STCO))}static stsd(e){return"audio"===e.type?"mp3"===e.audioType?Uh.box(Uh.types.stsd,Uh.constants.STSD_PREFIX,Uh.mp3(e)):Uh.box(Uh.types.stsd,Uh.constants.STSD_PREFIX,Uh.mp4a(e)):"avc"===e.videoType?Uh.box(Uh.types.stsd,Uh.constants.STSD_PREFIX,Uh.avc1(e)):Uh.box(Uh.types.stsd,Uh.constants.STSD_PREFIX,Uh.hvc1(e))}static mp3(e){let t=e.channelCount,i=e.audioSampleRate,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return Uh.box(Uh.types[".mp3"],s)}static mp4a(e){let t=e.channelCount,i=e.audioSampleRate,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return Uh.box(Uh.types.mp4a,s,Uh.esds(e))}static esds(e){let t=e.config||[],i=t.length,s=new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(t).concat([6,1,2]));return Uh.box(Uh.types.esds,s)}static avc1(e){let t=e.avcc;const i=e.codecWidth,s=e.codecHeight;let r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,s>>>8&255,255&s,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return Uh.box(Uh.types.avc1,r,Uh.box(Uh.types.avcC,t))}static hvc1(e){let t=e.avcc;const i=e.codecWidth,s=e.codecHeight;let r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,s>>>8&255,255&s,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return Uh.box(Uh.types.hvc1,r,Uh.box(Uh.types.hvcC,t))}static mvex(e){return Uh.box(Uh.types.mvex,Uh.trex(e))}static trex(e){let t=e.id,i=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return Uh.box(Uh.types.trex,i)}static moof(e,t){return Uh.box(Uh.types.moof,Uh.mfhd(e.sequenceNumber),Uh.traf(e,t))}static mfhd(e){let t=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return Uh.box(Uh.types.mfhd,t)}static traf(e,t){let i=e.id,s=Uh.box(Uh.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),r=Uh.box(Uh.types.tfdt,new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),a=Uh.sdtp(e),o=Uh.trun(e,a.byteLength+16+16+8+16+8+8);return Uh.box(Uh.types.traf,s,r,o,a)}static sdtp(e){let t=new Uint8Array(5),i=e.flags;return t[4]=i.isLeading<<6|i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy,Uh.box(Uh.types.sdtp,t)}static trun(e,t){let i=new Uint8Array(28);t+=36,i.set([0,0,15,1,0,0,0,1,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0);let s=e.duration,r=e.size,a=e.flags,o=e.cts;return i.set([s>>>24&255,s>>>16&255,s>>>8&255,255&s,r>>>24&255,r>>>16&255,r>>>8&255,255&r,a.isLeading<<2|a.dependsOn,a.isDependedOn<<6|a.hasRedundancy<<4|a.isNonSync,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o],12),Uh.box(Uh.types.trun,i)}static mdat(e){return Uh.box(Uh.types.mdat,e)}}Uh.init();const Fh=[44100,48e3,32e3,0],Oh=[22050,24e3,16e3,0],Nh=[11025,12e3,8e3,0],jh=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],zh=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],Gh=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1];class Hh extends So{constructor(e){super(),this.TAG_NAME="MediaSource",this.player=e,this._resetInIt(),this._useManagedMediaSource="ManagedMediaSource"in self&&!("MediaSource"in self),this.mediaSource=this._useManagedMediaSource?new self.ManagedMediaSource:new self.MediaSource,this.isDecodeFirstIIframe=!!po(e._opt.checkFirstIFrame),this.mediaSourceObjectURL=null,this._useManagedMediaSource||(this.mediaSourceObjectURL=window.URL.createObjectURL(this.mediaSource)),this.isSupportVideoFrameCallback=bo(),this.canvasRenderInterval=null,e._opt.mseUseCanvasRender?(this.$videoElement=document.createElement("video"),this._useManagedMediaSource?(this.$videoElement.disableRemotePlayback=!0,this.$videoElement.srcObject=this.mediaSource):this.$videoElement.src=this.mediaSourceObjectURL,this.initVideoEvents()):(this._useManagedMediaSource?(this.player.video.$videoElement.disableRemotePlayback=!0,this.player.video.$videoElement.srcObject=this.mediaSource):this.player.video.$videoElement.src=this.mediaSourceObjectURL,this.$videoElement=this.player.video.$videoElement),this._bindMediaSourceEvents(),this.audioSourceBufferCheckTimeout=null,this.audioSourceNoDataCheckTimeout=null,this.hasPendingEos=!1,this.player.isPlayback()&&this.player.on(nt.playbackPause,(t=>{po(t)?(uo(e._opt.checkFirstIFrame)&&(this.player.debug.log(this.TAG_NAME,"playbackPause is false and _opt.checkFirstIFrame is true so set isDecodeFirstIIframe = false"),this.isDecodeFirstIIframe=!1),this.clearUpAllSourceBuffer(),this.$videoElement.play()):(this.$videoElement.pause(),this.cacheTrack={})})),this._useManagedMediaSource?this.player.debug.log(this.TAG_NAME,"init and using ManagedMediaSource"):this.player.debug.log(this.TAG_NAME,"init")}destroy(){this.stop(),this._clearAudioSourceBufferCheckTimeout(),this._clearAudioNoDataCheckTimeout(),this._stopCanvasRender(),this.eventListenList.length&&(this.eventListenList.forEach((e=>e())),this.eventListenList=[]),this.supportVideoFrameCallbackHandle&&this.$videoElement&&(this.$videoElement.cancelVideoFrameCallback(this.supportVideoFrameCallbackHandle),this.supportVideoFrameCallbackHandle=null),this.$videoElement&&(this.player._opt.mseUseCanvasRender&&this.$videoElement.src&&(this.$videoElement.src="",this.$videoElement.removeAttribute("src")),this.$videoElement=null),this.mediaSourceObjectURL&&(window.URL.revokeObjectURL(this.mediaSourceObjectURL),this.mediaSourceObjectURL=null),this._resetInIt(),this.mediaSource=null,this.off(),this.player.debug.log(this.TAG_NAME,"destroy")}needInitAudio(){return this.player._opt.hasAudio&&this.player._opt.mseDecodeAudio}_resetInIt(){this.isAvc=null,this.isAAC=null,this.videoMeta={},this.audioMeta={},this.sourceBuffer=null,this.audioSourceBuffer=null,this.hasInit=!1,this.hasAudioInit=!1,this.isInitInfo=!1,this.isAudioInitInfo=!1,this.audioMimeType="",this.videoMimeType="",this.cacheTrack={},this.cacheAudioTrack={},this.sequenceNumber=0,this.audioSequenceNumber=0,this.firstRenderTime=null,this.firstAudioTime=null,this.$videoElement=null,this.mediaSourceAppendBufferFull=!1,this.mediaSourceAppendBufferError=!1,this.mediaSourceAddSourceBufferError=!1,this.mediaSourceBufferError=!1,this.mediaSourceError=!1,this.prevTimestamp=null,this.decodeDiffTimestamp=null,this.prevDts=null,this.prevAudioDts=null,this.prevPayloadBufferSize=0,this.isWidthOrHeightChanged=!1,this.prevTs=null,this.prevAudioTs=null,this.eventListenList=[],this.pendingRemoveRanges=[],this.pendingSegments=[],this.pendingAudioRemoveRanges=[],this.pendingAudioSegments=[],this.supportVideoFrameCallbackHandle=null}get state(){return this.mediaSource&&this.mediaSource.readyState}get isStateOpen(){return this.state===yi}get isStateClosed(){return this.state===Ai}get isStateEnded(){return this.state===gi}get duration(){return this.mediaSource&&this.mediaSource.duration||-1}set duration(e){this.mediaSource.duration=e}_bindMediaSourceEvents(){const{debug:e,events:{proxy:t}}=this.player,i=t(this.mediaSource,Ki,(()=>{this.player.debug.log(this.TAG_NAME,"sourceOpen"),this._onMediaSourceSourceOpen(),this.player.emit(nt.mseSourceOpen)})),s=t(this.mediaSource,qi,(()=>{this.player.debug.log(this.TAG_NAME,"sourceClose"),this.player.emit(nt.mseSourceClose)})),r=t(this.mediaSource,Yi,(()=>{this.player.debug.log(this.TAG_NAME,"sourceended"),this.player.emit(nt.mseSourceended)}));this.eventListenList.push(i,s,r);const a=t(this.$videoElement,is,(e=>{if(po(this.isSupportVideoFrameCallback))if(this.player.checkIsInRender())this.player.handleRender();else{const t=parseInt(e.timeStamp,10);this.player.debug.log(this.TAG_NAME,`mseUseCanvasRender is ${this.player._opt.mseUseCanvasRender} and\n $videoElement ts is ${t}, but not in render and vbps is ${this.player._stats.vbps} and fps is ${this.player._stats.fps}`)}}));if(this.eventListenList.push(a),this._useManagedMediaSource){const e=t(this.mediaSource,Qi,(()=>{this.player.debug.log(this.TAG_NAME,"ManagedMediaSource startstreaming"),this.player.emit(nt.mseSourceStartStreaming)})),i=t(this.mediaSource,Xi,(()=>{this.player.debug.log(this.TAG_NAME,"ManagedMediaSource endstreaming"),this.player.emit(nt.mseSourceEndStreaming)})),s=t(this.mediaSource,Zi,(()=>{this.player.debug.log(this.TAG_NAME,"ManagedMediaSource qualitychange")}));this.eventListenList.push(e,i,s)}}_onMediaSourceSourceOpen(){this.sourceBuffer||(this.player.debug.log("MediaSource","onMediaSourceSourceOpen() sourceBuffer is null and next init"),this._initSourceBuffer()),this.audioSourceBuffer||(this.player.debug.log("MediaSource","onMediaSourceSourceOpen() audioSourceBuffer is null and next init"),this._initAudioSourceBuffer()),this._hasPendingSegments()&&this._doAppendSegments()}initVideoEvents(){const{proxy:e}=this.player.events;this.player.on(nt.visibilityChange,(e=>{e&&setTimeout((()=>{if(this.player.isPlaying()&&this.$videoElement){const e=this.getVideoBufferLastTime();e-this.$videoElement.currentTime>this.getMseBufferMaxDelayTime()&&(this.player.debug.log(this.TAG_NAME,`visibilityChange is true and lastTime is ${e} and currentTime is ${this.$videoElement.currentTime} so set currentTime to lastTime`),this.$videoElement.currentTime=e)}}),300)}));const t=e(this.$videoElement,es,(()=>{this.player.debug.log(this.TAG_NAME,"video canplay"),this.$videoElement.play().then((()=>{this.player.emit(nt.removeLoadingBgImage),bo()?this.supportVideoFrameCallbackHandle||(this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this))):this.player.isUseHls265()&&(this._stopCanvasRender(),this.canvasRenderInterval=setInterval((()=>{this.player.video.render({$video:this.$videoElement,ts:parseInt(1e3*this.$videoElement.currentTime,10)||0})}),40)),this.player.debug.log(this.TAG_NAME,"video play")})).catch((e=>{this.player.debug.error(this.TAG_NAME,"video play error ",e),this.player.emitError(ct.mediaSourceUseCanvasRenderPlayFailed,e)}))})),i=e(this.$videoElement,ts,(()=>{this.player.debug.log(this.TAG_NAME,"video waiting")})),s=e(this.$videoElement,is,(e=>{parseInt(e.timeStamp,10),this.$videoElement.paused&&(this.player.debug.warn(this.TAG_NAME,"video is paused and next try to replay"),this.$videoElement.play().then((()=>{this.player.debug.log(this.TAG_NAME,"video is paused and replay success")})).catch((e=>{this.player.debug.warn(this.TAG_NAME,"video is paused and replay error ",e)})))})),r=e(this.$videoElement,ss,(()=>{this.player.debug.log(this.TAG_NAME,"video playback Rate change",this.$videoElement&&this.$videoElement.playbackRate),this.$videoElement&&this.$videoElement.paused&&this.player.debug.warn(this.TAG_NAME,"ratechange and video is paused")}));this.eventListenList.push(t,i,s,r)}videoFrameCallback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.player.isDestroyedOrClosed())return void this.player.debug.log(this.TAG_NAME,"videoFrameCallback() player is destroyed");const i=parseInt(1e3*Math.max(t.mediaTime,this.$videoElement.currentTime),10)||0;this.player.handleRender(),this.player.video.render({$video:this.$videoElement,ts:i}),this.player.isUseHls265()&&this.player.updateStats({fps:!0,ts:i}),this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this))}decodeVideo(e,t,i,s){const r=this.player;if(r)if(this.player.isDestroyedOrClosed())this.player.debug.warn(this.TAG_NAME,"decodeVideo() player is destroyed");else if(this.hasInit)if(!this.isDecodeFirstIIframe&&i&&(this.isDecodeFirstIIframe=!0),this.isDecodeFirstIIframe){if(i&&0===e[1]){const t=15&e[0];let i={};if(t===vt){i=En(e.slice(5))}else t===_t&&(i=Un(e));const s=this.player.video.videoInfo;s&&s.width&&s.height&&i&&i.codecWidth&&i.codecHeight&&(i.codecWidth!==s.width||i.codecHeight!==s.height)&&(this.player.debug.warn(this.TAG_NAME,`\n decodeVideo: video width or height is changed,\n old width is ${s.width}, old height is ${s.height},\n new width is ${i.codecWidth}, new height is ${i.codecHeight},\n and emit change event`),this.isWidthOrHeightChanged=!0,this.player.emitError(ct.mseWidthOrHeightChange))}if(this.isWidthOrHeightChanged)return void this.player.debug.warn(this.TAG_NAME,"decodeVideo: video width or height is changed, and return");if(co(e))return void this.player.debug.warn(this.TAG_NAME,"decodeVideo and payload is video sequence header so drop this frame");if(e.byteLength<12)return void this.player.debug.warn(this.TAG_NAME,`decodeVideo and payload is too small , payload length is ${e.byteLength}`);let r=t;if(this.player.isPlayer()){if(null===this.firstRenderTime&&(this.firstRenderTime=t),r=t-this.firstRenderTime,r<0&&(this.player.debug.warn(this.TAG_NAME,`decodeVideo\n local dts is < 0 , ts is ${t} and prevTs is ${this.prevTs},\n firstRenderTime is ${this.firstRenderTime} and mseCorrectTimeDuration is ${this.player._opt.mseCorrectTimeDuration}`),r=null===this.prevDts?0:this.prevDts+this.player._opt.mseCorrectTimeDuration,this._checkTsIsMaxDiff(t)))return this.player.debug.warn(this.TAG_NAME,`decodeVideo is max diff , ts is ${t} and prevTs is ${this.prevTs}, diff is ${this.prevTs-t} and emit replay`),void this.player.emitError(ct.mediaSourceTsIsMaxDiff,`decodeVideo is max diff, prevTs is ${this.prevTs} and ts is ${t}`);if(null!==this.prevDts&&r<=this.prevDts){if(this.player.debug.warn(this.TAG_NAME,`\n decodeVideo dts is less than(or equal) prev dts ,\n dts is ${r} and prev dts is ${this.prevDts} ,\n and now ts is ${t} and prev ts is ${this.prevTs} ,\n and diff is ${t-this.prevTs} and firstRenderTime is ${this.firstRenderTime} and isIframe is ${i},\n and mseCorrectTimeDuration is ${this.player._opt.mseCorrectTimeDuration},\n and prevPayloadBufferSize is ${this.prevPayloadBufferSize} and payload size is ${e.byteLength}`),r===this.prevDts&&this.prevPayloadBufferSize===e.byteLength)return void this.player.debug.warn(this.TAG_NAME,"decodeVideo dts is equal to prev dts and payload size is equal to prev payload size so drop this frame");if(r=this.prevDts+this.player._opt.mseCorrectTimeDuration,this._checkTsIsMaxDiff(t))return this.player.debug.warn(this.TAG_NAME,`decodeVideo is max diff , ts is ${t} and prevTs is ${this.prevTs}, diff is ${this.prevTs-t} and emit replay`),void this.emit(ct.mediaSourceTsIsMaxDiff,`decodeVideo is max diff, prevTs is ${this.prevTs} and ts is ${t}`)}}this.player.isPlayer()?this._decodeVideo(e,r,i,s,t):this.player.isPlayback()&&po(this.player.playbackPause)&&(this.player.playback.isUseLocalCalculateTime&&this.player.playback.increaseLocalTimestamp(),this._decodeVideo(e,r,i,s,t)),this.prevDts=r,this.prevPayloadBufferSize=e.byteLength,this.prevTs=t}else this.player.debug.log(this.TAG_NAME,"decodeVideo first frame is not iFrame");else if(i&&e[1]===vs){const s=15&e[0];if(r.video.updateVideoInfo({encTypeCode:s}),s===_t&&po(ka()))return void this.player.emitError(ct.mediaSourceH265NotSupport);r._times.decodeStart||(r._times.decodeStart=aa()),this.hasInit=this._decodeConfigurationRecord(e,t,i,s)}else this.player.debug.warn(this.TAG_NAME,`decodeVideo has not init , isIframe is ${i} , payload is ${e[1]}`)}decodeAudio(e,t){if(this.player)if(this.player.isDestroyedOrClosed())this.player.debug.warn(this.TAG_NAME,"decodeAudio() player is destroyed");else if(po(this.hasAudioInit))this.hasAudioInit=this._decodeAudioConfigurationRecord(e,t);else{let i=t;if(zr(e))return void this.player.debug.log(this.TAG_NAME,"decodeAudio and has already initialized and payload is aac codec packet so drop this frame");if(this._clearAudioNoDataCheckTimeout(),this.isDecodeFirstIIframe){if(this.player.isPlayer()){if(null===this.firstAudioTime&&(this.firstAudioTime=t,null!==this.firstRenderTime&&null!==this.prevTs)){const e=Math.abs(this.firstRenderTime-this.prevTs);e>300&&(this.firstAudioTime-=e,this.player.debug.warn(this.TAG_NAME,`video\n firstAudioTime is ${this.firstRenderTime} and current time is ${this.prevTs}\n play time is ${e} and firstAudioTime ${t} - ${e} = ${this.firstAudioTime}`))}if(i=t-this.firstAudioTime,i<0&&(this.player.debug.warn(this.TAG_NAME,`decodeAudio\n local dts is < 0 , ts is ${t} and prevTs is ${this.prevAudioTs},\n firstAudioTime is ${this.firstAudioTime}`),i=null===this.prevAudioDts?0:this.prevAudioDts+this.player._opt.mseCorrectAudioTimeDuration,this._checkAudioTsIsMaxDiff(t)))return this.player.debug.warn(this.TAG_NAME,`decodeAudio is max diff , ts is ${t} and prevTs is ${this.prevAudioDts}, diff is ${this.prevAudioDts-t} and emit replay`),void this.player.emitError(ct.mediaSourceTsIsMaxDiff,`decodeAudio is max diff, prevTs is ${this.prevAudioDts} and ts is ${t}`);null!==this.prevAudioTs&&i<=this.prevAudioDts&&(this.player.debug.warn(this.TAG_NAME,`\n decodeAudio dts is less than(or equal) prev dts ,\n dts is ${i} and prev dts is ${this.prevAudioDts} ,\n and now ts is ${t} and prev ts is ${this.prevAudioTs} ,\n and diff is ${t-this.prevAudioTs}`),i=this.prevAudioDts+this.player._opt.mseCorrectAudioTimeDuration)}(this.player.isPlayer()||this.player.isPlayback()&&po(this.player.playbackPause))&&this._decodeAudio(e,i,t),this.prevAudioTs=t,this.prevAudioDts=i}else this.player.debug.log(this.TAG_NAME,"decodeAudio first frame is not iFrame")}}_checkTsIsMaxDiff(e){return this.prevTs>0&&e<this.prevTs&&this.prevTs-e>X}_checkAudioTsIsMaxDiff(e){return this.prevAudioTs>0&&e<this.prevAudioTs&&this.prevAudioTs-e>X}_decodeConfigurationRecord(e,t,i,s){let r=e.slice(5),a={};if(s===vt?a=En(r):s===_t&&(a=Fn(r)),Ha(a)||0===a.codecWidth&&0===a.codecHeight)return this.player.debug.warn(this.TAG_NAME,"_decodeConfigurationRecord",a),this.player.emitError(ct.mediaSourceDecoderConfigurationError),!1;this.player.recorder&&this.player._opt.recordType===S&&this.player.recorder.initMetaData(e,s);const o={id:mr,type:"video",timescale:1e3,duration:0,avcc:r,codecWidth:a.codecWidth,codecHeight:a.codecHeight,videoType:a.videoType},n=Uh.generateInitSegment(o);this.isAvc=s===vt;let l=a.codec;return this.videoMimeType=l?`video/mp4; codecs="${a.codec}"`:this.isAvc?hi:ci,this._initSourceBuffer(),this.appendBuffer(n.buffer),this.sequenceNumber=0,this.cacheTrack={},!0}_decodeAudioConfigurationRecord(e,t){const i=e[0]>>4,s=i===Tt,r=i===Et;if(po(r||s))return this.player.debug.warn(this.TAG_NAME,`_decodeAudioConfigurationRecord audio codec is not support , codecId is ${i} ant auto wasm decode`),this.player.emit(ct.mediaSourceAudioG711NotSupport),!1;const a={id:gr,type:"audio",timescale:1e3};let o={};if(zr(e)){if(o=function(e){let t=new Uint8Array(e),i=null,s=0,r=0,a=0,o=null;if(s=r=t[0]>>>3,a=(7&t[0])<<1|t[1]>>>7,a<0||a>=$r.length)return void console.error("Flv: AAC invalid sampling frequency index!");let n=$r[a],l=(120&t[1])>>>3;if(l<0||l>=8)return void console.log("Flv: AAC invalid channel configuration");5===s&&(o=(7&t[1])<<1|t[2]>>>7,t[2]);let d=self.navigator.userAgent.toLowerCase();return-1!==d.indexOf("firefox")?a>=6?(s=5,i=new Array(4),o=a-3):(s=2,i=new Array(2),o=a):-1!==d.indexOf("android")?(s=2,i=new Array(2),o=a):(s=5,o=a,i=new Array(4),a>=6?o=a-3:1===l&&(s=2,i=new Array(2),o=a)),i[0]=s<<3,i[0]|=(15&a)>>>1,i[1]=(15&a)<<7,i[1]|=(15&l)<<3,5===s&&(i[1]|=(15&o)>>>1,i[2]=(1&o)<<7,i[2]|=8,i[3]=0),{audioType:"aac",config:i,sampleRate:n,channelCount:l,objectType:s,codec:"mp4a.40."+s,originalCodec:"mp4a.40."+r}}(e.slice(2)),!o)return!1;a.audioSampleRate=o.sampleRate,a.channelCount=o.channelCount,a.config=o.config,a.refSampleDuration=1024/a.audioSampleRate*a.timescale}else{if(!s)return!1;if(o=function(e){if(e.length<4)return void console.error("Invalid MP3 packet, header missing!");let t=new Uint8Array(e.buffer),i=null;if(255!==t[0])return void console.error("Invalid MP3 packet, first byte != 0xFF ");let s=t[1]>>>3&3,r=(6&t[1])>>1,a=(240&t[2])>>>4,o=(12&t[2])>>>2,n=3!=(t[3]>>>6&3)?2:1,l=0,d=0;switch(s){case 0:l=Nh[o];break;case 2:l=Oh[o];break;case 3:l=Fh[o]}switch(r){case 1:a<Gh.length&&(d=Gh[a]);break;case 2:a<zh.length&&(d=zh[a]);break;case 3:a<jh.length&&(d=jh[a])}return i={bitRate:d,samplingRate:l,channelCount:n,codec:"mp3",originalCodec:"mp3",audioType:"mp3"},i}(e),!o)return!1;a.audioSampleRate=o.samplingRate,a.channelCount=o.channelCount,a.refSampleDuration=1152/a.audioSampleRate*a.timescale}a.codec=o.codec,a.duration=0;let n="mp4",l=o.codec,d=null;s&&po(ma())?(n="mpeg",l="",d=new Uint8Array):d=Uh.generateInitSegment(a);let h=`${a.type}/${n}`;return l&&l.length>0&&(h+=`;codecs=${l}`),po(this.isAudioInitInfo)&&(this.player.audio.updateAudioInfo({encTypeCode:i,channels:a.channelCount,sampleRate:a.audioSampleRate}),this.isAudioInitInfo=!0),this.audioMimeType=h,this.isAAC=r,this._initAudioSourceBuffer(),this.appendAudioBuffer(d.buffer),!0}_initSourceBuffer(){const{debug:e,events:{proxy:t}}=this.player;if(null===this.sourceBuffer&&null!==this.mediaSource&&this.isStateOpen&&this.videoMimeType){try{this.sourceBuffer=this.mediaSource.addSourceBuffer(this.videoMimeType),e.log(this.TAG_NAME,"_initSourceBuffer() this.mediaSource.addSourceBuffer()",this.videoMimeType)}catch(t){return e.error(this.TAG_NAME,"appendBuffer() this.mediaSource.addSourceBuffer()",t.code,t),this.player.emitError(ct.mseAddSourceBufferError,t),void(this.mediaSourceAddSourceBufferError=!0)}if(this.sourceBuffer){const i=t(this.sourceBuffer,"error",(t=>{this.mediaSourceBufferError=!0,e.error(this.TAG_NAME,"mseSourceBufferError this.sourceBuffer",t),this.player.emitError(ct.mseSourceBufferError,t)})),s=t(this.sourceBuffer,"updateend",(()=>{this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this.hasPendingEos&&(this.player.debug.log(this.TAG_NAME,"videoSourceBuffer updateend and hasPendingEos is true, next endOfStream()"),this.endOfStream())}));this.eventListenList.push(i,s)}}else e.log(this.TAG_NAME,`_initSourceBuffer and this.isStateOpen is ${this.isStateOpen} and this.isAvc === null is ${null===this.isAvc}`)}_initAudioSourceBuffer(){const{debug:e,events:{proxy:t}}=this.player;if(null===this.audioSourceBuffer&&null!==this.mediaSource&&this.isStateOpen&&this.audioMimeType){try{this.audioSourceBuffer=this.mediaSource.addSourceBuffer(this.audioMimeType),this._clearAudioSourceBufferCheckTimeout(),e.log(this.TAG_NAME,"_initAudioSourceBuffer() this.mediaSource.addSourceBuffer()",this.audioMimeType)}catch(t){return e.error(this.TAG_NAME,"appendAudioBuffer() this.mediaSource.addSourceBuffer()",t.code,t),this.player.emitError(ct.mseAddSourceBufferError,t),void(this.mediaSourceAddSourceBufferError=!0)}if(this.audioSourceBuffer){const i=t(this.audioSourceBuffer,"error",(t=>{this.mediaSourceBufferError=!0,e.error(this.TAG_NAME,"mseSourceBufferError this.audioSourceBuffer",t),this.player.emitError(ct.mseSourceBufferError,t)})),s=t(this.audioSourceBuffer,"updateend",(()=>{this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this.hasPendingEos&&(this.player.debug.log(this.TAG_NAME,"audioSourceBuffer updateend and hasPendingEos is true, next endOfStream()"),this.endOfStream())}));this.eventListenList.push(i,s),null===this.audioSourceNoDataCheckTimeout&&(this.audioSourceNoDataCheckTimeout=setTimeout((()=>{this._clearAudioNoDataCheckTimeout(),this.player.emit(ct.mediaSourceAudioNoDataTimeout)}),1e3))}}else e.log(this.TAG_NAME,`_initAudioSourceBuffer and this.isStateOpen is ${this.isStateOpen} and this.audioMimeType is ${this.audioMimeType}`)}_decodeVideo(e,t,i,s,r){const a=this.player;let o=e.slice(5),n=o.byteLength;if(0===n)return void a.debug.warn(this.TAG_NAME,"_decodeVideo payload bytes is 0 and return");let l=(new Date).getTime(),d=!1;this.prevTimestamp||(this.prevTimestamp=l,d=!0);const h=l-this.prevTimestamp;this.decodeDiffTimestamp=h,h>500&&!d&&this.player.isPlayer()&&a.debug.warn(this.TAG_NAME,`_decodeVideo now time is ${l} and prev time is ${this.prevTimestamp}, diff time is ${h} ms`);const c=this.$videoElement;if(this.cacheTrack.id&&t>=this.cacheTrack.dts){let e=8+this.cacheTrack.size,i=new Uint8Array(e);i[0]=e>>>24&255,i[1]=e>>>16&255,i[2]=e>>>8&255,i[3]=255&e,i.set(Uh.types.mdat,4),i.set(this.cacheTrack.data,8),this.cacheTrack.duration=t-this.cacheTrack.dts;let s=Uh.moof(this.cacheTrack,this.cacheTrack.dts);this.cacheTrack={};let o=new Uint8Array(s.byteLength+i.byteLength);o.set(s,0),o.set(i,s.byteLength),this.appendBuffer(o.buffer),a.emit(nt.timeUpdate,r),a.isPlayer()?a.isUseHls265()?a.updateStats({dfps:!0,mseTs:t}):a.updateStats({fps:!0,dfps:!0,ts:r,mseTs:t}):a.isPlayback()&&a.playback.updateStats({ts:r}),a._times.videoStart||(a._times.videoStart=aa(),a.handlePlayToRenderTimes())}else a.debug.log(this.TAG_NAME,`cacheTrack = {} now dts is ${t}, and ts is ${r} cacheTrack dts is ${this.cacheTrack&&this.cacheTrack.dts}`),this.cacheTrack={};this.cacheTrack||(this.cacheTrack={}),this.cacheTrack.id=mr,this.cacheTrack.sequenceNumber=++this.sequenceNumber,this.cacheTrack.size=n,this.cacheTrack.dts=t,this.cacheTrack.cts=s,this.cacheTrack.isKeyframe=i,this.cacheTrack.data=o,this.cacheTrack.flags={isLeading:0,dependsOn:i?2:1,isDependedOn:i?1:0,hasRedundancy:0,isNonSync:i?0:1},!this.isInitInfo&&c.videoWidth>0&&c.videoHeight>0&&(a.debug.log(this.TAG_NAME,`updateVideoInfo: ${c.videoWidth},${c.videoHeight}`),a.video.updateVideoInfo({width:c.videoWidth,height:c.videoHeight}),a.video.initCanvasViewSize(),this.isInitInfo=!0),a._opt.mseUseCanvasRender&&po(this.isSupportVideoFrameCallback)&&po(a.isUseHls265())&&a.video.render({$video:c,ts:t}),this.prevTimestamp=(new Date).getTime()}_stopCanvasRender(){this.canvasRenderInterval&&(clearInterval(this.canvasRenderInterval),this.canvasRenderInterval=null)}_decodeAudio(e,t,i){const s=this.player;let r=this.isAAC?e.slice(2):e.slice(1),a=r.byteLength;if(this.cacheAudioTrack.id&&t>=this.cacheAudioTrack.dts){let e=8+this.cacheAudioTrack.size,i=new Uint8Array(e);i[0]=e>>>24&255,i[1]=e>>>16&255,i[2]=e>>>8&255,i[3]=255&e,i.set(Uh.types.mdat,4),i.set(this.cacheAudioTrack.data,8),this.cacheAudioTrack.duration=t-this.cacheAudioTrack.dts;let s=Uh.moof(this.cacheAudioTrack,this.cacheAudioTrack.dts);this.cacheAudioTrack={};let r=new Uint8Array(s.byteLength+i.byteLength);r.set(s,0),r.set(i,s.byteLength),this.appendAudioBuffer(r.buffer)}else s.debug.log(this.TAG_NAME,`cacheAudioTrack = {} now dts is ${t} cacheAudioTrack dts is ${this.cacheAudioTrack&&this.cacheAudioTrack.dts}`),this.cacheAudioTrack={};this.cacheAudioTrack||(this.cacheAudioTrack={}),this.cacheAudioTrack.id=gr,this.cacheAudioTrack.sequenceNumber=++this.audioSequenceNumber,this.cacheAudioTrack.size=a,this.cacheAudioTrack.dts=t,this.cacheAudioTrack.cts=0,this.cacheAudioTrack.data=r,this.cacheAudioTrack.flags={isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}appendBuffer(e){if(this.player.isDestroyedOrClosed())return void this.player.debug.warn(this.TAG_NAME,"appendBuffer() player is destroyed");const{debug:t,events:{proxy:i}}=this.player;this.mediaSourceAddSourceBufferError?t.warn(this.TAG_NAME,"appendBuffer() this.mediaSourceAddSourceBufferError is true"):this.mediaSourceAppendBufferFull?t.warn(this.TAG_NAME,"appendBuffer() this.mediaSourceAppendBufferFull is true"):this.mediaSourceAppendBufferError?t.warn(this.TAG_NAME,"appendBuffer() this.mediaSourceAppendBufferError is true"):this.mediaSourceBufferError?t.warn(this.TAG_NAME,"appendBuffer() this.mediaSourceBufferError is true"):(this.pendingSegments.push(e),this.sourceBuffer&&(this.player.isPlayer()&&this._handleUpdatePlaybackRate(),this.player.isPlayback()&&(this._handleUpdateBufferDelayTime(),this._checkVideoPlayCurrentTime()),this.player._opt.mseAutoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanUpSourceBuffer(),po(this.getSourceBufferUpdating())&&this.isStateOpen&&po(this._hasPendingRemoveRanges()))?this._doAppendSegments():this.isStateClosed?(this.mediaSourceBufferError=!0,this.player.emitError(ct.mseSourceBufferError,"mediaSource is not attached to video or mediaSource is closed")):this.isStateEnded?(this.mediaSourceBufferError=!0,this.player.emitError(ct.mseSourceBufferError,"mediaSource is end")):this._hasPendingRemoveRanges()&&t.log(this.TAG_NAME,`video has pending remove ranges and video length is ${this.pendingRemoveRanges.length}, audio length is ${this.pendingAudioRemoveRanges.length}`))}appendAudioBuffer(e){if(this.player.isDestroyedOrClosed())return void this.player.debug.warn(this.TAG_NAME,"appendAudioBuffer() player is destroyed");const{debug:t,events:{proxy:i}}=this.player;this.mediaSourceAddSourceBufferError?t.warn(this.TAG_NAME,"appendAudioBuffer() this.mediaSourceAddSourceBufferError is true"):this.mediaSourceAppendBufferFull?t.warn(this.TAG_NAME,"appendAudioBuffer() this.mediaSourceAppendBufferFull is true"):this.mediaSourceAppendBufferError?t.warn(this.TAG_NAME,"appendAudioBuffer() this.mediaSourceAppendBufferError is true"):this.mediaSourceBufferError?t.warn(this.TAG_NAME,"appendAudioBuffer() this.mediaSourceBufferError is true"):(this.pendingAudioSegments.push(e),this.audioSourceBuffer&&(this.player.isPlayer()&&this._handleUpdatePlaybackRate(),this.player.isPlayback()&&(this._handleUpdateBufferDelayTime(),this._checkVideoPlayCurrentTime()),this.player._opt.mseAutoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanUpSourceBuffer(),po(this.getAudioSourceBufferUpdating())&&this.isStateOpen&&po(this._hasPendingRemoveRanges()))?this._doAppendSegments():this.isStateClosed?(this.mediaSourceBufferError=!0,this.player.emitError(ct.mseSourceBufferError,"mediaSource is not attached to video or mediaSource is closed")):this.isStateEnded?(this.mediaSourceBufferError=!0,this.player.emitError(ct.mseSourceBufferError,"mediaSource is end")):this._hasPendingRemoveRanges()&&t.log(this.TAG_NAME,`audio has pending remove ranges and video length is ${this.pendingRemoveRanges.length}, audio length is ${this.pendingAudioRemoveRanges.length}`))}getSourceBufferUpdating(){return this.sourceBuffer&&this.sourceBuffer.updating}getAudioSourceBufferUpdating(){return this.audioSourceBuffer&&this.audioSourceBuffer.updating}stop(){this.abortSourceBuffer(),this.removeSourceBuffer(),this.endOfStream()}checkSourceBufferDelay(){const e=this.$videoElement;let t=0,i=0;return e.buffered.length>0&&(i=e.buffered.end(e.buffered.length-1),t=i-e.currentTime),t<0&&(this.player.debug.warn(this.TAG_NAME,`checkMSESourceBufferDelay ${t} < 0, and buffered is ${i} ,currentTime is ${e.currentTime} , try to seek ${e.currentTime} to ${i}`),e.currentTime=i,t=0),t}checkSourceBufferStore(){const e=this.$videoElement;let t=0;return e.buffered.length>0&&(t=e.currentTime-e.buffered.start(0)),t}getDecodeDiffTimes(){return this.decodeDiffTimestamp}removeBuffer(e,t){const i=Ka();if(this.player.debug.log(this.TAG_NAME,`removeBuffer() start is ${e} and end is ${t} and _isMacOsFirefox is ${i}`),this.isStateOpen&&po(i)){if(po(this.getSourceBufferUpdating()))try{this.sourceBuffer.remove(e,t)}catch(e){this.player.debug.warn(this.TAG_NAME,"removeBuffer() sourceBuffer error",e)}if(po(this.getAudioSourceBufferUpdating()))try{this.audioSourceBuffer.remove(e,t)}catch(e){this.player.debug.warn(this.TAG_NAME,"removeBuffer() audioSourceBuffer error",e)}}}clearUpAllSourceBuffer(){if(this.sourceBuffer){const e=this.sourceBuffer.buffered;for(let t=0;t<e.length;t++){let i=e.start(t),s=e.end(t);this.pendingRemoveRanges.push({start:i,end:s})}po(this.getSourceBufferUpdating())&&this._doRemoveRanges()}if(this.audioSourceBuffer){const e=this.audioSourceBuffer.buffered;for(let t=0;t<e.length;t++){let i=e.start(t),s=e.end(t);this.pendingAudioRemoveRanges.push({start:i,end:s})}po(this.getAudioSourceBufferUpdating())&&this._doRemoveRanges()}}endOfStream(){if(this.isStateOpen&&this.$videoElement&&this.$videoElement.readyState>=1)if(this.getSourceBufferUpdating()||this.getAudioSourceBufferUpdating())this.hasPendingEos=!0;else{this.hasPendingEos=!1;try{this.player.debug.log(this.TAG_NAME,"endOfStream()"),this.mediaSource.endOfStream()}catch(e){this.player.debug.warn(this.TAG_NAME,"endOfStream() error",e)}}}abortSourceBuffer(){if(this.isStateOpen){if(this.sourceBuffer){try{this.player.debug.log(this.TAG_NAME,"abortSourceBuffer() abort sourceBuffer"),this.sourceBuffer.abort()}catch(e){}po(this.getSourceBufferUpdating())&&this._doRemoveRanges()}if(this.audioSourceBuffer){try{this.player.debug.log(this.TAG_NAME,"abortSourceBuffer() abort audioSourceBuffer"),this.audioSourceBuffer.abort()}catch(e){}po(this.getAudioSourceBufferUpdating())&&this._doRemoveRanges()}}this.sourceBuffer=null,this.audioSourceBuffer=null}removeSourceBuffer(){if(!this.isStateClosed&&this.mediaSource){if(this.sourceBuffer)try{this.player.debug.log(this.TAG_NAME,"removeSourceBuffer() sourceBuffer"),this.mediaSource.removeSourceBuffer(this.sourceBuffer)}catch(e){this.player.debug.error(this.TAG_NAME,"removeSourceBuffer() sourceBuffer error",e)}if(this.audioSourceBuffer)try{this.player.debug.log(this.TAG_NAME,"removeSourceBuffer() audioSourceBuffer"),this.mediaSource.removeSourceBuffer(this.audioSourceBuffer)}catch(e){this.player.debug.error(this.TAG_NAME,"removeSourceBuffer() audioSourceBuffer error",e)}}}_hasPendingSegments(){return this.pendingSegments.length>0||this.pendingAudioSegments.length>0}getPendingSegmentsLength(){return this.pendingSegments.length}_handleUpdatePlaybackRate(){if(!this.$videoElement)return;const e=this.$videoElement;this.player._opt.videoBuffer,this.player._opt.videoBufferDelay;const t=e.buffered;t.length&&t.start(0);const i=t.length?t.end(t.length-1):0;let s=e.currentTime;const r=i-s,a=this.getMseBufferMaxDelayTime();if(this.player.updateStats({mseVideoBufferDelayTime:r}),r>a)this.player.debug.log(this.TAG_NAME,`handleUpdatePlaybackRate and buffered is ${i} and current is ${s} , delay buffer is more than ${a} is ${r} and new time is ${i}`),e.currentTime=i,s=e.currentTime;else if(r<0){if(this.player.debug.warn(this.TAG_NAME,`handleUpdatePlaybackRate and delay buffer is ${i} - current is ${s} = ${r} < 0 and check video is paused : ${e.paused} `),0===i)return void this.player.emit(ct.mediaSourceBufferedIsZeroError,"video.buffered is empty");e.paused&&e.play()}const o=this._getPlaybackRate(i-s);e.playbackRate!==o&&(this.player.debug.log(this.TAG_NAME,`handleUpdatePlaybackRate and buffered is ${i} and current time is ${s} and delay is ${i-s} set playbackRate is ${o} `),e.playbackRate=o)}_handleUpdateBufferDelayTime(){const e=this.getVideoBufferDelayTime();this.player.updateStats({mseVideoBufferDelayTime:e})}_checkVideoPlayCurrentTime(){const e=this.checkSourceBufferStore();if(e<0){const t=this.getVideoBufferStartTime();this.player.debug.warn(this.TAG_NAME,`checkVideoPlayCurrentTime store is ${e} < 0 and set currentTime ${this.$videoElement.currentTime} to ${t}`),this.$videoElement.currentTime=t}}_doAppendSegments(){if(this.isStateClosed||this.isStateEnded)this.player.debug.log(this.TAG_NAME,"_doAppendSegments() mediaSource is closed or ended and return");else if(null!==this.sourceBuffer){if(this.needInitAudio()&&null===this.audioSourceBuffer)return this.player.debug.log(this.TAG_NAME,"_doAppendSegments() audioSourceBuffer is null and need init audio source buffer"),void(null===this.audioSourceBufferCheckTimeout&&(this.audioSourceBufferCheckTimeout=setTimeout((()=>{this._clearAudioSourceBufferCheckTimeout(),this.player.emit(ct.mediaSourceAudioInitTimeout)}),1e3)));if(po(this.getSourceBufferUpdating())&&this.pendingSegments.length>0){const e=this.pendingSegments.shift();try{this.sourceBuffer.appendBuffer(e)}catch(e){this.player.debug.error(this.TAG_NAME,"this.sourceBuffer.appendBuffer()",e.code,e),22===e.code?(this.stop(),this.mediaSourceAppendBufferFull=!0,this.player.emitError(ct.mediaSourceFull)):11===e.code?(this.stop(),this.mediaSourceAppendBufferError=!0,this.player.emitError(ct.mediaSourceAppendBufferError)):(this.stop(),this.mediaSourceBufferError=!0,this.player.emitError(nt.mseSourceBufferError,e))}}if(po(this.getAudioSourceBufferUpdating())&&this.pendingAudioSegments.length>0){const e=this.pendingAudioSegments.shift();try{this.audioSourceBuffer.appendBuffer(e)}catch(e){this.player.debug.error(this.TAG_NAME,"this.audioSourceBuffer.appendBuffer()",e.code,e),22===e.code?(this.stop(),this.mediaSourceAppendBufferFull=!0,this.player.emitError(ct.mediaSourceFull)):11===e.code?(this.stop(),this.mediaSourceAppendBufferError=!0,this.player.emitError(ct.mediaSourceAppendBufferError)):(this.stop(),this.mediaSourceBufferError=!0,this.player.emitError(nt.mseSourceBufferError,e))}}}else this.player.debug.log(this.TAG_NAME,"_doAppendSegments() sourceBuffer is null and wait init and return")}_doCleanUpSourceBuffer(){if(!this.$videoElement)return;const e=this.$videoElement.currentTime;if(this.sourceBuffer){const t=this.sourceBuffer.buffered;let i=!1;for(let s=0;s<t.length;s++){let r=t.start(s),a=t.end(s);if(r<=e&&e<a+3){if(e-r>=this.player._opt.mseAutoCleanupMaxBackwardDuration){i=!0;let t=e-this.player._opt.mseAutoCleanupMinBackwardDuration;this.pendingRemoveRanges.push({start:r,end:t})}}else a<e&&(i=!0,this.pendingRemoveRanges.push({start:r,end:a}))}i&&po(this.getSourceBufferUpdating())&&this._doRemoveRanges()}if(this.audioSourceBuffer){const t=this.audioSourceBuffer.buffered;let i=!1;for(let s=0;s<t.length;s++){let r=t.start(s),a=t.end(s);if(r<=e&&e<a+3){if(e-r>=this.player._opt.mseAutoCleanupMaxBackwardDuration){i=!0;let t=e-this.player._opt.mseAutoCleanupMinBackwardDuration;this.pendingAudioRemoveRanges.push({start:r,end:t})}}else a<e&&(i=!0,this.pendingAudioRemoveRanges.push({start:r,end:a}))}i&&po(this.getAudioSourceBufferUpdating())&&this._doRemoveRanges()}}_hasPendingRemoveRanges(){return this.pendingRemoveRanges.length>0||this.pendingAudioRemoveRanges.length>0}_doRemoveRanges(){if(this.sourceBuffer&&po(this.getSourceBufferUpdating())){let e=this.pendingRemoveRanges;for(;e.length&&po(this.getSourceBufferUpdating());){let t=e.shift();try{this.sourceBuffer.remove(t.start,t.end)}catch(e){this.player.debug.warn(this.TAG_NAME,"_doRemoveRanges() sourceBuffer error",e)}}}if(this.audioSourceBuffer&&po(this.getAudioSourceBufferUpdating())){let e=this.pendingAudioRemoveRanges;for(;e.length&&po(this.getAudioSourceBufferUpdating());){let t=e.shift();try{this.audioSourceBuffer.remove(t.start,t.end)}catch(e){this.player.debug.warn(this.TAG_NAME,"_doRemoveRanges() audioSourceBuffer error",e)}}}}getDecodePlaybackRate(){let e=0;const t=this.$videoElement;return t&&(e=t.playbackRate),e}_getPlaybackRate(e){const t=this.$videoElement;let i=this.player._opt.videoBufferDelay+this.player._opt.videoBuffer;const s=Math.max(i,1e3),r=s/2;return e*=1e3,1===t.playbackRate?e>s?1.2:1:e<=r?1:t.playbackRate}_needCleanupSourceBuffer(){if(po(this.player._opt.mseAutoCleanupSourceBuffer)||!this.$videoElement)return!1;const e=this.$videoElement,t=e.buffered,i=e.currentTime;return t.length>=1&&i-t.start(0)>=this.player._opt.mseAutoCleanupMaxBackwardDuration}getVideoCurrentTime(){let e=0;return this.$videoElement&&(e=this.$videoElement.currentTime),e}getVideoBufferLastTime(){const e=this.$videoElement;let t=0;if(e){const i=e.buffered;i.length&&i.start(0);t=i.length?i.end(i.length-1):0}return t}getVideoBufferStartTime(){const e=this.$videoElement;let t=0;if(e){const i=e.buffered;t=i.length?i.start(0):0}return t}getVideoBufferDelayTime(){const e=this.$videoElement;const t=this.getVideoBufferLastTime()-e.currentTime;return t>0?t:0}_clearAudioSourceBufferCheckTimeout(){this.audioSourceBufferCheckTimeout&&(clearTimeout(this.audioSourceBufferCheckTimeout),this.audioSourceBufferCheckTimeout=null)}_clearAudioNoDataCheckTimeout(){this.audioSourceNoDataCheckTimeout&&(clearTimeout(this.audioSourceNoDataCheckTimeout),this.audioSourceNoDataCheckTimeout=null)}getMimeType(){return{video:this.videoMimeType,audio:this.audioMimeType}}getMseBufferMaxDelayTime(){let e=(this.player._opt.videoBuffer+this.player._opt.videoBufferDelay)/1e3;return Math.max(5,e+3)}}const Vh=()=>"wakeLock"in navigator&&-1===window.navigator.userAgent.indexOf("Samsung")&&po(ya());class $h{constructor(e){this.player=e,this.enabled=!1,Vh()?(this.player.debug.log("NoSleep","Native Wake Lock API supported."),this._wakeLock=null,this.handleVisibilityChange=()=>{null!==this._wakeLock&&"visible"===document.visibilityState&&this.enable()},document.addEventListener("visibilitychange",this.handleVisibilityChange),document.addEventListener("fullscreenchange",this.handleVisibilityChange)):(this.player.debug.log("NoSleep","Native Wake Lock API not supported. so use video element."),this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm","data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2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Fgv9AAIgAQzX61yT5xzAAAo4eCAtGA+P/+o4eCAuWA+P/+o4eCAvmA+P/+o4eCAw2A+P/+o4eCAyGA+P/+o56BAycA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IDNYD4//6jh4IDSYD4//6jh4IDXYD4//6jh4IDcYD4//6jh4IDhYD4//6jnoEDiwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggOZgPj//qOHggOtgPj//qOHggPBgPj//qOHggPVgPj//qOHggPpgPj//qOegQPvANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCA/2A+P/+o4eCBBGA+P/+o4eCBCWA+P/+o4eCBDmA+P/+o4eCBE2A+P/+o56BBFMA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IEiID4//6jh4IEnID4//6jh4IEsID4//6jnoEEtwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggTEgPj//qOHggTYgPj//qOHggTsgPj//qOHggUAgPj//qOHggUUgPj//qOegQUbANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCBSiA+P/+o4eCBTyA+P/+o4eCBVCA+P/+o4eCBWSA+P/+o4eCBXiA+P/+o56BBX8A0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IFjID4//6jh4IFoID4//6jh4IFtID4//6jh4IFyID4//6jh4IF3ID4//6jnoEF4wDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggXwgPj//qOHggYEgPj//qOHggYYgPj//qOHggYsgPj//qOHggZAgPj//qOegQZHANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCBlSA+P/+o4eCBmiA+P/+o4eCBnyA+P/+o4eCBpCA+P/+o4eCBqSA+P/+o56BBqsA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IGuID4//6jh4IGzID4//6jh4IG4ID4//6jh4IG9ID4//6jh4IHCID4//6jnoEHDwDRAgAFEBAUYABhYL/QACIAEM1+tck+ccwAAKOHggccgPj//qOHggcwgPj//qOHggdEgPj//qOHggdYgPj//qOHggdsgPj//qOegQdzANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCB4CA+P/+o4eCB5SA+P/+o4eCB6iA+P/+o4eCB7yA+P/+o4eCB9CA+P/+o56BB9cA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IH5ID4//6jh4IH+ID4//6jh4IIDID4//6jh4IIIID4//6jh4IINID4//6jnoEIOwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHgghIgPj//qOHgghcgPj//qOHgghwgPj//qOHggiEgPj//qOegQifANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCCMCA+P/+o4eCCNSA+P/+o4eCCOiA+P/+o4eCCPyA+P/+o56BCQMA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IJEID4//6jh4IJJID4//6jh4IJOID4//6jh4IJTID4//6jh4IJYID4//6jnoEJZwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggl0gPj//qOHggmIgPj//qOHggmcgPj//qOHggmwgPj//qOHggnEgPj//qOegQnLANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCCdiA+P/+o4eCCeyA+P/+o4eCCgCA+P/+o4eCChSA+P/+o4eCCiiA+P/+o56BCi8A0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IKPID4//6jh4IKUID4//6jh4IKZID4//6jh4IKeID4//6jh4IKjID4//6jnoEKkwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggqggPj//qOHggq0gPj//qOHggrIgPj//qOHggrcgPj//qOHggrwgPj//qOegQr3ANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCCwSA+P/+o4eCCxiA+P/+o4eCCyyA+P/+o4eCC0CA+P/+o4eCC1SA+P/+o56BC1sA0QIABRAQFGAAYWC/0AAiABDNfrXJPnHMAACjh4ILaID4//6jh4ILfID4//6jh4ILkID4//6jh4IL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o56BEAsA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IQGID4//6jh4IQLID4//6jh4IQQID4//6jh4IQVID4//6jh4IQaID4//6jnoEQbwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHghB8gPj//qOHghCQgPj//qOHghCkgPj//qOHghC4gPj//qOHghDMgPj//qOegRDTANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCEOCA+P/+o4eCEPSA+P/+o4eCEQiA+P/+o56BETcA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IRQ4D4//6jh4IRV4D4//6jh4IRa4D4//6jh4IRf4D4//6jh4IRk4D4//6jnoERmwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHghGngPj//qOHghG7gPj//qOHghHPgPj//qOHghHjgPj//qOHghH3gPj//qOegRH/ANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCEguA+P/+o4eCEh+A+P/+o4eCEjOA+P/+o4eCEkeA+P/+o4eCEluA+P/+o56BEmMA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4ISb4D4//6jh4ISg4D4//6jh4ISl4D4//6jh4ISq4D4//6jh4ISv4D4//6jnoESxwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHghLTgPj//qOHghLngPj//qOHghL7gPj//qOHghMPgPj//qOHghMjgPj//qOegRMrANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCEzeA+P/+o4eCE0uA+P/+o4eCE1+A+P/+o4eCE3OA+P/+oAEAAAAAAAAPoYeCE4cA+P/+daKDB/KBHFO7a5G7j7OBB7eK94EB8YIDX/CBDA=="),this._addSourceToVideo(this.noSleepVideo,"mp4","data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACORtZGF03gIATGF2YzU4LjM1LjEwMAACMEAOAAACcQYF//9t3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE2MSByMzAyNyA0MTIxMjc3IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAyMCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTAgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0xIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MCBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0tMiB0aHJlYWRzPTcgbG9va2FoZWFkX3RocmVhZHM9MSBzbGljZWRfdGhyZWFkcz0wIG5yPTAgZGVjaW1hdGU9MSBpbnRlcmxhY2VkPTAgYmx1cmF5X2NvbXBhdD0wIGNvbnN0cmFpbmVkX2ludHJhPTAgYmZyYW1lcz0wIHdlaWdodHA9MCBrZXlpbnQ9MjUwIGtleWludF9taW49MTAgc2NlbmVjdXQ9NDAgaW50cmFfcmVmcmVzaD0wIHJjX2xvb2thaGVhZD00MCByYz1jcmYgbWJ0cmVlPTEgY3JmPTIzLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IGlwX3JhdGlvPTEuNDAgYXE9MToxLjAwAIAAAADvZYiED/JigADD7JycnJycnJycnJycnJycnJycnJ11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111114BGCAHARggBwEYIAcBGCAHARggBwAAAAdBmjgf4BLYARggBwEYIAcBGCAHARggBwAAAAdBmlQH+AS2ARggBwEYIAcBGCAHARggBwAAAAdBmmA/wCWwARggBwEYIAcBGCAHARggBwEYIAcAAAAHQZqA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AAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAA3HN0Y28AAAAAAAAAMwAAADAAAAOtAAADzAAAA+cAAAQCAAAEIQAABDwAAARXAAAEdgAABJEAAASsAAAEywAABOIAAAT5AAAFGAAABTMAAAVOAAAFbQAABYgAAAWjAAAFwgAABd0AAAX4AAAGDwAABioAAAZFAAAGZAAABn8AAAaaAAAGuQAABtQAAAbvAAAHDgAABykAAAc8AAAHWwAAB3YAAAeRAAAHsAAAB8sAAAfmAAAIBQAACCAAAAg7AAAIWgAACG0AAAiIAAAIpwAACMIAAAjdAAAI/AAAABpzZ3BkAQAAAHJvbGwAAAACAAAAAf//AAAAHHNiZ3AAAAAAcm9sbAAAAAEAAADSAAAAAQAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTguMjAuMTAw"),Object.assign(this.noSleepVideo.style,{position:"absolute",left:"-100%",top:"-100%"}),document.querySelector("body").append(this.noSleepVideo),this.handleNoSleepVideoTimeUpdate=()=>{this.noSleepVideo&&this.noSleepVideo.currentTime>4&&(this.noSleepVideo.currentTime=1)},this.noSleepVideo.addEventListener("timeupdate",this.handleNoSleepVideoTimeUpdate))}destroy(){if(this._wakeLock&&(this._wakeLock.release(),this._wakeLock=null),this.noSleepVideo){this.handleNoSleepVideoTimeUpdate&&this.noSleepVideo.removeEventListener("timeupdate",this.handleNoSleepVideoTimeUpdate);try{this.noSleepVideo.parentNode&&this.noSleepVideo.parentNode.removeChild(this.noSleepVideo)}catch(e){this.player.debug.warn("NoSleep","Failed to remove noSleepVideo element.")}this.noSleepVideo=null}this.handleVisibilityChange&&(document.removeEventListener("visibilitychange",this.handleVisibilityChange),document.removeEventListener("fullscreenchange",this.handleVisibilityChange))}_addSourceToVideo(e,t,i){var s=document.createElement("source");s.src=i,s.type=`video/${t}`,e.appendChild(s)}get isEnabled(){return this.enabled}enable(){const e=this.player.debug;if(Vh())return navigator.wakeLock.request("screen").then((t=>{this._wakeLock=t,this.enabled=!0,e.log("wakeLock","Wake Lock active."),this._wakeLock.addEventListener("release",(()=>{e.log("wakeLock","Wake Lock released.")}))})).catch((t=>{throw this.enabled=!1,e.warn("wakeLock",`${t.name}, ${t.message}`),t}));return this.noSleepVideo.play().then((t=>(e.log("wakeLock","noSleepVideo Wake Lock active."),this.enabled=!0,t))).catch((t=>{throw e.warn("wakeLock",`noSleepVideo ${t.name}, ${t.message}`),this.enabled=!1,t}))}disable(){Vh()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):this.noSleepVideo&&this.noSleepVideo.pause(),this.enabled=!1,this.player.debug.log("wakeLock","Disabling wake lock.")}}function Wh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jh={exports:{}};!function(e,t){var i,s,r,a,o;i=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,s=/^(?=([^\/?#]*))\1([^]*)$/,r=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(e,t,i){if(i=i||{},e=e.trim(),!(t=t.trim())){if(!i.alwaysNormalize)return e;var r=o.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=o.normalizePath(r.path),o.buildURLFromParts(r)}var a=o.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return i.alwaysNormalize?(a.path=o.normalizePath(a.path),o.buildURLFromParts(a)):t;var n=o.parseURL(e);if(!n)throw new Error("Error trying to parse base URL.");if(!n.netLoc&&n.path&&"/"!==n.path[0]){var l=s.exec(n.path);n.netLoc=l[1],n.path=l[2]}n.netLoc&&!n.path&&(n.path="/");var d={scheme:n.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(d.netLoc=n.netLoc,"/"!==a.path[0]))if(a.path){var h=n.path,c=h.substring(0,h.lastIndexOf("/")+1)+a.path;d.path=o.normalizePath(c)}else d.path=n.path,a.params||(d.params=n.params,a.query||(d.query=n.query));return null===d.path&&(d.path=i.alwaysNormalize?o.normalizePath(a.path):a.path),o.buildURLFromParts(d)},parseURL:function(e){var t=i.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(r,"");e.length!==(e=e.replace(a,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=o}(Jh);var qh=Jh.exports;function Kh(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,s)}return i}function Yh(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Kh(Object(i),!0).forEach((function(t){Xh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Kh(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Qh(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var s=i.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function Xh(e,t,i){return(t=Qh(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Zh(){return Zh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},Zh.apply(this,arguments)}const ec=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},tc=Number.isSafeInteger||function(e){return"number"==typeof e&&Math.abs(e)<=ic},ic=Number.MAX_SAFE_INTEGER||9007199254740991;let sc=function(e){return e.MEDIA_ATTACHING="hlsMediaAttaching",e.MEDIA_ATTACHED="hlsMediaAttached",e.MEDIA_DETACHING="hlsMediaDetaching",e.MEDIA_DETACHED="hlsMediaDetached",e.BUFFER_RESET="hlsBufferReset",e.BUFFER_CODECS="hlsBufferCodecs",e.BUFFER_CREATED="hlsBufferCreated",e.BUFFER_APPENDING="hlsBufferAppending",e.BUFFER_APPENDED="hlsBufferAppended",e.BUFFER_EOS="hlsBufferEos",e.BUFFER_FLUSHING="hlsBufferFlushing",e.BUFFER_FLUSHED="hlsBufferFlushed",e.MANIFEST_LOADING="hlsManifestLoading",e.MANIFEST_LOADED="hlsManifestLoaded",e.MANIFEST_PARSED="hlsManifestParsed",e.LEVEL_SWITCHING="hlsLevelSwitching",e.LEVEL_SWITCHED="hlsLevelSwitched",e.LEVEL_LOADING="hlsLevelLoading",e.LEVEL_LOADED="hlsLevelLoaded",e.LEVEL_UPDATED="hlsLevelUpdated",e.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",e.LEVELS_UPDATED="hlsLevelsUpdated",e.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",e.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",e.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",e.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",e.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",e.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",e.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",e.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",e.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",e.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",e.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",e.CUES_PARSED="hlsCuesParsed",e.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",e.INIT_PTS_FOUND="hlsInitPtsFound",e.FRAG_LOADING="hlsFragLoading",e.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",e.FRAG_LOADED="hlsFragLoaded",e.FRAG_DECRYPTED="hlsFragDecrypted",e.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",e.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",e.FRAG_PARSING_METADATA="hlsFragParsingMetadata",e.FRAG_PARSED="hlsFragParsed",e.FRAG_BUFFERED="hlsFragBuffered",e.FRAG_CHANGED="hlsFragChanged",e.FPS_DROP="hlsFpsDrop",e.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",e.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",e.ERROR="hlsError",e.DESTROYING="hlsDestroying",e.KEY_LOADING="hlsKeyLoading",e.KEY_LOADED="hlsKeyLoaded",e.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",e.BACK_BUFFER_REACHED="hlsBackBufferReached",e.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",e}({}),rc=function(e){return e.NETWORK_ERROR="networkError",e.MEDIA_ERROR="mediaError",e.KEY_SYSTEM_ERROR="keySystemError",e.MUX_ERROR="muxError",e.OTHER_ERROR="otherError",e}({}),ac=function(e){return e.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",e.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",e.KEY_SYSTEM_NO_SESSION="keySystemNoSession",e.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",e.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",e.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",e.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",e.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",e.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",e.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",e.MANIFEST_LOAD_ERROR="manifestLoadError",e.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",e.MANIFEST_PARSING_ERROR="manifestParsingError",e.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",e.LEVEL_EMPTY_ERROR="levelEmptyError",e.LEVEL_LOAD_ERROR="levelLoadError",e.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",e.LEVEL_PARSING_ERROR="levelParsingError",e.LEVEL_SWITCH_ERROR="levelSwitchError",e.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",e.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",e.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",e.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",e.FRAG_LOAD_ERROR="fragLoadError",e.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",e.FRAG_DECRYPT_ERROR="fragDecryptError",e.FRAG_PARSING_ERROR="fragParsingError",e.FRAG_GAP="fragGap",e.REMUX_ALLOC_ERROR="remuxAllocError",e.KEY_LOAD_ERROR="keyLoadError",e.KEY_LOAD_TIMEOUT="keyLoadTimeOut",e.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",e.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",e.BUFFER_APPEND_ERROR="bufferAppendError",e.BUFFER_APPENDING_ERROR="bufferAppendingError",e.BUFFER_STALLED_ERROR="bufferStalledError",e.BUFFER_FULL_ERROR="bufferFullError",e.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",e.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",e.INTERNAL_EXCEPTION="internalException",e.INTERNAL_ABORTED="aborted",e.UNKNOWN="unknown",e}({});const oc=function(){},nc={trace:oc,debug:oc,log:oc,warn:oc,info:oc,error:oc};let lc=nc;function dc(e,...t){t.forEach((function(t){lc[t]=e[t]?e[t].bind(e):function(e){const t=self.console[e];return t?t.bind(self.console,`[${e}] >`):oc}(t)}))}const hc=lc,cc=/^(\d+)x(\d+)$/,uc=/(.+?)=(".*?"|.*?)(?:,|$)/g;class pc{constructor(e){"string"==typeof e&&(e=pc.parseAttrList(e)),Zh(this,e)}get clientAttrs(){return Object.keys(this).filter((e=>"X-"===e.substring(0,2)))}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;const i=new Uint8Array(t.length/2);for(let e=0;e<t.length/2;e++)i[e]=parseInt(t.slice(2*e,2*e+2),16);return i}return null}hexadecimalIntegerAsNumber(e){const t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const i=this[e];return i?parseFloat(i):t}enumeratedString(e){return this[e]}bool(e){return"YES"===this[e]}decimalResolution(e){const t=cc.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e){let t;const i={};for(uc.lastIndex=0;null!==(t=uc.exec(e));){let e=t[2];0===e.indexOf('"')&&e.lastIndexOf('"')===e.length-1&&(e=e.slice(1,-1));i[t[1].trim()]=e}return i}}function fc(e){return"SCTE35-OUT"===e||"SCTE35-IN"===e}class mc{constructor(e,t){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,t){const i=t.attr;for(const t in i)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==i[t]){hc.warn(`DATERANGE tag attribute: "${t}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=t;break}e=Zh(new pc({}),i,e)}if(this.attr=e,this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const e=new Date(this.attr["END-DATE"]);ec(e.getTime())&&(this._endDate=e)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get startDate(){return this._startDate}get endDate(){if(this._endDate)return this._endDate;const e=this.duration;return null!==e?new Date(this._startDate.getTime()+1e3*e):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(ec(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isValid(){return!!this.id&&!this._badValueForSameId&&ec(this.startDate.getTime())&&(null===this.duration||this.duration>=0)&&(!this.endOnNext||!!this.class)}}class gc{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var yc="audio",Ac="video",bc="audiovideo";class vc{constructor(e){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[yc]:null,[Ac]:null,[bc]:null},this.baseurl=e}setByteRange(e,t){const i=e.split("@",2);let s;s=1===i.length?(null==t?void 0:t.byteRangeEndOffset)||0:parseInt(i[1]),this._byteRange=[s,parseInt(i[0])+s]}get byteRange(){return this._byteRange?this._byteRange:[]}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=qh.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}}class _c extends vc{constructor(e,t){super(t),this._decryptdata=null,this.rawProgramDateTime=null,this.programDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.stats=new gc,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const e=this.levelkeys.identity;if(e)this._decryptdata=e.getDecryptData(this.sn);else{const e=Object.keys(this.levelkeys);if(1===e.length)return this._decryptdata=this.levelkeys[e[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(null===this.programDateTime)return null;if(!ec(this.programDateTime))return null;const e=ec(this.duration)?this.duration:0;return this.programDateTime+1e3*e}get encrypted(){var e;if(null!=(e=this._decryptdata)&&e.encrypted)return!0;if(this.levelkeys){const e=Object.keys(this.levelkeys),t=e.length;if(t>1||1===t&&this.levelkeys[e[0]].encrypted)return!0}return!1}setKeyFormat(e){if(this.levelkeys){const t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}}abortRequests(){var e,t;null==(e=this.loader)||e.abort(),null==(t=this.keyLoader)||t.abort()}setElementaryStreamInfo(e,t,i,s,r,a=!1){const{elementaryStreams:o}=this,n=o[e];n?(n.startPTS=Math.min(n.startPTS,t),n.endPTS=Math.max(n.endPTS,i),n.startDTS=Math.min(n.startDTS,s),n.endDTS=Math.max(n.endDTS,r)):o[e]={startPTS:t,endPTS:i,startDTS:s,endDTS:r,partial:a}}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[yc]=null,e[Ac]=null,e[bc]=null}}class Sc extends vc{constructor(e,t,i,s,r){super(i),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.stats=new gc,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=s;const a=e.enumeratedString("BYTERANGE");a&&this.setByteRange(a,r),r&&(this.fragOffset=r.fragOffset+r.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}class wc{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e)return this.advanced=!0,void(this.updated=!0);const t=this.lastPartSn-e.lastPartSn,i=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!i||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||0===t&&i>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay}get hasProgramDateTime(){return!!this.fragments.length&&ec(this.fragments[this.fragments.length-1].programDateTime)}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||10}get drift(){const e=this.driftEndTime-this.driftStartTime;if(e>0){return 1e3*(this.driftEnd-this.driftStart)/e}return 1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){var e;return null!=(e=this.fragments)&&e.length?this.fragments[this.fragments.length-1].end:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].index:-1}get lastPartSn(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}function Ec(e){return Uint8Array.from(atob(e),(e=>e.charCodeAt(0)))}function Tc(e){const t=e.split(":");let i=null;if("data"===t[0]&&2===t.length){const e=t[1].split(";"),s=e[e.length-1].split(",");if(2===s.length){const t="base64"===s[0],r=s[1];t?(e.splice(-1,1),i=Ec(r)):i=function(e){const t=kc(e).subarray(0,16),i=new Uint8Array(16);return i.set(t,16-t.length),i}(r)}}return i}function kc(e){return Uint8Array.from(unescape(encodeURIComponent(e)),(e=>e.charCodeAt(0)))}const Cc="undefined"!=typeof self?self:void 0;var xc={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},Rc="org.w3.clearkey",Dc="com.apple.streamingkeydelivery",Lc="com.microsoft.playready",Pc="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";function Bc(e){switch(e){case Dc:return xc.FAIRPLAY;case Lc:return xc.PLAYREADY;case Pc:return xc.WIDEVINE;case Rc:return xc.CLEARKEY}}var Ic="edef8ba979d64acea3c827dcd51d21ed";function Mc(e){switch(e){case xc.FAIRPLAY:return Dc;case xc.PLAYREADY:return Lc;case xc.WIDEVINE:return Pc;case xc.CLEARKEY:return Rc}}function Uc(e){const{drmSystems:t,widevineLicenseUrl:i}=e,s=t?[xc.FAIRPLAY,xc.WIDEVINE,xc.PLAYREADY,xc.CLEARKEY].filter((e=>!!t[e])):[];return!s[xc.WIDEVINE]&&i&&s.push(xc.WIDEVINE),s}const Fc=null!=Cc&&null!=(Oc=Cc.navigator)&&Oc.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null;var Oc;function Nc(e,t,i){return Uint8Array.prototype.slice?e.slice(t,i):new Uint8Array(Array.prototype.slice.call(e,t,i))}const jc=(e,t)=>t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128,zc=(e,t)=>t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128,Gc=(e,t)=>{const i=t;let s=0;for(;jc(e,t);){s+=10;s+=Hc(e,t+6),zc(e,t+10)&&(s+=10),t+=s}if(s>0)return e.subarray(i,i+s)},Hc=(e,t)=>{let i=0;return i=(127&e[t])<<21,i|=(127&e[t+1])<<14,i|=(127&e[t+2])<<7,i|=127&e[t+3],i},Vc=(e,t)=>jc(e,t)&&Hc(e,t+6)+10<=e.length-t,$c=e=>{const t=qc(e);for(let e=0;e<t.length;e++){const i=t[e];if(Wc(i))return Zc(i)}},Wc=e=>e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info,Jc=e=>{const t=String.fromCharCode(e[0],e[1],e[2],e[3]),i=Hc(e,4);return{type:t,size:i,data:e.subarray(10,10+i)}},qc=e=>{let t=0;const i=[];for(;jc(e,t);){const s=Hc(e,t+6);t+=10;const r=t+s;for(;t+8<r;){const s=Jc(e.subarray(t)),r=Kc(s);r&&i.push(r),t+=s.size+10}zc(e,t)&&(t+=10)}return i},Kc=e=>"PRIV"===e.type?Yc(e):"W"===e.type[0]?Xc(e):Qc(e),Yc=e=>{if(e.size<2)return;const t=eu(e.data,!0),i=new Uint8Array(e.data.subarray(t.length+1));return{key:e.type,info:t,data:i.buffer}},Qc=e=>{if(e.size<2)return;if("TXXX"===e.type){let t=1;const i=eu(e.data.subarray(t),!0);t+=i.length+1;const s=eu(e.data.subarray(t));return{key:e.type,info:i,data:s}}const t=eu(e.data.subarray(1));return{key:e.type,data:t}},Xc=e=>{if("WXXX"===e.type){if(e.size<2)return;let t=1;const i=eu(e.data.subarray(t),!0);t+=i.length+1;const s=eu(e.data.subarray(t));return{key:e.type,info:i,data:s}}const t=eu(e.data);return{key:e.type,data:t}},Zc=e=>{if(8===e.data.byteLength){const t=new Uint8Array(e.data),i=1&t[3];let s=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return s/=45,i&&(s+=47721858.84),Math.round(s)}},eu=(e,t=!1)=>{const i=iu();if(i){const s=i.decode(e);if(t){const e=s.indexOf("\0");return-1!==e?s.substring(0,e):s}return s.replace(/\0/g,"")}const s=e.length;let r,a,o,n="",l=0;for(;l<s;){if(r=e[l++],0===r&&t)return n;if(0!==r&&3!==r)switch(r>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:n+=String.fromCharCode(r);break;case 12:case 13:a=e[l++],n+=String.fromCharCode((31&r)<<6|63&a);break;case 14:a=e[l++],o=e[l++],n+=String.fromCharCode((15&r)<<12|(63&a)<<6|(63&o)<<0)}}return n};let tu;function iu(){if(!navigator.userAgent.includes("PlayStation 4"))return tu||void 0===self.TextDecoder||(tu=new self.TextDecoder("utf-8")),tu}const su=function(e){let t="";for(let i=0;i<e.length;i++){let s=e[i].toString(16);s.length<2&&(s="0"+s),t+=s}return t},ru=Math.pow(2,32)-1,au=[].push,ou={video:1,audio:2,id3:3,text:4};function nu(e){return String.fromCharCode.apply(null,e)}function lu(e,t){const i=e[t]<<8|e[t+1];return i<0?65536+i:i}function du(e,t){const i=cu(e,t);return i<0?4294967296+i:i}function hu(e,t){let i=du(e,t);return i*=Math.pow(2,32),i+=du(e,t+4),i}function cu(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function uu(e,t,i){e[t]=i>>24,e[t+1]=i>>16&255,e[t+2]=i>>8&255,e[t+3]=255&i}function pu(e,t){const i=[];if(!t.length)return i;const s=e.byteLength;for(let r=0;r<s;){const a=du(e,r),o=a>1?r+a:s;if(nu(e.subarray(r+4,r+8))===t[0])if(1===t.length)i.push(e.subarray(r+8,o));else{const s=pu(e.subarray(r+8,o),t.slice(1));s.length&&au.apply(i,s)}r=o}return i}function fu(e){const t=[],i=e[0];let s=8;const r=du(e,s);s+=4;let a=0,o=0;0===i?(a=du(e,s),o=du(e,s+4),s+=8):(a=hu(e,s),o=hu(e,s+8),s+=16),s+=2;let n=e.length+o;const l=lu(e,s);s+=2;for(let i=0;i<l;i++){let i=s;const a=du(e,i);i+=4;const o=2147483647&a;if(1===(2147483648&a)>>>31)return hc.warn("SIDX has hierarchical references (not supported)"),null;const l=du(e,i);i+=4,t.push({referenceSize:o,subsegmentDuration:l,info:{duration:l/r,start:n,end:n+o-1}}),n+=o,i+=4,s=i}return{earliestPresentationTime:a,timescale:r,version:i,referencesCount:l,references:t}}function mu(e){const t=[],i=pu(e,["moov","trak"]);for(let e=0;e<i.length;e++){const s=i[e],r=pu(s,["tkhd"])[0];if(r){let e=r[0];const i=du(r,0===e?12:20),a=pu(s,["mdia","mdhd"])[0];if(a){e=a[0];const r=du(a,0===e?12:20),o=pu(s,["mdia","hdlr"])[0];if(o){const e=nu(o.subarray(8,12)),a={soun:yc,vide:Ac}[e];if(a){const e=gu(pu(s,["mdia","minf","stbl","stsd"])[0]);t[i]={timescale:r,type:a},t[a]=Yh({timescale:r,id:i},e)}}}}}return pu(e,["moov","mvex","trex"]).forEach((e=>{const i=du(e,4),s=t[i];s&&(s.default={duration:du(e,12),flags:du(e,20)})})),t}function gu(e){const t=e.subarray(8),i=t.subarray(86),s=nu(t.subarray(4,8));let r=s;const a="enca"===s||"encv"===s;if(a){const e=pu(t,[s])[0];pu(e.subarray("enca"===s?28:78),["sinf"]).forEach((e=>{const t=pu(e,["schm"])[0];if(t){const i=nu(t.subarray(4,8));if("cbcs"===i||"cenc"===i){const t=pu(e,["frma"])[0];t&&(r=nu(t))}}}))}switch(r){case"avc1":case"avc2":case"avc3":case"avc4":{const e=pu(i,["avcC"])[0];r+="."+Au(e[1])+Au(e[2])+Au(e[3]);break}case"mp4a":{const e=pu(t,[s])[0],i=pu(e.subarray(28),["esds"])[0];if(i&&i.length>12){let e=4;if(3!==i[e++])break;e=yu(i,e),e+=2;const t=i[e++];if(128&t&&(e+=2),64&t&&(e+=i[e++]),4!==i[e++])break;e=yu(i,e);const s=i[e++];if(64!==s)break;if(r+="."+Au(s),e+=12,5!==i[e++])break;e=yu(i,e);const a=i[e++];let o=(248&a)>>3;31===o&&(o+=1+((7&a)<<3)+((224&i[e])>>5)),r+="."+o}break}case"hvc1":case"hev1":{const e=pu(i,["hvcC"])[0],t=e[1],s=["","A","B","C"][t>>6],a=31&t,o=du(e,2),n=(32&t)>>5?"H":"L",l=e[12],d=e.subarray(6,12);r+="."+s+a,r+="."+o.toString(16).toUpperCase(),r+="."+n+l;let h="";for(let e=d.length;e--;){const t=d[e];if(t||h){h="."+t.toString(16).toUpperCase()+h}}r+=h;break}case"dvh1":case"dvhe":{const e=pu(i,["dvcC"])[0],t=e[2]>>1&127,s=e[2]<<5&32|e[3]>>3&31;r+="."+bu(t)+"."+bu(s);break}case"vp09":{const e=pu(i,["vpcC"])[0],t=e[4],s=e[5],a=e[6]>>4&15;r+="."+bu(t)+"."+bu(s)+"."+bu(a);break}case"av01":{const e=pu(i,["av1C"])[0],t=e[1]>>>5,s=31&e[1],a=e[2]>>>7?"H":"M",o=(64&e[2])>>6,n=(32&e[2])>>5,l=2===t&&o?n?12:10:o?10:8,d=(16&e[2])>>4,h=(8&e[2])>>3,c=(4&e[2])>>2,u=3&e[2],p=1,f=1,m=1,g=0;r+="."+t+"."+bu(s)+a+"."+bu(l)+"."+d+"."+h+c+u+"."+bu(p)+"."+bu(f)+"."+bu(m)+"."+g;break}}return{codec:r,encrypted:a}}function yu(e,t){const i=t+5;for(;128&e[t++]&&t<i;);return t}function Au(e){return("0"+e.toString(16).toUpperCase()).slice(-2)}function bu(e){return(e<10?"0":"")+e}function vu(e){const t=pu(e,["schm"])[0];if(t){const i=nu(t.subarray(4,8));if("cbcs"===i||"cenc"===i)return pu(e,["schi","tenc"])[0]}return hc.error("[eme] missing 'schm' box"),null}function _u(e){const t=du(e,0);let i=8;1&t&&(i+=4),4&t&&(i+=4);let s=0;const r=du(e,4);for(let a=0;a<r;a++){if(256&t){s+=du(e,i),i+=4}512&t&&(i+=4),1024&t&&(i+=4),2048&t&&(i+=4)}return s}function Su(e,t){const i=new Uint8Array(e.length+t.length);return i.set(e),i.set(t,e.length),i}function wu(e,t){const i=[],s=t.samples,r=t.timescale,a=t.id;let o=!1;return pu(s,["moof"]).map((n=>{const l=n.byteOffset-8;pu(n,["traf"]).map((n=>{const d=pu(n,["tfdt"]).map((e=>{const t=e[0];let i=du(e,4);return 1===t&&(i*=Math.pow(2,32),i+=du(e,8)),i/r}))[0];return void 0!==d&&(e=d),pu(n,["tfhd"]).map((d=>{const h=du(d,4),c=16777215&du(d,0);let u=0;const p=0!=(16&c);let f=0;const m=0!=(32&c);let g=8;h===a&&(0!=(1&c)&&(g+=8),0!=(2&c)&&(g+=4),0!=(8&c)&&(u=du(d,g),g+=4),p&&(f=du(d,g),g+=4),m&&(g+=4),"video"===t.type&&(o=function(e){if(!e)return!1;const t=e.indexOf("."),i=t<0?e:e.substring(0,t);return"hvc1"===i||"hev1"===i||"dvh1"===i||"dvhe"===i}(t.codec)),pu(n,["trun"]).map((a=>{const n=a[0],d=16777215&du(a,0),h=0!=(1&d);let c=0;const p=0!=(4&d),m=0!=(256&d);let g=0;const y=0!=(512&d);let A=0;const b=0!=(1024&d),v=0!=(2048&d);let _=0;const S=du(a,4);let w=8;h&&(c=du(a,w),w+=4),p&&(w+=4);let E=c+l;for(let l=0;l<S;l++){if(m?(g=du(a,w),w+=4):g=u,y?(A=du(a,w),w+=4):A=f,b&&(w+=4),v&&(_=0===n?du(a,w):cu(a,w),w+=4),t.type===Ac){let t=0;for(;t<A;){const a=du(s,E);if(E+=4,Eu(o,s[E])){Tu(s.subarray(E,E+a),o?2:1,e+_/r,i)}E+=a,t+=a+4}}e+=g/r}})))}))}))})),i}function Eu(e,t){if(e){const e=t>>1&63;return 39===e||40===e}return 6===(31&t)}function Tu(e,t,i,s){const r=ku(e);let a=0;a+=t;let o=0,n=0,l=0;for(;a<r.length;){o=0;do{if(a>=r.length)break;l=r[a++],o+=l}while(255===l);n=0;do{if(a>=r.length)break;l=r[a++],n+=l}while(255===l);const e=r.length-a;let t=a;if(n<e)a+=n;else if(n>e){hc.error(`Malformed SEI payload. ${n} is too small, only ${e} bytes left to parse.`);break}if(4===o){if(181===r[t++]){const e=lu(r,t);if(t+=2,49===e){const e=du(r,t);if(t+=4,1195456820===e){const e=r[t++];if(3===e){const a=r[t++],n=31&a,l=64&a,d=l?2+3*n:0,h=new Uint8Array(d);if(l){h[0]=a;for(let e=1;e<d;e++)h[e]=r[t++]}s.push({type:e,payloadType:o,pts:i,bytes:h})}}}}}else if(5===o&&n>16){const e=[];for(let i=0;i<16;i++){const s=r[t++].toString(16);e.push(1==s.length?"0"+s:s),3!==i&&5!==i&&7!==i&&9!==i||e.push("-")}const a=n-16,l=new Uint8Array(a);for(let e=0;e<a;e++)l[e]=r[t++];s.push({payloadType:o,pts:i,uuid:e.join(""),userData:eu(l),userDataBytes:l})}}}function ku(e){const t=e.byteLength,i=[];let s=1;for(;s<t-2;)0===e[s]&&0===e[s+1]&&3===e[s+2]?(i.push(s+2),s+=2):s++;if(0===i.length)return e;const r=t-i.length,a=new Uint8Array(r);let o=0;for(s=0;s<r;o++,s++)o===i[0]&&(o++,i.shift()),a[s]=e[o];return a}function Cu(e,t,i){if(16!==e.byteLength)throw new RangeError("Invalid system id");let s,r,a;if(t){s=1,r=new Uint8Array(16*t.length);for(let e=0;e<t.length;e++){const i=t[e];if(16!==i.byteLength)throw new RangeError("Invalid key");r.set(i,16*e)}}else s=0,r=new Uint8Array;s>0?(a=new Uint8Array(4),t.length>0&&new DataView(a.buffer).setUint32(0,t.length,!1)):a=new Uint8Array;const o=new Uint8Array(4);return i&&i.byteLength>0&&new DataView(o.buffer).setUint32(0,i.byteLength,!1),function(e,...t){const i=t.length;let s=8,r=i;for(;r--;)s+=t[r].byteLength;const a=new Uint8Array(s);for(a[0]=s>>24&255,a[1]=s>>16&255,a[2]=s>>8&255,a[3]=255&s,a.set(e,4),r=0,s=8;r<i;r++)a.set(t[r],s),s+=t[r].byteLength;return a}([112,115,115,104],new Uint8Array([s,0,0,0]),e,a,r,o,i||new Uint8Array)}let xu={};class Ru{static clearKeyUriToKeyIdMap(){xu={}}constructor(e,t,i,s=[1],r=null){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=i,this.keyFormatVersions=s,this.iv=r,this.encrypted=!!e&&"NONE"!==e,this.isCommonEncryption=this.encrypted&&"AES-128"!==e}isSupported(){if(this.method){if("AES-128"===this.method||"NONE"===this.method)return!0;if("identity"===this.keyFormat)return"SAMPLE-AES"===this.method;switch(this.keyFormat){case Dc:case Pc:case Lc:case Rc:return-1!==["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)}}return!1}getDecryptData(e){if(!this.encrypted||!this.uri)return null;if("AES-128"===this.method&&this.uri&&!this.iv){"number"!=typeof e&&("AES-128"!==this.method||this.iv||hc.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const t=function(e){const t=new Uint8Array(16);for(let i=12;i<16;i++)t[i]=e>>8*(15-i)&255;return t}(e);return new Ru(this.method,this.uri,"identity",this.keyFormatVersions,t)}const t=Tc(this.uri);if(t)switch(this.keyFormat){case Pc:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case Lc:{const e=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=Cu(e,null,t);const i=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2),s=String.fromCharCode.apply(null,Array.from(i)),r=s.substring(s.indexOf("<"),s.length),a=(new DOMParser).parseFromString(r,"text/xml").getElementsByTagName("KID")[0];if(a){const e=a.childNodes[0]?a.childNodes[0].nodeValue:a.getAttribute("VALUE");if(e){const t=Ec(e).subarray(0,16);!function(e){const t=function(e,t,i){const s=e[t];e[t]=e[i],e[i]=s};t(e,0,3),t(e,1,2),t(e,4,5),t(e,6,7)}(t),this.keyId=t}}break}default:{let e=t.subarray(0,16);if(16!==e.length){const t=new Uint8Array(16);t.set(e,16-e.length),e=t}this.keyId=e;break}}if(!this.keyId||16!==this.keyId.byteLength){let e=xu[this.uri];if(!e){const t=Object.keys(xu).length%Number.MAX_SAFE_INTEGER;e=new Uint8Array(16);new DataView(e.buffer,12,4).setUint32(0,t),xu[this.uri]=e}this.keyId=e}return this}}const Du=/\{\$([a-zA-Z0-9-_]+)\}/g;function Lu(e){return Du.test(e)}function Pu(e,t,i){if(null!==e.variableList||e.hasVariableRefs)for(let s=i.length;s--;){const r=i[s],a=t[r];a&&(t[r]=Bu(e,a))}}function Bu(e,t){if(null!==e.variableList||e.hasVariableRefs){const i=e.variableList;return t.replace(Du,(t=>{const s=t.substring(2,t.length-1),r=null==i?void 0:i[s];return void 0===r?(e.playlistParsingError||(e.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${s}"`)),t):r}))}return t}function Iu(e,t,i){let s,r,a=e.variableList;if(a||(e.variableList=a={}),"QUERYPARAM"in t){s=t.QUERYPARAM;try{const e=new self.URL(i).searchParams;if(!e.has(s))throw new Error(`"${s}" does not match any query parameter in URI: "${i}"`);r=e.get(s)}catch(t){e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${t.message}`))}}else s=t.NAME,r=t.VALUE;s in a?e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${s}"`)):a[s]=r||""}function Mu(e,t,i){const s=t.IMPORT;if(i&&s in i){let t=e.variableList;t||(e.variableList=t={}),t[s]=i[s]}else e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${s}"`))}function Uu(e=!0){if("undefined"==typeof self)return;return(e||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}const Fu={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function Ou(e,t,i=!0){return!e.split(",").some((e=>!Nu(e,t,i)))}function Nu(e,t,i=!0){var s;const r=Uu(i);return null!=(s=null==r?void 0:r.isTypeSupported(ju(e,t)))&&s}function ju(e,t){return`${t}/mp4;codecs="${e}"`}function zu(e){if(e){const t=e.substring(0,4);return Fu.video[t]}return 2}function Gu(e){return e.split(",").reduce(((e,t)=>{const i=Fu.video[t];return i?(2*i+e)/(e?3:2):(Fu.audio[t]+e)/(e?2:1)}),0)}const Hu={};const Vu=/flac|opus/i;function $u(e,t=!0){return e.replace(Vu,(e=>function(e,t=!0){if(Hu[e])return Hu[e];const i={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"]}[e];for(let s=0;s<i.length;s++)if(Nu(i[s],"audio",t))return Hu[e]=i[s],i[s];return e}(e.toLowerCase(),t)))}function Wu(e,t){return e&&"mp4a"!==e?e:t}const Ju=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,qu=/#EXT-X-MEDIA:(.*)/g,Ku=/^#EXT(?:INF|-X-TARGETDURATION):/m,Yu=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),Qu=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class Xu{static findGroup(e,t){for(let i=0;i<e.length;i++){const s=e[i];if(s.id===t)return s}}static resolve(e,t){return qh.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return Ku.test(e)}static parseMasterPlaylist(e,t){const i={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:Lu(e)},s=[];let r;for(Ju.lastIndex=0;null!=(r=Ju.exec(e));)if(r[1]){var a;const e=new pc(r[1]);Pu(i,e,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);const o=Bu(i,r[2]),n={attrs:e,bitrate:e.decimalInteger("BANDWIDTH")||e.decimalInteger("AVERAGE-BANDWIDTH"),name:e.NAME,url:Xu.resolve(o,t)},l=e.decimalResolution("RESOLUTION");l&&(n.width=l.width,n.height=l.height),tp(e.CODECS,n),null!=(a=n.unknownCodecs)&&a.length||s.push(n),i.levels.push(n)}else if(r[3]){const e=r[3],s=r[4];switch(e){case"SESSION-DATA":{const e=new pc(s);Pu(i,e,["DATA-ID","LANGUAGE","VALUE","URI"]);const t=e["DATA-ID"];t&&(null===i.sessionData&&(i.sessionData={}),i.sessionData[t]=e);break}case"SESSION-KEY":{const e=Zu(s,t,i);e.encrypted&&e.isSupported()?(null===i.sessionKeys&&(i.sessionKeys=[]),i.sessionKeys.push(e)):hc.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${s}"`);break}case"DEFINE":{const e=new pc(s);Pu(i,e,["NAME","VALUE","QUERYPARAM"]),Iu(i,e,t)}break;case"CONTENT-STEERING":{const e=new pc(s);Pu(i,e,["SERVER-URI","PATHWAY-ID"]),i.contentSteering={uri:Xu.resolve(e["SERVER-URI"],t),pathwayId:e["PATHWAY-ID"]||"."};break}case"START":i.startTimeOffset=ep(s)}}const o=s.length>0&&s.length<i.levels.length;return i.levels=o?s:i.levels,0===i.levels.length&&(i.playlistParsingError=new Error("no levels found in manifest")),i}static parseMasterPlaylistMedia(e,t,i){let s;const r={},a=i.levels,o={AUDIO:a.map((e=>({id:e.attrs.AUDIO,audioCodec:e.audioCodec}))),SUBTITLES:a.map((e=>({id:e.attrs.SUBTITLES,textCodec:e.textCodec}))),"CLOSED-CAPTIONS":[]};let n=0;for(qu.lastIndex=0;null!==(s=qu.exec(e));){const e=new pc(s[1]),a=e.TYPE;if(a){const s=o[a],l=r[a]||[];r[a]=l,Pu(i,e,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const d=e.LANGUAGE,h=e["ASSOC-LANGUAGE"],c=e.CHANNELS,u=e.CHARACTERISTICS,p=e["INSTREAM-ID"],f={attrs:e,bitrate:0,id:n++,groupId:e["GROUP-ID"]||"",name:e.NAME||d||"",type:a,default:e.bool("DEFAULT"),autoselect:e.bool("AUTOSELECT"),forced:e.bool("FORCED"),lang:d,url:e.URI?Xu.resolve(e.URI,t):""};if(h&&(f.assocLang=h),c&&(f.channels=c),u&&(f.characteristics=u),p&&(f.instreamId=p),null!=s&&s.length){const e=Xu.findGroup(s,f.groupId)||s[0];ip(f,e,"audioCodec"),ip(f,e,"textCodec")}l.push(f)}}return r}static parseLevelPlaylist(e,t,i,s,r,a){const o=new wc(t),n=o.fragments;let l,d,h,c=null,u=0,p=0,f=0,m=0,g=null,y=new _c(s,t),A=-1,b=!1,v=null;for(Yu.lastIndex=0,o.m3u8=e,o.hasVariableRefs=Lu(e);null!==(l=Yu.exec(e));){b&&(b=!1,y=new _c(s,t),y.start=f,y.sn=u,y.cc=m,y.level=i,c&&(y.initSegment=c,y.rawProgramDateTime=c.rawProgramDateTime,c.rawProgramDateTime=null,v&&(y.setByteRange(v),v=null)));const e=l[1];if(e){y.duration=parseFloat(e);const t=(" "+l[2]).slice(1);y.title=t||null,y.tagList.push(t?["INF",e,t]:["INF",e])}else if(l[3]){if(ec(y.duration)){y.start=f,h&&ap(y,h,o),y.sn=u,y.level=i,y.cc=m,n.push(y);const e=(" "+l[3]).slice(1);y.relurl=Bu(o,e),sp(y,g),g=y,f+=y.duration,u++,p=0,b=!0}}else if(l[4]){const e=(" "+l[4]).slice(1);g?y.setByteRange(e,g):y.setByteRange(e)}else if(l[5])y.rawProgramDateTime=(" "+l[5]).slice(1),y.tagList.push(["PROGRAM-DATE-TIME",y.rawProgramDateTime]),-1===A&&(A=n.length);else{if(l=l[0].match(Qu),!l){hc.warn("No matches on slow regex match for level playlist!");continue}for(d=1;d<l.length&&void 0===l[d];d++);const e=(" "+l[d]).slice(1),r=(" "+l[d+1]).slice(1),f=l[d+2]?(" "+l[d+2]).slice(1):"";switch(e){case"PLAYLIST-TYPE":o.type=r.toUpperCase();break;case"MEDIA-SEQUENCE":u=o.startSN=parseInt(r);break;case"SKIP":{const e=new pc(r);Pu(o,e,["RECENTLY-REMOVED-DATERANGES"]);const t=e.decimalInteger("SKIPPED-SEGMENTS");if(ec(t)){o.skippedSegments=t;for(let e=t;e--;)n.unshift(null);u+=t}const i=e.enumeratedString("RECENTLY-REMOVED-DATERANGES");i&&(o.recentlyRemovedDateranges=i.split("\t"));break}case"TARGETDURATION":o.targetduration=Math.max(parseInt(r),1);break;case"VERSION":o.version=parseInt(r);break;case"INDEPENDENT-SEGMENTS":case"EXTM3U":break;case"ENDLIST":o.live=!1;break;case"#":(r||f)&&y.tagList.push(f?[r,f]:[r]);break;case"DISCONTINUITY":m++,y.tagList.push(["DIS"]);break;case"GAP":y.gap=!0,y.tagList.push([e]);break;case"BITRATE":y.tagList.push([e,r]);break;case"DATERANGE":{const e=new pc(r);Pu(o,e,["ID","CLASS","START-DATE","END-DATE","SCTE35-CMD","SCTE35-OUT","SCTE35-IN"]),Pu(o,e,e.clientAttrs);const t=new mc(e,o.dateRanges[e.ID]);t.isValid||o.skippedSegments?o.dateRanges[t.id]=t:hc.warn(`Ignoring invalid DATERANGE tag: "${r}"`),y.tagList.push(["EXT-X-DATERANGE",r]);break}case"DEFINE":{const e=new pc(r);Pu(o,e,["NAME","VALUE","IMPORT","QUERYPARAM"]),"IMPORT"in e?Mu(o,e,a):Iu(o,e,t)}break;case"DISCONTINUITY-SEQUENCE":m=parseInt(r);break;case"KEY":{const e=Zu(r,t,o);if(e.isSupported()){if("NONE"===e.method){h=void 0;break}h||(h={}),h[e.keyFormat]&&(h=Zh({},h)),h[e.keyFormat]=e}else hc.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${r}"`);break}case"START":o.startTimeOffset=ep(r);break;case"MAP":{const e=new pc(r);if(Pu(o,e,["BYTERANGE","URI"]),y.duration){const r=new _c(s,t);rp(r,e,i,h),c=r,y.initSegment=c,c.rawProgramDateTime&&!y.rawProgramDateTime&&(y.rawProgramDateTime=c.rawProgramDateTime)}else{const t=y.byteRangeEndOffset;if(t){const e=y.byteRangeStartOffset;v=`${t-e}@${e}`}else v=null;rp(y,e,i,h),c=y,b=!0}break}case"SERVER-CONTROL":{const e=new pc(r);o.canBlockReload=e.bool("CAN-BLOCK-RELOAD"),o.canSkipUntil=e.optionalFloat("CAN-SKIP-UNTIL",0),o.canSkipDateRanges=o.canSkipUntil>0&&e.bool("CAN-SKIP-DATERANGES"),o.partHoldBack=e.optionalFloat("PART-HOLD-BACK",0),o.holdBack=e.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const e=new pc(r);o.partTarget=e.decimalFloatingPoint("PART-TARGET");break}case"PART":{let e=o.partList;e||(e=o.partList=[]);const i=p>0?e[e.length-1]:void 0,s=p++,a=new pc(r);Pu(o,a,["BYTERANGE","URI"]);const n=new Sc(a,y,t,s,i);e.push(n),y.duration+=n.duration;break}case"PRELOAD-HINT":{const e=new pc(r);Pu(o,e,["URI"]),o.preloadHint=e;break}case"RENDITION-REPORT":{const e=new pc(r);Pu(o,e,["URI"]),o.renditionReports=o.renditionReports||[],o.renditionReports.push(e);break}default:hc.warn(`line parsed but not handled: ${l}`)}}}g&&!g.relurl?(n.pop(),f-=g.duration,o.partList&&(o.fragmentHint=g)):o.partList&&(sp(y,g),y.cc=m,o.fragmentHint=y,h&&ap(y,h,o));const _=n.length,S=n[0],w=n[_-1];if(f+=o.skippedSegments*o.targetduration,f>0&&_&&w){o.averagetargetduration=f/_;const e=w.sn;o.endSN="initSegment"!==e?e:0,o.live||(w.endList=!0),S&&(o.startCC=S.cc)}else o.endSN=0,o.startCC=0;return o.fragmentHint&&(f+=o.fragmentHint.duration),o.totalduration=f,o.endCC=m,A>0&&function(e,t){let i=e[t];for(let s=t;s--;){const t=e[s];if(!t)return;t.programDateTime=i.programDateTime-1e3*t.duration,i=t}}(n,A),o}}function Zu(e,t,i){var s,r;const a=new pc(e);Pu(i,a,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]);const o=null!=(s=a.METHOD)?s:"",n=a.URI,l=a.hexadecimalInteger("IV"),d=a.KEYFORMATVERSIONS,h=null!=(r=a.KEYFORMAT)?r:"identity";n&&a.IV&&!l&&hc.error(`Invalid IV: ${a.IV}`);const c=n?Xu.resolve(n,t):"",u=(d||"1").split("/").map(Number).filter(Number.isFinite);return new Ru(o,c,h,u,l)}function ep(e){const t=new pc(e).decimalFloatingPoint("TIME-OFFSET");return ec(t)?t:null}function tp(e,t){let i=(e||"").split(/[ ,]+/).filter((e=>e));["video","audio","text"].forEach((e=>{const s=i.filter((t=>function(e,t){const i=Fu[t];return!!i&&!!i[e.slice(0,4)]}(t,e)));s.length&&(t[`${e}Codec`]=s.join(","),i=i.filter((e=>-1===s.indexOf(e))))})),t.unknownCodecs=i}function ip(e,t,i){const s=t[i];s&&(e[i]=s)}function sp(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),ec(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}function rp(e,t,i,s){e.relurl=t.URI,t.BYTERANGE&&e.setByteRange(t.BYTERANGE),e.level=i,e.sn="initSegment",s&&(e.levelkeys=s),e.initSegment=null}function ap(e,t,i){e.levelkeys=t;const{encryptedFragments:s}=i;s.length&&s[s.length-1].levelkeys===t||!Object.keys(t).some((e=>t[e].isCommonEncryption))||s.push(e)}var op="manifest",np="level",lp="audioTrack",dp="subtitleTrack",hp="main",cp="audio",up="subtitle";function pp(e){const{type:t}=e;switch(t){case lp:return cp;case dp:return up;default:return hp}}function fp(e,t){let i=e.url;return void 0!==i&&0!==i.indexOf("data:")||(i=t.url),i}class mp{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(sc.LEVEL_LOADING,this.onLevelLoading,this),e.on(sc.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(sc.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}unregisterListeners(){const{hls:e}=this;e.off(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(sc.LEVEL_LOADING,this.onLevelLoading,this),e.off(sc.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(sc.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}createInternalLoader(e){const t=this.hls.config,i=t.pLoader,s=t.loader,r=new(i||s)(t);return this.loaders[e.type]=r,r}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:i}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:op,url:i,deliveryDirectives:null})}onLevelLoading(e,t){const{id:i,level:s,pathwayId:r,url:a,deliveryDirectives:o}=t;this.load({id:i,level:s,pathwayId:r,responseType:"text",type:np,url:a,deliveryDirectives:o})}onAudioTrackLoading(e,t){const{id:i,groupId:s,url:r,deliveryDirectives:a}=t;this.load({id:i,groupId:s,level:null,responseType:"text",type:lp,url:r,deliveryDirectives:a})}onSubtitleTrackLoading(e,t){const{id:i,groupId:s,url:r,deliveryDirectives:a}=t;this.load({id:i,groupId:s,level:null,responseType:"text",type:dp,url:r,deliveryDirectives:a})}load(e){var t;const i=this.hls.config;let s,r=this.getInternalLoader(e);if(r){const t=r.context;if(t&&t.url===e.url&&t.level===e.level)return void hc.trace("[playlist-loader]: playlist request ongoing");hc.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),r.abort()}if(s=e.type===op?i.manifestLoadPolicy.default:Zh({},i.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),r=this.createInternalLoader(e),ec(null==(t=e.deliveryDirectives)?void 0:t.part)){let t;if(e.type===np&&null!==e.level?t=this.hls.levels[e.level].details:e.type===lp&&null!==e.id?t=this.hls.audioTracks[e.id].details:e.type===dp&&null!==e.id&&(t=this.hls.subtitleTracks[e.id].details),t){const e=t.partTarget,i=t.targetduration;if(e&&i){const t=1e3*Math.max(3*e,.8*i);s=Zh({},s,{maxTimeToFirstByteMs:Math.min(t,s.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(t,s.maxTimeToFirstByteMs)})}}}const a=s.errorRetry||s.timeoutRetry||{},o={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:a.maxNumRetry||0,retryDelay:a.retryDelayMs||0,maxRetryDelay:a.maxRetryDelayMs||0},n={onSuccess:(e,t,i,s)=>{const r=this.getInternalLoader(i);this.resetInternalLoader(i.type);const a=e.data;0===a.indexOf("#EXTM3U")?(t.parsing.start=performance.now(),Xu.isMediaPlaylist(a)?this.handleTrackOrLevelPlaylist(e,t,i,s||null,r):this.handleMasterPlaylist(e,t,i,s)):this.handleManifestParsingError(e,i,new Error("no EXTM3U delimiter"),s||null,t)},onError:(e,t,i,s)=>{this.handleNetworkError(t,i,!1,e,s)},onTimeout:(e,t,i)=>{this.handleNetworkError(t,i,!0,void 0,e)}};r.load(e,o,n)}handleMasterPlaylist(e,t,i,s){const r=this.hls,a=e.data,o=fp(e,i),n=Xu.parseMasterPlaylist(a,o);if(n.playlistParsingError)return void this.handleManifestParsingError(e,i,n.playlistParsingError,s,t);const{contentSteering:l,levels:d,sessionData:h,sessionKeys:c,startTimeOffset:u,variableList:p}=n;this.variableList=p;const{AUDIO:f=[],SUBTITLES:m,"CLOSED-CAPTIONS":g}=Xu.parseMasterPlaylistMedia(a,o,n);if(f.length){f.some((e=>!e.url))||!d[0].audioCodec||d[0].attrs.AUDIO||(hc.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),f.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new pc({}),bitrate:0,url:""}))}r.trigger(sc.MANIFEST_LOADED,{levels:d,audioTracks:f,subtitles:m,captions:g,contentSteering:l,url:o,stats:t,networkDetails:s,sessionData:h,sessionKeys:c,startTimeOffset:u,variableList:p})}handleTrackOrLevelPlaylist(e,t,i,s,r){const a=this.hls,{id:o,level:n,type:l}=i,d=fp(e,i),h=ec(n)?n:ec(o)?o:0,c=pp(i),u=Xu.parseLevelPlaylist(e.data,d,h,c,0,this.variableList);if(l===op){const e={attrs:new pc({}),bitrate:0,details:u,name:"",url:d};a.trigger(sc.MANIFEST_LOADED,{levels:[e],audioTracks:[],url:d,stats:t,networkDetails:s,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),i.levelDetails=u,this.handlePlaylistLoaded(u,e,t,i,s,r)}handleManifestParsingError(e,t,i,s,r){this.hls.trigger(sc.ERROR,{type:rc.NETWORK_ERROR,details:ac.MANIFEST_PARSING_ERROR,fatal:t.type===op,url:e.url,err:i,error:i,reason:i.message,response:e,context:t,networkDetails:s,stats:r})}handleNetworkError(e,t,i=!1,s,r){let a=`A network ${i?"timeout":"error"+(s?" (status "+s.code+")":"")} occurred while loading ${e.type}`;e.type===np?a+=`: ${e.level} id: ${e.id}`:e.type!==lp&&e.type!==dp||(a+=` id: ${e.id} group-id: "${e.groupId}"`);const o=new Error(a);hc.warn(`[playlist-loader]: ${a}`);let n=ac.UNKNOWN,l=!1;const d=this.getInternalLoader(e);switch(e.type){case op:n=i?ac.MANIFEST_LOAD_TIMEOUT:ac.MANIFEST_LOAD_ERROR,l=!0;break;case np:n=i?ac.LEVEL_LOAD_TIMEOUT:ac.LEVEL_LOAD_ERROR,l=!1;break;case lp:n=i?ac.AUDIO_TRACK_LOAD_TIMEOUT:ac.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case dp:n=i?ac.SUBTITLE_TRACK_LOAD_TIMEOUT:ac.SUBTITLE_LOAD_ERROR,l=!1}d&&this.resetInternalLoader(e.type);const h={type:rc.NETWORK_ERROR,details:n,fatal:l,url:e.url,loader:d,context:e,error:o,networkDetails:t,stats:r};if(s){const i=(null==t?void 0:t.url)||e.url;h.response=Yh({url:i,data:void 0},s)}this.hls.trigger(sc.ERROR,h)}handlePlaylistLoaded(e,t,i,s,r,a){const o=this.hls,{type:n,level:l,id:d,groupId:h,deliveryDirectives:c}=s,u=fp(t,s),p=pp(s),f="number"==typeof s.level&&p===hp?l:void 0;if(!e.fragments.length){const e=new Error("No Segments found in Playlist");return void o.trigger(sc.ERROR,{type:rc.NETWORK_ERROR,details:ac.LEVEL_EMPTY_ERROR,fatal:!1,url:u,error:e,reason:e.message,response:t,context:s,level:f,parent:p,networkDetails:r,stats:i})}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const m=e.playlistParsingError;if(m)o.trigger(sc.ERROR,{type:rc.NETWORK_ERROR,details:ac.LEVEL_PARSING_ERROR,fatal:!1,url:u,error:m,reason:m.message,response:t,context:s,level:f,parent:p,networkDetails:r,stats:i});else switch(e.live&&a&&(a.getCacheAge&&(e.ageHeader=a.getCacheAge()||0),a.getCacheAge&&!isNaN(e.ageHeader)||(e.ageHeader=0)),n){case op:case np:o.trigger(sc.LEVEL_LOADED,{details:e,level:f||0,id:d||0,stats:i,networkDetails:r,deliveryDirectives:c});break;case lp:o.trigger(sc.AUDIO_TRACK_LOADED,{details:e,id:d||0,groupId:h||"",stats:i,networkDetails:r,deliveryDirectives:c});break;case dp:o.trigger(sc.SUBTITLE_TRACK_LOADED,{details:e,id:d||0,groupId:h||"",stats:i,networkDetails:r,deliveryDirectives:c})}}}function gp(e,t){let i;try{i=new Event("addtrack")}catch(e){i=document.createEvent("Event"),i.initEvent("addtrack",!1,!1)}i.track=e,t.dispatchEvent(i)}function yp(e,t){const i=e.mode;if("disabled"===i&&(e.mode="hidden"),e.cues&&!e.cues.getCueById(t.id))try{if(e.addCue(t),!e.cues.getCueById(t.id))throw new Error(`addCue is failed for: ${t}`)}catch(i){hc.debug(`[texttrack-utils]: ${i}`);try{const i=new self.TextTrackCue(t.startTime,t.endTime,t.text);i.id=t.id,e.addCue(i)}catch(e){hc.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${e}`)}}"disabled"===i&&(e.mode=i)}function Ap(e){const t=e.mode;if("disabled"===t&&(e.mode="hidden"),e.cues)for(let t=e.cues.length;t--;)e.removeCue(e.cues[t]);"disabled"===t&&(e.mode=t)}function bp(e,t,i,s){const r=e.mode;if("disabled"===r&&(e.mode="hidden"),e.cues&&e.cues.length>0){const r=function(e,t,i){const s=[],r=function(e,t){if(t<e[0].startTime)return 0;const i=e.length-1;if(t>e[i].endTime)return-1;let s=0,r=i;for(;s<=r;){const a=Math.floor((r+s)/2);if(t<e[a].startTime)r=a-1;else{if(!(t>e[a].startTime&&s<i))return a;s=a+1}}return e[s].startTime-t<t-e[r].startTime?s:r}(e,t);if(r>-1)for(let a=r,o=e.length;a<o;a++){const r=e[a];if(r.startTime>=t&&r.endTime<=i)s.push(r);else if(r.startTime>i)return s}return s}(e.cues,t,i);for(let t=0;t<r.length;t++)s&&!s(r[t])||e.removeCue(r[t])}"disabled"===r&&(e.mode=r)}function vp(e){const t=[];for(let i=0;i<e.length;i++){const s=e[i];"subtitles"!==s.kind&&"captions"!==s.kind||!s.label||t.push(e[i])}return t}var _p="org.id3",Sp="com.apple.quicktime.HLS",wp="https://aomedia.org/emsg/ID3";function Ep(){if("undefined"!=typeof self)return self.VTTCue||self.TextTrackCue}function Tp(e,t,i,s,r){let a=new e(t,i,"");try{a.value=s,r&&(a.type=r)}catch(o){a=new e(t,i,JSON.stringify(r?Yh({type:r},s):s))}return a}const kp=(()=>{const e=Ep();try{e&&new e(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function Cp(e,t){return e.getTime()/1e3-t}class xp{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null}_registerListeners(){const{hls:e}=this;e.on(sc.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(sc.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(sc.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(sc.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(sc.LEVEL_UPDATED,this.onLevelUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(sc.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(sc.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(sc.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(sc.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(sc.LEVEL_UPDATED,this.onLevelUpdated,this)}onMediaAttached(e,t){this.media=t.media}onMediaDetaching(){this.id3Track&&(Ap(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;t<e.length;t++){const i=e[t];if("metadata"===i.kind&&"id3"===i.label)return gp(i,this.media),i}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:i,enableID3MetadataCues:s}}}=this;if(!i&&!s)return;const{samples:r}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const a=Ep();if(a)for(let e=0;e<r.length;e++){const t=r[e].type;if(t===wp&&!i||!s)continue;const o=qc(r[e].data);if(o){const i=r[e].pts;let s=i+r[e].duration;s>kp&&(s=kp);s-i<=0&&(s=i+.25);for(let e=0;e<o.length;e++){const r=o[e];if(!Wc(r)){this.updateId3CueEnds(i,t);const e=Tp(a,i,s,r,t);e&&this.id3Track.addCue(e)}}}}}updateId3CueEnds(e,t){var i;const s=null==(i=this.id3Track)?void 0:i.cues;if(s)for(let i=s.length;i--;){const r=s[i];r.type===t&&r.startTime<e&&r.endTime===kp&&(r.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:i,type:s}){const{id3Track:r,hls:a}=this;if(!a)return;const{config:{enableEmsgMetadataCues:o,enableID3MetadataCues:n}}=a;if(r&&(o||n)){let e;e="audio"===s?e=>e.type===_p&&n:"video"===s?e=>e.type===wp&&o:e=>e.type===_p&&n||e.type===wp&&o,bp(r,t,i,e)}}onLevelUpdated(e,{details:t}){if(!this.media||!t.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{dateRangeCuesAppended:i,id3Track:s}=this,{dateRanges:r}=t,a=Object.keys(r);if(s){const e=Object.keys(i).filter((e=>!a.includes(e)));for(let t=e.length;t--;){const r=e[t];Object.keys(i[r].cues).forEach((e=>{s.removeCue(i[r].cues[e])})),delete i[r]}}const o=t.fragments[t.fragments.length-1];if(0===a.length||!ec(null==o?void 0:o.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const n=o.programDateTime/1e3-o.start,l=Ep();for(let e=0;e<a.length;e++){const t=a[e],s=r[t],o=Cp(s.startDate,n),c=i[t],u=(null==c?void 0:c.cues)||{};let p=(null==c?void 0:c.durationKnown)||!1,f=kp;const m=s.endDate;if(m)f=Cp(m,n),p=!0;else if(s.endOnNext&&!p){const e=a.reduce(((e,t)=>{if(t!==s.id){const i=r[t];if(i.class===s.class&&i.startDate>s.startDate&&(!e||s.startDate<e.startDate))return i}return e}),null);e&&(f=Cp(e.startDate,n),p=!0)}const g=Object.keys(s.attr);for(let e=0;e<g.length;e++){const i=g[e];if("ID"===(h=i)||"CLASS"===h||"START-DATE"===h||"DURATION"===h||"END-DATE"===h||"END-ON-NEXT"===h)continue;const r=u[i];if(r)p&&!c.durationKnown&&(r.endTime=f);else if(l){let e=s.attr[i];fc(i)&&(d=e,e=Uint8Array.from(d.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer);const r=Tp(l,o,f,{key:i,data:e},Sp);r&&(r.id=t,this.id3Track.addCue(r),u[i]=r)}}i[t]={cues:u,dateRange:s,durationKnown:p}}var d,h}}class Rp{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=()=>this.timeupdate(),this.hls=e,this.config=e.config,this.registerListeners()}get latency(){return this._latency||0}get maxLatency(){const{config:e,levelDetails:t}=this;return void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const{levelDetails:e}=this;if(null===e)return null;const{holdBack:t,partHoldBack:i,targetduration:s}=e,{liveSyncDuration:r,liveSyncDurationCount:a,lowLatencyMode:o}=this.config,n=this.hls.userConfig;let l=o&&i||t;(n.liveSyncDuration||n.liveSyncDurationCount||0===l)&&(l=void 0!==r?r:a*s);const d=s;return l+Math.min(1*this.stallCount,d)}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency,i=this.levelDetails;if(null===e||null===t||null===i)return null;const s=i.edge,r=e-t-this.edgeStalled,a=s-i.totalduration,o=s-(this.config.lowLatencyMode&&i.partTarget||i.targetduration);return Math.min(Math.max(a,r),o)}get drift(){const{levelDetails:e}=this;return null===e?1:e.drift}get edgeStalled(){const{levelDetails:e}=this;if(null===e)return 0;const t=3*(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e,levelDetails:t}=this;if(!e||!t)return 0;const i=e.buffered.length;return(i?e.buffered.end(i-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null}registerListeners(){this.hls.on(sc.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(sc.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(sc.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(sc.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(sc.ERROR,this.onError,this)}unregisterListeners(){this.hls.off(sc.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(sc.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(sc.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(sc.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(sc.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)}onManifestLoading(){this.levelDetails=null,this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){this.levelDetails=t,t.advanced&&this.timeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)}onError(e,t){var i;t.details===ac.BUFFER_STALLED_ERROR&&(this.stallCount++,null!=(i=this.levelDetails)&&i.live&&hc.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))}timeupdate(){const{media:e,levelDetails:t}=this;if(!e||!t)return;this.currentTime=e.currentTime;const i=this.computeLatency();if(null===i)return;this._latency=i;const{lowLatencyMode:s,maxLiveSyncPlaybackRate:r}=this.config;if(!s||1===r||!t.live)return;const a=this.targetLatency;if(null===a)return;const o=i-a;if(o<Math.min(this.maxLatency,a+t.targetduration)&&o>.05&&this.forwardBufferLength>1){const t=Math.min(2,Math.max(1,r)),i=Math.round(2/(1+Math.exp(-.75*o-this.edgeStalled))*20)/20;e.playbackRate=Math.min(t,Math.max(1,i))}else 1!==e.playbackRate&&0!==e.playbackRate&&(e.playbackRate=1)}estimateLiveEdge(){const{levelDetails:e}=this;return null===e?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return null===e?null:e-this.currentTime}}const Dp=["NONE","TYPE-0","TYPE-1",null];const Lp=["SDR","PQ","HLG"];var Pp="",Bp="YES",Ip="v2";class Mp{constructor(e,t,i){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=i}addDirectives(e){const t=new self.URL(e);return void 0!==this.msn&&t.searchParams.set("_HLS_msn",this.msn.toString()),void 0!==this.part&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class Up{constructor(e){this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter((e=>!!e)).map((e=>e.substring(0,4))).join(","),this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return Fp(this._audioGroups,e)}hasSubtitleGroup(e){return Fp(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t)if("audio"===e){let e=this._audioGroups;e||(e=this._audioGroups=[]),-1===e.indexOf(t)&&e.push(t)}else if("text"===e){let e=this._subtitleGroups;e||(e=this._subtitleGroups=[]),-1===e.indexOf(t)&&e.push(t)}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return null==(e=this.audioGroups)?void 0:e[0]}get textGroupId(){var e;return null==(e=this.subtitleGroups)?void 0:e[0]}addFallback(){}}function Fp(e,t){return!(!t||!e)&&-1!==e.indexOf(t)}function Op(e,t){const i=t.startPTS;if(ec(i)){let s,r=0;t.sn>e.sn?(r=i-e.start,s=e):(r=e.start-i,s=t),s.duration!==r&&(s.duration=r)}else if(t.sn>e.sn){e.cc===t.cc&&e.minEndPTS?t.start=e.start+(e.minEndPTS-e.start):t.start=e.start+e.duration}else t.start=Math.max(e.start-t.duration,0)}function Np(e,t,i,s,r,a){s-i<=0&&(hc.warn("Fragment should have a positive duration",t),s=i+t.duration,a=r+t.duration);let o=i,n=s;const l=t.startPTS,d=t.endPTS;if(ec(l)){const e=Math.abs(l-i);ec(t.deltaPTS)?t.deltaPTS=Math.max(e,t.deltaPTS):t.deltaPTS=e,o=Math.max(i,l),i=Math.min(i,l),r=Math.min(r,t.startDTS),n=Math.min(s,d),s=Math.max(s,d),a=Math.max(a,t.endDTS)}const h=i-t.start;0!==t.start&&(t.start=i),t.duration=s-t.start,t.startPTS=i,t.maxStartPTS=o,t.startDTS=r,t.endPTS=s,t.minEndPTS=n,t.endDTS=a;const c=t.sn;if(!e||c<e.startSN||c>e.endSN)return 0;let u;const p=c-e.startSN,f=e.fragments;for(f[p]=t,u=p;u>0;u--)Op(f[u],f[u-1]);for(u=p;u<f.length-1;u++)Op(f[u],f[u+1]);return e.fragmentHint&&Op(f[f.length-1],e.fragmentHint),e.PTSKnown=e.alignedSliding=!0,h}function jp(e,t){let i=null;const s=e.fragments;for(let e=s.length-1;e>=0;e--){const t=s[e].initSegment;if(t){i=t;break}}e.fragmentHint&&delete e.fragmentHint.endPTS;let r,a=0;if(function(e,t,i){const s=t.skippedSegments,r=Math.max(e.startSN,t.startSN)-t.startSN,a=(e.fragmentHint?1:0)+(s?t.endSN:Math.min(e.endSN,t.endSN))-t.startSN,o=t.startSN-e.startSN,n=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,l=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments;for(let e=r;e<=a;e++){const r=l[o+e];let a=n[e];s&&!a&&e<s&&(a=t.fragments[e]=r),r&&a&&i(r,a)}}(e,t,((e,s)=>{e.relurl&&(a=e.cc-s.cc),ec(e.startPTS)&&ec(e.endPTS)&&(s.start=s.startPTS=e.startPTS,s.startDTS=e.startDTS,s.maxStartPTS=e.maxStartPTS,s.endPTS=e.endPTS,s.endDTS=e.endDTS,s.minEndPTS=e.minEndPTS,s.duration=e.endPTS-e.startPTS,s.duration&&(r=s),t.PTSKnown=t.alignedSliding=!0),s.elementaryStreams=e.elementaryStreams,s.loader=e.loader,s.stats=e.stats,e.initSegment&&(s.initSegment=e.initSegment,i=e.initSegment)})),i){(t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments).forEach((e=>{var t;!e||e.initSegment&&e.initSegment.relurl!==(null==(t=i)?void 0:t.relurl)||(e.initSegment=i)}))}if(t.skippedSegments)if(t.deltaUpdateFailed=t.fragments.some((e=>!e)),t.deltaUpdateFailed){hc.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let e=t.skippedSegments;e--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}else t.canSkipDateRanges&&(t.dateRanges=function(e,t,i){const s=Zh({},e);i&&i.forEach((e=>{delete s[e]}));return Object.keys(t).forEach((e=>{const i=new mc(t[e].attr,s[e]);i.isValid?s[e]=i:hc.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${JSON.stringify(t[e].attr)}"`)})),s}(e.dateRanges,t.dateRanges,t.recentlyRemovedDateranges));const o=t.fragments;if(a){hc.warn("discontinuity sliding from playlist, take drift into account");for(let e=0;e<o.length;e++)o[e].cc+=a}t.skippedSegments&&(t.startCC=t.fragments[0].cc),function(e,t,i){if(e&&t){let s=0;for(let r=0,a=e.length;r<=a;r++){const a=e[r],o=t[r+s];a&&o&&a.index===o.index&&a.fragment.sn===o.fragment.sn?i(a,o):s--}}}(e.partList,t.partList,((e,t)=>{t.elementaryStreams=e.elementaryStreams,t.stats=e.stats})),r?Np(t,r,r.startPTS,r.endPTS,r.startDTS,r.endDTS):zp(e,t),o.length&&(t.totalduration=t.edge-o[0].start),t.driftStartTime=e.driftStartTime,t.driftStart=e.driftStart;const n=t.advancedDateTime;if(t.advanced&&n){const e=t.edge;t.driftStart||(t.driftStartTime=n,t.driftStart=e),t.driftEndTime=n,t.driftEnd=e}else t.driftEndTime=e.driftEndTime,t.driftEnd=e.driftEnd,t.advancedDateTime=e.advancedDateTime}function zp(e,t){const i=t.startSN+t.skippedSegments-e.startSN,s=e.fragments;i<0||i>=s.length||Gp(t,s[i].start)}function Gp(e,t){if(t){const i=e.fragments;for(let s=e.skippedSegments;s<i.length;s++)i[s].start+=t;e.fragmentHint&&(e.fragmentHint.start+=t)}}function Hp(e,t,i){var s;return null!=e&&e.details?Vp(null==(s=e.details)?void 0:s.partList,t,i):null}function Vp(e,t,i){if(e)for(let s=e.length;s--;){const r=e[s];if(r.index===i&&r.fragment.sn===t)return r}return null}function $p(e){e.forEach(((e,t)=>{const{details:i}=e;null!=i&&i.fragments&&i.fragments.forEach((e=>{e.level=t}))}))}function Wp(e){switch(e.details){case ac.FRAG_LOAD_TIMEOUT:case ac.KEY_LOAD_TIMEOUT:case ac.LEVEL_LOAD_TIMEOUT:case ac.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function Jp(e,t){const i=Wp(t);return e.default[(i?"timeout":"error")+"Retry"]}function qp(e,t){const i="linear"===e.backoff?1:Math.pow(2,t);return Math.min(i*e.retryDelayMs,e.maxRetryDelayMs)}function Kp(e){return Yh(Yh({},e),{errorRetry:null,timeoutRetry:null})}function Yp(e,t,i,s){if(!e)return!1;const r=null==s?void 0:s.code,a=t<e.maxNumRetry&&(function(e){return 0===e&&!1===navigator.onLine||!!e&&(e<400||e>499)}(r)||!!i);return e.shouldRetry?e.shouldRetry(e,t,i,s,a):a}const Qp=function(e,t){let i=0,s=e.length-1,r=null,a=null;for(;i<=s;){r=(i+s)/2|0,a=e[r];const o=t(a);if(o>0)i=r+1;else{if(!(o<0))return a;s=r-1}}return null};function Xp(e,t,i=0,s=0){let r=null;if(e){r=t[e.sn-t[0].sn+1]||null;const s=e.endDTS-i;s>0&&s<15e-7&&(i+=15e-7)}else 0===i&&0===t[0].start&&(r=t[0]);if(r&&(!e||e.level===r.level)&&0===Zp(i,s,r))return r;const a=Qp(t,Zp.bind(null,i,s));return!a||a===e&&r?r:a}function Zp(e=0,t=0,i){if(i.start<=e&&i.start+i.duration>e)return 0;const s=Math.min(t,i.duration+(i.deltaPTS?i.deltaPTS:0));return i.start+i.duration-s<=e?1:i.start-s>e&&i.start?-1:0}function ef(e,t,i){const s=1e3*Math.min(t,i.duration+(i.deltaPTS?i.deltaPTS:0));return(i.endProgramDateTime||0)-s>e}var tf=0,sf=2,rf=3,af=5,of=0,nf=1,lf=2;class df{constructor(e,t){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.log=void 0,this.warn=void 0,this.log=hc.log.bind(hc,`${t}:`),this.warn=hc.warn.bind(hc,`${t}:`),this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){-1!==this.timer&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.requestScheduled=-1,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t){const i=null==t?void 0:t.renditionReports;if(i){let s=-1;for(let r=0;r<i.length;r++){const a=i[r];let o;try{o=new self.URL(a.URI,t.url).href}catch(e){hc.warn(`Could not construct new URL for Rendition Report: ${e}`),o=a.URI||""}if(o===e){s=r;break}o===e.substring(0,o.length)&&(s=r)}if(-1!==s){const e=i[s],r=parseInt(e["LAST-MSN"])||(null==t?void 0:t.lastPartSn);let a=parseInt(e["LAST-PART"])||(null==t?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){const e=Math.min(t.age-t.partTarget,t.targetduration);a>=0&&e>t.partTarget&&(a+=1)}return new Mp(r,a>=0?a:void 0,Pp)}}}loadPlaylist(e){-1===this.requestScheduled&&(this.requestScheduled=self.performance.now())}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}shouldReloadPlaylist(e){return-1===this.timer&&-1===this.requestScheduled&&this.shouldLoadPlaylist(e)}playlistLoaded(e,t,i){const{details:s,stats:r}=t,a=self.performance.now(),o=r.loading.first?Math.max(0,a-r.loading.first):0;if(s.advancedDateTime=Date.now()-o,s.live||null!=i&&i.live){if(s.reloaded(i),i&&this.log(`live playlist ${e} ${s.advanced?"REFRESHED "+s.lastPartSn+"-"+s.lastPartIndex:s.updated?"UPDATED":"MISSED"}`),i&&s.fragments.length>0&&jp(i,s),!this.canLoad||!s.live)return;let o,n,l;if(s.canBlockReload&&s.endSN&&s.advanced){const e=this.hls.config.lowLatencyMode,r=s.lastPartSn,a=s.endSN,d=s.lastPartIndex,h=r===a,c=e?0:d;-1!==d?(n=h?a+1:r,l=h?c:d+1):n=a+1;const u=s.age,p=u+s.ageHeader;let f=Math.min(p-s.partTarget,1.5*s.targetduration);if(f>0){if(i&&f>i.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${i.tuneInGoal} to: ${f} with playlist age: ${s.age}`),f=0;else{const e=Math.floor(f/s.targetduration);if(n+=e,void 0!==l){l+=Math.round(f%s.targetduration/s.partTarget)}this.log(`CDN Tune-in age: ${s.ageHeader}s last advanced ${u.toFixed(2)}s goal: ${f} skip sn ${e} to part ${l}`)}s.tuneInGoal=f}if(o=this.getDeliveryDirectives(s,t.deliveryDirectives,n,l),e||!h)return void this.loadPlaylist(o)}else(s.canBlockReload||s.canSkipUntil)&&(o=this.getDeliveryDirectives(s,t.deliveryDirectives,n,l));const d=this.hls.mainForwardBufferInfo,h=d?d.end-d.len:0,c=function(e,t=1/0){let i=1e3*e.targetduration;if(e.updated){const s=e.fragments,r=4;if(s.length&&i*r>t){const e=1e3*s[s.length-1].duration;e<i&&(i=e)}}else i/=2;return Math.round(i)}(s,1e3*(s.edge-h));s.updated&&a>this.requestScheduled+c&&(this.requestScheduled=r.loading.start),void 0!==n&&s.canBlockReload?this.requestScheduled=r.loading.first+c-(1e3*s.partTarget||1e3):-1===this.requestScheduled||this.requestScheduled+c<a?this.requestScheduled=a:this.requestScheduled-a<=0&&(this.requestScheduled+=c);let u=this.requestScheduled-a;u=Math.max(0,u),this.log(`reload live playlist ${e} in ${Math.round(u)} ms`),this.timer=self.setTimeout((()=>this.loadPlaylist(o)),u)}else this.clearTimer()}getDeliveryDirectives(e,t,i,s){let r=function(e,t){const{canSkipUntil:i,canSkipDateRanges:s,endSN:r}=e;return i&&(void 0!==t?t-r:0)<i?s?Ip:Bp:Pp}(e,i);return null!=t&&t.skip&&e.deltaUpdateFailed&&(i=t.msn,s=t.part,r=Pp),new Mp(i,s,r)}checkRetry(e){const t=e.details,i=Wp(e),s=e.errorAction,{action:r,retryCount:a=0,retryConfig:o}=s||{},n=!!s&&!!o&&(r===af||!s.resolved&&r===sf);if(n){var l;if(this.requestScheduled=-1,a>=o.maxNumRetry)return!1;if(i&&null!=(l=e.context)&&l.deliveryDirectives)this.warn(`Retrying playlist loading ${a+1}/${o.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const e=qp(o,a);this.timer=self.setTimeout((()=>this.loadPlaylist()),e),this.warn(`Retrying playlist loading ${a+1}/${o.maxNumRetry} after "${t}" in ${e}ms`)}e.levelRetry=!0,s.resolved=!0}return n}}class hf{constructor(e,t=0,i=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=i}sample(e,t){const i=Math.pow(this.alpha_,e);this.estimate_=t*(1-i)+i*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class cf{constructor(e,t,i,s=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=i,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new hf(e),this.fast_=new hf(t),this.defaultTTFB_=s,this.ttfb_=new hf(e)}update(e,t){const{slow_:i,fast_:s,ttfb_:r}=this;i.halfLife!==e&&(this.slow_=new hf(e,i.getEstimate(),i.getTotalWeight())),s.halfLife!==t&&(this.fast_=new hf(t,s.getEstimate(),s.getTotalWeight())),r.halfLife!==e&&(this.ttfb_=new hf(e,r.getEstimate(),r.getTotalWeight()))}sample(e,t){const i=(e=Math.max(e,this.minDelayMs_))/1e3,s=8*t/i;this.fast_.sample(i,s),this.slow_.sample(i,s)}sampleTTFB(e){const t=e/1e3,i=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(i,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}destroy(){}}const uf={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]},pf={};function ff(e,t,i,s,r,a){const o=e.audioCodec?e.audioGroups:null,n=null==a?void 0:a.audioCodec,l=null==a?void 0:a.channels,d=l?parseInt(l):n?1/0:2;let h=null;if(null!=o&&o.length)try{h=1===o.length&&o[0]?t.groups[o[0]].channels:o.reduce(((e,i)=>{if(i){const s=t.groups[i];if(!s)throw new Error(`Audio track group ${i} not found`);Object.keys(s.channels).forEach((t=>{e[t]=(e[t]||0)+s.channels[t]}))}return e}),{2:0})}catch(e){return!0}return void 0!==e.videoCodec&&(e.width>1920&&e.height>1088||e.height>1920&&e.width>1088||e.frameRate>Math.max(s,30)||"SDR"!==e.videoRange&&e.videoRange!==i||e.bitrate>Math.max(r,8e6))||!!h&&ec(d)&&Object.keys(h).some((e=>parseInt(e)>d))}function mf(e,t,i){const s=e.videoCodec,r=e.audioCodec;if(!s||!r||!i)return Promise.resolve(uf);const a={width:e.width,height:e.height,bitrate:Math.ceil(Math.max(.9*e.bitrate,e.averageBitrate)),framerate:e.frameRate||30},o=e.videoRange;"SDR"!==o&&(a.transferFunction=o.toLowerCase());const n=s.split(",").map((e=>({type:"media-source",video:Yh(Yh({},a),{},{contentType:ju(e,"video")})})));return r&&e.audioGroups&&e.audioGroups.forEach((e=>{var i;e&&(null==(i=t.groups[e])||i.tracks.forEach((t=>{if(t.groupId===e){const e=t.channels||"",i=parseFloat(e);ec(i)&&i>2&&n.push.apply(n,r.split(",").map((e=>({type:"media-source",audio:{contentType:ju(e,"audio"),channels:""+i}}))))}})))})),Promise.all(n.map((e=>{const t=function(e){const{audio:t,video:i}=e,s=i||t;if(s){const e=s.contentType.split('"')[1];if(i)return`r${i.height}x${i.width}f${Math.ceil(i.framerate)}${i.transferFunction||"sd"}_${e}_${Math.ceil(i.bitrate/1e5)}`;if(t)return`c${t.channels}${t.spatialRendering?"s":"n"}_${e}`}return""}(e);return pf[t]||(pf[t]=i.decodingInfo(e))}))).then((e=>({supported:!e.some((e=>!e.supported)),configurations:n,decodingInfoResults:e}))).catch((e=>({supported:!1,configurations:n,decodingInfoResults:[],error:e})))}function gf(e,t){let i=!1,s=[];return e&&(i="SDR"!==e,s=[e]),t&&(s=t.allowedVideoRanges||Lp.slice(0),i=void 0!==t.preferHDR?t.preferHDR:function(){if("function"==typeof matchMedia){const e=matchMedia("(dynamic-range: high)"),t=matchMedia("bad query");if(e.media!==t.media)return!0===e.matches}return!1}(),s=i?s.filter((e=>"SDR"!==e)):["SDR"]),{preferHDR:i,allowedVideoRanges:s}}function yf(e,t){hc.log(`[abr] start candidates with "${e}" ignored because ${t}`)}function Af(e,t,i){if("attrs"in e){const i=t.indexOf(e);if(-1!==i)return i}for(let s=0;s<t.length;s++){if(bf(e,t[s],i))return s}return-1}function bf(e,t,i){const{groupId:s,name:r,lang:a,assocLang:o,characteristics:n,default:l}=e,d=e.forced;return(void 0===s||t.groupId===s)&&(void 0===r||t.name===r)&&(void 0===a||t.lang===a)&&(void 0===a||t.assocLang===o)&&(void 0===l||t.default===l)&&(void 0===d||t.forced===d)&&(void 0===n||function(e,t=""){const i=e.split(","),s=t.split(",");return i.length===s.length&&!i.some((e=>-1===s.indexOf(e)))}(n,t.characteristics))&&(void 0===i||i(e,t))}function vf(e,t){const{audioCodec:i,channels:s}=e;return!(void 0!==i&&(t.audioCodec||"").substring(0,4)!==i.substring(0,4)||void 0!==s&&s!==(t.channels||"2"))}function _f(e,t,i){for(let s=t;s;s--)if(i(e[s]))return s;for(let s=t+1;s<e.length;s++)if(i(e[s]))return s;return-1}class Sf{constructor(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}destroy(){this.onHandlerDestroying(),this.onHandlerDestroyed()}onHandlerDestroying(){this.clearNextTick(),this.clearInterval()}onHandlerDestroyed(){}hasInterval(){return!!this._tickInterval}hasNextTick(){return!!this._tickTimer}setInterval(e){return!this._tickInterval&&(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)}clearInterval(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)}clearNextTick(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)}tick(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}var wf="NOT_LOADED",Ef="APPENDING",Tf="PARTIAL",kf="OK";class Cf{constructor(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(sc.BUFFER_APPENDED,this.onBufferAppended,this),e.on(sc.FRAG_BUFFERED,this.onFragBuffered,this),e.on(sc.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(sc.BUFFER_APPENDED,this.onBufferAppended,this),e.off(sc.FRAG_BUFFERED,this.onFragBuffered,this),e.off(sc.FRAG_LOADED,this.onFragLoaded,this)}destroy(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const i=this.activePartLists[t];if(i)for(let t=i.length;t--;){const s=i[t];if(!s)break;const r=s.end;if(s.start<=e&&null!==r&&e<=r)return s}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){const{fragments:i}=this,s=Object.keys(i);for(let r=s.length;r--;){const a=i[s[r]];if((null==a?void 0:a.body.type)===t&&a.buffered){const t=a.body;if(t.start<=e&&e<=t.end)return t}}return null}detectEvictedFragments(e,t,i,s){this.timeRanges&&(this.timeRanges[e]=t);const r=(null==s?void 0:s.fragment.sn)||-1;Object.keys(this.fragments).forEach((s=>{const a=this.fragments[s];if(!a)return;if(r>=a.body.sn)return;if(!a.buffered&&!a.loaded)return void(a.body.type===i&&this.removeFragment(a.body));const o=a.range[e];o&&o.time.some((e=>{const i=!this.isTimeBuffered(e.startPTS,e.endPTS,t);return i&&this.removeFragment(a.body),i}))}))}detectPartialFragments(e){const t=this.timeRanges,{frag:i,part:s}=e;if(!t||"initSegment"===i.sn)return;const r=Rf(i),a=this.fragments[r];if(!a||a.buffered&&i.gap)return;const o=!i.relurl;if(Object.keys(t).forEach((e=>{const r=i.elementaryStreams[e];if(!r)return;const n=t[e],l=o||!0===r.partial;a.range[e]=this.getBufferedTimes(i,s,l,n)})),a.loaded=null,Object.keys(a.range).length){a.buffered=!0;(a.body.endList=i.endList||a.body.endList)&&(this.endListFragments[a.body.type]=a),xf(a)||this.removeParts(i.sn-1,i.type)}else this.removeFragment(a.body)}removeParts(e,t){const i=this.activePartLists[t];i&&(this.activePartLists[t]=i.filter((t=>t.fragment.sn>=e)))}fragBuffered(e,t){const i=Rf(e);let s=this.fragments[i];!s&&t&&(s=this.fragments[i]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),s&&(s.loaded=null,s.buffered=!0)}getBufferedTimes(e,t,i,s){const r={time:[],partial:i},a=e.start,o=e.end,n=e.minEndPTS||o,l=e.maxStartPTS||a;for(let e=0;e<s.length;e++){const t=s.start(e)-this.bufferPadding,i=s.end(e)+this.bufferPadding;if(l>=t&&n<=i){r.time.push({startPTS:Math.max(a,s.start(e)),endPTS:Math.min(o,s.end(e))});break}if(a<i&&o>t){const t=Math.max(a,s.start(e)),i=Math.min(o,s.end(e));i>t&&(r.partial=!0,r.time.push({startPTS:t,endPTS:i}))}else if(o<=t)break}return r}getPartialFragment(e){let t,i,s,r=null,a=0;const{bufferPadding:o,fragments:n}=this;return Object.keys(n).forEach((l=>{const d=n[l];d&&xf(d)&&(i=d.body.start-o,s=d.body.end+o,e>=i&&e<=s&&(t=Math.min(e-i,s-e),a<=t&&(r=d.body,a=t)))})),r}isEndListAppended(e){const t=this.endListFragments[e];return void 0!==t&&(t.buffered||xf(t))}getState(e){const t=Rf(e),i=this.fragments[t];return i?i.buffered?xf(i)?Tf:kf:Ef:wf}isTimeBuffered(e,t,i){let s,r;for(let a=0;a<i.length;a++){if(s=i.start(a)-this.bufferPadding,r=i.end(a)+this.bufferPadding,e>=s&&t<=r)return!0;if(t<=s)return!1}return!1}onFragLoaded(e,t){const{frag:i,part:s}=t;if("initSegment"===i.sn||i.bitrateTest)return;const r=s?null:t,a=Rf(i);this.fragments[a]={body:i,appendedPTS:null,loaded:r,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:i,part:s,timeRanges:r}=t;if("initSegment"===i.sn)return;const a=i.type;if(s){let e=this.activePartLists[a];e||(this.activePartLists[a]=e=[]),e.push(s)}this.timeRanges=r,Object.keys(r).forEach((e=>{const t=r[e];this.detectEvictedFragments(e,t,a,s)}))}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=Rf(e);return!!this.fragments[t]}hasParts(e){var t;return!(null==(t=this.activePartLists[e])||!t.length)}removeFragmentsInRange(e,t,i,s,r){s&&!this.hasGaps||Object.keys(this.fragments).forEach((a=>{const o=this.fragments[a];if(!o)return;const n=o.body;n.type!==i||s&&!n.gap||n.start<t&&n.end>e&&(o.buffered||r)&&this.removeFragment(n)}))}removeFragment(e){const t=Rf(e);e.stats.loaded=0,e.clearElementaryStreamInfo();const i=this.activePartLists[e.type];if(i){const t=e.sn;this.activePartLists[e.type]=i.filter((e=>e.fragment.sn!==t))}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1}}function xf(e){var t,i,s;return e.buffered&&(e.body.gap||(null==(t=e.range.video)?void 0:t.partial)||(null==(i=e.range.audio)?void 0:i.partial)||(null==(s=e.range.audiovideo)?void 0:s.partial))}function Rf(e){return`${e.type}_${e.level}_${e.sn}`}const Df={length:0,start:()=>0,end:()=>0};class Lf{static isBuffered(e,t){try{if(e){const i=Lf.getBuffered(e);for(let e=0;e<i.length;e++)if(t>=i.start(e)&&t<=i.end(e))return!0}}catch(e){}return!1}static bufferInfo(e,t,i){try{if(e){const s=Lf.getBuffered(e),r=[];let a;for(a=0;a<s.length;a++)r.push({start:s.start(a),end:s.end(a)});return this.bufferedInfo(r,t,i)}}catch(e){}return{len:0,start:t,end:t,nextStart:void 0}}static bufferedInfo(e,t,i){t=Math.max(0,t),e.sort((function(e,t){const i=e.start-t.start;return i||t.end-e.end}));let s=[];if(i)for(let t=0;t<e.length;t++){const r=s.length;if(r){const a=s[r-1].end;e[t].start-a<i?e[t].end>a&&(s[r-1].end=e[t].end):s.push(e[t])}else s.push(e[t])}else s=e;let r,a=0,o=t,n=t;for(let e=0;e<s.length;e++){const l=s[e].start,d=s[e].end;if(t+i>=l&&t<d)o=l,n=d,a=n-t;else if(t+i<l){r=l;break}}return{len:a,start:o||0,end:n||0,nextStart:r}}static getBuffered(e){try{return e.buffered}catch(e){return hc.log("failed to get media.buffered",e),Df}}}class Pf{constructor(e,t,i,s=0,r=-1,a=!1){this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing={start:0,executeStart:0,executeEnd:0,end:0},this.buffering={audio:{start:0,executeStart:0,executeEnd:0,end:0},video:{start:0,executeStart:0,executeEnd:0,end:0},audiovideo:{start:0,executeStart:0,executeEnd:0,end:0}},this.level=e,this.sn=t,this.id=i,this.size=s,this.part=r,this.partial=a}}function Bf(e,t){for(let s=0,r=e.length;s<r;s++){var i;if((null==(i=e[s])?void 0:i.cc)===t)return e[s]}return null}function If(e,t){if(e){const i=e.start+t;e.start=e.startPTS=i,e.endPTS=i+e.duration}}function Mf(e,t){const i=t.fragments;for(let t=0,s=i.length;t<s;t++)If(i[t],e);t.fragmentHint&&If(t.fragmentHint,e),t.alignedSliding=!0}function Uf(e,t,i){t&&(!function(e,t,i){if(function(e,t,i){return!(!t||!(i.endCC>i.startCC||e&&e.cc<i.startCC))}(e,i,t)){const e=function(e,t){const i=e.fragments,s=t.fragments;if(!s.length||!i.length)return void hc.log("No fragments to align");const r=Bf(i,s[0].cc);if(r&&(!r||r.startPTS))return r;hc.log("No frag in previous level to align on")}(i,t);e&&ec(e.start)&&(hc.log(`Adjusting PTS using last level due to CC increase within current level ${t.url}`),Mf(e.start,t))}}(e,i,t),!i.alignedSliding&&t&&Ff(i,t),i.alignedSliding||!t||i.skippedSegments||zp(t,i))}function Ff(e,t){if(!e.hasProgramDateTime||!t.hasProgramDateTime)return;const i=e.fragments,s=t.fragments;if(!i.length||!s.length)return;let r,a;const o=Math.min(t.endCC,e.endCC);t.startCC<o&&e.startCC<o&&(r=Bf(s,o),a=Bf(i,o)),r&&a||(r=s[Math.floor(s.length/2)],a=Bf(i,r.cc)||i[Math.floor(i.length/2)]);const n=r.programDateTime,l=a.programDateTime;if(!n||!l)return;Mf((l-n)/1e3-(a.start-r.start),e)}const Of=Math.pow(2,17);class Nf{constructor(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(e,t){const i=e.url;if(!i)return Promise.reject(new Gf({type:rc.NETWORK_ERROR,details:ac.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error("Fragment does not have a "+(i?"part list":"url")),networkDetails:null}));this.abort();const s=this.config,r=s.fLoader,a=s.loader;return new Promise(((o,n)=>{if(this.loader&&this.loader.destroy(),e.gap){if(e.tagList.some((e=>"GAP"===e[0])))return void n(zf(e));e.gap=!1}const l=this.loader=e.loader=r?new r(s):new a(s),d=jf(e),h=Kp(s.fragLoadPolicy.default),c={loadPolicy:h,timeout:h.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:"initSegment"===e.sn?1/0:Of};e.stats=l.stats,l.load(d,c,{onSuccess:(t,i,s,r)=>{this.resetLoader(e,l);let a=t.data;s.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(a.slice(0,16)),a=a.slice(16)),o({frag:e,part:null,payload:a,networkDetails:r})},onError:(t,s,r,a)=>{this.resetLoader(e,l),n(new Gf({type:rc.NETWORK_ERROR,details:ac.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:Yh({url:i,data:void 0},t),error:new Error(`HTTP Error ${t.code} ${t.text}`),networkDetails:r,stats:a}))},onAbort:(t,i,s)=>{this.resetLoader(e,l),n(new Gf({type:rc.NETWORK_ERROR,details:ac.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:s,stats:t}))},onTimeout:(t,i,s)=>{this.resetLoader(e,l),n(new Gf({type:rc.NETWORK_ERROR,details:ac.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${c.timeout}ms`),networkDetails:s,stats:t}))},onProgress:(i,s,r,a)=>{t&&t({frag:e,part:null,payload:r,networkDetails:a})}})}))}loadPart(e,t,i){this.abort();const s=this.config,r=s.fLoader,a=s.loader;return new Promise(((o,n)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap)return void n(zf(e,t));const l=this.loader=e.loader=r?new r(s):new a(s),d=jf(e,t),h=Kp(s.fragLoadPolicy.default),c={loadPolicy:h,timeout:h.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Of};t.stats=l.stats,l.load(d,c,{onSuccess:(s,r,a,n)=>{this.resetLoader(e,l),this.updateStatsFromPart(e,t);const d={frag:e,part:t,payload:s.data,networkDetails:n};i(d),o(d)},onError:(i,s,r,a)=>{this.resetLoader(e,l),n(new Gf({type:rc.NETWORK_ERROR,details:ac.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:Yh({url:d.url,data:void 0},i),error:new Error(`HTTP Error ${i.code} ${i.text}`),networkDetails:r,stats:a}))},onAbort:(i,s,r)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,l),n(new Gf({type:rc.NETWORK_ERROR,details:ac.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:r,stats:i}))},onTimeout:(i,s,r)=>{this.resetLoader(e,l),n(new Gf({type:rc.NETWORK_ERROR,details:ac.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${c.timeout}ms`),networkDetails:r,stats:i}))}})}))}updateStatsFromPart(e,t){const i=e.stats,s=t.stats,r=s.total;if(i.loaded+=s.loaded,r){const s=Math.round(e.duration/t.duration),a=Math.min(Math.round(i.loaded/r),s),o=(s-a)*Math.round(i.loaded/a);i.total=i.loaded+o}else i.total=Math.max(i.loaded,i.total);const a=i.loading,o=s.loading;a.start?a.first+=o.first-o.start:(a.start=o.start,a.first=o.first),a.end=o.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function jf(e,t=null){const i=t||e,s={frag:e,part:t,responseType:"arraybuffer",url:i.url,headers:{},rangeStart:0,rangeEnd:0},r=i.byteRangeStartOffset,a=i.byteRangeEndOffset;if(ec(r)&&ec(a)){var o;let t=r,i=a;if("initSegment"===e.sn&&"AES-128"===(null==(o=e.decryptdata)?void 0:o.method)){const e=a-r;e%16&&(i=a+(16-e%16)),0!==r&&(s.resetIV=!0,t=r-16)}s.rangeStart=t,s.rangeEnd=i}return s}function zf(e,t){const i=new Error(`GAP ${e.gap?"tag":"attribute"} found`),s={type:rc.MEDIA_ERROR,details:ac.FRAG_GAP,fatal:!1,frag:e,error:i,networkDetails:null};return t&&(s.part=t),(t||e).stats.aborted=!0,new Gf(s)}class Gf extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class Hf{constructor(e,t){this.subtle=void 0,this.aesIV=void 0,this.subtle=e,this.aesIV=t}decrypt(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)}}class Vf{constructor(e,t){this.subtle=void 0,this.key=void 0,this.subtle=e,this.key=t}expandKey(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])}}class $f{constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(e){const t=new DataView(e),i=new Uint32Array(4);for(let e=0;e<4;e++)i[e]=t.getUint32(4*e);return i}initTable(){const e=this.sBox,t=this.invSBox,i=this.subMix,s=i[0],r=i[1],a=i[2],o=i[3],n=this.invSubMix,l=n[0],d=n[1],h=n[2],c=n[3],u=new Uint32Array(256);let p=0,f=0,m=0;for(m=0;m<256;m++)u[m]=m<128?m<<1:m<<1^283;for(m=0;m<256;m++){let i=f^f<<1^f<<2^f<<3^f<<4;i=i>>>8^255&i^99,e[p]=i,t[i]=p;const n=u[p],m=u[n],g=u[m];let y=257*u[i]^16843008*i;s[p]=y<<24|y>>>8,r[p]=y<<16|y>>>16,a[p]=y<<8|y>>>24,o[p]=y,y=16843009*g^65537*m^257*n^16843008*p,l[i]=y<<24|y>>>8,d[i]=y<<16|y>>>16,h[i]=y<<8|y>>>24,c[i]=y,p?(p=n^u[u[u[g^n]]],f^=u[u[f]]):p=f=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let i=!0,s=0;for(;s<t.length&&i;)i=t[s]===this.key[s],s++;if(i)return;this.key=t;const r=this.keySize=t.length;if(4!==r&&6!==r&&8!==r)throw new Error("Invalid aes key size="+r);const a=this.ksRows=4*(r+6+1);let o,n;const l=this.keySchedule=new Uint32Array(a),d=this.invKeySchedule=new Uint32Array(a),h=this.sBox,c=this.rcon,u=this.invSubMix,p=u[0],f=u[1],m=u[2],g=u[3];let y,A;for(o=0;o<a;o++)o<r?y=l[o]=t[o]:(A=y,o%r==0?(A=A<<8|A>>>24,A=h[A>>>24]<<24|h[A>>>16&255]<<16|h[A>>>8&255]<<8|h[255&A],A^=c[o/r|0]<<24):r>6&&o%r==4&&(A=h[A>>>24]<<24|h[A>>>16&255]<<16|h[A>>>8&255]<<8|h[255&A]),l[o]=y=(l[o-r]^A)>>>0);for(n=0;n<a;n++)o=a-n,A=3&n?l[o]:l[o-4],d[n]=n<4||o<=4?A:p[h[A>>>24]]^f[h[A>>>16&255]]^m[h[A>>>8&255]]^g[h[255&A]],d[n]=d[n]>>>0}networkToHostOrderSwap(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24}decrypt(e,t,i){const s=this.keySize+6,r=this.invKeySchedule,a=this.invSBox,o=this.invSubMix,n=o[0],l=o[1],d=o[2],h=o[3],c=this.uint8ArrayToUint32Array_(i);let u=c[0],p=c[1],f=c[2],m=c[3];const g=new Int32Array(e),y=new Int32Array(g.length);let A,b,v,_,S,w,E,T,k,C,x,R,D,L;const P=this.networkToHostOrderSwap;for(;t<g.length;){for(k=P(g[t]),C=P(g[t+1]),x=P(g[t+2]),R=P(g[t+3]),S=k^r[0],w=R^r[1],E=x^r[2],T=C^r[3],D=4,L=1;L<s;L++)A=n[S>>>24]^l[w>>16&255]^d[E>>8&255]^h[255&T]^r[D],b=n[w>>>24]^l[E>>16&255]^d[T>>8&255]^h[255&S]^r[D+1],v=n[E>>>24]^l[T>>16&255]^d[S>>8&255]^h[255&w]^r[D+2],_=n[T>>>24]^l[S>>16&255]^d[w>>8&255]^h[255&E]^r[D+3],S=A,w=b,E=v,T=_,D+=4;A=a[S>>>24]<<24^a[w>>16&255]<<16^a[E>>8&255]<<8^a[255&T]^r[D],b=a[w>>>24]<<24^a[E>>16&255]<<16^a[T>>8&255]<<8^a[255&S]^r[D+1],v=a[E>>>24]<<24^a[T>>16&255]<<16^a[S>>8&255]<<8^a[255&w]^r[D+2],_=a[T>>>24]<<24^a[S>>16&255]<<16^a[w>>8&255]<<8^a[255&E]^r[D+3],y[t]=P(A^u),y[t+1]=P(_^p),y[t+2]=P(v^f),y[t+3]=P(b^m),u=k,p=C,f=x,m=R,t+=4}return y.buffer}}class Wf{constructor(e,{removePKCS7Padding:t=!0}={}){if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.useSoftware=e.enableSoftwareAES,this.removePKCS7Padding=t,t)try{const e=self.crypto;e&&(this.subtle=e.subtle||e.webkitSubtle)}catch(e){}null===this.subtle&&(this.useSoftware=!0)}destroy(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null}isSync(){return this.useSoftware}flush(){const{currentResult:e,remainderData:t}=this;if(!e||t)return this.reset(),null;const i=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?function(e){const t=e.byteLength,i=t&&new DataView(e.buffer).getUint8(t-1);return i?Nc(e,0,t-i):e}(i):i}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,i){return this.useSoftware?new Promise(((s,r)=>{this.softwareDecrypt(new Uint8Array(e),t,i);const a=this.flush();a?s(a.buffer):r(new Error("[softwareDecrypt] Failed to decrypt data"))})):this.webCryptoDecrypt(new Uint8Array(e),t,i)}softwareDecrypt(e,t,i){const{currentIV:s,currentResult:r,remainderData:a}=this;this.logOnce("JS AES decrypt"),a&&(e=Su(a,e),this.remainderData=null);const o=this.getValidChunk(e);if(!o.length)return null;s&&(i=s);let n=this.softwareDecrypter;n||(n=this.softwareDecrypter=new $f),n.expandKey(t);const l=r;return this.currentResult=n.decrypt(o.buffer,0,i),this.currentIV=Nc(o,-16).buffer,l||null}webCryptoDecrypt(e,t,i){const s=this.subtle;return this.key===t&&this.fastAesKey||(this.key=t,this.fastAesKey=new Vf(s,t)),this.fastAesKey.expandKey().then((t=>{if(!s)return Promise.reject(new Error("web crypto not initialized"));this.logOnce("WebCrypto AES decrypt");return new Hf(s,new Uint8Array(i)).decrypt(e.buffer,t)})).catch((s=>(hc.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${s.name}: ${s.message}`),this.onWebCryptoError(e,t,i))))}onWebCryptoError(e,t,i){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,i);const s=this.flush();if(s)return s.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")}getValidChunk(e){let t=e;const i=e.length-e.length%16;return i!==e.length&&(t=Nc(e,0,i),this.remainderData=Nc(e,i)),t}logOnce(e){this.logEnabled&&(hc.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const Jf=function(e){let t="";const i=e.length;for(let s=0;s<i;s++)t+=`[${e.start(s).toFixed(3)}-${e.end(s).toFixed(3)}]`;return t},qf="STOPPED",Kf="IDLE",Yf="KEY_LOADING",Qf="FRAG_LOADING",Xf="FRAG_LOADING_WAITING_RETRY",Zf="WAITING_TRACK",em="PARSING",tm="PARSED",im="ENDED",sm="ERROR",rm="WAITING_INIT_PTS",am="WAITING_LEVEL";class om extends Sf{constructor(e,t,i,s,r){super(),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=qf,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.loadedmetadata=!1,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.onvseeking=null,this.onvended=null,this.logPrefix="",this.log=void 0,this.warn=void 0,this.playlistType=r,this.logPrefix=s,this.log=hc.log.bind(hc,`${s}:`),this.warn=hc.warn.bind(hc,`${s}:`),this.hls=e,this.fragmentLoader=new Nf(e.config),this.keyLoader=i,this.fragmentTracker=t,this.config=e.config,this.decrypter=new Wf(e.config),e.on(sc.MANIFEST_LOADED,this.onManifestLoaded,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);const e=this.fragCurrent;null!=e&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=qf}_streamEnded(e,t){if(t.live||e.nextStart||!e.end||!this.media)return!1;const i=t.partList;if(null!=i&&i.length){const e=i[i.length-1];return Lf.isBuffered(this.media,e.start+e.duration/2)}const s=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(s)}getLevelDetails(){var e;if(this.levels&&null!==this.levelLastLoaded)return null==(e=this.levelLastLoaded)?void 0:e.details}onMediaAttached(e,t){const i=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),i.addEventListener("seeking",this.onvseeking),i.addEventListener("ended",this.onvended);const s=this.config;this.levels&&s.autoStartLoad&&this.state===qf&&this.startLoad(s.startPosition)}onMediaDetaching(){const e=this.media;null!=e&&e.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&this.onvseeking&&this.onvended&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.keyLoader&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}onMediaSeeking(){const{config:e,fragCurrent:t,media:i,mediaBuffer:s,state:r}=this,a=i?i.currentTime:0,o=Lf.bufferInfo(s||i,a,e.maxBufferHole);if(this.log(`media seeking to ${ec(a)?a.toFixed(3):a}, state: ${r}`),this.state===im)this.resetLoadingState();else if(t){const i=e.maxFragLookUpTolerance,s=t.start-i,r=t.start+t.duration+i;if(!o.len||r<o.start||s>o.end){const e=a>r;(a<s||e)&&(e&&t.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),t.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}i&&(this.fragmentTracker.removeFragmentsInRange(a,1/0,this.playlistType,!0),this.lastCurrentTime=a),this.loadedmetadata||o.len||(this.nextLoadPosition=this.startPosition=a),this.tickImmediate()}onMediaEnded(){this.startPosition=this.lastCurrentTime=0}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset,this.initPTS=[]}onHandlerDestroying(){this.hls.off(sc.MANIFEST_LOADED,this.onManifestLoaded,this),this.stopLoad(),super.onHandlerDestroying(),this.hls=null}onHandlerDestroyed(){this.state=qf,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,super.onHandlerDestroyed()}loadFragment(e,t,i){this._loadFragForPlayback(e,t,i)}_loadFragForPlayback(e,t,i){this._doFragLoad(e,t,i,(t=>{if(this.fragContextChanged(e))return this.warn(`Fragment ${e.sn}${t.part?" p: "+t.part.index:""} of level ${e.level} was dropped during download.`),void this.fragmentTracker.removeFragment(e);e.stats.chunkCount++,this._handleFragmentLoadProgress(t)})).then((t=>{if(!t)return;const i=this.state;this.fragContextChanged(e)?(i===Qf||!this.fragCurrent&&i===em)&&(this.fragmentTracker.removeFragment(e),this.state=Kf):("payload"in t&&(this.log(`Loaded fragment ${e.sn} of level ${e.level}`),this.hls.trigger(sc.FRAG_LOADED,t)),this._handleFragmentLoadComplete(t))})).catch((t=>{this.state!==qf&&this.state!==sm&&(this.warn(t),this.resetFragmentLoading(e))}))}clearTrackerIfNeeded(e){var t;const{fragmentTracker:i}=this;if(i.getState(e)===Ef){const t=e.type,s=this.getFwdBufferInfo(this.mediaBuffer,t),r=Math.max(e.duration,s?s.len:this.config.maxBufferLength);this.reduceMaxBufferLength(r)&&i.removeFragment(e)}else 0===(null==(t=this.mediaBuffer)?void 0:t.buffered.length)?i.removeAllFragments():i.hasParts(e.type)&&(i.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),i.getState(e)===Tf&&i.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}flushMainBuffer(e,t,i=null){if(!(e-t))return;const s={startOffset:e,endOffset:t,type:i};this.hls.trigger(sc.BUFFER_FLUSHING,s)}_loadInitSegment(e,t){this._doFragLoad(e,t).then((t=>{if(!t||this.fragContextChanged(e)||!this.levels)throw new Error("init load aborted");return t})).then((t=>{const{hls:i}=this,{payload:s}=t,r=e.decryptdata;if(s&&s.byteLength>0&&null!=r&&r.key&&r.iv&&"AES-128"===r.method){const a=self.performance.now();return this.decrypter.decrypt(new Uint8Array(s),r.key.buffer,r.iv.buffer).catch((t=>{throw i.trigger(sc.ERROR,{type:rc.MEDIA_ERROR,details:ac.FRAG_DECRYPT_ERROR,fatal:!1,error:t,reason:t.message,frag:e}),t})).then((s=>{const r=self.performance.now();return i.trigger(sc.FRAG_DECRYPTED,{frag:e,payload:s,stats:{tstart:a,tdecrypt:r}}),t.payload=s,this.completeInitSegmentLoad(t)}))}return this.completeInitSegmentLoad(t)})).catch((t=>{this.state!==qf&&this.state!==sm&&(this.warn(t),this.resetFragmentLoading(e))}))}completeInitSegmentLoad(e){const{levels:t}=this;if(!t)throw new Error("init load aborted, missing levels");const i=e.frag.stats;this.state=Kf,e.frag.data=new Uint8Array(e.payload),i.parsing.start=i.buffering.start=self.performance.now(),i.parsing.end=i.buffering.end=self.performance.now(),this.tick()}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.sn!==t.sn||e.level!==t.level}fragBufferedComplete(e,t){var i,s,r,a;const o=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.playlistType===hp?"level":"track"} ${e.level} (frag:[${(null!=(i=e.startPTS)?i:NaN).toFixed(3)}-${(null!=(s=e.endPTS)?s:NaN).toFixed(3)}] > buffer:${o?Jf(Lf.getBuffered(o)):"(detached)"})`),"initSegment"!==e.sn){var n;if(e.type!==up){const t=e.elementaryStreams;if(!Object.keys(t).some((e=>!!t[e])))return void(this.state=Kf)}const t=null==(n=this.levels)?void 0:n[e.level];null!=t&&t.fragmentError&&(this.log(`Resetting level fragment error count of ${t.fragmentError} on frag buffered`),t.fragmentError=0)}this.state=Kf,o&&(!this.loadedmetadata&&e.type==hp&&o.buffered.length&&(null==(r=this.fragCurrent)?void 0:r.sn)===(null==(a=this.fragPrevious)?void 0:a.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())}seekToStartPos(){}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:i,part:s,partsLoaded:r}=e,a=!r||0===r.length||r.some((e=>!e)),o=new Pf(i.level,i.sn,i.stats.chunkCount+1,0,s?s.index:-1,!a);t.flush(o)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,i=null,s){var r;const a=null==t?void 0:t.details;if(!this.levels||!a)throw new Error(`frag load aborted, missing level${a?"":" detail"}s`);let o=null;if(!e.encrypted||null!=(r=e.decryptdata)&&r.key?!e.encrypted&&a.encryptedFragments.length&&this.keyLoader.loadClear(e,a.encryptedFragments):(this.log(`Loading key for ${e.sn} of [${a.startSN}-${a.endSN}], ${"[stream-controller]"===this.logPrefix?"level":"track"} ${e.level}`),this.state=Yf,this.fragCurrent=e,o=this.keyLoader.load(e).then((e=>{if(!this.fragContextChanged(e.frag))return this.hls.trigger(sc.KEY_LOADED,e),this.state===Yf&&(this.state=Kf),e})),this.hls.trigger(sc.KEY_LOADING,{frag:e}),null===this.fragCurrent&&(o=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))),i=Math.max(e.start,i||0),this.config.lowLatencyMode&&"initSegment"!==e.sn){const r=a.partList;if(r&&s){i>e.end&&a.fragmentHint&&(e=a.fragmentHint);const n=this.getNextPart(r,e,i);if(n>-1){const l=r[n];let d;return this.log(`Loading part sn: ${e.sn} p: ${l.index} cc: ${e.cc} of playlist [${a.startSN}-${a.endSN}] parts [0-${n}-${r.length-1}] ${"[stream-controller]"===this.logPrefix?"level":"track"}: ${e.level}, target: ${parseFloat(i.toFixed(3))}`),this.nextLoadPosition=l.start+l.duration,this.state=Qf,d=o?o.then((i=>!i||this.fragContextChanged(i.frag)?null:this.doFragPartsLoad(e,l,t,s))).catch((e=>this.handleFragLoadError(e))):this.doFragPartsLoad(e,l,t,s).catch((e=>this.handleFragLoadError(e))),this.hls.trigger(sc.FRAG_LOADING,{frag:e,part:l,targetBufferTime:i}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):d}if(!e.url||this.loadedEndOfParts(r,i))return Promise.resolve(null)}}this.log(`Loading fragment ${e.sn} cc: ${e.cc} ${a?"of ["+a.startSN+"-"+a.endSN+"] ":""}${"[stream-controller]"===this.logPrefix?"level":"track"}: ${e.level}, target: ${parseFloat(i.toFixed(3))}`),ec(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Qf;const n=this.config.progressive;let l;return l=n&&o?o.then((t=>!t||this.fragContextChanged(null==t?void 0:t.frag)?null:this.fragmentLoader.load(e,s))).catch((e=>this.handleFragLoadError(e))):Promise.all([this.fragmentLoader.load(e,n?s:void 0),o]).then((([e])=>(!n&&e&&s&&s(e),e))).catch((e=>this.handleFragLoadError(e))),this.hls.trigger(sc.FRAG_LOADING,{frag:e,targetBufferTime:i}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):l}doFragPartsLoad(e,t,i,s){return new Promise(((r,a)=>{var o;const n=[],l=null==(o=i.details)?void 0:o.partList,d=t=>{this.fragmentLoader.loadPart(e,t,s).then((s=>{n[t.index]=s;const a=s.part;this.hls.trigger(sc.FRAG_LOADED,s);const o=Hp(i,e.sn,t.index+1)||Vp(l,e.sn,t.index+1);if(!o)return r({frag:e,part:a,partsLoaded:n});d(o)})).catch(a)};d(t)}))}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===ac.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(sc.ERROR,t)}else this.hls.trigger(sc.ERROR,{type:rc.OTHER_ERROR,details:ac.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==em)return void(this.fragCurrent||this.state===qf||this.state===sm||(this.state=Kf));const{frag:i,part:s,level:r}=t,a=self.performance.now();i.stats.parsing.end=a,s&&(s.stats.parsing.end=a),this.updateLevelTiming(i,s,r,e.partial)}getCurrentContext(e){const{levels:t,fragCurrent:i}=this,{level:s,sn:r,part:a}=e;if(null==t||!t[s])return this.warn(`Levels object was unset while buffering fragment ${r} of level ${s}. The current chunk will not be buffered.`),null;const o=t[s],n=a>-1?Hp(o,r,a):null,l=n?n.fragment:function(e,t,i){if(null==e||!e.details)return null;const s=e.details;let r=s.fragments[t-s.startSN];return r||(r=s.fragmentHint,r&&r.sn===t?r:t<s.startSN&&i&&i.sn===t?i:null)}(o,r,i);return l?(i&&i!==l&&(l.stats=i.stats),{frag:l,part:n,level:o}):null}bufferFragmentData(e,t,i,s,r){var a;if(!e||this.state!==em)return;const{data1:o,data2:n}=e;let l=o;if(o&&n&&(l=Su(o,n)),null==(a=l)||!a.length)return;const d={type:e.type,frag:t,part:i,chunkMeta:s,parent:t.type,data:l};if(this.hls.trigger(sc.BUFFER_APPENDING,d),e.dropped&&e.independent&&!i){if(r)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!Lf.isBuffered(t,t.currentTime))return void this.flushMainBuffer(0,e.start);const i=t.currentTime,s=Lf.bufferInfo(t,i,0),r=e.duration,a=Math.min(2*this.config.maxFragLookUpTolerance,.25*r),o=Math.max(Math.min(e.start-a,s.end-a),i+a);e.start-o>a&&this.flushMainBuffer(o,e.start)}getFwdBufferInfo(e,t){const i=this.getLoadPosition();return ec(i)?this.getFwdBufferInfoAtPos(e,i,t):null}getFwdBufferInfoAtPos(e,t,i){const{config:{maxBufferHole:s}}=this,r=Lf.bufferInfo(e,t,s);if(0===r.len&&void 0!==r.nextStart){const a=this.fragmentTracker.getBufferedFrag(t,i);if(a&&r.nextStart<a.end)return Lf.bufferInfo(e,t,Math.max(r.nextStart,s))}return r}getMaxBufferLength(e){const{config:t}=this;let i;return i=e?Math.max(8*t.maxBufferSize/e,t.maxBufferLength):t.maxBufferLength,Math.min(i,t.maxMaxBufferLength)}reduceMaxBufferLength(e){const t=this.config,i=e||t.maxBufferLength;return t.maxMaxBufferLength>=i&&(t.maxMaxBufferLength/=2,this.warn(`Reduce max buffer length to ${t.maxMaxBufferLength}s`),!0)}getAppendedFrag(e,t=hp){const i=this.fragmentTracker.getAppendedFrag(e,hp);return i&&"fragment"in i?i.fragment:i}getNextFragment(e,t){const i=t.fragments,s=i.length;if(!s)return null;const{config:r}=this,a=i[0].start;let o;if(t.live){const n=r.initialLiveManifestSize;if(s<n)return this.warn(`Not enough fragments to start playback (have: ${s}, need: ${n})`),null;(!t.PTSKnown&&!this.startFragRequested&&-1===this.startPosition||e<a)&&(o=this.getInitialLiveFragment(t,i),this.startPosition=this.nextLoadPosition=o?this.hls.liveSyncPosition||o.start:e)}else e<=a&&(o=i[0]);if(!o){const i=r.lowLatencyMode?t.partEnd:t.fragmentEnd;o=this.getFragmentAtPosition(e,i,t)}return this.mapToInitFragWhenRequired(o)}isLoopLoading(e,t){const i=this.fragmentTracker.getState(e);return(i===kf||i===Tf&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,i,s,r){const a=e.gap,o=this.getNextFragment(this.nextLoadPosition,t);if(null===o)return o;if(e=o,a&&e&&!e.gap&&i.nextStart){const t=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,i.nextStart,s);if(null!==t&&i.len+t.len>=r)return this.log(`buffer full after gaps in "${s}" playlist starting at sn: ${e.sn}`),null}return e}mapToInitFragWhenRequired(e){return null==e||!e.initSegment||null!=e&&e.initSegment.data||this.bitrateTest?e:e.initSegment}getNextPart(e,t,i){let s=-1,r=!1,a=!0;for(let o=0,n=e.length;o<n;o++){const n=e[o];if(a=a&&!n.independent,s>-1&&i<n.start)break;const l=n.loaded;l?s=-1:(r||n.independent||a)&&n.fragment===t&&(s=o),r=l}return s}loadedEndOfParts(e,t){const i=e[e.length-1];return i&&t>i.start&&i.loaded}getInitialLiveFragment(e,t){const i=this.fragPrevious;let s=null;if(i){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${i.programDateTime}`),s=function(e,t,i){if(null===t||!Array.isArray(e)||!e.length||!ec(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;i=i||0;for(let s=0;s<e.length;++s){const r=e[s];if(ef(t,i,r))return r}return null}(t,i.endProgramDateTime,this.config.maxFragLookUpTolerance)),!s){const r=i.sn+1;if(r>=e.startSN&&r<=e.endSN){const a=t[r-e.startSN];i.cc===a.cc&&(s=a,this.log(`Live playlist, switching playlist, load frag with next SN: ${s.sn}`))}s||(s=function(e,t){return Qp(e,(e=>e.cc<t?1:e.cc>t?-1:0))}(t,i.cc),s&&this.log(`Live playlist, switching playlist, load frag with same CC: ${s.sn}`))}}else{const t=this.hls.liveSyncPosition;null!==t&&(s=this.getFragmentAtPosition(t,this.bitrateTest?e.fragmentEnd:e.edge,e))}return s}getFragmentAtPosition(e,t,i){const{config:s}=this;let{fragPrevious:r}=this,{fragments:a,endSN:o}=i;const{fragmentHint:n}=i,l=s.maxFragLookUpTolerance,d=i.partList,h=!!(s.lowLatencyMode&&null!=d&&d.length&&n);let c;if(h&&n&&!this.bitrateTest&&(a=a.concat(n),o=n.sn),e<t){c=Xp(r,a,e,e>t-l?0:l)}else c=a[a.length-1];if(c){const e=c.sn-i.startSN,t=this.fragmentTracker.getState(c);if((t===kf||t===Tf&&c.gap)&&(r=c),r&&c.sn===r.sn&&(!h||d[0].fragment.sn>c.sn)){if(r&&c.level===r.level){const t=a[e+1];c=c.sn<o&&this.fragmentTracker.getState(t)!==kf?t:null}}}return c}synchronizeToLiveEdge(e){const{config:t,media:i}=this;if(!i)return;const s=this.hls.liveSyncPosition,r=i.currentTime,a=e.fragments[0].start,o=e.edge,n=r>=a-t.maxFragLookUpTolerance&&r<=o;if(null!==s&&i.duration>s&&(r<s||!n)){const a=void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!n&&i.readyState<4||r<o-a)&&(this.loadedmetadata||(this.nextLoadPosition=s),i.readyState&&(this.warn(`Playback: ${r.toFixed(3)} is located too far from the end of live sliding playlist: ${o}, reset currentTime to : ${s.toFixed(3)}`),i.currentTime=s))}}alignPlaylists(e,t,i){const s=e.fragments.length;if(!s)return this.warn("No fragments in live playlist"),0;const r=e.fragments[0].start,a=!t,o=e.alignedSliding&&ec(r);if(a||!o&&!r){const{fragPrevious:r}=this;Uf(r,i,e);const a=e.fragments[0].start;return this.log(`Live playlist sliding: ${a.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} prev-sn: ${r?r.sn:"na"} fragments: ${s}`),a}return r}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)}setStartPosition(e,t){let i=this.startPosition;if(i<t&&(i=-1),-1===i||-1===this.lastCurrentTime){const s=null!==this.startTimeOffset,r=s?this.startTimeOffset:e.startTimeOffset;null!==r&&ec(r)?(i=t+r,r<0&&(i+=e.totalduration),i=Math.min(Math.max(t,i),t+e.totalduration),this.log(`Start time offset ${r} found in ${s?"multivariant":"media"} playlist, adjust startPosition to ${i}`),this.startPosition=i):e.live?i=this.hls.liveSyncPosition||t:this.startPosition=i=0,this.lastCurrentTime=i}this.nextLoadPosition=i}getLoadPosition(){const{media:e}=this;let t=0;return this.loadedmetadata&&e?t=e.currentTime:this.nextLoadPosition&&(t=this.nextLoadPosition),t}handleFragLoadAborted(e,t){this.transmuxer&&"initSegment"!==e.sn&&e.stats.aborted&&(this.warn(`Fragment ${e.sn}${t?" part "+t.index:""} of level ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){this.fragCurrent&&(this.fragContextChanged(e)||this.state===Xf)||(this.state=Kf)}onFragmentOrKeyLoadError(e,t){if(t.chunkMeta&&!t.frag){const e=this.getCurrentContext(t.chunkMeta);e&&(t.frag=e.frag)}const i=t.frag;if(!i||i.type!==e||!this.levels)return;var s;if(this.fragContextChanged(i))return void this.warn(`Frag load error must match current frag to retry ${i.url} > ${null==(s=this.fragCurrent)?void 0:s.url}`);const r=t.details===ac.FRAG_GAP;r&&this.fragmentTracker.fragBuffered(i,!0);const a=t.errorAction,{action:o,retryCount:n=0,retryConfig:l}=a||{};if(a&&o===af&&l){this.resetStartWhenNotLoaded(this.levelLastLoaded);const s=qp(l,n);this.warn(`Fragment ${i.sn} of ${e} ${i.level} errored with ${t.details}, retrying loading ${n+1}/${l.maxNumRetry} in ${s}ms`),a.resolved=!0,this.retryDate=self.performance.now()+s,this.state=Xf}else if(l&&a){if(this.resetFragmentErrors(e),!(n<l.maxNumRetry))return void hc.warn(`${t.details} reached or exceeded max retry (${n})`);r||o===rf||(a.resolved=!0)}else(null==a?void 0:a.action)===sf?this.state=am:this.state=sm;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===em||this.state===tm){const t=e.parent,i=this.getFwdBufferInfo(this.mediaBuffer,t),s=i&&i.len>.5;s&&this.reduceMaxBufferLength(i.len);const r=!s;return r&&this.warn(`Buffer full error while media.currentTime is not buffered, flush ${t} buffer`),e.frag&&(this.fragmentTracker.removeFragment(e.frag),this.nextLoadPosition=e.frag.start),this.resetLoadingState(),r}return!1}resetFragmentErrors(e){e===cp&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==qf&&(this.state=Kf)}afterBufferFlushed(e,t,i){if(!e)return;const s=Lf.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,s,i),this.state===im&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=Kf}resetStartWhenNotLoaded(e){if(!this.loadedmetadata){this.startFragRequested=!1;const t=e?e.details:null;null!=t&&t.live?(this.startPosition=-1,this.setStartPosition(t,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){this.warn(`The loading context changed while buffering fragment ${e.sn} of level ${e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,i,s){var r;const a=i.details;if(!a)return void this.warn("level.details undefined");if(!Object.keys(e.elementaryStreams).reduce(((t,r)=>{const o=e.elementaryStreams[r];if(o){const n=o.endPTS-o.startPTS;if(n<=0)return this.warn(`Could not parse fragment ${e.sn} ${r} duration reliably (${n})`),t||!1;const l=s?0:Np(a,e,o.startPTS,o.endPTS,o.startDTS,o.endDTS);return this.hls.trigger(sc.LEVEL_PTS_UPDATED,{details:a,level:i,drift:l,type:r,frag:e,start:o.startPTS,end:o.endPTS}),!0}return t}),!1)&&null===(null==(r=this.transmuxer)?void 0:r.error)){const t=new Error(`Found no media in fragment ${e.sn} of level ${e.level} resetting transmuxer to fallback to playlist timing`);if(0===i.fragmentError&&(i.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)),this.warn(t.message),this.hls.trigger(sc.ERROR,{type:rc.MEDIA_ERROR,details:ac.FRAG_PARSING_ERROR,fatal:!1,error:t,frag:e,reason:`Found no media in msn ${e.sn} of level "${i.url}"`}),!this.hls)return;this.resetTransmuxer()}this.state=tm,this.hls.trigger(sc.FRAG_PARSED,{frag:e,part:t})}resetTransmuxer(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)}recoverWorkerError(e){"demuxerWorker"===e.event&&(this.fragmentTracker.removeAllFragments(),this.resetTransmuxer(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}class nm{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let i;return e.length?(i=1===e.length?e[0]:function(e,t){const i=new Uint8Array(t);let s=0;for(let t=0;t<e.length;t++){const r=e[t];i.set(r,s),s+=r.length}return i}(e,t),this.reset(),i):new Uint8Array(0)}reset(){this.chunks.length=0,this.dataLength=0}}function lm(e="",t=9e4){return{type:e,id:-1,pid:-1,inputTimeScale:t,sequenceNumber:-1,samples:[],dropped:0}}class dm{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(e,t,i,s){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,t){return!1}appendFrame(e,t,i){}demux(e,t){this.cachedData&&(e=Su(this.cachedData,e),this.cachedData=null);let i,s=Gc(e,0),r=s?s.length:0;const a=this._audioTrack,o=this._id3Track,n=s?$c(s):void 0,l=e.length;for((null===this.basePTS||0===this.frameIndex&&ec(n))&&(this.basePTS=hm(n,t,this.initPTS),this.lastPTS=this.basePTS),null===this.lastPTS&&(this.lastPTS=this.basePTS),s&&s.length>0&&o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:s,type:_p,duration:Number.POSITIVE_INFINITY});r<l;){if(this.canParse(e,r)){const t=this.appendFrame(a,e,r);t?(this.frameIndex++,this.lastPTS=t.sample.pts,r+=t.length,i=r):r=l}else Vc(e,r)?(s=Gc(e,r),o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:s,type:_p,duration:Number.POSITIVE_INFINITY}),r+=s.length,i=r):r++;if(r===l&&i!==l){const t=Nc(e,i);this.cachedData?this.cachedData=Su(this.cachedData,t):this.cachedData=t}}return{audioTrack:a,videoTrack:lm(),id3Track:o,textTrack:lm()}}demuxSampleAes(e,t,i){return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`))}flush(e){const t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:lm(),id3Track:this._id3Track,textTrack:lm()}}destroy(){}}const hm=(e,t,i)=>{if(ec(e))return 90*e;return 9e4*t+(i?9e4*i.baseTime/i.timescale:0)};function cm(e,t){return 255===e[t]&&240==(246&e[t+1])}function um(e,t){return 1&e[t+1]?7:9}function pm(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function fm(e,t){return t+1<e.length&&cm(e,t)}function mm(e,t){if(fm(e,t)){const i=um(e,t);if(t+i>=e.length)return!1;const s=pm(e,t);if(s<=i)return!1;const r=t+s;return r===e.length||fm(e,r)}return!1}function gm(e,t,i,s,r){if(!e.samplerate){const a=function(e,t,i,s){let r,a,o,n;const l=navigator.userAgent.toLowerCase(),d=s,h=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];r=1+((192&t[i+2])>>>6);const c=(60&t[i+2])>>>2;if(!(c>h.length-1))return o=(1&t[i+2])<<2,o|=(192&t[i+3])>>>6,hc.log(`manifest codec:${s}, ADTS type:${r}, samplingIndex:${c}`),/firefox/i.test(l)?c>=6?(r=5,n=new Array(4),a=c-3):(r=2,n=new Array(2),a=c):-1!==l.indexOf("android")?(r=2,n=new Array(2),a=c):(r=5,n=new Array(4),s&&(-1!==s.indexOf("mp4a.40.29")||-1!==s.indexOf("mp4a.40.5"))||!s&&c>=6?a=c-3:((s&&-1!==s.indexOf("mp4a.40.2")&&(c>=6&&1===o||/vivaldi/i.test(l))||!s&&1===o)&&(r=2,n=new Array(2)),a=c)),n[0]=r<<3,n[0]|=(14&c)>>1,n[1]|=(1&c)<<7,n[1]|=o<<3,5===r&&(n[1]|=(14&a)>>1,n[2]=(1&a)<<7,n[2]|=8,n[3]=0),{config:n,samplerate:h[c],channelCount:o,codec:"mp4a.40."+r,manifestCodec:d};{const t=new Error(`invalid ADTS sampling index:${c}`);e.emit(sc.ERROR,sc.ERROR,{type:rc.MEDIA_ERROR,details:ac.FRAG_PARSING_ERROR,fatal:!0,error:t,reason:t.message})}}(t,i,s,r);if(!a)return;e.config=a.config,e.samplerate=a.samplerate,e.channelCount=a.channelCount,e.codec=a.codec,e.manifestCodec=a.manifestCodec,hc.log(`parsed codec:${e.codec}, rate:${a.samplerate}, channels:${a.channelCount}`)}}function ym(e){return 9216e4/e}function Am(e,t,i,s,r){const a=s+r*ym(e.samplerate),o=function(e,t){const i=um(e,t);if(t+i<=e.length){const s=pm(e,t)-i;if(s>0)return{headerLength:i,frameLength:s}}}(t,i);let n;if(o){const{frameLength:s,headerLength:r}=o,l=r+s,d=Math.max(0,i+l-t.length);d?(n=new Uint8Array(l-r),n.set(t.subarray(i+r,t.length),0)):n=t.subarray(i+r,i+l);const h={unit:n,pts:a};return d||e.samples.push(h),{sample:h,length:l,missing:d}}const l=t.length-i;n=new Uint8Array(l),n.set(t.subarray(i,t.length),0);return{sample:{unit:n,pts:a},length:l,missing:-1}}let bm=null;const vm=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],_m=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Sm=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],wm=[0,1,1,4];function Em(e,t,i,s,r){if(i+24>t.length)return;const a=Tm(t,i);if(a&&i+a.frameLength<=t.length){const o=s+r*(9e4*a.samplesPerFrame/a.sampleRate),n={unit:t.subarray(i,i+a.frameLength),pts:o,dts:o};return e.config=[],e.channelCount=a.channelCount,e.samplerate=a.sampleRate,e.samples.push(n),{sample:n,length:a.frameLength,missing:0}}}function Tm(e,t){const i=e[t+1]>>3&3,s=e[t+1]>>1&3,r=e[t+2]>>4&15,a=e[t+2]>>2&3;if(1!==i&&0!==r&&15!==r&&3!==a){const o=e[t+2]>>1&1,n=e[t+3]>>6,l=1e3*vm[14*(3===i?3-s:3===s?3:4)+r-1],d=_m[3*(3===i?0:2===i?1:2)+a],h=3===n?1:2,c=Sm[i][s],u=wm[s],p=8*c*u,f=Math.floor(c*l/d+o)*u;if(null===bm){const e=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);bm=e?parseInt(e[1]):0}return!!bm&&bm<=87&&2===s&&l>=224e3&&0===n&&(e[t+3]=128|e[t+3]),{sampleRate:d,channelCount:h,frameLength:f,samplesPerFrame:p}}}function km(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function Cm(e,t){return t+1<e.length&&km(e,t)}function xm(e,t){if(t+1<e.length&&km(e,t)){const i=4,s=Tm(e,t);let r=i;null!=s&&s.frameLength&&(r=s.frameLength);const a=t+r;return a===e.length||Cm(e,a)}return!1}const Rm=/\/emsg[-/]ID3/i;const Dm=(e,t)=>{let i=0,s=5;t+=s;const r=new Uint32Array(1),a=new Uint32Array(1),o=new Uint8Array(1);for(;s>0;){o[0]=e[t];const n=Math.min(s,8),l=8-n;a[0]=4278190080>>>24+l<<l,r[0]=(o[0]&a[0])>>l,i=i?i<<n|r[0]:r[0],t+=1,s-=n}return i};class Lm extends dm{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,t,i,s){super.resetInitSegment(e,t,i,s),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:s,inputTimeScale:9e4,dropped:0}}canParse(e,t){return t+64<e.length}appendFrame(e,t,i){const s=Pm(e,t,i,this.basePTS,this.frameIndex);if(-1!==s){return{sample:e.samples[e.samples.length-1],length:s,missing:0}}}static probe(e){if(!e)return!1;const t=Gc(e,0);if(!t)return!1;const i=t.length;return 11===e[i]&&119===e[i+1]&&void 0!==$c(t)&&Dm(e,i)<16}}function Pm(e,t,i,s,r){if(i+8>t.length)return-1;if(11!==t[i]||119!==t[i+1])return-1;const a=t[i+4]>>6;if(a>=3)return-1;const o=[48e3,44100,32e3][a],n=63&t[i+4],l=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*n+a];if(i+l>t.length)return-1;const d=t[i+6]>>5;let h=0;2===d?h+=2:(1&d&&1!==d&&(h+=2),4&d&&(h+=2));const c=(t[i+6]<<8|t[i+7])>>12-h&1,u=[2,1,2,3,3,4,4,5][d]+c,p=t[i+5]>>3,f=7&t[i+5],m=new Uint8Array([a<<6|p<<1|f>>2,(3&f)<<6|d<<3|c<<2|n>>4,n<<4&224]),g=s+r*(1536/o*9e4),y=t.subarray(i,i+l);return e.config=m,e.channelCount=u,e.samplerate=o,e.samples.push({unit:y,pts:g}),l}class Bm{constructor(){this.VideoSample=null}createVideoSample(e,t,i,s){return{key:e,frame:!1,pts:t,dts:i,units:[],debug:s,length:0}}getLastNalUnit(e){var t;let i,s=this.VideoSample;if(s&&0!==s.units.length||(s=e[e.length-1]),null!=(t=s)&&t.units){const e=s.units;i=e[e.length-1]}return i}pushAccessUnit(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){const i=t.samples,s=i.length;if(!s)return void t.dropped++;{const t=i[s-1];e.pts=t.pts,e.dts=t.dts}}t.samples.push(e)}e.debug.length&&hc.log(e.pts+"/"+e.dts+":"+e.debug)}}class Im{constructor(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const e=this.data,t=this.bytesAvailable,i=e.byteLength-t,s=new Uint8Array(4),r=Math.min(4,t);if(0===r)throw new Error("no bytes available");s.set(e.subarray(i,i+r)),this.word=new DataView(s.buffer).getUint32(0),this.bitsAvailable=8*r,this.bytesAvailable-=r}skipBits(e){let t;e=Math.min(e,8*this.bytesAvailable+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(t=(e-=this.bitsAvailable)>>3,e-=t<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let t=Math.min(this.bitsAvailable,e);const i=this.word>>>32-t;if(e>32&&hc.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else{if(!(this.bytesAvailable>0))throw new Error("no bits available");this.loadWord()}return t=e-t,t>0&&this.bitsAvailable?i<<t|this.readBits(t):i}skipLZ(){let e;for(e=0;e<this.bitsAvailable;++e)if(0!=(this.word&2147483648>>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return 1===this.readBits(1)}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}skipScalingList(e){let t,i=8,s=8;for(let r=0;r<e;r++)0!==s&&(t=this.readEG(),s=(i+t+256)%256),i=0===s?i:s}readSPS(){let e,t,i,s=0,r=0,a=0,o=0;const n=this.readUByte.bind(this),l=this.readBits.bind(this),d=this.readUEG.bind(this),h=this.readBoolean.bind(this),c=this.skipBits.bind(this),u=this.skipEG.bind(this),p=this.skipUEG.bind(this),f=this.skipScalingList.bind(this);n();const m=n();if(l(5),c(3),n(),p(),100===m||110===m||122===m||244===m||44===m||83===m||86===m||118===m||128===m){const e=d();if(3===e&&c(1),p(),p(),c(1),h())for(t=3!==e?8:12,i=0;i<t;i++)h()&&f(i<6?16:64)}p();const g=d();if(0===g)d();else if(1===g)for(c(1),u(),u(),e=d(),i=0;i<e;i++)u();p(),c(1);const y=d(),A=d(),b=l(1);0===b&&c(1),c(1),h()&&(s=d(),r=d(),a=d(),o=d());let v=[1,1];if(h()&&h()){switch(n()){case 1:v=[1,1];break;case 2:v=[12,11];break;case 3:v=[10,11];break;case 4:v=[16,11];break;case 5:v=[40,33];break;case 6:v=[24,11];break;case 7:v=[20,11];break;case 8:v=[32,11];break;case 9:v=[80,33];break;case 10:v=[18,11];break;case 11:v=[15,11];break;case 12:v=[64,33];break;case 13:v=[160,99];break;case 14:v=[4,3];break;case 15:v=[3,2];break;case 16:v=[2,1];break;case 255:v=[n()<<8|n(),n()<<8|n()]}}return{width:Math.ceil(16*(y+1)-2*s-2*r),height:(2-b)*(A+1)*16-(b?2:4)*(a+o),pixelRatio:v}}readSliceType(){return this.readUByte(),this.readUEG(),this.readUEG()}}class Mm extends Bm{parseAVCPES(e,t,i,s,r){const a=this.parseAVCNALu(e,i.data);let o,n=this.VideoSample,l=!1;i.data=null,n&&a.length&&!e.audFound&&(this.pushAccessUnit(n,e),n=this.VideoSample=this.createVideoSample(!1,i.pts,i.dts,"")),a.forEach((s=>{var a;switch(s.type){case 1:{let t=!1;o=!0;const r=s.data;if(l&&r.length>4){const e=new Im(r).readSliceType();2!==e&&4!==e&&7!==e&&9!==e||(t=!0)}var d;if(t)null!=(d=n)&&d.frame&&!n.key&&(this.pushAccessUnit(n,e),n=this.VideoSample=null);n||(n=this.VideoSample=this.createVideoSample(!0,i.pts,i.dts,"")),n.frame=!0,n.key=t;break}case 5:o=!0,null!=(a=n)&&a.frame&&!n.key&&(this.pushAccessUnit(n,e),n=this.VideoSample=null),n||(n=this.VideoSample=this.createVideoSample(!0,i.pts,i.dts,"")),n.key=!0,n.frame=!0;break;case 6:o=!0,Tu(s.data,1,i.pts,t.samples);break;case 7:{var h,c;o=!0,l=!0;const t=s.data,i=new Im(t).readSPS();if(!e.sps||e.width!==i.width||e.height!==i.height||(null==(h=e.pixelRatio)?void 0:h[0])!==i.pixelRatio[0]||(null==(c=e.pixelRatio)?void 0:c[1])!==i.pixelRatio[1]){e.width=i.width,e.height=i.height,e.pixelRatio=i.pixelRatio,e.sps=[t],e.duration=r;const s=t.subarray(1,4);let a="avc1.";for(let e=0;e<3;e++){let t=s[e].toString(16);t.length<2&&(t="0"+t),a+=t}e.codec=a}break}case 8:o=!0,e.pps=[s.data];break;case 9:o=!0,e.audFound=!0,n&&this.pushAccessUnit(n,e),n=this.VideoSample=this.createVideoSample(!1,i.pts,i.dts,"");break;case 12:o=!0;break;default:o=!1,n&&(n.debug+="unknown NAL "+s.type+" ")}if(n&&o){n.units.push(s)}})),s&&n&&(this.pushAccessUnit(n,e),this.VideoSample=null)}parseAVCNALu(e,t){const i=t.byteLength;let s=e.naluState||0;const r=s,a=[];let o,n,l,d=0,h=-1,c=0;for(-1===s&&(h=0,c=31&t[0],s=0,d=1);d<i;)if(o=t[d++],s)if(1!==s)if(o)if(1===o){if(n=d-s-1,h>=0){const e={data:t.subarray(h,n),type:c};a.push(e)}else{const i=this.getLastNalUnit(e.samples);i&&(r&&d<=4-r&&i.state&&(i.data=i.data.subarray(0,i.data.byteLength-r)),n>0&&(i.data=Su(i.data,t.subarray(0,n)),i.state=0))}d<i?(l=31&t[d],h=d,c=l,s=0):s=-1}else s=0;else s=3;else s=o?0:2;else s=o?0:1;if(h>=0&&s>=0){const e={data:t.subarray(h,i),type:c,state:s};a.push(e)}if(0===a.length){const i=this.getLastNalUnit(e.samples);i&&(i.data=Su(i.data,t))}return e.naluState=s,a}}class Um{constructor(e,t,i){this.keyData=void 0,this.decrypter=void 0,this.keyData=i,this.decrypter=new Wf(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer)}decryptAacSample(e,t,i){const s=e[t].unit;if(s.length<=16)return;const r=s.subarray(16,s.length-s.length%16),a=r.buffer.slice(r.byteOffset,r.byteOffset+r.length);this.decryptBuffer(a).then((r=>{const a=new Uint8Array(r);s.set(a,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,i)}))}decryptAacSamples(e,t,i){for(;;t++){if(t>=e.length)return void i();if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,i),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=16*Math.floor((e.length-48)/160)+16,i=new Int8Array(t);let s=0;for(let t=32;t<e.length-16;t+=160,s+=16)i.set(e.subarray(t,t+16),s);return i}getAvcDecryptedUnit(e,t){const i=new Uint8Array(t);let s=0;for(let t=32;t<e.length-16;t+=160,s+=16)e.set(i.subarray(s,s+16),t);return e}decryptAvcSample(e,t,i,s,r){const a=ku(r.data),o=this.getAvcEncryptedData(a);this.decryptBuffer(o.buffer).then((o=>{r.data=this.getAvcDecryptedUnit(a,o),this.decrypter.isSync()||this.decryptAvcSamples(e,t,i+1,s)}))}decryptAvcSamples(e,t,i,s){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,i=0){if(t>=e.length)return void s();const r=e[t].units;for(;!(i>=r.length);i++){const a=r[i];if(!(a.data.length<=48||1!==a.type&&5!==a.type||(this.decryptAvcSample(e,t,i,s,a),this.decrypter.isSync())))return}}}}const Fm=188;class Om{constructor(e,t,i){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=t,this.typeSupported=i,this.videoParser=new Mm}static probe(e){const t=Om.syncOffset(e);return t>0&&hc.warn(`MPEG2-TS detected but first sync word found @ offset ${t}`),-1!==t}static syncOffset(e){const t=e.length;let i=Math.min(940,t-Fm)+1,s=0;for(;s<i;){let r=!1,a=-1,o=0;for(let n=s;n<t;n+=Fm){if(71!==e[n]||t-n!==Fm&&71!==e[n+Fm]){if(o)return-1;break}if(o++,-1===a&&(a=n,0!==a&&(i=Math.min(a+18612,e.length-Fm)+1)),r||(r=0===Nm(e,n)),r&&o>1&&(0===a&&o>2||n+Fm>i))return a}s++}return-1}static createTrack(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:ou[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===e?t:void 0}}resetInitSegment(e,t,i,s){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=Om.createTrack("video"),this._audioTrack=Om.createTrack("audio",s),this._id3Track=Om.createTrack("id3"),this._txtTrack=Om.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=i,this._duration=s}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:i}=this;e&&(e.pesData=null),t&&(t.pesData=null),i&&(i.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,i=!1,s=!1){let r;i||(this.sampleAes=null);const a=this._videoTrack,o=this._audioTrack,n=this._id3Track,l=this._txtTrack;let d=a.pid,h=a.pesData,c=o.pid,u=n.pid,p=o.pesData,f=n.pesData,m=null,g=this.pmtParsed,y=this._pmtId,A=e.length;if(this.remainderData&&(A=(e=Su(this.remainderData,e)).length,this.remainderData=null),A<Fm&&!s)return this.remainderData=e,{audioTrack:o,videoTrack:a,id3Track:n,textTrack:l};const b=Math.max(0,Om.syncOffset(e));A-=(A-b)%Fm,A<e.byteLength&&!s&&(this.remainderData=new Uint8Array(e.buffer,A,e.buffer.byteLength-A));let v=0;for(let t=b;t<A;t+=Fm)if(71===e[t]){const s=!!(64&e[t+1]),A=Nm(e,t);let v;if((48&e[t+3])>>4>1){if(v=t+5+e[t+4],v===t+Fm)continue}else v=t+4;switch(A){case d:s&&(h&&(r=Hm(h))&&this.videoParser.parseAVCPES(a,l,r,!1,this._duration),h={data:[],size:0}),h&&(h.data.push(e.subarray(v,t+Fm)),h.size+=t+Fm-v);break;case c:if(s){if(p&&(r=Hm(p)))switch(o.segmentCodec){case"aac":this.parseAACPES(o,r);break;case"mp3":this.parseMPEGPES(o,r);break;case"ac3":this.parseAC3PES(o,r)}p={data:[],size:0}}p&&(p.data.push(e.subarray(v,t+Fm)),p.size+=t+Fm-v);break;case u:s&&(f&&(r=Hm(f))&&this.parseID3PES(n,r),f={data:[],size:0}),f&&(f.data.push(e.subarray(v,t+Fm)),f.size+=t+Fm-v);break;case 0:s&&(v+=e[v]+1),y=this._pmtId=jm(e,v);break;case y:{s&&(v+=e[v]+1);const r=zm(e,v,this.typeSupported,i);d=r.videoPid,d>0&&(a.pid=d,a.segmentCodec=r.segmentVideoCodec),c=r.audioPid,c>0&&(o.pid=c,o.segmentCodec=r.segmentAudioCodec),u=r.id3Pid,u>0&&(n.pid=u),null===m||g||(hc.warn(`MPEG-TS PMT found at ${t} after unknown PID '${m}'. Backtracking to sync byte @${b} to parse all TS packets.`),m=null,t=b-188),g=this.pmtParsed=!0;break}case 17:case 8191:break;default:m=A}}else v++;if(v>0){const e=new Error(`Found ${v} TS packet/s that do not start with 0x47`);this.observer.emit(sc.ERROR,sc.ERROR,{type:rc.MEDIA_ERROR,details:ac.FRAG_PARSING_ERROR,fatal:!1,error:e,reason:e.message})}a.pesData=h,o.pesData=p,n.pesData=f;const _={audioTrack:o,videoTrack:a,id3Track:n,textTrack:l};return s&&this.extractRemainingSamples(_),_}flush(){const{remainderData:e}=this;let t;return this.remainderData=null,t=e?this.demux(e,-1,!1,!0):{videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t}extractRemainingSamples(e){const{audioTrack:t,videoTrack:i,id3Track:s,textTrack:r}=e,a=i.pesData,o=t.pesData,n=s.pesData;let l;if(a&&(l=Hm(a))?(this.videoParser.parseAVCPES(i,r,l,!0,this._duration),i.pesData=null):i.pesData=a,o&&(l=Hm(o))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,l);break;case"mp3":this.parseMPEGPES(t,l);break;case"ac3":this.parseAC3PES(t,l)}t.pesData=null}else null!=o&&o.size&&hc.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=o;n&&(l=Hm(n))?(this.parseID3PES(s,l),s.pesData=null):s.pesData=n}demuxSampleAes(e,t,i){const s=this.demux(e,i,!0,!this.config.progressive),r=this.sampleAes=new Um(this.observer,this.config,t);return this.decrypt(s,r)}decrypt(e,t){return new Promise((i=>{const{audioTrack:s,videoTrack:r}=e;s.samples&&"aac"===s.segmentCodec?t.decryptAacSamples(s.samples,0,(()=>{r.samples?t.decryptAvcSamples(r.samples,0,0,(()=>{i(e)})):i(e)})):r.samples&&t.decryptAvcSamples(r.samples,0,0,(()=>{i(e)}))}))}destroy(){this._duration=0}parseAACPES(e,t){let i=0;const s=this.aacOverFlow;let r,a,o,n=t.data;if(s){this.aacOverFlow=null;const t=s.missing,r=s.sample.unit.byteLength;if(-1===t)n=Su(s.sample.unit,n);else{const a=r-t;s.sample.unit.set(n.subarray(0,t),a),e.samples.push(s.sample),i=s.missing}}for(r=i,a=n.length;r<a-1&&!fm(n,r);r++);if(r!==i){let e;const t=r<a-1;e=t?`AAC PES did not start with ADTS header,offset:${r}`:"No ADTS header found in AAC PES";const i=new Error(e);if(hc.warn(`parsing error: ${e}`),this.observer.emit(sc.ERROR,sc.ERROR,{type:rc.MEDIA_ERROR,details:ac.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:i,reason:e}),!t)return}if(gm(e,this.observer,n,r,this.audioCodec),void 0!==t.pts)o=t.pts;else{if(!s)return void hc.warn("[tsdemuxer]: AAC PES unknown PTS");{const t=ym(e.samplerate);o=s.sample.pts+t}}let l,d=0;for(;r<a;){if(l=Am(e,n,r,o,d),r+=l.length,l.missing){this.aacOverFlow=l;break}for(d++;r<a-1&&!fm(n,r);r++);}}parseMPEGPES(e,t){const i=t.data,s=i.length;let r=0,a=0;const o=t.pts;if(void 0!==o)for(;a<s;)if(Cm(i,a)){const t=Em(e,i,a,o,r);if(!t)break;a+=t.length,r++}else a++;else hc.warn("[tsdemuxer]: MPEG PES unknown PTS")}parseAC3PES(e,t){{const i=t.data,s=t.pts;if(void 0===s)return void hc.warn("[tsdemuxer]: AC3 PES unknown PTS");const r=i.length;let a,o=0,n=0;for(;n<r&&(a=Pm(e,i,n,s,o++))>0;)n+=a}}parseID3PES(e,t){if(void 0===t.pts)return void hc.warn("[tsdemuxer]: ID3 PES unknown PTS");const i=Zh({},t,{type:this._videoTrack?wp:_p,duration:Number.POSITIVE_INFINITY});e.samples.push(i)}}function Nm(e,t){return((31&e[t+1])<<8)+e[t+2]}function jm(e,t){return(31&e[t+10])<<8|e[t+11]}function zm(e,t,i,s){const r={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},a=t+3+((15&e[t+1])<<8|e[t+2])-4;for(t+=12+((15&e[t+10])<<8|e[t+11]);t<a;){const a=Nm(e,t),o=(15&e[t+3])<<8|e[t+4];switch(e[t]){case 207:if(!s){Gm("ADTS AAC");break}case 15:-1===r.audioPid&&(r.audioPid=a);break;case 21:-1===r.id3Pid&&(r.id3Pid=a);break;case 219:if(!s){Gm("H.264");break}case 27:-1===r.videoPid&&(r.videoPid=a,r.segmentVideoCodec="avc");break;case 3:case 4:i.mpeg||i.mp3?-1===r.audioPid&&(r.audioPid=a,r.segmentAudioCodec="mp3"):hc.log("MPEG audio found, not supported in this browser");break;case 193:if(!s){Gm("AC-3");break}case 129:i.ac3?-1===r.audioPid&&(r.audioPid=a,r.segmentAudioCodec="ac3"):hc.log("AC-3 audio found, not supported in this browser");break;case 6:if(-1===r.audioPid&&o>0){let s=t+5,n=o;for(;n>2;){if(106===e[s])!0!==i.ac3?hc.log("AC-3 audio found, not supported in this browser for now"):(r.audioPid=a,r.segmentAudioCodec="ac3");const t=e[s+1]+2;s+=t,n-=t}}break;case 194:case 135:hc.warn("Unsupported EC-3 in M2TS found");break;case 36:hc.warn("Unsupported HEVC in M2TS found")}t+=o+5}return r}function Gm(e){hc.log(`${e} with AES-128-CBC encryption found in unencrypted stream`)}function Hm(e){let t,i,s,r,a,o=0;const n=e.data;if(!e||0===e.size)return null;for(;n[0].length<19&&n.length>1;)n[0]=Su(n[0],n[1]),n.splice(1,1);t=n[0];if(1===(t[0]<<16)+(t[1]<<8)+t[2]){if(i=(t[4]<<8)+t[5],i&&i>e.size-6)return null;const l=t[7];192&l&&(r=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&l?(a=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2,r-a>54e5&&(hc.warn(`${Math.round((r-a)/9e4)}s delta between PTS and DTS, align them`),r=a)):a=r),s=t[8];let d=s+9;if(e.size<=d)return null;e.size-=d;const h=new Uint8Array(e.size);for(let e=0,i=n.length;e<i;e++){t=n[e];let i=t.byteLength;if(d){if(d>i){d-=i;continue}t=t.subarray(d),i-=d,d=0}h.set(t,o),o+=i}return i&&(i-=s+3),{data:h,pts:r,dts:a,len:i}}return null}class Vm{static getSilentFrame(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}}}const $m=Math.pow(2,32)-1;class Wm{static init(){let e;for(e in Wm.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],dac3:[],"ac-3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},Wm.types)Wm.types.hasOwnProperty(e)&&(Wm.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);Wm.HDLR_TYPES={video:t,audio:i};const s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),r=new Uint8Array([0,0,0,0,0,0,0,0]);Wm.STTS=Wm.STSC=Wm.STCO=r,Wm.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Wm.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Wm.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Wm.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const a=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),n=new Uint8Array([0,0,0,1]);Wm.FTYP=Wm.box(Wm.types.ftyp,a,n,a,o),Wm.DINF=Wm.box(Wm.types.dinf,Wm.box(Wm.types.dref,s))}static box(e,...t){let i=8,s=t.length;const r=s;for(;s--;)i+=t[s].byteLength;const a=new Uint8Array(i);for(a[0]=i>>24&255,a[1]=i>>16&255,a[2]=i>>8&255,a[3]=255&i,a.set(e,4),s=0,i=8;s<r;s++)a.set(t[s],i),i+=t[s].byteLength;return a}static hdlr(e){return Wm.box(Wm.types.hdlr,Wm.HDLR_TYPES[e])}static mdat(e){return Wm.box(Wm.types.mdat,e)}static mdhd(e,t){t*=e;const i=Math.floor(t/($m+1)),s=Math.floor(t%($m+1));return Wm.box(Wm.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,s>>24,s>>16&255,s>>8&255,255&s,85,196,0,0]))}static mdia(e){return Wm.box(Wm.types.mdia,Wm.mdhd(e.timescale,e.duration),Wm.hdlr(e.type),Wm.minf(e))}static mfhd(e){return Wm.box(Wm.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))}static minf(e){return"audio"===e.type?Wm.box(Wm.types.minf,Wm.box(Wm.types.smhd,Wm.SMHD),Wm.DINF,Wm.stbl(e)):Wm.box(Wm.types.minf,Wm.box(Wm.types.vmhd,Wm.VMHD),Wm.DINF,Wm.stbl(e))}static moof(e,t,i){return Wm.box(Wm.types.moof,Wm.mfhd(e),Wm.traf(i,t))}static moov(e){let t=e.length;const i=[];for(;t--;)i[t]=Wm.trak(e[t]);return Wm.box.apply(null,[Wm.types.moov,Wm.mvhd(e[0].timescale,e[0].duration)].concat(i).concat(Wm.mvex(e)))}static mvex(e){let t=e.length;const i=[];for(;t--;)i[t]=Wm.trex(e[t]);return Wm.box.apply(null,[Wm.types.mvex,...i])}static mvhd(e,t){t*=e;const i=Math.floor(t/($m+1)),s=Math.floor(t%($m+1)),r=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,s>>24,s>>16&255,s>>8&255,255&s,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return Wm.box(Wm.types.mvhd,r)}static sdtp(e){const t=e.samples||[],i=new Uint8Array(4+t.length);let s,r;for(s=0;s<t.length;s++)r=t[s].flags,i[s+4]=r.dependsOn<<4|r.isDependedOn<<2|r.hasRedundancy;return Wm.box(Wm.types.sdtp,i)}static stbl(e){return Wm.box(Wm.types.stbl,Wm.stsd(e),Wm.box(Wm.types.stts,Wm.STTS),Wm.box(Wm.types.stsc,Wm.STSC),Wm.box(Wm.types.stsz,Wm.STSZ),Wm.box(Wm.types.stco,Wm.STCO))}static avc1(e){let t,i,s,r=[],a=[];for(t=0;t<e.sps.length;t++)i=e.sps[t],s=i.byteLength,r.push(s>>>8&255),r.push(255&s),r=r.concat(Array.prototype.slice.call(i));for(t=0;t<e.pps.length;t++)i=e.pps[t],s=i.byteLength,a.push(s>>>8&255),a.push(255&s),a=a.concat(Array.prototype.slice.call(i));const o=Wm.box(Wm.types.avcC,new Uint8Array([1,r[3],r[4],r[5],255,224|e.sps.length].concat(r).concat([e.pps.length]).concat(a))),n=e.width,l=e.height,d=e.pixelRatio[0],h=e.pixelRatio[1];return Wm.box(Wm.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,n>>8&255,255&n,l>>8&255,255&l,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,Wm.box(Wm.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),Wm.box(Wm.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,255&d,h>>24,h>>16&255,h>>8&255,255&h])))}static esds(e){const t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))}static audioStsd(e){const t=e.samplerate;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,t>>8&255,255&t,0,0])}static mp4a(e){return Wm.box(Wm.types.mp4a,Wm.audioStsd(e),Wm.box(Wm.types.esds,Wm.esds(e)))}static mp3(e){return Wm.box(Wm.types[".mp3"],Wm.audioStsd(e))}static ac3(e){return Wm.box(Wm.types["ac-3"],Wm.audioStsd(e),Wm.box(Wm.types.dac3,e.config))}static stsd(e){return"audio"===e.type?"mp3"===e.segmentCodec&&"mp3"===e.codec?Wm.box(Wm.types.stsd,Wm.STSD,Wm.mp3(e)):"ac3"===e.segmentCodec?Wm.box(Wm.types.stsd,Wm.STSD,Wm.ac3(e)):Wm.box(Wm.types.stsd,Wm.STSD,Wm.mp4a(e)):Wm.box(Wm.types.stsd,Wm.STSD,Wm.avc1(e))}static tkhd(e){const t=e.id,i=e.duration*e.timescale,s=e.width,r=e.height,a=Math.floor(i/($m+1)),o=Math.floor(i%($m+1));return Wm.box(Wm.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,o>>24,o>>16&255,o>>8&255,255&o,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,s>>8&255,255&s,0,0,r>>8&255,255&r,0,0]))}static traf(e,t){const i=Wm.sdtp(e),s=e.id,r=Math.floor(t/($m+1)),a=Math.floor(t%($m+1));return Wm.box(Wm.types.traf,Wm.box(Wm.types.tfhd,new Uint8Array([0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s])),Wm.box(Wm.types.tfdt,new Uint8Array([1,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,a>>24,a>>16&255,a>>8&255,255&a])),Wm.trun(e,i.length+16+20+8+16+8+8),i)}static trak(e){return e.duration=e.duration||4294967295,Wm.box(Wm.types.trak,Wm.tkhd(e),Wm.mdia(e))}static trex(e){const t=e.id;return Wm.box(Wm.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,t){const i=e.samples||[],s=i.length,r=12+16*s,a=new Uint8Array(r);let o,n,l,d,h,c;for(t+=8+r,a.set(["video"===e.type?1:0,0,15,1,s>>>24&255,s>>>16&255,s>>>8&255,255&s,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0),o=0;o<s;o++)n=i[o],l=n.duration,d=n.size,h=n.flags,c=n.cts,a.set([l>>>24&255,l>>>16&255,l>>>8&255,255&l,d>>>24&255,d>>>16&255,d>>>8&255,255&d,h.isLeading<<2|h.dependsOn,h.isDependedOn<<6|h.hasRedundancy<<4|h.paddingValue<<1|h.isNonSync,61440&h.degradPrio,15&h.degradPrio,c>>>24&255,c>>>16&255,c>>>8&255,255&c],12+16*o);return Wm.box(Wm.types.trun,a)}static initSegment(e){Wm.types||Wm.init();const t=Wm.moov(e);return Su(Wm.FTYP,t)}}Wm.types=void 0,Wm.HDLR_TYPES=void 0,Wm.STTS=void 0,Wm.STSC=void 0,Wm.STCO=void 0,Wm.STSZ=void 0,Wm.VMHD=void 0,Wm.SMHD=void 0,Wm.STSD=void 0,Wm.FTYP=void 0,Wm.DINF=void 0;function Jm(e,t,i=1,s=!1){const r=e*t*i;return s?Math.round(r):r}function qm(e,t=!1){return Jm(e,1e3,1/9e4,t)}let Km,Ym=null,Qm=null;class Xm{constructor(e,t,i,s=""){if(this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=i,this.ISGenerated=!1,null===Ym){const e=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Ym=e?parseInt(e[1]):0}if(null===Qm){const e=navigator.userAgent.match(/Safari\/(\d+)/i);Qm=e?parseInt(e[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){hc.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){hc.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){hc.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let t=!1;const i=e.reduce(((e,i)=>{const s=i.pts-e;return s<-4294967296?(t=!0,Zm(e,i.pts)):s>0?e:i.pts}),e[0].pts);return t&&hc.debug("PTS rollover detected"),i}remux(e,t,i,s,r,a,o,n){let l,d,h,c,u,p,f=r,m=r;const g=e.pid>-1,y=t.pid>-1,A=t.samples.length,b=e.samples.length>0,v=o&&A>0||A>1;if((!g||b)&&(!y||v)||this.ISGenerated||o){if(this.ISGenerated){var _,S,w,E;const e=this.videoTrackConfig;!e||t.width===e.width&&t.height===e.height&&(null==(_=t.pixelRatio)?void 0:_[0])===(null==(S=e.pixelRatio)?void 0:S[0])&&(null==(w=t.pixelRatio)?void 0:w[1])===(null==(E=e.pixelRatio)?void 0:E[1])||this.resetInitSegment()}else h=this.generateIS(e,t,r,a);const i=this.isVideoContiguous;let s,o=-1;if(v&&(o=function(e){for(let t=0;t<e.length;t++)if(e[t].key)return t;return-1}(t.samples),!i&&this.config.forceKeyFrameOnDiscontinuity))if(p=!0,o>0){hc.warn(`[mp4-remuxer]: Dropped ${o} out of ${A} video samples due to a missing keyframe`);const e=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(o),t.dropped+=o,m+=(t.samples[0].pts-e)/t.inputTimeScale,s=m}else-1===o&&(hc.warn(`[mp4-remuxer]: No keyframe found out of ${A} video samples`),p=!1);if(this.ISGenerated){if(b&&v){const i=this.getVideoStartPts(t.samples),s=(Zm(e.samples[0].pts,i)-i)/t.inputTimeScale;f+=Math.max(0,s),m+=Math.max(0,-s)}if(b){if(e.samplerate||(hc.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),h=this.generateIS(e,t,r,a)),d=this.remuxAudio(e,f,this.isAudioContiguous,a,y||v||n===cp?m:void 0),v){const s=d?d.endPTS-d.startPTS:0;t.inputTimeScale||(hc.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),h=this.generateIS(e,t,r,a)),l=this.remuxVideo(t,m,i,s)}}else v&&(l=this.remuxVideo(t,m,i,0));l&&(l.firstKeyFrame=o,l.independent=-1!==o,l.firstKeyFramePTS=s)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(i.samples.length&&(u=eg(i,r,this._initPTS,this._initDTS)),s.samples.length&&(c=tg(s,r,this._initPTS))),{audio:d,video:l,initSegment:h,independent:p,text:c,id3:u}}generateIS(e,t,i,s){const r=e.samples,a=t.samples,o=this.typeSupported,n={},l=this._initPTS;let d,h,c,u=!l||s,p="audio/mp4";if(u&&(d=h=1/0),e.config&&r.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":o.mpeg?(p="audio/mpeg",e.codec=""):o.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3"}n.audio={id:"audio",container:p,codec:e.codec,initSegment:"mp3"===e.segmentCodec&&o.mpeg?new Uint8Array(0):Wm.initSegment([e]),metadata:{channelCount:e.channelCount}},u&&(c=e.inputTimeScale,l&&c===l.timescale?u=!1:d=h=r[0].pts-Math.round(c*i))}if(t.sps&&t.pps&&a.length){if(t.timescale=t.inputTimeScale,n.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:Wm.initSegment([t]),metadata:{width:t.width,height:t.height}},u)if(c=t.inputTimeScale,l&&c===l.timescale)u=!1;else{const e=this.getVideoStartPts(a),t=Math.round(c*i);h=Math.min(h,Zm(a[0].dts,e)-t),d=Math.min(d,e-t)}this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(n).length)return this.ISGenerated=!0,u?(this._initPTS={baseTime:d,timescale:c},this._initDTS={baseTime:h,timescale:c}):d=c=void 0,{tracks:n,initPTS:d,timescale:c}}remuxVideo(e,t,i,s){const r=e.inputTimeScale,a=e.samples,o=[],n=a.length,l=this._initPTS;let d,h,c=this.nextAvcDts,u=8,p=this.videoSampleDuration,f=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,g=!1;if(!i||null===c){const e=t*r,s=a[0].pts-Zm(a[0].dts,a[0].pts);Ym&&null!==c&&Math.abs(e-s-c)<15e3?i=!0:c=e-s}const y=l.baseTime*r/l.timescale;for(let e=0;e<n;e++){const t=a[e];t.pts=Zm(t.pts-y,c),t.dts=Zm(t.dts-y,c),t.dts<a[e>0?e-1:e].dts&&(g=!0)}g&&a.sort((function(e,t){const i=e.dts-t.dts,s=e.pts-t.pts;return i||s})),d=a[0].dts,h=a[a.length-1].dts;const A=h-d,b=A?Math.round(A/(n-1)):p||e.inputTimeScale/30;if(i){const e=d-c,i=e>b,s=e<-1;if((i||s)&&(i?hc.warn(`AVC: ${qm(e,!0)} ms (${e}dts) hole between fragments detected at ${t.toFixed(3)}`):hc.warn(`AVC: ${qm(-e,!0)} ms (${e}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!s||c>=a[0].pts||Ym)){d=c;const t=a[0].pts-e;if(i)a[0].dts=d,a[0].pts=t;else for(let i=0;i<a.length&&!(a[i].dts>t);i++)a[i].dts-=e,a[i].pts-=e;hc.log(`Video: Initial PTS/DTS adjusted: ${qm(t,!0)}/${qm(d,!0)}, delta: ${qm(e,!0)} ms`)}}d=Math.max(0,d);let v=0,_=0,S=d;for(let e=0;e<n;e++){const t=a[e],i=t.units,s=i.length;let r=0;for(let e=0;e<s;e++)r+=i[e].data.length;_+=r,v+=s,t.length=r,t.dts<S?(t.dts=S,S+=b/4|0||1):S=t.dts,f=Math.min(t.pts,f),m=Math.max(t.pts,m)}h=a[n-1].dts;const w=_+4*v+8;let E;try{E=new Uint8Array(w)}catch(e){return void this.observer.emit(sc.ERROR,sc.ERROR,{type:rc.MUX_ERROR,details:ac.REMUX_ALLOC_ERROR,fatal:!1,error:e,bytes:w,reason:`fail allocating video mdat ${w}`})}const T=new DataView(E.buffer);T.setUint32(0,w),E.set(Wm.types.mdat,4);let k=!1,C=Number.POSITIVE_INFINITY,x=Number.POSITIVE_INFINITY,R=Number.NEGATIVE_INFINITY,D=Number.NEGATIVE_INFINITY;for(let e=0;e<n;e++){const t=a[e],i=t.units;let l,d=0;for(let e=0,t=i.length;e<t;e++){const t=i[e],s=t.data,r=t.data.byteLength;T.setUint32(u,r),u+=4,E.set(s,u),u+=r,d+=4+r}if(e<n-1)p=a[e+1].dts-t.dts,l=a[e+1].pts-t.pts;else{const i=this.config,o=e>0?t.dts-a[e-1].dts:b;if(l=e>0?t.pts-a[e-1].pts:b,i.stretchShortVideoTrack&&null!==this.nextAudioPts){const e=Math.floor(i.maxBufferHole*r),a=(s?f+s*r:this.nextAudioPts)-t.pts;a>e?(p=a-o,p<0?p=o:k=!0,hc.log(`[mp4-remuxer]: It is approximately ${a/90} ms to the next segment; using duration ${p/90} ms for the last video frame.`)):p=o}else p=o}const h=Math.round(t.pts-t.dts);C=Math.min(C,p),R=Math.max(R,p),x=Math.min(x,l),D=Math.max(D,l),o.push(new ig(t.key,p,d,h))}if(o.length)if(Ym){if(Ym<70){const e=o[0].flags;e.dependsOn=2,e.isNonSync=0}}else if(Qm&&D-x<R-C&&b/R<.025&&0===o[0].cts){hc.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let e=d;for(let t=0,i=o.length;t<i;t++){const s=e+o[t].duration,r=e+o[t].cts;if(t<i-1){const e=s+o[t+1].cts;o[t].duration=e-r}else o[t].duration=t?o[t-1].duration:b;o[t].cts=0,e=s}}p=k||!p?b:p,this.nextAvcDts=c=h+p,this.videoSampleDuration=p,this.isVideoContiguous=!0;const L={data1:Wm.moof(e.sequenceNumber++,d,Zh({},e,{samples:o})),data2:E,startPTS:f/r,endPTS:(m+p)/r,startDTS:d/r,endDTS:c/r,type:"video",hasAudio:!1,hasVideo:!0,nb:o.length,dropped:e.dropped};return e.samples=[],e.dropped=0,L}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return 1152;case"ac3":return 1536;default:return 1024}}remuxAudio(e,t,i,s,r){const a=e.inputTimeScale,o=a/(e.samplerate?e.samplerate:a),n=this.getSamplesPerFrame(e),l=n*o,d=this._initPTS,h="mp3"===e.segmentCodec&&this.typeSupported.mpeg,c=[],u=void 0!==r;let p=e.samples,f=h?0:8,m=this.nextAudioPts||-1;const g=t*a,y=d.baseTime*a/d.timescale;if(this.isAudioContiguous=i=i||p.length&&m>0&&(s&&Math.abs(g-m)<9e3||Math.abs(Zm(p[0].pts-y,g)-m)<20*l),p.forEach((function(e){e.pts=Zm(e.pts-y,g)})),!i||m<0){if(p=p.filter((e=>e.pts>=0)),!p.length)return;m=0===r?0:s&&!u?Math.max(0,g):p[0].pts}if("aac"===e.segmentCodec){const t=this.config.maxAudioFramesDrift;for(let i=0,s=m;i<p.length;i++){const r=p[i],o=r.pts,n=o-s,d=Math.abs(1e3*n/a);if(n<=-t*l&&u)0===i&&(hc.warn(`Audio frame @ ${(o/a).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*n/a)} ms.`),this.nextAudioPts=m=s=o);else if(n>=t*l&&d<1e4&&u){let t=Math.round(n/l);s=o-t*l,s<0&&(t--,s+=l),0===i&&(this.nextAudioPts=m=s),hc.warn(`[mp4-remuxer]: Injecting ${t} audio frame @ ${(s/a).toFixed(3)}s due to ${Math.round(1e3*n/a)} ms gap.`);for(let a=0;a<t;a++){const t=Math.max(s,0);let a=Vm.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);a||(hc.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),a=r.unit.subarray()),p.splice(i,0,{unit:a,pts:t}),s+=l,i++}}r.pts=s,s+=l}}let A,b=null,v=null,_=0,S=p.length;for(;S--;)_+=p[S].unit.byteLength;for(let t=0,s=p.length;t<s;t++){const s=p[t],r=s.unit;let a=s.pts;if(null!==v){c[t-1].duration=Math.round((a-v)/o)}else{if(i&&"aac"===e.segmentCodec&&(a=m),b=a,!(_>0))return;_+=f;try{A=new Uint8Array(_)}catch(e){return void this.observer.emit(sc.ERROR,sc.ERROR,{type:rc.MUX_ERROR,details:ac.REMUX_ALLOC_ERROR,fatal:!1,error:e,bytes:_,reason:`fail allocating audio mdat ${_}`})}if(!h){new DataView(A.buffer).setUint32(0,_),A.set(Wm.types.mdat,4)}}A.set(r,f);const l=r.byteLength;f+=l,c.push(new ig(!0,n,l,0)),v=a}const w=c.length;if(!w)return;const E=c[c.length-1];this.nextAudioPts=m=v+o*E.duration;const T=h?new Uint8Array(0):Wm.moof(e.sequenceNumber++,b/o,Zh({},e,{samples:c}));e.samples=[];const k=b/a,C=m/a,x={data1:T,data2:A,startPTS:k,endPTS:C,startDTS:k,endDTS:C,type:"audio",hasAudio:!0,hasVideo:!1,nb:w};return this.isAudioContiguous=!0,x}remuxEmptyAudio(e,t,i,s){const r=e.inputTimeScale,a=r/(e.samplerate?e.samplerate:r),o=this.nextAudioPts,n=this._initDTS,l=9e4*n.baseTime/n.timescale,d=(null!==o?o:s.startDTS*r)+l,h=s.endDTS*r+l,c=1024*a,u=Math.ceil((h-d)/c),p=Vm.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(hc.warn("[mp4-remuxer]: remux empty Audio"),!p)return void hc.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");const f=[];for(let e=0;e<u;e++){const t=d+e*c;f.push({unit:p,pts:t,dts:t})}return e.samples=f,this.remuxAudio(e,t,i,!1)}}function Zm(e,t){let i;if(null===t)return e;for(i=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=i;return e}function eg(e,t,i,s){const r=e.samples.length;if(!r)return;const a=e.inputTimeScale;for(let o=0;o<r;o++){const r=e.samples[o];r.pts=Zm(r.pts-i.baseTime*a/i.timescale,t*a)/a,r.dts=Zm(r.dts-s.baseTime*a/s.timescale,t*a)/a}const o=e.samples;return e.samples=[],{samples:o}}function tg(e,t,i){const s=e.samples.length;if(!s)return;const r=e.inputTimeScale;for(let a=0;a<s;a++){const s=e.samples[a];s.pts=Zm(s.pts-i.baseTime*r/i.timescale,t*r)/r}e.samples.sort(((e,t)=>e.pts-t.pts));const a=e.samples;return e.samples=[],{samples:a}}class ig{constructor(e,t,i,s){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=i,this.cts=s,this.flags={isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:e?2:1,isNonSync:e?0:1}}}function sg(e,t){const i=null==e?void 0:e.codec;if(i&&i.length>4)return i;if(t===yc){if("ec-3"===i||"ac-3"===i||"alac"===i)return i;if("fLaC"===i||"Opus"===i){return $u(i,!1)}const e="mp4a.40.5";return hc.info(`Parsed audio codec "${i}" or audio object type not handled. Using "${e}"`),e}return hc.warn(`Unhandled video codec "${i}"`),"hvc1"===i||"hev1"===i?"hvc1.1.6.L120.90":"av01"===i?"av01.0.04M.08":"avc1.42e01e"}try{Km=self.performance.now.bind(self.performance)}catch(e){hc.debug("Unable to use Performance API on this environment"),Km=null==Cc?void 0:Cc.Date.now}const rg=[{demux:class{constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,i,s){const r=this.videoTrack=lm("video",1),a=this.audioTrack=lm("audio",1),o=this.txtTrack=lm("text",1);if(this.id3Track=lm("id3",1),this.timeOffset=0,null==e||!e.byteLength)return;const n=mu(e);if(n.video){const{id:e,timescale:t,codec:i}=n.video;r.id=e,r.timescale=o.timescale=t,r.codec=i}if(n.audio){const{id:e,timescale:t,codec:i}=n.audio;a.id=e,a.timescale=t,a.codec=i}o.id=ou.text,r.sampleDuration=0,r.duration=a.duration=s}resetContiguity(){this.remainderData=null}static probe(e){return function(e){const t=e.byteLength;for(let i=0;i<t;){const s=du(e,i);if(s>8&&109===e[i+4]&&111===e[i+5]&&111===e[i+6]&&102===e[i+7])return!0;i=s>1?i+s:t}return!1}(e)}demux(e,t){this.timeOffset=t;let i=e;const s=this.videoTrack,r=this.txtTrack;if(this.config.progressive){this.remainderData&&(i=Su(this.remainderData,e));const t=function(e){const t={valid:null,remainder:null},i=pu(e,["moof"]);if(i.length<2)return t.remainder=e,t;const s=i[i.length-1];return t.valid=Nc(e,0,s.byteOffset-8),t.remainder=Nc(e,s.byteOffset-8),t}(i);this.remainderData=t.remainder,s.samples=t.valid||new Uint8Array}else s.samples=i;const a=this.extractID3Track(s,t);return r.samples=wu(t,s),{videoTrack:s,audioTrack:this.audioTrack,id3Track:a,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,i=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const s=this.extractID3Track(t,this.timeOffset);return i.samples=wu(e,t),{videoTrack:t,audioTrack:lm(),id3Track:s,textTrack:lm()}}extractID3Track(e,t){const i=this.id3Track;if(e.samples.length){const s=pu(e.samples,["emsg"]);s&&s.forEach((e=>{const s=function(e){const t=e[0];let i="",s="",r=0,a=0,o=0,n=0,l=0,d=0;if(0===t){for(;"\0"!==nu(e.subarray(d,d+1));)i+=nu(e.subarray(d,d+1)),d+=1;for(i+=nu(e.subarray(d,d+1)),d+=1;"\0"!==nu(e.subarray(d,d+1));)s+=nu(e.subarray(d,d+1)),d+=1;s+=nu(e.subarray(d,d+1)),d+=1,r=du(e,12),a=du(e,16),n=du(e,20),l=du(e,24),d=28}else if(1===t){d+=4,r=du(e,d),d+=4;const t=du(e,d);d+=4;const a=du(e,d);for(d+=4,o=2**32*t+a,tc(o)||(o=Number.MAX_SAFE_INTEGER,hc.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),n=du(e,d),d+=4,l=du(e,d),d+=4;"\0"!==nu(e.subarray(d,d+1));)i+=nu(e.subarray(d,d+1)),d+=1;for(i+=nu(e.subarray(d,d+1)),d+=1;"\0"!==nu(e.subarray(d,d+1));)s+=nu(e.subarray(d,d+1)),d+=1;s+=nu(e.subarray(d,d+1)),d+=1}return{schemeIdUri:i,value:s,timeScale:r,presentationTime:o,presentationTimeDelta:a,eventDuration:n,id:l,payload:e.subarray(d,e.byteLength)}}(e);if(Rm.test(s.schemeIdUri)){const e=ec(s.presentationTime)?s.presentationTime/s.timeScale:t+s.presentationTimeDelta/s.timeScale;let r=4294967295===s.eventDuration?Number.POSITIVE_INFINITY:s.eventDuration/s.timeScale;r<=.001&&(r=Number.POSITIVE_INFINITY);const a=s.payload;i.samples.push({data:a,len:a.byteLength,dts:e,pts:e,type:wp,duration:r})}}))}return i}demuxSampleAes(e,t,i){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){}},remux:class{constructor(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null}destroy(){}resetTimeStamp(e){this.initPTS=e,this.lastEndTime=null}resetNextTimestamp(){this.lastEndTime=null}resetInitSegment(e,t,i,s){this.audioCodec=t,this.videoCodec=i,this.generateInitSegment(function(e,t){if(!e||!t)return e;const i=t.keyId;i&&t.isCommonEncryption&&pu(e,["moov","trak"]).forEach((e=>{const t=pu(e,["mdia","minf","stbl","stsd"])[0].subarray(8);let s=pu(t,["enca"]);const r=s.length>0;r||(s=pu(t,["encv"])),s.forEach((e=>{pu(r?e.subarray(28):e.subarray(78),["sinf"]).forEach((e=>{const t=vu(e);if(t){const e=t.subarray(8,24);e.some((e=>0!==e))||(hc.log(`[eme] Patching keyId in 'enc${r?"a":"v"}>sinf>>tenc' box: ${su(e)} -> ${su(i)}`),t.set(i,8))}}))}))}));return e}(e,s)),this.emitInitSegment=!0}generateInitSegment(e){let{audioCodec:t,videoCodec:i}=this;if(null==e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);const s=this.initData=mu(e);s.audio&&(t=sg(s.audio,yc)),s.video&&(i=sg(s.video,Ac));const r={};s.audio&&s.video?r.audiovideo={container:"video/mp4",codec:t+","+i,initSegment:e,id:"main"}:s.audio?r.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:s.video?r.video={container:"video/mp4",codec:i,initSegment:e,id:"main"}:hc.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=r}remux(e,t,i,s,r,a){var o,n;let{initPTS:l,lastEndTime:d}=this;const h={audio:void 0,video:void 0,text:s,id3:i,initSegment:void 0};ec(d)||(d=this.lastEndTime=r||0);const c=t.samples;if(null==c||!c.length)return h;const u={initPTS:void 0,timescale:1};let p=this.initData;if(null!=(o=p)&&o.length||(this.generateInitSegment(c),p=this.initData),null==(n=p)||!n.length)return hc.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),h;this.emitInitSegment&&(u.tracks=this.initTracks,this.emitInitSegment=!1);const f=function(e,t){let i=0,s=0,r=0;const a=pu(e,["moof","traf"]);for(let e=0;e<a.length;e++){const o=a[e],n=pu(o,["tfhd"])[0],l=t[du(n,4)];if(!l)continue;const d=l.default,h=du(n,0)|(null==d?void 0:d.flags);let c=null==d?void 0:d.duration;8&h&&(c=du(n,2&h?12:8));const u=l.timescale||9e4,p=pu(o,["trun"]);for(let e=0;e<p.length;e++)i=_u(p[e]),!i&&c&&(i=c*du(p[e],4)),l.type===Ac?s+=i/u:l.type===yc&&(r+=i/u)}if(0===s&&0===r){let t=1/0,i=0,s=0;const r=pu(e,["sidx"]);for(let e=0;e<r.length;e++){const a=fu(r[e]);if(null!=a&&a.references){t=Math.min(t,a.earliestPresentationTime/a.timescale);const e=a.references.reduce(((e,t)=>e+t.info.duration||0),0);i=Math.max(i,e+a.earliestPresentationTime/a.timescale),s=i-t}}if(s&&ec(s))return s}return s||r}(c,p),m=function(e,t){return pu(t,["moof","traf"]).reduce(((t,i)=>{const s=pu(i,["tfdt"])[0],r=s[0],a=pu(i,["tfhd"]).reduce(((t,i)=>{const a=du(i,4),o=e[a];if(o){let e=du(s,4);if(1===r){if(e===ru)return hc.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),t;e*=ru+1,e+=du(s,8)}const i=e/(o.timescale||9e4);if(ec(i)&&(null===t||i<t))return i}return t}),null);return null!==a&&ec(a)&&(null===t||a<t)?a:t}),null)}(p,c),g=null===m?r:m;(function(e,t,i,s){if(null===e)return!0;const r=Math.max(s,1),a=t-e.baseTime/e.timescale;return Math.abs(a-i)>r}(l,g,r,f)||u.timescale!==l.timescale&&a)&&(u.initPTS=g-r,l&&1===l.timescale&&hc.warn("Adjusting initPTS by "+(u.initPTS-l.baseTime)),this.initPTS=l={baseTime:u.initPTS,timescale:1});const y=e?g-l.baseTime/l.timescale:d,A=y+f;!function(e,t,i){pu(t,["moof","traf"]).forEach((t=>{pu(t,["tfhd"]).forEach((s=>{const r=du(s,4),a=e[r];if(!a)return;const o=a.timescale||9e4;pu(t,["tfdt"]).forEach((e=>{const t=e[0],s=i*o;if(s){let i=du(e,4);if(0===t)i-=s,i=Math.max(i,0),uu(e,4,i);else{i*=Math.pow(2,32),i+=du(e,8),i-=s,i=Math.max(i,0);const t=Math.floor(i/(ru+1)),r=Math.floor(i%(ru+1));uu(e,4,t),uu(e,8,r)}}}))}))}))}(p,c,l.baseTime/l.timescale),f>0?this.lastEndTime=A:(hc.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const b=!!p.audio,v=!!p.video;let _="";b&&(_+="audio"),v&&(_+="video");const S={data1:c,startPTS:y,startDTS:y,endPTS:A,endDTS:A,type:_,hasAudio:b,hasVideo:v,nb:1,dropped:0};return h.audio="audio"===S.type?S:void 0,h.video="audio"!==S.type?S:void 0,h.initSegment=u,h.id3=eg(i,r,l,l),s.samples.length&&(h.text=tg(s,r,l)),h}}},{demux:Om,remux:Xm},{demux:class extends dm{constructor(e,t){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=t}resetInitSegment(e,t,i,s){super.resetInitSegment(e,t,i,s),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:s,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=Gc(e,0);let i=(null==t?void 0:t.length)||0;if(xm(e,i))return!1;for(let t=e.length;i<t;i++)if(mm(e,i))return hc.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return function(e,t){return function(e,t){return t+5<e.length}(e,t)&&cm(e,t)&&pm(e,t)<=e.length-t}(e,t)}appendFrame(e,t,i){gm(e,this.observer,t,i,e.manifestCodec);const s=Am(e,t,i,this.basePTS,this.frameIndex);if(s&&0===s.missing)return s}},remux:Xm},{demux:class extends dm{resetInitSegment(e,t,i,s){super.resetInitSegment(e,t,i,s),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:s,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=Gc(e,0);let i=(null==t?void 0:t.length)||0;if(t&&11===e[i]&&119===e[i+1]&&void 0!==$c(t)&&Dm(e,i)<=16)return!1;for(let t=e.length;i<t;i++)if(xm(e,i))return hc.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return function(e,t){return km(e,t)&&4<=e.length-t}(e,t)}appendFrame(e,t,i){if(null!==this.basePTS)return Em(e,t,i,this.basePTS,this.frameIndex)}},remux:Xm}];rg.splice(2,0,{demux:Lm,remux:Xm});class ag{constructor(e,t,i,s,r){this.async=!1,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=i,this.vendor=s,this.id=r}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,i,s){const r=i.transmuxing;r.executeStart=Km();let a=new Uint8Array(e);const{currentTransmuxState:o,transmuxConfig:n}=this;s&&(this.currentTransmuxState=s);const{contiguous:l,discontinuity:d,trackSwitch:h,accurateTimeOffset:c,timeOffset:u,initSegmentChange:p}=s||o,{audioCodec:f,videoCodec:m,defaultInitPts:g,duration:y,initSegmentData:A}=n,b=function(e,t){let i=null;e.byteLength>0&&null!=(null==t?void 0:t.key)&&null!==t.iv&&null!=t.method&&(i=t);return i}(a,t);if(b&&"AES-128"===b.method){const e=this.getDecrypter();if(!e.isSync())return this.decryptionPromise=e.webCryptoDecrypt(a,b.key.buffer,b.iv.buffer).then((e=>{const t=this.push(e,null,i);return this.decryptionPromise=null,t})),this.decryptionPromise;{let t=e.softwareDecrypt(a,b.key.buffer,b.iv.buffer);if(i.part>-1&&(t=e.flush()),!t)return r.executeEnd=Km(),og(i);a=new Uint8Array(t)}}const v=this.needsProbing(d,h);if(v){const e=this.configureTransmuxer(a);if(e)return hc.warn(`[transmuxer] ${e.message}`),this.observer.emit(sc.ERROR,sc.ERROR,{type:rc.MEDIA_ERROR,details:ac.FRAG_PARSING_ERROR,fatal:!1,error:e,reason:e.message}),r.executeEnd=Km(),og(i)}(d||h||p||v)&&this.resetInitSegment(A,f,m,y,t),(d||p||v)&&this.resetInitialTimestamp(g),l||this.resetContiguity();const _=this.transmux(a,b,u,c,i),S=this.currentTransmuxState;return S.contiguous=!0,S.discontinuity=!1,S.trackSwitch=!1,r.executeEnd=Km(),_}flush(e){const t=e.transmuxing;t.executeStart=Km();const{decrypter:i,currentTransmuxState:s,decryptionPromise:r}=this;if(r)return r.then((()=>this.flush(e)));const a=[],{timeOffset:o}=s;if(i){const t=i.flush();t&&a.push(this.push(t,null,e))}const{demuxer:n,remuxer:l}=this;if(!n||!l)return t.executeEnd=Km(),[og(e)];const d=n.flush(o);return ng(d)?d.then((t=>(this.flushRemux(a,t,e),a))):(this.flushRemux(a,d,e),a)}flushRemux(e,t,i){const{audioTrack:s,videoTrack:r,id3Track:a,textTrack:o}=t,{accurateTimeOffset:n,timeOffset:l}=this.currentTransmuxState;hc.log(`[transmuxer.ts]: Flushed fragment ${i.sn}${i.part>-1?" p: "+i.part:""} of level ${i.level}`);const d=this.remuxer.remux(s,r,a,o,l,n,!0,this.id);e.push({remuxResult:d,chunkMeta:i}),i.transmuxing.executeEnd=Km()}resetInitialTimestamp(e){const{demuxer:t,remuxer:i}=this;t&&i&&(t.resetTimeStamp(e),i.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,i,s,r){const{demuxer:a,remuxer:o}=this;a&&o&&(a.resetInitSegment(e,t,i,s),o.resetInitSegment(e,t,i,r))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,i,s,r){let a;return a=t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,i,s,r):this.transmuxUnencrypted(e,i,s,r),a}transmuxUnencrypted(e,t,i,s){const{audioTrack:r,videoTrack:a,id3Track:o,textTrack:n}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(r,a,o,n,t,i,!1,this.id),chunkMeta:s}}transmuxSampleAes(e,t,i,s,r){return this.demuxer.demuxSampleAes(e,t,i).then((e=>({remuxResult:this.remuxer.remux(e.audioTrack,e.videoTrack,e.id3Track,e.textTrack,i,s,!1,this.id),chunkMeta:r})))}configureTransmuxer(e){const{config:t,observer:i,typeSupported:s,vendor:r}=this;let a;for(let t=0,i=rg.length;t<i;t++){var o;if(null!=(o=rg[t].demux)&&o.probe(e)){a=rg[t];break}}if(!a)return new Error("Failed to find demuxer by probing fragment data");const n=this.demuxer,l=this.remuxer,d=a.remux,h=a.demux;l&&l instanceof d||(this.remuxer=new d(i,t,s,r)),n&&n instanceof h||(this.demuxer=new h(i,t,s),this.probe=h.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new Wf(this.config)),e}}const og=e=>({remuxResult:{},chunkMeta:e});function ng(e){return"then"in e&&e.then instanceof Function}class lg{constructor(e,t,i,s,r){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=i,this.duration=s,this.defaultInitPts=r||null}}class dg{constructor(e,t,i,s,r,a){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=i,this.trackSwitch=s,this.timeOffset=r,this.initSegmentChange=a}}var hg={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,i="~";function s(){}function r(e,t,i){this.fn=e,this.context=t,this.once=i||!1}function a(e,t,s,a,o){if("function"!=typeof s)throw new TypeError("The listener must be a function");var n=new r(s,a||e,o),l=i?i+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],n]:e._events[l].push(n):(e._events[l]=n,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new s:delete e._events[t]}function n(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(i=!1)),n.prototype.eventNames=function(){var e,s,r=[];if(0===this._eventsCount)return r;for(s in e=this._events)t.call(e,s)&&r.push(i?s.slice(1):s);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},n.prototype.listeners=function(e){var t=i?i+e:e,s=this._events[t];if(!s)return[];if(s.fn)return[s.fn];for(var r=0,a=s.length,o=new Array(a);r<a;r++)o[r]=s[r].fn;return o},n.prototype.listenerCount=function(e){var t=i?i+e:e,s=this._events[t];return s?s.fn?1:s.length:0},n.prototype.emit=function(e,t,s,r,a,o){var n=i?i+e:e;if(!this._events[n])return!1;var l,d,h=this._events[n],c=arguments.length;if(h.fn){switch(h.once&&this.removeListener(e,h.fn,void 0,!0),c){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,t),!0;case 3:return h.fn.call(h.context,t,s),!0;case 4:return h.fn.call(h.context,t,s,r),!0;case 5:return h.fn.call(h.context,t,s,r,a),!0;case 6:return h.fn.call(h.context,t,s,r,a,o),!0}for(d=1,l=new Array(c-1);d<c;d++)l[d-1]=arguments[d];h.fn.apply(h.context,l)}else{var u,p=h.length;for(d=0;d<p;d++)switch(h[d].once&&this.removeListener(e,h[d].fn,void 0,!0),c){case 1:h[d].fn.call(h[d].context);break;case 2:h[d].fn.call(h[d].context,t);break;case 3:h[d].fn.call(h[d].context,t,s);break;case 4:h[d].fn.call(h[d].context,t,s,r);break;default:if(!l)for(u=1,l=new Array(c-1);u<c;u++)l[u-1]=arguments[u];h[d].fn.apply(h[d].context,l)}}return!0},n.prototype.on=function(e,t,i){return a(this,e,t,i,!1)},n.prototype.once=function(e,t,i){return a(this,e,t,i,!0)},n.prototype.removeListener=function(e,t,s,r){var a=i?i+e:e;if(!this._events[a])return this;if(!t)return o(this,a),this;var n=this._events[a];if(n.fn)n.fn!==t||r&&!n.once||s&&n.context!==s||o(this,a);else{for(var l=0,d=[],h=n.length;l<h;l++)(n[l].fn!==t||r&&!n[l].once||s&&n[l].context!==s)&&d.push(n[l]);d.length?this._events[a]=1===d.length?d[0]:d:o(this,a)}return this},n.prototype.removeAllListeners=function(e){var t;return e?(t=i?i+e:e,this._events[t]&&o(this,t)):(this._events=new s,this._eventsCount=0),this},n.prototype.off=n.prototype.removeListener,n.prototype.addListener=n.prototype.on,n.prefixed=i,n.EventEmitter=n,e.exports=n}(hg);var cg=Wh(hg.exports);class ug{constructor(e,t,i,s){this.error=null,this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0;const r=e.config;this.hls=e,this.id=t,this.useWorker=!!r.enableWorker,this.onTransmuxComplete=i,this.onFlush=s;const a=(e,t)=>{(t=t||{}).frag=this.frag,t.id=this.id,e===sc.ERROR&&(this.error=t.error),this.hls.trigger(e,t)};this.observer=new cg,this.observer.on(sc.FRAG_DECRYPTED,a),this.observer.on(sc.ERROR,a);const o=Uu(r.preferManagedMediaSource)||{isTypeSupported:()=>!1},n={mpeg:o.isTypeSupported("audio/mpeg"),mp3:o.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:o.isTypeSupported('audio/mp4; codecs="ac-3"')},l=navigator.vendor;if(this.useWorker&&"undefined"!=typeof Worker){if(r.workerPath||"function"==typeof __HLS_WORKER_BUNDLE__){try{r.workerPath?(hc.log(`loading Web Worker ${r.workerPath} for "${t}"`),this.workerContext=function(e){const t=new self.URL(e,self.location.href).href;return{worker:new self.Worker(t),scriptURL:t}}(r.workerPath)):(hc.log(`injecting Web Worker for "${t}"`),this.workerContext=function(){const e=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),t=self.URL.createObjectURL(e);return{worker:new self.Worker(t),objectURL:t}}()),this.onwmsg=e=>this.onWorkerMessage(e);const{worker:e}=this.workerContext;e.addEventListener("message",this.onwmsg),e.onerror=e=>{const i=new Error(`${e.message} (${e.filename}:${e.lineno})`);r.enableWorker=!1,hc.warn(`Error in "${t}" Web Worker, fallback to inline`),this.hls.trigger(sc.ERROR,{type:rc.OTHER_ERROR,details:ac.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:i})},e.postMessage({cmd:"init",typeSupported:n,vendor:l,id:t,config:JSON.stringify(r)})}catch(e){hc.warn(`Error setting up "${t}" Web Worker, fallback to inline`,e),this.resetWorker(),this.error=null,this.transmuxer=new ag(this.observer,n,r,l,t)}return}}this.transmuxer=new ag(this.observer,n,r,l,t)}resetWorker(){if(this.workerContext){const{worker:e,objectURL:t}=this.workerContext;t&&self.URL.revokeObjectURL(t),e.removeEventListener("message",this.onwmsg),e.onerror=null,e.terminate(),this.workerContext=null}}destroy(){if(this.workerContext)this.resetWorker(),this.onwmsg=void 0;else{const e=this.transmuxer;e&&(e.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null}push(e,t,i,s,r,a,o,n,l,d){var h,c;l.transmuxing.start=self.performance.now();const{transmuxer:u}=this,p=a?a.start:r.start,f=r.decryptdata,m=this.frag,g=!(m&&r.cc===m.cc),y=!(m&&l.level===m.level),A=m?l.sn-m.sn:-1,b=this.part?l.part-this.part.index:-1,v=0===A&&l.id>1&&l.id===(null==m?void 0:m.stats.chunkCount),_=!y&&(1===A||0===A&&(1===b||v&&b<=0)),S=self.performance.now();(y||A||0===r.stats.parsing.start)&&(r.stats.parsing.start=S),!a||!b&&_||(a.stats.parsing.start=S);const w=!(m&&(null==(h=r.initSegment)?void 0:h.url)===(null==(c=m.initSegment)?void 0:c.url)),E=new dg(g,_,n,y,p,w);if(!_||g||w){hc.log(`[transmuxer-interface, ${r.type}]: Starting new transmux session for sn: ${l.sn} p: ${l.part} level: ${l.level} id: ${l.id}\n discontinuity: ${g}\n trackSwitch: ${y}\n contiguous: ${_}\n accurateTimeOffset: ${n}\n timeOffset: ${p}\n initSegmentChange: ${w}`);const e=new lg(i,s,t,o,d);this.configureTransmuxer(e)}if(this.frag=r,this.part=a,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:f,chunkMeta:l,state:E},e instanceof ArrayBuffer?[e]:[]);else if(u){const t=u.push(e,f,l,E);ng(t)?(u.async=!0,t.then((e=>{this.handleTransmuxComplete(e)})).catch((e=>{this.transmuxerError(e,l,"transmuxer-interface push error")}))):(u.async=!1,this.handleTransmuxComplete(t))}}flush(e){e.transmuxing.start=self.performance.now();const{transmuxer:t}=this;if(this.workerContext)this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:e});else if(t){let i=t.flush(e);ng(i)||t.async?(ng(i)||(i=Promise.resolve(i)),i.then((t=>{this.handleFlushResult(t,e)})).catch((t=>{this.transmuxerError(t,e,"transmuxer-interface flush error")}))):this.handleFlushResult(i,e)}}transmuxerError(e,t,i){this.hls&&(this.error=e,this.hls.trigger(sc.ERROR,{type:rc.MEDIA_ERROR,details:ac.FRAG_PARSING_ERROR,chunkMeta:t,fatal:!1,error:e,err:e,reason:i}))}handleFlushResult(e,t){e.forEach((e=>{this.handleTransmuxComplete(e)})),this.onFlush(t)}onWorkerMessage(e){const t=e.data,i=this.hls;switch(t.event){case"init":{var s;const e=null==(s=this.workerContext)?void 0:s.objectURL;e&&self.URL.revokeObjectURL(e);break}case"transmuxComplete":this.handleTransmuxComplete(t.data);break;case"flush":this.onFlush(t.data);break;case"workerLog":hc[t.data.logType]&&hc[t.data.logType](t.data.message);break;default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,i.trigger(t.event,t.data)}}configureTransmuxer(e){const{transmuxer:t}=this;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:e}):t&&t.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}function pg(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!fg(e[i].attrs,t[i].attrs))return!1;return!0}function fg(e,t,i){const s=e["STABLE-RENDITION-ID"];return s&&!i?s===t["STABLE-RENDITION-ID"]:!(i||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some((i=>e[i]!==t[i]))}function mg(e,t){return t.label.toLowerCase()===e.name.toLowerCase()&&(!t.language||t.language.toLowerCase()===(e.lang||"").toLowerCase())}class gg{constructor(e){this.buffered=void 0;const t=(t,i,s)=>{if((i>>>=0)>s-1)throw new DOMException(`Failed to execute '${t}' on 'TimeRanges': The index provided (${i}) is greater than the maximum bound (${s})`);return e[i][t]};this.buffered={get length(){return e.length},end:i=>t("end",i,e.length),start:i=>t("start",i,e.length)}}}class yg{constructor(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}append(e,t,i){const s=this.queues[t];s.push(e),1!==s.length||i||this.executeNext(t)}insertAbort(e,t){this.queues[t].unshift(e),this.executeNext(t)}appendBlocker(e){let t;const i=new Promise((e=>{t=e})),s={execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};return this.append(s,e),i}executeNext(e){const t=this.queues[e];if(t.length){const i=t[0];try{i.execute()}catch(t){hc.warn(`[buffer-operation-queue]: Exception executing "${e}" SourceBuffer operation: ${t}`),i.onError(t);const s=this.buffers[e];null!=s&&s.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){this.queues[e].shift(),this.executeNext(e)}current(e){return this.queues[e][0]}}const Ag=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/;function bg(e){const t=e.querySelectorAll("source");[].slice.call(t).forEach((t=>{e.removeChild(t)}))}const vg={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},_g=function(e){let t=e;return vg.hasOwnProperty(e)&&(t=vg[e]),String.fromCharCode(t)},Sg=15,wg=100,Eg={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Tg={17:2,18:4,21:6,22:8,23:10,19:13,20:15},kg={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Cg={25:2,26:4,29:6,30:8,31:10,27:13,28:15},xg=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class Rg{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const i="function"==typeof t?t():t;hc.log(`${this.time} [${e}] ${i}`)}}}const Dg=function(e){const t=[];for(let i=0;i<e.length;i++)t.push(e[i].toString(16));return t};class Lg{constructor(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const t=["foreground","underline","italics","background","flash"];for(let i=0;i<t.length;i++){const s=t[i];e.hasOwnProperty(s)&&(this[s]=e[s])}}isDefault(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash}equals(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}copy(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}toString(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}class Pg{constructor(){this.uchar=" ",this.penState=new Lg}reset(){this.uchar=" ",this.penState.reset()}setChar(e,t){this.uchar=e,this.penState.copy(t)}setPenState(e){this.penState.copy(e)}equals(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)}copy(e){this.uchar=e.uchar,this.penState.copy(e.penState)}isEmpty(){return" "===this.uchar&&this.penState.isDefault()}}class Bg{constructor(e){this.chars=[],this.pos=0,this.currPenState=new Lg,this.cueStartTime=null,this.logger=void 0;for(let e=0;e<wg;e++)this.chars.push(new Pg);this.logger=e}equals(e){for(let t=0;t<wg;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<wg;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<wg;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e}setCursor(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>wg&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=wg)}moveCursor(e){const t=this.pos+e;if(e>1)for(let e=this.pos+1;e<t+1;e++)this.chars[e].setPenState(this.currPenState);this.setCursor(t)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const t=_g(e);this.pos>=wg?this.logger.log(0,(()=>"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!")):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))}clearFromPos(e){let t;for(t=e;t<wg;t++)this.chars[t].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let t=!0;for(let i=0;i<wg;i++){const s=this.chars[i].uchar;" "!==s&&(t=!1),e.push(s)}return t?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e);this.chars[this.pos].setPenState(this.currPenState)}}class Ig{constructor(e){this.rows=[],this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<Sg;t++)this.rows.push(new Bg(e));this.logger=e}reset(){for(let e=0;e<Sg;e++)this.rows[e].clear();this.currRow=14}equals(e){let t=!0;for(let i=0;i<Sg;i++)if(!this.rows[i].equals(e.rows[i])){t=!1;break}return t}copy(e){for(let t=0;t<Sg;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<Sg;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e}backSpace(){this.rows[this.currRow].backSpace()}clearToEndOfRow(){this.rows[this.currRow].clearToEndOfRow()}insertChar(e){this.rows[this.currRow].insertChar(e)}setPen(e){this.rows[this.currRow].setPenStyles(e)}moveCursor(e){this.rows[this.currRow].moveCursor(e)}setCursor(e){this.logger.log(2,"setCursor: "+e);this.rows[this.currRow].setCursor(e)}setPAC(e){this.logger.log(2,(()=>"pacData = "+JSON.stringify(e)));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let e=0;e<Sg;e++)this.rows[e].clear();const e=this.currRow+1-this.nrRollUpRows,i=this.lastOutputScreen;if(i){const s=i.rows[e].cueStartTime,r=this.logger.time;if(null!==s&&null!==r&&s<r)for(let s=0;s<this.nrRollUpRows;s++)this.rows[t-this.nrRollUpRows+s+1].copy(i.rows[e+s])}}this.currRow=t;const i=this.rows[this.currRow];if(null!==e.indent){const t=e.indent,s=Math.max(t-1,0);i.setCursor(e.indent),e.color=i.chars[s].penState.foreground}const s={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(s)}setBkgData(e){this.logger.log(2,(()=>"bkgData = "+JSON.stringify(e))),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(null===this.nrRollUpRows)return void this.logger.log(3,"roll_up but nrRollUpRows not set yet");this.logger.log(1,(()=>this.getDisplayText()));const e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const t=[];let i="",s=-1;for(let i=0;i<Sg;i++){const r=this.rows[i].getTextString();r&&(s=i+1,e?t.push("Row "+s+": '"+r+"'"):t.push(r.trim()))}return t.length>0&&(i=e?"["+t.join(" | ")+"]":t.join("\n")),i}getTextAndFormat(){return this.rows}}class Mg{constructor(e,t,i){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new Ig(i),this.nonDisplayedMemory=new Ig(i),this.lastOutputScreen=new Ig(i),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=i}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,(()=>"MODE="+e)),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);const t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,(()=>t+": "+this.writeScreen.getDisplayText(!0))),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(1,(()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0))),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,(()=>"DISP: "+this.displayedMemory.getDisplayText()))}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{const i=Math.floor(e/2)-16,s=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=s[i]}this.logger.log(2,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)}outputDataUpdate(e=!1){const t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}}class Ug{constructor(e,t,i){this.channels=void 0,this.currentChannel=0,this.cmdHistory={a:null,b:null},this.logger=void 0;const s=this.logger=new Rg;this.channels=[null,new Mg(e,t,s),new Mg(e+1,i,s)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){let i,s,r,a=!1;this.logger.time=e;for(let e=0;e<t.length;e+=2)if(s=127&t[e],r=127&t[e+1],0!==s||0!==r){if(this.logger.log(3,"["+Dg([t[e],t[e+1]])+"] -> ("+Dg([s,r])+")"),i=this.parseCmd(s,r),i||(i=this.parseMidrow(s,r)),i||(i=this.parsePAC(s,r)),i||(i=this.parseBackgroundAttributes(s,r)),!i&&(a=this.parseChars(s,r),a)){const e=this.currentChannel;if(e&&e>0){this.channels[e].insertChars(a)}else this.logger.log(2,"No channel found yet. TEXT-MODE?")}i||a||this.logger.log(2,"Couldn't parse cleaned data "+Dg([s,r])+" orig: "+Dg([t[e],t[e+1]]))}}parseCmd(e,t){const{cmdHistory:i}=this;if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47)&&!((23===e||31===e)&&t>=33&&t<=35))return!1;if(Og(e,t,i))return Fg(null,null,i),this.logger.log(3,"Repeated command ("+Dg([e,t])+") is dropped"),!0;const s=20===e||21===e||23===e?1:2,r=this.channels[s];return 20===e||21===e||28===e||29===e?32===t?r.ccRCL():33===t?r.ccBS():34===t?r.ccAOF():35===t?r.ccAON():36===t?r.ccDER():37===t?r.ccRU(2):38===t?r.ccRU(3):39===t?r.ccRU(4):40===t?r.ccFON():41===t?r.ccRDC():42===t?r.ccTR():43===t?r.ccRTD():44===t?r.ccEDM():45===t?r.ccCR():46===t?r.ccENM():47===t&&r.ccEOC():r.ccTO(t-32),Fg(e,t,i),this.currentChannel=s,!0}parseMidrow(e,t){let i=0;if((17===e||25===e)&&t>=32&&t<=47){if(i=17===e?1:2,i!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const s=this.channels[i];return!!s&&(s.ccMIDROW(t),this.logger.log(3,"MIDROW ("+Dg([e,t])+")"),!0)}return!1}parsePAC(e,t){let i;const s=this.cmdHistory;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127)&&!((16===e||24===e)&&t>=64&&t<=95))return!1;if(Og(e,t,s))return Fg(null,null,s),!0;const r=e<=23?1:2;i=t>=64&&t<=95?1===r?Eg[e]:kg[e]:1===r?Tg[e]:Cg[e];const a=this.channels[r];return!!a&&(a.setPAC(this.interpretPAC(i,t)),Fg(e,t,s),this.currentChannel=r,!0)}interpretPAC(e,t){let i;const s={color:null,italics:!1,indent:null,underline:!1,row:e};return i=t>95?t-96:t-64,s.underline=1==(1&i),i<=13?s.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(i/2)]:i<=15?(s.italics=!0,s.color="white"):s.indent=4*Math.floor((i-16)/2),s}parseChars(e,t){let i,s=null,r=null;if(e>=25?(i=2,r=e-8):(i=1,r=e),r>=17&&r<=19){let e;e=17===r?t+80:18===r?t+112:t+144,this.logger.log(2,"Special char '"+_g(e)+"' in channel "+i),s=[e]}else e>=32&&e<=127&&(s=0===t?[e]:[e,t]);if(s){const i=Dg(s);this.logger.log(3,"Char codes = "+i.join(",")),Fg(e,t,this.cmdHistory)}return s}parseBackgroundAttributes(e,t){if(!((16===e||24===e)&&t>=32&&t<=47)&&!((23===e||31===e)&&t>=45&&t<=47))return!1;let i;const s={};16===e||24===e?(i=Math.floor((t-32)/2),s.background=xg[i],t%2==1&&(s.background=s.background+"_semi")):45===t?s.background="transparent":(s.foreground="black",47===t&&(s.underline=!0));const r=e<=23?1:2;return this.channels[r].setBkgData(s),Fg(e,t,this.cmdHistory),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}this.cmdHistory={a:null,b:null}}cueSplitAtTime(e){for(let t=0;t<this.channels.length;t++){const i=this.channels[t];i&&i.cueSplitAtTime(e)}}}function Fg(e,t,i){i.a=e,i.b=t}function Og(e,t,i){return i.a===e&&i.b===t}class Ng{constructor(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}dispatchCue(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}newCue(e,t,i){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=i,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}var jg=function(){if(null!=Cc&&Cc.VTTCue)return self.VTTCue;const e=["","lr","rl"],t=["start","middle","end","left","right"];function i(e,t){if("string"!=typeof t)return!1;if(!Array.isArray(e))return!1;const i=t.toLowerCase();return!!~e.indexOf(i)&&i}function s(e){return i(t,e)}function r(e,...t){let i=1;for(;i<arguments.length;i++){const t=arguments[i];for(const i in t)e[i]=t[i]}return e}function a(t,a,o){const n=this,l={enumerable:!0};n.hasBeenReset=!1;let d="",h=!1,c=t,u=a,p=o,f=null,m="",g=!0,y="auto",A="start",b=50,v="middle",_=50,S="middle";Object.defineProperty(n,"id",r({},l,{get:function(){return d},set:function(e){d=""+e}})),Object.defineProperty(n,"pauseOnExit",r({},l,{get:function(){return h},set:function(e){h=!!e}})),Object.defineProperty(n,"startTime",r({},l,{get:function(){return c},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");c=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"endTime",r({},l,{get:function(){return u},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");u=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"text",r({},l,{get:function(){return p},set:function(e){p=""+e,this.hasBeenReset=!0}})),Object.defineProperty(n,"region",r({},l,{get:function(){return f},set:function(e){f=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"vertical",r({},l,{get:function(){return m},set:function(t){const s=function(t){return i(e,t)}(t);if(!1===s)throw new SyntaxError("An invalid or illegal string was specified.");m=s,this.hasBeenReset=!0}})),Object.defineProperty(n,"snapToLines",r({},l,{get:function(){return g},set:function(e){g=!!e,this.hasBeenReset=!0}})),Object.defineProperty(n,"line",r({},l,{get:function(){return y},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"lineAlign",r({},l,{get:function(){return A},set:function(e){const t=s(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");A=t,this.hasBeenReset=!0}})),Object.defineProperty(n,"position",r({},l,{get:function(){return b},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"positionAlign",r({},l,{get:function(){return v},set:function(e){const t=s(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");v=t,this.hasBeenReset=!0}})),Object.defineProperty(n,"size",r({},l,{get:function(){return _},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");_=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"align",r({},l,{get:function(){return S},set:function(e){const t=s(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");S=t,this.hasBeenReset=!0}})),n.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}();class zg{decode(e,t){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function Gg(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+parseFloat(s||0)}const i=e.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return i?parseFloat(i[2])>59?t(i[2],i[3],0,i[4]):t(i[1],i[2],i[3],i[4]):null}class Hg{constructor(){this.values=Object.create(null)}set(e,t){this.get(e)||""===t||(this.values[e]=t)}get(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,i){for(let s=0;s<i.length;++s)if(t===i[s]){this.set(e,t);break}}integer(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))}percent(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){const i=parseFloat(t);if(i>=0&&i<=100)return this.set(e,i),!0}return!1}}function Vg(e,t,i,s){const r=s?e.split(s):[e];for(const e in r){if("string"!=typeof r[e])continue;const s=r[e].split(i);if(2!==s.length)continue;t(s[0],s[1])}}const $g=new jg(0,0,""),Wg="middle"===$g.align?"middle":"center";function Jg(e,t,i){const s=e;function r(){const t=Gg(e);if(null===t)throw new Error("Malformed timestamp: "+s);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function a(){e=e.replace(/^\s+/,"")}if(a(),t.startTime=r(),a(),"--\x3e"!==e.slice(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+s);e=e.slice(3),a(),t.endTime=r(),a(),function(e,t){const s=new Hg;Vg(e,(function(e,t){let r;switch(e){case"region":for(let r=i.length-1;r>=0;r--)if(i[r].id===t){s.set(e,i[r].region);break}break;case"vertical":s.alt(e,t,["rl","lr"]);break;case"line":r=t.split(","),s.integer(e,r[0]),s.percent(e,r[0])&&s.set("snapToLines",!1),s.alt(e,r[0],["auto"]),2===r.length&&s.alt("lineAlign",r[1],["start",Wg,"end"]);break;case"position":r=t.split(","),s.percent(e,r[0]),2===r.length&&s.alt("positionAlign",r[1],["start",Wg,"end","line-left","line-right","auto"]);break;case"size":s.percent(e,t);break;case"align":s.alt(e,t,["start",Wg,"end","left","right"])}}),/:/,/\s/),t.region=s.get("region",null),t.vertical=s.get("vertical","");let r=s.get("line","auto");"auto"===r&&-1===$g.line&&(r=-1),t.line=r,t.lineAlign=s.get("lineAlign","start"),t.snapToLines=s.get("snapToLines",!0),t.size=s.get("size",100),t.align=s.get("align",Wg);let a=s.get("position","auto");"auto"===a&&50===$g.position&&(a="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=a}(e,t)}function qg(e){return e.replace(/<br(?: \/)?>/gi,"\n")}class Kg{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new zg,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const t=this;function i(){let e=t.buffer,i=0;for(e=qg(e);i<e.length&&"\r"!==e[i]&&"\n"!==e[i];)++i;const s=e.slice(0,i);return"\r"===e[i]&&++i,"\n"===e[i]&&++i,t.buffer=e.slice(i),s}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{let e="";if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;e=i();const s=e.match(/^()?WEBVTT([ \t].*)?$/);if(null==s||!s[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let s=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(s?s=!1:e=i(),t.state){case"HEADER":/:/.test(e)?Vg(e,(function(e,t){}),/:/):e||(t.state="ID");continue;case"NOTE":e||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(e)){t.state="NOTE";break}if(!e)continue;if(t.cue=new jg(0,0,""),t.state="CUE",-1===e.indexOf("--\x3e")){t.cue.id=e;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{Jg(e,t.cue,t.regionList)}catch(e){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const i=-1!==e.indexOf("--\x3e");if(!e||i&&(s=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(null===t.cue)continue;t.cue.text&&(t.cue.text+="\n"),t.cue.text+=e}continue;case"BADCUE":e||(t.state="ID")}}}catch(e){"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this}flush(){const e=this;try{if((e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state||"BADWEBVTT"===e.state)throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this}}const Yg=/\r\n|\n\r|\n|\r/g,Qg=function(e,t,i=0){return e.slice(i,i+t.length)===t},Xg=function(e){let t=5381,i=e.length;for(;i;)t=33*t^e.charCodeAt(--i);return(t>>>0).toString()};function Zg(e,t,i){return Xg(e.toString())+Xg(t.toString())+Xg(i)}function ey(e,t,i,s,r,a,o){const n=new Kg,l=eu(new Uint8Array(e)).trim().replace(Yg,"\n").split("\n"),d=[],h=t?function(e,t=1){return Jm(e,9e4,1/t)}(t.baseTime,t.timescale):0;let c,u="00:00.000",p=0,f=0,m=!0;n.oncue=function(e){const a=i[s];let o=i.ccOffset;const n=(p-h)/9e4;if(null!=a&&a.new&&(void 0!==f?o=i.ccOffset=a.start:function(e,t,i){let s=e[t],r=e[s.prevCC];if(!r||!r.new&&s.new)return e.ccOffset=e.presentationOffset=s.start,void(s.new=!1);for(;null!=(a=r)&&a.new;){var a;e.ccOffset+=s.start-r.start,s.new=!1,s=r,r=e[s.prevCC]}e.presentationOffset=i}(i,s,n)),n){if(!t)return void(c=new Error("Missing initPTS for VTT MPEGTS"));o=n-i.presentationOffset}const l=e.endTime-e.startTime,u=Zm(9e4*(e.startTime+o-f),9e4*r)/9e4;e.startTime=Math.max(u,0),e.endTime=Math.max(u+l,0);const m=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(m)),e.id||(e.id=Zg(e.startTime,e.endTime,m)),e.endTime>0&&d.push(e)},n.onparsingerror=function(e){c=e},n.onflush=function(){c?o(c):a(d)},l.forEach((e=>{if(m){if(Qg(e,"X-TIMESTAMP-MAP=")){m=!1,e.slice(16).split(",").forEach((e=>{Qg(e,"LOCAL:")?u=e.slice(6):Qg(e,"MPEGTS:")&&(p=parseInt(e.slice(7)))}));try{f=function(e){let t=parseInt(e.slice(-3));const i=parseInt(e.slice(-6,-4)),s=parseInt(e.slice(-9,-7)),r=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!(ec(t)&&ec(i)&&ec(s)&&ec(r)))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*i,t+=6e4*s,t+=36e5*r,t}(u)/1e3}catch(e){c=e}return}""===e&&(m=!1)}n.parse(e+"\n")})),n.flush()}const ty="stpp.ttml.im1t",iy=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,sy=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,ry={left:"start",center:"center",right:"end",start:"start",end:"end"};function ay(e,t,i,s){const r=pu(new Uint8Array(e),["mdat"]);if(0===r.length)return void s(new Error("Could not parse IMSC1 mdat"));const a=r.map((e=>eu(e))),o=function(e,t,i=1,s=!1){return Jm(e,t,1/i,s)}(t.baseTime,1,t.timescale);try{a.forEach((e=>i(function(e,t){const i=new DOMParser,s=i.parseFromString(e,"text/xml").getElementsByTagName("tt")[0];if(!s)throw new Error("Invalid ttml");const r={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},a=Object.keys(r).reduce(((e,t)=>(e[t]=s.getAttribute(`ttp:${t}`)||r[t],e)),{}),o="preserve"!==s.getAttribute("xml:space"),n=ny(oy(s,"styling","style")),l=ny(oy(s,"layout","region")),d=oy(s,"body","[begin]");return[].map.call(d,(e=>{const i=ly(e,o);if(!i||!e.hasAttribute("begin"))return null;const s=cy(e.getAttribute("begin"),a),r=cy(e.getAttribute("dur"),a);let d=cy(e.getAttribute("end"),a);if(null===s)throw hy(e);if(null===d){if(null===r)throw hy(e);d=s+r}const h=new jg(s-t,d-t,i);h.id=Zg(h.startTime,h.endTime,h.text);const c=function(e,t,i){const s="http://www.w3.org/ns/ttml#styling";let r=null;const a=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],o=null!=e&&e.hasAttribute("style")?e.getAttribute("style"):null;o&&i.hasOwnProperty(o)&&(r=i[o]);return a.reduce(((i,a)=>{const o=dy(t,s,a)||dy(e,s,a)||dy(r,s,a);return o&&(i[a]=o),i}),{})}(l[e.getAttribute("region")],n[e.getAttribute("style")],n),{textAlign:u}=c;if(u){const e=ry[u];e&&(h.lineAlign=e),h.align=u}return Zh(h,c),h})).filter((e=>null!==e))}(e,o))))}catch(e){s(e)}}function oy(e,t,i){const s=e.getElementsByTagName(t)[0];return s?[].slice.call(s.querySelectorAll(i)):[]}function ny(e){return e.reduce(((e,t)=>{const i=t.getAttribute("xml:id");return i&&(e[i]=t),e}),{})}function ly(e,t){return[].slice.call(e.childNodes).reduce(((e,i,s)=>{var r;return"br"===i.nodeName&&s?e+"\n":null!=(r=i.childNodes)&&r.length?ly(i,t):t?e+i.textContent.trim().replace(/\s+/g," "):e+i.textContent}),"")}function dy(e,t,i){return e&&e.hasAttributeNS(t,i)?e.getAttributeNS(t,i):null}function hy(e){return new Error(`Could not parse ttml timestamp ${e}`)}function cy(e,t){if(!e)return null;let i=Gg(e);return null===i&&(iy.test(e)?i=function(e,t){const i=iy.exec(e),s=(0|i[4])+(0|i[5])/t.subFrameRate;return 3600*(0|i[1])+60*(0|i[2])+(0|i[3])+s/t.frameRate}(e,t):sy.test(e)&&(i=function(e,t){const i=sy.exec(e),s=Number(i[1]);switch(i[2]){case"h":return 3600*s;case"m":return 60*s;case"ms":return 1e3*s;case"f":return s/t.frameRate;case"t":return s/t.tickRate}return s}(e,t))),i}function uy(e){return e.characteristics&&/transcribes-spoken-dialog/gi.test(e.characteristics)&&/describes-music-and-sound/gi.test(e.characteristics)?"captions":"subtitles"}function py(e,t){return!!e&&e.kind===uy(t)&&mg(t,e)}class fy{constructor(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}setStreamController(e){this.streamController=e}destroy(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(sc.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(sc.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(sc.MANIFEST_PARSED,this.onManifestParsed,this),e.on(sc.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(sc.BUFFER_CODECS,this.onBufferCodecs,this),e.on(sc.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(sc.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(sc.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(sc.MANIFEST_PARSED,this.onManifestParsed,this),e.off(sc.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(sc.BUFFER_CODECS,this.onBufferCodecs,this),e.off(sc.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const i=this.hls.levels[t.droppedLevel];this.isLevelAllowed(i)&&this.restrictedLevels.push({bitrate:i.bitrate,height:i.height,width:i.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const i=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,i.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&ec(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping()}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0)return void(this.clientRect=null);const e=this.hls.levels;if(e.length){const t=this.hls,i=this.getMaxLevel(e.length-1);i!==this.autoLevelCapping&&hc.log(`Setting autoLevelCapping to ${i}: ${e[i].height}p@${e[i].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=i,t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const i=t.filter(((t,i)=>this.isLevelAllowed(t)&&i<=e));return this.clientRect=null,fy.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,t={width:0,height:0};if(e){const i=e.getBoundingClientRect();t.width=i.width,t.height=i.height,t.width||t.height||(t.width=i.right-i.left||e.width||0,t.height=i.bottom-i.top||e.height||0)}return this.clientRect=t,t}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(e){}return e}isLevelAllowed(e){return!this.restrictedLevels.some((t=>e.bitrate===t.bitrate&&e.width===t.width&&e.height===t.height))}static getMaxLevelByMediaSize(e,t,i){if(null==e||!e.length)return-1;let s=e.length-1;const r=Math.max(t,i);for(let t=0;t<e.length;t+=1){const i=e[t];if((i.width>=r||i.height>=r)&&(a=i,!(o=e[t+1])||a.width!==o.width||a.height!==o.height)){s=t;break}}var a,o;return s}}const my="[eme]";class gy{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=gy.CDMCleanupPromise?[gy.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=hc.debug.bind(hc,my),this.log=hc.log.bind(hc,my),this.warn=hc.warn.bind(hc,my),this.error=hc.error.bind(hc,my),this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.unregisterListeners(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.onMediaEncrypted=this.onWaitingForKey=this.keyIdToKeySessionPromise=null,this.config=null}registerListeners(){this.hls.on(sc.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(sc.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(sc.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(sc.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(sc.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(sc.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(sc.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(sc.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:i}=this.config,s=t[e];if(s)return s.licenseUrl;if(e===xc.WIDEVINE&&i)return i;throw new Error(`no license server URL configured for key-system "${e}"`)}getServerCertificateUrl(e){const{drmSystems:t}=this.config,i=t[e];if(i)return i.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,i=(e,t,i)=>!!e&&i.indexOf(e)===t,s=t.map((e=>e.audioCodec)).filter(i),r=t.map((e=>e.videoCodec)).filter(i);return s.length+r.length===0&&r.push("avc1.42e01e"),new Promise(((t,i)=>{const a=e=>{const o=e.shift();this.getMediaKeysPromise(o,s,r).then((e=>t({keySystem:o,mediaKeys:e}))).catch((t=>{e.length?a(e):i(t instanceof yy?t:new yy({type:rc.KEY_SYSTEM_ERROR,details:ac.KEY_SYSTEM_NO_ACCESS,error:t,fatal:!0},t.message))}))};a(e)}))}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:i}=this.config;if("function"!=typeof i){let e=`Configured requestMediaKeySystemAccess is not a function ${i}`;return null===Fc&&"http:"===self.location.protocol&&(e=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(e))}return i(e,t)}getMediaKeysPromise(e,t,i){const s=function(e,t,i,s){let r;switch(e){case xc.FAIRPLAY:r=["cenc","sinf"];break;case xc.WIDEVINE:case xc.PLAYREADY:r=["cenc"];break;case xc.CLEARKEY:r=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${e}`)}return function(e,t,i,s){return[{initDataTypes:e,persistentState:s.persistentState||"optional",distinctiveIdentifier:s.distinctiveIdentifier||"optional",sessionTypes:s.sessionTypes||[s.sessionType||"temporary"],audioCapabilities:t.map((e=>({contentType:`audio/mp4; codecs="${e}"`,robustness:s.audioRobustness||"",encryptionScheme:s.audioEncryptionScheme||null}))),videoCapabilities:i.map((e=>({contentType:`video/mp4; codecs="${e}"`,robustness:s.videoRobustness||"",encryptionScheme:s.videoEncryptionScheme||null})))}]}(r,t,i,s)}(e,t,i,this.config.drmSystemOptions),r=this.keySystemAccessPromises[e];let a=null==r?void 0:r.keySystemAccess;if(!a){this.log(`Requesting encrypted media "${e}" key-system access with config: ${JSON.stringify(s)}`),a=this.requestMediaKeySystemAccess(e,s);const t=this.keySystemAccessPromises[e]={keySystemAccess:a};return a.catch((t=>{this.log(`Failed to obtain access to key-system "${e}": ${t}`)})),a.then((i=>{this.log(`Access for key-system "${i.keySystem}" obtained`);const s=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),t.mediaKeys=i.createMediaKeys().then((t=>(this.log(`Media-keys created for "${e}"`),s.then((i=>i?this.setMediaKeysServerCertificate(t,e,i):t))))),t.mediaKeys.catch((t=>{this.error(`Failed to create media-keys for "${e}"}: ${t}`)})),t.mediaKeys}))}return a.then((()=>r.mediaKeys))}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:i}){this.log(`Creating key-system session "${t}" keyId: ${su(e.keyId||[])}`);const s=i.createSession(),r={decryptdata:e,keySystem:t,mediaKeys:i,mediaKeysSession:s,keyStatus:"status-pending"};return this.mediaKeySessions.push(r),r}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const i=this.createMediaKeySessionContext(e),s=this.getKeyIdString(t),r="cenc";this.keyIdToKeySessionPromise[s]=this.generateRequestWithPreferredKeySession(i,r,t.pssh,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}getKeyIdString(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(null===e.keyId)throw new Error("keyId is null");return su(e.keyId)}updateKeySession(e,t){var i;const s=e.mediaKeysSession;return this.log(`Updating key-session "${s.sessionId}" for keyID ${su((null==(i=e.decryptdata)?void 0:i.keyId)||[])}\n } (data length: ${t?t.byteLength:t})`),s.update(t)}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){return new Promise(((t,i)=>{const s=Uc(this.config),r=e.map(Bc).filter((e=>!!e&&-1!==s.indexOf(e)));return this.getKeySystemSelectionPromise(r).then((({keySystem:e})=>{const s=Mc(e);s?t(s):i(new Error(`Unable to find format for key-system "${e}"`))})).catch(i)}))}loadKey(e){const t=e.keyInfo.decryptdata,i=this.getKeyIdString(t),s=`(keyId: ${i} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${s}`);let r=this.keyIdToKeySessionPromise[i];return r||(r=this.keyIdToKeySessionPromise[i]=this.getKeySystemForKeyPromise(t).then((({keySystem:i,mediaKeys:r})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${s}`),this.attemptSetMediaKeys(i,r).then((()=>{this.throwIfDestroyed();const e=this.createMediaKeySessionContext({keySystem:i,mediaKeys:r,decryptdata:t});return this.generateRequestWithPreferredKeySession(e,"cenc",t.pssh,"playlist-key")}))))),r.catch((e=>this.handleError(e)))),r}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof yy?this.hls.trigger(sc.ERROR,e.data):this.hls.trigger(sc.ERROR,{type:rc.KEY_SYSTEM_ERROR,details:ac.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),i=this.keyIdToKeySessionPromise[t];if(!i){const t=Bc(e.keyFormat),i=t?[t]:Uc(this.config);return this.attemptKeySystemAccess(i)}return i}getKeySystemSelectionPromise(e){if(e.length||(e=Uc(this.config)),0===e.length)throw new yy({type:rc.KEY_SYSTEM_ERROR,details:ac.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${JSON.stringify({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}_onMediaEncrypted(e){const{initDataType:t,initData:i}=e;if(this.debug(`"${e.type}" event: init data type: "${t}"`),null===i)return;let s,r;if("sinf"===t&&this.config.drmSystems[xc.FAIRPLAY]){const e=nu(new Uint8Array(i));try{const t=Ec(JSON.parse(e).sinf),i=vu(new Uint8Array(t));if(!i)return;s=i.subarray(8,24),r=xc.FAIRPLAY}catch(e){return void this.warn('Failed to parse sinf "encrypted" event message initData')}}else{const e=function(e){if(!(e instanceof ArrayBuffer)||e.byteLength<32)return null;const t={version:0,systemId:"",kids:null,data:null},i=new DataView(e),s=i.getUint32(0);if(e.byteLength!==s&&s>44)return null;if(1886614376!==i.getUint32(4))return null;if(t.version=i.getUint32(8)>>>24,t.version>1)return null;t.systemId=su(new Uint8Array(e,12,16));const r=i.getUint32(28);if(0===t.version){if(s-32<r)return null;t.data=new Uint8Array(e,32,r)}else if(1===t.version){t.kids=[];for(let i=0;i<r;i++)t.kids.push(new Uint8Array(e,32+16*i,16))}return t}(i);if(null===e)return;0===e.version&&e.systemId===Ic&&e.data&&(s=e.data.subarray(8,24)),r=function(e){if(e===Ic)return xc.WIDEVINE}(e.systemId)}if(!r||!s)return;const a=su(s),{keyIdToKeySessionPromise:o,mediaKeySessions:n}=this;let l=o[a];for(let e=0;e<n.length;e++){const r=n[e],d=r.decryptdata;if(d.pssh||!d.keyId)continue;const h=su(d.keyId);if(a===h||-1!==d.uri.replace(/-/g,"").indexOf(a)){l=o[h],delete o[h],d.pssh=new Uint8Array(i),d.keyId=s,l=o[a]=l.then((()=>this.generateRequestWithPreferredKeySession(r,t,i,"encrypted-event-key-match")));break}}l||(l=o[a]=this.getKeySystemSelectionPromise([r]).then((({keySystem:e,mediaKeys:r})=>{var o;this.throwIfDestroyed();const n=new Ru("ISO-23001-7",a,null!=(o=Mc(e))?o:"");return n.pssh=new Uint8Array(i),n.keyId=s,this.attemptSetMediaKeys(e,r).then((()=>{this.throwIfDestroyed();const s=this.createMediaKeySessionContext({decryptdata:n,keySystem:e,mediaKeys:r});return this.generateRequestWithPreferredKeySession(s,t,i,"encrypted-event-no-match")}))}))),l.catch((e=>this.handleError(e)))}_onWaitingForKey(e){this.log(`"${e.type}" event`)}attemptSetMediaKeys(e,t){const i=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const s=Promise.all(i).then((()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)}));return this.setMediaKeysQueue.push(s),s.then((()=>{this.log(`Media-keys set for "${e}"`),i.push(s),this.setMediaKeysQueue=this.setMediaKeysQueue.filter((e=>-1===i.indexOf(e)))}))}generateRequestWithPreferredKeySession(e,t,i,s){var r,a;const o=null==(r=this.config.drmSystems)||null==(a=r[e.keySystem])?void 0:a.generateRequest;if(o)try{const s=o.call(this.hls,t,i,e);if(!s)throw new Error("Invalid response from configured generateRequest filter");t=s.initDataType,i=e.decryptdata.pssh=s.initData?new Uint8Array(s.initData):null}catch(e){var n;if(this.warn(e.message),null!=(n=this.hls)&&n.config.debug)throw e}if(null===i)return this.log(`Skipping key-session request for "${s}" (no initData)`),Promise.resolve(e);const l=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${s}": ${l} (init data type: ${t} length: ${i?i.byteLength:null})`);const d=new cg,h=e._onmessage=t=>{const i=e.mediaKeysSession;if(!i)return void d.emit("error",new Error("invalid state"));const{messageType:s,message:r}=t;this.log(`"${s}" message event for session "${i.sessionId}" message size: ${r.byteLength}`),"license-request"===s||"license-renewal"===s?this.renewLicense(e,r).catch((e=>{this.handleError(e),d.emit("error",e)})):"license-release"===s?e.keySystem===xc.FAIRPLAY&&(this.updateKeySession(e,kc("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${s}"`)},c=e._onkeystatuseschange=t=>{if(!e.mediaKeysSession)return void d.emit("error",new Error("invalid state"));this.onKeyStatusChange(e);const i=e.keyStatus;d.emit("keyStatus",i),"expired"===i&&(this.warn(`${e.keySystem} expired for key ${l}`),this.renewKeySession(e))};e.mediaKeysSession.addEventListener("message",h),e.mediaKeysSession.addEventListener("keystatuseschange",c);const u=new Promise(((e,t)=>{d.on("error",t),d.on("keyStatus",(i=>{i.startsWith("usable")?e():"output-restricted"===i?t(new yy({type:rc.KEY_SYSTEM_ERROR,details:ac.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):"internal-error"===i?t(new yy({type:rc.KEY_SYSTEM_ERROR,details:ac.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${i}"`)):"expired"===i?t(new Error("key expired while generating request")):this.warn(`unhandled key status change "${i}"`)}))}));return e.mediaKeysSession.generateRequest(t,i).then((()=>{var t;this.log(`Request generated for key-session "${null==(t=e.mediaKeysSession)?void 0:t.sessionId}" keyId: ${l}`)})).catch((e=>{throw new yy({type:rc.KEY_SYSTEM_ERROR,details:ac.KEY_SYSTEM_NO_SESSION,error:e,fatal:!1},`Error generating key-session request: ${e}`)})).then((()=>u)).catch((t=>{throw d.removeAllListeners(),this.removeSession(e),t})).then((()=>(d.removeAllListeners(),e)))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach(((t,i)=>{this.log(`key status change "${t}" for keyStatuses keyId: ${su("buffer"in i?new Uint8Array(i.buffer,i.byteOffset,i.byteLength):new Uint8Array(i))} session keyId: ${su(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=t}))}fetchServerCertificate(e){const t=this.config,i=new(0,t.loader)(t),s=this.getServerCertificateUrl(e);return s?(this.log(`Fetching server certificate for "${e}"`),new Promise(((r,a)=>{const o={responseType:"arraybuffer",url:s},n=t.certLoadPolicy.default,l={loadPolicy:n,timeout:n.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(e,t,i,s)=>{r(e.data)},onError:(t,i,r,n)=>{a(new yy({type:rc.KEY_SYSTEM_ERROR,details:ac.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:r,response:Yh({url:o.url,data:void 0},t)},`"${e}" certificate request failed (${s}). Status: ${t.code} (${t.text})`))},onTimeout:(t,i,r)=>{a(new yy({type:rc.KEY_SYSTEM_ERROR,details:ac.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:r,response:{url:o.url,data:void 0}},`"${e}" certificate request timed out (${s})`))},onAbort:(e,t,i)=>{a(new Error("aborted"))}};i.load(o,l,d)}))):Promise.resolve()}setMediaKeysServerCertificate(e,t,i){return new Promise(((s,r)=>{e.setServerCertificate(i).then((r=>{this.log(`setServerCertificate ${r?"success":"not supported by CDM"} (${null==i?void 0:i.byteLength}) on "${t}"`),s(e)})).catch((e=>{r(new yy({type:rc.KEY_SYSTEM_ERROR,details:ac.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:e,fatal:!0},e.message))}))}))}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then((t=>this.updateKeySession(e,new Uint8Array(t)).catch((e=>{throw new yy({type:rc.KEY_SYSTEM_ERROR,details:ac.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:e,fatal:!0},e.message)}))))}unpackPlayReadyKeyMessage(e,t){const i=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!i.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const s=(new DOMParser).parseFromString(i,"application/xml"),r=s.querySelectorAll("HttpHeader");if(r.length>0){let t;for(let i=0,s=r.length;i<s;i++){var a,o;t=r[i];const s=null==(a=t.querySelector("name"))?void 0:a.textContent,n=null==(o=t.querySelector("value"))?void 0:o.textContent;s&&n&&e.setRequestHeader(s,n)}}const n=s.querySelector("Challenge"),l=null==n?void 0:n.textContent;if(!l)throw new Error("Cannot find <Challenge> in key message");return kc(atob(l))}setupLicenseXHR(e,t,i,s){const r=this.config.licenseXhrSetup;return r?Promise.resolve().then((()=>{if(!i.decryptdata)throw new Error("Key removed");return r.call(this.hls,e,t,i,s)})).catch((a=>{if(!i.decryptdata)throw a;return e.open("POST",t,!0),r.call(this.hls,e,t,i,s)})).then((i=>{e.readyState||e.open("POST",t,!0);return{xhr:e,licenseChallenge:i||s}})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:s}))}requestLicense(e,t){const i=this.config.keyLoadPolicy.default;return new Promise(((s,r)=>{const a=this.getLicenseServerUrl(e.keySystem);this.log(`Sending license request to URL: ${a}`);const o=new XMLHttpRequest;o.responseType="arraybuffer",o.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return r(new Error("invalid state"));if(4===o.readyState)if(200===o.status){this._requestLicenseFailureCount=0;let t=o.response;this.log(`License received ${t instanceof ArrayBuffer?t.byteLength:t}`);const i=this.config.licenseResponseCallback;if(i)try{t=i.call(this.hls,o,a,e)}catch(e){this.error(e)}s(t)}else{const n=i.errorRetry,l=n?n.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>l||o.status>=400&&o.status<500)r(new yy({type:rc.KEY_SYSTEM_ERROR,details:ac.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:o,response:{url:a,data:void 0,code:o.status,text:o.statusText}},`License Request XHR failed (${a}). Status: ${o.status} (${o.statusText})`));else{const i=l-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${i} attempts left`),this.requestLicense(e,t).then(s,r)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=o,this.setupLicenseXHR(o,a,e,t).then((({xhr:t,licenseChallenge:i})=>{e.keySystem==xc.PLAYREADY&&(i=this.unpackPlayReadyKeyMessage(t,i)),t.send(i)}))}))}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const i=t.media;this.media=i,i.addEventListener("encrypted",this.onMediaEncrypted),i.addEventListener("waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media,t=this.mediaKeySessions;e&&(e.removeEventListener("encrypted",this.onMediaEncrypted),e.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},Ru.clearKeyUriToKeyIdMap();const i=t.length;gy.CDMCleanupPromise=Promise.all(t.map((e=>this.removeSession(e))).concat(null==e?void 0:e.setMediaKeys(null).catch((e=>{this.log(`Could not clear media keys: ${e}`)})))).then((()=>{i&&(this.log("finished closing key sessions and clearing media keys"),t.length=0)})).catch((e=>{this.log(`Could not close sessions and clear media keys: ${e}`)}))}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(t&&this.config.emeEnabled&&!this.keyFormatPromise){const e=t.reduce(((e,t)=>(-1===e.indexOf(t.keyFormat)&&e.push(t.keyFormat),e)),[]);this.log(`Selecting key-system from session-keys ${e.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(e)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:i}=e;if(t){this.log(`Remove licenses and keys and close session ${t.sessionId}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),i&&i.readyState!==XMLHttpRequest.DONE&&i.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const s=this.mediaKeySessions.indexOf(e);return s>-1&&this.mediaKeySessions.splice(s,1),t.remove().catch((e=>{this.log(`Could not remove session: ${e}`)})).then((()=>t.close())).catch((e=>{this.log(`Could not close session: ${e}`)}))}}}gy.CDMCleanupPromise=void 0;class yy extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}var Ay,by,vy;!function(e){e.MANIFEST="m",e.AUDIO="a",e.VIDEO="v",e.MUXED="av",e.INIT="i",e.CAPTION="c",e.TIMED_TEXT="tt",e.KEY="k",e.OTHER="o"}(Ay||(Ay={})),function(e){e.DASH="d",e.HLS="h",e.SMOOTH="s",e.OTHER="o"}(by||(by={})),function(e){e.OBJECT="CMCD-Object",e.REQUEST="CMCD-Request",e.SESSION="CMCD-Session",e.STATUS="CMCD-Status"}(vy||(vy={}));const _y={[vy.OBJECT]:["br","d","ot","tb"],[vy.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[vy.SESSION]:["cid","pr","sf","sid","st","v"],[vy.STATUS]:["bs","rtp"]};class Sy{constructor(e,t){this.value=void 0,this.params=void 0,Array.isArray(e)&&(e=e.map((e=>e instanceof Sy?e:new Sy(e)))),this.value=e,this.params=t}}class wy{constructor(e){this.description=void 0,this.description=e}}function Ey(e,t,i,s){return new Error(`failed to ${e} "${r=t,Array.isArray(r)?JSON.stringify(r):r instanceof Map?"Map{}":r instanceof Set?"Set{}":"object"==typeof r?JSON.stringify(r):String(r)}" as ${i}`,{cause:s});var r}const Ty="Bare Item";const ky=/[\x00-\x1f\x7f]+/;function Cy(e,t,i){return Ey("serialize",e,t,i)}function xy(e){if(!1===ArrayBuffer.isView(e))throw Cy(e,"Byte Sequence");return`:${t=e,btoa(String.fromCharCode(...t))}:`;var t}function Ry(e){if(function(e){return e<-999999999999999||999999999999999<e}(e))throw Cy(e,"Integer");return e.toString()}function Dy(e,t){if(e<0)return-Dy(-e,t);const i=Math.pow(10,t);if(Math.abs(e*i%1-.5)<Number.EPSILON){const t=Math.floor(e*i);return(t%2==0?t:t+1)/i}return Math.round(e*i)/i}function Ly(e){const t=Dy(e,3);if(Math.floor(Math.abs(t)).toString().length>12)throw Cy(e,"Decimal");const i=t.toString();return i.includes(".")?i:`${i}.0`}function Py(e){const t=(i=e).description||i.toString().slice(7,-1);var i;if(!1===/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(t))throw Cy(t,"Token");return t}function By(e){switch(typeof e){case"number":if(!ec(e))throw Cy(e,Ty);return Number.isInteger(e)?Ry(e):Ly(e);case"string":return function(e){if(ky.test(e))throw Cy(e,"String");return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}(e);case"symbol":return Py(e);case"boolean":return function(e){if("boolean"!=typeof e)throw Cy(e,"Boolean");return e?"?1":"?0"}(e);case"object":if(e instanceof Date)return function(e){return`@${Ry(e.getTime()/1e3)}`}(e);if(e instanceof Uint8Array)return xy(e);if(e instanceof wy)return Py(e);default:throw Cy(e,Ty)}}function Iy(e){if(!1===/^[a-z*][a-z0-9\-_.*]*$/.test(e))throw Cy(e,"Key");return e}function My(e){return null==e?"":Object.entries(e).map((([e,t])=>!0===t?`;${Iy(e)}`:`;${Iy(e)}=${By(t)}`)).join("")}function Uy(e){return e instanceof Sy?`${By(e.value)}${My(e.params)}`:By(e)}function Fy(e,t={whitespace:!0}){if("object"!=typeof e)throw Cy(e,"Dict");const i=e instanceof Map?e.entries():Object.entries(e),s=null!=t&&t.whitespace?" ":"";return Array.from(i).map((([e,t])=>{t instanceof Sy==!1&&(t=new Sy(t));let i=Iy(e);var s;return!0===t.value?i+=My(t.params):(i+="=",Array.isArray(t.value)?i+=`(${(s=t).value.map(Uy).join(" ")})${My(s.params)}`:i+=Uy(t)),i})).join(`,${s}`)}const Oy=e=>Math.round(e),Ny=e=>100*Oy(e/100),jy={br:Oy,d:Oy,bl:Ny,dl:Ny,mtp:Ny,nor:(e,t)=>(null!=t&&t.baseUrl&&(e=function(e,t){const i=new URL(e),s=new URL(t);if(i.origin!==s.origin)return e;const r=i.pathname.split("/").slice(1),a=s.pathname.split("/").slice(1,-1);for(;r[0]===a[0];)r.shift(),a.shift();for(;a.length;)a.shift(),r.unshift("..");return r.join("/")}(e,t.baseUrl)),encodeURIComponent(e)),rtp:Ny,tb:Oy};function zy(e,t){const i={};if(null==e||"object"!=typeof e)return i;const s=Object.keys(e).sort(),r=Zh({},jy,null==t?void 0:t.formatters),a=null==t?void 0:t.filter;return s.forEach((s=>{if(null!=a&&a(s))return;let o=e[s];const n=r[s];n&&(o=n(o,t)),"v"===s&&1===o||"pr"==s&&1===o||(e=>"number"==typeof e?ec(e):null!=e&&""!==e&&!1!==e)(o)&&((e=>"ot"===e||"sf"===e||"st"===e)(s)&&"string"==typeof o&&(o=new wy(o)),i[s]=o)})),i}function Gy(e,t={}){return e?function(e,t){return Fy(e,t)}(zy(e,t),Zh({whitespace:!1},t)):""}function Hy(e,t,i){return Zh(e,function(e,t={}){if(!e)return{};const i=Object.entries(e),s=Object.entries(_y).concat(Object.entries((null==t?void 0:t.customHeaderMap)||{})),r=i.reduce(((e,t)=>{var i;const[r,a]=t,o=(null==(i=s.find((e=>e[1].includes(r))))?void 0:i[0])||vy.REQUEST;return null!=e[o]||(e[o]={}),e[o][r]=a,e}),{});return Object.entries(r).reduce(((e,[i,s])=>(e[i]=Gy(s,t),e)),{})}(t,i))}const Vy=/CMCD=[^&#]+/;function $y(e,t,i){const s=function(e,t={}){if(!e)return"";const i=Gy(e,t);return`CMCD=${encodeURIComponent(i)}`}(t,i);if(!s)return e;if(Vy.test(e))return e.replace(Vy,s);const r=e.includes("?")?"&":"?";return`${e}${r}${s}`}function Wy(e,t,i,s){e&&Object.keys(t).forEach((r=>{const a=e.filter((e=>e.groupId===r)).map((e=>{const a=Zh({},e);return a.details=void 0,a.attrs=new pc(a.attrs),a.url=a.attrs.URI=Jy(e.url,e.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",i),a.groupId=a.attrs["GROUP-ID"]=t[r],a.attrs["PATHWAY-ID"]=s,a}));e.push(...a)}))}function Jy(e,t,i,s){const{HOST:r,PARAMS:a,[i]:o}=s;let n;t&&(n=null==o?void 0:o[t],n&&(e=n));const l=new self.URL(e);return r&&!n&&(l.host=r),a&&Object.keys(a).sort().forEach((e=>{e&&l.searchParams.set(e,a[e])})),l.href}const qy=/^age:\s*[\d.]+\s*$/im;class Ky{constructor(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new gc,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null,this.stats=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,i){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=i,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const i=this.loader=new self.XMLHttpRequest,s=this.stats;s.loading.first=0,s.loaded=0,s.aborted=!1;const r=this.xhrSetup;r?Promise.resolve().then((()=>{if(!this.stats.aborted)return r(i,t.url)})).catch((e=>(i.open("GET",t.url,!0),r(i,t.url)))).then((()=>{this.stats.aborted||this.openAndSendXhr(i,t,e)})).catch((e=>{this.callbacks.onError({code:i.status,text:e.message},t,i,s)})):this.openAndSendXhr(i,t,e)}openAndSendXhr(e,t,i){e.readyState||e.open("GET",t.url,!0);const s=t.headers,{maxTimeToFirstByteMs:r,maxLoadTimeMs:a}=i.loadPolicy;if(s)for(const t in s)e.setRequestHeader(t,s[t]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),i.timeout=r&&ec(r)?r:a,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:i}=this;if(!e||!t)return;const s=t.readyState,r=this.config;if(!i.aborted&&s>=2&&(0===i.loading.first&&(i.loading.first=Math.max(self.performance.now(),i.loading.start),r.timeout!==r.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),r.timeout=r.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.loadPolicy.maxLoadTimeMs-(i.loading.first-i.loading.start)))),4===s)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const s=t.status,a="text"!==t.responseType;if(s>=200&&s<300&&(a&&t.response||null!==t.responseText)){i.loading.end=Math.max(self.performance.now(),i.loading.first);const r=a?t.response:t.responseText,o="arraybuffer"===t.responseType?r.byteLength:r.length;if(i.loaded=i.total=o,i.bwEstimate=8e3*i.total/(i.loading.end-i.loading.first),!this.callbacks)return;const n=this.callbacks.onProgress;if(n&&n(i,e,r,t),!this.callbacks)return;const l={url:t.responseURL,data:r,code:s};this.callbacks.onSuccess(l,i,e,t)}else{const a=r.loadPolicy.errorRetry;Yp(a,i.retry,!1,{url:e.url,data:void 0,code:s})?this.retry(a):(hc.error(`${s} while loading ${e.url}`),this.callbacks.onError({code:s,text:t.statusText},e,t,i))}}}loadtimeout(){var e;const t=null==(e=this.config)?void 0:e.loadPolicy.timeoutRetry;if(Yp(t,this.stats.retry,!0))this.retry(t);else{var i;hc.warn(`timeout while loading ${null==(i=this.context)?void 0:i.url}`);const e=this.callbacks;e&&(this.abortInternal(),e.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:i}=this;this.retryDelay=qp(e,i.retry),i.retry++,hc.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${null==t?void 0:t.url}, retrying ${i.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&qy.test(this.loader.getAllResponseHeaders())){const t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}const Yy=/(\d+)-(\d+)\/(\d+)/;class Qy{constructor(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=null,this.response=null,this.controller=void 0,this.context=null,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||Xy,this.controller=new self.AbortController,this.stats=new gc}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,i){const s=this.stats;if(s.loading.start)throw new Error("Loader can only be used once.");s.loading.start=self.performance.now();const r=function(e,t){const i={method:"GET",mode:"cors",credentials:"same-origin",signal:t,headers:new self.Headers(Zh({},e.headers))};e.rangeEnd&&i.headers.set("Range","bytes="+e.rangeStart+"-"+String(e.rangeEnd-1));return i}(e,this.controller.signal),a=i.onProgress,o="arraybuffer"===e.responseType,n=o?"byteLength":"length",{maxTimeToFirstByteMs:l,maxLoadTimeMs:d}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=i,this.request=this.fetchSetup(e,r),self.clearTimeout(this.requestTimeout),t.timeout=l&&ec(l)?l:d,this.requestTimeout=self.setTimeout((()=>{this.abortInternal(),i.onTimeout(s,e,this.response)}),t.timeout),self.fetch(this.request).then((r=>{this.response=this.loader=r;const n=Math.max(self.performance.now(),s.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=d,this.requestTimeout=self.setTimeout((()=>{this.abortInternal(),i.onTimeout(s,e,this.response)}),d-(n-s.loading.start)),!r.ok){const{status:e,statusText:t}=r;throw new Zy(t||"fetch, bad network response",e,r)}return s.loading.first=n,s.total=function(e){const t=e.get("Content-Range");if(t){const e=function(e){const t=Yy.exec(e);if(t)return parseInt(t[2])-parseInt(t[1])+1}(t);if(ec(e))return e}const i=e.get("Content-Length");if(i)return parseInt(i)}(r.headers)||s.total,a&&ec(t.highWaterMark)?this.loadProgressively(r,s,e,t.highWaterMark,a):o?r.arrayBuffer():"json"===e.responseType?r.json():r.text()})).then((r=>{const o=this.response;if(!o)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),s.loading.end=Math.max(self.performance.now(),s.loading.first);const l=r[n];l&&(s.loaded=s.total=l);const d={url:o.url,data:r,code:o.status};a&&!ec(t.highWaterMark)&&a(s,e,r,o),i.onSuccess(d,s,e,o)})).catch((t=>{if(self.clearTimeout(this.requestTimeout),s.aborted)return;const r=t&&t.code||0,a=t?t.message:null;i.onError({code:r,text:a},e,t?t.details:null,s)}))}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,i,s=0,r){const a=new nm,o=e.body.getReader(),n=()=>o.read().then((o=>{if(o.done)return a.dataLength&&r(t,i,a.flush(),e),Promise.resolve(new ArrayBuffer(0));const l=o.value,d=l.length;return t.loaded+=d,d<s||a.dataLength?(a.push(l),a.dataLength>=s&&r(t,i,a.flush(),e)):r(t,i,l,e),n()})).catch((()=>Promise.reject()));return n()}}function Xy(e,t){return new self.Request(e.url,t)}class Zy extends Error{constructor(e,t,i){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=i}}const eA=/\s/,tA={newCue(e,t,i,s){const r=[];let a,o,n,l,d;const h=self.VTTCue||self.TextTrackCue;for(let u=0;u<s.rows.length;u++)if(a=s.rows[u],n=!0,l=0,d="",!a.isEmpty()){var c;for(let e=0;e<a.chars.length;e++)eA.test(a.chars[e].uchar)&&n?l++:(d+=a.chars[e].uchar,n=!1);a.cueStartTime=t,t===i&&(i+=1e-4),l>=16?l--:l++;const s=qg(d.trim()),p=Zg(t,i,s);null!=e&&null!=(c=e.cues)&&c.getCueById(p)||(o=new h(t,i,s),o.id=p,o.line=u+1,o.align="left",o.position=10+Math.min(80,10*Math.floor(8*l/32)),r.push(o))}return e&&r.length&&(r.sort(((e,t)=>"auto"===e.line||"auto"===t.line?0:e.line>8&&t.line>8?t.line-e.line:e.line-t.line)),r.forEach((t=>yp(e,t)))),r}},iA=Yh(Yh({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,maxBufferSize:6e7,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:Ky,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:class{constructor(e){this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this._abandonRulesCheck=()=>{const{fragCurrent:e,partCurrent:t,hls:i}=this,{autoLevelEnabled:s,media:r}=i;if(!e||!r)return;const a=performance.now(),o=t?t.stats:e.stats,n=t?t.duration:e.duration,l=a-o.loading.start,d=i.minAutoLevel;if(o.aborted||o.loaded&&o.loaded===o.total||e.level<=d)return this.clearTimer(),void(this._nextAutoLevel=-1);if(!s||r.paused||!r.playbackRate||!r.readyState)return;const h=i.mainForwardBufferInfo;if(null===h)return;const c=this.bwEstimator.getEstimateTTFB(),u=Math.abs(r.playbackRate);if(l<=Math.max(c,n/(2*u)*1e3))return;const p=h.len/u,f=o.loading.first?o.loading.first-o.loading.start:-1,m=o.loaded&&f>-1,g=this.getBwEstimate(),y=i.levels,A=y[e.level],b=o.total||Math.max(o.loaded,Math.round(n*A.averageBitrate/8));let v=m?l-f:l;v<1&&m&&(v=Math.min(l,8*o.loaded/g));const _=m?1e3*o.loaded/v:0,S=_?(b-o.loaded)/_:8*b/g+c/1e3;if(S<=p)return;const w=_?8*_:g;let E,T=Number.POSITIVE_INFINITY;for(E=e.level-1;E>d;E--){const e=y[E].maxBitrate;if(T=this.getTimeToLoadFrag(c/1e3,w,n*e,!y[E].details),T<p)break}if(T>=S)return;if(T>10*n)return;i.nextLoadLevel=i.nextAutoLevel=E,m?this.bwEstimator.sample(l-Math.min(c,f),o.loaded):this.bwEstimator.sampleTTFB(l);const k=y[E].maxBitrate;this.getBwEstimate()*this.hls.config.abrBandWidthUpFactor>k&&this.resetEstimator(k),this.clearTimer(),hc.warn(`[abr] Fragment ${e.sn}${t?" part "+t.index:""} of level ${e.level} is loading too slowly;\n Time to underbuffer: ${p.toFixed(3)} s\n Estimated load time for current fragment: ${S.toFixed(3)} s\n Estimated load time for down switch fragment: ${T.toFixed(3)} s\n TTFB estimate: ${0|f} ms\n Current BW estimate: ${ec(g)?0|g:"Unknown"} bps\n New BW estimate: ${0|this.getBwEstimate()} bps\n Switching to level ${E} @ ${0|k} bps`),i.trigger(sc.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:o})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(hc.log(`setting initial bwe to ${e}`),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()}initEstimator(){const e=this.hls.config;return new cf(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(sc.FRAG_LOADING,this.onFragLoading,this),e.on(sc.FRAG_LOADED,this.onFragLoaded,this),e.on(sc.FRAG_BUFFERED,this.onFragBuffered,this),e.on(sc.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(sc.LEVEL_LOADED,this.onLevelLoaded,this),e.on(sc.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(sc.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(sc.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(sc.FRAG_LOADING,this.onFragLoading,this),e.off(sc.FRAG_LOADED,this.onFragLoaded,this),e.off(sc.FRAG_BUFFERED,this.onFragBuffered,this),e.off(sc.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(sc.LEVEL_LOADED,this.onLevelLoaded,this),e.off(sc.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(sc.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(sc.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(e,t){const i=t.frag;if(!this.ignoreFragment(i)){var s;if(!i.bitrateTest)this.fragCurrent=i,this.partCurrent=null!=(s=t.part)?s:null;this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}onLevelSwitching(e,t){this.clearTimer()}onError(e,t){if(!t.fatal)switch(t.details){case ac.BUFFER_ADD_CODEC_ERROR:case ac.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case ac.FRAG_LOAD_TIMEOUT:{const e=t.frag,{fragCurrent:i,partCurrent:s}=this;if(e&&i&&e.sn===i.sn&&e.level===i.level){const t=performance.now(),i=s?s.stats:e.stats,r=t-i.loading.start,a=i.loading.first?i.loading.first-i.loading.start:-1;if(i.loaded&&a>-1){const e=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(r-Math.min(e,a),i.loaded)}else this.bwEstimator.sampleTTFB(r)}break}}}getTimeToLoadFrag(e,t,i,s){return e+i/t+(s?this.lastLevelLoadSec:0)}onLevelLoaded(e,t){const i=this.hls.config,{loading:s}=t.stats,r=s.end-s.start;ec(r)&&(this.lastLevelLoadSec=r/1e3),t.details.live?this.bwEstimator.update(i.abrEwmaSlowLive,i.abrEwmaFastLive):this.bwEstimator.update(i.abrEwmaSlowVoD,i.abrEwmaFastVoD)}onFragLoaded(e,{frag:t,part:i}){const s=i?i.stats:t.stats;if(t.type===hp&&this.bwEstimator.sampleTTFB(s.loading.first-s.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const e=i?i.duration:t.duration,r=this.hls.levels[t.level],a=(r.loaded?r.loaded.bytes:0)+s.loaded,o=(r.loaded?r.loaded.duration:0)+e;r.loaded={bytes:a,duration:o},r.realBitrate=Math.round(8*a/o)}if(t.bitrateTest){const e={stats:s,frag:t,part:i,id:t.type};this.onFragBuffered(sc.FRAG_BUFFERED,e),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:i,part:s}=t,r=null!=s&&s.stats.loaded?s.stats:i.stats;if(r.aborted)return;if(this.ignoreFragment(i))return;const a=r.parsing.end-r.loading.start-Math.min(r.loading.first-r.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(a,r.loaded),r.bwEstimate=this.getBwEstimate(),i.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==hp||"initSegment"===e.sn}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:t}=this.hls,i=this.getBwEstimate(),s=this.hls.config.maxStarvationDelay,r=this.findBestLevel(i,t,e,0,s,1,1);if(r>-1)return r;const a=this.hls.firstLevel,o=Math.min(Math.max(a,t),e);return hc.warn(`[abr] Could not find best starting auto level. Defaulting to first in playlist ${a} clamped to ${o}`),o}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,t=this.bwEstimator.canEstimate(),i=this.lastLoadedFragLevel>-1;if(!(-1===e||t&&i&&this.nextAutoLevelKey!==this.getAutoLevelKey()))return e;const s=t&&i?this.getNextABRAutoLevel():this.firstAutoLevel;if(-1!==e){const t=this.hls.levels;if(t.length>Math.max(e,s)&&t[e].loadError<=t[s].loadError)return e}return this._nextAutoLevel=s,this.nextAutoLevelKey=this.getAutoLevelKey(),s}getAutoLevelKey(){return`${this.getBwEstimate()}_${this.getStarvationDelay().toFixed(2)}`}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:i}=this,{maxAutoLevel:s,config:r,minAutoLevel:a}=i,o=t?t.duration:e?e.duration:0,n=this.getBwEstimate(),l=this.getStarvationDelay();let d=r.abrBandWidthFactor,h=r.abrBandWidthUpFactor;if(l){const e=this.findBestLevel(n,a,s,l,0,d,h);if(e>=0)return e}let c=o?Math.min(o,r.maxStarvationDelay):r.maxStarvationDelay;if(!l){const e=this.bitrateTestDelay;if(e){c=(o?Math.min(o,r.maxLoadingDelay):r.maxLoadingDelay)-e,hc.info(`[abr] bitrate test took ${Math.round(1e3*e)}ms, set first fragment max fetchDuration to ${Math.round(1e3*c)} ms`),d=h=1}}const u=this.findBestLevel(n,a,s,l,c,d,h);if(hc.info(`[abr] ${l?"rebuffering expected":"buffer is empty"}, optimal quality level ${u}`),u>-1)return u;const p=i.levels[a],f=i.levels[i.loadLevel];return(null==p?void 0:p.bitrate)<(null==f?void 0:f.bitrate)?a:i.loadLevel}getStarvationDelay(){const e=this.hls,t=e.media;if(!t)return 1/0;const i=t&&0!==t.playbackRate?Math.abs(t.playbackRate):1,s=e.mainForwardBufferInfo;return(s?s.len:0)/i}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,t,i,s,r,a,o){var n;const l=s+r,d=this.lastLoadedFragLevel,h=-1===d?this.hls.firstLevel:d,{fragCurrent:c,partCurrent:u}=this,{levels:p,allAudioTracks:f,loadLevel:m,config:g}=this.hls;if(1===p.length)return 0;const y=p[h],A=!(null==y||null==(n=y.details)||!n.live),b=-1===m||-1===d;let v,_="SDR",S=(null==y?void 0:y.frameRate)||0;const{audioPreference:w,videoPreference:E}=g,T=this.audioTracksByGroup||(this.audioTracksByGroup=function(e){return e.reduce(((e,t)=>{let i=e.groups[t.groupId];i||(i=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),i.tracks.push(t);const s=t.channels||"2";return i.channels[s]=(i.channels[s]||0)+1,i.hasDefault=i.hasDefault||t.default,i.hasAutoSelect=i.hasAutoSelect||t.autoselect,i.hasDefault&&(e.hasDefaultAudio=!0),i.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e}),{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}(f));if(b){if(-1!==this.firstSelection)return this.firstSelection;const s=this.codecTiers||(this.codecTiers=function(e,t,i,s){return e.slice(i,s+1).reduce(((e,i)=>{if(!i.codecSet)return e;const s=i.audioGroups;let r=e[i.codecSet];r||(e[i.codecSet]=r={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!s,fragmentError:0}),r.minBitrate=Math.min(r.minBitrate,i.bitrate);const a=Math.min(i.height,i.width);return r.minHeight=Math.min(r.minHeight,a),r.minFramerate=Math.min(r.minFramerate,i.frameRate),r.maxScore=Math.max(r.maxScore,i.score),r.fragmentError+=i.fragmentError,r.videoRanges[i.videoRange]=(r.videoRanges[i.videoRange]||0)+1,s&&s.forEach((e=>{if(!e)return;const i=t.groups[e];r.hasDefaultAudio=r.hasDefaultAudio||t.hasDefaultAudio?i.hasDefault:i.hasAutoSelect||!t.hasDefaultAudio&&!t.hasAutoSelectAudio,Object.keys(i.channels).forEach((e=>{r.channels[e]=(r.channels[e]||0)+i.channels[e]}))})),e}),{})}(p,T,t,i)),r=function(e,t,i,s,r){const a=Object.keys(e),o=null==s?void 0:s.channels,n=null==s?void 0:s.audioCodec,l=o&&2===parseInt(o);let d=!0,h=!1,c=1/0,u=1/0,p=1/0,f=0,m=[];const{preferHDR:g,allowedVideoRanges:y}=gf(t,r);for(let t=a.length;t--;){const i=e[a[t]];d=i.channels[2]>0,c=Math.min(c,i.minHeight),u=Math.min(u,i.minFramerate),p=Math.min(p,i.minBitrate);const s=y.filter((e=>i.videoRanges[e]>0));s.length>0&&(h=!0,m=s)}c=ec(c)?c:0,u=ec(u)?u:0;const A=Math.max(1080,c),b=Math.max(30,u);p=ec(p)?p:i,i=Math.max(p,i),h||(t=void 0,m=[]);const v=a.reduce(((t,s)=>{const r=e[s];if(s===t)return t;if(r.minBitrate>i)return yf(s,`min bitrate of ${r.minBitrate} > current estimate of ${i}`),t;if(!r.hasDefaultAudio)return yf(s,"no renditions with default or auto-select sound found"),t;if(n&&s.indexOf(n.substring(0,4))%5!=0)return yf(s,`audio codec preference "${n}" not found`),t;if(o&&!l){if(!r.channels[o])return yf(s,`no renditions with ${o} channel sound found (channels options: ${Object.keys(r.channels)})`),t}else if((!n||l)&&d&&0===r.channels[2])return yf(s,"no renditions with stereo sound found"),t;return r.minHeight>A?(yf(s,`min resolution of ${r.minHeight} > maximum of ${A}`),t):r.minFramerate>b?(yf(s,`min framerate of ${r.minFramerate} > maximum of ${b}`),t):m.some((e=>r.videoRanges[e]>0))?r.maxScore<f?(yf(s,`max score of ${r.maxScore} < selected max of ${f}`),t):t&&(Gu(s)>=Gu(t)||r.fragmentError>e[t].fragmentError)?t:(f=r.maxScore,s):(yf(s,`no variants with VIDEO-RANGE of ${JSON.stringify(m)} found`),t)}),void 0);return{codecSet:v,videoRanges:m,preferHDR:g,minFramerate:u,minBitrate:p}}(s,_,e,w,E),{codecSet:a,videoRanges:o,minFramerate:n,minBitrate:l,preferHDR:d}=r;v=a,_=d?o[o.length-1]:o[0],S=n,e=Math.max(e,l),hc.log(`[abr] picked start tier ${JSON.stringify(r)}`)}else v=null==y?void 0:y.codecSet,_=null==y?void 0:y.videoRange;const k=u?u.duration:c?c.duration:0,C=this.bwEstimator.getEstimateTTFB()/1e3,x=[];for(let n=i;n>=t;n--){var R;const t=p[n],c=n>h;if(!t)continue;if(g.useMediaCapabilities&&!t.supportedResult&&!t.supportedPromise){const i=navigator.mediaCapabilities;"function"==typeof(null==i?void 0:i.decodingInfo)&&ff(t,T,_,S,e,w)?(t.supportedPromise=mf(t,T,i),t.supportedPromise.then((e=>{if(!this.hls)return;t.supportedResult=e;const i=this.hls.levels,s=i.indexOf(t);e.error?hc.warn(`[abr] MediaCapabilities decodingInfo error: "${e.error}" for level ${s} ${JSON.stringify(e)}`):e.supported||(hc.warn(`[abr] Unsupported MediaCapabilities decodingInfo result for level ${s} ${JSON.stringify(e)}`),s>-1&&i.length>1&&(hc.log(`[abr] Removing unsupported level ${s}`),this.hls.removeLevel(s)))}))):t.supportedResult=uf}if(v&&t.codecSet!==v||_&&t.videoRange!==_||c&&S>t.frameRate||!c&&S>0&&S<t.frameRate||t.supportedResult&&(null==(R=t.supportedResult.decodingInfoResults)||!R[0].smooth)){x.push(n);continue}const f=t.details,E=(u?null==f?void 0:f.partTarget:null==f?void 0:f.averagetargetduration)||k;let D;D=c?o*e:a*e;const L=k&&s>=2*k&&0===r?p[n].averageBitrate:p[n].maxBitrate,P=this.getTimeToLoadFrag(C,D,L*E,void 0===f);if(D>=L&&(n===d||0===t.loadError&&0===t.fragmentError)&&(P<=C||!ec(P)||A&&!this.bitrateTestDelay||P<l)){const e=this.forcedAutoLevel;return n===m||-1!==e&&e===m||(x.length&&hc.trace(`[abr] Skipped level(s) ${x.join(",")} of ${i} max with CODECS and VIDEO-RANGE:"${p[x[0]].codecs}" ${p[x[0]].videoRange}; not compatible with "${y.codecs}" ${_}`),hc.info(`[abr] switch candidate:${h}->${n} adjustedbw(${Math.round(D)})-bitrate=${Math.round(D-L)} ttfb:${C.toFixed(1)} avgDuration:${E.toFixed(1)} maxFetchDuration:${l.toFixed(1)} fetchDuration:${P.toFixed(1)} firstSelection:${b} codecSet:${v} videoRange:${_} hls.loadLevel:${m}`)),b&&(this.firstSelection=n),n}}return-1}set nextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:i}=this.hls,s=Math.min(Math.max(e,i),t);this._nextAutoLevel!==s&&(this.nextAutoLevelKey="",this._nextAutoLevel=s)}},bufferController:class{constructor(e){this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.appendSource=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this.log=void 0,this.warn=void 0,this.error=void 0,this._onEndStreaming=e=>{this.hls&&this.hls.pauseBuffering()},this._onStartStreaming=e=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=()=>{const{media:e,mediaSource:t}=this;this.log("Media source opened"),e&&(e.removeEventListener("emptied",this._onMediaEmptied),this.updateMediaElementDuration(),this.hls.trigger(sc.MEDIA_ATTACHED,{media:e,mediaSource:t})),t&&t.removeEventListener("sourceopen",this._onMediaSourceOpen),this.checkPendingTracks()},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:e,_objectUrl:t}=this;e!==t&&hc.error(`Media element src was set while attaching MediaSource (${t} > ${e})`)},this.hls=e;const t="[buffer-controller]";this.appendSource=e.config.preferManagedMediaSource&&"undefined"!=typeof self&&self.ManagedMediaSource,this.log=hc.log.bind(hc,t),this.warn=hc.warn.bind(hc,t),this.error=hc.error.bind(hc,t),this._initSourceBuffer(),this.registerListeners()}hasSourceTypes(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null,this.hls=null}registerListeners(){const{hls:e}=this;e.on(sc.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(sc.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(sc.MANIFEST_PARSED,this.onManifestParsed,this),e.on(sc.BUFFER_RESET,this.onBufferReset,this),e.on(sc.BUFFER_APPENDING,this.onBufferAppending,this),e.on(sc.BUFFER_CODECS,this.onBufferCodecs,this),e.on(sc.BUFFER_EOS,this.onBufferEos,this),e.on(sc.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(sc.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(sc.FRAG_PARSED,this.onFragParsed,this),e.on(sc.FRAG_CHANGED,this.onFragChanged,this)}unregisterListeners(){const{hls:e}=this;e.off(sc.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(sc.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(sc.MANIFEST_PARSED,this.onManifestParsed,this),e.off(sc.BUFFER_RESET,this.onBufferReset,this),e.off(sc.BUFFER_APPENDING,this.onBufferAppending,this),e.off(sc.BUFFER_CODECS,this.onBufferCodecs,this),e.off(sc.BUFFER_EOS,this.onBufferEos,this),e.off(sc.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(sc.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(sc.FRAG_PARSED,this.onFragParsed,this),e.off(sc.FRAG_CHANGED,this.onFragChanged,this)}_initSourceBuffer(){this.sourceBuffer={},this.operationQueue=new yg(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.appendErrors={audio:0,video:0,audiovideo:0},this.lastMpegAudioChunk=null}onManifestLoading(){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){let i=2;(t.audio&&!t.video||!t.altAudio)&&(i=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=i,this.log(`${this.bufferCodecEventsExpected} bufferCodec event(s) expected`)}onMediaAttaching(e,t){const i=this.media=t.media,s=Uu(this.appendSource);if(i&&s){var r;const e=this.mediaSource=new s;this.log(`created media source: ${null==(r=e.constructor)?void 0:r.name}`),e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.addEventListener("startstreaming",this._onStartStreaming),e.addEventListener("endstreaming",this._onEndStreaming));const t=this._objectUrl=self.URL.createObjectURL(e);if(this.appendSource)try{i.removeAttribute("src");const s=self.ManagedMediaSource;i.disableRemotePlayback=i.disableRemotePlayback||s&&e instanceof s,bg(i),function(e,t){const i=self.document.createElement("source");i.type="video/mp4",i.src=t,e.appendChild(i)}(i,t),i.load()}catch(e){i.src=t}else i.src=t;i.addEventListener("emptied",this._onMediaEmptied)}}onMediaDetaching(){const{media:e,mediaSource:t,_objectUrl:i}=this;if(t){if(this.log("media source detaching"),"open"===t.readyState)try{t.endOfStream()}catch(e){this.warn(`onMediaDetaching: ${e.message} while calling endOfStream`)}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(t.removeEventListener("startstreaming",this._onStartStreaming),t.removeEventListener("endstreaming",this._onEndStreaming)),e&&(e.removeEventListener("emptied",this._onMediaEmptied),i&&self.URL.revokeObjectURL(i),this.mediaSrc===i?(e.removeAttribute("src"),this.appendSource&&bg(e),e.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(sc.MEDIA_DETACHED,void 0)}onBufferReset(){this.getSourceBufferTypes().forEach((e=>{this.resetBuffer(e)})),this._initSourceBuffer()}resetBuffer(e){const t=this.sourceBuffer[e];try{var i;if(t)this.removeBufferListeners(e),this.sourceBuffer[e]=void 0,null!=(i=this.mediaSource)&&i.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(t)}catch(t){this.warn(`onBufferReset ${e}`,t)}}onBufferCodecs(e,t){const i=this.getSourceBufferTypes().length,s=Object.keys(t);if(s.forEach((e=>{if(i){const i=this.tracks[e];if(i&&"function"==typeof i.buffer.changeType){var s;const{id:r,codec:a,levelCodec:o,container:n,metadata:l}=t[e],d=Wu(i.codec,i.levelCodec),h=null==d?void 0:d.replace(Ag,"$1");let c=Wu(a,o);const u=null==(s=c)?void 0:s.replace(Ag,"$1");if(c&&h!==u){"audio"===e.slice(0,5)&&(c=$u(c,this.appendSource));const t=`${n};codecs=${c}`;this.appendChangeType(e,t),this.log(`switching codec ${d} to ${c}`),this.tracks[e]={buffer:i.buffer,codec:a,container:n,levelCodec:o,metadata:l,id:r}}}}else this.pendingTracks[e]=t[e]})),i)return;const r=Math.max(this.bufferCodecEventsExpected-1,0);this.bufferCodecEventsExpected!==r&&(this.log(`${r} bufferCodec event(s) expected ${s.join(",")}`),this.bufferCodecEventsExpected=r),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks()}appendChangeType(e,t){const{operationQueue:i}=this,s={execute:()=>{const s=this.sourceBuffer[e];s&&(this.log(`changing ${e} sourceBuffer type to ${t}`),s.changeType(t)),i.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:t=>{this.warn(`Failed to change ${e} SourceBuffer type`,t)}};i.append(s,e,!!this.pendingTracks[e])}onBufferAppending(e,t){const{hls:i,operationQueue:s,tracks:r}=this,{data:a,type:o,frag:n,part:l,chunkMeta:d}=t,h=d.buffering[o],c=self.performance.now();h.start=c;const u=n.stats.buffering,p=l?l.stats.buffering:null;0===u.start&&(u.start=c),p&&0===p.start&&(p.start=c);const f=r.audio;let m=!1;"audio"===o&&"audio/mpeg"===(null==f?void 0:f.container)&&(m=!this.lastMpegAudioChunk||1===d.id||this.lastMpegAudioChunk.sn!==d.sn,this.lastMpegAudioChunk=d);const g=n.start,y={execute:()=>{if(h.executeStart=self.performance.now(),m){const e=this.sourceBuffer[o];if(e){const t=g-e.timestampOffset;Math.abs(t)>=.1&&(this.log(`Updating audio SourceBuffer timestampOffset to ${g} (delta: ${t}) sn: ${n.sn})`),e.timestampOffset=g)}}this.appendExecutor(a,o)},onStart:()=>{},onComplete:()=>{const e=self.performance.now();h.executeEnd=h.end=e,0===u.first&&(u.first=e),p&&0===p.first&&(p.first=e);const{sourceBuffer:t}=this,i={};for(const e in t)i[e]=Lf.getBuffered(t[e]);this.appendErrors[o]=0,"audio"===o||"video"===o?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(sc.BUFFER_APPENDED,{type:o,frag:n,part:l,chunkMeta:d,parent:n.type,timeRanges:i})},onError:e=>{const t={type:rc.MEDIA_ERROR,parent:n.type,details:ac.BUFFER_APPEND_ERROR,sourceBufferName:o,frag:n,part:l,chunkMeta:d,error:e,err:e,fatal:!1};if(e.code===DOMException.QUOTA_EXCEEDED_ERR)t.details=ac.BUFFER_FULL_ERROR;else{const e=++this.appendErrors[o];t.details=ac.BUFFER_APPEND_ERROR,this.warn(`Failed ${e}/${i.config.appendErrorMaxRetry} times to append segment in "${o}" sourceBuffer`),e>=i.config.appendErrorMaxRetry&&(t.fatal=!0)}i.trigger(sc.ERROR,t)}};s.append(y,o,!!this.pendingTracks[o])}onBufferFlushing(e,t){const{operationQueue:i}=this,s=e=>({execute:this.removeExecutor.bind(this,e,t.startOffset,t.endOffset),onStart:()=>{},onComplete:()=>{this.hls.trigger(sc.BUFFER_FLUSHED,{type:e})},onError:t=>{this.warn(`Failed to remove from ${e} SourceBuffer`,t)}});t.type?i.append(s(t.type),t.type):this.getSourceBufferTypes().forEach((e=>{i.append(s(e),e)}))}onFragParsed(e,t){const{frag:i,part:s}=t,r=[],a=s?s.elementaryStreams:i.elementaryStreams;a[bc]?r.push("audiovideo"):(a[yc]&&r.push("audio"),a[Ac]&&r.push("video"));0===r.length&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${i.type} level: ${i.level} sn: ${i.sn}`),this.blockBuffers((()=>{const e=self.performance.now();i.stats.buffering.end=e,s&&(s.stats.buffering.end=e);const t=s?s.stats:i.stats;this.hls.trigger(sc.FRAG_BUFFERED,{frag:i,part:s,stats:t,id:i.type})}),r)}onFragChanged(e,t){this.trimBuffers()}onBufferEos(e,t){this.getSourceBufferTypes().reduce(((e,i)=>{const s=this.sourceBuffer[i];return!s||t.type&&t.type!==i||(s.ending=!0,s.ended||(s.ended=!0,this.log(`${i} sourceBuffer now EOS`))),e&&!(s&&!s.ended)}),!0)&&(this.log("Queueing mediaSource.endOfStream()"),this.blockBuffers((()=>{this.getSourceBufferTypes().forEach((e=>{const t=this.sourceBuffer[e];t&&(t.ending=!1)}));const{mediaSource:e}=this;e&&"open"===e.readyState?(this.log("Calling mediaSource.endOfStream()"),e.endOfStream()):e&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${e.readyState}`)})))}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())}trimBuffers(){const{hls:e,details:t,media:i}=this;if(!i||null===t)return;if(!this.getSourceBufferTypes().length)return;const s=e.config,r=i.currentTime,a=t.levelTargetDuration,o=t.live&&null!==s.liveBackBufferLength?s.liveBackBufferLength:s.backBufferLength;if(ec(o)&&o>0){const e=Math.max(o,a),t=Math.floor(r/a)*a-e;this.flushBackBuffer(r,a,t)}if(ec(s.frontBufferFlushThreshold)&&s.frontBufferFlushThreshold>0){const e=Math.max(s.maxBufferLength,s.frontBufferFlushThreshold),t=Math.max(e,a),i=Math.floor(r/a)*a+t;this.flushFrontBuffer(r,a,i)}}flushBackBuffer(e,t,i){const{details:s,sourceBuffer:r}=this;this.getSourceBufferTypes().forEach((a=>{const o=r[a];if(o){const r=Lf.getBuffered(o);if(r.length>0&&i>r.start(0)){if(this.hls.trigger(sc.BACK_BUFFER_REACHED,{bufferEnd:i}),null!=s&&s.live)this.hls.trigger(sc.LIVE_BACK_BUFFER_REACHED,{bufferEnd:i});else if(o.ended&&r.end(r.length-1)-e<2*t)return void this.log(`Cannot flush ${a} back buffer while SourceBuffer is in ended state`);this.hls.trigger(sc.BUFFER_FLUSHING,{startOffset:0,endOffset:i,type:a})}}}))}flushFrontBuffer(e,t,i){const{sourceBuffer:s}=this;this.getSourceBufferTypes().forEach((r=>{const a=s[r];if(a){const s=Lf.getBuffered(a),o=s.length;if(o<2)return;const n=s.start(o-1),l=s.end(o-1);if(i>n||e>=n&&e<=l)return;if(a.ended&&e-l<2*t)return void this.log(`Cannot flush ${r} front buffer while SourceBuffer is in ended state`);this.hls.trigger(sc.BUFFER_FLUSHING,{startOffset:n,endOffset:1/0,type:r})}}))}updateMediaElementDuration(){if(!this.details||!this.media||!this.mediaSource||"open"!==this.mediaSource.readyState)return;const{details:e,hls:t,media:i,mediaSource:s}=this,r=e.fragments[0].start+e.totalduration,a=i.duration,o=ec(s.duration)?s.duration:0;e.live&&t.config.liveDurationInfinity?(s.duration=1/0,this.updateSeekableRange(e)):(r>o&&r>a||!ec(a))&&(this.log(`Updating Media Source duration to ${r.toFixed(3)}`),s.duration=r)}updateSeekableRange(e){const t=this.mediaSource,i=e.fragments;if(i.length&&e.live&&null!=t&&t.setLiveSeekableRange){const s=Math.max(0,i[0].start),r=Math.max(s,s+e.totalduration);this.log(`Media Source duration is set to ${t.duration}. Setting seekable range to ${s}-${r}.`),t.setLiveSeekableRange(s,r)}}checkPendingTracks(){const{bufferCodecEventsExpected:e,operationQueue:t,pendingTracks:i}=this,s=Object.keys(i).length;if(s&&(!e||2===s||"audiovideo"in i)){this.createSourceBuffers(i),this.pendingTracks={};const e=this.getSourceBufferTypes();if(e.length)this.hls.trigger(sc.BUFFER_CREATED,{tracks:this.tracks}),e.forEach((e=>{t.executeNext(e)}));else{const e=new Error("could not create source buffer for media codec(s)");this.hls.trigger(sc.ERROR,{type:rc.MEDIA_ERROR,details:ac.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:e,reason:e.message})}}}createSourceBuffers(e){const{sourceBuffer:t,mediaSource:i}=this;if(!i)throw Error("createSourceBuffers called when mediaSource was null");for(const s in e)if(!t[s]){const r=e[s];if(!r)throw Error(`source buffer exists for track ${s}, however track does not`);let a=r.levelCodec||r.codec;a&&"audio"===s.slice(0,5)&&(a=$u(a,this.appendSource));const o=`${r.container};codecs=${a}`;this.log(`creating sourceBuffer(${o})`);try{const e=t[s]=i.addSourceBuffer(o),n=s;this.addBufferListener(n,"updatestart",this._onSBUpdateStart),this.addBufferListener(n,"updateend",this._onSBUpdateEnd),this.addBufferListener(n,"error",this._onSBUpdateError),this.appendSource&&this.addBufferListener(n,"bufferedchange",((e,t)=>{const i=t.removedRanges;null!=i&&i.length&&this.hls.trigger(sc.BUFFER_FLUSHED,{type:s})})),this.tracks[s]={buffer:e,codec:a,container:r.container,levelCodec:r.levelCodec,metadata:r.metadata,id:r.id}}catch(e){this.error(`error while trying to add sourceBuffer: ${e.message}`),this.hls.trigger(sc.ERROR,{type:rc.MEDIA_ERROR,details:ac.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:e,sourceBufferName:s,mimeType:o})}}}get mediaSrc(){var e;const t=(null==(e=this.media)?void 0:e.firstChild)||this.media;return null==t?void 0:t.src}_onSBUpdateStart(e){const{operationQueue:t}=this;t.current(e).onStart()}_onSBUpdateEnd(e){var t;if("closed"===(null==(t=this.mediaSource)?void 0:t.readyState))return void this.resetBuffer(e);const{operationQueue:i}=this;i.current(e).onComplete(),i.shiftAndExecuteNext(e)}_onSBUpdateError(e,t){var i;const s=new Error(`${e} SourceBuffer error. MediaSource readyState: ${null==(i=this.mediaSource)?void 0:i.readyState}`);this.error(`${s}`,t),this.hls.trigger(sc.ERROR,{type:rc.MEDIA_ERROR,details:ac.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:s,fatal:!1});const r=this.operationQueue.current(e);r&&r.onError(s)}removeExecutor(e,t,i){const{media:s,mediaSource:r,operationQueue:a,sourceBuffer:o}=this,n=o[e];if(!s||!r||!n)return this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),void a.shiftAndExecuteNext(e);const l=ec(s.duration)?s.duration:1/0,d=ec(r.duration)?r.duration:1/0,h=Math.max(0,t),c=Math.min(i,l,d);c>h&&(!n.ending||n.ended)?(n.ended=!1,this.log(`Removing [${h},${c}] from the ${e} SourceBuffer`),n.remove(h,c)):a.shiftAndExecuteNext(e)}appendExecutor(e,t){const i=this.sourceBuffer[t];if(i)i.ended=!1,i.appendBuffer(e);else if(!this.pendingTracks[t])throw new Error(`Attempting to append to the ${t} SourceBuffer, but it does not exist`)}blockBuffers(e,t=this.getSourceBufferTypes()){if(!t.length)return this.log("Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve().then(e);const{operationQueue:i}=this,s=t.map((e=>i.appendBlocker(e)));Promise.all(s).then((()=>{e(),t.forEach((e=>{const t=this.sourceBuffer[e];null!=t&&t.updating||i.shiftAndExecuteNext(e)}))}))}getSourceBufferTypes(){return Object.keys(this.sourceBuffer)}addBufferListener(e,t,i){const s=this.sourceBuffer[e];if(!s)return;const r=i.bind(this,e);this.listeners[e].push({event:t,listener:r}),s.addEventListener(t,r)}removeBufferListeners(e){const t=this.sourceBuffer[e];t&&this.listeners[e].forEach((e=>{t.removeEventListener(e.event,e.listener)}))}},capLevelController:fy,errorController:class{constructor(e){this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.log=void 0,this.warn=void 0,this.error=void 0,this.hls=e,this.log=hc.log.bind(hc,"[info]:"),this.warn=hc.warn.bind(hc,"[warning]:"),this.error=hc.error.bind(hc,"[error]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(sc.ERROR,this.onError,this),e.on(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(sc.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(sc.ERROR,this.onError,this),e.off(sc.ERROR,this.onErrorOut,this),e.off(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(sc.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(null==e?void 0:e.type)===hp?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var i,s;if(t.fatal)return;const r=this.hls,a=t.context;switch(t.details){case ac.FRAG_LOAD_ERROR:case ac.FRAG_LOAD_TIMEOUT:case ac.KEY_LOAD_ERROR:case ac.KEY_LOAD_TIMEOUT:return void(t.errorAction=this.getFragRetryOrSwitchAction(t));case ac.FRAG_PARSING_ERROR:if(null!=(i=t.frag)&&i.gap)return void(t.errorAction={action:tf,flags:of});case ac.FRAG_GAP:case ac.FRAG_DECRYPT_ERROR:return t.errorAction=this.getFragRetryOrSwitchAction(t),void(t.errorAction.action=sf);case ac.LEVEL_EMPTY_ERROR:case ac.LEVEL_PARSING_ERROR:{var o,n;const e=t.parent===hp?t.level:r.loadLevel;t.details===ac.LEVEL_EMPTY_ERROR&&null!=(o=t.context)&&null!=(n=o.levelDetails)&&n.live?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,e):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,e))}return;case ac.LEVEL_LOAD_ERROR:case ac.LEVEL_LOAD_TIMEOUT:return void("number"==typeof(null==a?void 0:a.level)&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,a.level)));case ac.AUDIO_TRACK_LOAD_ERROR:case ac.AUDIO_TRACK_LOAD_TIMEOUT:case ac.SUBTITLE_LOAD_ERROR:case ac.SUBTITLE_TRACK_LOAD_TIMEOUT:if(a){const e=r.levels[r.loadLevel];if(e&&(a.type===lp&&e.hasAudioGroup(a.groupId)||a.type===dp&&e.hasSubtitleGroup(a.groupId)))return t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.loadLevel),t.errorAction.action=sf,void(t.errorAction.flags=nf)}return;case ac.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const e=r.levels[r.loadLevel],i=null==e?void 0:e.attrs["HDCP-LEVEL"];i?t.errorAction={action:sf,flags:lf,hdcpLevel:i}:this.keySystemError(t)}return;case ac.BUFFER_ADD_CODEC_ERROR:case ac.REMUX_ALLOC_ERROR:case ac.BUFFER_APPEND_ERROR:return void(t.errorAction=this.getLevelSwitchAction(t,null!=(s=t.level)?s:r.loadLevel));case ac.INTERNAL_EXCEPTION:case ac.BUFFER_APPENDING_ERROR:case ac.BUFFER_FULL_ERROR:case ac.LEVEL_SWITCH_ERROR:case ac.BUFFER_STALLED_ERROR:case ac.BUFFER_SEEK_OVER_HOLE:case ac.BUFFER_NUDGE_ON_STALL:return void(t.errorAction={action:tf,flags:of})}t.type===rc.KEY_SYSTEM_ERROR&&this.keySystemError(t)}keySystemError(e){const t=this.getVariantLevelIndex(e.frag);e.levelRetry=!1,e.errorAction=this.getLevelSwitchAction(e,t)}getPlaylistRetryOrSwitchAction(e,t){const i=Jp(this.hls.config.playlistLoadPolicy,e),s=this.playlistError++;if(Yp(i,s,Wp(e),e.response))return{action:af,flags:of,retryConfig:i,retryCount:s};const r=this.getLevelSwitchAction(e,t);return i&&(r.retryConfig=i,r.retryCount=s),r}getFragRetryOrSwitchAction(e){const t=this.hls,i=this.getVariantLevelIndex(e.frag),s=t.levels[i],{fragLoadPolicy:r,keyLoadPolicy:a}=t.config,o=Jp(e.details.startsWith("key")?a:r,e),n=t.levels.reduce(((e,t)=>e+t.fragmentError),0);if(s){e.details!==ac.FRAG_GAP&&s.fragmentError++;if(Yp(o,n,Wp(e),e.response))return{action:af,flags:of,retryConfig:o,retryCount:n}}const l=this.getLevelSwitchAction(e,i);return o&&(l.retryConfig=o,l.retryCount=n),l}getLevelSwitchAction(e,t){const i=this.hls;null==t&&(t=i.loadLevel);const s=this.hls.levels[t];if(s){var r,a;const t=e.details;s.loadError++,t===ac.BUFFER_APPEND_ERROR&&s.fragmentError++;let l=-1;const{levels:d,loadLevel:h,minAutoLevel:c,maxAutoLevel:u}=i;i.autoLevelEnabled||(i.loadLevel=-1);const p=null==(r=e.frag)?void 0:r.type,f=(p===cp&&t===ac.FRAG_PARSING_ERROR||"audio"===e.sourceBufferName&&(t===ac.BUFFER_ADD_CODEC_ERROR||t===ac.BUFFER_APPEND_ERROR))&&d.some((({audioCodec:e})=>s.audioCodec!==e)),m="video"===e.sourceBufferName&&(t===ac.BUFFER_ADD_CODEC_ERROR||t===ac.BUFFER_APPEND_ERROR)&&d.some((({codecSet:e,audioCodec:t})=>s.codecSet!==e&&s.audioCodec===t)),{type:g,groupId:y}=null!=(a=e.context)?a:{};for(let i=d.length;i--;){const r=(i+h)%d.length;if(r!==h&&r>=c&&r<=u&&0===d[r].loadError){var o,n;const i=d[r];if(t===ac.FRAG_GAP&&e.frag){const t=d[r].details;if(t){const i=Xp(e.frag,t.fragments,e.frag.start);if(null!=i&&i.gap)continue}}else{if(g===lp&&i.hasAudioGroup(y)||g===dp&&i.hasSubtitleGroup(y))continue;if(p===cp&&null!=(o=s.audioGroups)&&o.some((e=>i.hasAudioGroup(e)))||p===up&&null!=(n=s.subtitleGroups)&&n.some((e=>i.hasSubtitleGroup(e)))||f&&s.audioCodec===i.audioCodec||!f&&s.audioCodec!==i.audioCodec||m&&s.codecSet===i.codecSet)continue}l=r;break}}if(l>-1&&i.loadLevel!==l)return e.levelRetry=!0,this.playlistError=0,{action:sf,flags:of,nextAutoLevel:l}}return{action:sf,flags:nf}}onErrorOut(e,t){var i;switch(null==(i=t.errorAction)?void 0:i.action){case tf:break;case sf:this.sendAlternateToPenaltyBox(t),t.errorAction.resolved||t.details===ac.FRAG_GAP?/MediaSource readyState: ended/.test(t.error.message)&&(this.warn(`MediaSource ended after "${t.sourceBufferName}" sourceBuffer append error. Attempting to recover from media error.`),this.hls.recoverMediaError()):t.fatal=!0}t.fatal&&this.hls.stopLoad()}sendAlternateToPenaltyBox(e){const t=this.hls,i=e.errorAction;if(!i)return;const{flags:s,hdcpLevel:r,nextAutoLevel:a}=i;switch(s){case of:this.switchLevel(e,a);break;case lf:r&&(t.maxHdcpLevel=Dp[Dp.indexOf(r)-1],i.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`)}i.resolved||this.switchLevel(e,a)}switchLevel(e,t){void 0!==t&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel)}},fpsController:class{constructor(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}setStreamController(e){this.streamController=e}registerListeners(){this.hls.on(sc.MEDIA_ATTACHING,this.onMediaAttaching,this)}unregisterListeners(){this.hls.off(sc.MEDIA_ATTACHING,this.onMediaAttaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const i=this.hls.config;if(i.capLevelOnFPSDrop){const e=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=e,e&&"function"==typeof e.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),i.fpsDroppedMonitoringPeriod)}}checkFPS(e,t,i){const s=performance.now();if(t){if(this.lastTime){const e=s-this.lastTime,r=i-this.lastDroppedFrames,a=t-this.lastDecodedFrames,o=1e3*r/e,n=this.hls;if(n.trigger(sc.FPS_DROP,{currentDropped:r,currentDecoded:a,totalDroppedFrames:i}),o>0&&r>n.config.fpsDroppedMonitoringThreshold*a){let e=n.currentLevel;hc.warn("drop FPS ratio greater than max allowed value for currentLevel: "+e),e>0&&(-1===n.autoLevelCapping||n.autoLevelCapping>=e)&&(e-=1,n.trigger(sc.FPS_DROP_LEVEL_CAPPING,{level:e,droppedLevel:n.currentLevel}),n.autoLevelCapping=e,this.streamController.nextLevelSwitch())}}this.lastTime=s,this.lastDroppedFrames=i,this.lastDecodedFrames=t}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}},stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrEwmaDefaultEstimateMax:5e6,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:Fc,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,useMediaCapabilities:!0,certLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null}},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},{cueHandler:tA,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:class extends om{constructor(e,t,i){super(e,t,i,"[subtitle-stream-controller]",up),this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null}_registerListeners(){const{hls:e}=this;e.on(sc.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(sc.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(sc.LEVEL_LOADED,this.onLevelLoaded,this),e.on(sc.ERROR,this.onError,this),e.on(sc.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(sc.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(sc.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(sc.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(sc.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(sc.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(sc.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(sc.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(sc.LEVEL_LOADED,this.onLevelLoaded,this),e.off(sc.ERROR,this.onError,this),e.off(sc.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(sc.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(sc.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(sc.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(sc.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(sc.FRAG_BUFFERED,this.onFragBuffered,this)}startLoad(e){this.stopLoad(),this.state=Kf,this.setInterval(500),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}onManifestLoading(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()}onMediaDetaching(){this.tracksBuffered=[],super.onMediaDetaching()}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:i,success:s}=t;if(this.fragPrevious=i,this.state=Kf,!s)return;const r=this.tracksBuffered[this.currentTrackId];if(!r)return;let a;const o=i.start;for(let e=0;e<r.length;e++)if(o>=r[e].start&&o<=r[e].end){a=r[e];break}const n=i.start+i.duration;a?a.end=n:(a={start:o,end:n},r.push(a)),this.fragmentTracker.fragBuffered(i),this.fragBufferedComplete(i,null)}onBufferFlushing(e,t){const{startOffset:i,endOffset:s}=t;if(0===i&&s!==Number.POSITIVE_INFINITY){const e=s-1;if(e<=0)return;t.endOffsetSubtitles=Math.max(0,e),this.tracksBuffered.forEach((t=>{for(let i=0;i<t.length;)if(t[i].end<=e)t.shift();else{if(!(t[i].start<e))break;t[i].start=e,i++}})),this.fragmentTracker.removeFragmentsInRange(i,e,up)}}onFragBuffered(e,t){var i;this.loadedmetadata||t.frag.type!==hp||null!=(i=this.media)&&i.buffered.length&&(this.loadedmetadata=!0)}onError(e,t){const i=t.frag;(null==i?void 0:i.type)===up&&(this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==qf&&(this.state=Kf))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){this.levels&&pg(this.levels,t)?this.levels=t.map((e=>new Up(e))):(this.tracksBuffered=[],this.levels=t.map((e=>{const t=new Up(e);return this.tracksBuffered[t.id]=[],t})),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,up),this.fragPrevious=null,this.mediaBuffer=null)}onSubtitleTrackSwitch(e,t){var i;if(this.currentTrackId=t.id,null==(i=this.levels)||!i.length||-1===this.currentTrackId)return void this.clearInterval();const s=this.levels[this.currentTrackId];null!=s&&s.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,s&&this.setInterval(500)}onSubtitleTrackLoaded(e,t){var i;const{currentTrackId:s,levels:r}=this,{details:a,id:o}=t;if(!r)return void this.warn(`Subtitle tracks were reset while loading level ${o}`);const n=r[s];if(o>=r.length||o!==s||!n)return;this.log(`Subtitle track ${o} loaded [${a.startSN},${a.endSN}]${a.lastPartSn?`[part-${a.lastPartSn}-${a.lastPartIndex}]`:""},duration:${a.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let l=0;if(a.live||null!=(i=n.details)&&i.live){const e=this.mainDetails;if(a.deltaUpdateFailed||!e)return;const t=e.fragments[0];var d;if(n.details)l=this.alignPlaylists(a,n.details,null==(d=this.levelLastLoaded)?void 0:d.details),0===l&&t&&(l=t.start,Gp(a,l));else a.hasProgramDateTime&&e.hasProgramDateTime?(Ff(a,e),l=a.fragments[0].start):t&&(l=t.start,Gp(a,l))}if(n.details=a,this.levelLastLoaded=n,this.startFragRequested||!this.mainDetails&&a.live||this.setStartPosition(this.mainDetails||a,l),this.tick(),a.live&&!this.fragCurrent&&this.media&&this.state===Kf){Xp(null,a.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),n.details=void 0)}}_handleFragmentLoadComplete(e){const{frag:t,payload:i}=e,s=t.decryptdata,r=this.hls;if(!this.fragContextChanged(t)&&i&&i.byteLength>0&&null!=s&&s.key&&s.iv&&"AES-128"===s.method){const e=performance.now();this.decrypter.decrypt(new Uint8Array(i),s.key.buffer,s.iv.buffer).catch((e=>{throw r.trigger(sc.ERROR,{type:rc.MEDIA_ERROR,details:ac.FRAG_DECRYPT_ERROR,fatal:!1,error:e,reason:e.message,frag:t}),e})).then((i=>{const s=performance.now();r.trigger(sc.FRAG_DECRYPTED,{frag:t,payload:i,stats:{tstart:e,tdecrypt:s}})})).catch((e=>{this.warn(`${e.name}: ${e.message}`),this.state=Kf}))}}doTick(){if(this.media){if(this.state===Kf){const{currentTrackId:e,levels:t}=this,i=null==t?void 0:t[e];if(!i||!t.length||!i.details)return;const{config:s}=this,r=this.getLoadPosition(),a=Lf.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],r,s.maxBufferHole),{end:o,len:n}=a,l=this.getFwdBufferInfo(this.media,hp),d=i.details;if(n>this.getMaxBufferLength(null==l?void 0:l.len)+d.levelTargetDuration)return;const h=d.fragments,c=h.length,u=d.edge;let p=null;const f=this.fragPrevious;if(o<u){const e=s.maxFragLookUpTolerance,t=o>u-e?0:e;p=Xp(f,h,Math.max(h[0].start,o),t),!p&&f&&f.start<h[0].start&&(p=h[0])}else p=h[c-1];if(!p)return;if(p=this.mapToInitFragWhenRequired(p),"initSegment"!==p.sn){const e=h[p.sn-d.startSN-1];e&&e.cc===p.cc&&this.fragmentTracker.getState(e)===wf&&(p=e)}this.fragmentTracker.getState(p)===wf&&this.loadFragment(p,i,o)}}else this.state=Kf}getMaxBufferLength(e){const t=super.getMaxBufferLength();return e?Math.max(t,e):t}loadFragment(e,t,i){this.fragCurrent=e,"initSegment"===e.sn?this._loadInitSegment(e,t):(this.startFragRequested=!0,super.loadFragment(e,t,i))}get mediaBufferTimeRanges(){return new gg(this.tracksBuffered[this.currentTrackId]||[])}},subtitleTrackController:class extends df{constructor(e){super(e,"[subtitle-track-controller]"),this.media=null,this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.queuedDefaultTrack=-1,this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.onTextTracksChanged=()=>{if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let e=null;const t=vp(this.media.textTracks);for(let i=0;i<t.length;i++)if("hidden"===t[i].mode)e=t[i];else if("showing"===t[i].mode){e=t[i];break}const i=this.findTrackForTextTrack(e);this.subtitleTrack!==i&&this.setSubtitleTrack(i)},this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}registerListeners(){const{hls:e}=this;e.on(sc.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(sc.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(sc.MANIFEST_PARSED,this.onManifestParsed,this),e.on(sc.LEVEL_LOADING,this.onLevelLoading,this),e.on(sc.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(sc.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(sc.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(sc.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(sc.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(sc.MANIFEST_PARSED,this.onManifestParsed,this),e.off(sc.LEVEL_LOADING,this.onLevelLoading,this),e.off(sc.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(sc.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(sc.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}onMediaDetaching(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);vp(this.media.textTracks).forEach((e=>{Ap(e)})),this.subtitleTrack=-1,this.media=null}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id:i,groupId:s,details:r}=t,a=this.tracksInGroup[i];if(!a||a.groupId!==s)return void this.warn(`Subtitle track with id:${i} and group:${s} not found in active group ${null==a?void 0:a.groupId}`);const o=a.details;a.details=t.details,this.log(`Subtitle track ${i} "${a.name}" lang:${a.lang} group:${s} loaded [${r.startSN}-${r.endSN}]`),i===this.trackId&&this.playlistLoaded(i,t,o)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const i=t.subtitleGroups||null,s=this.groupIds;let r=this.currentTrack;if(!i||(null==s?void 0:s.length)!==(null==i?void 0:i.length)||null!=i&&i.some((e=>-1===(null==s?void 0:s.indexOf(e))))){this.groupIds=i,this.trackId=-1,this.currentTrack=null;const e=this.tracks.filter((e=>!i||-1!==i.indexOf(e.groupId)));if(e.length)this.selectDefaultTrack&&!e.some((e=>e.default))&&(this.selectDefaultTrack=!1),e.forEach(((e,t)=>{e.id=t}));else if(!r&&!this.tracksInGroup.length)return;this.tracksInGroup=e;const t=this.hls.config.subtitlePreference;if(!r&&t){this.selectDefaultTrack=!1;const i=Af(t,e);if(i>-1)r=e[i];else{const e=Af(t,this.tracks);r=this.tracks[e]}}let s=this.findTrackId(r);-1===s&&r&&(s=this.findTrackId(null));const a={subtitleTracks:e};this.log(`Updating subtitle tracks, ${e.length} track(s) found in "${null==i?void 0:i.join(",")}" group-id`),this.hls.trigger(sc.SUBTITLE_TRACKS_UPDATED,a),-1!==s&&-1===this.trackId&&this.setSubtitleTrack(s)}else this.shouldReloadPlaylist(r)&&this.setSubtitleTrack(this.trackId)}findTrackId(e){const t=this.tracksInGroup,i=this.selectDefaultTrack;for(let s=0;s<t.length;s++){const r=t[s];if((!i||r.default)&&(i||e)&&(!e||bf(r,e)))return s}if(e){for(let i=0;i<t.length;i++){const s=t[i];if(fg(e.attrs,s.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return i}for(let i=0;i<t.length;i++){const s=t[i];if(fg(e.attrs,s.attrs,["LANGUAGE"]))return i}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let i=0;i<t.length;i++){if(mg(t[i],e))return i}}return-1}onError(e,t){!t.fatal&&t.context&&(t.context.type!==dp||t.context.id!==this.trackId||this.groupIds&&-1===this.groupIds.indexOf(t.context.groupId)||this.checkRetry(t))}get allSubtitleTracks(){return this.tracks}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}setSubtitleOption(e){if(this.hls.config.subtitlePreference=e,e){const t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){const i=this.currentTrack;if(i&&bf(e,i))return i;const s=Af(e,this.tracksInGroup);if(s>-1){const e=this.tracksInGroup[s];return this.setSubtitleTrack(s),e}if(i)return null;{const i=Af(e,t);if(i>-1)return t[i]}}}return null}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;if(this.shouldLoadPlaylist(t)&&t){const i=t.id,s=t.groupId;let r=t.url;if(e)try{r=e.addDirectives(r)}catch(e){this.warn(`Could not construct new URL with HLS Delivery Directives: ${e}`)}this.log(`Loading subtitle playlist for id ${i}`),this.hls.trigger(sc.SUBTITLE_TRACK_LOADING,{url:r,id:i,groupId:s,deliveryDirectives:e||null})}}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=vp(e.textTracks),i=this.currentTrack;let s;if(i&&(s=t.filter((e=>mg(i,e)))[0],s||this.warn(`Unable to find subtitle TextTrack with name "${i.name}" and language "${i.lang}"`)),[].slice.call(t).forEach((e=>{"disabled"!==e.mode&&e!==s&&(e.mode="disabled")})),s){const e=this.subtitleDisplay?"showing":"hidden";s.mode!==e&&(s.mode=e)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media)return void(this.queuedDefaultTrack=e);if(e<-1||e>=t.length||!ec(e))return void this.warn(`Invalid subtitle track id: ${e}`);this.clearTimer(),this.selectDefaultTrack=!1;const i=this.currentTrack,s=t[e]||null;if(this.trackId=e,this.currentTrack=s,this.toggleTrackModes(),!s)return void this.hls.trigger(sc.SUBTITLE_TRACK_SWITCH,{id:e});const r=!!s.details&&!s.details.live;if(e===this.trackId&&s===i&&r)return;this.log(`Switching to subtitle-track ${e}`+(s?` "${s.name}" lang:${s.lang} group:${s.groupId}`:""));const{id:a,groupId:o="",name:n,type:l,url:d}=s;this.hls.trigger(sc.SUBTITLE_TRACK_SWITCH,{id:a,groupId:o,name:n,type:l,url:d});const h=this.switchParams(s.url,null==i?void 0:i.details);this.loadPlaylist(h)}},timelineController:class{constructor(e){this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},e.on(sc.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(sc.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(sc.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(sc.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(sc.FRAG_LOADING,this.onFragLoading,this),e.on(sc.FRAG_LOADED,this.onFragLoaded,this),e.on(sc.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(sc.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(sc.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(sc.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(sc.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(sc.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(sc.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(sc.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(sc.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(sc.FRAG_LOADING,this.onFragLoading,this),e.off(sc.FRAG_LOADED,this.onFragLoaded,this),e.off(sc.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(sc.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(sc.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(sc.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(sc.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){if(this.config.enableCEA708Captions&&(!this.cea608Parser1||!this.cea608Parser2)){const e=new Ng(this,"textTrack1"),t=new Ng(this,"textTrack2"),i=new Ng(this,"textTrack3"),s=new Ng(this,"textTrack4");this.cea608Parser1=new Ug(1,e,t),this.cea608Parser2=new Ug(3,i,s)}}addCues(e,t,i,s,r){let a=!1;for(let e=r.length;e--;){const s=r[e],h=(o=s[0],n=s[1],l=t,d=i,Math.min(n,d)-Math.max(o,l));if(h>=0&&(s[0]=Math.min(s[0],t),s[1]=Math.max(s[1],i),a=!0,h/(i-t)>.5))return}var o,n,l,d;if(a||r.push([t,i]),this.config.renderTextTracksNatively){const r=this.captionsTracks[e];this.Cues.newCue(r,t,i,s)}else{const r=this.Cues.newCue(null,t,i,s);this.hls.trigger(sc.CUES_PARSED,{type:"captions",cues:r,track:e})}}onInitPtsFound(e,{frag:t,id:i,initPTS:s,timescale:r}){const{unparsedVttFrags:a}=this;"main"===i&&(this.initPTS[t.cc]={baseTime:s,timescale:r}),a.length&&(this.unparsedVttFrags=[],a.forEach((e=>{this.onFragLoaded(sc.FRAG_LOADED,e)})))}getExistingTrack(e,t){const{media:i}=this;if(i)for(let s=0;s<i.textTracks.length;s++){const r=i.textTracks[s];if(py(r,{name:e,lang:t,attrs:{}}))return r}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:i,media:s}=this,{label:r,languageCode:a}=t[e],o=this.getExistingTrack(r,a);if(o)i[e]=o,Ap(i[e]),gp(i[e],s);else{const t=this.createTextTrack("captions",r,a);t&&(t[e]=!0,i[e]=t)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const i={_id:e,label:t.label,kind:"captions",default:!!t.media&&!!t.media.default,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=i,this.hls.trigger(sc.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[i]})}createTextTrack(e,t,i){const s=this.media;if(s)return s.addTextTrack(e,t,i)}onMediaAttaching(e,t){this.media=t.media,this._cleanTracks()}onMediaDetaching(){const{captionsTracks:e}=this;Object.keys(e).forEach((t=>{Ap(e[t]),delete e[t]})),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:e}=this;if(!e)return;const t=e.textTracks;if(t)for(let e=0;e<t.length;e++)Ap(t[e])}onSubtitleTracksUpdated(e,t){const i=t.subtitleTracks||[],s=i.some((e=>e.textCodec===ty));if(this.config.enableWebVTT||s&&this.config.enableIMSC1){if(pg(this.tracks,i))return void(this.tracks=i);if(this.textTracks=[],this.tracks=i,this.config.renderTextTracksNatively){const e=this.media,t=e?vp(e.textTracks):null;if(this.tracks.forEach(((e,i)=>{let s;if(t){let i=null;for(let s=0;s<t.length;s++)if(t[s]&&py(t[s],e)){i=t[s],t[s]=null;break}i&&(s=i)}if(s)Ap(s);else{const t=uy(e);s=this.createTextTrack(t,e.name,e.lang),s&&(s.mode="disabled")}s&&this.textTracks.push(s)})),null!=t&&t.length){const e=t.filter((e=>null!==e)).map((e=>e.label));e.length&&hc.warn(`Media element contains unused subtitle tracks: ${e.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const e=this.tracks.map((e=>({label:e.name,kind:e.type.toLowerCase(),default:e.default,subtitleTrack:e})));this.hls.trigger(sc.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:e})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach((e=>{const t=/(?:CC|SERVICE)([1-4])/.exec(e.instreamId);if(!t)return;const i=`textTrack${t[1]}`,s=this.captionsProperties[i];s&&(s.label=e.name,e.lang&&(s.languageCode=e.lang),s.media=e)}))}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return null==t?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){this.initCea608Parsers();const{cea608Parser1:i,cea608Parser2:s,lastCc:r,lastSn:a,lastPartIndex:o}=this;if(this.enabled&&i&&s&&t.frag.type===hp){var n,l;const{cc:e,sn:d}=t.frag,h=null!=(n=null==t||null==(l=t.part)?void 0:l.index)?n:-1;d===a+1||d===a&&h===o+1||e===r||(i.reset(),s.reset()),this.lastCc=e,this.lastSn=d,this.lastPartIndex=h}}onFragLoaded(e,t){const{frag:i,payload:s}=t;if(i.type===up)if(s.byteLength){const e=i.decryptdata,r="stats"in t;if(null==e||!e.encrypted||r){const e=this.tracks[i.level],r=this.vttCCs;r[i.cc]||(r[i.cc]={start:i.start,prevCC:this.prevCC,new:!0},this.prevCC=i.cc),e&&e.textCodec===ty?this._parseIMSC1(i,s):this._parseVTTs(t)}}else this.hls.trigger(sc.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const i=this.hls;ay(t,this.initPTS[e.cc],(t=>{this._appendCues(t,e.level),i.trigger(sc.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(t=>{hc.log(`Failed to parse IMSC1: ${t}`),i.trigger(sc.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:t})}))}_parseVTTs(e){var t;const{frag:i,payload:s}=e,{initPTS:r,unparsedVttFrags:a}=this,o=r.length-1;if(!r[i.cc]&&-1===o)return void a.push(e);const n=this.hls;ey(null!=(t=i.initSegment)&&t.data?Su(i.initSegment.data,new Uint8Array(s)):s,this.initPTS[i.cc],this.vttCCs,i.cc,i.start,(e=>{this._appendCues(e,i.level),n.trigger(sc.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:i})}),(t=>{const r="Missing initPTS for VTT MPEGTS"===t.message;r?a.push(e):this._fallbackToIMSC1(i,s),hc.log(`Failed to parse VTT cue: ${t}`),r&&o>i.cc||n.trigger(sc.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:t})}))}_fallbackToIMSC1(e,t){const i=this.tracks[e.level];i.textCodec||ay(t,this.initPTS[e.cc],(()=>{i.textCodec=ty,this._parseIMSC1(e,t)}),(()=>{i.textCodec="wvtt"}))}_appendCues(e,t){const i=this.hls;if(this.config.renderTextTracksNatively){const i=this.textTracks[t];if(!i||"disabled"===i.mode)return;e.forEach((e=>yp(i,e)))}else{const s=this.tracks[t];if(!s)return;const r=s.default?"default":"subtitles"+t;i.trigger(sc.CUES_PARSED,{type:"subtitles",cues:e,track:r})}}onFragDecrypted(e,t){const{frag:i}=t;i.type===up&&this.onFragLoaded(sc.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){this.initCea608Parsers();const{cea608Parser1:i,cea608Parser2:s}=this;if(!this.enabled||!i||!s)return;const{frag:r,samples:a}=t;if(r.type!==hp||"NONE"!==this.closedCaptionsForLevel(r))for(let e=0;e<a.length;e++){const t=a[e].bytes;if(t){const r=this.extractCea608Data(t);i.addData(a[e].pts,r[0]),s.addData(a[e].pts,r[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:i,endOffsetSubtitles:s,type:r}){const{media:a}=this;if(a&&!(a.currentTime<i)){if(!r||"video"===r){const{captionsTracks:e}=this;Object.keys(e).forEach((s=>bp(e[s],t,i)))}if(this.config.renderTextTracksNatively&&0===t&&void 0!==s){const{textTracks:e}=this;Object.keys(e).forEach((i=>bp(e[i],t,s)))}}}extractCea608Data(e){const t=[[],[]],i=31&e[0];let s=2;for(let r=0;r<i;r++){const i=e[s++],r=127&e[s++],a=127&e[s++];if(0===r&&0===a)continue;if(0!=(4&i)){const e=3&i;0!==e&&1!==e||(t[e].push(r),t[e].push(a))}}return t}},audioStreamController:class extends om{constructor(e,t,i){super(e,t,i,"[audio-stream-controller]",cp),this.videoBuffer=null,this.videoTrackCC=-1,this.waitingVideoCC=-1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.flushing=!1,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null,this.bufferedTrack=null,this.switchingTrack=null}_registerListeners(){const{hls:e}=this;e.on(sc.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(sc.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(sc.LEVEL_LOADED,this.onLevelLoaded,this),e.on(sc.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(sc.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(sc.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(sc.ERROR,this.onError,this),e.on(sc.BUFFER_RESET,this.onBufferReset,this),e.on(sc.BUFFER_CREATED,this.onBufferCreated,this),e.on(sc.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(sc.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(sc.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(sc.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(sc.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(sc.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(sc.LEVEL_LOADED,this.onLevelLoaded,this),e.off(sc.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(sc.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(sc.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(sc.ERROR,this.onError,this),e.off(sc.BUFFER_RESET,this.onBufferReset,this),e.off(sc.BUFFER_CREATED,this.onBufferCreated,this),e.off(sc.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(sc.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(sc.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(sc.FRAG_BUFFERED,this.onFragBuffered,this)}onInitPtsFound(e,{frag:t,id:i,initPTS:s,timescale:r}){if("main"===i){const e=t.cc;this.initPTS[t.cc]={baseTime:s,timescale:r},this.log(`InitPTS for cc: ${e} found from main: ${s}`),this.videoTrackCC=e,this.state===rm&&this.tick()}}startLoad(e){if(!this.levels)return this.startPosition=e,void(this.state=qf);const t=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),t>0&&-1===e?(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t,this.state=Kf):(this.loadedmetadata=!1,this.state=Zf),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}doTick(){switch(this.state){case Kf:this.doTickIdle();break;case Zf:{var e;const{levels:t,trackId:i}=this,s=null==t||null==(e=t[i])?void 0:e.details;if(s){if(this.waitForCdnTuneIn(s))break;this.state=rm}break}case Xf:{var t;const e=performance.now(),i=this.retryDate;if(!i||e>=i||null!=(t=this.media)&&t.seeking){const{levels:e,trackId:t}=this;this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded((null==e?void 0:e[t])||null),this.state=Kf}break}case rm:{const e=this.waitingData;if(e){const{frag:t,part:i,cache:s,complete:r}=e;if(void 0!==this.initPTS[t.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=Qf;const e={frag:t,part:i,payload:s.flush(),networkDetails:null};this._handleFragmentLoadProgress(e),r&&super._handleFragmentLoadComplete(e)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log(`Waiting fragment cc (${t.cc}) cancelled because video is at cc ${this.videoTrackCC}`),this.clearWaitingFragment();else{const e=this.getLoadPosition(),i=Lf.bufferInfo(this.mediaBuffer,e,this.config.maxBufferHole);Zp(i.end,this.config.maxFragLookUpTolerance,t)<0&&(this.log(`Waiting fragment cc (${t.cc}) @ ${t.start} cancelled because another fragment at ${i.end} is needed`),this.clearWaitingFragment())}}else this.state=Kf}}this.onTickEnd()}clearWaitingFragment(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=Kf)}resetLoadingState(){this.clearWaitingFragment(),super.resetLoadingState()}onTickEnd(){const{media:e}=this;null!=e&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){const{hls:e,levels:t,media:i,trackId:s}=this,r=e.config;if(!i&&(this.startFragRequested||!r.startFragPrefetch)||null==t||!t[s])return;const a=t[s],o=a.details;if(!o||o.live&&this.levelLastLoaded!==a||this.waitForCdnTuneIn(o))return void(this.state=Zf);const n=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&n&&(this.bufferFlushed=!1,this.afterBufferFlushed(n,yc,cp));const l=this.getFwdBufferInfo(n,cp);if(null===l)return;const{bufferedTrack:d,switchingTrack:h}=this;if(!h&&this._streamEnded(l,o))return e.trigger(sc.BUFFER_EOS,{type:"audio"}),void(this.state=im);const c=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,hp),u=l.len,p=this.getMaxBufferLength(null==c?void 0:c.len),f=o.fragments,m=f[0].start;let g=this.flushing?this.getLoadPosition():l.end;if(h&&i){const e=this.getLoadPosition();d&&!fg(h.attrs,d.attrs)&&(g=e),o.PTSKnown&&e<m&&(l.end>m||l.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),i.currentTime=m+.05)}if(u>=p&&!h&&g<f[f.length-1].start)return;let y=this.getNextFragment(g,o),A=!1;if(y&&this.isLoopLoading(y,g)&&(A=!!y.gap,y=this.getNextFragmentLoopLoading(y,o,l,hp,p)),!y)return void(this.bufferFlushed=!0);const b=c&&y.start>c.end+o.targetduration;if(b||(null==c||!c.len)&&l.len){const e=this.getAppendedFrag(y.start,hp);if(null===e)return;if(A||(A=!!e.gap||!!b&&0===c.len),b&&!A||A&&l.nextStart&&l.nextStart<e.end)return}this.loadFragment(y,a,g)}getMaxBufferLength(e){const t=super.getMaxBufferLength();return e?Math.min(Math.max(t,e),this.config.maxMaxBufferLength):t}onMediaDetaching(){this.videoBuffer=null,this.bufferFlushed=this.flushing=!1,super.onMediaDetaching()}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map((e=>new Up(e)))}onAudioTrackSwitching(e,t){const i=!!t.url;this.trackId=t.id;const{fragCurrent:s}=this;s&&(s.abortRequests(),this.removeUnbufferedFrags(s.start)),this.resetLoadingState(),i?this.setInterval(100):this.resetTransmuxer(),i?(this.switchingTrack=t,this.state=Kf,this.flushAudioIfNeeded(t)):(this.switchingTrack=null,this.bufferedTrack=t,this.state=qf),this.tick()}onManifestLoading(){this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=this.flushing=!1,this.levels=this.mainDetails=this.waitingData=this.bufferedTrack=this.cachedTrackLoadedData=this.switchingTrack=null,this.startFragRequested=!1,this.trackId=this.videoTrackCC=this.waitingVideoCC=-1}onLevelLoaded(e,t){this.mainDetails=t.details,null!==this.cachedTrackLoadedData&&(this.hls.trigger(sc.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)}onAudioTrackLoaded(e,t){var i;if(null==this.mainDetails)return void(this.cachedTrackLoadedData=t);const{levels:s}=this,{details:r,id:a}=t;if(!s)return void this.warn(`Audio tracks were reset while loading level ${a}`);this.log(`Audio track ${a} loaded [${r.startSN},${r.endSN}]${r.lastPartSn?`[part-${r.lastPartSn}-${r.lastPartIndex}]`:""},duration:${r.totalduration}`);const o=s[a];let n=0;if(r.live||null!=(i=o.details)&&i.live){this.checkLiveUpdate(r);const e=this.mainDetails;if(r.deltaUpdateFailed||!e)return;var l;if(!o.details&&r.hasProgramDateTime&&e.hasProgramDateTime)Ff(r,e),n=r.fragments[0].start;else n=this.alignPlaylists(r,o.details,null==(l=this.levelLastLoaded)?void 0:l.details)}o.details=r,this.levelLastLoaded=o,this.startFragRequested||!this.mainDetails&&r.live||this.setStartPosition(this.mainDetails||r,n),this.state!==Zf||this.waitForCdnTuneIn(r)||(this.state=Kf),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:i,part:s,payload:r}=e,{config:a,trackId:o,levels:n}=this;if(!n)return void this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${i.sn} of level ${i.level} will not be buffered`);const l=n[o];if(!l)return void this.warn("Audio track is undefined on fragment load progress");const d=l.details;if(!d)return this.warn("Audio track details undefined on fragment load progress"),void this.removeUnbufferedFrags(i.start);const h=a.defaultAudioCodec||l.audioCodec||"mp4a.40.2";let c=this.transmuxer;c||(c=this.transmuxer=new ug(this.hls,cp,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const u=this.initPTS[i.cc],p=null==(t=i.initSegment)?void 0:t.data;if(void 0!==u){const e=!1,t=s?s.index:-1,a=-1!==t,o=new Pf(i.level,i.sn,i.stats.chunkCount,r.byteLength,t,a);c.push(r,p,h,"",i,s,d.totalduration,e,o,u)}else{this.log(`Unknown video PTS for cc ${i.cc}, waiting for video PTS before demuxing audio frag ${i.sn} of [${d.startSN} ,${d.endSN}],track ${o}`);const{cache:e}=this.waitingData=this.waitingData||{frag:i,part:s,cache:new nm,complete:!1};e.push(new Uint8Array(r)),this.waitingVideoCC=this.videoTrackCC,this.state=rm}}_handleFragmentLoadComplete(e){this.waitingData?this.waitingData.complete=!0:super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1}onBufferCreated(e,t){const i=t.tracks.audio;i&&(this.mediaBuffer=i.buffer||null),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer||null)}onFragBuffered(e,t){const{frag:i,part:s}=t;if(i.type===cp)if(this.fragContextChanged(i))this.warn(`Fragment ${i.sn}${s?" p: "+s.index:""} of level ${i.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);else{if("initSegment"!==i.sn){this.fragPrevious=i;const e=this.switchingTrack;e&&(this.bufferedTrack=e,this.switchingTrack=null,this.hls.trigger(sc.AUDIO_TRACK_SWITCHED,Yh({},e)))}this.fragBufferedComplete(i,s)}else if(!this.loadedmetadata&&i.type===hp){const e=this.videoBuffer||this.media;if(e){Lf.getBuffered(e).length&&(this.loadedmetadata=!0)}}}onError(e,t){var i;if(t.fatal)this.state=sm;else switch(t.details){case ac.FRAG_GAP:case ac.FRAG_PARSING_ERROR:case ac.FRAG_DECRYPT_ERROR:case ac.FRAG_LOAD_ERROR:case ac.FRAG_LOAD_TIMEOUT:case ac.KEY_LOAD_ERROR:case ac.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(cp,t);break;case ac.AUDIO_TRACK_LOAD_ERROR:case ac.AUDIO_TRACK_LOAD_TIMEOUT:case ac.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==Zf||(null==(i=t.context)?void 0:i.type)!==lp||(this.state=Kf);break;case ac.BUFFER_APPEND_ERROR:case ac.BUFFER_FULL_ERROR:if(!t.parent||"audio"!==t.parent)return;if(t.details===ac.BUFFER_APPEND_ERROR)return void this.resetLoadingState();this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case ac.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}}onBufferFlushing(e,{type:t}){t!==Ac&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==Ac){this.flushing=!1,this.bufferFlushed=!0,this.state===im&&(this.state=Kf);const e=this.mediaBuffer||this.media;e&&(this.afterBufferFlushed(e,t,cp),this.tick())}}_handleTransmuxComplete(e){var t;const i="audio",{hls:s}=this,{remuxResult:r,chunkMeta:a}=e,o=this.getCurrentContext(a);if(!o)return void this.resetWhenMissingContext(a);const{frag:n,part:l,level:d}=o,{details:h}=d,{audio:c,text:u,id3:p,initSegment:f}=r;if(!this.fragContextChanged(n)&&h){if(this.state=em,this.switchingTrack&&c&&this.completeAudioSwitch(this.switchingTrack),null!=f&&f.tracks){const e=n.initSegment||n;this._bufferInitSegment(d,f.tracks,e,a),s.trigger(sc.FRAG_PARSING_INIT_SEGMENT,{frag:e,id:i,tracks:f.tracks})}if(c){const{startPTS:e,endPTS:t,startDTS:i,endDTS:s}=c;l&&(l.elementaryStreams[yc]={startPTS:e,endPTS:t,startDTS:i,endDTS:s}),n.setElementaryStreamInfo(yc,e,t,i,s),this.bufferFragmentData(c,n,l,a)}if(null!=p&&null!=(t=p.samples)&&t.length){const e=Zh({id:i,frag:n,details:h},p);s.trigger(sc.FRAG_PARSING_METADATA,e)}if(u){const e=Zh({id:i,frag:n,details:h},u);s.trigger(sc.FRAG_PARSING_USERDATA,e)}}else this.fragmentTracker.removeFragment(n)}_bufferInitSegment(e,t,i,s){if(this.state!==em)return;t.video&&delete t.video;const r=t.audio;if(!r)return;r.id="audio";const a=e.audioCodec;this.log(`Init audio buffer, container:${r.container}, codecs[level/parsed]=[${a}/${r.codec}]`),a&&1===a.split(",").length&&(r.levelCodec=a),this.hls.trigger(sc.BUFFER_CODECS,t);const o=r.initSegment;if(null!=o&&o.byteLength){const e={type:"audio",frag:i,part:null,chunkMeta:s,parent:i.type,data:o};this.hls.trigger(sc.BUFFER_APPENDING,e)}this.tickImmediate()}loadFragment(e,t,i){const s=this.fragmentTracker.getState(e);var r;if(this.fragCurrent=e,this.switchingTrack||s===wf||s===Tf)if("initSegment"===e.sn)this._loadInitSegment(e,t);else if(null!=(r=t.details)&&r.live&&!this.initPTS[e.cc]){this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`),this.state=rm;const i=this.mainDetails;i&&i.fragments[0].start!==t.details.fragments[0].start&&Ff(t.details,i)}else this.startFragRequested=!0,super.loadFragment(e,t,i);else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){const{media:t,bufferedTrack:i}=this,s=null==i?void 0:i.attrs,r=e.attrs;t&&s&&(s.CHANNELS!==r.CHANNELS||i.name!==e.name||i.lang!==e.lang)&&(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null)}completeAudioSwitch(e){const{hls:t}=this;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(sc.AUDIO_TRACK_SWITCHED,Yh({},e))}},audioTrackController:class extends df{constructor(e){super(e,"[audio-track-controller]"),this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(sc.MANIFEST_PARSED,this.onManifestParsed,this),e.on(sc.LEVEL_LOADING,this.onLevelLoading,this),e.on(sc.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(sc.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(sc.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(sc.MANIFEST_PARSED,this.onManifestParsed,this),e.off(sc.LEVEL_LOADING,this.onLevelLoading,this),e.off(sc.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(sc.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(sc.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:i,groupId:s,details:r}=t,a=this.tracksInGroup[i];if(!a||a.groupId!==s)return void this.warn(`Audio track with id:${i} and group:${s} not found in active group ${null==a?void 0:a.groupId}`);const o=a.details;a.details=t.details,this.log(`Audio track ${i} "${a.name}" lang:${a.lang} group:${s} loaded [${r.startSN}-${r.endSN}]`),i===this.trackId&&this.playlistLoaded(i,t,o)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const i=t.audioGroups||null,s=this.groupIds;let r=this.currentTrack;if(!i||(null==s?void 0:s.length)!==(null==i?void 0:i.length)||null!=i&&i.some((e=>-1===(null==s?void 0:s.indexOf(e))))){this.groupIds=i,this.trackId=-1,this.currentTrack=null;const e=this.tracks.filter((e=>!i||-1!==i.indexOf(e.groupId)));if(e.length)this.selectDefaultTrack&&!e.some((e=>e.default))&&(this.selectDefaultTrack=!1),e.forEach(((e,t)=>{e.id=t}));else if(!r&&!this.tracksInGroup.length)return;this.tracksInGroup=e;const t=this.hls.config.audioPreference;if(!r&&t){const i=Af(t,e,vf);if(i>-1)r=e[i];else{const e=Af(t,this.tracks);r=this.tracks[e]}}let s=this.findTrackId(r);-1===s&&r&&(s=this.findTrackId(null));const o={audioTracks:e};this.log(`Updating audio tracks, ${e.length} track(s) found in group(s): ${null==i?void 0:i.join(",")}`),this.hls.trigger(sc.AUDIO_TRACKS_UPDATED,o);const n=this.trackId;if(-1!==s&&-1===n)this.setAudioTrack(s);else if(e.length&&-1===n){var a;const t=new Error(`No audio track selected for current audio group-ID(s): ${null==(a=this.groupIds)?void 0:a.join(",")} track count: ${e.length}`);this.warn(t.message),this.hls.trigger(sc.ERROR,{type:rc.MEDIA_ERROR,details:ac.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:t})}}else this.shouldReloadPlaylist(r)&&this.setAudioTrack(this.trackId)}onError(e,t){!t.fatal&&t.context&&(t.context.type!==lp||t.context.id!==this.trackId||this.groupIds&&-1===this.groupIds.indexOf(t.context.groupId)||(this.requestScheduled=-1,this.checkRetry(t)))}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const t=this.hls;if(t.config.audioPreference=e,e){const i=this.allAudioTracks;if(this.selectDefaultTrack=!1,i.length){const s=this.currentTrack;if(s&&bf(e,s,vf))return s;const r=Af(e,this.tracksInGroup,vf);if(r>-1){const e=this.tracksInGroup[r];return this.setAudioTrack(r),e}if(s){let s=t.loadLevel;-1===s&&(s=t.firstAutoLevel);const r=function(e,t,i,s,r){const a=t[s],o=t.reduce(((e,t,i)=>{const s=t.uri;return(e[s]||(e[s]=[])).push(i),e}),{})[a.uri];o.length>1&&(s=Math.max.apply(Math,o));const n=a.videoRange,l=a.frameRate,d=a.codecSet.substring(0,4),h=_f(t,s,(t=>{if(t.videoRange!==n||t.frameRate!==l||t.codecSet.substring(0,4)!==d)return!1;const s=t.audioGroups,a=i.filter((e=>!s||-1!==s.indexOf(e.groupId)));return Af(e,a,r)>-1}));return h>-1?h:_f(t,s,(t=>{const s=t.audioGroups,a=i.filter((e=>!s||-1!==s.indexOf(e.groupId)));return Af(e,a,r)>-1}))}(e,t.levels,i,s,vf);if(-1===r)return null;t.nextLoadLevel=r}if(e.channels||e.audioCodec){const t=Af(e,i);if(t>-1)return i[t]}}}return null}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length)return void this.warn(`Invalid audio track id: ${e}`);this.clearTimer(),this.selectDefaultTrack=!1;const i=this.currentTrack,s=t[e],r=s.details&&!s.details.live;if(e===this.trackId&&s===i&&r)return;if(this.log(`Switching to audio-track ${e} "${s.name}" lang:${s.lang} group:${s.groupId} channels:${s.channels}`),this.trackId=e,this.currentTrack=s,this.hls.trigger(sc.AUDIO_TRACK_SWITCHING,Yh({},s)),r)return;const a=this.switchParams(s.url,null==i?void 0:i.details);this.loadPlaylist(a)}findTrackId(e){const t=this.tracksInGroup;for(let i=0;i<t.length;i++){const s=t[i];if((!this.selectDefaultTrack||s.default)&&(!e||bf(e,s,vf)))return i}if(e){const{name:i,lang:s,assocLang:r,characteristics:a,audioCodec:o,channels:n}=e;for(let e=0;e<t.length;e++){if(bf({name:i,lang:s,assocLang:r,characteristics:a,audioCodec:o,channels:n},t[e],vf))return e}for(let i=0;i<t.length;i++){const s=t[i];if(fg(e.attrs,s.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return i}for(let i=0;i<t.length;i++){const s=t[i];if(fg(e.attrs,s.attrs,["LANGUAGE"]))return i}}return-1}loadPlaylist(e){const t=this.currentTrack;if(this.shouldLoadPlaylist(t)&&t){super.loadPlaylist();const i=t.id,s=t.groupId;let r=t.url;if(e)try{r=e.addDirectives(r)}catch(e){this.warn(`Could not construct new URL with HLS Delivery Directives: ${e}`)}this.log(`loading audio-track playlist ${i} "${t.name}" lang:${t.lang} group:${s}`),this.clearTimer(),this.hls.trigger(sc.AUDIO_TRACK_LOADING,{url:r,id:i,groupId:s,deliveryDirectives:e||null})}}},emeController:gy,cmcdController:class{constructor(e){this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=()=>{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=e=>{try{this.apply(e,{ot:Ay.MANIFEST,su:!this.initialized})}catch(e){hc.warn("Could not generate manifest CMCD data.",e)}},this.applyFragmentData=e=>{try{const t=e.frag,i=this.hls.levels[t.level],s=this.getObjectType(t),r={d:1e3*t.duration,ot:s};s!==Ay.VIDEO&&s!==Ay.AUDIO&&s!=Ay.MUXED||(r.br=i.bitrate/1e3,r.tb=this.getTopBandwidth(s)/1e3,r.bl=this.getBufferLength(s)),this.apply(e,r)}catch(e){hc.warn("Could not generate segment CMCD data.",e)}},this.hls=e;const t=this.config=e.config,{cmcd:i}=t;null!=i&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=i.sessionId||function(){try{return crypto.randomUUID()}catch(e){try{const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch(e){let t=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const i=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?i:3&i|8).toString(16)}))}}}(),this.cid=i.contentId,this.useHeaders=!0===i.useHeaders,this.includeKeys=i.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(sc.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(sc.MEDIA_DETACHED,this.onMediaDetached,this),e.on(sc.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(sc.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(sc.MEDIA_DETACHED,this.onMediaDetached,this),e.off(sc.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var i,s;this.audioBuffer=null==(i=t.tracks.audio)?void 0:i.buffer,this.videoBuffer=null==(s=t.tracks.video)?void 0:s.buffer}createData(){var e;return{v:1,sf:by.HLS,sid:this.sid,cid:this.cid,pr:null==(e=this.media)?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){Zh(t,this.createData());const i=t.ot===Ay.INIT||t.ot===Ay.VIDEO||t.ot===Ay.MUXED;this.starved&&i&&(t.bs=!0,t.su=!0,this.starved=!1),null==t.su&&(t.su=this.buffering);const{includeKeys:s}=this;s&&(t=Object.keys(t).reduce(((e,i)=>(s.includes(i)&&(e[i]=t[i]),e)),{})),this.useHeaders?(e.headers||(e.headers={}),Hy(e.headers,t)):e.url=$y(e.url,t)}getObjectType(e){const{type:t}=e;return"subtitle"===t?Ay.TIMED_TEXT:"initSegment"===e.sn?Ay.INIT:"audio"===t?Ay.AUDIO:"main"===t?this.hls.audioTracks.length?Ay.VIDEO:Ay.MUXED:void 0}getTopBandwidth(e){let t,i=0;const s=this.hls;if(e===Ay.AUDIO)t=s.audioTracks;else{const e=s.maxAutoLevel,i=e>-1?e+1:s.levels.length;t=s.levels.slice(0,i)}for(const e of t)e.bitrate>i&&(i=e.bitrate);return i>0?i:NaN}getBufferLength(e){const t=this.hls.media,i=e===Ay.AUDIO?this.audioBuffer:this.videoBuffer;if(!i||!t)return NaN;return 1e3*Lf.bufferInfo(i,t.currentTime,this.config.maxBufferHole).len}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,i=e||this.config.loader;return class{constructor(e){this.loader=void 0,this.loader=new i(e)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(e,i,s){t(e),this.loader.load(e,i,s)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,i=e||this.config.loader;return class{constructor(e){this.loader=void 0,this.loader=new i(e)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(e,i,s){t(e),this.loader.load(e,i,s)}}}},contentSteeringController:class{constructor(e){this.hls=void 0,this.log=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this.pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.log=hc.log.bind(hc,"[content-steering]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(sc.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(sc.MANIFEST_PARSED,this.onManifestParsed,this),e.on(sc.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(sc.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(sc.MANIFEST_PARSED,this.onManifestParsed,this),e.off(sc.ERROR,this.onError,this))}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=1e3*this.timeToLoad-(performance.now()-this.updated);if(e>0)return void this.scheduleRefresh(this.uri,e)}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){-1!==this.reloadTimer&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter((t=>t!==e)))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:i}=t;null!==i&&(this.pathwayId=i.pathwayId,this.uri=i.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:i}=t;if((null==i?void 0:i.action)===sf&&i.flags===nf){const e=this.levels;let s=this.pathwayPriority,r=this.pathwayId;if(t.context){const{groupId:i,pathwayId:s,type:a}=t.context;i&&e?r=this.getPathwayForGroupId(i,a,r):s&&(r=s)}r in this.penalizedPathways||(this.penalizedPathways[r]=performance.now()),!s&&e&&(s=e.reduce(((e,t)=>(-1===e.indexOf(t.pathwayId)&&e.push(t.pathwayId),e)),[])),s&&s.length>1&&(this.updatePathwayPriority(s),i.resolved=this.pathwayId!==r),i.resolved||hc.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${r} levels: ${e?e.length:e} priorities: ${JSON.stringify(s)} penalized: ${JSON.stringify(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(0===t.length){const i=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${i}"`),t=this.getLevelsForPathway(i),this.pathwayId=i}return t.length!==e.length?(this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t):e}getLevelsForPathway(e){return null===this.levels?[]:this.levels.filter((t=>e===t.pathwayId))}updatePathwayPriority(e){let t;this.pathwayPriority=e;const i=this.penalizedPathways,s=performance.now();Object.keys(i).forEach((e=>{s-i[e]>3e5&&delete i[e]}));for(let s=0;s<e.length;s++){const r=e[s];if(r in i)continue;if(r===this.pathwayId)return;const a=this.hls.nextLoadLevel,o=this.hls.levels[a];if(t=this.getLevelsForPathway(r),t.length>0){this.log(`Setting Pathway to "${r}"`),this.pathwayId=r,$p(t),this.hls.trigger(sc.LEVELS_UPDATED,{levels:t});const e=this.hls.levels[a];o&&e&&this.levels&&(e.attrs["STABLE-VARIANT-ID"]!==o.attrs["STABLE-VARIANT-ID"]&&e.bitrate!==o.bitrate&&this.log(`Unstable Pathways change from bitrate ${o.bitrate} to ${e.bitrate}`),this.hls.nextLoadLevel=a);break}}}getPathwayForGroupId(e,t,i){const s=this.getLevelsForPathway(i).concat(this.levels||[]);for(let i=0;i<s.length;i++)if(t===lp&&s[i].hasAudioGroup(e)||t===dp&&s[i].hasSubtitleGroup(e))return s[i].pathwayId;return i}clonePathways(e){const t=this.levels;if(!t)return;const i={},s={};e.forEach((e=>{const{ID:r,"BASE-ID":a,"URI-REPLACEMENT":o}=e;if(t.some((e=>e.pathwayId===r)))return;const n=this.getLevelsForPathway(a).map((e=>{const t=new pc(e.attrs);t["PATHWAY-ID"]=r;const a=t.AUDIO&&`${t.AUDIO}_clone_${r}`,n=t.SUBTITLES&&`${t.SUBTITLES}_clone_${r}`;a&&(i[t.AUDIO]=a,t.AUDIO=a),n&&(s[t.SUBTITLES]=n,t.SUBTITLES=n);const l=Jy(e.uri,t["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",o),d=new Up({attrs:t,audioCodec:e.audioCodec,bitrate:e.bitrate,height:e.height,name:e.name,url:l,videoCodec:e.videoCodec,width:e.width});if(e.audioGroups)for(let t=1;t<e.audioGroups.length;t++)d.addGroupId("audio",`${e.audioGroups[t]}_clone_${r}`);if(e.subtitleGroups)for(let t=1;t<e.subtitleGroups.length;t++)d.addGroupId("text",`${e.subtitleGroups[t]}_clone_${r}`);return d}));t.push(...n),Wy(this.audioTracks,i,o,r),Wy(this.subtitleTracks,s,o,r)}))}loadSteeringManifest(e){const t=this.hls.config,i=t.loader;let s;this.loader&&this.loader.destroy(),this.loader=new i(t);try{s=new self.URL(e)}catch(t){return this.enabled=!1,void this.log(`Failed to parse Steering Manifest URI: ${e}`)}if("data:"!==s.protocol){const e=0|(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate);s.searchParams.set("_HLS_pathway",this.pathwayId),s.searchParams.set("_HLS_throughput",""+e)}const r={responseType:"json",url:s.href},a=t.steeringManifestLoadPolicy.default,o=a.errorRetry||a.timeoutRetry||{},n={loadPolicy:a,timeout:a.maxLoadTimeMs,maxRetry:o.maxNumRetry||0,retryDelay:o.retryDelayMs||0,maxRetryDelay:o.maxRetryDelayMs||0},l={onSuccess:(e,t,i,r)=>{this.log(`Loaded steering manifest: "${s}"`);const a=e.data;if(1!==a.VERSION)return void this.log(`Steering VERSION ${a.VERSION} not supported!`);this.updated=performance.now(),this.timeToLoad=a.TTL;const{"RELOAD-URI":o,"PATHWAY-CLONES":n,"PATHWAY-PRIORITY":l}=a;if(o)try{this.uri=new self.URL(o,s).href}catch(e){return this.enabled=!1,void this.log(`Failed to parse Steering Manifest RELOAD-URI: ${o}`)}this.scheduleRefresh(this.uri||i.url),n&&this.clonePathways(n);const d={steeringManifest:a,url:s.toString()};this.hls.trigger(sc.STEERING_MANIFEST_LOADED,d),l&&this.updatePathwayPriority(l)},onError:(e,t,i,s)=>{if(this.log(`Error loading steering manifest: ${e.code} ${e.text} (${t.url})`),this.stopLoad(),410===e.code)return this.enabled=!1,void this.log(`Steering manifest ${t.url} no longer available`);let r=1e3*this.timeToLoad;if(429!==e.code)this.scheduleRefresh(this.uri||t.url,r);else{const e=this.loader;if("function"==typeof(null==e?void 0:e.getResponseHeader)){const t=e.getResponseHeader("Retry-After");t&&(r=1e3*parseFloat(t))}this.log(`Steering manifest ${t.url} rate limited`)}},onTimeout:(e,t,i)=>{this.log(`Timeout loading steering manifest (${t.url})`),this.scheduleRefresh(this.uri||t.url)}};this.log(`Requesting steering manifest: ${s}`),this.loader.load(r,n,l)}scheduleRefresh(e,t=1e3*this.timeToLoad){this.clearTimeout(),this.reloadTimer=self.setTimeout((()=>{var t;const i=null==(t=this.hls)?void 0:t.media;!i||i.ended?this.scheduleRefresh(e,1e3*this.timeToLoad):this.loadSteeringManifest(e)}),t)}}});function sA(e){return e&&"object"==typeof e?Array.isArray(e)?e.map(sA):Object.keys(e).reduce(((t,i)=>(t[i]=sA(e[i]),t)),{}):e}function rA(e){const t=e.loader;if(t!==Qy&&t!==Ky)hc.log("[config]: Custom loader detected, cannot enable progressive streaming"),e.progressive=!1;else{(function(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(e){}return!1})()&&(e.loader=Qy,e.progressive=!0,e.enableSoftwareAES=!0,hc.log("[config]: Progressive streaming enabled, using FetchLoader"))}}let aA;class oA extends df{constructor(e,t){super(e,"[level-controller]"),this._levels=[],this._firstLevel=-1,this._maxAutoLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=t,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(sc.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(sc.LEVEL_LOADED,this.onLevelLoaded,this),e.on(sc.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(sc.FRAG_BUFFERED,this.onFragBuffered,this),e.on(sc.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(sc.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(sc.LEVEL_LOADED,this.onLevelLoaded,this),e.off(sc.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(sc.FRAG_BUFFERED,this.onFragBuffered,this),e.off(sc.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach((e=>{e.loadError=0,e.fragmentError=0})),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const i=this.hls.config.preferManagedMediaSource,s=[],r={},a={};let o=!1,n=!1,l=!1;t.levels.forEach((e=>{var t,d;const h=e.attrs;let{audioCodec:c,videoCodec:u}=e;-1!==(null==(t=c)?void 0:t.indexOf("mp4a.40.34"))&&(aA||(aA=/chrome|firefox/i.test(navigator.userAgent)),aA&&(e.audioCodec=c=void 0)),c&&(e.audioCodec=c=$u(c,i)),0===(null==(d=u)?void 0:d.indexOf("avc1"))&&(u=e.videoCodec=function(e){const t=e.split(".");if(t.length>2){let e=t.shift()+".";return e+=parseInt(t.shift()).toString(16),e+=("000"+parseInt(t.shift()).toString(16)).slice(-4),e}return e}(u));const{width:p,height:f,unknownCodecs:m}=e;if(o||(o=!(!p||!f)),n||(n=!!u),l||(l=!!c),null!=m&&m.length||c&&!Ou(c,"audio",i)||u&&!Ou(u,"video",i))return;const{CODECS:g,"FRAME-RATE":y,"HDCP-LEVEL":A,"PATHWAY-ID":b,RESOLUTION:v,"VIDEO-RANGE":_}=h,S=`${`${b||"."}-`}${e.bitrate}-${v}-${y}-${g}-${_}-${A}`;if(r[S])if(r[S].uri===e.url||e.attrs["PATHWAY-ID"])r[S].addGroupId("audio",h.AUDIO),r[S].addGroupId("text",h.SUBTITLES);else{const t=a[S]+=1;e.attrs["PATHWAY-ID"]=new Array(t+1).join(".");const i=new Up(e);r[S]=i,s.push(i)}else{const t=new Up(e);r[S]=t,a[S]=1,s.push(t)}})),this.filterAndSortMediaOptions(s,t,o,n,l)}filterAndSortMediaOptions(e,t,i,s,r){let a=[],o=[],n=e;if((i||s)&&r&&(n=n.filter((({videoCodec:e,videoRange:t,width:i,height:s})=>{return(!!e||!(!i||!s))&&(!!(r=t)&&Lp.indexOf(r)>-1);var r}))),0===n.length)return void Promise.resolve().then((()=>{if(this.hls){t.levels.length&&this.warn(`One or more CODECS in variant not supported: ${JSON.stringify(t.levels[0].attrs)}`);const e=new Error("no level with compatible codecs found in manifest");this.hls.trigger(sc.ERROR,{type:rc.MEDIA_ERROR,details:ac.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:e,reason:e.message})}}));if(t.audioTracks){const{preferManagedMediaSource:e}=this.hls.config;a=t.audioTracks.filter((t=>!t.audioCodec||Ou(t.audioCodec,"audio",e))),nA(a)}t.subtitles&&(o=t.subtitles,nA(o));const l=n.slice(0);n.sort(((e,t)=>{if(e.attrs["HDCP-LEVEL"]!==t.attrs["HDCP-LEVEL"])return(e.attrs["HDCP-LEVEL"]||"")>(t.attrs["HDCP-LEVEL"]||"")?1:-1;if(i&&e.height!==t.height)return e.height-t.height;if(e.frameRate!==t.frameRate)return e.frameRate-t.frameRate;if(e.videoRange!==t.videoRange)return Lp.indexOf(e.videoRange)-Lp.indexOf(t.videoRange);if(e.videoCodec!==t.videoCodec){const i=zu(e.videoCodec),s=zu(t.videoCodec);if(i!==s)return s-i}if(e.uri===t.uri&&e.codecSet!==t.codecSet){const i=Gu(e.codecSet),s=Gu(t.codecSet);if(i!==s)return s-i}return e.averageBitrate!==t.averageBitrate?e.averageBitrate-t.averageBitrate:0}));let d=l[0];if(this.steering&&(n=this.steering.filterParsedLevels(n),n.length!==l.length))for(let e=0;e<l.length;e++)if(l[e].pathwayId===n[0].pathwayId){d=l[e];break}this._levels=n;for(let e=0;e<n.length;e++)if(n[e]===d){var h;this._firstLevel=e;const t=d.bitrate,i=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${n.length} level(s) found, first bitrate: ${t}`),void 0===(null==(h=this.hls.userConfig)?void 0:h.abrEwmaDefaultEstimate)){const e=Math.min(t,this.hls.config.abrEwmaDefaultEstimateMax);e>i&&i===iA.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=e)}break}const c=r&&!s,u={levels:n,audioTracks:a,subtitleTracks:o,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:r,video:s,altAudio:!c&&a.some((e=>!!e.url))};this.hls.trigger(sc.MANIFEST_PARSED,u),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}get levels(){return 0===this._levels.length?null:this._levels}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(0===t.length)return;if(e<0||e>=t.length){const i=new Error("invalid level idx"),s=e<0;if(this.hls.trigger(sc.ERROR,{type:rc.OTHER_ERROR,details:ac.LEVEL_SWITCH_ERROR,level:e,fatal:s,error:i,reason:i.message}),s)return;e=Math.min(e,t.length-1)}const i=this.currentLevelIndex,s=this.currentLevel,r=s?s.attrs["PATHWAY-ID"]:void 0,a=t[e],o=a.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=a,i===e&&a.details&&s&&r===o)return;this.log(`Switching to level ${e} (${a.height?a.height+"p ":""}${a.videoRange?a.videoRange+" ":""}${a.codecSet?a.codecSet+" ":""}@${a.bitrate})${o?" with Pathway "+o:""} from level ${i}${r?" with Pathway "+r:""}`);const n={level:e,attrs:a.attrs,details:a.details,bitrate:a.bitrate,averageBitrate:a.averageBitrate,maxBitrate:a.maxBitrate,realBitrate:a.realBitrate,width:a.width,height:a.height,codecSet:a.codecSet,audioCodec:a.audioCodec,videoCodec:a.videoCodec,audioGroups:a.audioGroups,subtitleGroups:a.subtitleGroups,loaded:a.loaded,loadError:a.loadError,fragmentError:a.fragmentError,name:a.name,id:a.id,uri:a.uri,url:a.url,urlId:0,audioGroupIds:a.audioGroupIds,textGroupIds:a.textGroupIds};this.hls.trigger(sc.LEVEL_SWITCHING,n);const l=a.details;if(!l||l.live){const e=this.switchParams(a.uri,null==s?void 0:s.details);this.loadPlaylist(e)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(void 0===this._startLevel){const e=this.hls.config.startLevel;return void 0!==e?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}onError(e,t){!t.fatal&&t.context&&t.context.type===np&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(void 0!==t&&t.type===hp){const e=t.elementaryStreams;if(!Object.keys(e).some((t=>!!e[t])))return;const i=this._levels[t.level];null!=i&&i.loadError&&(this.log(`Resetting level error count of ${i.loadError} on frag buffered`),i.loadError=0)}}onLevelLoaded(e,t){var i;const{level:s,details:r}=t,a=this._levels[s];var o;if(!a)return this.warn(`Invalid level index ${s}`),void(null!=(o=t.deliveryDirectives)&&o.skip&&(r.deltaUpdateFailed=!0));s===this.currentLevelIndex?(0===a.fragmentError&&(a.loadError=0),this.playlistLoaded(s,t,a.details)):null!=(i=t.deliveryDirectives)&&i.skip&&(r.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist();const t=this.currentLevelIndex,i=this.currentLevel;if(i&&this.shouldLoadPlaylist(i)){let s=i.uri;if(e)try{s=e.addDirectives(s)}catch(e){this.warn(`Could not construct new URL with HLS Delivery Directives: ${e}`)}const r=i.attrs["PATHWAY-ID"];this.log(`Loading level index ${t}${void 0!==(null==e?void 0:e.msn)?" at sn "+e.msn+" part "+e.part:""} with${r?" Pathway "+r:""} ${s}`),this.clearTimer(),this.hls.trigger(sc.LEVEL_LOADING,{url:s,level:t,pathwayId:i.attrs["PATHWAY-ID"],id:0,deliveryDirectives:e||null})}}get nextLoadLevel(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;const i=this._levels.filter(((t,i)=>i!==e||(this.steering&&this.steering.removeLevel(t),t===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,t.details&&t.details.fragments.forEach((e=>e.level=-1))),!1)));$p(i),this._levels=i,this.currentLevelIndex>-1&&null!=(t=this.currentLevel)&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.hls.trigger(sc.LEVELS_UPDATED,{levels:i})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:i}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(sc.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:i}))}}function nA(e){const t={};e.forEach((e=>{const i=e.groupId||"";e.id=t[i]=t[i]||0,t[i]++}))}class lA{constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const i in this.keyUriToKeyInfo){const s=this.keyUriToKeyInfo[i].loader;if(s){var t;if(e&&e!==(null==(t=s.context)?void 0:t.frag.type))return;s.abort()}}}detach(){for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}}createKeyLoadError(e,t=ac.KEY_LOAD_ERROR,i,s,r){return new Gf({type:rc.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:r,error:i,networkDetails:s})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled){const{sn:i,cc:s}=e;for(let e=0;e<t.length;e++){const r=t[e];if(s<=r.cc&&("initSegment"===i||"initSegment"===r.sn||i<r.sn)){this.emeController.selectKeySystemFormat(r).then((e=>{r.setKeyFormat(e)}));break}}}}load(e){return!e.decryptdata&&e.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(e).then((t=>this.loadInternal(e,t))):this.loadInternal(e)}loadInternal(e,t){var i,s;t&&e.setKeyFormat(t);const r=e.decryptdata;if(!r){const i=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,ac.KEY_LOAD_ERROR,i))}const a=r.uri;if(!a)return Promise.reject(this.createKeyLoadError(e,ac.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${a}"`)));let o=this.keyUriToKeyInfo[a];if(null!=(i=o)&&i.decryptdata.key)return r.key=o.decryptdata.key,Promise.resolve({frag:e,keyInfo:o});var n;if(null!=(s=o)&&s.keyLoadPromise)switch(null==(n=o.mediaKeySessionContext)?void 0:n.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return o.keyLoadPromise.then((t=>(r.key=t.keyInfo.decryptdata.key,{frag:e,keyInfo:o})))}switch(o=this.keyUriToKeyInfo[a]={decryptdata:r,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},r.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return"identity"===r.keyFormat?this.loadKeyHTTP(o,e):this.loadKeyEME(o,e);case"AES-128":return this.loadKeyHTTP(o,e);default:return Promise.reject(this.createKeyLoadError(e,ac.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${r.method}"`)))}}loadKeyEME(e,t){const i={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const t=this.emeController.loadKey(i);if(t)return(e.keyLoadPromise=t.then((t=>(e.mediaKeySessionContext=t,i)))).catch((t=>{throw e.keyLoadPromise=null,t}))}return Promise.resolve(i)}loadKeyHTTP(e,t){const i=this.config,s=new(0,i.loader)(i);return t.keyLoader=e.loader=s,e.keyLoadPromise=new Promise(((r,a)=>{const o={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},n=i.keyLoadPolicy.default,l={loadPolicy:n,timeout:n.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:(e,t,i,s)=>{const{frag:o,keyInfo:n,url:l}=i;if(!o.decryptdata||n!==this.keyUriToKeyInfo[l])return a(this.createKeyLoadError(o,ac.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),s));n.decryptdata.key=o.decryptdata.key=new Uint8Array(e.data),o.keyLoader=null,n.loader=null,r({frag:o,keyInfo:n})},onError:(e,i,s,r)=>{this.resetLoader(i),a(this.createKeyLoadError(t,ac.KEY_LOAD_ERROR,new Error(`HTTP Error ${e.code} loading key ${e.text}`),s,Yh({url:o.url,data:void 0},e)))},onTimeout:(e,i,s)=>{this.resetLoader(i),a(this.createKeyLoadError(t,ac.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),s))},onAbort:(e,i,s)=>{this.resetLoader(i),a(this.createKeyLoadError(t,ac.INTERNAL_ABORTED,new Error("key loading aborted"),s))}};s.load(o,l,d)}))}resetLoader(e){const{frag:t,keyInfo:i,url:s}=e,r=i.loader;t.keyLoader===r&&(t.keyLoader=null,i.loader=null),delete this.keyUriToKeyInfo[s],r&&r.destroy()}}function dA(){return self.SourceBuffer||self.WebKitSourceBuffer}function hA(){if(!Uu())return!1;const e=dA();return!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove}class cA{constructor(e,t,i,s){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=i,this.hls=s}destroy(){this.media=null,this.hls=this.fragmentTracker=null}poll(e,t){const{config:i,media:s,stalled:r}=this;if(null===s)return;const{currentTime:a,seeking:o}=s,n=this.seeking&&!o,l=!this.seeking&&o;if(this.seeking=o,a!==e){if(this.moved=!0,o||(this.nudgeRetry=0),null!==r){if(this.stallReported){const e=self.performance.now()-r;hc.warn(`playback not stuck anymore @${a}, after ${Math.round(e)}ms`),this.stallReported=!1}this.stalled=null}return}if(l||n)return void(this.stalled=null);if(s.paused&&!o||s.ended||0===s.playbackRate||!Lf.getBuffered(s).length)return void(this.nudgeRetry=0);const d=Lf.bufferInfo(s,a,0),h=d.nextStart||0;if(o){const e=d.len>2,i=!h||t&&t.start<=a||h-a>2&&!this.fragmentTracker.getPartialFragment(a);if(e||i)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var c;if(!(d.len>0)&&!h)return;const e=Math.max(h,d.start||0)-a,t=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,i=(null==t||null==(c=t.details)?void 0:c.live)?2*t.details.targetduration:2,r=this.fragmentTracker.getPartialFragment(a);if(e>0&&(e<=i||r))return void(s.paused||this._trySkipBufferHole(r))}const u=self.performance.now();if(null===r)return void(this.stalled=u);const p=u-r;if(!o&&p>=250&&(this._reportStall(d),!this.media))return;const f=Lf.bufferInfo(s,a,i.maxBufferHole);this._tryFixBufferStall(f,p)}_tryFixBufferStall(e,t){const{config:i,fragmentTracker:s,media:r}=this;if(null===r)return;const a=r.currentTime,o=s.getPartialFragment(a);if(o){if(this._trySkipBufferHole(o)||!this.media)return}(e.len>i.maxBufferHole||e.nextStart&&e.nextStart-a<i.maxBufferHole)&&t>1e3*i.highBufferWatchdogPeriod&&(hc.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}_reportStall(e){const{hls:t,media:i,stallReported:s}=this;if(!s&&i){this.stallReported=!0;const s=new Error(`Playback stalling at @${i.currentTime} due to low buffer (${JSON.stringify(e)})`);hc.warn(s.message),t.trigger(sc.ERROR,{type:rc.MEDIA_ERROR,details:ac.BUFFER_STALLED_ERROR,fatal:!1,error:s,buffer:e.len})}}_trySkipBufferHole(e){const{config:t,hls:i,media:s}=this;if(null===s)return 0;const r=s.currentTime,a=Lf.bufferInfo(s,r,0),o=r<a.start?a.start:a.nextStart;if(o){const n=a.len<=t.maxBufferHole,l=a.len>0&&a.len<1&&s.readyState<3,d=o-r;if(d>0&&(n||l)){if(d>t.maxBufferHole){const{fragmentTracker:t}=this;let i=!1;if(0===r){const e=t.getAppendedFrag(0,hp);e&&o<e.end&&(i=!0)}if(!i){const i=e||t.getAppendedFrag(r,hp);if(i){let e=!1,s=i.end;for(;s<o;){const i=t.getPartialFragment(s);if(!i){e=!0;break}s+=i.duration}if(e)return 0}}}const a=Math.max(o+.05,r+.1);if(hc.warn(`skipping hole, adjusting currentTime from ${r} to ${a}`),this.moved=!0,this.stalled=null,s.currentTime=a,e&&!e.gap){const t=new Error(`fragment loaded with buffer holes, seeking from ${r} to ${a}`);i.trigger(sc.ERROR,{type:rc.MEDIA_ERROR,details:ac.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:t,reason:t.message,frag:e})}return a}}return 0}_tryNudgeBuffer(){const{config:e,hls:t,media:i,nudgeRetry:s}=this;if(null===i)return;const r=i.currentTime;if(this.nudgeRetry++,s<e.nudgeMaxRetry){const a=r+(s+1)*e.nudgeOffset,o=new Error(`Nudging 'currentTime' from ${r} to ${a}`);hc.warn(o.message),i.currentTime=a,t.trigger(sc.ERROR,{type:rc.MEDIA_ERROR,details:ac.BUFFER_NUDGE_ON_STALL,error:o,fatal:!1})}else{const i=new Error(`Playhead still not moving while enough data buffered @${r} after ${e.nudgeMaxRetry} nudges`);hc.error(i.message),t.trigger(sc.ERROR,{type:rc.MEDIA_ERROR,details:ac.BUFFER_STALLED_ERROR,error:i,fatal:!0})}}}class uA extends om{constructor(e,t,i){super(e,t,i,"[stream-controller]",hp),this.audioCodecSwap=!1,this.gapController=null,this.level=-1,this._forceStartLoad=!1,this.altAudio=!1,this.audioOnly=!1,this.fragPlaying=null,this.onvplaying=null,this.onvseeked=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(sc.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(sc.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.on(sc.MANIFEST_PARSED,this.onManifestParsed,this),e.on(sc.LEVEL_LOADING,this.onLevelLoading,this),e.on(sc.LEVEL_LOADED,this.onLevelLoaded,this),e.on(sc.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(sc.ERROR,this.onError,this),e.on(sc.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(sc.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(sc.BUFFER_CREATED,this.onBufferCreated,this),e.on(sc.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(sc.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(sc.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(sc.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(sc.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(sc.MANIFEST_LOADING,this.onManifestLoading,this),e.off(sc.MANIFEST_PARSED,this.onManifestParsed,this),e.off(sc.LEVEL_LOADED,this.onLevelLoaded,this),e.off(sc.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(sc.ERROR,this.onError,this),e.off(sc.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(sc.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(sc.BUFFER_CREATED,this.onBufferCreated,this),e.off(sc.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(sc.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(sc.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying()}startLoad(e){if(this.levels){const{lastCurrentTime:t,hls:i}=this;if(this.stopLoad(),this.setInterval(100),this.level=-1,!this.startFragRequested){let e=i.startLevel;-1===e&&(i.config.testBandwidth&&this.levels.length>1?(e=0,this.bitrateTest=!0):e=i.firstAutoLevel),i.nextLoadLevel=e,this.level=i.loadLevel,this.loadedmetadata=!1}t>0&&-1===e&&(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t),this.state=Kf,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=qf}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case am:{const{levels:e,level:t}=this,i=null==e?void 0:e[t],s=null==i?void 0:i.details;if(s&&(!s.live||this.levelLastLoaded===i)){if(this.waitForCdnTuneIn(s))break;this.state=Kf;break}if(this.hls.nextLoadLevel!==this.level){this.state=Kf;break}break}case Xf:{var e;const t=self.performance.now(),i=this.retryDate;if(!i||t>=i||null!=(e=this.media)&&e.seeking){const{levels:e,level:t}=this,i=null==e?void 0:e[t];this.resetStartWhenNotLoaded(i||null),this.state=Kf}}}this.state===Kf&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){super.onTickEnd(),this.checkBuffer(),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:i,media:s}=this;if(null===t||!s&&(this.startFragRequested||!e.config.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;const r=e.nextLoadLevel;if(null==i||!i[r])return;const a=i[r],o=this.getMainFwdBufferInfo();if(null===o)return;const n=this.getLevelDetails();if(n&&this._streamEnded(o,n)){const e={};return this.altAudio&&(e.type="video"),this.hls.trigger(sc.BUFFER_EOS,e),void(this.state=im)}e.loadLevel!==r&&-1===e.manualLevel&&this.log(`Adapting to level ${r} from level ${this.level}`),this.level=e.nextLoadLevel=r;const l=a.details;if(!l||this.state===am||l.live&&this.levelLastLoaded!==a)return this.level=r,void(this.state=am);const d=o.len,h=this.getMaxBufferLength(a.maxBitrate);if(d>=h)return;this.backtrackFragment&&this.backtrackFragment.start>o.end&&(this.backtrackFragment=null);const c=this.backtrackFragment?this.backtrackFragment.start:o.end;let u=this.getNextFragment(c,l);if(this.couldBacktrack&&!this.fragPrevious&&u&&"initSegment"!==u.sn&&this.fragmentTracker.getState(u)!==kf){var p;const e=(null!=(p=this.backtrackFragment)?p:u).sn-l.startSN,t=l.fragments[e-1];t&&u.cc===t.cc&&(u=t,this.fragmentTracker.removeFragment(t))}else this.backtrackFragment&&o.len&&(this.backtrackFragment=null);if(u&&this.isLoopLoading(u,c)){if(!u.gap){const e=this.audioOnly&&!this.altAudio?yc:Ac,t=(e===Ac?this.videoBuffer:this.mediaBuffer)||this.media;t&&this.afterBufferFlushed(t,e,hp)}u=this.getNextFragmentLoopLoading(u,l,o,hp,h)}u&&(!u.initSegment||u.initSegment.data||this.bitrateTest||(u=u.initSegment),this.loadFragment(u,a,c))}loadFragment(e,t,i){const s=this.fragmentTracker.getState(e);this.fragCurrent=e,s===wf||s===Tf?"initSegment"===e.sn?this._loadInitSegment(e,t):this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):(this.startFragRequested=!0,super.loadFragment(e,t,i)):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,hp)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(null!=t&&t.readyState){let i;const s=this.getAppendedFrag(t.currentTime);s&&s.start>1&&this.flushMainBuffer(0,s.start-1);const r=this.getLevelDetails();if(null!=r&&r.live){const e=this.getMainFwdBufferInfo();if(!e||e.len<2*r.targetduration)return}if(!t.paused&&e){const t=e[this.hls.nextLoadLevel],s=this.fragLastKbps;i=s&&this.fragCurrent?this.fragCurrent.duration*t.maxBitrate/(1e3*s)+1:0}else i=0;const a=this.getBufferedFrag(t.currentTime+i);if(a){const e=this.followingBufferedFrag(a);if(e){this.abortCurrentFrag();const t=e.maxStartPTS?e.maxStartPTS:e.start,i=e.duration,s=Math.max(a.end,t+Math.min(Math.max(i-this.config.maxFragLookUpTolerance,i*(this.couldBacktrack?.5:.125)),i*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(s,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case Yf:case Qf:case Xf:case em:case tm:this.state=Kf}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const i=t.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),i.addEventListener("playing",this.onvplaying),i.addEventListener("seeked",this.onvseeked),this.gapController=new cA(this.config,i,this.fragmentTracker,this.hls)}onMediaDetaching(){const{media:e}=this;e&&this.onvplaying&&this.onvseeked&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),super.onMediaDetaching()}onMediaPlaying(){this.tick()}onMediaSeeked(){const e=this.media,t=e?e.currentTime:null;ec(t)&&this.log(`Media seeked to ${t.toFixed(3)}`);const i=this.getMainFwdBufferInfo();null!==i&&0!==i.len?this.tick():this.warn(`Main forward buffer length on "seeked" event ${i?i.len:"empty"})`)}onManifestLoading(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(sc.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=this.fragLastKbps=0,this.levels=this.fragPlaying=this.backtrackFragment=this.levelLastLoaded=null,this.altAudio=this.audioOnly=this.startFragRequested=!1}onManifestParsed(e,t){let i=!1,s=!1;t.levels.forEach((e=>{const t=e.audioCodec;t&&(i=i||-1!==t.indexOf("mp4a.40.2"),s=s||-1!==t.indexOf("mp4a.40.5"))})),this.audioCodecSwitch=i&&s&&!function(){var e;const t=dA();return"function"==typeof(null==t||null==(e=t.prototype)?void 0:e.changeType)}(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1}onLevelLoading(e,t){const{levels:i}=this;if(!i||this.state!==Kf)return;const s=i[t.level];(!s.details||s.details.live&&this.levelLastLoaded!==s||this.waitForCdnTuneIn(s.details))&&(this.state=am)}onLevelLoaded(e,t){var i;const{levels:s}=this,r=t.level,a=t.details,o=a.totalduration;if(!s)return void this.warn(`Levels were reset while loading level ${r}`);this.log(`Level ${r} loaded [${a.startSN},${a.endSN}]${a.lastPartSn?`[part-${a.lastPartSn}-${a.lastPartIndex}]`:""}, cc [${a.startCC}, ${a.endCC}] duration:${o}`);const n=s[r],l=this.fragCurrent;!l||this.state!==Qf&&this.state!==Xf||l.level!==t.level&&l.loader&&this.abortCurrentFrag();let d=0;if(a.live||null!=(i=n.details)&&i.live){var h;if(this.checkLiveUpdate(a),a.deltaUpdateFailed)return;d=this.alignPlaylists(a,n.details,null==(h=this.levelLastLoaded)?void 0:h.details)}if(n.details=a,this.levelLastLoaded=n,this.hls.trigger(sc.LEVEL_UPDATED,{details:a,level:r}),this.state===am){if(this.waitForCdnTuneIn(a))return;this.state=Kf}this.startFragRequested?a.live&&this.synchronizeToLiveEdge(a):this.setStartPosition(a,d),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:i,part:s,payload:r}=e,{levels:a}=this;if(!a)return void this.warn(`Levels were reset while fragment load was in progress. Fragment ${i.sn} of level ${i.level} will not be buffered`);const o=a[i.level],n=o.details;if(!n)return this.warn(`Dropping fragment ${i.sn} of level ${i.level} after level details were reset`),void this.fragmentTracker.removeFragment(i);const l=o.videoCodec,d=n.PTSKnown||!n.live,h=null==(t=i.initSegment)?void 0:t.data,c=this._getAudioCodec(o),u=this.transmuxer=this.transmuxer||new ug(this.hls,hp,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),p=s?s.index:-1,f=-1!==p,m=new Pf(i.level,i.sn,i.stats.chunkCount,r.byteLength,p,f),g=this.initPTS[i.cc];u.push(r,h,c,l,i,s,n.totalduration,d,m,g)}onAudioTrackSwitching(e,t){const i=this.altAudio;if(!!!t.url){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const e=this.fragCurrent;e&&(this.log("Switching to main audio track, cancel main fragment load"),e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();const e=this.hls;i&&(e.trigger(sc.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),e.trigger(sc.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const i=t.id,s=!!this.hls.audioTracks[i].url;if(s){const e=this.videoBuffer;e&&this.mediaBuffer!==e&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=e)}this.altAudio=s,this.tick()}onBufferCreated(e,t){const i=t.tracks;let s,r,a=!1;for(const e in i){const t=i[e];if("main"===t.id){if(r=e,s=t,"video"===e){const t=i[e];t&&(this.videoBuffer=t.buffer)}}else a=!0}a&&s?(this.log(`Alternate track found, use ${r}.buffered to schedule main fragment loading`),this.mediaBuffer=s.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:i,part:s}=t;if(i&&i.type!==hp)return;if(this.fragContextChanged(i))return this.warn(`Fragment ${i.sn}${s?" p: "+s.index:""} of level ${i.level} finished buffering, but was aborted. state: ${this.state}`),void(this.state===tm&&(this.state=Kf));const r=s?s.stats:i.stats;this.fragLastKbps=Math.round(8*r.total/(r.buffering.end-r.loading.first)),"initSegment"!==i.sn&&(this.fragPrevious=i),this.fragBufferedComplete(i,s)}onError(e,t){var i;if(t.fatal)this.state=sm;else switch(t.details){case ac.FRAG_GAP:case ac.FRAG_PARSING_ERROR:case ac.FRAG_DECRYPT_ERROR:case ac.FRAG_LOAD_ERROR:case ac.FRAG_LOAD_TIMEOUT:case ac.KEY_LOAD_ERROR:case ac.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(hp,t);break;case ac.LEVEL_LOAD_ERROR:case ac.LEVEL_LOAD_TIMEOUT:case ac.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==am||(null==(i=t.context)?void 0:i.type)!==np||(this.state=Kf);break;case ac.BUFFER_APPEND_ERROR:case ac.BUFFER_FULL_ERROR:if(!t.parent||"main"!==t.parent)return;if(t.details===ac.BUFFER_APPEND_ERROR)return void this.resetLoadingState();this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case ac.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}}checkBuffer(){const{media:e,gapController:t}=this;if(e&&t&&e.readyState){if(this.loadedmetadata||!Lf.getBuffered(e).length){const e=this.state!==Kf?this.fragCurrent:null;t.poll(this.lastCurrentTime,e)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=Kf,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==yc||this.audioOnly&&!this.altAudio){const e=(t===Ac?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(e,t,hp),this.tick()}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let i=this.startPosition;if(i>=0&&t<i){if(e.seeking)return void this.log(`could not seek to ${i}, already seeking at ${t}`);const s=Lf.getBuffered(e),r=(s.length?s.start(0):0)-i;r>0&&(r<this.config.maxBufferHole||r<this.config.maxFragLookUpTolerance)&&(this.log(`adjusting start position by ${r} to match buffer start`),i+=r,this.startPosition=i),this.log(`seek to target start position ${i} from current time ${t}`),e.currentTime=i}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then((i=>{const{hls:s}=this;if(!i||this.fragContextChanged(e))return;t.fragmentError=0,this.state=Kf,this.startFragRequested=!1,this.bitrateTest=!1;const r=e.stats;r.parsing.start=r.parsing.end=r.buffering.start=r.buffering.end=self.performance.now(),s.trigger(sc.FRAG_LOADED,i),e.bitrateTest=!1}))}_handleTransmuxComplete(e){var t;const i="main",{hls:s}=this,{remuxResult:r,chunkMeta:a}=e,o=this.getCurrentContext(a);if(!o)return void this.resetWhenMissingContext(a);const{frag:n,part:l,level:d}=o,{video:h,text:c,id3:u,initSegment:p}=r,{details:f}=d,m=this.altAudio?void 0:r.audio;if(this.fragContextChanged(n))this.fragmentTracker.removeFragment(n);else{if(this.state=em,p){if(null!=p&&p.tracks){const e=n.initSegment||n;this._bufferInitSegment(d,p.tracks,e,a),s.trigger(sc.FRAG_PARSING_INIT_SEGMENT,{frag:e,id:i,tracks:p.tracks})}const e=p.initPTS,t=p.timescale;ec(e)&&(this.initPTS[n.cc]={baseTime:e,timescale:t},s.trigger(sc.INIT_PTS_FOUND,{frag:n,id:i,initPTS:e,timescale:t}))}if(h&&f&&"initSegment"!==n.sn){const e=f.fragments[n.sn-1-f.startSN],t=n.sn===f.startSN,i=!e||n.cc>e.cc;if(!1!==r.independent){const{startPTS:e,endPTS:s,startDTS:r,endDTS:o}=h;if(l)l.elementaryStreams[h.type]={startPTS:e,endPTS:s,startDTS:r,endDTS:o};else if(h.firstKeyFrame&&h.independent&&1===a.id&&!i&&(this.couldBacktrack=!0),h.dropped&&h.independent){const r=this.getMainFwdBufferInfo(),a=(r?r.end:this.getLoadPosition())+this.config.maxBufferHole,l=h.firstKeyFramePTS?h.firstKeyFramePTS:e;if(!t&&a<l-this.config.maxBufferHole&&!i)return void this.backtrack(n);i&&(n.gap=!0),n.setElementaryStreamInfo(h.type,n.start,s,n.start,o,!0)}else t&&e>2&&(n.gap=!0);n.setElementaryStreamInfo(h.type,e,s,r,o),this.backtrackFragment&&(this.backtrackFragment=n),this.bufferFragmentData(h,n,l,a,t||i)}else{if(!t&&!i)return void this.backtrack(n);n.gap=!0}}if(m){const{startPTS:e,endPTS:t,startDTS:i,endDTS:s}=m;l&&(l.elementaryStreams[yc]={startPTS:e,endPTS:t,startDTS:i,endDTS:s}),n.setElementaryStreamInfo(yc,e,t,i,s),this.bufferFragmentData(m,n,l,a)}if(f&&null!=u&&null!=(t=u.samples)&&t.length){const e={id:i,frag:n,details:f,samples:u.samples};s.trigger(sc.FRAG_PARSING_METADATA,e)}if(f&&c){const e={id:i,frag:n,details:f,samples:c.samples};s.trigger(sc.FRAG_PARSING_USERDATA,e)}}}_bufferInitSegment(e,t,i,s){if(this.state!==em)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;const{audio:r,video:a,audiovideo:o}=t;if(r){let t=e.audioCodec;const i=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(t&&(t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),1!==r.metadata.channelCount&&-1===i.indexOf("firefox")&&(t="mp4a.40.5")),t&&-1!==t.indexOf("mp4a.40.5")&&-1!==i.indexOf("android")&&"audio/mpeg"!==r.container&&(t="mp4a.40.2",this.log(`Android: force audio codec to ${t}`)),e.audioCodec&&e.audioCodec!==t&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${t}"`),r.levelCodec=t,r.id="main",this.log(`Init audio buffer, container:${r.container}, codecs[selected/level/parsed]=[${t||""}/${e.audioCodec||""}/${r.codec}]`)}a&&(a.levelCodec=e.videoCodec,a.id="main",this.log(`Init video buffer, container:${a.container}, codecs[level/parsed]=[${e.videoCodec||""}/${a.codec}]`)),o&&this.log(`Init audiovideo buffer, container:${o.container}, codecs[level/parsed]=[${e.codecs}/${o.codec}]`),this.hls.trigger(sc.BUFFER_CODECS,t),Object.keys(t).forEach((e=>{const r=t[e].initSegment;null!=r&&r.byteLength&&this.hls.trigger(sc.BUFFER_APPENDING,{type:e,data:r,frag:i,part:null,chunkMeta:s,parent:i.type})})),this.tickImmediate()}getMainFwdBufferInfo(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,hp)}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=Kf}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&!1===e.seeking){const i=e.currentTime;if(Lf.isBuffered(e,i)?t=this.getAppendedFrag(i):Lf.isBuffered(e,i+.1)&&(t=this.getAppendedFrag(i+.1)),t){this.backtrackFragment=null;const e=this.fragPlaying,i=t.level;e&&t.sn===e.sn&&e.level===i||(this.fragPlaying=t,this.hls.trigger(sc.FRAG_CHANGED,{frag:t}),e&&e.level===i||this.hls.trigger(sc.LEVEL_SWITCHED,{level:i}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){const e=this.media;return e?this.fragPlaying||this.getAppendedFrag(e.currentTime):null}get currentProgramDateTime(){const e=this.media;if(e){const t=e.currentTime,i=this.currentFrag;if(i&&ec(t)&&ec(i.programDateTime)){const e=i.programDateTime+1e3*(t-i.start);return new Date(e)}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class pA{static get version(){return"1.5.7"}static isMSESupported(){return hA()}static isSupported(){return function(){if(!hA())return!1;const e=Uu();return"function"==typeof(null==e?void 0:e.isTypeSupported)&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some((t=>e.isTypeSupported(ju(t,"video"))))||["mp4a.40.2","fLaC"].some((t=>e.isTypeSupported(ju(t,"audio")))))}()}static getMediaSource(){return Uu()}static get Events(){return sc}static get ErrorTypes(){return rc}static get ErrorDetails(){return ac}static get DefaultConfig(){return pA.defaultConfig?pA.defaultConfig:iA}static set DefaultConfig(e){pA.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this.started=!1,this._emitter=new cg,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null,this.triggeringException=void 0,function(e,t){if("object"==typeof console&&!0===e||"object"==typeof e){dc(e,"debug","log","info","warn","error");try{lc.log(`Debug logs enabled for "${t}" in hls.js version 1.5.7`)}catch(e){lc=nc}}else lc=nc}(e.debug||!1,"Hls instance");const t=this.config=function(e,t){if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==t.liveMaxLatencyDurationCount&&(void 0===t.liveSyncDurationCount||t.liveMaxLatencyDurationCount<=t.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==t.liveMaxLatencyDuration&&(void 0===t.liveSyncDuration||t.liveMaxLatencyDuration<=t.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const i=sA(e),s=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return["manifest","level","frag"].forEach((e=>{const r=`${"level"===e?"playlist":e}LoadPolicy`,a=void 0===t[r],o=[];s.forEach((s=>{const n=`${e}Loading${s}`,l=t[n];if(void 0!==l&&a){o.push(n);const e=i[r].default;switch(t[r]={default:e},s){case"TimeOut":e.maxLoadTimeMs=l,e.maxTimeToFirstByteMs=l;break;case"MaxRetry":e.errorRetry.maxNumRetry=l,e.timeoutRetry.maxNumRetry=l;break;case"RetryDelay":e.errorRetry.retryDelayMs=l,e.timeoutRetry.retryDelayMs=l;break;case"MaxRetryTimeout":e.errorRetry.maxRetryDelayMs=l,e.timeoutRetry.maxRetryDelayMs=l}}})),o.length&&hc.warn(`hls.js config: "${o.join('", "')}" setting(s) are deprecated, use "${r}": ${JSON.stringify(t[r])}`)})),Yh(Yh({},i),t)}(pA.DefaultConfig,e);this.userConfig=e,t.progressive&&rA(t);const{abrController:i,bufferController:s,capLevelController:r,errorController:a,fpsController:o}=t,n=new a(this),l=this.abrController=new i(this),d=this.bufferController=new s(this),h=this.capLevelController=new r(this),c=new o(this),u=new mp(this),p=new xp(this),f=t.contentSteeringController,m=f?new f(this):null,g=this.levelController=new oA(this,m),y=new Cf(this),A=new lA(this.config),b=this.streamController=new uA(this,y,A);h.setStreamController(b),c.setStreamController(b);const v=[u,g,b];m&&v.splice(1,0,m),this.networkControllers=v;const _=[l,d,h,c,p,y];this.audioTrackController=this.createController(t.audioTrackController,v);const S=t.audioStreamController;S&&v.push(new S(this,y,A)),this.subtitleTrackController=this.createController(t.subtitleTrackController,v);const w=t.subtitleStreamController;w&&v.push(new w(this,y,A)),this.createController(t.timelineController,_),A.emeController=this.emeController=this.createController(t.emeController,_),this.cmcdController=this.createController(t.cmcdController,_),this.latencyController=this.createController(Rp,_),this.coreComponents=_,v.push(n);const E=n.onErrorOut;"function"==typeof E&&this.on(sc.ERROR,E,n)}createController(e,t){if(e){const i=new e(this);return t&&t.push(i),i}return null}on(e,t,i=this){this._emitter.on(e,t,i)}once(e,t,i=this){this._emitter.once(e,t,i)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,i=this,s){this._emitter.off(e,t,i,s)}listeners(e){return this._emitter.listeners(e)}emit(e,t,i){return this._emitter.emit(e,t,i)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(t){if(hc.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),!this.triggeringException){this.triggeringException=!0;const i=e===sc.ERROR;this.trigger(sc.ERROR,{type:rc.OTHER_ERROR,details:ac.INTERNAL_EXCEPTION,fatal:i,event:e,error:t}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){hc.log("destroy"),this.trigger(sc.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach((e=>e.destroy())),this.networkControllers.length=0,this.coreComponents.forEach((e=>e.destroy())),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){hc.log("attachMedia"),this._media=e,this.trigger(sc.MEDIA_ATTACHING,{media:e})}detachMedia(){hc.log("detachMedia"),this.trigger(sc.MEDIA_DETACHING,void 0),this._media=null}loadSource(e){this.stopLoad();const t=this.media,i=this.url,s=this.url=qh.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,hc.log(`loadSource:${s}`),t&&i&&(i!==s||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(sc.MANIFEST_LOADING,{url:e})}startLoad(e=-1){hc.log(`startLoad(${e})`),this.started=!0,this.networkControllers.forEach((t=>{t.startLoad(e)}))}stopLoad(){hc.log("stopLoad"),this.started=!1,this.networkControllers.forEach((e=>{e.stopLoad()}))}resumeBuffering(){this.started&&this.networkControllers.forEach((e=>{"fragmentLoader"in e&&e.startLoad(-1)}))}pauseBuffering(){this.networkControllers.forEach((e=>{"fragmentLoader"in e&&e.stopLoad()}))}swapAudioCodec(){hc.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){hc.log("recoverMediaError");const e=this._media;this.detachMedia(),e&&this.attachMedia(e)}removeLevel(e){this.levelController.removeLevel(e)}get levels(){const e=this.levelController.levels;return e||[]}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){hc.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){hc.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){hc.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){hc.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){const e=this.levelController.startLevel;return-1===e&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e}set startLevel(e){hc.log(`set startLevel:${e}`),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}set bandwidthEstimate(e){this.abrController.resetEstimator(e)}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(hc.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){(function(e){return Dp.indexOf(e)>-1})(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return-1===this.levelController.manualLevel}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const i=e.length;for(let s=0;s<i;s++)if(e[s].maxBitrate>=t)return s;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:i}=this;let s;if(s=-1===t&&null!=e&&e.length?e.length-1:t,i)for(let t=s;t--;){const s=e[t].attrs["HDCP-LEVEL"];if(s&&s<=i)return t}return s}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}setAudioOption(e){var t;return null==(t=this.audioTrackController)?void 0:t.setAudioOption(e)}setSubtitleOption(e){var t;return null==(t=this.subtitleTrackController)||t.setSubtitleOption(e),null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return!!e&&e.subtitleDisplay}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}}pA.defaultConfig=void 0;class fA extends So{constructor(e){super(),this.player=e,this.TAG_NAME="HlsDecoder",e._opt,this.canVideoPlay=!1,this.$videoElement=null,this.canvasRenderInterval=null,this.bandwidthEstimateInterval=null,this.fpsInterval=null,this.hlsFps=0,this.hlsPrevFrams=0,this.isInitInfo=!1,this.eventsDestroy=[],this.supportVideoFrameCallbackHandle=null,this.player.isHlsCanVideoPlay()?(this.$videoElement=this.player.video.$videoElement,this.canVideoPlay=!0):pA.isSupported()?(this.$videoElement=this.player.video.$videoElement,this.hls=new pA({}),this._initHls(),this._bindEvents()):this.player.debug.error(this.TAG_NAME,"init hls error ,not support "),this.player.debug.log(this.TAG_NAME,"init")}destroy(){return new Promise(((e,t)=>{this.supportVideoFrameCallbackHandle&&this.$videoElement&&(this.$videoElement.cancelVideoFrameCallback(this.supportVideoFrameCallbackHandle),this.supportVideoFrameCallbackHandle=null),this.hls&&(this.hls.destroy(),this.hls=null),this.eventsDestroy.length&&(this.eventsDestroy.forEach((e=>e())),this.eventsDestroy=[]),this.isInitInfo=!1,this._stopCanvasRender(),this._stopBandwidthEstimateInterval(),this._stopFpsInterval(),this.$videoElement=null,this.hlsFps=0,this.player.debug.log(this.TAG_NAME,"destroy"),setTimeout((()=>{e()}),0)}))}checkHlsBufferedDelay(){const e=this.$videoElement;let t=0;const i=e.buffered,s=i.length?i.end(i.length-1):0;return t=s-e.currentTime,t<0&&(this.player.debug.warn(this.TAG_NAME,`checkHlsBufferedDelay ${t} < 0, and buffered is ${s} ,currentTime is ${e.currentTime} , try to seek ${e.currentTime} to ${s}`),e.currentTime=s,t=0),t}getFps(){return this.hlsFps}_startCanvasRender(){bo()?this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this)):(this._stopCanvasRender(),this.canvasRenderInterval=setInterval((()=>{this.player.video.render({$video:this.$videoElement,ts:parseInt(1e3*this.$videoElement.currentTime,10)||0})}),40))}_stopCanvasRender(){this.canvasRenderInterval&&(clearInterval(this.canvasRenderInterval),this.canvasRenderInterval=null)}videoFrameCallback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.player.isDestroyedOrClosed())return void this.player.debug.log(this.TAG_NAME,"videoFrameCallback() player is destroyed");const i=parseInt(1e3*Math.max(t.mediaTime,this.$videoElement.currentTime),10)||0;this.player.video.render({$video:this.$videoElement,ts:i}),this.player.handleRender(),this.player.updateStats({dts:i}),this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this))}_startBandwidthEstimateInterval(){this._stopBandwidthEstimateInterval(),this.bandwidthEstimateInterval=setInterval((()=>{let e=0;this.hls.bandwidthEstimate&&(e=this.hls.bandwidthEstimate),this.player.emit(nt.kBps,(e/1024/8/10).toFixed(2))}),1e3)}_stopBandwidthEstimateInterval(){this.bandwidthEstimateInterval&&(clearInterval(this.bandwidthEstimateInterval),this.bandwidthEstimateInterval=null)}_startFpsInterval(){this._stopCanvasRender(),this.fpsInterval=setInterval((()=>{if(this.$videoElement)if(Ya(this.$videoElement.getVideoPlaybackQuality)){const e=this.$videoElement.getVideoPlaybackQuality();this.hlsFps=e.totalVideoFrames-this.hlsPrevFrams,this.hlsPrevFrams=e.totalVideoFrames}else{const e=this.$videoElement.webkitDecodedFrameCount||0;this.hlsFps=e-this.hlsPrevFrams,this.hlsPrevFrams=e}}),1e3)}_stopFpsInterval(){this.fpsInterval&&(clearInterval(this.fpsInterval),this.fpsInterval=null)}_initHls(){this.player._opt.useCanvasRender&&(this.$videoElement=document.createElement("video"),this.$videoElement.muted=!0,Aa()&&(this.$videoElement.style.position="absolute"),this.initVideoEvents()),this.hls.attachMedia(this.$videoElement)}_bindEvents(){const e=this.player,{proxy:t}=this.player.events;this.hls;const i=this.$videoElement,s=bo(),r=t(i,is,(t=>{if(this.hls){const i=parseInt(t.timeStamp,10);this.player._opt.useCanvasRender&&po(s)&&e.updateStats({ts:i,dts:i})}}));this.eventsDestroy.push(r),this._startBandwidthEstimateInterval(),this._startFpsInterval(),this.hls.on(pA.Events.ERROR,((e,t)=>{if(t.fatal)switch(t.type){case pA.ErrorTypes.NETWORK_ERROR:this.player.debug.warn(this.TAG_NAME,"fatal network error encountered, try to recover"),this.hls.startLoad();break;case pA.ErrorTypes.MEDIA_ERROR:this.player.debug.warn(this.TAG_NAME,"fatal media error encountered, try to recover"),this.hls.recoverMediaError()}})),this.hls.on(pA.Events.MEDIA_ATTACHING,(()=>{})),this.hls.on(pA.Events.MEDIA_ATTACHED,(()=>{})),this.hls.on(pA.Events.MEDIA_DETACHING,(()=>{})),this.hls.on(pA.Events.MEDIA_DETACHED,(()=>{})),this.hls.on(pA.Events.BUFFER_RESET,(()=>{})),this.hls.on(pA.Events.BUFFER_CODECS,(()=>{})),this.hls.on(pA.Events.BUFFER_CREATED,(()=>{})),this.hls.on(pA.Events.BUFFER_APPENDING,((e,t)=>{this.player.debug.log(this.TAG_NAME,"BUFFER_APPENDING",t.type)})),this.hls.on(pA.Events.BUFFER_APPENDED,(()=>{})),this.hls.on(pA.Events.BUFFER_EOS,(()=>{})),this.hls.on(pA.Events.BUFFER_FLUSHING,(()=>{})),this.hls.on(pA.Events.BUFFER_FLUSHED,(()=>{})),this.hls.on(pA.Events.MANIFEST_LOADING,(()=>{this.player.debug.log(this.TAG_NAME,"MANIFEST_LOADING 开始加载playlist m3u8资源")})),this.hls.on(pA.Events.MANIFEST_LOADED,((e,t)=>{this.player.debug.log(this.TAG_NAME,"MANIFEST_LOADED playlist m3u8文件加载完成",t.url)})),this.hls.on(pA.Events.MANIFEST_PARSED,(()=>{this.player.debug.log(this.TAG_NAME,"MANIFEST_PARSED playlist m3u8解析完成"),e._times.demuxStart||(e._times.demuxStart=aa())})),this.hls.on(pA.Events.LEVEL_LOADING,(()=>{})),this.hls.on(pA.Events.LEVEL_LOADED,((e,t)=>{})),this.hls.on(pA.Events.FRAG_LOADING,(()=>{})),this.hls.on(pA.Events.FRAG_LOADED,((t,i)=>{e._times.decodeStart||(e._times.decodeStart=aa())})),this.hls.on(pA.Events.BUFFER_APPENDING,(()=>{e._times.videoStart||(e._times.videoStart=aa(),e.handlePlayToRenderTimes())})),this.hls.on(pA.Events.FRAG_DECRYPTED,(()=>{})),this.hls.on(pA.Events.KEY_LOADING,(()=>{})),this.hls.on(pA.Events.KEY_LOADING,(()=>{})),this.hls.on(pA.Events.FPS_DROP,(e=>{})),this.hls.on(pA.Events.FPS_DROP_LEVEL_CAPPING,(e=>{})),this.hls.on(pA.Events.FRAG_PARSING_INIT_SEGMENT,((e,t)=>{this.player.debug.log(this.TAG_NAME,"FRAG_PARSING_INIT_SEGMENT",t);const i=!!(t&&t.tracks&&t.tracks.audio),s=!!(t&&t.tracks&&t.tracks.video);if(i&&t.tracks.audio){let e=t.tracks.audio;const i=e.metadata&&e.metadata.channelCount?e.metadata.channelCount:0,s=e.codec;this.player.audio&&this.player.audio.updateAudioInfo({encType:s,channels:i,sampleRate:44100})}if(s&&t.tracks.video){let e=t.tracks.video;const i={encTypeCode:-1!==e.codec.indexOf("avc")?vt:_t};e.metadata&&(i.width=e.metadata.width,i.height=e.metadata.height),this.player.video&&this.player.video.updateVideoInfo(i)}}))}initVideoPlay(e){this.player._opt.useCanvasRender&&(this.$videoElement=document.createElement("video"),this.initVideoEvents()),this.$videoElement.autoplay=!0,this.$videoElement.muted=!0,this.$videoElement.src=e}_initRenderSize(){this.isInitInfo||(this.player.video.updateVideoInfo({width:this.$videoElement.videoWidth,height:this.$videoElement.videoHeight}),this.player.video.initCanvasViewSize(),this.isInitInfo=!0)}initVideoEvents(){const{proxy:e}=this.player.events,t=e(this.$videoElement,es,(()=>{this.player.debug.log(this.TAG_NAME,"video canplay"),this.$videoElement.play().then((()=>{this.player.debug.log(this.TAG_NAME,"video play"),this._startCanvasRender(),this._initRenderSize()})).catch((e=>{this.player.debug.warn(this.TAG_NAME,"video play error ",e)}))})),i=e(this.$videoElement,ts,(()=>{this.player.debug.log(this.TAG_NAME,"video waiting")})),s=e(this.$videoElement,is,(e=>{const t=parseInt(e.timeStamp,10);this.player.handleRender(),this.player.updateStats({ts:t}),this.$videoElement.paused&&(this.player.debug.warn(this.TAG_NAME,"video is paused and next try to replay"),this.$videoElement.play().then((()=>{this.player.debug.log(this.TAG_NAME,"video is paused and replay success")})).catch((e=>{this.player.debug.warn(this.TAG_NAME,"video is paused and replay error ",e)})))})),r=e(this.$videoElement,ss,(()=>{this.player.debug.log(this.TAG_NAME,"video playback Rate change",this.$videoElement&&this.$videoElement.playbackRate)}));this.eventsDestroy.push(t,i,s,r)}loadSource(e){return new Promise(((t,i)=>{this.canVideoPlay?(this.initVideoPlay(e),t()):this.hls.on(pA.Events.MEDIA_ATTACHED,(()=>{this.hls.loadSource(e),t()}))}))}}const mA=2097152,gA="fetch",yA="xhr",AA="arraybuffer",bA="text",vA="json",_A="real_time_speed",SA=Object.prototype.toString;function wA(e){if("[object Object]"!==SA.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function EA(e){if(!e||null===e[0]||void 0===e[0]||0===e[0]&&(null===e[1]||void 0===e[1]))return;let t="bytes="+e[0]+"-";return e[1]&&(t+=e[1]),t}function TA(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function kA(e,t){if(!e)return;if(!t)return e;let i;const s=Object.keys(t).map((e=>{if(i=t[e],null!=i)return Array.isArray(i)?e+="[]":i=[i],i.map((t=>{var i;return i=t,"[object Date]"===SA.call(i)?t=t.toISOString():function(e){return null!==e&&"object"==typeof e}(t)&&(t=JSON.stringify(t)),`${TA(e)}=${TA(t)}`})).join("&")})).filter(Boolean).join("&");if(s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}function CA(e,t,i,s,r,a,o,n,l,d,h){r=null!=r?parseFloat(r):null,s=parseInt(s||"0",10),Number.isNaN(s)&&(s=0);return{data:e,done:t,option:{range:l,vid:d,index:n,contentLength:s,age:r,startTime:a,firstByteTime:o,endTime:Date.now(),priOptions:h},response:i}}function xA(e,t){return Math.round(8*e*1e3/t/1024)}class RA extends Error{constructor(e,t,i,s){super(s),zd(this,"retryCount",0),zd(this,"isTimeout",!1),zd(this,"loaderType",gA),zd(this,"startTime",0),zd(this,"endTime",0),zd(this,"options",{}),this.url=e,this.request=t,this.response=i}}class DA extends So{constructor(e){super(),zd(this,"_abortController",null),zd(this,"_timeoutTimer",null),zd(this,"_reader",null),zd(this,"_response",null),zd(this,"_aborted",!1),zd(this,"_index",-1),zd(this,"_range",null),zd(this,"_receivedLength",0),zd(this,"_running",!1),zd(this,"_logger",null),zd(this,"_vid",""),zd(this,"_onProcessMinLen",0),zd(this,"_onCancel",null),zd(this,"_priOptions",null),zd(this,"TAG_NAME","FetchLoader"),this.player=e}load(e){var t;let{url:i,vid:s,timeout:r,responseType:a,onProgress:o,index:n,onTimeout:l,onCancel:d,range:h,transformResponse:c,request:u,params:p,logger:f,method:m,headers:g,body:y,mode:A,credentials:b,cache:v,redirect:_,referrer:S,referrerPolicy:w,onProcessMinLen:E,priOptions:T}=e;this._aborted=!1,this._onProcessMinLen=E,this._onCancel=d,this._abortController="undefined"!=typeof AbortController&&new AbortController,this._running=!0,this._index=n,this._range=h||[0,0],this._vid=s||i,this._priOptions=T||{};const k={method:m,headers:g,body:y,mode:A,credentials:b,cache:v,redirect:_,referrer:S,referrerPolicy:w,signal:null===(t=this._abortController)||void 0===t?void 0:t.signal};let C=!1;clearTimeout(this._timeoutTimer),i=kA(i,p);const x=EA(h);x&&(g=u?u.headers:k.headers=k.headers||(Headers?new Headers:{}),Headers&&g instanceof Headers?g.append("Range",x):g.Range=x),r&&(this._timeoutTimer=setTimeout((()=>{if(C=!0,this.cancel(),l){const e=new RA(i,k,null,"timeout");e.isTimeout=!0,l(e,{index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions})}}),r));const R=Date.now();return(Ba(n)||Ba(h))&&this.player.debug.log(this.TAG_NAME,"[fetch load start], index,",n,",range,",h),new Promise(((e,t)=>{fetch(u||i,u?void 0:k).then((async s=>{if(clearTimeout(this._timeoutTimer),this._response=s,this._aborted||!this._running)return;if(c&&(s=c(s,i)||s),!s.ok)throw new RA(i,k,s,"bad network response");const r=Date.now();let l;if(a===bA)l=await s.text(),this._running=!1;else if(a===vA)l=await s.json(),this._running=!1;else{if(o)return this.resolve=e,this.reject=t,void this._loadChunk(s,o,R,r);{l=await s.arrayBuffer(),l=new Uint8Array(l),this._running=!1;const e=Date.now()-R,t=xA(l.byteLength,e);this.emit(_A,{speed:t,len:l.byteLength,time:e,vid:this._vid,index:this._index,range:this._range,priOptions:this._priOptions})}}(Ba(n)||Ba(h))&&this.player.debug.log(this.TAG_NAME,"[fetch load end], index,",n,",range,",h),e(CA(l,!0,s,s.headers.get("Content-Length"),s.headers.get("age"),R,r,n,h,this._vid,this._priOptions))})).catch((e=>{var s;clearTimeout(this._timeoutTimer),this._running=!1,this._aborted&&!C||((e=e instanceof RA?e:new RA(i,k,null,null===(s=e)||void 0===s?void 0:s.message)).startTime=R,e.endTime=Date.now(),e.isTimeout=C,e.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},t(e))}))}))}async cancel(){if(!this._aborted){if(this._aborted=!0,this._running=!1,this._response){try{this._reader&&await this._reader.cancel()}catch(e){}this._response=this._reader=null}if(this._abortController){try{this._abortController.abort()}catch(e){}this._abortController=null}this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions})}}_loadChunk(e,t,i,s){if(!e.body||!e.body.getReader){this._running=!1;const t=new RA(e.url,"",e,"onProgress of bad response.body.getReader");return t.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},void this.reject(t)}this._onProcessMinLen>0&&(this._cache=new Uint8Array(mA),this._writeIdx=0);const r=this._reader=e.body.getReader();let a,o,n;const l=async()=>{var d;o=Date.now();try{a=await r.read(),n=Date.now()}catch(e){return n=Date.now(),void(this._aborted||(this._running=!1,e.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this.reject(e)))}const h=(null===(d=this._range)||void 0===d?void 0:d.length)>0?this._range[0]:0,c=h+this._receivedLength;if(this._aborted)return this._running=!1,void t(void 0,!1,{range:[c,c],vid:this._vid,index:this._index,startTime:o,endTime:n,st:i,firstByteTime:s,priOptions:this._priOptions},e);const u=a.value?a.value.byteLength:0;let p;if(this._receivedLength+=u,this.player.debug.log(this.TAG_NAME,"【fetchLoader,onProgress call】,task,",this._range,", start,",c,", end,",h+this._receivedLength,", done,",a.done),this._onProcessMinLen>0){if(this._writeIdx+u>=this._onProcessMinLen||a.done)p=new Uint8Array(this._writeIdx+u),p.set(this._cache.slice(0,this._writeIdx),0),u>0&&p.set(a.value,this._writeIdx),this._writeIdx=0,this.player.debug.log(this.TAG_NAME,"【fetchLoader,onProgress enough】,done,",a.done,",len,",p.byteLength,", writeIdx,",this._writeIdx);else if(u>0&&this._writeIdx+u<mA)this._cache.set(a.value,this._writeIdx),this._writeIdx+=u,this.player.debug.log(this.TAG_NAME,"【fetchLoader,onProgress cache】,len,",u,", writeIdx,",this._writeIdx);else if(u>0){const e=new Uint8Array(this._writeIdx+u+2048);this.player.debug.log(this.TAG_NAME,"【fetchLoader,onProgress extra start】,size,",this._writeIdx+u+2048,", datalen,",u,", writeIdx,",this._writeIdx),e.set(this._cache.slice(0,this._writeIdx),0),u>0&&e.set(a.value,this._writeIdx),this._writeIdx+=u,delete this._cache,this._cache=e,this.player.debug.log(this.TAG_NAME,"【fetchLoader,onProgress extra end】,len,",u,", writeIdx,",this._writeIdx)}}else p=a.value;if((p&&p.byteLength>0||a.done)&&t(p,a.done,{range:[this._range[0]+this._receivedLength-(p?p.byteLength:0),this._range[0]+this._receivedLength],vid:this._vid,index:this._index,startTime:o,endTime:n,st:i,firstByteTime:s,priOptions:this._priOptions},e),a.done){const t=Date.now()-i,r=xA(this._receivedLength,t);this.emit(_A,{speed:r,len:this._receivedLength,time:t,vid:this._vid,index:this._index,range:this._range,priOptions:this._priOptions}),this._running=!1,this.player.debug.log(this.TAG_NAME,"[fetchLoader onProgress end],task,",this._range,",done,",a.done),this.resolve(CA(a,!0,e,e.headers.get("Content-Length"),e.headers.get("age"),i,s,this._index,this._range,this._vid,this._priOptions))}else l()};l()}get receiveLen(){return this._receivedLength}get running(){return this._running}set running(e){this._running=e}static isSupported(){return!("undefined"==typeof fetch)}}class LA{constructor(e,t,i){zd(this,"TAG_NAME","Task"),this.promise=function(){let e,t;const i=new Promise(((i,s)=>{e=i,t=s}));return i.used=!1,i.resolve=function(){return i.used=!0,e(...arguments)},i.reject=function(){return i.used=!0,t(...arguments)},i}(),this.alive=!!t.onProgress,this._loaderType=e,this.player=i,this._loader=e===gA&&window.fetch?new DA(i):new PA(i),this._config=t,this._retryCount=0,this._retryTimer=null,this._canceled=!1,this._retryCheckFunc=t.retryCheckFunc}exec(){const{retry:e,retryDelay:t,onRetryError:i,transformError:s,...r}=this._config,a=async()=>{try{const e=await this._loader.load(r);this.promise.resolve(e)}catch(o){if(this._loader.running=!1,this.player.debug.log(this.TAG_NAME,"[task request catch err]",o),this._canceled)return;o.loaderType=this._loaderType,o.retryCount=this._retryCount;let n=o;s&&(n=s(n)||n),i&&this._retryCount>0&&i(n,this._retryCount,{index:r.index,vid:r.vid,range:r.range,priOptions:r.priOptions}),this._retryCount++;let l=!0;if(this._retryCheckFunc&&(l=this._retryCheckFunc(o)),l&&this._retryCount<=e)return clearTimeout(this._retryTimer),this.player.debug.log(this.TAG_NAME,"[task request setTimeout],retry",this._retryCount,",retry range,",r.range),void(this._retryTimer=setTimeout(a,t));this.promise.reject(n)}};return a(),this.promise}async cancel(){return clearTimeout(this._retryTimer),this._canceled=!0,this._loader.running=!1,this._loader.cancel()}get running(){return this._loader&&this._loader.running}get loader(){return this._loader}}class PA extends So{constructor(e){super(),zd(this,"_xhr",null),zd(this,"_aborted",!1),zd(this,"_timeoutTimer",null),zd(this,"_range",null),zd(this,"_receivedLength",0),zd(this,"_url",null),zd(this,"_onProgress",null),zd(this,"_index",-1),zd(this,"_headers",null),zd(this,"_currentChunkSizeKB",384),zd(this,"_timeout",null),zd(this,"_xhr",null),zd(this,"_withCredentials",null),zd(this,"_startTime",-1),zd(this,"_loadCompleteResolve",null),zd(this,"_loadCompleteReject",null),zd(this,"_runing",!1),zd(this,"_logger",!1),zd(this,"_vid",""),zd(this,"_responseType",void 0),zd(this,"_credentials",void 0),zd(this,"_method",void 0),zd(this,"_transformResponse",void 0),zd(this,"_firstRtt",void 0),zd(this,"_onCancel",null),zd(this,"_priOptions",null),zd(this,"TAG_NAME","XhrLoader"),this.player=e}load(e){clearTimeout(this._timeoutTimer),this._range=e.range,this._onProgress=e.onProgress,this._index=e.index,this._headers=e.headers,this._withCredentials="include"===e.credentials||"same-origin"===e.credentials,this._body=e.body||null,e.method&&(this._method=e.method),this._timeout=e.timeout||null,this._runing=!0,this._vid=e.vid||e.url,this._responseType=e.responseType,this._firstRtt=-1,this._onTimeout=e.onTimeout,this._onCancel=e.onCancel,this._request=e.request,this._priOptions=e.priOptions||{},this.player.debug.log(this.TAG_NAME,"【xhrLoader task】, range",this._range),this._url=kA(e.url,e.params);const t=Date.now();return new Promise(((e,t)=>{this._loadCompleteResolve=e,this._loadCompleteReject=t,this._startLoad()})).catch((e=>{if(clearTimeout(this._timeoutTimer),this._runing=!1,!this._aborted)throw(e=e instanceof RA?e:new RA(this._url,this._request)).startTime=t,e.endTime=Date.now(),e.options={index:this._index,vid:this._vid,priOptions:this._priOptions},e}))}_startLoad(){let e=null;if(this._responseType===AA&&this._range&&this._range.length>1)if(this._onProgress){this._firstRtt=-1;const t=1024*this._currentChunkSizeKB,i=this._range[0]+this._receivedLength;let s=this._range[1];t<this._range[1]-i&&(s=i+t),e=[i,s],this.player.debug.log(this.TAG_NAME,"[xhr_loader->],tast :",this._range,", SubRange, ",e)}else e=this._range,this.player.debug.log(this.TAG_NAME,"[xhr_loader->],tast :",this._range,", allRange, ",e);this._internalOpen(e)}_internalOpen(e){try{this._startTime=Date.now();const t=this._xhr=new XMLHttpRequest;t.open(this._method||"GET",this._url,!0),t.responseType=this._responseType,this._timeout&&(t.timeout=this._timeout),t.withCredentials=this._withCredentials,t.onload=this._onLoad.bind(this),t.onreadystatechange=this._onReadyStatechange.bind(this),t.onerror=e=>{var t,i,s;this._running=!1;const r=new RA(this._url,this._request,null==e||null===(t=e.currentTarget)||void 0===t?void 0:t.response,"xhr.onerror.status:"+(null==e||null===(i=e.currentTarget)||void 0===i?void 0:i.status)+",statusText,"+(null==e||null===(s=e.currentTarget)||void 0===s?void 0:s.statusText));r.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(r)},t.ontimeout=e=>{this.cancel();const t=new RA(this._url,this._request,{status:408},"timeout");this._onTimeout&&(t.isTimeout=!0,this._onTimeout(t,{index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions})),t.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(t)};const i=this._headers||{},s=EA(e);s&&(i.Range=s),i&&Object.keys(i).forEach((e=>{t.setRequestHeader(e,i[e])})),this.player.debug.log(this.TAG_NAME,"[xhr.send->] tast,",this._range,",load sub range, ",e),t.send(this._body)}catch(t){t.options={index:this._index,range:e,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(t)}}_onReadyStatechange(e){2===e.target.readyState&&this._firstRtt<0&&(this._firstRtt=Date.now())}_onLoad(e){var t;const i=e.target.status;if(i<200||i>299){const t=new RA(this._url,null,{...e.target.response,status:i},"bad response,status:"+i);return t.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(t)}let s,r=null,a=!1;const o=(null===(t=this._range)||void 0===t?void 0:t.length)>0?this._range[0]:0;if(this._responseType===AA){var n;const t=new Uint8Array(e.target.response);if(s=o+this._receivedLength,t&&t.byteLength>0){this._receivedLength+=t.byteLength;const e=Date.now()-this._startTime,i=xA(this._receivedLength,e);this.emit(_A,{speed:i,len:this._receivedLength,time:e,vid:this._vid,index:this._index,range:[s,o+this._receivedLength],priOptions:this._priOptions})}r=t,a=!((null===(n=this._range)||void 0===n?void 0:n.length)>1&&this._range[1]&&this._receivedLength<this._range[1]-this._range[0]),this.player.debug.log(this.TAG_NAME,"[xhr load done->], tast :",this._range,", start",s,"end ",o+this._receivedLength,",dataLen,",t?t.byteLength:0,",receivedLength",this._receivedLength,",index,",this._index,", done,",a)}else a=!0,r=e.target.response;let l={ok:i>=200&&i<300,status:i,statusText:this._xhr.statusText,url:this._xhr.responseURL,headers:this._getHeaders(this._xhr),body:this._xhr.response};this._transformResponse&&(l=this._transformResponse(l,this._url)||l),this._onProgress&&this._onProgress(r,a,{index:this._index,vid:this._vid,range:[s,o+this._receivedLength],startTime:this._startTime,endTime:Date.now(),priOptions:this._priOptions},l),a?(this._runing=!1,this._loadCompleteResolve&&this._loadCompleteResolve(CA(this._onProgress?null:r,a,l,l.headers["content-length"],l.headers.age,this._startTime,this._firstRtt,this._index,this._range,this._vid,this._priOptions))):this._startLoad()}cancel(){if(!this._aborted)return this._aborted=!0,this._runing=!1,super.removeAllListeners(),this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions}),this._xhr?this._xhr.abort():void 0}static isSupported(){return"undefined"!=typeof XMLHttpRequest}get receiveLen(){return this._receivedLength}get running(){return this._running}set running(e){this._running=e}_getHeaders(e){const t=e.getAllResponseHeaders().trim().split("\r\n"),i={};for(const e of t){const t=e.split(": ");i[t[0].toLowerCase()]=t.slice(1).join(": ")}return i}}class BA extends So{constructor(e,t){super(),zd(this,"type",gA),zd(this,"_queue",[]),zd(this,"_alive",[]),zd(this,"_currentTask",null),zd(this,"_config",void 0),this.player=t,this._config=function(e){return{loaderType:gA,retry:0,retryDelay:0,timeout:0,request:null,onTimeout:void 0,onProgress:void 0,onRetryError:void 0,transformRequest:void 0,transformResponse:void 0,transformError:void 0,responseType:bA,range:void 0,url:"",params:void 0,method:"GET",headers:{},body:void 0,mode:void 0,credentials:void 0,cache:void 0,redirect:void 0,referrer:void 0,referrerPolicy:void 0,integrity:void 0,onProcessMinLen:0,...e}}(e),this._config.loaderType!==yA&&DA.isSupported()||(this.type=yA)}destroy(){this._queue=[],this._alive=[],this._currentTask=null}isFetch(){return this.type===gA}static isFetchSupport(){return DA.isSupported()}load(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"!=typeof e&&e?t=e:t.url=e||t.url||this._config.url,t=Object.assign({},this._config,t),t.params&&(t.params=Object.assign({},t.params)),t.headers&&wA(t.headers)&&(t.headers=Object.assign({},t.headers)),t.body&&wA(t.body)&&(t.body=Object.assign({},t.body)),t.transformRequest&&(t=t.transformRequest(t)||t);const i=new LA(this.type,t,this.player);return i.loader.on(_A,(e=>{this.emit(_A,e)})),this._queue.push(i),1!==this._queue.length||this._currentTask&&this._currentTask.running||this._processTask(),i.promise}async cancel(){const e=this._queue.map((e=>e.cancel())).concat(this._alive.map((e=>e.cancel())));this._currentTask&&e.push(this._currentTask.cancel()),this._queue=[],this._alive=[],await Promise.all(e),await function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((t=>setTimeout(t,e)))}()}_processTask(){if(this._currentTask=this._queue.shift(),!this._currentTask)return;this._currentTask.alive&&this._alive.push(this._currentTask);const e=this._currentTask.exec().catch((e=>{}));e&&"function"==typeof e.finally&&e.finally((()=>{var e,t;null!==(e=this._currentTask)&&void 0!==e&&e.alive&&(null===(t=this._alive)||void 0===t?void 0:t.length)>0&&(this._alive=this._alive.filter((e=>e&&e!==this._currentTask))),this._processTask()}))}}const IA="network",MA="network_timeout",UA="other",FA="manifest",OA="hls",NA="demux";class jA extends Error{constructor(e,t,i,s,r){super(r||(null==i?void 0:i.message)),this.errorType=e===MA?IA:e,this.originError=i,this.ext=s,this.errorMessage=this.message}static create(e,t,i,s,r){return e instanceof jA?e:(e instanceof Error&&(i=e,e=""),e||(e=UA),new jA(e,t,i,s,r))}static network(e){var t;return new jA(null!=e&&e.isTimeout?MA:IA,null,e instanceof Error?e:null,{url:null==e?void 0:e.url,response:null==e?void 0:e.response,httpCode:null==e||null===(t=e.response)||void 0===t?void 0:t.status})}}const zA=/^#(EXT[^:]*)(?::(.*))?$/,GA=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g,HA=/^(?:[a-zA-Z0-9+\-.]+:)?\/\//,VA=/^((?:[a-zA-Z0-9+\-.]+:)?\/\/[^/?#]*)?([^?#]*\/)?/;function $A(e){const t=e.match(zA);if(t&&t[1])return[t[1].replace("EXT-X-",""),t[2]]}function WA(e){const t={};let i=GA.exec(e);for(;i;)t[i[1]]=i[2]||i[3],i=GA.exec(e);return t}function JA(e,t){if(!t||!e||HA.test(e))return e;const i=VA.exec(t);return i?"/"===e[0]?i[1]+e:i[1]+i[2]+e:e}const qA={audio:[/^mp4a/,/^vorbis$/,/^opus$/,/^flac$/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function KA(e,t){const i=qA[e];if(i&&t&&t.length)for(let e=0;e<i.length;e++)for(let s=0;s<t.length;s++)if(i[e].test(t[s]))return t[s]}class YA{constructor(){this.version=0,this.streams=[],this.isMaster=!0}}const QA="AUDIO",XA="SUBTITLE";class ZA{constructor(){zd(this,"id",0),zd(this,"url",""),zd(this,"default",!1),zd(this,"autoSelect",!1),zd(this,"forced",!1),zd(this,"group",""),zd(this,"name",""),zd(this,"lang",""),zd(this,"segments",[]),zd(this,"endSN",0)}}class eb extends ZA{constructor(){super(...arguments),zd(this,"mediaType",QA),zd(this,"channels",0)}}class tb extends ZA{constructor(){super(...arguments),zd(this,"mediaType",XA)}}class ib{constructor(){zd(this,"id",0),zd(this,"bitrate",0),zd(this,"width",0),zd(this,"height",0),zd(this,"name",""),zd(this,"url",""),zd(this,"audioCodec",""),zd(this,"videoCodec",""),zd(this,"textCodec",""),zd(this,"audioGroup",""),zd(this,"audioStreams",[]),zd(this,"subtitleStreams",[]),zd(this,"closedCaptionsStream",[])}}class sb{constructor(){zd(this,"version",0),zd(this,"url",""),zd(this,"type",""),zd(this,"startCC",0),zd(this,"endCC",0),zd(this,"startSN",0),zd(this,"endSN",0),zd(this,"totalDuration",0),zd(this,"targetDuration",0),zd(this,"live",!0),zd(this,"segments",[])}}class rb{constructor(){zd(this,"sn",0),zd(this,"cc",0),zd(this,"url",""),zd(this,"title",""),zd(this,"start",0),zd(this,"duration",0),zd(this,"key",null),zd(this,"byteRange",null),zd(this,"isInitSegment",!1),zd(this,"initSegment",null),zd(this,"isLast",!1),zd(this,"hasAudio",!1),zd(this,"hasVideo",!1)}get end(){return this.start+this.duration}setTrackExist(e,t){this.hasVideo=e,this.hasAudio=t}setByteRange(e,t){this.byteRange=[0];const i=e.split("@");1===i.length&&t&&t.byteRange?(this.byteRange[0]=t.byteRange[1]||0,this.byteRange[0]&&(this.byteRange[0]+=1)):this.byteRange[0]=parseInt(i[1]),this.byteRange[1]=this.byteRange[0]+parseInt(i[0])-1}}class ab{constructor(e){zd(this,"method",""),zd(this,"url",""),zd(this,"iv",null),zd(this,"keyFormat",""),zd(this,"keyFormatVersions",""),e instanceof ab&&(this.method=e.method,this.url=e.url,this.keyFormat=e.keyFormat,this.keyFormatVersions=e.keyFormatVersions,e.iv&&(this.iv=new Uint8Array(e.iv)))}clone(e){const t=new ab(this);return null!=e&&t.setIVFromSN(e),t}setIVFromSN(e){if(!this.iv&&"AES-128"===this.method&&"number"==typeof e&&this.url){this.iv=new Uint8Array(16);for(let t=12;t<16;t++)this.iv[t]=e>>8*(15-t)&255}}}class ob{static parse(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!e.includes("#EXTM3U"))throw new Error("Invalid m3u8 file");const i=function(e){return e.split(/[\r\n]/).map((e=>e.trim())).filter(Boolean)}(e);return ob.isMediaPlaylist(e)?function(e,t){const i=new sb;i.url=t;let s,r=new rb,a=null,o=null,n=0,l=0,d=0,h=0,c=!1;for(;(s=e[h++])&&!c;){if("#"!==s[0]){r.sn=l,r.cc=d,r.url=JA(s,t),o&&(r.key=o.clone(l)),a&&(r.initSegment=a),i.segments.push(r),r=new rb,l++;continue}const e=$A(s);if(!e)continue;const[h,u]=e;switch(h){case"VERSION":i.version=parseInt(u);break;case"PLAYLIST-TYPE":i.type=null==u?void 0:u.toUpperCase();break;case"TARGETDURATION":i.targetDuration=parseFloat(u);break;case"ENDLIST":{const e=i.segments[i.segments.length-1];e&&(e.isLast=!0),i.live=!1,c=!0}break;case"MEDIA-SEQUENCE":l=i.startSN=parseInt(u);break;case"DISCONTINUITY-SEQUENCE":d=i.startCC=parseInt(u);break;case"DISCONTINUITY":d++;break;case"BYTERANGE":r.setByteRange(u,i.segments[i.segments.length-1]);break;case"EXTINF":{const[e,t]=u.split(",");r.start=n,r.duration=parseFloat(e),n+=r.duration,r.title=t}break;case"KEY":{const e=WA(u);if("NONE"===e.METHOD){o=null;break}if("AES-128"!==e.METHOD)throw new Error(`encrypt ${e.METHOD}/${e.KEYFORMAT} is not supported`);if(o=new ab,o.method=e.METHOD,o.url=/^blob:/.test(e.URI)?e.URI:JA(e.URI,t),o.keyFormat=e.KEYFORMAT||"identity",o.keyFormatVersions=e.KEYFORMATVERSIONS,e.IV){let t=e.IV.slice(2);t=(1&t.length?"0":"")+t,o.iv=new Uint8Array(t.length/2);for(let e=0,i=t.length/2;e<i;e++)o.iv[e]=parseInt(t.slice(2*e,2*e+2),16)}}break;case"MAP":{const e=WA(u);r.url=JA(e.URI,t),e.BYTERANGE&&r.setByteRange(e.BYTERANGE),r.isInitSegment=!0,r.sn=0,o&&(r.key=o.clone(0)),a=r,r=new rb}}}const u=i.segments[i.segments.length-1];return u&&(i.endSN=u.sn),i.totalDuration=n,i.endCC=d,i}(i,t):function(e,t){const i=new YA;let s,r=0;const a=[],o=[];for(;s=e[r++];){const n=$A(s);if(!n)continue;const[l,d]=n;if("VERSION"===l)i.version=parseInt(d);else if("MEDIA"===l&&d){const e=WA(d);let i;switch(e.TYPE){case"AUDIO":i=new eb;break;case"SUBTITLES":i=new tb;break;default:i=new ZA}i.url=JA(e.URI,t),i.default="YES"===e.DEFAULT,i.autoSelect="YES"===e.AUTOSELECT,i.group=e["GROUP-ID"],i.name=e.NAME,i.lang=e.LANGUAGE,e.CHANNELS&&(i.channels=Number(e.CHANNELS.split("/")[0]),Number.isNaN(i.channels)&&(i.channels=0)),"AUDIO"===e.TYPE&&e.URI&&a.push(i),"SUBTITLES"===e.TYPE&&o.push(i)}else if("STREAM-INF"===l&&d){const s=new ib,a=WA(d);if(s.bitrate=parseInt(a["AVERAGE-BANDWIDTH"]||a.BANDWIDTH),s.name=a.NAME,s.url=JA(e[r++],t),a.RESOLUTION){const[e,t]=a.RESOLUTION.split("x");s.width=parseInt(e),s.height=parseInt(t)}if(a.CODECS){const e=a.CODECS.split(/[ ,]+/).filter(Boolean);s.videoCodec=KA("video",e),s.audioCodec=KA("audio",e),s.textCodec=KA("text",e)}s.audioGroup=a.AUDIO,s.subtitleGroup=a.SUBTITLES,i.streams.push(s)}}return i.streams.forEach(((e,t)=>{e.id=t})),a.length&&(a.forEach(((e,t)=>{e.id=t})),i.streams.forEach((e=>{e.audioGroup&&(e.audioStreams=a.filter((t=>t.group===e.audioGroup)))}))),o.length&&(o.forEach(((e,t)=>{e.id=t})),i.streams.forEach((e=>{e.subtitleGroup&&(e.subtitleStreams=o.filter((t=>t.group===e.subtitleGroup)))}))),i}(i,t)}static isMediaPlaylist(e){return e.includes("#EXTINF:")||e.includes("#EXT-X-TARGETDURATION:")}}class nb{constructor(e){zd(this,"_onLoaderRetry",((e,t)=>{this.hls.emit(qs,{error:jA.network(e),retryTime:t})})),this.hls=e,this.player=e.player,this.TAG_NAME="HlsManifestLoader",this._timer=null;const{retryCount:t,retryDelay:i,loadTimeout:s,fetchOptions:r}=this.hls.config;this._loader=new BA({...r,responseType:"text",retry:t,retryDelay:i,timeout:s,onRetryError:this._onLoaderRetry},this.player),this._audioLoader=new BA({...r,responseType:"text",retry:t,retryDelay:i,timeout:s,onRetryError:this._onLoaderRetry},this.player),this._subtitleLoader=new BA({...r,responseType:"text",retry:t,retryDelay:i,timeout:s,onRetryError:this._onLoaderRetry},this.player)}async destroy(){await this.stopPoll(),this._audioLoader&&(this._audioLoader.destroy(),this._audioLoader=null),this._subtitleLoader&&(this._subtitleLoader.destroy(),this._subtitleLoader=null),this._loader&&(this._loader.destroy(),this._loader=null)}async load(e,t,i){this.player.debug.log(this.TAG_NAME,"load()",e,t,i);const s=[this._loader.load(e)];let r,a,o,n,l,d;t&&s.push(this._audioLoader.load(t)),i&&s.push(this._subtitleLoader.load(i));try{const[e,i,n]=await Promise.all(s);if(!e)return[];r=e.data,t?(a=null==i?void 0:i.data,o=null==n?void 0:n.data):o=null==i?void 0:i.data}catch(e){throw jA.network(e)}try{var h;if(n=ob.parse(r,e),!1===(null===(h=n)||void 0===h?void 0:h.live)&&n.segments&&!n.segments.length)throw new Error("empty segments list");a&&(l=ob.parse(a,t)),o&&(d=ob.parse(o,i))}catch(e){throw new jA(FA,OA,e)}return n&&(n.isMaster?this.hls.emit(Gs,{playlist:n}):this.hls.emit(Hs,{playlist:n})),[n,l,d]}poll(e,t,i,s,r,a){clearTimeout(this._timer),a=a||3e3;let o=this.hls.config.pollRetryCount;const n=async()=>{clearTimeout(this._timer);try{const r=await this.load(e,t,i);if(!r[0])return;o=this.hls.config.pollRetryCount,s(r[0],r[1],r[2])}catch(e){o--,o<=0&&r(e)}this._timer=setTimeout(n,a)};this._timer=setTimeout(n,a)}stopPoll(){return clearTimeout(this._timer),this.cancel()}cancel(){return Promise.all([this._loader.cancel(),this._audioLoader.cancel()])}}class lb{constructor(){zd(this,"_chunkSpeeds",[]),zd(this,"_speeds",[])}addRecord(e,t){e&&t&&(this._speeds.push(8e3*e/t),this._speeds=this._speeds.slice(-3))}addChunkRecord(e,t){e&&t&&(this._chunkSpeeds.push(8e3*e/t),this._chunkSpeeds=this._chunkSpeeds.slice(-100))}getAvgSpeed(){return this._chunkSpeeds.length||this._speeds.length?this._speeds.length?this._speeds.reduce(((e,t)=>e+t))/this._speeds.length:this._chunkSpeeds.reduce(((e,t)=>e+t))/this._chunkSpeeds.length:0}getLatestSpeed(){return this._chunkSpeeds.length||this._speeds.length?this._speeds.length?this._speeds[this._speeds.length-1]:this._chunkSpeeds[this._chunkSpeeds.length-1]:0}reset(){this._chunkSpeeds=[],this._speeds=[]}}class db{constructor(e){zd(this,"_emitOnLoaded",((e,t)=>{const{data:i,response:s,option:r}=e,{firstByteTime:a,startTime:o,endTime:n,contentLength:l}=r||{},d=n-o;this._bandwidthService.addRecord(l||i.byteLength,d),this.hls.emit(Ys,{time:d,byteLength:l,url:t}),this.hls.emit(Qs,{url:t,elapsed:d||0}),this.hls.emit(Js,{url:t,responseUrl:s.url,elapsed:a-o}),this.hls.emit(Xs,{headers:s.headers})})),zd(this,"_onLoaderRetry",((e,t)=>{this.hls.emit(qs,{error:jA.network(e),retryTime:t})})),this.hls=e,this.player=e.player,this._bandwidthService=new lb;const{retryCount:t,retryDelay:i,loadTimeout:s,fetchOptions:r}=this.hls.config;this._segmentLoader=new BA({...r,responseType:"arraybuffer",retry:t,retryDelay:i,timeout:s,onRetryError:this._onLoaderRetry},this.player),this._audioSegmentLoader=new BA({...r,responseType:"arraybuffer",retry:t,retryDelay:i,timeout:s,onRetryError:this._onLoaderRetry},this.player),this._keyLoader=new BA({...r,responseType:"arraybuffer",retry:t,retryDelay:i,timeout:s,onRetryError:this._onLoaderRetry},this.player)}destroy(){this.reset(),this._keyLoader&&(this._keyLoader.destroy(),this._keyLoader=null),this._audioSegmentLoader&&(this._audioSegmentLoader.destroy(),this._audioSegmentLoader=null),this._segmentLoader&&(this._segmentLoader.destroy(),this._segmentLoader=null)}speedInfo(){return{speed:this._bandwidthService.getLatestSpeed(),avgSpeed:this._bandwidthService.getAvgSpeed()}}resetBandwidth(){this._bandwidthService.reset()}load(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i;const r=[];return e&&(r[0]=this.loadVideoSegment(e,i)),t&&(r[1]=this.loadAudioSegment(t,s)),Promise.all(r)}loadVideoSegment(e,t){return this._loadSegment(this._segmentLoader,e,t)}loadAudioSegment(e,t){return this._loadSegment(this._audioSegmentLoader,e,t)}async _loadSegment(e,t,i){var s;let r,a,o,n,l;const d=[];if(this.hls.emit(Ks,{url:t.url}),d[0]=e.load(t.url),i&&t.initSegment){var h;const i=t.initSegment.url;r=this._mapCache[i],r||(this.hls.emit(Ks,{url:i}),d[1]=e.load(i).then((e=>{if(e){Object.keys(this._mapCache)>30&&(this._mapCache={}),r=this._mapCache[i]=e.data,this._emitOnLoaded(e,i)}})));const s=null===(h=t.initSegment.key)||void 0===h?void 0:h.url;s&&(l=t.initSegment.key.iv,n=this._keyCache[s],n||(this.hls.emit(Ks,{url:s}),d[2]=this._keyLoader.load(s).then((e=>{e&&(n=this._keyCache[s]=e.data,this._emitOnLoaded(e,s))}))))}const c=null===(s=t.key)||void 0===s?void 0:s.url;c&&(o=t.key.iv,a=this._keyCache[c],a||(this.hls.emit(Ks,{url:c}),d[3]=this._keyLoader.load(c).then((e=>{e&&(a=this._keyCache[c]=e.data,this._emitOnLoaded(e,c))}))));const[u]=await Promise.all(d);if(!u)return;const p=u.data;return this._emitOnLoaded(u,t.url),{data:p,map:r,key:a,mapKey:n,keyIv:o,mapKeyIv:l}}reset(){this.error=null,this._mapCache={},this._keyCache={},this._bandwidthService.reset()}async cancel(){await Promise.all([this._keyLoader.cancel(),this._segmentLoader.cancel(),this._audioSegmentLoader.cancel()])}}class hb{constructor(e,t,i){this.live=void 0,this.id=0,this.bitrate=0,this.width=0,this.height=0,this.name="",this.url="",this.audioCodec="",this.videoCodec="",this.textCodec="",this.startCC=0,this.endCC=0,this.startSN=0,this.endSN=-1,this.totalDuration=0,this.targetDuration=0,this.snDiff=null,this.segments=[],this.audioStreams=[],this.subtitleStreams=[],this.closedCaptions=[],this.currentAudioStream=null,this.currentSubtitleStream=null,this.TAG_NAME="HlsStream",this.update(e,t,i)}get lastSegment(){return this.segments.length?this.segments[this.segments.length-1]:null}get segmentDuration(){var e;return this.targetDuration||(null===(e=this.segments[0])||void 0===e?void 0:e.duration)||0}get liveEdge(){return this.endTime}get endTime(){var e;return(null===(e=this.lastSegment)||void 0===e?void 0:e.end)||0}get currentSubtitleEndSn(){var e;return(null===(e=this.currentSubtitleStream)||void 0===e?void 0:e.endSN)||0}clearOldSegment(e,t){return this._clearSegments(e,t)}getAudioSegment(e){if(!e||!this.currentAudioStream)return;const t=e.sn-this.snDiff;return this.currentAudioStream.segments.find((e=>e.sn===t))}update(e,t){this.url=e.url,Array.isArray(e.segments)?(null!==this.live&&void 0!==this.live||(this.live=e.live),this._updateSegments(e,this),this.startCC=e.startCC,this.endCC=e.endCC,this.startSN=e.startSN,this.endSN=e.endSN||-1,this.totalDuration=e.totalDuration,this.targetDuration=e.targetDuration,this.live=e.live,t&&this.currentAudioStream&&Array.isArray(t.segments)&&(this._updateSegments(t,this.currentAudioStream),(null===this.snDiff||void 0===this.snDiff)&&e.segments.length&&t.segments.length&&(this.snDiff=e.segments[0].sn-t.segments[0].sn))):(this.id=e.id,this.bitrate=e.bitrate,this.width=e.width,this.height=e.height,this.name=e.name,this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.textCodec=e.textCodec,this.audioStreams=e.audioStreams,this.subtitleStreams=e.subtitleStreams,!this.currentAudioStream&&this.audioStreams.length&&(this.currentAudioStream=this.audioStreams.find((e=>e.default))||this.audioStreams[0]),!this.currentSubtitleStream&&this.subtitleStreams.length&&(this.currentSubtitleStream=this.subtitleStreams.find((e=>e.default))||this.subtitleStreams[0]))}updateSubtitle(e){if(!(e&&this.currentSubtitleStream&&Array.isArray(e.segments)))return;const t=this._updateSegments(e,this.currentSubtitleStream),i=this.currentSubtitleStream.segments;return i.length>100&&(this.currentSubtitleStream.segments=i.slice(100)),t?t.map((e=>({sn:e.sn,url:e.url,duration:e.duration,start:e.start,end:e.end,lang:this.currentSubtitleStream.lang}))):void 0}switchSubtitle(e){const t=this.subtitleStreams.find((t=>t.lang===e)),i=this.currentSubtitleStream;t&&(this.currentSubtitleStream=t,i.segments=[])}_clearSegments(e,t){let i=0;const s=this.segments;for(let t=0,r=s.length;t<r;t++)if(s[t].end>=e){i=t;break}return i>t&&(i=t),i&&(this.segments=this.segments.slice(i),this.currentAudioStream&&(this.currentAudioStream.segments=this.currentAudioStream.segments.slice(i))),t-i}_updateSegments(e,t){const i=t.segments;if(this.live){const s=i[i.length-1],r=(null==s?void 0:s.sn)||-1;if(r<e.endSN&&e.segments.length){const a=e.segments.findIndex((e=>e.sn===r)),o=a<0?e.segments:e.segments.slice(a+1);if(i.length&&o.length){let e=s.end;o.forEach((t=>{t.start=e,e=t.end}));const t=(null==s?void 0:s.cc)||-1;t>o[0].cc&&o.forEach((e=>e.cc+=t))}return t.endSN=e.endSN,t.segments=i.concat(o),o}}else t.segments=e.segments}}class cb{constructor(e){this.hls=e,this.player=e.player,this.streams=[],this.currentStream=null,this.dvrWindow=0,this._segmentPointer=-1,this.TAG_NAME="HlsPlaylist"}destroy(){this.reset()}get lastSegment(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.lastSegment}get currentSegment(){var e;return null===(e=this.currentSegments)||void 0===e?void 0:e[this._segmentPointer]}get nextSegment(){var e;return null===(e=this.currentSegments)||void 0===e?void 0:e[this._segmentPointer+1]}get currentSegments(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.segments}get currentSubtitleEndSn(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.currentSubtitleEndSn}get liveEdge(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.liveEdge}get totalDuration(){var e;return(null===(e=this.currentStream)||void 0===e?void 0:e.totalDuration)||0}get seekRange(){const e=this.currentSegments;if(e&&e.length)return[e[0].start,e[e.length-1].end]}get isEmpty(){var e;return!(null!==(e=this.currentSegments)&&void 0!==e&&e.length)}get isLive(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.live}get hasSubtitle(){var e;return!(null===(e=this.currentStream)||void 0===e||!e.currentSubtitleStream)}getAudioSegment(e){var t;return null===(t=this.currentStream)||void 0===t?void 0:t.getAudioSegment(e)}moveSegmentPointer(e){var t;null==e&&(e=this._segmentPointer+1),this._segmentPointer=oa(e,-1,null===(t=this.currentSegments)||void 0===t?void 0:t.length),this.player.debug.log(this.TAG_NAME,`moveSegmentPointer() and param pos is ${e} and clamp result is ${this._segmentPointer}`)}reset(){this.streams=[],this.currentStream=null,this.dvrWindow=0,this._segmentPointer=-1}getSegmentByIndex(e){var t;return null===(t=this.currentSegments)||void 0===t?void 0:t[e]}setNextSegmentByIndex(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this._segmentPointer=e-1,this.player.debug.log(this.TAG_NAME,"setNextSegmentByIndex()",e,this._segmentPointer)}findSegmentIndexByTime(e){const t=this.currentSegments;if(t){for(let i,s=0,r=t.length;s<r;s++)if(i=t[s],e>=i.start&&e<i.end)return s;const i=t[t.length-1];if(Math.abs(e-(null==i?void 0:i.end))<.2)return t.length-1}}upsertPlaylist(e,t,i){if(!e)return void this.player.debug.warn(this.TAG_NAME,"upsertPlaylist() playlist is null");if(e.isMaster)this.streams.length=e.streams.length,e.streams.filter((e=>e.url)).forEach(((e,t)=>{this.streams[t]?this.streams[t].update(e):this.streams[t]=new hb(e)})),this.currentStream=this.streams[0];else if(Array.isArray(e.segments)){const s=this.currentStream;if(s){s.update(e,t,i);const r=s.updateSubtitle(i);r&&this.hls.emit(zs,{list:r})}else this.reset(),this.currentStream=this.streams[0]=new hb(e,t,i)}this.currentStream&&this.hls.isLive&&!this.dvrWindow&&(this.dvrWindow=this.currentSegments.reduce(((e,t)=>e+=t.duration),0))}switchSubtitle(e){var t;null===(t=this.currentStream)||void 0===t||t.switchSubtitle(e)}clearOldSegment(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;const t=this.currentStream;if(!this.dvrWindow||!t)return;const i=t.endTime-this.dvrWindow;if(i<=0)return void this.player.debug.log(this.TAG_NAME,`clearOldSegment() stream.endTime:${t.endTime}, this.dvrWindow:${this.dvrWindow} startTime <= 0`);const s=t.segments;if(s.length<=e)return void this.player.debug.log(this.TAG_NAME,`clearOldSegment() segments.length:${s.length} <= maxPlaylistSize:${e}`);const r=this._segmentPointer;this._segmentPointer=t.clearOldSegment(i,r),this.player.debug.log(this.TAG_NAME,"clearOldSegment() update _segmentPointer:",r,this._segmentPointer),this.player.debug.log(this.TAG_NAME,"currentSegments",this.currentSegments)}checkSegmentTrackChange(e,t){const i=this.findSegmentIndexByTime(e),s=this.getSegmentByIndex(i);if(!s)return;if(!s.hasAudio&&!s.hasVideo)return;if(2!==t&&s.hasAudio&&s.hasVideo)return s;if(s.end-e>.3)return;const r=this.getSegmentByIndex(i+1);return r&&(r.hasAudio||r.hasVideo)&&(r.hasAudio!==s.hasAudio||r.hasVideo!==s.hasVideo)?r:void 0}}class ub{constructor(e,t){this.hls=e,this.player=t;const i=window.crypto||window.msCrypto;this.subtle=i&&(i.subtle||i.webkitSubtle),this.externalDecryptor=null}decrypt(e,t){if(!e&&!t)return;const i=[];return e&&(i[0]=this._decryptSegment(e)),t&&(i[1]=this._decryptSegment(t)),Promise.all(i)}async _decryptSegment(e){let t=e.data;return e.key&&(t=await this._decryptData(e.data,e.key,e.keyIv)),e.map?Yd(e.map,t):t}async _decryptData(e,t,i){if(this.externalDecryptor)return await this.externalDecryptor.decrypt(e,t,i);if(this.subtle){const s=await this.subtle.importKey("raw",t,{name:"AES-CBC"},!1,["encrypt","decrypt"]),r=await this.subtle.decrypt({name:"AES-CBC",iv:i},s,e);return new Uint8Array(r)}e=ud(e),t=ud(t),i=ud(i);return function(e){const{words:t}=e,{sigBytes:i}=e,s=new Uint8Array(i);for(let e=0;e<i;e+=1)s[e]=t[e>>>2]>>>24-e%4*8&255;return s}(hd.AES.decrypt({ciphertext:e},t,{iv:i,mode:hd.mode.CBC}))}}class pb extends Dd{constructor(e){super(e),this.player=e,this._pmtId=-1,this._remainingPacketData=null,this._videoPesData=[],this._audioPesData=[],this._gopId=0,this._videoPid=-1,this._audioPid=-1,this._codecType=vt,this._audioCodecType=Et,this._vps=null,this._sps=null,this._pps=null,this.TAG_NAME="HlsTsLoader",this._isForHls=!0,this.videoTrack=pb.initVideoTrack(),this.audioTrack=pb.initAudioTrack(),this._baseDts=-1,this._baseDtsInited=!1,this._basefps=25,this._baseFpsInterval=null,this._tempSampleTsList=[],this._hasAudio=!1,this._hasVideo=!1,this._audioNextPts=void 0,this._videoNextDts=void 0,this._audioTimestampBreak=!1,this._videoTimestampBreak=!1,this._lastAudioExceptionGapDot=0,this._lastAudioExceptionOverlapDot=0,this._lastAudioExceptionLargeGapDot=0,this._isSendAACSeqHeader=!1,this.workerClearTimeout=null,this.workerUrl=null,this.loopWorker=null,this.tempSampleListInfo={},this._isUseWorker()&&this._initLoopWorker(),this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.workerUrl&&(URL.revokeObjectURL(this.workerUrl),this.workerUrl=null),this.workerClearTimeout&&(clearTimeout(this.workerClearTimeout),this.workerClearTimeout=null),this.loopWorker&&(this.loopWorker.postMessage({cmd:"destroy"}),this.loopWorker.terminate(),this.loopWorker=null),this._stopDecodeLoopInterval(),this.videoTrack=null,this.audioTrack=null,this.tempSampleListInfo={},this._baseDts=-1,this._baseDtsInited=!1,this._basefps=25,this._hasCalcFps=!1,this._audioNextPts=void 0,this._videoNextDts=void 0,this._audioTimestampBreak=!1,this._videoTimestampBreak=!1,this._lastAudioExceptionGapDot=0,this._lastAudioExceptionOverlapDot=0,this._lastAudioExceptionLargeGapDot=0,this._isForHls=!0,this._isSendAACSeqHeader=!1,this.player.debug.log(this.TAG_NAME,"destroy")}static initVideoTrack(){return{samples:[]}}static initAudioTrack(){return{samples:[]}}static probe(e){return!!e.length&&(71===e[0]&&71===e[188]&&71===e[376])}_parsePES(e){const t=e[8];if(null==t||e.length<t+9)return;const i=e[0]<<16|e[1]<<8|e[2];if(1!==i)return this.player.debug.warn(this.TAG_NAME,`_parsePES startPrefix should be 1 but with value ${i}`),{error:!0,code:"startPrefixError"};const s=(e[4]<<8)+e[5];if(s&&s>e.length-6)return;let r,a;const o=e[7];return 192&o&&(r=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,64&o?(a=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2,r-a>54e5&&(r=a)):a=r),{data:e.subarray(9+t),pts:r,dts:a,originalPts:r,originalDts:a}}_demux(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];t&&(this._pmtId=-1,this.videoTrack=pb.initVideoTrack(),this.audioTrack=pb.initAudioTrack()),!i||t?(this._remainingPacketData=null,this._videoPesData=[],this._audioPesData=[]):(this.videoTrack.samples=[],this.audioTrack.samples=[],this._remainingPacketData&&(e=Yd(this._remainingPacketData,e),this._remainingPacketData=null));let s=e.length;const r=s%188;r&&(this._remainingPacketData=e.subarray(s-r),s-=r);for(let t=0;t<s;t+=188){if(71!==e[t])throw new Error("TS packet did not start with 0x47");const i=!!(64&e[t+1]),s=((31&e[t+1])<<8)+e[t+2];let r;if((48&e[t+3])>>4>1){if(r=t+5+e[t+4],r===t+188)continue}else r=t+4;switch(s){case 0:i&&(r+=e[r]+1),this._pmtId=(31&e[r+10])<<8|e[r+11];break;case this._pmtId:{i&&(r+=e[r]+1);const t=r+3+((15&e[r+1])<<8|e[r+2])-4;for(r+=12+((15&e[r+10])<<8|e[r+11]);r<t;){const t=(31&e[r+1])<<8|e[r+2];switch(e[r]){case 15:this._audioPid=t,this._audioCodecType=Et;break;case 27:if(-1!==this._videoPid)break;this._videoPid=t,this._codecType=vt;break;case 36:if(-1!==this._videoPid)break;this._videoPid=t,this._codecType=_t;break;default:this.player.debug.log(this.TAG_NAME,`Unsupported stream. type: ${e[r]}, pid: ${t}`)}r+=5+((15&e[r+3])<<8|e[r+4])}}break;case this._videoPid:i&&this._videoPesData.length&&this._parseVideoData(),this._videoPesData.push(e.subarray(r,t+188));break;case this._audioPid:i&&this._audioPesData.length&&this._parseAudioData(),this._audioPesData.push(e.subarray(r,t+188));break;case 17:case 8191:break;default:this.player.debug.log(this.TAG_NAME,`Unknown pid: ${s}`)}}this._parseVideoData(),this._parseAudioData(),this.audioTrack.formatTimescale=this.videoTrack.formatTimescale=this.videoTrack.timescale=9e4,this.audioTrack.timescale=this.audioTrack.sampleRate||0}demuxAndFix(e,t,i,s){this.player._times.demuxStart||(this.player._times.demuxStart=aa()),this._demux(e,t,i),this._fix(s,t,i)}_parseVideoData(){if(!this._videoPesData.length)return void this.player.debug.log(this.TAG_NAME,"_parseVideoData","no video pes data");const e=this._parsePES(Yd(...this._videoPesData));if(!e||e.error)return void(e&&"startPrefixError"===e.code&&(this._videoPesData=[]));const t=function(e){const t=e.length;let i=2,s=0;for(;null!==e[i]&&void 0!==e[i]&&1!==e[i];)i++;if(i++,s=i+2,s>=t)return[];const r=[];for(;s<t;)switch(e[s]){case 0:if(0!==e[s-1]){s+=2;break}if(0!==e[s-2]){s++;break}i!==s-2&&r.push(e.subarray(i,s-2));do{s++}while(1!==e[s]&&s<t);i=s+1,s=i+2;break;case 1:if(0!==e[s-1]||0!==e[s-2]){s+=3;break}i!==s-2&&r.push(e.subarray(i,s-2)),i=s+1,s=i+2;break;default:s+=3}return i<t&&r.push(e.subarray(i)),r}(e.data);t?this._createVideoSample(t,e.pts,e.dts):this.player.debug.warn(this.TAG_NAME,"Cannot parse avc units",e),this._videoPesData=[]}_createVideoSample(e,t,i){if(!e.length)return;const s=this._codecType===_t,r={isIFrame:!1,type:je,isHevc:s,vps:null,sps:null,pps:null,pts:t,dts:i,payload:null};e.forEach((e=>{const t=s?e[0]>>>1&63:31&e[0];switch(t){case 5:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:if(!s&&5!==t||s&&5===t)break;r.isIFrame=!0,this._gopId++;break;case 6:case 39:case 40:if(!s&&6!==t||s&&6===t)break;return void function(e,t){const i=e.length;let s=t?2:1,r=0,a=0,o="";for(;255===e[s];)r+=255,s++;for(r+=e[s++];255===e[s];)a+=255,s++;if(a+=e[s++],5===r&&i>s+16)for(let t=0;t<16;t++)o+=e[s].toString(16),s++;e.subarray(s)}(function(e){const t=e.byteLength,i=[];let s=1;for(;s<t-2;)0===e[s]&&0===e[s+1]&&3===e[s+2]?(i.push(s+2),s+=2):s++;if(!i.length)return e;const r=t-i.length,a=new Uint8Array(r);let o=0;for(s=0;s<r;o++,s++)o===i[0]&&(o++,i.shift()),a[s]=e[o];return a}(e),s);case 32:if(!s)break;r.vps||(r.vps=e);break;case 7:case 33:if(!s&&7!==t||s&&7===t)break;r.sps||(r.sps=e);break;case 8:case 34:if(!s&&8!==t||s&&8===t)break;r.pps||(r.pps=e)}if(s&&Gn(t)||!s&&Rn(t)){const t=ea(e);if(r.payload){const e=new Uint8Array(r.payload.byteLength+t.byteLength);e.set(r.payload,0),e.set(t,r.payload.byteLength),r.payload=e}else r.payload=t}}));let a=null;s?r.sps&&r.vps&&r.pps&&(a=Nn({vps:r.vps,sps:r.sps,pps:r.pps})):r.sps&&r.pps&&(a=Tn({sps:r.sps,pps:r.pps})),a&&(this.player.debug.log(this.TAG_NAME,"_createVideoSample","seqHeader"),this._doDecodeByHls(a,je,Math.round(r.pts/90),!0,0)),r.isIFrame&&this.calcIframeIntervalTimestamp(Math.round(r.dts/90)),this.videoTrack.samples=this.videoTrack.samples.concat(r)}_parseAudioData(){if(!this._audioPesData.length)return;if(!this.player._opt.hasAudio)return;const e=this._parsePES(Yd(...this._audioPesData));if(e&&!e.error){if(this._audioCodecType===Et){const t=function(e,t){const i=e.length;let s=0;for(;s+2<i&&(255!==e[s]||240!=(246&e[s+1]));)s++;if(s>=i)return;const r=s,a=[],o=(60&e[s+2])>>>2,n=Fr[o];if(!n)throw new Error(`Invalid sampling index: ${o}`);const l=1+((192&e[s+2])>>>6),d=(1&e[s+2])<<2|(192&e[s+3])>>>6;let h,c,u=0;const p=Vr(n);for(;s+7<i;)if(255===e[s]&&240==(246&e[s+1])){if(c=(3&e[s+3])<<11|e[s+4]<<3|(224&e[s+5])>>5,i-s<c)break;h=2*(1&~e[s+1]),a.push({pts:t+u*p,data:e.subarray(s+7+h,s+c)}),u++,s+=c}else s++;return{skip:r,remaining:s>=i?void 0:e.subarray(s),frames:a,samplingFrequencyIndex:o,sampleRate:n,objectType:l,channelCount:d,originCodec:`mp4a.40.${l}`}}(e.data,e.originalPts);if(t){if(this.audioTrack.codec=t.codec,this.audioTrack.sampleRate=t.sampleRate,this.audioTrack.channelCount=t.channelCount,!this._isSendAACSeqHeader){const e=jr({profile:t.objectType,sampleRate:t.samplingFrequencyIndex,channel:t.channelCount});this._isSendAACSeqHeader=!0,this.player.debug.log(this.TAG_NAME,"aac seq header",`profile: ${t.objectType}, sampleRate:${t.sampleRate},sampleRateIndex: ${t.samplingFrequencyIndex}, channel: ${t.channelCount}`),this._doDecodeByHls(e,Ne,0,!1,0)}if(this._isSendAACSeqHeader){const e=[];t.frames.forEach((t=>{const i=t.pts,s=new Uint8Array(t.data.length+2);s.set([175,1],0),s.set(t.data,2);const r={type:Ne,pts:i,dts:i,payload:s};e.push(r)})),this.audioTrack.samples=this.audioTrack.samples.concat(e)}else this.player.debug.warn(this.TAG_NAME,"aac seq header not send")}else this.player.debug.warn(this.TAG_NAME,"aac parseADTS error")}this._audioPesData=[]}else e&&"startPrefixError"===e.code&&(this._audioPesData=[])}_fix(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e=Math.round(9e4*e);const s=this.videoTrack,r=this.audioTrack,a=s.samples,o=r.samples;if(!a.length&&!o.length)return;const n=a[0],l=o[0];let d=0;if(a.length&&o.length&&(d=n.dts-l.pts),this._baseDtsInited||this._calculateBaseDts(),t&&(this._calculateBaseDts(),this._baseDts-=e),!i){this._videoNextDts=d>0?e+d:e,this._audioNextPts=d>0?e:e-d;const t=n?n.dts-this._baseDts-this._videoNextDts:0,i=l?l.pts-this._baseDts-this._audioNextPts:0;Math.abs(t||i)>xr&&(this._calculateBaseDts(this.audioTrack,this.videoTrack),this._baseDts-=e)}this._resetBaseDtsWhenStreamBreaked(),this._fixAudio(r),this._fixVideo(s);let h=s.samples.concat(r.samples);h=h.map((e=>(e.dts=Math.round(e.dts/90),e.pts=Math.round(e.pts/90),e.cts=e.pts-e.dts,e))).sort(((e,t)=>e.dts-t.dts)),h.forEach((e=>{const t=new Uint8Array(e.payload);delete e.payload,this._isUseWorker()?this.loopWorker.postMessage({...e,payload:t,cmd:"sample"},[t.buffer]):e.type===je?this._doDecodeVideo({...e,payload:t}):e.type===Ne&&this._doDecodeAudio({...e,payload:t})})),po(this._hasCalcFps)&&this._isUseWorker()&&(this._hasCalcFps=!0,this._calcDecodeFps(h))}_isUseWorker(){return!this.player.isUseMSE()&&this.isForHls()}_calculateBaseDts(){const e=this.audioTrack,t=this.videoTrack,i=e.samples,s=t.samples;if(!i.length&&!s.length)return!1;let r=1/0,a=1/0;i.length&&(e.baseDts=r=i[0].pts),s.length&&(t.baseDts=a=s[0].dts),this._baseDts=Math.min(r,a);const o=a-r;return Number.isFinite(o)&&Math.abs(o)>45e3&&this.player.debug.warn(this.TAG_NAME,`large av first frame gap,\n video pts: ${a},\n audio pts: ${r},\n base dts: ${this._baseDts},\n detect is: ${o}`),this._baseDtsInited=!0,!0}_resetBaseDtsWhenStreamBreaked(){if(this._baseDtsInited&&this._videoTimestampBreak&&this._audioTimestampBreak){if(!this._calculateBaseDts(this.audioTrack,this.videoTrack))return;this._baseDts-=Math.min(this._audioNextPts,this._videoNextDts),this._audioLastSample=null,this._videoLastSample=null,this._videoTimestampBreak=!1,this._audioTimestampBreak=!1}}_fixAudio(e){const t=e.samples;t.length&&(t.forEach((e=>{e.pts-=this._baseDts,e.dts=e.pts})),this._doFixAudioInternal(e,t,9e4))}_fixVideo(e){const t=e.samples;if(!t.length)return;if(t.forEach((e=>{e.dts-=this._baseDts,e.pts-=this._baseDts})),void 0===this._videoNextDts){const e=t[0];this._videoNextDts=e.dts}const i=t.length;let s=0;const r=t[0],a=t[1],o=this._videoNextDts-r.dts;let n;Math.abs(o)>45e3&&(r.dts+=o,r.pts+=o,this.player.debug.warn(this.TAG_NAME,`large video gap between chunk,\n next dts is ${this._videoNextDts},\n first dts is ${r.dts},\n next dts is ${a.dts},\n duration is ${o}`),a&&Math.abs(a.dts-r.dts)>xr&&(this._videoTimestampBreak=!0,t.forEach(((e,t)=>{0!==t&&(e.dts+=o,e.pts+=o)}))));const l=e.samples[0],d=e.samples[i-1];n=1===i?9e3:Math.floor((d.dts-l.dts)/(i-1));for(let r=0;r<i;r++){const a=t[r].dts,o=t[r+1];if(s=r<i-1?o.dts-a:t[r-1]?Math.min(a-t[r-1].dts,n):n,s>xr||s<0){this._videoTimestampBreak=!0,s=this._audioTimestampBreak?n:Math.max(s,2700);const i=this._audioNextPts||0;o&&o.dts>i&&(s=n),this.player.debug.warn(this.TAG_NAME,`large video gap between frames,\n time is ${a/e.timescale},\n dts is ${a},\n origin dts is ${t[r].originalDts},\n next dts is ${this._videoNextDts},\n sample Duration is ${s} ,\n ref Sample DurationInt is ${n}`)}t[r].duration=s,this._videoNextDts+=s}}_doFixAudioInternal(e,t,i){e.sampleDuration||(e.sampleDuration=Vr(e.timescale,i));const s=e.sampleDuration;if(void 0===this._audioNextPts){const e=t[0];this._audioNextPts=e.pts}for(let i=0;i<t.length;i++){const r=this._audioNextPts,a=t[i],o=a.pts-r;if(!this._audioTimestampBreak&&o>=3*s&&o<=kr&&!Aa()){Hr(e.codec,e.channelCount)||t[0].data.subarray();const n=Math.floor(o/s);Math.abs(a.pts-this._lastAudioExceptionGapDot)>Cr&&(this._lastAudioExceptionGapDot=a.pts),this.player.debug.warn(this.TAG_NAME,`audio gap detected,\n pts is ${t.pts},\n originPts is ${t.originalPts},\n count is ${n},\n nextPts is ${r},\n ref sample duration is ${s}`);for(let e=0;e<n;e++)this._audioNextPts+=s,i++;i--}else o<=-3*s&&o>=-9e4?(Math.abs(a.pts-this._lastAudioExceptionOverlapDot)>Cr&&(this._lastAudioExceptionOverlapDot=a.pts,this.player.debug.warn(this.TAG_NAME,`audio overlap detected,\n pts is ${a.pts},\n originPts is ${a.originalPts},\n nextPts is ${r},\n ref sample duration is ${s}`)),t.splice(i,1),i--):(Math.abs(o)>=kr&&(this._audioTimestampBreak=!0,Math.abs(a.pts-this._lastAudioExceptionLargeGapDot)>Cr&&(this._lastAudioExceptionLargeGapDot=a.pts,this.player.debug.warn(this.TAG_NAME,`large audio gap detected,\n time is ${a.pts/1e3}\n pts is ${a.pts},\n originPts is ${a.originalPts},\n nextPts is ${r},\n sample duration is ${o}\n ref sample duration is ${s}`))),a.dts=a.pts=r,this._audioNextPts+=s)}}_calcDecodeFps(e){const t=ro(e.map((e=>({ts:e.dts||e.pts,type:e.type}))),je);t&&(this.player.debug.log(this.TAG_NAME,`_calcDecodeFps() video fps is ${t}, update base fps is ${this._basefps}`),this._basefps=t),this._postMessageToLoopWorker("updateBaseFps",{baseFps:this._basefps})}_initLoopWorker(){this.player.debug.log(this.TAG_NAME,"_initLoopWorker()");const e=Ao(function(){const e=1,t=2;let i=new class{constructor(){this.baseFps=0,this.fpsInterval=null,this.preLoopTimestamp=null,this.startBpsTime=null,this.allSampleList=[]}destroy(){this._clearInterval(),this.baseFps=0,this.allSampleList=[],this.preLoopTimestamp=null,this.startBpsTime=null}updateBaseFps(e){this.baseFps=e,this._clearInterval(),this._startInterval()}pushSample(e){delete e.cmd,this.allSampleList.push(e)}_startInterval(){const e=Math.ceil(1e3/this.baseFps);this.fpsInterval=setInterval((()=>{let t=(new Date).getTime();this.preLoopTimestamp||(this.preLoopTimestamp=t),this.startBpsTime||(this.startBpsTime=t);const i=t-this.preLoopTimestamp;if(i>2*e&&console.warn(`JbPro:[TsLoader LoopWorker] loop interval is ${i}ms, more than ${e} * 2ms`),this._loop(),this.preLoopTimestamp=(new Date).getTime(),this.startBpsTime){t-this.startBpsTime>=1e3&&(this._calcSampleList(),this.startBpsTime=t)}}),e)}_clearInterval(){this.fpsInterval&&(clearInterval(this.fpsInterval),this.fpsInterval=null)}_calcSampleList(){const i={buferredDuration:0,allListLength:this.allSampleList.length,audioListLength:0,videoListLength:0};this.allSampleList.forEach((s=>{s.type===t?(i.videoListLength++,s.duration&&(i.buferredDuration+=Math.round(s.duration/90))):s.type===e&&i.audioListLength++})),postMessage({cmd:"sampleListInfo",...i})}_loop(){let i=null;if(this.allSampleList.length)if(i=this.allSampleList.shift(),i.type===t){postMessage({cmd:"decodeVideo",...i},[i.payload.buffer]);let t=this.allSampleList[0];for(;t&&t.type===e;)i=this.allSampleList.shift(),postMessage({cmd:"decodeAudio",...i},[i.payload.buffer]),t=this.allSampleList[0]}else i.type===e&&(postMessage({cmd:"decodeAudio",...i},[i.payload.buffer]),this.allSampleList.length&&this.allSampleList[0].type===t&&(i=this.allSampleList.shift(),postMessage({cmd:"decodeVideo",...i},[i.payload.buffer])))}};self.onmessage=e=>{const t=e.data;switch(t.cmd){case"updateBaseFps":i.updateBaseFps(t.baseFps);break;case"sample":i.pushSample(t);break;case"destroy":i.destroy(),i=null}}}.toString()),t=new Blob([e],{type:"text/javascript"}),i=URL.createObjectURL(t);let s=new Worker(i);this.workerUrl=i,this.workerClearTimeout=setTimeout((()=>{window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null,this.workerClearTimeout=null}),te),s.onmessage=e=>{const t=e.data;switch(t.cmd){case"decodeVideo":this._doDecodeVideo(t);break;case"decodeAudio":this._doDecodeAudio(t);break;case"sampleListInfo":this.tempSampleListInfo=t}},this.loopWorker=s}_postMessageToLoopWorker(e,t){this._isUseWorker()&&(this.loopWorker?this.loopWorker.postMessage({cmd:e,...t}):this.player.debug.warn(this.TAG_NAME,"loop worker is not init, can not post message"))}_doDecodeAudio(e){const t=new Uint8Array(e.payload);this.player.updateStats({abps:t.byteLength});let i=t;uo(this.player._opt.m7sCryptoAudio)&&(i=this.cryptoPayloadAudio(t)),this.isForHls()?this._doDecodeByHls(i,Ne,e.dts,!1,0):this._doDecodeByTs(i,Ne,e.dts,!1,0)}_doDecodeVideo(e){const t=new Uint8Array(e.payload);let i=null;i=e.isHevc?jn(t,e.isIFrame):kn(t,e.isIFrame),this.player.updateStats({dts:e.dts,vbps:i.byteLength});const s=e.pts-e.dts;let r=this.cryptoPayload(i,e.isIFrame);this.isForHls()?this._doDecodeByHls(r,je,e.dts,e.isIFrame,s):this._doDecodeByTs(r,je,e.dts,e.isIFrame,s)}_stopDecodeLoopInterval(){this._baseFpsInterval&&(clearInterval(this._baseFpsInterval),this._baseFpsInterval=null)}getBuferredDuration(){return this.tempSampleListInfo.buferredDuration||0}getSampleListLength(){return this.tempSampleListInfo.allListLength||0}getSampleAudioListLength(){return this.tempSampleListInfo.audioListLength||0}getSampleVideoListLength(){return this.tempSampleListInfo.videoListLength||0}isForHls(){return this._isForHls}getInputByteLength(){return this._remainingPacketData&&this._remainingPacketData.byteLength||0}}function fb(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<8)+(e[t+1]||0)}function mb(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}function gb(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const i=Math.pow(2,32);return mb(e,t)*i+mb(e,t+4)}const yb="aac",Ab="g7110a",bb="g7110m",vb="avc",_b="hevc";class Sb{static getFrameDuration(e){return 1024*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4)/e}static getRateIndexByRate(e){return Sb.FREQ.indexOf(e)}}function wb(e,t,i,s,r,a){const o=[],n=null==r?void 0:r.entries,l=t.entries,d=s.entries,h=i.entrySizes,c=null==a?void 0:a.entries;let u,p,f;c&&(u={},c.forEach((e=>{u[e-1]=!0}))),n&&(p=[],n.forEach((e=>{let{count:t,offset:i}=e;for(let e=0;e<t;e++)p.push(i)})));let m=-1,g=0,y=0,A=0,b=0,v=0,_=l[0].samplesPerChunk,S=l[1]?l[1].firstChunk-1:1/0;return e.entries.forEach((e=>{let{count:t,delta:s}=e;for(let e=0;e<t;e++)f={dts:g,duration:s,size:h[y]||i.sampleSize,offset:d[A]+v,index:y},c&&(f.keyframe=u[y],f.keyframe&&m++,f.gopId=m),p&&y<p.length&&(f.pts=f.dts+p[y]),o.push(f),g+=s,y++,y<_?v+=f.size:(A++,v=0,A>=S&&(b++,S=l[b+1]?l[b+1].firstChunk-1:1/0),_+=l[b].samplesPerChunk)})),o}function Eb(e,t){return e.dataReferenceIndex=fb(t,6),e.width=fb(t,24),e.height=fb(t,26),e.horizresolution=mb(t,28),e.vertresolution=mb(t,32),e.frameCount=fb(t,40),e.depth=fb(t,74),78}function Tb(e,t){return e.dataReferenceIndex=fb(t,6),e.channelCount=fb(t,16),e.sampleSize=fb(t,18),e.sampleRate=mb(t,24)/65536,28}function kb(e,t,i){if(!e)return;if(e.size!==e.data.length)throw new Error(`box ${e.type} size !== data.length`);const s={start:e.start,size:e.size,headerSize:e.headerSize,type:e.type};return t&&(s.version=e.data[e.headerSize],s.flags=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<16)+(e[t+1]<<8)+(e[t+2]||0)}(e.data,e.headerSize+1),s.headerSize+=4),i(s,e.data.subarray(s.headerSize),s.start+s.headerSize),s}zd(Sb,"FREQ",[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350]);const Cb=function(e,t,i){const s=String(i),r=t>>0;let a=Math.ceil(r/s.length);const o=[],n=String(e);for(;a--;)o.push(s);return o.join("").substring(0,r-n.length)+n},xb=function(){const e=[];for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return i.forEach((t=>{e.push(Cb(Number(t).toString(16),2,0))})),e[0]};class Rb{static probe(e){return!!Rb.findBox(e,["ftyp"])}static findBox(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s=[];if(!e)return s;let r=0,a="",o=0;for(;e.length>7;){if(r=mb(e),a=String.fromCharCode.apply(null,e.subarray(4,8)),o=8,1===r?(r=gb(e,8),o+=8):r||(r=e.length),!t[0]||a===t[0]){const n=e.subarray(0,r);if(!(t.length<2))return Rb.findBox(n.subarray(o),t.slice(1),i+o);s.push({start:i,size:r,headerSize:o,type:a,data:n})}i+=r,e=e.subarray(r)}return s}static tfhd(e){return kb(e,!0,((e,t)=>{e.trackId=mb(t);let i=4;const s=1&e.flags,r=2&e.flags,a=8&e.flags,o=16&e.flags,n=32&e.flags;s&&(i+=4,e.baseDataOffset=mb(t,i),i+=4),r&&(e.sampleDescriptionIndex=mb(t,i),i+=4),a&&(e.defaultSampleDuration=mb(t,i),i+=4),o&&(e.defaultSampleSize=mb(t,i),i+=4),n&&(e.defaultSampleFlags=mb(t,i))}))}static sidx(e){return kb(e,!0,((e,t)=>{let i=0;e.reference_ID=mb(t,i),i+=4,e.timescale=mb(t,i),i+=4,0===e.version?(e.earliest_presentation_time=mb(t,i),i+=4,e.first_offset=mb(t,i),i+=4):(e.earliest_presentation_time=gb(t,i),i+=8,e.first_offset=gb(t,i),i+=8),i+=2,e.references=[];const s=fb(t,i);i+=2;for(let r=0;r<s;r++){const s={};e.references.push(s);let r=mb(t,i);i+=4,s.reference_type=r>>31&1,s.referenced_size=2147483647&r,s.subsegment_duration=mb(t,i),i+=4,r=mb(t,i),i+=4,s.starts_with_SAP=r>>31&1,s.SAP_type=r>>28&7,s.SAP_delta_time=268435455&r}}))}static moov(e){return kb(e,!1,((e,t,i)=>{e.mvhd=Rb.mvhd(Rb.findBox(t,["mvhd"],i)[0]),e.trak=Rb.findBox(t,["trak"],i).map((e=>Rb.trak(e))),e.pssh=Rb.pssh(Rb.findBox(t,["pssh"],i)[0])}))}static mvhd(e){return kb(e,!0,((e,t)=>{let i=0;1===e.version?(e.timescale=mb(t,16),e.duration=gb(t,20),i+=28):(e.timescale=mb(t,8),e.duration=mb(t,12),i+=16),e.nextTrackId=mb(t,i+76)}))}static trak(e){return kb(e,!1,((e,t,i)=>{e.tkhd=Rb.tkhd(Rb.findBox(t,["tkhd"],i)[0]),e.mdia=Rb.mdia(Rb.findBox(t,["mdia"],i)[0])}))}static tkhd(e){return kb(e,!0,((e,t)=>{let i=0;1===e.version?(e.trackId=mb(t,16),e.duration=gb(t,24),i+=32):(e.trackId=mb(t,8),e.duration=mb(t,16),i+=20),e.width=mb(t,i+52),e.height=mb(t,i+56)}))}static mdia(e){return kb(e,!1,((e,t,i)=>{e.mdhd=Rb.mdhd(Rb.findBox(t,["mdhd"],i)[0]),e.hdlr=Rb.hdlr(Rb.findBox(t,["hdlr"],i)[0]),e.minf=Rb.minf(Rb.findBox(t,["minf"],i)[0])}))}static mdhd(e){return kb(e,!0,((e,t)=>{let i=0;1===e.version?(e.timescale=mb(t,16),e.duration=gb(t,20),i+=28):(e.timescale=mb(t,8),e.duration=mb(t,12),i+=16);const s=fb(t,i);e.language=String.fromCharCode(96+(s>>10&31),96+(s>>5&31),96+(31&s))}))}static hdlr(e){return kb(e,!0,((e,t)=>{0===e.version&&(e.handlerType=String.fromCharCode.apply(null,t.subarray(4,8)))}))}static minf(e){return kb(e,!1,((e,t,i)=>{e.vmhd=Rb.vmhd(Rb.findBox(t,["vmhd"],i)[0]),e.smhd=Rb.smhd(Rb.findBox(t,["smhd"],i)[0]),e.stbl=Rb.stbl(Rb.findBox(t,["stbl"],i)[0])}))}static vmhd(e){return kb(e,!0,((e,t)=>{e.graphicsmode=fb(t),e.opcolor=[fb(t,2),fb(t,4),fb(t,6)]}))}static smhd(e){return kb(e,!0,((e,t)=>{e.balance=fb(t)}))}static stbl(e){return kb(e,!1,((e,t,i)=>{var s,r,a;e.stsd=Rb.stsd(Rb.findBox(t,["stsd"],i)[0]),e.stts=Rb.stts(Rb.findBox(t,["stts"],i)[0]),e.ctts=Rb.ctts(Rb.findBox(t,["ctts"],i)[0]),e.stsc=Rb.stsc(Rb.findBox(t,["stsc"],i)[0]),e.stsz=Rb.stsz(Rb.findBox(t,["stsz"],i)[0]),e.stco=Rb.stco(Rb.findBox(t,["stco"],i)[0]),e.stco||(e.co64=Rb.co64(Rb.findBox(t,["co64"],i)[0]),e.stco=e.co64);const o=null===(s=e.stsd.entries[0])||void 0===s||null===(r=s.sinf)||void 0===r||null===(a=r.schi)||void 0===a?void 0:a.tenc.default_IV_size;e.stss=Rb.stss(Rb.findBox(t,["stss"],i)[0]),e.senc=Rb.senc(Rb.findBox(t,["senc"],i)[0],o)}))}static senc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return kb(e,!0,((e,i)=>{let s=0;const r=mb(i,s);s+=4,e.samples=[];for(let a=0;a<r;a++){const r={InitializationVector:[]};for(let e=0;e<t;e++)r.InitializationVector[e]=i[s+e];if(s+=t,2&e.flags){r.subsamples=[];const e=fb(i,s);s+=2;for(let t=0;t<e;t++){const e={};e.BytesOfClearData=fb(i,s),s+=2,e.BytesOfProtectedData=mb(i,s),s+=4,r.subsamples.push(e)}}e.samples.push(r)}}))}static pssh(e){return kb(e,!0,((e,t)=>{const i=[],s=[];let r=0;for(let e=0;e<16;e++)s.push(xb(t[r+e]));if(r+=16,e.version>0){const e=mb(t,r);r+=4;for(let s=0;s<(""+e).length;s++)for(let e=0;e<16;e++){const e=t[r];r+=1,i.push(xb(e))}}const a=mb(t,r);e.data_size=a,r+=4,e.kid=i,e.system_id=s,e.buffer=t}))}static stsd(e){return kb(e,!0,((e,t,i)=>{e.entryCount=mb(t),e.entries=Rb.findBox(t.subarray(4),[],i+4).map((e=>{switch(e.type){case"avc1":case"avc2":case"avc3":case"avc4":return Rb.avc1(e);case"hvc1":case"hev1":return Rb.hvc1(e);case"mp4a":return Rb.mp4a(e);case"alaw":case"ulaw":return Rb.alaw(e);case"enca":return kb(e,!1,((e,t,i)=>{e.channelCount=fb(t,16),e.samplesize=fb(t,18),e.sampleRate=mb(t,24)/65536,t=t.subarray(28),e.sinf=Rb.sinf(Rb.findBox(t,["sinf"],i)[0]),e.esds=Rb.esds(Rb.findBox(t,["esds"],i)[0])}));case"encv":return kb(e,!1,((e,t,i)=>{e.width=fb(t,24),e.height=fb(t,26),e.horizresolution=mb(t,28),e.vertresolution=mb(t,32),t=t.subarray(78),e.sinf=Rb.sinf(Rb.findBox(t,["sinf"],i)[0]),e.avcC=Rb.avcC(Rb.findBox(t,["avcC"],i)[0]),e.hvcC=Rb.hvcC(Rb.findBox(t,["hvcC"],i)[0]),e.pasp=Rb.pasp(Rb.findBox(t,["pasp"],i)[0])}))}})).filter(Boolean)}))}static tenc(e){return kb(e,!1,((e,t)=>{let i=6;e.default_IsEncrypted=t[i],i+=1,e.default_IV_size=t[i],i+=1,e.default_KID=[];for(let s=0;s<16;s++)e.default_KID.push(xb(t[i])),i+=1}))}static schi(e){return kb(e,!1,((e,t,i)=>{e.tenc=Rb.tenc(Rb.findBox(t,["tenc"],i)[0])}))}static sinf(e){return kb(e,!1,((e,t,i)=>{e.schi=Rb.schi(Rb.findBox(t,["schi"],i)[0]),e.frma=Rb.frma(Rb.findBox(t,["frma"],i)[0])}))}static frma(e){return kb(e,!1,((e,t)=>{e.data_format="";for(let i=0;i<4;i++)e.data_format+=String.fromCharCode(t[i])}))}static avc1(e){return kb(e,!1,((e,t,i)=>{const s=Eb(e,t),r=t.subarray(s);i+=s,e.avcC=Rb.avcC(Rb.findBox(r,["avcC"],i)[0]),e.pasp=Rb.pasp(Rb.findBox(r,["pasp"],i)[0])}))}static avcC(e){return kb(e,!1,((e,t)=>{e.configurationVersion=t[0],e.AVCProfileIndication=t[1],e.profileCompatibility=t[2],e.AVCLevelIndication=t[3],e.codec=function(e){let t,i="avc1.";for(let s=0;s<3;s++)t=e[s].toString(16),t.length<2&&(t=`0${t}`),i+=t;return i}([t[1],t[2],t[3]]),e.lengthSizeMinusOne=3&t[4],e.spsLength=31&t[5],e.sps=[];let i=6;for(let s=0;s<e.spsLength;s++){const s=fb(t,i);i+=2,e.sps.push(t.subarray(i,i+s)),i+=s}e.ppsLength=t[i],i+=1,e.pps=[];for(let s=0;s<e.ppsLength;s++){const s=fb(t,i);i+=2,e.pps.push(t.subarray(i,i+=s)),i+=s}}))}static hvc1(e){return kb(e,!1,((e,t,i)=>{const s=Eb(e,t),r=t.subarray(s);i+=s,e.hvcC=Rb.hvcC(Rb.findBox(r,["hvcC"],i)[0]),e.pasp=Rb.pasp(Rb.findBox(r,["pasp"],i)[0])}))}static hvcC(e){return kb(e,!1,((t,i)=>{t.data=e.data,t.codec="hev1.1.6.L93.B0",t.configurationVersion=i[0];const s=i[1];t.generalProfileSpace=s>>6,t.generalTierFlag=(32&s)>>5,t.generalProfileIdc=31&s,t.generalProfileCompatibility=mb(i,2),t.generalConstraintIndicatorFlags=i.subarray(6,12),t.generalLevelIdc=i[12],t.avgFrameRate=fb(i,19),t.numOfArrays=i[22],t.vps=[],t.sps=[],t.pps=[];let r=23,a=0,o=0,n=0;for(let e=0;e<t.numOfArrays;e++){a=63&i[r],o=fb(i,r+1),r+=3;const e=[];for(let t=0;t<o;t++)n=fb(i,r),r+=2,e.push(i.subarray(r,r+n)),r+=n;32===a?t.vps.push(...e):33===a?t.sps.push(...e):34===a&&t.pps.push(...e)}}))}static pasp(e){return kb(e,!1,((e,t)=>{e.hSpacing=mb(t),e.vSpacing=mb(t,4)}))}static mp4a(e){return kb(e,!1,((e,t,i)=>{const s=Tb(e,t);e.esds=Rb.esds(Rb.findBox(t.subarray(s),["esds"],i+s)[0])}))}static esds(e){return kb(e,!0,((e,t)=>{e.codec="mp4a.";let i=0,s=0,r=0,a=0;for(;t.length;){for(i=0,a=t[i],s=t[i+1],i+=2;128&s;)r=(127&s)<<7,s=t[i],i+=1;if(r+=127&s,3===a)t=t.subarray(i+3);else{if(4!==a){if(5===a){const s=e.config=t.subarray(i,i+r);let a=(248&s[0])>>3;return 31===a&&s.length>=2&&(a=32+((7&s[0])<<3)+((224&s[1])>>5)),e.objectType=a,e.codec+=a.toString(16),void("."===e.codec[e.codec.length-1]&&(e.codec=e.codec.substring(0,e.codec.length-1)))}return void("."===e.codec[e.codec.length-1]&&(e.codec=e.codec.substring(0,e.codec.length-1)))}e.codec+=(t[i].toString(16)+".").padStart(3,"0"),t=t.subarray(i+13)}}}))}static alaw(e){return kb(e,!1,((e,t)=>{Tb(e,t)}))}static stts(e){return kb(e,!0,((e,t)=>{const i=mb(t),s=[];let r=4;for(let e=0;e<i;e++)s.push({count:mb(t,r),delta:mb(t,r+4)}),r+=8;e.entryCount=i,e.entries=s}))}static ctts(e){return kb(e,!0,((e,t)=>{const i=mb(t),s=[];let r=4;if(1===e.version)for(let e=0;e<i;e++)s.push({count:mb(t,r),offset:mb(t,r+4)}),r+=8;else for(let e=0;e<i;e++)s.push({count:mb(t,r),offset:-(1+~mb(t,r+4))}),r+=8;e.entryCount=i,e.entries=s}))}static stsc(e){return kb(e,!0,((e,t)=>{const i=mb(t),s=[];let r=4;for(let e=0;e<i;e++)s.push({firstChunk:mb(t,r),samplesPerChunk:mb(t,r+4),sampleDescriptionIndex:mb(t,r+8)}),r+=12;e.entryCount=i,e.entries=s}))}static stsz(e){return kb(e,!0,((e,t)=>{const i=mb(t),s=mb(t,4),r=[];if(!i){let e=8;for(let i=0;i<s;i++)r.push(mb(t,e)),e+=4}e.sampleSize=i,e.sampleCount=s,e.entrySizes=r}))}static stco(e){return kb(e,!0,((e,t)=>{const i=mb(t),s=[];let r=4;for(let e=0;e<i;e++)s.push(mb(t,r)),r+=4;e.entryCount=i,e.entries=s}))}static co64(e){return kb(e,!0,((e,t)=>{const i=mb(t),s=[];let r=4;for(let e=0;e<i;e++)s.push(gb(t,r)),r+=8;e.entryCount=i,e.entries=s}))}static stss(e){return kb(e,!0,((e,t)=>{const i=mb(t),s=[];let r=4;for(let e=0;e<i;e++)s.push(mb(t,r)),r+=4;e.entryCount=i,e.entries=s}))}static moof(e){return kb(e,!1,((e,t,i)=>{e.mfhd=Rb.mfhd(Rb.findBox(t,["mfhd"],i)[0]),e.traf=Rb.findBox(t,["traf"],i).map((e=>Rb.traf(e)))}))}static mfhd(e){return kb(e,!0,((e,t)=>{e.sequenceNumber=mb(t)}))}static traf(e){return kb(e,!1,((e,t,i)=>{e.tfhd=Rb.tfhd(Rb.findBox(t,["tfhd"],i)[0]),e.tfdt=Rb.tfdt(Rb.findBox(t,["tfdt"],i)[0]),e.trun=Rb.trun(Rb.findBox(t,["trun"],i)[0])}))}static trun(e){return kb(e,!0,((e,t)=>{const{version:i,flags:s}=e,r=t.length,a=e.sampleCount=mb(t);let o=4;if(r>o&&1&s&&(e.dataOffset=-(1+~mb(t,o)),o+=4),r>o&&4&s&&(e.firstSampleFlags=mb(t,o),o+=4),e.samples=[],r>o){let r;for(let n=0;n<a;n++)r={},256&s&&(r.duration=mb(t,o),o+=4),512&s&&(r.size=mb(t,o),o+=4),1024&s&&(r.flags=mb(t,o),o+=4),2048&s&&(r.cts=i?-(1+~mb(t,o+4)):mb(t,o),o+=4),e.samples.push(r)}}))}static tfdt(e){return kb(e,!0,((e,t)=>{1===e.version?e.baseMediaDecodeTime=gb(t):e.baseMediaDecodeTime=mb(t)}))}static probe(e){return!!Rb.findBox(e,["ftyp"])}static parseSampleFlags(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}}static moovToTrack(e,t,i){var s,r;const a=e.trak;if(!a||!a.length)return;const o=a.find((e=>{var t,i;return"vide"===(null===(t=e.mdia)||void 0===t||null===(i=t.hdlr)||void 0===i?void 0:i.handlerType)})),n=a.find((e=>{var t,i;return"soun"===(null===(t=e.mdia)||void 0===t||null===(i=t.hdlr)||void 0===i?void 0:i.handlerType)}));if(o&&t){var l,d,h,c,u,p,f;const i=t,s=null===(l=o.tkhd)||void 0===l?void 0:l.trackId;null!=s&&(i.id=o.tkhd.trackId),i.tkhdDuration=o.tkhd.duration,i.mvhdDurtion=e.mvhd.duration,i.mvhdTimecale=e.mvhd.timescale,i.timescale=i.formatTimescale=o.mdia.mdhd.timescale,i.duration=o.mdia.mdhd.duration||i.mvhdDurtion/i.mvhdTimecale*i.timescale;const r=o.mdia.minf.stbl.stsd.entries[0];if(i.width=r.width,i.height=r.height,r.pasp&&(i.sarRatio=[r.pasp.hSpacing,r.pasp.vSpacing]),r.hvcC)i.codecType=_b,i.codec=r.hvcC.codec,i.vps=r.hvcC.vps,i.sps=r.hvcC.sps,i.pps=r.hvcC.pps,i.hvcC=r.hvcC.data;else{if(!r.avcC)throw new Error("unknown video stsd entry");i.codecType=vb,i.codec=r.avcC.codec,i.sps=r.avcC.sps,i.pps=r.avcC.pps}var m,g,y,A,b,v,_,S;if(i.present=!0,i.ext={},i.ext.stss=null===(d=o.mdia)||void 0===d||null===(h=d.minf)||void 0===h||null===(c=h.stbl)||void 0===c?void 0:c.stss,i.ext.ctts=null===(u=o.mdia)||void 0===u||null===(p=u.minf)||void 0===p||null===(f=p.stbl)||void 0===f?void 0:f.ctts,r&&"encv"===r.type)i.isVideoEncryption=!0,r.default_KID=null===(m=r.sinf)||void 0===m||null===(g=m.schi)||void 0===g?void 0:g.tenc.default_KID,r.default_IsEncrypted=null===(y=r.sinf)||void 0===y||null===(A=y.schi)||void 0===A?void 0:A.tenc.default_IsEncrypted,r.default_IV_size=null===(b=r.sinf)||void 0===b||null===(v=b.schi)||void 0===v?void 0:v.tenc.default_IV_size,i.videoSenc=o.mdia.minf.stbl.senc&&o.mdia.minf.stbl.senc.samples,r.data_format=null===(_=r.sinf)||void 0===_||null===(S=_.frma)||void 0===S?void 0:S.data_format,i.useEME=e.useEME,i.kidValue=e.kidValue,i.pssh=e.pssh,i.encv=r}if(n&&i){var w,E,T,k,C,x,R,D,L;const t=i,a=null===(w=n.tkhd)||void 0===w?void 0:w.trackId;null!=a&&(t.id=n.tkhd.trackId),t.tkhdDuration=n.tkhd.duration,t.mvhdDurtion=e.mvhd.duration,t.mvhdTimecale=e.mvhd.timescale,t.timescale=t.formatTimescale=n.mdia.mdhd.timescale,t.duration=n.mdia.mdhd.duration||t.mvhdDurtion/t.mvhdTimecale*t.timescale;const o=n.mdia.minf.stbl.stsd.entries[0];switch(t.sampleSize=o.sampleSize,t.sampleRate=o.sampleRate,t.channelCount=o.channelCount,t.present=!0,o.type){case"alaw":t.codecType=t.codec=Ab,t.sampleRate=8e3;break;case"ulaw":t.codecType=t.codec=bb,t.sampleRate=8e3;break;default:t.codecType=yb,t.sampleDuration=Sb.getFrameDuration(t.sampleRate,t.timescale),t.sampleRateIndex=Sb.getRateIndexByRate(t.sampleRate),t.objectType=(null===(s=o.esds)||void 0===s?void 0:s.objectType)||2,o.esds&&(t.config=Array.from(o.esds.config)),t.codec=(null===(r=o.esds)||void 0===r?void 0:r.codec)||"mp4a.40.2"}var P,B,I,M,U,F,O,N;if(t.sampleDuration=Sb.getFrameDuration(t.sampleRate,t.timescale),t.objectType=(null===(E=o.esds)||void 0===E?void 0:E.objectType)||2,o.esds&&(o.esds.config?t.config=Array.from(o.esds.config):console.warn("esds config is null")),t.codec=(null===(T=o.esds)||void 0===T?void 0:T.codec)||"mp4a.40.2",t.sampleRateIndex=Sb.getRateIndexByRate(t.sampleRate),t.ext={},t.ext.stss=null===(k=n.mdia)||void 0===k||null===(C=k.minf)||void 0===C||null===(x=C.stbl)||void 0===x?void 0:x.stss,t.ext.ctts=null===(R=n.mdia)||void 0===R||null===(D=R.minf)||void 0===D||null===(L=D.stbl)||void 0===L?void 0:L.ctts,t.present=!0,o&&"enca"===o.type)t.isAudioEncryption=!0,o.data_format=null===(P=o.sinf)||void 0===P||null===(B=P.frma)||void 0===B?void 0:B.data_format,o.default_KID=null===(I=o.sinf)||void 0===I||null===(M=I.schi)||void 0===M?void 0:M.tenc.default_KID,o.default_IsEncrypted=null===(U=o.sinf)||void 0===U||null===(F=U.schi)||void 0===F?void 0:F.tenc.default_IsEncrypted,o.default_IV_size=null===(O=o.sinf)||void 0===O||null===(N=O.schi)||void 0===N?void 0:N.tenc.default_IV_size,t.audioSenc=n.mdia.minf.stbl.senc&&n.mdia.minf.stbl.senc.samples,t.useEME=e.useEME,t.kidValue=e.kidValue,t.enca=o}if(i&&(i.isVideoEncryption=!!t&&t.isVideoEncryption),t&&(t.isAudioEncryption=!!i&&i.isAudioEncryption),null!=t&&t.encv||null!=i&&i.enca){var j,z;const e=null==t||null===(j=t.encv)||void 0===j?void 0:j.default_KID,s=null==i||null===(z=i.enca)||void 0===z?void 0:z.default_KID,r=e||s?(e||s).join(""):null;t&&(t.kid=r),i&&(i.kid=r)}return t&&(t.flags=3841),i&&(i.flags=1793),{videoTrack:t,audioTrack:i}}static evaluateDefaultDuration(e,t,i){var s;const r=null==t||null===(s=t.samples)||void 0===s?void 0:s.length;if(!r)return 1024;return 1024*r/t.timescale*e.timescale/i}static moofToSamples(e,t,i){const s={};return e.mfhd&&(t&&(t.sequenceNumber=e.mfhd.sequenceNumber),i&&(i.sequenceNumber=e.mfhd.sequenceNumber)),e.traf.forEach((e=>{let{tfhd:r,tfdt:a,trun:o}=e;if(!r||!o)return;a&&(t&&t.id===r.trackId&&(t.baseMediaDecodeTime=a.baseMediaDecodeTime),i&&i.id===r.trackId&&(i.baseMediaDecodeTime=a.baseMediaDecodeTime));const n=r.defaultSampleSize||0,l=r.defaultSampleDuration||Rb.evaluateDefaultDuration(t,i,o.samples.length||o.sampleCount);let d=o.dataOffset||0,h=0,c=-1;if(!o.samples.length&&o.sampleCount){s[r.trackId]=[];for(let e=0;e<o.sampleCount;e++)s[r.trackId].push({offset:d,dts:h,duration:l,size:n}),h+=l,d+=n}else s[r.trackId]=o.samples.map(((e,t)=>((e={offset:d,dts:h,pts:h+(e.cts||0),duration:e.duration||l,size:e.size||n,gopId:c,keyframe:0===t||null!==e.flags&&void 0!==e.flags&&(65536&e.flags)>>>0!=65536}).keyframe&&(c++,e.gopId=c),h+=e.duration,d+=e.size,e)))})),s}static moovToSamples(e){const t=e.trak;if(!t||!t.length)return;const i=t.find((e=>{var t,i;return"vide"===(null===(t=e.mdia)||void 0===t||null===(i=t.hdlr)||void 0===i?void 0:i.handlerType)})),s=t.find((e=>{var t,i;return"soun"===(null===(t=e.mdia)||void 0===t||null===(i=t.hdlr)||void 0===i?void 0:i.handlerType)}));if(!i&&!s)return;let r,a;if(i){var o,n;const e=null===(o=i.mdia)||void 0===o||null===(n=o.minf)||void 0===n?void 0:n.stbl;if(!e)return;const{stts:t,stsc:s,stsz:a,stco:l,stss:d,ctts:h}=e;if(!(t&&s&&a&&l&&d))return;r=wb(t,s,a,l,h,d)}if(s){var l,d,h;const e=null===(l=s.mdia)||void 0===l||null===(d=l.minf)||void 0===d?void 0:d.stbl;if(!e)return;const t=null===(h=s.mdia.mdhd)||void 0===h?void 0:h.timescale,{stts:i,stsc:r,stsz:o,stco:n}=e;if(!(t&&i&&r&&o&&n))return;a=wb(i,r,o,n)}return{videoSamples:r,audioSamples:a}}}class Db extends Dd{constructor(e){super(e),this.player=e,this.TAG_NAME="HlsFmp4Loader",this.tempSampleListInfo={},this.isInitVideo=!1,this.isInitAudio=!1,this.videoTrack={id:1,samples:[],sps:[],pps:[],vps:[],codec:""},this.audioTrack={id:2,samples:[],sampleRate:0,channelCount:0,codec:"",codecType:""},this.workerClearTimeout=null,this.workerUrl=null,this.loopWorker=null,this._hasCalcFps=!1,this._basefps=25,this.player.isUseMSE()||this._initLoopWorker(),e.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.workerUrl&&(URL.revokeObjectURL(this.workerUrl),this.workerUrl=null),this.workerClearTimeout&&(clearTimeout(this.workerClearTimeout),this.workerClearTimeout=null),this.loopWorker&&(this.loopWorker.postMessage({cmd:"destroy"}),this.loopWorker.terminate(),this.loopWorker=null),this._hasCalcFps=!1,this.videoTrack=null,this.audioTrack=null,this.isInitVideo=!1,this.isInitAudio=!1,this._basefps=25,this.player.debug.log(this.TAG_NAME,"destroy")}demux(e,t){let i=this.audioTrack,s=this.videoTrack;if(this.checkInitAudio(),this.checkInitVideo(),i.samples=[],s.samples=[],t){if(this.player.updateStats({abps:t.byteLength}),po(this.isInitAudio)){const e=Rb.findBox(t,["moov"])[0];if(!e)return void this.player.debug.error(this.TAG_NAME,"cannot found moov box");Rb.moovToTrack(Rb.moov(e),null,i),this.checkInitAudio()&&(this.player.debug.log(this.TAG_NAME,"audioData audio init success"),this._sendAccADTSHeader(i))}const e=Rb.findBox(t,["moof"])[0];if(e){const s=Rb.moofToSamples(Rb.moof(e),null,i)[i.id],r=i.baseMediaDecodeTime;if(s){const a=e.start;s.map((e=>{e.offset+=a;const s=t.subarray(e.offset,e.offset+e.size),o=e.dts+r,n=new Uint8Array(s.length+2);n.set([175,1],0),n.set(s,2),i.samples.push({type:Ne,pts:o,dts:o,payload:n,duration:e.duration,size:n.byteLength})}))}}}if(e){if(this.player.updateStats({vbps:e.byteLength}),po(this.isInitVideo)&&po(this.isInitAudio)){const t=Rb.findBox(e,["moov"])[0];if(!t)throw new Error("cannot found moov box");if(Rb.moovToTrack(Rb.moov(t),s,i),po(this.isInitAudio)&&this.checkInitAudio()&&(this.player.debug.log(this.TAG_NAME,"videoData audio init success",i),this._sendAccADTSHeader(i)),this.checkInitVideo()){this.player.debug.log(this.TAG_NAME,"video init success");let e=null;s.codecType===as?s.sps.length&&s.vps.length&&s.pps.length&&(e=Nn({sps:s.sps[0],pps:s.pps[0],vps:s.vps[0]})):s.sps.length&&s.pps.length&&(e=Tn({sps:s.sps[0],pps:s.pps[0]})),e&&(this.player.debug.log(this.TAG_NAME,"seqHeader"),this._doDecodeByHls(e,je,0,!0,0))}}const t=Rb.findBox(e,["moof"])[0];if(t){const r=Rb.moofToSamples(Rb.moof(t),s,i),a=s.baseMediaDecodeTime,o=i.baseMediaDecodeTime,n=t.start;Object.keys(r).forEach((t=>{s.id==t?r[t].map((t=>{t.offset+=n;const i={type:je,pts:(t.pts||t.dts)+a,dts:t.dts+a,units:[],payload:null,isIFrame:!1};i.duration=t.duration,i.gopId=t.gopId,t.keyframe&&(i.isIFrame=!0);const r=e.subarray(t.offset,t.offset+t.size);i.payload=r,s.samples.push(i)})):i.id==t&&r[t].map((t=>{t.offset+=n;const s=e.subarray(t.offset,t.offset+t.size),r=t.dts+o,a=new Uint8Array(s.length+2);a.set([175,1],0),a.set(s,2),i.samples.push({type:Ne,pts:r,dts:r,payload:a,duration:t.duration,size:a.byteLength})}))}))}}const r=s.samples.concat(i.samples);r.sort(((e,t)=>e.dts-t.dts)),r.forEach((e=>{const t=new Uint8Array(e.payload);delete e.payload,this.player.isUseMSE()?e.type===je?this._doDecodeVideo({...e,payload:t}):e.type===Ne&&this._doDecodeAudio({...e,payload:t}):this.loopWorker.postMessage({...e,payload:t,cmd:"sample"},[t.buffer])})),po(this._hasCalcFps)&&(this._hasCalcFps=!0,this._calcDecodeFps(r))}checkInitAudio(){return this.isInitAudio=!!(this.audioTrack.sampleRate&&this.audioTrack.channelCount&&this.audioTrack.codec&&"aac"===this.audioTrack.codecType),this.isInitAudio}checkInitVideo(){return this.isInitVideo=!!(this.videoTrack.pps.length&&this.videoTrack.sps.length&&this.videoTrack.codec),this.isInitVideo}_sendAccADTSHeader(e){const t=jr({profile:e.objectType,sampleRate:e.sampleRateIndex,channel:e.channelCount});this._doDecodeByHls(t,Ne,0,!0,0)}_calcDecodeFps(e){const t=ro(e.map((e=>({ts:e.dts||e.pts,type:e.type}))),je);t&&(this.player.debug.log(this.TAG_NAME,`_calcDecodeFps() video fps is ${t}, update base fps is ${this._basefps}`),this._basefps=t),this._postMessageToLoopWorker("updateBaseFps",{baseFps:this._basefps})}_initLoopWorker(){this.player.debug.log(this.TAG_NAME,"_initLoopWorker()");const e=Ao(function(){const e=1,t=2;let i=new class{constructor(){this.baseFps=0,this.fpsInterval=null,this.preLoopTimestamp=null,this.startBpsTime=null,this.allSampleList=[]}destroy(){this._clearInterval(),this.baseFps=0,this.allSampleList=[],this.preLoopTimestamp=null,this.startBpsTime=null}updateBaseFps(e){this.baseFps=e,this._clearInterval(),this._startInterval()}pushSample(e){delete e.cmd,this.allSampleList.push(e)}_startInterval(){const e=Math.ceil(1e3/this.baseFps);this.fpsInterval=setInterval((()=>{let t=(new Date).getTime();this.preLoopTimestamp||(this.preLoopTimestamp=t),this.startBpsTime||(this.startBpsTime=t);const i=t-this.preLoopTimestamp;if(i>2*e&&console.warn(`JbPro:[HlsFmp4Loader LoopWorker] loop interval is ${i}ms, more than ${e} * 2ms`),this._loop(),this.preLoopTimestamp=(new Date).getTime(),this.startBpsTime){t-this.startBpsTime>=1e3&&(this._calcSampleList(),this.startBpsTime=t)}}),e)}_clearInterval(){this.fpsInterval&&(clearInterval(this.fpsInterval),this.fpsInterval=null)}_calcSampleList(){const i={buferredDuration:0,allListLength:this.allSampleList.length,audioListLength:0,videoListLength:0};this.allSampleList.forEach((s=>{s.type===t?(i.videoListLength++,s.duration&&(i.buferredDuration+=s.duration)):s.type===e&&i.audioListLength++})),postMessage({cmd:"sampleListInfo",...i})}_loop(){let i=null;if(this.allSampleList.length)if(i=this.allSampleList.shift(),i.type===t){postMessage({cmd:"decodeVideo",...i},[i.payload.buffer]);let t=this.allSampleList[0];for(;t&&t.type===e;)i=this.allSampleList.shift(),postMessage({cmd:"decodeAudio",...i},[i.payload.buffer]),t=this.allSampleList[0]}else i.type===e&&(postMessage({cmd:"decodeAudio",...i},[i.payload.buffer]),this.allSampleList.length&&this.allSampleList[0].type===t&&(i=this.allSampleList.shift(),postMessage({cmd:"decodeVideo",...i},[i.payload.buffer])))}};self.onmessage=e=>{const t=e.data;switch(t.cmd){case"updateBaseFps":i.updateBaseFps(t.baseFps);break;case"sample":i.pushSample(t);break;case"destroy":i.destroy(),i=null}}}.toString()),t=new Blob([e],{type:"text/javascript"}),i=URL.createObjectURL(t);let s=new Worker(i);this.workerUrl=i,this.workerClearTimeout=setTimeout((()=>{window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null,this.workerClearTimeout=null}),te),s.onmessage=e=>{const t=e.data;switch(t.cmd){case"decodeVideo":this._doDecodeVideo(t);break;case"decodeAudio":this._doDecodeAudio(t);break;case"sampleListInfo":this.tempSampleListInfo=t}},this.loopWorker=s}_postMessageToLoopWorker(e,t){this.player.isUseMSE()||(this.loopWorker?this.loopWorker.postMessage({cmd:e,...t}):this.player.debug.warn(this.TAG_NAME,"loop worker is not init, can not post message"))}_doDecodeAudio(e){const t=new Uint8Array(e.payload);this._doDecodeByHls(t,Ne,e.dts,!1,0)}_doDecodeVideo(e){const t=new Uint8Array(e.payload);let i=null;i=e.isHevc?jn(t,e.isIFrame):kn(t,e.isIFrame),this.player.updateStats({dts:e.dts});const s=e.pts-e.dts;this._doDecodeByHls(i,je,e.dts,e.isIFrame,s)}getBuferredDuration(){return this.tempSampleListInfo.buferredDuration||0}getSampleListLength(){return this.tempSampleListInfo.allListLength||0}getSampleAudioListLength(){return this.tempSampleListInfo.audioListLength||0}getSampleVideoListLength(){return this.tempSampleListInfo.videoListLength||0}}class Lb{constructor(e,t){this.hls=e,this.player=this.hls.player,this.isMP4=t,this._initSegmentId="",this.TAG_NAME="HlsTransmuxer",this._demuxer=t?new Db(this.hls.player):new pb(this.hls.player),this.player.debug.log(this.TAG_NAME,`init and isMP4 is ${t}`)}destroy(){this._demuxer&&(this._demuxer.destroy(),this._demuxer=null)}transmux(e,t,i,s,r,a){this.player.debug.log(this.TAG_NAME,`transmux videoChunk:${e&&e.byteLength}, audioChunk:${t&&t.byteLength}, discontinuity:${i}, contiguous:${s}, startTime:${r}, needInit:${a}`);const o=this._demuxer;try{this.isMP4?o.demux(e,t):o.demuxAndFix(Yd(e,t),i,s,r)}catch(e){throw new jA(NA,OA,e)}}}class Pb{constructor(e){this.hls=e,this.player=e.player,this._decryptor=new ub(this.hls,this.player),this._transmuxer=null,this._mse=null,this._softVideo=null,this._sourceCreated=!1,this._needInitSegment=!0,this._directAppend=!1,this.TAG_NAME="HlsBufferService"}async destroy(){this._softVideo=null,this._transmuxer&&(this._transmuxer.destroy(),this._transmuxer=null)}get baseDts(){var e,t;return null===(e=this._transmuxer)||void 0===e||null===(t=e._demuxer)||void 0===t?void 0:t._baseDts}get nbSb(){return 0}async updateDuration(e){this.player.debug.log(this.TAG_NAME,"updateDuration()",e)}getBuferredDuration(){var e,t;return null===(e=this._transmuxer)||void 0===e||null===(t=e._demuxer)||void 0===t?void 0:t.getBuferredDuration()}getBufferedSegments(){var e,t;return null===(e=this._transmuxer)||void 0===e||null===(t=e._demuxer)||void 0===t?void 0:t.getSampleListLength()}getBufferedAudioSegments(){var e,t;return null===(e=this._transmuxer)||void 0===e||null===(t=e._demuxer)||void 0===t?void 0:t.getSampleAudioListLength()}getBufferedVideoSegments(){var e,t;return null===(e=this._transmuxer)||void 0===e||null===(t=e._demuxer)||void 0===t?void 0:t.getSampleVideoListLength()}createSource(e,t,i,s){if(this._sourceCreated)return;const r=e||t;r&&(pb.probe(r)?this._transmuxer||(this._transmuxer=new Lb(this.hls,!1)):Rb.probe(r)?this._transmuxer||(this._transmuxer=new Lb(this.hls,!0)):this.player.debug.error(this.TAG_NAME,"createSource error: chunk is not ts"))}async appendBuffer(e,t,i,s,r,a,o){if(null!=i&&i.length||null!=s&&s.length)return this._needInitSegment,this._transmuxer.transmux(i,s,r,a,o,this._needInitSegment||r),!0}async clearAllBuffer(){this.player.debug.log(this.TAG_NAME,"clearAllBuffer")}decryptBuffer(e,t){return this._decryptor.decrypt(e,t)}async reset(){this._transmuxer=null,this._needInitSegment=!0,this._directAppend=!1}async endOfStream(){this._softVideo&&this._softVideo.endOfStream()}async setLiveSeekableRange(e,t){}seamlessSwitch(){this._needInitSegment=!0}}class Bb{constructor(e){this.emitter=e,this._seiSet=new Set,e.on(Zs,(e=>{e&&this._seiSet.add(e)}))}throw(e){if(null==e||!this._seiSet.size)return;const t=e-.2,i=e+.2,s=[];this._seiSet.forEach((e=>{e.time>=t&&e.time<=i&&s.push(e)})),s.forEach((e=>{this._seiSet.delete(e),this.emitter.emit(er,e)}))}reset(){this._seiSet.clear()}}class Ib{constructor(e){this._timescale=e,this.encodeType="",this.audioCodec="",this.videoCodec="",this.domain="",this.fps=0,this.bitrate=0,this.width=0,this.height=0,this.samplerate=0,this.channelCount=0,this.gop=0,this._bitsAccumulateSize=0,this._bitsAccumulateDuration=0}getStats(){return{encodeType:this.encodeType,audioCodec:this.audioCodec,videoCodec:this.videoCodec,domain:this.domain,fps:this.fps,bitrate:this.bitrate,width:this.width,height:this.height,samplerate:this.samplerate,channelCount:this.channelCount,gop:this.gop}}setEncodeType(e){this.encodeType=e}setFpsFromScriptData(e){var t;let{data:i}=e;const s=null==i||null===(t=i.onMetaData)||void 0===t?void 0:t.framerate;s&&s>0&&s<100&&(this.fps=s)}setVideoMeta(e){if(this.width=e.width,this.height=e.height,this.videoCodec=e.codec,this.encodeType=e.codecType,e.fpsNum&&e.fpsDen){const t=e.fpsNum/e.fpsDen;t>0&&t<100&&(this.fps=t)}}setAudioMeta(e){this.audioCodec=e.codec,this.samplerate=e.sampleRate,this.channelCount=e.channelCount}setDomain(e){this.domain=e.split("/").slice(2,3)[0]}updateBitrate(e){if((!this.fps||this.fps>=100)&&e.length){const t=e.reduce(((e,t)=>e+t.duration),0)/e.length;this.fps=Math.round(this._timescale/t)}e.forEach((e=>{1===e.gopId&&this.gop++,this._bitsAccumulateDuration+=e.duration/(this._timescale/1e3),this._bitsAccumulateSize+=e.units.reduce(((e,t)=>e+t.length),0),this._bitsAccumulateDuration>=1e3&&(this.bitrate=8*this._bitsAccumulateSize,this._bitsAccumulateDuration=0,this._bitsAccumulateSize=0)}))}}class Mb{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;zd(this,"_core",null),zd(this,"_samples",[]),this._core=e,this._timescale=t,this._stats=new Ib(t),this._bindEvents()}getStats(){var e,t,i,s,r,a,o;const{currentTime:n=0,decodeFps:l=0}=(null===(e=this._core)||void 0===e?void 0:e.media)||{};return{...this._stats.getStats(),downloadSpeed:(null===(t=this._core)||void 0===t||null===(i=t.speedInfo)||void 0===i?void 0:i.call(t).speed)||0,avgSpeed:(null===(s=this._core)||void 0===s||null===(r=s.speedInfo)||void 0===r?void 0:r.call(s).avgSpeed)||0,currentTime:n,bufferEnd:(null===(a=this._core)||void 0===a||null===(o=a.bufferInfo())||void 0===o?void 0:o.remaining)||0,decodeFps:l}}_bindEvents(){this._core.on(Vs,(e=>this._stats.updateBitrate(e.samples))),this._core.on($s,(e=>{this._stats.setFpsFromScriptData(e)})),this._core.on(Ws,(e=>{"video"===e.type?this._stats.setVideoMeta(e.track):this._stats.setAudioMeta(e.track)})),this._core.on(Js,(e=>{this._stats.setDomain(e.responseUrl)}))}reset(){this._samples=[],this._stats=new Ib(this._timescale)}}class Ub extends So{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),zd(this,"_loadSegment",(async()=>{if(this._segmentProcessing)return void this.player.debug.warn("_loadSegment()","_segmentProcessing is ture and return");if(!this._playlist)return void this.player.debug.warn("_loadSegment()","this._playlist is null and return");const e=this._playlist.currentSegment,t=this._playlist.nextSegment;if(this.player.debug.log(this.TAG_NAME,"_loadSegment()","curSeg",e&&e.url,"nextSeg",t&&t.url),t)return this._loadSegmentDirect();this.player.debug.log(this.TAG_NAME,"nextSeg is null and return")})),this.player=e,this.config=null,this._manifestLoader=null,this._segmentLoader=null,this._playlist=null,this._bufferService=null,this._seiService=null,this._stats=null,this._prevSegSn=null,this._prevSegCc=null,this._tickTimer=null,this._tickInterval=500,this._segmentProcessing=!1,this._reloadOnPlay=!1,this._switchUrlOpts=null,this._disconnectTimer=null,this.TAG_NAME="Hls256",this.canVideoPlay=!1,this.$videoElement=null,this.config=t=function(e){return{isLive:!0,maxPlaylistSize:50,retryCount:3,retryDelay:1e3,pollRetryCount:2,loadTimeout:1e4,preloadTime:30,softDecode:!1,bufferBehind:10,maxJumpDistance:3,startTime:0,targetLatency:10,maxLatency:20,allowedStreamTrackChange:!0,...e}}(t),this._manifestLoader=new nb(this),this._segmentLoader=new db(this),this._playlist=new cb(this),this._bufferService=new Pb(this),this._seiService=new Bb(this),this._stats=new Mb(this,9e4),this.player.debug.log(this.TAG_NAME,"init")}async destroy(){this.player.debug.log(this.TAG_NAME,"destroy()"),this._playlist.reset(),this._segmentLoader.reset(),this._seiService.reset(),await Promise.all([this._clear(),this._bufferService.destroy()]),this._manifestLoader&&(await this._manifestLoader.destroy(),this._manifestLoader=null),this._segmentLoader&&(this._segmentLoader.destroy(),this._segmentLoader=null),this._playlist&&(this._playlist.destroy(),this._playlist=null),this.player.debug.log(this.TAG_NAME,"destroy end")}_startTick(){this._stopTick(),this._tickTimer=setTimeout((()=>{this._tick()}),this._tickInterval)}_stopTick(){this._tickTimer&&clearTimeout(this._tickTimer),this._tickTimer=null}_tick(){this.player.isDestroyedOrClosed()?this.player.debug.log(this.TAG_NAME,"_tick() player is destroyed"):(this._startTick(),this._loadSegment())}get isLive(){return this._playlist.isLive}get streams(){return this._playlist.streams}get currentStream(){return this._playlist.currentStream}get hasSubtitle(){return this._playlist.hasSubtitle}get baseDts(){var e;return null===(e=this._bufferService)||void 0===e?void 0:e.baseDts}speedInfo(){return this._segmentLoader.speedInfo()}resetBandwidth(){this._segmentLoader.resetBandwidth()}getStats(){return this._stats.getStats()}async loadSource(e){return await this._reset(),await this._loadData(e),this._startTick(),!0}async _loadData(e){try{e&&(e=e.trim())}catch(e){}if(!e)throw this._emitError(new jA(UA,UA,null,null,"m3u8 url is missing"));const t=await this._loadM3U8(e),{currentStream:i}=this._playlist;if(this._urlSwitching){var s,r;if(0===i.bitrate&&null!==(s=this._switchUrlOpts)&&void 0!==s&&s.bitrate)i.bitrate=null===(r=this._switchUrlOpts)||void 0===r?void 0:r.bitrate;const e=this._getSeamlessSwitchPoint();this.config.startTime=e;const t=this._playlist.findSegmentIndexByTime(e),a=this._playlist.getSegmentByIndex(t+1);if(a){const e=a.start;this.player.debug.warn(this.TAG_NAME,`clear buffer from ${e}`)}}t&&(this.isLive?(this.player.debug.log(this.TAG_NAME,"is live"),this._bufferService.setLiveSeekableRange(0,4294967295),this.config.targetLatency<this._playlist.totalDuration&&(this.config.targetLatency=this._playlist.totalDuration,this.config.maxLatency=1.5*this.config.targetLatency),t.isMaster||this._pollM3U8(e)):(this.player.debug.log(this.TAG_NAME,`is vod and totalDuration is ${i.totalDuration} s`),await this._bufferService.updateDuration(i.totalDuration))),await this._loadSegment()}async _loadM3U8(e){let t;try{[t]=await this._manifestLoader.load(e)}catch(e){throw this._emitError(jA.create(e))}if(t){var i;if(this._playlist.upsertPlaylist(t),t.isMaster)null!==(i=this._playlist.currentStream.subtitleStreams)&&void 0!==i&&i.length&&this.emit(sr,{list:this._playlist.currentStream.subtitleStreams}),await this._refreshM3U8();else this.player.debug.warn(this.TAG_NAME,"_loadM3U8() is not master playlist");return this.emit(rr),t}this.player.debug.warn(this.TAG_NAME,"_loadM3U8() playlist is empty")}_refreshM3U8(){var e,t;this.player.debug.log(this.TAG_NAME,"_refreshM3U8()");const i=this._playlist.currentStream;if(!i||!i.url)throw this._emitError(jA.create(null,null,new Error("m3u8 url is not defined")));const s=i.url,r=null===(e=i.currentAudioStream)||void 0===e?void 0:e.url,a=null===(t=i.currentSubtitleStream)||void 0===t?void 0:t.url;return this._manifestLoader.load(s,r,a).then((e=>{let[t,i,o]=e;t?(this._playlist.upsertPlaylist(t,i,o),this.isLive&&this._pollM3U8(s,r,a)):this.player.debug.warn(this.TAG_NAME,"_refreshM3U8() mediaPlaylist is empty")})).catch((e=>{throw this._emitError(jA.create(e))}))}_pollM3U8(e,t,i){var s;let r=this._playlist.isEmpty;this._manifestLoader.poll(e,t,i,((e,t,i)=>{this._playlist.upsertPlaylist(e,t,i),this._playlist.clearOldSegment(),e&&r&&!this._playlist.isEmpty&&this._loadSegment(),r&&(r=this._playlist.isEmpty)}),(e=>{this._emitError(jA.create(e))}),1e3*((null===(s=this._playlist.lastSegment)||void 0===s?void 0:s.duration)||0))}async _loadSegmentDirect(){const e=this._playlist.nextSegment;if(!e)return void this.player.debug.log(this.TAG_NAME,"_loadSegmentDirect() !seg");let t=!1,i=null;try{this._segmentProcessing=!0,t=await this._reqAndBufferSegment(e,this._playlist.getAudioSegment(e))}catch(e){i=e}finally{this._segmentProcessing=!1}return i?this._emitError(jA.create(i)):(t?(this._urlSwitching&&(this._urlSwitching=!1,this.emit(ir,{url:this.config.url})),this._playlist.moveSegmentPointer(),this.player.debug.log(this.TAG_NAME,"_loadSegmentDirect()","seg.isLast",e.isLast),e.isLast?(this.player.debug.log(this.TAG_NAME,"_loadSegmentDirect()","seg.isLast"),this._end()):(this.player.debug.log(this.TAG_NAME,"_loadSegmentDirect()","and next _loadSegment()"),this._loadSegment())):this.player.debug.log(this.TAG_NAME,"_loadSegmentDirect() not appended"),t)}async _reqAndBufferSegment(e,t){this.player.debug.log(this.TAG_NAME,"video seg",e&&e.url,"audio seg",t&&t.url);const i=e?e.cc:t.cc,s=this._prevSegCc!==i;let r=[];try{r=await this._segmentLoader.load(e,t,s)}catch(e){throw e.fatal=!1,this._segmentLoader.error=e,e}if(!r[0])return;const a=await this._bufferService.decryptBuffer(...r);if(!a)return void this.player.debug.log(this.TAG_NAME,"decryptBuffer return null");const o=e?e.sn:t.sn,n=e?e.start:t.start,l=this._playlist.currentStream;return this._bufferService.createSource(a[0],a[1],null==l?void 0:l.videoCodec,null==l?void 0:l.audioCodec),await this._bufferService.appendBuffer(e,t,a[0],a[1],s,this._prevSegSn===o-1,n),this._prevSegCc=i,this._prevSegSn=o,!0}async _clear(){this.player.debug.log(this.TAG_NAME,"_clear()"),clearTimeout(this._disconnectTimer),this._stopTick(),await Promise.all([this._segmentLoader.cancel(),this._manifestLoader.stopPoll()]),this._segmentProcessing=!1}async _reset(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.player.debug.log(this.TAG_NAME,"_reset()"),this._reloadOnPlay=!1,this._prevSegSn=null,this._prevSegCc=null,this._switchUrlOpts=null,this._playlist.reset(),this._segmentLoader.reset(),this._seiService.reset(),this._stats.reset(),await this._clear(),this._bufferService.reset(e)}_end(){this.player.debug.log(this.TAG_NAME,"_end()"),this._clear()}_emitError(e){var t;let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var s;!1===(null===(t=e.originError)||void 0===t?void 0:t.fatal)?console.warn(e):(console.table(e),console.error(e),console.error(null===(s=this.media)||void 0===s?void 0:s.error),this._stopTick(),this._urlSwitching&&(this._urlSwitching=!1,this.emit(tr,e)),i&&this._end(),this._seiService.reset(),this.emit(ar,e));return e}_getSeamlessSwitchPoint(){const{media:e}=this;let t=e.currentTime;if(!e.paused){var i;const s=this._playlist.findSegmentIndexByTime(e.currentTime),r=this._playlist.getSegmentByIndex(s),a=null===(i=this._stats)||void 0===i?void 0:i.getStats().downloadSpeed;if(a&&r){t+=r.duration*this._playlist.currentStream.bitrate/a+1}else t+=5}return t}getDemuxBuferredDuration(){return this._bufferService.getBuferredDuration()||0}getDemuxBufferedListLength(){return this._bufferService.getBufferedSegments()||0}getDemuxAudioBufferedListLength(){return this._bufferService.getBufferedAudioSegments()||0}getDemuxVideoBufferedListLength(){return this._bufferService.getBufferedVideoSegments()||0}}class Fb extends So{constructor(e){super(),zd(this,"TAG_NAME","Hls256Decoder"),this.player=e,this.$videoElement=this.player.video.$videoElement,this.hls=null,this.eventsDestroy=[],this.bandwidthEstimateInterval=null,this.hls=new Ub(e),this._bindEvents()}async destroy(){return this._stopBandwidthEstimateInterval(),this.hls&&(await this.hls.destroy(),this.hls=null),this.eventsDestroy.length&&(this.eventsDestroy.forEach((e=>e())),this.eventsDestroy=[]),this.$videoElement=null,this.player.debug.log(this.TAG_NAME,"destroy"),!0}_bindEvents(){this.hls.on(ar,(e=>{this.player.emitError(ct.hlsError,e)})),this._startBandwidthEstimateInterval()}_startBandwidthEstimateInterval(){this._stopBandwidthEstimateInterval(),this.bandwidthEstimateInterval=setInterval((()=>{const e=this.hls.speedInfo();this.player.emit(nt.kBps,(e.avgSpeed/1024/8).toFixed(2)),this.hls.resetBandwidth()}),1e3)}_stopBandwidthEstimateInterval(){this.bandwidthEstimateInterval&&(clearInterval(this.bandwidthEstimateInterval),this.bandwidthEstimateInterval=null)}async loadSource(e){return this.url=e,await this.hls.loadSource(e),!0}checkHlsBufferedDelay(){let e=0;return this.hls&&(e=this.hls.getDemuxBuferredDuration()),e}getDemuxBufferedListLength(){let e=0;return this.hls&&(e=this.hls.getDemuxBufferedListLength()),e}getDemuxAudioBufferedListLength(){let e=0;return this.hls&&(e=this.hls.getDemuxAudioBufferedListLength()),e}getDemuxVideoBufferedListLength(){let e=0;return this.hls&&(e=this.hls.getDemuxVideoBufferedListLength()),e}}class Ob extends So{constructor(e){super(),this.player=e,this.TAG_NAME="CommonWebrtc",this.rtcPeerConnection=null,this.videoStream=null,this.isDisconnected=!1,this.isH264=this.player.isWebrtcH264(),this.eventsDestroy=[],this.supportVideoFrameCallbackHandle=null,this.isInitInfo=!1,this.$videoElement=this.player.video.$videoElement,this.bandwidthEstimateInterval=null,this.rtcPeerTrackVideoReceiver=null,this.rtcPeerTrackAudioReceiver=null,this.prevWebrtcVideoStats={},this.prevWebrtcAudioStats={},this.currentWebrtcStats={},this.player._opt.webrtcUseCanvasRender&&this.isH264&&(this.$videoElement=document.createElement("video"),Aa()&&(this.$videoElement.style.position="absolute"),this._initVideoEvents()),this.$videoElement.muted=!0,this._initRtcPeerConnection()}destroy(){this.isDisconnected=!1,this.isInitInfo=!1,this.prevWebrtcVideoStats={},this.currentWebrtcStats={},this.rtcPeerTrackVideoReceiver=null,this.rtcPeerTrackAudioReceiver=null,this._stopBandwidthEstimateInterval(),this.supportVideoFrameCallbackHandle&&this.$videoElement&&(this.$videoElement.cancelVideoFrameCallback(this.supportVideoFrameCallbackHandle),this.supportVideoFrameCallbackHandle=null),this.eventsDestroy.length&&(this.eventsDestroy.forEach((e=>e())),this.eventsDestroy=[]),this.isH264&&(this.videoStream&&(this.videoStream.getTracks().forEach((e=>e.stop())),this.videoStream=null),this.$videoElement.srcObject=null),this.rtcPeerConnection&&(this.rtcPeerConnection.onicecandidate=ta,this.rtcPeerConnection.ontrack=ta,this.rtcPeerConnection.onconnectionstatechange=ta,this.rtcPeerConnection.ondatachannel=ta,this.rtcPeerConnection.close(),this.rtcPeerConnection=null)}_initVideoEvents(){const{proxy:e}=this.player.events,t=e(this.$videoElement,es,(()=>{this.player.debug.log(this.TAG_NAME,"video canplay"),this.$videoElement.play().then((()=>{this.player.debug.log(this.TAG_NAME,"video play"),this._startCanvasRender(),this._initRenderSize()})).catch((e=>{this.player.debug.warn(this.TAG_NAME,"video play error ",e)}))})),i=e(this.$videoElement,ts,(()=>{this.player.debug.log("HlsDecoder","video waiting")})),s=e(this.$videoElement,is,(e=>{const t=parseInt(e.timeStamp,10);this.player.handleRender(),this.player.updateStats({ts:t}),this.$videoElement.paused&&(this.player.debug.warn("HlsDecoder","video is paused and next try to replay"),this.$videoElement.play().then((()=>{this.player.debug.log("HlsDecoder","video is paused and replay success")})).catch((e=>{this.player.debug.warn("HlsDecoder","video is paused and replay error ",e)})))})),r=e(this.$videoElement,ss,(()=>{this.player.debug.log("HlsDecoder","video playback Rate change",this.$videoElement&&this.$videoElement.playbackRate)}));this.eventsDestroy.push(t,i,s,r)}_initRtcPeerConnection(){const e=new RTCPeerConnection,t=this.player;e.addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"}),e.onsignalingstatechange=e=>{this.player.debug.log(this.TAG_NAME,"onsignalingstatechange",e)},e.oniceconnectionstatechange=i=>{this.player.debug.log(this.TAG_NAME,"oniceconnectionstatechange",e.iceConnectionState);const s=e.iceConnectionState;switch(this.player.emit(nt.webrtcOnIceConnectionStateChange,s),this.isDisconnected="disconnected"===s,e.iceConnectionState){case"new":case"checking":case"closed":case"connected":case"completed":break;case"failed":t.emit(nt.webrtcFailed);break;case"disconnected":t.emit(nt.webrtcDisconnect);break;case"closed":t.emit(nt.webrtcClosed)}},e.onicecandidate=e=>{this.player.debug.log(this.TAG_NAME,"onicecandidate",e),e.candidate&&this.player.debug.log(this.TAG_NAME,"Remote ICE candidate: ",e.candidate.candidate)},e.ontrack=t=>{if(this.player.debug.log(this.TAG_NAME,"ontrack",t),"video"===t.track.kind){this.player.debug.log(this.TAG_NAME,"ontrack video"),this.rtcPeerTrackVideoReceiver=e.getReceivers().find((function(e){return e.track===t.track})),this.rtcPeerTrackVideoReceiver&&this._startBandwidthEstimateInterval();let i=t.streams[0];this.$videoElement.autoplay=!0,this.$videoElement.srcObject=i,this.videoStream=i}else"audio"===t.track.kind&&(this.player.debug.log(this.TAG_NAME,"ontrack audio"),this.rtcPeerTrackAudioReceiver=e.getReceivers().find((function(e){return e.track===t.track})),this.rtcPeerTrackAudioReceiver&&this._startBandwidthEstimateInterval())},e.onicecandidateerror=e=>{this.player.debug.log(this.TAG_NAME,"onicecandidateerror",e),this.player.emitError(ct.webrtcIceCandidateError,e)},e.onconnectionstatechange=i=>{switch(this.player.debug.log(this.TAG_NAME,"onconnectionstatechange",i),this.player.emit(nt.webrtcOnConnectionStateChange,e.connectionState),e.connectionState){case"new":case"connecting":case"connected":case"disconnected":break;case"failed":this.isDisconnected&&t.emit(nt.webrtcFailed)}},this.rtcPeerConnection=e}_startBandwidthEstimateInterval(){this.player.debug.log(this.TAG_NAME,"_startBandwidthEstimateInterval"),this._stopBandwidthEstimateInterval(),this.bandwidthEstimateInterval=setInterval((()=>{this.rtcPeerTrackVideoReceiver&&this.rtcPeerTrackVideoReceiver.getStats().then((e=>{let t={},i=0;e.forEach((e=>{if(e)switch(e.type){case _r:("succeeded"===e.state||e.bytesReceived)&&(this.currentWebrtcStats.timestamp=e.timestamp,this.currentWebrtcStats.rtt=e.currentRoundTripTime||-1,this.currentWebrtcStats.bytesReceived=e.bytesReceived||0,this.currentWebrtcStats.bytesSent=e.bytesSent||0);break;case Er:this.currentWebrtcStats.remoteCandidate=e||{};break;case wr:this.currentWebrtcStats.localCandidate=e||{};break;case Sr:this.currentWebrtcStats.lastTimeStamp=e.timestamp;const s=((e.timestamp||0)-(this.prevWebrtcVideoStats.timestamp||0))/1e3,r=Number(e.bytesReceived||0)-Number(this.prevWebrtcVideoStats.bytesReceived||0),a=Math.floor(r/s);i+=a,t.vbps=a,this.prevWebrtcVideoStats=e;break;case Tr:e.frameWidth&&e.frameHeight&&(this.currentWebrtcStats.frameWidth=e.frameWidth||0,this.currentWebrtcStats.frameHeight=e.frameHeight||0)}})),this.rtcPeerTrackAudioReceiver?this.rtcPeerTrackAudioReceiver.getStats().then((e=>{e.forEach((e=>{if(e&&e.type===Sr){this.currentWebrtcStats.lastTimeStamp=e.timestamp;const s=((e.timestamp||0)-(this.prevWebrtcAudioStats.timestamp||0))/1e3,r=Number(e.bytesReceived||0)-Number(this.prevWebrtcAudioStats.bytesReceived||0),a=Math.floor(r/s);i+=a,t.abps=a,this.prevWebrtcAudioStats=e}})),this.player.updateStats(t),this.player.emit(nt.kBps,(i/1024).toFixed(2))})):(this.player.updateStats(t),this.player.emit(nt.kBps,(i/1024).toFixed(2)))}))}),1e3)}_stopBandwidthEstimateInterval(){this.player.debug.log(this.TAG_NAME,"_stopBandwidthEstimateInterval"),this.bandwidthEstimateInterval&&(clearInterval(this.bandwidthEstimateInterval),this.bandwidthEstimateInterval=null)}_startCanvasRender(){bo()?this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this)):(this._stopCanvasRender(),this.canvasRenderInterval=setInterval((()=>{this.player.video.render({$video:this.$videoElement,ts:0})}),40))}_stopCanvasRender(){this.canvasRenderInterval&&(clearInterval(this.canvasRenderInterval),this.canvasRenderInterval=null)}videoFrameCallback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.player.isDestroyedOrClosed()?this.player.debug.log(this.TAG_NAME,"videoFrameCallback() player is destroyed"):(this.player.video.render({$video:this.$videoElement,ts:t.mediaTime||0}),this.player.updateStats({dts:t.mediaTime||0}),this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this)))}_initRenderSize(){this.isInitInfo||(this.player.video.updateVideoInfo({width:this.$videoElement.videoWidth,height:this.$videoElement.videoHeight}),this.player.video.initCanvasViewSize(),this.isInitInfo=!0)}getVideoCurrentTime(){let e=0;return this.$videoElement&&(e=this.$videoElement.currentTime),e}}class Nb extends Ob{constructor(e){super(e),this.rtcPeerConnectionDataChannel=null,this.player.isWebrtcH265()&&(this.streamRate=ha((t=>{e.emit(nt.kBps,(t/1024).toFixed(2))}))),this.TAG_NAME="WebrtcForM7SDecoder",this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.stopStreamRateInterval(),this.rtcPeerConnectionDataChannel&&(this.rtcPeerConnectionDataChannel.onopen=ta,this.rtcPeerConnectionDataChannel.onclose=ta,this.rtcPeerConnectionDataChannel.onmessage=ta,this.rtcPeerConnectionDataChannel.close(),this.rtcPeerConnectionDataChannel=null),this.player.debug.log(this.TAG_NAME,"destroy")}_initRtcPeerConnection(){const e=new RTCPeerConnection,t=this.player;e.addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"}),e.onsignalingstatechange=e=>{this.player.debug.log(this.TAG_NAME,"onsignalingstatechange",e)},e.oniceconnectionstatechange=i=>{this.player.debug.log(this.TAG_NAME,"oniceconnectionstatechange",e.iceConnectionState);const s=e.iceConnectionState;switch(this.player.emit(nt.webrtcOnIceConnectionStateChange,s),this.isDisconnected="disconnected"===s,e.iceConnectionState){case"new":case"checking":case"closed":case"connected":case"completed":break;case"failed":t.emit(nt.webrtcFailed);break;case"disconnected":t.emit(nt.webrtcDisconnect);break;case"closed":t.emit(nt.webrtcClosed)}},e.onicecandidate=e=>{this.player.debug.log(this.TAG_NAME,"onicecandidate",e),e.candidate&&this.player.debug.log(this.TAG_NAME,"Remote ICE candidate: ",e.candidate.candidate)},e.ontrack=i=>{this.player.debug.log(this.TAG_NAME,"ontrack",i);const s=t.video.$videoElement;if(t.isWebrtcH264())if("video"===i.track.kind){this.player.debug.log(this.TAG_NAME,"ontrack video"),this.rtcPeerTrackVideoReceiver=e.getReceivers().find((function(e){return e.track===i.track})),this.rtcPeerTrackVideoReceiver&&this._startBandwidthEstimateInterval();let t=i.streams[0];s.autoplay=!0,s.srcObject=t,this.videoStream=t}else"audio"===i.track.kind&&(this.player.debug.log(this.TAG_NAME,"ontrack audio"),this.rtcPeerTrackAudioReceiver=e.getReceivers().find((function(e){return e.track===i.track})),this.rtcPeerTrackAudioReceiver&&this._startBandwidthEstimateInterval())},e.onicecandidateerror=e=>{this.player.debug.log(this.TAG_NAME,"onicecandidateerror",e),this.player.emitError(ct.webrtcIceCandidateError,e)},e.onconnectionstatechange=i=>{switch(t.debug.log(this.TAG_NAME,`sdp connect status ${e.connectionState}`),e.connectionState){case"new":case"connecting":case"connected":case"disconnected":break;case"failed":this.isDisconnected&&t.emit(nt.webrtcFailed)}},e.ondatachannel=e=>{const t=e.channel;this.player.debug.log(this.TAG_NAME,"ondatachannel"),t.onopen=()=>{this.player.debug.log(this.TAG_NAME,"ondatachannel and onopen")},t.onmessage=e=>{const t=e.data;if(this.player.isWebrtcH264())return this.player.debug.warn(this.TAG_NAME,"ondatachannel is H265 but decode is h264 so emit webrtcStreamH265 "),void this.player.emit(nt.webrtcStreamH265);this.player.isDestroyedOrClosed()?this.player.debug.warn(this.TAG_NAME,"ondatachannel and player is destroyed"):(this.streamRate&&this.streamRate(t.byteLength),this.player.demux&&this.player.demux.dispatch(t))},t.onclose=()=>{this.player.debug.warn(this.TAG_NAME,"ondatachannel and onclose")},this.rtcPeerConnectionDataChannel=t};e.createDataChannel("signal").onmessage=e=>{this.player.debug.log(this.TAG_NAME,"signalChannel,onmessage",e);JSON.parse(e.data).type},this.rtcPeerConnection=e}startStreamRateInterval(){this.stopStreamRateInterval(),this.streamRateInterval=setInterval((()=>{this.streamRate&&this.streamRate(0)}),1e3)}stopStreamRateInterval(){this.streamRateInterval&&(clearInterval(this.streamRateInterval),this.streamRateInterval=null)}loadSource(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,s)=>{const r=this.rtcPeerConnection;r.createOffer().then((a=>{r.setLocalDescription(a),this.player.debug.log(this.TAG_NAME,"getWebRtcRemoteSdp loadSource"),function(e,t,i){let s={"Content-Type":"application/sdp"};return i.username&&i.password&&(s.Authorization="Basic "+btoa(i.username+":"+i.password)),fetch(e,{method:"POST",mode:"cors",cache:"no-cache",credentials:"include",redirect:"follow",referrerPolicy:"no-referrer",headers:s,body:t})}(e,a.sdp,t).then((e=>{e.text().then((e=>{this.player.debug.log(this.TAG_NAME,"getWebRtcRemoteSdp response"),e?r.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:e})).then((()=>{this.player.isWebrtcH265()&&this.startStreamRateInterval(),i()})).catch((e=>{s(e)})):s("sdp is null")})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource response.text() error",e),s(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource getWebRtcRemoteSdp response error",e),s(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource rtcPeerConnection.createOffer() error",e),s(e)}))}))}}class jb extends Ob{constructor(e){super(e),this.TAG_NAME="WebrtcForZLMDecoder",this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.player.debug.log(this.TAG_NAME,"destroy")}loadSource(e){return new Promise(((t,i)=>{const s=this.rtcPeerConnection;s.createOffer().then((r=>{s.setLocalDescription(r),this.player.debug.log(this.TAG_NAME,"getWebRtcRemoteSdp loadSource"),function(e,t){return bl({url:e,type:"POST",data:t,contentType:"text/plain;charset=utf-8",processData:!1,dataType:"json"})}(e,r.sdp).then((e=>{this.player.debug.log(this.TAG_NAME,`getWebRtcRemoteSdp response and code is ${e.code}`);const r=e;if(r&&0!==r.code)return i(r.msg);r&&r.sdp?s.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:r.sdp})).then((()=>{t()})).catch((e=>{i(e)})):i("sdp is null")})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource getWebRtcRemoteSdp response error",e),i(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource rtcPeerConnection.createOffer() error",e),i(e)}))}))}}class zb extends So{constructor(e,t){if(super(),this.player=e,this.player.$container.classList.add("jb-pro-container-playback"),this._showPrecision=null,this._startTime=null,this._playStartTime=null,this._playingTimestamp=null,this._fps=parseInt(t.fps,10)||e._opt.playbackFps,this._isUseFpsRender=!!uo(t.isUseFpsRender),this._rate=1,this._audioTimestamp=0,this._videoTimestamp=0,this.controlType=t.controlType||Q.normal,t.controlType&&-1===[Q.normal,Q.simple].indexOf(t.controlType)&&(this.player.debug.warn("Playback","constructor()","controlType is not in [normal,simple]",t.controlType),this.controlType=Q.normal),this._currentLocalTimestamp=0,this._localOneFrameTimestamp=t.localOneFrameTimestamp||40,this._localCalculateTimeInterval=null,this._isUseLocalCalculateTime=!!uo(t.isUseLocalCalculateTime),this._isPlaybackPauseClearCache=!po(t.isPlaybackPauseClearCache),this._isCacheBeforeDecodeForFpsRender=!!uo(t.isCacheBeforeDecodeForFpsRender),this._startfpsTime=null,this._startFpsTimestamp=null,this._checkStatsInterval=null,this._playbackTs=0,this._renderFps=0,this._isUseLocalCalculateTime?this._startLocalCalculateTime():this._listen(),this.playbackList=[],this._playbackListStartTimestamp=null,this._totalDuration=0,t.controlType===Q.normal)this.initPlaybackList(t.playList,t.showPrecision,t.startTime);else if(t.controlType===Q.simple){t.duration&&(this._totalDuration=1e3*t.duration);let e=t.startTime||0;e>this.totalDuration&&(e=this.totalDuration),this.setStartTime(e)}this.player.on(nt.playbackPause,(e=>{e?this.pause():this.resume()}));const i={fps:this._fps,isUseFpsRender:this._isUseFpsRender,localOneFrameTimestamp:this._localOneFrameTimestamp,isUseLocalCalculateTime:this._isUseLocalCalculateTime,uiUsePlaybackPause:t.uiUsePlaybackPause,showControl:t.showControl};e.debug.log("Playback","init",JSON.stringify(i))}destroy(){this._startTime=null,this._showPrecision=null,this._playStartTime=null,this._playingTimestamp=null,this._totalDuration=0,this._audioTimestamp=0,this._videoTimestamp=0,this._fps=null,this._isUseFpsRender=!1,this._rate=1,this.playbackList=[],this._playbackListStartTimestamp=null,this._localCalculateTimeInterval=null,this._currentLocalTimestamp=0,this._startfpsTime=null,this._startFpsTimestamp=null,this._renderFps=0,this._playbackTs=0,this._stopLocalCalculateTime(),this.clearStatsInterval(),this.player.$container&&this.player.$container.classList.remove("jb-pro-container-playback"),this.off(),this.player.debug.log("Playback","destroy")}_listen(){this.player.on(nt.stats,(e=>{const t=e.ts;this._playStartTime||(this._playStartTime=t-1e3);let i=t-this._playStartTime;this.setPlayingTimestamp(i)}))}pause(){this.clearStatsInterval()}resume(){this.startCheckStatsInterval()}updateStats(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._startFpsTimestamp||(this._startFpsTimestamp=aa()),Ba(e.ts)&&(this.player.updateStats({fps:!0,ts:e.ts}),this._playbackTs=e.ts,this._startfpsTime||(this._startfpsTime=e.ts),this._renderFps+=1);const t=aa(),i=t-this._startFpsTimestamp;if(i<1e3)return;let s=null;this._startfpsTime&&(s=this._playbackTs-this._startfpsTime),this.player.emit(nt.playbackStats,{fps:this._renderFps,rate:this.rate,start:this._startfpsTime,end:this._playbackTs,timestamp:i,dataTimestamp:s,audioBufferSize:this.player.audio?this.player.audio.bufferSize:0,videoBufferSize:this.player.video?this.player.video.bufferSize:0,ts:this._playbackTs}),this._renderFps=0,this._startfpsTime=this._playbackTs,this._startFpsTimestamp=t}updateLocalOneFrameTimestamp(e){this._localOneFrameTimestamp=e}_startLocalCalculateTime(){this._stopLocalCalculateTime(),this._localCalculateTimeInterval=setInterval((()=>{const e=this._currentLocalTimestamp;this._playStartTime||(this._playStartTime=e-1e3);let t=e-this._playStartTime;this.setPlayingTimestamp(t)}),1e3)}startCheckStatsInterval(){this.clearStatsInterval(),this._checkStatsInterval=setInterval((()=>{this.updateStats()}),1e3)}_stopLocalCalculateTime(){this._localCalculateTimeInterval&&(clearInterval(this._localCalculateTimeInterval),this._localCalculateTimeInterval=null)}clearStatsInterval(){this._checkStatsInterval&&(clearInterval(this._checkStatsInterval),this._checkStatsInterval=null)}increaseLocalTimestamp(){this._isUseLocalCalculateTime&&(this._currentLocalTimestamp+=this._localOneFrameTimestamp)}initPlaybackList(e,t,i){this.playbackList=e||[];let s=0;if(this.playbackList.forEach(((e,t)=>{10===Ga(e.start)&&(e.startTimestamp=1e3*e.start,e.startTime=ba(e.startTimestamp)),10===Ga(e.end)&&(e.endTimestamp=1e3*e.end,e.endTime=ba(e.endTimestamp)),e.duration=e.end-e.start,s+=e.duration})),this._totalDuration=s,this.player.debug.log("Playback",this.playbackList),this.playbackList.length>0){const e=this.playbackList[0].startTimestamp;this._playbackListStartTimestamp=e;let t=e;i&&(10===Ga(i)&&(i*=1e3),this._isTimeInPlaybackList(i)&&(t=i)),this.setStartTime(t)}const r=t||Si;this.setShowPrecision(r)}get totalDuration(){return(this._totalDuration||0)/1e3}get startTime(){return this._startTime||0}setStartTime(e){this._startTime=e,this._playingTimestamp=e,this._playStartTime=null}setRate(e){this._rate=e,this.player.emit(nt.playbackRateChange,e)}get fps(){return this._fps}get rate(){return this._rate}get isUseFpsRender(){return this._isUseFpsRender}get isUseLocalCalculateTime(){return this._isUseLocalCalculateTime}get showPrecision(){return this._showPrecision}get is60Min(){return this.showPrecision===Si}get is30Min(){return this.showPrecision===wi}get is10Min(){return this.showPrecision===Ei}get is5Min(){return this.showPrecision===Ti}get is1Min(){return this.showPrecision===Ti}get isPlaybackPauseClearCache(){return this._isPlaybackPauseClearCache}get isCacheBeforeDecodeForFpsRender(){return this._isCacheBeforeDecodeForFpsRender}setShowPrecision(e){Ci.includes(e)||(this.player.debug.warn("Playback","setShowPrecision()","type is not in PLAYBACK_CONTROL_TIME_PRECISION_ARRAY",e),e=Si),this._showPrecision&&this._showPrecision===e||(this._showPrecision=e,this.player.emit(nt.playbackPrecision,this._showPrecision,this.playbackList),this.player.emit(nt.playbackShowPrecisionChange,this._showPrecision))}setPlayingTimestamp(e){let t;if(this.controlType===Q.normal){t=this.startTime+e,this._playingTimestamp=t,this.player.emit(nt.playbackTime,t);const i=new Date(t);this.player.emit(nt.playbackTimestamp,{ts:t,hour:i.getHours(),min:i.getMinutes(),second:i.getSeconds()})}else this.controlType===Q.simple&&(t=this.startTime+Math.round(e/1e3),t>this.totalDuration&&(this.player.debug.log("Playback","setPlayingTimestamp()",`timestamp ${t} > this.totalDuration ${this.totalDuration}`),t=this.totalDuration),this._playingTimestamp=t,this.player.emit(nt.playbackTime,t),this.player.emit(nt.playbackTimestamp,{ts:t}))}get playingTimestamp(){return this._playingTimestamp}narrowPrecision(){const e=Ci.indexOf(this.showPrecision)-1;if(e>=0){const t=Ci[e];this.setShowPrecision(t)}}expandPrecision(){const e=Ci.indexOf(this.showPrecision)+1;if(e<=Ci.length-1){const t=Ci[e];this.setShowPrecision(t)}}seek(e){if(this.player.debug.log("Playback","seek()",e),this.controlType===Q.normal){if("true"===e.hasRecord){let t=e.time;"min"===e.type&&(t=60*e.time);let i=function(e){let t={};e>-1&&(t={hour:Math.floor(e/60/60)%60,min:Math.floor(e/60)%60,second:e%60});return t}(t);if(this._playbackListStartTimestamp){const e=new Date(this._playbackListStartTimestamp).setHours(i.hour,i.min,i.second,0);i.timestamp=e;const t=this._findMoreInfoByTimestamp(e);i&&t.more&&(i.more=t.more)}this.player.emit(nt.playbackSeek,i)}}else if(this.controlType===Q.simple){let t=e.time;this.player.emit(nt.playbackSeek,{ts:t})}}currentTimeScroll(){this.player.emit(nt.playbackTimeScroll)}_findMoreInfoByTimestamp(e){let t=null;return this.playbackList.forEach(((i,s)=>{i.startTimestamp<=e&&i.endTimestamp>=e&&(t=i)})),t}_isTimeInPlaybackList(e){let t=!1;return this.playbackList.forEach(((i,s)=>{i.startTimestamp<=e&&i.endTimestamp>=e&&(t=!0)})),t}getControlType(){return this.controlType}isControlTypeNormal(){return this.controlType===Q.normal}isControlTypeSimple(){return this.controlType===Q.simple}}class Gb extends So{constructor(e){super(),this.player=e,this.TAG_NAME="zoom",this.bindEvents=[],this.isDragging=!1,this.currentZoom=1,this.prevVideoElementStyleTransform=null,this.prevVideoElementStyleScale=null,this.maxScale=5,this.tempPosition={x:0,y:0},this.videoPosition={left:0,top:0};const{events:{proxy:t},debug:i}=this.player;this.player.on(nt.zooming,(e=>{if(e){this.player.$container.classList.add("jb-pro-zoom-control"),this._bindEvents();const e=this.player.video.$videoElement.style.transform;let t=this.player.video.$videoElement.offsetLeft,i=this.player.video.$videoElement.offsetTop;t=parseFloat(t),i=parseFloat(i),t&&(this.videoPosition.left=t),i&&(this.videoPosition.top=i),this.prevVideoElementStyleTransform=e;let s=e.match(/scale\([0-9., ]*\)/g);if(s&&s[0]){let e=s[0].replace("scale(","").replace(")","");this.prevVideoElementStyleScale=e.split(",")}}else{this.player.$container.classList.remove("jb-pro-zoom-control"),this._unbindEvents(),this._resetVideoPosition(),this.player.$container.style.cursor="auto";let e=this.prevVideoElementStyleTransform;this.player.video.$videoElement.style.transform=e,this.prevVideoElementStyleTransform=null,this.prevVideoElementStyleScale=null,ua()&&this.player._opt.useWebFullScreen&&this.player.resize()}}));const s=t(window,ua()?"touchend":"mouseup",(e=>{this.handleMouseUp(e)}));this.bindEvents.push(s),e.debug.log("zoom","init")}destroy(){this.bindEvents=[],this.isDragging=!1,this.currentZoom=1,this.prevVideoElementStyleTransform=null,this.prevVideoElementStyleScale=null,this.tempPosition={x:0,y:0},this.videoPosition={left:0,top:0},this.off(),this.player.debug.log("zoom","destroy")}_bindEvents(){const{events:{proxy:e},debug:t}=this.player,i=e(this.player.$container,ua()?"touchmove":"mousemove",(e=>{this.handleMouseMove(e)}));this.bindEvents.push(i);const s=e(this.player.$container,ua()?"touchstart":"mousedown",(e=>{this.handleMouseDown(e)}));this.bindEvents.push(s);const r=e(window,ua()?"touchend":"mouseup",(e=>{this.handleMouseUp(e)}));this.bindEvents.push(r)}_unbindEvents(){this.bindEvents.forEach((e=>{e&&e()}))}handleMouseMove(e){if(e.stopPropagation(),this.isDragging&&this.player.zooming){e.preventDefault();const{posX:t,posY:i}=Qa(e),s=this.tempPosition.x-t,r=this.tempPosition.y-i;this.videoPosition.left=this.videoPosition.left-s,this.videoPosition.top=this.videoPosition.top-r,this.tempPosition.x=t,this.tempPosition.y=i,this.updateVideoPosition()}}handleMouseDown(e){e.stopPropagation();const t=qa(e);if(this.player.zooming&&(t.matches("video")||t.matches("canvas"))){e.preventDefault();const{posX:t,posY:i}=Qa(e);this.player.$container.style.cursor="grabbing",this.tempPosition.x=t,this.tempPosition.y=i,this.isDragging=!0,this.player.debug.log("zoom","handleMouseDown is dragging true")}}handleMouseUp(e){e.stopPropagation(),this.isDragging&&this.player.zooming&&(e.preventDefault(),this.tempPosition={x:0,y:0},this.isDragging=!1,this.player.$container.style.cursor="grab",this.player.debug.log("zoom","handleMouseUp is dragging false"))}updateVideoPosition(){const e=this.player.video.$videoElement;e.style.left=this.videoPosition.left+"px",e.style.top=this.videoPosition.top+"px"}_resetVideoPosition(){this.player.resize(),this.tempPosition={x:0,y:0},this.videoPosition={left:0,top:0},this.currentZoom=1,this.isDragging=!1}narrowPrecision(){this.currentZoom<=1||(this.currentZoom-=1,this.updateVideoElementScale())}expandPrecision(){this.currentZoom>=this.maxScale||(this.currentZoom+=1,this.updateVideoElementScale())}updatePrevVideoElementStyleScale(e){this.prevVideoElementStyleScale=e}updateVideoElementScale(){const e=this.player.video.$videoElement;let t=e.style.transform,i=1,s=1;if(this.prevVideoElementStyleScale){const e=this.prevVideoElementStyleScale[0];void 0!==e&&(i=e,s=e);const t=this.prevVideoElementStyleScale[1];void 0!==t&&(s=t)}s=_a(s),i=_a(i);const r=.5*i*(this.currentZoom-1)+i,a=.5*s*(this.currentZoom-1)+s;let o;o=-1===t.indexOf("scale(")?t+` scale(${r},${a})`:t.replace(/scale\([0-9., ]*\)/,`scale(${r},${a})`),this.player.debug.log("zoom",`updateVideoElementScale end is ${r}, ${a} style is ${o}`),e.style.transform=o}}class Hb extends So{constructor(e){super(),this.player=e,this.faceDetector=null,this.objectDetector=null,this.imageDetector=null,this.occlusionDetector=null,this.initFaceDetector(),this.initObjectDetector(),this.initImageDetector(),this.initOcclusionDetector();let t="init";this.faceDetector&&(t+=" and use faceDetector"),this.objectDetector&&(t+=" and use objectDetector"),this.imageDetector&&(t+=" and use imageDetector"),this.occlusionDetector&&(t+=" and use occlusionDetector"),this.player.debug.log("AiLoader",t)}destroy(){this.off(),this.faceDetector&&(this.faceDetector.destroy(),this.faceDetector=null),this.objectDetector&&(this.objectDetector.destroy(),this.objectDetector=null),this.imageDetector&&(this.imageDetector.destroy(),this.imageDetector=null),this.occlusionDetector&&(this.occlusionDetector.destroy(),this.occlusionDetector=null),this.player.debug.log("AiLoader","destroy")}initFaceDetector(){if(this.player._opt.useFaceDetector&&window.JessibucaProFaceDetector){const e=new JessibucaProFaceDetector({detectWidth:this.player._opt.aiFaceDetectWidth,showRect:!1,debug:this.player._opt.debug,debugLevel:this.player._opt.debugLevel,debugUuid:this.player._opt.debugUuid});e.load().then((()=>{this.player.debug.log("AiLoader","init face detector success"),this.faceDetector=e,this.faceDetector.on("jessibuca-pro-face-detector-info",(e=>{if(this.player.emit(nt.aiFaceDetectorInfo,e),this.player._opt.aiFaceDetectShowRect){const t=this.player._opt.aiFaceDetectRectConfig||{},i=(e.list||[]).map((e=>(e.type="rect",e.color=t.borderColor||"#0000FF",e.lineWidth=t.borderWidth||2,e)));this.player.video&&this.player.video.addAiContentToCanvas(i)}}))}))}}initObjectDetector(){if(this.player._opt.useObjectDetector&&window.JessibucaProObjectDetector){const e=new JessibucaProObjectDetector({detectWidth:this.player._opt.aiObjectDetectWidth,showRect:!1,debug:this.player._opt.debug,debugLevel:this.player._opt.debugLevel,debugUuid:this.player._opt.debugUuid});e.load().then((()=>{this.player.debug.log("AiLoader","init object detector success"),this.objectDetector=e,this.objectDetector.on("jessibuca-pro-object-detector-info",(e=>{if(this.player.emit(nt.aiObjectDetectorInfo,e),this.player._opt.aiObjectDetectShowRect){const t=[],i=this.player._opt.aiObjectDetectRectConfig||{};(e.list||[]).forEach((e=>{const s={type:"rect",color:i.borderColor||"#0000FF",lineWidth:i.borderWidth||2,x:e.rect.x,y:e.rect.y,width:e.rect.width,height:e.rect.height},r={type:"text",color:i.color||"#000",fontSize:i.fontSize||14,text:e.zh,x:e.rect.x,y:e.rect.y-25};t.push(s,r)})),this.player.video&&this.player.video.addAiContentToCanvas(t)}}))}))}}initImageDetector(){if(this.player._opt.useImageDetector&&window.JessibucaProImageDetector){const e=new JessibucaProImageDetector({debug:this.player._opt.debug,debugLevel:this.player._opt.debugLevel,debugUuid:this.player._opt.debugUuid});e.load().then((()=>{this.player.debug.log("AiLoader","init image detector success"),this.imageDetector=e}))}}initOcclusionDetector(){if(this.player._opt.useOcclusionDetector&&window.JessibucaProOcclusionDetector){const e=new JessibucaProOcclusionDetector({debug:this.player._opt.debug,debugLevel:this.player._opt.debugLevel,debugUuid:this.player._opt.debugUuid});e.load().then((()=>{this.player.debug.log("AiLoader","init occlusion detector success"),this.occlusionDetector=e}))}}updateFaceDetectorConfig(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.faceDetector&&this.faceDetector.updateConfig(e)}updateObjectDetectorConfig(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.objectDetector&&this.objectDetector.updateConfig(e)}updateImageDetectorConfig(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.imageDetector&&this.imageDetector.updateConfig(e)}updateOcclusionDetectorConfig(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.occlusionDetector&&this.occlusionDetector.updateConfig(e)}}class Vb extends So{constructor(e){super(),this.player=e,this.LOG_NAME="Contextmenu",this.menuList=[],this.$contextmenus=e.control.$contextmenus,ua()?this.player.debug.warn(this.LOG_NAME,"not support mobile"):this.init(),e.debug.log(this.LOG_NAME,"init")}destroy(){this.menuList=[],this.player.debug.log(this.LOG_NAME,"destroy")}get isShow(){return e=this.player.$container,t="jb-pro-contextmenus-show",e.classList.contains(t);var e,t}show(){Ch(this.player.$container,"jb-pro-contextmenus-show")}hide(){var e,t;e=this.player.$container,t="jb-pro-contextmenus-show",e.classList.remove(t)}init(){const{events:{proxy:e},debug:t}=this.player;this.player._opt.contextmenuBtns.length>0&&this.player._opt.contextmenuBtns.forEach((e=>{this.addMenuItem(e)})),e(this.player.$container,"contextmenu",(e=>{e.preventDefault(),this.show();const t=e.clientX,i=e.clientY,{height:s,width:r,left:a,top:o}=this.player.$container.getBoundingClientRect(),{height:n,width:l}=this.$contextmenus.getBoundingClientRect();let d=t-a,h=i-o;t+l>a+r&&(d=r-l),i+n>o+s&&(h=s-n),na(this.$contextmenus,{left:`${d}px`,top:`${h}px`})})),e(this.player.$container,"click",(e=>{Dh(e,this.$contextmenus)||this.hide()})),this.player.on(nt.blur,(()=>{this.hide()}))}_validateMenuItem(e){let t=!0;return e.content||(this.player.debug.warn(this.LOG_NAME,"content is required"),t=!1),t}addMenuItem(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=no(Ns);if(e=Object.assign({},t,e),!this._validateMenuItem(e))return;const{events:{proxy:i},debug:s}=this.player,r=Sa(),a=`\n <div class="jb-pro-contextmenu jb-pro-contextmenu-${r}">\n ${e.content}\n </div>\n `,o=Array.from(this.$contextmenus.children)[e.index];o?o.insertAdjacentHTML("beforebegin",a):xh(this.$contextmenus,a);const n=this.$contextmenus.querySelector(`.jb-pro-contextmenu-${r}`);e.click&&i(n,"click",(t=>{t.preventDefault(),e.click.call(this.player,this,t),this.hide()})),this.menuList.push({uuid:r,$menuItem:n})}}class $b extends Ob{constructor(e){super(e),this.TAG_NAME="WebrtcForSRSDecoder",this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.player.debug.log(this.TAG_NAME,"destroy")}loadSource(e){return new Promise(((t,i)=>{const s=this.rtcPeerConnection;s.createOffer().then((r=>{s.setLocalDescription(r),this.player.debug.log(this.TAG_NAME,"getWebRtcRemoteSdp loadSource"),function(e,t){return fetch(e,{method:"POST",mode:"cors",cache:"no-cache",credentials:"include",redirect:"follow",referrerPolicy:"no-referrer",headers:{"Content-Type":"application/sdp"},body:t})}(e,r.sdp).then((e=>{this.player.debug.log(this.TAG_NAME,`getWebRtcRemoteSdp response and code is ${e.code}`);const r=e;if(r&&0!==r.code)return i(r.msg);r?s.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:r})).then((()=>{t()})).catch((e=>{i(e)})):i("sdp is null")})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource getWebRtcRemoteSdp response error",e),i(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource rtcPeerConnection.createOffer() error",e),i(e)}))}))}}class Wb extends Ob{constructor(e){super(e),this.TAG_NAME="WebrtcForOthersDecoder",this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.player.debug.log(this.TAG_NAME,"destroy")}loadSource(e){return new Promise(((t,i)=>{const s=this.rtcPeerConnection;s.createOffer().then((r=>{s.setLocalDescription(r),this.player.debug.log(this.TAG_NAME,"getWebRtcRemoteSdp loadSource"),function(e,t){return fetch(e,{method:"POST",mode:"cors",cache:"no-cache",credentials:"include",redirect:"follow",referrerPolicy:"no-referrer",headers:{"Content-Type":"application/sdp"},body:t})}(e,r.sdp).then((e=>{this.player.debug.log(this.TAG_NAME,`getWebRtcRemoteSdp response and code is ${e.code}`),e.text().then((e=>{this.player.debug.log(this.TAG_NAME,"getWebRtcRemoteSdp response");try{let t=JSON.parse(e);this.player.debug.log(this.TAG_NAME,"this is json sdp response"),0!=t.code&&(this.player.debug.log(this.TAG_NAME,`response json code ${t.code}`),i(new Error(`response sdp json code: ${t.code}`))),e=t.sdp}catch(e){this.player.debug.log(this.TAG_NAME,"this is raw sdp response")}e?s.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:e})).then((()=>{t()})).catch((e=>{i(e)})):i("sdp is null")})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource response.text() error",e),i(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource getWebRtcRemoteSdp response error",e),i(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource rtcPeerConnection.createOffer() error",e),i(e)}))}))}}class Jb extends So{constructor(e){if(super(),this.TAG_NAME="AliyunRtc",this.player=e,!window.AliRTS)throw new Error("AliyunRtc is not defined");this.aliyunRtc=window.AliRTS.createClient(),this.aliyunRtcRemoteStream=null,this.$videoElement=this.player.video.$videoElement,this.listenEvents(),this.player.debug.log(this.TAG_NAME,"init")}destroy(){this.aliyunRtc&&(this.aliyunRtcRemoteStream&&(this.aliyunRtcRemoteStream=null),this.aliyunRtc.unsubscribe(),this.aliyunRtc=null),this.off(),this.player.debug.log(this.TAG_NAME,"destroy")}listenEvents(){this.aliyunRtc.on("onError",(e=>{this.player.debug.log(this.TAG_NAME,`onError and code is ${e.errorCode} and message: ${e.message}`),10400!==e.errorCode&&(this.player.debug.error(this.TAG_NAME,`onError and code is ${e.errorCode} and message: ${e.message}`),this.player.emitError(ct.aliyunRtcError,e))})),this.aliyunRtc.on("reconnect",(e=>{this.player.debug.log(this.TAG_NAME,"reconnect",e)}));const e="canplay",t="waiting",i="playing",s="media";this.aliyunRtc.on("onPlayEvent",(r=>{if(r.event===e)this.player.debug.log(this.TAG_NAME,"onPlayEvent and canplay");else if(r.event===t)this.player.debug.log(this.TAG_NAME,"onPlayEvent and playing - > waiting");else if(r.event===i)this.player.debug.log(this.TAG_NAME,"onPlayEvent and waiting -> playing");else if(r.event===s){const e=r.data;let t={},i=0;if(e.audio){const s=Math.floor(e.audio.bytesReceivedPerSecond);i+=s,t.abps=s}if(e.video){const s=Math.floor(e.video.bytesReceivedPerSecond);i+=s,t.vbps=s}this.player.updateStats(t),this.player.emit(nt.kBps,(i/1024).toFixed(2))}}))}loadSource(e){return new Promise(((t,i)=>{this.aliyunRtc.isSupport({isReceiveVideo:!0}).then((()=>{this.aliyunRtc.subscribe(e,{}).then((e=>{this.aliyunRtcRemoteStream=e,e.play(this.$videoElement),t()})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource and subscribe is not success: ",e.message),i(e.message)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource and is not support: ",e.message),i(e.message)}))}))}getVideoCurrentTime(){let e=0;return this.$videoElement&&(e=this.$videoElement.currentTime),e}}class qb{constructor(e){this.player=e,this.TAG_NAME="PressureObserverCpu",this.observer=null,this.latestCpuInfo=null,this.currentLevel=-1,this._init(),this.player.debug.log(this.TAG_NAME,"init")}destroy(){this.observer&&(this.observer.disconnect(),this.observer=null),this.latestCpuInfo=null,this.currentLevel=-1,this.player.debug.log(this.TAG_NAME,"destroy")}getCurrentCpuState(){return this.currentLevel}_init(){po(vo())?this.player.debug.log(this.TAG_NAME,"not support PressureObserver"):(this.observer=new PressureObserver((e=>{const t=(e||[]).find((e=>"cpu"===e.source));if(t){switch(this.latestCpuInfo=t,t.state){case"nominal":this.currentLevel=0;break;case"fair":this.currentLevel=1;break;case"serious":this.currentLevel=2;break;case"critical":this.currentLevel=3;break;default:this.currentLevel=-1}this.player.emit(nt.pressureObserverCpu,this.currentLevel)}})),this.observer&&this.observer.observe("cpu"))}}class Kb extends Po{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e),this.TAG_NAME="DynamicWatermark",this.isPauseAnimation=!1,this.isStopAnimation=!1,this.rafID=null,this.speed=t.speed||.2,this.isDynamic=!0,this.shadowRootDynamicDom=null,this.isGhost=!0===t.isGhost,this.ghostConfig={on:t.on||5,off:t.off||5},this.waterMarkWillRemove=!1,this.waterMarkWillAdd=!1,this.player.once(nt.start,(()=>{const e=t.content;let i=this.player.getVideoInfo();i||(i={width:200,height:200}),this.update({text:{content:e,fontSize:t.fontSize||18,color:t.color||"white"},left:i.width*Math.random(),top:i.height*Math.random(),opacity:t.opacity||.15}),this.startAnimation()})),this.player.debug.log(this.TAG_NAME,"int")}destroy(){super.destroy(),this.shadowRootDynamicDom=null,this.stopAnimation(),this.rafID&&(cancelAnimationFrame(this.rafID),this.rafID=null)}startAnimation(){if(!this.rafID){let e=1,t=1,i=Math.random(),s={width:0,height:0};const r=()=>{try{if(po(this.isPauseAnimation)&&this.shadowRootDynamicDom&&this.shadowRootInnerDom){const a=this.shadowRootInnerDom,o=this.shadowRootDynamicDom,n=a.getBoundingClientRect(),l=o.getBoundingClientRect();if(l.width&&l.height&&(s.width=l.width,s.height=l.height),!this.shadowRootInnerDom.contains(this.shadowRootDynamicDom))return this.isGhost?po(this.waterMarkWillAdd)&&(this.waterMarkWillAdd=!0,setTimeout((()=>{this._addDom(n,s),this.waterMarkWillAdd=!1}),1e3*this.ghostConfig.off)):this._addDom(n,s),void(0!==this.speed&&requestAnimationFrame(r));const d=Math.min(1,0===this.speed?0:this.speed?this.speed:.2);let h=l.left-n.left,c=l.top-n.top;h+=d*t*i,c+=d*e*(1-i),h+s.width>n.width?(t=-1,i=Math.random()):h<0&&(t=1,i=Math.random()),c+s.height>n.height?(e=-1,i=Math.random()):c<0&&(e=1,i=Math.random()),h=Math.min(n.width-s.width,h),c=Math.min(n.height-s.height,c);const u=h/n.width*100,p=c/n.height*100;this.shadowRootDynamicDom.style.left=`${u}%`,this.shadowRootDynamicDom.style.top=`${p}%`,po(this.waterMarkWillRemove)&&this.isGhost&&(this.waterMarkWillRemove=!0,setTimeout((()=>{this._removeDom(),this.waterMarkWillRemove=!1}),1e3*this.ghostConfig.on))}}catch(e){}if(this.isStopAnimation)return this.isStopAnimation=!1,cancelAnimationFrame(this.rafID),void(this.rafID=null);0!==this.speed&&requestAnimationFrame(r)};this.rafID=requestAnimationFrame(r)}}_addDom(e,t){if(this.shadowRootInnerDom&&this.shadowRootDynamicDom){this.shadowRootInnerDom.appendChild(this.shadowRootDynamicDom);let i=e.width*Math.random(),s=e.height*Math.random();i=Math.min(e.width-2*t.width,i),s=Math.min(e.height-2*t.height,s),this.shadowRootDynamicDom.style.left=`${i}px`,this.shadowRootDynamicDom.style.top=`${s}px`}}resumeAnimation(){this.isPauseAnimation=!1}pauseAnimation(){this.isPauseAnimation=!0}stopAnimation(){this.isStopAnimation=!0}}class Yb extends So{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),this._opt={},this.TAG_NAME="Player",this.$container=e;const i=ho();if(this._opt=Object.assign({},i,t),this.debug=new Pr(this),this.debug.log(this.TAG_NAME,"init"),this._opt.forceNoOffscreen=!0,this._canPlayAppleMpegurl=!1,(Aa()||ya())&&(this._canPlayAppleMpegurl=Xa(),this.debug.log(this.TAG_NAME,"isIOS or isSafari and canPlayAppleMpegurl",this._canPlayAppleMpegurl)),ua()&&(this.debug.log(this.TAG_NAME,"isMobile and set _opt.controlAutoHide false"),this._opt.controlAutoHide=!1,uo(Mr.isEnabled)&&uo(this._opt.useWebFullScreen)&&(this.debug.log(this.TAG_NAME,"screenfull.isEnabled is true and _opt.useWebFullScreen is true , set _opt.useWebFullScreen false"),this._opt.useWebFullScreen=!1),po(Mr.isEnabled)&&po(this._opt.useWebFullScreen)&&(this.debug.log(this.TAG_NAME,"screenfull.isEnabled is false and _opt.useWebFullScreen is false , set _opt.useWebFullScreen true"),this._opt.useWebFullScreen=!0)),mo()&&(this.debug.log(this.TAG_NAME,"isIphone and set _opt.videoRenderSupportScale false"),this._opt.videoRenderSupportScale=!1,Wa()&&uo(this._opt.isHls)&&po(this._opt.supportHls265)&&(this.debug.log(this.TAG_NAME,"isIphone and is in wechat and is hls so set supportHls265 true"),this._opt.supportHls265=!0)),po(this._opt.playFailedAndReplay)&&(this.debug.log(this.TAG_NAME,"_opt.playFailedAndReplay is false and set others replay params false"),this._opt.webglAlignmentErrorReplay=!1,this._opt.webglContextLostErrorReplay=!1,this._opt.autoWasm=!1,this._opt.mseDecodeErrorReplay=!1,this._opt.mediaSourceTsIsMaxDiffReplay=!1,this._opt.wcsDecodeErrorReplay=!1,this._opt.wasmDecodeErrorReplay=!1,this._opt.simdDecodeErrorReplay=!1,this._opt.videoElementPlayingFailedReplay=!1,this._opt.networkDelayTimeoutReplay=!1,this._opt.widthOrHeightChangeReplay=!1,this._opt.simdH264DecodeVideoWidthIsTooLargeReplay=!1,this._opt.mediaSourceUseCanvasRenderPlayFailedReplay=!1,this._opt.heartTimeoutReplay=!1,this._opt.loadingTimeoutReplay=!1,this._opt.websocket1006ErrorReplay=!1,this._opt.streamErrorReplay=!1,this._opt.streamEndReplay=!1),this._opt.hiddenControl&&(this.debug.log(this.TAG_NAME,"_opt.hiddenControl is true and set others show btn to false"),Object.keys(this._opt.operateBtns).forEach((e=>{this._opt.operateBtns[e]&&-1===(""+e).indexOf("Fn")&&(this._opt.operateBtns[e]=!1)})),this._opt.showBandwidth=!1,this._opt.extendOperateBtns=[],this._opt.controlHtml="",this.isPlayback()&&(this._opt.playbackConfig.showControl=!1)),this._opt.forceNoOffscreen||("undefined"==typeof OffscreenCanvas?(this._opt.forceNoOffscreen=!0,this._opt.useOffscreen=!1):this._opt.useOffscreen=!0),this._opt.isMpeg4&&(this.debug.log(this.TAG_NAME,"isMpeg4 is true, so set _opt.useWasm true and others params false"),this._opt.useWCS=!1,this._opt.useMSE=!1,this._opt.isNakedFlow=!1,this._opt.useSIMD=!1,this._opt.isFmp4=!1,this._opt.useWasm=!0),this.isPlayback()&&(this._opt.mseDecoderUseWorker=!1),this._opt.poster&&(this._opt.background=this._opt.poster),po(this._opt.muted)&&(this._opt.isNotMute=!0),this._opt.mseDecoderUseWorker&&(this._opt.mseDecoderUseWorker=!!(self.Worker&&self.MediaSource&&"canConstructInDedicatedWorker"in self.MediaSource&&!0===self.MediaSource.canConstructInDedicatedWorker),po(this._opt.mseDecoderUseWorker)&&this.debug.log(this.TAG_NAME,"mseDecoderUseWorker is true but not support so set _opt.mseDecoderUseWorker = false")),(this.isOldHls()||this.isWebrtcH264()||this.isAliyunRtc())&&(this.debug.log(this.TAG_NAME,"isOldHls or isWebrtcH264 or isAliyunRtc is true, so set some params false and _opt.recordType is webm"),this._opt.useWCS=!1,this._opt.useMSE=!1,this._opt.isNakedFlow=!1,this._opt.useSIMD=!1,this._opt.isFmp4=!1,this._opt.useWasm=!1,this._opt.recordType=w),this._opt.isNakedFlow&&(this.debug.log(this.TAG_NAME,"isNakedFlow is true, so set _opt.mseDecodeAudio false"),this._opt.mseDecodeAudio=!1),ma()&&(this.debug.log(this.TAG_NAME,"isFirefox is true, so set _opt.mseDecodeAudio false"),this._opt.mseDecodeAudio=!1),!this.isOldHls()&&!this.isWebrtcH264()){if(this._opt.useWCS){const e="VideoEncoder"in window,t=Ca();this._opt.useWCS=e,this._opt.useWCS&&this._opt.isH265&&(this._opt.useWCS=t),this._opt.useWCS||this.debug.warn(this.TAG_NAME,`\n useWCS is true,\n and supportWCS is ${e}, supportHevcWCS is ${t} , _opt.isH265 is ${this._opt.isH265}\n so set useWCS false`),this._opt.useWCS&&(this._opt.useOffscreen?this._opt.wcsUseVideoRender=!1:this._opt.wcsUseVideoRender&&(this._opt.wcsUseVideoRender=xa()&&Ra(),this._opt.wcsUseVideoRender||this.debug.warn(this.TAG_NAME,"wcsUseVideoRender is true, but not support so set wcsUseVideoRender false")))}if(this._opt.useMSE){const e=function(){let e=!1;return"MediaSource"in self&&(e=!0),e}()||function(){let e=!1;return!("MediaSource"in self)&&"ManagedMediaSource"in self&&(e=!0),e}(),t=ka()||function(){let e=!1;return!("MediaSource"in self)&&"ManagedMediaSource"in self&&(self.ManagedMediaSource.isTypeSupported(ci)||self.ManagedMediaSource.isTypeSupported(ui)||self.ManagedMediaSource.isTypeSupported(pi)||self.ManagedMediaSource.isTypeSupported(fi)||self.ManagedMediaSource.isTypeSupported(mi))&&(e=!0),e}();this._opt.useMSE=e,this._opt.useMSE&&this._opt.isH265&&(this._opt.useMSE=t),this._opt.useMSE||this.debug.warn(this.TAG_NAME,`\n useMSE is true,\n and supportMSE is ${e}, supportHevcMSE is ${t} , _opt.isH265 is ${this._opt.isH265}\n so set useMSE false`)}}if(po(this._opt.useMSE)&&(this._opt.mseDecodeAudio=!1),this._opt.useMSE?(this._opt.useWCS&&this.debug.warn(this.TAG_NAME,"useMSE is true and useWCS is true then useWCS set true->false"),this._opt.forceNoOffscreen||this.debug.warn(this.TAG_NAME,"useMSE is true and forceNoOffscreen is false then forceNoOffscreen set false->true"),this._opt.useWCS=!1,this._opt.forceNoOffscreen=!0):this._opt.useWCS,this._opt.isWebrtc&&this._opt.demuxUseWorker&&(this.debug.warn(this.TAG_NAME,"isWebrtc is true and demuxUseWorker is true then demuxUseWorker set true->false"),this._opt.demuxUseWorker=!1),this._opt.isHls&&this._opt.demuxUseWorker&&(this.debug.warn(this.TAG_NAME,"isHls is true and demuxUseWorker is true then demuxUseWorker set true->false"),this._opt.demuxUseWorker=!1),this._opt.isAliyunRtc&&this._opt.demuxUseWorker&&(this.debug.warn(this.TAG_NAME,"isAliyunRtc is true and demuxUseWorker is true then demuxUseWorker set true->false"),this._opt.demuxUseWorker=!1),this.isStreamWebTransport()&&this._opt.demuxUseWorker&&(this.debug.warn(this.TAG_NAME,"is stream use webTransport is true and demuxUseWorker is true then demuxUseWorker set true->false"),this._opt.demuxUseWorker=!1),po(this._opt.demuxUseWorker)&&(this._opt.mseDecoderUseWorker=!1),this.isPlayback()&&(this._opt.mseDecoderUseWorker=!1),this._opt.useMThreading&&(this._opt.useMThreading="undefined"!=typeof SharedArrayBuffer,this._opt.useMThreading||this.debug.warn(this.TAG_NAME,"useMThreading is true, but not support so set useMThreading false")),this._opt.useSIMD||-1!==this._opt.decoder.indexOf("-simd")){const e=WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),t=mo();this._opt.useSIMD=e&&po(t),this._opt.useSIMD||this.debug.warn(this.TAG_NAME,`useSIMD is true, but not support(isSupportSimd is ${e} ,isIphone is ${t}) so set useSIMD false`)}var s;if(this._opt.useSIMD?-1===this._opt.decoder.indexOf("-simd")?this._opt.useMThreading?this._opt.decoder=this._opt.decoder.replace("decoder-pro.js","decoder-pro-simd-mt.js"):this._opt.decoder=this._opt.decoder.replace("decoder-pro.js","decoder-pro-simd.js"):this._opt.useMThreading&&(this._opt.decoder=this._opt.decoder.replace("decoder-pro-simd.js","decoder-pro-simd-mt.js")):-1!==this._opt.decoder.indexOf("-simd")?this._opt.useMThreading?this._opt.decoder=this._opt.decoder.replace("decoder-pro-simd.js","decoder-pro-mt.js"):this._opt.decoder=this._opt.decoder.replace("decoder-pro-simd.js","decoder-pro.js"):this._opt.useMThreading&&(this._opt.decoder=this._opt.decoder.replace("decoder-pro.js","decoder-pro-mt.js")),-1!==this._opt.decoder.indexOf("-simd")?this._opt.useMThreading?(this._opt.decoderAudio=this._opt.decoder.replace("decoder-pro-simd-mt.js","decoder-pro-audio.js"),this._opt.decoderHard=this._opt.decoder.replace("decoder-pro-simd-mt.js","decoder-pro-hard.js"),this._opt.decoderHardNotWasm=this._opt.decoder.replace("decoder-pro-simd-mt.js","decoder-pro-hard-not-wasm.js")):(this._opt.decoderAudio=this._opt.decoder.replace("decoder-pro-simd.js","decoder-pro-audio.js"),this._opt.decoderHard=this._opt.decoder.replace("decoder-pro-simd.js","decoder-pro-hard.js"),this._opt.decoderHardNotWasm=this._opt.decoder.replace("decoder-pro-simd.js","decoder-pro-hard-not-wasm.js")):this._opt.useMThreading?(this._opt.decoderAudio=this._opt.decoder.replace("decoder-pro-mt.js","decoder-pro-audio.js"),this._opt.decoderHard=this._opt.decoder.replace("decoder-pro-mt.js","decoder-pro-hard.js"),this._opt.decoderHardNotWasm=this._opt.decoder.replace("decoder-pro-mt.js","decoder-pro-hard-not-wasm.js")):(this._opt.decoderAudio=this._opt.decoder.replace("decoder-pro.js","decoder-pro-audio.js"),this._opt.decoderHard=this._opt.decoder.replace("decoder-pro.js","decoder-pro-hard.js"),this._opt.decoderHardNotWasm=this._opt.decoder.replace("decoder-pro.js","decoder-pro-hard-not-wasm.js")),po(this._opt.hasAudio)&&(this._opt.operateBtns.audio=!1),po(this._opt.hasVideo)&&(this._opt.operateBtns.fullscreen=!1,this._opt.operateBtns.screenshot=!1,this._opt.operateBtns.record=!1,this._opt.operateBtns.ptz=!1,this._opt.operateBtns.quality=!1,this._opt.operateBtns.zoom=!1),this._opt.qualityConfig&&0===this._opt.qualityConfig.length&&this._opt.operateBtns.quality&&(this._opt.operateBtns.quality=!1,this.debug.warn(this.TAG_NAME,"_opt.qualityConfig is empty, so set operateBtns.quality false")),uo(this._opt.useWebGPU)&&(this._opt.useWebGPU=function(){let e=!1;return"gpu"in navigator&&(e=!0),e}(),po(this._opt.useWebGPU)&&this.debug.warn(this.TAG_NAME,"useWebGPU is true, but not support so set useWebGPU false")),this._opt.hasControl=this._hasControl(),this._loading=!1,this._playing=!1,this._playbackPause=!1,this._hasLoaded=!1,this._zooming=!1,this._destroyed=!1,this._closed=!1,this._checkHeartTimeout=null,this._checkLoadingTimeout=null,this._checkStatsInterval=null,this._checkVisibleHiddenTimeout=null,this._startBpsTime=null,this._isPlayingBeforePageHidden=!1,this._stats={buf:0,netBuf:0,fps:0,maxFps:0,dfps:0,abps:0,vbps:0,ts:0,mseTs:0,currentPts:0,pTs:0,dts:0,mseVideoBufferDelayTime:0,isDropping:!1},this._allStatsData={},this._faceDetectActive=!1,this._objectDetectActive=!1,this._occlusionDetectActive=!1,this._imageDetectActive=!1,this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},this._videoTimestamp=0,this._audioTimestamp=0,this._latestAudioTimestamp=0,this._videoIframeIntervalTs=0,this._streamQuality=this._opt.defaultStreamQuality||"",!this._streamQuality&&this._opt.qualityConfig.length>0&&(this._streamQuality=this._opt.qualityConfig[0]||""),this._visibility=!0,this._lastestVisibilityChangeTimestamp=null,this._tempWorkerStats=null,this._historyFpsList=[],this._historyVideoDiffList=[],this._tempStreamList=[],this._tempInnerPlayBgobj=null,this._flvMetaData=null,this._flvMetaDataFps=null,this._mseWorkerData={},po(this._opt.useMSE)&&po(this._opt.useWCS)&&!this.isWebrtcH264()&&!this.isOldHls()&&(this._opt.useWasm=!0),(this.isOldHls()||this.isWebrtcH264())&&(this._opt.hasVideo=!0,this._opt.hasAudio=!0),this._opt.hasVideo||(this._opt.useMSE=!1,this._opt.useWCS=!1),this._opt.useWasm&&(this._opt.useOffscreen?this._opt.wasmUseVideoRender=!1:this._opt.wasmUseVideoRender&&(this._opt.wasmUseVideoRender=va()&&xa()&&Ra(),this._opt.wasmUseVideoRender||this.debug.warn(this.TAG_NAME,"use wasm video render, but not support so set wasmUseVideoRender false")),this._opt.useSIMD?this.debug.log(this.TAG_NAME,"use simd wasm"):this.debug.log(this.TAG_NAME,"use wasm")),this._opt.useWasm&&(this._opt.useFaceDetector&&window.JessibucaProFaceDetector||this._opt.useObjectDetector&&window.JessibucaProObjectDetector||this._opt.useOcclusionDetector&&window.JessibucaProOcclusionDetector||this._opt.useImageDetector&&window.JessibucaProImageDetector)?(this.ai=new Hb(this),this._opt.useFaceDetector&&window.JessibucaProFaceDetector||(this._opt.operateBtns.aiFace=!1),this._opt.useObjectDetector&&window.JessibucaProObjectDetector||(this._opt.operateBtns.aiObject=!1),this._opt.useOcclusionDetector&&window.JessibucaProOcclusionDetector||(this._opt.operateBtns.aiOcclusion=!1),this._opt.useImageDetector&&this._opt.aiImageDetectActive&&window.JessibucaProImageDetector&&(this.imageDetectActive=!0)):(this._opt.operateBtns.aiObject=!1,this._opt.operateBtns.aiFace=!1,this._opt.operateBtns.aiOcclusion=!1),this._opt.useFaceDetector&&(this._opt.useWasm&&window.JessibucaProFaceDetector||this.debug.warn(this.TAG_NAME,`use face detector, useWasm is ${this._opt.useWasm} and window.JbProFaceDetector is null`)),this._opt.useObjectDetector&&(this._opt.useWasm&&window.JessibucaProObjectDetector||this.debug.warn(this.TAG_NAME,`use object detector, useWasm is ${this._opt.useWasm} and window.JbProObjectDetector is null`)),this._opt.useOcclusionDetector&&(this._opt.useWasm&&window.JessibucaProOcclusionDetector||this.debug.warn(this.TAG_NAME,`use occlusion detector, useWasm is ${this._opt.useWasm} and window.JessibucaProOcclusionDetector is null`)),this._opt.useImageDetector&&(this._opt.useWasm&&window.JessibucaProImageDetector||this.debug.warn(this.TAG_NAME,`use image detector, useWasm is ${this._opt.useWasm} and window.JessibucaProImageDetector is null`)),this._opt.useVideoRender&&(this._opt.useWasm&&!this._opt.useOffscreen?(this._opt.wasmUseVideoRender=va()&&xa()&&Ra(),this._opt.wasmUseVideoRender||this.debug.warn(this.TAG_NAME,"use wasm video render, but not support so set wasmUseVideoRender false")):this._opt.useWCS&&!this._opt.useOffscreen&&(this._opt.wcsUseVideoRender=xa()&&Ra(),this._opt.wcsUseVideoRender||this.debug.warn(this.TAG_NAME,"use wcs video render, but not support so set wcsUseVideoRender false"))),this._opt.useCanvasRender&&(this._opt.useMSE&&po(this._opt.mseDecoderUseWorker)&&(this._opt.mseUseCanvasRender=!0),this._opt.useWasm&&(this._opt.wasmUseVideoRender=!1),this._opt.useWCS&&(this._opt.wcsUseVideoRender=!1),this.isOldHls()&&!Aa()&&(this._opt.hlsUseCanvasRender=!0),this.isWebrtcH264()&&(this._opt.webrtcUseCanvasRender=!0)),this._opt.useVideoRender=!1,this._opt.useCanvasRender=!1,this._opt.useWasm?this._opt.wasmUseVideoRender?this._opt.useVideoRender=!0:this._opt.useCanvasRender=!0:this._opt.useWCS?this._opt.wcsUseVideoRender?this._opt.useVideoRender=!0:this._opt.useCanvasRender=!0:this._opt.useMSE?this._opt.mseUseCanvasRender?this._opt.useCanvasRender=!0:this._opt.useVideoRender=!0:this.isOldHls()?this._opt.hlsUseCanvasRender?this._opt.useCanvasRender=!0:this._opt.useVideoRender=!0:this.isWebrtcH264()&&(this._opt.webrtcUseCanvasRender?this._opt.useCanvasRender=!0:this._opt.useVideoRender=!0),s=this,Object.defineProperty(s,"rect",{get:()=>{let e={};return s.$container&&(e=s.$container.getBoundingClientRect(),e.width=Math.max(e.width,s.$container.clientWidth),e.height=Math.max(e.height,s.$container.clientHeight)),e}}),["bottom","height","left","right","top","width"].forEach((e=>{Object.defineProperty(s,e,{get:()=>s.rect[e]||0})})),this.events=new _o(this),this._opt.hasVideo&&(this.video=new $o(this),this.recorder=new el(this)),this.isOldHls()?(this.hlsDecoder=new fA(this),this.loaded=!0):this.isWebrtcH264()?(this._opt.isWebrtcForZLM?this.webrtc=new jb(this):this._opt.isWebrtcForSRS?this.webrtc=new $b(this):this._opt.isWebrtcForOthers?this.webrtc=new Wb(this):this.webrtc=new Nb(this),this.loaded=!0):this.isAliyunRtc()?(this.aliyunRtcDecoder=new Jb(this),this.loaded=!0):(this.isUseHls265()&&(this.hlsDecoder=new Fb(this)),this.isWebrtcH265()&&(this.webrtc=new Nb(this)),po(Za(this._opt))?this.decoderWorker=new ol(this):this.loaded=!0),this._opt.hasAudio&&(this.audio=new cn(this)),this.stream=null,this.demux=null,this._lastVolume=null,this._isMute=null,this._isInZoom=!1,this._playingStartTimestamp=null,this.isMSEVideoDecoderInitializationFailedNotSupportHevc=!1,this.isMSEAudioDecoderError=!1,this.isMSEPlaybackRateChangePause=!1,this.isPlayFailedAndPaused=!1,this._opt.useWCS&&(this.webcodecsDecoder=new gh(this),!this._opt.hasAudio&&po(this._opt.demuxUseWorker)&&(this.loaded=!0)),this._opt.useMSE&&po(this._opt.mseDecoderUseWorker)&&(this.mseDecoder=new Hh(this),!this._opt.hasAudio&&po(this._opt.demuxUseWorker)&&(this.loaded=!0)),this.control=new Ih(this),this._opt.contextmenuBtns.length>0&&po(this._opt.disableContextmenu)&&pa()?this.contextmenu=new Vb(this):uo(this._opt.disableContextmenu)&&this._opt.contextmenuBtns.length>0&&pa()&&this.debug.warn(this.TAG_NAME,"disableContextmenu is true, but contextmenuBtns is not empty, so Contextmenu can not be created,please check"),this.isPlayback()&&(this.playback=new zb(this,this._opt.playbackConfig)),this._opt.operateBtns.zoom&&(this.zoom=new Gb(this)),/(iphone|ipad|ipod|ios|android)/i.test(window.navigator.userAgent.toLowerCase())&&po(this._opt.supportLockScreenPlayAudio&&ya())&&(this.keepScreenOn=new $h(this)),(e=>{try{const t=t=>{qa(t)===e.$container&&(e.emit(lt.fullscreen,e.fullscreen),e.fullscreen?e._opt.useMSE&&e.resize():e.resize())};Mr.on("change",t),e.events.destroys.push((()=>{Mr.off("change",t)}))}catch(e){}if(e.on(nt.decoderWorkerInit,(()=>{e.debug.log("player","listen decoderWorkerInit and set loaded true"),e.loaded=!0})),e.on(nt.play,(()=>{e.loading=!1})),e.on(nt.fullscreen,(t=>{if(t)try{Mr.request(e.$container).then((()=>{})).catch((t=>{e.debug.error("player","fullscreen request error",t),ua()&&e._opt.useWebFullScreen&&(e.webFullscreen=!0)}))}catch(t){ua()&&e._opt.useWebFullScreen&&(e.webFullscreen=!0)}else try{Mr.exit().then((()=>{e.webFullscreen&&(e.webFullscreen=!1)})).catch((t=>{e.debug.error("player","fullscreen exit error",t),e.webFullscreen&&(e.webFullscreen=!1)}))}catch(t){e.webFullscreen&&(e.webFullscreen=!1)}})),ua()&&e.on(nt.webFullscreen,(t=>{t?e.$container.classList.add("jb-pro-fullscreen-web"):e.$container.classList.remove("jb-pro-fullscreen-web"),e.emit(lt.fullscreen,e.fullscreen)})),e.on(nt.resize,(()=>{e.video&&e.video.resize()})),e._opt.debug){const t=[nt.timeUpdate,nt.currentPts,nt.videoSEI],i=[nt.stats,nt.playbackStats,nt.playbackTimestamp,nt.flvMetaData,nt.playToRenderTimes,nt.audioInfo,nt.videoInfo];Object.keys(nt).forEach((s=>{e.on(nt[s],(function(r){if(!t.includes(s)){i.includes(s)&&(r=JSON.stringify(r));for(var a=arguments.length,o=new Array(a>1?a-1:0),n=1;n<a;n++)o[n-1]=arguments[n];e.debug.log("player events",nt[s],r,...o)}}))})),Object.keys(ct).forEach((t=>{e.on(ct[t],(function(){for(var i=arguments.length,s=new Array(i),r=0;r<i;r++)s[r]=arguments[r];e.debug.warn("player event error",ct[t],...s)}))}))}})(this),Mh(this),this.singleWatermark=new Po(this),this._opt.ghostWatermarkConfig.content){const e=Object.assign({},this._opt.ghostWatermarkConfig,{isGhost:!0});this.ghostWatermark=new Kb(this,e)}this._opt.dynamicWatermarkConfig.content&&(this.dynamicWatermark=new Kb(this,this._opt.dynamicWatermarkConfig)),this._opt.watermarkConfig&&this.updateWatermark(this._opt.watermarkConfig),vo()&&(this.pressureObserverCpu=new qb(this)),this._opt.useWCS&&this.debug.log(this.TAG_NAME,"use WCS"),this._opt.useMSE&&(this._opt.mseDecoderUseWorker?this.debug.log(this.TAG_NAME,"use worker MSE"):this.debug.log(this.TAG_NAME,"use MSE")),this._opt.useOffscreen&&this.debug.log(this.TAG_NAME,"use offscreen"),this._opt.isHls&&(this._opt.supportHls265?this.debug.log(this.TAG_NAME,"use hls 265"):this.debug.log(this.TAG_NAME,"use hls")),this._opt.isWebrtc&&(this._opt.isWebrtcH265?this.debug.log(this.TAG_NAME,"use webrtc h265"):this._opt.isWebrtcForZLM?this.debug.log(this.TAG_NAME,"use webrtc for ZLM"):this._opt.isWebrtcForSRS?this.debug.log(this.TAG_NAME,"use webrtc for SRS"):this._opt.isWebrtcForOthers?this.debug.log(this.TAG_NAME,"use webrtc for Others"):this.debug.log(this.TAG_NAME,"use webrtc for M7S")),this.isAliyunRtc()&&this.debug.log(this.TAG_NAME,"use aliyun rtc"),this._opt.isFmp4&&this.debug.log(this.TAG_NAME,"use fmp4"),this._opt.isMpeg4&&this.debug.log(this.TAG_NAME,"use mpeg4"),this.isPlayback()&&this.debug.log(this.TAG_NAME,"use playback"),this._opt.hasVideo&&(0===this.width&&this.debug.warn(this.TAG_NAME,"container width is 0, please check the container width"),0===this.height&&this.debug.warn(this.TAG_NAME,"container height is 0, please check the container height")),this.debug.log("Player options",JSON.stringify(this._opt))}async destroy(){this._destroyed=!0,this.emit(nt.destroy),this.off(),this.events&&(this.events.destroy(),this.events=null),this.clearCheckLoadingTimeout(),this.clearStatsInterval(),this.clearVisibilityHiddenTimeout(),this.decoderWorker&&(await this.decoderWorker.destroy(),this.decoderWorker=null),await this._destroy()}async _destroy(){this._loading=!1,this._playing=!1,this._playbackPause=!1,this._hasLoaded=!1,this._lastVolume=null,this._isMute=null,this._zooming=!1,this._faceDetectActive=!1,this._objectDetectActive=!1,this._occlusionDetectActive=!1,this._imageDetectActive=!1,this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},this.singleWatermark&&(this.singleWatermark.destroy(),this.singleWatermark=null),this.ghostWatermark&&(this.ghostWatermark.destroy(),this.ghostWatermark=null),this.dynamicWatermark&&(this.dynamicWatermark.destroy(),this.dynamicWatermark=null),this.pressureObserverCpu&&(this.pressureObserverCpu.destroy(),this.pressureObserverCpu=null),this.stream&&(await this.stream.destroy(),this.stream=null),this.hlsDecoder&&(await this.hlsDecoder.destroy(),this.hlsDecoder=null),this.mseDecoder&&(this.mseDecoder.destroy(),this.mseDecoder=null),this.webrtc&&(this.webrtc.destroy(),this.webrtc=null),this.aliyunRtcDecoder&&(this.aliyunRtcDecoder.destroy(),this.aliyunRtcDecoder=null),this.video&&(await this.video.destroy(),this.video=null),this.audio&&(await this.audio.destroy(),this.audio=null),this.recorder&&(this.recorder.destroy(),this.recorder=null),this.control&&(this.control.destroy(),this.control=null),this.webcodecsDecoder&&(this.webcodecsDecoder.destroy(),this.webcodecsDecoder=null),this.demux&&(this.demux.destroy(),this.demux=null),this.playback&&(this.playback.destroy(),this.playback=null),this.zoom&&(this.zoom.destroy(),this.zoom=null),this.ai&&(this.ai.destroy(),this.ai=null),this.keepScreenOn&&(this.releaseWakeLock(),this.keepScreenOn.destroy(),this.keepScreenOn=null),this.resetStats(),this._audioTimestamp=0,this._latestAudioTimestamp=0,this._videoTimestamp=0,this._streamQuality="",this._visibility=!0,this._isInZoom=!1,this._playingStartTimestamp=null,this._lastestVisibilityChangeTimestamp=null,this._videoIframeIntervalTs=null,this._tempWorkerStats=null,this._tempStreamList=[],this._tempInnerPlayBgobj={},this._flvMetaData=null,this._flvMetaDataFps=null,this._mseWorkerData={},this.isMSEVideoDecoderInitializationFailedNotSupportHevc=!1,this.isMSEAudioDecoderError=!1,this.isMSEPlaybackRateChangePause=!1,this.isPlayFailedAndPaused=!1,this.debug.log("play","destroy end"),this._opt=null,this.$container=null,this.debug=null}set fullscreen(e){ua()&&this._opt.useWebFullScreen?this.webFullscreen=e:this.emit(nt.fullscreen,e)}get fullscreen(){return Mr.isFullscreen||this.webFullscreen}set webFullscreen(e){this.emit(nt.webFullscreen,e),setTimeout((()=>{this.updateOption({rotate:e?270:0}),this.resize()}),10)}get webFullscreen(){return this.$container.classList.contains("jb-pro-fullscreen-web")}set loaded(e){this._hasLoaded=e}get loaded(){return this._hasLoaded||this.isOldHls()||this.isWebrtcH264()||this._opt.useMSE&&po(this._opt.hasAudio)&&po(this._opt.demuxUseWorker)||this._opt.useWCS&&!this._opt.hasAudio&&po(this._opt.demuxUseWorker)}set playing(e){this.isClosed()&&e?this.debug.log(this.TAG_NAME,"player is closed, so can not play"):(e&&uo(this.loading)&&(this.loading=!1),this.playing!==e&&(this._playing=e,this.emit(nt.playing,e),this.emit(nt.volumechange,this.volume),e?this.emit(nt.play):this.emit(nt.pause)))}get playing(){return this._playing}get volume(){return this.audio&&this.audio.volume||0}set volume(e){e!==this.volume&&(this.audio?(this.audio.setVolume(e),this._lastVolume=this.volume,this._isMute=0===this.volume):this.debug.warn(this.TAG_NAME,"set volume error, audio is null"))}get lastVolume(){return this._lastVolume}set loading(e){this.loading!==e&&(this._loading=e,this.emit(nt.loading,this._loading))}get loading(){return this._loading}set zooming(e){this.zooming!==e&&(this.zoom||(this.zoom=new Gb(this)),this._zooming=e,this.emit(nt.zooming,this.zooming))}get zooming(){return this._zooming}set recording(e){e?this.playing&&!this.recording&&(this.recorder&&this.recorder.startRecord(),this.isDemuxInWorker()&&this.decoderWorker&&this.decoderWorker.updateWorkConfig({key:"isRecording",value:!0})):this.recording&&(this.isDemuxInWorker()&&this.decoderWorker&&this.decoderWorker.updateWorkConfig({key:"isRecording",value:!1}),this.recorder&&this.recorder.stopRecordAndSave().then((()=>{})).catch((e=>{})))}get recording(){return!!this.recorder&&this.recorder.isRecording}set audioTimestamp(e){null!==e&&(this._audioTimestamp=e)}get audioTimestamp(){return this._audioTimestamp}set latestAudioTimestamp(e){null!==e&&(this._latestAudioTimestamp=e)}get latestAudioTimestamp(){return this._latestAudioTimestamp}get videoTimestamp(){return this._stats.currentPts||this._stats.ts}set streamQuality(e){this.streamQuality!==e&&(this._streamQuality=e,this.emit(nt.streamQualityChange,e))}get streamQuality(){return this._streamQuality}get isDebug(){return uo(this._opt.debug)}get scaleType(){const e=this._opt,t=e.isResize,i=e.isFullResize;let s=Qt;return po(i)&&po(t)?s=Qt:po(i)&&uo(t)?s=Xt:uo(i)&&uo(t)&&(s=Zt),s}set visibility(e){this._visibility!==e&&(this._visibility=e,this.emit(nt.visibilityChange,e),this._lastestVisibilityChangeTimestamp=aa(),e?this.clearVisibilityHiddenTimeout():this.startVisibilityHiddenTimeout())}get visibility(){return this._visibility}set playbackPause(e){this._playbackPause!==e&&(this._playbackPause=e,this.emit(nt.playbackPause,e),this.emit(nt.playbackPauseOrResume,e))}get playbackPause(){return this.isPlayback()&&this._playbackPause}set videoIframeIntervalTs(e){this._videoIframeIntervalTs=e}get videoIframeIntervalTs(){return this._videoIframeIntervalTs}set faceDetectActive(e){this._faceDetectActive!==e&&(this._faceDetectActive=e,this.emit(nt.faceDetectActive,e))}get faceDetectActive(){return this._faceDetectActive}set objectDetectActive(e){this._objectDetectActive!==e&&(this._objectDetectActive=e,this.emit(nt.objectDetectActive,e))}get objectDetectActive(){return this._objectDetectActive}set occlusionDetectActive(e){this._occlusionDetectActive!==e&&(this._occlusionDetectActive=e,this.emit(nt.occlusionDetectActive,e))}get occlusionDetectActive(){return this._occlusionDetectActive}set imageDetectActive(e){this._imageDetectActive!==e&&(this._imageDetectActive=e)}get imageDetectActive(){return this._imageDetectActive}get isUseWorkerDemuxAndDecode(){return this.stream&&this.stream.getStreamType()===y}isDestroyed(){return this._destroyed}isClosed(){return this._closed}isDestroyedOrClosed(){return this.isDestroyed()||this.isClosed()}isPlaying(){let e=!1;return this._opt.playType===b?e=this.playing:this._opt.playType===_&&(e=po(this.playbackPause)&&this.playing),e}updateOption(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._opt=Object.assign({},this._opt,e),uo(t)&&this.decoderWorker&&Object.keys(e).forEach((t=>{this.decoderWorker.updateWorkConfig({key:t,value:e[t]})}))}init(){return new Promise(((e,t)=>{this.video||this._opt.hasVideo&&(this.video=new $o(this)),this.audio||this._opt.hasAudio&&(this.audio=new cn(this)),this.stream||(this.stream=new vn(this)),this.isOldHls()?(this.hlsDecoder||(this.hlsDecoder=new fA(this),this.loaded=!0),e()):this.isWebrtcH264()?(this.webrtc||(this._opt.isWebrtcForZLM?this.webrtc=new jb(this):this._opt.isWebrtcForSRS?this.webrtc=new $b(this):this._opt.isWebrtcForOthers?this.webrtc=new Wb(this):this.webrtc=new Nb(this),this.loaded=!0),e()):this.isAliyunRtc()?(this.aliyunRtcDecoder||(this.aliyunRtcDecoder=new Jb(this),this.loaded=!0),e()):(this.demux||this._opt.hasVideo&&!this.isUseWorkerDemuxAndDecode&&(this.demux=new mh(this)),this._opt.useWCS&&(this.webcodecsDecoder||(this.webcodecsDecoder=new gh(this))),this._opt.useMSE&&po(this._opt.mseDecoderUseWorker)&&(this.mseDecoder||(this.mseDecoder=new Hh(this))),this.isUseHls265()&&(this.hlsDecoder||(this.hlsDecoder=new Fb(this))),this.isWebrtcH265()&&(this.webrtc||(this.webrtc=new Nb(this))),this.decoderWorker?this.loaded?e():this.once(nt.decoderWorkerInit,(()=>{this.isDestroyedOrClosed()?(this.debug.error(this.TAG_NAME,"init() failed and player is destroyed"),t("init() failed and player is destroyed")):(this.loaded=!0,e())})):Za(this._opt)?e():(this.decoderWorker=new ol(this),this.once(nt.decoderWorkerInit,(()=>{this.isDestroyedOrClosed()?(this.debug.error(this.TAG_NAME,"init() failed and player is destroyed"),t("init() failed and player is destroyed")):(this.loaded=!0,e())}))))}))}play(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,s)=>{if(!e&&!this._opt.url)return s("url is empty");this._closed=!1,this.loading=!0,this.playing=!1,this._times.playInitStart=aa(),e||(e=this._opt.url),this._opt.url=e,this.control&&this._opt.loadingBackground&&this.control.initLoadingBackground(),this.init().then((()=>{this.debug.log(this.TAG_NAME,"play() init and next fetch stream"),this._times.playStart=aa(),this._opt.isNotMute&&this.mute(!1),this.enableWakeLock(),this.checkLoadingTimeout(),this.stream?(this.stream.once(ct.fetchError,(e=>{this.emitError(ct.fetchError,e)})),this.stream.once(ct.websocketError,(e=>{this.emitError(ct.websocketError,e)})),this.stream.once(nt.streamEnd,(e=>{this.emit(nt.streamEnd,e)})),this.stream.once(ct.hlsError,(e=>{this.emitError(ct.hlsError,e)})),this.stream.once(ct.webrtcError,(e=>{this.emitError(ct.webrtcError,e)})),this.stream.once(nt.streamSuccess,(()=>{i(),this._times.streamResponse=aa(),this.video&&this.video.play(),this.checkStatsInterval(),this.isPlayback()&&this.playback&&this.playback.startCheckStatsInterval()})),this.stream.fetchStream(e,t)):(this.debug.warn(this.TAG_NAME,`play() this.stream is null and is isDestroyedOrClosed is ${this.isDestroyedOrClosed()}`),s("this.stream is null"))})).catch((e=>{s(e)}))}))}playForControl(){return new Promise(((e,t)=>{this.debug.log(this.TAG_NAME,`playForControl() and pauseAndNextPlayUseLastFrameShow is ${this._opt.pauseAndNextPlayUseLastFrameShow}`),this._opt.pauseAndNextPlayUseLastFrameShow&&this._tempInnerPlayBgobj&&this._tempInnerPlayBgobj.loadingBackground&&this.updateOption({loadingBackground:this._tempInnerPlayBgobj.loadingBackground,loadingBackgroundWidth:this._tempInnerPlayBgobj.loadingBackgroundWidth,loadingBackgroundHeight:this._tempInnerPlayBgobj.loadingBackgroundHeight}),this.play().then((t=>{e(t)})).catch((e=>{t(e)}))}))}close(){return new Promise(((e,t)=>{this._close().then((()=>{this.video&&this.video.clearView(),e()})).catch((e=>{t(e)}))}))}resumeAudioAfterPause(){this.lastVolume&&po(this._isMute)&&(this.volume=this.lastVolume)}async _close(){this._closed=!0,this.video&&(this.video.resetInit(),this.video.pause(!0)),this.loading=!1,this.recording=!1,this.zooming=!1,this.playing=!1,this.clearCheckLoadingTimeout(),this.clearStatsInterval(),this.isPlayback()&&this.playback&&this.playback.clearStatsInterval(),this.releaseWakeLock(),this.resetStats(),this._audioTimestamp=0,this._videoTimestamp=0,this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},this.decoderWorker&&(await this.decoderWorker.destroy(),this.decoderWorker=null),this.stream&&(await this.stream.destroy(),this.stream=null),this.demux&&(this.demux.destroy(),this.demux=null),this.webcodecsDecoder&&(this.webcodecsDecoder.destroy(),this.webcodecsDecoder=null),this.mseDecoder&&(this.mseDecoder.destroy(),this.mseDecoder=null),this.hlsDecoder&&(await this.hlsDecoder.destroy(),this.hlsDecoder=null),this.webrtc&&(this.webrtc.destroy(),this.webrtc=null),this.aliyunRtcDecoder&&(this.aliyunRtcDecoder.destroy(),this.aliyunRtcDecoder=null),this.audio&&(await this.audio.destroy(),this.audio=null)}pause(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise(((t,i)=>{e?this.close().then((()=>{t()})).catch((e=>{i(e)})):this._close().then((()=>{t()})).catch((e=>{i(e)}))}))}pauseForControl(){return new Promise(((e,t)=>{if(this.debug.log(this.TAG_NAME,"_pauseInner()"),this._opt.pauseAndNextPlayUseLastFrameShow&&this.video){const e=this.video.screenshot("","png",.92,"base64");if(e){const t=this.getVideoInfo();t?(this.debug.log(this.TAG_NAME,`pauseForControl() and loadingBackground width is ${t.width} and height is ${t.height}`),this._tempInnerPlayBgobj={loadingBackground:e,loadingBackgroundWidth:t.width,loadingBackgroundHeight:t.height}):this.debug.warn(this.TAG_NAME,"pauseForControl() and videoInfo is null")}else this.debug.warn(this.TAG_NAME,"pauseForControl() and loadingBackground is null")}this.pause().then((t=>{e(t)})).catch((e=>{t(e)}))}))}isAudioMute(){let e=!0;return this.audio&&(e=this.audio.isMute),e}isAudioNotMute(){return!this.isAudioMute()}mute(e){this.audio&&this.audio.mute(e)}resize(){this.video&&this.video.resize()}startRecord(e,t){this.recording||(this.recorder.setFileName(e,t),this.recording=!0)}stopRecordAndSave(e,t){return new Promise(((i,s)=>{this.recorder||s("recorder is null"),this.recording?(this._opt.useWasm&&this.decoderWorker&&this.decoderWorker.updateWorkConfig({key:"isRecording",value:!1}),this.recorder.stopRecordAndSave(e,t).then((e=>{i(e)})).catch((e=>{s(e)}))):s("recorder is not recording")}))}_hasControl(){let e=!1,t=!1;return Object.keys(this._opt.operateBtns).forEach((e=>{this._opt.operateBtns[e]&&-1===(""+e).indexOf("Fn")&&(t=!0)})),(this._opt.showBandwidth||t)&&(e=!0),this._opt.extendOperateBtns&&this._opt.extendOperateBtns.length>0&&(e=!0),this.isPlayback()&&this._opt.playbackConfig.showControl&&(e=!0),this._opt.controlHtml&&(e=!0),e}useWasmDecode(){return po(this._opt.useMSE)&&po(this._opt.useWCS)}canVideoTrackWritter(){const e=this._opt;return!this.isOldHls()&&!this.isWebrtcH264()&&po(e.useMSE)&&!this.isAliyunRtc()&&(e.useWCS&&po(e.useOffscreen)&&e.wcsUseVideoRender||this.useWasmDecode())}checkHeartTimeout$2(){if(po(this.playbackPause)&&this.playing){if(this.isDestroyedOrClosed())return void(this.debug&&this.debug.warn(this.TAG_NAME,"checkHeartTimeout$2 but player is destroyed"));if(po(this.isHistoryFpsListAllZero()))return void(this.debug&&this.debug.warn(this.TAG_NAME,"checkHeartTimeout$2 but fps is not all zero"));if(0!==this._stats.fps)return void(this.debug&&this.debug.warn(this.TAG_NAME,`checkHeartTimeout$2 but fps is ${this._stats.fps}`));if(po(this.visibility)&&0!==this._stats.vbps)return void(this.debug&&this.debug.warn(this.TAG_NAME,`checkHeartTimeout$2 but page is not visibility and vbps is ${this._stats.vbps}`));const e=this._historyFpsList.join(",");this.debug.warn(this.TAG_NAME,`checkHeartTimeout$2 and\n pause and emit delayTimeout event and\n current vbps is ${this._stats.vbps} and\n current fps is ${this._stats.fps} and\n history FpsList is ${e} and\n current visibility is ${this.visibility} and`),this.emit(nt.timeout,nt.delayTimeout),this.emit(nt.delayTimeout)}else this.debug.log(this.TAG_NAME,`checkHeartTimeout$2 playbackPause is ${this.playbackPause}, playing is ${this.playing}`)}checkStatsInterval(){this._checkStatsInterval=setInterval((()=>{this.updateStats()}),1e3)}checkLoadingTimeout(){this._checkLoadingTimeout=setTimeout((()=>{this.playing?this.debug.warn(this.TAG_NAME,`checkLoadingTimeout but loading is ${this.loading} and playing is ${this.playing}`):this.isDestroyedOrClosed()?this.debug&&this.debug.warn(this.TAG_NAME,"checkLoadingTimeout but player is destroyed"):(this.debug.warn(this.TAG_NAME,"checkLoadingTimeout and pause and emit loadingTimeout event"),this.emit(nt.timeout,nt.loadingTimeout),this.emit(nt.loadingTimeout))}),1e3*this._opt.loadingTimeout)}clearCheckLoadingTimeout(){this._checkLoadingTimeout&&(this.debug.log(this.TAG_NAME,"clearCheckLoadingTimeout"),clearTimeout(this._checkLoadingTimeout),this._checkLoadingTimeout=null)}clearStatsInterval(){this._checkStatsInterval&&(clearInterval(this._checkStatsInterval),this._checkStatsInterval=null)}handleRender(){this.isDestroyedOrClosed()?this.debug&&this.debug.warn(this.TAG_NAME,"handleRender but player is destroyed"):(this.loading&&(this.clearCheckLoadingTimeout(),this.loading=!1,this.emit(nt.start)),this.playing||(this.playing=!0))}updateStats(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._startBpsTime||(this._startBpsTime=aa()),Ba(e.ts)){const t=parseInt(e.ts,10);this._stats.ts=t,null===this._playingStartTimestamp&&t>0&&(this._playingStartTimestamp=t)}Ba(e.dts)&&(this._stats.dts=parseInt(e.dts,10)),Ba(e.mseTs)&&(this._stats.mseTs=e.mseTs),Ba(e.buf)&&(this._stats.buf=e.buf),Ba(e.netBuf)&&(this._stats.netBuf=e.netBuf),Ba(e.currentPts)&&(this._stats.currentPts=e.currentPts),e.fps&&(this._stats.fps+=1),e.dfps&&(this._stats.dfps+=1),e.abps&&(this._stats.abps+=e.abps),e.vbps&&(this._stats.vbps+=e.vbps),e.workerStats&&(this._tempWorkerStats=e.workerStats),e.isDropping&&(this._stats.isDropping=e.isDropping),e.mseVideoBufferDelayTime&&(this._stats.mseVideoBufferDelayTime=parseInt(1e3*e.mseVideoBufferDelayTime,10));const t=aa();if(t-this._startBpsTime<1e3)return;null!==this._playingStartTimestamp&&this._stats.fps>0&&(this._stats.pTs+=1);let i=0,s=0,r=0,a=0,o=0;this._opt.useMSE&&(this.mseDecoder?(i=this.mseDecoder.checkSourceBufferDelay(),i=parseInt(1e3*i,10),s=this.mseDecoder.checkSourceBufferStore(),s=s.toFixed(2),r=this.mseDecoder.getDecodeDiffTimes(),a=this.mseDecoder.getDecodePlaybackRate(),o=this.mseDecoder.getPendingSegmentsLength()):this.isMseDecoderUseWorker()&&(i=this.video.checkSourceBufferDelay(),i=parseInt(1e3*i,10),s=this.video.checkSourceBufferStore(),s=s.toFixed(2),a=this.video.getDecodePlaybackRate())),this._opt.useWCS&&this.webcodecsDecoder&&(r=this.webcodecsDecoder.getDecodeDiffTimes()),this.isOldHls()&&this.hlsDecoder&&(i=this.hlsDecoder.checkHlsBufferedDelay(),i=parseInt(1e3*i,10));let n=0,l=0,d=0;this.isUseHls265()&&this.hlsDecoder&&(i=this.hlsDecoder.checkHlsBufferedDelay(),i=i.toFixed(2),n=this.hlsDecoder.getDemuxBufferedListLength(),d=this.hlsDecoder.getDemuxVideoBufferedListLength(),l=this.hlsDecoder.getDemuxAudioBufferedListLength());let h=0,c=0,u=0,p=!1,f=0;this._opt.useWasm||this._opt.demuxUseWorker?this._tempWorkerStats&&(c=this._tempWorkerStats.demuxBufferDelay,u=this._tempWorkerStats.audioDemuxBufferDelay,h=this._tempWorkerStats.streamBufferByteLength,this._stats.netBuf=this._tempWorkerStats.netBuf,f=this._tempWorkerStats.pushLatestDelay,p=this._tempWorkerStats.isStreamTsMoreThanLocal,this._stats.buf=this._tempWorkerStats.latestDelay):this.demux&&(h=this.demux.getInputByteLength(),f=this.demux.getPushLatestDelay(),p=this.demux.getIsStreamTsMoreThanLocal(),this.demux.bufferList&&(c=this.demux.bufferList.length));let m=0,g=0;this.audio&&this.audio.bufferList&&(m=this.audio.bufferList.length,g=parseInt(m*this.audio.oneBufferDuration,10));let y=0,A=0;if(this.isPlayback()&&this.video){this._opt.playbackConfig.isUseFpsRender&&(y=this.video.bufferList&&this.video.bufferList.length||0);let e=this.video.getStreamFps();const t=e>0?1e3/e:0;A=parseInt(t*y+t*c,10)}let b=0;this.videoTimestamp>0&&(b=this._stats.dts-this.videoTimestamp);const v=b+this._stats.netBuf;this.isOldHls()&&(this._stats.fps=this.hlsDecoder.getFps()),this._stats.fps>this._stats.maxFps&&(this._stats.maxFps=this._stats.fps);let _=this.getVideoCurrentTime();const S=this._stats.videoCurrentTime;let w=-1;S&&_&&(w=(_-S).toFixed(2),_=_.toFixed(2));let E=0;this.audioTimestamp>0&&(E=this.audioTimestamp-this.getRenderCurrentPts()),this._allStatsData=Object.assign(this._stats,{audioBuffer:m,audioBufferDelayTs:g,audioTs:this.audioTimestamp,latestAudioTs:this.latestAudioTimestamp,playbackVideoBuffer:y,playbackVideoWaitingBuffer:0,playbackAudioWaitingBuffer:0,playbackCacheDataDuration:A,demuxBuffer:c,pushLatestDelay:f,audioDemuxBuffer:u,streamBuffer:h,mseDelay:i,mseStore:s,mseDecodeDiffTimes:r,mseDecodePlaybackRate:a,msePendingBuffer:o,wcsDecodeDiffTimes:r,hlsDelay:i,hlsDemuxLength:n,hlsDemuxAudioLength:l,hlsDemuxVideoLength:d,delayTs:b,totalDelayTs:v,isStreamTsMoreThanLocal:p,videoCurrentTime:_,videoCurrentTimeDiff:w,audioSyncVideo:E});let k=null,C=null,x="";if(this.isPlayer()&&this._opt.hasVideo&&this.playing){k=function(e,t){let i=3;const s=t||25;return e<.33*s?i=0:e<.5*s?i=1:e<.83*s&&(i=2),i}(this._stats.fps,this._flvMetaDataFps),this._allStatsData.performance=k;const e=this.checkVideoSmooth(this._allStatsData);x=e.reason,C=e.result,this._allStatsData.videoSmooth=C}this.emit(nt.stats,this._allStatsData),this._allStatsData.streamBuffer>this._opt.flvDemuxBufferSizeMaxLarge&&this.getDemuxType()===T&&this.emit(ct.flvDemuxBufferSizeTooLarge,this._allStatsData.streamBuffer),this._opt.hasVideo?(this.updateHistoryFpsList(this._stats.fps,this._stats.videoCurrentTimeDiff),Ba(k)&&this.emit(nt.performance,k),Ba(C)&&this.emit(nt.videoSmooth,C,x)):this._opt.hasAudio&&this.updateHistoryFpsList(this._stats.abps,0),this._stats.fps=0,this._stats.dfps=0,this._stats.abps=0,this._stats.vbps=0,this._stats.isDropping=!1,this._startBpsTime=t}resetStats(){this._startBpsTime=null,this._playingStartTimestamp=null,this._historyFpsList=[],this._historyVideoDiffList=[],this._stats={buf:0,netBuf:0,fps:0,maxFps:0,dfps:0,abps:0,vbps:0,ts:0,mseTs:0,currentPts:0,pTs:0,dts:0,mseVideoBufferDelayTime:0,isDropping:!1},this._allStatsData={}}checkVideoSmooth(e){let t=!0,i="";if(this._opt.videoBuffer,this._opt.videoBufferDelay,this.isWebrtcH264()||this.isOldHls())return{result:t,reason:i};if(0===e.vbps&&po(this._opt.isHls)&&(i="vbpsIsZero",this.debug.log(this.TAG_NAME,`checkVideoSmooth false because ${i}`),t=!1),t&&e.isDropping&&(i="isDroppingIsTrue",this.debug.log(this.TAG_NAME,`checkVideoSmooth false because ${i}`),t=!1),t&&this.visibility&&this._historyFpsList.length>=this._opt.heartTimeout){const s=function(e){const t=Math.max(...e),i=Math.min(...e);return e.filter((e=>e!==t&&e!==i))}(this._historyFpsList),r=s.reduce(((e,t)=>e+t),0)/s.length,a=.83*r;e.fps<a&&(i="fpsIsLow",this.debug.log(this.TAG_NAME,`checkVideoSmooth false because fps is ${e.fps} < min fix is ${a} and avgFps is ${r}`),t=!1)}return t&&this.visibility&&this._opt.useMSE&&(e.videoCurrentTimeDiff>=1.5||e.videoCurrentTimeDiff<=.5)&&-1!==e.videoCurrentTimeDiff&&(i="videoCurrentTimeDiffIsNotNormal",this.debug.log(this.TAG_NAME,`checkVideoSmooth false because videoCurrentTimeDiff is ${e.videoCurrentTimeDiff}`),t=!1),{result:t,reason:i}}enableWakeLock(){this._opt.keepScreenOn&&this.keepScreenOn&&this.keepScreenOn.enable()}releaseWakeLock(){this._opt.keepScreenOn&&this.keepScreenOn&&this.keepScreenOn.disable()}clearBufferDelay(){this._opt.useWasm?this.decoderWorker&&this.decoderWorker.clearWorkBuffer(!0):this.demux&&this.demux.clearBuffer(!0)}doDestroy(){this.emit(nt.beforeDestroy)}handlePlayToRenderTimes(){if(this.isDestroyedOrClosed())return void this.debug.log(this.TAG_NAME,"handlePlayToRenderTimes but player is closed or destroyed");const e=this.getPlayToRenderTimes();this.emit(nt.playToRenderTimes,e)}getPlayToRenderTimes(){const e=this._times;return e.playTimestamp=e.playStart-e.playInitStart,e.streamTimestamp=e.streamStart-e.playStart,e.streamResponseTimestamp=e.streamResponse-e.streamStart>0?e.streamResponse-e.streamStart:0,e.demuxTimestamp=e.demuxStart-e.streamResponse>0?e.demuxStart-e.streamResponse:0,e.decodeTimestamp=e.decodeStart-e.demuxStart>0?e.decodeStart-e.demuxStart:0,e.videoTimestamp=e.videoStart-e.decodeStart,e.allTimestamp=e.videoStart-e.playInitStart,e}getOption(){return this._opt}getPlayType(){return this._opt.playType}isPlayer(){return this._opt.playType===b}isPlayback(){return this._opt.playType===_}isDemuxSetCodecInit(){let e=!0,t=this._opt;return t.useWCS&&!t.useOffscreen?e=!!this.webcodecsDecoder&&this.webcodecsDecoder.hasInit:t.useMSE&&(e=!!this.mseDecoder&&this.mseDecoder.hasInit),e}isDemuxDecodeFirstIIframeInit(){let e=!0,t=this._opt;return t.useWCS&&!t.useOffscreen?e=!!this.webcodecsDecoder&&this.webcodecsDecoder.isDecodeFirstIIframe:t.useMSE&&(e=!!this.mseDecoder&&this.mseDecoder.isDecodeFirstIIframe),e}isAudioPlaybackRateSpeed(){let e=!1;return this.audio&&(e=this.audio.isPlaybackRateSpeed()),e}getPlayingTimestamp(){return this._stats.pTs}getRecordingType(){let e=null;return this.recorder&&(e=this.recorder.getType()),e}getRecordingByteLength(){let e=0;return this.recording&&(e=this.recorder.getToTalByteLength()),e}getRecordingDuration(){let e=0;return this.recording&&(e=this.recorder.getTotalDuration()),e}getDecodeType(){let e="";const t=this.getOption();return this.isWebrtcH264()?G:this.isAliyunRtc()?V:this.isOldHls()?H:(t.useMSE&&(e+=U+" ",t.mseDecoderUseWorker&&(e+="worker")),t.useWCS&&(e+=F+" "),t.useWasm&&(e+=N+" ",t.useSIMD&&(e+=j+" "),t.useMThreading&&(e+=z+" ")),t.useOffscreen&&(e+=O+" "),e)}getDemuxType(){return this._opt.demuxType}getRenderType(){let e="";return this.video&&(e=this.video.getType()),e}getCanvasRenderType(){let e="";return this.video&&(e=this.video.getCanvasType()),e}getAudioEngineType(){let e="";return this.audio&&(e=this.audio.getEngineType()),e}getStreamType(){let e="";return this.stream&&(e=this.stream.getStreamType()),e}getAllStatsData(){return this._allStatsData}isFlvDemux(){return this._opt.demuxType===T}isM7SDemux(){return this._opt.demuxType===k}isNakedFlowDemux(){return this._opt.demuxType===D}isMpeg4Demux(){return this._opt.demuxType===P}isTsDemux(){return this._opt.demuxType===I}isFmp4Demux(){return this._opt.demuxType===L}togglePerformancePanel(e){this.updateOption({showPerformance:e}),this.emit(nt.togglePerformancePanel,e)}setScaleMode(e){let t={isFullResize:!1,isResize:!1,aspectRatio:"default"};switch(e=Number(e)){case Qt:t.isFullResize=!1,t.isResize=!1;break;case Xt:t.isFullResize=!1,t.isResize=!0;break;case Zt:t.isFullResize=!0,t.isResize=!0}this.updateOption(t),this.resize(),this.emit(nt.viewResizeChange,e)}startVisibilityHiddenTimeout(){this.clearVisibilityHiddenTimeout(),this._opt.pageVisibilityHiddenTimeout>0&&(this.visibilityHiddenTimeout=setTimeout((()=>{this.emit(nt.visibilityHiddenTimeout)}),1e3*this._opt.pageVisibilityHiddenTimeout))}clearVisibilityHiddenTimeout(){this._checkVisibleHiddenTimeout&&(clearTimeout(this._checkVisibleHiddenTimeout),this._checkVisibleHiddenTimeout=null)}faceDetect(e){this.faceDetectActive=e,po(e)&&this.video&&this.video.addAiContentToCanvas([])}objectDetect(e){this.objectDetectActive=e,po(e)&&this.video&&this.video.addAiContentToCanvas([])}occlusionDetect(e){this.occlusionDetectActive=e}downloadNakedFlowFile(){this.demux&&this.demux.downloadNakedFlowFile&&this.demux.downloadNakedFlowFile()}downloadFmp4File(){this.demux&&this.demux.downloadFmp4File&&this.demux.downloadFmp4File()}downloadMpeg4File(){const e=new Blob([this._tempStreamList]);try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=Date.now()+".mpeg4",t.click(),window.URL.revokeObjectURL(t.href)}catch(e){console.error("downloadMpeg4File",e)}}hasCacheOnGopBuffer(){const e=this.videoIframeIntervalTs,t=this._allStatsData.demuxBuffer,i=this._allStatsData.maxFps;let s=!1;if(e&&t&&i){s=1e3/i*t>e}return s}addContentToCanvas(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.video&&this.video.addContentToCanvas(e)}addContentToContainer(){}sendWebsocketMessage(e){const t=this.getStreamType();t===f||t===y+" "+f?this.stream.sendMessage(e):this.debug.warn(this.TAG_NAME,`sendWebsocketMessage: stream type is not websocket, current stream type is ${this.getStreamType()}`)}checkIsInRender(){const e=this._stats;return e.vbps>0&&e.fps>0}setControlHtml(e){this.control&&this.control.$controlHtml&&(this.control.$controlHtml.innerHTML=e)}clearControlHtml(){this.control&&this.control.$controlHtml&&(this.control.$controlHtml.innerHTML="")}updateWatermark(e){this.singleWatermark&&this.singleWatermark.update(e)}removeWatermark(){this.singleWatermark&&this.singleWatermark.remove()}getVideoInfo(){let e=null;return this.video&&(e=this.video.getVideoInfo()),e}getAudioInfo(){let e=null;return this.audio&&(e=this.audio.getAudioInfo()),e}getVideoPlaybackQuality(){let e=null;return this.video&&(e=this.video.getPlaybackQuality()),e}emitError(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.emit(nt.error,e,t),this.emit(e,t)}updateHistoryFpsList(e,t){this.playbackPause||(this._historyFpsList.length>this._opt.heartTimeout&&(this._historyFpsList.shift(),this._historyVideoDiffList.shift()),this._historyFpsList.push(e),this._historyVideoDiffList.push(t),this.isHistoryFpsListAllZero()&&this.checkHeartTimeout$2())}isHistoryFpsListAllZero(){let e=!0;if(this._historyFpsList.length<this._opt.heartTimeout&&(e=!1),e)for(let t=0;t<this._historyFpsList.length;t++)if(this._historyFpsList[t]>0){e=!1;break}if(e)for(let t=0;t<this._historyVideoDiffList.length;t++)if(this._historyVideoDiffList[t]>0){e=!1;break}return e}isUseHls265(){return uo(this._opt.isHls)&&uo(this._opt.supportHls265)}isHls(){return uo(this._opt.isHls)}isOldHls(){return uo(this._opt.isHls)&&po(this._opt.supportHls265)}isWebrtcNotH265(){return uo(this._opt.isWebrtc)&&po(this._opt.isWebrtcH265)}isWebrtcH264(){return uo(this._opt.isWebrtc)&&po(this._opt.isWebrtcH265)}isWebrtcH265(){return uo(this._opt.isWebrtc)&&uo(this._opt.isWebrtcH265)}isAliyunRtc(){return uo(this._opt.isAliyunRtc)}isUseHls265UseMse(){return this.isUseHls265()&&this.isUseMSE()}isStreamWebTransport(){return this.getStreamType()===g}isPlaybackCacheBeforeDecodeForFpsRender(){return this.isPlayback()&&uo(this._opt.playbackConfig.isCacheBeforeDecodeForFpsRender)&&uo(this._opt.useWCS)}isPlaybackUseWCS(){return this.isPlayback()&&uo(this._opt.useWCS)}isPlaybackUseMSE(){return this.isPlayback()&&uo(this._opt.useMSE)}isPlayUseMSE(){return this.isPlayer()&&uo(this._opt.useMSE)}isInWebFullscreen(){return this._opt.useWebFullScreen&&ua()&&this.fullscreen}getPlaybackRate(){let e=1;return uo(this.isPlayback())&&this.playback&&(e=this.playback.rate),e}isPlaybackOnlyDecodeIFrame(){return uo(this.isPlayback())&&this.getPlaybackRate()>=this._opt.playbackForwardMaxRateDecodeIFrame}pushTempStream(e){const t=new Uint8Array(e);this._tempStreamList.push(t)}updateLoadingText(e){this.loading&&this.control&&this.control.updateLoadingText(e)}getVideoCurrentTime(){let e=0;return this.video&&(this._opt.useMSE?this.mseDecoder?e=this.mseDecoder.getVideoCurrentTime():this.isMseDecoderUseWorker()&&(e=this.video.getVideoCurrentTime()):this.isWebrtcH264()&&this.webrtc?e=this.webrtc.getVideoCurrentTime():this.isAliyunRtc()&&this.aliyunRtcDecoder&&(e=this.aliyunRtcDecoder.getVideoCurrentTime())),e}addMemoryLog(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];this.emit(nt.memoryLog,` [${e}] `,...i)}downloadMemoryLog(){this.emit(nt.downloadMemoryLog)}isInMulti(){return-1!==this._opt.multiIndex}isWebrtcForM7S(){return po(this._opt.isWebrtcForZLM)&&po(this._opt.isWebrtcForSRS)&&po(this._opt.isWebrtcForOthers)}updateMetaData(e){if(this.debug.log(this.TAG_NAME,"updateMetaData",JSON.stringify(e)),this._flvMetaData=e,this._flvMetaData){const e=this._flvMetaData;if(Ta(e.framerate)){const t=Math.floor(1e3*e.framerate);if(t>0){const e=t/1e3;this._flvMetaDataFps=e}}Pa(e.hasAudio)&&po(e.hasAudio)&&(this.debug.log("updateMetaData","hasAudio",e.hasAudio,"and update _opt.hasAudio"),this._opt.hasAudio=e.hasAudio),Pa(e.hasVideo)&&po(e.hasVideo)&&(this.debug.log("updateMetaData","hasVideo",e.hasVideo,"and update _opt.hasVideo"),this._opt.hasVideo=e.hasVideo)}this.emit(nt.flvMetaData,e)}getMetaData(){return this._flvMetaData}getExtendBtnList(){return this.control.getExtendBtnList().map((e=>({name:e.name,$container:e.$iconContainer,$btn:e.$iconWrap,$activeBtn:e.$activeIconWrap})))}getCpuLevel(){let e=null;return this.pressureObserverCpu&&(e=this.pressureObserverCpu.getCurrentCpuState()),e}isRecordTypeFlv(){return this.recorder&&this._opt.recordType===E}isRecordTypeMp4(){return this.recorder&&this._opt.recordType===S}isRecordTypeWebm(){return this.recorder&&this._opt.recordType===w}isDemuxInWorker(){return this._opt.useWasm||this._opt.demuxUseWorker}isUseMSE(){return uo(this._opt.useMSE)}isUseWCS(){return uo(this._opt.useWCS)}isUseWASM(){return uo(this._opt.useWasm)}isMseDecoderUseWorker(){return this.isUseMSE()&&uo(this._opt.mseDecoderUseWorker)}getAudioSyncVideoDiff(){return this.audioTimestamp-this.getRenderCurrentPts()}getMseVideoBufferDelayTime(){let e=0;return this._opt.useMSE&&this.mseDecoder&&(this.mseDecoder?e=this.mseDecoder.getVideoBufferDelayTime():this.isMseDecoderUseWorker()&&(e=this.video.getVideoBufferDelayTime()),e=parseInt(1e3*e,10)),e}updateCurrentPts(e){this.updateStats({currentPts:e}),this.emit(nt.currentPts,e)}getRenderCurrentPts(){let e=0;return e=this._stats.currentPts?this._stats.currentPts:this.videoTimestamp-this.getMseVideoBufferDelayTime(),e}openSyncAudioAndVideo(){return this._opt.syncAudioAndVideo&&this._opt.hasVideo}showTipsMessageByCode(e){if(this.control){const t=this._opt.showMessageConfig[e]||"未知异常";this.control.showTipsMessage(t,e)}}showTipsMessageByContent(e){this.control&&e&&this.control.showTipsMessage(e)}hideTipsMessage(){this.control&&this.control.hideTipsMessage()}decoderCheckFirstIFrame(){uo(this._opt.checkFirstIFrame)&&(this.mseDecoder?this.mseDecoder.isDecodeFirstIIframe=!1:this.webcodecsDecoder&&(this.webcodecsDecoder.isDecodeFirstIIframe=!1))}isHlsCanVideoPlay(){return this._canPlayAppleMpegurl&&this.isOldHls()}setPtzPosition(e){this.control&&this.control.updatePtzPosition(e)}setPlayFailedAndPaused(){this.isPlayFailedAndPaused=!0}getMseMineType(){let e={};return this.mseDecoder&&(e=this.mseDecoder.getMimeType()),e}getMaxDelayTs(){return this._opt.videoBuffer+this._opt.videoBufferDelay}isMseVideoStateInited(){return!this.video||this.video.getReadyStateInited()}}class Qb{constructor(e){const{fromSampleRate:t,toSampleRate:i,channels:s,inputBufferSize:r}=e;if(!t||!i||!s)throw new Error("Invalid settings specified for the resampler.");this.resampler=null,this.fromSampleRate=t,this.toSampleRate=i,this.channels=s||0,this.inputBufferSize=r,this.initialize()}initialize(){this.fromSampleRate==this.toSampleRate?(this.resampler=e=>e,this.ratioWeight=1):(this.fromSampleRate<this.toSampleRate?(this.linearInterpolation(),this.lastWeight=1):(this.multiTap(),this.tailExists=!1,this.lastWeight=0),this.initializeBuffers(),this.ratioWeight=this.fromSampleRate/this.toSampleRate)}bufferSlice(e){try{return this.outputBuffer.subarray(0,e)}catch(t){try{return this.outputBuffer.length=e,this.outputBuffer}catch(t){return this.outputBuffer.slice(0,e)}}}initializeBuffers(){this.outputBufferSize=Math.ceil(this.inputBufferSize*this.toSampleRate/this.fromSampleRate/this.channels*1.0000004768371582)+this.channels+this.channels;try{this.outputBuffer=new Float32Array(this.outputBufferSize),this.lastOutput=new Float32Array(this.channels)}catch(e){this.outputBuffer=[],this.lastOutput=[]}}linearInterpolation(){this.resampler=e=>{let t,i,s,r,a,o,n,l,d,h=e.length,c=this.channels;if(h%c!=0)throw new Error("Buffer was of incorrect sample length.");if(h<=0)return[];for(t=this.outputBufferSize,i=this.ratioWeight,s=this.lastWeight,r=0,a=0,o=0,n=0,l=this.outputBuffer;s<1;s+=i)for(a=s%1,r=1-a,this.lastWeight=s%1,d=0;d<this.channels;++d)l[n++]=this.lastOutput[d]*r+e[d]*a;for(s-=1,h-=c,o=Math.floor(s)*c;n<t&&o<h;){for(a=s%1,r=1-a,d=0;d<this.channels;++d)l[n++]=e[o+(d>0?d:0)]*r+e[o+(c+d)]*a;s+=i,o=Math.floor(s)*c}for(d=0;d<c;++d)this.lastOutput[d]=e[o++];return this.bufferSlice(n)}}multiTap(){this.resampler=e=>{let t,i,s,r,a,o,n,l,d,h,c,u=e.length,p=this.channels;if(u%p!=0)throw new Error("Buffer was of incorrect sample length.");if(u<=0)return[];for(t=this.outputBufferSize,i=[],s=this.ratioWeight,r=0,o=0,n=0,l=!this.tailExists,this.tailExists=!1,d=this.outputBuffer,h=0,c=0,a=0;a<p;++a)i[a]=0;do{if(l)for(r=s,a=0;a<p;++a)i[a]=0;else{for(r=this.lastWeight,a=0;a<p;++a)i[a]=this.lastOutput[a];l=!0}for(;r>0&&o<u;){if(n=1+o-c,!(r>=n)){for(a=0;a<p;++a)i[a]+=e[o+(a>0?a:0)]*r;c+=r,r=0;break}for(a=0;a<p;++a)i[a]+=e[o++]*n;c=o,r-=n}if(0!==r){for(this.lastWeight=r,a=0;a<p;++a)this.lastOutput[a]=i[a];this.tailExists=!0;break}for(a=0;a<p;++a)d[h++]=i[a]/s}while(o<u&&h<t);return this.bufferSlice(h)}}resample(e){return this.fromSampleRate==this.toSampleRate?this.ratioWeight=1:(this.fromSampleRate<this.toSampleRate?this.lastWeight=1:(this.tailExists=!1,this.lastWeight=0),this.initializeBuffers(),this.ratioWeight=this.fromSampleRate/this.toSampleRate),this.resampler(e)}}const Xb=[255,511,1023,2047,4095,8191,16383,32767];function Zb(e,t,i){for(let s=0;s<i;s++)if(e<=t[s])return s;return i}function ev(e){const t=[];return Array.prototype.slice.call(e).forEach(((e,i)=>{t[i]=function(e){let t,i,s;return e>=0?t=213:(t=85,(e=-e-1)<0&&(e=32767)),i=Zb(e,Xb,8),i>=8?127^t:(s=i<<4,s|=i<2?e>>4&15:e>>i+3&15,s^t)}(e)})),t}function tv(e){const t=[];return Array.prototype.slice.call(e).forEach(((e,i)=>{t[i]=function(e){let t=0;e<0?(e=132-e,t=127):(e+=132,t=255);let i=Zb(e,Xb,8);return i>=8?127^t:(i<<4|e>>i+3&15)^t}(e)})),t}class iv extends So{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),this._opt={},e&&(this.player=e),this.TAG_NAME="talk";const i=no(Is);this._opt=Object.assign({},i,t),this._opt.sampleRate=parseInt(this._opt.sampleRate,10),this._opt.sampleBitsWidth=parseInt(this._opt.sampleBitsWidth,10),this.audioContext=null,this.gainNode=null,this.recorder=null,this.workletRecorder=null,this.biquadFilter=null,this.userMediaStream=null,this.clearWorkletUrlTimeout=null,this.bufferSize=512,this._opt.audioBufferLength=this.calcAudioBufferLength(),this.audioBufferList=[],this.socket=null,this.socketStatus=ut,this.mediaStreamSource=null,this.heartInterval=null,this.checkGetUserMediaTimeout=null,this.wsUrl=null,this.startTimestamp=0,this.sequenceId=0,this.tempTimestamp=null,this.tempG711BufferList=[],this.tempRtpBufferList=[],this.tempPcmBufferList=[],this.events=new _o(this),this._initTalk(),this.player||(this.debug=new Pr(this)),this._opt.encType!==Hi&&this._opt.encType!==Vi||8e3===this._opt.sampleRate&&16===this._opt.sampleBitsWidth||this.warn(this.TAG_NAME,`\n encType is ${this._opt.encType} and sampleBitsWidth is ${this._opt.sampleBitsWidth}, set sampleBitsWidth to ${this._opt.sampleBitsWidth}。\n ${this._opt.encType} only support sampleRate 8000 and sampleBitsWidth 16`),this.log(this.TAG_NAME,"init",JSON.stringify(this._opt))}destroy(){this.clearWorkletUrlTimeout&&(clearTimeout(this.clearWorkletUrlTimeout),this.clearWorkletUrlTimeout=null),this.userMediaStream&&(this.userMediaStream.getTracks&&this.userMediaStream.getTracks().forEach((e=>{e.stop()})),this.userMediaStream=null),this.mediaStreamSource&&(this.mediaStreamSource.disconnect(),this.mediaStreamSource=null),this.recorder&&(this.recorder.disconnect(),this.recorder.onaudioprocess=null,this.recorder=null),this.biquadFilter&&(this.biquadFilter.disconnect(),this.biquadFilter=null),this.gainNode&&(this.gainNode.disconnect(),this.gainNode=null),this.workletRecorder&&(this.workletRecorder.disconnect(),this.workletRecorder=null),this.socket&&(this.socketStatus===pt&&this._sendClose(),this.socket.close(),this.socket=null),this._stopHeartInterval(),this._stopCheckGetUserMediaTimeout(),this.audioContext=null,this.gainNode=null,this.recorder=null,this.audioBufferList=[],this.sequenceId=0,this.wsUrl=null,this.tempTimestamp=null,this.tempRtpBufferList=[],this.tempG711BufferList=[],this.tempPcmBufferList=[],this.startTimestamp=0,this.log(this.TAG_NAME,"destroy")}addRtpToBuffer(e){const t=e.length+this.tempRtpBufferList.length,i=new Uint8Array(t);i.set(this.tempRtpBufferList,0),i.set(e,this.tempRtpBufferList.length),this.tempRtpBufferList=i}addG711ToBuffer(e){const t=e.length+this.tempG711BufferList.length,i=new Uint8Array(t);i.set(this.tempG711BufferList,0),i.set(e,this.tempG711BufferList.length),this.tempG711BufferList=i}addPcmToBuffer(e){const t=e.length+this.tempPcmBufferList.length,i=new Uint8Array(t);i.set(this.tempPcmBufferList,0),i.set(e,this.tempPcmBufferList.length),this.tempG711ButempPcmBufferListfferList=i}downloadRtpFile(){this.debug.log(this.TAG_NAME,"downloadRtpFile");const e=new Blob([this.tempRtpBufferList]);try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=Date.now()+".rtp",t.click(),window.URL.revokeObjectURL(t.href)}catch(e){console.error("downloadRtpFile",e)}}downloadG711File(){this.debug.log(this.TAG_NAME,"downloadG711File");const e=new Blob([this.tempG711BufferList]);try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=Date.now()+"."+this._opt.encType,t.click(),window.URL.revokeObjectURL(t.href)}catch(e){console.error("downloadG711File",e)}}downloadPcmFile(){this.debug.log(this.TAG_NAME,"downloadPcmFile");const e=new Blob([this.tempPcmBufferList]);try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=Date.now()+"."+this._opt.encType,t.click(),window.URL.revokeObjectURL(t.href)}catch(e){console.error("downloadRtpFile",e)}}downloadFile(){this._opt.packetType===ks?this.downloadRtpFile():this._opt.encType===Hi||this._opt.encType===Vi?this.downloadG711File():this.downloadPcmFile()}calcAudioBufferLength(){const{sampleRate:e,sampleBitsWidth:t}=this._opt;return 8*e*.02/8}get socketStatusOpen(){return this.socketStatus===pt}log(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this._log("log",...t)}warn(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this._log("warn",...t)}error(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this._log("error",...t)}_log(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];this.player?this.player.debug[e](...i):this.debug?this.debug[e](...i):console[e](...i)}_getSequenceId(){return++this.sequenceId}_createWebSocket(){return new Promise(((e,t)=>{const i=this.events.proxy;this.socket=new WebSocket(this.wsUrl),this.socket.binaryType="arraybuffer",this.emit(nt.talkStreamStart),i(this.socket,xs,(()=>{this.socketStatus=pt,this.log(this.TAG_NAME,"websocket open -> do talk"),this.emit(nt.talkStreamOpen),e(),this._doTalk()})),i(this.socket,Ls,(e=>{this.log(this.TAG_NAME,"websocket message",e.data)})),i(this.socket,Rs,(e=>{this.socketStatus=ft,this.warn(this.TAG_NAME,"websocket close -> reject",e),this.emit(nt.talkStreamClose),t(e)})),i(this.socket,Ds,(e=>{this.socketStatus=mt,this.error(this.TAG_NAME,"websocket error -> reject",e),this.emit(nt.talkStreamError,e),t(e)}))}))}_sendClose(){}_initTalk(){this._initMethods(),this._opt.engine===Ps?this._initWorklet():this._opt.engine===Bs&&this._initScriptProcessor(),this.log(this.TAG_NAME,"audioContext samplerate",this.audioContext.sampleRate)}_initMethods(){this.audioContext=new(window.AudioContext||window.webkitAudioContext)({sampleRate:48e3}),this.gainNode=this.audioContext.createGain(),this.gainNode.gain.value=1,this.biquadFilter=this.audioContext.createBiquadFilter(),this.biquadFilter.type="lowpass",this.biquadFilter.frequency.value=3e3,this.resampler=new Qb({fromSampleRate:this.audioContext.sampleRate,toSampleRate:this._opt.sampleRate,channels:this._opt.numberChannels,inputBufferSize:this.bufferSize})}_initScriptProcessor(){const e=this.audioContext.createScriptProcessor||this.audioContext.createJavaScriptNode;this.recorder=e.apply(this.audioContext,[this.bufferSize,this._opt.numberChannels,this._opt.numberChannels]),this.recorder.onaudioprocess=e=>this._onaudioprocess(e)}_initWorklet(){const e=eo((function(){class e extends AudioWorkletProcessor{constructor(e){super(),this._cursor=0,this._bufferSize=e.processorOptions.bufferSize,this._buffer=new Float32Array(this._bufferSize)}process(e,t,i){if(!e.length||!e[0].length)return!0;for(let t=0;t<e[0][0].length;t++)this._cursor+=1,this._cursor===this._bufferSize&&(this._cursor=0,this.port.postMessage({eventType:"data",buffer:this._buffer})),this._buffer[this._cursor]=e[0][0][t];return!0}}registerProcessor("talk-processor",e)}));this.audioContext.audioWorklet&&this.audioContext.audioWorklet.addModule(e).then((()=>{const e=new AudioWorkletNode(this.audioContext,"talk-processor",{processorOptions:{bufferSize:this.bufferSize}});e.connect(this.gainNode),e.port.onmessage=e=>{"data"===e.data.eventType&&this._encodeAudioData(e.data.buffer)},this.workletRecorder=e})),this.clearWorkletUrlTimeout=setTimeout((()=>{URL.revokeObjectURL(e),this.clearWorkletUrlTimeout=null}),te)}_onaudioprocess(e){const t=e.inputBuffer.getChannelData(0);this._encodeAudioData(new Float32Array(t))}_encodeAudioData(e){if(0===e[0]&&0===e[1])return void this.log(this.TAG_NAME,"empty audio data");const t=this.resampler.resample(e);let i=t;if(16===this._opt.sampleBitsWidth?i=function(e){let t=e.length,i=new Int16Array(t);for(;t--;){let s=Math.max(-1,Math.min(1,e[t]));i[t]=s<0?32768*s:32767*s}return i}(t):8===this._opt.sampleBitsWidth&&(i=function(e){let t=e.length,i=new Int8Array(t);for(;t--;){let s=Math.max(-1,Math.min(1,e[t]));const r=s<0?32768*s:32767*s;i[t]=parseInt(255/(65535/(32768+r)),10)}return i}(t)),null!==i.buffer){let e=null;this._opt.encType===Hi?e=ev(i):this._opt.encType===Vi?e=tv(i):this._opt.encType===$i&&(e=i);const t=new Uint8Array(e);for(let e=0;e<t.length;e++){let i=this.audioBufferList.length;this.audioBufferList[i++]=t[e],this.audioBufferList.length===this._opt.audioBufferLength&&(this._sendTalkMsg(new Uint8Array(this.audioBufferList)),this.audioBufferList=[])}}}_parseAudioMsg(e){let t=null;return this._opt.packetType!==ks||this._opt.encType!==Hi&&this._opt.encType!==Vi?this._opt.packetType===Ts&&(t=e):t=this.rtpPacket(e),t}rtpPacket(e){const t=[];let i=0,s=0,r=0;const a=this._opt.rtpSsrc,o=e.length;this._opt.encType===Hi?i=Ss:this._opt.encType===Vi?i=ws:this._opt.encType===Wi&&(i=Es),this.startTimestamp||(this.startTimestamp=aa()),r=aa()-this.startTimestamp,s=this._getSequenceId();let n=0;if(this._opt.packetTcpSendType===Cs){const e=o+12;t[n++]=255&e>>8,t[n++]=255&e>>0}t[n++]=128,t[n++]=128+i,t[n++]=s/256,t[n++]=s%256,t[n++]=r/65536/256,t[n++]=r/65536%256,t[n++]=r%65536/256,t[n++]=r%65536%256,t[n++]=a/65536/256,t[n++]=a/65536%256,t[n++]=a%65536/256,t[n++]=a%65536%256;let l=t.concat([...e]),d=new Uint8Array(l.length);for(let e=0;e<l.length;e++)d[e]=l[e];return d}opusPacket(e){return e}_sendTalkMsg(e){null===this.tempTimestamp&&(this.tempTimestamp=aa());const t=aa(),i=t-this.tempTimestamp,s=this._parseAudioMsg(e);this.log(this.TAG_NAME,`send talk msg and diff is ${i} and byteLength is ${s.byteLength} and length is ${s.length}, and ${this._opt.encType} length is ${e.length}`),uo(this._opt.saveToTempFile)&&uo(this._opt.debug)&&(this._opt.packetType===ks?this.addRtpToBuffer(s):this._opt.encType===Hi||this._opt.encType===Vi?this.addG711ToBuffer(s):this.addPcmToBuffer(s)),s&&(this.socketStatusOpen?this.socket.send(s.buffer):this.emit(ct.tallWebsocketClosedByError)),this.tempTimestamp=t}_doTalk(){this._getUserMedia()}_getUserMedia(){this.log(this.TAG_NAME,"getUserMedia"),void 0===window.navigator.mediaDevices&&(window.navigator.mediaDevices={}),void 0===window.navigator.mediaDevices.getUserMedia&&(this.log(this.TAG_NAME,"window.navigator.mediaDevices.getUserMedia is undefined and init function"),window.navigator.mediaDevices.getUserMedia=function(e){var t=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return t?new Promise((function(i,s){t.call(navigator,e,i,s)})):Promise.reject(new Error("getUserMedia is not implemented in this browser"))}),this._opt.checkGetUserMediaTimeout&&this._startCheckGetUserMediaTimeout(),window.navigator.mediaDevices.getUserMedia({audio:this._opt.audioConstraints,video:!1}).then((e=>{this.log(this.TAG_NAME,"getUserMedia success"),this.userMediaStream=e,this.mediaStreamSource=this.audioContext.createMediaStreamSource(e),this.mediaStreamSource.connect(this.biquadFilter),this.recorder?(this.biquadFilter.connect(this.recorder),this.recorder.connect(this.gainNode)):this.workletRecorder&&(this.biquadFilter.connect(this.workletRecorder),this.workletRecorder.connect(this.gainNode)),this.gainNode.connect(this.audioContext.destination),this.emit(nt.talkGetUserMediaSuccess),null===e.oninactive&&(e.oninactive=e=>{this._handleStreamInactive(e)})})).catch((e=>{this.error(this.TAG_NAME,"getUserMedia error",e.toString()),this.emit(nt.talkGetUserMediaFail,e.toString())})).finally((()=>{this.log(this.TAG_NAME,"getUserMedia finally"),this._stopCheckGetUserMediaTimeout()}))}_getUserMedia2(){this.log(this.TAG_NAME,"getUserMedia"),navigator.mediaDevices?navigator.mediaDevices.getUserMedia({audio:!0}).then((e=>{this.log(this.TAG_NAME,"getUserMedia2 success")})):navigator.getUserMedia({audio:!0},this.log(this.TAG_NAME,"getUserMedia2 success"),this.log(this.TAG_NAME,"getUserMedia2 fail"))}async _getUserMedia3(){this.log(this.TAG_NAME,"getUserMedia3");try{const e=await navigator.mediaDevices.getUserMedia({audio:{latency:!0,noiseSuppression:!0,autoGainControl:!0,echoCancellation:!0,sampleRate:48e3,channelCount:1},video:!1});console.log("getUserMedia() got stream:",e),this.log(this.TAG_NAME,"getUserMedia3 success")}catch(e){this.log(this.TAG_NAME,"getUserMedia3 fail")}}_handleStreamInactive(e){this.userMediaStream&&(this.warn(this.TAG_NAME,"stream oninactive",e),this.emit(nt.talkStreamInactive))}_startCheckGetUserMediaTimeout(){this._stopCheckGetUserMediaTimeout(),this.checkGetUserMediaTimeout=setTimeout((()=>{this.log(this.TAG_NAME,"check getUserMedia timeout"),this.emit(nt.talkGetUserMediaTimeout)}),this._opt.getUserMediaTimeout)}_stopCheckGetUserMediaTimeout(){this.checkGetUserMediaTimeout&&(this.log(this.TAG_NAME,"stop checkGetUserMediaTimeout"),clearTimeout(this.checkGetUserMediaTimeout),this.checkGetUserMediaTimeout=null)}_startHeartInterval(){this.heartInterval=setInterval((()=>{this.log(this.TAG_NAME,"heart interval");let e=[35,36,0,0,0,0,0,0];e=new Uint8Array(e),this.socket.send(e.buffer)}),15e3)}_stopHeartInterval(){this.heartInterval&&(this.log(this.TAG_NAME,"stop heart interval"),clearInterval(this.heartInterval),this.heartInterval=null)}startTalk(e){return new Promise(((t,i)=>{if(!function(){let e=!1;const t=window.navigator;return t&&(e=!(!t.mediaDevices||!t.mediaDevices.getUserMedia),e||(e=!!(t.getUserMedia||t.webkitGetUserMedia||t.mozGetUserMedia||t.msGetUserMedia))),e}())return i("not support getUserMedia");if(this.wsUrl=e,this._opt.testMicrophone)this._doTalk();else{if(!this.wsUrl)return i("wsUrl is null");this._createWebSocket().catch((e=>{i(e)}))}this.once(nt.talkGetUserMediaFail,(()=>{i("getUserMedia fail")})),this.once(nt.talkGetUserMediaSuccess,(()=>{t()}))}))}setVolume(e){e=parseFloat(e).toFixed(2),isNaN(e)||(e=oa(e,0,1),this.gainNode.gain.value=e)}getOption(){return this._opt}get volume(){return this.gainNode?parseFloat(100*this.gainNode.gain.value).toFixed(0):null}}class sv{constructor(e){this.player=e,this.globalSetting=null;const t=Sa();this.defaultSettings={watermark_id:`JbPro_${t}`,watermark_prefix:`JbPro_mask_${t}`,watermark_txt:"JbPro 测试水印",watermark_x:0,watermark_y:0,watermark_rows:0,watermark_cols:0,watermark_x_space:0,watermark_y_space:0,watermark_font:"微软雅黑",watermark_color:"black",watermark_fontsize:"18px",watermark_alpha:.15,watermark_width:150,watermark_height:100,watermark_angle:15,watermark_parent_width:0,watermark_parent_height:0,watermark_parent_node:null},this.player.debug.log("Watermark","int")}destroy(){this._removeMark(),this.globalSetting=null,this.defaultSettings=null,this.player.debug.log("Watermark","destroy")}remove(){this._removeMark()}load(e){this.globalSetting=e,this._loadMark(e)}resize(){this.player.debug.log("Watermark","resize()"),this.globalSetting&&this._loadMark(this.globalSetting)}_loadMark(){let e=this.defaultSettings;if(1===arguments.length&&"object"==typeof arguments[0]){var t=arguments[0]||{};for(let i in t)t[i]&&e[i]&&t[i]===e[i]||(t[i]||0===t[i])&&(e[i]=t[i])}var i=document.getElementById(e.watermark_id);i&&i.parentNode&&i.parentNode.removeChild(i);var s="string"==typeof e.watermark_parent_node?document.getElementById(e.watermark_parent_node):e.watermark_parent_node,r=s||document.body;const a=r.getBoundingClientRect();var o=Math.max(r.scrollWidth,r.clientWidth,a.width),n=Math.max(r.scrollHeight,r.clientHeight,a.height),l=arguments[0]||{},d=r;(l.watermark_parent_width||l.watermark_parent_height)&&d&&(e.watermark_x=e.watermark_x+0,e.watermark_y=e.watermark_y+0);var h=document.getElementById(e.watermark_id),c=null;if(h)h.shadowRoot&&(c=h.shadowRoot);else{(h=document.createElement("div")).id=e.watermark_id,h.setAttribute("style","pointer-events: none !important; display: block !important"),c="function"==typeof h.attachShadow?h.attachShadow({mode:"open"}):h;var u=r.children,p=Math.floor(Math.random()*(u.length-1))+1;u[p]?r.insertBefore(h,u[p]):r.appendChild(h)}e.watermark_cols=parseInt((o-e.watermark_x)/(e.watermark_width+e.watermark_x_space));var f,m=parseInt((o-e.watermark_x-e.watermark_width*e.watermark_cols)/e.watermark_cols);e.watermark_x_space=m?e.watermark_x_space:m,e.watermark_rows=parseInt((n-e.watermark_y)/(e.watermark_height+e.watermark_y_space));var g,y,A,b=parseInt((n-e.watermark_y-e.watermark_height*e.watermark_rows)/e.watermark_rows);e.watermark_y_space=b?e.watermark_y_space:b,s?(f=e.watermark_x+e.watermark_width*e.watermark_cols+e.watermark_x_space*(e.watermark_cols-1),g=e.watermark_y+e.watermark_height*e.watermark_rows+e.watermark_y_space*(e.watermark_rows-1)):(f=0+e.watermark_x+e.watermark_width*e.watermark_cols+e.watermark_x_space*(e.watermark_cols-1),g=0+e.watermark_y+e.watermark_height*e.watermark_rows+e.watermark_y_space*(e.watermark_rows-1));for(var v=0;v<e.watermark_rows;v++){A=s?0+e.watermark_y+(n-g)/2+(e.watermark_y_space+e.watermark_height)*v:e.watermark_y+(n-g)/2+(e.watermark_y_space+e.watermark_height)*v;for(var _=0;_<e.watermark_cols;_++){y=s?0+e.watermark_x+(o-f)/2+(e.watermark_width+e.watermark_x_space)*_:e.watermark_x+(o-f)/2+(e.watermark_width+e.watermark_x_space)*_;var S=document.createElement("div"),w=document.createTextNode(e.watermark_txt);S.appendChild(w),S.id=e.watermark_prefix+v+_,S.style.webkitTransform="rotate("+e.watermark_angle+"deg)",S.style.MozTransform="rotate("+e.watermark_angle+"deg)",S.style.msTransform="rotate("+e.watermark_angle+"deg)",S.style.OTransform="rotate("+e.watermark_angle+"deg)",S.style.transform="rotate("+e.watermark_angle+"deg)",S.style.visibility="",S.style.position="absolute",S.style.left=y+"px",S.style.top=A+"px",S.style.overflow="hidden",S.style.zIndex="9999999",S.style.opacity=e.watermark_alpha,S.style.fontSize=e.watermark_fontsize,S.style.fontFamily=e.watermark_font,S.style.color=e.watermark_color,S.style.textAlign="center",S.style.width=e.watermark_width+"px",S.style.height=e.watermark_height+"px",S.style.display="block",S.style["-ms-user-select"]="none",c.appendChild(S)}}}_removeMark(){const e=this.defaultSettings;var t=document.getElementById(e.watermark_id);if(t){var i=t.parentNode;i&&i.removeChild(t)}}}class rv{constructor(e){this.player=e,this.globalSetting=null;const t=Sa();this.defaultSettings={watermark_id:`JbPro_${t}`,watermark_prefix:`JbPro_mask_${t}`,watermark_txt:"JbPro 测试水印",watermark_x:0,watermark_y:0,watermark_rows:0,watermark_cols:0,watermark_x_space:100,watermark_y_space:100,watermark_font:"微软雅黑",watermark_color:"black",watermark_fontsize:18,watermark_alpha:.15,watermark_width:150,watermark_height:100,watermark_angle:-15,watermark_parent_width:0,watermark_parent_height:0,watermark_parent_node:null},this.player.debug.log("Watermark","int")}destroy(){this._removeMark(),this.globalSetting=null,this.defaultSettings=null,this.player.debug.log("Watermark","destroy")}remove(){this._removeMark()}load(e){this.globalSetting=e,this._loadMark(e)}resize(){this.player.debug.log("Watermark","resize()"),this.globalSetting&&this._loadMark(this.globalSetting)}_loadMark(){let e=this.defaultSettings;if(1===arguments.length&&"object"==typeof arguments[0]){var t=arguments[0]||{};for(let i in t)t[i]&&e[i]&&t[i]===e[i]||(t[i]||0===t[i])&&(e[i]=t[i])}var i=document.getElementById(e.watermark_id);i&&i.parentNode&&i.parentNode.removeChild(i);var s="string"==typeof e.watermark_parent_node?document.getElementById(e.watermark_parent_node):e.watermark_parent_node,r=s||document.body;const a=r.getBoundingClientRect();var o=Math.max(r.scrollWidth,r.clientWidth,a.width),n=Math.max(r.scrollHeight,r.clientHeight,a.height),l=arguments[0]||{},d=r;(l.watermark_parent_width||l.watermark_parent_height)&&d&&(e.watermark_x=e.watermark_x+0,e.watermark_y=e.watermark_y+0);var h=document.getElementById(e.watermark_id),c=null;if(h)h.shadowRoot&&(c=h.shadowRoot);else{(h=document.createElement("div")).id=e.watermark_id,h.setAttribute("style","pointer-events: none !important; display: block !important"),c="function"==typeof h.attachShadow?h.attachShadow({mode:"open"}):h;var u=r.children,p=Math.floor(Math.random()*(u.length-1))+1;u[p]?r.insertBefore(h,u[p]):r.appendChild(h)}const f=this._calcTextSize(),m=this.defaultSettings,g=m.watermark_x_space+f.width,y=m.watermark_y_space+f.height,A=2*y,b=g/2,v=`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="none">\n <defs>\n <pattern id="pattern1" x="0" y="0" width="${g}" height="${A}" patternUnits="userSpaceOnUse" patternTransform="rotate(${m.watermark_angle})">\n <text x="0" y="${m.watermark_fontsize}" style="font-family:${m.watermark_font}; font-size:${m.watermark_fontsize}; fill:${m.watermark_color}; fill-opacity:${m.watermark_alpha}">${m.watermark_txt}</text>\n </pattern>\n <pattern id="pattern2" x="${b}" y="${y}" width="${g}" height="${A}" patternUnits="userSpaceOnUse" patternTransform="rotate(${m.watermark_angle})">\n <text x="0" y="${m.watermark_fontsize}" style="font-family:${m.watermark_font}; font-size:${m.watermark_fontsize}; fill:${m.watermark_color}; fill-opacity:${m.watermark_alpha}">${m.watermark_txt}</text>\n </pattern>\n </defs>\n <rect x="0" y="0" width="100%" height="100%" style="fill:url(#pattern1); fill-opacity:1;" />\n <rect x="0" y="0" width="100%" height="100%" style="fill:url(#pattern2); fill-opacity:1;" />\n </svg>`,_=window.btoa(unescape(encodeURIComponent(v)));var S=document.createElement("div");S.style.position="absolute",S.style.left="0px",S.style.top="0px",S.style.overflow="hidden",S.style.zIndex="9999999",S.style.width=o+"px",S.style.height=n+"px",S.style.display="block",S.style["-ms-user-select"]="none",S.style.backgroundImage=`url(data:image/svg+xml;base64,${_})`,c.appendChild(S)}_removeMark(){const e=this.defaultSettings;var t=document.getElementById(e.watermark_id);if(t){var i=t.parentNode;i&&i.removeChild(t)}}_calcTextSize(){const{watermark_txt:e,watermark_font:t,watermark_fontsize:i}=this.globalSetting,s=document.createElement("span");s.innerHTML=e,s.setAttribute("style",`font-family: ${t}; font-size: ${i}px; visibility: hidden; display: inline-block`),document.querySelector("body").appendChild(s);const r={width:s.offsetWidth,height:s.offsetHeight};return s.remove(),r}}const av="right",ov="left",nv="up",lv="down",dv="leftUp",hv="leftDown",cv="rightUp",uv="rightDown",pv="zoomExpand",fv="zoomNarrow",mv="apertureFar",gv="apertureNear",yv="focusFar",Av="focusNear",bv="setPos",vv="calPos",_v="delPos",Sv="wiperOpen",wv="wiperClose",Ev="cruiseStart",Tv={stop:0,fiStop:0,right:1,left:2,up:8,down:4,leftUp:10,leftDown:6,rightUp:9,rightDown:5,zoomExpand:16,zoomNarrow:32,apertureFar:72,apertureNear:68,focusFar:66,focusNear:65,setPos:129,calPos:130,delPos:131,wiperOpen:140,wiperClose:141,setCruise:132,decCruise:133,cruiseStart:136,cruiseStop:0},kv=[25,50,75,100,125,150,175,200,225,250],Cv=[1,2,3,4,5,6,7,8,9,16],xv=[16,48,80,112,144,160,176,192,208,224];function Rv(e){const{type:t,speed:i=5,index:s=0}=e,r=function(e){return kv[(e=e||5)-1]||kv[4]}(i);let a,o,n,l;if(a=Tv[t],!a)return"";switch(t){case nv:case lv:case mv:case gv:n=r;break;case av:case ov:case yv:case Av:o=r;break;case dv:case hv:case cv:case uv:o=r,n=r;break;case pv:case fv:l=function(e){return xv[(e=e||5)-1]||xv[4]}(i);break;case vv:case _v:case bv:n=Dv(s);break;case wv:case Sv:o=1;break;case Ev:o=Dv(s)}return function(e,t,i,s){let r=[];r[0]=165,r[1]=15,r[2]=1,r[3]=0,r[4]=0,r[5]=0,r[6]=0,e&&(r[3]=e);t&&(r[4]=t);i&&(r[5]=i);s&&(r[6]=s);return r[7]=(r[0]+r[1]+r[2]+r[3]+r[4]+r[5]+r[6])%256,function(e){let t="";for(let i=0;i<e.length;i++){let s=e[i].toString(16);1===s.length&&(s="0"+s),t+=s.toUpperCase()}return t}(r)}(a,o,n,l)}function Dv(e){return Cv[e-1]}const Lv=["Boolean","Number","String","Undefined","Null","Date","Object"];function Pv(e){if("object"!=typeof e)return e;const t=Object.prototype.toString.call(e).slice(8,-1);switch(t){case"Array":case"Uint8Array":case"ArrayBuffer":return t+"["+e.length+"]";case"Object":return"{}";default:return t}}function Bv(e,t,i){i||(i=1),t||(t=2);const s={};if(!e||"object"!=typeof e)return e;const r=Object.prototype.toString.call(e).slice(8,-1);if(!Lv.includes(r))return r;if(!(i>t)){for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i===t?s[r]=Pv(e[r]):"object"==typeof e[r]?s[r]=Bv(e[r],t,i+1):s[r]=e[r]);return s}}function Iv(){return(new Date).toLocaleString()}class Mv{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.player=e,this.TAG_NAME="MemoryLogger",this.logMaxSize=(null==t?void 0:t.logMaxSize)||204800,this.logSize=0,this.logTextArray=[],this.player.debug.log(this.TAG_NAME,"init")}destroy(){this.clear(),this.player.debug.log(this.TAG_NAME,"destroy")}clear(){this.logSize=0,this.logTextArray=[]}logCache(){let e="";try{for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];const r=i.map((e=>Bv(e)));e="[JbPro] "+Iv()+JSON.stringify(r)}catch(e){return}if(this.logSize+=e.length,this.logTextArray.push(e),this.logSize>this.logMaxSize){const e=this.logTextArray.shift();this.logSize-=e.length}}getLog(){return this.logTextArray.join("\n")}getLogBlob(){const e=this.getLog();return new Blob([e],{type:"text/plain"})}download(){const e=this.getLog();this.clear();const t=new Blob([e],{type:"text/plain"});No(t,"JbPro-"+Iv()+".log")}}class Uv extends So{constructor(e){super(),this.player=e,this.TAG_NAME="Network",this.online=this.isOnline(),this.prevOnline=this.online,this.interval=null,this._initListener(),this.player.debug.log(this.TAG_NAME,"init")}destroy(){this.off(),this._stopCheck(),window.removeEventListener("online",this._updateOnlineStatus),window.removeEventListener("offline",this._updateOfflineStatus),this.player.debug.log(this.TAG_NAME,"destroy")}_initListener(){window.addEventListener("online",this._updateOnlineStatus.bind(this)),window.addEventListener("offline",this._updateOfflineStatus.bind(this))}_stopCheck(){this.interval&&(clearInterval(this.interval),this.interval=null)}_startCheck(){this.interval=setInterval((()=>{this.isOnline()!==this.prevOnline&&(this.isOnline()?this._updateOnlineStatus():this._updateOfflineStatus())}),1e3)}_updateOnlineStatus(){this.prevOnline=this.online,this.online=!0,this.logStatus(),this.emit("online")}_updateOfflineStatus(){this.prevOnline=this.online,this.online=!1,this.logStatus(),this.emit("offline")}logStatus(){const e=this.prevOnline?"online":"offline",t=this.online?"online":"offline";this.player.debug.log(this.TAG_NAME,`prevOnline: ${this.prevOnline}, online: ${this.online}, status: ${e} -> ${t}`)}isOnline(){return void 0===navigator.onLine||navigator.onLine}isOffline(){return!this.isOnline()}}class Fv extends So{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this._opt={},this.TAG_NAME="JbPro",this.$container=null,Object.keys(e).forEach((t=>{if(void 0===e[t])throw new Error(`JbPro option "${t}" can not be undefined`)})),this.originalOptions=e;const t=lo();let i=Object.assign({},t,e);i.url="",i.isMulti&&(i.debugUuid="xxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))),this.debug=new Pr(this),this.debug.log("JbPro","init");let s=e.container;if("string"==typeof e.container&&(s=document.querySelector(e.container)),!s)throw this.debug.error("JbPro","JbPro need container option and now container is",e.container),new Error("JbPro need container option");if(i.decoder&&po(-1!==i.decoder.indexOf("decoder-pro.js")||-1!==i.decoder.indexOf("decoder-pro-simd.js")))throw this.debug.error("JbPro",`JbPro decoder ${i.decoder} must be decoder-pro.js or decoder-pro-simd.js`),new Error(`JbPro decoder ${i.decoder} must be decoder-pro.js or decoder-pro-simd.js`);if("CANVAS"===s.nodeName||"VIDEO"===s.nodeName)throw this.debug.error("JbPro",`JbPro container type can not be ${s.nodeName} type`),new Error(`JbPro container type can not be ${s.nodeName} type`);if(i.videoBuffer>=i.heartTimeout)throw this.debug.error("JbPro",`JbPro videoBuffer ${i.videoBuffer}s must be less than heartTimeout ${i.heartTimeout}s`),new Error(`JbPro videoBuffer ${i.videoBuffer}s must be less than heartTimeout ${i.heartTimeout}s`);if(this._checkHasCreated(s))throw this.debug.error("JbPro","JbPro container has been created and can not be created again",s),new Error("JbPro container has been created and can not be created again",s);if(!s.classList)throw this.debug.error(this.TAG_NAME,"JbPro container is invalid, must be a DOM Element",s),new Error("JbPro container is invalid, must be a DOM Element",s);var r,a,o;if(i.videoBuffer>10&&console.warn("JbPro",`videoBuffer ${i.videoBuffer}s is too long, will black screen for ${i.videoBuffer}s , it is recommended to set it to less than 10s`),s.classList.add("jb-pro-container"),r=s,a=ee,o=Sa(),r&&(r.dataset?r.dataset[a]=o:r.setAttribute("data-"+a,o)),po(i.isLive)){const e=document.createElement("video");return e.muted=!0,e.setAttribute("controlsList","nodownload"),e.disablePictureInPicture="disablePictureInPicture",e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.height="100%",e.style.width="100%",s.appendChild(e),this.$videoElement=e,this.$container=s,void(this._opt=i)}if(delete i.container,Ba(i.videoBuffer)&&(i.videoBuffer=1e3*Number(i.videoBuffer)),Ba(i.videoBufferDelay)&&(i.videoBufferDelay=1e3*Number(i.videoBufferDelay)),Ba(i.networkDelay)&&(i.networkDelay=1e3*Number(i.networkDelay)),Ba(i.aiFaceDetectInterval)&&(i.aiFaceDetectInterval=1e3*Number(i.aiFaceDetectInterval)),Ba(i.aiObjectDetectInterval)&&(i.aiObjectDetectInterval=1e3*Number(i.aiObjectDetectInterval)),Ba(i.timeout)&&(La(i.loadingTimeout)&&(i.loadingTimeout=i.timeout),La(i.heartTimeout)&&(i.heartTimeout=i.timeout)),Ba(i.autoWasm)&&(La(i.decoderErrorAutoWasm)&&(i.decoderErrorAutoWasm=i.autoWasm),La(i.hardDecodingNotSupportAutoWasm)&&(i.hardDecodingNotSupportAutoWasm=i.autoWasm)),Ba(i.aiFaceDetectLevel)&&La(i.aiFaceDetectWidth)){const e=or[i.aiFaceDetectLevel];e&&(i.aiFaceDetectWidth=e)}if(Ba(i.aiObjectDetectLevel)&&La(i.aiObjectDetectWidth)){const e=nr[i.aiObjectDetectLevel];e&&(i.aiObjectDetectWidth=e)}uo(i.isCrypto)&&(i.isM7sCrypto=!0),this._opt=i,this._destroyed=!1,this.$container=s,this._tempPlayBgObj={},this._tempVideoLastIframeInfo={},this._tempPlayerIsMute=!0,this._loadingTimeoutReplayTimes=0,this._heartTimeoutReplayTimes=0,this._streamErrorReplayTimes=0,this._streamEndReplayTimes=0,this._websocket1006ErrorReplayTimes=0,this.events=new _o(this),this._opt.isUseNewFullscreenWatermark?this.watermark=new rv(this):this.watermark=new sv(this),this.memoryLogger=new Mv(this),this.network=new Uv(this),this._websocket1006ErrorRetryLog=[],this._mseDecodeErrorRetryLog=[],this._wcsDecodeErrorRetryLog=[],this._isNetworkOfflinePaused=!1,this._isNetworkOfflinePausedAndNextPlayConfig={},this.widthOrHeightChangeReplayDelayTimeout=null,this.streamErrorReplayDelayTimeout=null,this.streamEndReplayDelayTimeout=null,this.$loadingBgImage=null,this.$loadingBg=null,this._initPlayer(s,i),this._initWatermark(),this._initNetwork(),this.debug.log("JbPro",'init success and version is "4-1-2024"'),console.log('JbPro Version is "4-1-2024"')}destroy(){return new Promise(((e,t)=>{this.debug.log("JbPro","destroy()"),this._destroyed=!0,this.off(),this._removeTimeout(),this.$videoElement&&(this.$videoElement.pause(),this.$videoElement.currentTime=0,this.$videoElement.srcObject&&(this.$videoElement.srcObject=null,this.$videoElement.removeAttribute("srcObject")),this.$videoElement.src&&(this.$videoElement.src="",this.$videoElement.removeAttribute("src")),this.$container&&this.$container.removeChild(this.$videoElement),this.$videoElement=null),this._removeLoadingBackgroundForIOS(),this.player?this.player.destroy().then((()=>{this.player=null,this._destroy(),e()})).catch((()=>{t()})):(this._destroy(),e())}))}_removeTimeout(){this.widthOrHeightChangeReplayDelayTimeout&&(clearTimeout(this.widthOrHeightChangeReplayDelayTimeout),this.widthOrHeightChangeReplayDelayTimeout=null),this.streamErrorReplayDelayTimeout&&(clearTimeout(this.streamErrorReplayDelayTimeout),this.streamErrorReplayDelayTimeout=null),this.streamEndReplayDelayTimeout&&(clearTimeout(this.streamEndReplayDelayTimeout),this.streamEndReplayDelayTimeout=null)}_destroy(){var e,t;this.events&&(this.events.destroy(),this.events=null),this.talk&&(this.talk.destroy(),this.talk=null),this.watermark&&(this.watermark.destroy(),this.watermark=null),this.network&&(this.network.destroy(),this.network=null),this.memoryLogger&&(this.memoryLogger.destroy(),this.memoryLogger=null),this.$container&&(this.$container.classList.remove("jb-pro-container"),this.$container.classList.remove("jb-pro-fullscreen-web"),e=this.$container,t=ee,e&&(e.dataset?delete e.dataset[t]:e.removeAttribute("data-"+t)),this.$container=null),this._tempPlayBgObj=null,this._tempVideoLastIframeInfo=null,this._isNetworkOfflinePaused=!1,this._isNetworkOfflinePausedAndNextPlayConfig={},this._tempPlayerIsMute=!0,this._resetReplayTimes(),this.debug&&this.debug.log("JbPro","destroy end"),this._opt=null,this.debug=null}_resetReplayTimes(){this._loadingTimeoutReplayTimes=0,this._heartTimeoutReplayTimes=0,this._streamErrorReplayTimes=0,this._streamEndReplayTimes=0,this._websocket1006ErrorReplayTimes=0,this._websocket1006ErrorRetryLog=[],this._mseDecodeErrorRetryLog=[],this._wcsDecodeErrorRetryLog=[]}_getOriginalOpt(){const e=lo();return Object.assign({},e,this.originalOptions)}_initPlayer(e,t){this.player=new Yb(e,t),this._bindEvents()}_initTalk(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.talk&&(this.talk.destroy(),this.talk=null),this.player&&(e.debug=this.player._opt.debug),this.talk=new iv(this.player,e),this.debug.log("JbPro","_initTalk",this.talk.getOption()),this._bindTalkEvents()}_resetPlayer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(((t,i)=>{this.debug.log(this.TAG_NAME,"_resetPlayer()",JSON.stringify(e));const s=()=>{this._opt.url="",this._opt.playOptions={},this._opt=Object.assign(this._opt,e),this._initPlayer(this.$container,this._opt)};this.player?this.player.destroy().then((()=>{this.player=null,s(),this.debug.log(this.TAG_NAME,"_resetPlayer() end"),t()})).catch((()=>{i()})):(s(),this.debug.log(this.TAG_NAME,"_resetPlayer() end"),t())}))}_bindEvents(){var e=this;Object.keys(lt).forEach((t=>{this.player.on(lt[t],(function(){for(var i=arguments.length,s=new Array(i),r=0;r<i;r++)s[r]=arguments[r];e.emit(t,...s)}))})),this._opt.playFailedAndPausedShowMessage&&this.on(nt.playFailedAndPaused,(e=>{this.player&&this.player.showTipsMessageByCode(e)})),this.player.once(nt.beforeDestroy,(()=>{this.emit(nt.close),this.destroy().then((()=>{})).catch((e=>{}))})),this.player.on(nt.resize,(()=>{this.watermark&&this.watermark.resize()})),this.player.on(nt.fullscreen,(()=>{this.watermark&&this.watermark.resize()})),this.player.on(nt.videoInfo,(()=>{this.player&&(this.player.singleWatermark&&this.player.singleWatermark.resize(),this.player.ghostWatermark&&this.player.ghostWatermark.resize(),this.player.dynamicWatermark&&this.player.dynamicWatermark.resize())})),this.player.on(nt.memoryLog,(function(){e.memoryLogger.logCache(...arguments)})),this.player.on(nt.downloadMemoryLog,(()=>{this.downloadMemoryLog()}))}_bindTalkEvents(){Object.keys(dt).forEach((e=>{this.player.on(dt[e],(t=>{this.emit(e,t)}))}))}_initWatermark(){if(Va(this._opt.fullscreenWatermarkConfig)){const e=Ma(this.$container,this._opt.fullscreenWatermarkConfig);if(!e.watermark_txt)return void this.debug.warn("JbPro","fullscreenWatermarkConfig text is empty");this.watermark.load(e)}}_initNetwork(){this.network.on(nt.online,(()=>{if(this.emit(nt.networkState,nt.online),this.isDestroyed())this.debug.log(this.TAG_NAME,"network online and JbPro is destroyed");else if(this._isNetworkOfflinePaused&&this._isNetworkOfflinePausedAndNextPlayConfig&&this._isNetworkOfflinePausedAndNextPlayConfig.url){const e=this._isNetworkOfflinePausedAndNextPlayConfig.url,t=this._isNetworkOfflinePausedAndNextPlayConfig.playOptions;this._streamErrorReplayTimes++;const i=this._isNetworkOfflinePausedAndNextPlayConfig.type||"unknown";this._isNetworkOfflinePaused=!1,this._isNetworkOfflinePausedAndNextPlayConfig={},this.debug.log(this.TAG_NAME,`${i} and network online and reset player and play`),this.play(e,t).then((()=>{this.debug.log(this.TAG_NAME,`${i} and network online and play success`)})).catch((e=>{this.emit(nt.playFailedAndPaused,ct.fetchError,{},error),this.debug.error(this.TAG_NAME,`${i} and network online and play error`,e)}))}})),this.network.on(nt.offline,(()=>{this.emit(nt.networkState,nt.offline)}))}_checkHasCreated(e){if(!e)return!1;const t=function(e,t){return e?e.dataset?e.dataset[t]:e.getAttribute("data-"+t):""}(e,ee);return!!t}isDestroyed(){return this._destroyed}getOption(){return this.player?this.player.getOption():{}}setDebug(e){this.debug.log("JbPro",`setDebug() ${e}`),this._opt.debug=!!e,this.player?this.player.updateOption({debug:!!e},!0):this.debug.warn("JbPro","player is not init")}getIsDebug(){let e=!1;return this.player&&(e=this.player._opt.debug),e}mute(){this.debug.log("JbPro","mute()"),this.player&&this.player.mute(!0)}cancelMute(){this.debug.log("JbPro","cancelMute()"),this.player&&this.player.mute(!1)}setVolume(e){this.debug.log("JbPro",`setVolume() ${e}`),this.player&&(this.player.volume=e)}getVolume(){let e=null;return this.player&&(e=this.player.volume,e=parseFloat(e).toFixed(2)),e}audioResume(){this.debug.log("JbPro","audioResume()"),this.player&&this.player.audio?this.player.audio.audioEnabled(!0):this.debug.warn("JbPro","audioResume error")}setTimeout(e){this.debug.log("JbPro",`setTimeout() ${e}`),e=Number(e),isNaN(e)?this.debug.warn("JbPro",`setTimeout error: ${e} is not a number`):(this._opt.timeout=e,this._opt.loadingTimeout=e,this._opt.heartTimeout=e,this.player&&this.player.updateOption({timeout:e,loadingTimeout:e,heartTimeout:e}))}setScaleMode(e){this.debug.log("JbPro",`setScaleMode() ${e}`),this.player?this.player.setScaleMode(e):this.debug.warn("JbPro","setScaleMode() player is null")}pause(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise(((t,i)=>{this.debug.log("JbPro",`pause() ${e}`),(this._opt.pauseAndNextPlayUseLastFrameShow||this._opt.replayUseLastFrameShow)&&(this._tempPlayBgObj=this._getVideoLastIframeInfo()),this._tempPlayerIsMute=this.isMute(),this._pause(e).then((e=>{t(e)})).catch((e=>{i(e)}))}))}_pause(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise(((t,i)=>{if(this.debug.log("JbPro",`_pause() ${e}`),this.isDestroyed())return i("JbPro is destroyed");this._resetReplayTimes(),this.player?this.player.pause(e).then((e=>{t(e)})).catch((e=>{i(e)})):i("player is null")}))}close(){return new Promise(((e,t)=>{this.debug.log("JbPro","close()"),this._opt.url="",this._resetReplayTimes(),this.player?this.player.close().then((()=>{e()})).catch((e=>{t(e)})):t("player is null")}))}clearView(){this.debug.log("JbPro","clearView()"),this.player&&this.player.video?this.getRenderType()===$?this.player.video.clearView():this.debug.warn("JbPro","clearView","render type is video, not support clearView, please use canvas render type"):this.debug.warn("JbPro","clearView","player is null")}play(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,s)=>{if(this.debug.log("JbPro",`play() ${e}`,JSON.stringify(t)),!e&&!this._opt.url)return this.emit(nt.error,ct.playError),void s("url is null and this._opt.url is null");if(e&&(e=(""+e).trim(),-1===e.indexOf("http:")&&-1===e.indexOf("https:")&&-1===e.indexOf("webrtc:")&&-1===e.indexOf("ws:")&&-1===e.indexOf("wss:")&&-1===e.indexOf("wt:")&&-1===e.indexOf("artc:")))return s(`url ${e} must be "http:" or "https:" or "webrtc:" or "ws:" or "wss:" or "wt:" or "artc:" protocol`);if(po(this._opt.isLive))return this.$videoElement.controls="controls",this.$videoElement.muted=!1,this.$videoElement.src=e,this.$videoElement.play(),void i(this.$videoElement);if(this._opt.isM7sCrypto){let r=t.cryptoKey||this._opt.playOptions.cryptoKey,a=t.cryptoIV||this._opt.playOptions.cryptoIV;if(this._opt.m7sCryptoKey&&(!r||!a)){const e=this._opt.m7sCryptoKey.split(".");r=ao(e[0]),a=ao(e[1])}if(!r||!a){const r=e||this._opt.url;return void this._cryptoPlay(r).then((r=>{let{cryptoIV:a,cryptoKey:o}=r;this._opt.playOptions.cryptoKey=o,this._opt.playOptions.cryptoIV=a,t.cryptoIV=a,t.cryptoKey=o,this._playBefore(e,t).then((()=>{i()})).catch((e=>{s(e)}))})).catch((e=>{s(e)}))}this._opt.playOptions.cryptoKey=r,this._opt.playOptions.cryptoIV=a,t.cryptoIV=a,t.cryptoKey=r}else if(this._opt.isXorCrypto){let e=t.cryptoKey||this._opt.playOptions.cryptoKey,i=t.cryptoIV||this._opt.playOptions.cryptoIV;if(this._opt.xorCryptoKey&&(!e||!i)){const t=this._opt.xorCryptoKey.split(".");e=ao(t[0]),i=ao(t[1])}e&&i&&(this._opt.playOptions.cryptoKey=e,this._opt.playOptions.cryptoIV=i,t.cryptoIV=i,t.cryptoKey=e)}this._playBefore(e,t).then((()=>{i()})).catch((e=>{s(e)}))}))}_playBefore(e,t){return new Promise(((i,s)=>{if(this.player)if(e)if(this._opt.url)if(e===this._opt.url)if(this.player.playing)this.debug.log("JbPro","_playBefore","playing and resolve()"),i();else{this.debug.log("JbPro","_playBefore","this._opt.url === url and pause -> play and destroy play");let e=this._getOriginalOpt();(this._opt.pauseAndNextPlayUseLastFrameShow||this._opt.replayUseLastFrameShow)&&this._tempPlayBgObj&&this._tempPlayBgObj.loadingBackground&&(e=Object.assign(e,this._tempPlayBgObj)),po(this._tempPlayerIsMute)&&(e.isNotMute=!0,this._tempPlayerIsMute=!0);const t=this._opt.url,r=this._opt.playOptions;this._resetPlayer(e).then((()=>{this._play(t,r).then((()=>{i()})).catch((e=>{this.debug.error("JbPro","_playBefore this.player.play error",e),this.emit(nt.crashLog,this.getCrashLog("this.player.play 1",e)),s(e)}))})).catch((e=>{this.debug.error("JbPro","_resetPlayer error",e)}))}else{this.debug.log("JbPro","_playBefore",`\n this._url.url is ${this._opt.url}\n and new url is ${e}\n and destroy and play new url`);const r=this._getOriginalOpt();this._resetPlayer(r).then((()=>{this._play(e,t).then((()=>{i()})).catch((e=>{this.debug.error("JbPro","_playBefore _play error",e),this.emit(nt.crashLog,this.getCrashLog("this.player.play 2",e)),s(e)}))})).catch((e=>{this.debug.error("JbPro","_resetPlayer error",e)}))}else this._play(e,t).then((()=>{i()})).catch((e=>{this.debug.error("JbPro","_playBefore _play error",e),this.emit(nt.crashLog,this.getCrashLog("this.player.play 3",e)),s(e)}));else{let e=this._getOriginalOpt();(this._opt.pauseAndNextPlayUseLastFrameShow||this._opt.replayUseLastFrameShow)&&this._tempPlayBgObj&&this._tempPlayBgObj.loadingBackground&&(e=Object.assign(e,this._tempPlayBgObj)),po(this._tempPlayerIsMute)&&(e.isNotMute=!0,this._tempPlayerIsMute=!0);const t=this._opt.url,r=this._opt.playOptions;this._resetPlayer(e).then((()=>{this._play(t,r).then((()=>{i()})).catch((e=>{this.debug.error("JbPro","_playBefore _play error",e),this.emit(nt.crashLog,this.getCrashLog("this.player.play 4",e)),s(e)}))})).catch((e=>{this.debug.error("JbPro","_resetPlayer error",e)}))}else e?this._play(e,t).then((()=>{i()})).catch((e=>{this.debug.error("JbPro","_playBefore _play error",e),this.emit(nt.crashLog,this.getCrashLog("this.player.play 5",e)),s(e)})):this._play(this._opt.url,this._opt.playOptions).then((()=>{i()})).catch((e=>{this.debug.error("JbPro","_playBefore _play error",e),this.emit(nt.crashLog,this.getCrashLog("this.player.play 6",e)),s(e)}))}))}_cryptoPlay(e){return new Promise(((t,i)=>{const s=function(e){const t=(e||document.location.toString()).split("//"),i=t[1].indexOf("/");let s=t[1].substring(i);return-1!=s.indexOf("?")&&(s=s.split("?")[0]),s}(e);let r=this._opt.cryptoKeyUrl,a="";const o=oo(e);if(r){if(a=r,this._opt.isM7sCrypto&&-1===a.indexOf("/crypto/?stream=")){const e=oo(r);a=e.origin+Z+`?stream=${s}`}}else r=o.origin+Z,a=r+`?stream=${s}`;var n;this.player.debug.log("JbPro",`_cryptoPlay() cryptoKeyUrl: ${a} and opt.cryptoKeyUrl: ${this._opt.cryptoKeyUrl}`),(n=a,new Promise(((e,t)=>{bl.get(n).then((t=>{e(t)})).catch((e=>{t(e)}))}))).then((e=>{if(e){const s=e.split("."),r=ao(s[0]),a=ao(s[1]);a&&r?t({cryptoIV:a,cryptoKey:r}):i("get cryptoIV or cryptoKey error")}else i(`cryptoKeyUrl: getM7SCryptoStreamKey ${a} res is null`)})).catch((e=>{i(e)}))}))}playback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,s)=>{if(this.debug.log("JbPro",`playback() ${e}, options: ${JSON.stringify(t)}`),po(this._opt.isLive))return s("this._opt.isLive is false, can not playback");const r=ho(),a=Object.assign({},r.playbackConfig,this._opt.playbackConfig,t);a.isUseFpsRender||a.isCacheBeforeDecodeForFpsRender&&(a.isCacheBeforeDecodeForFpsRender=!1,this.debug.warn("JbPro","playbackConfig.isUseFpsRender is false, isCacheBeforeDecodeForFpsRender can not be ture, isCacheBeforeDecodeForFpsRender is set to false")),0===a.rateConfig.length&&a.showRateBtn&&(a.showRateBtn=!1,this.debug.warn("JbPro","playbackConfig.rateConfig.length is 0, showRateBtn can not be ture, showRateBtn is set to false")),a.controlType,Q.simple,this._resetPlayer({videoBuffer:0,playbackConfig:a,playType:_,openWebglAlignment:!0,useMSE:a.useMSE,useWCS:a.useWCS,useSIMD:!0}).then((()=>{this.play(e,t).then((()=>{i()})).catch((e=>{s(e)}))})).catch((e=>{s(e)}))}))}playbackPause(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.debug.log("JbPro",`playbackPause() ${e}`),this._opt.playType===b?Promise.reject("playType is player, can not call playbackPause method"):new Promise(((t,i)=>{if(!this.player)return i("player is null");uo(e)?this._pause().then((()=>{t()})).catch((e=>{i(e)})):(this.player.playbackPause=!0,t())}))}playbackResume(){return this.debug.log("JbPro","playbackResume()"),this._opt.playType===b?Promise.reject("playType is player, can not call playbackResume method"):new Promise(((e,t)=>{if(!this.player)return t("player is null");this.player.playbackPause=!1,e()}))}forward(e){return this.debug.log("JbPro",`forward() ${e}`),po(this._opt.isLive)||this._opt.playType===b?Promise.reject("forward() method only just for playback type"):Ta(Number(e))?new Promise(((t,i)=>{this.player?(e=oa(Number(e),.1,32),this.player.decoderWorker&&this.player.decoderWorker.updateWorkConfig({key:"playbackRate",value:e}),this.player.playback.setRate(e),this.player.video&&this.player.video.setRate(e),this.player.audio&&this.player.audio.setRate(e),(this.player.isPlaybackUseWCS()||this.player.isPlaybackUseMSE())&&(this.player.demux.dropBuffer$2(),this.player.isPlaybackCacheBeforeDecodeForFpsRender()&&this.player.demux.initPlaybackCacheLoop()),t()):i("player is not playing")})):Promise.reject(`forward() params "rate": ${e} must be number type`)}playbackForward(e){return this.forward(e)}normal(){return this.forward(1)}playbackNormal(){return this.normal()}updatePlaybackForwardMaxRateDecodeIFrame(e){this.debug.log("JbPro",`updatePlaybackForwardMaxRateDecodeIFrame() ${e}`),e=Number(e),e=oa(e=parseInt(e,10),1,8),this._opt.playbackForwardMaxRateDecodeIFrame=e,this.player?this.player.updateOption({playbackForwardMaxRateDecodeIFrame:e},!0):this.debug.warn("JbPro","updatePlaybackForwardMaxRateDecodeIFrame() player is null")}setPlaybackStartTime(e){this.debug.log("JbPro",`setPlaybackStartTime() ${e}`);const t=Ga(e);this.player?this.player.isPlayback()?t<10&&0!==e&&this.player.playback.isControlTypeNormal()?this.debug.warn("JbPro",`setPlaybackStartTime() control type is normal and timestamp: ${e} is not valid`):this.player.playback.isControlTypeSimple()&&e>this.player.playback.totalDuration?this.debug.warn("JbPro",`setPlaybackStartTime() control type is simple and timestamp: ${e} is more than ${this.player.playback.totalDuration}`):this.player.playing&&(this.player.playback.isControlTypeNormal()&&10===t&&(e*=1e3),this.player.playback.setStartTime(e),this.playbackClearCacheBuffer()):this.debug.warn("JbPro","setPlaybackStartTime() playType is not playback"):this.debug.warn("JbPro","setPlaybackStartTime() player is null")}setPlaybackShowPrecision(e){this.debug.log("JbPro",`setPlaybackShowPrecision() ${e}`),this.player?this.player.isPlayback()?this.player.playback.isControlTypeNormal()?this.player.playback.setShowPrecision(e):this.debug.warn("JbPro","control type is not normal , not support!"):this.debug.warn("JbPro","playType is not playback"):this.debug.warn("JbPro","player is null")}playbackCurrentTimeScroll(){this.debug.log("JbPro","playbackCurrentTimeScroll()"),this.player?this.player.isPlayback()?this.player.playback.isControlTypeNormal()?this.player.playback.currentTimeScroll():this.debug.warn("JbPro","control type is not normal , not support!"):this.debug.warn("JbPro","playType is not playback"):this.debug.warn("JbPro","player is null")}playbackClearCacheBuffer(){this.debug.log("JbPro","playbackClearCacheBuffer()"),this.player?this.player.isPlayback()?(this.player.video&&this.player.video.clear(),this.player.audio&&this.player.audio.clear(),this.clearBufferDelay()):this.debug.warn("JbPro","playType is not playback"):this.debug.warn("JbPro","player is null")}getPlaybackCurrentRate(){if(this.player){if(this.player.isPlayback())return this.player.getPlaybackRate();this.debug.warn("JbPro","playType is not playback")}else this.debug.warn("JbPro","player is null")}updatePlaybackLocalOneFrameTimestamp(e){this.debug.log("JbPro",`updatePlaybackLocalOneFrameTimestamp() ${e}`),this.player?this.player.isPlayback()?this.player.playback.updateLocalOneFrameTimestamp(e):this.debug.warn("JbPro","playType is not playback"):this.debug.warn("JbPro","player is null")}setStreamQuality(e){if(this.debug.log("JbPro",`setStreamQuality() ${e}`),!this.player)return void this.debug.warn("JbPro","player is null");if(!this.player._opt.operateBtns.quality)return void this.debug.warn("JbPro","player._opt.operateBtns.quality is false");(this.player._opt.qualityConfig||[]).includes(e)?this.player.streamQuality=e:this.debug.warn("JbPro",`quality: ${e} is not in qualityList`)}_play(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((s,r)=>{if(!this.player)return r("player is null");let u=!1;this._opt.url&&this._opt.url!==t&&(u=!0),this._opt.url=t,this._opt.playOptions=i;const p=t.split("?")[0],f=p.startsWith("http://")||p.startsWith("https://"),m=p.startsWith("webrtc://"),g=p.startsWith("artc://"),y=p.startsWith("wt://"),A=p.startsWith("ws://")||p.startsWith("wss://"),b=f||A,v=f&&p.endsWith(".m3u8"),_=b&&p.endsWith(".flv"),S=b&&(p.endsWith(".fmp4")||p.endsWith(".mp4")),w=b&&p.endsWith(".mpeg4"),E=b&&(p.endsWith(".h264")||p.endsWith(".h265")),M=b&&p.endsWith(".ts");let U=this._opt.isWebrtcForZLM||!1,F=this._opt.isWebrtcForSRS||!1,O=this._opt.isWebrtcForOthers||!1;m&&(-1!==t.indexOf("/index/api/webrtc")?(U=!0,F=!1,O=!1):-1!==t.indexOf("/rtc/v1/play/")&&(F=!0,U=!1,O=!1));let j=null,z=null;if(_&&po(this._opt.isFlv)&&this._resetDemuxType("isFlv"),S&&po(this._opt.isFmp4)&&this._resetDemuxType("isFmp4"),w&&po(this._opt.isMpeg4)&&this._resetDemuxType("isMpeg4"),E&&po(this._opt.isNakedFlow)&&this._resetDemuxType("isNakedFlow"),M&&po(this._opt.isTs)&&this._resetDemuxType("isTs"),f?j=v?n:o:y?j=d:m?j=l:g?j=h:A&&(j=a),this._opt.isNakedFlow?z=D:this._opt.isFmp4?z=L:this._opt.isMpeg4?z=P:this._opt.isFlv?z=T:this._opt.isTs?z=I:v?z=C:m?z=x:g?z=B:y?z=R:A&&(z=k),!j||!z)return this._opt.playFailedAndPausedShowMessage&&this.showErrorMessageTips("url is not support"),r(`play url ${t} is invalid, protocol is ${c[j]}, demuxType is ${z}`);this.debug.log("JbPro",`play url ${t} protocol is ${c[j]}, demuxType is ${z}`);const G=()=>{this.player.once(ct.webglAlignmentError,(e=>{if(this.isDestroyed())this.debug.log("JbPro","webglAlignmentError but player is destroyed");else if(this.emit(nt.crashLog,this.getCrashLog(ct.webglAlignmentError,e)),this.player&&this.player._opt.webglAlignmentErrorReplay){this.debug.log("JbPro","webglAlignmentError");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({openWebglAlignment:!0}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","webglAlignmentError and play success")})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.webglAlignmentError,{},e),this.debug.error("JbPro","webglAlignmentError and play error",t)}))})).catch((e=>{this.debug.error("JbPro","webglAlignmentError and _resetPlayer error",e)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(nt.playFailedAndPaused,ct.webglAlignmentError,{},e),this.debug.log("JbPro","webglAlignmentError and webglAlignmentErrorReplay is false")})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.webglAlignmentError,{},e),this.debug.error("JbPro","webglAlignmentError and pause error",t)}))}})),this.player.once(ct.webglContextLostError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","webglContextLostError but player is destroyed");this.emit(nt.crashLog,this.getCrashLog(ct.webglContextLostError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.webglContextLostErrorReplay){this.debug.log("JbPro","webglContextLostError");const i=this._opt.url,s=this._opt.playOptions;let r={};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),po(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","webglContextLostError and play success")})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.webglContextLostError,t,e),this.debug.error("JbPro","webglContextLostError and play error",i)}))})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.webglContextLostError,t,e),this.debug.error("JbPro","webglContextLostError and _resetPlayer error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(nt.playFailedAndPaused,ct.webglContextLostError,t,e),this.debug.log("JbPro","webglContextLostError and webglContextLostErrorReplay is false")})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.webglContextLostError,t,e),this.debug.error("JbPro","webglAlignmentError and pause error",i)}))}})),this.player.once(ct.mediaSourceH265NotSupport,(e=>{if(this.isDestroyed())this.debug.log("JbPro","mediaSourceH265NotSupport but player is destroyed");else if(this.emit(nt.crashLog,this.getCrashLog(ct.mediaSourceH265NotSupport,e)),this.player&&this.player._opt.hardDecodingNotSupportAutoWasm){this.debug.log("JbPro","mediaSourceH265NotSupport auto wasm [mse-> wasm] reset player and play");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({useMSE:!1,useWCS:!1}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","mediaSourceH265NotSupport auto wasm [mse-> wasm] reset player and play success")})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceH265NotSupport,e),this.debug.error("JbPro","mediaSourceH265NotSupport auto wasm [mse-> wasm] reset player and play error",t)}))})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceH265NotSupport,{},e),this.debug.error("JbPro","mediaSourceH265NotSupport auto wasm [mse-> wasm] _resetPlayer error",t)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceH265NotSupport,{},e),this.debug.log("JbPro","mediaSourceH265NotSupport and autoWasm is false")})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceH265NotSupport,{},e),this.debug.error("JbPro","mediaSourceH265NotSupport and pause error",t)}))}})),this.player.once(ct.mediaSourceFull,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceFull but player is destroyed");this.emit(nt.crashLog,this.getCrashLog(ct.mediaSourceFull,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mseDecodeErrorReplay){const i=this._opt.url,s=this._opt.playOptions;let r={},a=this.player._opt.decoderErrorAutoWasm,o=!0;a?r={useMSE:!1,useWCS:!1}:this._checkIsMeaningfulRetry(Dr)?this._mseDecodeErrorRetryLog.push(aa()):(a=!0,o=!1,r={useMSE:!1,useWCS:!1}),this.debug.log("JbPro",`mediaSourceFull and auto wasm ${po(o)?" and is not meaningful Retry":""} [mse-> ${a?"wasm":"mse"}] reset player and play`),this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),po(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","mediaSourceFull and reset player and play success")})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceFull,t,e),this.debug.error("JbPro","mediaSourceFull and reset player and play error",i)}))})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceFull,t,e),this.debug.error("JbPro","mediaSourceFull and _resetPlayer error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceFull,t,e),this.debug.log("JbPro","mediaSourceFull and autoWasm is false")})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceFull,t,e),this.debug.error("JbPro","mediaSourceFull and pause error",i)}))}})),this.player.once(ct.mediaSourceAppendBufferError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceAppendBufferError but player is destroyed");this.emit(nt.crashLog,this.getCrashLog(ct.mediaSourceAppendBufferError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mseDecodeErrorReplay){const i=this._opt.url,s=this._opt.playOptions;let r={},a=this.player._opt.decoderErrorAutoWasm,o=!0;a?r={useMSE:!1,useWCS:!1}:this._checkIsMeaningfulRetry(Dr)?this._mseDecodeErrorRetryLog.push(aa()):(a=!0,o=!1,r={useMSE:!1,useWCS:!1}),this.player.isMSEAudioDecoderError&&(this.player.debug.log("JbPro","mediaSourceAppendBufferError and isMSEAudioDecoderError is true so set mseDecodeAudio = false"),r.mseDecodeAudio=!1),this.debug.log("JbPro",`mediaSourceAppendBufferError and auto wasm ${po(o)?" and is not meaningful Retry":""} [mse-> ${a?"wasm":"mse"}] reset player and play`),this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),po(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","mediaSourceAppendBufferError and reset player and play success")})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceAppendBufferError,t,e),this.debug.error("JbPro","mediaSourceAppendBufferError and reset player and play error",i)}))})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceAppendBufferError,t,e),this.debug.error("JbPro","mediaSourceAppendBufferError and _resetPlayer error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceAppendBufferError,t,e),this.debug.log("JbPro","mediaSourceAppendBufferError and autoWasm is false")})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceAppendBufferError,t,e),this.debug.error("JbPro","mediaSourceAppendBufferError and pause error",i)}))}})),this.player.once(ct.mseSourceBufferError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","mseSourceBufferError but player is destroyed");this.emit(nt.crashLog,this.getCrashLog(ct.mseSourceBufferError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mseDecodeErrorReplay){const i=this._opt.url,s=this._opt.playOptions;let r={};if(this.player._opt.mseDecoderUseWorker)r={mseDecoderUseWorker:!1},this.debug.log("JbPro","mseSourceBufferError auto wasm [mse worker -> mse] reset player and play");else{let e=this.player._opt.decoderErrorAutoWasm,t=!0;e?r={useMSE:!1,useWCS:!1}:this._checkIsMeaningfulRetry(Dr)?this._mseDecodeErrorRetryLog.push(aa()):(e=!0,t=!1,r={useMSE:!1,useWCS:!1}),this.player.isMSEVideoDecoderInitializationFailedNotSupportHevc&&(this.debug.log("JbPro","mseSourceBufferError and isMSEVideoDecoderInitializationFailedNotSupportHevc is true so auto wasm"),r={useMSE:!1,useWCS:!1}),this.debug.log("JbPro",`mseSourceBufferError auto wasm ${po(t)?" and is not meaningful Retry":""} [mse-> ${e?"wasm":"mse"}] reset player and play`)}this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),po(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","mseSourceBufferError reset player and play success")})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.mseSourceBufferError,t,e),this.debug.error("JbPro","mseSourceBufferError reset player and play error",i)}))})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.mseSourceBufferError,t,e),this.debug.error("JbPro","mseSourceBufferError _resetPlayer and play error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(nt.playFailedAndPaused,ct.mseSourceBufferError,t,e),this.debug.log("JbPro","mseSourceBufferError and autoWasm is false")})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.mseSourceBufferError,t,e),this.debug.error("JbPro","mseSourceBufferError and pause error:",i)}))}})),this.player.once(ct.mediaSourceBufferedIsZeroError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceBufferedIsZeroError but player is destroyed");this.emit(nt.crashLog,this.getCrashLog(ct.mediaSourceBufferedIsZeroError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mseDecodeErrorReplay){const i=this._opt.url,s=this._opt.playOptions;let r={},a=this.player._opt.decoderErrorAutoWasm,o=!0;a?r={useMSE:!1,useWCS:!1}:this._checkIsMeaningfulRetry(Dr)?this._mseDecodeErrorRetryLog.push(aa()):(a=!0,o=!1,r={useMSE:!1,useWCS:!1}),this.debug.log("JbPro",`mediaSourceBufferedIsZeroError auto wasm ${po(o)?" and is not meaningful Retry":""} [mse-> ${a?"wasm":"mse"}] reset player and play`),this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),po(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","mediaSourceBufferedIsZeroError reset player and play success")})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceBufferedIsZeroError,t,e),this.debug.error("JbPro","mediaSourceBufferedIsZeroError reset player and play error",i)}))})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceBufferedIsZeroError,t,e),this.debug.error("JbPro","mediaSourceBufferedIsZeroError _resetPlayer and play error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceBufferedIsZeroError,t,e),this.debug.log("JbPro","mediaSourceBufferedIsZeroError and autoWasm is false")})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceBufferedIsZeroError,t,e),this.debug.error("JbPro","mediaSourceBufferedIsZeroError and pause error:",i)}))}})),this.player.once(ct.mseAddSourceBufferError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","mseAddSourceBufferError but player is destroyed");this.emit(nt.crashLog,this.getCrashLog(ct.mseAddSourceBufferError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.hardDecodingNotSupportAutoWasm){this.debug.log("JbPro","mseAddSourceBufferError auto wasm [mse-> wasm] reset player and play");const i=this._opt.url,s=this._opt.playOptions;let r={useMSE:!1,useWCS:!1};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),po(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","mseAddSourceBufferError auto wasm [mse-> wasm] reset player and play success")})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.mseAddSourceBufferError,t,e),this.debug.error("JbPro","mseAddSourceBufferError auto wasm [mse-> wasm] reset player and play error",i)}))})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.mseAddSourceBufferError,t,e),this.debug.error("JbPro","mseAddSourceBufferError auto wasm [mse-> wasm] _resetPlayer and play error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(nt.playFailedAndPaused,ct.mseAddSourceBufferError,t,e),this.debug.log("JbPro","mseAddSourceBufferError and autoWasm is false")})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.mseAddSourceBufferError,t,e),this.debug.error("JbPro","mseAddSourceBufferError and pause error",i)}))}})),this.player.once(ct.mediaSourceDecoderConfigurationError,(e=>{if(this.isDestroyed())this.debug.log("JbPro","mediaSourceDecoderConfigurationError but player is destroyed");else if(this.emit(nt.crashLog,this.getCrashLog(ct.mediaSourceDecoderConfigurationError,e)),this.player&&this.player._opt.hardDecodingNotSupportAutoWasm){this.debug.log("JbPro","mediaSourceDecoderConfigurationError auto wasm [mse-> wasm] reset player and play");const t=this._opt.url,i=this._opt.playOptions;let s={useMSE:!1,useWCS:!1};this._resetPlayer(s).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","mediaSourceDecoderConfigurationError auto wasm [mse-> wasm] reset player and play success")})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceDecoderConfigurationError,e),this.debug.error("JbPro","mediaSourceDecoderConfigurationError auto wasm [mse-> wasm] reset player and play error",t)}))})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceDecoderConfigurationError,e),this.debug.error("JbPro","mediaSourceDecoderConfigurationError auto wasm [mse-> wasm] _resetPlayer and play error",t)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceDecoderConfigurationError,e),this.debug.log("JbPro","mediaSourceDecoderConfigurationError and autoWasm is false")})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceDecoderConfigurationError,e),this.debug.error("JbPro","mediaSourceDecoderConfigurationError and pause error",t)}))}})),this.player.once(ct.mediaSourceTsIsMaxDiff,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceTsIsMaxDiff but player is destroyed");this.emit(nt.crashLog,this.getCrashLog(ct.mediaSourceTsIsMaxDiff,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mediaSourceTsIsMaxDiffReplay){this.debug.log("JbPro","mediaSourceTsIsMaxDiff reset player and play");const i=this._opt.url,s=this._opt.playOptions;let r={};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),po(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","mediaSourceTsIsMaxDiff replay success")})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceTsIsMaxDiff,t,e),this.debug.error("JbPro","mediaSourceTsIsMaxDiff replay error",i)}))})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceTsIsMaxDiff,t,e),this.debug.error("JbPro","mediaSourceTsIsMaxDiff _resetPlayer error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceTsIsMaxDiff,t,e),this.debug.log("JbPro","mediaSourceTsIsMaxDiff and replay is false")})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceTsIsMaxDiff,t,e),this.debug.error("JbPro","mediaSourceTsIsMaxDiff and pause error",i)}))}})),this.player.once(ct.mseWidthOrHeightChange,(t=>{if(this.isDestroyed())return void this.debug.log("JbPro","mseWidthOrHeightChange but player is destroyed");this.emit(nt.crashLog,this.getCrashLog(ct.mseWidthOrHeightChange,t));const i=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.widthOrHeightChangeReplay){this.debug.log("JbPro","mseWidthOrHeightChange and reset player and play");const e=this._opt.url,s=this._opt.playOptions;let r={};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,i,{loadingIcon:this.player._opt.replayShowLoadingIcon})),po(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.player._opt.widthOrHeightChangeReplayDelayTime>0?this.widthOrHeightChangeReplayDelayTimeout=setTimeout((()=>{this.isDestroyed()?this.debug.log("JbPro","mseWidthOrHeightChange and widthOrHeightChangeReplayDelayTime but player is destroyed"):this.play(e,s).then((()=>{this.debug.log("JbPro","mseWidthOrHeightChange and reset player and play success")})).catch((e=>{this.emit(nt.playFailedAndPaused,ct.mseWidthOrHeightChange,i,t),this.debug.error("JbPro","mseWidthOrHeightChange and reset player and play error",e)}))}),1e3*this.player._opt.widthOrHeightChangeReplayDelayTime):this.play(e,s).then((()=>{this.debug.log("JbPro","mseWidthOrHeightChange and reset player and play success")})).catch((e=>{this.emit(nt.playFailedAndPaused,ct.mseWidthOrHeightChange,i,t),this.debug.error("JbPro","mseWidthOrHeightChange and reset player and play error",e)}))})).catch((e=>{this.emit(nt.playFailedAndPaused,ct.mseWidthOrHeightChange,i,t),this.debug.error("JbPro","mseWidthOrHeightChange and _resetPlayer error",e)}))}else{const s=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(s).then((()=>{this.emit(nt.playFailedAndPaused,ct.mseWidthOrHeightChange,i,t),this.debug.error("JbPro","mseWidthOrHeightChange and _resetPlayer error",e)})).catch((e=>{this.emit(nt.playFailedAndPaused,ct.mseWidthOrHeightChange,i,t),this.debug.error("JbPro","mseWidthOrHeightChange error and pause error",e)}))}})),this.player.once(ct.mediaSourceAudioG711NotSupport,(t=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceAudioG711NotSupport but player is destroyed");const i=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mediaSourceAudioG711NotSupportReplay){this.debug.log("JbPro","mediaSourceAudioG711NotSupport and reset player and play");const e=this._opt.url,s=this._opt.playOptions;let r={mseDecodeAudio:!1};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,i,{loadingIcon:this.player._opt.replayShowLoadingIcon})),po(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(e,s).then((()=>{this.debug.log("JbPro","mediaSourceAudioG711NotSupport and reset player and play success")})).catch((e=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceAudioG711NotSupport,i,t),this.debug.error("JbPro","mediaSourceAudioG711NotSupport and reset player and play error",e)}))})).catch((e=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceAudioG711NotSupport,i,t),this.debug.error("JbPro","mediaSourceAudioG711NotSupport and _resetPlayer error",e)}))}else{const s=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(s).then((()=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceAudioG711NotSupport,i,t),this.debug.error("JbPro","mediaSourceAudioG711NotSupport and _resetPlayer error",e)})).catch((e=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceAudioG711NotSupport,i,t),this.debug.error("JbPro","mediaSourceAudioG711NotSupport error and pause error",e)}))}})),this.player.once(ct.mediaSourceAudioInitTimeout,(t=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceAudioInitTimeout but player is destroyed");const i=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mediaSourceAudioInitTimeoutReplay){this.debug.log("JbPro","mediaSourceAudioInitTimeout and reset player and play");const e=this._opt.url,s=this._opt.playOptions;let r={mseDecodeAudio:!1};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,i,{loadingIcon:this.player._opt.replayShowLoadingIcon})),po(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(e,s).then((()=>{this.debug.log("JbPro","mediaSourceAudioInitTimeout and reset player and play success")})).catch((e=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceAudioInitTimeout,i,t),this.debug.error("JbPro","mediaSourceAudioInitTimeout and reset player and play error",e)}))})).catch((e=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceAudioInitTimeout,i,t),this.debug.error("JbPro","mediaSourceAudioInitTimeout and _resetPlayer error",e)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceAudioInitTimeout,i),this.debug.error("JbPro","mediaSourceAudioInitTimeout and _resetPlayer error",e)})).catch((e=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceAudioInitTimeout,i),this.debug.error("JbPro","mediaSourceAudioInitTimeout error and pause error",e)}))}})),this.player.once(ct.mediaSourceAudioNoDataTimeout,(t=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceAudioNoDataTimeout but player is destroyed");const i=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mediaSourceAudioInitTimeoutReplay){this.debug.log("JbPro","mediaSourceAudioNoDataTimeout and reset player and play");const e=this._opt.url,s=this._opt.playOptions;let r={mseDecodeAudio:!1};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,i,{loadingIcon:this.player._opt.replayShowLoadingIcon})),po(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(e,s).then((()=>{this.debug.log("JbPro","mediaSourceAudioNoDataTimeout and reset player and play success")})).catch((e=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceAudioNoDataTimeout,i,t),this.debug.error("JbPro","mediaSourceAudioNoDataTimeout and reset player and play error",e)}))})).catch((e=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceAudioNoDataTimeout,i,t),this.debug.error("JbPro","mediaSourceAudioNoDataTimeout and _resetPlayer error",e)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceAudioNoDataTimeout,i),this.debug.error("JbPro","mediaSourceAudioNoDataTimeout and _resetPlayer error",e)})).catch((e=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceAudioNoDataTimeout,i),this.debug.error("JbPro","mediaSourceAudioNoDataTimeout error and pause error",e)}))}})),this.player.once(ct.mediaSourceUseCanvasRenderPlayFailed,(e=>{if(this.isDestroyed())this.debug.log("JbPro","mediaSourceUseCanvasRenderPlayFailed but player is destroyed");else if(this.emit(nt.crashLog,this.getCrashLog(ct.mediaSourceUseCanvasRenderPlayFailed,e)),this.player&&this.player._opt.mediaSourceUseCanvasRenderPlayFailedReplay&&this.player._opt.mediaSourceUseCanvasRenderPlayFailedReplayType){this.debug.log("JbPro",`mediaSourceUseCanvasRenderPlayFailed relayType is ${this.player._opt.mediaSourceUseCanvasRenderPlayFailedReplayType} and reset player and play`);const t=this._opt.url,i=this._opt.playOptions;let s={};const r=this.player._opt.mediaSourceUseCanvasRenderPlayFailedReplayType;r===$?s={useMSE:!1,useWCS:!1}:r===W&&(s={useVideoRender:!0,useCanvasRender:!1}),this._resetPlayer(s).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","mediaSourceUseCanvasRenderPlayFailed and reset player and play success")})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceUseCanvasRenderPlayFailed,e),this.debug.error("JbPro","mediaSourceUseCanvasRenderPlayFailed and reset player and play error",t)}))})).catch((e=>{this.debug.error("JbPro","mediaSourceUseCanvasRenderPlayFailed auto and _resetPlayer and play error",e)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.debug.log("JbPro","mediaSourceUseCanvasRenderPlayFailed and pause player success")})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.mediaSourceUseCanvasRenderPlayFailed,e),this.debug.error("JbPro","mediaSourceUseCanvasRenderPlayFailed and pause",t)}))}})),this.player.once(ct.webcodecsH265NotSupport,(e=>{if(this.isDestroyed())this.debug.log("JbPro","webcodecsH265NotSupport but player is destroyed");else if(this.emit(nt.crashLog,this.getCrashLog(ct.webcodecsH265NotSupport,e)),this.player&&this.player._opt.hardDecodingNotSupportAutoWasm){this.debug.log("JbPro","webcodecsH265NotSupport auto wasm [wcs-> wasm] reset player and play");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({useMSE:!1,useWCS:!1}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","webcodecsH265NotSupport auto wasm [wcs-> wasm] reset player and play success")})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.webcodecsH265NotSupport,e),this.debug.error("JbPro","webcodecsH265NotSupport auto wasm [wcs-> wasm] reset player and play error",t)}))})).catch((e=>{this.debug.error("JbPro","webcodecsH265NotSupport auto wasm [wcs-> wasm] _resetPlayer and play error",e)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(nt.playFailedAndPaused,ct.webcodecsH265NotSupport,e),this.debug.log("JbPro","webcodecsH265NotSupport and autoWasm is false")})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.webcodecsH265NotSupport,e),this.debug.error("JbPro","webcodecsH265NotSupport and pause error",t)}))}})),this.player.once(ct.webcodecsUnsupportedConfigurationError,(e=>{if(this.isDestroyed())this.debug.log("JbPro","webcodecsUnsupportedConfigurationError but player is destroyed");else if(this.emit(nt.crashLog,this.getCrashLog(ct.webcodecsUnsupportedConfigurationError,e)),this.player&&this.player._opt.hardDecodingNotSupportAutoWasm){this.debug.log("JbPro","webcodecsUnsupportedConfigurationError auto wasm [wcs-> wasm] reset player and play");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({useMSE:!1,useWCS:!1}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","webcodecsUnsupportedConfigurationError auto wasm [wcs-> wasm] reset player and play success")})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.webcodecsUnsupportedConfigurationError,e),this.debug.error("JbPro","webcodecsUnsupportedConfigurationError auto wasm [wcs-> wasm] reset player and play error",t)}))})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.webcodecsUnsupportedConfigurationError,e),this.debug.error("JbPro","webcodecsUnsupportedConfigurationError auto wasm [wcs-> wasm] _resetPlayer and play error",t)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(nt.playFailedAndPaused,ct.webcodecsUnsupportedConfigurationError,e),this.debug.log("JbPro","webcodecsUnsupportedConfigurationError and autoWasm is false")})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.webcodecsUnsupportedConfigurationError,e),this.debug.error("JbPro","webcodecsUnsupportedConfigurationError and pause error",t)}))}})),this.player.once(ct.webcodecsDecodeConfigureError,(e=>{if(this.isDestroyed())this.debug.log("JbPro","webcodecsDecodeConfigureError but player is destroyed");else if(this.emit(nt.crashLog,this.getCrashLog(ct.webcodecsDecodeConfigureError,e)),this.player&&this.player._opt.hardDecodingNotSupportAutoWasm){this.debug.log("JbPro","webcodecsDecodeConfigureError auto wasm [wcs-> wasm] reset player and play");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({useMSE:!1,useWCS:!1}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","webcodecsDecodeConfigureError auto wasm [wcs-> wasm] reset player and play success")})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.webcodecsDecodeConfigureError,e),this.debug.error("JbPro","webcodecsDecodeConfigureError auto wasm [wcs-> wasm] reset player and play error",t)}))})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.webcodecsDecodeConfigureError,e),this.debug.error("JbPro","webcodecsDecodeConfigureError auto wasm [wcs-> wasm] _resetPlayer and play error",t)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(nt.playFailedAndPaused,ct.webcodecsDecodeConfigureError,e),this.debug.log("JbPro","webcodecsDecodeConfigureError and autoWasm is false")})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.webcodecsDecodeConfigureError,e),this.debug.error("JbPro","webcodecsDecodeConfigureError and pause error",t)}))}})),this.player.once(ct.webcodecsDecodeError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","webcodecsDecodeError but player is destroyed");this.emit(nt.crashLog,this.getCrashLog(ct.webcodecsDecodeError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.wcsDecodeErrorReplay){const i=this._opt.url,s=this._opt.playOptions;let r={},a=this.player._opt.decoderErrorAutoWasm,o=!0;a?r={useMSE:!1,useWCS:!1}:this._checkIsMeaningfulRetry(Lr)?this._wcsDecodeErrorRetryLog.push(aa()):(a=!0,o=!1,r={useMSE:!1,useWCS:!1}),this.debug.log("JbPro",`webcodecs decode error autoWasm ${po(o)?" and is not meaningful Retry":""} [wcs-> ${a?"wasm":"wcs"}] reset player and play`),this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),po(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","webcodecs decode error reset player and play success")})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.webcodecsDecodeError,t,e),this.debug.error("JbPro","webcodecs decode error reset player and play error",i)}))})).catch((()=>{this.emit(nt.playFailedAndPaused,ct.webcodecsDecodeError,t,e),this.debug.error("JbPro","webcodecs decode error _resetPlayer error")}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(nt.playFailedAndPaused,ct.webcodecsDecodeError,t,e),this.debug.log("JbPro","webcodecs decode error and autoWasm is false")})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.webcodecsDecodeError,t,e),this.debug.error("JbPro","webcodecs decode error and pause error",i)}))}})),this.player.once(ct.wcsWidthOrHeightChange,(t=>{if(this.isDestroyed())return void this.debug.log("JbPro","wcsWidthOrHeightChange but player is destroyed");this.emit(nt.crashLog,this.getCrashLog(ct.wcsWidthOrHeightChange,t));const i=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.widthOrHeightChangeReplay){this.debug.log("JbPro","wcsWidthOrHeightChange and reset player and play");const e=this._opt.url,s=this._opt.playOptions;let r={};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,i,{loadingIcon:this.player._opt.replayShowLoadingIcon})),po(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this._opt.widthOrHeightChangeReplayDelayTime>0?this.widthOrHeightChangeReplayDelayTimeout=setTimeout((()=>{this.isDestroyed()?this.debug.log("JbPro","wcsWidthOrHeightChange and widthOrHeightChangeReplayDelayTime but player is destroyed"):this.play(e,s).then((()=>{this.debug.log("JbPro","wcsWidthOrHeightChange and reset player and play success")})).catch((e=>{this.emit(nt.playFailedAndPaused,ct.wcsWidthOrHeightChange,i,t),this.debug.error("JbPro","wcsWidthOrHeightChange and reset player and play error",e)}))}),1e3*this._opt.widthOrHeightChangeReplayDelayTime):this.play(e,s).then((()=>{this.debug.log("JbPro","wcsWidthOrHeightChange and reset player and play success")})).catch((e=>{this.emit(nt.playFailedAndPaused,ct.wcsWidthOrHeightChange,i,t),this.debug.error("JbPro","wcsWidthOrHeightChange and reset player and play error",e)}))})).catch((e=>{this.emit(nt.playFailedAndPaused,ct.wcsWidthOrHeightChange,i,t),this.debug.error("JbPro","wcsWidthOrHeightChange and _resetPlayer error",e)}))}else{const s=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(s).then((()=>{this.emit(nt.playFailedAndPaused,ct.wcsWidthOrHeightChange,i,t),this.debug.error("JbPro","wcsWidthOrHeightChange and _resetPlayer error",e)})).catch((e=>{this.emit(nt.playFailedAndPaused,ct.wcsWidthOrHeightChange,i,t),this.debug.error("JbPro","wcsWidthOrHeightChange error and pause error",e)}))}})),this.player.once(ct.wasmDecodeError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","wasmDecodeError but player is destroyed");this.emit(nt.crashLog,this.getCrashLog(ct.wasmDecodeError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.wasmDecodeErrorReplay){this.debug.log("JbPro","wasm decode error and reset player and play");const i=this._opt.url,s=this._opt.playOptions;let r={};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),po(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","wasm decode error and reset player and play success")})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.wasmDecodeError,t,e),this.debug.error("JbPro","wasm decode error and reset player and play error",i)}))})).catch((()=>{this.emit(nt.playFailedAndPaused,ct.wasmDecodeError,t,e),this.debug.error("JbPro","wasm decode error and _resetPlayer error")}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(nt.playFailedAndPaused,ct.wasmDecodeError,t,e),this.debug.log("JbPro","wasm decode error and wasmDecodeErrorReplay is false")})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.wasmDecodeError,t,e),this.debug.error("JbPro","wasm decode error and pause error",i)}))}})),this.player.once(ct.simdDecodeError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","simdDecodeError but player is destroyed");this.emit(nt.crashLog,this.getCrashLog(ct.simdDecodeError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.simdDecodeErrorReplay){this.debug.log("JbPro",`simdDecodeError error simdDecodeErrorReplayType is ${this.player._opt.simdDecodeErrorReplayType} and reset player and play`);const i=this._opt.url,s=this._opt.playOptions;let r={};this.player._opt.simdDecodeErrorReplayType===N&&(r={useSIMD:!1}),this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),po(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","simdDecodeError and reset player and play success")})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.simdDecodeError,t,e),this.debug.error("JbPro","simdDecodeError and reset player and play error",i)}))})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.simdDecodeError,t,e),this.debug.error("JbPro","simdDecodeError and _resetPlayer error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(nt.playFailedAndPaused,ct.simdDecodeError,t,e),this.debug.error("JbPro","simdDecodeError and simdDecodeErrorReplay is false")})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.simdDecodeError,t,e),this.debug.error("JbPro","simdDecodeError error and pause error",i)}))}})),this.player.once(ct.wasmWidthOrHeightChange,(t=>{if(this.isDestroyed())return void this.debug.log("JbPro","wasmWidthOrHeightChange but player is destroyed");this.emit(nt.crashLog,this.getCrashLog(ct.wasmWidthOrHeightChange,t));const i=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.widthOrHeightChangeReplay){this.debug.log("JbPro","wasmWidthOrHeightChange and reset player and play");const e=this._opt.url,s=this._opt.playOptions;let r={};this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,i,{loadingIcon:this.player._opt.replayShowLoadingIcon})),po(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this._opt.widthOrHeightChangeReplayDelayTime>0?this.widthOrHeightChangeReplayDelayTimeout=setTimeout((()=>{this.isDestroyed()?this.debug.log("JbPro","wasmWidthOrHeightChange and widthOrHeightChangeReplayDelayTime but player is destroyed"):this.play(e,s).then((()=>{this.debug.log("JbPro","wasmWidthOrHeightChange and reset player and play success")})).catch((e=>{this.emit(nt.playFailedAndPaused,ct.wasmWidthOrHeightChange,i,t),this.debug.error("JbPro","wasmWidthOrHeightChange and reset player and play error",e)}))}),1e3*this._opt.widthOrHeightChangeReplayDelayTime):this.play(e,s).then((()=>{this.debug.log("JbPro","wasmWidthOrHeightChange and reset player and play success")})).catch((e=>{this.emit(nt.playFailedAndPaused,ct.wasmWidthOrHeightChange,i,t),this.debug.error("JbPro","wasmWidthOrHeightChange and reset player and play error",e)}))})).catch((e=>{this.emit(nt.playFailedAndPaused,ct.wasmWidthOrHeightChange,i,t),this.debug.error("JbPro","wasmWidthOrHeightChange and _resetPlayer error",e)}))}else{const s=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(s).then((()=>{this.emit(nt.playFailedAndPaused,ct.wasmWidthOrHeightChange,i,t),this.debug.error("JbPro","wasmWidthOrHeightChange and _resetPlayer error",e)})).catch((e=>{this.emit(nt.playFailedAndPaused,ct.wasmWidthOrHeightChange,i),this.debug.error("JbPro","wasmWidthOrHeightChange error and pause error",e)}))}})),this.player.once(ct.wasmUseVideoRenderError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","wasmUseVideoRenderError but player is destroyed");this.emit(nt.crashLog,this.getCrashLog(ct.wasmUseVideoRenderError,e)),this.debug.log("JbPro","wasmUseVideoRenderError and reset player and play");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({useVideoRender:!1,useCanvasRender:!0}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","wasmUseVideoRenderError and reset player and play success")})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.wasmUseVideoRenderError,{},e),this.debug.error("JbPro","wasmUseVideoRenderError and reset player and play error",t)}))})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.wasmUseVideoRenderError,{},e),this.debug.error("JbPro","wasmUseVideoRenderError and _resetPlayer error",t)}))})),this.player.once(ct.videoElementPlayingFailed,(e=>{if(this.isDestroyed())this.debug.log("JbPro","videoElementPlayingFailed but player is destroyed");else if(this.emit(nt.crashLog,this.getCrashLog(ct.videoElementPlayingFailed,e)),this.player&&this.player._opt.videoElementPlayingFailedReplay){this.debug.log("JbPro",`videoElementPlayingFailed and useMSE is ${this._opt.useMSE} and reset player and play`);const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({useMSE:!1,useVideoRender:!1,useCanvasRender:!0}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","videoElementPlayingFailed and reset player and play success")})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.videoElementPlayingFailed,{},e),this.debug.error("JbPro","videoElementPlayingFailed and reset player and play error",t)}))})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.videoElementPlayingFailed,{},e),this.debug.error("JbPro","videoElementPlayingFailed and _resetPlayer error",t)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(nt.playFailedAndPaused,ct.videoElementPlayingFailed,{},e),this.debug.error("JbPro","videoElementPlayingFailed and videoElementPlayingFailedReplay is false")})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.videoElementPlayingFailed,{},e),this.debug.error("JbPro","videoElementPlayingFailed and _pause error",t)}))}})),this.player.once(ct.simdH264DecodeVideoWidthIsTooLarge,(e=>{if(this.isDestroyed())this.debug.log("JbPro","simdH264DecodeVideoWidthIsTooLarge but player is destroyed");else if(this.emit(nt.crashLog,this.getCrashLog(ct.simdH264DecodeVideoWidthIsTooLarge,e)),this.player&&this.player._opt.simdH264DecodeVideoWidthIsTooLargeReplay){this.debug.log("JbPro","simdH264DecodeVideoWidthIsTooLarge and reset player and play");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({useSIMD:!1}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","simdH264DecodeVideoWidthIsTooLarge and reset player and play success")})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.simdH264DecodeVideoWidthIsTooLarge,{},e),this.debug.error("JbPro","simdH264DecodeVideoWidthIsTooLarge and reset player and play error",t)}))})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.simdH264DecodeVideoWidthIsTooLarge,{},e),this.debug.error("JbPro","simdH264DecodeVideoWidthIsTooLarge and _resetPlayer error",t)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(nt.playFailedAndPaused,ct.simdH264DecodeVideoWidthIsTooLarge,{},e),this.debug.error("JbPro","simdH264DecodeVideoWidthIsTooLarge and simdDecodeErrorReplay is false")})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.simdH264DecodeVideoWidthIsTooLarge,{},e),this.debug.error("JbPro","simdH264DecodeVideoWidthIsTooLarge and pause error",t)}))}})),this.player.once(nt.networkDelayTimeout,(e=>{if(this.player._opt.networkDelayTimeoutReplay){if(this.isDestroyed())return void this.debug.log("JbPro","networkDelayTimeout but player is destroyed");this.emit(nt.crashLog,this.getCrashLog(nt.networkDelayTimeout,e));const t=this._getVideoLastIframeInfo();this.debug.log("JbPro","network delay time out and reset player and play");const i=this._opt.url,s=this._opt.playOptions;let r={};this.player&&this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),po(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","wasm decode error and reset player and play success")})).catch((i=>{this.emit(nt.playFailedAndPaused,nt.networkDelayTimeout,t,e),this.debug.error("JbPro","wasm decode error and reset player and play error",i)}))})).catch((()=>{this.emit(nt.playFailedAndPaused,nt.networkDelayTimeout,t,e),this.debug.error("JbPro","wasm decode error and _resetPlayer error")}))}})),this.player.once(nt.flvDemuxBufferSizeTooLarge,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","flvDemuxBufferSizeTooLarge but player is destroyed");const t=this._getVideoLastIframeInfo();if(this.player._opt.flvDemuxBufferSizeTooLargeReplay){this.emit(nt.crashLog,this.getCrashLog(nt.flvDemuxBufferSizeTooLarge,e)),this.debug.log("JbPro","flv Demux Buffer Size Too Large and flvDemuxBufferSizeTooLargeReplay = true and reset player and play");const i=this._opt.url,s=this._opt.playOptions;let r={};this.player&&this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),po(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log(this.TAG_NAME,"flv Demux Buffer Size Too Large and reset player and play success")})).catch((i=>{this.emit(nt.playFailedAndPaused,nt.flvDemuxBufferSizeTooLarge,t,e),this.debug.error(this.TAG_NAME,"flv Demux Buffer Size Too Large and reset player and play error",i)}))})).catch((()=>{this.emit(nt.playFailedAndPaused,nt.flvDemuxBufferSizeTooLarge,t,e),this.debug.error(this.TAG_NAME,"flv Demux Buffer Size Too Large and _resetPlayer error")}))}else if(this._opt.flvDemuxBufferSizeTooLargeEmitFailed){this.debug.log(this.TAG_NAME,"flv Demux Buffer Size Too Large and flvDemuxBufferSizeTooLargeEmitFailed = true and pause player");const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(nt.playFailedAndPaused,ct.flvDemuxBufferSizeTooLarge,t,e)})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.flvDemuxBufferSizeTooLarge,t,e),this.debug.error(this.TAG_NAME,"flv Demux Buffer Size Too Large",i)}))}})),this.player.once(ct.fetchError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","fetchError but player is destroyed");this.emit(nt.crashLog,this.getCrashLog(ct.fetchError,e));const t=this._getVideoLastIframeInfo(),i=this._isNeedNetworkDisconnectReplay();if(this.player._opt.streamErrorReplay||i){i?this.debug.log("JbPro","fetch error and network is disconnect and reset player and play"):this.debug.log("JbPro",`fetch error and streamErrorReplay is true and _streamErrorReplayTimes is ${this._streamErrorReplayTimes}, streamErrorReplayDelayTime is ${this._opt.streamErrorReplayDelayTime}, next replay`);let s={};this.player._opt.replayUseLastFrameShow&&(s=Object.assign({},s,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),po(this.isMute())&&(s.isNotMute=!0);const r=this._opt.playOptions,a=this._opt.url,o=i?1:this._opt.streamErrorReplayDelayTime;this._resetPlayer(s).then((()=>{this.streamErrorReplayDelayTimeout=setTimeout((()=>{if(this.isDestroyed())this.debug.log("JbPro","fetch error and _resetPlayer but player is destroyed and return");else{if(this.network.isOffline())return this.debug.log("JbPro","fetch error and network is offline and wait network online to play , so return"),this._isNetworkOfflinePaused=!0,void(this._isNetworkOfflinePausedAndNextPlayConfig={url:a,options:r,type:ct.fetchError});this._streamErrorReplayTimes++,this.play(a,r).then((()=>{this.debug.log("JbPro","fetch error and reset player and play success")})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.fetchError,{},e),this.debug.error("JbPro","fetch error and reset player and play error",t)}))}}),1e3*o)})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.fetchError,{},e),this.debug.error("JbPro","fetch error and _resetPlayer error",t)}))}else{this.debug.log("JbPro","fetch error and pause player");const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(nt.playFailedAndPaused,ct.fetchError,t,e)})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.fetchError,t,e),this.debug.error("JbPro","fetch error and pause",i)}))}})),this.player.once(nt.streamEnd,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","streamEnd but player is destroyed and return");this.emit(nt.crashLog,this.getCrashLog(nt.streamEnd,e));const t=this._getVideoLastIframeInfo(),i=this._checkIsMeaningfulRetry(Rr),s=""+e=="1006"&&this.player._opt.websocket1006ErrorReplay,r=s&&i,a=this.player._opt.streamEndReplay,o=this._isNeedNetworkDisconnectReplay();if(r||a||o){o?this.debug.log("JbPro","streamEnd and network is disconnect and reset player and play"):r?this.debug.log("JbPro",`streamEnd and websocket1006ErrorReplay is true and error is 1006 and _websocket1006ErrorReplayTimes is ${this._websocket1006ErrorReplayTimes} , delay ${this._opt.websocket1006ErrorReplayDelayTime}s reset player and play`):this.debug.log("JbPro",`streamEnd and isStreamEndReplay is true and and _streamEndReplayTimes is ${this._streamEndReplayTimes} , delay ${this._opt.streamEndReplayDelayTime}s reset player and play`);const i=this._opt.playOptions,s=this._opt.url;this._websocket1006ErrorRetryLog.push(aa());let a={};this.player._opt.replayUseLastFrameShow&&(a=Object.assign({},a,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),po(this.isMute())&&(a.isNotMute=!0);let n=r?this._opt.websocket1006ErrorReplayDelayTime:this._opt.streamEndReplayDelayTime;o&&(n=1),this._initLoadingBackgroundForIOS(t),this._resetPlayer(a).then((()=>{this.streamEndReplayDelayTimeout=setTimeout((()=>{if(this._removeLoadingBackgroundForIOS(),this.isDestroyed())o?this.debug.log("JbPro","streamEnd and network is disconnect and _resetPlayer() but player is destroyed and return"):r?this.debug.log("JbPro","streamEnd and 1006 error and _resetPlayer() but player is destroyed and return"):this.debug.log("JbPro","streamEnd and _resetPlayer() but player is destroyed and return");else{if(this.network.isOffline())return r?this.debug.log("JbPro","streamEnd and 1006 error network is offline and wait network online to play , so return"):this.debug.log("JbPro","streamEnd and network is offline and wait network online to play , so return"),this._isNetworkOfflinePaused=!0,void(this._isNetworkOfflinePausedAndNextPlayConfig={url:s,options:i,type:r?ct.websocket1006Error:ct.streamEnd});r?this._websocket1006ErrorReplayTimes++:this._streamEndReplayTimes++,this.play(s,i).then((()=>{r?this.debug.log("JbPro","streamEnd and 1006 error and reset player and play success"):this.debug.log("JbPro","streamEnd and reset player and play success")})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.streamEnd,{},e),r?this.debug.error("JbPro","streamEnd and 1006 error and reset player and play error",t):this.debug.error("JbPro","streamEnd and reset player and play error",t)}))}}),1e3*n)})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.streamEnd,{},e),r?this.debug.error("JbPro","streamEnd and 1006 and _resetPlayer error",t):this.debug.error("JbPro","streamEnd and _resetPlayer error",t)}))}else{s?this.debug.log("JbPro","streamEnd pause player "+(po(i)?"and is not meaningful retry":"")):this.debug.log("JbPro","streamEnd pause player");const r=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(r).then((()=>{this.emit(nt.playFailedAndPaused,nt.streamEnd,t,e)})).catch((i=>{this.emit(nt.playFailedAndPaused,nt.streamEnd,t,e),this.debug.error("JbPro","streamEnd pause",i)}))}})),this.player.once(ct.websocketError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","websocketError but player is destroyed");this.emit(nt.crashLog,this.getCrashLog(ct.websocketError,e));const t=this._getVideoLastIframeInfo(),i=this._isNeedNetworkDisconnectReplay();if(this.player._opt.streamErrorReplay||i){i?this.debug.log("JbPro","websocketError error and network is disconnect and reset player and play"):this.debug.log("JbPro",`websocketError error and streamErrorReplay is true and _streamErrorReplayTimes is ${this._streamErrorReplayTimes} and streamErrorReplayDelayTime is ${this._opt.streamErrorReplayDelayTime}, next replay`);let s={};this.player._opt.replayUseLastFrameShow&&(s=Object.assign({},s,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),po(this.isMute())&&(s.isNotMute=!0);const r=this._opt.playOptions,a=this._opt.url,o=i?1:this._opt.streamErrorReplayDelayTime;this._resetPlayer(s).then((()=>{this.streamErrorReplayDelayTimeout=setTimeout((()=>{if(this.isDestroyed())i?this.debug.log("JbPro","websocketError error and network is disconnect and _resetPlayer() but player is destroyed and return"):this.debug.log("JbPro","websocketError error and _resetPlayer() but player is destroyed and return");else{if(this.network.isOffline())return this.debug.log("JbPro","websocketError error and network is offline and wait network online to play , so return"),this._isNetworkOfflinePaused=!0,void(this._isNetworkOfflinePausedAndNextPlayConfig={url:a,options:r,type:ct.websocketError});this._streamErrorReplayTimes++,this.play(a,r).then((()=>{this.debug.log("JbPro","websocketError error and reset player and play success")})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.fetchError,{},e),this.debug.error("JbPro","websocketError error and reset player and play error",t)}))}}),1e3*o)})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.fetchError,{},e),this.debug.error("JbPro","websocketError error and _resetPlayer error",t)}))}else{this.debug.log("JbPro","websocketError and pause player");const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(nt.playFailedAndPaused,ct.websocketError,t,e)})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.websocketError,t,e),this.debug.error("JbPro","websocketError and pause",i)}))}})),this.player.once(ct.webrtcError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","webrtcError but player is destroyed");this.emit(nt.crashLog,this.getCrashLog(ct.webrtcError,e));const t=this._getVideoLastIframeInfo();this.debug.log("JbPro","webrtcError and pause player");const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(nt.playFailedAndPaused,ct.webrtcError,t,e)})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.webrtcError,t,e),this.debug.error("JbPro","webrtcError and pause",i)}))})),this.player.once(ct.hlsError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","hlsError but player is destroyed");this.emit(nt.crashLog,this.getCrashLog(ct.hlsError,e));const t=this._getVideoLastIframeInfo();this.debug.log("JbPro","hlsError and pause player");const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(nt.playFailedAndPaused,ct.hlsError,t,e)})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.hlsError,t,e),this.debug.error("JbPro","hlsError and pause",i)}))})),this.player.once(ct.aliyunRtcError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","aliyunRtcError but player is destroyed");this.emit(nt.crashLog,this.getCrashLog(ct.aliyunRtcError,e));const t=this._getVideoLastIframeInfo();this.debug.log("JbPro","aliyunRtcError and pause player");const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(nt.playFailedAndPaused,ct.aliyunRtcError,t,e)})).catch((i=>{this.emit(nt.playFailedAndPaused,ct.aliyunRtcError,t,e),this.debug.error("JbPro","aliyunRtcError and pause",i)}))})),this.player.once(ct.decoderWorkerInitError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","decoderWorkerInitError but player is destroyed");this.emit(nt.crashLog,this.getCrashLog(ct.decoderWorkerInitError,e)),this.debug.log("JbPro","decoderWorkerInitError and pause player");const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(nt.playFailedAndPaused,ct.decoderWorkerInitError,{},e)})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.decoderWorkerInitError,{},e),this.debug.error("JbPro","decoderWorkerInitError and pause",t)}))})),this.player.once(ct.videoElementPlayingFailedForWebrtc,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","videoElementPlayingFailedForWebrtc but player is destroyed");this.emit(nt.crashLog,this.getCrashLog(ct.videoElementPlayingFailedForWebrtc,e)),this.debug.log("JbPro","videoElementPlayingFailedForWebrtc and pause player");const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(nt.playFailedAndPaused,ct.videoElementPlayingFailedForWebrtc,{},e)})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.videoElementPlayingFailedForWebrtc,{},e),this.debug.error("JbPro","videoElementPlayingFailedForWebrtc and pause",t)}))})),this.player.once(ct.videoInfoError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","videoInfoError but player is destroyed");this.emit(nt.crashLog,this.getCrashLog(ct.videoInfoError,e)),this.debug.log("JbPro","videoInfoError and pause player");const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(nt.playFailedAndPaused,ct.videoInfoError,{},e)})).catch((t=>{this.emit(nt.playFailedAndPaused,ct.videoInfoError,{},e),this.debug.error("JbPro","videoInfoError and pause",t)}))})),this.player.once(nt.webrtcStreamH265,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","webrtcStreamH265 but player is destroyed");this.debug.log("JbPro","webrtcStreamH265 and reset player and play");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({isWebrtcH265:!0}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","webrtcStreamH265 and reset player and play success")})).catch((t=>{this.emit(nt.playFailedAndPaused,nt.webrtcStreamH265,{},e),this.debug.error("JbPro","webrtcStreamH265 and reset player and play error",t)}))})).catch((()=>{this.emit(nt.playFailedAndPaused,nt.webrtcStreamH265,{},e),this.debug.error("JbPro","webrtcStreamH265 and _resetPlayer error")}))})),this.player.on(nt.delayTimeout,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","delay timeout but player is destroyed");this.emit(nt.crashLog,this.getCrashLog(nt.delayTimeout,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.heartTimeoutReplay&&(this._heartTimeoutReplayTimes<this.player._opt.heartTimeoutReplayTimes||-1===this.player._opt.heartTimeoutReplayTimes)){if(this.debug.log("JbPro",`delay timeout replay time is ${this._heartTimeoutReplayTimes} and heartTimeoutReplayTimes is ${this.player._opt.heartTimeoutReplayTimes}`),this.isDestroyed())return void(this.debug&&this.debug.warn("JbPro","delay timeout replay but player is destroyed"));this._heartTimeoutReplayTimes+=1;const i=this._opt.url,s=this._opt.playOptions;let r={};(this.player._opt.heartTimeoutReplayUseLastFrameShow||this.player._opt.replayUseLastFrameShow)&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),po(this.isMute())&&(r.isNotMute=!0),this._resetPlayer(r).then((()=>{if(this._isNeedNetworkDisconnectReplay())return this.debug.log("JbPro","delayTimeout and network is offline and wait network online to play , so return"),this._isNetworkOfflinePaused=!0,void(this._isNetworkOfflinePausedAndNextPlayConfig={url:i,options:s,type:nt.delayTimeout});this.play(i,s).then((()=>{})).catch((i=>{this.emit(nt.playFailedAndPaused,nt.delayTimeout,t,e),this.debug.error("JbPro","delay timeout replay error",i)}))})).catch((i=>{this.emit(nt.playFailedAndPaused,nt.delayTimeout,t,e),this.debug.error("JbPro","delay timeout _resetPlayer error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(i).then((()=>{this.emit(nt.playFailedAndPaused,nt.delayTimeout,t,e),this.player&&(this.emit(nt.delayTimeoutRetryEnd),this.emit(nt.playFailedAndPaused,nt.delayTimeoutRetryEnd)),this.debug.warn("JbPro",`delayTimeoutRetryEnd and\n opt.heartTimeout is ${this.player&&this.player._opt.heartTimeout} and\n opt.heartTimeoutReplay is ${this.player&&this.player._opt.heartTimeoutReplay} and\n opt.heartTimeoutReplayTimes is ${this.player&&this.player._opt.heartTimeoutReplayTimes},and\n local._heartTimeoutReplayTimes is ${this._heartTimeoutReplayTimes}`)})).catch((i=>{this.emit(nt.playFailedAndPaused,nt.delayTimeout,t,e),this.debug.error("JbPro","delay timeout and pause error",i)}))}})),this.player.on(nt.loadingTimeout,(e=>{if(this.emit(nt.crashLog,this.getCrashLog(nt.loadingTimeout,e)),this.isDestroyed())this.debug.log("JbPro","loading timeout but player is destroyed");else if(this.player&&this.player._opt.loadingTimeoutReplay&&(this._loadingTimeoutReplayTimes<this.player._opt.loadingTimeoutReplayTimes||-1===this.player._opt.loadingTimeoutReplayTimes)){if(this.debug.log("JbPro",`loading timeout and\n replay time is ${this._loadingTimeoutReplayTimes} and\n loadingTimeoutReplayTimes is ${this.player._opt.loadingTimeoutReplayTimes}`),this.isDestroyed())return void(this.debug&&this.debug.warn("JbPro","delay timeout replay but player is destroyed"));this._loadingTimeoutReplayTimes+=1;const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer().then((()=>{if(this._isNeedNetworkDisconnectReplay())return this.debug.log("JbPro","loadingTimeout and network is offline and wait network online to play , so return"),this._isNetworkOfflinePaused=!0,void(this._isNetworkOfflinePausedAndNextPlayConfig={url:t,options:i,type:nt.loadingTimeout});this.play(t,i).then((()=>{})).catch((t=>{this.emit(nt.playFailedAndPaused,nt.loadingTimeout,{},e),this.debug.error("JbPro","loading timeout replay error",t)}))})).catch((t=>{this.emit(nt.playFailedAndPaused,nt.loadingTimeout,{},e),this.debug.error("JbPro","loading timeout _resetPlayer error",t)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this._pause(t).then((()=>{this.emit(nt.playFailedAndPaused,nt.loadingTimeout,{},e),this.player&&(this.emit(nt.loadingTimeoutRetryEnd),this.emit(nt.playFailedAndPaused,nt.loadingTimeoutRetryEnd,{},e)),this.debug.log("JbPro",`loadingTimeoutRetryEnd and\n opt.loadingTimeout is ${this.player&&this.player._opt.loadingTimeout} and\n opt.loadingTimeoutReplay is ${this.player&&this.player._opt.loadingTimeoutReplay} and\n local._loadingTimeoutReplayTimes time is ${this._loadingTimeoutReplayTimes} and\n opt.loadingTimeoutReplayTimes is ${this.player&&this.player._opt.loadingTimeoutReplayTimes}`)})).catch((t=>{this.emit(nt.playFailedAndPaused,nt.loadingTimeout,{},e),this.debug.error("JbPro","loading timeout and pause error",t)}))}})),this._hasLoaded()?this.player.play(t,i).then((()=>{s()})).catch((e=>{this.debug.error("JbPro","_hasLoaded() and play error",e),this.emit(nt.crashLog,this.getCrashLog("_hasLoaded() and play error",e)),this.player&&this.player.pause().then((()=>{r(e)})).catch((e=>{r(e),this.debug.error("JbPro","_hasLoaded() and play error and next pause error",e)}))})):this.player.once(nt.decoderWorkerInit,(()=>{this.player.play(t,i).then((()=>{s()})).catch((e=>{this.debug.error("JbPro","decoderWorkerInit and play error",e),this.emit(nt.crashLog,this.getCrashLog("decoderWorkerInit and play error",e)),this.player&&this.player.pause().then((()=>{r(e)})).catch((e=>{r(e),this.debug.error("JbPro","decoderWorkerInit and play error and next pause error",e)}))}))}))},H=this.player.getOption(),V=v&&po(this._opt.supportHls265),J=m&&po(this._opt.isWebrtcH265),q=v&&!!Xa(),K=v&&H.demuxUseWorker;if(V||J||g||u||w||q||K)this.debug.log("JbPro",`need reset player and\n isOldHls is ${V} and isOldWebrtc is ${J} and\n isAliyunRtc is ${g} and\n needResetPlayer(url change) is ${u} and\n isMpeg4 is ${w} and\n isHlsCanVideoPlay is ${q} and\n isHlsButDemuxUseWorker is ${K}`),this._resetPlayer({protocol:j,demuxType:z,isHls:v,isWebrtc:m,isWebrtcForZLM:U,isWebrtcForSRS:F,isWebrtcForOthers:O,isAliyunRtc:g,cryptoKey:i.cryptoKey||"",cryptoIV:i.cryptoIV||"",url:t,playOptions:i}).then((()=>{G()})).catch((e=>{r("reset player error")}));else{const e={protocol:j,demuxType:z,isHls:v,isWebrtc:m,isAliyunRtc:g,isFlv:this._opt.isFlv,isFmp4:this._opt.isFmp4,isMpeg4:this._opt.isMpeg4,isNakedFlow:this._opt.isNakedFlow,isTs:this._opt.isTs,cryptoKey:i.cryptoKey||"",cryptoIV:i.cryptoIV||""};this._opt.isNakedFlow&&(e.mseDecodeAudio=!1),this.player.updateOption(e),i.cryptoKey&&i.cryptoIV&&this.player.decoderWorker&&(this.player.decoderWorker.updateWorkConfig({key:"cryptoKey",value:i.cryptoKey}),this.player.decoderWorker.updateWorkConfig({key:"cryptoIV",value:i.cryptoIV})),G()}}))}_resetDemuxType(e){this._opt.isFlv=!1,this._opt.isFmp4=!1,this._opt.isMpeg4=!1,this._opt.isNakedFlow=!1,this._opt.isHls=!1,this._opt.isWebrtc=!1,this._opt.isWebrtcForZLM=!1,this._opt.isWebrtcForSRS=!1,this._opt.isWebrtcForOthers=!1,this._opt.isAliyunRtc=!1,this._opt.isTs=!1,e&&(this._opt[e]=!0),"isFmp4"!==e&&(this._opt.isFmp4Private=!1)}resize(){this.debug.log("JbPro","resize()"),this.player&&this.player.resize()}setBufferTime(e){this.debug.log("JbPro",`setBufferTime() ${e}`),(e=Number(e))>10&&this.debug.warn("JbPro",`setBufferTime() buffer time is ${e} second, is too large, video will show blank screen until cache ${e} second buffer data`);const t=1e3*e;this._opt.videoBuffer=t,this.player?this.player.updateOption({videoBuffer:t},!0):this.debug.warn("JbPro","setBufferTime() player is null")}setBufferDelayTime(e){this.debug.log("JbPro",`setBufferDelayTime() ${e}`),(e=Number(e))<.2&&this.debug.warn("JbPro",`setBufferDelayTime() buffer time delay is ${e} second, is too small`);const t=1e3*(e=oa(e,.2,100));this._opt.videoBufferDelay=t,this.player?this.player.updateOption({videoBufferDelay:t},!0):this.debug.warn("JbPro","setBufferDelayTime() player is null")}setRotate(e){this.debug.log("JbPro",`setRotate() ${e}`),e=parseInt(e,10);this._opt.rotate!==e&&-1!==[0,90,180,270].indexOf(e)?(this._opt.rotate=e,this.player?(this.player.updateOption({rotate:e}),this.resize()):this.debug.warn("JbPro","setRotate() player is null")):this.debug.warn("JbPro",`setRotate() rotate is ${e} and this._opt.rotate is ${this._opt.rotate}`)}setMirrorRotate(e){this.debug.log("JbPro",`setMirrorRotate() ${e}`);e||(e="none"),this._opt.mirrorRotate!==e&&-1!==["none","level","vertical"].indexOf(e)?(this._opt.mirrorRotate=e,this.player?(this.player.updateOption({mirrorRotate:e}),this.resize()):this.debug.warn("JbPro","setMirrorRotate() player is null")):this.debug.warn("JbPro",`setMirrorRotate() mirrorRotate is ${e} and this._opt.mirrorRotate is ${this._opt.mirrorRotate}`)}setAspectRatio(e){this.debug.log("JbPro",`setAspectRatio() ${e}`);e||(e="default"),this._opt.aspectRatio!==e&&-1!==["default","4:3","16:9"].indexOf(e)?(this._opt.aspectRatio=e,this.player?(this.player.updateOption({aspectRatio:e}),this.resize()):this.debug.warn("JbPro","setAspectRatio() player is null")):this.debug.warn("JbPro",`setAspectRatio() aspectRatio is ${e} and this._opt.aspectRatio is ${this._opt.mirrorRotate}`)}hasLoaded(){return!0}_hasLoaded(){return this.player&&this.player.loaded||!1}setKeepScreenOn(){this.debug.log("JbPro","setKeepScreenOn()"),this._opt.keepScreenOn=!0,this.player?this.player.updateOption({keepScreenOn:!0}):this.debug.warn("JbPro","setKeepScreenOn() player is not ready")}setFullscreen(e){this.debug.log("JbPro",`setFullscreen() ${e}`);const t=!!e;this.player?this.player.fullscreen!==t?this.player.fullscreen=t:this.debug.warn("JbPro",`setFullscreen() fullscreen is ${t} and this.player.fullscreen is ${this.player.fullscreen}`):this.debug.warn("JbPro","setFullscreen() player is not ready")}setWebFullscreen(e){this.debug.log("JbPro",`setWebFullscreen() ${e}`);const t=!!e;this.player?this.player.webFullscreen=t:this.debug.warn("JbPro","setWebFullscreen() player is not ready")}screenshot(e,t,i,s){return this.debug.log("JbPro",`screenshot() ${e} ${t} ${i} ${s}`),this.player&&this.player.video?this.player.video.screenshot(e,t,i,s):(this.debug.warn("JbPro","screenshot() player is not ready"),null)}screenshotWatermark(e){return new Promise(((t,i)=>{this.debug.log("JbPro","screenshotWatermark()",e),this.player&&this.player.video?this.player.video.screenshotWatermark(e).then((e=>{t(e)})).catch((e=>{i(e)})):(this.debug.warn("JbPro","screenshotWatermark() player is not ready"),i("player is not ready"))}))}startRecord(e,t){return new Promise(((i,s)=>{if(this.debug.log("JbPro",`startRecord() ${e} ${t}`),!this.player)return this.debug.warn("JbPro","startRecord() player is not ready"),s("player is not ready");this.player.playing?(this.player.startRecord(e,t),i()):(this.debug.warn("JbPro","startRecord() player is not playing"),s("not playing"))}))}stopRecordAndSave(e,t){return new Promise(((i,s)=>{this.debug.log("JbPro",`stopRecordAndSave() ${e} ${t}`),this.player&&this.player.recording?this.player.stopRecordAndSave(e,t).then((e=>{i(e)})).catch((e=>{s(e)})):s("not recording")}))}isPlaying(){let e=!1;return this.player&&(e=this.player.isPlaying()),e}isLoading(){return!!this.player&&this.player.loading}isPause(){let e=!1;return this._opt.playType===b?e=!this.isPlaying()&&!this.isLoading():this._opt.playType===_&&this.player&&(e=this.player.playbackPause),e}isPaused(){return this.isPause()}isPlaybackPause(){let e=!1;return this._opt.playType===_&&this.player&&(e=this.player.playbackPause),e}isMute(){let e=!0;return this.player&&(e=this.player.isAudioMute()),e}isRecording(){return this.player&&this.player.recorder&&this.player.recorder.recording||!1}isFullscreen(){let e=!1;return this.player&&(e=this.player.fullscreen),e}isWebFullscreen(){let e=!1;return this.player&&(e=this.player.webFullscreen),e}clearBufferDelay(){this.debug.log("JbPro","clearBufferDelay()"),this.player?this.player.clearBufferDelay():this.debug.warn("JbPro","clearBufferDelay() player is not init")}setNetworkDelayTime(e){this.debug.log("JbPro",`setNetworkDelayTime() ${e}`),(e=Number(e))<1&&this.debug.warn("JbPro",`setNetworkDelayTime() network delay is ${e} second, is too small`);const t=1e3*(e=oa(e,1,100));this._opt.networkDelay=t,this.player?this.player.updateOption({networkDelay:t},!0):this.debug.warn("JbPro","setNetworkDelayTime() player is null")}getDecodeType(){let e="";return this.player&&(e=this.player.getDecodeType()),e}getRenderType(){let e="";return this.player&&(e=this.player.getRenderType()),e}getAudioEngineType(){let e="";return this.player&&(e=this.player.getAudioEngineType()),e}getPlayingTimestamp(){let e=0;return this.player&&(e=this.player.getPlayingTimestamp()),e}getStatus(){let e=bs;return this.player&&(e=this.player.loading?gs:this.player.playing?ys:As),e}getPlayType(){return this.player?this.player._opt.playType:b}togglePerformancePanel(e){this.debug.log("JbPro",`togglePerformancePanel() ${e}`);const t=this.player._opt.showPerformance;let i=!t;Pa(e)&&(i=e),i!==t?this.player?this.player.togglePerformancePanel(i):this.debug.warn("JbPro","togglePerformancePanel() failed, this.player is not init"):this.debug.warn("JbPro",`togglePerformancePanel() failed, showPerformance is prev: ${t} === now: ${i}`)}openZoom(){this.debug.log("JbPro","openZoom()"),this.player?this.player.zooming=!0:this.debug.warn("JbPro","openZoom() failed, this.player is not init")}closeZoom(){this.debug.log("JbPro","closeZoom()"),this.player?this.player.zooming=!1:this.debug.warn("JbPro","closeZoom() failed, this.player is not init")}isZoomOpen(){let e=!1;return this.player&&(e=this.player.zooming),e}toggleZoom(e){this.debug.log("JbPro",`toggleZoom() ${e}`),Pa(e)||(e=!this.isZoomOpen()),uo(e)?this.openZoom():po(!1)&&this.closeZoom()}expandZoom(){this.debug.log("JbPro","expandZoom()"),this.player&&this.player.zoom&&this.player.zooming?this.player.zoom.expandPrecision():this.debug.warn("JbPro","expandZoom() failed, zoom is not open or not init")}narrowZoom(){this.debug.log("JbPro","narrowZoom()"),this.player&&this.player.zoom&&this.player.zooming?this.player.zoom.narrowPrecision():this.debug.warn("JbPro","narrowZoom failed, zoom is not open or not init")}getCurrentZoomIndex(){let e=1;return this.player&&this.player.zoom&&(e=this.player.zoom.currentZoom),e}startTalk(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,s)=>{this.debug.log("JbPro","startTalk()",e,t),this._initTalk(t),this.talk.startTalk(e).then((()=>{i(),this.talk.once(nt.talkStreamClose,(()=>{this.debug.warn("JbPro","talk stream close"),this.stopTalk().catch((e=>{}))})),this.talk.once(nt.talkStreamError,(e=>{this.debug.warn("JbPro","talk stream error",e),this.stopTalk().catch((e=>{}))})),this.talk.once(nt.talkStreamInactive,(()=>{this.debug.warn("JbPro","talk stream inactive"),this.stopTalk().catch((e=>{}))}))})).catch((e=>{s(e)}))}))}stopTalk(){return new Promise(((e,t)=>{if(this.debug.log("JbPro","stopTalk()"),!this.talk)return t("stopTalk() talk is not init");this.talk.destroy(),e()}))}getTalkVolume(){return new Promise(((e,t)=>{if(!this.talk)return t("getTalkVolume() talk is not init");e(this.talk.volume)}))}setTalkVolume(e){return new Promise(((t,i)=>{if(this.debug.log("JbPro","setTalkVolume()",e),!this.talk)return i("setTalkVolume() talk is not init");this.talk.setVolume(e/100),t()}))}setNakedFlowFps(e){return new Promise(((t,i)=>{if(this.debug.log("JbPro","setNakedFlowFps()",e),La(e))return i("setNakedFlowFps() fps is empty");let s=Number(e);s=oa(s,1,100),this._opt.nakedFlowFps=s,this.player?this.player.updateOption({nakedFlowFps:s}):this.debug.warn("JbPro","setNakedFlowFps() player is null"),t()}))}getCrashLog(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!this.player)return;const i=this.player.getAllStatsData(),s=this.player;let r={url:this._opt.url,playType:s.isPlayback()?"playback":"live",demuxType:s.getDemuxType(),decoderType:s.getDecodeType(),renderType:s.getRenderType(),videoInfo:{encType:"",width:"",height:""},audioInfo:{encType:"",sampleRate:"",channels:""},audioEngine:s.getAudioEngineType(),allTimes:i.pTs,timestamp:aa(),type:e,error:so(t)||e};if(s.video){const e=s.video.videoInfo||{};r.videoInfo={encType:e.encType||"",width:e.width||"",height:e.height||""}}if(s.audio){const e=s.audio.audioInfo||{};r.audioInfo={encType:e.encType||"",sampleRate:e.sampleRate||"",channels:e.channels||""}}return r}updateDebugLevel(e){this.debug.log("JbPro","updateDebugLevel()",e),e===J||e===q?e!==this.player._opt.debugLevel?(this._opt.debugLevel=e,this.player?this.player.updateOption({debugLevel:e},!0):this.debug.warn("JbPro","updateDebugLevel() player is null")):this.debug.warn("JbPro",`updateDebugLevel() level is same, level: ${e}`):this.debug.warn("JbPro",`updateDebugLevel() level is not valid, level: ${e}`)}updateWatermark(e){this.debug.log("JbPro","updateWatermark()",e),this.player?this.player.updateWatermark(e):this.debug.warn("JbPro","updateWatermark() player is not init")}removeWatermark(){this.debug.log("JbPro","removeWatermark()"),this.player?this.player.removeWatermark():this.debug.warn("JbPro","removeWatermark() player is not init")}updateFullscreenWatermark(e){if(this.debug.log("JbPro","updateFullscreenWatermark()",e),Va(e)){this._opt.fullscreenWatermarkConfig=e;const t=Ma(this.$container,e);if(!t.watermark_txt)return void this.debug.warn("JbPro","fullscreenWatermarkConfig text is empty");this.watermark.load(t)}else this.debug.warn("JbPro",`updateFullscreenWatermark() config is not valid, config: ${e}`)}removeFullscreenWatermark(){this.debug.log("JbPro","removeFullscreenWatermark()"),this.watermark?this.watermark.remove():this.debug.warn("JbPro","removeFullscreenWatermark() watermark is not init")}faceDetectOpen(){this.debug.log("JbPro","faceDetectOpen()"),this.player?this.player.faceDetect(!0):this.debug.warn("JbPro","faceDetectOpen() player is not init")}faceDetectClose(){this.debug.log("JbPro","faceDetectClose()"),this.player?this.player.faceDetect(!1):this.debug.warn("JbPro","faceDetectClose() player is not init")}objectDetectOpen(){this.debug.log("JbPro","objectDetectOpen()"),this.player?this.player.objectDetect(!0):this.debug.warn("JbPro","objectDetectOpen() player is not init")}objectDetectClose(){this.debug.log("JbPro","objectDetectClose()"),this.player?this.player.objectDetect(!1):this.debug.warn("JbPro","objectDetectClose() player is not init")}sendWebsocketMessage(e){this.debug.log("JbPro","sendWebsocketMessage()",e),this.player?this.player.sendWebsocketMessage(e):this.debug.warn("JbPro","sendWebsocketMessage() player is not init")}addContentToCanvas(e){this.debug.log("JbPro","addContentToCanvas()"),this.player?this.player.addContentToCanvas(e):this.debug.warn("JbPro","addContentToCanvas() player is not init")}clearContentToCanvas(){this.debug.log("JbPro","clearContentToCanvas()"),this.player?this.player.addContentToCanvas([]):this.debug.warn("JbPro","clearContentToCanvas() player is not init")}addContentToContainer(e){this.debug.log("JbPro","addContentToContainer()"),this.player?this.player.addContentToContainer(e):this.debug.warn("JbPro","addContentToContainer() player is not init")}clearContentToContainer(){this.debug.log("JbPro","clearContentToContainer()"),this.player?this.player.addContentToContainer([]):this.debug.warn("JbPro","clearContentToContainer() player is not init")}setControlHtml(e){this.debug.log("JbPro","setControlHtml()",e),this.player?this.player.setControlHtml(e):this.debug.warn("JbPro","setControlHtml() player is not init")}clearControlHtml(){this.debug.log("JbPro","clearControlHtml()"),this.player?this.player.clearControlHtml():this.debug.warn("JbPro","clearControlHtml() player is not init")}getVideoInfo(){let e=null;return this.player&&(e=this.player.getVideoInfo()),e}getAudioInfo(){let e=null;return this.player&&(e=this.player.getAudioInfo()),e}setSm4CryptoKey(e){this.debug.log("JbPro","setSm4CryptoKey()",e),32===(e=""+e).length?(this._opt.sm4CryptoKey=e,this.player?this.player.updateOption({sm4CryptoKey:e},!0):this.debug.warn("JbPro","setSm4CryptoKey() player is null")):this.debug.warn("JbPro",`setSm4CryptoKey() key is invalid and length is ${e.length} !== 32`)}setM7sCryptoKey(e){this.debug.log("JbPro","setM7sCryptoKey()",e),e=""+e,this._opt.m7sCryptoKey=e,this.player?this.player.updateOption({m7sCryptoKey:e},!0):this.debug.warn("JbPro","setM7sCryptoKey() player is null")}setXorCryptoKey(e){this.debug.log("JbPro","setXorCryptoKey()",e),e=""+e,this._opt.xorCryptoKey=e,this.player?this.player.updateOption({xorCryptoKey:e},!0):this.debug.warn("JbPro","setXorCryptoKey() player is null")}updateLoadingText(e){this.debug.log("JbPro","updateLoadingText()",e),this.player?this.player.updateLoadingText(e):this.debug.warn("JbPro","updateLoadingText() player is null")}updateIsEmitSEI(e){this.debug.log("JbPro","updateIsEmitSEI()",e),this._opt.isEmitSEI=e,this.player?this.player.updateOption({isEmitSEI:e},!0):this.debug.warn("JbPro","updateIsEmitSEI() player is null")}getPTZCmd(e,t){if(this.debug.log("JbPro","getPTZCmd()",e),e)return this.player?Rv({type:e,index:0,speed:t}):void this.debug.warn("JbPro","getPTZCmd() player is null");this.debug.warn("JbPro","getPTZCmd() ptz is null")}downloadTempNakedFlowFile(){return new Promise(((e,t)=>{this.player?(this.player.downloadNakedFlowFile(),e()):t("player is not init")}))}downloadTempFmp4File(){return new Promise(((e,t)=>{this.player?(this.player.downloadFmp4File(),e()):t("player is not init")}))}downloadTempMpeg4File(){return new Promise(((e,t)=>{this.player?(this.player.downloadMpeg4File(),e()):t("player is not init")}))}downloadTempRtpFile(){return new Promise(((e,t)=>{this.talk?(this.talk.downloadRtpFile(),e()):t("talk is not init")}))}downloadMemoryLog(){this.memoryLogger&&this.memoryLogger.download()}_getVideoLastIframeInfo(){const e=this.getVideoInfo()||{},t={loadingBackground:this.screenshot("","png",.92,"base64"),loadingBackgroundWidth:e.width||0,loadingBackgroundHeight:e.height||0};return t.loadingBackground&&t.loadingBackgroundWidth&&t.loadingBackgroundHeight&&(this._tempVideoLastIframeInfo=t),this._tempVideoLastIframeInfo||{}}getExtendBtnList(){this.debug.log("JbPro","getExtendBtnList()");let e=[];return this.player?e=this.player.getExtendBtnList():this.debug.warn("JbPro","getExtendBtnList() player is null"),e}getFlvMetaData(){this.debug.log("JbPro","getFlvMetaData()");let e=null;return this.player?e=this.player.getMetaData():this.debug.warn("JbPro","getFlvMetaData() player is null"),e}updateAiFaceDetectInterval(e){this.debug.log("JbPro","updateAiFaceDetectInterval()",e);const t=1e3*(e=Number(e));this._opt.aiFaceDetectInterval=t,this.player?this.player.updateOption({aiFaceDetectInterval:t}):this.debug.warn("JbPro","updateAiFaceDetectInterval() player is null")}updateAiFaceDetectLevel(e){if(this.debug.log("JbPro","updateAiFaceDetectLevel()",e),!or[e])return void this.debug.warn("JbPro",`'updateAiFaceDetectLevel() level ${e} is invalid'`);const t=or[e];this._opt.aiFaceDetectWidth=t,this.player?(this.player.updateOption({aiFaceDetectWidth:t}),this.player.ai&&this.player.ai.updateFaceDetectorConfig({detectWidth:t})):this.debug.warn("JbPro","updateAiFaceDetectLevel() player is null")}updateAiObjectDetectInterval(e){this.debug.log("JbPro","updateAiObjectDetectInterval()",e);const t=1e3*(e=Number(e));this._opt.aiObjectDetectInterval=t,this.player?this.player.updateOption({aiObjectDetectInterval:t}):this.debug.warn("JbPro","updateAiObjectDetectInterval() player is null")}updateAiObjectDetectLevel(e){if(this.debug.log("JbPro","updateAiObjectDetectLevel()",e),!nr[e])return void this.debug.warn("JbPro",`'updateAiObjectDetectLevel() level ${e} is invalid'`);const t=nr[e];this._opt.aiObjectDetectWidth=t,this.player?(this.player.updateOption({aiObjectDetectWidth:t}),this.player.ai&&this.player.ai.updateObjectDetectorConfig({detectWidth:t})):this.debug.warn("JbPro","updateAiObjectDetectLevel() player is null")}setCryptoKeyUrl(e){this.debug.log("JbPro","setCryptoKeyUrl()",e),e&&(this._opt.cryptoKeyUrl=e)}showErrorMessageTips(e){this.debug.log("JbPro","showErrorMessageTips()",e),e&&(this.player?this.player.showTipsMessageByContent(e):this.debug.warn("JbPro","showErrorMessageTips() player is null"))}setPtzPosition(e){this.debug.log("JbPro","setPtzPosition()",e),e&&!Ha(e)&&(this.player?this.player.setPtzPosition(e):this.debug.warn("JbPro","setPtzPosition() player is null"))}hideErrorMessageTips(){this.debug.log("JbPro","hideErrorMessageTips()"),this.player?this.player.hideTipsMessage():this.debug.warn("JbPro","hideErrorMessageTips() player is null")}getContainerRect(){return this._getContainerRect()}proxy(e,t,i,s){return this.events.proxy(e,t,i,s)}_checkIsMeaningfulRetry(e){let t=!0,i=[];if(e===Rr?i=this._websocket1006ErrorRetryLog:e===Dr?i=this._mseDecodeErrorRetryLog:e===Lr&&(i=this._wcsDecodeErrorRetryLog),this.debug.log(this.TAG_NAME,`_checkIsMeaningfulRetry() type is ${e}, and retryLog is ${i.join(",")}`),i.length>=5){const s=i[0],r=i[i.length-1],a=r-s;a<=1e4&&(this.debug.warn(this.TAG_NAME,`retry type is ${e}, and retry length is ${i.length}, and start is ${s} and end is ${r} and diff is ${a}`),t=!1)}return t}_initLoadingBackgroundForIOS(e){(ya()||Aa())&&e.loadingBackground&&e.loadingBackgroundWidth&&e.loadingBackgroundHeight&&(this.debug.log(this.TAG_NAME,"_initLoadingBackgroundForIOS"),this._initLoadingBg(),"default"===this.player._opt.aspectRatio||ua()?this._doInitLoadingBackground(e):this._doInitLoadingBackgroundForRatio(e))}_doInitLoadingBackground(e){const t=this._getContainerRect();let i=t.height;const s=this.player._opt;if(s.hasControl&&!s.controlAutoHide){i-=s.playType===_?Yt:Kt}let r=t.width,a=i;const o=s.rotate;270!==o&&90!==o||(r=i,a=t.width),this.$loadingBgImage.width=r,this.$loadingBgImage.height=a,this.$loadingBgImage.src=e.loadingBackground;let n=(t.width-r)/2,l=(i-a)/2,d="contain";s.isResize||(d="fill"),s.isFullResize&&(d="none");let h="";"none"===s.mirrorRotate&&o&&(h+=" rotate("+o+"deg)"),"level"===s.mirrorRotate?h+=" rotateY(180deg)":"vertical"===s.mirrorRotate&&(h+=" rotateX(180deg)"),this._opt.videoRenderSupportScale&&(this.$loadingBgImage.style.objectFit=d),this.$loadingBgImage.style.transform=h,this.$loadingBgImage.style.padding="0",this.$loadingBgImage.style.left=n+"px",this.$loadingBgImage.style.top=l+"px",this.$loadingBgImage.complete?Ch(this.$loadingBg,"show"):this.$loadingBgImage.onload=()=>{Ch(this.$loadingBg,"show"),this.$loadingBgImage.onload=null}}_doInitLoadingBackgroundForRatio(e){const t=this.player._opt.aspectRatio.split(":").map(Number),i=this._getContainerRect();let s=i.width,r=i.height;const a=this.player._opt;let o=0;a.hasControl&&!a.controlAutoHide&&(o=a.playType===_?Yt:Kt,r-=o);const n=e.loadingBackgroundWidth,l=e.loadingBackgroundHeight,d=n/l,h=t[0]/t[1];if(this.$loadingBgImage.src=e.loadingBackground,d>h){const e=h*l/n;this.$loadingBgImage.style.width=100*e+"%",this.$loadingBgImage.style.height=`calc(100% - ${o}px)`,this.$loadingBgImage.style.padding=`0 ${(s-s*e)/2}px`}else{const e=n/h/l;this.$loadingBgImage.style.width="100%",this.$loadingBgImage.style.height=`calc(${100*e}% - ${o}px)`,this.$loadingBgImage.style.padding=(r-r*e)/2+"px 0"}this.$loadingBgImage.complete?Ch(this.$loadingBg,"show"):this.$loadingBgImage.onload=()=>{Ch(this.$loadingBg,"show"),this.$loadingBgImage.onload=null}}_initLoadingBg(){if(!this.$loadingBg){const e=document.createElement("div"),t=document.createElement("img");e.className="jb-pro-loading-bg-for-ios",this.$loadingBg=e,this.$loadingBgImage=t,e.appendChild(t),this.$container.appendChild(e)}}_removeLoadingBackgroundForIOS(){if(this.$loadingBg){this.debug.log(this.TAG_NAME,"_removeLoadingBackgroundForIOS()");if(!Lh(this.$loadingBg)){const e=this.$container.querySelector(".jb-pro-loading-bg-for-ios");e&&this.$container&&this.$container.removeChild(e)}this.$loadingBg=null,this.$loadingBgImage=null}}_getContainerRect(){let e={};return this.$container&&(e=this.$container.getBoundingClientRect(),e.width=Math.max(e.width,this.$container.clientWidth),e.height=Math.max(e.height,this.$container.clientHeight)),e}_isNeedNetworkDisconnectReplay(){return this._opt.networkDisconnectReplay&&this.network.isOffline()}}return Fv.ERROR=ct,Fv.EVENTS=lt,window.JessibucaPro=Fv,window.JbPro=Fv,window.WebPlayerPro=Fv,Fv})); diff --git a/vue/src/views/iot/device/device-edit.vue b/vue/src/views/iot/device/device-edit.vue index 4c6e684c..8117f728 100644 --- a/vue/src/views/iot/device/device-edit.vue +++ b/vue/src/views/iot/device/device-edit.vue @@ -278,7 +278,6 @@ import { deviceSynchronization, getDevice, addDevice, updateDevice, generatorDev import { getDeviceRunningStatus } from '@/api/iot/device'; import { cacheJsonThingsModel } from '@/api/iot/model'; import { getDeviceTemp } from '@/api/iot/temp'; -import deviceVideo from '@/views/components/player/deviceVideo.vue'; import deviceLiveStream from '@/views/components/player/deviceLiveStream'; import sipid from '../sip/sipidGen.vue'; import player from '@/views/components/player/player.vue'; @@ -301,7 +300,6 @@ export default { deviceTimer, JsonViewer, vueQr, - deviceVideo, deviceLiveStream, player, channel, diff --git a/vue/src/views/iot/sip/splitview.vue b/vue/src/views/iot/sip/splitview.vue deleted file mode 100644 index 86762ec8..00000000 --- a/vue/src/views/iot/sip/splitview.vue +++ /dev/null @@ -1,221 +0,0 @@ -<template> - <div style="padding: 6px"> - <el-card id="devicePosition" style="width: 100vw; height: 91vh" :body-style="{ padding: '0px' }"> - <el-container v-loading="loading" style="height: 91vh; " element-loading-text="拼命加载中"> - <el-aside width="250px" style="background-color: #ffffff;"> - <DeviceTree :clickEvent="clickEvent"></DeviceTree> - </el-aside> - <el-main style="padding: 0"> - <div height="5vh" style="text-align: left; font-size: 17px; line-height: 5vh;margin-bottom: 10px;"> - 分屏: - <el-button type="success" style="margin-left: 10px;" :class="{ active: spilt == 1 }" @click="spilt = 1" - plain icon='el-icon-full-screen' size="mini">单屏 </el-button> - <el-button type="info" style="margin-left: 10px;" :class="{ active: spilt == 4 }" @click="spilt = 4" - icon="el-icon-menu" plain size="mini">四屏</el-button> - <el-button type="warning" style="margin-left: 10px;" :class="{ active: spilt == 9 }" @click="spilt = 9" - plain icon="el-icon-s-grid" size="mini">九屏</el-button> - </div> - <div style="height: 85vh; display: flex; flex-wrap: wrap"> - <div v-for="i in spilt" :key="i" class="play-box" :style="liveStyle" - :class="{ redborder: playerIdx == i - 1 }" @click="playerIdx = i - 1"> - <div v-if="!videoUrl[i - 1]" style="color: #ffffff; font-size: 30px; font-weight: bold">{{ i }}</div> - <player ref="player" v-else :videoUrl="videoUrl[i - 1]" fluent autoplay @screenshot="shot" - @destroy="destroy" class="player-wrap" /> - </div> - </div> - </el-main> - </el-container> - </el-card> - - - </div> -</template> - -<script> -import player from '@/views/components/player/jessibuca.vue'; -import DeviceTree from '@/views/components/player/DeviceTree.vue'; -import { startPlay } from '@/api/iot/channel'; - -export default { - name: 'SplitView', - components: { - player, - DeviceTree, - }, - data() { - return { - videoUrl: [''], - spilt: 1, //分屏 - playerIdx: 0, //激活播放器 - updateLooper: 0, //数据刷新轮训标志 - count: 15, - total: 0, - loading: false, - }; - }, - mounted() { }, - created() { - this.checkPlayByParam(); - }, - - computed: { - liveStyle() { - let style = { width: '81%', height: '99%' }; - switch (this.spilt) { - case 4: - style = { width: '40%', height: '49%' }; - break; - case 9: - style = { width: '27%', height: '32%' }; - break; - } - this.$nextTick(() => { - for (let i = 0; i < this.spilt; i++) { - const player = this.$refs.player; - player && player[i] && player[i].updatePlayerDomSize(); - } - }); - return style; - }, - }, - watch: { - spilt(newValue) { - console.log('切换画幅;' + newValue); - let that = this; - for (let i = 1; i <= newValue; i++) { - if (!that.$refs['player' + i]) { - continue; - } - this.$nextTick(() => { - if (that.$refs['player' + i] instanceof Array) { - that.$refs['player' + i][0].resize(); - } else { - that.$refs['player' + i].resize(); - } - }); - } - window.localStorage.setItem('split', newValue); - }, - '$route.fullPath': 'checkPlayByParam', - }, - destroyed() { - clearTimeout(this.updateLooper); - }, - methods: { - destroy(idx) { - console.log(idx); - this.clear(idx.substring(idx.length - 1)); - }, - clickEvent: function (data) { - if (data.channelSipId) { - this.sendDevicePush(data); - } - }, - //通知设备上传媒体流 - sendDevicePush: function (itemData) { - this.save(itemData); - let deviceId = itemData.deviceSipId; - let channelId = itemData.channelSipId; - console.log('通知设备推流1:' + deviceId + ' : ' + channelId); - let idxTmp = this.playerIdx; - let that = this; - this.loading = true; - startPlay(deviceId, channelId) - .then((response) => { - console.log('开始播放:' + this.deviceId + ' : ' + this.channelId); - console.log('流媒体信息:' + response.data); - let res = response.data; - console.log('playurl:' + res.playurl); - itemData.playUrl = res.playurl; - itemData.streamId = res.streamId; - that.setPlayUrl(itemData.playUrl, idxTmp); - }) - .finally(() => { - that.loading = false; - }); - }, - setPlayUrl(url, idx) { - this.$set(this.videoUrl, idx, url); - let _this = this; - setTimeout(() => { - window.localStorage.setItem('videoUrl', JSON.stringify(_this.videoUrl)); - }, 100); - }, - checkPlayByParam() { - let { deviceId, channelId } = this.$route.query; - if (deviceId && channelId) { - this.sendDevicePush({ deviceId, channelId }); - } - }, - shot(e) { - var base64ToBlob = function (code) { - let parts = code.split(';base64,'); - let contentType = parts[0].split(':')[1]; - let raw = window.atob(parts[1]); - let rawLength = raw.length; - let uInt8Array = new Uint8Array(rawLength); - for (let i = 0; i < rawLength; ++i) { - uInt8Array[i] = raw.charCodeAt(i); - } - return new Blob([uInt8Array], { - type: contentType, - }); - }; - let aLink = document.createElement('a'); - let blob = base64ToBlob(e); //new Blob([content]); - let evt = document.createEvent('HTMLEvents'); - evt.initEvent('click', true, true); //initEvent 不加后两个参数在FF下会报错 事件类型,是否冒泡,是否阻止浏览器的默认行为 - aLink.download = '截图'; - aLink.href = URL.createObjectURL(blob); - aLink.click(); - }, - save(item) { - let dataStr = window.localStorage.getItem('playData') || '[]'; - let data = JSON.parse(dataStr); - data[this.playerIdx] = item; - window.localStorage.setItem('playData', JSON.stringify(data)); - }, - clear(idx) { - let dataStr = window.localStorage.getItem('playData') || '[]'; - let data = JSON.parse(dataStr); - data[idx - 1] = null; - console.log(data); - window.localStorage.setItem('playData', JSON.stringify(data)); - }, - }, -}; -</script> -<style> -.btn { - margin: 0 10px; -} - -.btn:hover { - color: #409eff; -} - -.btn.active { - color: #409eff; -} - -.redborder { - border: 2px solid red !important; -} - -.play-box { - background-color: #000000; - border: 1px solid #505050; - display: flex; - align-items: center; - justify-content: center; - margin-right: 10px; - position: relative; - border-radius: 5px; -} - -.player-wrap { - position: absolute; - top: 0px; - height: 100% !important; -} -</style>