vendor: 4,184 bytes, lines 1-2
1/*! For license information please see ardplayer-plugindash.29f042c2.chunk.1790327383738.js.LICENSE.txt */ 2(()=>{var e={66927(e,t,n){"use strict";var r=n(18794),i=n(42272),a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+" is not a function")}},86299(e,t,n){"use strict";var r=n(30658),i=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw new a("Can't set "+i(e)+" as a prototype")}},48831(e,t,n){"use strict";var r=n(12793).has;e.exports=function(e){return r(e),e}},18924(e,t,n){"use strict";var r=n(27080),i=n(40475),a=n(29100).f,o=r("unscopables"),s=Array.prototype;void 0===s[o]&&a(s,o,{configurable:!0,value:i(null)}),e.exports=function(e){s[o][e]=!0}},11468(e,t,n){"use strict";var r=n(21688),i=TypeError;e.exports=function(e,t){if(r(t,e))return e;throw new i("Incorrect invocation")}},42293(e,t,n){"use strict";var r=n(98861),i=String,a=TypeError;e.exports=function(e){if(void 0===e||r(e))return e;throw new a(i(e)+" is not an object or undefined")}},84464(e,t,n){"use strict";var r=n(98861),i=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+" is not an object")}},53919(e,t,n){"use strict";var r=n(87964),i=TypeError;e.exports=function(e){if("Uint8Array"===r(e))return e;throw new i("Argument is not an Uint8Array")}},99010(e){"use strict";e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},79635(e,t,n){"use strict";var r=n(4127),i=n(70079),a=n(52911),o=r.ArrayBuffer,s=r.TypeError;e.exports=o&&i(o.prototype,"byteLength","get")||function(e){if("ArrayBuffer"!==a(e))throw new s("ArrayBuffer expected");return e.byteLength}},68827(e,t,n){"use strict";var r=n(4127),i=n(99010),a=n(79635),o=r.DataView;e.exports=function(e){if(!i||0!==a(e))return!1;try{return new o(e),!1}catch(e){return!0}}},63074(e,t,n){"use strict";var r=n(68827),i=TypeError;e.exports=function(e){if(r(e))throw new i("ArrayBuffer is detached");return e}},11977(e,t,n){"use strict";var r,i,a,o=n(99010),s=n(41175),u=n(4127),l=n(18794),c=n(98861),f=n(71324),d=n(87964),h=n(42272),g=n(50298),p=n(7255),m=n(80707),E=n(21688),T=n(76068),y=n(44792),_=n(27080),S=n(33699),I=n(74852),A=I.enforce,R=I.get,b=u.Int8Array,v=b&&b.prototype,C=u.Uint8ClampedArray,N=C&&C.prototype,D=b&&T(b),w=v&&T(v),M=Object.prototype,P=u.TypeError,O=_("toStringTag"),L=S("TYPED_ARRAY_TAG"),U="TypedArrayConstructor",x=o&&!!y&&"Opera"!==d(u.opera),F=!1,k={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},B={BigInt64Array:8,BigUint64Array:8},H=function(e){var t=T(e);if(c(t)){var n=R(t);return n&&f(n,U)?n[U]:H(t)}},G=function(e){if(!c(e))return!1;var t=d(e);return f(k,t)||f(B,t)};for(r in k)(a=(i=u[r])&&i.prototype)?A(a)[U]=i:x=!1;for(r in B)(a=(i=u[r])&&i.prototype)&&(A(a)[U]=i);if((!x||!l(D)||D===Function.prototype)&&(D=function(){throw new P("Incorrect invocation")},x))for(r in k)u[r]&&y(u[r],D);if((!x||!w||w===M)&&(w=D.prototype,x))for(r in k)u[r]&&y(u[r].prototype,w);if(x&&T(N)!==w&&y(N,w),s&&!f(w,O))for(r in F=!0,m(w,O,{configurable:!0,get:function(){return c(this)?this[L]:void 0}}),k)u[r]&&g(u[r].prototype,L,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:x,TYPED_ARRAY_TAG:F&&L,aTypedArray:function(e){if(G(e))return e;throw new P("Target is not a typed array")},aTypedArrayConstructor:function(e){if(l(e)&&(!y||E(D,e)))return e;throw new P(h(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(s){if(n)for(var i in k){var a=u[i];if(a&&f(a.prototype,e))try{delete a.prototype[e]}catch(n){try{a.prototype[e]=t}catch(e){}}}w[e]&&!n||p(w,e,n?t:x&&v[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,i;if(s){if(y){if(n)for(r in k)if((i=u[r])&&f(i,e))try{delete i[e]}catch(e){}if(D[e]&&!n)return;try{return p(D,e,n?t:x&&D[e]||t)}catch(e){}}for(r in k)!(i=u[r])||i[e]&&!n||p(i,e,t)}},getTypedArrayConstructor:H,isView:function(e){if(!c(e))return!1;var t=d(e);return"DataView"===t||f(k,t)||f(B,t)},isTypedArray:G,TypedArray:D,TypedArrayPrototype:w}},35460(e,t,n){"use strict";var r=n(99630),i=n(98977),a=n(95807),o=function(e){return function(t,n,o){var s=r(t),u=a(s);if(0===u)return!e&&-1;var l,c=i(o,u);if(e&&n!=n){for(;u>c;
vendor: 4,363 bytes, line 2
2)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((e||c in s)&&s[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},69786(e,t,n){"use strict";var r=n(41175),i=n(82001),a=TypeError,o=Object.getOwnPropertyDescriptor,s=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=s?function(e,t){if(i(e)&&!o(e,"length").writable)throw new a("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},72850(e){"use strict";var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=t+"+/",r=t+"-_",i=function(e){for(var t={},n=0;n<64;n++)t[e.charAt(n)]=n;return t};e.exports={i2c:n,c2i:i(n),i2cUrl:r,c2iUrl:i(r)}},73666(e,t,n){"use strict";var r=n(84464),i=n(4090);e.exports=function(e,t,n,a){try{return a?t(r(n)[0],n[1]):t(n)}catch(t){i(e,"throw",t)}}},52911(e,t,n){"use strict";var r=n(63027),i=r({}.toString),a=r("".slice);e.exports=function(e){return a(i(e),8,-1)}},87964(e,t,n){"use strict";var r=n(37167),i=n(18794),a=n(52911),o=n(27080)("toStringTag"),s=Object,u="Arguments"===a(function(){return arguments}());e.exports=r?a:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=s(e),o))?n:u?a(t):"Object"===(r=a(t))&&i(t.callee)?"Arguments":r}},92491(e,t,n){"use strict";var r=n(71324),i=n(76162),a=n(76150),o=n(29100);e.exports=function(e,t,n){for(var s=i(t),u=o.f,l=a.f,c=0;c<s.length;c++){var f=s[c];r(e,f)||n&&r(n,f)||u(e,f,l(t,f))}}},84678(e,t,n){"use strict";var r=n(94892);e.exports=!r(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},89566(e){"use strict";e.exports=function(e,t){return{value:e,done:t}}},50298(e,t,n){"use strict";var r=n(41175),i=n(29100),a=n(41513);e.exports=r?function(e,t,n){return i.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},41513(e){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},74119(e,t,n){"use strict";var r=n(41175),i=n(29100),a=n(41513);e.exports=function(e,t,n){r?i.f(e,t,a(0,n)):e[t]=n}},80707(e,t,n){"use strict";var r=n(98904),i=n(29100);e.exports=function(e,t,n){return n.get&&r(n.get,t,{getter:!0}),n.set&&r(n.set,t,{setter:!0}),i.f(e,t,n)}},7255(e,t,n){"use strict";var r=n(18794),i=n(29100),a=n(98904),o=n(26564);e.exports=function(e,t,n,s){s||(s={});var u=s.enumerable,l=void 0!==s.name?s.name:t;if(r(n)&&a(n,l,s),s.global)u?e[t]=n:o(t,n);else{try{s.unsafe?e[t]&&(u=!0):delete e[t]}catch(e){}u?e[t]=n:i.f(e,t,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},98498(e,t,n){"use strict";var r=n(7255);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},26564(e,t,n){"use strict";var r=n(4127),i=Object.defineProperty;e.exports=function(e,t){try{i(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},41175(e,t,n){"use strict";var r=n(94892);e.exports=!r(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},68752(e,t,n){"use strict";var r=n(4127),i=n(98861),a=r.document,o=i(a)&&i(a.createElement);e.exports=function(e){return o?a.createElement(e):{}}},12504(e){"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw new t("Maximum allowed index exceeded");return e}},51849(e){"use strict";e.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1}
vendor: 5,043 bytes, line 2
2,NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},1976(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},74298(e,t,n){"use strict";var r=n(4127).navigator,i=r&&r.userAgent;e.exports=i?String(i):""},95422(e,t,n){"use strict";var r,i,a=n(4127),o=n(74298),s=a.process,u=a.Deno,l=s&&s.versions||u&&u.version,c=l&&l.v8;c&&(i=(r=c.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&o&&(!(r=o.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=o.match(/Chrome\/(\d+)/))&&(i=+r[1]),e.exports=i},72098(e,t,n){"use strict";var r=n(63027),i=Error,a=r("".replace),o=String(new i("zxcasd").stack),s=/\n\s*at [^:]*:[^\n]*/,u=s.test(o);e.exports=function(e,t){if(u&&"string"==typeof e&&!i.prepareStackTrace)for(;t--;)e=a(e,s,"");return e}},11187(e,t,n){"use strict";var r=n(4127),i=n(76150).f,a=n(50298),o=n(7255),s=n(26564),u=n(92491),l=n(17191);e.exports=function(e,t){var n,c,f,d,h,g=e.target,p=e.global,m=e.stat;if(n=p?r:m?r[g]||s(g,{}):r[g]&&r[g].prototype)for(c in t){if(d=t[c],f=e.dontCallGetSet?(h=i(n,c))&&h.value:n[c],!l(p?c:g+(m?".":"#")+c,e.forced)&&void 0!==f){if(typeof d==typeof f)continue;u(d,f)}(e.sham||f&&f.sham)&&a(d,"sham",!0),o(n,c,d,e)}}},94892(e){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},63160(e,t,n){"use strict";var r=n(45825),i=Function.prototype,a=i.apply,o=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?o.bind(a):function(){return o.apply(a,arguments)})},1079(e,t,n){"use strict";var r=n(13449),i=n(66927),a=n(45825),o=r(r.bind);e.exports=function(e,t){return i(e),void 0===t?e:a?o(e,t):function(){return e.apply(t,arguments)}}},45825(e,t,n){"use strict";var r=n(94892);e.exports=!r(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},65418(e,t,n){"use strict";var r=n(45825),i=Function.prototype.call;e.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},16993(e,t,n){"use strict";var r=n(41175),i=n(71324),a=Function.prototype,o=r&&Object.getOwnPropertyDescriptor,s=i(a,"name"),u=s&&"something"===function(){}.name,l=s&&(!r||r&&o(a,"name").configurable);e.exports={EXISTS:s,PROPER:u,CONFIGURABLE:l}},70079(e,t,n){"use strict";var r=n(63027),i=n(66927);e.exports=function(e,t,n){try{return r(i(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},13449(e,t,n){"use strict";var r=n(52911),i=n(63027);e.exports=function(e){if("Function"===r(e))return i(e)}},63027(e,t,n){"use strict";var r=n(45825),i=Function.prototype,a=i.call,o=r&&i.bind.bind(a,a);e.exports=r?o:function(e){return function(){return a.apply(e,arguments)}}},88035(e){"use strict";var t=TypeError;e.exports=function(e){var n=e&&e.alphabet;if(void 0===n||"base64"===n||"base64url"===n)return n||"base64";throw new t("Incorrect `alphabet` option")}},60878(e,t,n){"use strict";var r=n(4127),i=n(18794);e.exports=function(e,t){return arguments.length<2?(n=r[e],i(n)?n:void 0):r[e]&&r[e][t];var n}},49060(e){"use strict";e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},71935(e,t,n){"use strict";var r=n(65418),i=n(84464),a=n(49060),o=n(54188);e.exports=function(e,t){t&&"string"==typeof e||i(e);var n=o(e);return a(i(void 0!==n?r(n,e):e))}},92248(e,t,n){"use strict";var r=n(65418),i=n(18794),a=n(84464),o=n(42272),s=n(54188),u=TypeError;e.exports=function(e,t){var n=arguments.length<2?s(e):t;if(i(n))return a(r(n,e));throw new u(o(e)+" is not iterable")}},54188(e,t,n){"use strict";var r=n(52911),i=n(53600),a=n(64215),o=n(27080)("iterator"),s=Array.prototype;e.exports=function(e){if(!i(e))return a(e,o)||a(e,"@@iterator")||("Arguments"===r(e)?s[o]:void 0)}},64215(e,t,n){"use strict";var r=n(66927),i=n(53600);e.exports=function(e,t){var n=e[t];return i(n)?void 0:r(n)}},11052(e,t,n){"use strict";var r=n(66927),i=n(84464),a=n(65418),o=n(51402),s=n(49060),u="Invalid size",l=RangeError,c=TypeError,f=Math.max,d=function(e,t){this.set=e,this.size=f(t,0),this.has=r(e.has),this.keys=r(e.keys)};d.prototype={getIterator:function(){return s(i(a(this.keys,this.set)))},includes:function(e){return a(this.has,this.set,e)}},e.exports=function(e){i(e);var t=+e.size;if(t!=t)throw new c(u);var n=o(t);if(n<0)throw new l(u);return new d(e,n)}},4127(e){"use strict";var t=function(e){return e&&e.Math===Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof globalThis&&globalThis)||t("object"==typeof this&&this)||function(){return this}()||Function("return this")()},71324(e,t,n){"use strict";var r=n(63027),i=n(16674),a=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return a(i(e),t)}},45730(e){"use strict";e.exports={}},60048(e,t,n){"use strict";var r=n(60878);e.exports=r("document","documentElement")}
vendor: 4,220 bytes, line 2
2,23696(e,t,n){"use strict";var r=n(41175),i=n(94892),a=n(68752);e.exports=!r&&!i(function(){return 7!==Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a})},52466(e,t,n){"use strict";var r=n(63027),i=n(94892),a=n(52911),o=Object,s=r("".split);e.exports=i(function(){return!o("z").propertyIsEnumerable(0)})?function(e){return"String"===a(e)?s(e,""):o(e)}:o},96388(e,t,n){"use strict";var r=n(18794),i=n(98861),a=n(44792);e.exports=function(e,t,n){var o,s;return a&&r(o=t.constructor)&&o!==n&&i(s=o.prototype)&&s!==n.prototype&&a(e,s),e}},83335(e,t,n){"use strict";var r=n(63027),i=n(18794),a=n(352),o=r(Function.toString);i(a.inspectSource)||(a.inspectSource=function(e){return o(e)}),e.exports=a.inspectSource},74852(e,t,n){"use strict";var r,i,a,o=n(90567),s=n(4127),u=n(98861),l=n(50298),c=n(71324),f=n(352),d=n(99690),h=n(45730),g="Object already initialized",p=s.TypeError,m=s.WeakMap;if(o||f.state){var E=f.state||(f.state=new m);E.get=E.get,E.has=E.has,E.set=E.set,r=function(e,t){if(E.has(e))throw new p(g);return t.facade=e,E.set(e,t),t},i=function(e){return E.get(e)||{}},a=function(e){return E.has(e)}}else{var T=d("state");h[T]=!0,r=function(e,t){if(c(e,T))throw new p(g);return t.facade=e,l(e,T,t),t},i=function(e){return c(e,T)?e[T]:{}},a=function(e){return c(e,T)}}e.exports={set:r,get:i,has:a,enforce:function(e){return a(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=i(t)).type!==e)throw new p("Incompatible receiver, "+e+" required");return n}}}},64916(e,t,n){"use strict";var r=n(27080),i=n(30510),a=r("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||o[a]===e)}},82001(e,t,n){"use strict";var r=n(52911);e.exports=Array.isArray||function(e){return"Array"===r(e)}},74830(e,t,n){"use strict";var r=n(87964);e.exports=function(e){var t=r(e);return"BigInt64Array"===t||"BigUint64Array"===t}},18794(e){"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},17191(e,t,n){"use strict";var r=n(94892),i=n(18794),a=/#|\.prototype\./,o=function(e,t){var n=u[s(e)];return n===c||n!==l&&(i(t)?r(t):!!t)},s=o.normalize=function(e){return String(e).replace(a,".").toLowerCase()},u=o.data={},l=o.NATIVE="N",c=o.POLYFILL="P";e.exports=o},53600(e){"use strict";e.exports=function(e){return null==e}},98861(e,t,n){"use strict";var r=n(18794);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},30658(e,t,n){"use strict";var r=n(98861);e.exports=function(e){return r(e)||null===e}},64400(e){"use strict";e.exports=!1},11898(e,t,n){"use strict";var r=n(60878),i=n(18794),a=n(21688),o=n(70535),s=Object;e.exports=o?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return i(t)&&a(t.prototype,s(e))}},87118(e,t,n){"use strict";var r=n(65418);e.exports=function(e,t,n){for(var i,a,o=n?e:e.iterator,s=e.next;!(i=r(s,o)).done;)if(void 0!==(a=t(i.value)))return a}},2711(e,t,n){"use strict";var r=n(1079),i=n(65418),a=n(84464),o=n(42272),s=n(64916),u=n(95807),l=n(21688),c=n(92248),f=n(54188),d=n(4090),h=TypeError,g=function(e,t){this.stopped=e,this.result=t},p=g.prototype;e.exports=function(e,t,n){var m,E,T,y,_,S,I,A=n&&n.that,R=!(!n||!n.AS_ENTRIES),b=!(!n||!n.IS_RECORD),v=!(!n||!n.IS_ITERATOR),C=!(!n||!n.INTERRUPTED),N=r(t,A),D=function(e){var t=m;return m=void 0,t&&d(t,"normal"),new g(!0,e)},w=function(e){return R?(a(e),C?N(e[0],e[1],D):N(e[0],e[1])):C?N(e,D):N(e)};if(b)m=e.iterator;else if(v)m=e;else{if(!(E=f(e)))throw new h(o(e)+" is not iterable");if(s(E)){for(T=0,y=u(e);y>T;T++)if((_=w(e[T]))&&l(p,_))return _;return new g(!1)}m=c(e,E)}for(S=b?e.next:m.next;!(I=i(S,m)).done;){var M=I.value;try{_=w(M)}catch(e){if(!m)throw e;d(m,"throw",e)}if("object"==typeof _&&_&&l(p,_))return _}return new g(!1)}},44430(e){"use strict";e.exports=function(e){e.iterator=e.next=e.nextHandler=e.mapper=e.predicate=e.inner=e.iterables=e.iters=e.openIters=e.padding=e.finishResults=e.buffer=null}},38772(e,t,n){"use strict";var r=n(4090);e.exports=function(e,t,n){for(var i=e.length-1;i>=0;i--)if(void 0!==e[i])try{n=r(e[i].iterator,t,n)}catch(e){t="throw",n=e}if("throw"===t)throw n;return n}}
vendor: 4,875 bytes, line 2
2,4090(e,t,n){"use strict";var r=n(65418),i=n(84464),a=n(64215);e.exports=function(e,t,n){var o,s;i(e);try{if(!(o=a(e,"return"))){if("throw"===t)throw n;return n}o=r(o,e)}catch(e){s=!0,o=e}if("throw"===t)throw n;if(s)throw o;return i(o),n}},95521(e,t,n){"use strict";var r=n(65418),i=n(40475),a=n(50298),o=n(98498),s=n(27080),u=n(74852),l=n(64215),c=n(22636).IteratorPrototype,f=n(89566),d=n(4090),h=n(38772),g=n(44430),p=s("toStringTag"),m="IteratorHelper",E="WrapForValidIterator",T="normal",y="throw",_=u.set,S=function(e){var t=u.getterFor(e?E:m);return o(i(c),{next:function(){var n=t(this);if(e)return n.nextHandler();if(n.done)return f(void 0,!0);try{var r=n.nextHandler();return n.done&&g(n),n.returnHandlerResult?r:f(r,n.done)}catch(e){throw n.done=!0,g(n),e}},return:function(){var n=t(this),i=n.iterator,a=n.inner,o=n.openIters,s=n.done;if(n.done=!0,e){var u=l(i,"return");return u?r(u,i):f(void 0,!0)}if(g(n),s)return f(void 0,!0);if(a)try{d(a.iterator,T)}catch(e){return d(i,y,e)}if(o)try{h(o,T)}catch(e){if(i)return d(i,y,e);throw e}return i&&d(i,T),f(void 0,!0)}})},I=S(!0),A=S(!1);a(A,p,"Iterator Helper"),e.exports=function(e,t,n){var r=function(r,i){i?(i.iterator=r.iterator,i.next=r.next):i=r,i.type=t?E:m,i.returnHandlerResult=!!n,i.nextHandler=e,i.counter=0,i.done=!1,_(this,i)};return r.prototype=t?I:A,r}},40909(e){"use strict";e.exports=function(e,t){var n="function"==typeof Iterator&&Iterator.prototype[e];if(n)try{n.call({next:null},t).next()}catch(e){return!0}}},47280(e,t,n){"use strict";var r=n(4127);e.exports=function(e,t){var n=r.Iterator,i=n&&n.prototype,a=i&&i[e],o=!1;if(a)try{a.call({next:function(){return{done:!0}},return:function(){o=!0}},-1)}catch(e){e instanceof t||(o=!1)}if(!o)return a}},22636(e,t,n){"use strict";var r,i,a,o=n(94892),s=n(18794),u=n(98861),l=n(40475),c=n(76068),f=n(7255),d=n(27080),h=n(64400),g=d("iterator"),p=!1;[].keys&&("next"in(a=[].keys())?(i=c(c(a)))!==Object.prototype&&(r=i):p=!0),!u(r)||o(function(){var e={};return r[g].call(e)!==e})?r={}:h&&(r=l(r)),s(r[g])||f(r,g,function(){return this}),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},30510(e){"use strict";e.exports=Object.create?Object.create(null):{}},95807(e,t,n){"use strict";var r=n(82737);e.exports=function(e){return r(e.length)}},98904(e,t,n){"use strict";var r=n(63027),i=n(94892),a=n(18794),o=n(71324),s=n(41175),u=n(16993).CONFIGURABLE,l=n(83335),c=n(74852),f=c.enforce,d=c.get,h=String,g=Object.defineProperty,p=r("".slice),m=r("".replace),E=r([].join),T=s&&!i(function(){return 8!==g(function(){},"length",{value:8}).length}),y=String(String).split("String"),_=e.exports=function(e,t,n){"Symbol("===p(h(t),0,7)&&(t="["+m(h(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!o(e,"name")||u&&e.name!==t)&&(s?g(e,"name",{value:t,configurable:!0}):e.name=t),T&&n&&o(n,"arity")&&e.length!==n.arity&&g(e,"length",{value:n.arity});try{n&&o(n,"constructor")&&n.constructor?s&&g(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=f(e);return o(r,"source")||(r.source=E(y,"string"==typeof t?t:"")),e};Function.prototype.toString=_(function(){return a(this)&&d(this).source||l(this)},"toString")},47352(e){"use strict";var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},86848(e,t,n){"use strict";var r=n(17616);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:r(e)}},85018(e){"use strict";var t=RangeError;e.exports=function(e){if(e==e)return e;throw new t("NaN is not allowed")}},40475(e,t,n){"use strict";var r,i=n(84464),a=n(56236),o=n(1976),s=n(45730),u=n(60048),l=n(68752),c=n(99690),f="prototype",d="script",h=c("IE_PROTO"),g=function(){},p=function(e){return"<"+d+">"+e+"</"+d+">"},m=function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t},E=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;E="undefined"!=typeof document?document.domain&&r?m(r):(t=l("iframe"),n="java"+d+":",t.style.display="none",u.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F):m(r);for(var i=o.length;i--;)delete E[f][o[i]];return E()};s[h]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(g[f]=i(e),n=new g,g[f]=null,n[h]=e):n=E(),void 0===t?n:a.f(n,t)}},56236(e,t,n){"use strict";var r=n(41175),i=n(8549),a=n(29100),o=n(84464),s=n(99630),u=n(16251);t.f=r&&!i?Object.defineProperties:function(e,t){o(e);for(var n,r=s(t),i=u(t),l=i.length,c=0;l>c;)a.f(e,n=i[c++],r[n]);return e}},29100(e,t,n){"use strict";var r=n(41175),i=n(23696),a=n(8549),o=n(84464),s=n(43750),u=TypeError,l=Object.defineProperty,c=Object.getOwnPropertyDescriptor,f="enumerable",d="configurable",h="writable";t.f=r?a?function(e,t,n){if(o(e),t=s(t),o(n),"function"==typeof e&&"prototype"===t&&"value"in n&&h in n&&!n[h]){var r=c(e,t);
vendor: 6,871 bytes, line 2
2r&&r[h]&&(e[t]=n.value,n={configurable:d in n?n[d]:r[d],enumerable:f in n?n[f]:r[f],writable:!1})}return l(e,t,n)}:l:function(e,t,n){if(o(e),t=s(t),o(n),i)try{return l(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new u("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},76150(e,t,n){"use strict";var r=n(41175),i=n(65418),a=n(43214),o=n(41513),s=n(99630),u=n(43750),l=n(71324),c=n(23696),f=Object.getOwnPropertyDescriptor;t.f=r?f:function(e,t){if(e=s(e),t=u(t),c)try{return f(e,t)}catch(e){}if(l(e,t))return o(!i(a.f,e,t),e[t])}},98331(e,t,n){"use strict";var r=n(20581),i=n(1976).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},80706(e,t){"use strict";t.f=Object.getOwnPropertySymbols},76068(e,t,n){"use strict";var r=n(71324),i=n(18794),a=n(16674),o=n(99690),s=n(84678),u=o("IE_PROTO"),l=Object,c=l.prototype;e.exports=s?l.getPrototypeOf:function(e){var t=a(e);if(r(t,u))return t[u];var n=t.constructor;return i(n)&&t instanceof n?n.prototype:t instanceof l?c:null}},21688(e,t,n){"use strict";var r=n(63027);e.exports=r({}.isPrototypeOf)},20581(e,t,n){"use strict";var r=n(63027),i=n(71324),a=n(99630),o=n(35460).indexOf,s=n(45730),u=r([].push);e.exports=function(e,t){var n,r=a(e),l=0,c=[];for(n in r)!i(s,n)&&i(r,n)&&u(c,n);for(;t.length>l;)i(r,n=t[l++])&&(~o(c,n)||u(c,n));return c}},16251(e,t,n){"use strict";var r=n(20581),i=n(1976);e.exports=Object.keys||function(e){return r(e,i)}},43214(e,t){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},44792(e,t,n){"use strict";var r=n(70079),i=n(98861),a=n(7263),o=n(86299);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return a(n),o(r),i(n)?(t?e(n,r):n.__proto__=r,n):n}}():void 0)},95269(e,t,n){"use strict";var r=n(65418),i=n(18794),a=n(98861),o=TypeError;e.exports=function(e,t){var n,s;if("string"===t&&i(n=e.toString)&&!a(s=r(n,e)))return s;if(i(n=e.valueOf)&&!a(s=r(n,e)))return s;if("string"!==t&&i(n=e.toString)&&!a(s=r(n,e)))return s;throw new o("Can't convert object to primitive value")}},76162(e,t,n){"use strict";var r=n(60878),i=n(63027),a=n(98331),o=n(80706),s=n(84464),u=i([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=a.f(s(e)),n=o.f;return n?u(t,n(e)):t}},7263(e,t,n){"use strict";var r=n(53600),i=TypeError;e.exports=function(e){if(r(e))throw new i("Can't call method on "+e);return e}},96321(e,t,n){"use strict";var r=n(12793),i=n(70386),a=r.Set,o=r.add;e.exports=function(e){var t=new a;return i(e,function(e){o(t,e)}),t}},76545(e,t,n){"use strict";var r=n(48831),i=n(12793),a=n(96321),o=n(67135),s=n(11052),u=n(70386),l=n(87118),c=i.has,f=i.remove;e.exports=function(e){var t=r(this),n=s(e),i=a(t);return o(i)<=n.size?u(i,function(e){n.includes(e)&&f(i,e)}):l(n.getIterator(),function(e){c(i,e)&&f(i,e)}),i}},12793(e,t,n){"use strict";var r=n(63027),i=Set.prototype;e.exports={Set,add:r(i.add),has:r(i.has),remove:r(i.delete),proto:i}},32179(e,t,n){"use strict";var r=n(48831),i=n(12793),a=n(67135),o=n(11052),s=n(70386),u=n(87118),l=i.Set,c=i.add,f=i.has;e.exports=function(e){var t=r(this),n=o(e),i=new l;return a(t)>n.size?u(n.getIterator(),function(e){f(t,e)&&c(i,e)}):s(t,function(e){n.includes(e)&&c(i,e)}),i}},73092(e,t,n){"use strict";var r=n(48831),i=n(12793).has,a=n(67135),o=n(11052),s=n(70386),u=n(87118),l=n(4090);e.exports=function(e){var t=r(this),n=o(e);if(a(t)<=n.size)return!1!==s(t,function(e){if(n.includes(e))return!1},!0);var c=n.getIterator();return!1!==u(c,function(e){if(i(t,e))return l(c.iterator,"normal",!1)})}},86243(e,t,n){"use strict";var r=n(48831),i=n(67135),a=n(70386),o=n(11052);e.exports=function(e){var t=r(this),n=o(e);return!(i(t)>n.size)&&!1!==a(t,function(e){if(!n.includes(e))return!1},!0)}},25954(e,t,n){"use strict";var r=n(48831),i=n(12793).has,a=n(67135),o=n(11052),s=n(87118),u=n(4090);e.exports=function(e){var t=r(this),n=o(e);if(a(t)<n.size)return!1;var l=n.getIterator();return!1!==s(l,function(e){if(!i(t,e))return u(l.iterator,"normal",!1)})}},70386(e,t,n){"use strict";var r=n(63027),i=n(87118),a=n(12793),o=a.Set,s=a.proto,u=r(s.forEach),l=r(s.keys),c=l(new o).next;e.exports=function(e,t,n){return n?i({iterator:l(e),next:c},t):u(e,t)}},42405(e,t,n){"use strict";var r=n(60878),i=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},a=function(e){return{size:e,has:function(){return!0},keys:function(){throw new Error("e")}}};e.exports=function(e,t){var n=r("Set");try{(new n)[e](i(0));try{return(new n)[e](i(-1)),!1}catch(r){if(!t)return!0;try{return(new n)[e](a(-1/0)),!1}catch(r){return t(new n([1,2])[e](a(1/0)))}}}catch(e){return!1}}},45758(e){"use strict";e.exports=function(e){try{var t=new Set,n={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return t.clear(),t.add(4),function(){return{done:!0}}}})}},r=t[e](n);return 1===r.size&&4===r.values().next().value}catch(e){return!1}}},67135(e,t,n){"use strict";var r=n(70079),i=n(12793);e.exports=r(i.proto,"size","get")||function(e){return e.size}},84851(e,t,n){"use strict";var r=n(48831),i=n(12793),a=n(96321),o=n(11052),s=n(87118),u=i.add,l=i.has,c=i.remove;e.exports=function(e){var t=r(this),n=o(e).getIterator(),i=a(t);return s(n,function(e){l(t,e)?c(i,e):u(i,e)}),i}},16471(e,t,n){"use strict";var r=n(48831),i=n(12793).add,a=n(96321),o=n(11052),s=n(87118);e.exports=function(e){var t=r(this),n=o(e).getIterator(),u=a(t);return s(n,function(e){i(u,e)}),u}},99690(e,t,n){"use strict";var r=n(35384),i=n(33699),a=r("keys");e.exports=function(e){return a[e]||(a[e]=i(e))}},352(e,t,n){"use strict";var r=n(64400),i=n(4127),a=n(26564),o="__core-js_shared__",s=e.exports=i[o]||a(o,{});(s.versions||(s.versions=[])).push({version:"3.50.0",mode:r?"pure":"global",copyright:"© 2013â2025 Denis Pushkarev (zloirock.ru), 2025â2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.50.0/LICENSE",source:"https://github.com/zloirock/core-js"})},35384(e,t,n){"use strict";var r=n(352),i=Object.create||Object;e.exports=function(e,t){return r[e]||(r[e]=t||i(null))}},47974(e,t,n){"use strict";var r=n(95422),i=n(94892),a=n(4127).String;e.exports=!!Object.getOwnPropertySymbols&&!i(function(){var e=Symbol("symbol detection");return!a(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41})},98977(e,t,n){"use strict";var r=n(51402),i=Math.max,a=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):a(n,t)}},71835(e,t,n){"use strict";var r=n(22732),i=TypeError;e.exports=function(e){var t=r(e,"number");if("number"==typeof t)throw new i("Can't convert number to bigint");return BigInt(t)}}
2,99630(e,t,n){"use strict";var r=n(52466),i=n(7263);e.exports=function(e){return r(i(e))}},51402(e,t,n){"use strict";var r=n(47352);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},82737(e,t,n){"use strict";var r=n(51402),i=Math.min;e.exports=function(e){var t=r(e);return t>0?i(t,9007199254740991):0}},16674(e,t,n){"use strict";var r=n(7263),i=Object;e.exports=function(e){return i(r(e))}},6137(e,t,n){"use strict";var r=n(51402),i=RangeError;e.exports=function(e){var t=r(e);if(t<0)throw new i("The argument can't be less than 0");return t}},22732(e,t,n){"use strict";var r=n(65418),i=n(98861),a=n(11898),o=n(64215),s=n(95269),u=n(27080),l=TypeError,c=u("toPrimitive");e.exports=function(e,t){if(!i(e)||a(e))return e;var n,u=o(e,c);if(u){if(void 0===t&&(t="default"),n=r(u,e,t),!i(n)||a(n))return n;throw new l("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},43750(e,t,n){"use strict";var r=n(22732),i=n(11898);e.exports=function(e){var t=r(e,"string");return i(t)?t:t+""}},37167(e,t,n){"use strict";var r={};r[n(27080)("toStringTag")]="z",e.exports="[object z]"===String(r)},17616(e,t,n){"use strict";var r=n(87964),i=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return i(e)}},42272(e){"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},33699(e,t,n){"use strict";var r=n(63027),i=0,a=Math.random(),o=r(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+o(++i+a,36)}},70535(e,t,n){"use strict";var r=n(47974);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8549(e,t,n){"use strict";var r=n(41175),i=n(94892);e.exports=r&&i(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},90567(e,t,n){"use strict";var r=n(4127),i=n(18794),a=r.WeakMap;e.exports=i(a)&&/native code/.test(String(a))},27080(e,t,n){"use strict";var r=n(4127),i=n(35384),a=n(71324),o=n(33699),s=n(47974),u=n(70535),l=r.Symbol,c=i("wks"),f=u?l.for||l:l&&l.withoutSetter||o;e.exports=function(e){return a(c,e)||(c[e]=s&&a(l,e)?l[e]:f("Symbol."+e)),c[e]}},97700(e,t,n){"use strict";var r=n(11187),i=n(35460).includes,a=n(94892),o=n(18924),s=a(function(){return!Array(1).includes()}),u=a(function(){return[,1].includes(void 0,1)});r({target:"Array",proto:!0,forced:s||u},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("includes")},99921(e,t,n){"use strict";var r=n(11187),i=n(16674),a=n(95807),o=n(69786),s=n(12504);r({target:"Array",proto:!0,arity:1,forced:n(94892)(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=i(this),n=a(t),r=arguments.length;s(n+r);for(var u=0;u<r;u++)t[n]=arguments[u],n++;return o(t,n),n}})},47144(e,t,n){"use strict";var r=n(11187),i=n(4127),a=n(11468),o=n(84464),s=n(18794),u=n(76068),l=n(80707),c=n(74119),f=n(94892),d=n(71324),h=n(27080),g=n(22636).IteratorPrototype,p=n(41175),m=n(64400),E="constructor",T="Iterator",y=h("toStringTag"),_=TypeError,S=i[T],I=m||!s(S)||S.prototype!==g||!f(function(){S({})}),A=function(){if(a(this,g),u(this)===g)throw new _("Abstract class Iterator not directly constructable")},R=function(e,t){p?l(g,e,{configurable:!0,get:function(){return t},set:function(t){if(o(this),this===g)throw new _("You can't redefine this property");d(this,e)?this[e]=t:c(this,e,t)}}):g[e]=t};d(g,y)||R(y,T),!I&&d(g,E)&&g[E]!==Object||R(E,A),A.prototype=g,r({global:!0,constructor:!0,forced:I},{Iterator:A})},21007(e,t,n){"use strict";var r=n(11187),i=n(65418),a=n(84464),o=n(49060),s=n(85018),u=n(6137),l=n(4090),c=n(95521),f=n(40909),d=n(47280),h=n(64400),g=RangeError,p=1/0,m=!h&&!f("drop",0),E=!h&&!m&&d("drop",RangeError),T=h||m||E||!function(){try{Iterator.prototype.drop.call({next:function(){return{done:!0}}},9007199254740992)}catch(e){return e instanceof g}}(),y=c(function(){for(var e,t=this.iterator,n=this.next;this.remaining;)if(this.remaining--,e=a(i(n,t)),this.done=!!e.done)return;if(e=a(i(n,t)),!(this.done=!!e.done))return e.value});r({target:"Iterator",proto:!0,real:!0,forced:T},{drop:function(e){var t;a(this);try{if((t=u(s(+e)))>9007199254740991&&t!==p)throw new g("The argument should be a safe integer")}catch(e){l(this,"throw",e)}return E?i(E,this,t):new y(o(this),{remaining:t})}})},21927(e,t,n){"use strict";var r=n(11187),i=n(65418),a=n(2711),o=n(66927),s=n(84464),u=n(49060),l=n(4090),c=n(47280)("every",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:c},{every:function(e){s(this);try{o(e)}catch(e){l(this,"throw",e)}if(c)return i(c,this,e);var t=u(this),n=0;return!a(t,function(t,r){if(!e(t,n++))return r()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},25744(e,t,n){"use strict";var r=n(11187),i=n(65418),a=n(66927),o=n(84464),s=n(49060),u=n(95521),l=n(73666),c=n(64400),f=n(4090),d=n(40909),h=n(47280),g=!c&&!d("filter",function(){}),p=!c&&!g&&h("filter",TypeError),m=c||g||p,E=u(function(){for(var e,t,n=this.iterator,r=this.predicate,a=this.next;;){if(e=o(i(a,n)),this.done=!!e.done)return;if(t=e.value,l(n,r,[t,this.counter++],!0))return t}});r({target:"Iterator",proto:!0,real:!0,forced:m},{filter:function(e){o(this);try{a(e)}catch(e){f(this,"throw",e)}return p?i(p,this,e):new E(s(this),{predicate:e})}})},65337(e,t,n){"use strict";var r=n(11187),i=n(65418),a=n(2711),o=n(66927),s=n(84464),u=n(49060),l=n(4090),c=n(47280)("find",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:c},{find:function(e){s(this);try{o(e)}catch(e){l(this,"throw",e)}if(c)return i(c,this,e);var t=u(this),n=0;return a(t,function(t,r){if(e(t,n++))return r(t)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})},58102(e,t,n){"use strict";var r=n(11187),i=n(65418),a=n(66927),o=n(84464),s=n(49060),u=n(71935),l=n(95521),c=n(4090),f=n(94892),d=n(64400),h=n(40909),g=n(47280),p=!d&&f(function(){return 1!==[1].values().flatMap(function(){return[1]}).find(function(){return!0})}),m=!d&&!p&&!h("flatMap",function(){}),E=!d&&!p&&!m&&g("flatMap",TypeError),T=d||p||m||E,y=l(function(){for(var e,t,n=this.iterator,r=this.mapper;;){if(t=this.inner)try{if(!(e=o(i(t.next,t.iterator))).done)return e.value;this.inner=null}catch(e){c(n,"throw",e)}if(e=o(i(this.next,n)),this.done=!!e.done)return;try{this.inner=u(r(e.value,this.counter++),!1)}catch(e){c(n,"throw",e)}}});r({target:"Iterator",proto:!0,real:!0,forced:T},{flatMap:function(e){o(this);try{a(e)}catch(e){c(this,"throw",e)}return E?i(E,this,e):new y(s(this),{mapper:e,inner:null})}})},8021(e,t,n){"use strict";var r=n(11187),i=n(65418),a=n(2711),o=n(66927),s=n(84464),u=n(49060),l=n(4090),c=n(47280)("forEac
2h",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:c},{forEach:function(e){s(this);try{o(e)}catch(e){l(this,"throw",e)}if(c)return i(c,this,e);var t=u(this),n=0;a(t,function(t){e(t,n++)},{IS_RECORD:!0})}})},89542(e,t,n){"use strict";var r=n(11187),i=n(65418),a=n(66927),o=n(84464),s=n(49060),u=n(95521),l=n(73666),c=n(4090),f=n(40909),d=n(47280),h=n(64400),g=!h&&!f("map",function(){}),p=!h&&!g&&d("map",TypeError),m=h||g||p,E=u(function(){var e=this.iterator,t=o(i(this.next,e));if(!(this.done=!!t.done))return l(e,this.mapper,[t.value,this.counter++],!0)});r({target:"Iterator",proto:!0,real:!0,forced:m},{map:function(e){o(this);try{a(e)}catch(e){c(this,"throw",e)}return p?i(p,this,e):new E(s(this),{mapper:e})}})},61696(e,t,n){"use strict";var r=n(11187),i=n(2711),a=n(66927),o=n(84464),s=n(49060),u=n(4090),l=n(47280),c=n(63160),f=n(94892),d=TypeError,h=f(function(){[].keys().reduce(function(){},void 0)}),g=!h&&l("reduce",d);r({target:"Iterator",proto:!0,real:!0,forced:h||g},{reduce:function(e){o(this);try{a(e)}catch(e){u(this,"throw",e)}var t=arguments.length<2,n=t?void 0:arguments[1];if(g)return c(g,this,t?[e]:[e,n]);var r=s(this),l=0;if(i(r,function(r){t?(t=!1,n=r):n=e(n,r,l),l++},{IS_RECORD:!0}),t)throw new d("Reduce of empty iterator with no initial value");return n}})},99686(e,t,n){"use strict";var r=n(11187),i=n(65418),a=n(2711),o=n(66927),s=n(84464),u=n(49060),l=n(4090),c=n(47280)("some",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:c},{some:function(e){s(this);try{o(e)}catch(e){l(this,"throw",e)}if(c)return i(c,this,e);var t=u(this),n=0;return a(t,function(t,r){if(e(t,n++))return r()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}
2,24791(e,t,n){"use strict";var r=n(11187),i=n(76545),a=n(94892);r({target:"Set",proto:!0,real:!0,forced:!n(42405)("difference",function(e){return 0===e.size})||a(function(){var e={size:1,has:function(){return!0},keys:function(){var e=0;return{next:function(){var n=e++>1;return t.has(1)&&t.clear(),{done:n,value:2}}}}},t=new Set([1,2,3,4]);return 3!==t.difference(e).size})},{difference:i})},53457(e,t,n){"use strict";var r=n(11187),i=n(94892),a=n(32179);r({target:"Set",proto:!0,real:!0,forced:!n(42405)("intersection",function(e){return 2===e.size&&e.has(1)&&e.has(2)})||i(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))})},{intersection:a})},73532(e,t,n){"use strict";var r=n(11187),i=n(73092);r({target:"Set",proto:!0,real:!0,forced:!n(42405)("isDisjointFrom",function(e){return!e})},{isDisjointFrom:i})},34737(e,t,n){"use strict";var r=n(11187),i=n(86243);r({target:"Set",proto:!0,real:!0,forced:!n(42405)("isSubsetOf",function(e){return e})},{isSubsetOf:i})},4666(e,t,n){"use strict";var r=n(11187),i=n(25954);r({target:"Set",proto:!0,real:!0,forced:!n(42405)("isSupersetOf",function(e){return!e})},{isSupersetOf:i})},77809(e,t,n){"use strict";var r=n(11187),i=n(84851),a=n(45758);r({target:"Set",proto:!0,real:!0,forced:!n(42405)("symmetricDifference")||!a("symmetricDifference")},{symmetricDifference:i})},92653(e,t,n){"use strict";var r=n(11187),i=n(16471),a=n(45758);r({target:"Set",proto:!0,real:!0,forced:!n(42405)("union")||!a("union")},{union:i})},34602(e,t,n){"use strict";var r=n(11977),i=n(74830),a=n(95807),o=n(51402),s=n(71835),u=r.aTypedArray,l=r.getTypedArrayConstructor,c=r.exportTypedArrayMethod,f=RangeError,d=function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(e){return 8===e}}(),h=d&&function(){try{new Int8Array(1).with(-.5,1)}catch(e){return!0}}();c("with",{with:function(e,t){var n=u(this),r=a(n),c=o(e),d=c<0?r+c:c,h=i(n)?s(t):+t;if(d>=r||d<0)throw new f("Incorrect index");for(var g=new(l(n))(r),p=0;p<r;p++)g[p]=p===d?h:n[p];return g}}.with,!d||h)},29319(e,t,n){"use strict";var r=n(11187),i=n(4127),a=n(63027),o=n(42293),s=n(53919),u=n(63074),l=n(72850),c=n(88035),f=l.i2c,d=l.i2cUrl,h=Math.floor,g=Math.ceil,p=a("".charAt),m=i.Uint8Array,E=i.Array,T=a([].join),y=!m||!m.prototype.toBase64||!function(){try{(new m).toBase64(null)}catch(e){return!0}}();m&&r({target:"Uint8Array",proto:!0,forced:y},{toBase64:function(){var e=s(this),t=arguments.length?o(arguments[0]):void 0,n="base64"===c(t)?f:d,r=!!t&&!!t.omitPadding;u(this.buffer);for(var i,a=0,l=e.length,m=E(r?4*h(l/3)+(l%3?l%3+1:0):4*g(l/3)),y=0,_=function(e){return p(n,i>>6*e&63)};a+2<l;a+=3)i=(e[a]<<16)+(e[a+1]<<8)+e[a+2],m[y++]=_(3),m[y++]=_(2),m[y++]=_(1),m[y++]=_(0);return a+2===l?(i=(e[a]<<16)+(e[a+1]<<8),m[y++]=_(3),m[y++]=_(2),m[y++]=_(1),r||(m[y++]="=")):a+1===l&&(i=e[a]<<16,m[y++]=_(3),m[y++]=_(2),r||(m[y++]="=",m[y++]="=")),T(m,"")}})},87199(e,t,n){"use strict";var r=n(11187),i=n(4127),a=n(63027),o=n(53919),s=n(63074),u=a(1.1.toString),l=a([].join),c=Array,f=i.Uint8Array,d=!f||!f.prototype.toHex||!function(){try{return"ffffffffffffffff"===new f([255,255,255,255,255,255,255,255]).toHex()}catch(e){return!1}}();f&&r({target:"Uint8Array",proto:!0,forced:d},{toHex:function(){o(this),s(this.buffer);for(var e=c(this.length),t=0,n=this.length;t<n;t++){var r=u(this[t],16);e[t]=1===r.length?"0"+r:r}return l(e,"")}})},88019(e,t,n){"use strict";n(47144)},61246(e,t,n){"use strict";n(21007)},92568(e,t,n){"use strict";n(21927)},1909(e,t,n){"use strict";n(25744)},67288(e,t,n){"use strict";n(65337)},41959(e,t,n){"use strict";n(58102)},75328(e,t,n){"use strict";n(8021)},32145(e,t,n){"use strict";n(89542)},65081(e,t,n){"use strict";n(61696)},80863(e,t,n){"use strict";n(99686)},41118(e,t,n){"use strict";n(24791)},51960(e,t,n){"use strict";n(53457)},75409(e,t,n){"use strict";n(73532)},11176(e,t,n){"use strict";n(34737)},91543(e,t,n){"use strict";n(4666)},85628(e,t,n){"use strict";n(77809)},19254(e,t,n){"use strict";n(92653)},97978(e,t,n){"use strict";n(29319)},15900(e,t,n){"use strict";n(87199)},86316(e,t,n){"use strict";var r=n(11187),i=n(4127),a=n(60878),o=n(41513),s=n(29100).f,u=n(71324),l=n(11468),c=n(96388),f=n(86848),d=n(51849),h=n(72098),g=n(41175),p=n(64400),m="DOMException",E=a("Error"),T=a(m),y=function(){l(this,_);var e=arguments.length,t=f(e<1?void 0:arguments[0]),n=f(e<2?void 0:arguments[1],"Error"),r=new T(t,n),i=new E(t);
2return i.name=m,s(r,"stack",o(1,h(i.stack,1))),c(r,this,y),r},_=y.prototype=T.prototype,S="stack"in new E(m),I="stack"in new T(1,2),A=T&&g&&Object.getOwnPropertyDescriptor(i,m),R=!(!A||A.writable&&A.configurable),b=S&&!R&&!I;r({global:!0,constructor:!0,forced:p||b},{DOMException:b?y:T});var v=a(m),C=v.prototype;if(C.constructor!==v)for(var N in p||s(C,"constructor",o(1,v)),d)if(u(d,N)){var D=d[N],w=D.s;u(v,w)||s(v,w,o(6,D.c))}}};const t={};function n(r){const i=t[r];if(void 0!==i)return i.exports;const a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n(97700),n(99921),n(34602),n(88019),n(61246),n(92568),n(1909),n(67288),n(41959),n(75328),n(32145),n(65081),n(80863),n(41118),n(51960),n(75409),n(11176),n(91543),n(85628),n(19254),n(97978),n(15900),n(86316),(globalThis.webpackChunk_ardplayer_bundler||=[]).push([[670],{1852(e,t){"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,a=s(e),o=a[0],u=a[1],l=new i(function(e,t,n){return 3*(t+n)/4-n}(0,o,u)),c=0,f=u>0?o-4:o;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],l[c++]=t>>16&255,l[c++]=t>>8&255,l[c++]=255&t;return 2===u&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[c++]=255&t),1===u&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t),l},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],o=16383,s=0,u=r-i;s<u;s+=o)a.push(l(e,s,s+o>u?u:s+o));return 1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),a.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)n[o]=a[o],r[a.charCodeAt(o)]=o;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function l(e,t,n){for(var r,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),i.push(u(r));return i.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},4030(e,t,n){"use strict";var r=n(1852),i=n(8821),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;var o=2147483647;function s(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return l(e,t,n)}function l(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|p(e,t),r=s(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(G(e,Uint8Array)){var t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(G(e,ArrayBuffer)||e&&G(e.buffer,ArrayBuffer))return h(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(G(e,SharedArrayBuffer)||e&&G(e.buffer,SharedArrayBuffer)))return h(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return u.from(r,t,n);var i=function(e){if(u.isBuffer(e)){var t=0|g(e.length),n=s(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Y(e.length)?s(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');
vendor: 17,335 bytes, line 2
2if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return c(e),s(e<0?0:0|g(e))}function d(e){for(var t=e.length<0?0:0|g(e.length),n=s(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function h(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,u.prototype),r}function g(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||G(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return k(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return B(e).length;default:if(i)return r?-1:k(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return w(this,t,n);case"utf8":case"utf-8":return v(this,t,n);case"ascii":return N(this,t,n);case"latin1":case"binary":return D(this,t,n);case"base64":return b(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function E(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function T(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Y(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,i){var a,o=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,n/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(a=n;a<s;a++)if(l(e,a)===l(t,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===u)return c*o}else-1!==c&&(a-=a-c),c=-1}else for(n+u>s&&(n=s-u),a=n;a>=0;a--){for(var f=!0,d=0;d<u;d++)if(l(e,a+d)!==l(t,d)){f=!1;break}if(f)return a}return-1}function _(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=t.length;r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(Y(s))return o;e[n+o]=s}return o}function S(e,t,n,r){return H(k(t,e.length-n),e,n,r)}function I(e,t,n,r){return H(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function A(e,t,n,r){return H(B(t),e,n,r)}function R(e,t,n,r){return H(function(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)r=(n=e.charCodeAt(o))>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function b(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function v(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a,o,s,u,l=e[i],c=null,f=l>239?4:l>223?3:l>191?2:1;if(i+f<=n)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(a=e[i+1]))&&(u=(31&l)<<6|63&a)>127&&(c=u);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(u=(15&l)<<12|(63&a)<<6|63&o)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(u=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,f=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=f}return function(e){var t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=C));return n}(r)}t.kMaxLength=o,u.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,n){return l(e,t,n)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,n){return function(e,t,n){return c(e),e<=0?s(e):void 0!==t?"string"==typeof n?s(e).fill(t,n):s(e).fill(t):s(e)}(e,t,n)},u.allocUnsafe=function(e){return f(e)},u.allocUnsafeSlow=function(e){return f(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(G(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),G(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(G(a,Uint8Array))i+a.length>r.length?u.from(a).copy(r,i):Uint8Array.prototype.set.call(r,a,i);else{if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i)}i+=a.length}return r},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)E(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)E(this,t,t+3),E(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)E(this,t,t+7),E(this,t+1,t+6),E(this,t+2,t+5),E(this,t+3,t+4);return this},u.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?v(this,0,e):m.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},a&&(u.prototype[a]=u.prototype.inspect),u.prototype.compare=function(e,t,n,r,i){if(G(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(a,o),l=this.slice(r,i),c=e.slice(t,n),f=0;f<s;++f)if(l[f]!==c[f]){a=l[f],o=c[f];break}return a<o?-1:o<a?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return T(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return T(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return S(this,e,t,n);case"ascii":case"latin1":case"binary":return I(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function N(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function D(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function w(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;++a)i+=V[e[a]];return i}function M(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length-1;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function P(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,n,r,i,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function L(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(e,t,n,r,a){return t=+t,n>>>=0,a||L(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function x(e,t,n,r,a){return t=+t,n>>>=0,a||L(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return Object.setPrototypeOf(r,u.prototype),r},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||O(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||O(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);O(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<n&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);O(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return x(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return x(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var i=e.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var o=u.isBuffer(e)?e:u.from(e,r),s=o.length;
2if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<n-t;++a)this[a+t]=o[a%s]}return this};var F=/[^+/0-9A-Za-z-_]/g;function k(e,t){var n;t=t||1/0;for(var r=e.length,i=null,a=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function B(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function G(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}var V=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var r=16*n,i=0;i<16;++i)t[r+i]=e[n]+e[i];return t}()},8821(e,t){t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,f=n?i-1:0,d=n?-1:1,h=e[t+f];for(f+=d,a=h&(1<<-c)-1,h>>=-c,c+=s;c>0;a=256*a+e[t+f],f+=d,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+e[t+f],f+=d,c-=8);if(0===a)a=1-l;else{if(a===u)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,r),a-=l}return(h?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,u,l=8*a-i-1,c=(1<<l)-1,f=c>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:a-1,g=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+f>=1?d/u:d*Math.pow(2,1-f))*u>=2&&(o++,u/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*u-1)*Math.pow(2,i),o+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[n+h]=255&s,h+=g,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+h]=255&o,h+=g,o/=256,l-=8);e[n+h-g]|=128*p}},3662(e,t,n){"use strict";n.d(t,{F:()=>p});var r=n(270),i=n(5189),a=n(3633),o=n(5867),s=n.n(o),u=n(1619),l=n(7269),c=n(8558),f=function(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0},d=function(e,t,n,r,i,a){function o(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,u=r.kind,l="getter"===u?"get":"setter"===u?"set":"value",c=!t&&e?r.static?e:e.prototype:null,f=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),d=!1,h=n.length-1;h>=0;h--){var g={};for(var p in r)g[p]="access"===p?{}:r[p];for(var p in r.access)g.access[p]=r.access[p];g.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(e||null))};var m=(0,n[h])("accessor"===u?{get:f.get,set:f.set}:f[l],g);
2if("accessor"===u){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(s=o(m.get))&&(f.get=s),(s=o(m.set))&&(f.set=s),(s=o(m.init))&&i.unshift(s)}else(s=o(m))&&("field"===u?i.unshift(s):f[l]=s)}c&&Object.defineProperty(c,r.name,f),d=!0},h=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},g=function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};let p=(()=>{var e,t,n,o,p,m,E,T,y,_,S,I,A,R,b,v,C,N,D,w,M,P,O;let L,U,x,F,k,B,H,G=[l.JW],Y=[],V=[];return U=class{get executionContextProvider(){return this.player??null}get model(){return this.player.model}get pc(){return this.model.playerConfig}get mc(){return this.model.mediaCollection}get vc(){return this.player.viewCtrl}get videoScale(){return this.model.videoScaleMode}set videoScale(e){this.model.videoScaleMode!==e&&(this.model.videoScaleMode=e,this.applyVideoScale(e))}set remotePlaybackDevice(t){h(this,e,"f")!==t&&(g(this,e,t,"f"),this.player.dispatchEvent("Player.REMOTE_PLAYBACK_CHANGED",(0,c.cl)(t)?{isRemote:!1}:{isRemote:!0,device:t}),this.player.isLive&&!this.player.isAudio&&this.vc.setLiveInitialBufferState())}get remotePlaybackDevice(){return h(this,e,"f")}get isRemotePlayback(){return!(0,c.cl)(h(this,e,"f"))}get isPlayingSpatialAudio(){return!1}get playbackStalled(){return h(this,p,"f")}get __cumulativeDrift(){return h(this,A,"f")}get _dvrWindow(){return h(this,M,"f")}set _dvrWindow(e){!this.dvrWindowUnstable&&0!==h(this,M,"f")&&Math.abs(h(this,M,"f")-e)>2&&(this.dvrWindowUnstable=!0,this.pinnedDvrSync=null,this.warn("DVR window unstable, disabled sync info pinning")),g(this,M,e,"f")}constructor(r,a){this.minDisplayedLiveOffset=(f(this,V),7),this.subtitleListeners=[],this.audioTrackListeners=[],this.audioTracks=[],this.audioTrack=null,e.set(this,null),t.set(this,0),n.set(this,0),o.set(this,!1),p.set(this,!1),m.set(this,0),E.set(this,!1),T.set(this,!1),this._duration=0,this._dvrModeEnabled=!1,y.set(this,-1),_.set(this,-1),S.set(this,0),I.set(this,0),A.set(this,0),this.isAtEnd=!1,this._useAndroidInitialSeekFallback=!1,R.set(this,-1),b.set(this,-1),v.set(this,-1),C.set(this,-1),N.set(this,!1),this._ready=!1,this._pendingSeek=0,D.set(this,-1),w.set(this,!1),this._dvrEnabled=!1,this._dvrIsLive=!1,M.set(this,0),this.expectedAudios=[],P.set(this,!1),this.pinnedDvrSync=null,this.dvrWindowUnstable=!1,this[O]=this.getClassTypeString(),this.player=r,this.mediaElement=a,this.applyVideoScale(this.videoScale),this.player.dispatchEvent("Player.EVENT_INIT",{}),this.player.dispatchEvent("Player.EVENT_STATUS_CHANGE",{status:"init"}),this.emap=new(s()),this.addEventListeners(),i.x.for(this.player).storageListeners.add(this),a instanceof HTMLMediaElement&&(a.textTracks.onaddtrack=e=>{this.onTextTracksChanged(e)},a.textTracks.onremovetrack=e=>{this.onTextTracksChanged(e)}),this.player.dispatchEvent("Player.EVENT_STATUS_CHANGE",{status:"ready"})}debugString(){return"none"}debugQualityLevel(){return[-1,1]}debugResolution(){return this.isRemotePlayback||this.player.isAudio?"-":`${this.mediaElement.videoWidth}x${this.mediaElement.videoHeight}`}debugFrames(){if(this.mediaElement instanceof HTMLVideoElement){const e=this.mediaElement.getVideoPlaybackQuality();return`${e.droppedVideoFrames} dropped of ${e.totalVideoFrames}`}return"no video info available"}get subQualities(){return this.error("using base implementation for subQuality listing!"),[{level:-1,label:"Auto",width:-1,height:-1}]}selectSubQuality(e){this.error("using base implementation for subQuality selection!")}get currentSubQuality(){return this.error("using base implementation for currentSubQuality!"),-1}log(...e){this.player.console.log(`[${this.getClassTypeString()}]`,...e)}info(...e){this.player.console.info(`[${this.getClassTypeString()}]`,...e)}warn(...e){this.player.console.warn(`[${this.getClassTypeString()}]`,...e)}error(...e){this.player.console.error(`[${this.getClassTypeString()}]`,...e)}
2onTextTracksChanged(e){this.subtitleListeners.forEach(t=>{t.onTextTracksChanged(e)})}addSubtitleListener(e){this.subtitleListeners.includes(e)||this.subtitleListeners.push(e)}removeSubtitleListener(e){const t=this.subtitleListeners.indexOf(e);-1!==t&&(this.subtitleListeners=this.subtitleListeners.splice(t,1))}onAudioTracksChanged(){1===this.audioTracks.length&&1===this.expectedAudios.length&&this.expectedAudios[0].kind===u.tV.AUDIO_DESCRIPTION&&(this.audioTracks[0].isAudioDescription=!0),this.player.dispatchEvent("Player.AUDIO_TRACK_LIST_CHANGED",{audioTracks:this.audioTracks}),this.audioTrackListeners.forEach(e=>{e.onAudioTracksChanged(this.audioTracks)})}addAudioTrackListener(e){this.audioTrackListeners.includes(e)||this.audioTrackListeners.push(e)}removeAudioTrackListener(e){const t=this.audioTrackListeners.indexOf(e);-1!==t&&(this.audioTrackListeners=this.audioTrackListeners.splice(t,1))}addEventListeners(){this.emap.map(this.mediaElement,"loadstart",this.onLoadStart,this),this.emap.map(this.mediaElement,"canplay",this.onCanPlay,this),this.emap.map(this.mediaElement,"play",this.onPlay,this),this.emap.map(this.mediaElement,"pause",this.onPause,this),this.emap.map(this.mediaElement,"error",this.onError,this),this.emap.map(this.mediaElement,"waiting",this.onWaiting,this),this.emap.map(this.mediaElement,"ended",this.onEnded,this),this.emap.map(this.mediaElement,"timeupdate",this.onTimeUpdate,this),this.emap.map(this.mediaElement,"seeking",this.onSeeking,this),this.emap.map(this.mediaElement,"seeked",this.onSeekEnd,this),this.emap.map(this.mediaElement,"loadedmetadata",this.onLoadedMetadata,this),this.emap.map(this.mediaElement,"loadeddata",this.onLoadedData,this),this.emap.map(this.mediaElement,"durationchange",this.onDurationChange,this),this.emap.map(this.mediaElement,"progress",this.onProgress,this),this.emap.map(this.mediaElement,"stalled",this.onStalled,this),this.emap.map(this.mediaElement,"volumechange",this.onLocalVolumeChange,this)}onLoadStart(){r.O.isAndroidDevice&&(this.mediaElement?.currentSrc??"").toLowerCase().indexOf(".m3u8")>0&&(this._useAndroidInitialSeekFallback=!0)}onCanPlay(){this.mediaElement instanceof HTMLMediaElement&&!(this.mediaElement.readyState>=this.mediaElement.HAVE_FUTURE_DATA)||this.bufferingEventHandler(!1),g(this,p,!1,"f"),this.setPlaybackRate(this.model.playbackRate)}onPlay(){this.startTicker(),this.playEventHandler(),this.bufferingEventHandler(!1),this.vc.setOutDelayed()}onPause(e){this.pauseEventHandler(e,!isNaN(this.mediaElement.currentTime)&&!isNaN(this.mediaElement.duration)&&this.mediaElement.currentTime>=this.mediaElement.duration&&("ios"!==r.O.platform||!this.player.isLive))}onError(e){this.handleError(e)}onWaiting(e){this.mediaElement instanceof HTMLMediaElement&&this.bufferingEventHandler(this.mediaElement.readyState<this.mediaElement.HAVE_FUTURE_DATA),g(this,p,!0,"f")}onEnded(e){this.stopTicker(),this.mediaElement.pause(),this.endEventHandler(e),this.onTimeChange(this.getDuration(),0)}onTimeUpdate(e){if(this.onProgress(null),this.updateTicker(),this.isSeeking()&&!h(this,N,"f")){const e=this.getCurrentTime();Math.abs(h(this,v,"f")-e)<Math.abs(h(this,R,"f")-e)&&this.onSeekEnd(null)}}onSeeking(){g(this,N,!0,"f"),h(this,E,"f")||0!==this._pendingSeek||this.player.dispatchEvent("Player.EVENT_SEEK_START",{from:h(this,R,"f"),to:h(this,v,"f"),fromUnix:h(this,b,"f")>0?h(this,b,"f"):void 0,toUnix:h(this,C,"f")>0?h(this,C,"f"):void 0}),this.bufferingEventHandler(!0)}onSeekEnd(e){this.isSeeking()&&(h(this,E,"f")||0!==this._pendingSeek||this.player.dispatchEvent("Player.EVENT_SEEK_END",{lastPosition:h(this,R,"f"),position:this.getCurrentTime(),lastPositionUnix:h(this,b,"f")>0?h(this,b,"f"):void 0,positionUnix:h(this,C,"f")>0?this.getCurrentUnixTime():void 0}),g(this,E,!1,"f"),g(this,R,-1,"f"),g(this,b,-1,"f"),g(this,v,-1,"f"),g(this,C,-1,"f"),h(this,N,"f")||this.bufferingEventHandler(!1),g(this,N,!1,"f"),this.bufferingEventHandler(!1),this.player.clearExecutionContext("Player.EVENT_SEEK_START","Player.EVENT_SEEK_START_INTENT","Player.EVENT_SEEK_END","Player.EVENT_BUFFERING"))}isSeeking(){return h(this,N,"f")||-1!==h(this,v,"f")&&-1!==h(this,R,"f")}onLoadedMetadata(){this._ready=!0,this.evalInitialSeek()}onLoadedData(){this.evalInitialSeek(),this.onProgress(null)}onDurationChange(e){const t=this.mediaElement.duration;isNaN(t)||(this._duration=t),this._ready=!0,this.onProgress(null)}onLocalVolumeChange(e){const t=this.mediaElement.muted,n=this.mediaElement.volume;this.getVolume()/100===n&&h(this,P,"f")===t||(this.player.setMutedInternal(t,!0,!1,!0,!0),this.player.setVolumeInternal(100*n,!0,!1,!1))}onProgress(e){if(!this.mediaElement||"waiting"===e?.type&&this.isSeeking())return;const t=this.getCurrentTime(),n=this.getDuration();let r=-1;const i=this.mediaElement?.buffered;if(i)for(let e=0;e<i.length;e++)if(i.start(e)<=t&&i.end(e)>=t){r=i.end(e);break}if(-1===r)return;const a=Math.round(r/n*100);this.bufferProgressHandler(a)}onStalled(e){this.onProgress(e)}onSourceError(e){this.stopTicker(),this.handleError(e)}onTimeChange(e,t){this.model.duration!==e&&e>0&&this.model.duration>0&&null!==this.pinnedDvrSync&&(this.pinnedDvrSync=null,this.dvrWindowUnstable=!0,this.warn("DVR window unstable, disabled sync info pinning")),this.updateDuration(e),this.updateTime(Math.max(t,0))}bufferingEventHandler(e){this.onProgress(null),e&&!this.isAtEnd?this.vc.showBufferingIndicator():this.vc.hideBuffer
2ingIndicator(),e!==h(this,o,"f")&&(g(this,o,e,"f"),this.player.dispatchEvent("Player.EVENT_BUFFERING",{isBuffering:e}))}bufferProgressHandler(e){this.vc.timeline?.setBufferProgress(e),g(this,m,e,"f")}playEventHandler(){if(this.stopOtherPlayingPlayers(),this.model.playstate=a.R6.PLAYSTATE_PLAYING,this.player.dispatchEvent("Player.EVENT_STATUS_CHANGE",{status:"play"}),this.isAtEnd){const e=this.getCurrentTimeWithoutSeek();this.executionContextProvider?.preserveExecutionContext("Player.EVENT_INITIAL_FRAME",500);const t=t=>{t.currentTime!==e&&(this.player.dispatchEvent("Player.EVENT_INITIAL_FRAME",{}),h(this,o,"f")||this.bufferingEventHandler(!1))},n=()=>{this.player.removeEventListener("Player.EVENT_UPDATE_STREAM_TIME",t),this.player.removeEventListener("Player.EVENT_INITIAL_FRAME",n)};this.player.addEventListener("Player.EVENT_UPDATE_STREAM_TIME",t),this.player.addEventListener("Player.EVENT_INITIAL_FRAME",n)}this.isAtEnd=!1,this.player.pixelController.replayTrigger(),this.player.pixelController.initialPlayTrigger(),this.player.dispatchEvent("Player.EVENT_PLAY_STREAM",{})}pauseEventHandler(e,t=!1){this.model.playstate=a.R6.PLAYSTATE_PAUSED,this.player.dispatchEvent("Player.EVENT_STATUS_CHANGE",{status:"pause"}),this.player.dispatchEvent("Player.EVENT_PAUSE_STREAM",{ended:t})}endEventHandler(e){this.isAtEnd=!0,this.player.dispatchEvent("Player.EVENT_END_STREAM",{}),this.player.pixelController.triggerPixel("clip_ended"),this.jumpToStart(),this.pauseEventHandler(e,!0),this.vc.hidePosterFrame(),this.mc.isLive||this.vc.showPlayAgain(),this.vc.hideBuffer
2ingIndicator(),"web"===r.O.platform&&this.player.setFullscreenInternal(!1),this.player.pixelController&&(this.player.pixelController._isReplay=!0)}evalInitialSeek(){if(this._pendingSeek>0){if(this.canSeek()){g(this,E,!0,"f");const e=this._pendingSeek;this._pendingSeek=0,this.setCurrentTime(e,h(this,T,"f"),!1,!0),h(this,T,"f")||this.play()}}else h(this,T,"f")||this.play()}updateDuration(e){this.model.duration!==e&&(this.model.duration=e,this.player.dispatchEvent("Player.EVENT_UPDATE_STREAM_DURATION",{duration:e}))}restartMedia(){this.jumpToStart(),this.play()}resetStartAndEndTime(){this.pc.generic.vodStartSeconds=0,this.pc.generic.vodEndSeconds=0}updateTime(e){this.model.time=e,this.vc.updateTime(e),this.vc.updateTimeline(e,this.model.duration);const r=Date.now();if(r>=h(this,n,"f")+1e3){g(this,n,r,"f");let t=0;const i=Math.round(this.model.duration),a=Math.round(e);this.vc.dvrState.enabledAndRequested&&!this.vc.dvrState.isLive&&(t=Math.min(Math.round(i-e),i)),this.player.pixelController.triggerCustomPixel("super_playhead_position",!1,{currentTime:a,duration:i,dvrRelativeTime:-t})}const o=this.pc.generic.vodStartSeconds,s=this.pc.generic.vodEndSeconds;if(o>0&&e<o){const n=Math.round(e);Math.abs(h(this,t,"f")-n)>3&&(this.setCurrentTime(o,!1,!1,!0),g(this,t,n,"f"))}else s>0&&e>s&&(this.setCurrentTime(o,!1,!1,!0),this.pause());this.player.dispatchEvent("Player.EVENT_UPDATE_STREAM_TIME",{currentTime:e}),window.parent!==window&&i.x.AVAILABLE&&this.model.playstate===a.R6.PLAYSTATE_PLAYING&&i.x.get(i.x.SUFFIX_GLOBAL,i.x.CURRENT_PLAYERID,!0)!==this.player.getId()&&this.pause()}removeEventListeners(){this.emap.all()}dispose(){this.log("dispose()"),this.removeEventListeners(),i.x.for(this.player).storageListeners.delete(this),this.mediaElement instanceof HTMLMediaElement&&(this.mediaElement.textTracks.onaddtrack=null,this.mediaElement.textTracks.onremovetrack=null),this.mediaElement.pause(),this.subtitleListeners=[],this.audioTrackListeners=[],this.stopTicker(),this.player.dispatchEvent("Player.EVENT_STOP_STREAM",{}),h(this,T,"f")&&this.model.playstate===a.K8.UNSPECIFIED&&(this.model.playstate=a.K8.STOPPED),this.audioTracks=[],this.audioTrack=null}stopOtherPlayingPlayers(){i.x.add(i.x.SUFFIX_GLOBAL,i.x.CURRENT_PLAYERID,this.player.getId(),!0,!0),a.R6.autoPlayerAlreadyActive=this.player.getId()}onStorageValueChanged(e,t){e===i.x.CURRENT_PLAYERID&&"string"==typeof t&&this.isPlaying()&&t!==this.player.getId()&&this.pause()}loadStream(e){if(g(this,T,this.model.playstate===a.K8.PAUSED||this.model.playstate===a.K8.STOPPED,"f"),this.model.playstate=a.R6.PLAYSTATE_UNSPECIFIED,h(this,T,"f")||this.stopOtherPlayingPlayers(),this.player.preserveExecutionContext("Player.EVENT_LOAD_STREAM",5e3),this.player.dispatchEvent("Player.EVENT_LOAD_STREAM",{mediaStream:e}),this._pendingSeek=this.model.time,0===this._pendingSeek&&!this.mc.isLive){let e=this.pc.generic.vodInitialPlayheadSeconds;e<=0&&(e=this.pc.generic.vodStartSeconds),this._pendingSeek=e}if(this.mediaElement instanceof HTMLMediaElement)for(;this.mediaElement.children.length>0;)this.mediaElement.removeChild(this.mediaElement.children[0]);if(this.expectedAudios=e.audios,this.addSource(e),!r.O.isEmbedded){const e=i.x.volume(this.player),t=this.pc.generic.isMuted||i.x.muted(this.player);this.player.setVolumeInternal(e,!1,!0,!0),this.player.setMutedInternal(t,!1,!0,!1,!1)}if(h(this,T,"f")){const e=()=>{this.pause(),this.mediaElement.removeEventListener("canplay",e)};this.mediaElement.addEventListener("canplay",e)}this.mediaElement.load()}startTicker(){this.stopTicker(),this.updateTicker(),g(this,D,this.player.safeInterval(()=>{this.updateTicker()},500),"f")}stopTicker(){clearInterval(h(this,D,"f")),g(this,D,-1,"f")}updateTicker(){this.onTimeChange(this.getDuration(),this.getCurrentTime())}play(){this.player.preserveExecutionContext("Player.EVENT_PLAY_STREAM"),g(this,T,!1,"f"),h(this,w,"f")?this.handleError():this.mediaElement.play()?.then(()=>{try{this.player.checkState()}catch(e){return void this.warn("aborting async",e)}this.vc?.hidePosterFrame(),this.startTicker()}).catch(e=>{try{this.player.checkState()}catch(e){return void this.warn("aborting async",e)}this.error("playback failure",e),this.player?.dispatchEvent("Player.EVENT_AUTOPLAY_STREAM_PROHIBITED",{}
2),this.vc?.showPlayBtn(),this.vc?.showPosterFrame(),this.stopTicker()})}pause(){this.player.preserveExecutionContext("Player.EVENT_PAUSE_STREAM"),this.model.playstate=a.R6.PLAYSTATE_PAUSED,this.mediaElement.pause(),this.mc.isLive&&this.mc.isDvrEnabled||(this.updateTicker(),this.stopTicker())}togglePlay(){h(this,w,"f")?this.handleError():this.isPlaying()?this.pause():this.play()}isPlaying(){return this.model.playstate===a.R6.PLAYSTATE_PLAYING}setVolume(e){e>=0&&e<=100&&(this.mediaElement.volume=e/100)}getVolume(){return i.x.volume(this.player)}setMuted(e){g(this,P,e,"f"),this.mediaElement.muted=e,this.mediaElement instanceof HTMLMediaElement&&(e?this.mediaElement.setAttribute("muted","muted"):this.mediaElement.removeAttribute("muted"))}setCurrentTime(e,t=!1,n=!1,r=!1){this.player.preserveExecutionContext("Player.EVENT_SEEK_START");let i=-1;this.canCalculateDvrUnixTime()&&e>=this.dvrRelToUnix(0)&&(i=e,e=this.dvrUnixToRel(e));const a=this.getDuration()>0?Math.min(e,this.getDuration()-.1):e;this.setSeekEventTimestamps(this.getCurrentTime(),a),this.setCurrentTimeRaw(a,i,t,n,r),this.player.model.time=a}setSeekEventTimestamps(e,t){g(this,R,e,"f"),g(this,v,t,"f")}setCurrentTimeRaw(e,t,n=!1,r=!1,i=!1){g(this,S,0,"f"),g(this,I,0,"f"),g(this,A,0,"f");const a=this.pc.generic.vodStartSeconds,o=this.pc.generic.vodEndSeconds;if(!i&&(a>0&&e<a||o>0&&e>o)&&this.resetStartAndEndTime(),this._ready){if(!this.canSeek())return;e=Math.max(0,e),this._pendingSeek=0,this.isAtEnd&&g(this,E,!0,"f");try{this.player.preserveExecutionContextAlias("Player.EVENT_SEEK_START",-1,"Player.EVENT_SEEK_START_INTENT","Player.EVENT_SEEK_END","Player.EVENT_BUFFERING"),h(this,E,"f")||0!==this._pendingSeek||(this.canSeekToUnixTime&&t>0?this.player.dispatchEvent("Player.EVENT_SEEK_START_INTENT",{from:h(this,R,"f"),to:h(this,v,"f"),fromUnix:this.getCurrentUnixTime(),toUnix:t}):this.player.dispatchEvent("Player.EVENT_SEEK_START_INTENT",{from:h(this,R,"f"),to:h(this,v,"f")})),r||(this.canSeekToUnixTime&&t>0?(g(this,b,this.getCurrentUnixTime(),"f"),g(this,C,t,"f"),this.setCurrentUnixTime(t)):this.mediaElement.currentTime=e)}catch(t){this._pendingSeek=e}}else this._pendingSeek=e;this.updateTicker(),this.isAtEnd&&!n&&this.play()}setCurrentUnixTime(e){throw new Error("method not implemented")}seekToLive(){this.canSeek()&&this.setCurrentTime(this.getDuration())}setPlaybackRate(e){const t=this.model.playbackRate!==e||this.mediaElement.playbackRate!==e;this.model.playbackRate=e,this.mediaElement.playbackRate!==e&&(this.mediaElement.playbackRate=e),t&&this.player.dispatchEvent("Player.PLAYBACK_RATE_CHANGE",{rate:e})}getDvrToDateSync(){return null}getSmoothDvrToDateSync(e){return!this.dvrWindowUnstable&&e&&this.canCalculateDvrUnixTime()?(null===this.pinnedDvrSync&&(this.pinnedDvrSync=this.getDvrToDateSync(),0!==this.pinnedDvrSync?.rel&&0!==this.pinnedDvrSync?.real&&0!==this.pinnedDvrSync?.at||(this.pinnedDvrSync=null)),this.pinnedDvrSync):this.getDvrToDateSync()}dvrRelToUnix(e,t=!1){const n=this.getSmoothDvrToDateSync(t);if(null!==n){if(t&&!this.dvrWindowUnstable)return 0|this.__dvrRelToUnixRaw(e,n);let r=h(this,A,"f");if(!this.dvrWindowUnstable)if(this.isPlaying()&&!this.playbackStalled){if(0!==h(this,S,"f")){const e=this.getCurrentTime();if(isFinite(e)&&e>0){const t=this.__dvrRelToUnixRaw(e,n)-h(this,S,"f");g(this,A,h(this,A,"f")+t,"f"),r+=t,this.info("PAUSE DRIFT",t)}g(this,S,0,"f"),g(this,I,0,"f")}const e=performance.now(),t=1e3*this.__dvrRelToUnixRaw(100,n);if(-1!==h(this,y,"f")&&-1!==h(this,_,"f")){const n=t-(h(this,_,"f")+(e-h(this,y,"f")));Math.abs(n)>=10&&(g(this,A,h(this,A,"f")+n/1e3,"f"),r+=n/1e3)}g(this,y,e,"f"),g(this,_,t,"f")}else g(this,y,-1,"f"),g(this,_,-1,"f"),0===h(this,I,"f")?(g(this,I,this.getCurrentTime(),"f"),g(this,S,this.__dvrRelToUnixRaw(h(this,I,"f"),n),"f")):r+=this.__dvrRelToUnixRaw(this.getCurrentTime(),n)-h(this,S,"f");return this.__dvrRelToUnixRaw(e,n)-r|0}return t&&!this.dvrWindowUnstable||(g(this,S,0,"f"),g(this,I,0,"f"),g(this,A,0,"f")),0}__dvrRelToUnixRaw(e,t){const n=t.rel-e,r=Date.now()-t.at;return(t.real+r)/1e3-n}dvrUnixToRel(e){return e-this.dvrRelToUnix(0)}canCalculateDvrUnixTime(){const e=this.getDvrToDateSync();return null!==e&&0!==e.real&&0!==e.rel&&0!==e.at}dvrUnixToRelNullable(e){const t=this.dvrRelToUnixNullable(0);return null===t?null:e-t}dvrRelToUnixNullable(e,t=!1){return null===this.getSmoothDvrToDateSync(t)?null:this.dvrRelToUnix(e,t)}get canSeekToUnixTime(){return!1}getPercentBuffered(){return h(this,m,"f")}getCurrentUnixTime(){return this._dvrEnabled&&this.canCalculateDvrUnixTime()?this.dvrRelToUnix(this.getCurrentTime()):-1}getCurrentUnixTimeWithoutSeek(){return!h(this,E,"f")&&h(this,b,"f")>=0?h(this,b,"f"):this.getCurrentUnixTime()}getCurrentUnixTimeWindowStart(){return this._dvrEnabled&&this.canCalculateDvrUnixTime()?this.dvrRelToUnix(0):-1}getCurrentUnixTimeWindowEnd(){return this._dvrEnabled&&this.canCalculateDvrUnixTime()?this.dvrRelToUnix(this.getDuration()):-1}
2getCurrentTime(){if(this._pendingSeek>0)return this._pendingSeek;const e=this.mediaElement.currentTime;return isNaN(e)?this.model.time:e}getCurrentTimeWithoutSeek(){return!h(this,E,"f")&&h(this,R,"f")>=0?h(this,R,"f"):this.getCurrentTime()}setTimeByPercent(e){const t=e/100*this.getDuration();return this.setCurrentTime(t),t}getDuration(){const e=this.mediaElement.duration;return isNaN(e)?0!==this._duration?this._duration:this.model.duration:e}stop(e){if(!this.isAtEnd){this.model.playstate=a.R6.PLAYSTATE_STOPPED,this.isAtEnd=!0,this.player.dispatchEvent("Player.EVENT_STOP_STREAM",{}),this.player.dispatchEvent("Player.EVENT_STATUS_CHANGE",{status:"stop"});try{this.player.checkStateStrict(),this.pause(),r.O.isEmbedded||this.jumpToStart(),this.bufferingEventHandler(!1),this.updateTicker(),this.stopTicker()}catch(e){}}}jumpToStart(){this.setCurrentTime(0,!0)}onDVRCallback(e,t,n){this._dvrEnabled=e&&t>=120,this._dvrWindow=t,this._dvrIsLive=n,this.player.viewCtrl.onDVRCallback(this._dvrEnabled,this._dvrWindow,this._dvrIsLive),this.updateTicker(),this.player.dispatchEvent("Player.EVENT_DVR_CHANGE",{dvrEnabled:this._dvrEnabled,dvrIsLive:this._dvrIsLive,dvrWindow:this._dvrWindow})}getAudioTracks(){return[]}setAudioTrack(e){}setAudioTrackById(e){}getAudioTrack(){return null}getAudioTracksInitialized(){return null!==this.getAudioTrack()}handleError(e){this.stopTicker(),g(this,w,!0,"f");let t=[];e&&(this.error(e),"string"==typeof e?t=[e]:"object"==typeof e&&("type"in e&&(0,c.Ed)(e.type)&&"error"!==e.type&&t.push(String(e.type)),"name"in e&&(0,c.Ed)(e.name)&&"error"!==e.name&&t.push(String(e.name)),(0,c.Ed)(e.message)&&t.push(String(e.message)))),this.player.errorCtrl?.throwStreamError(...t)}toJSON(){return toString()}},e=new WeakMap,t=new WeakMap,n=new WeakMap,o=new WeakMap,p=new WeakMap,m=new WeakMap,E=new WeakMap,T=new WeakMap,y=new WeakMap,_=new WeakMap,S=new WeakMap,I=new WeakMap,A=new WeakMap,R=new WeakMap,b=new WeakMap,v=new WeakMap,C=new WeakMap,N=new WeakMap,D=new WeakMap,w=new WeakMap,M=new WeakMap,P=new WeakMap,x=[(0,l.C6)("Player.EVENT_PAUSE_STREAM",{type:"other",initiator:"external-playback-pause"})],F=[(0,l.C6)("Player.EVENT_PLAY_STREAM")],k=[(0,l.kF)({type:"lifecycle",initiator:"playback-end"})],B=[(0,l.C6)("Player.EVENT_LOAD_STREAM")],H=[(0,l.kF)({type:"other",initiator:"dvrUpdate"})],O=Symbol.toStringTag,function(e,t,n){"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}(U,"AbstractPlayerCtrl"),(()=>{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;d(U,null,x,{kind:"method",name:"onPause",static:!1,private:!1,access:{has:e=>"onPause"in e,get:e=>e.onPause},metadata:e},null,V),d(U,null,F,{kind:"method",name:"playEventHandler",static:!1,private:!1,access:{has:e=>"playEventHandler"in e,get:e=>e.playEventHandler},metadata:e},null,V),d(U,null,k,{kind:"method",name:"endEventHandler",static:!1,private:!1,access:{has:e=>"endEventHandler"in e,get:e=>e.endEventHandler},metadata:e},null,V),d(U,null,B,{kind:"method",name:"evalInitialSeek",static:!1,private:!1,access:{has:e=>"evalInitialSeek"in e,get:e=>e.evalInitialSeek},metadata:e},null,V),d(U,null,H,{kind:"method",name:"onDVRCallback",static:!1,private:!1,access:{has:e=>"onDVRCallback"in e,get:e=>e.onDVRCallback},metadata:e},null,V),d(null,L={value:U},G,{kind:"class",name:U.name,metadata:e},null,Y),U=L.value,e&&Object.defineProperty(U,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),f(U,Y)})(),U})()},2790(e,t,n){"use strict";n.d(t,{X:()=>u,q:()=>l});var r=n(9139),i=n(7269),a=function(e,t,n,r,i,a){function o(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,u=r.kind,l="getter"===u?"get":"setter"===u?"set":"value",c=!t&&e?r.static?e:e.prototype:null,f=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),d=!1,h=n.length-1;h>=0;h--){var g={};for(var p in r)g[p]="access"===p?{}:r[p];for(var p in r.access)g.access[p]=r.access[p];g.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializer
2s after decoration has completed");a.push(o(e||null))};var m=(0,n[h])("accessor"===u?{get:f.get,set:f.set}:f[l],g);if("accessor"===u){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(s=o(m.get))&&(f.get=s),(s=o(m.set))&&(f.set=s),(s=o(m.init))&&i.unshift(s)}else(s=o(m))&&("field"===u?i.unshift(s):f[l]=s)}c&&Object.defineProperty(c,r.name,f),d=!0},o=function(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0},s=function(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})};let u=(()=>{let e,t,n=[i.JW],u=[];return t=class{execute(e,t){const n=e.model.mediaCollection.streams.some(e=>!e.isAudioOnly)?r.J.createVideo(e,!0):r.J.createAudio(e,!0);try{e.viewCtrl?.removeMediaCanvas()}catch(e){}null!==n?t(n):e.errorCtrl?.throwError("MEDIACANVAS_NOT_GENERATED",!0)}},s(t,"DefaultMediaElementGenerator"),(()=>{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;a(null,e={value:t},n,{kind:"class",name:t.name,metadata:r},null,u),t=e.value,r&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),o(t,u)})(),t})(),l=(()=>{let e,t,n=[i.JW],u=[];return t=class{execute(e,t){const n=r.J.createVideo(e,!0);try{e.viewCtrl?.removeMediaCanvas()}catch(e){}null!==n?t(n):e.errorCtrl?.throwError("MEDIACANVAS_NOT_GENERATED",!0)}},s(t,"DefaultVideoElementGenerator"),(()=>{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;a(null,e={value:t},n,{kind:"class",name:t.name,metadata:r},null,u),t=e.value,r&&Object.defineProperty(t,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),o(t,u)})(),t})()},9675(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>D});var r=n(4030).Buffer,i={7267:function(e,t){t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,a=s(e),o=a[0],u=a[1],l=new i(function(e,t,n){return 3*(t+n)/4-n}(0,o,u)),c=0,f=u>0?o-4:o;for(n=0;n<f;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],l[c++]=t>>16&255,l[c++]=t>>8&255,l[c++]=255&t;return 2===u&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[c++]=255&t),1===u&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t),l},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],o=16383,s=0,l=r-i;s<l;s+=o)a.push(u(e,s,s+o>l?l:s+o));return 1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),a.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)n[o]=a[o],r[a.charCodeAt(o)]=o;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,r){for(var i,a,o=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(n[(a=i)>>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},44:function(e,t,n){const r=n(7267),i=n(7986),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const o=2147483647;function s(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return l(e,t,n)}function l(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|p(e,t);let r=s(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if($(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if($(e,ArrayBuffer)||e&&$(e.buffer,ArrayBuffer))return h(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&($(e,SharedArrayBuffer)||e&&$(e.buffer,SharedArrayBuffer)))return h(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return u.from(r,t,n);const i=function(e){if(u.isBuffer(e)){const t=0|g(e.length),n=s(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Q(e.length)?s(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');
vendor: 4,216 bytes, line 2
2if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return c(e),s(e<0?0:0|g(e))}function d(e){const t=e.length<0?0:0|g(e.length),n=s(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function h(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,u.prototype),r}function g(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||$(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return j(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(e).length;default:if(i)return r?-1:j(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return w(this,t,n);case"utf8":case"utf-8":return v(this,t,n);case"ascii":return N(this,t,n);case"latin1":case"binary":return D(this,t,n);case"base64":return b(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function E(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function T(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Q(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,i){let a,o=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,n/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let r=-1;for(a=n;a<s;a++)if(l(e,a)===l(t,-1===r?0:a-r)){if(-1===r&&(r=a),a-r+1===u)return r*o}else-1!==r&&(a-=a-r),r=-1}else for(n+u>s&&(n=s-u),a=n;a>=0;a--){let n=!0;for(let r=0;r<u;r++)if(l(e,a+r)!==l(t,r)){n=!1;break}if(n)return a}return-1}function _(e,t,n,r){n=Number(n)||0;const i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;const a=t.length;let o;for(r>a/2&&(r=a/2),o=0;o<r;++o){const r=parseInt(t.substr(2*o,2),16);if(Q(r))return o;e[n+o]=r}return o}function S(e,t,n,r){return z(j(t,e.length-n),e,n,r)}function I(e,t,n,r){return z(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function A(e,t,n,r){return z(W(t),e,n,r)}function R(e,t,n,r){return z(function(e,t){let n,r,i;const a=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function b(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function v(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i<n;){const t=e[i];let a=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=n){let n,r,s,u;switch(o){case 1:t<128&&(a=t);break;case 2:n=e[i+1],128==(192&n)&&(u=(31&t)<<6|63&n,u>127&&(a=u));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(u=(15&t)<<12|(63&n)<<6|63&r,u>2047&&(u<55296||u>57343)&&(a=u));break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(u=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,u>
vendor: 15,337 bytes, line 2
265535&&u<1114112&&(a=u))}}null===a?(a=65533,o=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=o}return function(e){const t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=C));return n}(r)}t.kMaxLength=o,u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,n){return l(e,t,n)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,n){return function(e,t,n){return c(e),e<=0?s(e):void 0!==t?"string"==typeof n?s(e).fill(t,n):s(e).fill(t):s(e)}(e,t,n)},u.allocUnsafe=function(e){return f(e)},u.allocUnsafeSlow=function(e){return f(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if($(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),$(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=u.allocUnsafe(t);let i=0;for(n=0;n<e.length;++n){let t=e[n];if($(t,Uint8Array))i+t.length>r.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)E(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)E(this,t,t+3),E(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)E(this,t,t+7),E(this,t+1,t+6),E(this,t+2,t+5),E(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?v(this,0,e):m.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},a&&(u.prototype[a]=u.prototype.inspect),u.prototype.compare=function(e,t,n,r,i){if($(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0);const s=Math.min(a,o),l=this.slice(r,i),c=e.slice(t,n);for(let e=0;e<s;++e)if(l[e]!==c[e]){a=l[e],o=c[e];break}return a<o?-1:o<a?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return T(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return T(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let a=!1;for(;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return S(this,e,t,n);case"ascii":case"latin1":case"binary":return I(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const C=4096;function N(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function D(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function w(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=t;r<n;++r)i+=X[e[r]];return i}function M(e,t,n){const r=e.slice(t,n);let i="";for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+256*r[e+1]);return i}function P(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,n,r,i,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function L(e,t,n,r,i){Y(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function U(e,t,n,r,i){Y(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}function x(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function F(e,t,n,r,a){return t=+t,n>>>=0,a||x(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function k(e,t,n,r,a){return t=+t,n>>>=0,a||x(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,u.prototype),r},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return r},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=Z(function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||q(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))}),u.prototype.readBigUInt64BE=Z(function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||q(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),u.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=t,i=1,a=this[e+--r];for(;r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=Z(function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||q(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),u.prototype.readBigInt64BE=Z(function(e){V(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||q(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)}),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||O(this,e,t,n,Math.pow(2,8*n)-1,0);let i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||O(this,e,t,n,Math.pow(2,8*n)-1,0);let i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=Z(function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=Z(function(e,t=0){return U(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);O(this,e,t,n,r-1,-r)}let i=0,a=1,o=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===o&&0!==this[t+i-1]&&(o=1),this[t+i]=(e/a|0)-o&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);O(this,e,t,n,r-1,-r)}let i=n-1,a=1,o=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/a|0)-o&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=Z(function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=Z(function(e,t=0){return U(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(e,t,n){return F(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return F(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return k(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return k(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{const a=u.isBuffer(e)?e:u.from(e,r),o=a.length;
vendor: 4,925 bytes, line 2
2if(0===o)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=a[i%o]}return this};const B={};function H(e,t,n){B[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function G(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function Y(e,t,n,r,i,a){if(e>n||e<t){const r="bigint"==typeof t?"n":"";let i;throw i=a>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(a+1)}${r}`:`>= -(2${r} ** ${8*(a+1)-1}${r}) and < 2 ** ${8*(a+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new B.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){V(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||q(t,e.length-(n+1))}(r,i,a)}function V(e,t){if("number"!=typeof e)throw new B.ERR_INVALID_ARG_TYPE(t,"number",e)}function q(e,t,n){if(Math.floor(e)!==e)throw V(e,n),new B.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}H("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),H("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),H("ERR_OUT_OF_RANGE",function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=G(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=G(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r},RangeError);const K=/[^+/0-9A-Za-z-_]/g;function j(e,t){let n;t=t||1/0;const r=e.length;let i=null;const a=[];for(let o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function W(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(K,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function $(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Q(e){return e!=e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function Z(e){return"undefined"==typeof BigInt?J:e}function J(){throw new Error("BigInt not supported")}},6877:function(e,t){var n={parseBuffer:function(e){return new r(e).parse()},addBoxProcessor:function(e,t){"string"==typeof e&&"function"==typeof t&&(i.prototype._boxProcessors[e]=t)},createFile:function(){return new r},createBox:function(e,t,n){var r=i.create(e);return t&&t.append(r,n),r},createFullBox:function(e,t,r){var i=n.createBox(e,t,r);return i.version=0,i.flags=0,i},Utils:{}};n.Utils.dataViewToString=function(e,t){var n=t||"utf-8";if("undefined"!=typeof TextDecoder)return new TextDecoder(n).decode(e);var r=[],i=0;if("utf-8"===n)for(;i<e.byteLength;){var a=e.getUint8(i++);a<128||(a<224?(a=(31&a)<<6,a|=63&e.getUint8(i++)):a<240?(a=(15&a)<<12,a|=(63&e.getUint8(i++))<<6,a|=63&e.getUint8(i++)):(a=(7&a)<<18,a|=(63&e.getUint8(i++))<<12,a|=(63&e.getUint8(i++))<<6,a|=63&e.getUint8(i++))),r.push(String.fromCharCode(a))}else for(;i<e.byteLength;)r.push(String.fromCharCode(e.getUint8(i++)));return r.join("")},n.Utils.utf8ToByteArray=function(e){var t,n;if("undefined"!=typeof TextEncoder)t=(new TextEncoder).encode(e);else for(t=[],n=0;n<e.length;++n){var r=e.charCodeAt(n);r<128?t.push(r):r<2048?(t.push(192|r>>6),t.push(128|63&r)):r<65536?(t.push(224|r>>12),t.push(128|63&r>>6),t.push(128|63&r)):(t.push(240|r>>18),t.push(128|63&r>>12),t.push(128|63&r>>6),t.push(128|63&r))}return t},n.Utils.appendBox=function(e,t,n){if(t._offset=e._cursor.offset,t._root=e._root?e._root:e,t._raw=e._raw,t._parent=e,-1!==n)if(null!=n){var r,i=-1;if("number"==typeof n)i=n;else{if("string"==typeof n)r=n;else{if("object"!=typeof n||!n.type)return void e.boxes.push(t);r=n.type}for(var a=0;a<e.boxes.length;a++)if(r===e.boxes[a].type){i=a
vendor: 11,109 bytes, line 2
2+1;break}}e.boxes.splice(i,0,t)}else e.boxes.push(t)},t.parseBuffer=n.parseBuffer,t.addBoxProcessor=n.addBoxProcessor,t.createFile=n.createFile,t.createBox=n.createBox,t.createFullBox=n.createFullBox,t.Utils=n.Utils,n.Cursor=function(e){this.offset=void 0===e?0:e};var r=function(e){this._cursor=new n.Cursor,this.boxes=[],e&&(this._raw=new DataView(e))};r.prototype.fetch=function(e){var t=this.fetchAll(e,!0);return t.length?t[0]:null},r.prototype.fetchAll=function(e,t){var n=[];return r._sweep.call(this,e,n,t),n},r.prototype.parse=function(){for(this._cursor.offset=0,this.boxes=[];this._cursor.offset<this._raw.byteLength;){var e=i.parse(this);if(void 0===e.type)break;this.boxes.push(e)}return this},r._sweep=function(e,t,n){for(var i in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&n)return;r._sweep.call(this.boxes[i],e,t,n)}},r.prototype.write=function(){var e,t=0;for(e=0;e<this.boxes.length;e++)t+=this.boxes[e].getLength(!1);var n=new Uint8Array(t);for(this._rawo=new DataView(n.buffer),this.bytes=n,this._cursor.offset=0,e=0;e<this.boxes.length;e++)this.boxes[e].write();return n.buffer},r.prototype.append=function(e,t){n.Utils.appendBox(this,e,t)};var i=function(){this._cursor=new n.Cursor};i.parse=function(e){var t=new i;return t._offset=e._cursor.offset,t._root=e._root?e._root:e,t._raw=e._raw,t._parent=e,t._parseBox(),e._cursor.offset=t._raw.byteOffset+t._raw.byteLength,t},i.create=function(e){var t=new i;return t.type=e,t.boxes=[],t},i.prototype._boxContainers=["dinf","edts","mdia","meco","mfra","minf","moof","moov","mvex","stbl","strk","traf","trak","tref","udta","vttc","sinf","schi","encv","enca","meta","grpl","prsl"],i.prototype._boxProcessors={},i.prototype._procField=function(e,t,n){this._parsing?this[e]=this._readField(t,n):this._writeField(t,n,this[e])},i.prototype._procFieldArray=function(e,t,n,r){var i;if(this._parsing)for(this[e]=[],i=0;i<t;i++)this[e][i]=this._readField(n,r);else for(i=0;i<this[e].length;i++)this._writeField(n,r,this[e][i])},i.prototype._procFullBox=function(){this._procField("version","uint",8),this._procField("flags","uint",24)},i.prototype._procEntries=function(e,t,n){var r;if(this._parsing)for(this[e]=[],r=0;r<t;r++)this[e].push({}),n.call(this,this[e][r]);else for(r=0;r<t;r++)n.call(this,this[e][r])},i.prototype._procSubEntries=function(e,t,n,r){var i;if(this._parsing)for(e[t]=[],i=0;i<n;i++)e[t].push({}),r.call(this,e[t][i]);else for(i=0;i<n;i++)r.call(this,e[t][i])},i.prototype._procEntryField=function(e,t,n,r){this._parsing?e[t]=this._readField(n,r):this._writeField(n,r,e[t])},i.prototype._procSubBoxes=function(e,t){var n;if(this._parsing)for(this[e]=[],n=0;n<t;n++)this[e].push(i.parse(this));else for(n=0;n<t;n++)this._rawo?this[e][n].write():this.size+=this[e][n].getLength()},i.prototype._readField=function(e,t){switch(e){case"uint":return this._readUint(t);case"int":return this._readInt(t);case"template":return this._readTemplate(t);case"string":return-1===t?this._readTerminatedString():this._readString(t);case"data":return this._readData(t);case"utf8":return this._readUTF8String();case"utf8string":return this._readUTF8TerminatedString();default:return-1}},i.prototype._readInt=function(e){var t=null,n=this._cursor.offset-this._raw.byteOffset;switch(e){case 8:t=this._raw.getInt8(n);break;case 16:t=this._raw.getInt16(n);break;case 32:t=this._raw.getInt32(n);break;case 64:var r=this._raw.getInt32(n),i=this._raw.getInt32(n+4);t=r*Math.pow(2,32)+i}return this._cursor.offset+=e>>3,t},i.prototype._readUint=function(e){var t,n,r=null,i=this._cursor.offset-this._raw.byteOffset;switch(e){case 8:r=this._raw.getUint8(i);break;case 16:r=this._raw.getUint16(i);break;case 24:r=((t=this._raw.getUint16(i))<<8)+(n=this._raw.getUint8(i+2));break;case 32:r=this._raw.getUint32(i);break;case 64:t=this._raw.getUint32(i),n=this._raw.getUint32(i+4),r=t*Math.pow(2,32)+n}return this._cursor.offset+=e>>3,r},i.prototype._readString=function(e){for(var t="",n=0;n<e;n++){var r=this._readUint(8);t+=String.fromCharCode(r)}return t},i.prototype._readTemplate=function(e){return this._readUint(e/2)+this._readUint(e/2)/Math.pow(2,e/2)},i.prototype._readTerminatedString=function(){for(var e="";this._cursor.offset-this._offset<this._raw.byteLength;){var t=this._readUint(8);if(0===t)break;e+=String.fromCharCode(t)}return e},i.prototype._readData=function(e){var t=e>0?e:this._raw.byteLength-(this._cursor.offset-this._offset);if(t>0){var n=new Uint8Array(this._raw.buffer,this._cursor.offset,t);return this._cursor.offset+=t,n}return null},i.prototype._readUTF8String=function(){var e=this._raw.byteLength-(this._cursor.offset-this._offset),t=null;return e>0&&(t=new DataView(this._raw.buffer,this._cursor.offset,e),this._cursor.offset+=e),t?n.Utils.dataViewToString(t):t},i.prototype._readUTF8TerminatedString=function(){var e=this._raw.byteLength-(this._cursor.offset-this._offset),t=null;if(e>0){var r;for(t=new DataView(this._raw.buffer,this._cursor.offset,e),r=0;r<e&&0!==t.getUint8(r);r++);t=new DataView(this._raw.buffer,this._cursor.offset,r),this._cursor.offset+=Math.min(r+1,e)}return t?n.Utils.dataViewToString(t):t},i.prototype._parseBox=function(){if(this._parsing=!0,this._cursor.offset=this._offset,this._offset+8>this._raw.buffer.byteLength)this._root._incomplete=!0;else{switch(this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this.size){case 0:this._raw=new DataView(this._raw.buffer,this._offset);break;case 1:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.largesize);break;default:this._offset+this.size>this._raw.buffer.byteLength?(this._incomplete=!0,this._root._incomplete=!0):this._raw=new DataView(this._raw.buffer,this._offset,this.size)}this._incomplete||(this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type)?this._parseContainerBox():this._data=this._readData())}},i.prototype._parseFullBox=function(){this.version=this._readUint(8),this.flags=this._readUint(24)},i.prototype._parseContainerBox=function(){for(this.boxes=[];this._cursor.offset-this._raw.byteOffset<this._raw.byteLength;)this.boxes.push(i.parse(this))},i.prototype.append=function(e,t){n.Utils.appendBox(this,e,t)},i.prototype.getLength=function(){if(this._parsing=!1,this._rawo=null,this.size=0,this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type))for(var e=0;e<this.boxes.length;e++)this.size+=this.boxes[e].getLength();return this._data&&this._writeData(this._data),this.size},i.prototype.write=function(){switch(this._parsing=!1,this._cursor.offset=this._parent._cursor.offset,this.size){case 0:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.parent._rawo.byteLength-this._cursor.offset);break;case 1:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.largesize);break;default:this._rawo=new DataView(this._parent._rawo.buffer,this._cursor.offset,this.size)}if(this._procField("size","uint",32),this._procField("type","string",4),1===this.size&&this._procField("largesize","uint",64),"uuid"===this.type&&this._procFieldArray("usertype",16,"uint",8),this._boxProcessors[this.type]&&this._boxProcessors[this.type].call(this),-1!==this._boxContainers.indexOf(this.type))for(var e=0;e<this.boxes.length;e++)this.boxes[e].write();return this._data&&this._writeData(this._data),this._parent._cursor.offset+=this.size,this.size},i.prototype._writeInt=function(e,t){if(this._rawo){var n=this._cursor.offset-this._rawo.byteOffset;switch(e){case 8:this._rawo.setInt8(n,t);break;case 16:this._rawo.setInt16(n,t);break;case 32:this._rawo.setInt32(n,t);break;case 64:var r=Math.floor(t/Math.pow(2,32)),i=t-r*Math.pow(2,32);this._rawo.setUint32(n,r),this._rawo.setUint32(n+4,i)}this._cursor.offset+=e>>3}else this.size+=e>>3},i.prototype._writeUint=function(e,t){if(this._rawo){var n,r,i=this._cursor.offset-this._rawo.byteOffset;switch(e){case 8:this._rawo.setUint8(i,t);break;case 16:this._rawo.setUint16(i,t);break;case 24:n=(16776960&t)>>8,r=255&t,this._rawo.setUint16(i,n),this._rawo.setUint8(i+2,r);break;case 32:this._rawo.setUint32(i,t);break;case 64:r=t-(n=Math.floor(t/Math.pow(2,32)))*Math.pow(2,32),this._rawo.setUint32(i,n),this._rawo.setUint32(i+4,r)}this._cursor.offset+=e>>3}else this.size+=e>>3},i.prototype._writeString=function(e,t){for(var n=0;n<e;n++)this._writeUint(8,t.charCodeAt(n))},i.prototype._writeTerminatedString=function(e){if(0!==e.length){for(var t=0;t<e.length;t++)this._writeUint(8,e.charCodeAt(t));this._writeUint(8,0)}},i.prototype._writeTemplate=function(e,t){var n=Math.floor(t),r=(t-n)*Math.pow(2,e/2);this._writeUint(e/2,n),this._writeUint(e/2,r)},i.prototype._writeData=function(e){if(e)if(this._rawo){if(e instanceof Array){for(var t=this._cursor.offset-this._rawo.byteOffset,n=0;n<e.length;n++)this._rawo.setInt8(t+n,e[n]);this._cursor.offset+=e.length}e instanceof Uint8Array&&(this._root.bytes.set(e,this._cursor.offset),this._cursor.offset+=e.length)}else this.size+=e.length},i.prototype._writeUTF8String=function(e){var t=n.Utils.utf8ToByteArray(e);if(this._rawo)for(var r=new DataView(this._rawo.buffer,this._cursor.offset,t.length),i=0;i<t.length;i++)r.setUint8(i,t[i]);else this.size+=t.length},i.prototype._writeField=function(e,t,n){switch(e){case"uint":this._writeUint(t,n);break;case"int":this._writeInt(t,n);break;case"template":this._writeTemplate(t,n);break;case"string":-1==t?this._writeTerminatedString(n):this._writeString(t,n);break;case"data":this._writeData(n);break;case"utf8":this._writeUTF8String(n)}},i.prototype._boxProcessors.ardi=function(){this._procFullBox(),this._procField("audio_rendering_indication","uint",8)},i.prototype._boxProcessors.avc1=i.prototype._boxProcessors.avc2=i.prototype._boxProcessors.avc3=i.prototype._boxProcessors.avc4=i.prototype._boxProcessors.hvc1=i.prototype._boxProcessors.hev1=i.prototype._boxProcessors.encv=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procField("pre_defined1","uint",16),this._procField("reserved2","uint",16),this._procFieldArray("pre_defined2",3,"uint",32),this._procField("width","uint",16),this._procField("height","uint",16),this._procField("horizresolution","template",32),this._procField("vertresolution","template",32),this._procField("reserved3","uint",32),this._procField("frame_count","uint",16),this._procFieldArray("compressorname",32,"uint",8),this._procField("depth","uint",16),this._procField("pre_defined3","int",16),this._procField("config","data",-1)},i.prototype._boxProcessors.ctts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,
vendor: 7,853 bytes, line 2
2function(e){this._procEntryField(e,"sample_count","uint",32),this._procEntryField(e,"sample_offset",1===this.version?"int":"uint",32)})},i.prototype._boxProcessors.dref=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entries",this.entry_count)},i.prototype._boxProcessors.elng=function(){this._procFullBox(),this._procField("extended_language","utf8string")},i.prototype._boxProcessors.elst=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(e){this._procEntryField(e,"segment_duration","uint",1===this.version?64:32),this._procEntryField(e,"media_time","int",1===this.version?64:32),this._procEntryField(e,"media_rate_integer","int",16),this._procEntryField(e,"media_rate_fraction","int",16)})},i.prototype._boxProcessors.emsg=function(){this._procFullBox(),1==this.version?(this._procField("timescale","uint",32),this._procField("presentation_time","uint",64),this._procField("event_duration","uint",32),this._procField("id","uint",32),this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1)):(this._procField("scheme_id_uri","string",-1),this._procField("value","string",-1),this._procField("timescale","uint",32),this._procField("presentation_time_delta","uint",32),this._procField("event_duration","uint",32),this._procField("id","uint",32)),this._procField("message_data","data",-1)},i.prototype._boxProcessors.free=i.prototype._boxProcessors.skip=function(){this._procField("data","data",-1)},i.prototype._boxProcessors.frma=function(){this._procField("data_format","uint",32)},i.prototype._boxProcessors.ftyp=i.prototype._boxProcessors.styp=function(){this._procField("major_brand","string",4),this._procField("minor_version","uint",32);var e=-1;this._parsing&&(e=(this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset))/4),this._procFieldArray("compatible_brands",e,"string",4)},i.prototype._boxProcessors.hdlr=function(){this._procFullBox(),this._procField("pre_defined","uint",32),this._procField("handler_type","string",4),this._procFieldArray("reserved",3,"uint",32),this._procField("name","string",-1)},i.prototype._boxProcessors.imda=function(){this._procField("imda_identifier","uint",32),this._procField("data","data",-1)},i.prototype._boxProcessors.kind=function(){this._procFullBox(),this._procField("schemeURI","utf8string"),this._procField("value","utf8string")},i.prototype._boxProcessors.labl=function(){this._procFullBox(),this.is_group_label=!!(1&this.flags),this._procField("label_id","uint",16),this._procField("language","utf8string"),this._procField("label","utf8string")},i.prototype._boxProcessors.mdat=function(){this._procField("data","data",-1)},i.prototype._boxProcessors.mdhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?64:32),this._parsing||"string"!=typeof this.language||(this.language=this.language.charCodeAt(0)-96<<10|this.language.charCodeAt(1)-96<<5|this.language.charCodeAt(2)-96),this._procField("language","uint",16),this._parsing&&(this.language=String.fromCharCode(96+(this.language>>10&31),96+(this.language>>5&31),96+(31&this.language))),this._procField("pre_defined","uint",16)},i.prototype._boxProcessors.mehd=function(){this._procFullBox(),this._procField("fragment_duration","uint",1==this.version?64:32)},i.prototype._boxProcessors.meta=function(){this._procFullBox()},i.prototype._boxProcessors.mfhd=function(){this._procFullBox(),this._procField("sequence_number","uint",32)},i.prototype._boxProcessors.mfro=function(){this._procFullBox(),this._procField("mfra_size","uint",32)},i.prototype._boxProcessors.mp4a=i.prototype._boxProcessors.enca=function(){this._procFieldArray("reserved1",6,"uint",8),this._procField("data_reference_index","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procField("channelcount","uint",16),this._procField("samplesize","uint",16),this._procField("pre_defined","uint",16),this._procField("reserved3","uint",16),this._procField("samplerate","template",32),this._procField("esds","data",-1)},i.prototype._boxProcessors.mvhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("timescale","uint",32),this._procField("duration","uint",1==this.version?64:32),this._procField("rate","template",32),this._procField("volume","template",16),this._procField("reserved1","uint",16),this._procFieldArray("reserved2",2,"uint",32),this._procFieldArray("matrix",9,"template",32),this._procFieldArray("pre_defined",6,"uint",32),this._procField("next_track_ID","uint",32)},i.prototype._boxProcessors.payl=function(){this._procField("cue_text","utf8")},i.prototype._boxProcessors.prft=function(){this._procFullBox(),this._procField("reference_track_ID","uint",32),this._procField("ntp_timestamp_sec","uint",32),this._procField("ntp_timestamp_frac","uint",32),this._procField("media_time","uint",1==this.version?64:32)},i.prototype._boxProcessors.prsl=function(){this._procFullBox(),this._procField("group_id","uint",32),this._procField("num_entities_in_group","uint",32),this._procEntries("entities",this.num_entities_in_group,function(e){this._procEntryField(e,"entity_id","uint",32)}),4096&this.flags&&this._procField("preselection_tag","utf8string"),8192&this.flags&&this._procField("selection_priority","uint",8),16384&this.flags&&this._procField("interleaving_tag","utf8string")},i.prototype._boxProcessors.pssh=function(){this._procFullBox(),this._procFieldArray("SystemID",16,"uint",8),this._procField("DataSize","uint",32),this._procFieldArray("Data",this.DataSize,"uint",8)},i.prototype._boxProcessors.schm=function(){this._procFullBox(),this._procField("scheme_type","uint",32),this._procField("scheme_version","uint",32),1&this.flags&&this._procField("scheme_uri","string",-1)},i.prototype._boxProcessors.sdtp=function(){this._procFullBox();var e=-1;this._parsing&&(e=this._raw.byteLength-(this._cursor.offset-this._raw.byteOffset)),this._procFieldArray("sample_dependency_table",e,"uint",8)},i.prototype._boxProcessors.sidx=function(){this._procFullBox(),this._procField("reference_ID","uint",32),this._procField("timescale","uint",32),this._procField("earliest_presentation_time","uint",1==this.version?64:32),this._procField("first_offset","uint",1==this.version?64:32),this._procField("reserved","uint",16),this._procField("reference_count","uint",16),this._procEntries("references",this.reference_count,function(e){this._parsing||(e.reference=(1&e.reference_type)<<31,e.reference|=2147483647&e.referenced_size,e.sap=(1&e.starts_with_SAP)<<31,e.sap|=(3&e.SAP_type)<<28,e.sap|=268435455&e.SAP_delta_time),this._procEntryField(e,"reference","uint",32),this._procEntryField(e,"subsegment_duration","uint",32),this._procEntryField(e,"sap","uint",32),this._parsing&&(e.reference_type=e.reference>>31&1,e.referenced_size=2147483647&e.reference,e.starts_with_SAP=e.sap>>31&1,e.SAP_type=e.sap>>28&7,e.SAP_delta_time=268435455&e.sap)})},i.prototype._boxProcessors.smhd=function(){this._procFullBox(),this._procField("balance","uint",16),this._procField("reserved","uint",16)},i.prototype._boxProcessors.ssix=function(){this._procFullBox(),this._procField("subsegment_count","uint",32),this._procEntries("subsegments",this.subsegment_count,function(e){this._procEntryField(e,"ranges_count","uint",32),this._procSubEntries(e,"ranges",e.ranges_count,function(e){this._procEntryField(e,"level","uint",8),this._procEntryField(e,"range_size","uint",24)})})},i.prototype._boxProcessors.stsd=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procSubBoxes("entr
2ies",this.entry_count)},i.prototype._boxProcessors.sttg=function(){this._procField("settings","utf8")},i.prototype._boxProcessors.stts=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(e){this._procEntryField(e,"sample_count","uint",32),this._procEntryField(e,"sample_delta","uint",32)})},i.prototype._boxProcessors.subs=function(){this._procFullBox(),this._procField("entry_count","uint",32),this._procEntries("entries",this.entry_count,function(e){this._procEntryField(e,"sample_delta","uint",32),this._procEntryField(e,"subsample_count","uint",16),this._procSubEntries(e,"subsamples",e.subsample_count,function(e){this._procEntryField(e,"subsample_size","uint",1===this.version?32:16),this._procEntryField(e,"subsample_priority","uint",8),this._procEntryField(e,"discardable","uint",8),this._procEntryField(e,"codec_specific_parameters","uint",32)})})},i.prototype._boxProcessors.tenc=function(){this._procFullBox(),this._procField("default_IsEncrypted","uint",24),this._procField("default_IV_size","uint",8),this._procFieldArray("default_KID",16,"uint",8)},i.prototype._boxProcessors.tfdt=function(){this._procFullBox(),this._procField("baseMediaDecodeTime","uint",1==this.version?64:32)},i.prototype._boxProcessors.tfhd=function(){this._procFullBox(),this._procField("track_ID","uint",32),1&this.flags&&this._procField("base_data_offset","uint",64),2&this.flags&&this._procField("sample_description_offset","uint",32),8&this.flags&&this._procField("default_sample_duration","uint",32),16&this.flags&&this._procField("default_sample_size","uint",32),32&this.flags&&this._procField("default_sample_flags","uint",32)},i.prototype._boxProcessors.tfra=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._parsing||(this.reserved=0,this.reserved|=(48&this.length_size_of_traf_num)<<4,this.reserved|=(12&this.length_size_of_trun_num)<<2,this.reserved|=3&this.length_size_of_sample_num),this._procField("reserved","uint",32),this._parsing&&(this.length_size_of_traf_num=(48&this.reserved)>>4,this.length_size_of_trun_num=(12&this.reserved)>>2,this.length_size_of_sample_num=3&this.reserved),this._procField("number_of_entry","uint",32),this._procEntries("entries",this.number_of_entry,function(e){this._procEntryField(e,"time","uint",1===this.version?64:32),this._procEntryField(e,"moof_offset","uint",1===this.version?64:32),this._procEntryField(e,"traf_number","uint",8*(this.length_size_of_traf_num+1)),this._procEntryField(e,"trun_number","uint",8*(this.length_size_of_trun_num+1)),this._procEntryField(e,"sample_number","uint",8*(this.length_size_of_sample_num+1))})},i.prototype._boxProcessors.tkhd=function(){this._procFullBox(),this._procField("creation_time","uint",1==this.version?64:32),this._procField("modification_time","uint",1==this.version?64:32),this._procField("track_ID","uint",32),this._procField("reserved1","uint",32),this._procField("duration","uint",1==this.version?64:32),this._procFieldArray("reserved2",2,"uint",32),this._procField("layer","uint",16),this._procField("alternate_group","uint",16),this._procField("volume","template",16),this._procField("reserved3","uint",16),this._procFieldArray("matrix",9,"template",32),this._procField("width","template",32),this._procField("height","template",32)},i.prototype._boxProcessors.trex=function(){this._procFullBox(),this._procField("track_ID","uint",32),this._procField("default_sample_description_index","uint",32),this._procField("default_sample_duration","uint",32),this._procField("default_sample_size","uint",32),this._procField("default_sample_flags","uint",32)},i.prototype._boxProcessors.trun=function(){this._procFullBox(),this._procField("sample_count","uint",32),1&this.flags&&this._procField("data_offset","int",32),4&this.flags&&this._procField("first_sample_flags","uint",32),this._procEntries("samples",this.sample_count,function(e){256&this.flags&&this._procEntryField(e,"sample_duration","uint",32),512&this.flags&&this._procEntryField(e,"sample_size","uint",32),1024&this.flags&&this._procEntryField(e,"sample_flags","uint",32),2048&this.flags&&this._procEntryField(e,"sample_composition_time_offset",1===this.version?"int":"uint",32)})},i.prototype._boxProcessors["url "]=i.prototype._boxProcessors["urn "]=function(){this._procFullBox(),"urn "===this.type&&this._procField("name","string",-1),this._procField("location","string",-1)},i.prototype._boxProcessors.vlab=function(){this._procField("source_label","utf8")},i.prototype._boxProcessors.vmhd=function(){this._procFullBox(),this._procField("graphicsmode","uint",16),this._procFieldArray("opcolor",3,"uint",16)},i.prototype._boxProcessors.vttC=function(){this._procField("config","utf8")},i.prototype._boxProcessors.vtte=function(){}},9826:function(e){var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}p(e,t,a,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&p(e,"error",t,{once:!0})}(e,i)})},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,a,o,l;if(s(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),o=a[t]),void 0===o)o=a[t]=n,++e._eventsCount;else if("function"==typeof o?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=u(e))>0&&o.length>i&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=o.length,l=c,console&&console.warn&&console.warn(l)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=c.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):g(i,i.length)}function h(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function p(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)})}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return o}
vendor: 7,174 bytes, line 2
2,set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return u(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,a=this._events;if(void 0!==a)i=i&&void 0===a.error;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var u=a[e];if(void 0===u)return!1;if("function"==typeof u)r(u,this,t);else{var l=u.length,c=g(u,l);for(n=0;n<l;++n)r(c[n],this,t)}return!0},a.prototype.addListener=function(e,t){return l(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return l(this,e,t,!0)},a.prototype.once=function(e,t){return s(t),this.on(e,f(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,f(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,a,o;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},a.prototype.listenerCount=h,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},7316:function(e){e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;0!=i--;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n}},7986:function(e,t){t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,f=n?i-1:0,d=n?-1:1,h=e[t+f];for(f+=d,a=h&(1<<-c)-1,h>>=-c,c+=s;c>0;a=256*a+e[t+f],f+=d,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+e[t+f],f+=d,c-=8);if(0===a)a=1-l;else{if(a===u)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,r),a-=l}return(h?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,u,l=8*a-i-1,c=(1<<l)-1,f=c>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:a-1,g=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+f>=1?d/u:d*Math.pow(2,1-f))*u>=2&&(o++,u/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*u-1)*Math.pow(2,i),o+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[n+h]=255&s,h+=g,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+h]=255&o,h+=g,o/=256,l-=8);e[n+h-g]|=128*p}},5474:function(e,t,n){!function(e){e.parser=function(e,t){return new a(e,t)},e.SAXParser=a,e.SAXStream=s,e.createStream=function(e,t){return new s(e,t)},e.MAX_BUFFER_LENGTH=65536;var t,i=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function a(t,n){if(!(this instanceof a))return new a(t,n);var r=this;!function(e){for(var t=0,n=i.length;t<n;t++)e[i[t]]=""}(r),r.q=r.c="",r.bufferCheckPosition=e.MAX_BUFFER_LENGTH,r.opt=n||{},r.opt.lowercase=r.opt.lowercase||r.opt.lowercasetags,r.looseCase=r.opt.lowercase?"toLowerCase":"toUpperCase",r.tags=[],r.closed=r.closedRoot=r.sawRoot=!1,r.tag=r.error=null,r.strict=!!t,r.noscript=!(!t&&!r.opt.noscript),r.state=N.BEGIN,r.strictEntities=r.opt.strictEntities,r.ENTITIES=r.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES),r.attribList=[],r.opt.xmlns&&(r.ns=Object.create(E)),r.trackPosition=!1!==r.opt.position,r.trackPosition&&(r.position=r.line=r.column=0),w(r,"onready")}e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(e){function t(){}return t.prototype=e,new t}),Object.keys||(Object.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}),a.prototype={end:function(){U(this)},write:function(t){var n=this;if(this.error)throw this.error;if(n.closed)return L(n,"Cannot write after close. Assign an onready handler.");if(null===t)return U(n);"object"==typeof t&&(t=t.toString());for(var r=0,a="";a=q(t,r++),n.c=a,a;)switch(n.trackPosition&&(n.position++,"\n"===a?(n.line++,n.column=0):n.column++),n.state){case N.BEGIN:if(n.state=N.BEGIN_WHITESPACE,"\ufeff"===a)continue;V(n,a);continue;case N.BEGIN_WHITESPACE:V(n,a);continue;case N.TEXT:if(n.sawRoot&&!n.closedRoot){for(var o=r-1;a&&"<"!==a&&"&"!==a;)(a=q(t,r++))&&n.trackPosition&&(n.position++,"\n"===a?(n.line++,n.column=0):n.column++);n.textNode+=t.substring(o,r-1)}"<"!==a||n.sawRoot&&n.closedRoot&&!n.strict?(!R(u,a)||n.sawRoot&&!n.closedRoot||x(n,"Text data outside of root node."),"&"===a?n.state=N.TEXT_ENTITY:n.textNode+=a):(n.state=N.OPEN_WAKA,n.startTagPosition=n.position);continue;case N.SCRIPT:"<"===a?n.state=N.SCRIPT_ENDING:n.script+=a;continue;case N.SCRIPT_ENDING:"/"===a?n.state=N.CLOSE_TAG:(n.script+="<"+
vendor: 13,992 bytes, line 2
2a,n.state=N.SCRIPT);continue;case N.OPEN_WAKA:if("!"===a)n.state=N.SGML_DECL,n.sgmlDecl="";else if(A(u,a));else if(A(T,a))n.state=N.OPEN_TAG,n.tagName=a;else if("/"===a)n.state=N.CLOSE_TAG,n.tagName="";else if("?"===a)n.state=N.PROC_INST,n.procInstName=n.procInstBody="";else{if(x(n,"Unencoded <"),n.startTagPosition+1<n.position){var s=n.position-n.startTagPosition;a=new Array(s).join(" ")+a}n.textNode+="<"+a,n.state=N.TEXT}continue;case N.SGML_DECL:(n.sgmlDecl+a).toUpperCase()===h?(M(n,"onopencdata"),n.state=N.CDATA,n.sgmlDecl="",n.cdata=""):n.sgmlDecl+a==="--"?(n.state=N.COMMENT,n.comment="",n.sgmlDecl=""):(n.sgmlDecl+a).toUpperCase()===g?(n.state=N.DOCTYPE,(n.doctype||n.sawRoot)&&x(n,"Inappropriately located doctype declaration"),n.doctype="",n.sgmlDecl=""):">"===a?(M(n,"onsgmldeclaration",n.sgmlDecl),n.sgmlDecl="",n.state=N.TEXT):A(f,a)?(n.state=N.SGML_DECL_QUOTED,n.sgmlDecl+=a):n.sgmlDecl+=a;continue;case N.SGML_DECL_QUOTED:a===n.q&&(n.state=N.SGML_DECL,n.q=""),n.sgmlDecl+=a;continue;case N.DOCTYPE:">"===a?(n.state=N.TEXT,M(n,"ondoctype",n.doctype),n.doctype=!0):(n.doctype+=a,"["===a?n.state=N.DOCTYPE_DTD:A(f,a)&&(n.state=N.DOCTYPE_QUOTED,n.q=a));continue;case N.DOCTYPE_QUOTED:n.doctype+=a,a===n.q&&(n.q="",n.state=N.DOCTYPE);continue;case N.DOCTYPE_DTD:n.doctype+=a,"]"===a?n.state=N.DOCTYPE:A(f,a)&&(n.state=N.DOCTYPE_DTD_QUOTED,n.q=a);continue;case N.DOCTYPE_DTD_QUOTED:n.doctype+=a,a===n.q&&(n.state=N.DOCTYPE_DTD,n.q="");continue;case N.COMMENT:"-"===a?n.state=N.COMMENT_ENDING:n.comment+=a;continue;case N.COMMENT_ENDING:"-"===a?(n.state=N.COMMENT_ENDED,n.comment=O(n.opt,n.comment),n.comment&&M(n,"oncomment",n.comment),n.comment=""):(n.comment+="-"+a,n.state=N.COMMENT);continue;case N.COMMENT_ENDED:">"!==a?(x(n,"Malformed comment"),n.comment+="--"+a,n.state=N.COMMENT):n.state=N.TEXT;continue;case N.CDATA:"]"===a?n.state=N.CDATA_ENDING:n.cdata+=a;continue;case N.CDATA_ENDING:"]"===a?n.state=N.CDATA_ENDING_2:(n.cdata+="]"+a,n.state=N.CDATA);continue;case N.CDATA_ENDING_2:">"===a?(n.cdata&&M(n,"oncdata",n.cdata),M(n,"onclosecdata"),n.cdata="",n.state=N.TEXT):"]"===a?n.cdata+="]":(n.cdata+="]]"+a,n.state=N.CDATA);continue;case N.PROC_INST:"?"===a?n.state=N.PROC_INST_ENDING:A(u,a)?n.state=N.PROC_INST_BODY:n.procInstName+=a;continue;case N.PROC_INST_BODY:if(!n.procInstBody&&A(u,a))continue;"?"===a?n.state=N.PROC_INST_ENDING:n.procInstBody+=a;continue;case N.PROC_INST_ENDING:">"===a?(M(n,"onprocessinginstruction",{name:n.procInstName,body:n.procInstBody}),n.procInstName=n.procInstBody="",n.state=N.TEXT):(n.procInstBody+="?"+a,n.state=N.PROC_INST_BODY);continue;case N.OPEN_TAG:A(y,a)?n.tagName+=a:(F(n),">"===a?H(n):"/"===a?n.state=N.OPEN_TAG_SLASH:(R(u,a)&&x(n,"Invalid character in tag name"),n.state=N.ATTRIB));continue;case N.OPEN_TAG_SLASH:">"===a?(H(n,!0),G(n)):(x(n,"Forward-slash in opening tag not followed by >"),n.state=N.ATTRIB);continue;case N.ATTRIB:if(A(u,a))continue;">"===a?H(n):"/"===a?n.state=N.OPEN_TAG_SLASH:A(T,a)?(n.attribName=a,n.attribValue="",n.state=N.ATTRIB_NAME):x(n,"Invalid attribute name");continue;case N.ATTRIB_NAME:"="===a?n.state=N.ATTRIB_VALUE:">"===a?(x(n,"Attribute without value"),n.attribValue=n.attribName,B(n),H(n)):A(u,a)?n.state=N.ATTRIB_NAME_SAW_WHITE:A(y,a)?n.attribName+=a:x(n,"Invalid attribute name");continue;case N.ATTRIB_NAME_SAW_WHITE:if("="===a)n.state=N.ATTRIB_VALUE;else{if(A(u,a))continue;x(n,"Attribute without value"),n.tag.attributes[n.attribName]="",n.attribValue="",M(n,"onattribute",{name:n.attribName,value:""}),n.attribName="",">"===a?H(n):A(T,a)?(n.attribName=a,n.state=N.ATTRIB_NAME):(x(n,"Invalid attribute name"),n.state=N.ATTRIB)}continue;case N.ATTRIB_VALUE:if(A(u,a))continue;A(f,a)?(n.q=a,n.state=N.ATTRIB_VALUE_QUOTED):(x(n,"Unquoted attribute value"),n.state=N.ATTRIB_VALUE_UNQUOTED,n.attribValue=a);continue;case N.ATTRIB_VALUE_QUOTED:if(a!==n.q){"&"===a?n.state=N.ATTRIB_VALUE_ENTITY_Q:n.attribValue+=a;continue}B(n),n.q="",n.state=N.ATTRIB_VALUE_CLOSED;continue;case N.ATTRIB_VALUE_CLOSED:A(u,a)?n.state=N.ATTRIB:">"===a?H(n):"/"===a?n.state=N.OPEN_TAG_SLASH:A(T,a)?(x(n,"No whitespace between attributes"),n.attribName=a,n.attribValue="",n.state=N.ATTRIB_NAME):x(n,"Invalid attribute name");continue;case N.ATTRIB_VALUE_UNQUOTED:if(R(d,a)){"&"===a?n.state=N.ATTRIB_VALUE_ENTITY_U:n.attribValue+=a;continue}B(n),">"===a?H(n):n.state=N.ATTRIB;continue;case N.CLOSE_TAG:if(n.tagName)">"===a?G(n):A(y,a)?n.tagName+=a:n.script?(n.script+="</"+n.tagName,n.tagName="",n.state=N.SCRIPT):(R(u,a)&&x(n,"Invalid tagname in closing tag"),n.state=N.CLOSE_TAG_SAW_WHITE);else{if(A(u,a))continue;R(T,a)?n.script?(n.script+="</"+a,n.state=N.SCRIPT):x(n,"Invalid tagname in closing tag."):n.tagName=a}continue;case N.CLOSE_TAG_SAW_WHITE:if(A(u,a))continue;">"===a?G(n):x(n,"Invalid characters in closing tag");continue;case N.TEXT_ENTITY:case N.ATTRIB_VALUE_ENTITY_Q:case N.ATTRIB_VALUE_ENTITY_U:var l,c;switch(n.state){case N.TEXT_ENTITY:l=N.TEXT,c="textNode";break;case N.ATTRIB_VALUE_ENTITY_Q:l=N.ATTRIB_VALUE_QUOTED,c="attribValue";break;case N.ATTRIB_VALUE_ENTITY_U:l=N.ATTRIB_VALUE_UNQUOTED,c="attribValue"}";"===a?(n[c]+=Y(n),n.entity="",n.state=l):A(n.entity.length?S:_,a)?n.entity+=a:(x(n,"Invalid character in entity name"),n[c]+="&"+n.entity+a,n.entity="",n.state=l);continue;default:throw new Error(n,"Unknown state: "+n.state)}return n.position>=n.bufferCheckPosition&&function(t){for(var n=Math.max(e.MAX_BUFFER_LENGTH,10),r=0,a=0,o=i.length;a<o;a++){var s=t[i[a]].length;if(s>n)switch(i[a]){case"textNode":P(t);break;case"cdata":M(t,"oncdata",t.cdata),t.cdata="";break;case"script":M(t,"onscript",t.script),t.script="";break;default:L(t,"Max buffer length exceeded: "+i[a])}r=Math.max(r,s)}var u=e.MAX_BUFFER_LENGTH-r;t.bufferCheckPosition=u+t.position}(n),n},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var e;P(e=this),""!==e.cdata&&(M(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(M(e,"onscript",e.script),e.script="")}};try{t=n(3515).Stream}catch(e){t=function(){}}var o=e.EVENTS.filter(function(e){return"error"!==e&&"end"!==e});function s(e,n){if(!(this instanceof s))return new s(e,n);t.apply(this),this._parser=new a(e,n),this.writable=!0,this.readable=!0;var r=this;this._parser.onend=function(){r.emit("end")},this._parser.onerror=function(e){r.emit("error",e),r._parser.error=null},this._decoder=null,o.forEach(function(e){Object.defineProperty(r,"on"+e,{get:function(){return r._parser["on"+e]},set:function(t){if(!t)return r.removeAllListeners(e),r._parser["on"+e]=t,t;r.on(e,t)},enumerable:!0,configurable:!1})})}s.prototype=Object.create(t.prototype,{constructor:{value:s}}),s.prototype.write=function(e){if("function"==typeof r&&"function"==typeof r.isBuffer&&r.isBuffer(e)){if(!this._decoder){var t=n(748).StringDecoder;this._decoder=new t("utf8")}e=this._decoder.write(e)}return this._parser.write(e.toString()),this.emit("data",e),!0},s.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},s.prototype.on=function(e,n){var r=this;return r._parser["on"+e]||-1===o.indexOf(e)||(r._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),r.emit.apply(r,t)}),t.prototype.on.call(r,e,n)};var u="\r\n\t ",l="0124356789",c="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",f="'\"",d=u+">",h="[CDATA[",g="DOCTYPE",p="http://www.w3.org/XML/1998/namespace",m="http://www.w3.org/2000/xmlns/",E={xml:p,xmlns:m};u=I(u),l=I(l),c=I(c);var T=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,y=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/,_=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,S=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/;function I(e){return e.split("").reduce(function(e,t){return e[t]=!0,e},{})}function A(e,t){return function(e){return"[object RegExp]"===Object.prototype.toString.call(e)}(e)?!!t.match(e):e[t]}function R(e,t){return!A(e,t)}f=I(f),d=I(d);var b,v,C,N=0;for(var D in e.STATE={BEGIN:N++,BEGIN_WHITESPACE:N++,TEXT:N++,TEXT_ENTITY:N++,OPEN_WAKA:N++,SGML_DECL:N++,SGML_DECL_QUOTED:N++,DOCTYPE:N++,DOCTYPE_QUOTED:N++,DOCTYPE_DTD:N++,DOCTYPE_DTD_QUOTED:N++,COMMENT_STARTING:N++,COMMENT:N++,COMMENT_ENDING:N++,COMMENT_ENDED:N++,CDATA:N++,CDATA_ENDING:N++,CDATA_ENDING_2:N++,PROC_INST:N++,PROC_INST_BODY:N++,PROC_INST_ENDING:N++,OPEN_TAG:N++,OPEN_TAG_SLASH:N++,ATTRIB:N++,ATTRIB_NAME:N++,ATTRIB_NAME_SAW_WHITE:N++,ATTRIB_VALUE:N++,ATTRIB_VALUE_QUOTED:N++,ATTRIB_VALUE_CLOSED:N++,ATTRIB_VALUE_UNQUOTED:N++,ATTRIB_VALUE_ENTITY_Q:N++,ATTRIB_VALUE_ENTITY_U:N++,CLOSE_TAG:N++,CLOSE_TAG_SAW_WHITE:N++,SCRIPT:N++,SCRIPT_ENDING:N++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach(function(t){var n=e.ENTITIES[t],r="number"==typeof n?String.fromCharCode(n):n;e.ENTITIES[t]=r}),e.STATE)e.STATE[e.STATE[D]]=D;function w(e,t,n){e[t]&&e[t](n)}function M(e,t,n){e.textNode&&P(e),w(e,t,n)}function P(e){e.textNode=O(e.opt,e.textNode),e.textNode&&w(e,"ontext",e.textNode),e.textNode=""}function O(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function L(e,t){return P(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,w(e,"onerror",t),e}function U(e){return e.sawRoot&&!e.closedRoot&&x(e,"Unclosed root tag"),e.state!==N.BEGIN&&e.state!==N.BEGIN_WHITESPACE&&e.state!==N.TEXT&&L(e,"Unexpected end"),P(e),e.c="",e.closed=!0,w(e,"onend"),a.call(e,e.strict,e.opt),e}function x(e,t){if("object"!=typeof e||!(e instanceof a))throw new Error("bad call to strictFail");e.strict&&L(e,t)}function F(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,n=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(n.ns=t.ns),e.attribList.length=0,M(e,"onopentagstart",n)}function k(e,t){var n=e.indexOf(":")<0?["",e]:e.split(":"),r=n[0],i=n[1];return t&&"xmlns"===e&&(r="xmlns",i=""),{prefix:r,local:i}}function B(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=k(e.attribName,!0),n=t.prefix,r=t.local;if("xmlns"===n)if("xml"===r&&e.attribValue!==p)x(e,"xml: prefix must be bound to "+p+"\nActual: "+e.attribValue);else if("xmlns"===r&&e.attribValue!==m)x(e,"xmlns: prefix must be bound to "+m+"\nActual: "+e.attribValue);else{var i=e.tag,a=e.tags[e.tags.length-1]||e;i.ns===a.ns&&(i.ns=Object.create(a.ns)),i.ns[r]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,M(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function H(e,t){if(e.opt.xmlns){var n=e.tag,r=k(e.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(x(e,"Unbound namespace prefix: "+JSON.stringify(e.tagName)),n.uri=r.prefix);var i=e.tags[e.tags.length-1]||e;
vendor: 7,491 bytes, line 2
2n.ns&&i.ns!==n.ns&&Object.keys(n.ns).forEach(function(t){M(e,"onopennamespace",{prefix:t,uri:n.ns[t]})});for(var a=0,o=e.attribList.length;a<o;a++){var s=e.attribList[a],u=s[0],l=s[1],c=k(u,!0),f=c.prefix,d=c.local,h=""===f?"":n.ns[f]||"",g={name:u,value:l,prefix:f,local:d,uri:h};f&&"xmlns"!==f&&!h&&(x(e,"Unbound namespace prefix: "+JSON.stringify(f)),g.uri=f),e.tag.attributes[u]=g,M(e,"onattribute",g)}e.attribList.length=0}e.tag.isSelfClosing=!!t,e.sawRoot=!0,e.tags.push(e.tag),M(e,"onopentag",e.tag),t||(e.noscript||"script"!==e.tagName.toLowerCase()?e.state=N.TEXT:e.state=N.SCRIPT,e.tag=null,e.tagName=""),e.attribName=e.attribValue="",e.attribList.length=0}function G(e){if(!e.tagName)return x(e,"Weird empty close tag."),e.textNode+="</>",void(e.state=N.TEXT);if(e.script){if("script"!==e.tagName)return e.script+="</"+e.tagName+">",e.tagName="",void(e.state=N.SCRIPT);M(e,"onscript",e.script),e.script=""}var t=e.tags.length,n=e.tagName;e.strict||(n=n[e.looseCase]());for(var r=n;t--&&e.tags[t].name!==r;)x(e,"Unexpected close tag");if(t<0)return x(e,"Unmatched closing tag: "+e.tagName),e.textNode+="</"+e.tagName+">",void(e.state=N.TEXT);e.tagName=n;for(var i=e.tags.length;i-- >t;){var a=e.tag=e.tags.pop();e.tagName=e.tag.name,M(e,"onclosetag",e.tagName);var o={};for(var s in a.ns)o[s]=a.ns[s];var u=e.tags[e.tags.length-1]||e;e.opt.xmlns&&a.ns!==u.ns&&Object.keys(a.ns).forEach(function(t){var n=a.ns[t];M(e,"onclosenamespace",{prefix:t,uri:n})})}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=N.TEXT}function Y(e){var t,n=e.entity,r=n.toLowerCase(),i="";return e.ENTITIES[n]?e.ENTITIES[n]:e.ENTITIES[r]?e.ENTITIES[r]:("#"===(n=r).charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),i=(t=parseInt(n,16)).toString(16)):(n=n.slice(1),i=(t=parseInt(n,10)).toString(10))),n=n.replace(/^0+/,""),i.toLowerCase()!==n?(x(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function V(e,t){"<"===t?(e.state=N.OPEN_WAKA,e.startTagPosition=e.position):R(u,t)&&(x(e,"Non-whitespace before first tag."),e.textNode=t,e.state=N.TEXT)}function q(e,t){var n="";return t<e.length&&(n=e.charAt(t)),n}N=e.STATE,String.fromCodePoint||(b=String.fromCharCode,v=Math.floor,C=function(){var e,t,n=[],r=-1,i=arguments.length;if(!i)return"";for(var a="";++r<i;){var o=Number(arguments[r]);if(!isFinite(o)||o<0||o>1114111||v(o)!==o)throw RangeError("Invalid code point: "+o);o<=65535?n.push(o):(e=55296+((o-=65536)>>10),t=o%1024+56320,n.push(e,t)),(r+1===i||n.length>16384)&&(a+=b.apply(null,n),n.length=0)}return a},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:C,configurable:!0,writable:!0}):String.fromCodePoint=C)}(t)},6739:function(e,t,n){!function(e,t,n,r,i){function a(e){if("contents"in e)for(var t=("styleAttrs"in e?e.styleAttrs[r.byName.ruby.qname]:null),n="span"===e.kind&&("container"===t||"textContainer"===t||"baseContainer"===t),i=e.contents.length-1;i>=0;i--)!n||"styleAttrs"in e.contents[i]&&r.byName.ruby.qname in e.contents[i].styleAttrs?a(e.contents[i]):delete e.contents[i]}function o(e,t,n,r){var i=r&&"seq"===r.timeContainer,a=0;r&&(a=i&&n?n.end:r.begin),t.begin=t.explicit_begin?t.explicit_begin+a:a;var s=t.begin,u=null;if("sets"in t)for(var l=0;l<t.sets.length;l++)o(e,t.sets[l],u,t),s="seq"===t.timeContainer?t.sets[l].end:Math.max(s,t.sets[l].end),u=t.sets[l];if("contents"in t){if("contents"in t)for(var c=0;c<t.contents.length;c++)o(e,t.contents[c],u,t),s="seq"===t.timeContainer?t.contents[c].end:Math.max(s,t.contents[c].end),u=t.contents[c]}else s=i?t.begin:Number.POSITIVE_INFINITY;null!==t.explicit_end&&null!==t.explicit_dur?t.end=Math.min(t.begin+t.explicit_dur,a+t.explicit_end):null===t.explicit_end&&null!==t.explicit_dur?t.end=t.begin+t.explicit_dur:null!==t.explicit_end&&null===t.explicit_dur?t.end=a+t.explicit_end:t.end=s,delete t.explicit_begin,delete t.explicit_dur,delete t.explicit_end,e._registerEvent(t)}function s(e){this.node=e}function u(){this.events=[],this.head=new l,this.body=null}function l(){this.styling=new c,this.layout=new h}function c(){this.styles={},this.initials={}}function f(){this.id=null,this.styleAttrs=null,this.styleRefs=null}function d(){this.styleAttrs=null}function h(){this.regions={}}function g(e,t){p.call(this,"image"),this.src=e,this.type=t}function p(e){this.kind=e}function m(e){this.id=e}function E(e){this.regionID=e}function T(e){this.styleAttrs=e}function y(e){this.sets=e}function _(e){this.contents=e}function S(e,t,n){this.explicit_begin=e,this.explicit_end=t,this.explicit_dur=n}function I(){p.call(this,"body")}function A(){p.call(this,"div")}function R(){p.call(this,"p")}function b(){p.call(this,"span")}function v(){p.call(this,"span")}function C(){p.call(this,"br")}function N(){}function D(){}function w(e){return e&&"xml:id"in e.attributes&&e.attributes["xml:id"].value||null}function M(e){return e&&"style"in e.attributes?e.attributes.style.value.split(" "):[]}function P(e,t){var n={};if(null!==e)for(var i in e.attributes){var a=e.attributes[i].uri+" "+e.attributes[i].local,o=r.byQName[a];if(void 0!==o){var s=o.parse(e.attributes[i].value);null!==s?(n[a]=s,o===r.byName.zIndex&&k(t,"zIndex attribute present but not used by IMSC1 since regions do not overlap")):B(t,"Cannot parse styling attribute "+a+" --\x3e "+e.attributes[i].value)}}return n}function O(e,t,n){for(var r in e.attributes)if(e.attributes[r].uri===t&&e.attributes[r].local===n)return e.attributes[r].value;return null}function L(e,t,n){var r,i=null;return null!==(r=/^(\d+(?:\.\d+)?)f$/.exec(n))?null!==t&&(i=parseFloat(r[1])/t):null!==(r=/^(\d+(?:\.\d+)?)t$/.exec(n))?null!==e&&(i=parseFloat(r[1])/e):null!==(r=/^(\d+(?:\.\d+)?)ms$/.exec(n))?i=parseFloat(r[1])/1e3:null!==(r=/^(\d+(?:\.\d+)?)s$/.exec(n))?i=parseFloat(r[1]):null!==(r=/^(\d+(?:\.\d+)?)h$/.exec(n))?i=3600*parseFloat(r[1]):null!==(r=/^(\d+(?:\.\d+)?)m$/.exec(n))?i=60*parseFloat(r[1]):null!==(r=/^(\d{2,}):(\d\d):(\d\d(?:\.\d+)?)$/.exec(n))?i=3600*parseInt(r[1])+60*parseInt(r[2])+parseFloat(r[3]):null!==(r=/^(\d{2,}):(\d\d):(\d\d)\:(\d{2,})$/.exec(n))&&null!==t&&(i=3600*parseInt(r[1])+60*parseInt(r[2])+parseInt(r[3])+(null===r[4]?0:parseInt(r[4])/t)),i}function U(e,t,n){for(;t.styleRefs.length>0;){var r=t.styleRefs.pop();r in e.styles?(U(e,e.styles[r],n),F(e.styles[r].styleAttrs,t.styleAttrs)):B(n,"Non-existant style id referenced")}}function x(e,t,n,r){for(var i=t.length-1;i>=0;i--){var a=t[i];a in e.styles?F(e.styles[a].styleAttrs,n):B(r,"Non-existant style id referenced")}}function F(e,t){for(var n in e)e.hasOwnProperty(n)&&(n in t||(t[n]=e[n]))}function k(e,t){if(e&&e.warn&&e.warn(t))throw t}function B(e,t){if(e&&e.error&&e.error(t))throw t}function H(e,t){throw e&&e.fatal&&e.fatal(t),t}function G(e,t){for(var n,r=0,i=e.length-1;r<=i;){var a=e[n=Math.floor((r+i)/2)];if(a<t)r=n+1;else{if(!(a>t))return{found:!0,index:n};i=n-1}}return{found:!1,index:r}}e.fromXML=function(e,i,p){var m=t.parser(!0,{xmlns:!0}),E=[],T=[],y=[],_=0,S=null;m.onclosetag=function(e){if(E[0]instanceof N)null!==S.head&&null!==S.head.styling&&x(S.head.styling,E[0].styleRefs,E[0].styleAttrs,i),delete E[0].styleRefs;else if(E[0]instanceof c)for(var t in E[0].styles)E[0].styles.hasOwnProperty(t)&&U(E[0],E[0].styles[t],i);else if(E[0]instanceof R||E[0]instanceof b){if(E[0].contents.length>1){var r,a=[E[0].contents[0]];for(r=1;r<E[0].contents.length;r++)E[0].contents[r]instanceof v&&a[a.length-1]instanceof v?a[a.length-1].text+=E[0].contents[r].text:a.push(E[0].contents[r]);
vendor: 4,091 bytes, line 2
2E[0].contents=a}E[0]instanceof b&&1===E[0].contents.length&&E[0].contents[0]instanceof v&&(E[0].text=E[0].contents[0].text,delete E[0].contents)}else E[0]instanceof s&&(E[0].node.uri===n.ns_tt&&"metadata"===E[0].node.local?_--:_>0&&p&&"onCloseTag"in p&&p.onCloseTag());y.shift(),T.shift(),E.shift()},m.ontext=function(e){if(void 0===E[0]);else if(E[0]instanceof b||E[0]instanceof R){if(E[0]instanceof b){var t=E[0].styleAttrs[r.byName.ruby.qname];if("container"===t||"textContainer"===t||"baseContainer"===t)return}var n=new v;n.initFromText(S,E[0],e,T[0],y[0],i),E[0].contents.push(n)}else E[0]instanceof s&&_>0&&p&&"onText"in p&&p.onText(e)},m.onopentag=function(e){var t=e.attributes["xml:space"];t?y.unshift(t.value):0===y.length?y.unshift("default"):y.unshift(y[0]);var a=e.attributes["xml:lang"];if(a?T.unshift(a.value):0===T.length?T.unshift(""):T.unshift(T[0]),e.uri===n.ns_tt)if("tt"===e.local)null!==S&&H(i,"Two <tt> elements at ("+this.line+","+this.column+")"),(S=new u).initFromNode(e,T[0],i),E.unshift(S);else if("head"===e.local)E[0]instanceof u||H(i,"Parent of <head> element is not <tt> at ("+this.line+","+this.column+")"),E.unshift(S.head);else if("styling"===e.local)E[0]instanceof l||H(i,"Parent of <styling> element is not <head> at ("+this.line+","+this.column+")"),E.unshift(S.head.styling);else if("style"===e.local){var o;E[0]instanceof c?((o=new f).initFromNode(e,i),o.id?S.head.styling.styles[o.id]=o:B(i,"<style> element missing @id attribute"),E.unshift(o)):E[0]instanceof N?((o=new f).initFromNode(e,i),F(o.styleAttrs,E[0].styleAttrs),E.unshift(o)):H(i,"Parent of <style> element is not <styling> or <region> at ("+this.line+","+this.column+")")}else if("initial"===e.local){var m;if(E[0]instanceof c){for(var v in(m=new d).initFromNode(e,i),m.styleAttrs)m.styleAttrs.hasOwnProperty(v)&&(S.head.styling.initials[v]=m.styleAttrs[v]);E.unshift(m)}else H(i,"Parent of <initial> element is not <styling> at ("+this.line+","+this.column+")")}else if("layout"===e.local)E[0]instanceof l||H(i,"Parent of <layout> element is not <head> at "+this.line+","+this.column+")"),E.unshift(S.head.layout);else if("region"===e.local){E[0]instanceof h||H(i,"Parent of <region> element is not <layout> at "+this.line+","+this.column+")");var w=new N;w.initFromNode(S,e,T[0],i),!w.id||w.id in S.head.layout.regions?B(i,"Ignoring <region> with duplicate or missing @id at "+this.line+","+this.column+")"):S.head.layout.regions[w.id]=w,E.unshift(w)}else if("body"===e.local){E[0]instanceof u||H(i,"Parent of <body> element is not <tt> at "+this.line+","+this.column+")"),null!==S.body&&H(i,"Second <body> element at "+this.line+","+this.column+")");var M=new I;M.initFromNode(S,e,T[0],i),S.body=M,E.unshift(M)}else if("div"===e.local){E[0]instanceof A||E[0]instanceof I||H(i,"Parent of <div> element is not <body> or <div> at "+this.line+","+this.column+")");var P=new A;P.initFromNode(S,E[0],e,T[0],i);var O=P.styleAttrs[r.byName.backgroundImage.qname];O&&(P.contents.push(new g(O)),delete P.styleAttrs[r.byName.backgroundImage.qname]),E[0].contents.push(P),E.unshift(P)}else if("image"===e.local){E[0]instanceof A||H(i,"Parent of <image> element is not <div> at "+this.line+","+this.column+")");var L=new g;L.initFromNode(S,E[0],e,T[0],i),E[0].contents.push(L),E.unshift(L)}else if("p"===e.local){E[0]instanceof A||H(i,"Parent of <p> element is not <div> at "+this.line+","+this.column+")");var U=new R;U.initFromNode(S,E[0],e,T[0],i),E[0].contents.push(U),E.unshift(U)}else if("span"===e.local){E[0]instanceof b||E[0]instanceof R||H(i,"Parent of <span> element is not <span> or <p> at "+this.line+","+this.column+")");var x=new b;x.initFromNode(S,E[0],e,T[0],y[0],i),E[0].contents.push(x),E.unshift(x)}else if("br"===e.local){E[0]instanceof b||E[0]instanceof R||H(i,"Parent of <br> element is not <span> or <p> at "+this.line+","+this.column+")");var k=new C;k.initFromNode(S,E[0],e,T[0],i),E[0].contents.push(k),E.unshift(k)}else if("set"===e.local){E[0]instanceof b||E[0]instanceof R||E[0]instanceof A||E[0]instanceof I||E[0]instanceof N||E[0]instanceof C||H(i,"Parent of <set>
2 element is not a content element or a region at "+this.line+","+this.column+")");var G=new D;G.initFromNode(S,E[0],e,i),E[0].sets.push(G),E.unshift(G)}else E.unshift(new s(e));else E.unshift(new s(e));if(E[0]instanceof s)if(e.uri===n.ns_tt&&"metadata"===e.local)_++;else if(_>0&&p&&"onOpenTag"in p){var Y=[];for(var V in e.attributes)Y[e.attributes[V].uri+" "+e.attributes[V].local]={uri:e.attributes[V].uri,local:e.attributes[V].local,value:e.attributes[V].value};p.onOpenTag(e.uri,e.local,Y)}},m.write(e).close(),delete S.head.styling.styles;var w=!1;for(var M in S.head.layout.regions)if(S.head.layout.regions.hasOwnProperty(M)){w=!0;break}if(!w){var P=N.prototype.createDefaultRegion(S.lang);S.head.layout.regions[P.id]=P}for(var O in S.head.layout.regions)S.head.layout.regions.hasOwnProperty(O)&&o(S,S.head.layout.regions[O],null,null);return S.body&&o(S,S.body,null,null),S.body&&a(S.body),S},u.prototype.initFromNode=function(e,t,r){var a=function(e,t){var r=O(e,n.ns_ttp,"cellResolution"),i=15,a=32;if(null!==r){var o=/(\d+) (\d+)/.exec(r);null!==o?(a=parseInt(o[1]),i=parseInt(o[2])):k(t,"Malformed cellResolution value (using initial value instead)")}return{w:a,h:i}}(e,r);this.cellLength={h:new i.ComputedLength(0,1/a.h),w:new i.ComputedLength(1/a.w,0)};var o=function(e,t){var r,i=O(e,n.ns_ttp,"frameRate"),a=30;null!==i&&(null!==(r=/(\d+)/.exec(i))?a=parseInt(r[1]):k(t,"Malformed frame rate attribute (using initial value instead)"));var o=O(e,n.ns_ttp,"frameRateMultiplier"),s=1;null!==o&&(null!==(r=/(\d+) (\d+)/.exec(o))?s=parseInt(r[1])/parseInt(r[2]):k(t,"Malformed frame rate multiplier attribute (using initial value instead)"));var u=s*a,l=1,c=O(e,n.ns_ttp,"tickRate");return null===c?null!==i&&(l=u):null!==(r=/(\d+)/.exec(c))?l=parseInt(r[1]):k(t,"Malformed tick rate attribute (using initial value instead)"),{effectiveFrameRate:u,tickRate:l}}(e,r);this.effectiveFrameRate=o.effectiveFrameRate,this.tickRate=o.tickRate,this.aspectRatio=function(e,t){var r=O(e,n.ns_ittp,"aspectRatio");null===r&&(r=O(e,n.ns_ttp,"displayAspectRatio"));var i=null;if(null!==r){var a=/(\d+)\s+(\d+)/.exec(r);if(null!==a){var o=parseInt(a[1]),s=parseInt(a[2]);0!==o&&0!==s?i=o/s:B(t,"Illegal aspectRatio values (ignoring)")}else B(t,"Malformed aspectRatio attribute (ignoring)")}return i}(e,r);var s=O(e,n.ns_ttp,"timeBase");null!==s&&"media"!==s&&H(r,"Unsupported time base");var u=function(e,t){var r=O(e,n.ns_tts,"extent");if(null===r)return null;var a=r.split(" ");if(2!==a.length)return k(t,"Malformed extent (ignoring)"),null;var o=i.parseLength(a[0]),s=i.parseLength(a[1]);return s&&o?{h:s,w:o}:(k(t,"Malformed extent values (ignoring)"),null)}(e,r);null===u?this.pxLength={h:null,w:null}:("px"===u.h.unit&&"px"===u.w.unit||H(r,"Extent on TT must be in px or absent"),this.pxLength={h:new i.ComputedLength(0,1/u.h.value),w:new i.ComputedLength(1/u.w.value,0)}),this.dimensions={h:new i.ComputedLength(0,1),w:new i.ComputedLength(1,0)},this.lang=t},u.prototype._registerEvent=function(e){if(!(e.end<=e.begin)){var t=G(this.events,e.begin);if(t.found||this.events.splice(t.index,0,e.begin),e.end!==Number.POSITIVE_INFINITY){var n=G(this.events,e.end);n.found||this.events.splice(n.index,0,e.end)}}},u.prototype.getMediaTimeRange=function(){return[this.events[0],this.events[this.events.length-1]]},u.prototype.getMediaTimeEvents=function(){return this.events},f.prototype.initFromNode=function(e,t){this.id=w(e),this.styleAttrs=P(e,t),this.styleRefs=M(e)},d.prototype.initFromNode=function(e,t){for(var r in this.styleAttrs={},e.attributes)if(e.attributes[r].uri===n.ns_itts||e.attributes[r].uri===n.ns_ebutts||e.attributes[r].uri===n.ns_tts){var i=e.attributes[r].uri+" "+e.attributes[r].local;this.styleAttrs[i]=e.attributes[r].value}},g.prototype.initFromNode=function(e,t,n,r,i){this.src="src"in n.attributes?n.attributes.src.value:null,this.src||B(i,"Invalid image@src attribute"),this.type="type"in n.attributes?n.attributes.type.value:null,this.type||B(i,"Invalid image@type attribute"),T.prototype.initFromNode.call(this,e,t,n,i),S.prototype.initFromNode.call(this,e,t,n,i),y.prototype.initFromNode.call(this,e,t,n,i),E.prototype.initFromNode.call(this,e,t,n,i),this.lang=r},m.prototype.initFromNode=function(e,t,n,r){this.id=w(n)},E.prototype.initFromNode=function(e,t,n,r){this.regionID=function(e){return e&&"region"in e.attributes?e.attributes.region.value:""}(n)},T.prototype.initFromNode=function(e,t,n,r){this.styleAttrs=P(n,r),null!==e.head&&null!==e.head.styling&&x(e.head.styling,M(n),this.styleAttrs,r)},y.prototype.initFromNode=function(e,t,n,r){this.sets=[]},_.prototype.initFromNode=function(e,t,n,r){this.contents=[]},S.prototype.initFromNode=function(e,t,n,r){var i=function(e,t,n,r){var i=null;n&&"begin"in n.attributes&&null===(i=L(e.tickRate,e.effectiveFrameRate,n.attributes.begin.value))&&k(r,"Malformed begin value "+n.attributes.begin.value+" (using 0)");var a=null;n&&"dur"in n.attributes&&null===(a=L(e.tickRate,e.effectiveFrameRate,n.attributes.dur.value))&&k(r,"Malformed dur value "+n.attributes.dur.value+" (ignoring)");var o=null;return n&&"end"in n.attributes&&null===(o=L(e.tickRate,e.effectiveFrameRate,n.attributes.end.value))&&k(r,"Malformed end value (ignoring)"),{explicit_begin:i,explicit_end:o,explicit_dur:a}}(e,0,n,r);this.explicit_begin=i.explicit_begin,this.explicit_end=i.explicit_end,this.explicit_dur=i.explicit_dur,this.timeContainer=function(e,t){var n=e&&"timeContainer"in e.attributes?e.attributes.timeContainer.value:null;return n&&"par"!==n?"seq"===n?"seq":(B(t,"Illegal value of timeContainer (assuming 'par')"),"par"):"par"}(n,r)},I.prototype.initFromNode=function(e,t,n,r){T.prototype.initFromNode.call(this,e,null,t,r),S.prototype.initFromNode.call(this,e,null,t,r),y.prototype.initFromNode.call(this,e,null,t,r),E.prototype.initFromNode.call(this,e,null,t,r),_.prototype.initFromNode.call(this,e,null,t,r),this.lang=n},A.prototype.initFromNode=function(e,t,n,r,i){T.prototype.initFromNode.call(this,e,t,n,i),S.prototype.initFromNode.call(this,e,t,n,i),y.prototype.initFromNode.call(this,e,t,n,i),E.prototype.initFromNode.call(this,e,t,n,i),_.prototype.initFromNode.call(this,e,t,n,i),this.lang=r},R.prototype.initFromNode=function(e,t,n,r,i){T.prototype.initFromNode.call(this,e,t,n,i),S.prototype.initFromNode.call(this,e,t,n,i),y.prototype.initFromNode.call(this,e,t,n,i),E.prototype.initFromNode.call(this,e,t,n,i),_.prototype.initFromNode.call(this,e,t,n,i),this.lang=r},b.prototype.initFromNode=function(e,t,n,r,i,a){T.prototype.initFromNode.call(this,e,t,n,a),S.prototype.initFromNode.call(this,e,t,n,a),y.prototype.initFromNode.call(this,e,t,n,a),E.prototype.initFromNode.call(this,e,t,n,a),_.prototype.initFromNode.call(this,e,t,n,a),this.space=i,this.lang=r},v.prototype.initFromText=function(e,t,n,r,i,a){S.prototype.initFromNode.call(this,e,t,null,a),this.text=n,this.space=i,this.lang=r},C.prototype.initFromNode=function(e,t,n,r,i){E.prototype.initFromNode.call(this,e,t,n,i),S.prototype.initFromNode.call(this,e,t,n,i),this.lang=r},N.prototype.createDefaultRegion=function(e){var t=new N;return m.call(t,""),T.call(t,{}),y.call(t,[]),S.call(t,0,Number.POSITIVE_INFINITY,null),this.lang=e,t},N.prototype.initFromNode=function(e,t,n,r){m.prototype.initFromNode.call(this,e,null,t,r),S.prototype.initFromNode.call(this,e,null,t,r),y.prototype.initFromNode.call(this,e,null,t,r),this.styleAttrs=P(t,r),this.styleRefs=M(t),this.lang=n},D.prototype.initFromNode=function(e,t,n,r){S.prototype.initFromNode.call(this,e,t,n,r);var i=P(n,r);for(var a in this.qname=null,this.value=null,i)if(i.hasOwnProperty(a)){if(this.qname){B(r,"More than one style specified on set");break}this.qname=a,this.value=i[a]}}}(t,"undefined"==typeof sax?n(5474):sax,"undefined"==typeof imscNames?n(977):imscNames,"undefined"==typeof imscStyles?n(1219):imscStyles,"undefined"==typeof imscUtils?n(6404):imscUtils)}
vendor: 6,177 bytes, line 2
2,1612:function(e,t,n){var r=/firefox/i.test(navigator.userAgent);!function(e,t,n){function i(e,t,f,h){var g;if("region"===f.kind)(g=document.createElement("div")).style.position="absolute";else if("body"===f.kind)g=document.createElement("div");else if("div"===f.kind)g=document.createElement("div");else if("image"===f.kind){if(g=document.createElement("img"),null!==e.imgResolver&&null!==f.src){var E=e.imgResolver(f.src,g);E&&(g.src=E),g.height=e.regionH,g.width=e.regionW}}else if("p"===f.kind)g=document.createElement("p");else if("span"===f.kind)if("container"===f.styleAttrs[n.byName.ruby.qname])g=document.createElement("ruby"),e.ruby=!0;else if("base"===f.styleAttrs[n.byName.ruby.qname])g=document.createElement("span");else if("text"===f.styleAttrs[n.byName.ruby.qname])g=document.createElement("rt");else if("baseContainer"===f.styleAttrs[n.byName.ruby.qname])g=document.createElement("rbc");else if("textContainer"===f.styleAttrs[n.byName.ruby.qname])g=document.createElement("rtc");else{if("delimiter"===f.styleAttrs[n.byName.ruby.qname])return;g=document.createElement("span")}else"br"===f.kind&&(g=document.createElement("br"));if(g){if(f.lang&&("region"!==f.kind&&f.lang===h.lang||(g.lang=f.lang)),t.appendChild(g),g.style.margin="0","region"===f.kind){var _=f.styleAttrs[n.byName.writingMode.qname];"lrtb"===_||"lr"===_?(e.ipd="lr",e.bpd="tb"):"rltb"===_||"rl"===_?(e.ipd="rl",e.bpd="tb"):"tblr"===_?(e.ipd="tb",e.bpd="lr"):"tbrl"!==_&&"tb"!==_||(e.ipd="tb",e.bpd="rl")}else if("p"===f.kind&&"tb"===e.bpd){var S=f.styleAttrs[n.byName.direction.qname];e.ipd="ltr"===S?"lr":"rl"}for(var I=0;I<d.length;I++){var A=d[I],R=f.styleAttrs[A.qname];void 0!==R&&null!==A.map&&A.map(e,g,f,R)}var b=g,v=f.styleAttrs[n.byName.linePadding.qname];if(v&&!v.isZero()){var C=v.toUsedLength(e.w,e.h);if(C>0){var N=Math.ceil(C)+"px";"tb"===e.bpd?(b.style.paddingLeft=N,b.style.paddingRight=N):(b.style.paddingTop=N,b.style.paddingBottom=N),e.lp=v}}var D=f.styleAttrs[n.byName.multiRowAlign.qname];if(D&&"auto"!==D){var w=document.createElement("span");w.style.display="inline-block",w.style.textAlign=D,g.appendChild(w),b=w,e.mra=D}var M=f.styleAttrs[n.byName.rubyReserve.qname];if(M&&"none"!==M[0]&&(e.rubyReserve=M),f.styleAttrs[n.byName.fillLineGap.qname]&&(e.flg=!0),"span"===f.kind&&f.text){var P=f.styleAttrs[n.byName.textEmphasis.qname];if(P&&"none"!==P.style&&(e.textEmphasis=!0),n.byName.textCombine.qname in f.styleAttrs&&"all"===f.styleAttrs[n.byName.textCombine.qname])g.textContent=f.text,g._isd_element=f,P&&c(e,g,0,P);else for(var O="",L=0;L<f.text.length;L++){O+=f.text.charAt(L);var U=f.text.charCodeAt(L);if(U<55296||U>56319||L===f.text.length-1){var x=document.createElement("span");x.textContent=O,P&&c(e,x,0,P),g.appendChild(x),O="",x._isd_element=f}}}if("contents"in f)for(var F=0;F<f.contents.length;F++)i(e,b,f.contents[F],f);var k=[];if("p"===f.kind&&(l(e,b,k,null),e.rubyReserve&&(function(e,t){for(var n=0;n<e.length;n++){var r,i,a=document.createElement("ruby"),o=document.createElement("span");o.textContent="â",a.appendChild(o);var s,u=t.rubyReserve[1].toUsedLength(t.w,t.h)+"px";"both"===t.rubyReserve[0]||"outside"===t.rubyReserve[0]&&1==e.length?((r=document.createElement("rtc")).style[m]=p?"after":"under",r.textContent="â",r.style.fontSize=u,(i=document.createElement("rtc")).style[m]=p?"before":"over",i.textContent="â",i.style.fontSize=u,a.appendChild(r),a.appendChild(i)):((r=document.createElement("rtc")).textContent="â",r.style.fontSize=u,s="after"===t.rubyReserve[0]||"outside"===t.rubyReserve[0]&&n>0?p?"after":"tb"===t.bpd||"rl"===t.bpd?"under":"over":p?"before":"tb"===t.bpd||"rl"===t.bpd?"over":"under",r.style[m]=s,a.appendChild(r));for(var l=null,c=0;c<e[n].rbc.length;c++)if("ruby"===e[n].rbc[c].localName){l=e[n].rbc[c];for(var f=0;f<l.style.length;f++)a.style.setProperty(l.style.item(f),l.style.getPropertyValue(l.style.item(f)));break}(l=l||e[n].elements[0].node).parentElement.insertBefore(a,l)}}(k,e),e.rubyReserve=null),(e.ruby||e.rubyReserve)&&(function(e,t){for(var n=0;n<e.length;n++)for(var r=0;r<e[n].rbc.length;r++){var i;e[n].rbc[r].style[m]||(i=p?0===n?"before":"after":"tb"===t.bpd||"rl"===t.bpd?0===n?"over":"under":0===n?"under":"over",e[n].rbc[r].style[m]=i)}}(k,e),e.ruby=null),e.textEmphasis&&(function(e,t){for(var n=0;n<e.length;n++)for(var r=0;r<e[n].te.length;r++){var i;e[n].te[r].style[T]&&"none"!==e[n].te[r].style[T]||(i="tb"===t.bpd?0===n?"left over":"left under":"rl"===t.bpd?0===n?"right under":"left under":0===n?"left under":"right under",e[n].te[r].style[T]=i)}}(k,e),e.textEmphasis=null),e.mra&&(function(e){for(var t=0;t<e.length-1;t++){var n=e[t].elements.length;if(0!==n&&!1===e[t].br){var r=document.createElement("br"),i=e[t].elements[n-1].node;i.parentElement.insertBefore(r,i.nextSibling)}}}(k),e.mra=null),e.lp&&(function(e,t,n){if(null!==e)for(var i=0;i<e.length;i++){var a=e[i].elements.length,o=Math.ceil(t)+"px",s="-"+Math.ceil(t)+"px";if(0!==a){var u=e[i].elements[e[i].start_elem],l=e[i].elements[e[i].end_elem];if(u===l){var c=u.node.getBoundingClientRect();if(0==c.width||0==c.height)continue}"lr"===n.ipd?(u.node.style.marginLeft=s,u.node.style.paddingLeft=o):"rl"===n.ipd?(u.node.style.paddingRight=o,u.node.style.marginRight=s):"tb"===n.ipd&&(u.node.style.paddingTop=o,u.node.style.marginTop=s),"lr"===n.ipd?(r||(l.node.style.marginRight=s),l.node.style.paddingRight=o):"rl"===n.ipd?(l.node.style.paddingLeft=o,r||(l.node.style.marginLeft=s)):"tb"===n.ipd&&(l.node.style.paddingBottom=o,l.node.style.marginBottom=s)}}}(k,e.lp.toUsedLength(e.w,e.h),e),e.lp=null),function(e,t){for(var n=0;n<e.length;n++)for(var r=e[n],i=1;i<r.elements.length;){var s=r.elements[i-1],u=r.elements[i];o(s.node,u.node,t)?r.elements.splice(i,1):i++}for(var l,c,f=[],d=0;d<e.length;d++)for(var h=0;h<e[d].elements.length;h++)(c=a(l=e[d].elements[h].node,f,!1))&&(l.style.backgroundColor=c);for(var g=0;g<f.length;g++)f[g].style.backgroundColor=""}(k,e),e.flg)){var B=u(b.getBoundingClientRect(),e);!function(e,t,n,r){for(var i=Math.sign(n-t),a=0;a<=e.length;a++){var o,s,u,l;if(o=0===a?Math.round(t):a===e.length?Math.round(n):Math.round((e[a-1].after+e[a].before)/2),a>0&&e[a-1])for(u=0;
vendor: 4,955 bytes, line 2
2u<e[a-1].elements.length;u++)s=i*(o-(l=e[a-1].elements[u]).after)+"px","lr"===r.bpd?l.node.style.paddingRight=s:"rl"===r.bpd?l.node.style.paddingLeft=s:"tb"===r.bpd&&(l.node.style.paddingBottom=s);if(a<e.length)for(u=0;u<e[a].elements.length;u++)s=i*((l=e[a].elements[u]).before-o)+"px","lr"===r.bpd?l.node.style.paddingLeft=s:"rl"===r.bpd?l.node.style.paddingRight=s:"tb"===r.bpd&&(l.node.style.paddingTop=s)}}(k,B.before,B.after,e),e.flg=null}if("region"===f.kind&&"tb"===e.bpd&&e.enableRollUp&&f.contents.length>0&&"after"===f.styleAttrs[n.byName.displayAlign.qname]){l(e,b,k,null);var H=new s(""===f.id?"_":f.id,k);if(e.currentISDState[H.id]=H,e.previousISDState&&H.id in e.previousISDState&&e.previousISDState[H.id].plist.length>0&&H.plist.length>1&&H.plist[H.plist.length-2].text===e.previousISDState[H.id].plist[e.previousISDState[H.id].plist.length-1].text){var G=g.firstElementChild,Y=H.plist[H.plist.length-1].after-H.plist[H.plist.length-1].before;G.style.bottom="-"+Y+"px",G.style.transition="transform 0.4s",G.style.position="relative",G.style.transform="translateY(-"+Y+"px)"}}}else y(e.errorHandler,"Error processing ISD element kind: "+f.kind)}function a(e,t,n){return e.style.backgroundColor?(n&&!t.includes(e)&&t.push(e),e.style.backgroundColor):"SPAN"===e.parentElement.nodeName||"RUBY"===e.parentElement.nodeName||"RBC"===e.parentElement.nodeName||"RTC"===e.parentElement.nodeName||"RT"===e.parentElement.nodeName?a(e.parentElement,t,!0):void 0}function o(e,t,n){if("SPAN"===e.tagName&&"SPAN"===t.tagName&&e._isd_element===t._isd_element){if(!e._isd_element)return y(n.errorHandler,"Internal error: HTML span is not linked to a source element; cannot merge spans."),!1;e.textContent+=t.textContent;for(var r=0;r<t.style.length;r++){var i=t.style[r];(i.indexOf("border")>=0||i.indexOf("padding")>=0||i.indexOf("margin")>=0)&&(e.style[i]=t.style[i])}return t.parentElement.removeChild(t),!0}return!1}function s(e,t){this.id=e,this.plist=t}function u(e,t){var n={before:null,after:null,start:null,end:null};return"tb"===t.bpd?(n.before=e.top,n.after=e.bottom,"lr"===t.ipd?(n.start=e.left,n.end=e.right):(n.start=e.right,n.end=e.left)):"lr"===t.bpd?(n.before=e.left,n.after=e.right,n.start=e.top,n.end=e.bottom):"rl"===t.bpd&&(n.before=e.right,n.after=e.left,n.start=e.top,n.end=e.bottom),n}function l(e,t,n,r){if("rt"!==t.localName&&"rtc"!==t.localName){var i,a,o,s,c=t.style.backgroundColor||r;if(0===t.childElementCount)if("span"===t.localName||"rb"===t.localName){var f=u(t.getBoundingClientRect(),e);if(0!==n.length&&(i=f.before,a=f.after,o=n[n.length-1].before,a<(s=n[n.length-1].after)&&i>o||s<=a&&o>=i)){var d=Math.sign(f.after-f.before),h=Math.sign(f.end-f.start);d*(f.before-n[n.length-1].before)<0&&(n[n.length-1].before=f.before),d*(f.after-n[n.length-1].after)>0&&(n[n.length-1].after=f.after),h*(f.start-n[n.length-1].start)<0&&(n[n.length-1].start=f.start,n[n.length-1].start_elem=n[n.length-1].elements.length),h*(f.end-n[n.length-1].end)>0&&(n[n.length-1].end=f.end,n[n.length-1].end_elem=n[n.length-1].elements.length)}else n.push({before:f.before,after:f.after,start:f.start,end:f.end,start_elem:0,end_elem:0,elements:[],rbc:[],te:[],text:"",br:!1});n[n.length-1].text+=t.textContent,n[n.length-1].elements.push({node:t,bgcolor:c,before:f.before,after:f.after})}else"br"===t.localName&&0!==n.length&&(n[n.length-1].br=!0);else for(var g=t.firstChild;g;)g.nodeType===Node.ELEMENT_NODE&&(l(e,g,n,c),"ruby"===g.localName||"rtc"===g.localName?n.length>0&&n[n.length-1].rbc.push(g):"span"===g.localName&&g.style[E]&&"none"!==g.style[E]&&n.length>0&&n[n.length-1].te.push(g)),g=g.nextSibling}}function c(e,t,n,r){var i;"none"!==r.style&&("auto"===r.style?t.style[E]="filled":t.style[E]=r.style+" "+r.symbol,("before"===r.position||"after"===r.position)&&(i="tb"===e.bpd?"before"===r.position?"left over":"left under":"rl"===e.bpd?"before"===r.position?"right under":"left under":"before"===r.position?"left under":"right under",t.style[T]=i))}function f(e,t){this.qname=e,this.map=t}e.render=function(e,t,n,r,a,o,s,u,l){var c=r||t.clientHeight,f=a||t.clientWidth;if(null!==e.aspectRatio){var d=c*e.aspectRatio;d>f?c=Math.round(f/e.aspectRatio):f=d}var h=document.createElement("div");h.style.position="relative",h.style.width=f+"px",h.style.height=c+"px",h.style.margin="auto",h.style.top=0,h.style.bottom=0,h.style.left=0,h.style.right=0,h.style.zIndex=0;var g={h:c,w:f,regionH:null,regionW:null,imgResolver:n,displayForcedOnlyMode:o||!1,isd:e,errorHandler:s,previousISDState:u,enableRollUp:l||!1,currentISDState:{},flg:null,lp:null,mra:null,ipd:null,bpd:null,ruby:null,textEmphasis:null,rubyReserve:null};if(t.appendChild(h),"contents"in e)for(var p=0;p<e.contents.length;p++)i(g,h,e.contents[p],e);return g.currentISDState};for(var d=[new f("http://www.w3.org/ns/ttml#styling backgroundColor",function(e,t,n,r){0!==r[3]&&(t.style.backgroundColor="rgba("+r[0].toString()+","+r[1].toString()+","+r[2].toString()+","+(r[3]/255
2).toString()+")")}),new f("http://www.w3.org/ns/ttml#styling color",function(e,t,n,r){t.style.color="rgba("+r[0].toString()+","+r[1].toString()+","+r[2].toString()+","+(r[3]/255).toString()+")"}),new f("http://www.w3.org/ns/ttml#styling direction",function(e,t,n,r){t.style.direction=r}),new f("http://www.w3.org/ns/ttml#styling display",function(e,t,n,r){}),new f("http://www.w3.org/ns/ttml#styling displayAlign",function(e,t,n,r){t.style.display="flex",t.style.flexDirection="column","before"===r?t.style.justifyContent="flex-start":"center"===r?t.style.justifyContent="center":"after"===r&&(t.style.justifyContent="flex-end")}),new f("http://www.w3.org/ns/ttml#styling extent",function(e,t,n,r){e.regionH=r.h.toUsedLength(e.w,e.h),e.regionW=r.w.toUsedLength(e.w,e.h);var i=0,a=0,o=n.styleAttrs["http://www.w3.org/ns/ttml#styling padding"];o&&(i=o[0].toUsedLength(e.w,e.h)+o[2].toUsedLength(e.w,e.h),a=o[1].toUsedLength(e.w,e.h)+o[3].toUsedLength(e.w,e.h)),t.style.height=e.regionH-i+"px",t.style.width=e.regionW-a+"px"}),new f("http://www.w3.org/ns/ttml#styling fontFamily",function(e,t,n,r){for(var i=[],a=0;a<r.length;a++)r[a]=r[a].trim(),"monospaceSerif"===r[a]?(i.push("Courier New"),i.push('"Liberation Mono"'),i.push("Courier"),i.push("monospace")):"proportionalSansSerif"===r[a]?(i.push("Arial"),i.push("Helvetica"),i.push('"Liberation Sans"'),i.push("sans-serif")):"monospace"===r[a]?i.push("monospace"):"sansSerif"===r[a]?i.push("sans-serif"):"serif"===r[a]?i.push("serif"):"monospaceSansSerif"===r[a]?(i.push("Consolas"),i.push("monospace")):"proportionalSerif"===r[a]?i.push("serif"):i.push(r[a]);if(i.length>0){for(var o=[i[0]],s=1;s<i.length;s++)-1==o.indexOf(i[s])&&o.push(i[s]);i=o}t.style.fontFamily=i.join(",")}),new f("http://www.w3.org/ns/ttml#styling shear",function(e,t,n,r){if(0!==r){var i=-.9*r;"tb"===e.bpd?t.style.transform="skewX("+i+"deg)":t.style.transform="skewY("+i+"deg)"}}),new f("http://www.w3.org/ns/ttml#styling fontSize",function(e,t,n,r){t.style.fontSize=r.toUsedLength(e.w,e.h)+"px"}),new f("http://www.w3.org/ns/ttml#styling fontStyle",function(e,t,n,r){t.style.fontStyle=r}),new f("http://www.w3.org/ns/ttml#styling fontWeight",function(e,t,n,r){t.style.fontWeight=r}),new f("http://www.w3.org/ns/ttml#styling lineHeight",function(e,t,n,r){t.style.lineHeight="normal"===r?"normal":r.toUsedLength(e.w,e.h)+"px"}),new f("http://www.w3.org/ns/ttml#styling opacity",function(e,t,n,r){t.style.opacity=r}),new f("http://www.w3.org/ns/ttml#styling origin",function(e,t,n,r){t.style.top=r.h.toUsedLength(e.w,e.h)+"px",t.style.left=r.w.toUsedLength(e.w,e.h)+"px"}),new f("http://www.w3.org/ns/ttml#styling overflow",function(e,t,n,r){t.style.overflow=r}),new f("http://www.w3.org/ns/ttml#styling padding",function(e,t,n,r){var i=[];i[0]=r[0].toUsedLength(e.w,e.h)+"px",i[1]=r[3].toUsedLength(e.w,e.h)+"px",i[2]=r[2].toUsedLength(e.w,e.h)+"px",i[3]=r[1].toUsedLength(e.w,e.h)+"px",t.style.padding=i.join(" ")}),new f("http://www.w3.org/ns/ttml#styling position",function(e,t,n,r){t.style.top=r.h.toUsedLength(e.w,e.h)+"px",t.style.left=r.w.toUsedLength(e.w,e.h)+"px"}),new f("http://www.w3.org/ns/ttml#styling rubyAlign",function(e,t,n,r){t.style.rubyAlign="spaceAround"===r?"space-around":"center"}),new f("http://www.w3.org/ns/ttml#styling rubyPosition",function(e,t,n,r){var i;"before"!==r&&"after"!==r||(i=p?r:"tb"===e.bpd||"rl"===e.bpd?"before"===r?"over":"under":"before"===r?"under":"over",t.parentElement.style[m]=i)}),new f("http://www.w3.org/ns/ttml#styling showBackground",null),new f("http://www.w3.org/ns/ttml#styling textAlign",function(e,t,n,r){var i;i="start"===r?"rl"===e.ipd?"right":"left":"end"===r?"rl"===e.ipd?"left":"right":r,t.style.textAlign=i}),new f("http://www.w3.org/ns/ttml#styling textDecoration",function(e,t,n,r){t.style.textDecoration=r.join(" ").replace("lineThrough","line-through")}),new f("http://www.w3.org/ns/ttml#styling textOutline",function(e,t,n,r){}),new f("http://www.w3.org/ns/ttml#styling textShadow",function(e,t,r,i){var a=r.styleAttrs[n.byName.textOutline.qname];if("none"===i&&"none"===a)t.style.textShadow="";else{var o=[];if("none"!==a){var s="rgba("+a.color[0].toString()+","+a.color[1].toString()+","+a.color[2].toString()+","+(a.color[3]/255
2).toString()+")";o.push("1px 1px 1px "+s),o.push("-1px 1px 1px "+s),o.push("1px -1px 1px "+s),o.push("-1px -1px 1px "+s)}if("none"!==i)for(var u=0;u<i.length;u++)o.push(i[u].x_off.toUsedLength(e.w,e.h)+"px "+i[u].y_off.toUsedLength(e.w,e.h)+"px "+i[u].b_radius.toUsedLength(e.w,e.h)+"px rgba("+i[u].color[0].toString()+","+i[u].color[1].toString()+","+i[u].color[2].toString()+","+(i[u].color[3]/255).toString()+")");t.style.textShadow=o.join(",")}}),new f("http://www.w3.org/ns/ttml#styling textCombine",function(e,t,n,r){t.style.textCombineUpright=r}),new f("http://www.w3.org/ns/ttml#styling textEmphasis",function(e,t,n,r){}),new f("http://www.w3.org/ns/ttml#styling unicodeBidi",function(e,t,n,r){var i;i="bidiOverride"===r?"bidi-override":r,t.style.unicodeBidi=i}),new f("http://www.w3.org/ns/ttml#styling visibility",function(e,t,n,r){t.style.visibility=r}),new f("http://www.w3.org/ns/ttml#styling wrapOption",function(e,t,n,r){"wrap"===r?"preserve"===n.space?t.style.whiteSpace="pre-wrap":t.style.whiteSpace="normal":"preserve"===n.space?t.style.whiteSpace="pre":t.style.whiteSpace="noWrap"}),new f("http://www.w3.org/ns/ttml#styling writingMode",function(e,t,n,r){"lrtb"===r||"lr"===r||"rltb"===r||"rl"===r?t.style.writingMode="horizontal-tb":"tblr"===r?t.style.writingMode="vertical-lr":"tbrl"!==r&&"tb"!==r||(t.style.writingMode="vertical-rl")}),new f("http://www.w3.org/ns/ttml#styling zIndex",function(e,t,n,r){t.style.zIndex=r}),new f("http://www.w3.org/ns/ttml/profile/imsc1#styling forcedDisplay",function(e,t,n,r){e.displayForcedOnlyMode&&!1===r&&(t.style.visibility="hidden")})],h={},g=0;g<d.length;g++)h[d[g].qname]=d[g];var p="webkitRubyPosition"in window.getComputedStyle(document.documentElement),m=p?"webkitRubyPosition":"rubyPosition",E="webkitTextEmphasisStyle"in window.getComputedStyle(document.documentElement)?"webkitTextEmphasisStyle":"textEmphasisStyle",T="webkitTextEmphasisPosition"in window.getComputedStyle(document.documentElement)?"webkitTextEmphasisPosition":"textEmphasisPosition";function y(e,t){if(e&&e.error&&e.error(t))throw t}}(t,"undefined"==typeof imscNames?n(977):imscNames,"undefined"==typeof imscStyles?n(1219):imscStyles,"undefined"==typeof imscUtils?n(6404):imscUtils)},8905:function(e,t,n){!function(e,t,n,r){e.generateISD=function(e,t,r){var i,o=new u(e),s={},l={},c=e.head.styling.initials[n.byName.showBackground.qname],f=e.head.styling.initials[n.byName.backgroundColor.qname];for(var d in e.head.layout.regions)if(e.head.layout.regions.hasOwnProperty(d)){var h=e.head.layout.regions[d],g=h.styleAttrs[n.byName.showBackground.qname]||c,p=h.styleAttrs[n.byName.backgroundColor.qname]||f;
vendor: 5,008 bytes, line 2
2l[h.id]=("always"===g||void 0===g)&&void 0!==p&&!(t<h.begin||t>=h.end)}for(var m in e.body&&e.body.regionID&&(l[e.body.regionID]=!0),i=null!==e.body?function e(t,n){if(n.contents){var r={};for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i]);return r.contents=[],n.contents.filter(function(e){return!(t<e.begin||t>=e.end)}).forEach(function(n){var i=e(t,n);i.regionID&&(l[i.regionID]=!0),null!==i&&r.contents.push(i)}),r}return n}(t,e.body):null,void 0!==l[""]&&(l[""]=!0),l)if(l[m]){var E=a(e,t,e.head.layout.regions[m],i,null,"",e.head.layout.regions[m],r,s);null!==E&&o.contents.push(E.element)}return o};var i=[n.byName.color.qname,n.byName.textCombine.qname,n.byName.textDecoration.qname,n.byName.textEmphasis.qname,n.byName.textOutline.qname,n.byName.textShadow.qname];function a(e,t,u,f,d,h,g,p,m){if(t<g.begin||t>=g.end)return null;var E="regionID"in g&&""!==g.regionID?g.regionID:h;if(null!==d&&E!==u.id&&(!("contents"in g)||"contents"in g&&0===g.contents.length||""!==E))return null;var T=new l(g);if("sets"in g)for(var y=0;y<g.sets.length;y++)t<g.sets[y].begin||t>=g.sets[y].end||(T.styleAttrs[g.sets[y].qname]=g.sets[y].value);var _={};for(var S in T.styleAttrs)if(T.styleAttrs.hasOwnProperty(S)&&(_[S]=!0,"region"===T.kind&&S===n.byName.writingMode.qname&&!(n.byName.direction.qname in T.styleAttrs))){var I=T.styleAttrs[S];"lrtb"===I||"lr"===I?T.styleAttrs[n.byName.direction.qname]="ltr":"rltb"!==I&&"rl"!==I||(T.styleAttrs[n.byName.direction.qname]="rtl")}if(null!==d)for(var A=0;A<n.all.length;A++){var R=n.all[A];if(R.qname===n.byName.textDecoration.qname){var b=d.styleAttrs[R.qname],v=T.styleAttrs[R.qname],C=[];void 0===v?C=b:-1===v.indexOf("none")?((-1===v.indexOf("noUnderline")&&-1!==b.indexOf("underline")||-1!==v.indexOf("underline"))&&C.push("underline"),(-1===v.indexOf("noLineThrough")&&-1!==b.indexOf("lineThrough")||-1!==v.indexOf("lineThrough"))&&C.push("lineThrough"),(-1===v.indexOf("noOverline")&&-1!==b.indexOf("overline")||-1!==v.indexOf("overline"))&&C.push("overline")):C.push("none"),T.styleAttrs[R.qname]=C}else if(R.qname!==n.byName.fontSize.qname||R.qname in T.styleAttrs||"span"!==T.kind||"textContainer"!==T.styleAttrs[n.byName.ruby.qname])if(R.qname!==n.byName.fontSize.qname||R.qname in T.styleAttrs||"span"!==T.kind||"text"!==T.styleAttrs[n.byName.ruby.qname])R.inherit&&R.qname in d.styleAttrs&&!(R.qname in T.styleAttrs)&&(T.styleAttrs[R.qname]=d.styleAttrs[R.qname]);else{var N=d.styleAttrs[n.byName.fontSize.qname];"textContainer"===d.styleAttrs[n.byName.ruby.qname]?T.styleAttrs[R.qname]=N:T.styleAttrs[R.qname]=new r.ComputedLength(.5*N.rw,.5*N.rh)}else{var D=d.styleAttrs[n.byName.fontSize.qname];T.styleAttrs[R.qname]=new r.ComputedLength(.5*D.rw,.5*D.rh)}}for(var w=0;w<n.all.length;w++){var M=n.all[w];if(!(M.qname in T.styleAttrs)&&!(M.qname===n.byName.position.qname&&n.byName.origin.qname in T.styleAttrs||M.qname===n.byName.origin.qname&&n.byName.position.qname in T.styleAttrs)){var P=e.head.styling.initials[M.qname]||M.initial;if(null!==P&&("region"===T.kind||!1===M.inherit&&null!==P)){var O=M.parse(P);null!==O?(T.styleAttrs[M.qname]=O,_[M.qname]=!0):c(p,"Invalid initial value for '"+M.qname+"' on element '"+T.kind)}}}for(var L=0;L<n.all.length;L++){var U=n.all[L];if(U.qname in _&&null!==U.compute){var x=U.compute(e,d,T,T.styleAttrs[U.qname],m);null!==x?T.styleAttrs[U.qname]=x:(T.styleAttrs[U.qname]=U.compute(e,d,T,U.parse(U.initial),m),c(p,"Style '"+U.qname+"' on element '"+T.kind+"' cannot be computed"))}}if("none"===T.styleAttrs[n.byName.display.qname])return null;var F=null;null===d?F=null===f?[]:[f]:"contents"in g&&(F=g.contents);for(var k=0;null!==F&&k<F.length;k++){var B=a(e,t,u,f,T,E,F[k],p,m);null!==B&&T.contents.push(B.element)}for(var H in T.styleAttrs)if(T.styleAttrs.hasOwnProperty(H)){var G=!1;if("span"===T.kind){var Y=T.styleAttrs[n.byName.ruby.qname];(G=("container"===Y||"textContainer"===Y||"baseContainer"===Y)&&-1!==i.indexOf(H))||(G="container"!==Y&&H===n.byName.rubyAlign.qname),G||(G=!("textContainer"===Y||"text"===Y)&&H===n.byName.rubyPosition.qname)}if(!G){var V=n.byQName[H];"applies"in V&&(G=-1===V.applies.indexOf(T.kind))}G&&delete T.styleAttrs[H]}var q=T.styleAttrs[n.byName.ruby.qname];if("p"===T.kind||"span"===T.kind&&("textContainer"===q||"text"===q)){var K=[];o(T,K),function(e){for(var t,n=0;n<e.length;)if("br"!==(t=e[n]).kind&&"preserve"!==t.space){var r=t.text.replace(/[\t\r\n ]+/g," ");/^[ ]/.test(r)&&(0===n||"br"===(i=e[n-1]).kind||/[\r\n\t ]$/.test(i.text))&&(r=r.substring(1)),t.text=r,0===r.length?e.splice(n,1):n++}else n++;var i,a;for(n=0;n<e.length;n++)"br"!==(t=e[n]).kind&&"preserve"!==t.space?/[ ]$/.test(t.text)&&(n===e.length-1||"br"===(a=e[n+1]).kind||"preserve"===a.space&&/^[\r\n]/.test(a.text))&&(t.text=t.text.slice(0,-1)):n++}(K),s(T)}return"div"===T.kind&&n.byName.backgroundImage.qname in T.styleAttrs||"br"===T.kind||"image"===T.kind||"contents"in T&&T.contents.length>0||"span"===T.kind&&null!==T.text||"region"===T.kind&&"always"===T.styleAttrs[n.byName.showBackgroun
vendor: 4,084 bytes, line 2
2d.qname]?{region_id:E,element:T}:null}function o(e,t){if("contents"in e)for(var r=0;r<e.contents.length;r++){var i=e.contents[r],a=i.styleAttrs[n.byName.ruby.qname];("span"!==i.kind||"textContainer"!==a&&"text"!==a)&&("contents"in i?o(i,t):("span"===i.kind&&0!==i.text.length||"br"===i.kind)&&t.push(i))}}function s(e){if("br"===e.kind)return!1;if("text"in e)return 0===e.text.length;if("contents"in e){for(var t=e.contents.length;t--;)s(e.contents[t])&&e.contents.splice(t,1);return 0===e.contents.length}}function u(e){this.contents=[],this.aspectRatio=e.aspectRatio,this.lang=e.lang}function l(e){for(var t in this.kind=e.kind||"region",this.lang=e.lang,e.id&&(this.id=e.id),this.styleAttrs={},e.styleAttrs)e.styleAttrs.hasOwnProperty(t)&&(this.styleAttrs[t]=e.styleAttrs[t]);"src"in e&&(this.src=e.src),"type"in e&&(this.type=e.type),"text"in e?this.text=e.text:("region"===this.kind||"contents"in e)&&(this.contents=[]),"space"in e&&(this.space=e.space)}function c(e,t){if(e&&e.error&&e.error(t))throw t}}(t,"undefined"==typeof imscNames?n(977):imscNames,"undefined"==typeof imscStyles?n(1219):imscStyles,"undefined"==typeof imscUtils?n(6404):imscUtils)},7640:function(e,t,n){t.generateISD=n(8905).generateISD,t.fromXML=n(6739).fromXML,t.renderHTML=n(1612).render},977:function(e,t){!function(e){e.ns_tt="http://www.w3.org/ns/ttml",e.ns_tts="http://www.w3.org/ns/ttml#styling",e.ns_ttp="http://www.w3.org/ns/ttml#parameter",e.ns_xml="http://www.w3.org/XML/1998/namespace",e.ns_itts="http://www.w3.org/ns/ttml/profile/imsc1#styling",e.ns_ittp="http://www.w3.org/ns/ttml/profile/imsc1#parameter",e.ns_smpte="http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt",e.ns_ebutts="urn:ebu:tt:style"}(t)},1219:function(e,t,n){!function(e,t,n){function r(e,t,n,r,i,a,o,s){this.name=t,this.ns=e,this.qname=e+" "+t,this.inherit=i,this.animatable=a,this.initial=n,this.applies=r,this.parse=o,this.compute=s}for(var i in e.all=[new r(t.ns_tts,"backgroundColor","transparent",["body","div","p","region","span"],!1,!0,n.parseColor,null),new r(t.ns_tts,"color","white",["span"],!0,!0,n.parseColor,null),new r(t.ns_tts,"direction","ltr",["p","span"],!0,!0,function(e){return e},null),new r(t.ns_tts,"display","auto",["body","div","p","region","span"],!1,!0,function(e){return e},null),new r(t.ns_tts,"displayAlign","before",["region"],!1,!0,function(e){return e},null),new r(t.ns_tts,"extent","auto",["tt","region"],!1,!0,function(e){if("auto"===e)return e;var t=e.split(" ");if(2!==t.length)return null;var r=n.parseLength(t[0]),i=n.parseLength(t[1]);return i&&r?{h:i,w:r}:null},function(e,t,r,i,a){var o,s;if("auto"===i)o=new n.ComputedLength(0,1);else if(null===(o=n.toComputedLength(i.h.value,i.h.unit,null,e.dimensions.h,null,e.pxLength.h)))return null;if("auto"===i)s=new n.ComputedLength(1,0);else if(null===(s=n.toComputedLength(i.w.value,i.w.unit,null,e.dimensions.w,null,e.pxLength.w)))return null;return{h:o,w:s}}),new r(t.ns_tts,"fontFamily","default",["span","p"],!0,!0,function(e){for(var t=e.split(","),n=[],r=0;r<t.length;r++)t[r]=t[r].trim(),"'"!==t[r].charAt(0)&&'"'!==t[r].charAt(0)&&"default"===t[r]?n.push("monospaceSerif"):n.push(t[r]);return n},null),new r(t.ns_tts,"shear","0%",["p"],!0,!0,n.parseLength,function(e,t,n,r){return"%"!==r.unit?null:Math.abs(r.value)>100?100*Math.sign(r.value):r.value}),new r(t.ns_tts,"fontSize","1c",["span","p"],!0,!0,n.parseLength,function(t,r,i,a,o){return n.toComputedLength(a.value,a.unit,null!==r?r.styleAttrs[e.byName.fontSize.qname]:t.cellLength.h,null!==r?r.styleAttrs[e.byName.fontSize.qname]:t.cellLength.h,t.cellLength.h,t.pxLength.h)}),new r(t.ns_tts,"fontStyle","normal",["span","p"],!0,!0,function(e){return e},null),new r(t.ns_tts,"fontWeight","normal",["span","p"],!0,!0,function(e){return e},null),new r(t.ns_tts,"lineHeight","normal",["p"],!0,!0,function(e){return"normal"===e?e:n.parseLength(e)},function(t,r,i,a,o){var s;if("normal"===a)s=a;else if(null===(s=n.toComputedLength(a.value,a.unit,i.styleAttrs[e.byName.fontSize.qname],i.styleAttrs[e.byName.fontSize.qname],t.cellLength.h,t.pxLength.h)))return null;return s}
2),new r(t.ns_tts,"opacity",1,["region"],!1,!0,parseFloat,null),new r(t.ns_tts,"origin","auto",["region"],!1,!0,function(e){if("auto"===e)return e;var t=e.split(" ");if(2!==t.length)return null;var r=n.parseLength(t[0]),i=n.parseLength(t[1]);return i&&r?{h:i,w:r}:null},function(e,t,r,i,a){var o,s;if("auto"===i)o=new n.ComputedLength(0,0);else if(null===(o=n.toComputedLength(i.h.value,i.h.unit,null,e.dimensions.h,null,e.pxLength.h)))return null;if("auto"===i)s=new n.ComputedLength(0,0);else if(null===(s=n.toComputedLength(i.w.value,i.w.unit,null,e.dimensions.w,null,e.pxLength.w)))return null;return{h:o,w:s}}),new r(t.ns_tts,"overflow","hidden",["region"],!1,!0,function(e){return e},null),new r(t.ns_tts,"padding","0px",["region"],!1,!0,function(e){var t=e.split(" ");if(t.length>4)return null;for(var r=[],i=0;i<t.length;i++){var a=n.parseLength(t[i]);if(!a)return null;r.push(a)}return r},function(t,r,i,a,o){var s;if(1===a.length)s=[a[0],a[0],a[0],a[0]];else if(2===a.length)s=[a[0],a[1],a[0],a[1]];else if(3===a.length)s=[a[0],a[1],a[2],a[1]];else{if(4!==a.length)return null;s=[a[0],a[1],a[2],a[3]]}var u=i.styleAttrs[e.byName.writingMode.qname];if("lrtb"===u||"lr"===u)s=[s[0],s[3],s[2],s[1]];else if("rltb"===u||"rl"===u)s=[s[0],s[1],s[2],s[3]];else if("tblr"===u)s=[s[3],s[0],s[1],s[2]];else{if("tbrl"!==u&&"tb"!==u)return null;s=[s[3],s[2],s[1],s[0]]}for(var l=[],c=0;c<s.length;c++)if(0===s[c].value)l[c]=new n.ComputedLength(0,0);else if(l[c]=n.toComputedLength(s[c].value,s[c].unit,i.styleAttrs[e.byName.fontSize.qname],0===c||2===c?i.styleAttrs[e.byName.extent.qname].h:i.styleAttrs[e.byName.extent.qname].w,0===c||2===c?t.cellLength.h:t.cellLength.w,0===c||2===c?t.pxLength.h:t.pxLength.w),null===l[c])return null;return l}),new r(t.ns_tts,"position","top left",["region"],!1,!0,function(e){return n.parsePosition(e)},function(t,r,i,a){var o,s;return null===(o=n.toComputedLength(a.v.offset.value,a.v.offset.unit,null,new n.ComputedLength(-i.styleAttrs[e.byName.extent.qname].h.rw,t.dimensions.h.rh-i.styleAttrs[e.byName.extent.qname].h.rh),null,t.pxLength.h))?null:("bottom"===a.v.edge&&(o=new n.ComputedLength(-o.rw-i.styleAttrs[e.byName.extent.qname].h.rw,t.dimensions.h.rh-o.rh-i.styleAttrs[e.byName.extent.qname].h.rh)),s=n.toComputedLength(a.h.offset.value,a.h.offset.unit,null,new n.ComputedLength(t.dimensions.w.rw-i.styleAttrs[e.byName.extent.qname].w.rw,-i.styleAttrs[e.byName.extent.qname].w.rh),null,t.pxLength.w),null===o?null:("right"===a.h.edge&&(s=new n.ComputedLength(t.dimensions.w.rw-s.rw-i.styleAttrs[e.byName.extent.qname].w.rw,-s.rh-i.styleAttrs[e.byName.extent.qname].w.rh)),{h:o,w:s}))}),new r(t.ns_tts,"ruby","none",["span"],!1,!0,function(e){return e},null),new r(t.ns_tts,"rubyAlign","center",["span"],!0,!0,function(e){return"center"!==e&&"spaceAround"!==e?null:e},null),new r(t.ns_tts,"rubyPosition","outside",["span"],!0,!0,function(e){return e},null),new r(t.ns_tts,"rubyReserve","none",["p"],!0,!0,function(e){var t=e.split(" "),r=[null,null];if(0===t.length||t.length>2)return null;if("none"!==t[0]&&"both"!==t[0]&&"after"!==t[0]&&"before"!==t[0]&&"outside"!==t[0])return null;if(r[0]=t[0],2===t.length&&"none"!==t[0]){var i=n.parseLength(t[1]);if(!i)return null;r[1]=i}return r},function(t,r,i,a,o){return"none"===a[0]?a:null===(s=null===a[1]?new n.ComputedLength(.5*i.styleAttrs[e.byName.fontSize.qname].rw,.5*i.styleAttrs[e.byName.fontSize.qname].rh):n.toComputedLength(a[1].value,a[1].unit,i.styleAttrs[e.byName.fontSize.qname],i.styleAttrs[e.byName.fontSize.qname],t.cellLength.h,t.pxLength.h))?null:[a[0],s];var s}),new r(t.ns_tts,"showBackground","always",["region"],!1,!0,function(e){return e},null),new r(t.ns_tts,"textAlign","start",["p"],!0,!0,function(e){return e},function(e,t,n,r,i){return"left"===r?"start":"right"===r?"end":r}),new r(t.ns_tts,"textCombine","none",["span"],!0,!0,function(e){return"none"===e||"all"===e?e:null},null),new r(t.ns_tts,"textDecoration","none",["span"],!0,!0,function(e){return e.split(" ")},null),new r(t.ns_tts,"textEmphasis","none",["span"],!0,!0,function(e){for(var t=e.split(" "),r={style:null,symbol:null,color:null,position:null},i=0;i<t.length;i++)if("none"===t[i]||"auto"===t[i])r.style=t[i];else if("filled"===t[i]||"open"===t[i])r.style=t[i];else if("circle"===t[i]||"dot"===t[i]||"sesame"===t[i])r.symbol=t[i];else if("current"===t[i])r.color=t[i];else if("outside"===t[i]||"before"===t[i]||"after"===t[i])r.position=t[i];else if(r.color=n.parseColor(t[i]),null===r.color)return null;return null==r.style&&null==r.symbol?r.style="auto":(r.symbol=r.symbol||"circle",r.style=r.style||"filled"),r.position=r.position||"outside",r.color=r.color||"current",r},null),new r(t.ns_tts,"textOutline","none",["span"],!0,!0,function(e){if("none"===e)return e;var t={},r=e.split(" ");if(0===r.length||r.length>2)return null;var i=n.parseColor(r[0]);if(t.color=i,null!==i&&r.shift(),1!==r.length)return null;var a=n.parseLength(r[0]);return a?(t.thickness=a,t):null},function(t,r,i,a,o){if("none"===a)return a;var s={};return null===a.color?s.color=i.styleAttrs[e.byName.color.qname]:s.color=a.color,s.thickness=n.toComputedLength(a.thickness.value,a.thickness.unit,i.styleAttrs[e.byName.fontSize.qname],i.styleAttrs[e.byName.fontSize.qname],t.cellLength.h,t.pxLength.h),null===s.thickness?null:s}),new r(t.ns_tts,"textShadow","none",["span"],!0,!0,n.parseTextShadow,function(t,r,i,a){if("none"===a)return a;for(var o=[],s=0;s<a.length;s++){var u={};if(u.x_off=n.toComputedLength(a[s][0].value,a[s][0].unit,null,i.styleAttrs[e.byName.fontSize.qname],null,t.pxLength.w),null===u.x_off)return null;if(u.y_off=n.toComputedLength(a[s][1].value,a[s][1].unit,null,i.styleAttrs[e.byName.fontSize.qname],null,t.pxLength.h),null===u.y_off)return null;if(null===a[s][2])u.b_radius=0;else if(u.b_radius=n.toComputedLength(a[s][2].value,a[s][2].unit,null,i.styleAttrs[e.byName.fontSize.qname],null,t.pxLength.h),null===u.b_radius)return null;null===a[s][3]?u.color=i.styleAttrs[e.byName.color.qname]:u.color=a[s][3],o.push(u)}return o}
vendor: 10,336 bytes, line 2
2),new r(t.ns_tts,"unicodeBidi","normal",["span","p"],!1,!0,function(e){return e},null),new r(t.ns_tts,"visibility","visible",["body","div","p","region","span"],!0,!0,function(e){return e},null),new r(t.ns_tts,"wrapOption","wrap",["span"],!0,!0,function(e){return e},null),new r(t.ns_tts,"writingMode","lrtb",["region"],!1,!0,function(e){return e},null),new r(t.ns_tts,"zIndex","auto",["region"],!1,!0,function(e){var t;return"auto"===e?t=e:(t=parseInt(e),isNaN(t)&&(t=null)),t},null),new r(t.ns_ebutts,"linePadding","0c",["p"],!0,!1,n.parseLength,function(e,t,r,i,a){return n.toComputedLength(i.value,i.unit,null,null,e.cellLength.w,null)}),new r(t.ns_ebutts,"multiRowAlign","auto",["p"],!0,!1,function(e){return e},null),new r(t.ns_smpte,"backgroundImage",null,["div"],!1,!1,function(e){return e},null),new r(t.ns_itts,"forcedDisplay","false",["body","div","p","region","span"],!0,!0,function(e){return"true"===e},null),new r(t.ns_itts,"fillLineGap","false",["p"],!0,!0,function(e){return"true"===e},null)],e.byQName={},e.all)e.byQName[e.all[i].qname]=e.all[i];for(var a in e.byName={},e.all)e.byName[e.all[a].name]=e.all[a]}(t,"undefined"==typeof imscNames?n(977):imscNames,"undefined"==typeof imscUtils?n(6404):imscUtils)},6404:function(e,t){!function(e){var t=/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?/,n=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,r=/rgba\(\s*(\d+),\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,i={transparent:[0,0,0,0],black:[0,0,0,255],silver:[192,192,192,255],gray:[128,128,128,255],white:[255,255,255,255],maroon:[128,0,0,255],red:[255,0,0,255],purple:[128,0,128,255],fuchsia:[255,0,255,255],magenta:[255,0,255,255],green:[0,128,0,255],lime:[0,255,0,255],olive:[128,128,0,255],yellow:[255,255,0,255],navy:[0,0,128,255],blue:[0,0,255,255],teal:[0,128,128,255],aqua:[0,255,255,255],cyan:[0,255,255,255]};e.parseColor=function(e){var a,o=null,s=i[e.toLowerCase()];return void 0!==s?o=s:null!==(a=t.exec(e))?o=[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16),void 0!==a[4]?parseInt(a[4],16):255]:null!==(a=n.exec(e))?o=[parseInt(a[1]),parseInt(a[2]),parseInt(a[3]),255]:null!==(a=r.exec(e))&&(o=[parseInt(a[1]),parseInt(a[2]),parseInt(a[3]),parseInt(a[4])]),o};var a=/^((?:\+|\-)?\d*(?:\.\d+)?)(px|em|c|%|rh|rw)$/;e.parseLength=function(e){var t,n=null;return null!==(t=a.exec(e))&&(n={value:parseFloat(t[1]),unit:t[2]}),n},e.parseTextShadow=function(t){for(var n=t.match(/([^\(,\)]|\([^\)]+\))+/g),r=[],i=0;i<n.length;i++){var a=n[i].split(" ");if(1===a.length&&"none"===a[0])return"none";if(a.length>1&&a.length<5){var o=[null,null,null,null],s=e.parseLength(a.shift());if(null===s)return null;if(o[0]=s,null===(s=e.parseLength(a.shift())))return null;if(o[1]=s,0===a.length){r.push(o);continue}if(null!==(s=e.parseLength(a[0]))&&(o[2]=s,a.shift()),0===a.length){r.push(o);continue}var u=e.parseColor(a[0]);if(null===u)return null;o[3]=u,r.push(o)}}return r},e.parsePosition=function(t){var n=t.split(" "),r=function(e){return"center"===e||"left"===e||"top"===e||"bottom"===e||"right"===e};if(n.length>4)return null;for(var i=0;i<n.length;i++)if(!r(n[i])){var a=e.parseLength(n[i]);if(null===a)return null;n[i]=a}for(var o={h:{edge:"left",offset:{value:50,unit:"%"}},v:{edge:"top",offset:{value:50,unit:"%"}}},s=0;s<n.length;){var u=n[s++];if(r(u)){var l={value:0,unit:"%"};2!==n.length&&s<n.length&&!r(n[s])&&(l=n[s++]),"right"===u?(o.h.edge=u,o.h.offset=l):"bottom"===u?(o.v.edge=u,o.v.offset=l):"left"===u?o.h.offset=l:"top"===u&&(o.v.offset=l)}else{if(1!==n.length&&2!==n.length)return null;1===s?o.h.offset=u:o.v.offset=u}}return o},e.ComputedLength=function(e,t){this.rw=e,this.rh=t},e.ComputedLength.prototype.toUsedLength=function(e,t){return e*this.rw+t*this.rh},e.ComputedLength.prototype.isZero=function(){return 0===this.rw&&0===this.rh},e.toComputedLength=function(t,n,r,i,a,o){return"%"===n&&i?new e.ComputedLength(i.rw*t/100,i.rh*t/100):"em"===n&&r?new e.ComputedLength(r.rw*t,r.rh*t):"c"===n&&a?new e.ComputedLength(t*a.rw,t*a.rh):"px"===n&&o?new e.ComputedLength(t*o.rw,t*o.rh):"rh"===n?new e.ComputedLength(0,t/100):"rw"===n?new e.ComputedLength(t/100,0):null}}(t)},7523:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},3282:function(e){function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(a===s-1||1===o);else if(a!==s-1&&2===o){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var u=r.lastIndexOf("/");if(u!==r.length-1){-1===u?(r="",i=0):i=(r=r.slice(0,u)).length-1-r.lastIndexOf("/"),a=s,o=0;continue}}else if(2===r.length||1===r.length){r="",i=0,a=s,o=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1;a=s,o=0}else 46===n&&-1!==o?++o:o=-1}return r}var r={resolve:function(){for(var e,r="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(void 0===e&&(e=process.cwd()),o=e),t(o),0!==o.length&&(r=o+"/"+r,i=47===o.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var a=e.length,o=a-i,s=1;s<n.length&&47===n.charCodeAt(s);++s);for(var u=n.length-s,l=o<u?o:u,c=-1,f=0;f<=l;++f){if(f===l){if(u>l){if(47===n.charCodeAt(s+f))return n.slice(s+f+1);if(0===f)return n.slice(s+f)}else o>l&&(47===e.charCodeAt(i+f)?c=f:0===f&&(c=0));break}var d=e.charCodeAt(i+f);if(d!==n.charCodeAt(s+f))break;47===d&&(c=f)}var h="";for(f=i+c+1;f<=a;++f)f!==a&&47!==e.charCodeAt(f)||(0===h.length?h+="..":h+="/..");return h.length>0?h+n.slice(s+c):(s+=c,47===n.charCodeAt(s)&&++s,n.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,a=!0,o=e.length-1;o>=1;--o)if(47===(n=e.charCodeAt(o))){if(!a){i=o;break}}else a=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,i=0,a=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var s=n.length-1,u=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(47===l){if(!o){i=r+1;break}}else-1===u&&(o=!1,u=r+1),s>=0&&(l===n.charCodeAt(s)?-1==--s&&(a=r):(s=-1,a=u))}return i===a?a=u:-1===a&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!o){i=r+1;break}}else-1===a&&(o=!1,a=r+1);return-1===a?"":e.slice(i,a)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var u=e.charCodeAt(s);if(47!==u)-1===i&&(a=!1,i=s+1),46===u?-1===n?n=s:1!==o&&(o=1):-1!==n&&(o=-1);else if(!a){r=s+1;break}}return-1===n||-1===i||0===o||1===o&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,i=e.charCodeAt(0),a=47===i;a?(n.root="/",r=1):r=0;for(var o=-1,s=0,u=-1,l=!0,c=e.length-1,f=0;c>=r;--c)if(47!==(i=e.charCodeAt(c)))-1===u&&(l=!1,u=c+1),46===i?-1===o?o=c:1!==f&&(f=1):-1!==o&&(f=-1);else if(!l){s=c+1;break}return-1===o||-1===u||0===f||1===f&&o===u-1&&o===s+1?-1!==u&&(n.base=n.name=0===s&&a?e.slice(1,u):e.slice(s,u)):(0===s&&a?(n.name=e.slice(1,o),n.base=e.slice(1,u)):(n.name=e.slice(s,o),n.base=e.slice(s,u)),n.ext=e.slice(o,u)),s>0?n.dir=e.slice(0,s-1):a&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r},3515:function(e,t,n){e.exports=i;var r=n(9826).EventEmitter;function i(){r.call(this)}n(7523)(i,r),i.Readable=n(2762),i.Writable=n(3726),i.Duplex=n(884),i.Transform=n(6756),i.PassThrough=n(1390),i.finished=n(2896),i.pipeline=n(8460),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",a),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",u));var o=!1;function s(){o||(o=!0,e.end())}function u(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(c(),0===r.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",i),e.removeListener("drain",a),n.removeListener("end",s),n.removeListener("close",u),n.removeListener("error",l),e.removeListener("error",l),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",l),e.on("error",l),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e}},1602:function(e){var t={};function n(e,n,r){r||(r=Error);var i=function(e){var t,r;function i(t,r,i){return e.call(this,function(e,t,r){return"string"==typeof n?n:n(e,t,r)}(t,r,i))||this}return r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r,i}(r);i.prototype.name=r.name,i.prototype.code=e,t[e]=i}function r(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map(function(e){return String(e)}),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invali
2d for option "'+e+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(e,t,n){var i,a,o,s;if("string"==typeof t&&"not "===t.substr(0,4)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length)," argument"===e.substring(n-9,n)}(e))a="The ".concat(e," ").concat(i," ").concat(r(t,"type"));else{var u=("number"!=typeof s&&(s=0),s+1>(o=e).length||-1===o.indexOf(".",s)?"argument":"property");a='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(r(t,"type"))}return a+". Received type ".concat(typeof n)},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=t},884:function(e,t,n){var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=l;var i=n(2762),a=n(3726);n(7523)(l,i);for(var o=r(a.prototype),s=0;s<o.length;s++){var u=o[s];l.prototype[u]||(l.prototype[u]=a.prototype[u])}function l(e){if(!(this instanceof l))return new l(e);i.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",c)))}function c(){this._writableState.ended||process.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},1390:function(e,t,n){e.exports=i;var r=n(6756);function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}n(7523)(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},2762:function(e,t,n){var r;e.exports=R,R.ReadableState=A,n(9826).EventEmitter;var i,a=function(e,t){return e.listeners(t).length},o=n(2611),s=n(44).Buffer,u=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},l=n(7199);i=l&&l.debuglog?l.debuglog("stream"):function(){};var c,f,d,h=n(3791),g=n(2410),p=n(1749).getHighWaterMark,m=n(1602).codes,E=m.ERR_INVALID_ARG_TYPE,T=m.ERR_STREAM_PUSH_AFTER_EOF,y=m.ERR_METHOD_NOT_IMPLEMENTED,_=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(7523)(R,o);var S=g.errorOrDestroy,I=["error","close","destroy","pause","resume"];function A(e,t,i){r=r||n(884),e=e||{},"boolean"!=typeof i&&(i=t instanceof r),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=p(this,e,"readableHighWaterMark",i),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(c||(c=n(748).StringDecoder),this.decoder=new c(e.encoding),this.encoding=e.encoding)}function R(e){if(r=r||n(884),!(this instanceof R))return new R(e);var t=this instanceof r;this._readableState=new A(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),o.call(this)}function b(e,t,n,r,a){i("readableAddChunk",t);var o,l=e._readableState;if(null===t)l.reading=!1,function(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?D(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,w(e)))}}(e,l);else if(a||(o=function(e,t){var n,r;return r=t,s.isBuffer(r)||r instanceof u||"string"==typeof t||void 0===t||e.objectMode||(n=new E("chunk",["string","Buffer","Uint8Array"],t)),n}(l,t)),o)S(e,o);else if(l.objectMode||t&&t.length>0)if("string"==typeof t||l.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r)l.endEmitted?S(e,new _):v(e,l,t,!0);else if(l.ended)S(e,new T);else{if(l.destroyed)return!1;l.reading=!1,l.decoder&&!n?(t=l.decoder.write(t),l.objectMode||0!==t.length?v(e,l,t,!1):M(e,l)):v(e,l,t,!1)}else r||(l.reading=!1,M(e,l));return!l.ended&&(l.length<l.highWaterMark||0===l.length)}function v(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&D(e)),M(e,t)}Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),R.prototype.destroy=g.destroy,R.prototype._undestroy=g.undestroy,R.prototype._destroy=function(e,t){t(e)},R.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=s.from(e,t),t=""),n=!0),b(this,e,t,!1,n)},R.prototype.unshift=function(e){return b(this,e,null,!0,!1)},R.prototype.isPaused=function(){return!1===this._readableState.flowing},R.prototype.setEncoding=function(e){c||(c=n(748).StringDecoder);var t=new c(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;
vendor: 4,772 bytes, line 2
2for(var r=this._readableState.buffer.head,i="";null!==r;)i+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var C=1073741824;function N(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=C?e=C:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function D(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(w,e))}function w(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,x(e)}function M(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(i("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function O(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function L(e){i("readable nexttick read 0"),e.read(0)}function U(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),x(e),t.flowing&&!t.reading&&e.read(0)}function x(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function F(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function k(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(B,t,e))}function B(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function H(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}R.prototype.read=function(e){i("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return i("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?k(this):D(this),null;if(0===(e=N(e,t))&&t.ended)return 0===t.length&&k(this),null;var r,a=t.needReadable;return i("need readable",a),(0===t.length||t.length-e<t.highWaterMark)&&i("length less than watermark",a=!0),t.ended||t.reading?i("reading or ended",a=!1):a&&(i("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=N(n,t))),null===(r=e>0?F(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&k(this)),null!==r&&this.emit("data",r),r},R.prototype._read=function(e){S(this,new y("_read()"))},R.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,i("pipe count=%d opts=%j",r.pipesCount,t);var o=t&&!1===t.end||e===process.stdout||e===process.stderr?g:s;function s(){i("onend"),e.end()}r.endEmitted?process.nextTick(o):n.once("end",o),e.on("unpipe",function t(a,o){i("onunpipe"),a===n&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,i("cleanup"),e.removeListener("close",d),e.removeListener("finish",h),e.removeListener("drain",u),e.removeListener("error",f),e.removeListener("unpipe",t),n.removeListener("end",s),n.removeListener("end",g),n.removeListener("data",c),l=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||u())});var u=function(e){return function(){var t=e._readableState;i("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,x(e))}}(n);e.on("drain",u);var l=!1;function c(t){i("ondata");var a=e.write(t);i("dest.write",a),!1===a&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==H(r.pipes,e))&&!l&&(i("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function f(t){i("onerror",t),g(),e.removeListener("error",f),0===a(e,"error")&&S(e,t)}function d(){e.removeListener("finish",h),g()}function h(){i("onfinish"),e.removeListener("close",d),g()}function g(){i("unpipe"),n.unpipe(e)}return n.on("data",c),function(e,t,n){if("function"==typeof e.prependListener)return e.prepe
vendor: 5,858 bytes, line 2
2ndListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",f),e.once("close",d),e.once("finish",h),e.emit("pipe",n),r.flowing||(i("pipe resume"),n.resume()),e},R.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)r[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=H(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},R.prototype.on=function(e,t){var n=o.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,i("on readable",r.length,r.reading),r.length?D(this):r.reading||process.nextTick(L,this))),n},R.prototype.addListener=R.prototype.on,R.prototype.removeListener=function(e,t){var n=o.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(O,this),n},R.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(O,this),t},R.prototype.resume=function(){var e=this._readableState;return e.flowing||(i("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(U,e,t))}(this,e)),e.paused=!1,this},R.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},R.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var a in e.on("end",function(){if(i("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(a){i("wrapped data"),n.decoder&&(a=n.decoder.write(a)),n.objectMode&&null==a||(n.objectMode||a&&a.length)&&(t.push(a)||(r=!0,e.pause()))}),e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));for(var o=0;o<I.length;o++)e.on(I[o],this.emit.bind(this,I[o]));return this._read=function(t){i("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(R.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=n(5857)),f(this)}),Object.defineProperty(R.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(R.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(R.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),R._fromList=F,Object.defineProperty(R.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(R.from=function(e,t){return void 0===d&&(d=n(3411)),d(R,e,t)})},6756:function(e,t,n){e.exports=c;var r=n(1602).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,a=r.ERR_MULTIPLE_CALLBACK,o=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,u=n(884);function l(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new a);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function c(e){if(!(this instanceof c))return new c(e);u.call(this,e),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush(function(t,n){d(e,t,n)})}function d(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new s;if(e._transformState.transforming)throw new o;return e.push(null)}n(7523)(c,u),c.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},c.prototype._transform=function(e,t,n){n(new i("_transform()"))},c.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},c.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},c.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,function(e){t(e)})}},3726:function(e,t,n){function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t){var n=e.entry;for(e.entry=null;n;){var r=n.callback;t.pendingcb--,r(void 0),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var i;e.exports=R,R.WritableState=A;var a,o={deprecate:n(9e3)},s=n(2611),u=n(44).Buffer,l=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},c=n(2410),f=n(1749).getHighWaterMark,d=n(1602).codes,h=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENT
vendor: 7,643 bytes, line 2
2ED,p=d.ERR_MULTIPLE_CALLBACK,m=d.ERR_STREAM_CANNOT_PIPE,E=d.ERR_STREAM_DESTROYED,T=d.ERR_STREAM_NULL_VALUES,y=d.ERR_STREAM_WRITE_AFTER_END,_=d.ERR_UNKNOWN_ENCODING,S=c.errorOrDestroy;function I(){}function A(e,t,a){i=i||n(884),e=e||{},"boolean"!=typeof a&&(a=t instanceof i),this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=f(this,e,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===e.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if("function"!=typeof i)throw new p;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(process.nextTick(i,r),process.nextTick(w,e,t),e._writableState.errorEmitted=!0,S(e,r)):(i(r),e._writableState.errorEmitted=!0,S(e,r),w(e,t))}(e,n,r,t,i);else{var a=N(n)||e.destroyed;a||n.corked||n.bufferProcessing||!n.bufferedRequest||C(e,n),r?process.nextTick(v,e,n,a,i):v(e,n,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function R(e){var t=this instanceof(i=i||n(884));if(!t&&!a.call(R,this))return new R(e);this._writableState=new A(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),s.call(this)}function b(e,t,n,r,i,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new E("write")):n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function v(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),w(e,t)}function C(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var i=t.bufferedRequestCount,a=new Array(i),o=t.corkedRequestsFree;o.entry=n;for(var s=0,u=!0;n;)a[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;a.allBuffers=u,b(e,t,!0,t.length,a,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new r(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,f=n.callback;if(b(e,t,!1,t.objectMode?1:l.length,l,c,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function N(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function D(e,t){e._final(function(n){t.pendingcb--,n&&S(e,n),t.prefinished=!0,e.emit("prefinish"),w(e,t)})}function w(e,t){var n=N(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(D,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}n(7523)(R,s),A.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(A.prototype,"buffer",{get:o.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(R,Symbol.hasInstance,{value:function(e){return!!a.call(this,e)||this===R&&e&&e._writableState instanceof A}})):a=function(e){return e instanceof this},R.prototype.pipe=function(){S(this,new m)},R.prototype.write=function(e,t,n){var r,i=this._writableState,a=!1,o=!i.objectMode&&(r=e,u.isBuffer(r)||r instanceof l);return o&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=I),i.ending?function(e,t){var n=new y;S(e,n),process.nextTick(t,n)}(this,n):(o||function(e,t,n,r){var i;return null===n?i=new T:"string"==typeof n||t.objectMode||(i=new h("chunk",["string","Buffer"],n)),!i||(S(e,i),process.nextTick(r,i),!1)}(this,i,e,n))&&(i.pendingcb++,a=function(e,t,n,r,i,a){if(!n){var o=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,n)),t}(t,r,i);r!==o&&(n=!0,i="buffer",r=o)}var s=t.objectMode?1:r.length;t.length+=s;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:a,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else b(e,t,!1,s,r,i,a);return l}(this,i,o,e,t,n)),a},R.prototype.cork=function(){this._writableState.corked++},R.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||C(this,e))},R.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(R.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(R.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),R.prototype._write=function(e,t,n){n(new g("_write()"))},R.prototype._writev=null,R.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,w(e,t),n&&(t.finished?process.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(R.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),R.prototype.destroy=c.destroy,R.prototype._undestroy=c.undestroy,R.prototype._destroy=function(e,t){t(e)}},5857:function(e,t,n){var r;function i(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=n(2896),o=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),l=Symbol("ended"),c=Symbol("lastPromise"),f=Symbol("handlePromise"),d=Symbol("stream");function h(e,t){return{value:e,done:t}}function g(e){var t=e[o];if(null!==t){var n=e[d].read();null!==n&&(e[c]=null,e[o]=null,e[s]=null,t(h(n,!1)))}}function p(e){process.nextTick(g,e)}var m=Object.getPrototypeOf(function(){}
vendor: 13,494 bytes, line 2
2),E=Object.setPrototypeOf((i(r={get stream(){return this[d]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[l])return Promise.resolve(h(void 0,!0));if(this[d].destroyed)return new Promise(function(t,n){process.nextTick(function(){e[u]?n(e[u]):t(h(void 0,!0))})});var n,r=this[c];if(r)n=new Promise(function(e,t){return function(n,r){e.then(function(){t[l]?n(h(void 0,!0)):t[f](n,r)},r)}}(r,this));else{var i=this[d].read();if(null!==i)return Promise.resolve(h(i,!1));n=new Promise(this[f])}return this[c]=n,n}},Symbol.asyncIterator,function(){return this}),i(r,"return",function(){var e=this;return new Promise(function(t,n){e[d].destroy(null,function(e){e?n(e):t(h(void 0,!0))})})}),r),m);e.exports=function(e){var t,n=Object.create(E,(i(t={},d,{value:e,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,l,{value:e._readableState.endEmitted,writable:!0}),i(t,f,{value:function(e,t){var r=n[d].read();r?(n[c]=null,n[o]=null,n[s]=null,e(h(r,!1))):(n[o]=e,n[s]=t)},writable:!0}),t));return n[c]=null,a(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[s];return null!==t&&(n[c]=null,n[o]=null,n[s]=null,t(e)),void(n[u]=e)}var r=n[o];null!==r&&(n[c]=null,n[o]=null,n[s]=null,r(h(void 0,!0))),n[l]=!0}),e.on("readable",p.bind(null,n)),n}},3791:function(e,t,n){function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){a(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function a(e,t,n){return(t=o(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}var s=n(44).Buffer,u=n(3779).inspect,l=u&&u.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,n;return t=e,(n=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);for(var t,n,r,i=s.allocUnsafe(e>>>0),a=this.head,o=0;a;)t=a.data,n=i,r=o,s.prototype.copy.call(t,n,r),o+=a.data.length,a=a.next;return i}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,a=e>i.length?i.length:e;if(a===i.length?r+=i:r+=i.slice(0,e),0==(e-=a)){a===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0==(e-=a)){a===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(a));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return u(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},2410:function(e){function t(e,t){r(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function r(e,t){e.emit("error",t)}e.exports={destroy:function(e,i){var a=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(r,this,e)):process.nextTick(r,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!i&&e?a._writableState?a._writableState.errorEmitted?process.nextTick(n,a):(a._writableState.errorEmitted=!0,process.nextTick(t,a,e)):process.nextTick(t,a,e):i?(process.nextTick(n,a),i(e)):process.nextTick(n,a)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}},2896:function(e,t,n){var r=n(1602).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,n,a){if("function"==typeof n)return e(t,null,n);n||(n={}),a=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r)}}}(a||i);var o=n.readable||!1!==n.readable&&t.readable,s=n.writable||!1!==n.writable&&t.writable,u=function(){t.writable||c()},l=t._writableState&&t._writableState.finished,c=function(){s=!1,l=!0,o||a.call(t)},f=t._readableState&&t._readableState.endEmitted,d=function(){o=!1,f=!0,s||a.call(t)},h=function(e){a.call(t,e)},g=function(){var e;return o&&!f?(t._readableState&&t._readableState.ended||(e=new r),a.call(t,e)):s&&!l?(t._writableState&&t._writableState.ended||(e=new r),a.call(t,e)):void 0},p=function(){t.req.on("finish",c)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",c),t.on("abort",g),t.req?p():t.on("request",p)):s&&!t._writableState&&(t.on("end",u),t.on("close",u)),t.on("end",d),t.on("finish",c),!1!==n.error&&t.on("error",h),t.on("close",g),function(){t.removeListener("complete",c),t.removeListener("abort",g),t.removeListener("request",p),t.req&&t.req.removeListener("finish",c),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",c),t.removeListener("end",d),t.removeListener("error",h),t.removeListener("close",g)}}},3411:function(e){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},8460:function(e,t,n){var r,i=n(1602).codes,a=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function u(e){e()}function l(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var c,f=function(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new a("streams");var d=t.map(function(e,i){var a=i<t.length-1;return function(e,t,i,a){a=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(a);var s=!1;e.on("close",function(){s=!0}),void 0===r&&(r=n(2896)),r(e,{readable:t,writable:i},function(e){if(e)return a(e);s=!0,a()});var u=!1;return function(t){if(!s&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void a(t||new o("pipe"))}}(e,a,i>0,function(e){c||(c=e),e&&d.forEach(u),a||(d.forEach(u),f(c))})});return t.reduce(l)}},1749:function(e,t,n){var r=n(1602).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,i){var a=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,i,n);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new r(i?n:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}},2611:function(e,t,n){e.exports=n(9826).EventEmitter},748:function(e,t,n){var r=n(4598).Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=l,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=f,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function c(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},a.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},a.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=o(t[r]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--r<n||-2===i?0:(i=o(t[r]))>=0?(i>0&&(e.lastNeed=i-2),i):--r<n||-2===i?0:(i=o(t[r]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},4598:function(e,t,n){var r=n(44),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=o),a(i,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},9e3:function(e,t,n){function r(e){try{if(!n.g.localStorage)return!1}catch(e){return!1}var t=n.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}
2e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")||console.warn(t),n=!0}return e.apply(this,arguments)}}},3779:function(){},7199:function(){},5393:function(e,t,n){n.r(t),n.d(t,{Debug:function(){return a.default},FactoryMaker:function(){return i.default},MediaPlayer:function(){return r.default}});var r=n(9839),i=n(138),a=n(649),o=n(8986),s="undefined"!=typeof window&&window||globalThis,u=s.dashjs;u||(u=s.dashjs={}),u.MediaPlayer=r.default,u.FactoryMaker=i.default,u.Debug=a.default,u.Version=(0,o.getVersionString)(),t.default=u},8735:function(e,t,n){n.r(t),n.d(t,{CMCD_DEFAULT_TIME_INTERVAL:function(){return Te},CMCD_EVENT_AD_BREAK_END:function(){return v},CMCD_EVENT_AD_BREAK_START:function(){return b},CMCD_EVENT_AD_END:function(){return R},CMCD_EVENT_AD_START:function(){return A},CMCD_EVENT_BACKGROUNDED_MODE:function(){return E},CMCD_EVENT_BITRATE_CHANGE:function(){return d},CMCD_EVENT_CONTENT_ID:function(){return m},CMCD_EVENT_CUSTOM_EVENT:function(){return N},CMCD_EVENT_ERROR:function(){return g},CMCD_EVENT_KEYS:function(){return O},CMCD_EVENT_MODE:function(){return w},CMCD_EVENT_MUTE:function(){return T},CMCD_EVENT_PLAYER_COLLAPSE:function(){return S},CMCD_EVENT_PLAYER_EXPAND:function(){return _},CMCD_EVENT_PLAY_STATE:function(){return h},CMCD_EVENT_RESPONSE_RECEIVED:function(){return I},CMCD_EVENT_SKIP:function(){return C},CMCD_EVENT_TIME_INTERVAL:function(){return p},CMCD_EVENT_UNMUTE:function(){return y},CMCD_FORMATTER_MAP:function(){return c},CMCD_HEADERS:function(){return be},CMCD_HEADER_FIELDS:function(){return ae},CMCD_HEADER_MAP:function(){return oe},CMCD_JSON:function(){return ve},CMCD_KEYS:function(){return ye},CMCD_MIME_TYPE:function(){return _e},CMCD_OBJECT:function(){return ee},CMCD_PARAM:function(){return fe},CMCD_QUERY:function(){return Re},CMCD_REQUEST:function(){return te},CMCD_REQUEST_KEYS:function(){return L},CMCD_REQUEST_MODE:function(){return M},CMCD_RESPONSE_KEYS:function(){return B},CMCD_SESSION:function(){return ne},CMCD_STATUS:function(){return re},CMCD_V1:function(){return Se},CMCD_V1_KEYS:function(){return K},CMCD_V2:function(){return f},CMCD_VALIDATION_SEVERITY_ERROR:function(){return Oe},CMCD_VALIDATION_SEVERITY_WARNING:function(){return Le},CmcdEventType:function(){return D},CmcdHeaderField:function(){return ie},CmcdObjectType:function(){return Ie},CmcdPlayerState:function(){return Ae},CmcdReporter:function(){return we},CmcdReportingMode:function(){return P},CmcdStreamType:function(){return Pe},CmcdStreamingFormat:function(){return Me},CmcdTransmissionMode:function(){return Ce},CmcdValidationSeverity:function(){return Ue},appendCmcdHeaders:function(){return ce},appendCmcdQuery:function(){return Ee},decodeCmcd:function(){return ke},encodeCmcd:function(){return he},fromCmcdHeaders:function(){return He},fromCmcdQuery:function(){return Ge},fromCmcdUrl:function(){return Ye},groupCmcdHeaders:function(){return se},isCmcdCustomKey:function(){return x},isCmcdEventKey:function(){return V},isCmcdRequestKey:function(){return k},isCmcdResponseReceivedKey:function(){return G},isCmcdV1Data:function(){return Ve},isCmcdV1Key:function(){return W},isCmcdV2Data:function(){return qe},prepareCmcdData:function(){return J},toCmcdHeaders:function(){return le},toCmcdQuery:function(){return pe},toCmcdUrl:function(){return ge},toCmcdValue:function(){return Ke},validateCmcd:function(){return mt},validateCmcdEventReport:function(){return Tt},validateCmcdEvents:function(){return Et},validateCmcdHeaders:function(){return yt},validateCmcdKeys:function(){return Qe},validateCmcdRequest:function(){return _t},validateCmcdStructure:function(){return Xe},validateCmcdValues:function(){return pt}});var r=n(2877),i=n(9259);const a=e=>e instanceof r.SfItem?new r.SfItem(Math.round(e.value),e.params):Math.round(e),o=e=>Array.isArray(e)?e.map(a):a(e),s=(e,t)=>Array.isArray(e)?e.map(e=>s(e,t)):e instanceof r.SfItem&&"string"==typeof e.value?new r.SfItem(s(e.value,t),e.params):(t.baseUrl&&(e=(0,i.urlToRelativePath)(e,(0,i.getBaseUrl)(t.baseUrl))),1===t.version?encodeURIComponent(e):e),u=e=>e instanceof r.SfItem?new r.SfItem(100*Math.round(e.value/100),e.params):100*Math.round(e/100),l=e=>Array.isArray(e)?e.map(u):u(e),c={br:o,d:o,bl:l,dl:l,mtp:l,nor:(e,t)=>
vendor: 10,408 bytes, line 2
2{let n=e;return t.version>=2&&(e instanceof r.SfItem&&"string"==typeof e.value?n=new r.SfItem([e]):"string"==typeof e&&(n=[e])),s(n,t)},rtp:l,tb:o},f=2,d="bc",h="ps",g="e",p="t",m="c",E="b",T="m",y="um",_="pe",S="pc",I="rr",A="as",R="ae",b="abs",v="abe",C="sk",N="ce",D={BITRATE_CHANGE:d,PLAY_STATE:h,ERROR:g,TIME_INTERVAL:p,CONTENT_ID:m,BACKGROUNDED_MODE:E,MUTE:T,UNMUTE:y,PLAYER_EXPAND:_,PLAYER_COLLAPSE:S,RESPONSE_RECEIVED:I,AD_START:A,AD_END:R,AD_BREAK_START:b,AD_BREAK_END:v,SKIP:C,CUSTOM_EVENT:N},w="event",M="request",P={REQUEST:M,EVENT:w},O=["cen","e","h","ts"],L=["ab","bg","bl","br","bs","bsa","bsd","bsda","cdn","cid","cs","d","dfa","dl","ec","lab","lb","ltc","msd","mtp","nor","nr","ot","pb","pr","pt","rtp","sf","sid","sn","st","sta","su","tab","tb","tbl","tpb","v"],U=/^[a-zA-Z0-9-.]+-[a-zA-Z0-9-.]+$/;function x(e){return U.test(e)}const F=new Set(L);function k(e){return F.has(e)||x(e)}const B=["cmsdd","cmsds","rc","smrt","ttfb","ttfbb","ttlb","url"],H=new Set(B);function G(e){return H.has(e)}const Y=new Set(O);function V(e){return k(e)||G(e)||Y.has(e)}const q=new Set(["ab","bl","br","bsa","bsd","bsda","lab","lb","mtp","pb","tab","tb","tbl","tpb"]),K=["bl","br","bs","cid","d","dl","mtp","nor","nrr","ot","pr","rtp","sf","sid","st","su","tb","v"],j=new Set(K);function W(e){return j.has(e)||x(e)}const z=new Set(["ot","sf","st","e","sta"]);function $(e){return z.has(e)}function Q(e){return"number"==typeof e?Number.isFinite(e):null!=e&&""!==e&&!1!==e}const X={[w]:V,[M]:k};function Z(e,t){if(Array.isArray(e)){let n;return t&&(n=e.find(e=>e.params?.ot===t)),n||(n=e[0]),Z(n)}return e instanceof r.SfItem?e.value:e}function J(e,t={}){const n={};if(null==e||"object"!=typeof e)return n;const i=t.version||e.v||f,a=t.reportingMode||M,o=1===i?function(e){const t={};for(const[n,i]of Object.entries(e))if(null!=i)if("nor"===n){const e=(Array.isArray(i)?i:[i])[0];e instanceof r.SfItem?(t.nor=e.value,e.params?.r&&(t.nrr=e.params.r)):t.nor=e}else q.has(n)?t[n]=Z(i,e.ot):t[n]=i;else t[n]=i;return t}(e):e,s=1===i?W:X[a];let u=Object.keys(o).filter(s);o.e&&o.e!==I&&(u=u.filter(e=>!G(e)));const l=t.filter;"function"==typeof l&&(u=u.filter(l));const d=a===w;if(d){const e=o.e;u.includes("e")||null==e||u.push("e"),u.includes("ts")||u.push("ts"),u.includes("cen")||null==o.cen||e!==N||u.push("cen")}if(0===u.length)return n;i>1&&!u.includes("v")&&u.push("v");const h={version:i,reportingMode:a,baseUrl:t.baseUrl};u.sort();for(const e of u){let a=o[e];const s=t.formatters?.[e]??c[e];if("function"==typeof s&&(a=s(a,h)),"v"===e){if(1===i)continue;a=i}"pr"===e&&1===a||(d&&"ts"===e&&!Number.isFinite(a)&&(a=Date.now()),Q(a)&&($(e)&&"string"==typeof a&&(a=new r.SfToken(a)),n[e]=a))}return n}const ee="CMCD-Object",te="CMCD-Request",ne="CMCD-Session",re="CMCD-Status",ie={OBJECT:ee,REQUEST:te,SESSION:ne,STATUS:re},ae=[ee,te,ne,re],oe={ab:ee,br:ee,d:ee,lab:ee,lb:ee,ot:ee,tab:ee,tb:ee,tpb:ee,bl:te,cs:te,dfa:te,dl:te,ltc:te,mtp:te,nor:te,nrr:te,pb:te,sn:te,sta:te,su:te,tbl:te,cid:ne,msd:ne,sf:ne,sid:ne,st:ne,v:ne,bg:re,bs:re,bsa:re,bsd:re,bsda:re,cdn:re,ec:re,nr:re,pr:re,pt:re,rtp:re};function se(e,t){const n={};if(!e)return n;const r=Object.keys(e),i=t?(a=t,Object.keys(a).reduce((e,t)=>(a[t]?.forEach(n=>e[n]=t),e),{})):{};var a;for(const t of r){const r=oe[t]||i[t]||ie.REQUEST;(n[r]??={})[t]=e[t]}return n}function ue(e,t){const n={},i=se(e,t);for(const[e,t]of Object.entries(i)){const i=(0,r.encodeSfDict)(t,{whitespace:!1});i&&(n[e]=i)}return n}function le(e,t={}){return e?ue(J(e,t),t?.customHeaderMap):{}}function ce(e,t,n){return Object.assign(e,le(t,n))}const fe="CMCD";function de(e){return(0,r.encodeSfDict)(e,{whitespace:!1})}function he(e,t={}){return e?de(J(e,t)):""}function ge(e,t={}){if(!e)return"";const n=he(e,t);return encodeURIComponent(n)}function pe(e,t={}){return e?`${fe}=${ge(e,t)}`:""}const me=/CMCD=[^&#]+/;function Ee(e,t,n){const r=pe(t,n);return r?me.test(e)?e.replace(me,r):`${e}${e.includes("?")?"&":"?"}${r}`:e}const Te=30,ye=[...K,...L,...B,...O].filter((e,t,n)=>n.indexOf(e)===t),_e="application/cmcd",Se=1,Ie={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},Ae={STARTING:"s",PLAYING:"p",SEEKING:"k",REBUFFERING:"r",PAUSED:"a",WAITING:"w",ENDED:"e",FATAL_ERROR:"f",QUIT:"q",PRELOADING:"d"},Re="query",be="headers",ve="json",Ce={JSON:ve,QUERY:Re,HEADERS:be};function Ne(e,t,n){const r=new Set(t.enabledKeys??[]);return{version:t.version||f,reportingMode:e,filter:e=>r.has(e),baseUrl:n}}function De(e){const{url:t,...n}=e;return fetch(t,n)}var we=class{constructor(e,t=De){this.timeOrigin=performance.timeOrigin||performance.timing?.fetchStart||Date.now()-performance.now(),this.data={},this.msd=NaN,this.eventTargets=new Map,this.requestTarget={sn:0,msdSent:!1},this.config=function(e){const{version:t=f,eventTargets:n=[],sid:r=(0,i.uuid)(),transmissionMode:a=Re,...o}=e;return{...o,version:t,transmissionMode:a,sid:r,eventTargets:n.reduce((e,t)=>(t?.url&&t.events?.length&&e.push({version:t.version||f,enabledKeys:t.enabledKeys?.slice()||[],url:t.url,events:t.events.slice(),interval:t.interval??Te,batchSize:t.batchSize||1}),e),[])}}(e),this.data={cid:this.config.cid,sid:this.config.sid,v:this.config.version},this.requester=t;for(const e of this.config.eventTargets)this.eventTargets.set(e,{intervalId:void 0,sn:0,msdSent:!1,queue:[]})}start(){this.eventTargets.forEach((e,t)=>{if(this.disarmInterval(e),0===t.interval||!t.events.includes(D.TIME_INTERVAL))return;const n=()=>{this.recordTargetEvent(e,t,p),this.processEventTargets()};e.intervalId=setInterval(n,1e3*t.interval),n()})}stop(e=!1){e&&this.flush(),this.eventTargets.forEach(e=>{this.disarmInterval(e)})}flush(){this.processEventTargets(!0)}update(e){e.sid&&e.sid!==this.data.sid&&this.resetSession(),e.msd&&!isNaN(e.msd)&&(this.msd=e.msd),this.data={...this.data,...e,msd:void 0}}recordEvent(e,t={}){this.eventTargets.forEach((n,r)=>{this.recordTargetEvent(n,r,e,t)}),this.processEventTargets()}recordTargetEvent(e,t,n,r={}){if(!t.events.includes(n))return;const i={...this.data,...r,e:n,ts:r.ts??Date.now(),sn:e.sn++};isNaN(this.msd)||e.msdSent||(i.msd=this.msd,e.msdSent=!0),e.queue.push(i)}recordResponseReceived(e,t={}){const{request:n}=e,r=t.url??n?.url;if(!r)return;const i=new URL(r);i.searchParams.delete(fe);const a={url:i.toString(),rc:e.status},o=e.resourceTiming;o&&(null!=o.startTime&&(a.ts=Math.round(this.timeOrigin+o.startTime),null!=o.responseStart&&(a.ttfb=Math.round(o.responseStart-o.startTime))),null!=o.duration&&(a.ttlb=Math.round(o.duration)));const s=n.customData?.cmcd??{};this.recordEvent(I,{...s,...a,...t})}applyRequestReport(e){return this.createRequestReport(e)??e}isRequestReportingEnabled(){return!!this.config.enabledKeys?.length}createRequestReport(e,t){const{customData:n={},headers:r={},...i}=e,a={...i,headers:{...r},customData:{...n,cmcd:{}}};if(!this.config.enabledKeys?.length||!a.url)return a;const o=new URL(a.url),s={...this.data,...t,sn:this.requestTarget.sn++},u=Ne(M,this.config,a.url);isNaN(this.msd)||this.requestTarget.msdSent||(s.msd=this.msd,this.requestTarget.msdSent=!0);const l=a.customData.cmcd=J(s,u);switch(this.config.transmissionMode){case Re:const e=de(l);e&&(o.searchParams.set(fe,e),a.url=o.toString());break;case be:Object.assign(a.headers,ue(l,u.customHeaderMap))}return a}processEventTargets(e=!1){let t=!1;this.eventTargets.forEach((n,r)=>{const{queue:i}=n;if(!i.length)return;if(i.length<r.batchSize&&!e)return;const a=e?i.length:r.batchSize,o=i.splice(0,a);this.sendEventReport(r,o).catch(()=>{n.queue.unshift(...o)}),t||=i.length>0}),t&&this.processEventTargets()}async sendEventReport(e,t){const n=Ne(w,e),{status:r}=await this.requester({url:e.url,method:"POST",headers:{"Content-Type":_e},body:t.map(e=>he(e,n)).join("\n")+"\n"});if(410===r)this.disposeEventTarget(e);else if(429===r||r>499&&r<600)throw new Error(`Event report failed with status ${r}`)}disarmInterval(e){clearInterval(e.intervalId),e.intervalId=void 0}disposeEventTarget(e){const t=this.eventTargets.get(e);t&&(this.disarmInterval(t),this.eventTargets.delete(e))}resetSession(){this.eventTargets.forEach(e=>e.sn=0),this.requestTarget.sn=0}};const Me={DASH:"d",HLS:"h",SMOOTH:"s",OTHER:"o"},Pe={VOD:"v",LIVE:"l",LOW_LATENCY:"ll"},Oe="error",Le="warning",Ue={ERROR:Oe,WARNING:Le};function xe(e){if(e.v===f)return e;const t={};for(const[n,r]of Object.entries(e))null!=r?q.has(n)&&!Array.isArray(r)?t[n]=[r]:t[n]="nor"===n&&"string"==typeof r?[r]:r:t[n]=r;return t}function Fe(e){return Array.isArray(e)?e.map(Fe):"symbol"==typeof e?(0,r.symbolToStr)(e):e instanceof r.SfItem&&!e.params?Fe(e.value):e}function ke(e,t){if(!e)return{};const n=(0,r.decodeSfDict)(e),i={};for(const[e,t]of Object.entries(n))i[e]=Fe(t.value);return t?.convertToLatest?xe(i):i}function Be(e){return e instanceof Headers?e:new Headers(e)}function He(e,t){const n=Be(e),r={};for(const e of ae){const t=n.get(e);t&&Object.assign(r,ke(t))}return t?.convertToLatest?xe(r):r}function Ge(e,t){return"string"==typeof e&&(e=new URLSearchParams(e)),ke(e.get(fe)??"",t)}function Ye(e,t){return ke(decodeURIComponent(e.replace(/^CMCD=/,"")),t)}function Ve(e){return e.v!==f}function qe(e){return e.v===f}function Ke(e,t){return new r.SfItem(e,t)}function je(...e){const t=e.flatMap(e=>e.issues);return{valid:t.every(e=>e.severity!==Oe),issues:t}}function We(e,t){if(1===t?.version||2===t?.version)return t.version;const n=e.v;return 1===n||2===n?n:Se}const ze=new Set(K),$e=new Set(ye);function Qe(e,t){const n=We(e,t),r=n===Se?ze:$e,i=[];for(const t of Object.keys(e))x(t)||r.has(t)||i.push({key:t,message:`Unknown CMCD key "${t}" for version ${n}.`,severity:Oe});return{valid:0===i.length,issues:i}}function Xe(e,t){const n=We(e,t),r=[];if(t?.reportingMode===M){for(const t of O)t in e&&r.push({key:t,message:`Event key "${t}" must not be present in request mode.`,severity:Oe});for(const t of B)t in e&&r.push({key:t,message:`Response key "${t}" must not be present in request mode.`,severity:Oe})}if(t?.reportingMode===w&&("e"in e||r.push({key:"e",message:'Event mode requires the "e" key to be present.',severity:Oe}),"ts"in e||r.push({key:"ts",message:'Event mode requires the "ts" key to be present.',severity:Oe})),"e"in e){if(e.e===N?"cen"in e||r.push({key:"cen",message:'Custom event (e="ce") requires the "cen" key to be present.',severity:Oe}):"cen"in e&&r.push({key:"cen",message:'The "cen" key must only be present when e="
2ce".',severity:Oe}),e.e===I)"url"in e||r.push({key:"url",message:'Response received event (e="rr") requires the "url" key to be present.',severity:Oe});else for(const t of B)t in e&&r.push({key:t,message:`Response key "${t}" must only be present when e="rr".`,severity:Oe});e.e!==h||"sta"in e||r.push({key:"sta",message:'Play state event (e="ps") requires the "sta" key to be present.',severity:Oe}),e.e!==g||"ec"in e||r.push({key:"ec",message:'Error event (e="e") requires the "ec" key to be present.',severity:Oe})}return"v"in e&&1!==e.v&&2!==e.v?r.push({key:"v",message:`Unsupported CMCD version "${String(e.v)}". Expected 1 or 2.`,severity:Oe}):n>1&&!("v"in e)?r.push({key:"v",message:'Version 2 payloads require the "v" key to be present.',severity:Oe}):n===Se&&"v"in e&&r.push({key:"v",message:'Version 1 payloads should omit the "v" key (v1 is the default).',severity:Le}),{valid:r.every(e=>e.severity!==Oe),issues:r}}const Ze="number[]",Je="string[]",et="integer",tt="number",nt="boolean",rt="string",it="token",at={ab:Ze,bl:Ze,br:Ze,bsa:Ze,bsd:Ze,bsda:Ze,lab:Ze,lb:Ze,mtp:Ze,pb:Ze,tab:Ze,tb:Ze,tbl:Ze,tpb:Ze,ec:Je,nor:Je,d:et,dfa:et,dl:et,ltc:et,msd:et,pt:et,rc:et,rtp:et,sn:et,ts:et,ttfb:et,ttfbb:et,ttlb:et,v:et,pr:tt,bg:nt,bs:nt,nr:nt,su:nt,cdn:rt,cen:rt,cid:rt,cmsdd:rt,cmsds:rt,cs:rt,h:rt,nrr:rt,sid:rt,smrt:rt,url:rt,e:it,ot:it,sf:it,st:it,sta:it},ot={bl:et,br:tt,mtp:et,tb:tt,nor:rt},st={sid:64,cid:128,cdn:128,h:128,cen:64},ut=64,lt={e:["bc","ps","e","t","c","b","m","um","pe","pc","rr","as","ae","abs","abe","sk","ce"],ot:["m","a","v","av","i","c","tt","k","o"],sf:["d","h","s","o"],st:["v","l","ll"],sta:["s","p","k","r","a","w","e","f","q","d"]},ct=new Set(["bl","dl","mtp","rtp","tbl"]),ft=new Set(["br","d","tb"]);function dt(e){return"number"==typeof e&&Number.isFinite(e)}function ht(e,t,n){if(Array.isArray(t))for(let i=0;i<t.length;i++){const a=t[i];a instanceof r.SfItem?dt(a.value)||n.push({key:e,message:`Key "${e}" array element [${i}] must be a finite number.`,severity:Oe}):dt(a)||n.push({key:e,message:`Key "${e}" array element [${i}] must be a finite number.`,severity:Oe})}else n.push({key:e,message:`Key "${e}" must be an array.`,severity:Oe})}function gt(e,t,n){if(Array.isArray(t))for(let i=0;i<t.length;i++){const a=t[i];a instanceof r.SfItem?"string"!=typeof a.value&&n.push({key:e,message:`Key "${e}" array element [${i}] must be a string.`,severity:Oe}):"string"!=typeof a&&n.push({key:e,message:`Key "${e}" array element [${i}] must be a string.`,severity:Oe})}else n.push({key:e,message:`Key "${e}" must be an array.`,severity:Oe})}function pt(e,t){const n=We(e,t),r=[];for(const[t,i]of Object.entries(e)){if(x(t)){"string"!=typeof i?r.push({key:t,message:`Custom key "${t}" value must be a string or token.`,severity:Oe}):i.length>ut&&r.push({key:t,message:`Custom key "${t}" value exceeds maximum length of ${ut}.`,severity:Oe});continue}if("v"===t){1!==i&&2!==i&&r.push({key:t,message:'Key "v" must be 1 or 2.',severity:Oe});continue}let e=at[t];if(e)switch(n===Se&&t in ot&&(e=ot[t]),e){case et:dt(i)&&Number.isInteger(i)?ct.has(t)&&i%100!=0&&r.push({key:t,message:`Key "${t}" should be rounded to the nearest 100.`,severity:Le}):r.push({key:t,message:`Key "${t}" must be a finite integer.`,severity:Oe});break;case tt:dt(i)?ct.has(t)&&i%100!=0?r.push({key:t,message:`Key "${t}" should be rounded to the nearest 100.`,severity:Le}):ft.has(t)&&!Number.isInteger(i)&&r.push({key:t,message:`Key "${t}" should be rounded to an integer.`,severity:Le}):r.push({key:t,message:`Key "${t}" must be a finite number.`,severity:Oe});break;case nt:"boolean"!=typeof i&&r.push({key:t,message:`Key "${t}
2" must be a boolean.`,severity:Oe});break;case rt:"string"!=typeof i?r.push({key:t,message:`Key "${t}" must be a string.`,severity:Oe}):t in st&&i.length>st[t]&&r.push({key:t,message:`Key "${t}" exceeds maximum length of ${st[t]}.`,severity:Oe});break;case it:{const e=lt[t];e&&!e.includes(i)&&r.push({key:t,message:`Key "${t}" has invalid token value "${String(i)}". Expected one of: ${e.join(", ")}.`,severity:Oe});break}case Ze:ht(t,i,r);break;case Je:gt(t,i,r)}}return{valid:r.every(e=>e.severity!==Oe),issues:r}}function mt(e,t){return je(Qe(e,t),pt(e,t),Xe(e,t))}function Et(e,t){const n={...t,reportingMode:w},r=e.split(/\r?\n/).filter(e=>e.length>0);if(0===r.length)return{valid:!1,issues:[{message:"Empty event mode payload. At least one event line is required.",severity:Oe}],data:[]};const i=[],a=[];for(let e=0;e<r.length;e++)try{const t=ke(r[e]);i.push(t),a.push(mt(t,n))}catch{i.push({}),a.push({valid:!1,issues:[{message:`Failed to decode event line ${e+1}: invalid structured field syntax.`,severity:Oe}]})}return{...je(...a),data:i}}function Tt(e,t){const n=[];"POST"!==e.method&&n.push({message:`Invalid HTTP method '${e.method??"GET"}'. Event reports must use POST.`,severity:Oe});const r=e.headers?Be(e.headers).get("Content-Type"):void 0;if(r){const e=r.split(";")[0].trim().toLowerCase();e!==_e&&n.push({message:`Invalid Content-Type '${e}'. Event reports must use '${_e}'.`,severity:Oe})}else n.push({message:`Missing Content-Type header. Event reports must use '${_e}'.`,severity:Oe});const i=e.body;if(null==i)return n.push({message:"Missing request body. Event reports must include a body.",severity:Oe}),{valid:!1,issues:n,data:[]};if("string"!=typeof i)return n.push({message:"Request body must be a string.",severity:Oe}),{valid:!1,issues:n,data:[]};const a=Et(i,t);return{valid:0===n.length&&a.valid,issues:[...n,...a.issues],data:a.data}}function yt(e,t){const n=Be(e),r=[],i={};for(const e of ae){const t=n.get(e);if(!t)continue;let a;try{a=ke(t)}catch{r.push({key:e,message:`Failed to decode "${e}" header: invalid structured field syntax.`,severity:Oe});continue}i[e]=a;for(const t of Object.keys(a)){if(x(t))continue;const n=oe[t];n&&n!==e&&r.push({key:t,message:`Key "${t}" is in "${e}" but should be in "${n}".`,severity:Oe})}}const a={valid:0===r.length,issues:r},o=Object.assign({},...ae.map(e=>i[e]).filter(Boolean));return{...je(a,mt(o,{...t,reportingMode:M})),data:o}}function _t(e,t){const n=function(e){if(!e)return;const t=Be(e),n={};let r=!1;for(const e of ae){const i=t.get(e);i&&(n[e]=i,r=!0)}return r?n:void 0}(e.headers);if(n)return yt(n,t);const r=new URL(e.url).searchParams.get(fe);if(!r)return{valid:!1,issues:[{message:"No CMCD data found in request headers or query parameters.",severity:Oe}],data:{}};let i;try{i=ke(r)}catch{return{valid:!1,issues:[{message:"Failed to decode CMCD query parameter: invalid structured field syntax.",severity:Oe}],data:{}}}return{...mt(i,{...t,reportingMode:M}),data:i}}},1103:function(e,t,n){n.r(t),n.d(t,{CMSD_DYNAMIC:function(){return a},CMSD_STATIC:function(){return o},CMSD_V1:function(){return s},CmsdHeaderField:function(){return u},CmsdObjectType:function(){return l},CmsdStreamType:function(){return f},CmsdStreamingFormat:function(){return c},decodeCmsdDynamic:function(){return d},decodeCmsdStatic:function(){return h},encodeCmsdDynamic:function(){return g},encodeCmsdStatic:function(){return p}});var r=n(6390),i=n(2877);const a="CMSD-Dynamic",o="CMSD-Static",s=1,u={STATIC:o,DYNAMIC:a},l=r.CmObjectType,c=r.CmStreamingFormat,f=r.CmStreamType;function d(e){return e?(0,i.decodeSfList)(e):[]}function h(e){return e?Object.entries((0,i.decodeSfDict)(e)).reduce((e,[t,n])=>{const{value:r}=n;return e[t]="symbol"==typeof r?(0,i.symbolToStr)(r):r,e},{}):{}}function g(e,t){if(!e)return"";if("string"==typeof e){if(!t)return"";e=[new i.SfItem(e,t)]}return(0,i.encodeSfList)(e,{whitespace:!1})}function p(e,t){return e?(0,i.encodeSfDict)(function(e,t){const n={};if(null==e||"object"!=typeof e)return n;const a=Object.keys(e),o=!1!==t?.useSymbol;return a.forEach(t=>{let a=e[t];"v"===t&&1===a||(0,r.isValid)(a)&&((0,r.isTokenField)(t)&&"string"==typeof a&&(a=o?Symbol.for(a):new i.SfToken(a)),n[t]=a)}),n}(e,t),{whitespace:!1}):""}},6390:function(e,t,n){n.r(t),n.d(t,{CmObjectType:function(){return r},CmStreamType:function(){return a},CmStreamingFormat:function(){return i},isTokenField:function(){return o},isValid:function(){return s}});const r={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",
vendor: 6,435 bytes, line 2
2KEY:"k",OTHER:"o"},i={DASH:"d",HLS:"h",SMOOTH:"s",OTHER:"o"},a={VOD:"v",LIVE:"l"};function o(e){return["ot","sf","st","e","sta"].includes(e)}function s(e){return"number"==typeof e?Number.isFinite(e):null!=e&&""!==e&&!1!==e}},2877:function(e,t,n){n.r(t),n.d(t,{SfItem:function(){return i},SfToken:function(){return b},decodeSfDict:function(){return x},decodeSfItem:function(){return k},decodeSfList:function(){return G},encodeSfDict:function(){return re},encodeSfItem:function(){return ie},encodeSfList:function(){return oe},parseBareItem:function(){return N},parseBoolean:function(){return d},parseByteSequence:function(){return g},parseDate:function(){return S},parseDict:function(){return U},parseError:function(){return u},parseInnerList:function(){return O},parseIntegerOrDecimal:function(){return _},parseItem:function(){return P},parseItemOrInnerList:function(){return L},parseKey:function(){return w},parseList:function(){return H},parseParameters:function(){return M},parseString:function(){return R},parseToken:function(){return C},serializeBareItem:function(){return X},serializeBoolean:function(){return V},serializeByteSequence:function(){return q},serializeDate:function(){return j},serializeDecimal:function(){return W},serializeDict:function(){return ne},serializeError:function(){return Y},serializeInnerList:function(){return te},serializeInteger:function(){return K},serializeItem:function(){return ee},serializeKey:function(){return Z},serializeList:function(){return ae},serializeParams:function(){return J},serializeString:function(){return z},serializeToken:function(){return Q},symbolToStr:function(){return $}});var r=n(9259),i=class e{constructor(t,n){Array.isArray(t)&&(t=t.map(t=>t instanceof e?t:new e(t))),this.value=t,this.params=n}};const a="Dict";function o(e,t){return{value:e,src:t}}function s(e,t,n,r){return new Error(`failed to ${e} "${i=t,Array.isArray(i)?JSON.stringify(i):i instanceof Map?"Map{}":i instanceof Set?"Set{}":"object"==typeof i?JSON.stringify(i):String(i)}" as ${n}`,{cause:r});var i}function u(e,t,n){return s("parse",e,t,n)}const l="Inner List",c="Bare Item",f="Boolean";function d(e){let t=0;if("?"!==e[t])throw u(e,f);if(t++,"1"===e[t])return o(!0,e.substring(++t));if("0"===e[t])return o(!1,e.substring(++t));throw u(e,f)}const h="Byte Sequence";function g(e){if(":"!==e[0])throw u(e,h);if(!1===(e=e.substring(1)).includes(":"))throw u(e,h);const t=/(^.*?)(:)/g,n=t.exec(e)[1];return e=e.substring(t.lastIndex),o((0,r.decodeBase64)(n),e)}const p="Date",m="Decimal",E="Integer",T=`${E} or ${m}`;function y(e){return e<-999999999999999||999999999999999<e}function _(e){let t,n=1,r="";const i=u(e,T);if("-"===e[0]&&(n=-1,e=e.substring(1)),e.length<=0)throw i;const a=/^(\d+)?/g,s=a.exec(e);if(0===s[0].length)throw i;if(r+=s[1],"."===(e=e.substring(a.lastIndex))[0]){if(r.length>12)throw i;const a=/^(\.\d+)?/g,o=a.exec(e);if(e=e.substring(a.lastIndex),0===o[0].length||o[1].length>4)throw i;if(r+=o[1],r.length>16)throw i;t=parseFloat(r)*n}else{if(r.length>15)throw i;if(t=parseInt(r)*n,y(t))throw u(r,T)}return o(t,e)}function S(e){let t=0;if("@"!==e[t])throw u(e,p);t++;const n=_(e.substring(t));if(!1===Number.isInteger(n.value))throw u(e,p);return o(new Date(1e3*n.value),n.src)}const I="String",A=/[\x00-\x1f\x7f]+/;function R(e){let t="",n=0;if('"'!==e[n])throw u(e,I);for(n++;e.length>n;){if("\\"===e[n]){if(e.length<=n+1)throw u(e,I);if(n++,'"'!==e[n]&&"\\"!==e[n])throw u(e,I);t+=e[n]}else{if('"'===e[n])return o(t,e.substring(++n));if(A.test(e[n]))throw u(e,I);t+=e[n]}n++}throw u(e,I)}var b=class{constructor(e){this.description=e}};const v="Token";function C(e,t){if(!1===/^[a-zA-Z*]$/.test(e[0]))throw u(e,v);const n=/^([!#$%&'*+\-.^_`|~\w:/]+)/g,r=n.exec(e)[1];return e=e.substring(n.lastIndex),o(!1===t?.useSymbol?new b(r):Symbol.for(r),e)}function N(e,t){const n=e[0];if('"'===n)return R(e);if(/^[-0-9]/.test(n))return _(e);if("?"===n)return d(e);if(":"===n)return g(e);if(/^[a-zA-Z*]/.test(n))return C(e,t);if("@"===n)return S(e);throw u(e,c)}const D="Key";function w(e){let t=0;if(!1===/^[a-z*]$/.test(e[t]))throw u(e,D);let n="";for(;e.length>t;){if(!1===/^[a-z0-9_\-.*]$/.test(e[t]))return o(n,e.substring(t));n+=e[t],t++}return o(n,e.substring(t))}function M(e,t){let n;for(;e.length>0&&";"===e[0];){const r=w(e=e.substring(1).trim()),i=r.value;let a=!0;if("="===(e=r.src)[0]){const n=N(e=e.substring(1),t);a=n.value,e=n.src}null==n&&(n={}),n[i]=a}return o(n,e)}function P(e,t){const n=N(e,t),r=M(e=n.src,t);return e=r.src,o(new i(n.value,r.value),e)}function O(e,t){if("("!==e[0])throw u(e,l);e=e.substring(1);const n=[];for(;e.length>0;){if(")"===(e=e.trim())[0]){const r=M(e=e.substring(1),t);return o(new i(n,r.value),r.src)}const r=P(e,t);if(n.push(r.value)," "!==(e=r.src)[0]&&")"!==e[0])throw u(e,l)}throw u(e,l)}function L(e,t){return"("===e[0]?O(e,t):P(e,t)}function U(e,t){const n={};for(;e.length>0;){let r;const s=w(e),l=s.value;if("="===(e=s.src)[0]){const n=L(e.substring(1),t);r=n.value,e=n.src}else{const n=M(e,t);r=new i(!0,n.value),e=n.src}if(n[l]=r,0===(e=e.trim()).length)return o(n,e);if(","!==e[0])throw u(e,a);if(0===(e=e.substring(1).trim()).length||","===e[0])throw u(e,a)}return o(n,e)}function x(e,t){try{const{src:n,value:r}=U(e.trim(),t);if(""!==n)throw u(n,a);return r}catch(t){throw u(e,a,t)}}const F="Item";function k(e,t){try{const{src:n,value:r}=P(e.trim(),t);if(""!==n)throw u(n,F);return r}catch(t){throw u(e,F,t)}}const B="List";function H(e,t){const n=[];for(;e.length>0;){const r=L(e,t);if(n.push(r.value),0===(e=r.src.trim()).length)return o(n,e);if(","!==e[0])throw u(e,B);if(0===(e=e.substring(1).trim()).length||","===e[0])throw u(e,B)}return o(n,e)}function G(e,t){try{const{src:n,value:r}=H(e.trim(),t);if(""!==n)throw u(n,B);return r}catch(t){throw u(e,B,t)}}function Y(e,t,n){return s("serialize",e,t,n)}function V(e){if("boolean"!=typeof e)throw Y(e,f);return e?"?1":"?0"}function q(e){if(!1===ArrayBuffer.isView(e))throw Y(e,h);return`:${(0,r.encodeBase64)(e)}:`}function K(e){if(y(e))throw Y(e,E);return e.toString()}function j(e){return`@${K(e.getTime()/1e3)}`}function W(e){const t=(0,r.roundToEven)(e,3);if(Math.floor(Math.abs(t)).toString().length>12)throw Y(e,m);const n=t.toString();return n.includes(".")?n:`${n}.0`}function z(e){if(A.test(e))throw Y(e,I);return`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function $(e){return e.description||e.toString().slice(7,-1)}function Q(e){const t=$(e);
2if(!1===/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(t))throw Y(t,v);return t}function X(e){switch(typeof e){case"number":if(!Number.isFinite(e))throw Y(e,c);return Number.isInteger(e)?K(e):W(e);case"string":return z(e);case"symbol":return Q(e);case"boolean":return V(e);case"object":if(e instanceof Date)return j(e);if(e instanceof Uint8Array)return q(e);if(e instanceof b)return Q(e);default:throw Y(e,c)}}function Z(e){if(!1===/^[a-z*][a-z0-9\-_.*]*$/.test(e))throw Y(e,D);return e}function J(e){return null==e?"":Object.entries(e).map(([e,t])=>!0===t?`;${Z(e)}`:`;${Z(e)}=${X(t)}`).join("")}function ee(e){return e instanceof i?`${X(e.value)}${J(e.params)}`:X(e)}function te(e){return`(${e.value.map(ee).join(" ")})${J(e.params)}`}function ne(e,t={whitespace:!0}){if("object"!=typeof e||null==e)throw Y(e,a);const n=e instanceof Map?e.entries():Object.entries(e),r=t?.whitespace?" ":"";return Array.from(n).map(([e,t])=>{t instanceof i==0&&(t=new i(t));let n=Z(e);return!0===t.value?n+=J(t.params):(n+="=",Array.isArray(t.value)?n+=te(t):n+=ee(t)),n}).join(`,${r}`)}function re(e,t){return ne(e,t)}function ie(e,t){return e instanceof i||(e=new i(e,t)),ee(e)}function ae(e,t={whitespace:!0}){if(!1===Array.isArray(e))throw Y(e,B);const n=t?.whitespace?" ":"";return e.map(e=>{e instanceof i==0&&(e=new i(e));const t=e;return Array.isArray(t.value)?te(t):ee(t)}).join(`,${n}`)}function oe(e,t){return ae(e,t)}},9259:function(e,t,n){function r(e){return new Uint8Array(e).reduce((e,t)=>e+t.toString(16).padStart(2,"0"),"")}function i(e){return r(e).replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5")}function a(e){return new Uint8Array([...atob(e)].map(e=>e.charCodeAt(0)))}n.r(t),n.d(t,{Encoding:function(){return E},RequestResponseType:function(){return S},UTF_16:function(){return f},UTF_16_BE:function(){return d},UTF_16_LE:function(){return h},UTF_8:function(){return g},arrayBufferToHex:function(){return r},arrayBufferToUuid:function(){return i},base64decode:function(){return o},base64encode:function(){return u},convertUint8ToUint16:function(){return l},decodeBase64:function(){return a},decodeText:function(){return p},encodeBase64:function(){return s},encodeText:function(){return m},getBandwidthBps:function(){return T},getBaseUrl:function(){return y},hexToArrayBuffer:function(){return _},isArrayBufferLike:function(){return c},roundToEven:function(){return I},stringToUint16:function(){return A},unescapeHtml:function(){return b},urlToRelativePath:function(){return v},uuid:function(){return C},uuidToArrayBuffer:function(){return N}});const o=a;function s(e){return btoa(String.fromCharCode(...e))}const u=s;function l(e){if(e.length%2!=0){const t=new Uint8Array(e.length+1);return t.set(e),new Uint16Array(t.buffer)}return new Uint16Array(e.buffer)}function c(e){return e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer}const f="utf-16",d="utf-16be",h="utf-16le",g="utf-8";function p(e,t={}){let n;n=c(e)?new DataView(e):new DataView(e.buffer,e.byteOffset,e.byteLength);let r=0,{encoding:i}=t;if(!i){const e=n.getUint8(0),t=n.getUint8(1);239==e&&187==t&&191==n.getUint8(2)?(i=g,r=3):254==e&&255==t?(i=d,r=2):255==e&&254==t?(i=h,r=2):i=g}if("undefined"!=typeof TextDecoder)return new TextDecoder(i).decode(n);const{byteLength:a}=n,o=i!==d;let s,u="";for(;r<a;){switch(i){case g:if(s=n.getUint8(r),s<128)r++;else if(s>=194&&s<=223)if(r+1<a){const e=n.getUint8(r+1);e>=128&&e<=191?(s=(31&s)<<6|63&e,r+=2):r++}else r++;else if(s>=224&&s<=239)if(r+2<=a-1){const e=n.getUint8(r+1),t=n.getUint8(r+2);e>=128&&e<=191&&t>=128&&t<=191?(s=(15&s)<<12|(63&e)<<6|63&t,r+=3):r++}else r++;else if(s>=240&&s<=244)if(r+3<=a-1){const e=n.getUint8(r+1),t=n.getUint8(r+2),i=n.getUint8(r+3);e>=128&&e<=191&&t>=128&&t<=191&&i>=128&&i<=191?(s=(7&s)<<18|(63&e)<<12|(63&t)<<6|63&i,r+=4):r++}else r++;else r++;break;case d:case f:case h:s=n.getUint16(r,o),r+=2}u+=String.fromCodePoint(s)}return u}function m(e){return(new TextEncoder).encode(e)}const E={UTF8:g,UTF16:f,UTF16BE:d,UTF16LE:h};function T(e){const t=e.duration/1e3;return 8*e.encodedBodySize/t}function y(e){const t="string"==typeof e?new URL(e):e;return t.origin+t.pathname.substring(0,t.pathname.lastIndexOf("/")+1)}function _(e){const t=new ArrayBuffer(e.length/2),n=new Uint8Array(t);for(let t=0;t<e.length;t+=2)n[t/2]=parseInt(e.slice(t,t+2),16);return t}const S={TEXT:"text",JSON:"json",BLOB:"blob",ARRAY_BUFFER:"arrayBuffer",DOCUMENT:"document",STREAM:"stream"};function I(e,t){if(e<0)return-I(-e,t);const n=Math.pow(10,t);if(Math.abs(e*n%1-.5)<Number.EPSILON){const t=Math.floor(e*n);return(t%2==0?t:t+1)/n}return Math.round(e*n)/n}function A(e){const t=new ArrayBuffer(2*e.length),n=new DataView(t);for(let t=0;t<e.length;t++)n.setUint16(2*t,e.charCodeAt(t),!0);return new Uint16Array(t)}const R=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g;function b(e){return-1===e.indexOf("&")?e:e.replace(R,e=>{switch(e){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'";case" ":return"Â ";case"‎":return"â";case"‏":return"â";default:if("#"===e[1]){const t="x"===e[2]||"X"===e[2]?parseInt(e.slice(3),16):parseInt(e.slice(2),10);return String.fromCodePoint(t)}return e}})}function v(e,t){let n;try{n=new URL(e)}catch{return e}
2const r=new URL(t);if(n.origin!==r.origin)return e;const i=n.pathname.split("/").slice(1),a=r.pathname.split("/").slice(1,-1),o=Math.min(i.length,a.length);for(let e=0;e<o&&i[e]===a[e];e++)i.shift(),a.shift();for(;a.length;)a.shift(),i.unshift("..");return i.join("/")+n.search+n.hash}function C(){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 n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?n:3&n|8).toString(16)})}}}function N(e){return _(e.replace(/-/g,""))}},649:function(e,t,n){n.r(t);var r=n(8850),i=n(3621),a=n(138);function o(e){e=e||{};const t=this.context,n=(0,r.default)(t).getInstance(),a=e.settings,o=[];let s,u,l,c;function f(e){return e&&e.bind?e.bind(window.console):window.console.log.bind(window.console)}function d(...e){E(1,this,...e)}function h(...e){E(2,this,...e)}function g(...e){E(3,this,...e)}function p(...e){E(4,this,...e)}function m(...e){E(5,this,...e)}function E(e,t,...r){let s="",f=null;u&&(f=(new Date).getTime(),s+="["+(f-c)+"]"),l&&t&&t.getClassName&&(s+="["+t.getClassName()+"]",t.getType&&(s+="["+t.getType()+"]")),s.length>0&&(s+=" "),Array.apply(null,r).forEach(function(e){s+=e+" "}),o[e]&&a&&a.get().debug.logLevel>=e&&o[e](s),a&&a.get().debug.dispatchEvent&&n.trigger(i.default.LOG,{message:s,level:e})}return s={getLogger:function(e){return{fatal:d.bind(e),error:h.bind(e),warn:g.bind(e),info:p.bind(e),debug:m.bind(e)}},setLogTimestampVisible:function(e){u=e},setCalleeNameVisible:function(e){l=e}},u=!0,l=!0,c=(new Date).getTime(),"undefined"!=typeof window&&window.console&&(o[1]=f(window.console.error),o[2]=f(window.console.error),o[3]=f(window.console.warn),o[4]=f(window.console.info),o[5]=f(window.console.debug)),s}o.__dashjs_factory_name="Debug";const s=a.default.getSingletonFactory(o);s.LOG_LEVEL_NONE=0,s.LOG_LEVEL_FATAL=1,s.LOG_LEVEL_ERROR=2,s.LOG_LEVEL_WARNING=3,s.LOG_LEVEL_INFO=4,s.LOG_LEVEL_DEBUG=5,a.default.updateSingletonFactory(o.__dashjs_factory_name,s),t.default=s},8850:function(e,t,n){n.r(t);var r=n(138),i=n(1191);function a(){let e={};function t(t,n,i,a={},o=!1){if(!t)throw new Error("event type cannot be null or undefined");if(!n||"function"!=typeof n)throw new Error("listener must be a function: "+n);let s=a.priority||0;if(r(t,n,i)>=0)return;e[t]=e[t]||[];const u={callback:n,scope:i,priority:s,executeOnlyOnce:o};i&&i.getStreamId&&(u.streamId=i.getStreamId()),i&&i.getType&&(u.mediaType=i.getType()),a&&a.mode&&(u.mode=a.mode),e[t].some((n,r)=>{if(n&&s>n.priority)return e[t].splice(r,0,u),!0})||e[t].push(u)}function n(t,n,i){if(!t||!n||!e[t])return;const a=r(t,n,i);a<0||e[t].splice(a,1)}function r(t,n,r){let i=-1;return e[t]?(e[t].some((e,t)=>{if(e&&e.callback===n&&(!r||r===e.scope))return i=t,!0}),i):i}return{on:function(e,n,r,i={}){t(e,n,r,i)},once:function(e,n,r,i={}){t(e,n,r,i,!0)},off:n,trigger:function(t,r={},a={}){if(!t||!e[t])return;if((r=r||{}).hasOwnProperty("type"))throw new Error("'type' is a reserved word for event dispatching");r.type=t,a.streamId&&(r.streamId=a.streamId),a.mediaType&&(r.mediaType=a.mediaType);const o=[];e[t].filter(e=>!(!e||a.streamId&&e.streamId&&e.streamId!==a.streamId||a.mediaType&&e.mediaType&&e.mediaType!==a.mediaType||a.mode&&e.mode&&e.mode!==a.mode||!e.mode&&a.mode&&a.mode===i.default.EVENT_MODE_ON_RECEIVE)).forEach(e=>{e&&e.callback.call(e.scope,r),e.executeOnlyOnce&&o.push(e)}),o.forEach(e=>{n(t,e.callback,e.scope)})},reset:function(){e={}}}}a.__dashjs_factory_name="EventBus";const o=r.default.getSingletonFactory(a);o.EVENT_PRIORITY_LOW=0,o.EVENT_PRIORITY_HIGH=5e3,r.default.updateSingletonFactory(a.__dashjs_factory_name,o),t.default=o},138:function(e,t,n){n.r(t);const r=function(){let e,t=[];const n={},r={};function i(e,n){for(const r in t){const i=t[r];if(i.context===e&&i.name===n)return i.instance}return null}function a(e,t){return t[e]}function o(e,t,n){e in n&&(n[e]=t)}function s(t,n,r){let i;const a=t.__dashjs_factory_name,o=n[a];if(o){let a=o.instance;if(!o.override)return a.apply({context:n,factory:e},r);i=t.apply({context:n},r),a=a.apply({context:n,factory:e,parent:i},r);for(const e in a)i.hasOwnProperty(e)&&(i[e]=a[e])}else i=t.apply({context:n},r);return i.getClassName=function(){return a},i}return e={deleteSingletonInstances:function(e){t=t.filter(t=>t.context!==e)},extend:function(e,t,n,r){!r[e]&&t&&(r[e]={instance:t,override:n})},getClassFactory:function(e){let t=a(e.__dashjs_factory_name,r);return t||(t=function(t){return void 0===t&&(t={}),{create:function(){return s(e,t,arguments)}}},r[e.__dashjs_factory_name]=t),t},getClassFactoryByName:function(e){return a(e,r)},getSingletonFactory:function(e){let r=a(e.__dashjs_factory_name,n);return r||(r=function(n){let r;return void 0===n&&(n={}),{getInstance:function(){return r||(r=i(n,e.__dashjs_factory_name)),r||(r=s(e,n,arguments),t.push({name:e.__dashjs_factory_name,context:n,instance:r})),r}}},n[e.__dashjs_factory_name]=r),r},getSingletonFactoryByName:function(e){return a(e,n)},getSingletonInstance:i,setSingletonInstance:function(e,n,r){for(const i in t){const a=t[i];if(a.context===e&&a.name===n)return void(t[i].instance=r)}t.push({name:n,context:e,instance:r})},updateClassFactory:function(e,t){o(e,t,r)},updateSingletonFactory:function(e,t){o(e,t,n)}},e}();t.default=r},8261:function(e,t,n){n.r(t);var r=n(138),i=n(7263),a=n(649),o=n(5212),s=n(7568),u=n(8850),l=n(3621),c=n(4246);function f(){let e;const t=this.context,n=(0,u.default)(t).getInstance(),r={"streaming.delay.liveDelay":l.default.SETTING_UPDATED_LIVE_DELAY,"streaming.delay.liveDelayFragmentCount":l.default.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,"streaming.liveCatchup.enabled":l.default.SETTING_UPDATED_CATCHUP_ENABLED,"streaming.liveCatchup.playbackRate.min":l.default.SETTING_UPDATED_PLAYBACK_RATE_MIN,"streaming.liveCatchup.playbackRate.max":l.default.SETTING_UPDATED_PLAYBACK_RATE_MAX,"streaming.abr.rules.throughputRule.active":l.default.SETTING_UPDATED_ABR_ACTIVE_RULES,"streaming.abr.rules.bolaRule.active":l.default.SETTING_UPDATED_ABR_ACTIVE_RULES,"streaming.abr.rules.insufficientBufferRule.active":l.default.SETTING_UPDATED_ABR_ACTIVE_RULES,"streaming.abr.rules.switchHistoryRule.active":l.default.SETTING_UPDATED_ABR_ACTIVE_RULES,"streaming.abr.rules.droppedFramesRule.active":l.default.SETTING_UPDATED_ABR_ACTIVE_RULES,"streaming.abr.rules.abandonRequestsRule.active":l.default.SETTING_UPDATED_ABR_ACTIVE_RULES,"streaming.abr.rules.l2ARule.active":l.default.SETTING_UPDATED_ABR_ACTIVE_RULES,"streaming.abr.rules.loLPRule.active":l.default.SETTING_UPDATED_ABR_ACTIVE_RULES,"streaming.abr.maxBitrate.video":l.default.SETTING_UPDATED_MAX_BITRATE,"streaming.abr.maxBitrate.audio":l.default.SETTING_UPDATED_MAX_BITRATE,"streaming.abr.minBitrate.video":l.default.SETTING_UPDATED_MIN_BITRATE,"streaming.abr.minBitrate.audio":l.default.SETTING_UPDATED_MIN_BITRATE},f={debug:{logLevel:a.default.LOG_LEVEL_WARNING,dispatchEvent:!1},streaming:{abandonLoadTimeout:1e4,wallclockTimeUpdateInterval:100,manifestUpdateRetryInterval:100,liveUpdateTimeThresholdInMilliseconds:0,cacheInitSegments:!1,cacheInitSegmentsLimit:50,applyServiceDescription:!0,applyProducerReferenceTime:!0,applyContentSteering:!0,enableManifestDurationMismatchFix:!0,parseInbandPrft:!1,enableManifestTimescaleMismatchFix:!1,capabilities:{filterUnsupportedEssentialProperties:!0,supportedEssentialProperties:[{schemeIdUri:o.default.FONT_DOWNLOAD_DVB_SCHEME},{schemeIdUri:o.default.COLOUR_PRIMARIES_SCHEME_ID_URI,value:/1|5|6|7/},{schemeIdUri:o.default.URL_QUERY_INFO_SCHEME},{schemeIdUri:o.default.EXT_URL_QUERY_INFO_SCHEME},{schemeIdUri:o.default.MATRIX_COEFFICIENTS_SCHEME_ID_URI,value:/0|1|5|6/},{schemeIdUri:o.default.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI,value:/1|6|13|14|15/},{schemeIdUri:o.default.SEGMENT_SEQUENCE_REPRESENTATION_SCHEME_ID_URI},...o.default.THUMBNAILS_SCHEME_ID_URIS.map(e=>({schemeIdUri:e}))],useMediaCapabilitiesApi:!0,filterVideoColorimetryEssentialProperties:!0,filterHDRMetadataFormatEssentialProperties:!0,filterAudioChannelConfiguration:!1},events:{eventControllerRefreshDelay:100,deleteEventMessageDataTimeout:1e4},timeShiftBuffer:{calcFromSegmentTimeline:!1,fallbackToSegmentTimeline:!0},metrics:{maxListDepth:100},delay:{liveDelayFragmentCount:NaN,liveDelay:NaN,useSuggestedPresentationDelay:!0},protection:{keepProtectionMediaKeys:!1,keepProtectionMediaKeysMaximumOpenSessions:-1,ignoreEmeEncryptedEvent:!1,detectPlayreadyMessageFormat:!0,ignoreKeyStatuses:!1},buffer:{enableSeekDecorrelationFix:!1,fastSwitchEnabled:null,flushBufferAtTrackSwitch:!1,reuseExistingSourceBuffers:!0,bufferPruningInterval:10,bufferToKeep:20,bufferTimeAtTopQuality:30,bufferTimeAtTopQualityLongForm:60,initialBufferLevel:NaN,bufferTimeDefault:18,longFormContentDurationThreshold:600,stallThreshold:.3,lowLatencyStallThreshold:.3,useAppendWindow:!0,setStallState:!0,avoidCurrentTimeRangePruning:!1,useChangeType:!0,mediaSourceDurationInfinity:!0,resetSourceBuffersForTrackSwitch:!1,syntheticStallEvents:{enabled:!1,ignoreReadyState:!1}},gaps:{jumpGaps:!0,jumpLargeGaps:!0,smallGapLimit:1.5,threshold:.3,enableSeekFix:!0,enableStallFix:!1,stallSeek:.1,seekOffset:0,checkInterval:250},utcSynchronization:{enabled:!0,useManifestDateHeaderTimeSource:!0,backgroundAttempts:2,timeBetweenSyncAttempts:30,maximumTimeBetweenSyncAttempts:600,minimumTimeBetweenSyncAttempts:2,timeBetweenSyncAttemptsAdjustmentFactor:2,maximumAllowedDrift:100,enableBackgroun
2dSyncAfterSegmentDownloadError:!0,defaultTimingSource:{scheme:"urn:mpeg:dash:utc:http-xsdate:2014",value:"https://time.akamai.com/?iso&ms"},artificialTimeOffsetToApply:0},scheduling:{defaultTimeout:500,lowLatencyTimeout:0,scheduleWhilePaused:!0},text:{defaultEnabled:!0,dispatchForManualRendering:!1,extendSegmentedCues:!0,imsc:{displayForcedOnlyMode:!1,enableRollUp:!0},webvtt:{customRenderingEnabled:!1}},liveCatchup:{maxDrift:NaN,playbackRate:{min:NaN,max:NaN},step:{start:{min:NaN,max:NaN},stop:{min:NaN,max:NaN}},liveThreshold:-1,playbackBufferMin:.5,enabled:null,mode:o.default.LIVE_CATCHUP_MODE_DEFAULT},lastBitrateCachingInfo:{enabled:!0,ttl:36e4},lastMediaSettingsCachingInfo:{enabled:!0,ttl:36e4},saveLastMediaSettingsForCurrentStreamingSession:!0,cacheLoadThresholds:{video:10,audio:5},trackSwitchMode:{audio:o.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE,video:o.default.TRACK_SWITCH_MODE_NEVER_REPLACE},includePreselectionsInMediainfoArray:!0,includePreselectionsForInitialTrackSelection:!1,ignoreSelectionPriority:!1,prioritizeRoleMain:!0,assumeDefaultRoleAsMain:!0,selectionModeForInitialTrack:o.default.TRACK_SELECTION_MODE_LOWEST_STARTUP_DELAY,blacklistExpiryTime:-1,fragmentRequestTimeout:2e4,fragmentRequestProgressTimeout:-1,manifestRequestTimeout:1e4,retryIntervals:{[s.HTTPRequest.MPD_TYPE]:500,[s.HTTPRequest.XLINK_EXPANSION_TYPE]:500,[s.HTTPRequest.MEDIA_SEGMENT_TYPE]:1e3,[s.HTTPRequest.INIT_SEGMENT_TYPE]:1e3,[s.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE]:1e3,[s.HTTPRequest.INDEX_SEGMENT_TYPE]:1e3,[s.HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE]:1e3,[s.HTTPRequest.LICENSE]:1e3,[s.HTTPRequest.LICENSE_CERTIFICATE]:1e3,[s.HTTPRequest.OTHER_TYPE]:1e3,lowLatencyReductionFactor:10},retryAttempts:{[s.HTTPRequest.MPD_TYPE]:3,[s.HTTPRequest.XLINK_EXPANSION_TYPE]:1,[s.HTTPRequest.MEDIA_SEGMENT_TYPE]:3,[s.HTTPRequest.INIT_SEGMENT_TYPE]:3,[s.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE]:3,[s.HTTPRequest.INDEX_SEGMENT_TYPE]:3,[s.HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE]:3,[s.HTTPRequest.LICENSE]:3,[s.HTTPRequest.LICENSE_CERTIFICATE]:3,[s.HTTPRequest.OTHER_TYPE]:3,lowLatencyMultiplyFactor:5},abr:{limitBitrateByPortal:!1,usePixelRatioInLimitBitrateByPortal:!1,limitBitrateByPortalMinimum:0,enableSupplementalPropertyAdaptationSetSwitching:!0,rules:{throughputRule:{active:!0,priority:c.default.PRIORITY.DEFAULT},bolaRule:{active:!0,priority:c.default.PRIORITY.DEFAULT},insufficientBufferRule:{active:!0,priority:c.default.PRIORITY.DEFAULT,parameters:{throughputSafetyFactor:.7,segmentIgnoreCount:2}},switchHistoryRule:{active:!0,priority:c.default.PRIORITY.DEFAULT,parameters:{sampleSize:8,switchPercentageThreshold:.075}},droppedFramesRule:{active:!1,priority:c.default.PRIORITY.DEFAULT,parameters:{minimumSampleSize:375,droppedFramesPercentageThreshold:.15}},abandonRequestsRule:{active:!0,priority:c.default.PRIORITY.DEFAULT,parameters:{abandonDurationMultiplier:1.8,minSegmentDownloadTimeThresholdInMs:500,minThroughputSamplesThreshold:6}},l2ARule:{active:!1,priority:c.default.PRIORITY.DEFAULT},loLPRule:{active:!1,priority:c.default.PRIORITY.DEFAULT}},throughput:{averageCalculationMode:o.default.THROUGHPUT_CALCULATION_MODES.EWMA,lowLatencyDownloadTimeCalculationMode:o.default.LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE.MOOF_PARSING,useResourceTimingApi:!0,useNetworkInformationApi:{xhr:!1,fetch:!1},useDeadTimeLatency:!0,bandwidthSafetyFactor:.9,sampleSettings:{live:3,vod:4,enableSampleSizeAdjustment:!0,decreaseScale:.7,increaseScale:1.3,maxMeasurementsToKeep:20,averageLatencySampleAmount:4},ewma:{throughputSlowHalfLifeSeconds:8,throughputFastHalfLifeSeconds:3,latencySlowHalfLifeCount:2,latencyFastHalfLifeCount:1,weightDownloadTimeMultiplicationFactor:.0015}},maxBitrate:{audio:-1,video:-1},minBitrate:{audio:-1,video:-1},initialBitrate:{audio:-1,video:-1},autoSwitchBitrate:{audio:!0,video:!0}},cmcd:{applyParametersFromMpd:!0,enabled:!1,sid:null,cid:null,rtp:null,rtpSafetyFactor:5,mode:o.default.CMCD_MODE_QUERY,enabledKeys:o.default.CMCD_KEYS,includeInRequests:["segment","mpd"],version:1,eventTargets:[]},cmsd:{enabled:!1,abr:{applyMb:!1,etpWeightRatio:0}}
2,enhancement:{enabled:!1,codecs:["lvc1"]},defaultSchemeIdUri:{viewpoint:"",audioChannelConfiguration:"urn:mpeg:mpegB:cicp:ChannelConfiguration",role:"urn:mpeg:dash:role:2011",accessibility:"urn:mpeg:dash:role:2011"},dvbReporting:{reportingUrl:null}},errors:{recoverAttempts:{mediaErrorDecode:5}}};let d=i.default.clone(f);function h(e,t,a){for(let o in e)e.hasOwnProperty(o)&&(t.hasOwnProperty(o)?"object"!=typeof e[o]||e[o]instanceof RegExp||e[o]instanceof Array||null===e[o]?(t[o]=i.default.clone(e[o]),r[a+o]&&n.trigger(r[a+o])):h(e[o],t[o],a.slice()+o+"."):console.error("Settings parameter "+a+o+" is not supported"))}return e={get:function(){return d},update:function(e){"object"==typeof e&&h(e,d,"")},reset:function(){d=i.default.clone(f)}},e}f.__dashjs_factory_name="Settings";let d=r.default.getSingletonFactory(f);t.default=d},7263:function(e,t,n){n.r(t);var r=n(3282),i=n(5212);class a{static mixin(e,t,n){let r,i={};if(e)for(let o in t)t.hasOwnProperty(o)&&(r=t[o],o in e&&(e[o]===r||o in i&&i[o]===r)||("object"==typeof e[o]&&null!==e[o]?e[o]=a.mixin(e[o],r,n):e[o]=n(r)));return e}static clone(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return new RegExp(e);let t;if(e instanceof Array){t=[];for(let n=0,r=e.length;n<r;++n)n in e&&t.push(a.clone(e[n]))}else t={};return a.mixin(t,e,a.clone)}static addAdditionalQueryParameterToUrl(e,t){try{if(!t||0===t.length)return e;let n=e;return t.forEach(({key:e,value:t})=>{const r=n.includes("?")?"&":"?";n+=`${r}${encodeURIComponent(e)}=${encodeURIComponent(t)}`}),n}catch(t){return e}}static removeQueryParameterFromUrl(e,t){if(!e||!t)return e;const n=new URL(e),r=new URLSearchParams(n.search);if(!r||0===r.size||!r.has(t))return e;r.delete(t);const i=Array.from(r.entries()).map(([e,t])=>`${e}=${t}`).join("&"),a=`${n.origin}${n.pathname}`;return i?`${a}?${i}`:a}static parseHttpHeaders(e){let t={};if(!e)return t;let n=e.trim().split("\r\n");for(let e=0,r=n.length;e<r;e++){let r=n[e],i=r.indexOf(": ");i>0&&(t[r.substring(0,i)]=r.substring(i+2))}return t}static parseQueryParams(e){const t=[],n=new URLSearchParams(e);for(const[e,r]of n.entries())t.push({key:decodeURIComponent(e),value:decodeURIComponent(r)});return t}static generateUuid(){let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?n:3&n|8).toString(16)})}static generateHashCode(e){let t=0;if(0===e.length)return t;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}static getRelativeUrl(e,t){try{const n=new URL(e),i=new URL(t);if(n.protocol=i.protocol,n.origin!==i.origin)return t;let a=r.relative(n.pathname.substr(0,n.pathname.lastIndexOf("/")),i.pathname.substr(0,i.pathname.lastIndexOf("/")));const o=0===a.length?1:0;return a+=i.pathname.substr(i.pathname.lastIndexOf("/")+o,i.pathname.length-1),i.pathname.length<a.length?i.pathname:a}catch(e){return t}}static getHostFromUrl(e){try{return new URL(e).host}catch(e){return null}}static parseUserAgent(e=null){try{const t="string"==typeof e?e.toLowerCase():"undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",n={name:""};return/edg/.test(t)?n.name="edge":/opr|opios/.test(t)?n.name="opera":/chrome|crios/.test(t)?n.name="chrome":/firefox|fxios/.test(t)?n.name="firefox":/safari/.test(t)&&(n.name="safari"),{browser:n}}catch(e){return{}}}static stringHasProtocol(e){return/(http(s?)):\/\//i.test(e)}static bufferSourceToDataView(e){return a.toDataView(e,DataView)}static bufferSourceToInt8(e){return a.toDataView(e,Uint8Array)}static uint8ArrayToString(e){return new TextDecoder("utf-8").decode(e)}static bufferSourceToHex(e){const t=a.bufferSourceToInt8(e);let n="";for(let e of t)e=e.toString(16),1===e.length&&(e="0"+e),n+=e;return n}static toDataView(e,t){const n=a.getArrayBuffer(e);let r=1;"BYTES_PER_ELEMENT"in DataView&&(r=DataView.BYTES_PER_ELEMENT);const i=((e.byteOffset||0)+e.byteLength)/r,o=(e.byteOffset||0)/r,s=Math.floor(Math.max(0,Math.min(o,i)));return new t(n,s,Math.floor(Math.min(s+Math.max(1/0,0),i))-s)}static getArrayBuffer(e){return e instanceof ArrayBuffer?e:e.buffer}static getCodecFamily(e){const{base:t,profile:n}=a._getCodecParts(e);
2switch(t){case"mp4a":switch(n){case"69":case"6b":case"40.34":return i.default.CODEC_FAMILIES.MP3;case"66":case"67":case"68":case"40.2":case"40.02":case"40.5":case"40.05":case"40.29":case"40.42":return i.default.CODEC_FAMILIES.AAC;case"a5":return i.default.CODEC_FAMILIES.AC3;case"e6":return i.default.CODEC_FAMILIES.EC3;case"b2":return i.default.CODEC_FAMILIES.DTSX;case"a9":return i.default.CODEC_FAMILIES.DTSC}break;case"avc1":case"avc3":return i.default.CODEC_FAMILIES.AVC;case"hvc1":case"hvc3":return i.default.CODEC_FAMILIES.HEVC;default:return t}return t}static _getCodecParts(e){const[t,...n]=e.split(".");return{base:t,profile:n.join(".")}}}t.default=a},8986:function(e,t,n){n.r(t),n.d(t,{getVersionString:function(){return i}});const r="5.2.0";function i(){return r}
vendor: 6,820 bytes, line 2
2},893:function(e,t,n){n.r(t);var r=n(8748);class i extends r.default{constructor(){super(),this.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE=10,this.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE=11,this.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE=12,this.SEGMENT_BASE_LOADER_ERROR_CODE=15,this.TIME_SYNC_FAILED_ERROR_CODE=16,this.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE=17,this.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE=18,this.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE=19,this.APPEND_ERROR_CODE=20,this.REMOVE_ERROR_CODE=21,this.DATA_UPDATE_FAILED_ERROR_CODE=22,this.CAPABILITY_MEDIASOURCE_ERROR_CODE=23,this.CAPABILITY_MEDIAKEYS_ERROR_CODE=24,this.DOWNLOAD_ERROR_ID_MANIFEST_CODE=25,this.DOWNLOAD_ERROR_ID_SIDX_CODE=26,this.DOWNLOAD_ERROR_ID_CONTENT_CODE=27,this.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE=28,this.DOWNLOAD_ERROR_ID_XLINK_CODE=29,this.MANIFEST_ERROR_ID_PARSE_CODE=31,this.MANIFEST_ERROR_ID_NOSTREAMS_CODE=32,this.TIMED_TEXT_ERROR_ID_PARSE_CODE=33,this.MANIFEST_ERROR_ID_MULTIPLEXED_CODE=34,this.MEDIASOURCE_TYPE_UNSUPPORTED_CODE=35,this.NO_SUPPORTED_KEY_IDS=36,this.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE="parsing failed for ",this.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE="Failed loading manifest: ",this.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE="Failed loading Xlink element: ",this.SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE="Segments update failed",this.SEGMENTS_UNAVAILABLE_ERROR_MESSAGE="no segments are available yet",this.SEGMENT_BASE_LOADER_ERROR_MESSAGE="error loading segment ranges from sidx",this.TIME_SYNC_FAILED_ERROR_MESSAGE="Failed to synchronize client and server time",this.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE="request is null",this.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE="Failed to resolve a valid URL",this.APPEND_ERROR_MESSAGE="chunk is not defined",this.REMOVE_ERROR_MESSAGE="Removing data from the SourceBuffer",this.DATA_UPDATE_FAILED_ERROR_MESSAGE="Data update failed",this.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE="mediasource is not supported",this.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE="mediakeys is not supported",this.TIMED_TEXT_ERROR_MESSAGE_PARSE="parsing error :",this.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE="Error creating source buffer of type : ",this.NO_SUPPORTED_KEY_IDS_MESSAGE="All possible Adaptation Sets have an invalid key status"}}let a=new i;t.default=a},8748:function(e,t,n){n.r(t),t.default=class{extend(e,t){if(!e)return;let n=!!t&&t.override,r=!!t&&t.publicOnly;for(const t in e)!e.hasOwnProperty(t)||this[t]&&!n||r&&-1===e[t].indexOf("public_")||(this[t]=e[t])}}},5734:function(e,t,n){n.r(t);var r=n(7252);class i extends r.default{constructor(){super(),this.ATTEMPT_BACKGROUND_SYNC="attemptBackgroundSync",this.BUFFERING_COMPLETED="bufferingCompleted",this.BUFFER_CLEARED="bufferCleared",this.BUFFER_REPLACEMENT_STARTED="bufferReplacementStarted",this.BYTES_APPENDED_END_FRAGMENT="bytesAppendedEndFragment",this.CHECK_FOR_EXISTENCE_COMPLETED="checkForExistenceCompleted",this.CMSD_STATIC_HEADER="cmsdStaticHeader",this.CURRENT_TRACK_CHANGED="currentTrackChanged",this.DATA_UPDATE_COMPLETED="dataUpdateCompleted",this.INBAND_EVENTS="inbandEvents",this.INITIAL_STREAM_SWITCH="initialStreamSwitch",this.INIT_FRAGMENT_LOADED="initFragmentLoaded",this.INIT_FRAGMENT_NEEDED="initFragmentNeeded",this.INTERNAL_MANIFEST_LOADED="internalManifestLoaded",this.LOADING_ABANDONED="loadingAborted",this.LOADING_COMPLETED="loadingCompleted",this.LOADING_DATA_PROGRESS="loadingDataProgress",this.LOADING_PROGRESS="loadingProgress",this.MANIFEST_UPDATED="manifestUpdated",this.MEDIAINFO_UPDATED="mediaInfoUpdated",this.MEDIA_FRAGMENT_LOADED="mediaFragmentLoaded",this.MEDIA_FRAGMENT_NEEDED="mediaFragmentNeeded",this.ORIGINAL_MANIFEST_LOADED="originalManifestLoaded",this.QUOTA_EXCEEDED="quotaExceeded",this.SEEK_TARGET="seekTarget",this.SEGMENT_LOCATION_BLACKLIST_ADD="segmentLocationBlacklistAdd",this.SEGMENT_LOCATION_BLACKLIST_CHANGED="segmentLocationBlacklistChanged",this.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD="serviceLocationBlacklistAdd",this.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED="serviceLocationBlacklistChanged",this.SERVICE_LOCATION_LOCATION_BLACKLIST_ADD="serviceLocationLocationBlacklistAdd",this.SERVICE_LOCATION_LOCATION_BLACKLIST_CHANGED="serviceLocationLocationBlacklistChanged",this.SETTING_UPDATED_ABR_ACTIVE_RULES="settingUpdatedAbrActiveRules",this.SETTING_UPDATED_CATCHUP_ENABLED="settingUpdatedCatchupEnabled",this.SETTING_UPDATED_LIVE_DELAY="settingUpdatedLiveDelay",this.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT="settingUpdatedLiveDelayFragmentCount",this.SETTING_UPDATED_MAX_BITRATE="settingUpdatedMaxBitrate",this.SETTING_UPDATED_MIN_BITRATE="settingUpdatedMinBitrate",this.SETTING_UPDATED_PLAYBACK_RATE_MAX="settingUpdatedPlaybackRateMax",this.SETTING_UPDATED_PLAYBACK_RATE_MIN="settingUpdatedPlaybackRateMin",this.SET_FRAGMENTED_TEXT_AFTER_DISABLED="setFragmentedTextAfterDisabled",this.SET_NON_FRAGMENTED_TEXT="setNonFragmentedText",this.SOURCE_BUFFER_ERROR="sourceBufferError",this.STREAMS_COMPOSED="streamsComposed",this.STREAM_BUFFERING_COMPLETED="streamBufferingCompleted",this.STREAM_REQUESTING_COMPLETED="streamRequestingCompleted",this.TEXT_TRACKS_QUEUE_INITIALIZED="textTracksQueueInitialized",this.TIME_SYNCHRONIZATION_COMPLETED="timeSynchronizationComplete",this.UPDATE_TIME_SYNC_OFFSET="updateTimeSyncOffset",this.URL_RESOLUTION_FAILED="urlResolutionFailed",this.VIDEO_CHUNK_RECEIVED="videoChunkReceived",this.VIDEO_ELEMENT_RESIZED="videoElementResized",this.WALLCLOCK_TIME_UPDATED="wallclockTimeUpdated",this.XLINK_ELEMENT_LOADED="xlinkElementLoaded",this.XLINK_READY="xlinkReady"}}t.default=i},3621:function(e,t,n){n.r(t);var r=n(5734);class i extends r.default{}let a=new i;t.default=a},7252:function(e,t,n){n.r(t),t.default=class{extend(e,t){if(!e)return;let n=!!t&&t.override,r=!!t&&t.publicOnly;for(const t in e)!e.hasOwnProperty(t)||this[t]&&!n||r&&-1===e[t].indexOf("public_")||(this[t]=e[t])}}},8854:function(e,t,n){n.r(t),t.default={ACCESSIBILITY:"Accessibility",ADAPTATION_SET:"AdaptationSet",ADAPTATION_SETS:"adaptationSets",ADAPTATION_SET_SWITCHING_SCHEME_ID_URI:"urn:mpeg:dash:adaptation-set-switching:2016",ADD:"add",ASSET_IDENTIFIER:"AssetIdentifier",AUDIO_CHANNEL_CONFIGURATION:"AudioChannelConfiguration",AUDIO_SAMPLING_RATE:"audioSamplingRate",AVAILABILITY_END_TIME:"availabilityEndTime",AVAILABILITY_START_TIME:"availabilityStartTime",AVAILABILITY_TIME_COMPLETE:"availabilityTimeComplete",AVAILABILITY_TIME_OFFSET:"availabilityTimeOffset",BANDWITH:"bandwidth",BASE_URL:"BaseURL",BITSTREAM_SWITCHING:"BitstreamSwitching",BITSTREAM_SWITCHING_MINUS:"bitstreamSwitching",BYTE_RANGE:"byteRange",CAPTION:"caption",CENC_DEFAULT_KID:"cenc:default_KID",CLIENT_DATA_REPORTING:"ClientDataReporting",CLIENT_REQUIREMENT:"clientRequirement",CMCD_PARAMETERS:"CMCDParameters",CODECS:"codecs",CODEC_PRIVATE_DATA:"co
vendor: 3,901 bytes, line 2
2decPrivateData",CODING_DEPENDENCY:"codingDependency",CONTENT_COMPONENT:"ContentComponent",CONTENT_PROTECTION:"ContentProtection",CONTENT_STEERING:"ContentSteering",CONTENT_STEERING_RESPONSE:{VERSION:"VERSION",TTL:"TTL",RELOAD_URI:"RELOAD-URI",PATHWAY_PRIORITY:"PATHWAY-PRIORITY",PATHWAY_CLONES:"PATHWAY-CLONES",BASE_ID:"BASE-ID",ID:"ID",URI_REPLACEMENT:"URI-REPLACEMENT",HOST:"HOST",PARAMS:"PARAMS"},CONTENT_TYPE:"contentType",DEFAULT_SERVICE_LOCATION:"defaultServiceLocation",DEPENDENCY_ID:"dependencyId",DURATION:"duration",DVB_PRIORITY:"dvb:priority",DVB_WEIGHT:"dvb:weight",DVB_URL:"dvb:url",DVB_MIMETYPE:"dvb:mimeType",DVB_FONTFAMILY:"dvb:fontFamily",DYNAMIC:"dynamic",END_NUMBER:"endNumber",ESSENTIAL_PROPERTY:"EssentialProperty",EVENT:"Event",EVENT_STREAM:"EventStream",FORCED_SUBTITLE:"forced-subtitle",FRAMERATE:"frameRate",FRAME_PACKING:"FramePacking",GROUP_LABEL:"GroupLabel",HEIGHT:"height",ID:"id",INBAND:"inband",INBAND_EVENT_STREAM:"InbandEventStream",INDEX:"index",INDEX_RANGE:"indexRange",INITIALIZATION:"Initialization",INITIALIZATION_MINUS:"initialization",K:"k",LA_URL:"Laurl",LA_URL_LOWER_CASE:"laurl",CERT_URL:"Certurl",LABEL:"Label",LANG:"lang",LOCATION:"Location",MAIN:"main",MAXIMUM_SAP_PERIOD:"maximumSAPPeriod",MAX_PLAYOUT_RATE:"maxPlayoutRate",MAX_SEGMENT_DURATION:"maxSegmentDuration",MAX_SUBSEGMENT_DURATION:"maxSubsegmentDuration",MEDIA:"media",MEDIA_PRESENTATION_DURATION:"mediaPresentationDuration",MEDIA_RANGE:"mediaRange",MEDIA_STREAM_STRUCTURE_ID:"mediaStreamStructureId",METRICS:"Metrics",METRICS_MINUS:"metrics",MIME_TYPE:"mimeType",MINIMUM_UPDATE_PERIOD:"minimumUpdatePeriod",MIN_BUFFER_TIME:"minBufferTime",MP4_PROTECTION_SCHEME:"urn:mpeg:dash:mp4protection:2011",MPD:"MPD",MPD_TYPE:"mpd",MPD_PATCH_TYPE:"mpdpatch",ORDER:"order",ORIGINAL_MPD_ID:"mpdId",ORIGINAL_PUBLISH_TIME:"originalPublishTime",PATCH_LOCATION:"PatchLocation",PERIOD:"Period",PRESELECTION:"Preselection",PRESELECTION_COMPONENTS:"preselectionComponents",PRESENTATION_TIME:"presentationTime",PRESENTATION_TIME_OFFSET:"presentationTimeOffset",PRO:"pro",PRODUCER_REFERENCE_TIME:"ProducerReferenceTime",PRODUCER_REFERENCE_TIME_TYPE:{ENCODER:"encoder",CAPTURED:"captured",APPLICATION:"application"},PROFILES:"profiles",PSSH:"pssh",PUBLISH_TIME:"publishTime",QUALITY_RANKING:"qualityRanking",QUERY_BEFORE_START:"queryBeforeStart",QUERY_PART:"$querypart$",RANGE:"range",RATING:"Rating",REF:"ref",REF_ID:"refId",REMOVE:"remove",REPLACE:"replace",REPORTING:"Reporting",REPRESENTATION:"Representation",REPRESENTATION_INDEX:"RepresentationIndex",ROBUSTNESS:"robustness",ROLE:"Role",S:"S",SAR:"sar",SCAN_TYPE:"scanType",SEGMENT_ALIGNMENT:"segmentAlignment",SEGMENT_BASE:"SegmentBase",SEGMENT_LIST:"SegmentList",SEGMENT_PROFILES:"segmentProfiles",SEGMENT_SEQUENCE_PROPERTIES:"SegmentSequenceProperties",SEGMENT_TEMPLATE:"SegmentTemplate",SEGMENT_TIMELINE:"SegmentTimeline",SEGMENT_TYPE:"segment",SEGMENT_URL:"SegmentURL",SERVICE_DESCRIPTION:"ServiceDescription",SERVICE_DESCRIPTION_LATENCY:"Latency",SERVICE_DESCRIPTION_OPERATING_BANDWIDTH:"OperatingBandwidth",SERVICE_DESCRIPTION_OPERATING_QUALITY:"OperatingQuality",SERVICE_DESCRIPTION_PLAYBACK_RATE:"PlaybackRate",SERVICE_DESCRIPTION_SCOPE:"Scope",SERVICE_LOCATION:"serviceLocation",SERVICE_LOCATIONS:"serviceLocations",SOURCE_URL:"sourceURL",START:"start",START_NUMBER:"startNumber",START_WITH_SAP:"startWithSAP",STATIC:"static",STEERING_TYPE:"steering",SUBSET:"Subset",SUBTITLE:"subtitle",SUB_REPRESENTATION:"SubRepresentation",SUB_SEGMENT_ALIGNMENT:"subsegmentAlignment",SUGGESTED_PRESENTATION_DELAY:"suggestedPresentationDelay",SUPPLEMENTAL_PROPERTY:"SupplementalProperty",SUPPLEMENTAL_CODECS:"scte214:supplementalCodecs",TAG:"tag",TIMESCALE:"timescale",TIMESHIFT_BUFFER_DEPTH:"timeShiftBufferDepth",TTL:"ttl",TYPE:"type",UTC_TIMING:"UTCTiming",VALUE:"value",VIEWPOINT:"Viewpoint",WALL_CLOCK_TIME:"wallClockTime",WIDTH:"width"}},9302:function(e,t,n){
2n.r(t);var r=n(8062),i=n(9415),a=n(9578),o=n(4770),s=n(5212),u=n(5915),l=n(6455),c=n(8854),f=n(1944),d=n(649),h=n(1036),g=n(893),p=n(1465),m=n(7153),E=n(138),T=n(5274),y=n(6517),_=n(7393),S=n(4740),I=n(7408),A=n(2436),R=n(2655),b=n(5876),v=n(6503),C=n(5717),N=n(7263),D=n(7356);function w(){let e,t,n,E;const w=this.context,M=(0,v.default)(w).getInstance(),P=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};function O(e,t){if(!e)throw new Error("adaptation is not defined");if(!t)throw new Error("type is not defined");if(e.Representation&&e.Representation.length){const n=W(e.Representation[0]);if(n&&n.some(e=>s.default.THUMBNAILS_SCHEME_ID_URIS.indexOf(e.schemeIdUri)>=0))return t===s.default.IMAGE}if(e.ContentComponent&&e.ContentComponent.length>0){if(e.ContentComponent.length>1)return t===s.default.MUXED;if(e.ContentComponent[0].contentType===t)return!0}const n=t===s.default.TEXT?new RegExp("(ttml|vtt|wvtt|stpp)"):new RegExp(t);if(e.Representation&&e.Representation.length){const t=e.Representation[0].codecs;if(n.test(t))return!0}if(e.hasOwnProperty(c.default.MIME_TYPE))return n.test(e.mimeType);if(e.Representation){let t;for(let r=0;r<e.Representation.length;r++)if(t=e.Representation[r],t.hasOwnProperty(c.default.MIME_TYPE))return n.test(t.mimeType)}return!1}function L(e){if(!e)throw new Error("adaptation is not defined");if(e.hasOwnProperty(c.default.SEGMENT_TEMPLATE)||e.hasOwnProperty(c.default.SEGMENT_TIMELINE)||e.hasOwnProperty(c.default.SEGMENT_LIST)||e.hasOwnProperty(c.default.SEGMENT_BASE))return!0;if(e.Representation&&e.Representation.length>0){const t=e.Representation[0];if(t.hasOwnProperty(c.default.SEGMENT_TEMPLATE)||t.hasOwnProperty(c.default.SEGMENT_TIMELINE)||t.hasOwnProperty(c.default.SEGMENT_LIST)||t.hasOwnProperty(c.default.SEGMENT_BASE))return!0}return!1}function U(e){return O(e,s.default.TEXT)}function x(e){return e&&e.Representation&&e.Representation.sort((e,t)=>e.bandwidth-t.bandwidth),e}function F(e,t){return e&&e.Period&&P(t)&&e.Period[t]?e.Period[t].AdaptationSet:[]}function k(e){return e&&e.Period?e.Period:[]}function B(e,t,n){let r=null;if(e&&e.Representation&&e.Representation.length>0){const i=P(t)&&t>=0&&t<e.Representation.length?e.Representation[t]:e.Representation[0];i&&(r=i.mimeType+';codecs="'+i.codecs+'"',n&&void 0!==i.width&&(r+=';width="'+i.width+'";height="'+i.height+'"'))}return r&&(r=r.replace(/\sprofiles=[^;]*/g,"")),r}function H(e){const t=G(e);return t&&t.length>0}function G(e){let t=[];if(!e)return t;const n=Y(e);return t=t.concat(n),e.hasOwnProperty(c.default.ADAPTATION_SET)&&e[c.default.ADAPTATION_SET].length>0&&e[c.default.ADAPTATION_SET].forEach(e=>{const n=Y(e);t=t.concat(n)}),t}function Y(e){return e&&e.hasOwnProperty(c.default.CONTENT_PROTECTION)&&0!==e.ContentProtection.length?e[c.default.CONTENT_PROTECTION].map(e=>{const t=new u.default;return t.init(e),t}):[]}function V(e){let t=!1;return e&&e.hasOwnProperty("type")&&(t=e.type===c.default.DYNAMIC),t}function q(e){if(!e)return null;const t=e[c.default.FRAMERATE];if(!t)return null;if("string"==typeof t&&t.includes("/")){const[e,n]=t.split("/").map(e=>parseInt(e,10));if(!isNaN(e)&&!isNaN(n)&&0!==n)return e/n}return parseInt(t)}function K(e,t){return t&&t.hasOwnProperty(e)&&t[e].length?t[e].map(e=>{const t=new h.default;return t.init(e),t}):[]}function j(e,t){if(!t)return[];let n=function(e,t){if(!t||!t.length)return[];let n=t[0][e]||[];return 0===n.length?[]:1===t.length?n:n.filter(n=>t.slice(1).every(t=>t.hasOwnProperty(e)&&t[e].some(e=>e.schemeIdUri===n.schemeIdUri&&e.value===n.value)))}(e,t[c.default.REPRESENTATION]);return t.hasOwnProperty(e)&&t[e].length&&t[e].forEach(e=>{n.some(t=>t.schemeIdUri===e.schemeIdUri&&t.value===e.value)||n.push(e)}),n.map(e=>{const t=new h.default;return t.init(e),t})}function W(e){return K(c.default.ESSENTIAL_PROPERTY,e)}function z(e){return K(c.default.SUPPLEMENTAL_PROPERTY,e)}function $(e){return e&&e.hasOwnProperty(c.default.SEGMENT_SEQUENCE_PROPERTIES)&&e[c.default.SEGMENT_SEQUENCE_PROPERTIES].length?e[c.default.SEGMENT_SEQUENCE_PROPERTIES].map(e=>{const t=new D.default(e);return t.init(e),t}):[]}function Q(e,t,n,r,i,a){const o=new b.default;!function(e,t,n,r,i){if(e.index=i,e.adaptation=n,e.mediaInfo=r,t.hasOwnProperty(c.default.ID)&&(e.id=t.id),t.hasOwnProperty(c.default.CODECS)&&(e.codecs=t.codecs,e.codecFamily=N.default.getCodecFamily(e.codecs)),t.hasOwnProperty(c.default.DEPENDENCY_ID)){const n=t[c.default.DEPENDENCY_ID].toString().split(" ")[0];e.dependencyId=n,e.dependentRepresentation=new b.default,e.dependentRepresentation.id=n}t.hasOwnProperty(c.default.MIME_TYPE)&&(e.mimeType=t[c.default.MIME_TYPE]),t.hasOwnProperty(c.default.CODEC_PRIVATE_DATA)&&(e.codecPrivateData=t.codecPrivateData),t.hasOwnProperty(c.default.BANDWITH)&&(e.bandwidth=t.bandwidth,e.bitrateInKbit=t.bandwidth/1e3),t.hasOwnProperty(c.default.WIDTH)&&(e.width=t.width),t.hasOwnProperty(c.default.HEIGHT)&&(e.height=t.height),t.hasOwnProperty(c.default.SCAN_TYPE)&&(e.scanType=t.scanType),t.hasOwnProperty(c.default.FRAMERATE)&&(e.frameRate=q(t)),t.hasOwnProperty(c.default.QUALITY_RANKING)&&(e.qualityRanking=t[c.default.QUALITY_RANKING]),t.hasOwnProperty(c.default.MAX_PLAYOUT_RATE)&&(e.maxPlayoutRate=t.maxPlayoutRate),e.essentialProperties=W(t),e.supplementalProperties=z(t),e.segmentSequenceProperties=$(t),e.path=[n.period.index,n.index,i]}(o,t,n,e,a);const{segmentInfo:s,segmentInfoType:u}=function(e){let t,n;return e.hasOwnProperty(c.default.SEGMENT_BASE)?(t=e.SegmentBase,n=c.default.SEGMENT_BASE):e.hasOwnProperty(c.default.SEGMENT_LIST)?(t=e.SegmentList,n=t.hasOwnProperty(c.default.SEGMENT_TIMELINE)?c.default.SEGMENT_TIMELINE:c.default.SEGMENT_LIST):e.hasOwnProperty(c.default.SEGMENT_TEMPLATE)?(t=e.SegmentTemplate,n=t.hasOwnProperty(c.default.SEGMENT_TIMELINE)?c.default.SEGMENT_TIMELINE:c.default.SEGMENT_TEMPLATE):n=c.default.BASE_URL,{segmentInfo:t,segmentInfoType:n}}(t);return o.segmentInfoType=u,function(e,t,n,r,i,a){if(e){if(e.hasOwnProperty(c.default.INITIALIZATION_MINUS)&&(n.initialization=e.initialization.split("$Bandwidth$").join(i.bandwidth).split("$RepresentationID$").join(i.id)),e.hasOwnProperty(c.default.INITIALIZATION)){const t=e.Initialization;t.hasOwnProperty(c.default.SOURCE_URL)&&(n.initialization=t.sourceURL),t.hasOwnProperty(c.default.RANGE)&&(n.range=t.range)}else U(r)&&L(r)&&r.mimeType&&-1===r.mimeType.indexOf("application/mp4")&&(n.range=0);e.hasOwnProperty(c.default.TIMESCALE)&&(n.timescale=e.timescale),e.hasOwnProperty(c.default.DURATION)?n.segmentDuration=e.duration/n.timescale:t===c.default.SEGMENT_TIMELINE&&(n.segmentDuration=function(e){if(!e||!e.S)return NaN;let t=e.S[0],n=e.S[1];return t.hasOwnProperty("d")?t.d:n.t-t.t}(e.SegmentTimeline)/n.timescale,n.k=function(e){if(!e||!e.S)return 1;const t=e.S[0];return t.hasOwnProperty(c.default.K)?t.k:1}(e.SegmentTimeline)),e.hasOwnProperty(c.default.MEDIA)&&(n.media=e.media),e.hasOwnProperty(c.default.K)&&
2(n.k=e.k||1),e.hasOwnProperty(c.default.START_NUMBER)&&(n.startNumber=parseInt(e.startNumber)),e.hasOwnProperty(c.default.INDEX_RANGE)&&(n.indexRange=e.indexRange),e.hasOwnProperty(c.default.PRESENTATION_TIME_OFFSET)&&(n.presentationTimeOffset=e.presentationTimeOffset/n.timescale),e.hasOwnProperty(c.default.AVAILABILITY_TIME_OFFSET)?n.availabilityTimeOffset=e.availabilityTimeOffset:a&&void 0!==a.availabilityTimeOffset&&(n.availabilityTimeOffset=a.availabilityTimeOffset),e.hasOwnProperty(c.default.AVAILABILITY_TIME_COMPLETE)?n.availabilityTimeComplete="false"!==e.availabilityTimeComplete:a&&void 0!==a.availabilityTimeComplete&&(n.availabilityTimeComplete=a.availabilityTimeComplete),e.hasOwnProperty(c.default.END_NUMBER)&&(n.endNumber=e[c.default.END_NUMBER]),n.mseTimeOffset=function(e){const t=e.presentationTimeOffset;return e.adaptation.period.start-t}(n)}}(s,u,o,r,t,i),function(e){isNaN(e.width)||isNaN(e.height)||isNaN(e.frameRate)||(e.pixelsPerSecond=Math.max(1,e.width*e.height*e.frameRate),isNaN(e.bandwidth)||(e.bitsPerPixel=e.bandwidth/e.pixelsPerSecond))}(o),o}function X(e){return O(e,s.default.MUXED)?s.default.MUXED:O(e,s.default.AUDIO)?s.default.AUDIO:function(e){return O(e,s.default.VIDEO)}(e)?s.default.VIDEO:U(e)?s.default.TEXT:function(e){return O(e,s.default.IMAGE)}(e)?s.default.IMAGE:(t.warn("Unknown Preselection stream type"),null)}function Z(e,t){if(e&&e.hasOwnProperty(c.default.PRESELECTION_COMPONENTS)&&Array.isArray(t))return String(e.preselectionComponents).split(" ").map(e=>t.find(t=>t.id===e))}function J(e,t){if(!e||!e.hasOwnProperty(c.default.PRESELECTION_COMPONENTS)||!Array.isArray(t))return;const n=String(e.preselectionComponents).split(" ");return t.find(e=>e.id===n[0])}function ee(e,t){if(!e)throw new Error("Period cannot be null or undefined");let n=I.default.DEFAULT_ID+"_"+t;return e.hasOwnProperty(c.default.ID)&&e.id.toString().length>0&&"__proto__"!==e.id&&(n=e.id.toString()),n}function te(e,t,n){const r=[];let i;if(!e)return r;for(i=0;i<e.length;i++){const a=new m.default;if(a.timescale=1,a.representation=t,!e[i].hasOwnProperty(s.default.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");a.schemeIdUri=e[i].schemeIdUri,e[i].hasOwnProperty(c.default.TIMESCALE)&&(a.timescale=e[i].timescale),e[i].hasOwnProperty(c.default.VALUE)&&(a.value=e[i].value),r.push(a),a.period=n}return r}function ne(e){const t=[],n=e.BaseURL||[e.baseUri];let r=!1;return n.some(n=>{if(n){const a=new i.default;let o=n.__text||n;return M.isRelative(o)&&(r=!0,e.baseUri&&(o=M.resolve(o,e.baseUri))),a.url=o,n.hasOwnProperty(c.default.SERVICE_LOCATION)&&n.serviceLocation.length?a.serviceLocation=n.serviceLocation:a.serviceLocation=o,n.hasOwnProperty(c.default.DVB_PRIORITY)&&(a.dvbPriority=n[c.default.DVB_PRIORITY]),n.hasOwnProperty(c.default.DVB_WEIGHT)&&(a.dvbWeight=n[c.default.DVB_WEIGHT]),n.hasOwnProperty(c.default.AVAILABILITY_TIME_OFFSET)&&(a.availabilityTimeOffset=n[c.default.AVAILABILITY_TIME_OFFSET]),n.hasOwnProperty(c.default.AVAILABILITY_TIME_COMPLETE)&&(a.availabilityTimeComplete="false"!==n[c.default.AVAILABILITY_TIME_COMPLETE]),t.push(a),r}}),t}function re(e){const t=new l.default;return t.serverUrl=e.__text,e.hasOwnProperty(c.default.DEFAULT_SERVICE_LOCATION)&&(t.defaultServiceLocation=e[c.default.DEFAULT_SERVICE_LOCATION],t.defaultServiceLocationArray=t.defaultServiceLocation.split(" ")),e.hasOwnProperty(c.default.QUERY_BEFORE_START)&&(t.queryBeforeStart="true"===e[c.default.QUERY_BEFORE_START].toLowerCase()),e.hasOwnProperty(c.default.CLIENT_REQUIREMENT)&&(t.clientRequirement="false"!==e[c.default.CLIENT_REQUIREMENT].toLowerCase()),t}function ie(e){const t=new o.default,n=e.schemeIdUri||e[c.default.CMCD_PARAMETERS]?.schemeIdUri,r=[s.default.CTA_5004_2023_SCHEME,s.default.CTA_5004_2025_SCHEME].includes(n);return e.hasOwnProperty(c.default.CMCD_PARAMETERS)&&r&&(t.cmcdParameters=new a.default,t.cmcdParameters.init(e[c.default.CMCD_PARAMETERS])),e.hasOwnProperty(c.default.SERVICE_LOCATIONS)&&""!==e[c.default.SERVICE_LOCATIONS]&&(t.serviceLocations=e[c.default.SERVICE_LOCATIONS],t.serviceLocationsArray=t.serviceLocations.toString().split(" ")),e.hasOwnProperty(c.default.ADAPTATION_SETS)&&""!==e[c.default.ADAPTATION_SETS]&&(t.adaptationSets=e[c.default.ADAPTATION_SETS],t.adaptationSetsArray=t.adaptationSets.toString().split(" ")),t}return e={getAccessibilityForAdaptation:function(e){return e&&e.hasOwnProperty(c.default.ACCESSIBILITY)&&e[c.default.ACCESSIBILITY].length?e[c.default.ACCESSIBILITY].map(e=>{const t=new h.default;return t.init(e),t}):[]},getAdaptationForId:function(e,t,n){const r=F(t,n);let i,a;for(i=0,a=r.length;i<a;i++)if(r[i].hasOwnProperty(c.default.ID)&&r[i].id===e)return r[i];return null},getAdaptationForIndex:function(e,t,n){const r=F(t,n);return r.length>0&&P(e)?r[e]:null},getAdaptationsForPeriod:function(e){const t=e&&P(e.index)?e.mpd.manifest.Period[e.index]:null,n=[];let i,a,o;if(t&&t.AdaptationSet)for(o=0;o<t.AdaptationSet.length;o++)a=t.AdaptationSet[o],i=new r.default,a.hasOwnProperty(c.default.ID)&&(i.id=a.id),i.index=o,i.period=e,i.type=X(a),n.push(i);return n},getAdaptationsForType:function(e,t,n){const r=F(e,t);let i,a;const o=[];for(i=0,a=r.length;i<a;i++)O(r[i],n)&&o.push(x(r[i]));return o},getAudioChannelConfigurationForAdaptation:function(e){return e&&e.hasOwnProperty(c.default.AUDIO_CHANNEL_CONFIGURATION)&&e[c.default.AUDIO_CHANNEL_CONFIGURATION].length?e[c.default.AUDIO_CHANNEL_CONFIGURATION].map(e=>{const t=new h.default;return t.init(e),t}):[]},getAudioChannelConfigurationForRepresentation:function(e){return e&&e.hasOwnProperty(c.default.AUDIO_CHANNEL_CONFIGURATION)&&e[c.default.AUDIO_CHANNEL_CONFIGURATION].length?e[c.default.AUDIO_CHANNEL_CONFIGURATION].map(e=>{const t=new h.default;return t.init(e),t}):[]},getAvailabilityStartTime:function(e){return e&&e.hasOwnProperty(c.default.AVAILABILITY_START_TIME)&&null!==e.availabilityStartTime?e.availabilityStartTime.getTime():null},getBandwidth:function(e){return e&&e.bandwidth?e.bandwidth:NaN},getBaseURLsFromElement:ne,getBitrateListForAdaptation:function(e){const t=x(e);return(t&&t.Representation?t.Representation:[]).map(e=>({bandwidth:e.bandwidth,width:e.width||0,height:e.height||0,scanType:e.scanType||null,id:e.id||null}))},getCodec:B,getCodecForPreselection:function(e,n,r){let i=null;if(e&&n){let a=B(J(e,n),0,r);if(e.hasOwnProperty(c.default.CODECS)){let n=e.codecs;i=a.replace(/(codecs=")[^"]*(")/,`$1${n}$2`),t.info("Preselection has own codecs-attribute: replacing in MainAdaptationSet (was: "+a+"), new Preselection codec is: "+i)}else i=a}return i},getCombinedEssentialPropertiesForAdaptationSet:function(e){return j(c.default.ESSENTIAL_PROPERTY,e)},getCombinedSupplementalPropertiesForAdaptationSet:function(e){return j(c.default.SUPPLEMENTAL_PROPERTY,e)},getContentProtectionByAdaptation:function(e){return Y(e)},getContentProtectionByManifest:function(e){let t=[];if(!e)return t;const n=Y(e);return t=t.concat(n),e.hasOwnProperty(c.default.PERIOD)&&e[c.default.PERIOD].length>
20&&e[c.default.PERIOD].forEach(e=>{const n=G(e);t=t.concat(n)}),t},getContentProtectionByPeriod:G,getContentSteering:function(e){if(e&&e.hasOwnProperty(c.default.CONTENT_STEERING))return re(e[c.default.CONTENT_STEERING][0])},getDuration:function(e){let t;return t=e&&e.hasOwnProperty(c.default.MEDIA_PRESENTATION_DURATION)?e.mediaPresentationDuration:e&&"dynamic"===e.type?Number.POSITIVE_INFINITY:Number.MAX_SAFE_INTEGER||Number.MAX_VALUE,t},getEssentialProperties:W,getEventStreamForAdaptationSet:function(e,t,n){let r,i,a;return e&&e.Period&&t&&t.period&&P(t.period.index)&&(i=e.Period[t.period.index],i&&i.AdaptationSet&&P(t.index)&&(a=i.AdaptationSet[t.index],a&&(r=a.InbandEventStream))),te(r,null,n)},getEventStreamForRepresentation:function(e,t,n){let r,i,a,o;return e&&e.Period&&t&&t.adaptation&&t.adaptation.period&&P(t.adaptation.period.index)&&(i=e.Period[t.adaptation.period.index],i&&i.AdaptationSet&&P(t.adaptation.index)&&(a=i.AdaptationSet[t.adaptation.index],a&&a.Representation&&P(t.index)&&(o=a.Representation[t.index],o&&(r=o.InbandEventStream)))),te(r,t,n)},getEventsForPeriod:function(e){const t=e&&e.mpd&&e.mpd.manifest?e.mpd.manifest:null,n=t?t.Period:null,r=n&&e&&P(e.index)?n[e.index].EventStream:null,i=[];let a,o;if(r)for(a=0;a<r.length;a++){const t=new m.default;if(t.period=e,t.timescale=1,!r[a].hasOwnProperty(s.default.SCHEME_ID_URI))throw new Error("Invalid EventStream. SchemeIdUri has to be set");for(t.schemeIdUri=r[a][s.default.SCHEME_ID_URI],r[a].hasOwnProperty(c.default.TIMESCALE)&&(t.timescale=r[a][c.default.TIMESCALE]),r[a].hasOwnProperty(c.default.VALUE)&&(t.value=r[a][c.default.VALUE]),r[a].hasOwnProperty(c.default.PRESENTATION_TIME_OFFSET)&&(t.presentationTimeOffset=r[a][c.default.PRESENTATION_TIME_OFFSET]),o=0;r[a].Event&&o<r[a].Event.length;o++){const n=r[a].Event[o],s=new p.default;s.presentationTime=0,s.eventStream=t,n.hasOwnProperty(c.default.PRESENTATION_TIME)&&(s.presentationTime=n.presentationTime);const u=t.presentationTimeOffset?t.presentationTimeOffset/t.timescale:0;s.calculatedPresentationTime=s.presentationTime/t.timescale+e.start-u,n.hasOwnProperty(c.default.DURATION)&&(s.duration=n.duration/t.timescale),n.hasOwnProperty(c.default.ID)?s.id=parseInt(n.id):s.id=null,n.Signal&&n.Signal.Binary&&n.Signal.Binary.__text?s.messageData=E.decodeArray(n.Signal.Binary.__text.toString()):s.messageData=n.messageData||n.__cdata||n.__text,i.push(s)}}return i},getFramerate:q,getId:function(e){return e&&e[c.default.ID]||null},getIndexForAdaptation:function(e,t,n){if(!e)return-1;const r=F(t,n);for(let t=0;t<r.length;t++)if((0,_.default)(w).getInstance().areEqual(r[t],e))return t;return-1},getIsDynamic:V,getIsFragmented:L,getIsText:U,getIsTypeOf:O,getLabelsForAdaptation:function(e){if(!e||!e.Label)return[];const t=[];for(let n=0;n<e.Label.length;n++)t.push({lang:e.Label[n].lang,text:e.Label[n].__text||e.Label[n]});return t},getLanguageForAdaptation:function(e){let t="";return e&&e.hasOwnProperty(c.default.LANG)&&(t=e.lang),t},getLocation:function(e){return e&&e.hasOwnProperty(c.default.LOCATION)?e[c.default.LOCATION].map(e=>{const t=e.__text||e,n=e.hasOwnProperty(c.default.SERVICE_LOCATION)?e[c.default.SERVICE_LOCATION]:null;return new y.default(t,n)}):[]},getMainAdaptationSetForPreselection:J,getCommonRepresentationForPreselection:function(e,t){if(!e||!Array.isArray(t))return;const n=J(e,t);return n?n.Representation[0]:void 0},getManifestUpdatePeriod:function(e,t=0){let n=NaN;return e&&e.hasOwnProperty(c.default.MINIMUM_UPDATE_PERIOD)&&(n=e.minimumUpdatePeriod),isNaN(n)?n:Math.max(n-t,1)},getMimeType:function(e){return e&&e.Representation&&e.Representation.length>0?e.Representation[0].mimeType:null},getMpd:function(e){const t=new T.default;return e&&(t.manifest=e,e.hasOwnProperty(c.default.AVAILABILITY_START_TIME)?t.availabilityStartTime=new Date(e.availabilityStartTime.getTime()):e.loadedTime&&(t.availabilityStartTime=new Date(e.loadedTime.getTime())),e.hasOwnProperty(c.default.AVAILABILITY_END_TIME)&&(t.availabilityEndTime=new Date(e.availabilityEndTime.getTime())),e.hasOwnProperty(c.default.MINIMUM_UPDATE_PERIOD)&&(t.minimumUpdatePeriod=e.minimumUpdatePeriod),e.hasOwnProperty(c.default.MEDIA_PRESENTATION_DURATION)&&(t.mediaPresentationDuration=e.mediaPresentationDuration),e.hasOwnProperty(c.default.SUGGESTED_PRESENTATION_DELAY)&&(t.suggestedPresentationDelay=e.suggestedPresentationDelay),e.hasOwnProperty(c.default.TIMESHIFT_BUFFER_DEPTH)&&(t.timeShiftBufferDepth=e.timeShiftBufferDepth),e.hasOwnProperty(c.default.MAX_SEGMENT_DURATION)&&(t.maxSegmentDuration=e.maxSegmentDuration),e.hasOwnProperty(c.default.PUBLISH_TIME)&&(t.publishTime=new Date(e.publishTime))),t},getPatchLocation:function(e){return e&&e.hasOwnProperty(c.default.PATCH_LOCATION)?e[c.default.PATCH_LOCATION].map(e=>{const t=e.__text||e,n=e.hasOwnProperty(c.default.SERVICE_LOCATION)?e[c.default.SERVICE_LOCATION]:null;let r=e.hasOwnProperty(c.default.TTL)?1e3*parseFloat(e[c.default.TTL]):NaN;return new S.default(t,n,r)}):[]},getPreselectionIsTypeOf:function(e,t,n){if(!e)throw new Error("preselection is not defined");if(!t)throw new Error("adaptations is not defined");if(!n)throw new Error("type is not defined");const r=J(e,t);return!!r&&O(r,n)},getPreselectionsForPeriod:function(e){const n=e&&P(e.index)?e.mpd.manifest.Period[e.index]:null,r=[];let i,a,o;if(n&&n.Preselection)for(o=0;o<n.Preselection.length;o++){a=n.Preselection[o],i=new A.default;const s=Z(a,n.AdaptationSet);s.every(e=>!!e)&&1===s.length?(a.hasOwnProperty(c.default.ID)&&(i.id=a.id),i.index=o,i.period=e,a.hasOwnProperty(c.default.TAG)&&(i.tag=a.tag),a.hasOwnProperty(c.default.PRESELECTION_COMPONENTS)?i.preselectionComponents=s:t.warn("Preselection (index: "+i.index+") missing component(s)"),a.hasOwnProperty(c.default.ORDER)&&(i.order=a.order),i.type=X(s[0]),r.push(i)):t.warn("Preselection removed because we don't support multi-representation preselections or not all c
2omponents available.")}return r},getProducerReferenceTimesForAdaptation:function(e){const t=e&&e.hasOwnProperty(c.default.PRODUCER_REFERENCE_TIME)?e[c.default.PRODUCER_REFERENCE_TIME]:[];(e&&e.hasOwnProperty(c.default.REPRESENTATION)?e[c.default.REPRESENTATION]:[]).forEach(e=>{e.hasOwnProperty(c.default.PRODUCER_REFERENCE_TIME)&&t.push(...e[c.default.PRODUCER_REFERENCE_TIME])});const n=[];return t.forEach(e=>{const t=new R.default;e.hasOwnProperty(c.default.ID)&&(t[c.default.ID]=parseInt(e[c.default.ID]),e.hasOwnProperty(c.default.WALL_CLOCK_TIME)&&(t[c.default.WALL_CLOCK_TIME]=e[c.default.WALL_CLOCK_TIME],e.hasOwnProperty(c.default.PRESENTATION_TIME)&&(t[c.default.PRESENTATION_TIME]=e[c.default.PRESENTATION_TIME],e.hasOwnProperty(c.default.INBAND)&&(t[c.default.INBAND]="false"!==e[c.default.INBAND]),e.hasOwnProperty(c.default.TYPE)&&(t[c.default.TYPE]=e[c.default.TYPE]),n.push(t))))}),n},getPublishTime:function(e){return e&&e.hasOwnProperty(c.default.PUBLISH_TIME)?new Date(e[c.default.PUBLISH_TIME]):null},getRealPeriodForIndex:function(e,t){const n=k(t);return n.length>0&&P(e)?n[e]:null},getRealPeriods:k,getRegularPeriods:function(e){const r=!!e&&V(e.manifest),i=[];let a,o,u=null,l=null,d=null,h=null;for(o=0,a=e&&e.manifest&&e.manifest.Period?e.manifest.Period.length:0;o<a;o++)l=e.manifest.Period[o],l.hasOwnProperty(c.default.START)?(h=new I.default,h.start=l.start):null!==u&&u.hasOwnProperty(c.default.DURATION)&&null!==d?(h=new I.default,h.start=parseFloat((d.start+d.duration).toFixed(5))):0!==o||r||(h=new I.default,h.start=0),null!==d&&isNaN(d.duration)&&(null!==h?d.duration=parseFloat((h.start-d.start).toFixed(5)):t.warn("First period duration could not be calculated because lack of start and duration period properties. This will cause timing issues during playback")),null!==h&&(h.id=ee(l,o),h.index=o,h.mpd=e,h.isEncrypted=H(l),l.hasOwnProperty(c.default.DURATION)&&(h.duration=l.duration),d&&(d.nextPeriodId=h.id),i.push(h),u=l,d=h),l=null,h=null;return 0===i.length||null!==d&&isNaN(d.duration)&&(d.duration=parseFloat((function(e){!function(){if(!n||!n.hasOwnProperty("error"))throw new Error(s.default.MISSING_CONFIG_ERROR)}();const t=V(e.mpd.manifest);let r;return e.mpd.manifest.mediaPresentationDuration?r=e.mpd.manifest.mediaPresentationDuration:e.duration?r=e.duration:t?r=Number.POSITIVE_INFINITY:n.error(new f.default(g.default.MANIFEST_ERROR_ID_PARSE_CODE,"Must have @mediaPresentationDuration on MPD or an explicit @duration on the last period.",e)),r}(d)-d.start).toFixed(5))),i},getRepresentationCount:function(e){return e&&e.Representation?e.Representation.length:0},getRepresentationFor:function(e,t){return t&&t.Representation&&t.Representation.length>0&&P(e)?t.Representation[e]:null},getRepresentationSortFunction:function(){return(e,t)=>e.bandwidth-t.bandwidth},getRepresentationsForAdaptation:function(e,t){const n=[],r=function(e){if(e&&e.period&&P(e.period.index)){const t=e.period.mpd.manifest.Period[e.period.index];if(t&&t.AdaptationSet&&P(e.index))return x(t.AdaptationSet[e.index])}}(e);let i;if(r&&r.Representation){if(e&&e.period&&P(e.period.index)){const t=ne(e.period.mpd.manifest);t&&(i=t[0])}for(let a=0,o=r.Representation.length;a<o;++a){const o=Q(t,r.Representation[a],e,r,i,a);n.push(o)}}return n},getRolesForAdaptation:function(e){return e&&e.hasOwnProperty(c.default.ROLE)&&e[c.default.ROLE].length?e[c.default.ROLE].map(e=>{e.schemeIdUri===s.default.DASH_ROLE_SCHEME_ID&&"Main"===e.value&&(e.value=c.default.MAIN);const t=new h.default;return t.init(e),t}):[]},getSegmentAlignment:function(e){return!(!e||!e.hasOwnProperty(c.default.SEGMENT_ALIGNMENT))&&"true"===e[c.default.SEGMENT_ALIGNMENT]},getSegmentSequencePropertiesForAdaptationSet:function(e){const t=[];return e?(t.push(...$(e)),e.Representation&&e.Representation.length&&e.Representation.forEach(e=>{t.push(...$(e))}),t):t},getSelectionPriority:function(e){try{const t=e&&void 0!==e.selectionPriority?parseInt(e.selectionPriority):1;return isNaN(t)?1:t}catch(e){return 1}},getServiceDescriptions:function(e){const t=[];if(e&&e.hasOwnProperty(c.default.SERVICE_DESCRIPTION))for(const n of e.ServiceDescription){let e=null,r=null,i=null,a=null,o=null,s=null,u=null,l=null;for(const t in n)if(n.hasOwnProperty(t))if(t===c.default.ID)e=n[t];
2else if(t===c.default.SERVICE_DESCRIPTION_SCOPE)r=n[t].schemeIdUri;else if(t===c.default.SERVICE_DESCRIPTION_LATENCY)i={target:parseInt(n[t].target),max:parseInt(n[t].max),min:parseInt(n[t].min),referenceId:parseInt(n[t].referenceId)};else if(t===c.default.SERVICE_DESCRIPTION_PLAYBACK_RATE)a={max:parseFloat(n[t].max),min:parseFloat(n[t].min)};else if(t===c.default.SERVICE_DESCRIPTION_OPERATING_QUALITY)o={mediaType:n[t].mediaType,max:parseInt(n[t].max),min:parseInt(n[t].min),target:parseInt(n[t].target),type:n[t].type,maxQualityDifference:parseInt(n[t].maxQualityDifference)};else if(t===c.default.SERVICE_DESCRIPTION_OPERATING_BANDWIDTH)s={mediaType:n[t].mediaType,max:parseInt(n[t].max),min:parseInt(n[t].min),target:parseInt(n[t].target)};else if(t===c.default.CONTENT_STEERING){let e=n[t];e=Array.isArray(e)?e.at(e.length-1):e,u=re(e)}else t===c.default.CLIENT_DATA_REPORTING&&(l=ie(n[t]));t.push({id:e,schemeIdUri:r,latency:i,playbackRate:a,operatingQuality:o,operatingBandwidth:s,contentSteering:u,clientDataReporting:l})}return t},getSubSegmentAlignment:function(e){return!(!e||!e.hasOwnProperty(c.default.SUB_SEGMENT_ALIGNMENT))&&"true"===e[c.default.SUB_SEGMENT_ALIGNMENT]},getSuggestedPresentationDelay:function(e){return e&&e.hasOwnProperty(c.default.SUGGESTED_PRESENTATION_DELAY)?e.suggestedPresentationDelay:null},getSupplementalProperties:z,getUTCTimingSources:function(e){const t=V(e),n=!!e&&e.hasOwnProperty(c.default.AVAILABILITY_START_TIME),r=e?e.UTCTiming:null,i=[];return(t||n)&&r&&r.forEach(function(e){const t=new C.default;e.hasOwnProperty(s.default.SCHEME_ID_URI)&&(t.schemeIdUri=e.schemeIdUri,e.hasOwnProperty(c.default.VALUE)&&(t.value=e.value.toString(),i.push(t)))}),i},getViewpointForAdaptation:function(e){return e&&e.hasOwnProperty(c.default.VIEWPOINT)&&e[c.default.VIEWPOINT].length?e[c.default.VIEWPOINT].map(e=>{const t=new h.default;return t.init(e),t}):[]},hasProfile:function(e,t){let n=!1;return e&&e.profiles&&e.profiles.length>0&&(n=-1!==e.profiles.indexOf(t)),n},isPeriodEncrypted:H,setConfig:function(e){e&&(e.errHandler&&(n=e.errHandler),e.BASE64&&(E=e.BASE64))}},t=(0,d.default)(w).getInstance().getLogger(e),e}w.__dashjs_factory_name="DashManifestModel",t.default=E.default.getSingletonFactory(w)},8062:function(e,t,n){n.r(t),t.default=class{constructor(){this.period=null,this.index=-1,this.id=null,this.type=null}}},9415:function(e,t,n){n.r(t);class r{constructor(e,t,n,r){this.url=e||"",this.serviceLocation=t||e||"",this.dvbPriority=n||1,this.dvbWeight=r||1,this.availabilityTimeOffset=0,this.availabilityTimeComplete=!0,this.queryParams={}}}r.DEFAULT_DVB_PRIORITY=1,r.DEFAULT_DVB_WEIGHT=1,t.default=r},9578:function(e,t,n){n.r(t);var r=n(1036),i=n(5212);class a extends r.default{constructor(){super(),this.version=null,this.sessionID=null,this.contentID=null,this.mode=null,this.keys=null,this.includeInRequests=null}init(e){super.init(e),e&&(this.version=e.version?parseInt(e.version):null,this.sessionID=e.sessionID,this.contentID=e.contentID,this.mode=e.mode??"query",this.keys=e.keys?e.keys.split(" "):null,this.includeInRequests=e.includeInRequests?e.includeInRequests.split(" "):[i.default.CMCD_DEFAULT_INCLUDE_IN_REQUESTS],this.schemeIdUri=e.schemeIdUri)}}t.default=a},4770:function(e,t,n){n.r(t),t.default=class{constructor(){this.adaptationSets=null,this.adaptationSetsArray=[],this.cmcdParameters=null,this.serviceLocations=null,this.serviceLocationsArray=[]}}},5915:function(e,t,n){n.r(t);var r=n(1349),i=n(1036),a=n(8854);class o extends i.default{constructor(){super(),this.ref=null,this.refId=null,this.robustness=null,this.keyId=null,this.cencDefaultKid=null,this.pssh=null,this.pro=null,this.laUrl=null,this.certUrls=[]}init(e){if(super.init(e),e){this.ref=e.hasOwnProperty(a.default.REF)?e[a.default.REF]:null,this.refId=e.hasOwnProperty(a.default.REF_ID)?e[a.default.REF_ID]:null,this.robustness=e.hasOwnProperty(a.default.ROBUSTNESS)?e[a.default.ROBUSTNESS]:null,this.cencDefaultKid=e.hasOwnProperty(a.default.CENC_DEFAULT_KID)?e[a.default.CENC_DEFAULT_KID]:null,this.pssh=e.hasOwnProperty(a.default.PSSH)?e[a.default.PSSH]:null,this.pro=e.hasOwnProperty(a.default.PRO)?e[a.default.PRO]:null,this.laUrl=e.hasOwnProperty(a.default.LA_URL)?e[a.default.LA_URL]:e.hasOwnProperty(a.default.LA_URL_LOWER_CASE)?e[a.default.LA_URL_LOWER_CASE]:null;const t=Object.keys(e).find(e=>e.toLowerCase()===a.default.CERT_URL.toLowerCase()),n=t?e[t]:null;this.certUrls=r.default.normalizeCertUrls(n)}}mergeAttributesFromReference(e){if(["schemeIdUri","value","id","robustness","cencDefaultKid","pro","pssh","laUrl"].forEach(t=>{null===this[t]&&(this[t]=e[t])}),e.certUrls&&e.certUrls.length){const t=new Set(this.certUrls.map(e=>`${e.url}||${e.certType||""}`));
2e.certUrls.forEach(e=>{const n=`${e.url}||${e.certType||""}`;t.has(n)||this.certUrls.push({url:e.url,certType:e.certType||null})})}}}t.default=o},6455:function(e,t,n){n.r(t),t.default=class{constructor(){this.defaultServiceLocation=null,this.defaultServiceLocationArray=[],this.queryBeforeStart=!1,this.serverUrl=null,this.clientRequirement=!0}}},1036:function(e,t,n){n.r(t);var r=n(8854);t.default=class{constructor(){this.schemeIdUri=null,this.value=null,this.id=null}init(e){e&&(this.schemeIdUri=e.schemeIdUri?e.schemeIdUri:null,this.value=null!==e.value&&void 0!==e.value?e.value.toString():null,this.id=e.id?e.id:null,e[r.default.DVB_URL]&&(this.dvbUrl=e[r.default.DVB_URL]),e[r.default.DVB_MIMETYPE]&&(this.dvbMimeType=e[r.default.DVB_MIMETYPE]),e[r.default.DVB_FONTFAMILY]&&(this.dvbFontFamily=e[r.default.DVB_FONTFAMILY]))}inArray(e){return!!e&&e.some(e=>this.schemeIdUri===e.schemeIdUri&&(this.value?this.value.toString().match(e.value):"".match(e.value)))}}},1465:function(e,t,n){n.r(t),t.default=class{constructor(){this.type="",this.duration=NaN,this.presentationTime=NaN,this.id=NaN,this.messageData="",this.eventStream=null,this.presentationTimeDelta=NaN,this.parsedMessageData=null}}},7153:function(e,t,n){n.r(t),t.default=class{constructor(){this.adaptionSet=null,this.representation=null,this.period=null,this.timescale=1,this.value="",this.schemeIdUri="",this.presentationTimeOffset=0}}},5274:function(e,t,n){n.r(t),t.default=class{constructor(){this.availabilityEndTime=Number.POSITIVE_INFINITY,this.availabilityStartTime=null,this.manifest=null,this.maxSegmentDuration=Number.POSITIVE_INFINITY,this.mediaPresentationDuration=NaN,this.minimumUpdatePeriod=NaN,this.publishTime=null,this.suggestedPresentationDelay=0,this.timeShiftBufferDepth=Number.POSITIVE_INFINITY}}},6517:function(e,t,n){n.r(t),t.default=class{constructor(e,t){this.url=e||"",this.serviceLocation=t||null,this.queryParams={}}}},4740:function(e,t,n){n.r(t),t.default=class{constructor(e,t,n){this.url=e||"",this.serviceLocation=t||null,this.ttl=n||NaN,this.queryParams={}}}},7408:function(e,t,n){n.r(t);class r{constructor(){this.id=null,this.index=-1,this.duration=NaN,this.start=NaN,this.mpd=null,this.nextPeriodId=null,this.isEncrypted=!1}}r.DEFAULT_ID="defaultId",t.default=r},2436:function(e,t,n){n.r(t),t.default=class{constructor(){this.period=null,this.index=-1,this.id=1,this.type=null,this.tag=null,this.order="undefined",this.preselectionComponents=[]}}},2655:function(e,t,n){n.r(t),t.default=class{constructor(){this.id=null,this.inband=!1,this.type="encoder",this.applicationScheme=null,this.wallClockTime=null,this.presentationTime=NaN,this.UTCTiming=null}}},5876:function(e,t,n){n.r(t);var r=n(8854);t.default=class{constructor(){this.absoluteIndex=NaN,this.adaptation=null,this.availabilityTimeComplete=!0,this.availabilityTimeOffset=0,this.bandwidth=NaN,this.bitrateInKbit=NaN,this.bitsPerPixel=NaN,this.codecFamily=null,this.co
2decPrivateData=null,this.codecs=null,this.dependencyId=null,this.dependentRepresentation=null,this.endNumber=null,this.essentialProperties=[],this.fragmentDuration=null,this.frameRate=null,this.height=NaN,this.id=null,this.indexRange=null,this.initialization=null,this.k=1,this.maxPlayoutRate=NaN,this.mediaFinishedInformation={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN},this.mediaInfo=null,this.mimeType=null,this.mseTimeOffset=NaN,this.pixelsPerSecond=NaN,this.presentationTimeOffset=0,this.qualityRanking=NaN,this.range=null,this.scanType=null,this.segments=null,this.segmentDuration=NaN,this.segmentInfoType=null,this.segmentSequenceProperties=[],this.supplementalProperties=[],this.startNumber=1,this.timescale=1,this.width=NaN}hasInitialization(){return null!==this.initialization||null!==this.range}hasSegments(){return this.segmentInfoType!==r.default.BASE_URL&&this.segmentInfoType!==r.default.SEGMENT_BASE&&!this.indexRange}isBootstrapRepresentation(){return!(!this.segmentSequenceProperties||0===this.segmentSequenceProperties.length)&&this.segmentSequenceProperties.some(e=>e.isBootstrapConfiguration())}}},7356:function(e,t,n){n.r(t),t.default=class{constructor(){this.cadence=1,this.sapType=0,this.event=!0,this.alignment=null}init(e){e&&(this.cadence=void 0===e.cadence||isNaN(e.cadence)?1:e.cadence,this.sapType=void 0===e.sapType||isNaN(e.sapType)?0:e.sapType,this.event=void 0===e.event||e.event,this.alignment=void 0!==e.alignment?e.alignment:null)}isBootstrapConfiguration(){return 1===this.cadence&&(0===this.sapType||1===this.sapType)}}},5717:function(e,t,n){n.r(t),t.default=class{constructor(){this.schemeIdUri="",this.value=""}}},9839:function(e,t,n){n.r(t),n.d(t,{default:function(){return eo}});var r=n(138),i=n(4246),o={TCP_CONNECTION:"TcpList",HTTP_REQUEST:"HttpList",TRACK_SWITCH:"RepSwitchList",BUFFER_LEVEL:"BufferLevel",BUFFER_LOADED:"bufferLoaded",ABANDON_LOAD:"abandonload",ALLOW_LOAD:"allowload",BUFFER_EMPTY:"bufferStalled",BUFFER_STATE:"BufferState",DVR_INFO:"DVRInfo",DROPPED_FRAMES:"DroppedFrames",SCHEDULING_INFO:"SchedulingInfo",REQUESTS_QUEUE:"RequestsQueue",MANIFEST_UPDATE:"ManifestUpdate",MANIFEST_UPDATE_STREAM_INFO:"ManifestUpdatePeriodInfo",MANIFEST_UPDATE_TRACK_INFO:"ManifestUpdateRepresentationInfo",PLAY_LIST:"PlayList",DVB_ERRORS:"DVBErrors",HTTP_REQUEST_DVB_REPORTING_TYPE:"DVBReporting"},u=n(649),l=n(8261);function c(e){e=e||{};const t=this.context,n=e.dashMetrics;let r,a,s;return r={getSwitchRequest:function(e){try{const r=(0,i.default)(t).create();r.rule=this.getClassName();const s=e.getMediaInfo(),u=e.getMediaType(),l=n.getCurrentBufferState(u),c=e.getScheduleController(),f=e.getAbrController(),d=e.getStreamInfo(),h=d?d.id:null,g=d&&d.manifestInfo?d.manifestInfo.isDynamic:null,p=e.getThroughputController(),m=p.getSafeAverageThroughput(u),E=p.getAverageLatency(u);return isNaN(m)||!l||f.getAbandonmentStateFor(h,u)===o.ALLOW_LOAD&&(l.state===o.BUFFER_LOADED||g)&&(r.representation=f.getOptimalRepresentationForBitrate(s,m,!0),r.priority=a.get().streaming.abr.rules.throughputRule.priority,r.reason={throughput:m,latency:E,message:`[ThroughputRule]: Switching to Representation with bitrate ${r.representation?r.representation.bitrateInKbit:"n/a"} kbit/s. Throughput: ${m}`},c.setTimeToLoadDelay(0)),r}catch(e){return s.error(e),(0,i.default)(t).create()}},reset:function(){}},s=(0,u.default)(t).getInstance().getLogger(r),a=(0,l.default)(t).getInstance(),r}c.__dashjs_factory_name="ThroughputRule";var f=r.default.getClassFactory(c),d=n(8850),h=n(3621),g=n(5212),p=n(1191);function m(e){e=e||{};const t=this.context,n=(0,d.default)(t).getInstance(),r=e.dashMetrics,a=(0,l.default)(t).getInstance();let s,c,f;function m(){const e=a.get().streaming.abr.rules.insufficientBufferRule.parameters.segmentIgnoreCount;f={},f[g.default.VIDEO]={ignoreCount:e},f[g.default.AUDIO]={ignoreCount:e},f[g.default.ENHANCEMENT]={ignoreCount:e}}function E(){m()}function T(e){isNaN(e.startTime)||e.mediaType!==g.default.AUDIO&&e.mediaType!==g.default.VIDEO||f[e.mediaType].ignoreCount>0&&f[e.mediaType].ignoreCount--}return s={getSwitchRequest:function(e){const n=(0,i.default)(t).create();if(n.rule=this.getClassName(),!e||!e.hasOwnProperty("getMediaType"))return n;const s=e.getMediaType(),u=r.getCurrentBufferState(s),l=e.getRepresentation().fragmentDuration;if(!function(e,t,n){return!e.getLowLatencyModeEnabled()&&f[t].ignoreCount<=0&&n}(e.getScheduleController().getPlaybackController(),s,l))return n;const d=e.getMediaInfo(),h=e.getAbrController();if(u&&u.state===o.BUFFER_EMPTY)c.debug("["+s+"] Switch to index 0; buffer is empty."),n.representation=h.getOptimalRepresentationForBitrate(d,0,!0),n.reason={message:"[InsufficientBufferRule]: Switching to lowest Representation because buffer is empty"};else{const t=e.getThroughputController(),i=r.getCurrentBufferLevel(s),o=t.getAverageThroughput(s,null,NaN)*a.get().streaming.abr.rules.insufficientBufferRule.parameters.throughputSafetyFactor*i/l;if(isNaN(o)||o<=0)return n;n.representation=h.getOptimalRepresentationForBitrate(d,o,!0),n.priority=a.get().streaming.abr.rules.insufficientBufferRule.priority,n.reason={message:"[InsufficientBufferRule]: Limiting maximum bitrate to avoid a buffer underrun.",bitrate:o}}return n},reset:function(){m(),n.off(p.default.PLAYBACK_SEEKING,E,s),n.off(h.default.BYTES_APPENDED_END_FRAGMENT,T,s)}},c=(0,u.default)(t).getInstance().getLogger(s),m(),n.on(p.default.PLAYBACK_SEEKING,E,s),n.on(h.default.BYTES_APPENDED_END_FRAGMENT,T,s),s}m.__dashjs_factory_name="InsufficientBufferRule";var E=r.default.getClassFactory(m);function T(e){const t=(e=e||{}).mediaPlayerModel,n=e.dashMetrics,r=this.context,a=(0,l.default)(r).getInstance();let o,s,c;function f(){c={}}return o={shouldAbandon:function(e){const o=(0,i.default)(r).create();o.rule=this.getClassName();try{if(!e)return o;const r=e.getCurrentRequest();if(!isNaN(r.index)){if(null===r.firstByteDate||c.hasOwnProperty(r.index))return o;const i=t.getBufferTimeDefault(),s=e.getMediaType();if(n.getCurrentBufferLevel(s)>i)return o;const u=Date.now()-r.firstByteDate.getTime();if(r.traces.length>=a.get().streaming.abr.rules.abandonRequestsRule.parameters.minThroughputSamplesThreshold&&u>a.get().streaming.abr.rules.abandonRequestsRule.parameters.minSegmentDownloadTimeThresholdInMs&&r.bytesLoaded<r.bytesTotal)return function(e,t,n){const r=e.getMediaInfo(),i=e.getMediaType(),o=t.traces.reduce((e,t)=>
2e+t.b[0],0)-t.traces[0].b[0],s=Math.max(t.traces.reduce((e,t)=>e+t.d,0)-t.traces[0].d,1),u=Math.round(8*o/s),l=Number(8*t.bytesTotal/u/1e3).toFixed(2),f=e.getRepresentation(),d=e.getAbrController();if(l<t.duration*a.get().streaming.abr.rules.abandonRequestsRule.parameters.abandonDurationMultiplier||d.isPlayingAtLowestQuality(f))return n;if(!c.hasOwnProperty(t.index)){const o=e.getAbrController(),s=t.bytesTotal-t.bytesLoaded,l=o.getOptimalRepresentationForBitrate(r,u,!0),f=t.representation;s>t.bytesTotal*l.bitrateInKbit/f.bitrateInKbit&&(n.representation=l,n.priority=a.get().streaming.abr.rules.abandonRequestsRule.priority,n.reason={throughputInKbit:u,message:`[AbandonRequestRule][${i} is asking to abandon and switch to quality to ${l.absoluteIndex}. The measured bandwidth was ${u} kbit/s`},c[t.index]=!0)}return n}(e,r,o)}return o}catch(e){return s.error(e),o}},reset:f},s=(0,u.default)(r).getInstance().getLogger(o),f(),o}T.__dashjs_factory_name="AbandonRequestsRule";var y=r.default.getClassFactory(T);function _(){const e=this.context,t=(0,l.default)(e).getInstance();let n;return n={getSwitchRequest:function(n){const r=(0,i.default)(e).create();if(r.rule=this.getClassName(),!n||!n.hasOwnProperty("getDroppedFramesHistory"))return r;const a=n.getDroppedFramesHistory();if(!a)return r;const o=n.getStreamInfo().id,s=n.getMediaInfo(),u=n.getAbrController(),l=a.getFrameHistory(o);if(!l||0===Object.keys(l).length)return r;let c=0,f=0;const d=u.getPossibleVoRepresentationsFilteredBySettings(s,!0);let h=null;for(let e=1;e<d.length;e++){const n=d[e];if(n&&l[n.id]&&(c=l[n.id].droppedVideoFrames,f=l[n.id].totalVideoFrames,f>t.get().streaming.abr.rules.droppedFramesRule.parameters.minimumSampleSize&&c/f>t.get().streaming.abr.rules.droppedFramesRule.parameters.droppedFramesPercentageThreshold)){h=d[e-1];break}}return h&&(r.representation=h,r.priority=t.get().streaming.abr.rules.droppedFramesRule.priority,r.reason={droppedFrames:c,message:`[DroppedFramesRule]: Switching to index ${h.absoluteIndex}. Dropped Frames: ${c}, Total Frames: ${f}`}),r}},n}_.__dashjs_factory_name="DroppedFramesRule";var S=r.default.getClassFactory(_);function I(){const e=this.context,t=(0,l.default)(e).getInstance();let n;return n={getSwitchRequest:function(n){const r=(0,i.default)(e).create();if(r.rule=this.getClassName(),!n)return r;const a=n.getStreamInfo().id,o=n.getMediaType(),s=n?n.getSwitchRequestHistory():null,u=s?s.getSwitchRequests(a,o):{},l=n.getAbrController(),c=n.getMediaInfo(),f=l.getPossibleVoRepresentationsFilteredBySettings(c,!0);let d=0,h=0;for(let e=0;e<f.length;e++){const n=f[e];if(n&&u[n.id]&&(d+=u[n.id].drops,h+=u[n.id].noDrops,d+h>=t.get().streaming.abr.rules.switchHistoryRule.parameters.sampleSize&&d/h>t.get().streaming.abr.rules.switchHistoryRule.parameters.switchPercentageThreshold)){r.representation=e>0&&u[n.id].drops>0?f[e-1]:n,r.priority=t.get().streaming.abr.rules.switchHistoryRule.priority,r.reason={drops:d,noDrops:h,message:`[SwitchHistoryRule]: Switch to index: ${r.representation.absoluteIndex} samples: ${d+h} drops: ${d}`};break}}return r}},n}I.__dashjs_factory_name="SwitchHistoryRule";var A=r.default.getClassFactory(I),R=n(7568);const b="BOLA_STATE_ONE_BITRATE",v="BOLA_STATE_STARTUP",C="BOLA_STATE_STEADY",N=10;function D(e){e=e||{};const t=this.context,n=e.dashMetrics,r=e.mediaPlayerModel,a=(0,d.default)(t).getInstance(),s=pe(t).getInstance();let c,f,m,E;function T(e){const t=e.mediaType,n=e.streamId,r=t===g.default.AUDIO?[g.default.AUDIO]:E[n];for(const e in r)E[n]&&E[n].hasOwnProperty(e)&&E[n][e].state===C&&(E[n][e].placeholderBuffer=0)}function y(e){const t=e.streamId;for(const e in E[t])if(E[t].hasOwnProperty(e)){const n=E[t][e];n.state!==b&&(n.state=v,_(n))}}function _(e){e.placeholderBuffer=0,e.mostAdvancedSegmentStart=NaN,e.lastSegmentWasReplacement=!1,e.lastSegmentStart=NaN,e.lastSegmentDurationS=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN}function S(e){try{if(e&&e.metric===o.HTTP_REQUEST&&e.value&&e.value.type===R.HTTPRequest.MEDIA_SEGMENT_TYPE&&e.value.trace&&e.value.trace.length){const t=E[e.value._streamId]&&E[e.value._streamId][e.mediaType]?E[e.value._streamId][e.mediaType]:null;t&&t.state!==b&&(t.lastSegmentRequestTimeMs=e.value.trequest.getTime(),t.lastSegmentFinishTimeMs=e.value._tfinish.getTime(),I(t,e.mediaType))}}catch(e){f.error(e)}}function I(e,t){if(!isNaN(e.lastSegmentStart)&&!isNaN(e.lastSegmentRequestTimeMs)&&!isNaN(e.placeholderBuffer)){if(e.placeholderBuffer*=.99,!isNaN(e.lastSegmentFinishTimeMs)){const r=n.getCurrentBufferLevel(t)+.001*(e.lastSegmentFinishTimeMs-e.lastSegmentRequestTimeMs),i=M(e,e.currentRepresentation),a=Math.max(0,i-r);e.placeholderBuffer=Math.min(a,e.placeholderBuffer)}e.lastSegmentWasReplacement&&!isNaN(e.lastSegmentDurationS)&&(e.placeholderBuffer+=e.lastSegmentDurationS),e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN}}function A(e){if(e&&E[e.streamId]&&E[e.streamId][e.mediaType]){const t=E[e.streamId][e.mediaType];t&&t.state!==b&&(t.currentRepresentation=e.newRepresentation)}}function D(e,t,n){const r=n.reduce((e,t,r)=>t>n[e]?r:e,0);if(0===r)return null;const i=Math.max(e,N+2*t.length),a=(n[r]-1)/(i/N-1);return{gp:a,Vp:N/a}}function w(e,t){const i=r.getBufferTimeDefault();if(e.bufferTimeDefault!==i){const r=D(i,e.representations,e.utilities);if(r.Vp!==e.Vp||r.gp!==e.gp){const a=n.getCurrentBufferLevel(t);let o=a+e.placeholderBuffer;o-=N,o*=r.Vp/e.Vp,o+=N,e.bufferTimeDefault=i,e.Vp=r.Vp,e.gp=r.gp,e.placeholderBuffer=Math.max(0,o-a)}}}function M(e,t){return e.Vp*(e.utilities[t.absoluteIndex]+e.gp)}function P(e){if(e&&e.chunk&&e.chunk.representation.mediaInfo&&E[e.streamId]){const t=E[e.streamId][e.chunk.representation.mediaInfo.type];if(t&&t.state!==b){const n=e.chunk.start;isNaN(t.mostAdvancedSegmentStart)||n>t.mostAdvancedSegmentStart?(t.mostAdvancedSegmentStart=n,t.lastSegmentWasReplacement=!1):t.lastSegmentWasReplacement=!0,t.lastSegmentStart=n,t.lastSegmentDurationS=e.chunk.duration,t.currentRepresentation=e.chunk.representation,I(t,e.chunk.representation.mediaInfo.type)}}}function O(){F()}function L(){m.get().streaming.abr.limitBitrateByPortal&&F()}function U(e,t){const n=t.absoluteIndex,r=t.bandwidth,i=e.utilities[n];let a=0;for(let t=n-1;t>=0;--t)if(e.utilities[t]<e.utilities[n]){const n=e.representations[t].bandwidth,o=e.utilities[t],s=e.Vp*(e.gp+(r*o-n*i)/(r-n));a=Math.max(a,s)}return a}function x(e){if(e&&E[e.streamId]){const t=E[e.streamId][e.mediaType];if(t&&t.state!==b){const r=n.getCurrentBufferLevel(e.mediaType);let i;i=t.currentRepresentation.absoluteIndex>0?U(t,t.currentRepresentation):N;const a=Math.max(0,i-r);t.placeholderBuffer=Math.min(t.placeholderBuffer,a)}}}
2function F(){E={}}return c={getSwitchRequest:function(e){try{const a=(0,i.default)(t).create();e.getScheduleController().setTimeToLoadDelay(0),a.rule=this.getClassName(),a.reason=a.reason||{};const o=function(e){const t=e.getMediaType(),n=e.getStreamInfo().id;E[n]||(E={},E[n]={});let i=E[n][t];return i?i.state!==b&&w(i,t):(i=function(e){const t={},n=e.getMediaInfo(),i=s.getPossibleVoRepresentationsFilteredBySettings(n,!0);let a=i.map(e=>e.bandwidth).map(e=>Math.log(e));a=a.map(e=>e-a[0]+1);const o=r.getBufferTimeDefault(),u=D(o,i,a);return u?(t.state=v,t.representations=i,t.utilities=a,t.bufferTimeDefault=o,t.Vp=u.Vp,t.gp=u.gp,t.currentRepresentation=null,_(t)):t.state=b,t}(e),E[n][t]=i),i}(e);switch(a.reason.state=o.state,o.state){case b:break;case v:!function(e,t,r){const i=t.getMediaType(),a=t.getThroughputController().getSafeAverageThroughput(i);if(isNaN(a))return;const o=t.getMediaInfo(),u=s.getOptimalRepresentationForBitrate(o,a,!0),l=n.getCurrentBufferLevel(i);e.representation=u,e.reason.throughput=a,r.placeholderBuffer=Math.max(0,U(r,u)-l),r.currentRepresentation=u,!isNaN(r.lastSegmentDurationS)&&l>=r.lastSegmentDurationS&&(r.state=C)}(a,e,o);break;case C:!function(e,t,r){const i=t.getMediaType(),a=t.getThroughputController(),o=t.getMediaInfo(),u=a.getSafeAverageThroughput(i),l=t.getScheduleController();!function(e,t){const n=Date.now();if(isNaN(e.lastSegmentFinishTimeMs)){if(!isNaN(e.lastCallTimeMs)){const t=.001*(n-e.lastCallTimeMs);e.placeholderBuffer+=Math.max(0,t)}}else{const t=.001*(n-e.lastSegmentFinishTimeMs);e.placeholderBuffer+=Math.max(0,t)}e.lastCallTimeMs=n,e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN,w(e,t)}(r,i);const c=n.getCurrentBufferLevel(i);let f=function(e,t){const n=e.representations.length;let r=NaN,i=NaN;for(let a=0;a<n;++a){let n=(e.Vp*(e.utilities[a]-1+e.gp)-t)/e.representations[a].bandwidth;(isNaN(i)||n>=i)&&(i=n,r=a)}return e.representations[r]}(r,c+r.placeholderBuffer);const d=s.getOptimalRepresentationForBitrate(o,u,!0);f.absoluteIndex>r.currentRepresentation.absoluteIndex&&f.absoluteIndex>d.absoluteIndex&&(f=d.absoluteIndex>r.currentRepresentation.absoluteIndex?d:r.currentRepresentation);let h=Math.max(0,c+r.placeholderBuffer-M(r,f));h<=r.placeholderBuffer?(r.placeholderBuffer-=h,h=0):(h-=r.placeholderBuffer,r.placeholderBuffer=0,s.isPlayingAtTopQuality(f)?h=0:l.setTimeToLoadDelay(1e3*h)),e.representation=f,e.reason.throughput=u,e.reason.bufferLevel=c,e.reason.placeholderBuffer=r.placeholderBuffer,e.reason.delay=h,r.currentRepresentation=f}(a,e,o);break;default:!function(e,t,n){f.debug("BOLA ABR rule invoked in bad state.");const r=t.getMediaInfo(),i=t.getMediaType(),a=t.getThroughputController().getSafeAverageThroughput(i);e.representation=s.getOptimalRepresentationForBitrate(r,a,!0),e.reason.state=n.state,e.reason.throughput=a,n.state=v,_(n)}(a,e,o)}return a.priority=m.get().streaming.abr.rules.bolaRule.priority,a}catch(e){return f.error(e),(0,i.default)(t).create()}},handleNewMediaInfo:function(e){e&&e.streamInfo&&e.type&&E[e.streamInfo.id]&&E[e.streamInfo.id][e.type]&&delete E[e.streamInfo.id][e.type]},reset:function(){F(),a.off(p.default.BUFFER_EMPTY,T,c),a.off(p.default.PLAYBACK_SEEKING,y,c),a.off(p.default.METRIC_ADDED,S,c),a.off(p.default.QUALITY_CHANGE_REQUESTED,A,c),a.off(p.default.FRAGMENT_LOADING_ABANDONED,x,c),a.off(h.default.MEDIA_FRAGMENT_LOADED,P,c),a.off(h.default.SETTING_UPDATED_MAX_BITRATE,O,c),a.off(h.default.SETTING_UPDATED_MIN_BITRATE,O,c),a.off(h.default.VIDEO_ELEMENT_RESIZED,L,c)}},f=(0,u.default)(t).getInstance().getLogger(c),m=(0,l.default)(t).getInstance(),F(),a.on(p.default.BUFFER_EMPTY,T,c),a.on(p.default.PLAYBACK_SEEKING,y,c),a.on(p.default.METRIC_ADDED,S,c),a.on(p.default.QUALITY_CHANGE_REQUESTED,A,c),a.on(p.default.FRAGMENT_LOADING_ABANDONED,x,c),a.on(h.default.MEDIA_FRAGMENT_LOADED,P,c),a.on(h.default.SETTING_UPDATED_MAX_BITRATE,O,c),a.on(h.default.SETTING_UPDATED_MIN_BITRATE,O,c),a.on(h.default.VIDEO_ELEMENT_RESIZED,L,c),c}D.__dashjs_factory_name="BolaRule";var w=r.default.getClassFactory(D);const M="L2A_STATE_ONE_BITRATE",P="L2A_STATE_STARTUP",O="L2A_STATE_STEADY",L=Math.pow(4,.99);function U(e){e=e||{};const t=this.context,n=e.dashMetrics,r=(0,d.default)(t).getInstance(),a=(0,l.default)(t).getInstance();let s,c,f,p;function m(e){e.placeholderBuffer=0,e.mostAdvancedSegmentStart=NaN,e.lastSegmentWasReplacement=!1,e.lastSegmentStart=NaN,e.lastSegmentDurationS=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN,e.lastSegmentUrl=""}function E(){for(const e in c)if(c.hasOwnProperty(e)){const t=c[e];t.state!==M&&(t.state=P,m(t))}}function T(e){if(e&&e.chunk&&e.chunk.representation&&e.chunk.representation.mediaInfo){const t=c[e.chunk.representation.mediaInfo.type],n=f[e.chunk.representation.mediaInfo.type];if(t&&t.state!==M){const r=e.chunk.start;isNaN(t.mostAdvancedSegmentStart)||r>t.mostAdvancedSegmentStart?(t.mostAdvancedSegmentStart=r,t.lastSegmentWasReplacement=!1):t.lastSegmentWasReplacement=!0,t.lastSegmentStart=r,t.lastSegmentDurationS=e.chunk.duration,t.currentRepresentation=e.chunk.representation,_(t,n)}}}function y(e){if(e&&e.metric===o.HTTP_REQUEST&&e.value&&e.value.type===R.HTTPRequest.MEDIA_SEGMENT_TYPE&&e.value.trace&&e.value.trace.length){const t=c[e.mediaType],n=f[e.mediaType];t&&t.state!==M&&(t.lastSegmentRequestTimeMs=e.value.trequest.getTime(),t.lastSegmentFinishTimeMs=e.value._tfinish.getTime(),_(t,n))}}function _(e,t){isNaN(e.lastSegmentStart)||isNaN(e.lastSegmentRequestTimeMs)||(t.segment_request_start_s=.001*e.lastSegmentRequestTimeMs,t.segment_download_finish_s=.001*e.lastSegmentFinishTimeMs,e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN)}function S(e,t){if(e.length!==t.length)return-1;let n=0;for(let r=0;r<e.length;r++)n+=e[r]*t[r];return n}function I(){c={},f={}}return s={getSwitchRequest:function(e){try{const r=(0,i.default)(t).create();r.rule=this.getClassName();const o=e.getMediaType(),s=e.getScheduleController();if(r.reason=r.reason||{},o===g.default.AUDIO)return r;s.setTimeToLoadDelay(0);const u=function(e){const t=e.getMediaType();let n=c[t];return n||(n=function(e){const t={},n=e.getMediaInfo();return t.state=P,t.currentRepresentation=null,function(e){e&&e.type&&(f[e.type]={},f[e.type].w=[],f[e.type].prev_w=[],f[e.type].Q=0,f[e.type].segment_request_start_s=0,f[e.type].segment_download_finish_s=0,f[e.type].B_target=1.5)}(n),m(t),t}(e),c[t]=n),n}(e);if(!f[o])return r;switch(r.reason.state=u.state,u.state){case M:break;case P:!function(e,t,r){const i=e.getMediaInfo(),a=e.getMediaType(),o=e.getThroughputController().getSafeAverageThroughput(a);if(isNaN(o))return t;const s=e.getAbrController(),u=s.getOptimalRepresentationForBitrate(i,o,!0),l=n.getCurrentBufferLevel(a,!0),c=f[a],d=s.getPossibleV
2oRepresentationsFilteredBySettings(i,!0);if(t.representation=u,t.reason.throughput=o,r.currentRepresentation=u,!isNaN(r.lastSegmentDurationS)&&l>=c.B_target){r.state=O,c.Q=L;for(let e=0;e<d.length;++e)d[e].id===r.currentRepresentation.id?c.prev_w[e]=1:c.prev_w[e]=0}}(e,r,u);break;case O:!function(e,t,r){let i=[];const a=e.getThroughputController(),o=e.getMediaType();let s=a.getAverageThroughput(o,g.default.THROUGHPUT_CALCULATION_MODES.ARITHMETIC_MEAN,1),u=n.getCurrentHttpRequest(o),l=null;const c=f[o];if(s<1&&(s=1),u.url===r.lastSegmentUrl||u.type===R.HTTPRequest.INIT_SEGMENT_TYPE)l=r.currentRepresentation;else{let t=r.lastSegmentDurationS,n=1;const a=e.getAbrController(),o=e.getMediaInfo(),f=a.getPossibleVoRepresentationsFilteredBySettings(o,!0);let d=e.getVideoModel().getPlaybackRate();const h=Math.max(Math.pow(4,1),L*Math.sqrt(4));for(let e=0;e<f.length;++e){const r=f[e];d*r.bitrateInKbit>s&&(n=-1),c.w[e]=c.prev_w[e]+n*(t/(2*h))*((c.Q+L)*(d*r.bitrateInKbit/s))}c.w=function(e){const t=e.length;let n=!1,r=[];for(let n=0;n<t;++n)r[n]=e[n];let i=e.sort(function(e,t){return t-e}),a=0,o=0,s=[];for(let e=0;e<t-1;++e)if(a+=i[e],o=(a-1)/(e+1),o>=i[e+1]){n=!0;break}n||(o=(a+i[t-1]-1)/t);for(let e=0;e<t;++e)s[e]=Math.max(r[e]-o,0);return s}(c.w);for(let e=0;e<f.length;++e)i[e]=c.w[e]-c.prev_w[e],c.prev_w[e]=c.w[e];const g=f.map(e=>e.bandwidth);c.Q=Math.max(0,c.Q-t+t*d*((S(g,c.prev_w)+S(g,i))/s));let p=[];for(let e=0;e<g.length;++e)p[e]=Math.abs(g[e]-S(c.w,g));const m=p.indexOf(Math.min(...p));l=a.getRepresentationByAbsoluteIndex(m,o,!0),l.absoluteIndex>r.currentRepresentation.absoluteIndex&&g[r.currentRepresentation.absoluteIndex+1]<=s&&(l=a.getRepresentationByAbsoluteIndex(r.currentRepresentation.absoluteIndex+1,o,!0)),l.bitrateInKbit>=s&&(c.Q=2*Math.max(L,c.Q)),r.lastSegmentUrl=u.url}t.representation=l,r.currentRepresentation=t.representation}(e,r,u);break;default:!function(e,t,n){const r=e.getAbrController(),i=e.getMediaInfo(),a=e.getMediaType(),o=e.getThroughputController().getSafeAverageThroughput(a);t.representation=r.getOptimalRepresentationForBitrate(i,o,!0),t.reason.throughput=o,n.state=P,m(n)}(e,r,u)}return r.priority=a.get().streaming.abr.rules.l2ARule.priority,r}catch(e){return p.error(e),(0,i.default)(t).create()}},reset:function(){I(),r.off(h.default.PLAYBACK_SEEKING,E,s),r.off(h.default.MEDIA_FRAGMENT_LOADED,T,s),r.off(h.default.METRIC_ADDED,y,s)}},p=(0,u.default)(t).getInstance().getLogger(s),I(),r.on(h.default.PLAYBACK_SEEKING,E,s),r.on(h.default.MEDIA_FRAGMENT_LOADED,T,s),r.on(h.default.METRIC_ADDED,y,s),s}U.__dashjs_factory_name="L2ARule";var x=r.default.getClassFactory(U);function F(){const e=this.context;let t,n,r,i,a,o,s,l,c;function f(){r=null,i=1,a=100,o=0,s=null,l=null,c="dynamic_weight_selection"}function d(){let e=0;if(r)for(let t=0;t<r.length;t++){let n=r[t];n.state.throughput>e&&(e=n.state.throughput)}return e}function h(e,t,n){let r=e.map((e,r)=>n[r]*Math.pow(e-t[r],2)).reduce((e,t)=>e+t);return(r<0?-1:1)*Math.sqrt(Math.abs(r))}function g(e,t){return h([e.state.throughput,e.state.latency,e.state.rebuffer,e.state.switch],[t.state.throughput,t.state.latency,t.state.rebuffer,t.state.switch],[1,1,1,1])}function p(e,t){for(let n=0;n<r.length;n++){let i=r[n],a=.1;const o=g(i,e);m(i,t,Math.exp(-1*Math.pow(o,2)/(2*Math.pow(a,2))))}}function m(e,t,n){let r=e.state,i=[.01,.01,.01,.01];r.throughput=r.throughput+(t[0]-r.throughput)*i[0]*n,r.latency=r.latency+(t[1]-r.latency)*i[1]*n,r.rebuffer=r.rebuffer+(t[2]-r.rebuffer)*i[2]*n,r.switch=r.switch+(t[3]-r.switch)*i[3]*n}return t={getNextQuality:function(e,t,u,f,g,m,E,T){let y=f,_=u;!function(e,t){if(!r){r=[];const n=t.getPossibleVoRepresentationsFilteredBySettings(e,!0),a=n.map(e=>e.bandwidth);o=Math.min(...a),i=function(e){const t=e.map(e=>Math.pow(e,2)).reduce((e,t)=>e+t);return Math.sqrt(t)}(a),n.forEach(e=>{let t={representation:e,state:{throughput:e.bandwidth/i,latency:0,rebuffer:0,switch:0}};r.push(t)}),l=function(e){let t=[],n=function(e){let t=[];for(let n=0;n<e;n++){let e=[Math.random()*d(),Math.random(),Math.random(),Math.random()];t.push(e)}return t}(Math.pow(e.length,2));t.push(n[0]);let r=[1,1,1,1];for(let i=1;i<e.length;i++){let e=null,i=null;for(let a=0;a<n.length;a++){let o=n[a],s=null;for(let e=0;e<t.length;e++){let n=h(o,t[e],r);(null===s||n<s)&&(s=n)}(null===i||s>i)&&(e=o,i=s)}t.push(e)}let i=null,a=null;for(let e=0;e<t.length;e++){let n=0;for(let i=0;i<t.length;i++)e!==i&&(n+=h(t[e],t[i],r));(null===i||n>i)&&(i=n,a=e)}let o=[];for(o.push(t[a]),t.splice(a,1);t.length>0;){let e=null,n=null;for(let i=0;i<t.length;i++){let a=h(o[0],t[i],r);(null===e||a<e)&&(e=a,n=i)}o.push(t[n]),t.splice(n,1)}return o}(r)}}(t,e);let S=u/i;S>1&&(S=d()),f/=a;let I=r.find(e=>e.representation.id===E.id),A=I.representation.bandwidth*T.getSegmentDuration()/_,R=Math.max(0,A-g);if(g-A<T.getMinBuffer())return n.debug(`Buffer is low for bitrate= ${I.representation.bandwidth} downloadTime=${A} currentBuffer=${g} rebuffer=${R}`),function(e,t){let n=0,i=e;if(r)for(let a=0;a<r.length;a++){let o=r[a];o.representation.bandwidth<e.representation.bandwidth&&o.representation.bandwidth>n&&t>o.representation.bandwidth&&(n=o.representation.bandwidth,i=o)}return i}(I,_).representation;switch(c){case"manual_weight_selection":s=[.4,.4,.4,.4];break;case"random_weight_selection":s=function(e){let t=[],n=Math.sqrt(2/e);for(let e=0;e<4;e++)t.push(Math.random()*n);return s=t,s}(r.length);break;default:!function(e,t,n,i,a,o){s||(s=l[l.length-1]);let u=e.findWeightVector(r,t,n,i,a,o);null!==u&&-1!==u&&(s=u)}(T,y,g,R,_,m)}let b=null,v=null,C=null;for(let e=0;e<r.length;e++){let t=r[e],i=t.state,a=[i.throughput,i.latency,i.rebuffer,i.switch],l=s.slice(),c=T.getNextBufferWithBitrate(t.representation.bandwidth,g,_),f=c<T.getMinBuffer();f&&n.debug(`Buffer is low for bitrate=${t.representation.bandwidth} downloadTime=${A} currentBuffer=${g} nextBuffer=${c}`),(t.representation.bandwidth>u-1e4||f)&&t.representation.bandwidth!==o&&(l[0]=100);let d=h(a,[S,0,0,0],l);(null===b||d<b)&&(b=d,v=t.representation,C=t)}let N=Math.abs(I.representation.bandwidth-C.representation.bandwidth)/i;return p(I,[S,f,R,N]),p(C,[S,0,0,N]),v},reset:function(){f()}},n=(0,u.default)(e).getInstance().getLogger(t),f(),t}F.__dashjs_factory_name="LearningAbrController";var k=r.default.getClassFactory(F),B=class{constructor(){this.type=null,this.lastBitrate=null,this.weights={},this.weights.bitrateReward=null,this.weights.bitrateSwitchPenalty=null,this.weights.rebufferPenalty=null,this.weights.latencyPenalty=null,this.weights.playbackSpeedPenalty=null,this.bitrateWSum=0,this.bitrateSwitchWSum=0,this.rebufferWSum=0,this.latencyWSum=0,this.playbackSpeedWSum=0,this.totalQoe=0}};function H(){let e,t,n,r,i;function a(){t=null,n=null,r=null,i=null}function o(e,t,n,r){let i=new B;return i.type=e,i.weights.bitrateReward=t||1,i.weights.bitrateSwitchPenalty=1,i.weights.rebufferPenalty=n||1e3,i.weights.latencyPenalty=[],i.weights.latencyPenalty.push({threshold:1.1,penalty:.05*r}),i.weights.latencyPenalty.push({threshold:1e8,penalty:.1*n}),i.weights.playbackSpeedPenalty=r||200,i}function s(e,t,n,r,i){i.bitrateWSum+=i.weights.bitrateReward*e,i.lastBitrate&&(i.bitrateSwitchWSum+=i.weights.bitrateSwitchPenalty*Math.abs(e-i.lastBitrate)),i.lastBitrate=e,i.rebufferWSum+=i.weights.rebufferPenalty*t;for(let e=0;e<i.weights.latencyPenalty.length;e++){let t=i.weights.latencyPenalty[e];if(n<=t.threshold){i.latencyWSum+=t.penalty*n;break}}i.playbackSpeedWSum+=i.weights.playbackSpeedPenalty*Math.abs(1-r),i.totalQoe=i.bitrateWSum-i.bitrateSwitchWSum-i.rebufferWSum-i.latencyWSum-i.playbackSpeedWSum}return e={setupPerSegmentQoe:function(e,a,s){t=o("segment",e,a,s),n=e,r=a,i=s},logSegmentMetrics:function(e,n,r,i){t&&s(e,n,r,i,t)},getPerSegmentQoe:function(){return t},calculateSingleUseQoe:function(e,t,a,u){let l=null;return n&&r&&i&&(l=o("segment",n,r,i)),l?(s(e,t,a,u,l),l.totalQoe):0},reset:function(){a()}},a(),e}H.__dashjs_factory_name="LoLpQoeEvaluator";var G=r.default.getClassFactory(H);function Y(e){let t,n,r,i,a,o=e.targetLatency,s=e.bufferMin,u=e.segmentDuration,l=e.qoeEvaluator;function c(){return u}function f(e,t){const n=c();let r;return r=t>n?e-n:e+n-t,r}return t={getMinBuffer:function(){return s},getSegmentDuration:c,getNextBufferWithBitrate:function(e,t,n){return f(t,e*u/n)},getNextBuffer:f,findWeightVector:function(e,t,n,r,c,d){let h=null,g=null,p=null,m=Math.abs(t-a);
2return e.forEach(e=>{i.forEach(r=>{r[0];let i,a=r[1],E=r[2],T=(r[3],e.representation.bandwidth*u/c),y=f(n,T);i=0===E?10:1/E;let _=i*Math.max(1e-5,T-y);i=0===a?10:1/a;let S=i*e.state.latency,I=l.calculateSingleUseQoe(e.representation.bandwidth,_,S,d);(null===h||I>h)&&function(e,t,n){return!(e>o+n)&&t>=s}(t,y,m)&&(h=I,g=r,p=e.representation.bandwidth)})}),null===g&&null===p&&(g=-1),a=t,g}},n=[.2,.4,.6,.8,1],r=4,i=function(e){let t=e.map(function(e){return[e]}),n=function(t,r,i){if(i===r)return t;let a=t.length;for(let n=0;n<a;n++){let n=t.shift();for(let r=0;r<e.length;r++)t.push(n.concat(e[r]))}return n(t,r,i+1)};return n(t,4,1)}(n),a=0,t}Y.__dashjs_factory_name="LoLpWeightSelector";var V=r.default.getClassFactory(Y);function q(e){let t,n,r,a,s,c=(e=e||{}).dashMetrics,f=this.context;return r={getSwitchRequest:function(e){try{let r=(0,i.default)(f).create();r.rule=this.getClassName();let u=e.getMediaInfo().type,l=e.getAbrController();const d=e.getStreamInfo();let h=e.getRepresentation();const p=e.getMediaInfo(),m=c.getCurrentBufferState(u),E=e.getScheduleController(),T=c.getCurrentBufferLevel(u,!0),y=E.getPlaybackController();let _=y.getCurrentLiveLatency();if(u===g.default.AUDIO)return r;_||(_=0);const S=y.getPlaybackRate(),I=e.getThroughputController().getSafeAverageThroughput(u);if(t.debug(`Throughput ${Math.round(I)} kbps`),isNaN(I)||!m)return r;if(l.getAbandonmentStateFor(d.id,u)===o.ABANDON_LOAD)return r;let A=l.getPossibleVoRepresentationsFilteredBySettings(p,!0).map(e=>e.bandwidth),R=e.getRepresentation().fragmentDuration,b=Math.min(...A)/1e3,v=Math.max(...A)/1e3,C=h.bandwidth/1e3,N=c.getCurrentHttpRequest(u,!0),D=(N.tresponse.getTime()-N.trequest.getTime())/1e3,w=D>R?D-R:0;s.setupPerSegmentQoe(R,v,b),s.logSegmentMetrics(C,w,_,S);let M=V(f).create({targetLatency:1.5,bufferMin:.3,segmentDuration:R,qoeEvaluator:s});return r.representation=a.getNextQuality(l,p,1e3*I,_,T,S,h,M),r.reason={throughput:I,latency:_},r.priority=n.get().streaming.abr.rules.loLPRule.priority,E.setTimeToLoadDelay(0),r}catch(e){throw e}},reset:function(){a.reset(),s.reset()}},t=(0,u.default)(f).getInstance().getLogger(r),a=k(f).create(),s=G(f).create(),n=(0,l.default)(f).getInstance(),r}q.__dashjs_factory_name="LoLPRule";var K=r.default.getClassFactory(q);function j(e){e=e||{};const t=this.context,n=e.mediaPlayerModel,r=e.customParametersModel,a=e.dashMetrics,o=e.settings,s=(0,d.default)(t).getInstance();let u,l,c,p;function m(){Object.values(g.default.QUALITY_SWITCH_RULES).forEach(e=>{l=T(e,l)}),Object.values(g.default.ABANDON_FRAGMENT_RULES).forEach(e=>{c=T(e,c)}
2),r.getAbrCustomRules().forEach(function(e){e.type===g.default.RULES_TYPES.QUALITY_SWITCH_RULES&&l.push(e.rule(t).create()),e.type===g.default.RULES_TYPES.ABANDON_FRAGMENT_RULES&&c.push(e.rule(t).create())}),0===l.length&&(l.push(w(t).create({dashMetrics:a,mediaPlayerModel:n,settings:o})),l.push(f(t).create({dashMetrics:a})))}function T(e,r){const i=e.charAt(0).toLowerCase()+e.slice(1);return o.get().streaming.abr.rules[i].active&&!function(e,t){return e.filter(e=>e.getClassName()===t).length>0}(r,e)?(r.push(function(e){switch(e){case g.default.QUALITY_SWITCH_RULES.BOLA_RULE:return w(t).create({dashMetrics:a,mediaPlayerModel:n,settings:o});case g.default.QUALITY_SWITCH_RULES.THROUGHPUT_RULE:return f(t).create({dashMetrics:a});case g.default.QUALITY_SWITCH_RULES.INSUFFICIENT_BUFFER_RULE:return E(t).create({dashMetrics:a,settings:o});case g.default.QUALITY_SWITCH_RULES.SWITCH_HISTORY_RULE:return A(t).create();case g.default.QUALITY_SWITCH_RULES.DROPPED_FRAMES_RULE:return S(t).create();case g.default.QUALITY_SWITCH_RULES.LEARN_TO_ADAPT_RULE:return x(t).create({dashMetrics:a,settings:o});case g.default.QUALITY_SWITCH_RULES.LOL_PLUS_RULE:return K(t).create({dashMetrics:a});case g.default.ABANDON_FRAGMENT_RULES.ABANDON_REQUEST_RULE:return y(t).create({dashMetrics:a,mediaPlayerModel:n,settings:o})}}(e)),r):o.get().streaming.abr.rules[i].active?r:function(e,t){return e.filter(e=>e.getClassName()!==t)}(r,e)}function _(e){return e.filter(e=>e.representation!==i.default.NO_CHANGE)}function I(e){const t={};let n,r,a,o=null;if(0!==e.length){for(t[i.default.PRIORITY.STRONG]=null,t[i.default.PRIORITY.WEAK]=null,t[i.default.PRIORITY.DEFAULT]=null,n=0,r=e.length;n<r;n+=1)a=e[n],a.representation!==i.default.NO_CHANGE&&(null===t[a.priority]||t[a.priority].representation!==i.default.NO_CHANGE&&a.representation.bitrateInKbit<t[a.priority].representation.bitrateInKbit)&&(t[a.priority]=a);return t[i.default.PRIORITY.WEAK]&&t[i.default.PRIORITY.WEAK].representation!==i.default.NO_CHANGE&&(o=t[i.default.PRIORITY.WEAK]),t[i.default.PRIORITY.DEFAULT]&&t[i.default.PRIORITY.DEFAULT].representation!==i.default.NO_CHANGE&&(o=t[i.default.PRIORITY.DEFAULT]),t[i.default.PRIORITY.STRONG]&&t[i.default.PRIORITY.STRONG].representation!==i.default.NO_CHANGE&&(o=t[i.default.PRIORITY.STRONG]),o}}function R(){m()}return u={clearDataForStream:function(e){[l,c].forEach(t=>{t&&t.length&&t.forEach(t=>t.clearDataForStream&&"function"==typeof t.clearDataForStream&&t.clearDataForStream(e))})},getAbandonFragmentRules:function(){return c},getBestPossibleSwitchRequest:function(e){return e&&I(_(l.filter(t=>{const n=t.getClassName();if(n!==g.default.QUALITY_SWITCH_RULES.BOLA_RULE&&n!==g.default.QUALITY_SWITCH_RULES.THROUGHPUT_RULE)return!0;const r=e.getMediaType();return p[r]&&n===g.default.QUALITY_SWITCH_RULES.BOLA_RULE||!p[r]&&n===g.default.QUALITY_SWITCH_RULES.THROUGHPUT_RULE}).map(t=>t.getSwitchRequest(e))))||(0,i.default)(t).create()},getBolaState:function(e){return p[e]},getMinSwitchRequest:I,getQualitySwitchRules:function(){return l},handleNewMediaInfo:function(e){l.forEach(t=>t.handleNewMediaInfo&&t.handleNewMediaInfo(e)),c.forEach(t=>t.handleNewMediaInfo&&t.handleNewMediaInfo(e))},initialize:function(){l=[],c=[],p={},m(),s.on(h.default.SETTING_UPDATED_ABR_ACTIVE_RULES,R,u)},reset:function(){[l,c].forEach(e=>{e&&e.length&&e.forEach(e=>e.reset&&e.reset())}),l=[],c=[],p={},s.off(h.default.SETTING_UPDATED_ABR_ACTIVE_RULES,R,u)},setBolaState:function(e,t){p[e]=t},shouldAbandonFragment:function(e){if(!e)return(0,i.default)(t).create();const n=I(_(c.map(t=>t.shouldAbandon(e))));return n&&n.reason&&(n.reason.forceAbandon=!0),n||(0,i.default)(t).create()}},u}j.__dashjs_factory_name="ABRRulesCollection";const W=r.default.getClassFactory(j);r.default.updateSingletonFactory(j.__dashjs_factory_name,W);var z=W,$=n(2842);const Q="loading",X="executed",Z="failed";function J(e){const t=(e=e||{}).eventBus,n=e.events,r=e.dashMetrics,i=e.fragmentLoader,a=e.debug,o=e.streamInfo,s=e.type;let u,l,c,f;function d(e){return!!e&&function(t){let n=!1;return t.some(t=>{if(r=e,i=t,!isNaN(r.index)&&r.startTime===i.startTime&&r.adaptationIndex===i.adaptationIndex&&r.type===i.type||function(e,t){return e.representation.id===t.representation.id}(e,t)||function(e,t){return e.action===$.default.ACTION_COMPLETE&&e.action===t.action}(e,t))return n=!0,n;var r,i}),n}(c)}function h(e){return isNaN(e.duration)?.25:Math.min(e.duration/8,.5)}function g(e){c=c.filter(t=>{const n=h(t);return isNaN(t.startTime)||void 0!==e&&t.startTime>=e-n})}function p(e,t){t<=e+.5||(c=c.filter(n=>{const r=h(n);return isNaN(n.startTime)||n.startTime>=t-r||isNaN(n.duration)||n.startTime+n.duration<=e+r}))}function m(e,t,n){for(let r=e.length-1;r>=0;r--){const i=e[r],a=i.startTime,o=a+i.duration;if(n=isNaN(n)?h(i):n,!isNaN(a)&&!isNaN(o)&&t+n>=a&&t-n<o||isNaN(a)&&isNaN(t))return i}return null}function E(e,t){r.addSchedulingInfo(e,t),r.addRequestsQueue(e.mediaType,f,c)}function T(e){e.sender===i&&(f.splice(f.indexOf(e.request),1),e.response&&!e.error&&c.push(e.request),E(e.request,e.error?Z:X),t.trigger(n.FRAGMENT_LOADING_COMPLETED,{request:e.request,response:e.response,error:e.error,sender:this},{streamId:o.id,mediaType:s}))}function y(e){e.sender===i&&t.trigger(n.FRAGMENT_LOADING_PROGRESS,{request:e.request,response:e.response,error:e.error,sender:this},{streamId:o.id,mediaType:s})}function _(e){e.sender===i&&t.trigger(n.FRAGMENT_LOADING_ABANDONED,{request:e.request},{streamId:o.id,mediaType:s})}function S(){c=[],f=[],i&&i.resetInitialSettings()}return u={abortRequests:function(){l.debug("abort requests"),i.abort(),f=[]},executeRequest:function(e){e.action===$.default.ACTION_DOWNLOAD?(E(e,Q),f.push(e),function(e){t.trigger(n.FRAGMENT_LOADING_STARTED,{request:e},{streamId:o.id,mediaType:s}),i.load(e)}(e)):l.warn("Unknown request action.")},getRequests:function(e){const t=e?e.state instanceof Array?e.state:[e.state]:[];let n=[];return t.forEach(t=>{const r=function(e){let t;switch(e){case Q:t=f;break;case X:t=c;break;default:t=[]}return t}(t);
2n=n.concat(function(e,t){return t.hasOwnProperty("time")?[m(e,t.time,t.threshold)]:e.filter(e=>{for(const n in t)if("state"!==n&&t.hasOwnProperty(n)&&e[n]!=t[n])return!1;return!0})}(r,e))}),n},getStreamId:function(){return o.id},getType:function(){return s},isFragmentLoaded:d,isFragmentLoadedOrPending:function(e){let t,n=!1,r=0;if(n=d(e),!n)for(r=0;r<f.length;r++)t=f[r],e.url===t.url&&e.startTime===t.startTime&&(n=!0);return n},removeExecutedRequestsAfterTime:function(e){c=c.filter(t=>isNaN(t.startTime)||void 0!==e&&t.startTime<e)},removeExecutedRequestsBeforeTime:g,reset:function(){t.off(n.LOADING_COMPLETED,T,this),t.off(n.LOADING_DATA_PROGRESS,y,this),t.off(n.LOADING_ABANDONED,_,this),i&&i.reset(),S()},resetInitialSettings:S,syncExecutedRequestsWithBufferedRange:function(e,t){if(!e||0===e.length)return void g();let n=0;for(let t=0,r=e.length;t<r;t++)p(n,e.start(t)),n=e.end(t);t>0&&p(n,t)}},l=a.getLogger(u),S(),t.on(n.LOADING_COMPLETED,T,u),t.on(n.LOADING_DATA_PROGRESS,y,u),t.on(n.LOADING_ABANDONED,_,u),u}J.__dashjs_factory_name="FragmentModel";const ee=r.default.getClassFactory(J);ee.FRAGMENT_MODEL_LOADING=Q,ee.FRAGMENT_MODEL_EXECUTED=X,ee.FRAGMENT_MODEL_CANCELED="canceled",ee.FRAGMENT_MODEL_FAILED=Z,r.default.updateClassFactory(J.__dashjs_factory_name,ee);var te=ee;function ne(e){let t;const n=(e=e||{}).abrController,r=e.throughputController,i=e.switchRequestHistory,a=e.droppedFramesHistory,o=e.currentRequest,s=e.streamProcessor?e.streamProcessor.getScheduleController():null,u=e.streamProcessor?e.streamProcessor.getRepresentation():null,l=e.videoModel?e.videoModel:null;function c(){return u?u.mediaInfo:null}return t={getAbrController:function(){return n},getCurrentRequest:function(){return o},getDroppedFramesHistory:function(){return a},getMediaInfo:c,getMediaType:function(){const e=c();return e?e.type:null},getRepresentation:function(){return u},getScheduleController:function(){return s},getStreamInfo:function(){const e=c();return e?e.streamInfo:null},getSwitchRequestHistory:function(){return i},getThroughputController:function(){return r},getVideoModel:function(){return l}},t}ne.__dashjs_factory_name="RulesContext";var re=r.default.getClassFactory(ne);function ie(){let e={},t={};const n=this.context,r=(0,l.default)(n).getInstance();return{clearForStream:function(n){delete e[n],delete t[n]},getSwitchRequests:function(t,n){return null!=t&&null!=n&&e[t]&&e[t][n]?e[t][n]:{}},push:function(n){const i=n.currentRepresentation,a=n.newRepresentation;if(i.mediaInfo.streamInfo.id!==a.mediaInfo.streamInfo.id||a.mediaInfo.id!==i.mediaInfo.id)return;const o=i.mediaInfo.streamInfo.id;e[o]||function(n){e[n]={},t[n]={}}(o);const s=i.mediaInfo.type;e[o][s]||function(n,r){e[n][r]={},t[n][r]=[]}(o,s);const u=n.currentRepresentation.id;e[o][s][u]||function(t,n,r){e[t][n][r]={noDrops:0,drops:0,dropSize:0}}(o,s,u);let l=n.newRepresentation.absoluteIndex-n.currentRepresentation.absoluteIndex,c=l<0?1:0,f=c?-l:0,d=c?0:1;e[o][s][n.currentRepresentation.id].drops+=c,e[o][s][n.currentRepresentation.id].dropSize+=f,e[o][s][n.currentRepresentation.id].noDrops+=d,t[o][s].push({id:n.currentRepresentation.id,noDrop:d,drop:c,dropSize:f});const h=function(e,n){return t[e][n].length>r.get().streaming.abr.rules.switchHistoryRule.parameters.sampleSize?t[e][n].shift():null}(o,s);h&&function(t,n,r){e[t][n][r.id].drops-=r.drop,e[t][n][r.id].dropSize-=r.dropSize,e[t][n][r.id].noDrops-=r.noDrop}(o,s,h)},reset:function(){e={},t={}}}}ie.__dashjs_factory_name="SwitchRequestHistory";var ae=r.default.getClassFactory(ie);function oe(){let e={},t={},n={};return{clearForStream:function(r){delete e[r],delete t[r],delete n[r]},getFrameHistory:function(t){return e[t]},push:function(r,i,a){if(!i)return;e[r]||function(r){e[r]=[],t[r]=0,n[r]=0}(r);let o=a&&a.droppedVideoFrames?a.droppedVideoFrames:0,s=a&&a.totalVideoFrames?a.totalVideoFrames:0,u=o-t[r];t[r]=o;let l=s-n[r];n[r]=s;const c=e[r];c[i]?(c[i].droppedVideoFrames+=u,c[i].totalVideoFrames+=l):c[i]={droppedVideoFrames:u,totalVideoFrames:l}},reset:function(){e={},t={},n={}}}}oe.__dashjs_factory_name="DroppedFramesHistory";var se=r.default.getClassFactory(oe);function ue(){const e=this.context,t=(0,u.default)(e).getInstance(),n=(0,d.default)(e).getInstance();let r,a,s,l,c,f,m,E,T,y,_,S,I,A,R,b,v,C,N,D,w;function M(){r={},C={},R=new Map,_&&_.reset(),N&&N.reset(),m=void 0,_=void 0,N=void 0,clearTimeout(a),a=null}function P(e,t=!0){let n=O(e,t);return n=function(e){try{return function(e){try{if(!b.get().streaming.cmsd.enabled||!b.get().streaming.cmsd.abr.applyMb)return e;const t=e.filter(e=>{const t=e.mediaInfo.type;let n=f.getMaxBitrate(t);if(t!==g.default.VIDEO||n<0)return!0;const r=e.mediaInfo.streamInfo.id;return n-=C[r][g.default.AUDIO].getRepresentation().bitrateInKbit||0,e.bitrateInKbit<=n});return t.length>0?t:e}catch(t){return I.error(t),e}}(e=function(e){try{if(!b.get().streaming.abr.limitBitrateByPortal)return e;const t=1e3*b.get().streaming.abr.limitBitrateByPortalMinimum||0,{elementWidth:n}=w.getVideoElementSize(),r=e.filter(e=>e.mediaInfo.type!==g.default.VIDEO||e.width<=n||e.bandwidth<=t);return r.length>0?r:e}catch(t){return I.error(t),e}}(e=function(e){try{const t=e.filter(e=>{const t=e.mediaInfo.type,n=e.bitrateInKbit,r=A.getAbrBitrateParameter("maxBitrate",t),i=A.getAbrBitrateParameter("minBitrate",t);return!(r>-1&&n>r||i>-1&&n<i)});return t.length>0?t:e}catch(t){return I.error(t),e}}(e)))}catch(t){return I.error(t),e}}(n),n}function O(e,t){let n=[];if(!e)return n;const r=function(e){try{const t=[];if(e&&t.push(e),!b.get().streaming.abr.enableSupplementalPropertyAdaptationSetSwitching||!e.adaptationSetSwitchingCompatibleIds||0===e.adaptationSetSwitchingCompatibleIds.length)return t;const n=C[e.streamInfo.id][e.type].getAllMediaInfos().filter(t=>e.adaptationSetSwitchingCompatibleIds.includes(t.id));return t.concat(n)}catch(t){return[e]}}(e);
2return r.forEach(e=>{let t=l.getVoRepresentations(e);t&&t.length>0&&(n=n.concat(t))}),n=function(e){return e.forEach(t=>{if(t.dependentRepresentation&&null===t.dependentRepresentation.mediaInfo){let n=t.dependentRepresentation.id,r=e.find(e=>e.id===n);r&&(t.dependentRepresentation=r)}}),e}(n),n=function(e){return function(e){let t=null;return e.filter(e=>(t||(t=e.mediaInfo),!isNaN(e.qualityRanking)&&l.areMediaInfosEqual(t,e.mediaInfo))).length===e.length}(e)?function(e){return e.sort((e,t)=>t.qualityRanking-e.qualityRanking),e}(e):function(e){return e.sort((e,t)=>l.areMediaInfosEqual(e.mediaInfo,t.mediaInfo)?function(e,t){if(!isNaN(e.pixelsPerSecond)&&!isNaN(t.pixelsPerSecond)&&e.pixelsPerSecond!==t.pixelsPerSecond)return e.pixelsPerSecond-t.pixelsPerSecond;const n=e.bandwidth-t.bandwidth;return 0!==n?n:L(e,t)}(e,t):function(e,t){if(!isNaN(e.pixelsPerSecond)&&!isNaN(t.pixelsPerSecond)&&e.pixelsPerSecond!==t.pixelsPerSecond)return e.pixelsPerSecond-t.pixelsPerSecond;if(!isNaN(e.bitsPerPixel)&&!isNaN(t.bitsPerPixel)&&e.bitsPerPixel!==t.bitsPerPixel)return t.bitsPerPixel-e.bitsPerPixel;const n=e.bandwidth-t.bandwidth;return 0!==n?n:L(e,t)}(e,t)),e}(e)}
2(n),n.forEach((e,t)=>{e.absoluteIndex=t}),n=n.filter(n=>{const r=!!t||l.areMediaInfosEqual(n.mediaInfo,e),i=!n||!n.mediaInfo||c.areKeyIdsUsable(n.mediaInfo);return r&&i}),n}function L(e,t){const n=e.isBootstrapRepresentation();return n!==t.isBootstrapRepresentation()?n?-1:1:t.k-e.k}function U(e){const t=e.request.mediaType,n=e.streamId;if(!(t&&n&&C[n]&&b.get().streaming.abr.autoSwitchBitrate[t]))return;const u=C[n][t];if(!u)return;var l;if((l=u.getLastSegment())&&l.isPartialSegment&&!isNaN(l.totalNumberOfPartialSegments)&&!isNaN(l.replacementSubNumber)&&0!==l.replacementSubNumber)return;const c=F(u,e.request),f=s.shouldAbandonFragment(c);f&&f.representation!==i.default.NO_CHANGE&&function(e,t,n,i,s){if(i.getFragmentModel().getRequests({state:te.FRAGMENT_MODEL_LOADING,index:e.request.index})[0]){const e=function(e,t){return r[e]&&r[e][t]?r[e][t]:null}(t,n);e&&(e.state=o.ABANDON_LOAD),N.reset(),V(n,v.getActiveStreamInfo(),s.representation,s.reason),clearTimeout(a),a=setTimeout(()=>{e&&(r[t][n].state=o.ALLOW_LOAD),a=null},b.get().streaming.abandonLoadTimeout)}}(e,n,t,u,f)}function x(){if(b.get().streaming.abr.limitBitrateByPortal)for(const e in C)for(const t in C[e])H(t,e)}function F(t,n){return re(e).create({abrController:S,adapter:l,currentRequest:n,droppedFramesHistory:_,streamProcessor:t,switchRequestHistory:N,throughputController:D,videoModel:w})}function k(e){e.mediaType===g.default.VIDEO&&(Y(e.streamId),m=e.newRepresentation.id)}function B(e){!j()||e.metric!==o.BUFFER_LEVEL||e.mediaType!==g.default.AUDIO&&e.mediaType!==g.default.VIDEO||function(e,t){try{const n=A.getBufferTimeDefault(),r=n,i=.5*n,a=s.getBolaState(e),o=t>=(a?i:r);s.setBolaState(e,o),o!==a&&(o?I.info("["+e+"] switching from throughput to buffer occupancy ABR rule (buffer: "+t.toFixed(3)+")."):I.info("["+e+"] switching from buffer occupancy to throughput ABR rule (buffer: "+t.toFixed(3)+")."))}catch(e){I.error(e)}}(e.mediaType,.001*e.value.level)}function H(e,t){try{if(!(e&&C&&C[t]&&C[t][e]))return!1;Y(t);const n=C[t][e],i=n.getLastSegment(),a=n.getRepresentationController()?.getCurrentCompositeRepresentation(),u=G(i,a);if(!b.get().streaming.abr.autoSwitchBitrate[e]||!u)return!1;const l=F(n),c=s.getBestPossibleSwitchRequest(l);if(!c||!c.representation)return!1;let f=c.representation;return function(e,t){N.push({currentRepresentation:e,newRepresentation:t})}(a,f),f.id!==a.id&&(r[t][e].state===o.ALLOW_LOAD||f.absoluteIndex<a.absoluteIndex)&&(K(e,a,f,c.reason),!0)}catch(e){return I.error(e),!1}}function G(e,t){return!(e&&e.isPartialSegment&&!isNaN(e.totalNumberOfPartialSegments)&&!isNaN(e.replacementSubNumber))||e.replacementSubNumber===e.totalNumberOfPartialSegments-1||function(e,t){if(!t||!t.segmentSequenceProperties||t.segmentSequenceProperties.length<=0)return!1;if(t&&t.mediaInfo&&t.mediaInfo.adaptationSetSwitchingCompatibleIds&&t.mediaInfo.adaptationSetSwitchingCompatibleIds.length>0)return!1;const n=t.segmentSequenceProperties.filter(e=>!isNaN(e.sapType)&&e.sapType<=1);if(0===n.length)return!1;let r=(e.replacementSubNumber+1)%e.totalNumberOfPartialSegments;return n.some(e=>r%e.cadence==0)}(e,t)}function Y(e){if(_){const t=w.getPlaybackQuality();t&&_.push(e,m,t)}}function V(e,t,n,r={}){if(!(t&&t.id&&e&&C&&C[t.id]&&C[t.id][e]&&n))return!1;const i=C[t.id][e],a=i.getRepresentationController()?.getCurrentCompositeRepresentation();return(!a||n.id!==a.id)&&K(e,a,n,r)}function q(e,t){return`${e}-${t}`}function K(e,t,r,i){const a=r.mediaInfo.streamInfo.id;if(!e||!C[a]||!C[a][e])return!1;const o=C[a][e].getStreamInfo(),s=T.getCurrentBufferLevel(e),u=null!==t&&!l.areMediaInfosEqual(t.mediaInfo,r.mediaInfo),c=t?t.bitrateInKbit:0;return I.info(`[AbrController]: Switching quality in period ${a} for media type ${e}. Switch from bitrate ${c} to bitrate ${r.bitrateInKbit}. Current buffer level: ${s}. Reason:`+(i?JSON.stringify(i):"/")),n.trigger(p.default.QUALITY_CHANGE_REQUESTED,{isAdaptationSetSwitch:u,mediaType:e,newRepresentation:r,oldRepresentation:t,reason:i,streamInfo:o},{streamId:o.id,mediaType:e}),function(e){const t=D.getAverageThroughput(e);isNaN(t)||y.setSavedBitrateSettings(e,t)}(e),!0}function j(){return b.get().streaming.abr.rules.bolaRule.active&&b.get().streaming.abr.rules.throughputRule.active}return S={canPerformQualitySwitch:G,checkPlaybackQuality:H,clearDataForStream:function(e){_&&_.clearForStream(e),C[e]&&delete C[e],N&&N.clearForStream(e),r[e]&&delete r[e],s.clearDataForStream(e)},getAbandonmentStateFor:function(e,t){return r[e]&&r[e][t]?r[e][t].state:null},getInitialBitrateFor:function(e){if(e===g.default.TEXT)return NaN;let t=A.getAbrBitrateParameter("initialBitrate",e);if(t>0)return t;let n=NaN;if(y&&y.hasOwnProperty("getSavedBitrateSettings")&&(n=y.getSavedBitrateSettings(e)),!isNaN(n))return n;const r=D.getAverageThroughput(e);return!isNaN(r)&&r>0?r:e===g.default.VIDEO?1e3:100},getOptimalRepresentationForBitrate:function(e,t,n=!0){const r=P(e,n);if(!r||0===r.length)return null;const i=r.reduce((e,t)=>
2e.bandwidth<t.bandwidth?e:t);if(t<=0)return i;const a=r.filter(e=>e.bitrateInKbit<=t);return a&&0!==a.length?a.reduce((e,t)=>t.absoluteIndex>e.absoluteIndex?t:e):i},getPossibleVoRepresentations:function(e,t=!0){return O(e,t)},getPossibleVoRepresentationsFilteredBySettings:P,getRepresentationByAbsoluteIndex:function(e,t,n=!0){return isNaN(e)||e<0?null:P(t,n).find(t=>t.absoluteIndex===e)},handleNewMediaInfo:function(e){s.handleNewMediaInfo(e)},handlePendingManualQualitySwitch:function(e,t){try{const n=q(e,t);let r=null;if(R.has(n)&&(r=R.get(n)),!r)return!1;const i=C[e][t];if(!G(i.getLastSegment(),i.getRepresentation()))return!1;const{type:a,streamInfo:o,representation:s,reason:u}=r;return R.delete(n),V(a,o,s,u),!0}catch(e){I.error(`Can not handle pending manual quality switch: ${e}`)}},initialize:function(){_=se(e).create(),N=ae(e).create(),s=z(e).create({dashMetrics:T,customParametersModel:E,mediaPlayerModel:A,settings:b}),s.initialize(),n.on(p.default.QUALITY_CHANGE_RENDERED,k,S),n.on(p.default.METRIC_ADDED,B,S),n.on(h.default.LOADING_PROGRESS,U,S),n.on(h.default.VIDEO_ELEMENT_RESIZED,x,S)},isPlayingAtLowestQuality:function(e){return P(e.mediaInfo,!0)[0].id===e.id},isPlayingAtTopQuality:function(e){if(!e)return!0;const t=P(e.mediaInfo,!0);return t[t.length-1].id===e.id},manuallySetPlaybackQuality:function(e,t,n,r={}){const i=C[t.id][e];if(G(i.getLastSegment(),i.getRepresentation()))return V(e,t,n,r);!function(e,t,n,r){try{I.debug(`[AbrController] Queuing manual quality switch for stream ${t.id} and type ${e} to representation ${n.id}`);const i=q(t.id,e);R.set(i,{type:e,streamInfo:t,representation:n,reason:r})}catch(e){I.error(`Can not queue manual quality switch: ${e}`)}}(e,t,n,r)},registerStreamType:function(e,t){const n=t.getStreamInfo().id;C[n]||(C[n]={}),C[n][e]=t,r[n]||(r[n]={}),r[n][e]={},r[n][e].state=o.ALLOW_LOAD,void 0===s.getBolaState(e)&&s.setBolaState(e,b.get().streaming.abr.rules.bolaRule.active&&!j())},reset:function(){M(),n.off(p.default.QUALITY_CHANGE_RENDERED,k,S),n.off(p.default.METRIC_ADDED,B,S),n.off(h.default.LOADING_PROGRESS,U,S),n.off(h.default.VIDEO_ELEMENT_RESIZED,x,S),s&&s.reset()},setConfig:function(e){e&&(e.streamController&&(v=e.streamController),e.throughputController&&(D=e.throughputController),e.domStorage&&(y=e.domStorage),e.mediaPlayerModel&&(A=e.mediaPlayerModel),e.customParametersModel&&(E=e.customParametersModel),e.cmsdModel&&(f=e.cmsdModel),e.dashMetrics&&(T=e.dashMetrics),e.adapter&&(l=e.adapter),e.videoModel&&(w=e.videoModel),e.settings&&(b=e.settings),e.capabilities&&(c=e.capabilities))},setPlaybackQuality:V,unRegisterStreamType:function(e,t){try{C[e]&&C[e][t]&&delete C[e][t],r[e]&&r[e][t]&&delete r[e][t]}catch(e){}}},I=t.getLogger(S),M(),S}ue.__dashjs_factory_name="AbrController";const le=r.default.getSingletonFactory(ue);r.default.updateSingletonFactory(ue.__dashjs_factory_name,le);var ce,fe,de,he,ge,pe=le,me={};ce="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fe=function(e){for(var t=0,n=[],r=0|e.length/3;0<r--;){var i=(e[t]<<16)+(e[t+1]<<8)+e[t+2];t+=3,n.push(ce.charAt(63&i>>18)),n.push(ce.charAt(63&i>>12)),n.push(ce.charAt(63&i>>6)),n.push(ce.charAt(63&i))}return 2==e.length-t?(i=(e[t]<<16)+(e[t+1]<<8),n.push(ce.charAt(63&i>>18)),n.push(ce.charAt(63&i>>12)),n.push(ce.charAt(63&i>>6)),n.push("=")):1==e.length-t&&(i=e[t]<<16,n.push(ce.charAt(63&i>>18)),n.push(ce.charAt(63&i>>12)),n.push("==")),n.join("")},de=function(){for(var e=[],t=0;t<64;++t)e[ce.charCodeAt(t)]=t;return e["=".charCodeAt(0)]=0,e}(),he=function(e){for(var t=0,n=[],r=0|e.length/4;0<r--;){var i=(de[e.charCodeAt(t)]<<18)+(de[e.charCodeAt(t+1)]<<12)+(de[e.charCodeAt(t+2)]<<6)+de[e.charCodeAt(t+3)];n.push(255&i>>16),n.push(255&i>>8),n.push(255&i),t+=4}return n&&("="==e.charAt(t-2)?(n.pop(),n.pop()):"="==e.charAt(t-1)&&n.pop()),n},ge={encode:function(e){for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t},decode:function(e){for(var t=0;t<s.length;++t)a[t]=String.fromCharCode(a[t]);return a.join("")}},me.decodeArray=function(e){var t=he(e);return new Uint8Array(t)},me.encodeASCII=function(e){var t=ge.encode(e);return fe(t)},me.decodeASCII=function(e){var t=he(e);return ge.decode(t)},me.encode=function(e){var t=function(e){for(var t=[],n=0;n<e.length;++n){var r=e.charCodeAt(n);r<128?t.push(r):r<2048?(t.push(192|r>>6),t.push(128|63&r)):r<65536?(t.push(224|r>>12),t.push(128|63&r>>6),t.push(128|63&r)):(t.push(240|r>>18),t.push(128|63&r>>12),t.push(128|63&r>>6),t.push(128|63&r))}return t}(e);return fe(t)},me.decode=function(e){return function(e){for(var t=[],n=0;n<e.length;){var r=e[n++];r<128||(r<224?(r=(31&r)<<6,r|=63&e[n++]):r<240?(r=(15&r)<<12,r|=(63&e[n++])<<6,r|=63&e[n++]):(r=(7&r)<<18,r|=(63&e[n++])<<12,r|=(63&e[n++])<<6,r|=63&e[n++])),t.push(String.fromCharCode(r))}return t.join("")}(he(e))},me.decode,me.decodeArray,me.encode,me.encodeASCII;var Ee=me,Te=n(7393);const ye=NaN;class _e{constructor(e,t){this.data={baseUrls:e||null,selectedIdx:t||ye},this.children=[]}}function Se(){let e,t,n,r;const i=this.context,a=(0,Te.default)(i).getInstance();function o(e,t,n){const r=s(n);e[t]?a.areEqual(r,e[t].data.baseUrls)||(e[t].data.baseUrls=r,e[t].data.selectedIdx=ye):e[t]=new _e(r)}function s(e){let t=n.getBaseURLsFromElement(e);const i=r.getSynthesizedBaseUrlElements(t);return i&&i.length>
20&&i.forEach(e=>{const n=t.findIndex(t=>t.serviceLocation===e.serviceLocation);-1!==n?t[n]=e:t.push(e)}),t}function u(e,n){const r=n||t;e(r.data),r.children&&r.children.forEach(t=>u(e,t))}function l(){t=new _e}return e={reset:l,update:function(e){!function(e){!function(){if(!n||!n.hasOwnProperty("getBaseURLsFromElement")||!n.hasOwnProperty("getRepresentationSortFunction"))throw new Error("setConfig function has to be called previously")}();const r=s(e);a.areEqual(r,t.data.baseUrls)||(t.data.baseUrls=r,t.data.selectedIdx=ye),e&&e.Period&&e.Period.forEach((e,r)=>{o(t.children,r,e),e.AdaptationSet&&e.AdaptationSet.forEach((e,i)=>{o(t.children[r].children,i,e),e.Representation&&e.Representation.sort(n.getRepresentationSortFunction()).forEach((e,n)=>{o(t.children[r].children[i].children,n,e)})})})}(e)},getForPath:function(e){let n=t;const r=[n.data];return e&&e.forEach(e=>{n=n.children[e],n&&r.push(n.data)}),r.filter(e=>e.baseUrls.length)},invalidateSelectedIndexes:function(e){u(t=>{isNaN(t.selectedIdx)||e===t.baseUrls[t.selectedIdx].serviceLocation&&(t.selectedIdx=ye)})},setConfig:function(e){e.adapter&&(n=e.adapter),e.contentSteeringController&&(r=e.contentSteeringController)},getBaseUrls:function(e){return s(e)}},l(),e}Se.__dashjs_factory_name="BaseURLTreeModel";var Ie=r.default.getClassFactory(Se),Ae=n(893),Re=n(3773),be=class{constructor(e){this.url=e||null,this.type=R.HTTPRequest.CONTENT_STEERING_TYPE,this.responseType="json"}},ve=class{constructor(){this.version=null,this.ttl=300,this.reloadUri=null,this.pathwayPriority=[],this.pathwayClones=[]}},Ce=n(8854),Ne=n(6503),De=n(9415),we=n(6517),Me=n(7263);function Pe(){const e=this.context,t=(0,Ne.default)(e).getInstance();let n,r,i,a,o,s,l,c,f,d,h,g,m,E,T,y;function _(e){A(e,"baseUrl")}function S(e){A(e,"location")}function I(e){var t,n;e&&e.throughputValues&&e.throughputValues.serviceLocation&&(t=e.throughputValues.serviceLocation,n=e.throughputValues,E[t]||(E[t]=[]),E[t].push(n),E[t].length>4&&E[t].shift())}function A(e,t){if(e&&e.request&&e.request.serviceLocation){const n=e.request.serviceLocation;-1===g[t].all.indexOf(n)&&g[t].all.push(n),g[t].current=n}}function R(){const e=c.getValue();let t=n.getContentSteering(e);return t||(t=h.getServiceDescriptionSettings().contentSteering),!t&&r&&(t=r),r=t,t}function b(){return new Promise(e=>{try{const n=R();if(!n||!n.serverUrl)return void e();const a=function(e){let n=e.serverUrl;i&&i.reloadUri&&(n=t.isRelative(i.reloadUri)?t.resolve(i.reloadUri,e.serverUrl):i.reloadUri);const r=[],a=g.baseUrl.all.concat(g.location.all);if(a.length>0){const e=a.map(e=>{const t=function(e){if(!e||!E[e]||0===E[e].length)return-1;const t=m.getArithmeticMean(E[e],E[e].length,!0);return parseInt(1e3*t)}(e);return{serviceLocation:e,throughput:t}});let t="",n="";e.forEach((e,r)=>{0!==r&&(t+=",",n+=","),t+=e.serviceLocation,n+=e.throughput>-1?e.throughput:""}),r.push({key:"_DASH_pathway",value:`"${t}"`}),r.push({key:"_DASH_throughput",value:n})}return n=Me.default.addAdditionalQueryParameterToUrl(n,r),n}(n),o=new be(a);T.load({request:o,success:t=>{!function(e){e&&e[Ce.default.CONTENT_STEERING_RESPONSE.VERSION]&&1===parseInt(e[Ce.default.CONTENT_STEERING_RESPONSE.VERSION])&&(i=new ve,i.version=e[Ce.default.CONTENT_STEERING_RESPONSE.VERSION],e[Ce.default.CONTENT_STEERING_RESPONSE.TTL]&&!isNaN(e[Ce.default.CONTENT_STEERING_RESPONSE.TTL])&&(i.ttl=e[Ce.default.CONTENT_STEERING_RESPONSE.TTL]),e[Ce.default.CONTENT_STEERING_RESPONSE.RELOAD_URI]&&(i.reloadUri=e[Ce.default.CONTENT_STEERING_RESPONSE.RELOAD_URI]),e[Ce.default.CONTENT_STEERING_RESPONSE.PATHWAY_PRIORITY]&&(i.pathwayPriority=e[Ce.default.CONTENT_STEERING_RESPONSE.PATHWAY_PRIORITY]),e[Ce.default.CONTENT_STEERING_RESPONSE.PATHWAY_CLONES]&&(i.pathwayClones=e[Ce.default.CONTENT_STEERING_RESPONSE.PATHWAY_CLONES],i.pathwayClones=i.pathwayClones.filter(e=>function(e){return e[Ce.default.CONTENT_STEERING_RESPONSE.BASE_ID]&&e[Ce.default.CONTENT_STEERING_RESPONSE.ID]&&e[Ce.default.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT]&&e[Ce.default.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][Ce.default.CONTENT_STEERING_RESPONSE.HOST]}(e))),N())}(t),s.trigger(p.default.CONTENT_STEERING_REQUEST_COMPLETED,{currentSteeringResponseData:i,url:a}),e()},error:(t,n,a,o)=>{!function(e,t){try{switch(l.warn("Error fetching data from content steering server",e),t.status){case 404:case 410:r=null;break;case 429:const e=t&&t.headers&&t.headers["retry-after"];null!==e&&(i||(i={}),i.ttl=parseInt(e)),N();break;default:N()}}catch(e){l.error(e)}}(t,o),e(t)},complete:()=>{g.baseUrl.all=v(g.baseUrl),g.location.all=v(g.location)}})}catch(t){e(t)}})}function v(e){return e.all&&0!==e.all.length&&e.current?e.all.filter(t=>t===e.current):[]}function C(e){try{const t=[];return e&&0!==e.length&&i&&i.pathwayClones&&0!==i.pathwayClones.length?(i.pathwayClones.forEac
2h(n=>{let r=e.filter(e=>n[Ce.default.CONTENT_STEERING_RESPONSE.BASE_ID]===e.serviceLocation),i=null;if(r&&r.length>0&&(i=r[0]),i){const e=new URL(i.url);let r=n[Ce.default.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][Ce.default.CONTENT_STEERING_RESPONSE.HOST];r=Me.default.stringHasProtocol(r)?r:`${e.protocol}//${r}`;const a={synthesizedUrl:`${r}${e.pathname}`,serviceLocation:n[Ce.default.CONTENT_STEERING_RESPONSE.ID],queryParams:n[Ce.default.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][Ce.default.CONTENT_STEERING_RESPONSE.PARAMS],reference:i};t.push(a)}}),t):t}catch(e){return l.error(e),[]}}function N(){i&&i.ttl&&!isNaN(i.ttl)&&(d&&clearTimeout(d),d=setTimeout(()=>{b()},1e3*i.ttl))}function D(){d&&clearTimeout(d),d=null}function w(){i=null,r=null,E={},g={baseUrl:{current:null,all:[]},location:{current:null,all:[]}},D()}return y={reset:function(){w(),s.off(p.default.FRAGMENT_LOADING_STARTED,_,y),s.off(p.default.MANIFEST_LOADING_STARTED,S,y),s.off(p.default.THROUGHPUT_MEASUREMENT_STORED,I,y)},setConfig:function(e){e&&(e.adapter&&(n=e.adapter),e.errHandler&&(o=e.errHandler),e.dashMetrics&&(a=e.dashMetrics),e.mediaPlayerModel&&(f=e.mediaPlayerModel),e.manifestModel&&(c=e.manifestModel),e.serviceDescriptionController&&(h=e.serviceDescriptionController),e.throughputController&&(m=e.throughputController),e.eventBus&&(s=e.eventBus))},loadSteeringData:b,getCurrentSteeringResponseData:function(){return i},shouldQueryBeforeStart:function(){const e=R();return!!e&&e.queryBeforeStart},getSteeringDataFromManifest:R,stopSteeringRequestTimer:D,getSynthesizedBaseUrlElements:function(e){try{return C(e).map(e=>{const t=new De.default(e.synthesizedUrl,e.serviceLocation);return t.queryParams=e.queryParams,t.dvbPriority=e.reference.dvbPriority,t.dvbWeight=e.reference.dvbWeight,t.availabilityTimeOffset=e.reference.availabilityTimeOffset,t.availabilityTimeComplete=e.reference.availabilityTimeComplete,t})}catch(e){return l.error(e),[]}},getSynthesizedLocationElements:function(e){try{return C(e).map(e=>{const t=new we.default(e.synthesizedUrl,e.serviceLocation);return t.queryParams=e.queryParams,t})}catch(e){return l.error(e),[]}},initialize:function(){T=(0,Re.default)(e).create({errHandler:o,dashMetrics:a,mediaPlayerModel:f,errors:Ae.default}),s.on(p.default.FRAGMENT_LOADING_STARTED,_,y),s.on(p.default.MANIFEST_LOADING_STARTED,S,y),s.on(p.default.THROUGHPUT_MEASUREMENT_STORED,I,y)}},l=(0,u.default)(e).getInstance().getLogger(y),w(),y}Pe.__dashjs_factory_name="ContentSteeringController";var Oe=r.default.getSingletonFactory(Pe);function Le(e){let t;e=e||{};let n=[];const r=(0,d.default)(this.context).getInstance(),i=(0,l.default)(this.context).getInstance(),a=Oe(this.context).getInstance(),o=e.updateEventName,s=e.addBlacklistEventName;function u(t){if(-1!==n.findIndex(e=>e.entry===t))return;const s=e.enableExpiry?function(){const e=a?a.getCurrentSteeringResponseData():null;return e&&Number.isFinite(e.ttl)?e.ttl:i.get().streaming.blacklistExpiryTime}():NaN;if(e.enableExpiry&&s&&s>0){const e=setTimeout(()=>{c(t)},1e3*s);n.push({entry:t,timeoutId:e})}else n.push({entry:t});r.trigger(o,{entry:t})}function c(e){const t=n.findIndex(t=>t.entry===e);-1!==t&&n.splice(t,1)}function f(e){u(e.entry)}return t={add:u,remove:c,contains:function(e){return!!(n.length&&e&&e.length)&&-1!==n.findIndex(t=>t.entry===e)},reset:function(){s&&r.off(s,f,t);for(const e of n)e.timeoutId&&clearTimeout(e.timeoutId);n=[]}},s&&r.on(s,f,t),t}Le.__dashjs_factory_name="BlackListController";var Ue=r.default.getClassFactory(Le);function xe(e){let t;const n=(e=e||{}).blacklistController;return t={select:function(e){return e&&function(e){let t,n,r=0,i=[],a=0;if(n=e.sort(function(e,t){let n=e.dvbPriority-t.dvbPriority;return isNaN(n)?0:n}).filter(function(e,t,n){return!t||n[0].dvbPriority&&e.dvbPriority&&n[0].dvbPriority===e.dvbPriority}),n.length)return n.length>1&&(n.forEach(e=>{r+=e.dvbWeight,i.push(r)}),t=Math.floor(Math.random()*r),i.every((e,n)=>(a=n,!(t<e)))),n[a]}(function(e){let t=[];return e.filter(function(e){return!n.contains(e.serviceLocation)||(e.dvbPriority&&t.push(e.dvbPriority),!1)}).filter(function(e){return!t.length||!e.dvbPriority||-1===t.indexOf(e.dvbPriority)})}(e))}},t}xe.__dashjs_factory_name="DVBSelector";var Fe=r.default.getClassFactory(xe);function ke(e){let t;const n=(e=e||{}).blacklistController;return t={select:function(e){let t,r=0;return e&&e.some((e,t)=>(r=t,!n.contains(e.serviceLocation)))&&(t=e[r]),t}},t}ke.__dashjs_factory_name="BasicSelector";var Be=r.default.getClassFactory(ke),He=n(1944),Ge=n(656);function Ye(){const e=this.context;let t,n,r;function i(e=[],t=[]){let n=0,i=NaN;for(;n<e.length;){const a=e[n],o=t.findIndex(e=>e.serviceLocation&&e.serviceLocation===a);if(-1!==o&&!r.contains(t[o].serviceLocation)){i=o;break}n+=1}return i}return t={selectBaseUrlIndex:function(e){let t=NaN;if(isNaN(e.selectedIdx)){const r=n.getSteeringDataFromManifest();r&&r.defaultServiceLocationArray.length>
20&&(t=i(r.defaultServiceLocationArray,e.baseUrls))}const r=n.getCurrentSteeringResponseData();return e.baseUrls&&e.baseUrls.length&&r&&r.pathwayPriority&&r.pathwayPriority.length&&(t=i(r.pathwayPriority,e.baseUrls)),t},setConfig:function(e){e.blacklistController&&(r=e.blacklistController),e.contentSteeringController&&(n=e.contentSteeringController)}},n=Oe(e).getInstance(),t}Ye.__dashjs_factory_name="ContentSteeringSelector";var Ve=r.default.getClassFactory(Ye);function qe(){const e=this.context,t=(0,d.default)(e).getInstance(),n=(0,l.default)(e).getInstance();let r,i,a,o,s,u;function c(){i.reset()}return r={chooseSelector:function(e){(0,Ge.checkParameterType)(e,"boolean"),u=e?o:a},select:function(e){if(!e)return;if(n.get().streaming.applyContentSteering){const t=s.selectBaseUrlIndex(e);isNaN(t)||-1===t||(e.selectedIdx=t)}if(!isNaN(e.selectedIdx))return e.baseUrls[e.selectedIdx];let r=u.select(e.baseUrls);return r?(e.selectedIdx=e.baseUrls.indexOf(r),r):(t.trigger(h.default.URL_RESOLUTION_FAILED,{error:new He.default(Ae.default.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE,Ae.default.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE)}),void(u===a&&c()))},reset:c,setConfig:function(e){e.selector&&(u=e.selector),e.contentSteeringSelector&&(s=e.contentSteeringSelector)}},i=Ue(e).create({updateEventName:h.default.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,addBlacklistEventName:h.default.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD,enableExpiry:!0}),a=Be(e).create({blacklistController:i}),o=Fe(e).create({blacklistController:i}),s=Ve(e).create(),s.setConfig({blacklistController:i,addBlacklistEventName:h.default.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD}),u=a,r}qe.__dashjs_factory_name="BaseURLSelector";var Ke=r.default.getClassFactory(qe);function je(){let e,t;const n=this.context,r=(0,d.default)(n).getInstance(),i=(0,Ne.default)(n).getInstance();let a,o,s;function u(e){a.update(e),o.chooseSelector(t.getIsDVB(e)),r.trigger(p.default.BASE_URLS_UPDATED,{baseUrls:l(e)})}function l(e){return a.getBaseUrls(e)}return e={reset:function(){a.reset(),o.reset()},initialize:function(e){a.setConfig({adapter:t,contentSteeringController:s}),u(e)},resolve:function(e){const t=a.getForPath(e).reduce((e,t)=>{const n=o.select(t);return n?(i.isRelative(n.url)?e.url=i.resolve(n.url,e.url):(e.url=n.url,e.serviceLocation=n.serviceLocation),e.availabilityTimeOffset=n.availabilityTimeOffset,e.availabilityTimeComplete=n.availabilityTimeComplete,e.queryParams=n.queryParams,e):new De.default},new De.default);if(!i.isRelative(t.url))return t},setConfig:function(e){e.baseURLTreeModel&&(a=e.baseURLTreeModel),e.baseURLSelector&&(o=e.baseURLSelector),e.adapter&&(t=e.adapter),e.contentSteeringController&&(s=e.contentSteeringController)},getBaseUrls:l,update:u},a=Ie(n).create(),o=Ke(n).create(),r.on(h.default.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,function(e){a.invalidateSelectedIndexes(e.entry)},e),e}je.__dashjs_factory_name="BaseURLController";var We=r.default.getClassFactory(je);class ze{constructor(e){if(this.offset=e._offset,this.type=e.type,this.size=e.size,this.boxes=[],e.boxes)for(let t=0;t<e.boxes.length;t++)this.boxes.push(new ze(e.boxes[t]));switch(this.isComplete=!0,e.type){case"sidx":if(this.timescale=e.timescale,this.earliest_presentation_time=e.earliest_presentation_time,this.first_offset=e.first_offset,this.references=e.references,e.references){this.references=[];for(let t=0;t<e.references.length;t++){let n={reference_type:e.references[t].reference_type,referenced_size:e.references[t].referenced_size,subsegment_duration:e.references[t].subsegment_duration};this.references.push(n)}}break;case"emsg":this.id=e.id,this.version=1===e.version?1:0,this.value=e.value,this.timescale=e.timescale,this.scheme_id_uri=e.scheme_id_uri,this.presentation_time_delta=1===e.version?e.presentation_time:e.presentation_time_delta,this.event_duration=e.event_duration,this.message_data=e.message_data;break;case"mdhd":this.timescale=e.timescale;break;case"mfhd":this.sequence_number=e.sequence_number;break;case"subs":this.entry_count=e.entry_count,this.entries=e.entries;break;case"tfhd":this.base_data_offset=e.base_data_offset,this.sample_description_index=e.sample_description_index,this.default_sample_duration=e.default_sample_duration,this.default_sample_size=e.default_sample_size,this.default_sample_flags=e.default_sample_flags,this.flags=e.flags;break;case"tfdt":this.version=e.version,this.baseMediaDecodeTime=e.baseMediaDecodeTime,this.flags=e.flags;break;case"trun":if(this.sample_count=e.sample_count,this.first_sample_flags=e.first_sample_flags,this.data_offset=e.data_offset,this.flags=e.flags,this.samples=e.samples,e.samples){this.samples=[];for(let t=0,n=e.samples.length;t<n;
2t++){let n={sample_size:e.samples[t].sample_size,sample_duration:e.samples[t].sample_duration,sample_composition_time_offset:e.samples[t].sample_composition_time_offset};this.samples.push(n)}}break;case"prft":this.version=e.version,this.reference_track_ID=e.reference_track_ID,this.ntp_timestamp_sec=e.ntp_timestamp_sec,this.ntp_timestamp_frac=e.ntp_timestamp_frac,this.media_time=e.media_time,this.flags=e.flags}}getChildBox(e){for(let t=0;t<this.boxes.length;t++)if(this.boxes[t].type===e)return this.boxes[t]}getChildBoxes(e){let t=[];for(let n=0;n<this.boxes.length;n++)this.boxes[n].type===e&&t.push(this.boxes[n]);return t}}var $e=ze;function Qe(){let e,t;function n(e){let n=[];if(!e||!t||"function"!=typeof t.fetchAll)return n;let i,a=t.fetchAll(e);for(let e=0,t=a.length;e<t;e++)i=r(a[e]),i&&n.push(i);return n}function r(e){if(!e)return null;let t=new $e(e);return e.hasOwnProperty("_incomplete")&&(t.isComplete=!e._incomplete),t}return e={getBox:function(e){return e&&t&&t.boxes&&0!==t.boxes.length&&"function"==typeof t.fetch?r(t.fetch(e)):null},getBoxes:n,setData:function(e){t=e},getLastBox:function(){if(!t||!t.boxes||!t.boxes.length)return null;let e=n(t.boxes[t.boxes.length-1].type);return e.length>0?e[e.length-1]:null}},e}Qe.__dashjs_factory_name="IsoFile";var Xe=r.default.getClassFactory(Qe),Ze=n(6877),Je=class{constructor({found:e,sizeOfLastCompletedBox:t,sizeOfLastFoundTargetBox:n,startOffsetOfLastCompletedBox:r,startOffsetOfLastFoundTargetBox:i,typeOfLastCompletedBox:a,typeOfLastTargetBox:o}){this.found=void 0!==e&&e,this.sizeOfLastCompletedBox=void 0!==t?t:0,this.sizeOfLastFoundTargetBox=void 0!==n?n:0,this.startOffsetOfLastCompletedBox=void 0!==r?r:0,this.startOffsetOfLastFoundTargetBox=void 0!==i?i:0,this.typeOfLastCompletedBox=void 0!==a?a:null,this.typeOfLastTargetBox=void 0!==o?o:null}};function et(){let e,t,n=this.context;function r(e){if(!e)return null;void 0===e.fileStart&&(e.fileStart=0);let t=Ze.parseBuffer(e),r=Xe(n).create();return r.setData(t),r}function i(e,t){return e[t+3]>>>0|e[t+2]<<8>>>0|e[t+1]<<16>>>0|e[t]<<24>>>0}function a(e,t){return String.fromCharCode(e[t++])+String.fromCharCode(e[t++])+String.fromCharCode(e[t++])+String.fromCharCode(e[t])}return t={findInitRange:function(t){let n,i,a=null;const o=r(t);if(!o)return a;const s=o.getBox("ftyp"),u=o.getBox("moov");return e.debug("Searching for initialization."),u&&u.isComplete&&(n=s?s.offset:u.offset,i=u.offset+u.size-1,a=n+"-"+i,e.debug("Found the initialization. Range: "+a)),a},findLastTopIsoBoxCompleted:function(e,t,n){if(void 0===n&&(n=0),!t||n+8>=t.byteLength)return new Je({found:!1});const r=t instanceof ArrayBuffer?new Uint8Array(t):t;let o,s=0,u=0,l=null;for(;n<r.byteLength;){const t=i(r,n),c=a(r,n+4);if(0===t)break;n+t<=r.byteLength&&(e.indexOf(c)>=0?o=new Je({found:!0,startOffsetOfLastFoundTargetBox:n,sizeOfLastFoundTargetBox:t,typeOfLastTargetBox:c}):(s=n,u=t,l=c)),n+=t}return o||new Je({found:!1,startOffsetOfLastCompletedBox:s,sizeOfLastCompletedBox:u,typeOfLastCompletedBox:l})},getMediaTimescaleFromMoov:function(e){let t=r(e),n=t?t.getBox("mdhd"):void 0;return n?n.timescale:NaN},getSamplesInfo:function(e){if(!e||0===e.byteLength)return{sampleList:[],lastSequenceNumber:NaN,totalDuration:NaN,numSequences:NaN};let t,n,i,a,o,s,u,l,c,f,d,h,g,p,m,E,T,y=r(e),_=y.getBoxes("moof"),S=y.getBoxes("mfhd");E=y.getBoxes("moof").length,m=S[S.length-1].sequence_number,i=0,s=[];let I=-1,A=-1;for(d=0;d<_.length;d++){let e=_[d],r=e.getChildBoxes("traf");for(c=0;c<r.length;c++){let d=r[c],m=d.getChildBox("tfhd"),E=d.getChildBox("tfdt");o=E.baseMediaDecodeTime;let y=d.getChildBoxes("trun"),_=d.getChildBoxes("subs");for(f=0;f<y.length;f++){let r=y[f];for(i=r.sample_count,p=(m.base_data_offset||0)+(r.data_offset||0),l=0;l<i;l++){u=r.samples[l],t=void 0!==u.sample_duration?u.sample_duration:m.default_sample_duration,a=void 0!==u.sample_size?u.sample_size:m.default_sample_size,n=void 0!==u.sample_composition_time_offset?u.sample_composition_time_offset:0;let i={dts:o,cts:o+n,duration:t,offset:e.offset+p,size:a,subSizes:[a]};if(_)for(h=0;h<_.length;h++){let e=_[h];if(I<e.entry_count-1&&l>A&&(I++,A+=e.entries[I].sample_delta),l==A){i.subSizes=[];let t=e.entries[I];for(g=0;g<t.subsample_count;g++)i.subSizes.push(t.subsamples[g].subsample_size)}}s.push(i),p+=a,o+=t}}T=o-E.baseMediaDecodeTime}}return{sampleList:s,lastSequenceNumber:m,totalDuration:T,numSequences:E}},parse:r},e=(0,u.default)(n).getInstance().getLogger(t),t}et.__dashjs_factory_name="BoxParser";var tt=r.default.getSingletonFactory(et),nt=n(559);const rt={0:void 0,1:{channels:1,lfe:0},2:{channels:2,lfe:0},3:{channels:3,lfe:0},4:{channels:4,lfe:0},5:{channels:5,lfe:0},6:{channels:5,lfe:1},7:{channels:7,lfe:1},8:{channels:2,lfe:0},9:{channels:3,lfe:0},10:{channels:4,lfe:0},11:{channels:6,lfe:1},12:{channels:7,lfe:1},13:{channels:22,lfe:2},14:{channels:7,lfe:1},15:{channels:10,lfe:2},16:{channels:9,lfe:1},17:{channels:11,lfe:1},18:{channels:13,lfe:1},19:{channels:11,lfe:1},20:{channels:13,lfe:1}};function it(e){return 0==e?0:e.toString(2).match(/1/g).length}function at(e,t){let n,r=parseInt("0x"+e,16),i=r&t[0],a=r&t[1];return n=it(i)+2*it(a),n}var ot=function(e,t=!1){let n;if(!e||!e.schemeIdUri||!e.value)return;const r=e.schemeIdUri,i=e.value;
2return"urn:mpeg:dash:23003:3:audio_channel_configuration:2011"===r||"urn:mpeg:mpegB:cicp:ChannelConfiguration"===r?n=rt[i]&&rt[i].channels+(t?rt[i].lfe:0):"tag:dolby.com,2014:dash:audio_channel_configuration:2011"===r?n=function(e,t){if(4===e.length)return at(e,[63880+(t?6:0),1648])}(i,t):"tag:dolby.com,2015:dash:audio_channel_configuration:2015"===r?n=function(e,t){if(6===e.length)return"800000"===e?24:at(e,[56834+(t?4160:0),205245])}(i,t):"tag:dts.com,2014:dash:audio_channel_configuration:2012"===r?n=parseInt(i):"tag:dts.com,2018:uhd:audio_channel_configuration"===r&&(n=function(e,t){if(!(e.length>8))return at(e,[4294901727+(t?65568:0),0])}(i,t)),n};function st(){const e=this.context,t=(0,d.default)(e).getInstance();let n,r,i,a,o,s,l;function c(e,t,n,r=void 0){const a=p(e,t,n,r);return i.isCodecSupportedBasedOnTestedConfigurations(a,e)}function f(e,t,n,r,i,a=void 0){const o=p(e,t,n,a),s=JSON.stringify(o);r.has(s)||(r.add(s),i.push(o))}function p(e,t,n,i){let o=null;switch(e){case g.default.VIDEO:o=function(e,t,n){let i={codec:t,width:e&&e.width||null,height:e&&e.height||null,framerate:r.getFramerate(e)||null,bitrate:e&&e.bandwidth||null,isSupported:!0};if(e.tagName===Ce.default.PRESELECTION&&n&&(i.width||(i.width=n.width||null),i.height||(i.height=n.height||null),i.bitrate||(i.bitrate=n.bandwidth||null),i.framerate||(i.framerate=r.getFramerate(n)||null)),a.get().streaming.capabilities.filterVideoColorimetryEssentialProperties&&(Object.assign(i,E(e)),e.tagName===Ce.default.PRESELECTION&&n)){let e=E(n),t=e.isSupported;delete e.isSupported,i.isSupported=i.isSupported&&t,m(i,e)}let o=i.isSupported;if(a.get().streaming.capabilities.filterHDRMetadataFormatEssentialProperties&&(Object.assign(i,T(e)),e.tagName===Ce.default.PRESELECTION&&n)){let e=T(n),t=e.isSupported;delete e.isSupported,i.isSupported=i.isSupported&&t,m(i,e)}let s=i.isSupported;return o&&s||(i.isSupported=!1),i}(t,n,i);break;case g.default.AUDIO:o=function(e,t,n){let r={codec:t,samplerate:e&&e.audioSamplingRate||null,bitrate:e&&e.bandwidth||null,isSupported:!0};return e.tagName===Ce.default.PRESELECTION&&n&&(r.samplerate||(r.samplerate=n.audioSamplingRate||null),r.bitrate||(r.bitrate=n.bandwidth||null)),a.get().streaming.capabilities.filterAudioChannelConfiguration&&Object.assign(r,function(e,t){let n=e[Ce.default.AUDIO_CHANNEL_CONFIGURATION]||[],r=null;0==n.length&&t&&(n=t[Ce.default.AUDIO_CHANNEL_CONFIGURATION]||[]);const i=n.map(e=>ot(e,!0));return i.every(e=>e==i[0])&&(r=i[0]),{channels:r}}(e,n)),r}(t,n,i);break;default:return o}return i&&(o=y(i,o)),y(t,o)}function m(e,t){for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&!(n in e)&&(e[n]=t[n]);return e}function E(e){let t={colorGamut:null,transferFunction:null,isSupported:!0};for(const n of e.EssentialProperty||[])n.schemeIdUri===g.default.COLOUR_PRIMARIES_SCHEME_ID_URI&&["1","5","6","7"].includes(n.value.toString())?t.colorGamut=g.default.MEDIA_CAPABILITIES_API.COLORGAMUT.SRGB:n.schemeIdUri===g.default.COLOUR_PRIMARIES_SCHEME_ID_URI&&["11","12"].includes(n.value.toString())?t.colorGamut=g.default.MEDIA_CAPABILITIES_API.COLORGAMUT.P3:n.schemeIdUri===g.default.COLOUR_PRIMARIES_SCHEME_ID_URI&&["9"].includes(n.value.toString())?t.colorGamut=g.default.MEDIA_CAPABILITIES_API.COLORGAMUT.REC2020:n.schemeIdUri===g.default.COLOUR_PRIMARIES_SCHEME_ID_URI&&["2"].includes(n.value.toString())?t.colorGamut=null:n.schemeIdUri===g.default.COLOUR_PRIMARIES_SCHEME_ID_URI&&(t.isSupported=!1),n.schemeIdUri===g.default.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI&&["1","6","13","14","15"].includes(n.value.toString())?t.transferFunction=g.default.MEDIA_CAPABILITIES_API.TRANSFERFUNCTION.SRGB:n.schemeIdUri===g.default.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI&&["16"].includes(n.value.toString())?t.transferFunction=g.default.MEDIA_CAPABILITIES_API.TRANSFERFUNCTION.PQ:n.schemeIdUri===g.default.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI&&["18"].includes(n.value.toString())?t.transferFunction=g.default.MEDIA_CAPABILITIES_API.TRANSFERFUNCTION.HLG:n.schemeIdUri===g.default.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI&&["2"].includes(n.value.toString())?t.transferFunction=null:n.schemeIdUri===g.default.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI&&(t.isSupported=!1);return t}function T(e){let t={isSupported:!0,hdrMetadataType:null};for(const n of e.EssentialProperty||[])n.schemeIdUri===g.default.HDR_METADATA_FORMAT_SCHEME_ID_URI&&n.value===g.default.HDR_METADATA_FORMAT_VALUES.ST2094_10?t.hdrMetadataType=g.default.MEDIA_CAPABILITIES_API.HDR_METADATATYPE.SMPTE_ST_2094_10:n.schemeIdUri===g.default.HDR_METADATA_FORMAT_SCHEME_ID_URI&&n.value===g.default.HDR_METADATA_FORMAT_VALUES.SL_HDR2?t.hdrMetadataType=g.default.MEDIA_CAPABILITIES_API.HDR_METADATATYPE.SLHDR2:n.schemeIdUri===g.default.HDR_METADATA_FORMAT_SCHEME_ID_URI&&n.value===g.default.HDR_METADATA_FORMAT_VALUES.ST2094_40?t.hdrMetadataType=g.default.MEDIA_CAPABILITIES_API.HDR_METADATATYPE.SMPTE_ST_2094_40:n.schemeIdUri===g.default.HDR_METADATA_FORMAT_SCHEME_ID_URI&&(t.isSupported=!1);return t}function y(e,t){return s&&e&&e[Ce.default.CONTENT_PROTECTION]&&e[Ce.default.CONTENT_PROTECTION].length>
20&&(t.keySystemsMetadata=s.getSupportedKeySystemMetadataFromContentProtection(e[Ce.default.CONTENT_PROTECTION])),t}function _(e){if(!e||0===e.length)return!0;let t=0;for(;t<e.length;){if(!i.supportsEssentialProperty(e[t]))return l.debug("[Stream] EssentialProperty not supported: "+e[t].schemeIdUri),!1;t+=1}return!0}return n={setConfig:function(e){e&&(e.adapter&&(r=e.adapter),e.capabilities&&(i=e.capabilities),e.settings&&(a=e.settings),e.protectionController&&(s=e.protectionController),e.customParametersModel&&(o=e.customParametersModel))},filterUnsupportedFeatures:function(e){return new Promise(n=>{const s=[g.default.VIDEO,g.default.AUDIO],u=[];s.forEach(t=>{const n=function(e,t){if(!e||!e.Period||0===e.Period.length)return[];const n=new Set,i=[];return e.Period.forEach(e=>{e.AdaptationSet.forEach(e=>{r.getIsTypeOf(e,t)&&e.Representation.forEach((a,o)=>{const s=r.getCodec(e,o,!1);f(t,a,s,n,i);const u=r.getSupplementalCodecs(a);u.length>0&&f(t,a,u[0],n,i)})}),e.Preselection&&e.Preselection.length&&e.Preselection.forEach(a=>{if(r.getPreselectionIsTypeOf(a,e.AdaptationSet,t)){const o=r.getCodecForPreselection(a,e.AdaptationSet),s=r.getCommonRepresentationForPreselection(a,e.AdaptationSet);f(t,a,o,n,i,s)}})}),i}(e,t);n.forEach(e=>{u.push(i.runCodecSupportCheck(e,t))})}),Promise.allSettled(u).then(()=>(s.forEach(n=>
2{!function(e,n){n&&n.Period&&0!==n.Period.length&&n.Period.forEach(n=>{!function(e,n){e&&e.AdaptationSet&&0!==e.AdaptationSet.length&&(e.AdaptationSet=e.AdaptationSet.filter(e=>{r.getIsTypeOf(e,n)&&function(e,t){e.Representation&&0!==e.Representation.length&&(e.Representation=e.Representation.filter((n,i)=>{const a=r.getCodec(e,i,!1),o=c(t,n,a);let s=function(e,t){let n=!1;const i=r.getSupplementalCodecs(e);return i.length>0&&(i.length>1&&l.warn("[CapabilitiesFilter] Multiple supplemental codecs not supported; using the first in list"),n=c(t,e,i[0])),n}(n,t);return s&&(l.debug(`[CapabilitiesFilter] Codec supported. Upgrading codecs string of Representation with ID ${n.id}`),n.codecs=n[Ce.default.SUPPLEMENTAL_CODECS]),o||s||l.warn(`[CapabilitiesFilter] Codec ${a} not supported. Removing Representation with ID ${n.id}`),o||s}))}(e,n);const i=e.Representation&&e.Representation.length>0;return i||(t.trigger(h.default.ADAPTATION_SET_REMOVED_NO_CAPABILITIES,{adaptationSet:e}),l.warn(`[CapabilitiesFilter] AdaptationSet with ID ${e.id?e.id:"undefined"} and codec ${e.codecs?e.codecs:"undefined"} has been removed because of no supported Representation`)),i}))}(n,e),function(e,t){e&&e.Preselection&&0!==e.Preselection.length&&(e.Preselection=e.Preselection.filter(n=>{if(r.getPreselectionIsTypeOf(n,e.AdaptationSet,t)){const i=r.getCodecForPreselection(n,e.AdaptationSet);let a=!0;if(i){let o=r.getCommonRepresentationForPreselection(n,e.AdaptationSet);a=c(t,n,i,o)}return a||l.warn(`[CapabilitiesFilter] Preselection@codecs ${i} not supported. Removing Preselection with ID ${n.id}`),a}return!0}))}(n,e)})}(n,e)}),a.get().streaming.capabilities.filterUnsupportedEssentialProperties&&function(e){e&&e.Period&&0!==e.Period.length&&e.Period.forEach(e=>{e.AdaptationSet=e.AdaptationSet.filter(e=>{if(!e.Representation||0===e.Representation.length)return!0;if(!_(r.getEssentialProperties(e)))return l.warn(`[CapabilitiesFilter] removed AdaptationSet (id: ${e.id}) with unsupported EssentialProperty`),!1;e.Representation=e.Representation.filter(e=>_(r.getEssentialProperties(e)));const t=e.Representation&&e.Representation.length>0;return t||l.warn(`[CapabilitiesFilter] removed AdaptationSet (id: ${e.id}) with unsupported EssentialProperty on all Representations`),t}),e.Preselection&&e.Preselection.length&&(e.Preselection=e.Preselection.filter(e=>!!_(r.getEssentialProperties(e))||(l.warn(`[CapabilitiesFilter] removed Preselection (id: ${e.id}) with unsupported EssentialProperty`),!1)))})}(e),function(e){e&&e.Period&&0!==e.Period.length&&e.Period.forEach(e=>{e.Preselection&&(e.Preselection=e.Preselection.filter(e=>{const t=String(e.preselectionComponents).split(" ").length;return 1!==t&&l.warn(`Multi-Representation Preselection (id: ${e.id}) removed as not supported.`),1===t}))})}(e),function(e){e&&e.Period&&0!==e.Period.length&&e.Period.forEach(e=>{e.Preselection&&(e.Preselection=e.Preselection.filter(t=>{const n=String(t.preselectionComponents).split(" "),r=e.AdaptationSet.map(e=>e.id);return n.every(e=>r.includes(e))}))})}(e),function(e){if(!e||!e.Period||0===e.Period.length)return Promise.resolve();const t=[];return e.Period.forEach(e=>{t.push(function(e){return new Promise(t=>{if(!e||!e.AdaptationSet||0===e.AdaptationSet.length)return void t();const n=[];e.AdaptationSet.forEach(e=>{n.push(function(e){return new Promise(t=>{if(!e.Representation||0===e.Representation.length)return void t();const n=[];e.Representation.forEach(e=>{n.push(function(e){const t=[],n=o.getCustomCapabilitiesFilters();return n&&0!==n.length?n.forEach(n=>{t.push(new Promise(t=>t(n(e))))}):t.push(Promise.resolve(!0)),Promise.all(t)}(e))}),Promise.all(n).then(n=>{e.Representation=e.Representation.filter((e,t)=>{let r=n[t].every(e=>e);return r||l.debug("[Stream] Representation "+e.id+" has been removed because of unsupported CustomFilter"),r}),t()}).catch(e=>{l.warn("[Stream] at least one promise rejected in CustomFilter with error: ",e),t()})})}(e))}),Promise.all(n).then(()=>{e.AdaptationSet=e.AdaptationSet.filter(e=>e.Representation&&e.Representation.length>0),t()}).catch(()=>{t()})})}(e))}),Promise.all(t)}(e))).then(()=>{n()}).catch(e=>{l.error(e),n()})})}},l=(0,u.default)(e).getInstance().getLogger(n),n}st.__dashjs_factory_name="CapabilitiesFilter";var ut=r.default.getSingletonFactory(st),lt=n(1234);function ct(){const e=this.context,t=(0,d.default)(e).getInstance();let n,r,i,a,s,l,c,f,m,E;function T(){r=!1;const e=Me.default.parseUserAgent();i=e&&e.browser&&e.browser.name&&"safari"===e.browser.name.toLowerCase()}function y(){r=!1}function _(e){if(e.streamId!==l.getActiveStreamInfo().id||!m)return;const t=c.getLiveDelay();c.getBufferLevel()>t/2&&(m=!1)}function S(e){e.streamId===l.getActiveStreamInfo().id&&(m=e.state===o.BUFFER_EMPTY)}function I(){f.getCatchupModeEnabled()||a.setPlaybackRate(1)}function A(){c.getIsDynamic()&&f.getCatchupModeEnabled()&&(f.getCatchupPlaybackRates().max>0||f.getCatchupPlaybackRates().min<0)&&!c.isPaused()&&!c.isSeeking()&&function(){try{if(c.getTime()<=0||r)return!1;if(m&&0===a.getPlaybackRate())return!1;const e=v();return e===g.default.LIVE_CATCHUP_MODE_LOLP?function(e,t){try{return Math.abs(R())>0||e<t}catch(e){return!1}}(c.getBufferLevel(),s.get().streaming.liveCatchup.playbackBufferMin):e===g.default.LIVE_CATCHUP_MODE_STEP?function(){try{const e=f.getCatchupStepSettings(),t=b();if(t<-1*e.start.min||t>e.start.max)return E.debug(`[_stepNeedToCatchUp] latency offset ${t}`),!0;if(1!==c.getPlaybackRate())return!0}catch(e){return!1}}():function(){try{return Math.abs(R())>0}catch(e){return!1}}()}catch(e){return!1}}()&&function(){if(!r&&a){let e;const t=a.getPlaybackRate(),n=f.getCatchupPlaybackRates(),o=c.getBufferLevel(),u=R(),l=b(),d=s.get().streaming.liveCatchup.liveThreshold,h=f.getCatchupMaxDrift();if(!isNaN(h)&&h>0&&u>h)E.info("[CatchupController]: Low Latency catchup mechanism. Latency too high, doing a seek to live point"),r=!0,c.seekToCurrentLive(!0,!1);else if(!isNaN(d)&&d>0&&l>d)t>1&&(E.info("[CatchupController]: Past live threshold, setting playback rate to 1.0"),a.setPlaybackRate(1));else{const r=c.getCurrentLiveLatency(),u=c.getLiveDelay();e=v()===g.default.LIVE_CATCHUP_MODE_LOLP?function(e,t,n,r,i){let a;if(i<r){const t=Math.abs(e.min),n=5*(i-r);a=1-t+2*t/(1+Math.pow(Math.E,-n)),E.debug("[LoL+ playback control_buffer-based] bufferLevel: "+i+", newRate: "+a)}else{const r=.02;if(Math.abs(t-n)<=r*n)a=1;else{const r=t-n,i=r<0?Math.abs(e.min):e.max,o=5*r;a=1-i+2*i/(1+Math.pow(Math.E,-o))}E.debug("[LoL+ playback control_latency-based] latency: "+t+", newRate: "+a)}return a}(n,r,u,s.get().streaming.liveCatchup.playbackBufferMin,o):v()===g.default.LIVE_CATCHUP_MODE_STEP?function(e,t,n){let r=1;const i=f.getCatchupStepSettings();if(!m){const a=b();a>i.stop.max&&a>0?r=1+e.max:a<-1*i.stop.min&&a<0&&(r=1+e.min),(a>-1*i.stop.min&&a<0||a<i.stop.max&&a>0||0===a)&&(r=1),c.getPlaybackStalled()&&n<=t/2&&a>0&&(r=1)}return E.debug(`[_calculateNewPlaybackRateStep] rate should be ${r}`),r}(n,u,o):function(e,t,n,r){if(m)return 1;const i=t-n,a=i<0?Math.abs(e.min):e.max,o=5*i;let s=1-a+2*a/(1+Math.pow(Math.E,-o));return c.getPlaybackStalled()&&r<=n/2&&i>0&&(s=1),s}(n,r,u,o);const l=i?.25:.02/(.5/n.max);(e&&Math.abs(t-e)>=l||1==e)&&(E.debug(`[CatchupController]: Setting playback rate to ${e}`),a.setPlaybackRate(e))}}}()}function R(){return c.getCurrentLiveLatency()-c.getLiveDelay()}function b(){return c.getCurrentLiveLatency()-c.getOriginalLiveDelay()}function v(){const e=s.get().streaming.liveCatchup.playbackBufferMin;let t=g.default.LIVE_CATCHUP_MODE_DEFAULT;return s.get().streaming.liveCatchup.mode===g.default.LIVE_CATCHUP_MODE_STEP?t=g.default.LIVE_CATCHUP_MODE_STEP:s.get().streaming.liveCatchup.mode!==g.default.LIVE_CATCHUP_MODE_LOLP||null===e||isNaN(e)||(t=g.default.LIVE_CATCHUP_MODE_LOLP),t}function C(){f.getCatchupPlaybackRates(!0)}return n={reset:function(){t.off(p.default.BUFFER_LEVEL_UPDATED,_,n),t.off(p.default.BUFFER_LEVEL_STATE_CHANGED,S,n),t.off(p.default.PLAYBACK_PROGRESS,A,n),t.off(p.default.PLAYBACK_TIME_UPDATED,A,n),t.off(p.default.PLAYBACK_SEEKED,y,n),t.off(h.default.SETTING_UPDATED_CATCHUP_ENABLED,I,n),t.off(h.default.SETTING_UPDATED_PLAYBACK_RATE_MIN,C,n),t.off(h.default.SETTING_UPDATED_PLAYBACK_RATE_MAX,C,n),t.off(p.default.STREAM_INITIALIZED,C,n),T(),a.setPlaybackRate(1,!0)},setConfig:function(e){e&&(e.settings&&(s=e.settings),e.videoModel&&(a=e.videoModel),e.streamController&&(l=e.streamController),e.playbackController&&(c=e.playbackController),e.mediaPlayerModel&&(f=e.mediaPlayerModel))},initialize:function(){t.on(p.default.BUFFER_LEVEL_UPDATED,_,n),t.on(p.default.BUFFER_LEVEL_STATE_CHANGED,S,n),t.on(p.default.PLAYBACK_PROGRESS,A,n),t.on(p.default.PLAYBACK_TIME_UPDATED,A,n),t.on(p.default.PLAYBACK_SEEKED,y,n),t.on(h.default.SETTING_UPDATED_CATCHUP_ENABLED,I,n),t.on(h.default.SETTING_UPDATED_PLAYBACK_RATE_MIN,C,n),t.on(h.default.SETTING_UPDATED_PLAYBACK_RATE_MAX,C,n),t.on(p.default.STREAM_INITIALIZED,C,n),C()}},E=(0,u.default)(e).getInstance().getLogger(n),T(),n}ct.__dashjs_factory_name="CatchupController";var ft=r.default.getSingletonFactory(ct);function dt(){let e,t;return e={setConfig:function(e){e&&e.serviceDescriptionController&&(t=e.serviceDescriptionController)},isAdaptationsIncluded:function(e){const{adaptationSetsArray:n}=t?.getServiceDescriptionSettings()?.clientDataReporting??{};return!n||0===n?.length||n.includes(e)},isServiceLocationIncluded:function(e,n){if(e===R.HTTPRequest.CONTENT_STEERING_TYPE)return!0;const{serviceLocationsArray:r}=t?.getServiceDescriptionSettings()?.clientDataReporting??{};return!r||0===r?.length||r.includes(n)}},e}dt.__dashjs_factory_name="ClientDataReportingController";var ht=r.default.getSingletonFactory(dt),gt=n(6066),pt=n(1926);const mt=[{oldKey:"dashjs_vbitrate",newKey:"dashjs_video_bitrate"},{oldKey:"dashjs_abitrate",newKey:"dashjs_audio_bitrate"},{oldKey:"dashjs_vsettings",newKey:"dashjs_video_settings"},{oldKey:"dashjs_asettings",newKey:"dashjs_audio_settings"}],Et="dashjs_?_bitrate",Tt="dashjs_?_settings",yt="localStorage",_t="lastBitrate",St="lastMediaSettings";function It(e){e=e||{};const t=this.context,n=e.settings;let r,i,a;function o(e){if(void 0!==a)return a;let t;a=!1;try{"undefined"!=typeof window&&(t=window[e])}catch(e){return i.warn("DOMStorage access denied: "+e.message),a}if(!t||e!==yt&&"sessionStorage"!==e)return a;try{t.setItem("1","1"),t.removeItem("1"),a=!0}catch(e){i.warn("DOMStorage is supported, but cannot be used: "+e.message)}return a}function s(){const e=6e5;return Math.round((new Date).getTime()/e)*e}function l(e,t){return o(e)&&n.get().streaming[t+"CachingInfo"].enabled}function c(){if(!n)throw new Error(g.default.MISSING_CONFIG_ERROR)}return r={getSavedBitrateSettings:function(e){if(c(),!n.get().streaming.lastBitrateCachingInfo.enabled)return NaN;let t=NaN;if(l(yt,_t)){const r=Et.replace(/\?/,e);try{const a=JSON.parse(localStorage.getItem(r))||{},o=(new Date).getTime()-parseInt(a.timestamp,10)>=n.get().streaming.lastBitrateCachingInfo.ttl||!1,s=parseFloat(a.bitrate);isNaN(s)||o?o&&localStorage.removeItem(r):(t=s,i.debug("Last saved bitrate for "+e+" was "+s))}catch(e){return null}}return t},setSavedBitrateSettings:function(e,t){if(l(yt,_t)&&t){const n=Et.replace(/\?/,e);try{localStorage.setItem(n,JSON.stringify({bitrate:t.toFixed(3),timestamp:s()}))}catch(e){i.error(e.message)}}},getSavedMediaSettings:function(e){if(c(),!n.get().streaming.lastMediaSettingsCachingInfo.enabled)return null;let t=null;if(l(yt,St)){const r=Tt.replace(/\?/,e);try{const e=JSON.parse(localStorage.getItem(r))||{},i=(new Date).getTime()-parseInt(e.timestamp,10)>=n.get().streaming.lastMediaSettingsCachingInfo.ttl||!1;t=e.settings,i&&(localStorage.removeItem(r),t=null)}catch(e){return null}}return t},setSavedMediaSettings:function(e,t){if(l(yt,St)){const n=Tt.replace(/\?/,e);try{localStorage.setItem(n,JSON.stringify({settings:t,timestamp:s()}))}catch(e){i.error(e.message)}}}},i=(0,u.default)(t).getInstance().getLogger(r),o(yt)&&mt.forEach(e
2=>{const t=localStorage.getItem(e.oldKey);if(t){localStorage.removeItem(e.oldKey);try{localStorage.setItem(e.newKey,t)}catch(e){i.error(e.message)}}}),r}It.__dashjs_factory_name="DOMStorage";var At=r.default.getSingletonFactory(It);function Rt(){const e=this.context,t=(0,l.default)(e).getInstance();let n={},r=[];return{save:function(e){const i=e.streamId,a=e.representation.id;n[i]=n[i]||{};const o=!n[i][a];n[i][a]=e,o&&(r.push({streamId:i,representationId:a}),function(){const e=t.get().streaming.cacheInitSegmentsLimit;for(;r.length>e;){const e=r.shift();n[e.streamId]&&n[e.streamId][e.representationId]&&(delete n[e.streamId][e.representationId],0===Object.keys(n[e.streamId]).length&&delete n[e.streamId])}}())},extract:function(e,t){return n&&n[e]&&n[e][t]?n[e][t]:null},reset:function(){n={},r=[]},getStats:function(){const e=Object.keys(n).length;let i=0;for(const e in n)i+=Object.keys(n[e]).length;return{entryCount:i,streamCount:e,maxSize:t.get().streaming.cacheInitSegmentsLimit,accessOrderLength:r.length}}}}Rt.__dashjs_factory_name="InitCache";var bt=r.default.getSingletonFactory(Rt),vt=class{constructor(){this.accessibility=null,this.adaptationSetSwitchingCompatibleIds=[],this.audioChannelConfiguration=null,this.bitrateList=null,this.co
2dec=null,this.contentProtection=null,this.essentialProperties=[],this.id=null,this.index=null,this.isEmbedded=null,this.isFragmented=null,this.isPreselection=!1,this.isText=!1,this.labels=null,this.lang=null,this.mimeType=null,this.normalizedKeyIds=new Set,this.representationCount=0,this.roles=null,this.segmentAlignment=!1,this.segmentSequenceProperties=[],this.selectionPriority=1,this.streamInfo=null,this.subSegmentAlignment=!1,this.supplementalProperties=[],this.type=null,this.viewpoint=null}},Ct=class{constructor(){this.id=null,this.index=null,this.start=NaN,this.duration=NaN,this.manifestInfo=null,this.isLast=!0,this.isEncrypted=!1}},Nt=class{constructor(){this.availableFrom=null,this.duration=NaN,this.dvrWindowSize=NaN,this.isDynamic=!1,this.loadedTime=null,this.maxFragmentDuration=null,this.minBufferTime=NaN,this.protocol=null,this.serviceDescriptions=[]}},Dt=n(1465),wt=n(9302),Mt=class{constructor(e){this.valid="/"==e[0],this.path=e.split("/").filter(e=>0!==e.length).map(e=>{let t={name:e},n=e.indexOf("[");if(-1!=n){t.name=e.substring(0,n);let r=e.substring(n+1,e.length-1);this.valid=this.valid&&-1==r.indexOf("[");let i=r.indexOf("=");-1!=i?(t.attribute={name:r.substring(1,i),value:r.substring(i+1)},-1!=["'",'"'].indexOf(t.attribute.value[0])&&(t.attribute.value=t.attribute.value.substring(1,t.attribute.value.length-1))):t.position=parseInt(r,10)-1}return t})}isValid(){return this.valid}findsElement(){return!this.findsAttribute()}findsAttribute(){return this.path[this.path.length-1].name.startsWith("@")}findsTextReplace(){return"text()"===this.path[this.path.length-1].name}getMpdTarget(e,t){let n=null,r=e,i=1,a="MPD";for(;i<this.path.length&&null!==r;){n=r;let e=this.path[i];if(a=e.name,i!==this.path.length-1||!a.startsWith("@")&&"text()"!==a){let t=n[a]||[];if(0===t.length&&n[a]&&t.push(n[a]),e.position)r=t[e.position]||null;else if(e.attribute){let n=e.attribute;r=t.filter(e=>e[n.name]==n.value)[0]||null}else r=Array.isArray(t)?t[0]:t}i++}return null===r?null:a.startsWith("@")?{name:a.substring(1),leaf:r,target:r}:"text()"===a?{name:"__text",leaf:r,target:r}:{name:a,leaf:r,target:t?n:r}}},Pt=class{constructor(e,t,n){this.action=e,this.xpath=t,this.value=n,this.position=null}getMpdTarget(e){let t="remove"===this.action||"replace"===this.action||"before"===this.position||"after"===this.position;return this.xpath.getMpdTarget(e,t)}};function Ot(){let e,t;const n=this.context;return e={getIsPatch:function(e){return e&&e.hasOwnProperty(Ce.default.ORIGINAL_MPD_ID)||!1},getMpdId:function(e){return e&&e[Ce.default.ORIGINAL_MPD_ID]||null},getOriginalPublishTime:function(e){return e&&e.hasOwnProperty(Ce.default.ORIGINAL_PUBLISH_TIME)?new Date(e[Ce.default.ORIGINAL_PUBLISH_TIME]):null},getPatchOperations:function(e){return e?(e.__children||[]).map(e=>{const n=e.tagName;if("add"!==n&&"remove"!==n&&"replace"!==n)return t.warn(`Ignoring node of invalid action: ${n}`),null;let r=e.sel;if("add"===n&&e.type){if(!e.type.startsWith("@"))return t.warn(`Ignoring add action for prefixed namespace declaration: ${e.type}=${e.__text}`),null;r=`${r}/${e.type}`}let i=new Mt(r);if(!i.isValid())return t.warn(`Ignoring action with invalid selector: ${n} - ${r}`),null;let a=null;i.findsAttribute()||i.findsTextReplace()?a=e.__text||"":"remove"!==n&&(a=e.__children.reduce((e,t)=>{let n=t.tagName;return"#text"!==n&&(e[n]=e[n]||[],e[n].push(t)),e},{}));let o=new Pt(n,i,a);return"add"===n&&(o.position=e.pos),o}).filter(e=>!!e):[]},getPublishTime:function(e){return e&&e.hasOwnProperty(Ce.default.PUBLISH_TIME)?new Date(e[Ce.default.PUBLISH_TIME]):null}},t=(0,u.default)(n).getInstance().getLogger(e),e}Ot.__dashjs_factory_name="PatchManifestModel";var Lt=r.default.getSingletonFactory(Ot),Ut=n(5876);const xt
vendor: 1,875 bytes, line 2
2=Object.create(null,Object.getOwnPropertyDescriptors({aar:"aa",abk:"ab",afr:"af",aka:"ak",alb:"sq",amh:"am",ara:"ar",arg:"an",arm:"hy",asm:"as",ava:"av",ave:"ae",aym:"ay",aze:"az",bak:"ba",bam:"bm",baq:"eu",bel:"be",ben:"bn",bis:"bi",bod:"bo",bos:"bs",bre:"br",bul:"bg",bur:"my",cat:"ca",ces:"cs",cha:"ch",che:"ce",chi:"zh",chu:"cu",chv:"cv",cor:"kw",cos:"co",cre:"cr",cym:"cy",cze:"cs",dan:"da",deu:"de",div:"dv",dut:"nl",dzo:"dz",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",ewe:"ee",fao:"fo",fas:"fa",fij:"fj",fin:"fi",fra:"fr",fre:"fr",fry:"fy",ful:"ff",geo:"ka",ger:"de",gla:"gd",gle:"ga",glg:"gl",glv:"gv",gre:"el",grn:"gn",guj:"gu",hat:"ht",hau:"ha",heb:"he",her:"hz",hin:"hi",hmo:"ho",hrv:"hr",hun:"hu",hye:"hy",ibo:"ig",ice:"is",ido:"io",iii:"ii",iku:"iu",ile:"ie",ina:"ia",ind:"id",ipk:"ik",isl:"is",ita:"it",jav:"jv",jpn:"ja",kal:"kl",kan:"kn",kas:"ks",kat:"ka",kau:"kr",kaz:"kk",khm:"km",kik:"ki",kin:"rw",kir:"ky",kom:"kv",kon:"kg",kor:"ko",kua:"kj",kur:"ku",lao:"lo",lat:"la",lav:"lv",lim:"li",lin:"ln",lit:"lt",ltz:"lb",lub:"lu",lug:"lg",mac:"mk",mah:"mh",mal:"ml",mao:"mi",mar:"mr",may:"ms",mkd:"mk",mlg:"mg",mlt:"mt",mon:"mn",mri:"mi",msa:"ms",mya:"my",nau:"na",nav:"nv",nbl:"nr",nde:"nd",ndo:"ng",nep:"ne",nld:"nl",nno:"nn",nob:"nb",nor:"no",nya:"ny",oci:"oc",oji:"oj",ori:"or",orm:"om",oss:"os",pan:"pa",per:"fa",pli:"pi",pol:"pl",por:"pt",pus:"ps",que:"qu",roh:"rm",ron:"ro",rum:"ro",run:"rn",rus:"ru",sag:"sg",san:"sa",sin:"si",slk:"sk",slo:"sk",slv:"sl",sme:"se",smo:"sm",sna:"sn",snd:"sd",som:"so",sot:"st",spa:"es",sqi:"sq",srd:"sc",srp:"sr",ssw:"ss",sun:"su",swa:"sw",swe:"sv",tah:"ty",tam:"ta",tat:"tt",tel:"te",tgk:"tg",tgl:"tl",tha:"th",tir:"ti",ton:"to",tsn:"tn",tso:"ts",tuk:"tk",tur:"tr",twi:"tw",uig:"ug",ukr:"uk",urd:"ur",uzb:"uz",ven:"ve",vie:"vi",vol:"vo",wel:"cy",wln:"wa",wol:"wo",xho:"xh",yid:"yi",yor:"yo",zha:"za",zho:"zh",zul:"zu"}));
2function Ft(e){if(!e||"string"!=typeof e)return e;const t=e.split("-");t[0]=t[0].toLowerCase(),t[0]=xt[t[0]]||t[0];for(let e=1;e<t.length;e++)4===t[e].length?t[e]=t[e].charAt(0).toUpperCase()+t[e].slice(1).toLowerCase():2===t[e].length&&/^[a-zA-Z]+$/.test(t[e])&&(t[e]=t[e].toUpperCase());return t.join("-")}var kt=n(9259);function Bt(e,t){return 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}function Ht(e,t){let n=0;return n=(127&e[t])<<21,n|=(127&e[t+1])<<14,n|=(127&e[t+2])<<7,n|=127&e[t+3],n}function Gt(e,t){return 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}function Yt(e,t=0,n=1/0){return function(e,t,n,r){const i=(a=e,(0,kt.isArrayBufferLike)(a)?a:a.buffer);var a;let o=1;"BYTES_PER_ELEMENT"in r&&(o=r.BYTES_PER_ELEMENT);const s=(f=e)&&(0,kt.isArrayBufferLike)(f.buffer)&&void 0!==f.byteLength&&void 0!==f.byteOffset?e.byteOffset:0,u=(s+e.byteLength)/o,l=(s+t)/o,c=Math.floor(Math.max(0,Math.min(l,u)));var f;return new r(i,c,Math.floor(Math.min(c+Math.max(n,0),u))-c)}(e,t,n,Uint8Array)}function Vt(e,t=!1){const n=t?e.indexOf(0):e.length,r=(0,kt.decodeText)(new DataView(e.buffer,e.byteOffset,n),{encoding:kt.UTF_8});return t?r:r.replace(/\0/g,"")}function qt(e){return"PRIV"===e.type?function(e){if(e.size<2)return;const t=Vt(e.data,!0),n=new Uint8Array(e.data.subarray(t.length+1));return{key:e.type,info:t,data:n.buffer}}(e):"W"===e.type[0]?function(e){if("WXXX"===e.type){if(e.size<2)return;let t=1;const n=Vt(e.data.subarray(t),!0);t+=n.length+1;const r=Vt(e.data.subarray(t));return{key:e.type,info:n,data:r}}const t=Vt(e.data);return{key:e.type,info:"",data:t}}(e):"APIC"===e.type?function(e){const t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if(e.size<2)return;if(3!==e.data[0])return;const n=e.data.subarray(1).indexOf(0);if(-1===n)return;const r=Vt(Yt(e.data,1,n)),i=e.data[2+n],a=e.data.subarray(3+n).indexOf(0);if(-1===a)return;const o=Vt(Yt(e.data,3+n,a));let s;var u;return"--\x3e"===r?s=Vt(Yt(e.data,4+n+a)):(u=e.data.subarray(4+n+a),s=(0,kt.isArrayBufferLike)(u)?u:0==u.byteOffset&&u.byteLength==u.buffer.byteLength?u.buffer:new Uint8Array(u).buffer),t.mimeType=r,t.pictureType=i,t.description=o,t.data=s,t}(e):function(e){if(e.size<2)return;if("TXXX"===e.type){let t=1;const{data:n}=e,r=Vt(n.subarray(t),!0);t+=r.length+1;const i=Vt(n.subarray(t));return{key:e.type,info:r,data:i}}const t=Vt(e.data.subarray(1));return{key:e.type,info:"",data:t}}(e)}function Kt(e){const t=String.fromCharCode(e[0],e[1],e[2],e[3]),n=Ht(e,4);return{type:t,size:n,data:e.subarray(10,10+n)}}function jt(){let e,t,n,r,i,a,o;const s=this.context;function u(e,n){const r=n?n.index:0,a=t.getAdaptationsForType(i[r].mpd.manifest,r,e);if(!a||0===a.length)return null;if(a.length>1&&n)for(let e=0,n=a.length;e<n;e++)if(o=a[e],t.getRolesForAdaptation(o).filter(function(e){return e.schemeIdUri===g.default.DASH_ROLE_SCHEME_ID&&e.value===Ce.default.MAIN})[0])return a[e];var o;return a[0]}function c(e,n,i,o,s,u){let l,c,f,d,h,g,p=[];if(!o||0===o.length)return[];const m=t.getAdaptationsForPeriod(n);for(d=0,g=o.length;d<g;d++)if(l=o[d],f=t.getIndexForAdaptation(l,e,i.index),c=T(m[f]),c)if(u){let e=c.accessibility.length;for(h=0;h<e;h++){if(!c)continue;let e=c.accessibility[h];if(e.schemeIdUri===a.ACCESSIBILITY_CEA608_SCHEME)if(e.value&&""!==e.value){let t=e.value.split(";");if("CC"===t[0].substring(0,2))for(h=0;h<t.length;h++)c||(c=T.call(this,m[f])),_(c,t[h].substring(0,3),t[h].substring(4)),p.push(c),c=null;else for(h=0;h<t.length;h++)c||(c=T.call(this,m[f])),_(c,"CC"+(h+1),t[h]),p.push(c),c=null}else _(c,a.CC1,"eng"),p.push(c),c=null}}else s===a.IMAGE?(c.type=a.IMAGE,p.push(c),c=null):c&&p.push(c);if(r.get().streaming.includePreselectionsInMediainfoArray){const e=t.getPreselectionsForPeriod(n);for(d=0,g=e.length;d<g;d++){const t=e[d];t.hasOwnProperty("type")&&t.type===s&&(c=y(e[d]),c&&p.push(c))}}return p}function f(e){const n=d(e);return t.getRegularPeriods(n)}function d(e){const n=p(e);return t.getMpd(n)}function h(){i=[]}function p(e){return e||(i.length>0?i[0].mpd.manifest:null)}function m(e){try{const n=E(e.streamInfo,i),r=t.getAdaptationsForPeriod(n);return e&&e.streamInfo&&void 0!==e.streamInfo.id&&r?r[e.index]:null}catch(e){return null}}function E(e,t){const n=t.length;for(let r=0;r<n;r++){let n=t[r];
2if(e&&e.id===n.id)return n}return null}function T(e){if(!e)return null;let n=new vt;const i=e.period.mpd.manifest.Period[e.period.index].AdaptationSet[e.index];n.id=e.id,n.index=e.index,n.codec=t.getCodec(i);const a=r.get().streaming.enhancement.codecs;return n.type=a.some(e=>n.codec?.includes(e))?g.default.ENHANCEMENT:e.type,n.streamInfo=S(e.period),n.representationCount=t.getRepresentationCount(i),n.labels=t.getLabelsForAdaptation(i),n.lang=t.getLanguageForAdaptation(i),n.segmentAlignment=t.getSegmentAlignment(i),n.subSegmentAlignment=t.getSubSegmentAlignment(i),n.viewpoint=t.getViewpointForAdaptation(i),n.accessibility=t.getAccessibilityForAdaptation(i),n.accessibility.filter(function(e){if(e.schemeIdUri&&e.schemeIdUri.search("cea-608")>=0&&void 0!==o)return!0})[0]&&(n.embeddedCaptions=!0),n.audioChannelConfiguration=t.getAudioChannelConfigurationForAdaptation(i),0===n.audioChannelConfiguration.length&&i.Representation&&i.Representation.length>0&&(n.audioChannelConfiguration=t.getAudioChannelConfigurationForRepresentation(i.Representation[0])),n.roles=t.getRolesForAdaptation(i),n.mimeType=t.getMimeType(i),n.contentProtection=t.getContentProtectionByAdaptation(i),n.bitrateList=t.getBitrateListForAdaptation(i),n.selectionPriority=t.getSelectionPriority(i),n.contentProtection&&n.contentProtection.length>0&&(n.contentProtection=function(e,n){if(!e||!e.length||!n)return e;const r=t.getContentProtectionByManifest(n);if(!r||!r.length)return e;const i=r.reduce((e,t)=>(t.refId&&e.set(t.refId,t),e),new Map);return e.map(e=>{if(e.ref){const t=i.get(e.ref);t&&e.mergeAttributesFromReference(t)}return e})}(n.contentProtection,e.period.mpd.manifest),n.contentProtection=function(e){const t=e.map(e=>e.cencDefaultKid).filter(e=>null!==e);if(t.length){const n=t[0];e.forEach(e=>{e.keyId=n})}return e}(n.contentProtection),n.normalizedKeyIds=function(e){const t=new Set;return e.forEach(e=>{e.cencDefaultKid&&"string"==typeof e.cencDefaultKid&&t.add(e.cencDefaultKid.replace(/-/g,"").toLowerCase())}),t}(n.contentProtection)),n.isText=t.getIsText(i),n.essentialProperties=t.getCombinedEssentialPropertiesForAdaptationSet(i),n.supplementalProperties=t.getCombinedSupplementalPropertiesForAdaptationSet(i),n.isFragmented=t.getIsFragmented(i),n.isEmbedded=!1,n.adaptationSetSwitchingCompatibleIds=function(e){if(!e||!e.supplementalProperties)return[];let t=[];const n=e.supplementalProperties.filter(e=>e.schemeIdUri===Ce.default.ADAPTATION_SET_SWITCHING_SCHEME_ID_URI);return n&&n.length>0&&(t=n[0].value.toString().split(",").filter(t=>t!==e.id)),t}(n),n.segmentSequenceProperties=t.getSegmentSequencePropertiesForAdaptationSet(i),n}function y(e){if(!e)return null;let n=new vt;const r=e.period.mpd.manifest.Period[e.period.index].Preselection[e.index],i=e.period.mpd.manifest.Period[e.period.index].AdaptationSet,a=t.getAdaptationsForPeriod(e.period);return n=T(t.getMainAdaptationSetForPreselection(r,a)),n&&(n.isPreselection=!0,n.tag=e.tag,n.id=e.id,n.codec=t.getCodecForPreselection(r,i),n.selectionPriority=t.getSelectionPriority(r),n.labels=t.getLabelsForAdaptation(r),n.lang=t.getLanguageForAdaptation(r),n.viewpoint=t.getViewpointForAdaptation(r),n.accessibility=t.getAccessibilityForAdaptation(r),n.audioChannelConfiguration=t.getAudioChannelConfigurationForAdaptation(r),n.roles=t.getRolesForAdaptation(r),n.essentialProperties=t.getCombinedEssentialPropertiesForAdaptationSet(r),n.supplementalProperties=t.getCombinedSupplementalPropertiesForAdaptationSet(r)),n}function _(e,t,n){e.id=t,e.index=100+parseInt(t.substring(2,3)),e.type=a.TEXT,e.codec="cea-608-in-SEI",e.isEmbedded=!0,e.isFragmented=!1,e.lang=Ft(n),e.roles=[{schemeIdUri:"urn:mpeg:dash:role:2011",value:"caption"}]}function S(e){let n=new Ct;return n.id=e.id,n.index=e.index,n.start=e.start,n.duration=e.duration,n.manifestInfo=function(e){let n=new Nt;return n.dvrWindowSize=e.timeShiftBufferDepth,n.loadedTime=e.manifest.loadedTime,n.availableFrom=e.availabilityStartTime,n.minBufferTime=e.manifest.minBufferTime,n.maxFragmentDuration=e.maxSegmentDuration,n.duration=t.getDuration(e.manifest),n.isDynamic=t.getIsDynamic(e.manifest),n.serviceDescriptions=t.getServiceDescriptions(e.manifest),n.protocol=e.manifest.protocol,n}(e.mpd),n.isLast=1===e.mpd.manifest.Period.length||Math.abs(n.start+n.duration-n.manifestInfo.duration)<1,n.isEncrypted=e.isEncrypted,n}function I(){if(!a)throw new Error("setConfig function has to be called previously")}function A(e){return i.length>0?i[0].mpd.manifest.Period[e]:null}function R(e,t,n){let r,i,a,o,s,u;if(e)for(i=e.AdaptationSet,s=0;s<i.length;s+=1)for(r=i[s],o=r.Representation,u=0;u<o.length;
2u+=1)if(a=o[u],t===a.id)return n?u:a;return null}return e={applyPatchToManifest:function(e,t){n.getPatchOperations(t).forEach(t=>{let n=t.getMpdTarget(e);if(null===n)return;let{name:r,target:i,leaf:a}=n;if(t.xpath.findsAttribute()||"__text"===r){switch(t.action){case"add":case"replace":i[r]=t.value;break;case"remove":delete i[r]}return}let o=(i[r]||[]).indexOf(a),s="prepend"===t.position||"before"===t.position;if("remove"===t.action||"replace"===t.action)if(Array.isArray(i[r])){if(-1!=o){let e=i[r];e.splice(o,1),e.length>0?i[r]=e:delete i[r]}}else delete i[r];"add"!==t.action&&"replace"!==t.action||Object.keys(t.value).forEach(e=>{let n=t.value[e],a=i[e]||[];if(0===a.length&&i[e]&&a.push(i[e]),0===a.length)a=n;else{let i=a.length;i=e==r&&-1!=o?o+(s?0:1)+("replace"===t.action?-1:0):s?0:a.length,a.splice.apply(a,[i,0].concat(n))}i[e]=a})})},areMediaInfosEqual:function(e,t){if(!e||!t)return!1;const n=e.id===t.id,r=e.codec===t.codec,i=JSON.stringify(e.viewpoint)===JSON.stringify(t.viewpoint),a=e.lang===t.lang,o=JSON.stringify(e.roles)===JSON.stringify(t.roles),s=JSON.stringify(e.accessibility)===JSON.stringify(t.accessibility),u=JSON.stringify(e.audioChannelConfiguration)===JSON.stringify(t.audioChannelConfiguration);return n&&r&&i&&a&&o&&s&&u},convertAdaptationToMediaInfo:T,getAllMediaInfoForType:function(e,n,r){let o=i,s=r,u=[];if(s)I(),o=f(s);else{if(!(i.length>0))return u;s=i[0].mpd.manifest}const l=E(e,o);let d=t.getAdaptationsForType(s,e?e.index:null,n);return u=c(s,l,e,d,n),n===a.TEXT&&(d=t.getAdaptationsForType(s,e?e.index:null,a.VIDEO),u=u.concat(c(s,l,e,d,n,!0))),u},getAvailabilityStartTime:function(e){const n=d(e);return t.getAvailabilityStartTime(n)},getBandwidthForRepresentation:function(e,t){let n;return n=R(A(t),e),n?n.bandwidth:null},getBaseURLsFromElement:function(e){return t.getBaseURLsFromElement(e)},getCodec:function(e,n,r){return t.getCodec(e,n,r)},getCodecForPreselection:function(e,n){return t.getCodecForPreselection(e,n)},getContentSteering:function(e){return t.getContentSteering(e)},getDuration:function(e){const n=p(e);return t.getDuration(n)},getEssentialProperties:function(e){try{return t.getEssentialProperties(e)}catch(e){return[]}},getEvent:function(e,t,n,r){try{if(!e||!t||isNaN(n)||!r)return null;const i=e.scheme_id_uri,a=e.value;if(!t[i+"/"+a])return null;const o=new Dt.default,s=e.timescale||1,u=r.adaptation.period.start,l=t[i+"/"+a],c=isNaN(r.presentationTimeOffset)?isNaN(l.presentationTimeOffset)?0:l.presentationTimeOffset:r.presentationTimeOffset;let f,d=e.presentation_time_delta/s;f=0===e.version?u+n-c+d:u-c+d;const h=e.event_duration/s,p=e.id,m=e.message_data;return o.eventStream=l,o.eventStream.value=a,o.eventStream.timescale=s,o.duration=h,o.id=p,o.calculatedPresentationTime=f,o.messageData=m,o.presentationTimeDelta=d,o.parsedMessageData=i===g.default.ID3_SCHEME_ID_URI?function(e){let t=0;const n=[];for(;Bt(e,t);){const r=Ht(e,t+6);e[t+5]>>6&1&&(t+=10),t+=10;const i=t+r;for(;t+10<i;){const r=Kt(e.subarray(t)),i=qt(r);i&&n.push(i),t+=r.size+10}Gt(e,t)&&(t+=10)}return n}(m):null,o}catch(e){return null}},getEventsFor:function(e,n,r){let a=[];if(i.length>0){const o=i[0].mpd.manifest;if(e instanceof Ct){const n=E(e,i);a=t.getEventsForPeriod(n)}else if(e instanceof vt){const n=E(r,i);a=t.getEventStreamForAdaptationSet(o,m(e),n)}else if(e instanceof Ut.default){const e=E(r,i);a=t.getEventStreamForRepresentation(o,n,e)}}return a},getFramerate:function(e){return t.getFramerate(e)},getIndexForRepresentation:function(e,t){return function(e,t){const n=R(e,t,!0);return null!==n?n:-1}(A(t),e)},getIsDVB:function(e){return t.hasProfile(e,"urn:dvb:dash:profile:dvb-dash:2014")},getIsDynamic:function(e){const n=p(e);return t.getIsDynamic(n)},getIsPatch:function(e){return n.getIsPatch(e)},getIsTextTrack:function(e){return t.getIsText(e)},getIsTypeOf:function(e,n){return t.getIsTypeOf(e,n)},getLocation:function(e){return t.getLocation(e)},getMainAdaptationForType:u,getMainAdaptationSetForPreselection:function(e,n){return t.getMainAdaptationSetForPreselection(e,n)},getCommonRepresentationForPreselection:function(e,n){return t.getCommonRepresentationForPreselection(e,n)},getManifestUpdatePeriod:function(e,n=0){return t.getManifestUpdatePeriod(e,n)},getMediaInfoForType:function(e,n){if(0===i.length||!e)return null;let r=E(e,i);if(!r)return null;const a=t.getAdaptationsForPeriod(r);let o=u(n,e);return o?T(a[t.getIndexForAdaptation(o,i[0].mpd.manifest,e.index)]):null},getMpd:d,getPatchLocation:function(e){const n=t.getPatchLocation(e),r=t.getPublishTime(e);return n&&0!==n.length&&r?n.filter(e=>isNaN(e.ttl)||r.getTime()+e.ttl>(new Date).getTime()):[]},getPeriodById:function(e){if(!e||0===i.length)return null;const t=i.filter(t=>t.id===e);return t&&t.length>0?t[0]:null},getPreselectionIsTypeOf:function(e,n,r){return t.getPreselectionIsTypeOf(e,n,r)},getProducerReferenceTimes:function(e,n){let r,a;const o=E(e,i);return r=n?n.id:null,i.length>0&&o&&(a=r?t.getAdaptationForId(r,i[0].mpd.manifest,o.index):t.getAdaptationForIndex(n?n.index:null,i[
20].mpd.manifest,o.index)),a?t.getProducerReferenceTimesForAdaptation(a):[]},getPublishTime:function(e){return t.getPublishTime(e)},getRealAdaptation:function(e,n){let r,a;const o=E(e,i);return r=n?n.id:null,i.length>0&&o&&(a=r?t.getAdaptationForId(r,i[0].mpd.manifest,o.index):t.getAdaptationForIndex(n?n.index:null,i[0].mpd.manifest,o.index)),a},getRealPeriodByIndex:function(e){return t.getRealPeriodForIndex(e,i[0].mpd.manifest)},getRegularPeriods:f,getRepresentationSortFunction:function(){return t.getRepresentationSortFunction()},getStreamsInfo:function(e,t){const n=[];let r=i;if(e&&(I(),r=f(e)),r.length>0){(!t||t>r.length)&&(t=r.length);for(let e=0;e<t;e++)n.push(S(r[e]))}return n},getSuggestedPresentationDelay:function(){const e=i.length>0?i[0].mpd:null;return t.getSuggestedPresentationDelay(e)},getSupplementalCodecs:function(e){const t=e[Ce.default.SUPPLEMENTAL_CODECS];return t?t.split(" ").map(t=>e.mimeType+';codecs="'+t+'"'):[]},getUTCTimingSources:function(){const e=p();return t.getUTCTimingSources(e)},getVoRepresentations:function(e){let n;const r=m(e);return n=t.getRepresentationsForAdaptation(r,e),n},isPatchValid:function(e,r){let i=t.getId(e),a=n.getMpdId(r),o=t.getPublishTime(e),s=n.getPublishTime(r),u=n.getOriginalPublishTime(r);return!!(i&&a&&i==a&&o&&u&&o.getTime()==u.getTime()&&s&&o.getTime()<s.getTime())},reset:h,setConfig:function(e){e&&(e.constants&&(a=e.constants),e.cea608parser&&(o=e.cea608parser),e.errHandler&&t.setConfig({errHandler:e.errHandler}),e.BASE64&&t.setConfig({BASE64:e.BASE64}))},updatePeriods:function(e){if(!e)return null;I(),i=f(e)}},t=(0,wt.default)(s).getInstance(),n=Lt(s).getInstance(),r=(0,l.default)(s).getInstance(),h(),e}jt.__dashjs_factory_name="DashAdapter";var Wt=r.default.getSingletonFactory(jt);class zt{static round10(e,t){return function(e,t,n){return void 0===n||0==+n?Math[e](t):(n=+n,null===(t=+t)||isNaN(t)||"number"!=typeof n||n%1!=0?NaN:(t=t.toString().split("e"),+((t=(t=Math[e](+(t[0]+"e"+(t[1]?+t[1]-n:-n)))).toString().split("e"))[0]+"e"+(t[1]?+t[1]+n:n))))}("round",e,t)}}var $t=class{constructor(){this.TcpList=[],this.HttpList=[],this.RepSwitchList=[],this.BufferLevel=[],this.BufferState=[],this.PlayList=[],this.DroppedFrames=[],this.SchedulingInfo=[],this.DVRInfo=[],this.ManifestUpdate=[],this.RequestsQueue=null,this.DVBErrors=[]}},Qt=class{constructor(){this.t=null,this.mt=null,this.to=null,this.lto=null}},Xt=class{constructor(){this.t=null,this.level=null}},Zt=class{constructor(){this.target=null,this.state=o.BUFFER_EMPTY}},Jt=class{constructor(){this.time=null,this.range=null,this.manifestInfo=null}},en=class{constructor(){this.time=null,this.droppedFrames=null}};class tn{constructor(){this.mediaType=null,this.type=null,this.requestTime=null,this.fetchTime=null,this.availabilityStartTime=null,this.presentationStartTime=0,this.clientTimeOffset=0,this.currentTime=null,this.buffered=null,this.latency=0,this.streamInfo=[],this.representationInfo=[]}}class nn{constructor(){this.id=null,this.index=null,this.start=null,this.duration=null}}class rn{constructor(){this.id=null,this.index=null,this.mediaType=null,this.presentationTimeOffset=null,this.startNumber=null}}var an=class{constructor(){this.mediaType=null,this.t=null,this.type=null,this.startTime=null,this.availabilityStartTime=null,this.duration=null,this.bandwidth=null,this.range=null,this.state=null}},on=class{constructor(){this.loadingRequests=[],this.executedRequests=[]}};function sn(e){const t=(e=e||{}).settings;let n,r,i=this.context,a=(0,d.default)(i).getInstance();function s(){a.trigger(h.default.METRICS_CHANGED)}function u(e){a.trigger(h.default.METRIC_CHANGED,{mediaType:e}),s()}function l(e,t,n){a.trigger(h.default.METRIC_UPDATED,{mediaType:e,metric:t,value:n}),u(e)}function c(e,t,n){a.trigger(h.default.METRIC_ADDED,{mediaType:e,metric:t,value:n}),u(e)}function f(e,t){let n=null;return e?(r.hasOwnProperty(e)?n=r[e]:t||(n=new $t,r[e]=n),n):n}function p(e,n,r){let i=f(e);null!==i&&(i[n].push(r),i[n].length>t.get().streaming.metrics.maxListDepth&&i[n].shift())}function m(e,t,n){p(e,t,n),c(e,t,n)}return n={addBufferLevel:function(e,t,n){let r=new Xt;r.t=t,r.level=n,m(e,o.BUFFER_LEVEL,r)},addBufferState:function(e,t,n){let r=new Zt;r.target=n,r.state=t,m(e,o.BUFFER_STATE,r)},addDVBErrors:function(e){m(g.default.STREAM,o.DVB_ERRORS,e)},addDVRInfo:function(e,t,n,r){let i=new Jt;i.time=t,i.range=r,i.manifestInfo=n,m(e,o.DVR_INFO,i)},addDroppedFrames:function(e,t){let n=new en,r=f(e).DroppedFrames;t&&(n.time=t.creationTime,n.droppedFrames=t.droppedVideoFrames,r.length>0&&r[r.length-1]==n||m(e,o.DROPPED_FRAMES,n))},addHttpRequest:function e(t,n,r,i){let a=new R.HTTPRequest;n.url&&n.url!==t.url&&(e({mediaType:t.mediaType,type:t.type,url:t.url,serviceLocation:null,range:t.range,startDate:t.startDate,firstByteDate:null,endD
2ate:null,duration:t.duration,fileLoaderType:t.fileLoaderType,resourceTimingValues:t.resourceTimingValues},{url:null,status:null,headers:null},null,i),a.actualurl=n.url),a.tcpid=null,a.type=t.type,a.url=t.url,a.range=t.range||null,a.trequest=t.startDate,a.tresponse=t.firstByteDate,a.responsecode=n.status,a.cmsd=i,a._tfinish=t.endDate,a._stream=t.mediaType,a._mediaduration=t.duration,a._responseHeaders="";for(const e in n.headers)a._responseHeaders+=e+": "+n.headers[e]+"\r\n";a._serviceLocation=t.serviceLocation||null,a._fileLoaderType=t.fileLoaderType,a._resourceTimingValues=t.resourceTimingValues,a._streamId=t&&t.representation&&t.representation.mediaInfo&&t.representation.mediaInfo.streamInfo?t.representation.mediaInfo.streamInfo.id:null,r?r.forEach(e=>{!function(e,t,n,r){let i=new R.HTTPRequestTrace;i.s=t,i.d=n,i.b=r,e.trace.push(i),e.interval||(e.interval=0),e.interval+=n}(a,e.s,e.d,e.b,e.t)}):(delete a.interval,delete a.trace),m(t.mediaType,o.HTTP_REQUEST,a)},addManifestUpdate:function(e,t,n,r){let i=new tn;i.mediaType=e,i.type=t,i.requestTime=n,i.fetchTime=r,p(g.default.STREAM,o.MANIFEST_UPDATE,i),c(e,o.MANIFEST_UPDATE,i)},addManifestUpdateRepresentationInfo:function(e,t,n){if(e&&e.representationInfo){const r=new rn;r.id=t?t.id:null,r.index=t?t.index:null,r.mediaType=n,r.startNumber=t?t.startNumber:null,r.presentationTimeOffset=t?t.presentationTimeOffset:null,e.representationInfo.push(r),l(e.mediaType,o.MANIFEST_UPDATE_TRACK_INFO,e)}},addManifestUpdateStreamInfo:function(e,t,n,r,i){if(e){let a=new nn;a.id=t,a.index=n,a.start=r,a.duration=i,e.streamInfo.push(a),l(e.mediaType,o.MANIFEST_UPDATE_STREAM_INFO,e)}},addPlayList:function(e){e.trace&&Array.isArray(e.trace)?e.trace.forEach(e=>{e.hasOwnProperty("subreplevel")&&!e.subreplevel&&delete e.subreplevel}):delete e.trace,m(g.default.STREAM,o.PLAY_LIST,e)},addRepresentationSwitch:function(e,t,n,r,i){let a=new Qt;a.t=t,a.mt=n,a.to=r,i?a.lto=i:delete a.lto,m(e,o.TRACK_SWITCH,a)},addRequestsQueue:function(e,t,n){let r=new on;r.loadingRequests=t,r.executedRequests=n,f(e).RequestsQueue=r,c(e,o.REQUESTS_QUEUE,r)},addSchedulingInfo:function(e,t,n,r,i,a,s,u,l){let c=new an;c.mediaType=e,c.t=t,c.type=n,c.startTime=r,c.availabilityStartTime=i,c.duration=a,c.bandwidth=s,c.range=u,c.state=l,m(e,o.SCHEDULING_INFO,c)},clearAllCurrentMetrics:function(){r={},s()},clearCurrentMetricsForType:function(e){delete r[e],u(e)},getMetricsFor:f,updateManifestUpdateInfo:function(e,t){if(e){for(let n in t)e[n]=t[n];l(e.mediaType,o.MANIFEST_UPDATE,e)}}},r={},n}sn.__dashjs_factory_name="MetricsModel";var un=r.default.getSingletonFactory(sn);class ln{constructor(){this.start=null,this.mstart=null,this.starttype=null,this.trace=[]}}ln.INITIAL_PLAYOUT_START_REASON="initial_playout",ln.SEEK_START_REASON="seek",ln.RESUME_FROM_PAUSE_START_REASON="resume",ln.METRICS_COLLECTION_START_REASON="metrics_collection_start";class cn{constructor(){this.representationid=null,this.subreplevel=null,this.start=null,this.mstart=null,this.duration=null,this.playbackspeed=null,this.stopreason=null}}function fn(e){e=e||{};const t=this.context;let n,r,i,a,s=e.metricsModel;function u(e){const t=s.getMetricsFor(e,!0);if(!t)return null;const n=t.HttpList;let r,i=null;if(!n||n.length<=0)return null;for(r=n.length-1;r>=0;){if(n[r].responsecode){i=n[r];break}r--}return i}function l(e){const t=s.getMetricsFor(e,!0);return t&&t.HttpList?t.HttpList:[]}function c(e,t){if(!e)return null;const n=e[t];return n&&0!==n.length?n[n.length-1]:null}return n={addBufferLevel:function(e,t,n){s.addBufferLevel(e,t,n)},addBufferState:function(e,t,n){s.addBufferState(e,t,n)},addDVBErrors:function(e){s.addDVBErrors(e)},addDVRInfo:function(e,t,n,r){s.addDVRInfo(e,t,n,r)},addDroppedFrames:function(e){s.addDroppedFrames(g.default.VIDEO,e)},addHttpRequest:function(e,t,n,r,i,a){const o={status:n,headers:r,url:t};s.addHttpRequest(e,o,i,a)},addManifestUpdate:function(e){s.addManifestUpdate(g.default.STREAM,e.type,e.startDate,e.endDate)},addManifestUpdateRepresentationInfo:function(e,t){if(e){const n=this.getCurrentManifestUpdate();s.addManifestUpdateRepresentationInfo(n,e,t)}},addManifestUpdateStreamInfo:function(e){if(e){const t=this.getCurrentManifestUpdate();s.addManifestUpdateStreamInfo(t,e.id,e.index,e.start,e.duration)}},addPlayList:function(){a&&(s.addPlayList(a),a=null)},addRepresentationSwitch:function(e,t,n,r,i){s.addRepresentationSwitch(e,t,n,r,i)},addRequestsQueue:function(e,t,n){s.addRequestsQueue(e,t,n)},addSchedulingInfo:function(e,t){s.addSchedulingInfo(e.mediaType,new Date,e.type,e.startTime,e.availabilityStartTime,e.duration,e.bandwidth,e.range,t)},clearAllCurrentMetrics:function(){s.clearAllCurrentMetrics()},createPlaylistMetrics:function(e,t){a=new ln,a.start=new Date,a.mstart=e,a.starttype=t},createPlaylistTraceMetrics:function(e,t,n){!0===r&&(r=!1,i=new cn,i.representationid=e,i.start=new Date,i.mstart=t,i.playbackspeed=null!==n?n.toString():null)},getCurrentBufferLevel:function(e){const t=c(s.getMetricsFor(e,!0),o.BUFFER_LEVEL);return t?zt.round10(t.level/1e3,-3):0},getCurrentBufferState:function(e){return c(s.getMetricsFor(e,!0),o.BUFFER_STATE)},getCurrentDVRInfo:function(e){return c(e?s.getMetricsFor(e,!0):s.getMetricsFor(g.default.VIDEO,!0)||s.getMetricsFor(g.default.AUDIO,!0),o.DVR_INFO)},getCurrentDroppedFrames:function(){return c(s.getMetricsFor(g.default.VIDEO,!0),o.DROPPED_FRAMES)},getCurrentHttpRequest:u,getCurrentManifestUpdate:function(){return c(s.getMetricsFor(g.default.STREAM),o.MANIFEST_UPDATE)},getCurrentRepresentationSwitch:function(e){return c(s.getMetricsFor(e,!0),o.TRACK_SWITCH)},getCurrentSchedulingInfo:function(e){return c(s.getMetricsFor(e,!0),o.SCHEDULING_INFO)},getHttpRequests:l,getLatestFragmentRequestHeaderValueByID:function(e,t){if(!t)return null;let n={},r=u(e);r&&(n=Me.default.parseHttpHeaders(r._responseHeaders));const i=n[t.toLowerCase()];return void 0===i?null:i},getLatestMPDRequestHeaderValueByID:function(e){if(!e)return null;let t,n,r,i={};for(t=l(g.default.STREAM),r=t.length-1;r>=0;r--)if(n=t[r],n.type===R.HTTPRequest.MPD_TYPE){i=Me.default.parseHttpHeaders(n._responseHeaders);break}const a=i[e.toLowerCase()];return void 0===a?null:a},pushPlayListTraceMetrics:function(e,t){if(!1===r&&a&&i&&i.start){const n=i.start;i.duration=e.getTime()-n.getTime(),i.stopreason=t,a.trace.push(i),r=!0}},updateManifestUpdateInfo:function(e){const t=this.getCurrentManifestUpdate();s.updateManifestUpdateInfo(t,e)},updatePlayListTraceMetrics:function(e){if(i)for(let t in i)i[t]=e[t]}},s=s||un(t).getInstance({settings:e.settings}
2),r=!0,i=null,a=null,n}cn.REPRESENTATION_SWITCH_STOP_REASON="representation_switch",cn.REBUFFERING_REASON="rebuffering",cn.USER_REQUEST_STOP_REASON="user_request",cn.END_OF_PERIOD_STOP_REASON="end_of_period",cn.END_OF_CONTENT_STOP_REASON="end_of_content",cn.METRICS_COLLECTION_STOP_REASON="metrics_collection_end",cn.FAILURE_STOP_REASON="failure",fn.__dashjs_factory_name="DashMetrics";var dn=r.default.getSingletonFactory(fn);function hn(){let e;const t=this.context,n=(0,d.default)(t).getInstance();return e={error:function(e){n.trigger(h.default.ERROR,{error:e})}},e}hn.__dashjs_factory_name="ErrorHandler";var gn=r.default.getSingletonFactory(hn),pn=n(5560);function mn(){const e=this.context,t=(0,d.default)(e).getInstance();let n,r,i,a,o,s,l,c,f,p,m,E;function T(){E.debug("Stopping the gap controller"),o&&(clearInterval(o),o=null),function(){t.off(h.default.WALLCLOCK_TIME_UPDATED,A,this),t.off(h.default.INITIAL_STREAM_SWITCH,I,this),t.off(h.default.PLAYBACK_SEEKING,y,this),t.off(h.default.BUFFER_REPLACEMENT_STARTED,_,n),t.off(h.default.TRACK_CHANGE_RENDERED,S,n)}(),o=null,s=NaN,a=0,p=null,m={}}function y(){p&&(clearTimeout(p),p=null)}function _(e){try{if(e.streamId!==c.getActiveStreamInfo().id||e.mediaType!==g.default.VIDEO&&e.mediaType!==g.default.AUDIO)return;e.streamId===c.getActiveStreamInfo().id&&(m[e.mediaType]=!0)}catch(e){E.error(e)}}function S(e){e&&e.mediaType&&(m[e.mediaType]=!1)}function I(){o||function(){try{o||(E.debug("Starting the gap controller"),o=setInterval(()=>{R()&&b(l.getTime())},i.get().streaming.gaps.checkInterval))}catch(e){}}()}function A(){if(R(i.get().streaming.gaps.enableSeekFix)&&(a++,a>=10)){const e=l.getTime();r===e?b(e,!0):(r=e,s=NaN),a=0}}function R(e=!1){if(!c.getActiveStream())return!1;let t=!1;for(const e in m)if(m[e]){t=!0;break}const n=!!e&&function(){const e=c.getActiveStream(),t=parseFloat((e.getStartTime()+e.getDuration()).toFixed(5));return l.getTime()+i.get().streaming.gaps.threshold>=t}();return!t&&i.get().streaming.gaps.jumpGaps&&c.getActiveStreamProcessors().length>0&&(!l.isSeeking()||n)&&!l.isPaused()&&!c.getIsStreamSwitchInProgress()&&!c.getHasMediaOrInitialisationError()}function b(e,t=!1){const n=i.get().streaming.gaps,r=n.enableStallFix,a=n.stallSeek,o=n.smallGapLimit,u=n.jumpLargeGaps,d=n.seekOffset,h=f.getBufferRange();let g,m=NaN,T=!1;if(g=function(e,t){try{if(!e||e.length<=1&&t>0)return NaN;let n=NaN,r=0;for(;isNaN(n)&&r<e.length;){const a=r>0?e.end(r-1):0;t<e.start(r)&&a-t<i.get().streaming.gaps.threshold&&(n=r),r+=1}return n}catch(e){return null}}(h,e),!isNaN(g)){const t=h.start(g),n=t-e;n>0&&(n<=o||u)&&(m=t)}const y=l.getTimeToStreamEnd();if(isNaN(m)&&t&&isFinite(y)&&!isNaN(y)&&y<o&&(m=parseFloat(l.getStreamEndTime().toFixed(5)),T=!0),r&&isNaN(m)&&t&&isNaN(g)&&function(e,t){for(let n=0,r=e.length;n<r;n++)if(t>=e.start(n)&&t<=e.end(n))return!0;return!1}(h,e)&&(0===a?(E.warn("Toggle play pause to break stall"),f.pause(),f.play()):(E.warn(`Jumping ${a}s to break stall`),m=e+a)),m>0&&s!==m&&m>e&&!p){const t=m-e;if(T){const n=c.getStreamForTime(m),r=n&&!!n.getPreloaded();E.warn(`Jumping to end of stream because of gap from ${e} to ${m}. Gap duration: ${t}`),l.seek(m+d,!0,r)}else{const n=l.getIsDynamic(),r=g>0?h.end(g-1):e,i=n?1e3*Math.max(0,t-.1):0;p=window.setTimeout(()=>{l.seek(m+d,!0,!0);const e=c.getActiveStream();e&&E.warn(`Jumping gap occuring in period ${e.getStreamId()} starting at ${r} and ending at ${m}. Jumping by: ${m+d-r}`),p=null},i)}s=m}}return n={reset:T,setConfig:function(e){e&&(e.settings&&(i=e.settings),e.playbackController&&(l=e.playbackController),e.streamController&&(c=e.streamController),e.videoModel&&(f=e.videoModel))},initialize:function(){!function(){t.on(h.default.WALLCLOCK_TIME_UPDATED,A,this),t.on(h.default.INITIAL_STREAM_SWITCH,I,this),t.on(h.default.PLAYBACK_SEEKING,y,this),t.on(h.default.BUFFER_REPLACEMENT_STARTED,_,n),t.on(h.default.TRACK_CHANGE_RENDERED,S,n)}()}},E=(0,u.default)(e).getInstance().getLogger(n),T(),n}mn.__dashjs_factory_name="GapController";var En=r.default.getSingletonFactory(mn);class Tn extends $.default{constructor(e,t){super(),this.url=e||null,this.type=t||null,this.mediaType=g.default.STREAM,this.responseType=""}}var yn=Tn;function _n(e){e=e||{};const t=this.context,n=(0,d.default)(t).getInstance();let r,i=(0,Re.default)(t).create({errHandler:e.errHandler,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,errors:Ae.default});return r={load:function(e,t,r){const a=function(i,a){t.resolved=!0,t.resolvedContent=i||null,
2n.trigger(h.default.XLINK_ELEMENT_LOADED,{element:t,resolveObject:r,error:i||a?null:new He.default(Ae.default.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE,Ae.default.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE+e)})};if("urn:mpeg:dash:resolve-to-zero:2013"===e)a(null,!0);else{const t=new yn(e,R.HTTPRequest.XLINK_EXPANSION_TYPE);i.load({request:t,success:function(e){a(e)},error:function(){a(null)}})}},reset:function(){i&&(i.abort(),i=null)}},r}_n.__dashjs_factory_name="XlinkLoader";var Sn=r.default.getClassFactory(_n);const In="onLoad";function An(e){e=e||{};let t=this.context,n=(0,d.default)(t).getInstance();const r=(0,Ne.default)(t).getInstance();let i,a,o,s;function u(e,t,n){let i,a,o={};o.elements=e,o.type=t,o.resolveType=n,0===o.elements.length&&c(o);for(let e=0;e<o.elements.length;e++)i=o.elements[e],a=r.isHTTPURL(i.url)?i.url:i.originalContent.BaseURL+i.url,s.load(a,i,o)}function l(e){let t,n,r="";if(t=e.element,n=e.resolveObject,t.resolvedContent){let e=0;0===t.resolvedContent.indexOf("<?xml")&&(e=t.resolvedContent.indexOf("?>")+2),r=t.resolvedContent.substr(0,e)+"<response>"+t.resolvedContent.substr(e)+"</response>",t.resolvedContent=a.parseXml(r).response}(function(e){let t,n;for(t=0;t<e.elements.length;t++)if(n=e.elements[t],!1===n.resolved)return!1;return!0})(n)&&c(n)}function c(e){let t,r,i=[];if(function(e){let t,n,r,i,s,u,l=[];for(i=e.elements.length-1;i>=0;i--){if(t=e.elements[i],n=t.type,t.resolvedContent){if(t.resolvedContent)for(s=0;s<t.resolvedContent[n].length;s++)r=t.resolvedContent[n][s],l.push(r)}else delete t.originalContent["xlink:actuate"],delete t.originalContent["xlink:href"],l.push(t.originalContent);for(t.parentElement[n].splice(t.index,1),u=0;u<l.length;u++)t.parentElement[n].splice(t.index+u,0,l[u]);l=[]}e.elements.length>0&&a.getIron().run(o)}(e),"onActuate"===e.resolveType&&n.trigger(h.default.XLINK_READY,{manifest:o}),e.resolveType===In)switch(e.type){case Ce.default.PERIOD:for(t=0;t<o[Ce.default.PERIOD].length;t++)r=o[Ce.default.PERIOD][t],r.hasOwnProperty(Ce.default.ADAPTATION_SET)&&(i=i.concat(f(r[Ce.default.ADAPTATION_SET],r,Ce.default.ADAPTATION_SET,In))),r.hasOwnProperty(Ce.default.EVENT_STREAM)&&(i=i.concat(f(r[Ce.default.EVENT_STREAM],r,Ce.default.EVENT_STREAM,In)));u(i,Ce.default.ADAPTATION_SET,In);break;case Ce.default.ADAPTATION_SET:n.trigger(h.default.XLINK_READY,{manifest:o})}}function f(e,t,n,r){let i,a,o,s=[];for(a=e.length-1;a>=0;a--)i=e[a],i.hasOwnProperty("xlink:href")&&"urn:mpeg:dash:resolve-to-zero:2013"===i["xlink:href"]&&e.splice(a,1);for(a=0;a<e.length;a++)i=e[a],i.hasOwnProperty("xlink:href")&&i.hasOwnProperty("xlink:actuate")&&i["xlink:actuate"]===r&&(o=g(i["xlink:href"],t,n,a,r,i),s.push(o));return s}function g(e,t,n,r,i,a){return{url:e,parentElement:t,type:n,index:r,resolveType:i,originalContent:a,resolvedContent:null,resolved:!1}}return i={resolveManifestOnLoad:function(e){let t;o=e,o.Period?(t=f(o.Period,o,Ce.default.PERIOD,In),u(t,Ce.default.PERIOD,In)):n.trigger(h.default.XLINK_READY,{manifest:o})},setParser:function(e){e&&(a=e)},reset:function(){n.off(h.default.XLINK_ELEMENT_LOADED,l,i),s&&(s.reset(),s=null)}},n.on(h.default.XLINK_ELEMENT_LOADED,l,i),s=Sn(t).create({errHandler:e.errHandler,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,settings:e.settings}),i}An.__dashjs_factory_name="XlinkController";var Rn=r.default.getClassFactory(An);function bn(e){function t(e,t,n,r,i){(function(e,t){let n=!0;if(t)for(const[r,i]of Object.entries(t)){let t=e[r];i.some(e=>t.match(e))&&(n=!1)}return n})(r,e)&&(i[t]?n?i[t].push(r):function(e,t){if("object"==typeof e)for(let n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(r,i[t]):i[t]=n?[r]:r)}function n(e,n,r,i){for(let a=0,o=e.length;a<o;++a){const o=e[a];if(r[o]){const e=r[o];Array.isArray(e)?e.forEach(e=>{t(n[o],o,!0,e,i)}):t(n[o],o,!1,e,i)}}}function r(e,t){for(let i=0,a=e.children.length;i<a;++i){const a=e.children[i],o=t[a.name];if(o)for(let i=0,s=o.length;i<s;++i){const s=o[i];n(e.properties,e.exceptions,t,s),r(a,s)}}}return{run:function(t){if(null===t||"object"!=typeof t)return t;if(t.Period&&"period"in e){const n=e.period,i=t.Period;for(let t=0,a=i.length;t<a;++t){const a=i[t];if(r(n,a),"adaptationset"in e){const t=a.AdaptationSet;if(t){const n=e.adaptationset;for(let e=0,i=t.length;e<i;++e)r(n,t[e])}}}}return t}}}bn.__dashjs_factory_name="ObjectIron";var vn=r.default.getClassFactory(bn),Cn=class{constructor(e,t){this._test=e,this._converter=t}get test(){return this._test}
2get converter(){return this._converter}};const Nn=/^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/;var Dn=class extends Cn{constructor(){super((e,t,n)=>{const r=[Ce.default.MIN_BUFFER_TIME,Ce.default.MEDIA_PRESENTATION_DURATION,Ce.default.MINIMUM_UPDATE_PERIOD,Ce.default.TIMESHIFT_BUFFER_DEPTH,Ce.default.MAX_SEGMENT_DURATION,Ce.default.MAX_SUBSEGMENT_DURATION,Ce.default.SUGGESTED_PRESENTATION_DELAY,Ce.default.START,g.default.START_TIME,Ce.default.DURATION],i=r.length;for(let e=0;e<i;e++)if(t===r[e])return Nn.test(n);return!1},e=>{const t=Nn.exec(e);let n=31536e3*parseFloat(t[3]||0)+2592e3*parseFloat(t[5]||0)+86400*parseFloat(t[7]||0)+3600*parseFloat(t[9]||0)+60*parseFloat(t[11]||0)+parseFloat(t[13]||0);return void 0!==t[1]&&(n=-n),n})}};const wn=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+-])([0-9]{2})(?::?)([0-9]{2}))?/;var Mn=class extends Cn{constructor(){super((e,t,n)=>wn.test(n),e=>{const t=wn.exec(e);let n;if(n=Date.UTC(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10),parseInt(t[4],10),parseInt(t[5],10),t[6]&&parseInt(t[6],10)||0,t[7]&&1e3*parseFloat(t[7])||0),t[9]&&t[10]){const e=60*parseInt(t[9],10)+parseInt(t[10],10);n+=("+"===t[8]?-1:1)*e*60*1e3}return new Date(n)})}};const Pn=/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/,On=[Ce.default.ID];var Ln=class extends Cn{constructor(){super((e,t,n)=>Pn.test(n)&&-1===On.indexOf(t),e=>parseFloat(e))}},Un=class extends Cn{constructor(){super((e,t)=>{const n={[Ce.default.ADAPTATION_SET]:[Ce.default.LANG],[Ce.default.REPRESENTATION]:[Ce.default.LANG],[Ce.default.CONTENT_COMPONENT]:[Ce.default.LANG],[Ce.default.LABEL]:[Ce.default.LANG],[Ce.default.GROUP_LABEL]:[Ce.default.LANG]};if(n.hasOwnProperty(e)){let r=n[e];return void 0!==r&&r.indexOf(t)>=0}return!1},e=>Ft(e)||String(e))}},xn=class{constructor(e,t,n,r){this._name=e||"",this._properties=t||[],this._exceptions=n||{},this._children=r||[]}get name(){return this._name}get children(){return this._children}get properties(){return this._properties}get exceptions(){return this._exceptions}},Fn=class extends xn{constructor(){const e=[Ce.default.AUDIO_CHANNEL_CONFIGURATION,Ce.default.AUDIO_SAMPLING_RATE,Ce.default.CODECS,Ce.default.CODING_DEPENDENCY,Ce.default.CONTENT_PROTECTION,Ce.default.ESSENTIAL_PROPERTY,Ce.default.FRAMERATE,Ce.default.FRAME_PACKING,Ce.default.HEIGHT,Ce.default.INBAND_EVENT_STREAM,Ce.default.MAXIMUM_SAP_PERIOD,Ce.default.MAX_PLAYOUT_RATE,Ce.default.MIME_TYPE,Ce.default.PROFILES,Ce.default.SAR,Ce.default.SCAN_TYPE,Ce.default.SEGMENT_PROFILES,Ce.default.SEGMENT_SEQUENCE_PROPERTIES,Ce.default.START_WITH_SAP,Ce.default.SUPPLEMENTAL_CODECS,Ce.default.SUPPLEMENTAL_PROPERTY,Ce.default.WIDTH],t={[Ce.default.SUPPLEMENTAL_PROPERTY]:{schemeIdUri:[g.default.URL_QUERY_INFO_SCHEME,g.default.EXT_URL_QUERY_INFO_SCHEME,g.default.ADV_URL_QUERY_INFO_SCHEME,g.default.URL_QUERY_STATE_PREFIX]},[Ce.default.ESSENTIAL_PROPERTY]:{schemeIdUri:[g.default.URL_QUERY_INFO_SCHEME,g.default.EXT_URL_QUERY_INFO_SCHEME,g.default.ADV_URL_QUERY_INFO_SCHEME,g.default.URL_QUERY_STATE_PREFIX]}};super(Ce.default.ADAPTATION_SET,e,t,[new xn(Ce.default.REPRESENTATION,e,t,[new xn(Ce.default.SUB_REPRESENTATION,e,t)])])}},kn=class extends xn{constructor(){const e=[Ce.default.SEGMENT_BASE,Ce.default.SEGMENT_TEMPLATE,Ce.default.SEGMENT_LIST],t={};super(Ce.default.PERIOD,e,t,[new xn(Ce.default.ADAPTATION_SET,e,t,[new xn(Ce.default.REPRESENTATION,e,t)])])}};const Bn=new Set([13,10,9,62,47,61,32]),Hn=[Ce.default.ACCESSIBILITY,Ce.default.ADAPTATION_SET,Ce.default.ADD,Ce.default.AUDIO_CHANNEL_CONFIGURATION,Ce.default.BASE_URL,Ce.default.CONTENT_COMPONENT,Ce.default.CONTENT_PROTECTION,Ce.default.CONTENT_STEERING,Ce.default.ESSENTIAL_PROPERTY,Ce.default.EVENT,Ce.default.EVENT_STREAM,Ce.default.INBAND_EVENT_STREAM,Ce.default.LABEL,Ce.default.LOCATION,Ce.default.METRICS,Ce.default.PATCH_LOCATION,Ce.default.PERIOD,Ce.default.PRESELECTION,Ce.default.PRODUCER_REFERENCE_TIME,Ce.default.REMOVE,Ce.default.REPLACE,Ce.default.REPORTING,Ce.default.REPRESENTATION,Ce.default.ROLE,Ce.default.S,Ce.default.SEGMENT_SEQUENCE_PROPERTIES,Ce.default.SEGMENT_URL,Ce.default.SERVICE_DESCRIPTION,Ce.default.SUPPLEMENTAL_PROPERTY,Ce.default.UTC_TIMING];function Gn(e){e=e||{};const t=this.context,n=e.debug;let r,i,a,o;function s(e){try{const t=function(e){const t=function(e,t={}){let n=t.pos||0;const r=e.length,i=!!t.keepComments,a=!!t.keepWhitespace,o=!!t.includeParentElement;function s(e,t="#text"){return{nodeName:t,nodeValue:e,attributes:{},childNodes:[]}}function u(t=""){const o=[];for(;n<r;)if(60===e.charCodeAt(n)){const a=e.charCodeAt(n+1);if(47===a){const r=n+2;if(n=e.indexOf(">",n),!e.startsWith(t,r)){const t=e.substring(0,n).split("\n");throw new Error("Unexpected close tag\nLine: "+(t.length-1)+"\nColumn: "+(t[t.length-1].length+1)+"\nChar: "+e[n])}return n+1&&(n+=1),o}if(63===a){n=e.indexOf(">",n),n++;continue}if(33===a){const t=e.charCodeAt(n+2);if(45===t){const t=n;for(;-1!==n&&(62!==e.charCodeAt(n)||45!==e.charCodeAt(n-1)||45!==e.charCodeAt(n-2));)n=e.indexOf(">",n+1);-1===n&&(n=r),i&&o.push(s(e.substring(t,n+1),"#comment"))}
2else{if(91===t&&91===e.charCodeAt(n+8)&&e.startsWith("CDATA",n+3)){const t=e.indexOf("]]>",n);-1===t?(o.push(s(e.substr(n+9),"#cdata")),n=r):(o.push(s(e.substring(n+9,t),"#cdata")),n=t+3);continue}{const t=n+1;n+=2;let i=!1;for(;n<r&&(62!==e.charCodeAt(n)||i);){const t=e.charCodeAt(n);91===t?i=!0:i&&93===t&&(i=!1),n++}o.push(s(e.substring(t,n),"#doctype"))}}n++;continue}const u=f();o.push(u)}else{const e=l();if(a)e.length>0&&o.push(s(e));else{const t=e.trim();t.length>0&&o.push(s(t))}n++}return o}function l(){const t=n;return n=e.indexOf("<",n)-1,-2===n&&(n=r),(0,kt.unescapeHtml)(e.slice(t,n+1))}function c(){const t=n;for(;n<r&&!Bn.has(e.charCodeAt(n));)n++;return e.slice(t,n)}function f(){n++;const t=c();let i=t,a=null;const o=t.indexOf(":");-1!==o&&(a=t.slice(0,o),i=t.slice(o+1));const s=function(){const t={};for(;n<r&&62!==e.charCodeAt(n);){const r=e.charCodeAt(n);if(r>64&&r<91||r>96&&r<123){const r=c();let i="",a=e.charCodeAt(n);for(;39!==a&&34!==a;)n++,a=e.charCodeAt(n);if(39===a||34===a){if(i=d(),-1===n)throw new Error("Missing closing quote")}else n--;t[r]=(0,kt.unescapeHtml)(i)}n++}return t}();let l=[];const f=e.charCodeAt(n-1);return n++,47!==f&&(l=u(t)),{nodeName:t,nodeValue:null,attributes:s,childNodes:l,prefix:a,localName:i}}function d(){const t=e[n],r=n+1;return n=e.indexOf(t,r),e.slice(r,n)}const h={nodeName:"#document",nodeValue:null,childNodes:u(""),attributes:{}};return o&&function e(t,n){t.parentElement=n?.nodeName.startsWith("#")?null:n;for(const n of t.childNodes)e(n,t)}(h,null),h}(e),n=t.childNodes.find(e=>"MPD"===e.nodeName||"Patch"===e.nodeName)||t.childNodes[0];return function e(t){-1!==t.nodeName.indexOf(":")&&(t.__prefix=t.prefix,t.nodeName=t.localName);const{childNodes:n,attributes:r,nodeName:i}=t;t.tagName=i;for(let e in r){let n=r[e];if("S"===i)n=parseInt(n);else for(let t=0,r=a.length;t<r;t++){const r=a[t];if(r.test(i,e,n)){n=r.converter(n);break}}t[e]=n}const o=n?.length;for(let r=0;r<o;r++){const i=n[r];if("#text"===i.nodeName){t.__text=i.nodeValue;continue}e(i);const{nodeName:a}=i;Array.isArray(t[a])?t[a].push(i):-1!==Hn.indexOf(a)?(t[a]||(t[a]=[]),t[a].push(i)):t[a]=i}t.__children=n}(n),n}(e);return{[t.tagName]:t}}catch(e){return null}}return r={getIron:function(){return o},parseXml:s,parse:function(e){let t;const n=window.performance.now();if(t=s(e),!t)throw new Error("failed to parse the manifest");t.Patch?(t=t.Patch,t.add&&t.add.forEach(e=>o.run(e)),t.replace&&t.replace.forEach(e=>o.run(e))):(t=t.MPD,o.run(t));const r=window.performance.now();return i.info("Parsing complete: "+(r-n).toPrecision(3)+"ms"),t.protocol="DASH",t}},i=n.getLogger(r),a=[new Dn,new Mn,new Ln,new Un],o=vn(t).create({adaptationset:new Fn,period:new kn}),r}Gn.__dashjs_factory_name="DashParser";var Yn=r.default.getClassFactory(Gn);function Vn(e){e=e||{};const t=this.context,n=e.debug,r=e.settings,i=(0,d.default)(t).getInstance(),a=(0,Ne.default)(t).getInstance();let o,s,u,l,c,f=e.mssHandler,p=e.errHandler;function m(e){i.trigger(h.default.INTERNAL_MANIFEST_LOADED,{manifest:e.manifest})}return o={load:function(e,o=null,d=null){const g=new Date,p=new yn(e,R.HTTPRequest.MPD_TYPE);o&&(p.serviceLocation=o),d&&(p.queryParams=d),p.startDate||(p.startDate=g),i.trigger(h.default.MANIFEST_LOADING_STARTED,{request:p}),u.load({request:p,success:function(o,u,d){if(!l)return;let g,p,m;if(d&&d!==e?(p=a.parseBaseUrl(d),g=d):(a.isRelative(e)&&(e=a.resolve(e,window.location.href)),p=a.parseBaseUrl(e)),"No Content"!=u)if(null===c&&(c=function(e){let r=null;return e.indexOf("SmoothStreamingMedia")>-1?(f&&(r=f.createMssParser(),f.createMssFragmentProcessor(),f.registerEvents()),r):e.indexOf("MPD")>-1||e.indexOf("Patch")>-1?Yn(t).create({debug:n}):r}(o)),null!==c){l.setParser(c);try{m=c.parse(o)}catch(t){return void i.trigger(h.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new He.default(Ae.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,Ae.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+`${e}`)})}if(m){if(m.url=g||e,m.originalUrl||(m.originalUrl=m.url),r&&r.get().streaming.enableManifestDurationMismatchFix&&m.mediaPresentationDuration&&m.Period.length>1){const e=m.Period.reduce((e,t)=>
2e+t.duration,0);!isNaN(e)&&m.mediaPresentationDuration>e&&(s.warn("Media presentation duration greater than duration of all periods. Setting duration to total period duration"),m.mediaPresentationDuration=e)}m.baseUri=p,m.loadedTime=new Date,l.resolveManifestOnLoad(m),i.trigger(h.default.ORIGINAL_MANIFEST_LOADED,{originalManifest:o})}else i.trigger(h.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new He.default(Ae.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,Ae.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+`${e}`)})}else i.trigger(h.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new He.default(Ae.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,Ae.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE+`${e}`)});else i.trigger(h.default.INTERNAL_MANIFEST_LOADED,{manifest:null})},error:function(t,n,r){i.trigger(h.default.INTERNAL_MANIFEST_LOADED,{manifest:null,error:new He.default(Ae.default.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE,Ae.default.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE+`${e}, ${r}`)})}})},reset:function(){i.off(h.default.XLINK_READY,m,o),f&&f.reset(),l&&(l.reset(),l=null),u&&(u.abort(),u=null)}},s=n.getLogger(o),i.on(h.default.XLINK_READY,m,o),u=(0,Re.default)(t).create({errHandler:e.errHandler,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,urlUtils:a,constants:g.default,dashConstants:Ce.default,errors:Ae.default}),l=Rn(t).create({errHandler:p,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,settings:e.settings}),c=null,o}Vn.__dashjs_factory_name="ManifestLoader";var qn=r.default.getClassFactory(Vn);function Kn(){let e,t,n=this.context,r=(0,d.default)(n).getInstance();return e={getValue:function(){return t},setValue:function(e){t=e,e&&r.trigger(h.default.MANIFEST_LOADED,{data:e})}},e}Kn.__dashjs_factory_name="ManifestModel";var jn=r.default.getSingletonFactory(Kn);function Wn(){const e=this.context,t=(0,l.default)(e).getInstance();let n,r,i;return n={select:function(e){if(!e||0===e.length)return null;let n=null;return t.get().streaming.applyContentSteering&&(n=function(e){const t=i.getCurrentSteeringResponseData();return t&&t.pathwayPriority&&t.pathwayPriority.length>0?function(e=[],t=[]){let n=0,i=null;for(;n<e.length;){const a=e[n],o=t.findIndex(e=>e.serviceLocation&&e.serviceLocation===a);if(-1!==o&&!r.contains(t[o].serviceLocation)){i=t[o];break}n+=1}return i}(t.pathwayPriority,e):null}(e)),n||(n=function(e){return e[0]}(e)),n},setConfig:function(e){e.blacklistController&&(r=e.blacklistController),e.contentSteeringController&&(i=e.contentSteeringController)},reset:function(){r.reset()}},r=Ue(e).create({updateEventName:h.default.SERVICE_LOCATION_LOCATION_BLACKLIST_CHANGED,addBlacklistEventName:h.default.SERVICE_LOCATION_LOCATION_BLACKLIST_ADD,enableExpiry:!1}),i=Oe(e).getInstance(),n}Wn.__dashjs_factory_name="LocationSelector";var zn=r.default.getClassFactory(Wn);function $n(){const e=this.context,t=(0,d.default)(e).getInstance(),n=(0,Ne.default)(e).getInstance();let r,i,a,o,s,l,c,f,m,E,T,y,_,S,I;function A(){_=NaN,f=!1,l=!0,c=!1,R()}function R(){null!==S&&(clearTimeout(S),S=null)}function b(e){R(),c||(isNaN(e)&&!isNaN(_)&&(e=1e3*_),isNaN(e)||(E.debug("Refresh manifest in "+e+" milliseconds."),S=setTimeout(N,e)))}function v(e=!1){f=!0;const t=y.getValue();let a=t.url;a&&(a=Me.default.removeQueryParameterFromUrl(a,g.default.CMCD_QUERY_KEY));let o=null;const s=r.getPatchLocation(t),u=m.select(s);let l=null;if(u&&!e)a=u.url,o=u.serviceLocation,l=u.queryParams;else{const e=function(e){const t=r.getLocation(e),n=i.getSynthesizedLocationElements(t);return t.concat(n)}(t),n=m.select(e);n&&(a=n.url,o=n.serviceLocation,l=n.queryParams)}n.isRelative(a)&&(a=n.resolve(a,t.url)),T.load(a,o,l)}function C(e){if(e){if(r.getIsPatch(e)){let t=e;e=y.getValue();let n=r.isPatchValid(e,t),i=n;if(n){let n=r.getPublishTime(e);r.applyPatchToManifest(e,t);let a=r.getPublishTime(e);i=n.getTime()!==a.getTime()}if(!i)return E.debug("Patch provided is invalid, performing full manifest refresh"),void v(!0);e.loadedTime=new Date}}else(e=y.getValue()).loadedTime=new Date;if(y.getValue()&&y.getValue().type===Ce.default.DYNAMIC&&e.type===Ce.default.STATIC)return t.trigger(h.default.DYNAMIC_TO_STATIC),f=!1,void(c=!0);y.setValue(e);const n=new Date,i=(n.getTime()-e.loadedTime.getTime())/1e3;_=r.getManifestUpdatePeriod(e,i),1e3*_>2147483647&&(_=2147483.647),t.trigger(h.default.MANIFEST_UPDATED,{manifest:e}),E.info("Manifest has been refreshed at "+n+"["+n.getTime()/1e3+"] "),l||b()}function N(){l||(f?b(I.get().streaming.manifestUpdateRetryInterval):v())}function D(e){if(e.error)e.error.code===Ae.default.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE&&o.error(e.error);else{const t=e.manifest;!function(e){!function(e){const t=a.getExternalSubtitles();if(!t||0===t.length)return;const n=e&&e.Period?e.Period.length:0;t.forEach(t=>{if(null===t.periodId&&n>1)E.warn(`External subtitle with id ${t.id} has no periodId and the MPD contains more than one period. Unable to add the external subtitle as it is not clear which period shall be used.`);else if(1===n)w(e.Period[0],t);else{const n=e.Period.find(e=>e.id===t.periodId);n?w(n,t):E.warn(`External subtitle with id ${t.id} has periodId ${t.periodId} but the MPD does not contain a period with that id. Unable to add the external subtitle.`)}})}(e)}(t),C(t)}}function w(e,t){if(!e||!e.AdaptationSet)return e;e.AdaptationSet.push(t.serializeToMpdParserFormat())}function M(){l=!1,b()}function P(){l=!I.get().streaming.scheduling.scheduleWhilePaused,l&&R()}function O(){f=!1}return s={getIsUpdating:function(){return f},initialize:function(){A(),t.on(h.default.STREAMS_COMPOSED,O,this),t.on(p.default.PLAYBACK_STARTED,M,this),t.on(p.default.PLAYBACK_PAUSED,P,this),t.on(h.default.INTERNAL_MANIFEST_LOADED,D,this)},refreshManifest:v,reset:function(){t.off(p.default.PLAYBACK_STARTED,M,this),t.off(p.default.PLAYBACK_PAUSED,P,this),t.off(h.default.STREAMS_COMPOSED,O,this),t.off(h.default.INTERNAL_MANIFEST_LOADED,D,this),A()},setConfig:function(e){e&&(e.manifestModel&&(y=e.manifestModel),e.adapter&&(r=e.adapter),e.manifestLoader&&(T=e.manifestLoader),e.errHandler&&(o=e.errHandler),e.locationSelector&&(m=e.locationSelector),e.settings&&(I=e.settings),e.contentSteeringController&&(i=e.contentSteeringController),e.customParametersModel&&(a=e.customParametersModel))},setManifest:function(e){C(e)}},E=(0,u.default)(e).getInstance().getLogger(s),m=zn(e).create(),a=(0,pt.default)(e).getInstance(),s}$n.__dashjs_factory_name="ManifestUpdater";var Qn=r.default.getClassFactory($n);function Xn(e,t){return function(n,r){let i=Jn(n,"tag");const a=Jn(r??"*","range"),o=[];let s=-1;for(;++s<a.length;){const n=a[s].toLowerCase();if(!t&&"*"===n)continue;let r=-1;const u=[];for(;++r<i.length;)if(e(i[r].toLowerCase(),n)){if(!t)return i[r];o.push(i[r])}else u.push(i[r]);i=u}return t?o:void 0}}Xn(function(e,t){return"*"===t||e===t||e.includes(t+"-")}
2,!0);const Zn=Xn(function(e,t){const n=e.split("-"),r=t.split("-");let i=0,a=0;if("*"!==r[a]&&n[i]!==r[a])return!1;for(i++,a++;a<r.length;)if("*"!==r[a]){if(!n[i])return!1;if(n[i]!==r[a]){if(1===n[i].length)return!1;i++}else i++,a++}else a++;return!0},!0);function Jn(e,t){const n=e&&"string"==typeof e?[e]:e;if(!n||"object"!=typeof n||!("length"in n))throw new Error("Invalid "+t+" `"+n+"`, expected non-empty string");return n}function er(){const e=this.context,t=(0,d.default)(e).getInstance();let n,r,i,a,o,s,l,c,f,m,E;function T(e){if(!(e&&e.currentRepresentation&&e.currentRepresentation.mediaInfo&&e.currentRepresentation.mediaInfo.type))return;const t=e.currentRepresentation.mediaInfo.type;l[t]=e.currentRepresentation}function y(e,t){return e&&i[t]&&i[t][e]?i[t][e].list:[]}function _(e,t){return e&&i[t]&&i[t][e]?i[t][e].current:null}function S(e,n={}){if(!e||!e.streamInfo)return;const r=e.type,o=e.streamInfo.id,u=_(r,o);if(i[o]&&i[o][r]&&(i[o][r].current=e,i[o][r].current&&(r!==g.default.TEXT&&!R(e,u)||r===g.default.TEXT&&e.isFragmented)&&t.trigger(h.default.CURRENT_TRACK_CHANGED,{oldMediaInfo:u,newMediaInfo:e,switchMode:a.get().streaming.trackSwitchMode[r],options:n},{streamId:o}),!n.hasOwnProperty("noSettingsSave")||!n.noSettingsSave)){let t=function(e){const t={lang:e.lang,viewpoint:e.viewpoint,roles:e.roles,accessibility:e.accessibility,audioChannelConfiguration:e.audioChannelConfiguration,codec:e.codec};return t.lang||t.viewpoint||t.role&&t.role.length>0||t.accessibility&&t.accessibility.length>0||t.audioChannelConfiguration&&t.audioChannelConfiguration.length>0?t:null}(e);if(!t||!i[o][r].storeLastSettings)return;t.roles&&(t.role=t.roles[0],delete t.roles),t.accessibility&&(t.accessibility=t.accessibility[0]),t.audioChannelConfiguration&&(t.audioChannelConfiguration=t.audioChannelConfiguration[0]),s[r]=t,E.setSavedMediaSettings(r,t)}}function I(e,t){e&&t&&(o[e]=t)}function A(e){return e?o[e]:null}function R(t,n){if(!t&&!n)return!0;if(!t||!n)return!1;if(t.isPreselection!==n.isPreselection)return!1;let r=(0,Te.default)(e).getInstance();const i=t.id===n.id,a=r.areEqual(t.viewpoint,n.viewpoint),o=t.lang===n.lang,s=t.codec===n.codec,u=r.areEqual(t.roles,n.roles),l=r.areEqual(t.accessibility,n.accessibility),c=r.areEqual(t.audioChannelConfiguration,n.audioChannelConfiguration),f=r.areEqual(t.supplementalProperties,n.supplementalProperties),d=r.areEqual(t.essentialProperties,n.essentialProperties);return i&&s&&a&&o&&u&&l&&c&&f&&d}function b(){i={},s={},l={},o={audio:null,video:null,text:null},t.off(p.default.REPRESENTATION_SWITCH,T,n)}function v(e,t,n){let i=[];return e.forEach(function(e){t(n,e)&&i.push(e)}),0!==i.length?(r.info("Filter-Function ("+t.name+") resulted in "+i.length+" tracks"),i):t===M&&a.get().streaming.assumeDefaultRoleAsMain&&V(n.role,{schemeIdUri:g.default.DASH_ROLE_SCHEME_ID,value:Ce.default.MAIN})&&(r.info("no track with Role set to main - assuming main as default and searching again"),i=v(e,P,null),0!==i.length)?i:(r.info("Filter-Function ("+t.name+") resulted in no tracks; setting ignored"),e)}function C(e,t){try{return!e.lang||e.lang instanceof RegExp?t.lang.match(e.lang):""!==t.lang&&Zn(t.lang,Ft(e.lang)).length>0}catch(e){return!1}}function N(e,t){return void 0===e.index||null===e.index||t.index===e.index}function D(e,t){return void 0===e.id||null===e.id||t.id===e.id}function w(e,t){return!e.viewpoint||!!t.viewpoint.filter(function(t){return V(t,e.viewpoint)})[0]}function M(e,t,n=!1){return!!t.roles&&(!e.role||!!t.roles.filter(function(t){return V(t,e.role)})[0]||t.type===g.default.AUDIO&&n)}function P(e,t){return!t.roles||0===t.roles.length}function O(e,t){let n;return n=e.accessibility?!!t.accessibility.filter(function(t){return V(t,e.accessibility)})[0]:!t.accessibility.length,n}function L(e,t){return!e.audioChannelConfiguration||!!t.audioChannelConfiguration.filter(function(t){return V(t,e.audioChannelConfiguration)})[0]}function U(e,t){return!e.codec||e.codec===t.codec}function x(e){let t=0,n=[];return e.forEach(e=>{isNaN(e.selectionPriority)||(e.selectionPriority>t?(t=e.selectionPriority,n=[e]):e.selectionPriority===t&&n.push(e))}),n}function F(e){let t,n=0,r=[];return e.forEach(function(e){t=Math.max.apply(Math,e.bitrateList.map(function(e){return e.bandwidth})),t>n?(n=t,r=[e]):t===n&&r.push(e)}),r}function k(e){return e[0]&&e[0].type===g.default.VIDEO?function(e){let t,n=1/0,r=[];return e.forEach(function(e){const i=e.bitrateList.reduce(function(e,t){const n=Math.max(1,t.width*t.height);return e+t.bandwidth/n},0);t=i/e.bitrateList.length,t<n?(n=t,r=[e]):t===n&&r.push(e)}),r}(e):e[0]&&e[0].type===g.default.AUDIO?function(e){let t=1/0,n=[];return e.forEach(function(e){let r=e.audioChannelConfiguration.reduce(function(e,t){return e+(ot(t)||0)},0)/e.audioChannelConfiguration.length;e.hasOwnProperty("supplementalProperties")&&e.supplementalProperties.some(e=>"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"===e.schemeIdUri&&"JOC"===e.value)&&(r=16),r||(r=1);
2let i=e.bitrateList.reduce(function(e,t){return e+t.bandwidth/r},0)/e.bitrateList.length;i<t?(t=i,n=[e]):i===t&&n.push(e)}),n}(e):e}function B(e){let t,n=0,r=[];return e.forEach(function(e){t=e.representationCount,t>n?(n=t,r=[e]):t===n&&r.push(e)}),r}function H(e,t){if(e===g.default.TEXT)return function(e){if(!e||0===e.length)return null;const t=e.filter(e=>!(e&&e.roles&&e.roles.length>0)||e.roles.every(e=>e.schemeIdUri!==g.default.DASH_ROLE_SCHEME_ID||e.value!==Ce.default.FORCED_SUBTITLE));return t.length>0?t[0]:e[0]}(t);let n;const i=c.getCustomInitialTrackSelectionFunction();if(n=function(e){try{let t;return t=function(e){try{const t=e.filter(e=>{const t=e.type;return e.bitrateList.some(e=>{const n=f.getAbrBitrateParameter("maxBitrate",t),r=f.getAbrBitrateParameter("minBitrate",t);return!(n>-1&&e.bandwidth>1e3*n||r>-1&&e.bandwidth<1e3*r)})});return t.length>0?t:e}catch(t){return r.error(t),e}}(e),t=function(e){try{if(!a.get().streaming.abr.limitBitrateByPortal)return e;const{elementWidth:t}=m.getVideoElementSize(),n=e.filter(e=>e.type!==g.default.VIDEO||e.bitrateList.some(e=>e.width<=t));return n.length>0?n:e}catch(t){return r.error(t),e}}(t),t}catch(t){return r.error(t),e}}(t),i&&"function"==typeof i)n=i(n);else if(l[e])n=function(e,t){if(!e||0===e.length||!t||!l[t])return e;const n=l[t].bandwidth;if(!n||isNaN(n))return e;let r={min:NaN,track:null};return e.forEach(e=>{e.bitrateList.forEach(t=>{const i=Math.abs(t.bandwidth-n);(isNaN(r.min)||i<r.min)&&(r.min=i,r.track=e)})}),r.track?[r.track]:e}(n,e);else if(a.get().streaming.ignoreSelectionPriority||(r.info("Trying to find track with highest selectionPriority"),n=function(e){return x(e)}(n)),n.length>1&&a.get().streaming.prioritizeRoleMain&&(r.info("Trying to find a main track"),n=v(n,M,{role:{schemeIdUri:g.default.DASH_ROLE_SCHEME_ID,value:Ce.default.MAIN}})),n.length>1){r.info("Selecting track based on selectionModeForInitialTrack");let e=a.get().streaming.selectionModeForInitialTrack;switch(e){case g.default.TRACK_SELECTION_MODE_HIGHEST_BITRATE:n=function(e){let t=F(e);return t.length>1&&(t=B(t)),t}(n);break;case g.default.TRACK_SELECTION_MODE_FIRST_TRACK:n=G(n);break;case g.default.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY:n=Y(n);break;case g.default.TRACK_SELECTION_MODE_WIDEST_RANGE:n=function(e){let t=B(e);return t.length>1&&(t=F(e)),t}(n);break;case g.default.TRACK_SELECTION_MODE_LOWEST_STARTUP_DELAY:n=function(e){let t=e.filter(e=>!(!e.segmentSequenceProperties||0===e.segmentSequenceProperties.length)&&e.segmentSequenceProperties.some(e=>e.isBootstrapConfiguration()));return Y(t.length>0?t:e)}(n);break;default:r.warn(`Track selection mode ${e} is not supported. Falling back to TRACK_SELECTION_MODE_FIRST_TRACK`),n=G(n)}}return n.length>0?n[0]:t[0]}function G(e){return e[0]}function Y(e){let t=k(e);return t.length>1&&(t=F(t)),t}function V(e,t){return!(!e||!t)&&JSON.stringify({schemeIdUri:e.schemeIdUri,value:e.value})===JSON.stringify({schemeIdUri:t.schemeIdUri,value:t.value})}return n={addTrack:function(e){if(!e)return;const t=e.type;if((n=t)!==g.default.AUDIO&&n!==g.default.VIDEO&&n!==g.default.TEXT&&n!==g.default.IMAGE)return void r.info("track not added (_isMultiTrackSupportedByType), track.index="+e.index);var n;let o=e.streamInfo.id;i[o]||(i[o]=function(){const e=a.get().streaming.saveLastMediaSettingsForCurrentStreamingSession;return{audio:{list:[],storeLastSettings:e,current:null},video:{list:[],storeLastSettings:e,current:null},text:{list:[],storeLastSettings:e,current:null},image:{list:[],storeLastSettings:e,current:null}}}());const s=i[o][t].list;for(let t=0,n=s.length;t<n;++t)if(R(s[t],e))return void r.info("track not added as it is already set (this track-index="+e.index+" - existing track.index="+s[t].index+")");r.info("addTrack with track.codec='"+e.codec+"', track.type='"+e.type+"', track.id='"+e.id+"', track.index="+e.index),s.push(e)},areTracksEqual:R,clearDataForStream:function(e){i[e]&&delete i[e]},getCurrentTrackFor:_,getInitialSettings:A,getTracksFor:y,getTracksWithHighestSelectionPriority:x,getTracksWithHighestBitrate:F,getTracksWithHighestEfficiency:k,getTracksWithWidestRange:B,initialize:function(){t.on(p.default.REPRESENTATION_SWITCH,T,n)},isCurrentTrack:function(e){if(!e)return!1;const t=e.type,n=e.streamInfo.id;return i[n]&&i[n][t]&&R(i[n][t].current,e)}
2,matchSettings:function(e,t,n=!1){try{let r=!1;if(e.lang){if(e.lang instanceof RegExp)r=t.lang.match(e.lang);else if(""!==t.lang){const n=Ft(e.lang);n&&(r=Zn(t.lang,n).length>0)}}else r=!0;const i=void 0===e.index||null===e.index||t.index===e.index,a=!e.viewpoint||!!t.viewpoint.filter(function(t){return V(t,e.viewpoint)})[0],o=!e.role||!!t.roles.filter(function(t){return V(t,e.role)})[0];let s=!e.accessibility||!!t.accessibility.filter(function(t){return V(t,e.accessibility)})[0],u=!e.audioChannelConfiguration||!!t.audioChannelConfiguration.filter(function(t){return V(t,e.audioChannelConfiguration)})[0];return r&&i&&a&&(o||t.type===g.default.AUDIO&&n)&&s&&u}catch(e){return r.error(e),!1}},matchSettingsAccessibility:O,matchSettingsAudioChannelConfig:L,matchSettingsIndex:N,matchSettingsLang:C,matchSettingsRole:M,matchSettingsViewPoint:w,reset:b,saveTextSettingsDisabled:function(){E.setSavedMediaSettings(g.default.TEXT,null)},selectInitialTrack:H,setConfig:function(e){e&&(e.domStorage&&(E=e.domStorage),e.settings&&(a=e.settings),e.customParametersModel&&(c=e.customParametersModel),e.mediaPlayerModel&&(f=e.mediaPlayerModel),e.videoModel&&(m=e.videoModel))},setInitialMediaSettingsForType:function(e,t){let n=s[e]||A(e);const i=y(e,t.id);let o=[];n&&0!==Object.keys(n).length||(n=E.getSavedMediaSettings(e),n&&delete n.codec,I(e,n)),i&&0!==i.length&&(o=a.get().streaming.includePreselectionsForInitialTrackSelection?Array.from(i):i.filter(e=>!e.isPreselection),n&&(r.info("Filtering "+o.length+" "+e+" tracks based on settings"),o=v(o,D,n),o=v(o,C,n),o=v(o,N,n),o=v(o,w,n),e===g.default.AUDIO&&s[e]||(o=v(o,M,n)),o=v(o,O,n),o=v(o,L,n),o=v(o,U,n),r.info("Filtering "+e+" tracks ended, found "+o.length+" matching track(s).")),o.length>1?S(H(e,o)):S(o[0]))},setInitialSettings:I,setTrack:S},r=(0,u.default)(e).getInstance().getLogger(n),b(),n}Xn(function(e,t){let n=t;for(;;){if("*"===n||e===n)return!0;let t=n.lastIndexOf("-");if(t<0)return!1;"-"===n.charAt(t-2)&&(t-=2),n=n.slice(0,t)}},!1),er.__dashjs_factory_name="MediaController";const tr=r.default.getSingletonFactory(er);r.default.updateSingletonFactory(er.__dashjs_factory_name,tr);var nr=tr;function rr(){let e,t,n,r;const i=this.context,a=(0,l.default)(i).getInstance();function o(e,n){return isNaN(e)?0:e>0?(n&&t.warn("Supplied minimum playback rate is a positive value when it should be negative or 0. The supplied rate will not be applied and set to 0: 100% playback speed."),0):e<-.5?(n&&t.warn("Supplied minimum playback rate is out of range and will be limited to -0.5: -50% playback speed."),-.5):e}function s(e,n){return isNaN(e)?0:e<0?(n&&t.warn("Supplied maximum playback rate is a negative value when it should be negative or 0. The supplied rate will not be applied and set to 0: 100% playback speed."),0):e>1?(n&&t.warn("Supplied maximum playback rate is out of range and will be limited to 1: 200% playback speed."),1):e}function c(e,n){return isNaN(e)?0:e<0?(n&&t.warn("Supplied step algorithm value is a negative value when it should be positive or 0. The supplied value will not be applied and set to 0."),0):e<0?(n&&t.warn("Supplied step algorithm value is out of range and will be limited to 0"),0):e}function f(){const e=d(),t=n.getLiveDelay();return!isNaN(t)&&t>0?Math.min(e,t):e}function d(){return a.get().streaming.buffer.bufferTimeDefault>0?a.get().streaming.buffer.bufferTimeDefault:h()?20:12}function h(){return null!==a.get().streaming.buffer.fastSwitchEnabled?a.get().streaming.buffer.fastSwitchEnabled:!n.getLowLatencyModeEnabled()}return e={getAbrBitrateParameter:function(e,t){try{const n=a.get().streaming.abr[e][t];if(!isNaN(n)&&-1!==n)return n;const i=r.getServiceDescriptionSettings();return i&&i[e]&&!isNaN(i[e][t])?i[e][t]:-1}catch(e){return-1}},getBufferTimeDefault:f,getBufferTimeDefaultUnadjusted:d,getCatchupMaxDrift:function(){if(!isNaN(a.get().streaming.liveCatchup.maxDrift))return a.get().streaming.liveCatchup.maxDrift;const e=r.getServiceDescriptionSettings();return e&&e.liveCatchup&&!isNaN(e.liveCatchup.maxDrift)&&e.liveCatchup.maxDrift>=0?e.liveCatchup.maxDrift:12},getCatchupModeEnabled:function(){return null!==a.get().streaming.liveCatchup.enabled?a.get().streaming.liveCatchup.enabled:n.getInitialCatchupModeActivated()},getCatchupPlaybackRates:function(e){const t=a.get().streaming.liveCatchup.playbackRate;if(!isNaN(t.min)||!isNaN(t.max))return{min:o(t.min,e),max:s(t.max,e)};const n=r.getServiceDescriptionSettings();if(n&&n.liveCatchup&&(!isNaN(n.liveCatchup.playbackRate.min)||!isNaN(n.liveCatchup.playbackRate.max))){const t=n.liveCatchup.playbackRate;return{min:o(t.min,e),max:s(t.max,e)}}return{min:-.5,max:.5}},getCatchupStepSettings:function(e){const t=a.get().streaming.liveCatchup.step;return isNaN(t.start.min)&&isNaN(t.start.max)&&isNaN(t.stop.min)&&isNaN(t.stop.max)?{start:{min:0,max:1},stop:{min:0,max:1}}:{start:{min:c(t.start.min,e),max:c(t.start.max,e)},stop:{min:c(t.stop.min,e),max:c(t.stop.max,e)}}},getFastSwitchEnabled:h,getInitialBufferLevel:function(){const e=a.get().streaming.buffer.initialBufferLevel;return isNaN(e)||e<0?0:Math.min(f(),e)},getRetryAttemptsForType:function(e){const t=isNaN(a.get().streaming.retryAttempts.lowLatencyMultiplyFactor)?5:a.get().streaming.retryAttempts.lowLatencyMultiplyFactor;return n.getLowLatencyModeEnabled()?a.get().streaming.retryAttempts[e]*t:a.get().streaming.retryAttempts[e]},getRetryIntervalsForType:function(e){const t=isNaN(a.get().streaming.retryIntervals.lowLatencyReductionFactor)?10:a.get().streaming.retryIntervals.lowLatencyReductionFactor;return n.getLowLatencyModeEnabled()?a.get().streaming.retryIntervals[e]/t:a.get().streaming.retryIntervals[e]},getScheduleTimeout:function(){return n.getLowLatencyModeEnabled()?a.get().streaming.scheduling.lowLatencyTimeout:a.get().streaming.scheduling.defaultTimeout},reset:function(){},setConfig:function(e){e.playbackController&&(n=e.playbackController),e.serviceDescriptionController&&(r=e.serviceDescriptionController)}},t=(0,u.default)(i).getInstance().getLogger(e),e}rr.__dashjs_factory_name="MediaPlayerModel";var ir=r.default.getSingletonFactory(rr);function ar(){const e=this.context,t=(0,d.default)(e).getInstance();let n,r,i,a,s,l,c,f,m,E,T,y,_,S,I,A,R,b,v,C,N,D,w,M;function P(){x(),I=!1,E=0,S=0,r=0,_=!1,y=!1,a=!1,R=NaN,m=NaN,w&&(t.off(h.default.DATA_UPDATE_COMPLETED,Q,s),t.off(h.default.MANIFEST_UPDATED,ye,s),t.off(h.default.STREAMS_COMPOSED,_e,s),t.off(p.default.PLAYBACK_ENDED,he,s
2),t.off(p.default.STREAM_INITIALIZING,Ee,s),t.off(p.default.REPRESENTATION_SWITCH,Te,s),t.off(p.default.BUFFER_LEVEL_STATE_CHANGED,J,s),$(),w.removeEventListener("canplay",X),w.removeEventListener("canplaythrough",Z),w.removeEventListener("ended",fe),w.removeEventListener("error",ge),w.removeEventListener("loadeddata",ce),w.removeEventListener("loadedmetadata",le),w.removeEventListener("pause",re),w.removeEventListener("play",ee),w.removeEventListener("playing",ne),w.removeEventListener("progress",se),w.removeEventListener("ratechange",ue),w.removeEventListener("seeked",ae),w.removeEventListener("seeking",ie),w.removeEventListener("stalled",me),w.removeEventListener("timeupdate",oe),w.removeEventListener("volumechange",de),w.removeEventListener("waiting",te)),M=null,w=null,N=null,c=null}function O(e=null){return parseFloat((L(e)-H()).toFixed(5))}function L(e){const t=e||N;return t.start+t.duration}function U(e=!1){N&&w&&w.getElement()?(e&&c&&B(H()),w.play()):I=!0}function x(){N&&w&&w.pause()}function F(e,t=!1,n=!1,r=!1){N&&w&&w.getElement()&&e!==(isNaN(R)?w.getTime():R)&&(l=!0===n,l||(R=e),T.info("Requesting seek to time: "+e+(l?" (internal)":"")),c&&r&&B(e),w.setCurrentTime(e,t))}function k(){if(!N||!w||!c)return;const e=C&&C.hasVideoTrack()?g.default.VIDEO:g.default.AUDIO,t=i.getCurrentDVRInfo(e);return t&&t.range?t.range.end:0}function B(e){const t=new Date(D.getClientReferenceTime()),r=n.getRegularPeriods()[0],i=D.calcPresentationTimeFromWallTime(t,r);E=i-e}function H(){return N&&w?w.getTime():null}function G(){return N&&w?w.isPaused():null}function Y(){return N&&w?w.isSeeking():null}function V(){return N&&w?w.isStalled():null}function q(){return N&&w?w.getPlaybackRate():null}function K(){return N&&w?w.getEnded():null}function j(){return c}function W(e=null){if(G()||!c||0===w.getReadyState()||Y()||_)return;e||(e=C.hasVideoTrack()?g.default.VIDEO:g.default.AUDIO);const t=H(),n=function(e,t){const n=i.getCurrentDVRInfo(t),r=n?n.range:null;let a;return r?(a=e>r.end?Math.max(r.end-E,r.start):e>0&&e+.25<r.start&&Math.abs(e-r.start)<31536e4?y?Math.max(r.end-E,r.start):r.start:e,a):NaN}(t,e);!isNaN(n)&&n!==t&&!Y()&&(V()||A||1===w.getReadyState())&&(T.debug(`UpdateCurrentTime: Seek to actual time: ${n} from currentTime: ${t}`),F(n,!1,!1))}function z(){null===M&&(M=setInterval(()=>{!function(){if(t.trigger(h.default.WALLCLOCK_TIME_UPDATED,{isDynamic:c,time:new Date}),j()){const e=Date.now();(isNaN(m)||e>m+v.get().streaming.liveUpdateTimeThresholdInMilliseconds)&&(C.addDVRMetric(),G()?function(){const e=Date.now();(!f||e>f+500)&&(f=e,oe())}():W(),m=e)}}()},v.get().streaming.wallclockTimeUpdateInterval))}function $(){clearInterval(M),M=null}function Q(e){const t=e.currentRepresentation,n=t?t.mediaInfo.streamInfo:null;null!==n&&N.id===n.id&&(N=n)}function X(){t.trigger(h.default.CAN_PLAY)}function Z(){t.trigger(h.default.CAN_PLAY_THROUGH)}function J(e){e.streamId===C.getActiveStreamInfo().id&&(A=e.state===o.BUFFER_EMPTY,v.get().streaming.buffer.setStallState&&w.setStallState(e.mediaType,e.state===o.BUFFER_EMPTY))}function ee(){T.info("Native video element event: play"),W(),z(),t.trigger(h.default.PLAYBACK_STARTED,{startTime:H()})}function te(){T.info("Native video element event: waiting"),t.trigger(h.default.PLAYBACK_WAITING,{playingTime:H()})}function ne(){T.info("Native video element event: playing"),l=!1,t.trigger(h.default.PLAYBACK_PLAYING,{playingTime:H()})}function re(){T.info("Native video element event: pause"),t.trigger(h.default.PLAYBACK_PAUSED,{ended:K()})}function ie(){if(l)return;let e=H();isNaN(R)||R===e||(e=R),R=NaN,T.info("Seeking to: "+e),z(),t.trigger(h.default.PLAYBACK_SEEKING,{seekTime:e,streamId:N.id})}function ae(){T.info("Native video element event: seeked"),l=!1,t.trigger(h.default.PLAYBACK_SEEKED,{streamId:N.id})}function oe(){N&&t.trigger(h.default.PLAYBACK_TIME_UPDATED,{timeToEnd:O(),time:H(),streamId:N.id})}function se(){t.trigger(h.default.PLAYBACK_PROGRESS,{streamId:N.id})}function ue(){const e=q();T.info("Native video element event: ratechange: ",e),t.trigger(h.default.PLAYBACK_RATE_CHANGED,{playbackRate:e})}function le(){T.info("Native video element event: loadedmetadata"),t.trigger(h.default.PLAYBACK_METADATA_LOADED),z()}function ce(){T.info("Native video element event: loadeddata"),t.trigger(h.default.PLAYBACK_LOADED_DATA)}function fe(){T.info("Native video element event: ended"),x(),$();const e=C?C.getActiveStreamInfo():null;e&&t.trigger(h.default.PLAYBACK_ENDED,{isLast:e.isLast})}function de(){t.trigger(h.default.PLAYBACK_VOLUME_CHANGED)}function he(e){if(M&&e.isLast){T.info("onPlaybackEnded -- PLAYBACK_ENDED but native video element didn't fire ended");const t=e.seekTime?e.seekTime:L();w.setCurrentTime(t),x(),$()}}function ge(e){const n=e.target||e.srcElement;t.trigger(h.default.PLAYBACK_ERROR,{error:n.error})}function pe(){c=!1}function me(e){t.trigger(h.default.PLAYBACK_STALLED,{e})}function Ee(e){var t;(t=e.mediaInfo)&&t.supplementalProperties&&t.supplementalProperties.find(e=>e.schemeIdUri===g.default.SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME)&&(T.debug("Low Latency critical SupplementalProperty set: Enabling low Latency"),y=!0)}function Te(e){const t=C.getActiveStreamInfo();e&&t&&e.currentRepresentation&&e.streamId&&e.streamId===t.id&&e.mediaType&&(e.mediaType===g.default.VIDEO||e.mediaType===g.default.AUDIO)&&(y=!1===e.currentRepresentation.availabilityTimeComplete||e.currentRepresentation.k>
21,y&&!a&&(a=!0))}function ye(){_=!0}function _e(){_=!1}return s={computeAndSetLiveDelay:function(e,t){let i,a,o;const s=!isNaN(e)&&isFinite(e)?e:NaN;let u=n.getSuggestedPresentationDelay();const l=b.getServiceDescriptionSettings();return i=isNaN(v.get().streaming.delay.liveDelay)?null===v.get().streaming.delay.liveDelayFragmentCount||isNaN(v.get().streaming.delay.liveDelayFragmentCount)||isNaN(s)?l&&!isNaN(l.liveDelay)&&l.liveDelay>0?l.liveDelay:!0===v.get().streaming.delay.useSuggestedPresentationDelay&&null!==u&&!isNaN(u)&&u>0?u:isNaN(s)?t&&!isNaN(t.minBufferTime)?4*t.minBufferTime:4*N.manifestInfo.minBufferTime:4*s:s*v.get().streaming.delay.liveDelayFragmentCount:v.get().streaming.delay.liveDelay,o=n.getAvailabilityStartTime(),null!==o&&(r=o),a=t&&t.dvrWindowSize>0?Math.min(i,t.dvrWindowSize):i,E=a,S=a,a},getAvailabilityStartTime:function(){return r},getBufferLevel:function(e=null){let t=null;return C.getActiveStreamProcessors().forEach(n=>{if(!e||0===e.length||-1===e.indexOf(n.getType())){const e=n.getBufferLevel();t=null===t?e:Math.min(t,e)}}),t},getCurrentLiveLatency:function(){if(!c||isNaN(r))return NaN;let e=H();if(isNaN(e)||0===e)return 0;const t=(new Date).getTime()+1e3*D.getClientTimeOffset();return Math.max(((t-r-1e3*e)/1e3).toFixed(3),0)},getEnded:K,getInitialCatchupModeActivated:function(){return a},getIsDynamic:j,getIsManifestUpdateInProgress:function(){return _},getLiveDelay:function(){return E},getLowLatencyModeEnabled:function(){return y},getOriginalLiveDelay:function(){return S},getPlaybackRate:q,getPlaybackStalled:function(){return A},getPlayedRanges:function(){return N&&w?w.getPlayedRanges():null},getStreamController:function(){return C},getStreamEndTime:L,getTime:H,getTimeToStreamEnd:O,initialize:function(e,n){N=e,!0!==n&&(w.addEventListener("canplay",X),w.addEventListener("canplaythrough",Z),w.addEventListener("ended",fe),w.addEventListener("error",ge),w.addEventListener("loadeddata",ce),w.addEventListener("loadedmetadata",le),w.addEventListener("pause",re),w.addEventListener("play",ee),w.addEventListener("playing",ne),w.addEventListener("progress",se),w.addEventListener("ratechange",ue),w.addEventListener("seeked",ae),w.addEventListener("seeking",ie),w.addEventListener("stalled",me),w.addEventListener("timeupdate",oe),w.addEventListener("volumechange",de),w.addEventListener("waiting",te),c=N.manifestInfo.isDynamic,A=!1,l=!1,t.on(h.default.DATA_UPDATE_COMPLETED,Q,s),t.on(h.default.MANIFEST_UPDATED,ye,s),t.on(h.default.STREAMS_COMPOSED,_e,s),t.on(p.default.PLAYBACK_ENDED,he,s,{priority:d.default.EVENT_PRIORITY_HIGH}),t.on(p.default.STREAM_INITIALIZING,Ee,s),t.on(p.default.REPRESENTATION_SWITCH,Te,s),t.on(p.default.BUFFER_LEVEL_STATE_CHANGED,J,s),t.on(p.default.DYNAMIC_TO_STATIC,pe,s),I&&(I=!1,U()))},isPaused:G,isProgressing:function(e=500){return new Promise(n=>{let r=-1,i=null;const a=e=>{clearTimeout(i),i=null,t.off(p.default.PLAYBACK_TIME_UPDATED,o,s),n(e)},o=e=>{r<0?r=e.time:e.time>r+.1&&a(!0)};i=setTimeout(()=>{a(!1)},e),t.on(p.default.PLAYBACK_TIME_UPDATED,o,s)})},isSeeking:Y,isStalled:V,pause:x,play:U,reset:P,seek:F,seekToCurrentLive:function(e=!1,t=!1,n=!1){const r=k();0!==r&&F(r-E,e,t,n)},seekToOriginalLive:function(e=!1,t=!1,n=!1){const r=k();0!==r&&(E=S,F(r-E,e,t,n))},setConfig:function(e){e&&(e.streamController&&(C=e.streamController),e.serviceDescriptionController&&(b=e.serviceDescriptionController),e.dashMetrics&&(i=e.dashMetrics),e.adapter&&(n=e.adapter),e.videoModel&&(w=e.videoModel),e.timelineConverter&&(D=e.timelineConverter),e.settings&&(v=e.settings))},updateCurrentTime:W},T=(0,u.default)(e).getInstance().getLogger(s),P(),s}ar.__dashjs_factory_name="PlaybackController";var or=r.default.getSingletonFactory(ar),sr=n(1721),ur=class{constructor(){this.availabilityEndTime=NaN,this.availabilityStartTime=NaN,this.duration=NaN,this.index=null,this.indexRange=null,this.isPartialSegment=!1,this.media=null,this.mediaRange=null,this.mediaUrl=null,this.mediaStartTime=NaN,this.presentationStartTime=NaN,this.replacementNumber=NaN,this.replacementTime=null,this.representation=null,this.wallStartTime=NaN}assignAttributes(e){for(let t in e)e.hasOwnProperty(t)&&this.hasOwnProperty(t)&&(this[t]=e[t])}},lr=class extends ur{constructor(){super()}};function cr(){const e=this.context;let t,n,r,i,a,o,s,u,l,c,f,d;function h(e,t,r,a){let o=null;const u=e?d.resolve(e.path):null,l=a||{init:!0,url:u?u.url:void 0,range:{start:0,end:1500},searching:!1,bytesLoaded:0,bytesToLoad:1500,mediaType:t,representation:e};n.debug("Start searching for initialization.");const c=m(l);s.load({request:c,success:function(n){if(l.bytesLoaded=l.range.end,o=i.findInitRange(n),!o)return l.range.end=l.bytesLoaded+l.bytesToLoad,h(e,t,r,l);e.range=o,r(e)},error:function(){r(e)}}),n.debug("Perform init search: "+l.url)}function g(e,t,r,a,o,u){if(r&&(void 0===r.start||void 0===r.end)){const e=r?r.toString().split("-"):null;r=e?{start:parseFloat(e[0]),end:parseFloat(e[1])}:null}o=o||p;let l=null,c=null;const f=!!r,h=e?d.resolve(e.path):null,E={init:!1,url:h?h.url:void 0,range:f?r:{start:0,end:1500},searching:!f,bytesLoaded:u?u.bytesLoaded:0,bytesToLoad:1500,mediaType:t,representation:e},T=m(E);s.load({request:T,success:function(r){const s=E.bytesToLoad,u=r.byteLength;if(E.bytesLoaded=E.range.end-E.range.start,l=i.parse(r),c=l.getBox("sidx"),c&&c.isComplete){const r=c.references;let i,s;if(null!=r&&r.length>0&&(i=1===r[0].reference_type),i){let i,s,u,l,f;n.debug("Initiate multiple SIDX load."),E.range.end=E.range.start+c.size;let d=[],h=0,p=(c.offset||E.range.start)+c.size;const m=function(t){t?(d=d.concat(t),h++,h>=s&&(d.sort(function(e,t){return e.startTime-t.startTime<0?-1:0}),o(d,e,a))):o(null,e,a)};for(i=0,s=r.length;i<s;
2i++)u=p,l=p+r[i].referenced_size-1,p+=r[i].referenced_size,f={start:u,end:l},g(e,t,f,a,m,E)}else n.debug("Parsing segments from SIDX. representation "+t+" - id: "+e.id+" for range : "+E.range.start+" - "+E.range.end),s=function(e,t){const n=e.references,r=n.length,i=e.timescale;let a=e.earliest_presentation_time,o=t.range.start+e.offset+e.first_offset+e.size;const s=[];let u,l,c,f;for(let e=0;e<r;e++)c=n[e].subsegment_duration,f=n[e].referenced_size,u=new lr,u.duration=c,u.startTime=a,u.timescale=i,l=o+f-1,u.mediaRange=o+"-"+l,s.push(u),a+=c,o+=f;return s}(c,E),o(s,e,a)}else{if(c)E.range.start=c.offset||E.range.start,E.range.end=E.range.start+(c.size||s);else{if(u<E.bytesLoaded)return void o(null,e,a);{const e=l.getLastBox();e&&e.size?(E.range.start=e.offset+e.size,E.range.end=E.range.start+s):E.range.end+=s}}g(e,t,E.range,a,null,E)}},error:function(){o(null,e,a)}}),n.debug(`Perform SIDX load for type ${t} : ${E.url} with range ${E.range.start} - ${E.range.end}`)}function p(e,t,n){n({segments:e,representation:t,error:e?void 0:new He.default(u.SEGMENT_BASE_LOADER_ERROR_CODE,u.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}function m(e){if(!e.url)return;const t=new $.default;return t.setInfo(e),t}return t={setConfig:function(e){e.baseURLController&&(d=e.baseURLController),e.dashMetrics&&(a=e.dashMetrics),e.mediaPlayerModel&&(o=e.mediaPlayerModel),e.errHandler&&(r=e.errHandler),e.boxParser&&(i=e.boxParser),e.debug&&(n=e.debug.getLogger(t)),e.errors&&(u=e.errors),e.urlUtils&&(f=e.urlUtils),e.constants&&(l=e.constants),e.dashConstants&&(c=e.dashConstants)},initialize:function(){s=(0,Re.default)(e).create({errHandler:r,dashMetrics:a,mediaPlayerModel:o,boxParser:i,errors:u,urlUtils:f,constants:l,dashConstants:c})},loadInitialization:function(e,t){return new Promise(n=>{h(e,t,n)})},loadSegments:function(e,t,n){return new Promise(r=>{g(e,t,n,r)})},reset:function(){s&&(s.abort(),s=null)}},t}cr.__dashjs_factory_name="SegmentBaseLoader";var fr=r.default.getSingletonFactory(cr);function dr(e){let t;e=e||{};let n=new DataView(e.data),r=0;function i(e,t){let i,a,o=!0,s=0;if(void 0===t&&(t=!1),e.tag>16777215?(n.getUint32(r)!==e.tag&&(o=!1),s=4):e.tag>65535?(i=n.getUint16(r),a=n.getUint8(r+2),256*i+a!==e.tag&&(o=!1),s=3):e.tag>255?(n.getUint16(r)!==e.tag&&(o=!1),s=2):(n.getUint8(r)!==e.tag&&(o=!1),s=1),!o&&e.required&&!t)throw new Error("required tag not found");return o&&(r+=s),o}function a(e){let t=1,i=128,a=-1,o=0,s=n.getUint8(r),u=0;for(u=0;u<8;u+=1){if((s&i)===i){o=void 0===e?s&~i:s,a=u;break}i>>=1}for(u=0;u<a;u+=1,t+=1)o=o<<8|255&n.getUint8(r+t);return r+=t,o}return t={getPos:function(){return r},setPos:function(e){r=e},consumeTag:i,consumeTagAndSize:function(e,t){let n=i(e,t);return n&&a(),n},parseTag:function(e){let n;return i(e),n=a(),t[e.parse](n)},skipOverElement:function(e,t){let n,o=i(e,t);return o&&(n=a(),r+=n),o},getMatroskaCodedNum:a,getMatroskaFloat:function(e){let t;switch(e){case 4:t=n.getFloat32(r),r+=4;break;case 8:t=n.getFloat64(r),r+=8}return t},getMatroskaUint:function(e){if(e>4)return function(e){const t=Math.floor(Number.MAX_SAFE_INTEGER/256);let i=0;for(let a=0;a<e;a+=1){if(i>t)throw new Error("Value exceeds safe integer limit");i*=256;const e=n.getUint8(r+a);if(i>Number.MAX_SAFE_INTEGER-e)throw new Error("Value exceeds safe integer limit");i+=e}return r+=e,i}(e);let t=0;for(let i=0;i<e;i+=1)t<<=8,t|=255&n.getUint8(r+i);return r+=e,t>>>0},moreData:function(){return r<n.byteLength}},t}dr.__dashjs_factory_name="EBMLParser";var hr=r.default.getClassFactory(dr);function gr(){const e=this.context;let t,n,r,i,a,o,s,u,l;function c(e){const t=new $.default;return t.setInfo(e),t}return t={setConfig:function(e){if(!(e.baseURLController&&e.dashMetrics&&e.mediaPlayerModel&&e.errHandler))throw new Error(g.default.MISSING_CONFIG_ERROR);l=e.baseURLController,a=e.dashMetrics,o=e.mediaPlayerModel,i=e.errHandler,u=e.errors,n=e.debug.getLogger(t)},initialize:function(){s=(0,Re.default)(e).create({errHandler:i,dashMetrics:a,mediaPlayerModel:o,errors:u})},loadInitialization:function(e,t){return new Promise(r=>{let i=null,a=e?l.resolve(e.path):null,o=e?e.range.split("-"):null,u={range:{start:o?parseFloat(o[0]):null,end:o?parseFloat(o[1]):null},request:i,url:a?a.url:void 0,init:!0,mediaType:t};n.info("Start loading initialization."),i=c(u),s.load({request:i,success:function(){r(e)},error:function(){r(e)}}),n.debug("Perform init load: "+u.url)})},loadSegments:function(t,i,a){return new Promise(o=>{let f=null,d=t?l.resolve(t.path):null,h=d?d.url:void 0;f=c({bytesLoaded:0,bytesToLoad:8192,range:{start:0,end:8192},request:f,url:h,init:!1,mediaType:i,representation:t}),n.debug("Parsing ebml header"),s.load({request:f,success:function(i){!function(t,i,a,o){if(!t||0===t.byteLength)return void o(null);let u,l,f,d,h=hr(e).create({data:t}),g=a?a.split("-"):null,p=null,m={url:i,range:{start:g?parseFloat(g[0]):null,end:g?parseFloat(g[1]):null},request:p};
2for(n.debug("Parse EBML header: "+m.url),h.skipOverElement(r.EBML),h.consumeTag(r.Segment),f=h.getMatroskaCodedNum(),f+=h.getPos(),d=h.getPos();h.moreData()&&!h.consumeTagAndSize(r.Segment.Info,!0);)if(!(h.skipOverElement(r.Segment.SeekHead,!0)||h.skipOverElement(r.Segment.Tracks,!0)||h.skipOverElement(r.Segment.Cues,!0)||h.skipOverElement(r.Void,!0)))throw new Error("no valid top level element found");for(;void 0===u;){let e=h.getMatroskaCodedNum(!0),t=h.getMatroskaCodedNum();e===r.Segment.Info.Duration.tag?u=h[r.Segment.Info.Duration.parse](t):h.setPos(h.getPos()+t)}p=c(m),s.load({request:p,success:function(t){l=function(t,i,a,o){let s,u,l,c,f,d,h,g;for(u=function(t){let n,i,a=[],o=hr(e).create({data:t});for(o.consumeTagAndSize(r.Segment.Cues);o.moreData()&&o.consumeTagAndSize(r.Segment.Cues.CuePoint,!0);){for(n={},n.CueTime=o.parseTag(r.Segment.Cues.CuePoint.CueTime),n.CueTracks=[];o.moreData()&&o.consumeTag(r.Segment.Cues.CuePoint.CueTrackPositions,!0);){const e=o.getMatroskaCodedNum(),t=o.getPos();if(i={},i.Track=o.parseTag(r.Segment.Cues.CuePoint.CueTrackPositions.CueTrack),0===i.Track)throw new Error("Cue track cannot be 0");i.ClusterPosition=o.parseTag(r.Segment.Cues.CuePoint.CueTrackPositions.CueClusterPosition),n.CueTracks.push(i),o.setPos(t+e)}if(0===n.CueTracks.length)throw new Error("Mandatory cuetrack not found");a.push(n)}if(0===a.length)throw new Error("mandatory cuepoint not found");return a}(t),l=[],f=0,d=u.length;f<d;f+=1)c=new lr,s=0,s=f<u.length-1?u[f+1].CueTime-u[f].CueTime:o-u[f].CueTime,c.duration=s,c.startTime=u[f].CueTime,c.timescale=1e3,h=u[f].CueTracks[0].ClusterPosition+i,g=f<u.length-1?u[f+1].CueTracks[0].ClusterPosition+i-1:a-1,c.mediaRange=h+"-"+g,l.push(c);return n.debug("Parsed cues: "+l.length+" cues."),l}(t,d,f,u),o(l)},error:function(){n.error("Download Error: Cues "+m.url),o(null)}}),n.debug("Perform cues load: "+m.url+" bytes="+m.range.start+"-"+m.range.end)}(i,h,a,function(e){o({segments:e,representation:t,error:e?void 0:new He.default(u.SEGMENT_BASE_LOADER_ERROR_CODE,u.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})})},error:function(){o({representation:t,error:new He.default(u.SEGMENT_BASE_LOADER_ERROR_CODE,u.SEGMENT_BASE_LOADER_ERROR_MESSAGE)})}})})},reset:function(){s&&(s.abort(),s=null)}},r={EBML:{tag:440786851,required:!0},Segment:{tag:408125543,required:!0,SeekHead:{tag:290298740,required:!0},Info:{tag:357149030,required:!0,TimecodeScale:{tag:2807729,required:!0,parse:"getMatroskaUint"},Duration:{tag:17545,required:!0,parse:"getMatroskaFloat"}},Tracks:{tag:374648427,required:!0},Cues:{tag:475249515,required:!0,CuePoint:{tag:187,required:!0,CueTime:{tag:179,required:!0,parse:"getMatroskaUint"},CueTrackPositions:{tag:183,required:!0,CueTrack:{tag:247,required:!0,parse:"getMatroskaUint"},CueClusterPosition:{tag:241,required:!0,parse:"getMatroskaUint"}}}}},Void:{tag:236,required:!0}},t}gr.__dashjs_factory_name="WebmSegmentBaseLoader";var pr=r.default.getSingletonFactory(gr);function mr(e){e=e||{};const t=this.context,n=e.eventBus,r=e.events,i=e.dashMetrics,a=e.mediaPlayerModel,o=e.errHandler,s=e.baseURLController,u=e.debug,l=e.boxParser,c=e.errors;let f,d,h;function g(e){return"webm"===(e?e.split("/")[1]:"").toLowerCase()}return f={initialize:function(){d.initialize(),h.initialize()},getSegmentBaseInitSegment:function(e){return g(e.representation.mimeType)?h.loadInitialization(e.representation,e.mediaType):d.loadInitialization(e.representation,e.mediaType)},getSegmentList:function(e){return g(e.mimeType)?h.loadSegments(e.representation,e.mediaType,e.representation?e.representation.indexRange:null):d.loadSegments(e.representation,e.mediaType,e.representation?e.representation.indexRange:null)},reset:function(){d.reset(),h.reset()}},d=fr(t).getInstance(),h=pr(t).getInstance(),d.setConfig({baseURLController:s,dashMetrics:i,mediaPlayerModel:a,errHandler:o,eventBus:n,events:r,errors:c,debug:u,boxParser:l}),h.setConfig({baseURLController:s,dashMetrics:i,mediaPlayerModel:a,errHandler:o,eventBus:n,events:r,errors:c,debug:u}),f}mr.__dashjs_factory_name="SegmentBaseController";var Er=r.default.getSingletonFactory(mr);const Tr=[g.default.SERVICE_DESCRIPTION_DVB_LL_SCHEME],yr="video",_r="audio";function Sr(){const e=this.context;let t,n,r,i,a;function o(){n={liveDelay:NaN,liveCatchup:{maxDrift:NaN,playbackRate:{min:NaN,max:NaN}},minBitrate:{},maxBitrate:{},initialBitrate:{},contentSteering:null,clientDataReporting:null},r=[]}function s(e,t,r){try{n[e][t]=r/1e3}catch(e){i.error(e)}}return t={applyServiceDescription:function(e){if(!e||!e.serviceDescriptions)return;const t=e.serviceDescriptions.filter(e=>Tr.includes(e.schemeIdUri)),a=e.serviceDescriptions.filter(e=>null==e.schemeIdUri);let o=t.length>0?t[t.length-1]:a[a.length-1];o&&(o.latency&&o.latency.target>0&&function(e){let t;if(e.schemeIdUri,g.default.SERVICE_DESCRIPTION_DVB_LL_SCHEME,t=function(e){return{liveDelay:e.latency.target/1e3,maxDrift:!isNaN(e.latency.max)&&e.latency.max>e.latency.target?(e.latency.max-e.latency.target+500)/1e3:NaN,referenceId:e.latency.referenceId||NaN}}(e),r.length>0){let{to:e,id:a}=function(e){let t,n=0,i=r.filter(t=>t.id===e.referenceId);return 0===i.length?(n=r.length>0?r[0].to:0,t=r[0].id||NaN):(n=i[0].to||0,t=i[0].id||NaN),{to:n,id:t}}(t);n.liveDelay=t.liveDelay-e,n.liveCatchup.maxDrift=t.maxDrift,i.debug(`\n Found latency properties coming from service description. Applied time offset of ${e} from ProducerReferenceTime element with id ${a}.\n Live Delay: ${t.liveDelay-e}, Live catchup max drift: ${t.maxDrift}\n `)}else n.liveDelay=t.liveDelay,n.liveCatchup.maxDrift=t.maxDrift,i.debug(`Found latency properties coming from service description: Live Delay: ${t.liveDelay}, Live catchup max drift: ${t.maxDrift}`)}(o),o.playbackRate&&function(e){const t=e.playbackRate.min?Math.round(1e3*(e.playbackRate.min-1))/1e3:NaN,r=e.playbackRate.max?Math.round(1e3*(e.playbackRate.max-1))/1e3:NaN;n.liveCatchup.playbackRate.min=t,n.liveCatchup.playbackRate.max=r,i.debug(`Found latency properties coming from service description: Live catchup min playback rate: ${t}`),i.debug(`Found latency properties coming from service description: Live catchup max playback rate: ${r}`)}(o),o.operatingQuality,o.operatingBandwidth&&function(e){if(!e||!e.operatingBandwidth||!e.operatingBandwidth.mediaType||"all"===e.operatingBandwidth.mediaType)return;const t={};t.minBandwidth=e.operatingBandwidth.min,t.maxBandwidth=e.operatingBandwidth.max,t.targetBandwidth=e.operatingBandwidth.target;const n=[];e.operatingBandwidth.mediaType===yr||e.operatingBandwidth.mediaType===_r?n.push(e.operatingBandwidth.mediaType):"any"===e.operatingBandwidth.mediaType&&(n.push(_r),n.push(yr)),n.forEac
2h(e=>{isNaN(t.minBandwidth)||s("minBitrate",e,t.minBandwidth),isNaN(t.maxBandwidth)||s("maxBitrate",e,t.maxBandwidth),isNaN(t.targetBandwidth)||s("initialBitrate",e,t.targetBandwidth)})}(o),o.contentSteering&&function(e){n.contentSteering=e.contentSteering}(o),o.clientDataReporting&&function(e){n.clientDataReporting=e.clientDataReporting}(o))},calculateProducerReferenceTimeOffsets:function(e){try{let t=[];if(e&&e.length>0){const n=[g.default.VIDEO,g.default.AUDIO,g.default.TEXT],r=a.getAvailabilityStartTime()/1e3;e.forEach(e=>{const i=n.reduce((t,n)=>t.concat(a.getAllMediaInfoForType(e,n)),[]).reduce((t,n)=>(a.getProducerReferenceTimes(e,n).forEach(i=>{const o=a.getVoRepresentations(n);if(o&&o.length>0&&o[0].adaptation&&o[0].segmentInfoType===Ce.default.SEGMENT_TEMPLATE){const n=o[0],a=new Date(i[Ce.default.WALL_CLOCK_TIME]).getTime()/1e3-(i[Ce.default.PRESENTATION_TIME]/n[Ce.default.TIMESCALE]-n[Ce.default.PRESENTATION_TIME_OFFSET]+e.start),s=r-a;t.push({id:i[Ce.default.ID],to:s})}}),t),[]);t=t.concat(i)})}r=t}catch(e){i.error(e),r=[]}},getProducerReferenceTimeOffsets:function(){return r},getServiceDescriptionSettings:function(){return n},reset:function(){o()},setConfig:function(e){e&&e.adapter&&(a=e.adapter)}},i=(0,u.default)(e).getInstance().getLogger(t),o(),t}Sr.__dashjs_factory_name="ServiceDescriptionController";var Ir=r.default.getSingletonFactory(Sr);class Ar{constructor(e){this._ranges=[];for(const t of e){const e=this._ranges,n={start:t.start,end:t.end},r=e.length?e[e.length-1]:null;!r||n.start>r.end?e.push(n):r.end=n.end}}get length(){return this._ranges.length}start(e){return this._ranges[e].start}end(e){return this._ranges[e].end}}var Rr=class{constructor(e,t){this.eventBus=t,this.mimeType=e,this.updating=!1,this.chunks=[],this.appendWindowStart=0,this.appendWindowEnd=1/0,this.timestampOffset=0,this.mode="segments"}appendBuffer(e,t,n){if(this.updating)throw new Error("SourceBuffer is currently updating");this.updating=!0,this.eventBus.trigger("externalSourceBufferUpdateStart",{mimeType:this.mimeType,request:"appendBuffer",data:e,start:t,end:n}),Number.isNaN(t)||(this.chunks.push({data:e,start:t,end:n}),this.chunks.sort((e,t)=>e.start-t.start)),setTimeout(()=>{this.updating=!1,this.eventBus.trigger("externalSourceBufferUpdating",{mimeType:this.mimeType}),this.eventBus.trigger("externalSourceBufferUpdateEnd",{mimeType:this.mimeType})},10)}abort(){this.updating&&(this.updating=!1,this.eventBus.trigger("externalSourceBufferAbort",{mimeType:this.mimeType}),this.eventBus.trigger("externalSourceBufferUpdateEnd",{mimeType:this.mimeType}))}remove(e,t){if(this.updating)throw new Error("SourceBuffer is currently updating");this.updating=!0,this.eventBus.trigger("externalSourceBufferUpdateStart",{mimeType:this.mimeType,request:"remove",start:e,end:t}),this.chunks=this.chunks.filter(n=>n.end<=e||n.start>=t),setTimeout(()=>{this.updating=!1,this.eventBus.trigger("externalSourceBufferUpdating",{mimeType:this.mimeType}),this.eventBus.trigger("externalSourceBufferUpdateEnd",{mimeType:this.mimeType})},10)}get buffered(){return new Ar(this.chunks)}},br=class{constructor(e){this.eventBus=e,this.reset()}get duration(){return this._duration}set duration(e){if("open"!==this._readyState)throw new Error("ExternalMediaSource is not open");this._duration=e}get readyState(){return this._readyState}addSourceBuffer(e){if("open"!==this._readyState)throw new Error("ExternalMediaSource is not open");const t=new Rr(e,this.eventBus);return this.sourceBuffers.set(t,e),t}removeSourceBuffer(e){if(!this.sourceBuffers.has(e))throw new Error("ExternalSourceBuffer not found");this.sourceBuffers.delete(e)}open(){this._readyState="open",this.eventBus.trigger("externalMediaSourceOpen",{})}endOfStream(){if("open"!==this._readyState)throw new Error("ExternalMediaSource is not open");this._readyState="ended",this.eventBus.trigger("externalMediaSourceEnded",{})}close(){this._readyState="closed",this.eventBus.trigger("externalMediaSourceClosed",{})}reset(){this.sourceBuffers=new Map,this._duration=NaN,this._readyState="closed"}},vr=class{constructor(){this.streamId=null,this.segmentType=null,this.index=NaN,this.bytes=null,this.start=NaN,this.end=NaN,this.duration=NaN,this.representation=null,this.endFragment=null}};class Cr extends $.default{constructor(e){super(e),this.checkForExistenceOnly=!0}}var Nr=Cr;function Dr(e){e=e||{};const t=this.context,n=e.eventBus,r=e.events,i=e.urlUtils,a=e.errors,o=e.streamId;let s,u;return s={abort:function(){u&&u.abort()},checkForExistence:function(e){const t=function(t){n.trigger(r.CHECK_FOR_EXISTENCE_COMPLETED,{request:e,exists:t})};if(e){let n=new Nr(e.url);u.load({request:n,success:function(){t(!0)},error:function(){t(!1)}})}else t(!1)},load:function(e){const t=function(t,i){n.trigger(r.LOADING_COMPLETED,{request:e,response:t||null,error:i||null,sender:s})};e?u.load({request:e,progress:function(t){n.trigger(r.LOADING_PROGRESS,{request:e,stream:t.stream,streamId:o}),t.data&&n.trigger(r.LOADING_DATA_PROGRESS,{request:e,response:t.data||null,error:null,sender:s})},success:function(e){t(e)},error:function(e,n,r){t(void 0,new He.default(a.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE,r,n))},abort:function(e){e&&n.trigger(r.LOADING_ABANDONED,{mediaType:e.mediaType,request:e,sender:s})}}):t(void 0,new He.default(a.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE,a.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE))},reset:function(){u&&(u.abort(),u.reset(),u=null)},resetInitialSettings:function(){u&&u.resetInitialSettings()}},u=(0,Re.default)(t).create({errHandler:e.errHandler,errors:a,dashMetrics:e.dashMetrics,mediaPlayerModel:e.mediaPlayerModel,urlUtils:i,constants:g.default,boxParser:e.boxParser,dashConstants:e.dashConstants}),s}Dr.__dashjs_factory_name="FragmentLoader";var wr=r.default.getClassFactory(Dr);function Mr(e){e=e||{};const t=this.context,n=(0,d.default)(t).getInstance(),r=e.errHandler,i=e.mediaPlayerModel,a=e.dashMetrics,o=(0,u.default)(t).getInstance(),s=e.streamInfo;let l,c,f;function m(){return s.id}function E(){for(let e in f)f[e].reset();f={}}function T(e){if(!e.sender)return;const t=e.request,r=e.response,i=t.isInitializationRequest(),a=t.representation.mediaInfo.streamInfo;if(e.error&&(t.mediaType===g.default.AUDIO||t.mediaType===g.default.VIDEO||t.mediaType===g.default.TEXT&&t.representation.mediaInfo.isFragmented)&&n.trigger(h.default.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD,{entry:e.request.serviceLocation}),!r||!a)return void c.warn("No "+t.mediaType+" bytes to push or stream is inactive.");const o=function(e,t,n,r){const i=new vr;return i.streamId=n,i.segmentType=t.type,i.start=t.startTime,i.duration=t.duration,i.end=i.start+i.duration,i.bytes=e,i.index=t.index,i.representation=t.representation,i.endFragment=r,i}(r,t,s.id,e.type!==h.default.FRAGMENT_LOADING_PROGRESS);n.trigger(i?h.default.INIT_FRAGMENT_LOADED:h.default.MEDIA_FRAGMENT_LOADED,{chunk:o,request:t},{streamId:a.id,mediaType:t.mediaType})}return l={getStreamId:m,getModel:function(u){let l=f[u];return l||(l=te(t).create({streamInfo:s,type:u,dashMetrics:a,fragmentLoader:wr(t).create({dashMetrics:a,mediaPlayerModel:i,errHandler:r,settings:e.settings,boxParser:e.boxParser,eventBus:n,events:h.default,errors:Ae.default,dashConstants:e.dashConstants,urlUtils:e.urlUtils,streamId:m()}),debug:o,eventBus:n,events:h.default}),f[u]=l),l},reset:function(){n.off(p.default.FRAGMENT_LOADING_COMPLETED,T,this),n.off(p.default.FRAGMENT_LOADING_PROGRESS,T,this),E()}},c=o.getLogger(l),E(),n.on(p.default.FRAGMENT_LOADING_COMPLETED,T,l),n.on(p.default.FRAGMENT_LOADING_PROGRESS,T,l),l}Mr.__dashjs_factory_name="FragmentController";var Pr=r.default.getClassFactory(Mr),Or=class{constructor(e){this.newMediaInfo=e.newMediaInfo,this.previouslySelectedRepresentation=e.previouslySelectedRepresentation,this.newRepresentation=e.newRepresentation}};function Lr(e){const t=this.context,n=(0,l.default)(t).getInstance(),r=e.textController,i=e.eventBus;let a,o,s,c,f,d,p=[],m=[],E=!1,T=e.mediaSource,y=null;function _(e){return e.mimeType+';codecs="'+e.codecs+'"'}function S(e){return c=r.getTextSourceBuffer(e),Promise.resolve()}function I(){if("function"==typeof c.addEventListener)try{c.addEventListener("updateend",D,!1),c.addEventListener("error",w,!1),c.addEventListener("abort",w,!1)}catch(e){d=setInterval(D,50)}else d=setInterval(D,50)}function A(){try{"function"==typeof c.removeEventListener&&(c.removeEventListener("updateend",D,!1),c.removeEventListener("error",w,!1),c.removeEventListener("abort",w,!1)),clearInterval(d)}catch(e){s.error(e)}}function b(e){return new Promise(t=>{c&&n.get().streaming.buffer.useAppendWindow?M(()=>{try{if(!c)return void t();let n=T.duration,r=0;e&&!isNaN(e.start)&&!isNaN(e.duration)&&isFinite(e.duration)&&(n=e.start+e.duration),e&&!isNaN(e.start)&&(r=e.start),c.appendWindowEnd===n&&c.appendWindowStart===r||(c.appendWindowStart=0,c.appendWindowEnd=n+.01,c.appendWindowStart=Math.max(r-.1,0),s.debug(`Upd
2ated append window for ${f.type}. Set start to ${c.appendWindowStart} and end to ${c.appendWindowEnd}`)),t()}catch(e){s.warn("Failed to set append window"),t()}}):t()})}function v(e){return new Promise(t=>{c?M(()=>{try{c.timestampOffset===e||isNaN(e)||(c.timestampOffset=e,s.debug(`Set MSE timestamp offset to ${e}`)),t()}catch(e){t()}}):t()})}function C(){if(!E&&m.length>0){E=!0;const e=m[0];m.splice(0,1);const t=function(){E=!1,m.length>0&&C.call(this),e&&e.data&&e.data.segmentType&&e.data.segmentType!==R.HTTPRequest.INIT_SEGMENT_TYPE&&delete e.data.bytes,e.promise.resolve({chunk:e.data})};try{if(y=e.request,0===e.data.bytes.byteLength)t.call(this);else{try{s.debug(`Appending ${e.data.segmentType} from period ${e.data.streamId} to buffer. Request URL: ${e.request.url}, Representation: ID: ${e.data.representation.id}, bitrate: ${e.data.representation.bitrateInKbit}`)}catch(e){}c instanceof Rr?c.appendBuffer(e.data.bytes,e.data.start,e.data.end):c.appendBuffer?c.appendBuffer(e.data.bytes):c.append(e.data.bytes,e.data),M(t.bind(this))}}catch(t){s.fatal('SourceBuffer append failed "'+t+'"'),m.length>0?C():E=!1,delete e.data.bytes,e.promise.reject({chunk:e.data,error:new He.default(t.code,t.message)})}}}function N(){p.length>0&&!c.updating&&(p.shift()(),N())}function D(){c&&!c.updating&&N()}function w(e){const t=e.target||{};!function(e,t){let n=t||{};i.trigger(e,n,{streamId:f.streamInfo.id,mediaType:o})}(h.default.SOURCE_BUFFER_ERROR,{error:t,lastRequestAppended:y})}function M(e){try{p.push(e),c&&!c.updating&&N()}catch(e){s.error(e)}}return a={abort:function(){return new Promise(e=>{try{m=[],"open"===T.readyState?M(()=>{try{c&&c.abort(),e()}catch(t){e()}}):c&&c.setTextTrack&&"ended"===T.readyState?(c.abort(),e()):e()}catch(t){e()}})},abortBeforeAppend:function(){return new Promise(e=>{M(()=>{const t=c.appendWindowStart,n=c.appendWindowEnd;c&&(c.abort(),c.appendWindowStart=t,c.appendWindowEnd=n),e()})})},append:function(e,t=null){return new Promise((n,r)=>{e?(m.push({data:e,promise:{resolve:n,reject:r},request:t}),M(C.bind(this))):r({chunk:e,error:new He.default(Ae.default.APPEND_ERROR_CODE,Ae.default.APPEND_ERROR_MESSAGE)})})},changeType:function(e){const t=_(e);return new Promise((e,r)=>{M(()=>{if(c&&c.changeType)try{s.debug(`Changing SourceBuffer codec to ${t}`),c.changeType(t),e()}catch(e){!function(e){s.error(e),"string"==typeof e?.name&&"NotSupportedError"===e.name&&n.update({streaming:{buffer:{useChangeType:!1,resetSourceBuffersForTrackSwitch:!0}}})}(e),r()}else e()})})},getAllBufferRanges:function(){try{return c?.buffered}catch(e){return s.error("getAllBufferRanges exception: "+e.message),null}},getBuffer:function(){return c},getType:function(){return o},initializeForFirstUse:function(e,t){f=e;const n=e.streamInfo;o=f.type;const r=t?_(t):e.codec;try{if(r.match(/application\/mp4;\s*codecs="(stpp|wvtt).*"/i))return S(n);c=T.addSourceBuffer(r),I();const e=[];return e.push(b(f.streamInfo)),t&&void 0!==t.mseTimeOffset&&e.push(v(t.mseTimeOffset)),Promise.all(e)}catch(e){return f.type==g.default.TEXT&&!f.isFragmented||-1!==r.indexOf('codecs="stpp')||-1!==r.indexOf('codecs="vtt')||-1!==r.indexOf("text/vtt")?S(n):Promise.reject(e)}},initializeForStreamSwitch:function(e,t,n){f=e,o=f.type,function(e){c=e.getBuffer()}(n),I()},remove:function(e){return new Promise((t,n)=>{const r=e.start,i=e.end;r>=0&&i>r?M(function(){try{c.remove(r,i),M(function(){t({from:r,to:i,unintended:!1}),e.resolve&&e.resolve()})}catch(t){n({from:r,to:i,unintended:!1,error:new He.default(Ae.default.REMOVE_ERROR_CODE,Ae.default.REMOVE_ERROR_MESSAGE)}),e.reject&&e.reject(t)}}):t()})},removeEventListeners:A,reset:function(){if(c){try{p=[],A(),E=!1,m=[],c.getClassName&&"TextSourceBuffer"===c.getClassName()||(s.debug("Removing sourcebuffer from media source"),T.removeSourceBuffer(c))}catch(e){}c=null}y=null},updateAppendWindow:b,updateTimestampOffset:v},s=(0,u.default)(t).getInstance().getLogger(a),a}Lr.__dashjs_factory_name="SourceBufferSink";var Ur=r.default.getClassFactory(Lr);function xr(e){const t=this.context;let n,r,i,a=[],o=[],s=e;return n={getAllBufferRanges:function(){let e=[];for(let t=0;t<o.length;t++){let n=o[t];0===e.length||n.start>e[e.length-1].end?e.push({start:n.start,end:n.end}):e[e.length-1].end=n.end}const t={start:function(t){return e[t].start},end:function(t){return e[t].end}};return Object.defineProperty(t,"length",{get:function(){return e.length}}),t},append:function(e){return"InitializationSegment"!==e.segmentType?(o.push(e),o.sort(function(e,t){return e.start-t.start}),i=null):(a.includes(e)||a.push(e),i=e),r.debug("PreBufferSink a
2ppended chunk s: "+e.start+"; e: "+e.end),s&&s({chunk:e}),Promise.resolve()},remove:function(e,t){return o=o.filter(n=>!((isNaN(t)||n.start<t)&&(isNaN(e)||n.end>e))),Promise.resolve()},abort:function(){return Promise.resolve()},discharge:function(){const e=o;let t=null;for(let n=0;n<e.length;n++)t&&e[n].representation.id==t.representation.id||(t=a.find(t=>t.representation.id===e[n].representation.id),t&&(e.splice(n,0,t),n++));return i&&(e.push(i),i=null),o=[],a=[],e},reset:function(){o=[],a=[],i=null,s=null},updateTimestampOffset:function(){return Promise.resolve()},waitForUpdateEnd:function(e){e()},getBuffer:function(){return this}},r=(0,u.default)(t).getInstance().getLogger(n),n}xr.__dashjs_factory_name="PreBufferSink";var Fr=r.default.getClassFactory(xr);const kr=.01,Br="BufferController";function Hr(e){const t=(e=e||{}).capabilities,n=this.context,r=(0,d.default)(n).getInstance(),i=e.fragmentModel,a=e.playbackController,s=e.representationController,l=e.settings,c=e.streamInfo,f=e.textController,m=e.type;let E,T,y,_,S,I,A,b,v,C,N,D,w,M,P,O,L,U,x,F,k;function B(e,t=null){return new Promise((n,r)=>{I=e,v&&t&&"function"==typeof v.discharge?(C=v,H(t).then(()=>{n()}).catch(e=>{r(e)})):n()})}function H(e,t=new Map,i){return new Promise((a,o)=>{U&&e?I?(N=!1,function(e,t,i){return new Promise(a=>{v=Ur(n).create({mediaSource:I,textController:f,eventBus:r}),function(e,t,n){const r=s.getCurrentRepresentation();let i=null;return m!==g.default.VIDEO&&m!==g.default.AUDIO||(i=t.get(m)),i?function(e,t,n,r){v.initializeForStreamSwitch(e,t,n);const i=[];return i.push(v.abortBeforeAppend()),i.push(fe()),i.push(W(t,r)),t&&void 0!==t.mseTimeOffset&&i.push(ce(t)),Promise.allSettled(i)}(e,r,i,n):function(e,t){return v.initializeForFirstUse(e,t)}(e,r)}(e,t,i).then(()=>ce(s.getCurrentRepresentation())).then(()=>{a(v)}).catch(e=>{T.warn("Caught error on create SourceBuffer: "+e),a(v)})})}(e,t,i).then(e=>{a(e)}).catch(e=>{o(e)})):(N=!0,function(){return new Promise((e,t)=>{v=Fr(n).create(K.bind(this)),ce(s.getCurrentRepresentation()).then(()=>{e(v)}).catch(()=>{t()})})}().then(e=>{a(e)}).catch(e=>{o(e)})):a(null)})}function G(e){l.get().streaming.cacheInitSegments&&(T.info("Init fragment finished loading saving to",m+"'s init cache"),U.save(e.chunk)),T.debug(`Appending init fragment for type ${m}, representationId ${e.chunk.representation.id} and bandwidth ${e.chunk.representation.bandwidth}`),V(e.chunk)}function Y(e){V(e.chunk,e.request)}function V(e,t=null){v&&(v.append(e,t).then(e=>{K(e)}).catch(e=>{K(e)}),e.representation.mediaInfo.type===g.default.VIDEO&&Te(h.default.VIDEO_CHUNK_RECEIVED,{chunk:e}))}function q(e){if(e&&e.length>0)for(let t=0,n=e.length;t<n;t++)T.debug("Buffered range: "+e.start(t)+" - "+e.end(t)+", currentTime = ",a.getTime())}function K(e){if(e.error)return void function(e){22===e.error.code&&function(){if(L=!0,S=.8*pe(),T.warn("Quota exceeded, Critical Buffer: "+S),S>0){const e=Math.max(.2*S,1),t=S-e,n=Math.min(l.get().streaming.buffer.bufferTimeAtTopQuality,.9*t),r=Math.min(l.get().streaming.buffer.bufferTimeAtTopQualityLongForm,.9*t),i={streaming:{buffer:{bufferToKeep:parseFloat(e.toFixed(5)),bufferTimeAtTopQuality:parseFloat(n.toFixed(5)),bufferTimeAtTopQualityLongForm:parseFloat(r.toFixed(5))}}};l.update(i)}}(),22!==e.error.code&&Ee()||(T.warn("Clearing playback buffer to overcome quota exceed situation"),Te(h.default.QUOTA_EXCEEDED,{criticalBufferLevel:S,quotaExceededTime:e.chunk.start}),se(oe()))}(e);if(!v)return;if(ee(),L=!1,M=e.chunk,!M||!M.endFragment)return;M&&!isNaN(M.index)&&(A=Math.max(M.index,A),ne());const t=v.getAllBufferRanges();M.segmentType===R.HTTPRequest.MEDIA_SEGMENT_TYPE&&(q(t),Q(),function(){if(isNaN(k)||N)return;if(m!==g.default.AUDIO&&m!==g.default.VIDEO)return void(k=NaN);const e=a.getTime(),t=J(e,0),n=J(k,0);if(t&&n&&t.start===n.start)return void(k=NaN);const r=s.getCurrentRepresentation().segmentDuration,i=J(k,r);i&&(l.get().streaming.buffer.enableSeekDecorrelationFix&&Math.abs(e-k)>r?k<=i.end&&a.seek(Math.max(k,i.start),!1,!0):e<i.start&&a.seek(i.start,!1,!0))}());let n=!1;D&&(D.indexOf(M)>0&&(n=!0),D=null),M&&!n&&Te(h.default.BYTES_APPENDED_END_FRAGMENT,{startTime:M.start,index:M.index,bufferedRanges:t,segmentType:M.segmentType,mediaType:m,representationId:M.representation.id})}function j(e,t){const n=[];return n.push(ce(e)),n.push(v?v.abort():Promise.resolve()),n.push(W(e,t)),Promise.allSettled(n)}function W(e,n){if(!e||!n)return T.warn("BufferController._changeCodec() is missing the information about the Representations. Doing nothing"),Promise.resolve();if(e&&n&&e.mimeType===n.mimeType&&e.codecFamily===n.codecFamily)return T.debug(`Switching to new codec ${e.codecs} without changeType as previous codec ${n.codecs} is compatible.`),Promise.resolve();
2if(!l.get().streaming.buffer.useChangeType||!t.supportsChangeType())return T.debug("changeType() not available"),Promise.resolve();T.debug(`Using changeType() to switch from codec ${n.codecs} to ${e.codecs}`);const r=e.dependentRepresentation?e.dependentRepresentation:e;return v.changeType(r)}function z(){return new Promise((e,t)=>{let n=$();if(!n||0===n.length)return Q(),void e();se(n).then(()=>{e()}).catch(e=>{t(e)})})}function $(e){const t=[],n=v.getAllBufferRanges();if(!n||0===n.length)return t;if(!e&&0!==e||isNaN(e))t.push({start:n.start(0),end:n.end(n.length-1)+.5});else{const r=function(e,t){const n=l.get().streaming.buffer.bufferToKeep,r=t.start(0);if(e-r>n){let t=Math.max(0,e-n);const a=i.getRequests({state:te.FRAGMENT_MODEL_EXECUTED,time:e,threshold:kr})[0];if(a&&(t=Math.min(a.startTime,t)),t>0)return{start:r,end:t}}return null}(e,n),a=function(e,t){const n=t.end(t.length-1)+.5,r=me(e),a=c.manifestInfo.duration>=l.get().streaming.buffer.longFormContentDurationThreshold?l.get().streaming.buffer.bufferTimeAtTopQualityLongForm:l.get().streaming.buffer.bufferTimeAtTopQuality;let o=isNaN(r)?e:Math.min(r,e+a);if(o>=t.end(t.length-1))return null;const s=i.getRequests({state:te.FRAGMENT_MODEL_EXECUTED,time:e,threshold:kr})[0];if(s&&(o=Math.max(s.startTime+s.duration,o)),l.get().streaming.buffer.avoidCurrentTimeRangePruning)for(let r=0;r<t.length;r++)if(t.start(r)<=e&&e<=t.end(r)&&t.start(r)<=o&&o<=t.end(r)){let i=o;o=r+1<t.length?t.start(r+1):t.end(r)+1,T.debug("Buffered range ["+t.start(r)+", "+t.end(r)+"] overlaps with targetTime "+e+" and range to be pruned ["+i+", "+n+"], using ["+o+", "+n+"] instead"+(o<n?"":" (no actual pruning)"));break}return o<t.end(t.length-1)?{start:o,end:n}:null}(e,n);r&&t.push(r),a&&t.push(a)}return t}function Q(){F||m===g.default.TEXT&&!f.isTextEnabled()||ee()}function X(){re()}function Z(){re(),k=NaN}function J(e,t){if(!v)return null;const n=v.getAllBufferRanges();let r,i,a=0,o=0,s=null,u=null,l=0;const c=isNaN(t)?.15:t;if(null!=n){for(i=0,r=n.length;i<r;i++)if(a=n.start(i),o=n.end(i),null===s)l=Math.abs(a-e),(e>=a&&e<o||l<=c)&&(s=a,u=o);else{if(l=a-u,!(l<=c))break;u=o}if(null!==s)return{start:s,end:u}}return null}function ee(){if(a){let e=a.getTime()||0;N&&(e=isNaN(k)?0:k);const t=l.get().streaming.gaps.jumpGaps&&!isNaN(l.get().streaming.gaps.smallGapLimit)?l.get().streaming.gaps.smallGapLimit:NaN;_=Math.max(function(e,t){let n,r;return l.get().streaming.gaps.jumpGaps&&(t=l.get().streaming.gaps.smallGapLimit),n=J(e,t),r=null===n?0:n.end-e,r}(e,t),0),Te(h.default.BUFFER_LEVEL_UPDATED,{mediaType:m,bufferLevel:_}),re()}}function ne(){const e=A>=b-1,t=a.getTimeToStreamEnd(c)-_<1e-5;!e&&!t||y||(ge(!0),T.debug(`checkIfBufferingCompleted trigger BUFFERING_COMPLETED for stream id ${c.id} and type ${m}`))}function re(){if(m!==g.default.AUDIO&&m!==g.default.VIDEO)return;const e=a.getLowLatencyModeEnabled()?l.get().streaming.buffer.lowLatencyStallThreshold:l.get().streaming.buffer.stallThreshold;_<=e&&!y?ie(o.BUFFER_EMPTY):(y||_>e)&&ie(o.BUFFER_LOADED)}function ie(e){w===e||e===o.BUFFER_EMPTY&&0===a.getTime()||m===g.default.TEXT&&!f.isTextEnabled()||(w=e,Te(h.default.BUFFER_LEVEL_STATE_CHANGED,{state:e}),Te(e===o.BUFFER_LOADED?h.default.BUFFER_LOADED:h.default.BUFFER_EMPTY),T.debug(e===o.BUFFER_LOADED?"Got enough buffer to start":"Waiting for more buffer before starting playback"))}function ae(){v&&m!==g.default.TEXT&&(y||se(oe()))}function oe(){const e=[],t=v.getAllBufferRanges();if(!t||0===t.length)return e;const n=a.getTime();let r=Math.max(0,n-l.get().streaming.buffer.bufferToKeep);const o=i.getRequests({state:te.FRAGMENT_MODEL_EXECUTED,time:n,threshold:kr})[0];if(o)r=Math.min(o.startTime,r);else if(0===n&&a.getIsDynamic())return[];if(t.start(0)<=r){const n={start:0,end:r};for(let e=0;e<t.length&&t.end(e)<=r;e++)n.end=t.end(e);n.start<n.end&&e.push(n)}return e}function se(e){return new Promise((t,n)=>{if(!e||!v||0===e.length)return ee(),void t();const r=[];e.forEach(e=>{r.push(function(e){return new Promise((t,n)=>{e.resolve=t,e.reject=n,x.push(e)})}(e))}),O||ue(),Promise.all(r).then(()=>{t()}).catch(e=>{n(e)})})}function ue(){try{if(0===x.length||!v)return T.debug("Nothing to prune, halt pruning"),x=[],void(O=!1);const e=v.getBuffer();if(!e||!e.buffered||0===e.buffered.length)return T.debug("SourceBuffer is empty (or does not exist), halt pruning"),x=[],void(O=!1);const t=x.shift();T.debug(`${m}: Removing buffer from: ${t.start} to ${t.end}`),O=!0,a.getTime()<t.end&&ge(!1),v.remove(t).then(e=>{le(e)}).catch(e=>{le(e)})}catch(e){O=!1}}function le(e){T.debug("onRemoved buffer from:",e.from,"to",e.to),v&&(q(v.getAllBufferRanges()),0===x.length&&(O=!1,ee()),e.unintended&&(T.warn("Detected unintended removal from:",e.from,"to",e.to,"setting streamprocessor time to",e.from),Te(h.default.SEEK_TARGET,{time:e.from})),O?ue():(F?F=!1:ee(),Te(h.default.BUFFER_CLEARED,{from:e.from,to:e.to,unintended:e.unintended,hasEnoughSpaceToAppend:Ee(),quotaExceeded:L})))}function ce(e){return new Promise(t=>{e&&void 0!==e.mseTimeOffset&&v&&v.updateTimestampOffset?v.updateTimestampOffset(e.mseTimeOffset).then(()=>{t()}).catch(()=>{t()}):t()})}function fe(){return v&&!y?v.updateAppendWindow(c):Promise.resolve()}function de(){P++,P*(l.get().streaming.wallclockTimeUpdateInterval/1e3)>=l.get().streaming.buffer.bufferPruningInterval&&(P=0,ae())}function he(){re()}function ge(e){y=e,y?Te(h.default.BUFFERING_COMPLETED):b=Number.POSITIVE_INFINITY}function pe(){try{const e=v.getAllBufferRanges();let t,n,r=0;if(!e)return r;for(n=0,t=e.length;n<t;n++)r+=e.end(n)-e.start(n);return r}catch(e){return 0}}function me(e){try{let t=e;const n=v.getAllBufferRanges();
2if(!n||0===n.length)return NaN;let r=0;for(;t===e&&r<n.length;){const e=n.start(r),i=n.end(r);t>=e&&t<=i&&(t=i),r+=1}return t===e?NaN:t}catch(e){return NaN}}function Ee(){const e=pe();return isNaN(e)||e<S}function Te(e,t){let n=t||{};r.trigger(e,n,{streamId:c.id,mediaType:m})}function ye(e,t){if(S=Number.POSITIVE_INFINITY,w=void 0,b=Number.POSITIVE_INFINITY,A=0,M=null,y=!1,O=!1,L=!1,_=0,P=0,x=[],k=NaN,N=!1,v){let n=v;v=null,e||(t?n.removeEventListeners():n.abort().then(()=>{n.reset(t),n=null}))}F=!1}return E={appendInitSegmentFromCache:function(e){const t=U.extract(c.id,e);return!!t&&(T.debug(`Appending init fragment for type ${m}, representationId ${t.representation.id} and bandwidth ${t.representation.bandwidth}`),V(t),!0)},clearBuffers:se,createBufferSink:H,dischargePreBuffer:function(){if(v&&C&&"function"==typeof C.discharge){const e=C.getAllBufferRanges();if(e.length>0){let t="Beginning "+m+"PreBuffer discharge, adding buffer for:";for(let n=0;n<e.length;n++)t+=" start: "+e.start(n)+", end: "+e.end(n)+";";T.debug(t)}else T.debug("PreBuffer discharge requested, but there were no media segments in the PreBuffer.");D=[];let t=C.discharge();for(let e=0;e<t.length;e++){const n=t[e];D.push(n),v.append(n)}C.reset(),C=null}},getAllRangesWithSafetyFactor:$,getBuffer:function(){return v},getBufferControllerType:function(){return Br},getBufferLevel:function(){return _},getContinuousBufferTimeForTargetTime:me,getIsBufferingCompleted:function(){return y},getIsPruningInProgress:function(){return O},getMediaSource:function(){return I},getRangeAt:J,getStreamId:function(){return c.id},getType:function(){return m},hasBufferAtTime:function(e){try{const t=v.getAllBufferRanges();if(!t||0===t.length)return!1;let n=0;for(;n<t.length;){const r=t.start(n),i=t.end(n);if(e>=r&&e<=i)return!0;n+=1}return!1}catch(e){return T.error(e),!1}},initialize:function(e){B(e),r.on(h.default.INIT_FRAGMENT_LOADED,G,E),r.on(h.default.MEDIA_FRAGMENT_LOADED,Y,E),r.on(h.default.WALLCLOCK_TIME_UPDATED,de,E),r.on(p.default.PLAYBACK_PLAYING,Z,E),r.on(p.default.PLAYBACK_PROGRESS,Q,E),r.on(p.default.PLAYBACK_TIME_UPDATED,Q,E),r.on(p.default.PLAYBACK_RATE_CHANGED,he,E),r.on(p.default.PLAYBACK_STALLED,X,E)},prepareForAbandonQualitySwitch:function(e,t){return j(e,t)},prepareForDefaultQualitySwitch:function(e,t){return j(e,t)},prepareForFastQualitySwitch:function(e,t){return j(e,t)},prepareForForceReplacementQualitySwitch:function(e,t){return new Promise(n=>{const r=[];r.push(v.abort()),r.push(fe()),r.push(z()),r.push(ce(e)),r.push(W(e,t)),Promise.allSettled(r).then(()=>{ge(!1),n()})})},prepareForNonReplacementTrackSwitch:function(e,t){return new Promise(n=>{const r=[];r.push(fe()),r.push(W(e,t)),Promise.allSettled(r).then(()=>{n()})})},prepareForPlaybackSeek:function(){return y&&ge(!1),v.abort()},prepareForReplacementTrackSwitch:function(e,t){return new Promise(n=>{const r=[];r.push(v.abort()),r.push(fe()),r.push(W(e,t)),r.push(z()),r.push(ce(e)),Promise.allSettled(r).then(()=>{ge(!1),n()})})},pruneAllSafely:z,pruneBuffer:ae,reset:function(e,t){r.off(h.default.INIT_FRAGMENT_LOADED,G,this),r.off(h.default.MEDIA_FRAGMENT_LOADED,Y,this),r.off(h.default.WALLCLOCK_TIME_UPDATED,de,this),r.off(p.default.PLAYBACK_PLAYING,Z,this),r.off(p.default.PLAYBACK_PROGRESS,Q,this),r.off(p.default.PLAYBACK_TIME_UPDATED,Q,this),r.off(p.default.PLAYBACK_RATE_CHANGED,he,this),r.off(p.default.PLAYBACK_STALLED,X,this),ye(e,t)},segmentRequestingCompleted:function(e){isNaN(e)||(b=e,ne())},setIsBufferingCompleted:ge,setMediaSource:B,setSeekTarget:function(e){k=e},updateAppendWindow:fe,updateBufferTimestampOffset:ce},T=(0,u.default)(n).getInstance().getLogger(E),U=bt(n).getInstance(),ye(),E}Hr.__dashjs_factory_name=Br;var Gr=r.default.getClassFactory(Hr);const Yr="NotFragmentedTextBufferController";function Vr(e){e=e||{};const t=this.context,n=(0,d.default)(t).getInstance(),r=e.textController,i=e.errHandler,a=e.streamInfo,o=e.type;let s,u,l,c,f,g;function p(e){c=e}function m(e){u!==e&&(u=e,u&&function(e){n.trigger(e,{},{streamId:a.id,mediaType:o})}(h.default.BUFFERING_COMPLETED))}function E(e){e.chunk.bytes&&!u&&(g.save(e.chunk),f.append(e.chunk),m(!0))}return s={appendInitSegmentFromCache:function(e){return null!==g.extract(a.id,e)},clearBuffers:function(){return Promise.resolve()},createBufferSink:function(e){return new Promise((a,s)=>{try{f=Ur(t).create({mediaSource:c,textController:r,eventBus:n}),f.initializeForFirstUse(e),l||(f.getBuffer()&&"function"==typeof f.getBuffer().initialize&&f.getBuffer().initialize(),l=!0),a(f)}catch(e){i.error(new He.default(Ae.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,Ae.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+o)),s(e)}})},dischargePreBuffer:function(){},getAllRangesWithSafetyFactor:function(){return[]},getBuffer:function(){return f},getBufferControllerType:function(){return Yr},getBufferLevel:function(){return 0},getContinuousBufferTimeForTargetTime:function(){return Number.POSITIVE_INFINITY},getIsBufferingCompleted:function(){return u},getIsPruningInProgress:function(){return!1},getMediaSource:function(){return c},getRangeAt:function(){return null},getStreamId:function(){return a.id},getType:function(){return o},hasBufferAtTime:function(){return!0},initialize:function(e){p(e)},prepareForPlaybackSeek:function(){return Promise.resolve()},prepareForReplacementTrackSwitch:function(){return u=!1,Promise.resolve()},pruneAllSafely:function(){return Promise.resolve()},pruneBuffer:function(){},reset:function(e){n.off(h.default.INIT_FRAGMENT_LOADED,E,s),!e&&f&&(f.abort(),f.reset(),f=null)}
2,segmentRequestingCompleted:function(){},setIsBufferingCompleted:m,setMediaSource:p,setSeekTarget:function(){},updateAppendWindow:function(){return Promise.resolve()},updateBufferTimestampOffset:function(){return Promise.resolve()}},l=!1,c=null,u=!1,g=bt(t).getInstance(),n.on(h.default.INIT_FRAGMENT_LOADED,E,s),s}Vr.__dashjs_factory_name=Yr;var qr=r.default.getClassFactory(Vr);function Kr(e){const t=(e=e||{}).abrController,n=e.bufferController,r=this.context,i=e.dashMetrics,a=(0,d.default)(r).getInstance(),s=e.fragmentModel,l=e.mediaPlayerModel,c=e.playbackController,f=e.representationController,m=e.settings,E=e.textController,T=e.type;let y,_,S,I,A,R,b,v,C,N,D,w;function M(){R=(0,u.default)(r).getInstance().getLogger(S),V(),C=e.streamInfo}function P(){b=!0}function O(){b=!1}function L(e){if(n.getIsBufferingCompleted())return;U();const t=isNaN(e)?0:e;v=setTimeout(x,t)}function U(){v&&(clearTimeout(v),v=null)}function x(){const e=l.getScheduleTimeout();try{if(function(){try{return T===g.default.TEXT&&!E.isTextEnabled()||c.isPaused()&&(!c.getStreamController().getInitialPlayback()||!c.getStreamController().getAutoPlay())&&!m.get().streaming.scheduling.scheduleWhilePaused}catch(e){return!1}}())return void U();!function(){try{return!!b&&f.getCurrentRepresentation()&&(null==A||N||function(){const e=f.getCurrentRepresentation();if(!T||!e)return!0;let t=e&&e.segmentDuration&&!isNaN(e.segmentDuration)?e.segmentDuration:0;const n=i.getCurrentBufferLevel(T),r=F();return(r<=t||c.getLowLatencyModeEnabled()||T===g.default.AUDIO&&y)&&(t=0),n+t<r}())}catch(e){return!1}}()?L(e):function(){if(t.handlePendingManualQualitySwitch(C.id,T))return;let e=!1;w&&(e=t.checkPlaybackQuality(T,C.id)),e||function(){const e=f.getCurrentRepresentation();_||e.id!==A||N?function(e){N?(R.debug("Switch track for "+T+", representation id = "+e.id),N=!1):R.debug("Quality has changed, get init request for representationid = "+e.id),a.trigger(h.default.INIT_FRAGMENT_NEEDED,{representationId:e.id,sender:S},{streamId:C.id,mediaType:T}),w=!1,_=!1}(e):(R.debug(`Media segment needed for ${T} and stream id ${C.id}`),a.trigger(h.default.MEDIA_FRAGMENT_NEEDED,{},{streamId:C.id,mediaType:T}),w=!0)}()}()}catch(t){L(e)}}function F(){let e=NaN;const n=f.getCurrentRepresentation();return T&&n?(e=T===g.default.TEXT?function(){try{if(E.isTextEnabled()){const e=f.getCurrentRepresentation();if(isNaN(e.fragmentDuration)){const e=i.getCurrentSchedulingInfo(o.SCHEDULING_INFO);return e?e.duration:0}return e.fragmentDuration}return 0}catch(e){return 0}}():T===g.default.AUDIO&&y?function(){try{const e=i.getCurrentBufferLevel(g.default.VIDEO),t=f.getCurrentRepresentation();return isNaN(t.fragmentDuration)?e+1:Math.max(e+1,t.fragmentDuration)}catch(e){return 0}}():function(){try{const e=m.get().streaming.enhancement.enabled?f.getCurrentCompositeRepresentation():f.getCurrentRepresentation(),n=e.mediaInfo.streamInfo;return t.isPlayingAtTopQuality(e)?n.manifestInfo.duration>=m.get().streaming.buffer.longFormContentDurationThreshold?m.get().streaming.buffer.bufferTimeAtTopQualityLongForm:m.get().streaming.buffer.bufferTimeAtTopQuality:l.getBufferTimeDefaultUnadjusted()}catch(e){return l.getBufferTimeDefaultUnadjusted()}}(),e):e}function k(){B(!0)}function B(e){if(c&&s){const t=s.getRequests({state:te.FRAGMENT_MODEL_EXECUTED,time:c.getTime(),threshold:0})[0];t&&c.getTime()>=t.startTime&&((!I.representation||t.representation.mediaInfo.type===I.representation.mediaInfo.type&&t.representation.mediaInfo.index!==I.representation.mediaInfo.index)&&e&&function(e){R.debug(`Track change rendered for streamId ${C.id} and type ${T}`),a.trigger(h.default.TRACK_CHANGE_RENDERED,{mediaType:T,oldMediaInfo:I&&I.representation&&I.representation.mediaInfo?I.representation.mediaInfo:null,newMediaInfo:e.representation.mediaInfo,streamId:C.id})}(t),I.representation&&t.representation.id===I.representation.id||!e||function(e){R.debug(`Quality change rendered for streamId ${C.id} and type ${T}`),a.trigger(h.default.QUALITY_CHANGE_RENDERED,{mediaType:T,oldRepresentation:I.representation?I.representation:null,newRepresentation:e.representation,streamId:C.id})}(t),I.representation=t.representation)}}function H(){s.abortRequests(),U()}function G(){m.get().streaming.scheduling.scheduleWhilePaused||L()}function Y(e){i.updatePlayListTraceMetrics({playbackspeed:e.playbackRate.toString()})}
2function V(){w=!0,D=0,A=null,I={representation:null},N=!1,_=!1,b=!0}return S={clearScheduleTimer:U,getBufferTarget:F,getPlaybackController:function(){return c},getStreamId:function(){return C.id},getSwitchTrack:function(){return N},getTimeToLoadDelay:function(){return D},getType:function(){return T},initialize:function(e){y=e,a.on(h.default.URL_RESOLUTION_FAILED,H,S),a.on(p.default.PLAYBACK_STARTED,G,S),a.on(p.default.PLAYBACK_RATE_CHANGED,Y,S),a.on(p.default.PLAYBACK_TIME_UPDATED,k,S),a.on(p.default.MANAGED_MEDIA_SOURCE_START_STREAMING,P,S),a.on(p.default.MANAGED_MEDIA_SOURCE_END_STREAMING,O,S)},reset:function(){a.off(h.default.URL_RESOLUTION_FAILED,H,S),a.off(p.default.PLAYBACK_STARTED,G,S),a.off(p.default.PLAYBACK_RATE_CHANGED,Y,S),a.off(p.default.PLAYBACK_TIME_UPDATED,k,S),a.off(p.default.MANAGED_MEDIA_SOURCE_START_STREAMING,P,S),a.off(p.default.MANAGED_MEDIA_SOURCE_END_STREAMING,O,S),U(),B(!1),V(),C=null},setShouldCheckPlaybackQuality:function(e){w=e},setInitSegmentRequired:function(e){_=e},setLastInitializedRepresentationId:function(e){A=e},setup:M,setSwitchTrack:function(e){N=e},setTimeToLoadDelay:function(e){D=e},startScheduleTimer:L},M(),S}Kr.__dashjs_factory_name="ScheduleController";var jr=r.default.getClassFactory(Kr);const Wr=/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g;var zr=class extends ur{constructor(){super(),this.isPartialSegment=!0,this.replacementSubNumber=NaN,this.totalNumberOfPartialSegments=NaN}};function $r(e){return e?e.totalNumberOfPartialSegments&&!isNaN(e.totalNumberOfPartialSegments)&&e.totalNumberOfPartialSegments>0&&!isNaN(e.subNumberOfPartialSegmentToRequest)?function(e){const t=function(e,t){const n=new zr,r=e.segmentDurationInSeconds/e.totalNumberOfPartialSegments,{representation:i,timelineConverter:a,isDynamic:o,index:s,totalNumberOfPartialSegments:u}=e,l=Qr({representation:i,segmentDurationInSeconds:r,presentationStartTime:e.presentationStartTime+t*r,presentationEndTime:e.presentationStartTime+(t+1)*r,timelineConverter:a,isDynamic:o,mediaTimeInSeconds:e.mediaTimeInSeconds+t*r,index:s});return n.assignAttributes(l),n.replacementSubNumber=t,n.totalNumberOfPartialSegments=u,n}(e,e.subNumberOfPartialSegmentToRequest);return Xr(t,e),t}(e):function(e){const t=new lr,n=Qr(e);return t.assignAttributes(n),Xr(t,e),t}(e):null}function Qr(e){const{representation:t,segmentDurationInSeconds:n,presentationStartTime:r,presentationEndTime:i,mediaTimeInSeconds:a,timelineConverter:o,isDynamic:s,index:u}=e,l={availabilityEndTime:o.calcAvailabilityEndTimeFromPresentationTime(i+n,t,s),availabilityStartTime:o.calcAvailabilityStartTimeFromPresentationTime(i,t,s),duration:n,index:u,mediaStartTime:a,presentationStartTime:r,replacementNumber:t.startNumber+u,representation:t};return l.wallStartTime=o.calcWallTimeForSegment(l,s),l}function Xr(e,t){const{tManifest:n,mediaTime:r,mediaUrl:i,mediaRange:a}=t;e.replacementTime=n||r,e.media=Jr(i,e.representation.id,e.replacementNumber,e.replacementSubNumber,e.representation.bandwidth,e.replacementTime),e.mediaRange=a,e.mediaUrl=i}function Zr(e,t,n,r){const i=t.adaptation.period;if(isFinite(i.duration)&&i.start+i.duration<=n.presentationStartTime)return!1;if(r){if("INF"===t.availabilityTimeOffset)return!0;const r=e.getClientReferenceTime();return n.availabilityStartTime.getTime()<=r&&(!isFinite(n.availabilityEndTime)||n.availabilityEndTime.getTime()>=r)}return!0}function Jr(e,t,n,r,i,a){return e?function(e,t,n,r,i,a){return e.replace(Wr,(e,o,s,u)=>{let l,c;switch(o){case void 0:return"$";case"RepresentationID":l=t;break;case"Number":l=n;break;case"SubNumber":l=r;break;case"Bandwidth":l=i;break;case"Time":if("string"==typeof a)return a;l=a?Math.round(a):a;break;default:l=null}if(null==l)return e;switch(u){case void 0:case"d":case"i":case"u":c=l.toString();break;case"o":c=l.toString(8);break;case"x":c=l.toString(16);break;case"X":c=l.toString(16).toUpperCase();break;default:c=l.toString()}const f=parseInt(s,10)||1;return c.padStart(f,"0")})}(e,t,n,r,i,a):e}function ei(e){const{index:t,isDynamic:n,mediaRange:r,mediaTime:i,mediaUrl:a,representation:o,subNumberOfPartialSegmentToRequest:s,timelineConverter:u,totalNumberOfPartialSegments:l}=e;let c,f,d;c=o.segmentDuration,isNaN(c)&&(c=o.adaptation.period.duration),f=parseFloat((o.adaptation.period.start+t*c).toFixed(5)),d=parseFloat((f
2+c).toFixed(5));const h=$r({index:t,isDynamic:n,mediaRange:r,mediaTime:i,mediaTimeInSeconds:u.calcMediaTimeFromPresentationTime(f,o),mediaUrl:a,presentationEndTime:d,presentationStartTime:f,representation:o,segmentDurationInSeconds:c,subNumberOfPartialSegmentToRequest:s,timelineConverter:u,totalNumberOfPartialSegments:l});return Zr(u,o,h,n)?h:null}function ti(e){const{durationInTimescale:t,fTimescale:n,index:r,subNumberOfPartialSegmentToRequest:i,isDynamic:a,mediaRange:o,mediaTime:s,mediaUrl:u,totalNumberOfPartialSegments:l,representation:c,tManifest:f,timelineConverter:d}=e,h=s/n,g=t/n;let p=d.calcPresentationTimeFromMediaTime(h,c),m=$r({representation:c,segmentDurationInSeconds:g,presentationStartTime:p,presentationEndTime:p+g,mediaTimeInSeconds:h,timelineConverter:d,isDynamic:a,index:r,totalNumberOfPartialSegments:l,subNumberOfPartialSegmentToRequest:i,mediaUrl:u,mediaRange:o,tManifest:f,mediaTime:s});return Zr(d,c,m,a)?m:null}function ni(e){return e.k}function ri(e){const t=(e=e||{}).eventBus,n=e.events,r=e.abrController,i=e.dashMetrics,a=e.playbackController,o=e.timelineConverter,s=e.type,u=e.streamInfo,l=e.segmentsController,c=e.isDynamic;let f,d,h;function m(){return s}function E(){return h?.mediaInfo.type===s?h:function(){let e=h?.dependentRepresentation;if(e){if(!e.mediaInfo)throw new Error("dependentRepresentation has no mediaInfo!");if(e.mediaInfo.type===s)return e}return null}()}function T(){h=null,d=[]}function y(e){return new Promise((t,n)=>{const r=e.hasInitialization(),a=e.hasSegments(),s=[];s.push(l.updateInitData(e,r)),s.push(l.updateSegmentData(e,a)),Promise.all(s).then(n=>{var r;n[0]&&!n[0].error&&(e=function(e,t){return t&&!t.error&&t.representation?t.representation:e}(e,n[0])),n[1]&&!n[1].error&&(e=function(e,t){if(!t||t.error)return;const n=t.segments,r=[];let i,a,s,u,l=0;
2for(i=0,a=n?n.length:0;i<a;i++)s=n[i],u=ti({durationInTimescale:s.duration,fTimescale:s.timescale,index:l,isDynamic:c,mediaRange:s.mediaRange,mediaTime:s.startTime,mediaUrl:s.media,representation:e,timelineConverter:o}),u&&(r.push(u),u=null,l++);return r.length>0&&(e.segments=r),e}(e,n[1])),e.fragmentDuration=e.segmentDuration?e.segmentDuration:e.segments&&e.segments.length>0?e.segments[0].duration:NaN,(r=e).mediaFinishedInformation=l.getMediaFinishedInformation(r),function(e){let t,n=i.getCurrentManifestUpdate(),r=!1;if(n){for(let i=0;i<n.representationInfo.length;i++)if(t=n.representationInfo[i],t.index===e.index&&t.mediaType===m()){r=!0;break}r||i.addManifestUpdateRepresentationInfo(e,m())}}(e),t()}).catch(e=>{n(e)})})}function _(e){if(!d||0===d.length)return null;const t=d.filter(t=>t.id===e);return t.length>0?t[0]:null}function S(e){t.trigger(n.DATA_UPDATE_COMPLETED,{currentRepresentation:h,error:e},{streamId:u.id,mediaType:s})}function I(e){h&&h.id===e.id||function(e){!function(){if(!(r&&i&&a&&o))throw new Error(g.default.MISSING_CONFIG_ERROR)}();const n=new Date,l=1e3*a.getTime();e&&i.addRepresentationSwitch(e.adaptation.type,n,l,e.id),t.trigger(p.default.REPRESENTATION_SWITCH,{mediaType:s,streamId:u.id,currentRepresentation:e},{streamId:u.id,mediaType:s})}(e),h=e}function A(e){if(e.newDuration){const t=E();t&&t.adaptation.period&&(t.adaptation.period.duration=e.newDuration)}}return f={getCurrentCompositeRepresentation:function(){return h},getCurrentRepresentation:E,getRepresentationById:_,getStreamId:function(){return u.id},getType:m,prepareQualityChange:function(e){const t=d.filter(t=>t.id===e.id);t.length>0&&I(t[0])},reset:function(){t.off(p.default.MANIFEST_VALIDITY_CHANGED,A,f),T()},updateData:function(e,t,n){return new Promise((o,l)=>{if(d=e,I(_(n)),s!==g.default.VIDEO&&s!==g.default.ENHANCEMENT&&s!==g.default.AUDIO&&(s!==g.default.TEXT||!t))return S(),void o();const c=[];for(let e=0,t=d.length;e<t;e++){const t=d[e];c.push(y(t))}Promise.all(c).then(()=>{!function(){r.setPlaybackQuality(s,u,h);const e=i.getCurrentDVRInfo(s);e&&i.updateManifestUpdateInfo({latency:e.range.end-a.getTime()}),S()}(),o()}).catch(e=>{l(e)})})}},T(),t.on(p.default.MANIFEST_VALIDITY_CHANGED,A,f),f}ri.__dashjs_factory_name="RepresentationController";var ii=r.default.getClassFactory(ri);function ai(e){const t=(e=e||{}).eventBus,n=e.debug,r=e.urlUtils,i=e.type,a=e.streamInfo,o=e.segmentsController,s=e.timelineConverter,u=e.baseURLController;let l,c,f,d,h;function g(){return i}function m(){f=null}function E(e,t,n){const i=u.resolve(n.path);let a,o,s={};return i&&t!==i.url&&r.isRelative(t)?(a=i.url,o=i.serviceLocation,s=i.queryParams,t&&(a=r.resolve(t,a))):a=t,!r.isRelative(a)&&(e.url=a,e.serviceLocation=o,e.queryParams=s,!0)}function T(e,t,n){let r=null;if(!t||!t.segmentInfoType)return r;const i=o.getSegmentByTime(t,n);return i&&(f=i,c.debug("Index for time "+n+" is "+i.index),r=y(0,i)),r}function y(e,t){if(null==t)return null;const n=new $.default,r=t.representation,i=r.bandwidth,a=Jr(t.media,r.id,t.replacementNumber,t.replacementSubNumber,i,t.replacementTime);return n.adaptationIndex=r.adaptation.index,n.availabilityEndTime=t.availabilityEndTime,n.availabilityStartTime=t.availabilityStartTime,n.availabilityTimeComplete=r.availabilityTimeComplete,n.bandwidth=r.bandwidth,n.duration=t.duration,n.index=t.index,n.isPartialSegmentRequest=t.isPartialSegment,n.mediaStartTime=t.mediaStartTime,n.mediaType=g(),n.presentationStartTime=t.presentationStartTime,n.range=t.mediaRange,n.representation=r,n.startTime=t.presentationStartTime,n.timescale=r.timescale,n.type=R.HTTPRequest.MEDIA_SEGMENT_TYPE,n.wallStartTime=t.wallStartTime,E(n,a,r)?n:void 0}function _(e){if(!e)return{indexToRequest:0,subNumberOfPartialSegmentToRequest:NaN};const t=e.isPartialSegment,n=!isNaN(e.replacementSubNumber),r=!isNaN(e.totalNumberOfPartialSegments);if(t&&n&&r){const t=e.replacementSubNumber+1;return t<e.totalNumberOfPartialSegments?{indexToRequest:e.index,subNumberOfPartialSegmentToRequest:t}:{indexToRequest:e.index+1,subNumberOfPartialSegmentToRequest:0}}return{indexToRequest:e.index+1,subNumberOfPartialSegmentToRequest:NaN}}function S(e,t,n,r){let i=null;const a=o.getSegmentByIndex(t,n,r,f);if(a)i=y(0,a),f=a;else{if(d&&!h)return c.debug(g()+" No segment found at index: "+n+". Wait for next loop"),null;h=!0}return i}function I(){c.debug("Dynamic stream complete"),h=!0}return l={getCurrentIndex:function(){return f?f.index:-1},getInitRequest:function(e,t){return t?function(e,t,n){const r=new $.default,i=t.adaptation.period,a=i.start;if(r.mediaType=n,r.type=R.HTTPRequest.INIT_SEGMENT_TYPE,r.range=t.range,r.availabilityStartTime=s.calcAvailabilityStartTimeFromPresentationTime(a,t,d),r.availabilityEndTime=s.calcAvailabilityEndTimeFromPresentationTime(a+i.duration,t,d),r.representation=t,E(r,t.initialization,t))return r.url=Jr(r.url,t.id,void 0,void 0,t.bandwidth),r}(0,t,g()):null},getLastSegment:function(){return f},getNextSegmentRequest:function(e,t){if(!t||!t.segmentInfoType)return null;if(function(e){return e&&f&&e.endNumber&&f.replacementNumber&&f.replacementNumber>=e.endNumber}(t))return h=!0,null;let{indexToRequest:n,subNumberOfPartialSegmentToRequest:r}=_(f);return S(0,t,n,r)},getNextSegmentRequestIdempotent:function(e,t){let n=null,{indexToRequest:r,subNumberOfPartialSegmentToRequest:i}=_(f);const a=o.getSegmentByIndex(t,r,i,f);return a?(n=y(0,a),n):null},getSegmentRequestForTime:T,getStreamId:function(){return a.id},getStreamInfo:function(){return a},getType:g,getValidTimeAheadOfTargetTime:function(e,t,n,r){try{if(isNaN(e)||!t||!n)return NaN;if(e<0&&(e=0),isNaN(r)&&(r=.5),T(0,n,e))return e;if(n.adaptation.period.start+n.adaptation.period.duration<e)return NaN;const i=isFinite(n.adaptation.period.duration)?n.adaptation.period.start+n.adaptation.period.duration:e+30;let a=Math.min(e+r,i),o=NaN,s=null;for(;a<=i;){let e=null;if(a<=i&&(e=T(0,n,a)),e){o=a,s=e;break}a+=r}if(s){const t=s.startTime+s.duration;return e>s.startTime&&t-e>r?e:!isNaN(s.startTime)&&e<s.startTime&&o>s.startTime?s.startTime+.001:Math.min(t-r,o)}return o}catch(e){return NaN}},initialize:function(e){d=e,h=!1,o.initialize(e)},isLastSegmentRequested:function(e,t){if(!e||!f)return!1;if(h)return!0;
2if(!isFinite(e.adaptation.period.duration))return!1;if(f.presentationStartTime+f.duration>t)return!1;if(e.mediaFinishedInformation&&!isNaN(e.mediaFinishedInformation.numberOfSegments)&&!isNaN(f.index)&&f.index>=e.mediaFinishedInformation.numberOfSegments-1){if(!d||e.segmentInfoType===Ce.default.SEGMENT_TEMPLATE)return!0;if(d&&e.segmentInfoType===Ce.default.SEGMENT_LIST&&e.adaptation.period.nextPeriodId)return!0}return!!(d&&e.adaptation.period.nextPeriodId&&e.segmentInfoType===Ce.default.SEGMENT_TIMELINE&&e.mediaFinishedInformation&&!isNaN(e.mediaFinishedInformation.mediaTimeOfLastSignaledSegment)&&f&&!isNaN(f.mediaStartTime)&&!isNaN(f.duration)&&f.mediaStartTime+f.duration>=e.mediaFinishedInformation.mediaTimeOfLastSignaledSegment-.05)},repeatSegmentRequest:function(e,t){return t&&t.segmentInfoType?S(0,t,f?f.index:0,f&&f.isPartialSegment&&!isNaN(f.replacementSubNumber)?f.replacementSubNumber:NaN):null},reset:function(){m(),t.off(p.default.DYNAMIC_TO_STATIC,I,l)}},c=n.getLogger(l),m(),t.on(p.default.DYNAMIC_TO_STATIC,I,l),l}ai.__dashjs_factory_name="DashHandler";var oi=r.default.getClassFactory(ai);function si(e,t){const n=(e=e||{}).timelineConverter,r=e.dashMetrics;let i;function a(e,r){if(function(){if(!n)throw new Error(g.default.MISSING_CONFIG_ERROR)}(),!e)return null;void 0===r&&(r=null);let i=null;const a=n.calcMediaTimeFromPresentationTime(r,e);return function(e,t){const n=function(e){return e.adaptation.period.mpd.manifest.Period[e.adaptation.period.index].AdaptationSet[e.adaptation.index].Representation[e.index].SegmentTemplate||e.adaptation.period.mpd.manifest.Period[e.adaptation.period.index].AdaptationSet[e.adaptation.index].Representation[e.index].SegmentList}(e),r=n.SegmentTimeline,i=n.SegmentURL;let a,s,u,l,c,f,d=0,h=-1;f=e.timescale,a=r.S;let g=!1;const p=a.length;for(u=0;u<p&&!g;u++)for(s=a[u],c=0,s.hasOwnProperty("r")&&(c=s.r),s.hasOwnProperty("t")&&(d=s.t),c<0&&(c=o(e,a[u+1],s,f,d/f)),l=0;l<=c&&!g;l++)h++,g=t({mediaTime:d,segmentBase:n,segmentURL:i,currentSElement:s,sElementCounterIncludingRepeats:h,sElementCounter:u}),g&&(e.segmentDuration=s.d/f),d+=s.d}(e,function(r){const o=e.timescale;return function(r,a){const{mediaTime:o,segmentBase:s,segmentURL:u,currentSElement:l,sElementCounterIncludingRepeats:c,sElementCounter:f}=a,d=l.d,h=e.timescale;return r<o+d&&r>=o&&(function(r){const{segmentBase:a,segmentURL:o,sElementCounter:s,currentSElement:u,mediaTime:l,durationInTimescale:c,fTimescale:f,requiredMediaTimeInTimescaleUnits:d,sElementCounterIncludingRepeats:h}=r;let g=function(e,t,n){let r=e.media;return t&&(r=t[n].media||""),r}(a,o,s),p=function(e,t,n){let r=e.mediaRange;return t&&(r=t[n].mediaRange),r}(u,o,s);const m=ni(u),E=function(e){if(!e||void 0===e.totalNumberOfPartialSegments||isNaN(e.totalNumberOfPartialSegments)||e.totalNumberOfPartialSegments<1)return;const{durationInTimescale:t,requiredMediaTimeInTimescaleUnits:n,mediaTime:r,totalNumberOfPartialSegments:i}=e,a=t/i;for(let e=0;e<i;e++){const t=r+e*a;if(n>=t&&n<t+a)return e}return NaN}({durationInTimescale:c,requiredMediaTimeInTimescaleUnits:d,mediaTime:l,totalNumberOfPartialSegments:m});i=ti({timelineConverter:n,isDynamic:t,representation:e,mediaTime:l,durationInTimescale:c,fTimescale:f,mediaUrl:g,mediaRange:p,index:h,tManifest:u.tManifest,totalNumberOfPartialSegments:m,subNumberOfPartialSegmentToRequest:E})}({segmentBase:s,segmentURL:u,sElementCounter:f,currentSElement:l,mediaTime:o,durationInTimescale:d,fTimescale:h,requiredMediaTimeInTimescaleUnits:r,sElementCounterIncludingRepeats:c}),!0)}(parseFloat((a*o).toPrecision(15)),r)}),i}function o(e,t,i,a,o){let s;if(t&&t.hasOwnProperty("t"))s=t.t/a;else try{let t=0;if(isNaN(e.adaptation.period.start)||isNaN(e.adaptation.period.duration)||!isFinite(e.adaptation.period.duration)){const e=r.getCurrentDVRInfo();t=isNaN(e.end)?0:e.end}else t=e.adaptation.period.start+e.adaptation.period.duration;s=n.calcMediaTimeFromPresentationTime(t,e),e.segmentDuration=i.d/a}catch(e){s=0}return Math.max(Math.ceil((s-o)/(i.d/a))-1,0)}return i={getMediaFinishedInformation:function(e){if(!e)return 0;const t=(e.adaptation.period.mpd.manifest.Period[e.adaptation.period.index].AdaptationSet[e.adaptation.index].Representation[e.index].SegmentTemplate||e.adaptation.period.mpd.manifest.Period[e.adaptation.period.index].AdaptationSet[e.adaptation.index].Representation[e.index].SegmentList).SegmentTimeline;let n,r,i,a,s,u,l=0,c=0,f=0;u=e.timescale,n=t.S;const d=n.length;for(i=0;i<d;i++)for(r=n[i],s=0,r.hasOwnProperty("r")&&(s=r.r),r.hasOwnProperty("t")&&(l=r.t,c=l/u),s<0&&(s=o(e,n[i+1],r,u,c)
2),a=0;a<=s;a++)f++,l+=r.d,c=l/u;return{numberOfSegments:f,mediaTimeOfLastSignaledSegment:c}},getSegmentByIndex:function(e,t){return e?a(e,t&&!isNaN(t.presentationStartTime)?t.presentationStartTime+t.duration+.01:0):null},getSegmentByTime:a},i}si.__dashjs_factory_name="TimelineSegmentsGetter";var ui=r.default.getClassFactory(si);function li(e,t){const n=(e=e||{}).timelineConverter;let r;function i(e,r,i){if(!e)return null;const o=a(e),s=ni(o);void 0!==s&&s>=0&&(i=void 0!==i&&i<s?i:0);const u=ei({index:r=Math.max(r,0),isDynamic:t,mediaTime:Math.round(r*e.segmentDuration*e.timescale,10),mediaUrl:o.media,representation:e,subNumberOfPartialSegmentToRequest:i,timelineConverter:n,totalNumberOfPartialSegments:s});return u&&e.endNumber&&u.replacementNumber>e.endNumber?null:u}function a(e){return e.adaptation.period.mpd.manifest.Period[e.adaptation.period.index].AdaptationSet[e.adaptation.index].Representation[e.index].SegmentTemplate}return r={getMediaFinishedInformation:function(e){const t={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN};if(!e)return t;const n=e.segmentDuration;return isNaN(n)?t.numberOfSegments=1:t.numberOfSegments=Math.ceil(e.adaptation.period.duration/n),t},getSegmentByIndex:i,getSegmentByTime:function(e,t){if(!e)return null;const r=e.segmentDuration;if(isNaN(r))return null;let o=n.calcPeriodRelativeTimeFromMpdRelativeTime(e,t);const s=a(e),u=Math.floor(o/r),l=function(e){if(!e||void 0===e.totalNumberOfPartialSegments||isNaN(e.totalNumberOfPartialSegments)||e.totalNumberOfPartialSegments<1)return;const{totalNumberOfPartialSegments:t,representation:n,requestedTimeRelativeToPeriodStart:r,indexWithoutStartNumber:i}=e,a=i*n.segmentDuration,o=n.segmentDuration/t,s=r-a;let u=Math.floor(s/o);return u=Math.max(0,Math.min(u,t-1)),u}({totalNumberOfPartialSegments:ni(s),representation:e,requestedTimeRelativeToPeriodStart:o,indexWithoutStartNumber:u});return i(e,u,l)}},r}li.__dashjs_factory_name="TemplateSegmentsGetter";var ci=r.default.getClassFactory(li);function fi(e,t){const n=(e=e||{}).timelineConverter;let r;function i(){if(!n||!n.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(g.default.MISSING_CONFIG_ERROR)}function a(e,r){if(i(),!e)return null;const a=e.adaptation.period.mpd.manifest.Period[e.adaptation.period.index].AdaptationSet[e.adaptation.index].Representation[e.index].SegmentList,o=a.SegmentURL.length,s=e&&!isNaN(e.startNumber)?e.startNumber:1,u=Math.max(s-1,0),l=Math.max(r-u,0);let c=null;if(l<o){const i=a.SegmentURL[l];c=ei({index:r,isDynamic:t,mediaRange:i.mediaRange,mediaTime:(s+r-1)*e.segmentDuration,representation:e,timelineConverter:n}),c&&(c.media=i.media?i.media:"",c.indexRange=i.indexRange)}return c}return r={getSegmentByIndex:a,getSegmentByTime:function(e,t){if(i(),!e)return null;const r=e.segmentDuration;if(isNaN(r))return null;const o=n.calcPeriodRelativeTimeFromMpdRelativeTime(e,t);return a(e,Math.floor(o/r))},getMediaFinishedInformation:function(e){const t={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN};if(!e)return t;const n=e.adaptation.period.mpd.manifest.Period[e.adaptation.period.index].AdaptationSet[e.adaptation.index].Representation[e.index].SegmentList,r=e&&!isNaN(e.startNumber)?e.startNumber:1,i=Math.max(r-1,0);return t.numberOfSegments=i+n.SegmentURL.length,t}},r}fi.__dashjs_factory_name="ListSegmentsGetter";var di=r.default.getClassFactory(fi);function hi(e){const t=(e=e||{}).timelineConverter;let n;function r(){if(!t||!t.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime"))throw new Error(g.default.MISSING_CONFIG_ERROR)}function i(e,t){if(r(),!e)return null;const n=e.segments?e.segments.length:-1;let i;if(t<n&&(i=e.segments[t],i&&i.index===t))return i;for(let r=0;r<n;r++)if(i=e.segments[r],i&&i.index===t)return i;return null}return n={getSegmentByIndex:i,getSegmentByTime:function(e,t){r();const n=function(e,t){if(!e)return-1;const n=e.segments,r=n?n.length:null;let i,a,o,s,u,l=-1;if(n&&r>0)for(u=0;u<r;u++)if(a=n[u],o=a.presentationStartTime,s=a.duration,i=s/2,t+i>=o&&t-i<o+s){l=a.index;break}return l}(e,t);return i(e,n)},getMediaFinishedInformation:function(e){const t={numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN};return e&&e.segments?(t.numberOfSegments=e.segments.length,t):t}},n}hi.__dashjs_factory_name="SegmentBaseGetter";var gi=r.default.getClassFactory(hi);function pi(e){e=e||{};const t=this.context,n=e.dashConstants,r=e.type,i=e.segmentBaseController;let a,o;function s(e){return e?e.segments?o[n.SEGMENT_BASE]:o[e.segmentInfoType]:null}return a={initialize:function(r){o[n.SEGMENT_TIMELINE]=ui(t).create(e,r),o[n.SEGMENT_TEMPLATE]=ci(t).create(e,r),o[n.SEGMENT_LIST]=di(t).create(e,r),o[n.SEGMENT_BASE]=gi(t).create(e,r)},updateInitData:function(e,t){return t?Promise.resolve():i.getSegmentBaseInitSegment({representation:e,mediaType:r})},updateSegmentData:function(e,t){return t?Promise.resolve():i.getSegmentList({mimeType:e.mimeType,representation:e,mediaType:r})},getSegmentByIndex:function(e,t,r,i){const a=s(e);return a?e.segmentInfoType?e.segmentInfoType===n.SEGMENT_TIMELINE?a.get
2SegmentByIndex(e,i):e.segmentInfoType===n.SEGMENT_TEMPLATE?a.getSegmentByIndex(e,t,r):a.getSegmentByIndex(e,t):a.getSegmentByIndex(e,t):null},getSegmentByTime:function(e,t){const n=s(e);return n?n.getSegmentByTime(e,t):null},getMediaFinishedInformation:function(e){const t=s(e);return t?t.getMediaFinishedInformation(e):{numberOfSegments:0,mediaTimeOfLastSignaledSegment:NaN}}},o={},a}pi.__dashjs_factory_name="SegmentsController";var mi=r.default.getClassFactory(pi);function Ei(){let e;return e={ntpToUTC:function(e){const t=new Date(Date.UTC(1900,0,1,0,0,0));return new Date(t.getTime()+e).getTime()}},e}Ei.__dashjs_factory_name="TimeUtils";var Ti=r.default.getSingletonFactory(Ei);function yi(e){e=e||{};let t,n,r,i,a,s,l,c,f,m,E,T,y,_,S,I,A,b,v=this.context,C=(0,d.default)(v).getInstance(),N=e.abrController,D=e.adapter,w=e.boxParser,M=e.capabilities,P=e.dashMetrics,O=e.errHandler,L=e.fragmentModel,U=e.manifestModel,x=e.mediaController,F=e.mediaPlayerModel,k=e.mimeType,B=e.playbackController,H=e.segmentBlacklistController,G=e.settings,Y=e.streamInfo,V=e.textController,q=e.timelineConverter,K=e.type;function j(){return Y.id}function W(){return K}function z(){m=[],i=null,n=0,A=!1,I=!1,T=!1,s=null,b=!1,ae()}function $(e){return!isNaN(e)&&!isNaN(Y.duration)&&isFinite(Y.duration)&&e>=Y.start+Y.duration}function Q(e,n=!0){if(e.sender)if(B.getIsManifestUpdateInProgress())J();else if((!i.isText||V.isTextEnabled())&&t&&e.representationId&&!t.appendInitSegmentFromCache(e.representationId)){const e=y.getCurrentRepresentation();if(0===e.range)return void X();const t=a?a.getInitRequest(i,e):null;t?L.executeRequest(t):n&&(_.setInitSegmentRequired(!0),J())}}function X(e,r=!0){if(B.getIsManifestUpdateInProgress()||t.getIsPruningInProgress())return void J();let o=function(){let e;if(isNaN(n)||W()===g.default.TEXT&&!V.isTextEnabled())return null;if(a){const t=Ie();e=A?a.getSegmentRequestForTime(i,t,n):I?a.repeatSegmentRequest(i,t):a.getNextSegmentRequest(i,t)}return e}();o?(A=!1,I=!1,function(e){isNaN(e.startTime+e.duration)||(n=e.startTime+e.duration),e.delayLoadingTime=(new Date).getTime()+_.getTimeToLoadDelay(),_.setTimeToLoadDelay(0),function(e){let t=e.url;return e.range&&(t=t.concat("_",e.range)),H.contains(t)}(e)?(f.warn(`Fragment request url ${e.url} for stream id ${Y.id} and media type ${K} is on the ignore list and will be skipped`),J()):(f.debug(`Next fragment request url for stream id ${Y.id} and media type ${K} is ${e.url} with request range ${e.range}`),L.executeRequest(e))}(o)):function(e){const t=y.getCurrentRepresentation();try{if(G.get().streaming.gaps.enableSeekFix&&(A||0===B.getTime())){let r;if(c?c&&t.segmentInfoType===Ce.default.SEGMENT_TIMELINE&&(r=function(e){return a.getValidTimeAheadOfTargetTime(n,i,e,G.get().streaming.gaps.threshold)}(t)):r=function(e){let t=a.getValidTimeAheadOfTargetTime(n,i,e,G.get().streaming.gaps.threshold);return isNaN(t)&&n>=e.adaptation.period.mpd.mediaPresentationDuration-e.segmentDuration&&(t=n-.1),t}(t),!isNaN(r)&&r!==n)return void function(e,t){B.isSeeking()||0===B.getTime()?(f.warn(`Adjusting playback time ${e} because of gap in the manifest. Seeking by ${e-n}`),B.seek(e,!1,!1)):(f.warn(`Adjusting buffering time ${e} because of gap in the manifest. Adjusting time by ${e-n}`),Pe(e),t&&J())}(r,e)}}catch(e){f.error(e)}Z()||e&&J()}(r)}function Z(){const e=y.getCurrentRepresentation(),r=a.isLastSegmentRequested(e,n);if(r){const e=a.getCurrentIndex();f.debug(`Segment requesting for stream ${Y.id} has finished`),C.trigger(h.default.STREAM_REQUESTING_COMPLETED,{segmentIndex:e},{streamId:Y.id,mediaType:K}),t.segmentRequestingCompleted(e),Se()}return r}function J(){const e=F.getScheduleTimeout();_.startScheduleTimer(e)}function ee(e){P.addBufferState(K,e.state,_.getBufferTarget()),e.state!==o.BUFFER_EMPTY||B.isSeeking()||(f.info("Buffer is empty! Stalling!"),P.pushPlayListTraceMetrics(new Date,cn.REBUFFERING_REASON))}function ne(e){L.syncExecutedRequestsWithBufferedRange(t.getBuffer().getAllBufferRanges(),Y.duration),e.quotaExceeded&&e.from>B.getTime()&&Pe(e.from),e.hasEnoughSpaceToAppend&&e.quotaExceeded&&_.startScheduleTimer()}function re(e){if(!e||!e.lastRequestAppended||!e.lastRequestAppended.url)return;let t=e.lastRequestAppended.url;e.lastRequestAppended.range&&(t=t.concat("_",e.lastRequestAppended.range)),f.warn(`Blacklisting segment with url ${t}`),H.add(t)}function ie(e){if(f.debug(`Appended bytes for ${e.mediaType} and stream id ${e.streamId}`),e.segmentType===R.HTTPRequest.INIT_SEGMENT_TYPE){const t=e.representationId;_.setLastInitializedRepresentationId(t),f.info("["+K+"] lastInitializedRepresentationId changed to "+t)}E&&E.enabled?de(E.newRepresentation,E.oldRepresentation):b||_.startScheduleTimer(0)}function ae(){E={newRepresentation:null,oldRepresentation:null,enabled:!1}}function oe(e){return new Promise(n=>{if(!y)return Promise.resolve();let r=null;var a;r=e.newRepresentation?{selectedRepresentation:(a=e).newRepresentation,currentMediaInfo:a.newMediaInfo}:null!==i&&D.areMediaInfosEqual(i,e.newMediaInfo)?function(e){return{currentMediaInfo:e.newMediaInfo,selectedRepresentation:y.getCurrentRepresentation()}}(e):function(e){let t=NaN;return t=!G.get().streaming.abr.autoSwitchBitrate[e.newMediaInfo.type]&&e.previouslySelectedRepresentation?e.previouslySelectedRepresentation.bitrateInKbit:N.getInitialBitrateFor(K),{selectedRepresentation:N.getOptimalRepresentationForBitrate(e.newMediaInfo,t,!1),currentMediaInfo:e.newMediaInfo}}(e),se(r.currentMediaInfo),C.trigger(),function(e){s&&e.selectedRepresentation.dependentRepresentation&&(f.info("["+K+"] selectMediaInfo : call selectMediaInfo on enhancementStreamProcessor for index = "+e.selectedRepresentation.absoluteIndex),s.selectMediaInfo(new Or({newMediaInfo:e.selectedRepresentation.mediaInfo,newRepresentation:e.selectedRepresentation})))}(r);
2const o=N.getPossibleVoRepresentations(i,!1);return y.updateData(o,i.isFragmented,r.selectedRepresentation.id).then(()=>{!function(){if(!t||!y)return;const e=y.getCurrentCompositeRepresentation();t.getIsBufferingCompleted()||t.updateBufferTimestampOffset(e)}(),n()}).catch(e=>{f.error(e),n()})})}function se(e){D.areMediaInfosEqual(i,e)||C.trigger(p.default.NEW_TRACK_SELECTED,{value:e}),i=e,N.handleNewMediaInfo(i),C.trigger(h.default.MEDIAINFO_UPDATED,{mediaType:K,streamId:Y.id,currentMediaInfo:i})}function ue(e){const n=e.newRepresentation,r=e.oldRepresentation,a=Oe();n&&r||f.warn("_handleDifferentSwitchTypes() is missing the target representations"),e.reason&&e.reason.forceReplace?function(e,n){L.abortRequests(),C.trigger(h.default.BUFFER_REPLACEMENT_STARTED,{mediaType:K,streamId:Y.id},{mediaType:K,streamId:Y.id}),_.setShouldCheckPlaybackQuality(!1),t.prepareForForceReplacementQualitySwitch(e,n).then(()=>{le()}).catch(()=>{le()})}(n,r):e&&e.reason&&e.reason.forceAbandon?function(e,n){t.prepareForAbandonQualitySwitch(e,n).then(()=>{ce()}).catch(()=>{ce()})}(n,r):!F.getFastSwitchEnabled()||a&&a.isPartialSegment?de(n,r):function(e,n){const r=B.getTime();let a=1.5*(isNaN(e.fragmentDuration)?1:e.fragmentDuration);const s=L.getRequests({state:te.FRAGMENT_MODEL_EXECUTED,time:r+a,threshold:0})[0];if(s&&!i.isText){const i=t.getBufferLevel(),u=N.getAbandonmentStateFor(Y.id,K),l=K===g.default.VIDEO&&e.dependentRepresentation?e.dependentRepresentation.bandwidth:e.bandwidth;s.bandwidth<l&&i>=a&&u===o.ALLOW_LOAD?t.prepareForFastQualitySwitch(e,n).then(()=>{fe(r,a)}).catch(()=>{fe(r,a)}):de(e,n)}else de(e,n)}(n,r),P.pushPlayListTraceMetrics(new Date,cn.REPRESENTATION_SWITCH_STOP_REASON),P.createPlaylistTraceMetrics(n.id,1e3*B.getTime(),B.getPlaybackRate())}function le(){De(),ae(),T=!1}function ce(){L.abortRequests(),I=!0,_.setShouldCheckPlaybackQuality(!1),_.startScheduleTimer(),T=!1}function fe(e,t){L.abortRequests(),Pe(e+t),_.setShouldCheckPlaybackQuality(!1),_.startScheduleTimer(),T=!1}function de(e,n){const r=L.getRequests({state:te.FRAGMENT_MODEL_LOADING});if(r&&r.length>0)return f.debug("Preparing for default quality switch: Waiting for ongoing segment request to be finished before applying switch."),E.newRepresentation=e,E.oldRepresentation=n,void(E.enabled=!0);t.prepareForDefaultQualitySwitch(e,n).then(()=>{he()}).catch(()=>{he()})}function he(){_.setShouldCheckPlaybackQuality(!1),i.segmentAlignment||i.subSegmentAlignment?_.startScheduleTimer():we(),ae(),T=!1}function ge(e){f.info("onFragmentLoadingAbandoned request: "+e.request.url+" has been aborted"),B.isSeeking()||_.getSwitchTrack()||T||(f.info("onFragmentLoadingAbandoned request: "+e.request.url+" has to be downloaded again, origin is not seeking process or switch track call"),e.request&&e.request.isInitializationRequest()?_.setInitSegmentRequired(!0):Pe(e.request.startTime+e.request.duration/2),_.startScheduleTimer(0))}function pe(e){f.info("OnFragmentLoadingCompleted for stream id "+Y.id+" and media type "+K+" - Url:",e.request?e.request.url:"undefined",e.request.range?", Range:"+e.request.range:""),i.isText&&_.startScheduleTimer(0),e.error&&e.request.serviceLocation&&function(e){f.info("Fragment loading completed with an error"),e&&e.request&&e.request.type&&(e.request.type===R.HTTPRequest.INIT_SEGMENT_TYPE?Q({representationId:e.request.representation.id,sender:{}},!1):e.request.type===R.HTTPRequest.MEDIA_SEGMENT_TYPE&&(Pe(e.request.startTime+e.request.duration/2),X(0,!1)))}(e)}function me(){Pe(B.getTime()),_e().startScheduleTimer()}function Ee(e){const n=e.currentTrackInfo;if(!n)return;const r=m.find(e=>e.index===n.index&&e.lang===n.lang);r&&oe(new Or({newMediaInfo:r})).then(()=>{t.setIsBufferingCompleted(!1),Pe(B.getTime()),_.setInitSegmentRequired(!0),_.startScheduleTimer()})}function Te(e){Pe(e.quotaExceededTime),Se()}function ye(){return t?t.getBuffer():null}function _e(){return _}function Se(){_&&_.clearScheduleTimer()}function Ie(e=NaN){let t;return isNaN(e)?t=y?y.getCurrentRepresentation():null:((0,Ge.checkInteger)(e),t=y?y.getRepresentationById(e):null),t}function Re(){return!!t&&t.getIsBufferingCompleted()}function be(e){if(!G.get().streaming.enableManifestTimescaleMismatchFix)return;const t=e.chunk,n=t.bytes,r=Ie(t.representation.id);r&&(r.timescale=w.getMediaTimescaleFromMoov(n))}function ve(e){const t=e.chunk,n=t.bytes,r=Ie(t.representation.id);if(r){let t;if(G.get().streaming.parseInbandPrft&&e.request.type===R.HTTPRequest.MEDIA_SEGMENT_TYPE){t=t||w.parse(n);const e=function(e,t){const n=e.getBoxes("prft"),r=[];
2return n.forEach(e=>{r.push(function(e,t){let n="unknown";switch(e.flags){case 0:n=Ce.default.PRODUCER_REFERENCE_TIME_TYPE.ENCODER;break;case 16:n=Ce.default.PRODUCER_REFERENCE_TIME_TYPE.APPLICATION;break;case 24:n=Ce.default.PRODUCER_REFERENCE_TIME_TYPE.CAPTURED}let r=1e3*e.ntp_timestamp_sec+e.ntp_timestamp_frac/2**32*1e3;return r=Ti(v).getInstance().ntpToUTC(r),{type:n,ntpTimestamp:r,mediaTime:e.media_time/t}}(e,t))}),r}(t,r.timescale);e&&e.length&&C.trigger(p.default.INBAND_PRFT,{data:e},{streamId:Y.id,mediaType:K})}const i=D.getEventsFor(r.mediaInfo,null,Y),a=D.getEventsFor(r,r,Y);if(i&&i.length>0||a&&a.length>0){const r=e.request;t=t||w.parse(n);const o=function(e,t,n,r){try{const i={},a=[],o=n.concat(r);for(let e=0,t=o.length;e<t;e++)i[o[e].schemeIdUri+"/"+o[e].value]=o[e];const s=e.getBoxes("emsg");if(!s||0===s.length)return a;const u=e.getBox("sidx"),l=!u||isNaN(u.earliest_presentation_time)||isNaN(u.timescale)?t&&!isNaN(t.mediaStartTime)?t.mediaStartTime:0:u.earliest_presentation_time/u.timescale,c=Math.max(l,0),f=y.getCurrentRepresentation();for(let e=0,t=s.length;e<t;e++){const t=D.getEvent(s[e],i,c,f);t&&a.push(t)}return a}catch(e){return[]}}(t,r,i,a);C.trigger(h.default.INBAND_EVENTS,{events:o},{streamId:Y.id})}}}function De(){const e=B.getTime();G.get().streaming.buffer.flushBufferAtTrackSwitch&&B.seek(e+.001,!1,!0),Pe(e),t.setSeekTarget(e),_.startScheduleTimer()}function we(){const e=B.getTime(),n=t.getContinuousBufferTimeForTargetTime(e);Pe(isNaN(n)?e:n),_.startScheduleTimer()}function Me(e){e&&!isNaN(e.time)&&(Pe(e.time),t.setSeekTarget(e.time))}function Pe(e){n=e,A=!0}function Oe(){return a.getLastSegment()}return l={checkAndHandleCompletedBuffering:Z,clearScheduleTimer:Se,createBufferSinks:function(e,n){const r=ye();return r?Promise.resolve(r):t?t.createBufferSink(i,e,n):Promise.resolve(null)},dischargePreBuffer:function(){t.dischargePreBuffer()},finalisePlayList:function(e,t){P.pushPlayListTraceMetrics(e,t)},getAllMediaInfos:function(){return m},getBuffer:ye,getBufferController:function(){return t},getBufferLevel:function(){return t?t.getBufferLevel():0},getFragmentModel:function(){return L},getLastSegment:Oe,getMediaInfo:function(){return i},getMediaSource:function(){return t.getMediaSource()},getRepresentation:Ie,getRepresentationController:function(){return y},getScheduleController:_e,getStreamId:j,getStreamInfo:function(){return Y},getType:W,initialize:function(i,o,s){S=mi(v).create({events:h.default,eventBus:C,streamInfo:Y,timelineConverter:q,dashConstants:Ce.default,segmentBaseController:e.segmentBaseController,type:K}),a=oi(v).create({baseURLController:e.baseURLController,boxParser:w,constants:g.default,dashConstants:Ce.default,dashMetrics:P,debug:(0,u.default)(v).getInstance(),errHandler:O,errors:Ae.default,eventBus:C,events:h.default,mediaPlayerModel:F,segmentsController:S,settings:G,streamInfo:Y,timelineConverter:q,type:K,urlUtils:(0,Ne.default)(v).getInstance()}),c=Y.manifestInfo.isDynamic,a.initialize(c),N.registerStreamType(K,l),y=ii(v).create({abrController:N,adapter:D,dashConstants:Ce.default,dashMetrics:P,errors:Ae.default,eventBus:C,events:h.default,isDynamic:c,playbackController:B,segmentsController:S,streamInfo:Y,timelineConverter:q,type:K}),t=function(e,t){let n=null;return e?(n=e!==g.default.TEXT||t?Gr(v).create({abrController:N,capabilities:M,errHandler:O,fragmentModel:L,manifestModel:U,mediaController:x,mediaPlayerModel:F,playbackController:B,representationController:y,settings:G,streamInfo:Y,textController:V,type:e}):qr(v).create({errHandler:O,fragmentModel:L,mimeType:k,settings:G,streamInfo:Y,textController:V,type:e}),n):(O.error(new He.default(Ae.default.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,Ae.default.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE+"not properly defined")),null)}(K,s),t&&t.initialize(i),_=jr(v).create({abrController:N,adapter:D,bufferController:t,dashMetrics:P,fragmentModel:L,mediaController:x,mediaPlayerModel:F,mimeType:k,playbackController:B,representationController:y,settings:G,streamInfo:Y,textController:V,type:K}),r=o,_.initialize(o),n=0,A=!1,I=!1},isBufferingCompleted:Re,prepareInnerPeriodPlaybackSeeking:function(e){return new Promise(n=>{if(t.hasBufferAtTime(e.seekTime))return t.pruneBuffer(),$(t.getContinuousBufferTimeForTargetTime(e.seekTime))&&t.setIsBufferingCompleted(!0),void n();Se(),L.abortRequests(),t.prepareForPlaybackSeek().then(()=>{const n=t.getAllRangesWithSafetyFactor(e.seekTime);return t.clearBuffers(n)}).then(()=>{const r=t.getContinuousBufferTimeForTargetTime(e.seekTime);if($(r))t.setIsBufferingCompleted(!0),n();else{const i=isNaN(r)?e.seekTime:r;Pe(i),t.setSeekTarget(i);const a=[];a.push(t.updateAppendWindow());const o=Ie();a.push(t.updateBufferTimestampOffset(o)),Promise.all(a).then(()=>{_.setInitSegmentRequired(!0),_.setShouldCheckPlaybackQuality(!1),_.startScheduleTimer(),n()})}}).catch(e=>{f.error(e)})})},prepareOuterPeriodPlaybackSeeking:function(){return new Promise((e,n
2)=>{try{Se(),L.abortRequests(),t.prepareForPlaybackSeek().then(()=>t.pruneAllSafely()).then(()=>{e()})}catch(e){n(e)}})},prepareQualityChange:function(e){e.newRepresentation&&(function(e){if(s)s.prepareQualityChange(e);else if(K===g.default.ENHANCEMENT){const t=e.oldRepresentation.mediaInfo.type,n=e.newRepresentation.mediaInfo.type;if(t===g.default.ENHANCEMENT&&n===g.default.VIDEO)return f.info("Stop "+K+" stream processor"),_.reset(),!0;if(t===g.default.VIDEO&&n===g.default.ENHANCEMENT)return f.info("Start "+K+" stream processor"),oe(new Or({newMediaInfo:e.newRepresentation.mediaInfo,newRepresentation:e.newRepresentation})).then(()=>{_.setup(),_.initialize(r),_.startScheduleTimer()}),!0}return!1}(e)||(E&&E.enabled&&f.warn(`Canceling queued representation switch to ${E.newRepresentation.id} for ${K}`),e.isAdaptationSetSwitch?(f.debug(`Preparing quality switch to different AdaptationSet for type ${K} from representation id ${e.oldRepresentation.id} to ${e.newRepresentation.id}`),function(e){const t=e.newRepresentation;T=!0,Se(),_.setSwitchTrack(!0);const n=t.mediaInfo;se(n),oe(new Or({newMediaInfo:n,newRepresentation:t})).then(()=>{ue(e)})}(e)):(f.debug(`Preparing quality within the same AdaptationSet for type ${K} from representation id ${e.oldRepresentation.id} to ${e.newRepresentation.id}`),function(e){const t=e.newRepresentation;T=!0,Se(),y.prepareQualityChange(t),ue(e)}(e))))},prepareTrackSwitch:function(e,n=!1){return new Promise(r=>{f.debug(`Preparing track switch for type ${K}`);const i=K===g.default.TEXT||n||G.get().streaming.trackSwitchMode[K]===g.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE&&B.getTimeToStreamEnd(Y)>G.get().streaming.buffer.stallThreshold;t.getIsBufferingCompleted()&&!i?function(e){return new Promise(n=>{const r=y.getCurrentRepresentation();t.prepareForNonReplacementTrackSwitch(r,e).then(()=>{C.trigger(h.default.BUFFERING_COMPLETED,{},{streamId:Y.id,mediaType:K}),n()}).catch(()=>{C.trigger(h.default.BUFFERING_COMPLETED,{},{streamId:Y.id,mediaType:K}),n()})})}(e).then(()=>{r()}):(_.setSwitchTrack(!0),i?function(e){return new Promise(n=>{C.trigger(h.default.BUFFER_REPLACEMENT_STARTED,{mediaType:K,streamId:Y.id},{mediaType:K,streamId:Y.id}),L.abortRequests();const r=Ie();t.prepareForReplacementTrackSwitch(r,e).then(()=>{De(),n()}).catch(()=>{De(),n()})})}(e).then(()=>{r()}):function(e){return new Promise(n=>{const r=()=>{const i=L.getRequests({state:te.FRAGMENT_MODEL_LOADING});if(i&&0!==i.length)C.once(p.default.FRAGMENT_LOADING_COMPLETED,r,l);else{const r=Ie();t.prepareForNonReplacementTrackSwitch(r,e).then(()=>{we(),n()}).catch(e=>{f.error(e),we(),n()})}};r()})}(e).then(()=>{r()}))})},probeNextRequest:function(){const e=Ie();return a.getNextSegmentRequestIdempotent(i,e)},reset:function(e,n){a&&a.reset(),t&&(t.reset(e,n),t=null),_&&(_.reset(),_=null),y&&(y.reset(),y=null),S&&(S=null),N&&N.unRegisterStreamType(j(),K),C.off(h.default.BUFFER_CLEARED,ne,l),C.off(h.default.BUFFER_LEVEL_STATE_CHANGED,ee,l),C.off(h.default.BYTES_APPENDED_END_FRAGMENT,ie,l),C.off(h.default.FRAGMENT_LOADING_ABANDONED,ge,l),C.off(h.default.FRAGMENT_LOADING_COMPLETED,pe,l),C.off(h.default.INIT_FRAGMENT_LOADED,be,l),C.off(h.default.INIT_FRAGMENT_NEEDED,Q,l),C.off(h.default.MEDIA_FRAGMENT_LOADED,ve,l),C.off(h.default.MEDIA_FRAGMENT_NEEDED,X,l),C.off(h.default.QUOTA_EXCEEDED,Te,l),C.off(h.default.SEEK_TARGET,Me,l),C.off(h.default.SET_FRAGMENTED_TEXT_AFTER_DISABLED,me,l),C.off(h.default.SET_NON_FRAGMENTED_TEXT,Ee,l),C.off(h.default.SOURCE_BUFFER_ERROR,re,l),z(),K=null,Y=null},selectMediaInfo:oe,setEnhancementStreamProcessor:function(e){s=e,f.info("enhancementStreamProcessor = "+s)},setExplicitBufferingTime:Pe,setMediaInfoArray:function(e){m=e},setMediaSource:function(e){return t.setMediaSource(e,i)},setTrackSwitchInProgress:function(e){b=e},updateStreamInfo:function(e){return Y=e,Re()?Promise.resolve():t.updateAppendWindow()}},f=(0,u.default)(v).getInstance().getLogger(l),z(),C.on(h.default.BUFFER_CLEARED,ne,l),C.on(h.default.BUFFER_LEVEL_STATE_CHANGED,ee,l),C.on(h.default.BYTES_APPENDED_END_FRAGMENT,ie,l),C.on(h.default.FRAGMENT_LOADING_ABANDONED,ge,l),C.on(h.default.FRAGMENT_LOADING_COMPLETED,pe,l),C.on(h.default.INIT_FRAGMENT_LOADED,be,l),C.on(h.default.INIT_FRAGMENT_NEEDED,Q,l),C.on(h.default.MEDIA_FRAGMENT_LOADED,ve,l),C.on(h.default.MEDIA_FRAGMENT_NEEDED,X,l),C.on(h.default.QUOTA_EXCEEDED,Te,l),C.on(h.default.SEEK_TARGET,Me,l),C.on(h.default.SET_FRAGMENTED_TEXT_AFTER_DISABLED,me,l),C.on(h.default.SET_NON_FRAGMENTED_TEXT,Ee,l),C.on(h.default.SOURCE_BUFFER_ERROR,re,l),l}yi.__dashjs_factory_name="StreamProcessor";var _i=r.default.getClassFactory(yi),Si=class{constructor(){this.url=null,this.width=null,this.height=null,this.x=null,this.y=null}},Ii=class{constructor(){this.bitrate=0,this.width=0,this.height=0,this.tilesHor=0,this.tilesVert=0,this.widthPerTile=0,this.heightPerTile=0,this.startNumber=0,this.segmentDuration=0,this.timescale=0,this.templateUrl="",this.id=""}},Ai=n(9838),Ri=n(447),bi=n(5099);function vi(e){const t=this.context,n=e.adapter,r=e.baseURLController,i=e.streamInfo,a=e.timelineConverter,o=e.debug,s=e.eventBus,u=e.events,l=e.dashConstants,c=(0,Ne.default)(t).getInstance();let f,d,h,p,m,E,T,y,_;function S(e,t){const i=new Ii;i.id=e.id,i.bitrate=e.bandwidth,i.width=e.width,i.height=e.height,i.tilesHor=1,i.tilesVert=1,e.essentialProperties&&e.essentialProperties.forEac
2h(e=>{if(g.default.THUMBNAILS_SCHEME_ID_URIS.indexOf(e.schemeIdUri)>=0&&e.value){const t=e.value.split("x");2!==t.length||isNaN(t[0])||isNaN(t[1])||(i.tilesHor=parseInt(t[0],10),i.tilesVert=parseInt(t[1],10))}}),t?T.updateSegmentData(e).then(t=>{!function(e,t,i){let o=[];const s=function(e,t){const r=[];let i,o,s,u,l=0;for(i=0,o=e.segments.length;i<o;i++)s=e.segments[i],u=ti({durationInTimescale:s.duration,fTimescale:s.timescale,index:l,isDynamic:n.getIsDynamic(),mediaRange:s.mediaRange,mediaTime:s.startTime,mediaUrl:s.media,representation:t,timelineConverter:a}),u&&(r.push(u),u=null,l++);return r}(i,t);t.segments=s,t.fragmentDuration=t.segmentDuration||(t.segments&&t.segments.length>0?t.segments[0].duration:NaN),e.segmentDuration=t.segments[0].duration,e.readThumbnail=function(e,n){let i=null;o.some(t=>{if(t.start<=e&&t.end>e)return i=t.url,!0}),i?n(i):t.segments.some(i=>{if(i.mediaStartTime<=e&&i.mediaStartTime+i.duration>e){const e=r.resolve(t.path),a=new Ri.default({method:"get",url:e.url,responseType:"arraybuffer",customData:{request:{range:i.mediaRange},onloadend:function(e){let t=_.getSamplesInfo(e.target.response),r=new Blob([e.target.response.slice(t.sampleList[0].offset,t.sampleList[0].offset+t.sampleList[0].size)],{type:"image/jpeg"}),a=window.URL.createObjectURL(r);o.push({start:i.mediaStartTime,end:i.mediaStartTime+i.duration,url:a}),n&&n(a)}}}),s=new bi.default({request:a});return y.load(a,s),!0}})}}(i,e,t)}):(i.startNumber=e.startNumber,i.segmentDuration=e.segmentDuration,i.timescale=e.timescale,i.templateUrl=function(e){const t=c.isRelative(e.media)?c.resolve(e.media,r.resolve(e.path).url):e.media;return t?Jr(t,e.id):""}(e)),i.tilesHor>0&&i.tilesVert>0&&(i.widthPerTile=i.width/i.tilesHor,i.heightPerTile=i.height/i.tilesVert,d.push(i))}function I(){d=[],h=[],m=-1,E=null,p&&(p.reset(),p=null)}return f={addTracks:function(){if(!i||!n)return;if(E=n.getMediaInfoForType(i,g.default.IMAGE),!E)return;const e=n.getVoRepresentations(E);e&&e.length>0&&e.forEach(e=>{(e.segmentInfoType===Ce.default.SEGMENT_TEMPLATE&&e.segmentDuration>0&&e.media||e.segmentInfoType===Ce.default.SEGMENT_TIMELINE)&&S(e),e.segmentInfoType===Ce.default.SEGMENT_BASE&&S(e,!0),h.push(e)}),d.length>0&&d.sort((e,t)=>e.bitrate-t.bitrate)},getCurrentTrack:function(){return m<0?null:d[m]},getCurrentTrackIndex:function(){return m},getRepresentations:function(){return h},getThumbnailRequestForTime:function(e){let t;const r=n.getVoRepresentations(E);for(let e=0;e<r.length;e++)if(d[m].id===r[e].id){t=r[e];break}return p.getSegmentRequestForTime(E,t,e)},getTracks:function(){return d},reset:I,setTrackById:function(e){if(!d||0===d.length)return;const t=d.findIndex(t=>t.id===e);-1!==t&&(m=t)},setTrackByIndex:function(e){d&&0!==d.length&&(e>=d.length&&(e=d.length-1),m=e)}},I(),y=(0,Ai.default)(t).create({}),_=tt(t).getInstance(),T=mi(t).create({events:u,eventBus:s,streamInfo:i,timelineConverter:a,dashConstants:l,dashMetrics:e.dashMetrics,segmentBaseController:e.segmentBaseController,type:g.default.IMAGE}),p=oi(t).create({streamInfo:i,type:g.default.IMAGE,timelineConverter:a,segmentsController:T,baseURLController:r,debug:o,eventBus:s,events:u,dashConstants:l,urlUtils:c}),p.initialize(!!n&&n.getIsDynamic()),f}vi.__dashjs_factory_name="ThumbnailTracks";var Ci=r.default.getClassFactory(vi);function Ni(e){const t=this.context,n=e.streamInfo;let r,i;function a(e){i.setTrackByIndex(e)}function o(){i&&i.reset()}return r={getCurrentTrack:function(){return i.getCurrentTrack()},getCurrentTrackIndex:function(){return i.getCurrentTrackIndex()},getPossibleVoRepresentations:function(){return i.getRepresentations()},getStreamId:function(){return n.id},initialize:function(){i.addTracks();const e=i.getTracks();e&&e.length>0&&a(0)},provide:function(e,t){if("function"!=typeof t)return;const n=i.getCurrentTrack();let r,a;if(!n||n.segmentDuration<=0||null==e)return void t(null);a=i.getThumbnailRequestForTime(e),a&&(n.segmentDuration=a.duration),r=e%n.segmentDuration;const o=Math.floor(r*n.tilesHor*n.tilesVert/n.segmentDuration),s=new Si;if(s.width=Math.floor(n.widthPerTile),s.height=Math.floor(n.heightPerTile),s.x=Math.floor(o%n.tilesHor)*n.widthPerTile,s.y=Math.floor(o/n.tilesHor)*n.heightPerTile,"readThumbnail"in n)return n.readThumbnail(e,e=>{s.url=e,t(s)});if(a)s.url=a.url,n.segmentDuration=NaN;else{const t=Math.floor(e/n.segmentDuration);s.url=function(e,t){const n=t+e.startNumber;return Jr(e.templateUrl,void 0,n,void 0,e.bandwidth,(n-1)*e.segmentDuration*e.timescale)}(n,t)}t(s)},reset:o,setTrackByIndex:a,setTrackById:function(e){i.setTrackById(e)}},o(),i=Ci(t).create({streamInfo:n,adapter:e.adapter,baseURLController:e.baseURLController,timelineConverter:e.timelineConverter,debug:e.debug,eventBus:e.eventBus,events:e.events,dashConstants:e.dashConstants,dashMetrics:e.dashMetrics,segmentBaseController:e.segmentBaseController}),r}
2Ni.__dashjs_factory_name="ThumbnailController";var Di=r.default.getClassFactory(Ni);const wi=[g.default.VIDEO,g.default.AUDIO,g.default.TEXT,g.default.MUXED,g.default.IMAGE];function Mi(e){e=e||{};const t=this.context,n=(0,d.default)(t).getInstance(),r=(0,Ne.default)(t).getInstance(),i=e.manifestModel,a=e.mediaPlayerModel,o=e.dashMetrics,s=e.manifestUpdater,l=e.adapter,c=e.timelineConverter,f=e.capabilities,m=e.errHandler,E=e.abrController,T=e.playbackController,y=e.throughputController,_=e.eventController,S=e.mediaController,I=e.protectionController,A=e.textController,R=e.videoModel;let b=e.streamInfo;const v=e.settings;let C,N,D,w,M,P,O,L,U,x,F,k,B,H,G,Y;function V(e,t,n){return new Promise((r,a)=>{Z(),ee();let o=R.getElement();const s=[];wi.forEach(t=>{if((t!==g.default.TEXT||e)&&(t!==g.default.VIDEO||!o||o&&/^VIDEO$/i.test(o.nodeName))){const r=n.find(e=>e.mediaInfo.type===t);s.push(q(t,e,r))}}),Promise.all(s).then(()=>function(e,t){return new Promise(n=>{const r={},i=H.map(n=>{const r=n.getRepresentation(),i=t.find(e=>e.mediaInfo.type===r.mediaInfo.type);return n.createBufferSinks(e,i)});Promise.all(i).then(e=>{e.forEach(e=>{e&&(r[e.getType()]=e)}),n(r)}).catch(()=>{n(r)})})}(t,n)).then(t=>{if(0===H.length){const e="No streams to play.";m.error(new He.default(Ae.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,e,i.getValue())),F.fatal(e)}else fe();e&&A.createTracks(b),r(t)}).catch(e=>{a(e)})})}function q(r,i,a){let o,s=l.getAllMediaInfoForType(b,r),u=[],c=null,f=-1;if(!s||0===s.length)return F.info("No "+r+" data."),Promise.resolve();r===g.default.VIDEO&&(P=!0),r===g.default.AUDIO&&(w=!0);for(let e=0,t=s.length;e<t;e++)c=s[e],r===g.default.TEXT&&c.isEmbedded&&(A.addEmbeddedTrack(b,c),u.push(c)),K(c)&&S.addTrack(c),c.type===g.default.ENHANCEMENT&&(f=e);if(u.length>0&&(S.setInitialMediaSettingsForType(r,b),A.addMediaInfosToBuffer(b,r,u)),s=s.filter(e=>!e.isEmbedded),0===s.length)return Promise.resolve();if(r===g.default.IMAGE)return G=Di(t).create({streamInfo:b,adapter:l,baseURLController:e.baseURLController,timelineConverter:e.timelineConverter,debug:N,eventBus:n,events:h.default,dashConstants:Ce.default,dashMetrics:e.dashMetrics,segmentBaseController:e.segmentBaseController}),G.initialize(),Promise.resolve();n.trigger(h.default.STREAM_INITIALIZING,{streamInfo:b,mediaInfo:c}),S.setInitialMediaSettingsForType(r,b);let d=j(s,i,r);if(f>=0){let e=new br(n);e.open(),e.duration=b.manifestInfo.duration;let t=j(s,e,g.default.ENHANCEMENT);t.selectMediaInfo(new Or({newMediaInfo:s[f]})),d.setEnhancementStreamProcessor(t)}if(o=S.getCurrentTrackFor(r,b.id),o){const e=r===g.default.TEXT&&o.isEmbedded?s[0]:o,t=new Or({newMediaInfo:e,previouslySelectedRepresentation:a});return d.selectMediaInfo(t)}return Promise.resolve()}function K(e){const t=e?e.type:null;let n;return t===g.default.MUXED?(n="Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines",F.fatal(n),m.error(new He.default(Ae.default.MANIFEST_ERROR_ID_MULTIPLEXED_CODE,n,i.getValue())),!1):!(t!==g.default.TEXT&&t!==g.default.IMAGE&&e.contentProtection&&e.contentProtection.length>0&&!f.supportsEncryptedMedia()&&(m.error(new He.default(Ae.default.CAPABILITY_MEDIAKEYS_ERROR_CODE,Ae.default.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE)),1))}function j(n,r,o){const s=n&&n.length>0?n.filter(e=>e.type===o)[0]:null;let u=D.getModel(s?s.type:null);const d=s?s.type:null,h=s?s.mimeType:null,p=s?s.isFragmented:null;let _=_i(t).create({abrController:E,adapter:l,baseURLController:e.baseURLController,boxParser:C,capabilities:f,dashMetrics:e.dashMetrics,errHandler:m,fragmentModel:u,manifestModel:i,mediaController:S,mediaPlayerModel:a,mimeType:h,playbackController:T,segmentBaseController:e.segmentBaseController,segmentBlacklistController:B,settings:v,streamInfo:b,textController:A,throughputController:y,timelineConverter:c,type:d});return _.initialize(r,P,p),H.push(_),_.setMediaInfoArray(n),d===g.default.TEXT&&A.addMediaInfosToBuffer(b,d,n,u),_}function W(e){let t=H?H.length:0;for(let n=0;n<t;n++){let t=H[n].getFragmentModel();t.abortRequests(),t.resetInitialSettings(),H[n].reset(!1,e)}A&&A.deactivateStream(b),G&&(G.reset(),G=null),H=[],L=!1,M=!1,de(!1),$(!1),n.trigger(h.default.STREAM_DEACTIVATED,{streamInfo:b})}function z(e){W(e),x=!1,P=!1,w=!1,U=!1,Y=[]}function $(e){U=e}function Q(){return b?b.start:NaN}function X(){return b?b.id:null}function Z(){if(!R||!E)throw new Error(g.default.MISSING_CONFIG_ERROR)}function J(e){e.error&&(m.error(e.error),F.fatal(e.error.message))}function ee(){if(_){const e=l.getEventsFor(b);e&&e.length>0&&_.addInlineEvents(e,b.id)}}function te(e){let t=ne(e);return t?t.getMediaInfo():null}function ne(e){return e?H.find(t=>t.getType()===e):null}function re(){let e=le();const t=e.length;if(0!==t){for(let n=0;n<t;n++)if(!e[n].isBufferingCompleted()&&(e[n].getType()===g.default.AUDIO||e[n].getType()===g.default.VIDEO))return void F.debug("onBufferingCompleted - One streamProcessor has finished but",e[n].getType(),"one is not buffering completed");F.debug("onBufferingCompleted - trigger STREAM_BUFFERING_COMPLETED"),M=!0,n.trigger(h.default.STREAM_BUFFERING_COMPLETED,{streamInfo:b},{streamInfo:b})}else F.warn("onBufferingCompleted - can't trigger STREAM_BUFFERING_COMPLETED because no streamProcessor is defined")}function ie(e){_&&_.addInbandEvents(e.events,b.id)}function ae(){fe()}function oe(){ee()}function se(e){return e&&e.type?ue(e.type):null}function ue(e){return e?le().filter(function(t){return t.getType()===e})[0]:null}function le(){let e,t,n=[];for(let r=0;r<H.length;r++)t=H[r],e=t.getType(),e!==g.default.AUDIO&&e!==g.default.VIDEO&&e!==g.default.TEXT&&e!==g.default.ENHANCEMENT||n.push(t);return n}function ce(){const e=H.length;for(let t=0;t<e&&H[t];t++)H[t].getScheduleController().startScheduleTimer()}function fe(){const e=H.length;if(I){I.clearMediaInfoArray();for(let t=0;t<e&&H[t];t++){const e=H[t].getType(),n=H[t].getMediaInfo();if(e===g.default.AUDIO||e===g.default.VIDEO||e===g.default.TEXT&&n&&n.isFragmented){let e=H[t].getMediaInfo();e&&I.initializeForMedia(e)}}I.handleKeySystemFromManifest()}x||(x=!0,R.waitForReadyState(g.default.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,()=>{n.trigger(h.default.STREAM_INITIALIZED,{streamInfo:b})}))}function de(e){k=e}function he(){return k}return O={activate:function(e,t,r=[]){return new Promise((i,a)=>
2{if(!L)return he()?(L=!0,n.trigger(h.default.STREAM_ACTIVATED,{streamInfo:b}),void i()):void function(e,t,n=[]){return V(e,t,n)}(e,t,r).then(()=>{L=!0,r&&r.length>0&&ce(),n.trigger(h.default.STREAM_ACTIVATED,{streamInfo:b}),i()}).catch(e=>{a(e)});i()})},checkAndHandleCompletedBuffering:function(){M||H.forEach(e=>{e.checkAndHandleCompletedBuffering()})},deactivate:W,getAdapter:function(){return l},getCurrentMediaInfoForType:function(e){const t=ue(e);return t?t.getMediaInfo():null},getCurrentRepresentationForType:function(e){const t=ue(e);return t?t.getRepresentation():null},getDuration:function(){return b?b.duration:NaN},getHasAudioTrack:function(){return w},getHasFinishedBuffering:function(){return M},getHasVideoTrack:function(){return P},getId:X,getIsActive:function(){return L},getIsEndedEventSignaled:function(){return U},getPreloaded:he,getRepresentationForTypeById:function(e,t){let n;if(e===g.default.IMAGE){if(!G)return null;n=G.getPossibleVoRepresentations()}else{const t=function(e){let t=ne(e);return t?t.getAllMediaInfos():[]}(e);n=t.flatMap(e=>E.getPossibleVoRepresentationsFilteredBySettings(e,!0))}if(!n||0===n.length)return null;const r=n.filter(e=>e.id===t);return r&&r.length>0?r[0]:null},getRepresentationForTypeByIndex:function(e,t){let n;if(e===g.default.IMAGE){if(!G)return null;n=G.getPossibleVoRepresentations()}else{const t=te(e);n=E.getPossibleVoRepresentationsFilteredBySettings(t,!0)}return n[t=Math.max(Math.min(t,n.length-1),0)]},getRepresentationsByType:function(e,t=!0){if(Z(),e===g.default.IMAGE)return G?G.getPossibleVoRepresentations():[];const n=te(e);return t?E.getPossibleVoRepresentationsFilteredBySettings(n,!0):E.getPossibleVoRepresentations(n,!0)},getStartTime:Q,getStreamId:function(){return b?b.id:null},getStreamInfo:function(){return b},getStreamProcessors:le,getThumbnailController:function(){return G},initialize:function(){n.on(h.default.BUFFERING_COMPLETED,re,O),n.on(h.default.INBAND_EVENTS,ie,O),n.on(h.default.DATA_UPDATE_COMPLETED,ae,O),n.on(p.default.PLAYBACK_SEEKED,oe,O),I&&(n.on(h.default.KEY_ERROR,J,O),n.on(h.default.SERVER_CERTIFICATE_UPDATED,J,O),n.on(h.default.LICENSE_REQUEST_COMPLETE,J,O),n.on(h.default.KEY_SYSTEM_SELECTED,J,O),n.on(h.default.KEY_SESSION_CREATED,J,O)),A.initializeForStream(b),n.trigger(h.default.STREAM_UPDATED,{streamInfo:b})},initializeForTextWithMediaSource:function(e){return new Promise((t,n)=>{q(g.default.TEXT,e,null).then(()=>function(){const e=ue(g.default.TEXT);return e?e.createBufferSinks():Promise.resolve()}()).then(()=>{A.createTracks(b),t()}).catch(e=>{n(e)})})},prepareQualityChange:function(e){const t=ue(e.mediaType);t&&t.prepareQualityChange(e)},prepareTrackChange:function(e){if(!L||!b)return;M=!1;let t=e.newMediaInfo,n=i.getValue(),r=se(t);if(!r)return;let a=T.getTime();if(F.info("Stream - Process track changed at current time "+a),n.refreshManifestOnSwitchTrack)Y.push(e),s.getIsUpdating()||(F.debug("Stream - Refreshing manifest for switch track"),s.refreshManifest());else{r.clearScheduleTimer(),r.setTrackSwitchInProgress(!0);const n=r.getRepresentation();r.selectMediaInfo(new Or({newMediaInfo:t})).then(()=>{const t=!!(e&&e.options&&e.options.hasOwnProperty("replaceBuffer"))&&e.options.replaceBuffer;return r.prepareTrackSwitch(n,t)}).then(()=>{r.setTrackSwitchInProgress(!1)})}},reset:function(e){D&&(D.reset(),D=null),E&&b&&E.clearDataForStream(b.id),B&&(B.reset(),B=null),A&&b&&A.clearDataForStream(b.id),S&&b&&S.clearDataForStream(b.id),z(e),b=null,n.off(h.default.BUFFERING_COMPLETED,re,O),n.off(h.default.INBAND_EVENTS,ie,O),n.off(h.default.DATA_UPDATE_COMPLETED,ae,O),n.off(p.default.PLAYBACK_SEEKED,oe,O),I&&(n.off(h.default.KEY_ERROR,J,O),n.off(h.default.SERVER_CERTIFICATE_UPDATED,J,O),n.off(h.default.LICENSE_REQUEST_COMPLETE,J,O),n.off(h.default.KEY_SYSTEM_SELECTED,J,O),n.off(h.default.KEY_SESSION_CREATED,J,O))},setIsEndedEventSignaled:$,setMediaSource:function(e){return new Promise((t,n)=>{const r=[];for(let t=0;t<H.length;)K(H[t].getMediaInfo())?(r.push(H[t].setMediaSource(e)),t++):(H[t].reset(),H.splice(t,1));Promise.all(r).then(()=>{for(let e=0;e<H.length;e++)H[e].dischargePreBuffer();if(0===H.length){const e="No streams to play.";m.error(new He.default(Ae.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,e+"nostreams",i.getValue())),F.fatal(e)}t()}).catch(e=>{F.error(e),n(e)})})},startPreloading:function(e,t,n=[]){return new Promise((r,i)=>{he()?i():(F.info(`[startPreloading] Preloading next stream with i
2d ${X()}`),de(!0),V(e,t,n).then(()=>{for(let e=0;e<H.length&&H[e];e++)H[e].setExplicitBufferingTime(Q()),H[e].getScheduleController().startScheduleTimer();r()}).catch(()=>{de(!1),i()}))})},startScheduleControllers:ce,triggerProtectionError:function(e){J(e)},updateData:function(e){return new Promise(t=>{b=e,_&&ee();let r,i=[];for(let e=0,t=H.length;e<t;e++){let t=H[e];const n=t.getMediaInfo();i.push(t.updateStreamInfo(b));let r=l.getAllMediaInfoForType(b,t.getType());if(r=r.filter(e=>!e.isEmbedded),t.setMediaInfoArray(r),r)for(let e=0;e<r.length;e++)l.areMediaInfosEqual(n,r[e])&&i.push(t.selectMediaInfo(new Or({newMediaInfo:r[e]})))}Promise.all(i).then(()=>{let e=[];for(;Y.length>0;){let t=Y.pop(),n=t.newMediaInfo;if(r=se(t.oldMediaInfo),!r)return;const i=r.getRepresentation();r.setTrackSwitchInProgress(!0),e.push(r.prepareTrackSwitch(i)),e.push(r.selectMediaInfo(new Or({newMediaInfo:n})))}return Promise.all(e)}).then(()=>{fe(),r&&r.setTrackSwitchInProgress(!1),n.trigger(h.default.STREAM_UPDATED,{streamInfo:b}),t()}).catch(e=>{m.error(e)})})}},function(){try{N=(0,u.default)(t).getInstance(),F=N.getLogger(O),z(),C=tt(t).getInstance(),B=Ue(t).create({updateEventName:h.default.SEGMENT_LOCATION_BLACKLIST_CHANGED,addBlacklistEventName:h.default.SEGMENT_LOCATION_BLACKLIST_ADD,enableExpiry:!1}),D=Pr(t).create({streamInfo:b,mediaPlayerModel:a,dashMetrics:o,errHandler:m,settings:v,boxParser:C,dashConstants:Ce.default,urlUtils:r})}catch(e){throw e}}(),O}Mi.__dashjs_factory_name="Stream";var Pi=r.default.getClassFactory(Mi);function Oi(){const e=this.context,t=(0,d.default)(e).getInstance(),n=(0,Ne.default)(e).getInstance();let r,i,a,o,s,l,c,f,g,p,m,E,T,y,_,S;function I(){f=[],g=[],p=null,m=null,T=null,E=NaN,a=!1,o=!1,y=s.get().streaming.utcSynchronization.timeBetweenSyncAttempts}function A(){s.get().streaming.utcSynchronization.enabled&&!a&&!o&&T&&T.value&&T.schemeIdUri&&!isNaN(E)&&!isNaN(s.get().streaming.utcSynchronization.backgroundAttempts)&&(m&&(Date.now()-m)/1e3<30||(f=[],o=!0,b(isNaN(s.get().streaming.utcSynchronization.backgroundAttempts)?2:s.get().streaming.utcSynchronization.backgroundAttempts)))}function b(e){try{if(e<=0)return void F();const t=Date.now();l[T.schemeIdUri](T.value,function(n){const r=Date.now(),i=C(t,r,n);f.push(i),b(e-1)},function(){F()})}catch(e){F()}}function v(e=null){let t=e||0;if(!g||0===g.length||t>=g.length)return void N();let n=g[t];if(n)if(l.hasOwnProperty(n.schemeIdUri)){const e=(new Date).getTime();l[n.schemeIdUri](n.value,function(t){const r=(new Date).getTime(),i=C(e,r,t);T=n,N(i)},function(){v(t+1)})}else v(t+1);else N()}function C(e,t,n){return n-(t-(t-e)/2)}function N(e=NaN){let t=isNaN(e);t&&s.get().streaming.utcSynchronization.useManifestDateHeaderTimeSource?function(){let e=c.getLatestMPDRequestHeaderValueByID("Date"),t=null!==e?new Date(e).getTime():Number.NaN;isNaN(t)?x(!0):x(!1,t-Date.now())}():x(t,e)}function D(e){let t=Date.parse(e);return isNaN(t)&&(t=function(e){let t,n,r=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+\-])([0-9]{2})([0-9]{2}))?/.exec(e);return t=Date.UTC(parseInt(r[1],10),parseInt(r[2],10)-1,parseInt(r[3],10),parseInt(r[4],10),parseInt(r[5],10),r[6]&&(parseInt(r[6],10)||0),r[7]&&1e3*parseFloat(r[7])||0),r[9]&&r[10]&&(n=60*parseInt(r[9],10)+parseInt(r[10],10),t+=("+"===r[8]?-1:1)*n*60*1e3),new Date(t).getTime()}(e)),t}function w(e){return Date.parse(e)}function M(e){return Date.parse(e)}function P(e,t,n){n()}function O(e,t,n){let r=D(e);isNaN(r)?n():t(r)}function L(e,t,r,i,a){let o,s,u=!1,l=new XMLHttpRequest,c=a?R.HTTPRequest.HEAD:R.HTTPRequest.GET,f=t.match(/\S+/g);if(t=f.shift(),o=function(){u||(u=!0,f.length?L(e,f.join(" "),r,i,a):i())},s=function(){let t,n;200===l.status&&(t=a?l.getResponseHeader("Date"):l.response,n=e(t),isNaN(n)||(r(n),u=!0))},n.isRelative(t)){const e=S.resolve();e&&(t=n.resolve(t,e.url))}l.open(c,t),l.timeout=5e3,l.onload=s,l.onloadend=o,l.send()}function U(e,t,n){L(M,e,t,n,!0)}function x(e,n){if(isNaN(E)||isNaN(n)||e||function(e){try{const t=k(e),n=isNaN(y)?30:y,r=isNaN(s.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor)?2:s.get().streaming.utcSynchronization.timeBetweenSyncAttemptsAdjustmentFactor,a=isNaN(s.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts)?600:s.get().streaming.utcSynchronization.maximumTimeBetweenSyncAttempts,o=isNaN(s.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts)?2:s.get().streaming.utcSynchronization.minimumTimeBetweenSyncAttempts;let u;t?(u=Math.min(n*r,a),i.debug(`Increasing timeBetweenSyncAttempts to ${u}`)):(u=Math.max(n/r,o),i.debug(`Decreasing timeBetweenSyncAttempts to ${u}`)),y=u}catch(e){}}(n),!e&&!isNaN(n)){p=Date.now(),a=!1;const e=isNaN(E);E=n,e&&A(),i.debug(`Completed UTC sync. Setting client - server offset to ${n}`)}e&&(T=null,a=!1,_.error(new He.default(Ae.default.TIME_SYNC_FAILED_ERROR_CODE,Ae.default.TIME_SYNC_FAILED_ERROR_MESSAGE)));const r=s.get().streaming.utcSynchronization.artificialTimeOffsetToApply;t.trigger(h.default.UPDATE_TIME_SYNC_OFFSET,{offset:n+r}),t.trigger(h.default.TIME_SYNCHRONIZATION_COMPLETED)}function F(){if(!f||0===f.length)return;const e=f.reduce((e,t)=>
2e+t,0)/f.length;k(e)?i.debug("Completed background UTC sync. Offset is within allowed threshold and is not adjusted."):(i.debug(`Completed background UTC sync. Setting client - server offset to ${e}`),E=e,t.trigger(h.default.UPDATE_TIME_SYNC_OFFSET,{offset:E})),o=!1,m=Date.now()}function k(e){try{if(isNaN(E))return!0;const t=s.get().streaming.utcSynchronization.maximumAllowedDrift&&!isNaN(s.get().streaming.utcSynchronization.maximumAllowedDrift)?s.get().streaming.utcSynchronization.maximumAllowedDrift:100;return e>=E-t&&e<=E+t}catch(e){return!0}}return r={initialize:function(){I(),l={"urn:mpeg:dash:utc:http-head:2014":U,"urn:mpeg:dash:utc:http-xsdate:2014":L.bind(null,D),"urn:mpeg:dash:utc:http-iso:2014":L.bind(null,w),"urn:mpeg:dash:utc:direct:2014":O,"urn:mpeg:dash:utc:http-head:2012":U,"urn:mpeg:dash:utc:http-xsdate:2012":L.bind(null,D),"urn:mpeg:dash:utc:http-iso:2012":L.bind(null,w),"urn:mpeg:dash:utc:direct:2012":O,"urn:mpeg:dash:utc:http-ntp:2014":P,"urn:mpeg:dash:utc:ntp:2014":P,"urn:mpeg:dash:utc:sntp:2014":P}},attemptSync:function(e,n){g=e,a||(function(e){try{if(!e||!s.get().streaming.utcSynchronization.enabled)return!1;const t=isNaN(y)?30:y;return!(p&&t&&!isNaN(t))||(Date.now()-p)/1e3>=t}catch(e){return!0}}(n)?(a=!0,v()):t.trigger(h.default.TIME_SYNCHRONIZATION_COMPLETED))},setConfig:function(e){e&&(e.dashMetrics&&(c=e.dashMetrics),e.baseURLController&&(S=e.baseURLController),e.errHandler&&(_=e.errHandler),e.settings&&(s=e.settings))},reset:function(){I(),t.off(h.default.ATTEMPT_BACKGROUND_SYNC,A,r)}},i=(0,u.default)(e).getInstance().getLogger(r),t.on(h.default.ATTEMPT_BACKGROUND_SYNC,A,r),r}Oi.__dashjs_factory_name="TimeSyncController";const Li=r.default.getSingletonFactory(Oi);Li.HTTP_TIMEOUT_MS=5e3,r.default.updateSingletonFactory(Oi.__dashjs_factory_name,Li);var Ui=Li;function xi(){let e,t,n,r,i;const a=this.context,o=(0,d.default)(a).getInstance();return e={attachMediaSource:function(e){let n=window.URL.createObjectURL(t);return e.setSource(n),"managedMediaSource"===r&&(e.setDisableRemotePlayback(!0),t.addEventListener("startstreaming",()=>{o.trigger(p.default.MANAGED_MEDIA_SOURCE_START_STREAMING)}),t.addEventListener("endstreaming",()=>{o.trigger(p.default.MANAGED_MEDIA_SOURCE_END_STREAMING)})),n},createMediaSource:function(){let e="WebKitMediaSource"in window,n="MediaSource"in window;return"ManagedMediaSource"in window?(t=new ManagedMediaSource,r="managedMediaSource",i.info("Created ManagedMediaSource")):n?(t=new MediaSource,r="mediaSource",i.info("Created MediaSource")):e&&(t=new WebKitMediaSource,i.info("Created WebkitMediaSource")),t},detachMediaSource:function(e){e.setSource(null)},setConfig:function(e){e&&e.settings&&(n=e.settings)},setDuration:function e(r){t&&"open"===t.readyState&&(null===r&&isNaN(r)||t.duration!==r&&(r!==1/0||n.get().streaming.buffer.mediaSourceDurationInfinity||(r=Math.pow(2,32)),function(e){let t=e.sourceBuffers;for(let e=0;e<t.length;e++)if(t[e].updating)return!0;return!1}(t)?setTimeout(e.bind(null,r),50):(i.info("Set MediaSource duration:"+r),t.duration=r)))},setSeekable:function(e,n){t&&"function"==typeof t.setLiveSeekableRange&&"function"==typeof t.clearLiveSeekableRange&&"open"===t.readyState&&e>=0&&e<n&&(t.clearLiveSeekableRange(),t.setLiveSeekableRange(e,n))},signalEndOfStream:function(e){if(!e||"open"!==e.readyState)return;let t=e.sourceBuffers;for(let e=0;e<t.length;e++){if(t[e].updating)return;if(0===t[e].buffered.length)return}i.info("call to mediaSource endOfStream"),e.endOfStream()}},i=(0,u.default)(a).getInstance().getLogger(e),e}xi.__dashjs_factory_name="MediaSourceController";var Fi=r.default.getSingletonFactory(xi);function ki(){const e="urn:mpeg:dash:event:2012",t="updated",n="added";function r(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}const i=this.context,a=(0,d.default)(i).getInstance();let o,s,l,c,f,h,g,m,E,T,y;function _(){if(!g||!m)throw new Error("setConfig function has to be called previously")}function S(){y=!1,l={},c={},f=null,T=!1,h=Date.now()/1e3}function I(){try{if(!T){T=!0;const e=m.getTime();let t=e-h;t=h>0?Math.max(0,t):0,A(c,t,e),A(l,t,e),R(c),R(l),h=e,T=!1}}catch(e){T=!1,s.error(e)}}function A(e,t,n){try{const r=function(r){if(void 0!==r){const i=isNaN(r.duration)?0:r.duration;r.calculatedPresentationTime<=n&&r.calculatedPresentationTime+t+i>=n?w(r,p.default.EVENT_MODE_ON_START):(D(n,i+t,r.calculatedPresentationTime)||function(e){try{const t=e.eventStream.period.start+e.eventStream.period.duration;return e.calculatedPresentationTime>t}catch(e){return s.error(e),!1}}(r))&&(s.debug(`Removing event ${r.id}
2 from period ${r.eventStream.period.id} as it is expired or invalid`),function(e,t){try{const n=t.eventStream.schemeIdUri,r=t.eventStream.period.id,i=t.eventStream.value,a=t.id;e[r][n]=e[r][n].filter(e=>i&&e.eventStream.value&&e.eventStream.value!==i||e.id!==a),0===e[r][n].length&&delete e[r][n]}catch(e){s.error(e)}}(e,r))}};N(e,r)}catch(e){s.error(e)}}function R(e){try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&r(e[t])&&delete e[t]}catch(e){s.error(e)}}function b(e,r,i=!1){const a=e.eventStream.schemeIdUri,o=e.eventStream.value,s=e.id;let u="discarded";r[a]||(r[a]=[]);const l=r[a].findIndex(e=>(!o||e.eventStream.value&&e.eventStream.value===o)&&e.id===s);if(-1===l)r[a].push(e),e.triggeredReceivedEvent=!1,e.triggeredStartEvent=!1,u=n;else if(i){const n=r[a][l];e.triggeredReceivedEvent=n.triggeredReceivedEvent,e.triggeredStartEvent=n.triggeredStartEvent,r[a][l]=e,u=t}return u}function v(e){try{if(1==e.eventStream.value){const t=e.calculatedPresentationTime;let n;n=4294967295==e.calculatedPresentationTime?NaN:e.calculatedPresentationTime+e.duration,a.trigger(p.default.MANIFEST_VALIDITY_CHANGED,{id:e.id,validUntil:t,newDuration:n,newManifestValidAfter:NaN},{mode:p.default.EVENT_MODE_ON_START})}}catch(e){s.error(e)}}function C(e){try{const t=m.getTime();N(e,function(e){const n=e.eventStream&&e.eventStream.period&&!isNaN(e.eventStream.period.duration)?e.eventStream.period.duration:NaN,r=e.eventStream&&e.eventStream.period&&!isNaN(e.eventStream.period.start)?e.eventStream.period.start:NaN;if(isNaN(n)||isNaN(r))return;const i=e.calculatedPresentationTime;Math.abs(i-t)<300&&w(e,p.default.EVENT_MODE_ON_START)})}catch(e){s.error(e)}}function N(e,t){try{if(e)for(const n in e){const r=e[n];for(const e in r){const n=r[e];for(let e=0;e<n.length;e++){const r=n[e];void 0!==r&&t(r)}}}}catch(e){s.error(e)}}function D(e,t,n){try{return e-t>n}catch(e){return s.error(e),!1}}function w(t,n){try{const r=m.getTime(),o=t.id;if(n===p.default.EVENT_MODE_ON_RECEIVE&&!t.triggeredReceivedEvent)return s.debug(`Received event ${o}`),t.triggeredReceivedEvent=!0,void a.trigger(t.eventStream.schemeIdUri,{event:t},{mode:n});t.triggeredStartEvent||(t.eventStream.schemeIdUri===e&&1==t.eventStream.value?0===t.duration&&0===t.presentationTimeDelta||(s.debug(`Starting manifest refresh event ${o} at ${r}`),function(){try{_(),g.refreshManifest()}catch(e){s.error(e)}}()):"urn:mpeg:dash:event:callback:2015"===t.eventStream.schemeIdUri&&1==t.eventStream.value?(s.debug(`Starting callback event ${o} at ${r}`),function(e){try{let t=(0,Ai.default)(i).create({});const n=new Ri.default({method:"get",url:e,responseType:"arraybuffer",customData:{}}),r=new bi.default({request:n});t.load(n,r)}catch(e){s.error(e)}}(t.messageData instanceof Uint8Array?Me.default.uint8ArrayToString(t.messageData):t.messageData)):(s.debug(`Starting event ${o} from period ${t.eventStream.period.id} at ${r}`),a.trigger(t.eventStream.schemeIdUri,{event:t},{mode:n}),E.get().streaming.events.deleteEventMessageDataTimeout>-1&&setTimeout(()=>{delete t.messageData,delete t.parsedMessageData},E.get().streaming.events.deleteEventMessageDataTimeout)),t.triggeredStartEvent=!0)}catch(e){s.error(e)}}return o={addInlineEvents:function(e,r){try{if(_(),l[r]||(l[r]={}),e)for(let i=0;i<e.length;i++){let a=e[i];if(!D(m.getTime(),isNaN(a.duration)?0:a.duration,a.calculatedPresentationTime)){let e=b(a,l[r],!0);e===n?(s.debug(`Added inline event with id ${a.id} from period ${r}`),w(a,p.default.EVENT_MODE_ON_RECEIVE)):e===t&&s.debug(`Updated inline event with id ${a.id} from period ${r}`)}}}catch(e){throw e}},addInbandEvents:function(t,r){try{_(),c[r]||(c[r]={});for(let i=0;i<t.length;i++){let a=t[i];D(m.getTime(),isNaN(a.duration)?0:a.duration,a.calculatedPresentationTime)||(b(a,c[r],!1)===n?(a.eventStream.schemeIdUri===e&&v(a),s.debug(`Added inband event with id ${a.id} from period ${r}`),w(a,p.default.EVENT_MODE_ON_RECEIVE)):s.debug(`Inband event with scheme_id_uri ${a.eventStream.schemeIdUri}, value ${a.eventStream.value}, period id ${r} and event id ${a.id} was ignored because it has been added before.`))}I()}catch(e){throw e}},getInbandEvents:function(){return c},getInlineEvents:function(){return l},start:function(){try{_(),s.debug("Start Event Controller");const e=E.get().streaming.events.eventControllerRefreshDelay;y||isNaN(e)||(y=!0,f=setInterval(I,e))}catch(e){throw e}},setConfig:function(e){try{if(!e)return;e.manifestUpdater&&(g=e.manifestUpdater),e.playbackController&&(m=e.playbackController),e.settings&&(E=e.settings)}catch(e){throw e}},reset:function(){(function(){try{null!==f&&y&&(clearInterval(f),f=null,y=!1,function(){try{C(c),C(l)}catch(e){s.error(e)}}())}catch(e){throw e}})(),S()}},s=(0,u.default)(i).getInstance().getLogger(o),S(),o}ki.__dashjs_factory_name="EventController";var Bi=r.default.getSingletonFactory(ki),Hi={LEVELS:{SUGGESTION:"Suggestion",WARNING:"Warning",ERROR:"Error"},EVENTS:{NO_UTC_TIMING_ELEMENT:{key:"NO_UTC_TIMING_ELEMENT",message:"No UTCTiming element is present in the manifest. You may experience playback failures. For a detailed validation use https://conformance.dashif.org/"},NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE:{key:"NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE",message:'SMPTE 2052-1:2013 defines the attribute name as "imageType" and does not define "imagetype"'},INVALID_DVR_WINDOW:{key:"INVALID_DVR_WINDOW",message:"No valid segment found when applying a specification compliant DVR window calculation. Using SegmentTimeline entries as a fallback."}}},Gi=n(5313),Yi=n(445),Vi=n(1923);function qi(){const e=this.context,t=(0,d.default)(e).getInstance();let n,r,i,a,s,l,c,f,m,E,T,y,_,S,I,A,R,b,v,C,N,D,w,M,P,O,L,U,x,F,k,B,H,G,Y,V,q,K,j,W,z,$,Q,X,Z,J,ee,te;function ne(){if(!(l&&l.hasOwnProperty("load")&&D&&D.hasOwnProperty("initialize")&&D.hasOwnProperty("reset")&&D.hasOwnProperty("getClientTimeOff
2set")&&c&&N&&m&&Y))throw new Error(g.default.MISSING_CONFIG_ERROR)}function re(){!function(){try{const e=f.getStreamsInfo();if(!M&&0===e.length)throw new Error("There are no periods in the MPD");M&&e.length>0&&m.updateManifestUpdateInfo({currentTime:Y.getTime(),buffered:G.getBufferRange(),presentationStartTime:e[0].start,clientTimeOffset:D.getClientTimeOffset()}),w.length>0&&function(e){0!==e.length?w=w.filter(t=>{const n=e.filter(e=>e.id===t.getId()).length>0||t.getId()===M.getId();return n||(r.debug(`Removing stream ${t.getId()}`),t.reset(!0),t=null),n}):r.warn("No periods included in the current manifest. Skipping the filtering of outdated stream objects.")}(e);const n=[];for(let t=0,r=e.length;t<r;t++){const r=e[t];n.push(ae(r)),m.addManifestUpdateStreamInfo(r)}Promise.all(n).then(()=>new Promise((t,n)=>{M?t():oe(e,t,n)})).then(()=>{t.trigger(h.default.STREAMS_COMPOSED),De()}).catch(e=>{throw e})}catch(e){N.error(new He.default(Ae.default.MANIFEST_ERROR_ID_NOSTREAMS_CODE,e.message+" nostreamscomposed",c.getValue())),B=!0,Ze()}}()}function ie(){Z=!0}function ae(t){let n=$e(t.id);return n?n.updateData(t):(n=Pi(e).create({manifestModel:c,mediaPlayerModel:q,dashMetrics:m,manifestUpdater:s,adapter:f,timelineConverter:D,capabilities:i,capabilitiesFilter:a,errHandler:N,baseURLController:_,segmentBaseController:S,textController:O,abrController:A,playbackController:Y,throughputController:R,eventController:v,mediaController:b,protectionController:P,videoModel:G,streamInfo:t,settings:X}),w.push(n),n.initialize(),Promise.resolve())}function oe(e,n,i){try{_e();const a=m.getCurrentDVRInfo().range;if(a.end<a.start)return void function(e,n,i,a){J&&clearTimeout(J);const o=Math.min(1e3*(-1*(e.end-e.start)+2),2147483647);r.debug(`Waiting for ${o} ms before playback can start`),t.trigger(h.default.AST_IN_FUTURE,{delay:o}),J=setTimeout(()=>{oe(n,i,a)},o)}(a,e,n,i);X.get().streaming.applyProducerReferenceTime&&V.calculateProducerReferenceTimeOffsets(e);const o=e[0].manifestInfo;if(X.get().streaming.applyServiceDescription&&V.applyServiceDescription(o),f.getIsDynamic()){const e=Fe(o);Y.computeAndSetLiveDelay(e,o)}(X.get().streaming.applyContentSteering&&y.shouldQueryBeforeStart()?y.loadSteeringData():Promise.resolve()).then(()=>{const e=c.getValue();e&&_.update(e),se(),n()}).catch(e=>{r.error(e),se(),n()})}catch(e){i(e)}}function se(){const e=function(){let e;return e=f.getIsDynamic()?function(){let e;const t=m.getCurrentDVRInfo();e=(t&&t.range?t.range.end:0)-Y.getOriginalLiveDelay();const n=t?t.range:null;if(n){if(isNaN(ee)&&-1===ee.toString().indexOf("posix:")){const t=Le(!0);isNaN(t)||(r.info(`Start time from URI parameters: ${t}`),e=Math.min(e,t))}else{r.info(`Start time provided by the app: ${ee}`);const t=Ue(!0,ee);isNaN(t)||(e=Math.min(e,t))}const t=X.get().streaming.timeShiftBuffer.calcFromSegmentTimeline?.1:0;e=Math.max(e,n.start+t)}return e}():function(){let e=et()[0].getStreamInfo().start;if(isNaN(ee)){const t=Le(!1);isNaN(t)||(r.info(`Start time from URI parameters: ${t}`),e=Math.max(e,t))}else{r.info(`Start time provided by the app: ${ee}`);const t=Ue(!1,ee);isNaN(t)||(e=Math.max(e,t))}return e}(),e}();let n=ye(e);const i=null!==n?n:w[0];t.trigger(h.default.INITIAL_STREAM_SWITCH,{startTime:e}),ue(i,null,e),$||($=setInterval(function(){!F&&Y.getTimeToStreamEnd()<=0&&!Y.isSeeking()&&t.trigger(h.default.PLAYBACK_ENDED,{isLast:ze().isLast})},200))}function ue(e,n,i){try{if(F||!e||n===e&&e.getIsActive())return;F=!0,t.trigger(h.default.PERIOD_SWITCH_STARTED,{fromStreamInfo:n?n.getStreamInfo():null,toStreamInfo:e.getStreamInfo()});let a=!1,o=[],s=de(n);M=e,n&&(a=Ee(e,n),o=fe(n),n.deactivate(a)),i=isNaN(i)?!a&&n?e.getStreamInfo().start:NaN:i,r.info(`Switch to stream ${e.getId()}. Seektime is ${i}, current playback time is ${Y.getTime()}. Seamless period switch is set to ${a}`),Q=Q.filter(e=>e.getId()!==M.getId()),Y.initialize(ze(),!!n),G.getElement()?le({seekTime:i,keepBuffers:a,sourceBufferSinksFromPreviousPeriod:s,streamActivated:!1,representationsFromPreviousPeriod:o}):ce({seekTime:i,keepBuffers:a,sourceBufferSinksFromPreviousPeriod:s})}catch(e){F=!1}}function le(e){let t;function n(){if(!H||"open"!==H.readyState)return;r.debug("MediaSource is open!"),window.URL.revokeObjectURL(t),H.removeEventListener("sourceopen",n),H.removeEventListener("webkitsourceopen",n),Oe();const i=m.getCurrentDVRInfo();E.setSeekable(i.range.start,i.range.end),e.streamActivated?(isNaN(e.seekTime)||Y.seek(e.seekTime,!0,!0),M.setMediaSource(H).then(()=>{M.initializeForTextWithMediaSource(H)})):ce(e)}function i(){H.addEventListener("sourceopen",n,!1),H.addEventListener("webkitsourceopen",n,!1),t=E.attachMediaSource(G),r.debug("MediaSource attached to element. Waiting on open...")}H?e.keepBuffers?ce(e):(E.detachMediaSource(G),i()):(H=E.createMediaSource(),i())}function ce(e){const n=e.representationsFromPreviousPeriod||[];M.activate(H,e.sourceBufferSinksFromPreviousPeriod,n).then(()=>{isNaN(e.seekTime)||(t.trigger(h.default.SEEK_TARGET,{time:e.seekTime},{streamId:M.getId()}),Y.seek(e.seekTime,!1,!0),M.startScheduleControllers()),F=!1,t.trigger(h.default.PERIOD_SWITCH_COMPLETED,{toStreamInfo:ze()})})}function fe(e){return(e?e.getStreamProcessors():[]).map(e=>e.getRepresentation())}function de(e){const t=new Map;
2return e?((e?e.getStreamProcessors():[]).forEach(e=>{const n=e.getBuffer();n&&t.set(n.getType(),n)}),t):t}function he(e){const t=ye(e.seekTime);t&&t!==M?t&&t!==M&&(ge(t),function(e,t){const n=e&&!isNaN(e.seekTime)?e.seekTime:NaN,r=M.getStreamProcessors().map(t=>t.prepareOuterPeriodPlaybackSeeking(e));Promise.all(r).then(()=>{ue(t,M,n)}).catch(e=>{N.error(e)})}(e,t)):(ge(),function(e){M.getStreamProcessors().forEach(t=>t.prepareInnerPeriodPlaybackSeeking(e)),Ve(cn.USER_REQUEST_STOP_REASON)}(e)),qe(ln.SEEK_START_REASON)}function ge(e=null){pe()}function pe(){Q&&Q.length>0&&(Q.forEach(e=>{e.deactivate(!0)}),Q=[])}function me(e){if(e.newMediaInfo.streamInfo.id===M.getId()){if(pe(),X.get().streaming.buffer.resetSourceBuffersForTrackSwitch&&e.oldMediaInfo&&e.oldMediaInfo.codec!==e.newMediaInfo.codec){const e=Y.getTime();return M.deactivate(!1),void le({seekTime:e,keepBuffers:!1,streamActivated:!1})}M.prepareTrackChange(e)}}function Ee(e,t){try{return X.get().streaming.buffer.reuseExistingSourceBuffers&&(i.isProtectionCompatible(t.getStreamInfo(),e.getStreamInfo())||Z)&&i.supportsChangeType()&&X.get().streaming.buffer.useChangeType}catch(e){return!1}}function Te(e,t=null){if(!H||e.getPreloaded())return;if(!Ee(e,t))return;const n=fe(t),r=de(t);
2e.startPreloading(H,r,n).then(()=>{Q.push(e)})}function ye(e){if(isNaN(e))return null;const t=w.length;for(let n=0;n<t;n++){const t=w[n];if(e<parseFloat((t.getStartTime()+t.getDuration()).toFixed(5)))return t}return null}function _e(){try{const e=f.getIsDynamic(),t=f.getStreamsInfo()[0].manifestInfo,n=Y.getTime(),r=D.calcTimeShiftBufferWindow(w,e),i=Me();if(void 0===r.start||void 0===r.end)return;i&&0!==i.length?i.forEach(e=>{m.addDVRInfo(e.getType(),n,t,r)}):m.addDVRInfo(g.default.VIDEO,n,t,r)}catch(e){}}function Se(e){if(W&&x){const e=q.getInitialBufferLevel(),t=[g.default.TEXT];(isNaN(e)||e<=Y.getBufferLevel(t)||f.getIsDynamic()&&e>Y.getLiveDelay())&&(W=!1,qe(ln.INITIAL_PLAYOUT_START_REASON),Y.play())}e&&e.mediaType&&m.addBufferLevel(e.mediaType,new Date,1e3*e.bufferLevel)}function Ie(e){e.streamInfo.id===M.getId()&&pe(),$e(e.streamInfo.id).prepareQualityChange(e)}function Re(){if(f.getIsDynamic()&&0!==Y.getOriginalLiveDelay()&&M){const e=f.getStreamsInfo();if(e.length>0){const t=e[0].manifestInfo,n=Fe(t);Y.computeAndSetLiveDelay(n,t)}}}function be(){if(Ge()){const e=G.getPlaybackQuality();e&&m.addDroppedFrames(e)}}function ve(){r.debug("[onPlaybackStarted]"),!W&&j&&qe(ln.RESUME_FROM_PAUSE_START_REASON),W&&(W=!1),z&&(z=!1,X.get().streaming.applyContentSteering&&!y.shouldQueryBeforeStart()&&y.loadSteeringData()),j=!1}function Ce(e){r.debug("[onPlaybackPaused]"),e.ended||(j=!0,Ve(cn.USER_REQUEST_STOP_REASON))}function Ne(e){r.debug(`Stream with id ${e.streamInfo.id} finished buffering`);const t=e.streamInfo.isLast;H&&t?(r.info("[onStreamBufferingCompleted] calls signalEndOfStream of mediaSourceController."),E.signalEndOfStream(H)):De()}function De(){if(!M)return;if(!M.getHasFinishedBuffering())return void M.checkAndHandleCompletedBuffering();const e=function(e=null){try{const t=e||M||null;if(t){const e=t.getStreamInfo();return w.filter(function(t){const n=t.getStreamInfo();return n.start>e.start&&e.id!==n.id})}}catch(e){return[]}}(M);let t=0;for(;t<e.length;){const n=e[t],r=0===t?M:e[t-1];!n.getPreloaded()&&r.getHasFinishedBuffering()&&Te(n,r),t+=1}}function we(){$&&(clearInterval($),$=null)}function Me(){return M?M.getStreamProcessors():[]}function Pe(e){if(M&&!M.getIsEndedEventSignaled()){M.setIsEndedEventSignaled(!0);const e=function(e=null){const t=e||M||null;if(!t)return null;const n=t.getStreamInfo(),r=n.start;let i=0,a=-1,o=NaN;for(;i<w.length;){const e=w[i].getStreamInfo(),t=e.start-r;t>0&&(isNaN(o)||t<o)&&n.id!==e.id&&(o=t,a=i),i+=1}return a>=0?w[a]:null}();e?(r.debug(`StreamController onEnded, found next stream with id ${e.getStreamInfo().id}. Switching from ${M.getStreamInfo().id} to ${e.getStreamInfo().id}`),ue(e,M,NaN)):(r.debug("StreamController no next stream found"),M.setIsEndedEventSignaled(!1)),Ve(e?cn.END_OF_PERIOD_STOP_REASON:cn.END_OF_CONTENT_STOP_REASON)}e&&e.isLast&&(we(),y.stopSteeringRequestTimer())}function Oe(e){const t=e||ze().manifestInfo.duration;E.setDuration(t)}function Le(e){const t=I.getURIFragmentData();if(!t||!t.t)return NaN;const n=et()[0].getStreamInfo().start;return t.t=t.t.split(",")[0],xe(e,t.t,n)}function Ue(e,t){let n=0;return e||(n=et()[0].getStreamInfo().start),xe(e,t,n)}function xe(e,t,n){const r=f.getRegularPeriods()[0],i=t.toString(),a=-1!==i.indexOf("posix:")?"now"===i.substring(6)?Date.now()/1e3:parseFloat(i.substring(6)):NaN;return e&&!isNaN(a)?D.calcPresentationTimeFromWallTime(new Date(1e3*a),r):parseFloat(i)+n}function Fe(e){try{return e&&Number.isFinite(e.maxFragmentDuration)?e.maxFragmentDuration:NaN}catch(e){return NaN}}function ke(){const e=c.getValue();_.initialize(e)}function Be(e){if(e.error)B=!0,Ze();else{r.info("Manifest updated... updating data system wide.");const n=e.manifest;f.updatePeriods(n),a.filterUnsupportedFeatures(n).then(()=>{_.initialize(n);let e=f.getUTCTimingSources();!f.getIsDynamic()||e&&0!==e.length||t.trigger(p.default.CONFORMANCE_VIOLATION,{level:Hi.LEVELS.WARNING,event:Hi.EVENTS.NO_UTC_TIMING_ELEMENT});let r=f.getIsDynamic()?e.concat(K.getUTCTimingSources()):e;T.attemptSync(r,f.getIsDynamic()),U.createFinalQueryStrings(n)})}}function Ge(){return!!M&&M.getHasVideoTrack()}function Ye(){return!!M&&M.getHasAudioTrack()}
2function Ve(e,t){t=t||new Date,Me().forEach(n=>{n.finalisePlayList(t,e)}),m.addPlayList()}function qe(e){m.createPlaylistMetrics(1e3*Y.getTime(),e)}function Ke(e){P.updateKeyStatusesMap(e),function(){const e=Me();let r=!1;e.forEach(e=>{const t=e.getMediaInfo();!t||i.areKeyIdsUsable(t)?t&&i.areKeyIdsExpired(t)&&function(e){const t=$e(e.getStreamId());t&&t.triggerProtectionError({error:new He.default(Vi.default.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE,Vi.default.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE)})}(e):(r=!0,function(e){const t=e.getAllMediaInfos().filter(e=>i.areKeyIdsUsable(e));if(t&&0!==t.length)b.setTrack(t[0],{replaceBuffer:!0});else{const t=e.getType();N.error(new He.default(Ae.default.NO_SUPPORTED_KEY_IDS,`Type: ${t}: ${Ae.default.NO_SUPPORTED_KEY_IDS_MESSAGE}`))}}(e))}),r&&(0===Y.getTime()?t.once(p.default.FRAGMENT_LOADING_COMPLETED,()=>{je()},n):Y.isProgressing(500).then(e=>{e||je()}))}()}function je(){const e=Y.getTime();Y.seek(e+.01,!1,!1)}function We(e){if(!e.error)return;let t;switch(e.error.code){case 1:t="MEDIA_ERR_ABORTED";break;case 2:t="MEDIA_ERR_NETWORK";break;case 3:t="MEDIA_ERR_DECODE",te.counts.mediaErrorDecode+=1;break;case 4:t="MEDIA_ERR_SRC_NOT_SUPPORTED";break;case 5:t="MEDIA_ERR_ENCRYPTED";break;default:t="UNKNOWN"}"MEDIA_ERR_DECODE"===t&&X.get().errors.recoverAttempts.mediaErrorDecode>=te.counts.mediaErrorDecode?function(){r.error("A MEDIA_ERR_DECODE occured: Resetting the MediaSource");const e=Y.getTime();M.deactivate(!1),r.info(`MediaSource has been resetted. Resuming playback from time ${e}`),le({seekTime:e,keepBuffers:!1,streamActivated:!1})}():(k=!0,e.error.message&&(t+=" ("+e.error.message+")"),e.error.msExtendedCode&&(t+=" (0x"+(e.error.msExtendedCode>>>0).toString(16).toUpperCase()+")"),r.fatal("Video Element Error: "+t),e.error&&r.fatal(e.error),N.error(new He.default(e.error.code,t)),Ze())}function ze(){return M?M.getStreamInfo():null}function $e(e){for(let t=0,n=w.length;t<n;t++)if(w[t].getId()===e)return w[t];return null}function Qe(e){isNaN(e.newDuration)||Oe(e.newDuration)}function Xe(){w=[],ee=NaN,P=null,F=!1,M=null,k=!1,B=!1,W=!0,z=!0,j=!1,x=!0,$=null,Z=!1,Q=[],J=null,te={counts:{mediaErrorDecode:0}}}function Ze(){ne(),T.reset(),Ve(k||B?cn.FAILURE_STOP_REASON:cn.USER_REQUEST_STOP_REASON);for(let e=0,t=w?w.length:0;e<t;e++)w[e].reset(k);t.off(p.default.PLAYBACK_TIME_UPDATED,be,n),t.off(p.default.PLAYBACK_SEEKING,he,n),t.off(p.default.PLAYBACK_ERROR,We,n),t.off(p.default.PLAYBACK_STARTED,ve,n),t.off(p.default.PLAYBACK_PAUSED,Ce,n),t.off(p.default.PLAYBACK_ENDED,Pe,n),t.off(p.default.METRIC_ADDED,Je,n),t.off(p.default.MANIFEST_VALIDITY_CHANGED,Qe,n),t.off(p.default.BUFFER_LEVEL_UPDATED,Se,n),t.off(p.default.QUALITY_CHANGE_REQUESTED,Ie,n),t.off(p.default.CONTENT_STEERING_REQUEST_COMPLETED,ke,n),h.default.KEY_SESSION_UPDATED&&t.off(h.default.KEY_SESSION_UPDATED,ie,n),t.off(h.default.MANIFEST_UPDATED,Be,n),t.off(h.default.STREAM_BUFFERING_COMPLETED,Ne,n),t.off(h.default.TIME_SYNCHRONIZATION_COMPLETED,re,n),t.off(h.default.CURRENT_TRACK_CHANGED,me,n),t.off(h.default.SETTING_UPDATED_LIVE_DELAY,Re,n),t.off(h.default.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,Re,n),t.off(Yi.default.INTERNAL_KEY_STATUSES_CHANGED,Ke,n),_.reset(),s.reset(),v.reset(),m.clearAllCurrentMetrics(),c.setValue(null),l.reset(),D.reset(),C.reset(),H&&(E.detachMediaSource(G),H=null),G=null,P&&(P=null,L=null,c.getValue()&&t.trigger(h.default.PROTECTION_DESTROYED,{data:c.getValue().url})),we(),t.trigger(h.default.STREAM_TEARDOWN_COMPLETE),Xe()}function Je(e){if(e.metric===o.DVR_INFO){const t=Ye()?g.default.AUDIO:g.default.VIDEO;e.mediaType===t&&E.setSeekable(e.value.range.start,e.value.range.end)}}function et(){return w}return n={addDVRMetric:_e,getActiveStream:function(){return M},getActiveStreamInfo:ze,getActiveStreamProcessors:Me,getAutoPlay:function(){return x},getHasMediaOrInitialisationError:function(){return k||B},getInitialPlayback:function(){return W},getIsStreamSwitchInProgress:function(){return F},getProtectionData:function(){return P?P.getProtectionData():null},getStreamById:$e,getStreamForTime:ye,getStreams:et,getTimeRelativeToStreamId:function(e,t){let n=null,r=0,i=0,a=null;for(let o=0;o<w.length;o++){if(n=w[o],i=n.getStartTime(),a=n.getDuration(),Number.isFinite(i)&&(r=i),n.getId()===t)return e-r;Number.isFinite(a)&&(r+=a)}return null},hasAudioTrack:Ye,hasVideoTrack:Ge,initialize:function(r,i){ne(),x=r,L=i,D.initialize(),s=Qn(e).create(),s.setConfig({manifestModel:c,adapter:f,manifestLoader:l,errHandler:N,settings:X,contentSteeringController:y}),s.initialize(),v=Bi(e).getInstance(),v.setConfig({manifestUpdater:s,playbackController:Y,settings:X}),v.start(),U=(0,Gi.default)(e).getInstance(),T.setConfig({dashMetrics:m,baseURLController:_,errHandler:N,settings:X}),T.initialize(),E.setConfig({settings:X}),P&&(t.trigger(h.default.PROTECTION_CREATED,{controller:P}),P.setMediaElement(G.getElement()),L&&P.setProtectionData(L)),t.on(p.default.PLAYBACK_TIME_UPDATED,be,n),t.on(p.default.PLAYBACK_SEEKING,he,n),t.on(p.default.PLAYBACK_ERROR,We,n),t.on(p.default.PLAYBACK_STARTED,ve,n),t.on(p.default.PLAYBACK_PAUSED,Ce,n),t.on(p.default.PLAYBACK_ENDED,Pe,n),t.on(p.default.METRIC_ADDED,Je,n),t.on(p.default.MANIFEST_VALIDITY_CHANGED,Qe,n),t.on(p.default.BUFFER_LEVEL_UPDATED,Se,n),t.on(p.default.QUALITY_CHANGE_REQUESTED,Ie,n),t.on(p.default.CONTENT_STEERING_REQUEST_COMPLETED,ke,n),h.default.KEY_SESSION_UPDATED&&t.on(h.default.KEY_SESSION_UPDATED,ie,n),t.on(h.default.MANIFEST_UPDATED,Be,n),t.on(h.default.STREAM_BUFFERING_COMPLETED,Ne,n),t.on(h.default.TIME_SYNCHRONIZATION_COMPLETED,re,n),t.on(h.default.CURRENT_TRACK_CHANGED,me,n),t.on(h.default.SETTING_UPDATED_LIVE_DELAY,Re,n),t.on(h.default.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,Re,n),t.on(Yi.default.INTERNAL_KEY_STATUSES_CHANGED,Ke,n)},load:function(e,t=NaN){ne(),ee=t,l.load(e)},loadWithManifest:function(e,t=NaN){!function(){if(!s||!s.hasOwnProperty("setManifest"))throw new Error("initialize function has to be called previously")}(),ee=t,s.setManifest(e)},refreshManifest:function(){s.getIsUpdating()||s.refreshManifest()},reset:Ze,setConfig:function(e){e&&(e.capabilities&&(i=e.capabilities),e.capabilitiesFilter&&(a=e.capabilitiesFilter),e.manifestLoader&&(l=e.manifestLoader),e.manifestModel&&(c=e.manifestModel),e.mediaPlayerModel&&(q=e.mediaPlayerModel),e.customParametersModel&&(K=e.customParametersModel),e.protectionController&&(P=e.protectionController),e.adapter&&(f=e.adapter),e.dashMetrics&&(m=e.dashMetrics),e.errHandler&&(N=e.errHandler),e.timelineConverter&&(D=e.timelineConverter),e.videoModel&&(G=e.videoModel),e.playbackController&&(Y=e.playbackController),e.throughputController&&(R=e.throughputController),e.serviceDescriptionController&&(V=e.serviceDescriptionController),e.contentSteeringController&&(y=e.contentSteeringController),e.textController&&(O=e.textController),e.abrController&&(A=e.abrController),e.mediaController&&(b=e.mediaController),e.settings&&(X=e.settings),e.baseURLController&&(_=e.baseURLController),e.uriFragmentModel&&(I=e.uriFragmentModel),e.segmentBaseController&&(S=e.segmentBaseController),e.manifestUpdater&&(s=e.manifestUpdater))},setProtectionData:function(e){L=e,P&&P.setProtectionData(L)},switchToVideoElement:function(e){M&&(Y.initialize(ze()),le({seekTime:e,keepBuffers:!1,streamActivated:!0}))}},r=(0,u.default)(e).getInstance().getLogger(n),T=Ui(e).getInstance(),E=Fi(e).getInstance(),C=bt(e).getInstance(),Xe(),n}qi.__dashjs_factory_name="StreamController";var Ki=r.default.getSingletonFactory(qi),ji=class extends vt{constructor(){super(),this.captionData=null,this.label=null,this.defaultTrack=!1,this.kind=null,this.isFragmented=!1,this.isEmbedded=!1,this.isTTML=null}},Wi=n(7377);function zi(){let e,t=0;function n(e){let t="";for(let n=0;n<e.length;++n)t+=e[n].uchar;return t.length-t.replace(/^\s+/,"").length}function r(e){return"left: "+3.125*e.x+"%; top: "+6.66*e.y1+"%; width: "+(100-3.125*e.x)+"%; height: "+6.66*Math.max(e.y2-1-e.y1,1)+"%; align-items: flex-start; overflow: visible; -webkit-writing-mode: horizontal-tb;"}function i(e){return"red"===e?"rgb(255, 0, 0)":"green"===e?"rgb(0, 255, 0)":"blue"===e?"rgb(0, 0, 255)":"cyan"===e?"rgb(0, 255, 255)":"magenta"===e?"rgb(255, 0, 255)":"yellow"===e?"rgb(255, 255, 0)":"white"===e?"rgb(255, 255, 255)":"black"===e?"rgb(0, 0, 0)":e}function a(e,t){const n=e.videoHeight/15;return t?"font-size: "+n+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; color: "+(t.foreground?i(t.foreground):"rgb(255, 255, 255)")+"; font-style: "+(t.italics?"italic":"normal")+"; text-decoration: "+(t.underline?"underline":"none")+"; white-space: pre; background-color: "+(t.background?i(t.background):"transparent")+";":"font-size: "+n+"px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; justify-content: flex-start; text-align: left; color: rgb(255, 255, 255); font-style: normal; white-space: pre; line-height: normal; font-weight: normal; text-decoration: none; width: 100%; display: flex;"}function o(e){return e.replace(/^\s+/g,"")}function s(e){return e.replace(/\s+$/g,"")}return e={createHTMLCaptionsFromScreen:function(e,i,u,l){let c=null,f=null,d=!1,h=-1,g={start:i,end:u,spans:[]},p="style_cea608_white_black";const m={},E={},T=[];let y,_;for(y=0;y<15;++y){const e=l.rows[y];let t="",r=null;if(!1===e.isEmpty()){const a=n(e.chars);null===c&&(c={x:a,y1:y,y2:y+1,p:[]}),a!==h&&d&&(c.p.push(g),g={start:i,end:u,spans:[]},c.y2=y,c.name="region_"+c.x+"_"+c.y1+"_"+c.y2,!1===m.hasOwnProperty(c.name)?(T.push(c),m[c.name]=c):(f=m[c.name],f.p.contat(c.p)),c={x:a,y1:y,y2:y+1,p:[]});for(let n=0;n<e.chars.length;++n){const i=e.chars[n],a=i.penState;
2if(null===r||!a.equals(r)){t.trim().length>0&&(g.spans.push({name:p,line:t,row:y}),t="");let e="style_cea608_"+a.foreground+"_"+a.background;a.underline&&(e+="_underline"),a.italics&&(e+="_italics"),E.hasOwnProperty(e)||(E[e]=JSON.parse(JSON.stringify(a))),r=a,p=e}t+=i.uchar}t.trim().length>0&&g.spans.push({name:p,line:t,row:y}),d=!0,h=a}else d=!1,h=-1,c&&(c.p.push(g),g={start:i,end:u,spans:[]},c.y2=y,c.name="region_"+c.x+"_"+c.y1+"_"+c.y2,!1===m.hasOwnProperty(c.name)?(T.push(c),m[c.name]=c):(f=m[c.name],f.p.contat(c.p)),c=null)}c&&(c.p.push(g),c.y2=y+1,c.name="region_"+c.x+"_"+c.y1+"_"+c.y2,!1===m.hasOwnProperty(c.name)?(T.push(c),m[c.name]=c):(f=m[c.name],f.p.contat(c.p)),c=null);const S=[];for(y=0;y<T.length;++y){const n=T[y],l="sub_cea608_"+t++,c=document.createElement("div");c.id=l;const f=r(n);c.style.cssText="position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;"+f;const d=document.createElement("div");d.className="paragraph bodyStyle",d.style.cssText=a(e);const h=document.createElement("div");h.className="cueUniWrapper",h.style.cssText="unicode-bidi: normal; direction: ltr;";for(let t=0;t<n.p.length;++t){const r=n.p[t];let i=0;for(_=0;_<r.spans.length;++_){let t=r.spans[_];if(t.line.length>0){if(0!==_&&i!=t.row){const e=document.createElement("br");e.className="lineBreak",h.appendChild(e)}let n=!1;i===t.row&&(n=!0),i=t.row;const u=E[t.name],l=document.createElement("span");l.className="spanPadding "+t.name+" customSpanColor",l.style.cssText=a(e,u),0!==_&&n?_===r.spans.length-1?l.textContent=s(t.line):l.textContent=t.line:r.spans.length>1&&_<r.spans.length-1&&t.row===r.spans[_+1].row?l.textContent=o(t.line):l.textContent=t.line.trim(),h.appendChild(l)}}}d.appendChild(h),c.appendChild(d);const g={bodyStyle:["%",90]};for(const e in E)E.hasOwnProperty(e)&&(g[e]=["%",90]);S.push({type:"html",start:i,end:u,cueHTMLElement:c,cueID:l,cellResolution:[32,15],isFromCEA608:!0,fontSize:g,lineHeight:{},linePadding:{}})}return S}},e}zi.__dashjs_factory_name="EmbeddedTextHtmlRender";var $i=r.default.getSingletonFactory(zi),Qi=class{constructor(){this.time=null,this.verboseLevel=0}log(e,t){this.verboseLevel>=e&&"function"==typeof t&&t()}},Xi=class{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){for(const t of["foreground","underline","italics","background","flash"])Object.prototype.hasOwnProperty.call(e,t)&&(this[t]=e[t])}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}},Zi=class{constructor(){this.uchar=" ",this.penState=new Xi}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()}};const Ji=100,ea={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};function ta(e){return String.fromCharCode(ea[e]||e)}var na=class{constructor(e=new Qi){this.chars=[],this.cueStartTime=null,this.pos=0,this.currPenState=new Xi;for(let e=0;e<Ji;e++)this.chars.push(new Zi);this.logger=e}equals(e){for(let t=0;t<Ji;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<Ji;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<Ji;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e}
2setCursor(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>Ji&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=Ji)}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=ta(e);this.pos>=Ji?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<Ji;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 n=0;n<Ji;n++){const r=this.chars[n].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}};const ra=15;var ia=class{constructor(e=new Qi){this.rows=[],this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null;for(let t=0;t<ra;t++)this.rows.push(new na(e));this.logger=e}reset(){for(let e=0;e<ra;e++)this.rows[e].clear();this.currRow=14}equals(e){let t=!0;for(let n=0;n<ra;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t}copy(e){for(let t=0;t<ra;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<ra;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<ra;e++)this.rows[e].clear();const e=this.currRow+1-this.nrRollUpRows,n=this.lastOutputScreen;if(n){const r=n.rows[e].cueStartTime,i=this.logger.time;if(null!==r&&null!==i&&r<i)for(let r=0;r<this.nrRollUpRows;r++)this.rows[t-this.nrRollUpRows+r+1].copy(n.rows[e+r])}}this.currRow=t;const n=this.rows[this.currRow];if(null!==e.indent){const t=e.indent,r=Math.max(t-1,0);n.setCursor(e.indent),e.color=n.chars[r].penState.foreground}const r={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(r)}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 n="",r=-1;for(let n=0;n<ra;n++){const i=this.rows[n].getTextString();i&&(r=n+1,e?t.push("Row "+r+": '"+i+"'"):t.push(i.trim()))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n}getTextAndFormat(){return this.rows}},aa=class{constructor(e,t,n=new Qi){this.chNr=e,this.outputFilter=t,this.mode=null,this.displayedMemory=new ia(n),this.nonDisplayedMemory=new ia(n),this.lastOutputScreen=new ia(n),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n,this.logger.log(2,"new Cea608Channel("+this.chNr+")")}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.setRollUpRows(null),this.nonDisplayedMemory.setRollUpRows(null)),this.mode=e)}insertChars(e){for(const t of e)this.writeScreen.insertChar(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})}
2ccRDC(){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};t.underline=e%2==1,t.italics=e>=46,t.italics?t.foreground="white":t.foreground=["white","green","blue","cyan","red","yellow","magenta"][Math.floor(e/2)-16],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))}};const oa=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];function sa(e,t,n){return n.a===e&&n.b===t}function ua(e){const t=[];for(const n of e)t.push(n.toString(16));return t}const la={17:2,18:4,21:6,22:8,23:10,19:13,20:15},ca={25:2,26:4,29:6,30:8,31:10,27:13,28:15},fa={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},da={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14};function ha(e,t,n){n.a=e,n.b=t}var ga=class{constructor(e,t,n){this.currentChannel=0,this.cmdHistory={a:null,b:null},this.lastTime=null;const r=this.logger=new Qi;this.channels=[null,new aa(e,t,r),new aa(e+1,n,r)]}addData(e,t){this.lastTime=e,this.logger.time=e;for(let n=0;n<t.length;n+=2){const r=127&t[n],i=127&t[n+1];let a=!1,o=null;if(null!==this.lastTime&&(e=this.lastTime+.5*n*1001/3e4,this.logger.time=e),0===r&&0===i)continue;this.logger.log(3,()=>"["+ua([t[n],t[n+1]])+"] -> ("+ua([r,i])+")");const s=this.cmdHistory;if(r>=16&&r<=31){if(sa(r,i,s)){ha(null,null,s),this.logger.log(3,()=>"Repeated command ("+ua([r,i])+") is dropped");continue}ha(r,i,this.cmdHistory),a=this.parseCmd(r,i),a||(a=this.parseMidrow(r,i)),a||(a=this.parsePAC(r,i)),a||(a=this.parseBackgroundAttributes(r,i))}else ha(null,null,s);if(!a&&(o=this.parseChars(r,i),o.length)){const e=this.currentChannel;e&&e>0?this.channels[e].insertChars(o):this.logger.log(2,"No channel found yet. TEXT-MODE?")}a||o||this.logger.log(2,()=>"Couldn't parse cleaned data "+ua([r,i])+" orig: "+ua([t[n],t[n+1]]))}}parseCmd(e,t){if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=33&&t<=35))return!1;const n=20===e||21===e||23===e?1:2,r=this.channels[n];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),this.currentChannel=n,!0}parseMidrow(e,t){let n=0;if((17===e||25===e)&&t>=32&&t<=47){if(n=17===e?1:2,n!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const r=this.channels[n];return!!r&&(r.ccMIDROW(t),this.logger.log(3,()=>"MIDROW ("+ua([e,t])+")"),!0)}return!1}parsePAC(e,t){let n;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127||(16===e||24===e)&&t>=64&&t<=95))return!1;const r=e<=23?1:2;n=t>=64&&t<=95?1===r?fa[e]:da[e]:1===r?la[e]:ca[e];const i=this.channels[r];return!!i&&(i.setPAC(this.interpretPAC(n,t)),this.currentChannel=r,!0)}interpretPAC(e,t){let n;const r={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>
295?t-96:t-64,r.underline=!(1&~n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r}parseChars(e,t){let n,r=[],i=null;if(e>=25?(n=2,i=e-8):(n=1,i=e),i>=17&&i<=19){let e;e=17===i?t+80:18===i?t+112:t+144,this.logger.log(2,()=>"Special char '"+ta(e)+"' in channel "+n),r=[e]}else e>=32&&e<=127&&(r=0===t?[e]:[e,t]);return r&&this.logger.log(3,()=>"Char codes = "+ua(r).join(",")),r}parseBackgroundAttributes(e,t){if(!((16===e||24===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=45&&t<=47))return!1;let n;const r={};16===e||24===e?(n=Math.floor((t-32)/2),r.background=oa[n],t%2==1&&(r.background=r.background+"_semi")):45===t?r.background="transparent":(r.foreground="black",47===t&&(r.underline=!0));const i=e<=23?1:2;return this.channels[i].setBkgData(r),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}ha(null,null,this.cmdHistory)}cueSplitAtTime(e){for(const t of this.channels)t&&t.cueSplitAtTime(e)}};function pa(e,t,n){const r=[];for(let i=t;i<n;i++)i+2<n&&0===e.getUint8(i)&&0===e.getUint8(i+1)&&3===e.getUint8(i+2)?(r.push(0),r.push(0),i+=2):r.push(e.getUint8(i));return new DataView(new Uint8Array(r).buffer)}function ma(e,t,n,r){return!(4!==e||t<8)&&181===n.getUint8(r)&&49===n.getUint16(r+1)&&1195456820===n.getUint32(r+3)&&3===n.getUint8(r+7)}function Ea(e,t){return(127&e)>0||(127&t)>0}function Ta(e,t){const n=e.getUint8(t),r=31&n;if(6===r)return{nalType:r,headerSize:1};const i=n>>1&63;if(39===i||40===i)return{nalType:i,headerSize:2};if(t+1>=e.byteLength)return null;const a=e.getUint8(t+1)>>3&31;return 23===a||24===a?{nalType:a,headerSize:2}:null}function ya(e,t){let n=0;for(;n<e.byteLength-1;){let i,a=0,o=0;do{a+=i=e.getUint8(n++)}while(255===i);do{o+=i=e.getUint8(n++)}while(255===i);if(ma(a,o,e,n)){const i=n+10,a=i+3*(31&e.getUint8(i-2));for(let n=i;n<a;n+=3){const i=e.getUint8(n);if(4&i){const a=3&i;if(0===(r=a)||1===r){const r=e.getUint8(n+1),i=e.getUint8(n+2);Ea(r,i)&&t[a].push(r,i)}}}}n+=o}var r}function _a(e,t,n){let r=0;const i=[[],[]];for(let a=t;a<t+n-6;a++){r=e.getUint32(a);const o=a+4+r;if(o>t+n)break;const s=Ta(e,a+4);if(s){const t=a+4+s.headerSize;o<=e.byteLength&&ya(pa(e,t,o),i)}a+=r+3}return i}function Sa(e){const t=e.errHandler,n=e.manifestModel,r=e.mediaController,i=e.videoModel,a=e.textTracks,o=e.vttParser,s=e.vttCustomRenderingParser,l=e.ttmlParser,c=e.streamInfo,f=e.settings,p=this.context,m=(0,d.default)(p).getInstance();let E,T,y,_,S,I,A,b,v,C,N,D,w,M,P,O,L=!1;function U(){I=null,b=NaN,v=[],A=!1,S=[],_=null}function x(e){const t={};t[Ce.default.SUBTITLE]="subtitles",t[Ce.default.CAPTION]="captions",t[Ce.default.FORCED_SUBTITLE]="subtitles";const n=new ji;for(let t in e)n[t]=e[t];n.defaultTrack=function(e){let t=!1;return N.length>1&&e.isEmbedded?t=e.id&&e.id===g.default.CC1:1===N.length?e.id&&"string"==typeof e.id&&"CC"===e.id.substring(0,2)&&(t=!0):0===N.length&&(t=e.index===S[0].index),t}(e),n.isTTML=function(e){return e.codec&&e.codec.search(g.default.STPP)>=0||e.mimeType&&e.mimeType.search(g.default.TTML)>=0}(e),n.kind=function(e,t){let n=e.roles&&e.roles.length>0?t[e.roles[0].value]:t.caption;return n=Object.values(t).includes(n)?n:t.caption,n}(e,t),a.addTextTrackInfo(n)}function F(e){const t=e.chunk;t.representation.mediaInfo.embeddedCaptions&&B(t.bytes,t)}function k(e){C=e}function B(e,r){const i=r.representation.mediaInfo,s=i.type,u=i.mimeType,l=i.codec||u;l?-1!==i.codec.indexOf("application/mp4")?function(e,t,r){let i,s;if("InitializationSegment"===t.segmentType)A=!0,b=y.getMediaTimescaleFromMoov(e);else{if(!A)return;s=y.getSamplesInfo(e),i=s.sampleList,r.search(g.default.STPP)>=0?function(e,t,r){let i,o;for(_=null!==_?_:Y(r),i=0;i<t.length;i++){const r=t[i],s=r.cts,u=G(),l=u+s/b,c=l+r.duration/b;E.buffered.add(l,c);const f=new DataView(e,r.offset,r.subSizes[0]);let d=Ze.Utils.dataViewToString(f,g.default.UTF8);const h=[];let p=r.offset+r.subSizes[0];for(o=1;o<r.subSizes.length;o++){const t=new Uint8Array(e,p,r.subSizes[o]),n=String.fromCharCode.apply(null,t);h.push(n),p+=r.subSizes[o]}try{const e=n.getValue().ttmlTimeIsRelative?s/b:0,t=_.parse(d,e,s/b,(s+r.duration)/b,h);a.addCaptions(C,u,t)}catch(e){I.removeExecutedRequestsBeforeTime(),V(),T.error("TTML parser error: "+e)}}}(e,i,r):function(e,t){let n,r,i;const s=[];for(n=0;n<t.length;n++){const a=t[n],u=G()+a.cts/b,l=u+a.duration/b;E.buffered.add(u,l);const c=e.slice(a.offset,a.offset+a.size),f=Ze.parseBuffer(c);for(r=0;r<f.boxes.length;r++){const t=f.boxes[r];if(T.debug("VTT box1: "+t.type),"vtte"!==t.type&&"vttc"===t.type){T.debug("VTT vttc boxes.length = "+t.boxes.length);let n={styles:{}};for(i=0;i<t.boxes.length;i++){const r=t.boxes[i];if(T.debug("VTT box2: "+r.type),"payl"===r.type)n.start=a.cts/b,n.end=(a.cts+a.duration)/b,n.data=r.cue_text;else if("sttg"===r.type&&r.settings&&""!==r.settings)try{const e=r.settings.split(" ");n.styles=o.getCaptionStyles(e)}catch(e){}}n&&n.data&&(s.push(n),T.debug(`VTT ${n.start} - ${n.end} : ${n.data}`))}}}s.length>0&&a.addCaptions(C,0,s)}(e,i)}}(e,r,l):s===g.default.VIDEO?function(e,t){let n,r;if(t.segmentType===R.HTTPRequest.INIT_SEGMENT_TYPE)0===D&&(D=y.getMediaTimescaleFromMoov(e));else if(t.segmentType===R.HTTPRequest.MEDIA_SEGMENT_TYPE){if(0===D)return void T.warn("CEA-608: No timescale for embeddedTextTrack yet");r=y.getSamplesInfo(e);const i=r.lastSequenceNumber,o=Math.trunc(t.start),s=Math.trunc(t.end);if(P[0]||P[1]||function(){let e;for(let t=0;t<N.length;t++){if(e=a.getTrackIdxForId(N[t].id),-1===e)return void T.warn("CEA-608: data before track is ready.");const n=H(e);P[t]=new ga(t+1,{newCue:n},null)}}(),D){if(function(e,t,n,r,i){return null!==e&&null!==t&&null!==r&&null!==i&&(t===e?r!==i:t!==e+n)}(w,i,r.numSequences,M,o))for(n=0;n<P.length;n++)P[n]&&P[n].reset();const t=function(e,t){if(0===t.length)return null;const n={splits:[],fields:[[],[]]},r=new DataView(e);for(let e=0;e<t.length;e++){const i=t[e],a=_a(r,i.offset,i.size);let o=null,s=0;for(let e=0;e<2;e++)if(a[e].length>0){i.cts!==o?s=0:s+=1;const t=G();n.fields[e].push([i.cts+t*D,a[e],s]),o=i.cts}}return n.fields.forEach(function(e){e.sort(function(e,t){return e[0]===t[0]?e[2]-t[2]:e[0]-t[0]})}),n}(e,r.sampleList);for(let e=0;e<P.length;e++){const r=t.fields[e],i=P[e];if(i)for(n=0;n<r.length;n++)i.addData(r[n][0]/D,r[n][1])}w=i,M=s}}}(e,r):function(e,n,r){let i,o;const s=new DataView(e,0,e.byteLength);o=Ze.Utils.dataViewToString(s,g.default.UTF8);try{i=Y(r).parse(o,0),a.addCaptions(a.getCurrentTrackIdx(),0,i),E.buffered&&E.buffered.add(n.start,n.end)}catch(e){t.error(new He.default(Ae.default.TIMED_TEXT_ERROR_ID_PARSE_CODE,Ae.default.TIMED_TEXT_ERROR_MESSAGE_PARSE+e.message,o))}}(e,r,l):T.error("No text type defined")}function H(e){return function(t,n,r){let o;o=i.getTTMLRenderingDiv()?O.createHTMLCaptionsFromScreen(i.getElement(),t,n,r):[{start:t,end:n,data:r.getDisplayText(),styles:{}}],o&&a.addCaptions(e,0,o)}}function G(){return isNaN(E.timestampOffset)?0:E.timestampOffset}function Y(e){let t;return e.search(g.default.VTT)>=0?t=f.get().streaming.text.webvtt.customRenderingEnabled&&s?s:o:(e.search(g.default.TTML)>=0||e.search(g.default.STPP)>
2=0)&&(t=l),t}function V(e,t){void 0===e&&e===t&&(e=E.buffered.start(0),t=E.buffered.end(E.buffered.length-1)),E.buffered.remove(e,t),a.deleteCuesFromTrackIdx(C,e,t)}function q(e){N.forEach(function(t){const n=a.getTrackIdxForId(t.id);n>=0&&a.deleteCuesFromTrackIdx(n,e.from,e.to)})}return E={abort:function(){},addEmbeddedTrack:function(e){if(L&&e)if(e.id===g.default.CC1||e.id===g.default.CC3){for(let t=0;t<N.length;t++)if(N[t].id===e.id)return;N.push(e)}else T.warn("Embedded track "+e.id+" not supported!")},addMediaInfos:function(e,t,n){if(S=S.concat(t),e===g.default.TEXT&&t[0].isFragmented&&!t[0].isEmbedded){I=n,E.buffered=(0,Wi.default)(p).create(),v=r.getTracksFor(g.default.TEXT,c.id).filter(e=>e.isFragmented);const e=r.getCurrentTrackFor(g.default.TEXT,c.id);for(let t=0;t<v.length;t++)if(v[t]===e){k(t);break}}for(let e=0;e<t.length;e++)x(t[e])},append:B,getConfig:function(){return{fragmentModel:I,fragmentedTracks:v,videoModel:i}},getStreamId:function(){return c.id},initialize:function(){L||(N=[],C=null,D=0,P=[],w=null,M=null,L=!0,O=$i(p).getInstance(),m.on(h.default.VIDEO_CHUNK_RECEIVED,F,E),m.on(h.default.BUFFER_CLEARED,q,E))},remove:V,reset:function(){U(),S=[],y=null},resetEmbedded:function(){m.off(h.default.VIDEO_CHUNK_RECEIVED,F,E),m.off(h.default.BUFFER_CLEARED,q,E),a&&a.deleteAllTextTracks(),L=!1,N=[],P=[null,null],w=null,M=null},resetMediaInfos:function(){S=[]},setCurrentFragmentedTrackIdx:k},T=(0,u.default)(p).getInstance().getLogger(E),y=tt(p).getInstance(),U(),E}Sa.__dashjs_factory_name="TextSourceBuffer";var Ia=r.default.getClassFactory(Sa);class Aa{constructor(){this.root=null,this.size=0}addCue(e){const t={start:e.startTime,end:e.endTime,cue:e,maxEnd:e.endTime,left:null,right:null,height:1},[n,r]=this._insert(t,this.root);this.root=n,r&&this.size++}removeCue(e){const[t,n]=this._remove(e,this.root);return this.root=t,n&&this.size--,n}findCuesInRange(e,t){const n=[];return this._searchRange(this.root,e,t,n),n}findCuesAtTime(e){return this.findCuesInRange(e,e)}getAllCues(){const e=[];return this._inorderTraversal(this.root,e),e}getSize(){return this.size}clear(){this.root=null,this.size=0}_compareCues(e,t){return e.startTime!==t.startTime?e.startTime-t.startTime:e.endTime!==t.endTime?e.endTime-t.endTime:"undefined"!=typeof VTTCue&&e instanceof VTTCue&&t instanceof VTTCue||e.text&&t.text?e.text.localeCompare(t.text):0}_compareIntervals(e,t){return this._compareCues(e.cue,t.cue)}_insert(e,t){if(!t)return[e,!0];const n=this._compareIntervals(e,t);if(n<0){const[n]=this._insert(e,t.left);t.left=n}else{if(!(n>0))return[t,!1];{const[n]=this._insert(e,t.right);t.right=n}}t.height=1+Math.max(this._getHeight(t.left),this._getHeight(t.right)),t.maxEnd=Math.max(t.maxEnd,e.maxEnd);const r=this._getBalance(t);return r>1?(this._compareIntervals(e,t.left)<0||(t.left=this._leftRotate(t.left)),[this._rightRotate(t),!0]):r<-1?(this._compareIntervals(e,t.right)>0||(t.right=this._rightRotate(t.right)),[this._leftRotate(t),!0]):[t,!0]}_searchRange(e,t,n,r){e&&(this._overlaps(e,t,n)&&r.push(e.cue),e.left&&e.left.maxEnd>=t&&this._searchRange(e.left,t,n,r),e.right&&e.start<=n&&this._searchRange(e.right,t,n,r))}_inorderTraversal(e,t){e&&(this._inorderTraversal(e.left,t),t.push(e.cue),this._inorderTraversal(e.right,t))}_overlaps(e,t,n){if(n===t){const n=t;return e.start<=n&&n<e.end}return e.start<n&&t<e.end}_getHeight(e){return e?e.height:0}_getBalance(e){return e?this._getHeight(e.left)-this._getHeight(e.right):0}_leftRotate(e){const t=e.right,n=t.left;return t.left=e,e.right=n,e.height=1+Math.max(this._getHeight(e.left),this._getHeight(e.right)),t.height=1+Math.max(this._getHeight(t.left),this._getHeight(t.right)),e.maxEnd=Math.max(e.end,e.left?e.left.maxEnd:0,e.right?e.right.maxEnd:0),t.maxEnd=Math.max(t.end,t.left?t.left.maxEnd:0,t.right?t.right.maxEnd:0),t}_rightRotate(e){const t=e.left,n=t.right;return t.right=e,e.left=n,e.height=1+Math.max(this._getHeight(e.left),this._getHeight(e.right)),t.height=1+Math.max(this._getHeight(t.left),this._getHeight(t.right)),e.maxEnd=Math.max(e.end,e.left?e.left.maxEnd:0,e.right?e.right.maxEnd:0),t.maxEnd=Math.max(t.end,t.left?t.left.maxEnd:0,t.right?t.right.maxEnd:0),t}_remove(e,t){if(!t)return[null,!1];const n=this._compareCues(e,t.cue);if(n<0){const[n,r]=this._remove(e,t.left);return t.left=n,r&&this._updateNode(t),[t,r]}if(n>0){const[n,r]=this._remove(e,t.right);return t.right=n,r&&this._updateNode(t),[t,r]}if(t.left||t.right){if(t.left){if(t.right){const e=this._findMin(t.right);t.cue=e.cue,t.start=e.start,t.end=e.end;const[n]=this._remove(e.cue,t.right);return t.right=n,this._updateNode(t),[t,!0]}return[t.left,!0]}return[t.right,!0]}return[null,!0]}_findMin(e){for(;e.left;)e=e.left;return e}_updateNode(e){e.height=1+Math.max(this._getHeight(e.left),this._getHeight(e.right)),e.maxEnd=Math.max(e.end,e.left?e.left.maxEnd:0,e.right?e.right.maxEnd:0)}}var Ra=n(7640);const ba=["text","align","fontSize","id","isd","line","lineAlign","lineHeight","linePadding","position","positionAlign","region","size","snapToLines","vertical"];function va(e){const t=this.context,n=(0,d.default)(t).getInstance(),r=e.videoModel,i=e.streamInfo,a=e.settings;let o,s,l,c,f,m,E,T,y,_,S,I,A,R,b,v,C,N,D,w;const M=new Map;function P(e){const t=e.kind,n=void 0!==e.id?e.id:e.lang,i=e.lang,a=e.isTTML,o=e.isEmbedded;return r.addTextTrack(t,n,i,a,o)}function O(e,t,n,r,i,a){let o=0,s=0;e/t>n/r?(s=t,o=s/r*n):(o=e,s=o/n*r);let u=0,l=0,c=0,f=0;return o/s>i?(f=s,c=s*i):(c=o,f=o/i),u=(e-c)/2,l=(t-f)/2,a?{x:u+.1*c,y:l+.1*f,w:.8*c,h:.8*f}:{x:u,y:l,w:c,h:f}}function L(e,t){const i=r.getClientWidth(),a=r.getClientHeight(),o=r.getVideoWidth(),s=r.getVideoHeight(),u=r.getVideoRelativeOffsetTop(),l=r.getVideoRelativeOffsetLeft();if(0!==o&&0!==s){let r=o/s,c=!1;e.isFromCEA608&&(r=3.5/3,c=!0);const f=O.call(this,i,a,o,s,r,c),d=f.w,h=f.h,g=f.x,m=f.y;if(d!=y||h!=_||g!=E||m!=T||t){if(E=g+l,T=m+u,y=d,_=h,S){const e=S.style;e&&(e.left=E+"px",e.top=T+"px",e.width=y+"px",e.height=_+"px",e.zIndex=R&&document[R]||b?C:null,n.trigger(p.default.CAPTION_CONTAINER_RESIZE))}const t=e.activeCues;if(t){const e=t.length;for(let n=0;n<e;++n){const e=t[n];e.scaleCue(e)}}}}}function U(e){const t=y,n=_;let r,i,a,o,s;if(e.cellResolution){const u=[t/e.cellResolution[0],n/e.cellResolution[1]];if(e.linePadding)for(r in e.linePadding)if(e.linePadding.hasOwnProperty(r)){i=(e.linePadding[r]*u[0]).toString();const t=document.getElementsByClassName("spanPadding");for(let e=0;e<t.length;e++)t[e].style.cssText=t[e].style.cssText.replace(/(padding-left\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+i),t[e].style.cssText=t[e].style.cssText.replace(/(padding-right\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+i)}if(e.fontSize){for(r in e.fontSize)if(e.fontSize.hasOwnProperty(r)){"%"===e.fontSize[r][0]?a=e.fontSize[r][1]/100:"c"===e.fontSize[r][0]&&(a=e.fontSize[r][1]),i=(a*u[1]).toString(),s="defaultFontSize"!==r?document.getElementsByClassName(r):document.getElementsByClassName("paragraph");for(let e=0;e<s.length;e++)s[e].style.cssText=s[e].style.cssText.replace(/(font-size\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+i)}if(e.lineHeight)for(r in e.lineHeight)if(e.lineHeight.hasOwnProperty(r)){"%"===e.lineHeight[r][0]?o=e.lineHeight[r][1]/100:"c"===e.fontSize[r][0]&&(o=e.lineHeight[r][1]),i=(o*u[1]).toString(),s=document.getElementsByClassName(r);for(let e=0;e<s.length;e++)s[e].style.cssText=s[e].style.cssText.replace(/(line-height\s*:\s*)[\d.,]+(?=\s*px)/gi,"$1"+i)}}}if(e.isd){let t=document.getElementById(e.cueID);t&&S.removeChild(t),F(e)}}function x(e,t){const n=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/,r=/^#(.*)$/;if(n.test(t)){const r=n.exec(t),i=parseInt(r[4],10)-1;return"data:image/png;base64,"+btoa(e.images[i])}if(r.test(t)){const n=r.exec(t)[1];return"data:image/png;base64,"+e.embeddedImages[n]}return t}function F(e){if(S){oe.call(this);const t=document.createElement("div");S.appendChild(t),v=(0,Ra.renderHTML)(e.isd,t,function(t){return x(e,t)},S.clientHeight,S.clientWidth,a.get().streaming.text.imsc.displayForcedOnlyMode,function(e){s.info("renderCaption :",e)},v,a.get().streaming.text.imsc.enableRollUp),t.id=e.cueID,n.trigger(p.default.CAPTION_RENDERED,{captionDiv:t,currentTrackIdx:m})}}function k(e,t){const n=t.findCuesInRange(e.startTime-.1,e.endTime+.1);for(const t of n){if(B(e,t)&&H(e,t,ba))return t;if(B(t,e)&&H(e,t,ba))return t}return null}function B(e,t){return!!t&&t.endTime>=e.startTime}function H(e,t,n){for(let r=0;r<n.length;r++){const i=n[r];if(JSON.stringify(e[i])!==JSON.stringify(t[i]))return!1}return!0}function G(e,t){t&&t.forEach(t=>{t.kind&&"image"===t.kind&&(t.src=x(e,t.src)),G(e,t.contents)})}function Y(e,t,n){const r=Z(e),i=M.get(r),o=a.get().streaming.text.dispatchForManualRendering;if(r&&i&&Array.isArray(n)&&0!==n.length){for(let e=0;e<n.length;e++){let c=null;const f=n[e];
2if(r.cellResolution=f.cellResolution,r.isFromCEA608=f.isFromCEA608,isNaN(f.start)||isNaN(f.end)||(o?c=V(f,t):z(f)&&S?c=j(f,t,r):f.data&&(c=W(f,t,r))),c){if(a.get().streaming.text.extendSegmentedCues){const e=k(c,i.allCues);e&&(i.allCues.removeCue(e),l=c,(u=e).startTime=Math.min(u.startTime,l.startTime),u.endTime=Math.max(u.endTime,l.endTime),c=u)}i.allCues.addCue(c)}else s.error("Impossible to display subtitles. You might have missed setting a TTML rendering div via player.attachTTMLRenderingDiv(TTMLRenderingDiv)")}var u,l;re()}}function V(e,t){let n=$(e,t);return n.onenter=function(){z(e)&&w&&w.cueID!==n.cueID&&K(w),delete n.type,w=n,q(n)},n.onexit=function(){K(n),w=null},n}function q(e){n.trigger(p.default.CUE_ENTER,e)}function K(e){n.trigger(p.default.CUE_EXIT,{cueID:e.cueID})}function j(e,t,r){const i=this;let a=$(e,t);return S.style.left=E+"px",S.style.top=T+"px",S.style.width=y+"px",S.style.height=_+"px",a.onenter=function(){r.mode===g.default.TEXT_SHOWING&&(this.isd?(D?requestAnimationFrame(()=>F(this)):F(this),s.debug("Cue enter id:"+this.cueID)):(S.appendChild(this.cueHTMLElement),U.call(i,this),n.trigger(p.default.CAPTION_RENDERED,{captionDiv:this.cueHTMLElement,currentTrackIdx:m})))},a.onexit=function(){if(S){const e=S.childNodes;for(let t=0;t<e.length;++t)e[t].id===this.cueID&&(s.debug("Cue exit id:"+e[t].id),S.removeChild(e[t]),--t)}},a}function W(e,t,r){let i=$(e,t);if(e.styles)try{void 0!==e.styles.align&&"align"in i&&(i.align=e.styles.align),void 0!==e.styles.line&&"line"in i&&(i.line=e.styles.line),void 0!==e.styles.lineAlign&&(i.lineAlign=e.styles.lineAlign),void 0!==e.styles.snapToLines&&"snapToLines"in i&&(i.snapToLines=e.styles.snapToLines),void 0!==e.styles.position&&"position"in i&&(i.position=e.styles.position),void 0!==e.styles.positionAlign&&(i.positionAlign=e.styles.positionAlign),void 0!==e.styles.size&&"size"in i&&(i.size=e.styles.size)}catch(e){s.error(e)}return i.onenter=function(){r.mode===g.default.TEXT_SHOWING&&n.trigger(p.default.CAPTION_RENDERED,{currentTrackIdx:m})},i}function z(e){return"html"===e.type}function $(e,t){return z(e)?function(e,t){let n=new l(e.start+t,e.end+t,"");return n.cueHTMLElement=e.cueHTMLElement,n.isd=e.isd,n.images=e.images,n.embeddedImages=e.embeddedImages,n.cueID=e.cueID,n.scaleCue=U.bind(self),n.cellResolution=e.cellResolution,n.lineHeight=e.lineHeight,n.linePadding=e.linePadding,n.fontSize=e.fontSize,n.isd&&G(n,n.isd.contents),n}(e,t):function(e,t){let n=new l(e.start-t,e.end-t,e.data);return n.cueID=Me.default.generateUuid(),n}(e,t)}function Q(e){if(I){const t=I.childNodes;for(let n=0;n<t.length;++n)t[n].id===e.cueID&&(I.removeChild(t[n]),--n)}}function X(){const e=r.getTextTracks(),t=[];for(const n of e)n.manualMode===g.default.TEXT_SHOWING&&t.push(n);return t}function Z(e){return e>=0&&c[e]?r.getTextTrack(c[e].kind,c[e].id,c[e].lang,c[e].isTTML,c[e].isEmbedded):null}function J(e){if(e===m)return;m=e;const t=Z(m);ee.call(this,t),A&&(clearInterval(A),A=null),t&&"html"===t.renderingType&&(L.call(this,t,!0),window.ResizeObserver?(N=new window.ResizeObserver(()=>{L.call(this,t,!0)}),N.observe(r.getElement())):A=setInterval(L.bind(this,t),500))}function ee(e){oe.call(this),e&&"html"===e.renderingType?ie.call(this):ae.call(this)}function te(e,t,n,r=!0){return!!e&&(isNaN(t)||(r?e.startTime:e.endTime)>=t)&&(isNaN(n)||(r?e.endTime:e.startTime)<=n)}function ne(e,t,n,r=!0){if(!e)return;if(e.cues&&e.cues.length>0)for(let i=e.cues.length-1;i>=0;i--)te(e.cues[i],t,n,r)&&(e.cues[i].onexit&&e.cues[i].onexit(),e.removeCue(e.cues[i]));const i=M.get(e);if(i){const e=i.activeCues,r=e.filter(e=>e.startTime>=t&&e.endTime<=n);r.forEach(e=>{a.get().streaming.text.dispatchForManualRendering?K(e):Q(e)}),i.activeCues=e.filter(e=>!r.includes(e))}}function re(){for(const e of M.values())e.lastCueWindowUpdate=-1/0}function ie(){let e=document.getElementById("native-cue-style");if(e)return;e=document.createElement("style"),e.id="native-cue-style",document.head.appendChild(e);const t=e.sheet,n=r.getElement();try{n&&(n.id?t.insertRule("#"+n.id+"::cue {background: transparent}",0):0!==n.classList.length?t.insertRule("."+n.className+"::cue {background: transparent}",0):t.insertRule("video::cue {background: transparent}",0))}catch(e){s.info(""+e.message)}}function ae(){const e=document.getElementById("native-cue-style");e&&document.head.removeChild(e)}function oe(){if(S)for(;S.firstChild;)S.removeChild(S.firstChild)}function se(){return c}return o={addCaptions:Y,addTextTrackInfo:function(e){c.push(e)},createTracks:function(){c.sort(function(e,t){return e.index-t.index}),S=r.getTTMLRenderingDiv(),I=r.getVttRenderingDiv();let e=-1;for(let t=0;t<c.length;t++){const r=P(c[t]);f.push(r),c[t].defaultTrack&&(r.default=!0,e=t);const i=Z(t);i&&(i.mode=g.default.TEXT_SHOWING,S&&(c[t].isTTML||c[t].isEmbedded)?i.renderingType="html":i.renderingType="default",M.set(i,{allCues:new Aa,lastCueWindowUpdate:-1/0,activeCues:[]})),Y(t,0,c[t].captionData),n.trigger(p.default.TEXT_TRACK_ADDED)}if(J.call(this,e),e>=0){let t=function(){const r=Z(e);r&&"html"===r.renderingType&&L.call(this,r,!0),n.off(p.default.PLAYBACK_METADATA_LOADED,t,this)};n.on(p.default.PLAYBACK_METADATA_LOADED,t,this);for(let t=0;t<c.length;t++){const n=Z(t);if(n){const r=a.get().streaming.text.dispatchForManualRendering;
2n.mode=t!==e||r?g.default.TEXT_HIDDEN:g.default.TEXT_SHOWING,n.manualMode=t===e?g.default.TEXT_SHOWING:g.default.TEXT_HIDDEN}}}n.trigger(h.default.TEXT_TRACKS_QUEUE_INITIALIZED,{index:m,tracks:c,streamId:i.id})},deleteAllTextTracks:function(){const e=f?f.length:0;for(let t=0;t<e;t++){const e=Z(t);e&&ne.call(this,e,i.start,i.start+i.duration,!1)}f=[],c=[],A&&(clearInterval(A),A=null),N&&r&&(N.unobserve(r.getElement()),N=null),m=-1,oe.call(this),M.clear()},deleteCuesFromTrackIdx:function(e,t,n){const r=Z(e);r&&ne(r,t,n)},disableManualTracks:function(){const e=X();if(e&&e.length>0){const t=e[0],n=M.get(t);if(!n)return;n.activeCues.forEach(e=>{a.get().streaming.text.dispatchForManualRendering?K(e):Q(e)}),n.activeCues=[]}},getCurrentTrackIdx:function(){return m},getCurrentTextTrackInfo:function(){return c[m]},getStreamId:function(){return i.id},getTextTrackInfos:se,getTrackIdxForId:function(e){let t=-1;for(let n=0;n<c.length;n++)if(c[n].id===e){t=n;break}return t},initialize:function(){"undefined"!=typeof window&&"undefined"!=typeof navigator&&(l=window.VTTCue||window.TextTrackCue,c=[],f=[],m=-1,E=0,T=0,y=0,_=0,S=null,I=null,A=null,b=!1,C=2147483647,v=null,D="requestAnimationFrame"in window,M.clear(),void 0!==document.fullscreenElement?R="fullscreenElement":void 0!==document.webkitIsFullScreen?R="webkitIsFullScreen":document.msFullscreenElement?R="msFullscreenElement":document.mozFullScreen&&(R="mozFullScreen"))},manualCueProcessing:function(e){const t=X();if(t&&t.length>0){const n=t[0],r=M.get(n);if(!r)return;const i=r.activeCues,o=r.allCues.findCuesAtTime(e),s=i.filter(e=>!o.includes(e)),u=o.filter(e=>!i.includes(e));s.forEach(e=>{a.get().streaming.text.dispatchForManualRendering?K(e):Q(e)}),u.forEach(e=>{a.get().streaming.text.dispatchForManualRendering?q(e):WebVTT.processCues(window,[e],I,e.cueID)}),r.activeCues=o}},setCurrentTrackIdx:J,setModeForTrackIdx:function(e,t){const n=Z(e);n&&n.mode!==t&&(n.mode=t),n&&n.manualMode!==t&&(n.manualMode=t)},updateTextTrackWindow:function(e,t=!1){const n=se(),i=a.get().streaming.text.webvtt.customRenderingEnabled;for(let o=0;o<n.length;o++){const s=n[o],u=Z(o),l=M.get(u);if(!u||!l)continue;if(!s.isEmbedded&&i)continue;const{bufferToKeep:c,bufferPruningInterval:f}=a.get().streaming.buffer,d=Date.now();if((d-l.lastCueWindowUpdate)/1e3<f&&!t)continue;const h=r.getPlaybackRate()||1,p=Math.max(0,e-c/h),m=e+2*f/h;if(u.cues)for(;u.cues.length>0;)u.removeCue(u.cues[0]);u.mode!==g.default.TEXT_DISABLED&&l.allCues.findCuesInRange(p,m).forEach(e=>{u.addCue(e)}),l.lastCueWindowUpdate=d}},invalidateCueWindow:re},s=(0,u.default)(t).getInstance().getLogger(o),o}va.__dashjs_factory_name="TextTracks";var Ca=r.default.getClassFactory(va);function Na(){const e=this.context;let t,n,r,i,a,o;function s(e){const t=e.split(":"),n=t.length-1;return e=60*parseInt(t[n-1],10)+parseFloat(t[n]),2===n&&(e+=3600*parseInt(t[0],10)),e}function l(e){const t=e.split(i),n=t[1].split(o);return n.shift(),t[1]=n[0],n.shift(),{cuePoints:t,styles:c(n)}}function c(e){const t={};return e.forEach(function(e){const n=e.split(":");if(n.length>1){const[e,r]=n;switch(e){case"align":case"A":t.align=r;break;case"line":case"L":const[e,n]=r.split(","),i=e.endsWith("%");t.line="auto"===e?e:parseInt(e,10),i&&(t.snapToLines=!1),n&&(t.lineAlign=n);break;case"position":case"P":const[a,o]=r.split(",");t.position=parseInt(a,10),o&&(t.positionAlign=o);break;case"size":case"S":t.size=parseInt(r,10)}}}),t}function f(e,t){let n,r=t,a="",o="";for(;""!==e[r]&&r<e.length;)r++;if(n=r-t,n>1)for(let r=0;r<n;r++){if(o=e[t+r],o.match(i)){a="";break}a+=o,r!==n-1&&(a+="\n")}else o=e[t],o.match(i)||(a=o);return a}return t={parse:function(e){const t=[];let o,u;if(!e)return t;o=(e=e.split(r)).length,u=-1;for(let r=0;r<o;r++){let o=e[r];if(o.length>0&&"WEBVTT"!==o&&o.match(i)){const i=l(o),c=i.cuePoints,d=i.styles,h=f(e,r+1),g=s(c[0].replace(a,"")),p=s(c[1].replace(a,""));!isNaN(g)&&!isNaN(p)&&g>=u&&p>g?""!==h?(u=g,t.push({start:g,end:p,data:h,styles:d})):n.error("Skipping cue due to empty/malformed cue text"):n.error("Skipping cue due to incorrect cue timing")}}return t},getCaptionStyles:c},n=(0,u.default)(e).getInstance().getLogger(t),r=/(?:\r\n|\r|\n)/gm,i=/-->/,a=/(^[\s]+|[\s]+$)/g,o=/\s\b/g,t}Na.__dashjs_factory_name="VTTParser";var Da=r.default.getSingletonFactory(Na);function wa(){let e,t;return e={parse:function(e){let n=[];return t.oncue=function(e){e.start=e.startTime,e.end=e.endTime,e.data=e.text,e.styles={align:e.align,line:e.line,position:e.position,size:e.size},n.push(e)},t.parse(e),n}},function(){try{window&&window.WebVTT&&window.WebVTT.Parser&&(t=new window.WebVTT.Parser(window,window.vttjs,window.WebVTT.StringDecoder()))}catch(e){}}(),e}wa.__dashjs_factory_name="VttCustomRenderingParser";var Ma=r.default.getSingletonFactory(wa);function Pa(){const e=this.context,t=(0,d.default)(e).getInstance();let n,r,i=0;function a(){const e="cue_TTML_"+i;return i++,e}return n={parse:function(e,n,i,o,s){let u="";const l=[];let c,f,d;const g={},m={};let E="",T="",y={onOpenTag:function(e,n,i){if(i[" imagetype"]&&!i[" imageType"]&&(t.trigger(p.default.CONFORMANCE_VIOLATION,{level:Hi.LEVELS.ERROR,event:Hi.EVENTS.NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE}),i[" imageType"]=i[" imagetype"]),"image"===n&&("http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt"===e||"http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"===e)){if(!i[" imageType"]||"PNG"!==i[" imageType"].value)return void r.warn("smpte-tt imageType != PNG. Discarded");E=i["http://www.w3.org/XML/1998/namespace id"].value}},onCloseTag:function(){E&&(m[E]=T.trim()),T="",E=""},onText:function(e){E&&(T+=e)}};if(!e)throw u="no ttml data to parse",new Error(u);g.data=e,t.trigger(h.default.TTML_TO_PARSE,g);let _=(0,Ra.fromXML)(g.data,function(e){u=e},y);t.trigger(h.default.TTML_PARSED,{ttmlString:g.data,ttmlDoc:_});const S=_.getMediaTimeEvents();for(d=0;d<S.length;d++){let e=(0,Ra.generateISD)(_,S[d],function(e){u=e});e.contents.some(e=>e.contents.length)&&(c=S[d]+n,f=d+1<S.length?S[d+1]+n:o,c<f&&l.push({start:c,end:f,type:"html",cueID:a(),isd:e,images:s,embeddedImages:m}))}if(""!==u)throw r.error(u),new Error(u);return l}}
2,r=(0,u.default)(e).getInstance().getLogger(n),n}Pa.__dashjs_factory_name="TTMLParser";var Oa=r.default.getSingletonFactory(Pa);function La(e){let t=this.context;const n=(0,d.default)(t).getInstance(),r=(0,Ne.default)(t).getInstance(),i=e.adapter,a=e.baseURLController;let o,s,l;function c(e,t){let n,o,s=!1;if(a.resolve()){const t=i.getVoRepresentations(e);t&&t.length>0&&(n=a.resolve(t[0].path).url)}const u=e.essentialProperties.filter(e=>e.schemeIdUri&&e.schemeIdUri===g.default.FONT_DOWNLOAD_DVB_SCHEME),c=e.supplementalProperties.filter(e=>e.schemeIdUri&&e.schemeIdUri===g.default.FONT_DOWNLOAD_DVB_SCHEME);u.length>0?(s=!0,o=u):o=c,o.forEach(i=>{if(function(e){return!(!(e.value&&1===parseInt(e.value)&&e.dvbUrl&&e.dvbUrl.length>0&&e.dvbFontFamily&&e.dvbFontFamily.length>0&&e.dvbMimeType)||e.dvbMimeType!==g.default.OFF_MIMETYPE&&e.dvbMimeType!==g.default.WOFF_MIMETYPE)}(i)){let u=(a=i.dvbUrl,o=n,r.isPathAbsolute(a)?a:r.isRelative(a)?o?r.resolve(a,o):r.resolve(a):a);l.push({fontFamily:i.dvbFontFamily,url:u,mimeType:i.dvbMimeType,trackId:e.id,streamId:t,isEssential:s,status:"unloaded",fontFace:new FontFace(i.dvbFontFamily,`url(${u})`,{display:"swap"})})}var a,o})}function f(e,t){const n=l[e];l[e]={...n,status:t}}function h(){l=[]}return o={addFontsFromTracks:function(e,t){if(e&&Array.isArray(e)&&t)for(let n=0;n<e.length;n++)c(e[n],t)},downloadFonts:function(){for(let e=0;e<l.length;e++){let t=l[e];document.fonts.add(t.fontFace),n.trigger(p.default.DVB_FONT_DOWNLOAD_ADDED,t),t.fontFace.load().then(()=>{f(e,"loaded"),n.trigger(p.default.DVB_FONT_DOWNLOAD_COMPLETE,t)},r=>{f(e,"error"),s.debug("Font download error: ",r),n.trigger(p.default.DVB_FONT_DOWNLOAD_FAILED,t)})}},getFonts:function(){return l},getFontsForTrackId:function(e){return l.filter(t=>t.trackId&&t.trackId===e)},reset:function(){!function(){for(const e of l){let t=document.fonts.delete(e.fontFace);s.debug(`Removal of fontFamily: ${e.fontFamily} was ${t?"successful":"unsuccessful"}`)}}(),h()}},s=(0,u.default)(t).getInstance().getLogger(o),h(),o}La.__dashjs_factory_name="DVBFonts";var Ua=r.default.getClassFactory(La);function xa(e){let t=this.context;const n=e.adapter,r=e.errHandler,i=e.manifestModel,a=e.mediaController,o=e.baseURLController,s=e.videoModel,l=e.settings;let c,f,m,E,T,y,_,S,I,A,R,b,v,C;function N(e){if(C.error(`Could not download ${e.isEssential?"an essential":"a"} font - fontFamily: ${e.fontFamily}, url: ${e.url}`),e.isEssential){let t=E[e.streamId].getTrackIdxForId(e.trackId);E[e.streamId].setModeForTrackIdx(t,g.default.TEXT_DISABLED)}}function D(e){if(C.debug(`Successfully downloaded ${e.isEssential?"an essential":"a"} font - fontFamily: ${e.fontFamily}, url: ${e.url}`),e.isEssential){let t=E[e.streamId].getTrackIdxForId(e.trackId);t===E[e.streamId].getCurrentTrackIdx()?E[e.streamId].setModeForTrackIdx(t,g.default.TEXT_SHOWING):E[e.streamId].setModeForTrackIdx(t,g.default.TEXT_HIDDEN)}}function w(e){let t=e.tracks,n=e.index;const r=e.streamId;if(!1===l.get().streaming.text.defaultEnabled&&!U()||b)x(r,-1);else{const e=a.getCurrentTrackFor(g.default.TEXT,r);if(e){const i={lang:e.lang,role:e.roles[0],index:e.index,codec:e.codec,accessibility:e.accessibility[0]};t.some((e,t)=>{if(a.matchSettings(i,e))return x(r,t),n=t,!0})}I=!1}f[r].lastEnabledIndex=n,S.trigger(p.default.TEXT_TRACKS_ADDED,{enabled:U(),index:n,tracks:t,streamId:r}
2),R=!0,v.addFontsFromTracks(t,r),v.getFonts().forEach(e=>{if(e.isEssential){let t=E[e.streamId].getTrackIdxForId(e.trackId);E[e.streamId].setModeForTrackIdx(t,g.default.TEXT_DISABLED)}}),v.downloadFonts()}function M(e){try{const t=e.streamId,n=E[t];if(!n||isNaN(e.time))return;n.updateTextTrackWindow(e.time),l.get().streaming.text.webvtt.customRenderingEnabled&&n.manualCueProcessing(e.time)}catch(e){}}function P(e){try{const t=e.streamId;if(!E[t])return;E[t].disableManualTracks()}catch(e){}}function O(e){try{const t=E[e.streamId];if(!t)return;const n=s.getTime()||0;t.updateTextTrackWindow(n,!0)}catch(e){C.error(e)}}function L(e){try{if(!e||!e.mediaType||e.mediaType!==g.default.AUDIO||!e.currentMediaInfo)return;const t=E[e.streamId].getCurrentTextTrackInfo();let n=NaN;I?n=F(e.streamId):k(t)&&e.currentMediaInfo.lang&&e.currentMediaInfo.lang!==t.lang&&(n=F(e.streamId),isNaN(n)&&(n=-1)),isNaN(n)||x(e.streamId,n)}catch(e){C.error(e)}}function U(){let e=!0;return I&&!A&&(e=!1),e}function x(e,t){I=-1===t,I&&S.trigger(h.default.BUFFER_LEVEL_UPDATED,{mediaType:g.default.TEXT,bufferLevel:-1},{streamId:e,mediaType:g.default.TEXT}),I&&a&&a.saveTextSettingsDisabled();let n=B(e);if(n===t||!E[e])return;E[e].disableManualTracks(),E[e].invalidateCueWindow();let r=E[e].getCurrentTextTrackInfo(),i=r?s.getTextTrack(r.kind,r.id,r.lang,r.isTTML,r.isEmbedded):null;i&&i.mode!==g.default.TEXT_DISABLED&&E[e].setModeForTrackIdx(n,g.default.TEXT_HIDDEN),E[e].setCurrentTrackIdx(t),r=E[e].getCurrentTextTrackInfo();const o=l.get().streaming.text.dispatchForManualRendering;if(r&&!o&&r.mode!==g.default.TEXT_DISABLED&&E[e].setModeForTrackIdx(t,g.default.TEXT_SHOWING),r&&r.isFragmented&&!r.isEmbedded)!function(e,t,n){if(!m[e])return;let r=m[e].getConfig().fragmentedTracks;for(let i=0;i<r.length;i++){let o=r[i];if(t.lang===o.lang&&(o.id?t.id===o.id:t.index===o.index)){let t=a.getCurrentTrackFor(g.default.TEXT,e);(o.id?t.id!==o.id:t.index!==o.index)?(E[e].deleteCuesFromTrackIdx(n),m[e].setCurrentFragmentedTrackIdx(i)):-1===n&&S.trigger(h.default.SET_FRAGMENTED_TEXT_AFTER_DISABLED,{},{streamId:e,mediaType:g.default.TEXT})}}}(e,r,n);else if(r&&!r.isFragmented)!function(e,t){S.trigger(h.default.SET_NON_FRAGMENTED_TEXT,{currentTrackInfo:t},{streamId:e,mediaType:g.default.TEXT})}(e,r);else if(!r&&I){const t=F(e);return void(isNaN(t)||x(e,t))}a.setTrack(r)}function F(e){const t=function(e){return E[e].getTextTrackInfos().filter((e,t)=>(e._indexToSelect=t,!!(e&&e.roles&&e.roles.length>0)&&k(e)))}(e);if(!t||t.length<=0)return NaN;const n=a.getCurrentTrackFor(g.default.AUDIO,e);if(!n)return NaN;const r=t.find(e=>n.lang===e.lang);return r?r._indexToSelect:NaN}function k(e){return!(!e||!e.roles||0===e.roles.length)&&e.roles.some(e=>e.schemeIdUri===g.default.DASH_ROLE_SCHEME_ID&&e.value===Ce.default.FORCED_SUBTITLE)}function B(e){return E[e].getCurrentTrackIdx()}function H(){m={},E={},f={},I=!0,R=!1,b=!1}return c={addEmbeddedTrack:function(e,t){const n=e.id;m[n]&&m[n].addEmbeddedTrack(t)},addMediaInfosToBuffer:function(e,t,n,r=null){const i=e.id;m[i]&&m[i].addMediaInfos(t,n,r)},createTracks:function(e){const t=e.id;E[t]&&E[t].createTracks()},deactivateStream:function(e){if(!e)return;const t=e.id;m[t]&&m[t].resetMediaInfos(),E[t]&&E[t].deleteAllTextTracks()},enableForcedTextStreaming:function(e){return(0,Ge.checkParameterType)(e,"boolean"),A=e,!0},enableText:function(e,t){return(0,Ge.checkParameterType)(t,"boolean"),U()!==t&&(t&&x(e,f[e].lastEnabledIndex),t||(f[e].lastEnabledIndex=B(e),R?x(e,-1):b=!0)),!0},getAllTracksAreDisabled:function(){return I},getCurrentTrackIdx:B,getTextSourceBuffer:function(e){const t=e.id;if(m&&m[t])return m[t]},initialize:function(){v=Ua(t).create({adapter:n,baseURLController:o}),S.on(h.default.TEXT_TRACKS_QUEUE_INITIALIZED,w,c),S.on(h.default.DVB_FONT_DOWNLOAD_FAILED,N,c),S.on(h.default.DVB_FONT_DOWNLOAD_COMPLETE,D,c),S.on(h.default.MEDIAINFO_UPDATED,L,c),S.on(h.default.PLAYBACK_TIME_UPDATED,M,c),l.get().streaming.text.webvtt.customRenderingEnabled&&S.on(h.default.PLAYBACK_SEEKING,P,c),S.on(h.default.PLAYBACK_SEEKED,O,c)},initializeForStream:function(e){const o=e.id,u=Ca(t).create({videoModel:s,settings:l,streamInfo:e});u.initialize(),E[o]=u;const c=Ia(t).create({errHandler:r,adapter:n,dvbFonts:v,manifestModel:i,mediaController:a,videoModel:s,textTracks:u,vttParser:T,vttCustomRenderingParser:y,ttmlParser:_,streamInfo:e,settings:l});c.initialize(),m[o]=c,f[o]={},f[o].lastEnabledIndex=-1}
2,isTextEnabled:U,reset:function(){Object.keys(m).forEach(e=>{m[e].resetEmbedded(),m[e].reset()}),v.reset(),H(),S.off(h.default.TEXT_TRACKS_QUEUE_INITIALIZED,w,c),S.off(h.default.DVB_FONT_DOWNLOAD_FAILED,N,c),S.off(h.default.DVB_FONT_DOWNLOAD_COMPLETE,D,c),S.off(h.default.MEDIAINFO_UPDATED,L,c),S.off(h.default.PLAYBACK_TIME_UPDATED,M,c),l.get().streaming.text.webvtt.customRenderingEnabled&&S.off(h.default.PLAYBACK_SEEKING,P,c),S.off(h.default.PLAYBACK_SEEKED,O,c)},setTextTrack:x,clearDataForStream:function(e){m[e]&&(m[e].resetEmbedded(),m[e].reset(),delete m[e]),E[e]&&(E[e].deleteAllTextTracks(),delete E[e]),f[e]&&delete f[e]}},A=!1,R=!1,b=!1,T=Da(t).getInstance(),y=Ma(t).getInstance(),_=Oa(t).getInstance(),S=(0,d.default)(t).getInstance(),C=(0,u.default)(t).getInstance().getLogger(c),H(),c}xa.__dashjs_factory_name="TextController";var Fa=r.default.getClassFactory(xa);function ka(e){e=e||{};const t=this.context,n=(0,u.default)(t).getInstance(),r=e.settings,i=(0,d.default)(t).getInstance();let a,o,s,l,c,f;function h(){return navigator&&navigator.connection&&!isNaN(navigator.connection.downlink)&&navigator.connection.downlink>0?1e3*navigator.connection.downlink:NaN}function m(e,t,n,r){const i=Math.pow(.5,n/r.fast);e.fastEstimate=(1-i)*t+i*e.fastEstimate;const a=Math.pow(.5,n/r.slow);e.slowEstimate=(1-a)*t+a*e.slowEstimate,e.totalWeight+=n}function E(){a={},o={},s={},l={}}const T={addEntry:function(e,t){try{if(!(e&&t&&t.trace&&t.trace.length))return;!function(e){a[e]=a[e]||[],o[e]=o[e]||[],s[e]=s[e]||{fastEstimate:0,slowEstimate:0,totalWeight:0},l[e]=l[e]||{fastEstimate:0,slowEstimate:0,totalWeight:0}}(e);const n=t.tresponse.getTime()-t.trequest.getTime()||1;let u=function(e,t){return e._fileLoaderType&&e._fileLoaderType===g.default.FILE_LOADER_TYPES.FETCH?function(e){const t=e.trace.reduce((e,t)=>e+t.b[0],0),n=e.trace.reduce((e,t)=>e+t.d,0);let i=NaN;return r.get().streaming.abr.throughput.useNetworkInformationApi.fetch&&(i=h()),isNaN(i)&&(i=Math.round(8*t/n)),{downloadedBytes:t,value:i,downloadTimeInMs:n}}(e):function(e,t){let n=NaN,i=NaN,a=!1;if(r.get().streaming.abr.throughput.useResourceTimingApi&&e._resourceTimingValues)n=e._resourceTimingValues.transferSize,i=e._resourceTimingValues.responseEnd-e._resourceTimingValues.responseStart,a=!0;else{if(e.trace.length<=1)return{throughput:NaN,downloadTimeInMs:NaN};n=e.trace.reduce((e,t)=>e+t.b[0],0)-e.trace[0].b[0],i=Math.max(e.trace.reduce((e,t)=>e+t.d,0)-e.trace[0].d,1)}let o=NaN;if(!a&&r.get().streaming.abr.throughput.useNetworkInformationApi.xhr&&(o=h()),isNaN(o)){const e=r.get().streaming.abr.throughput.useDeadTimeLatency?i:i+t;o=Math.round(8*n/e)}return{downloadedBytes:n,value:o,downloadTimeInMs:i}}(e,t)}(t,n);if(u.latencyInMs=n,isNaN(u.value)||!isFinite(u.value))return;if(t.cmsd){const e=t.cmsd.dynamic&&t.cmsd.dynamic.etp?t.cmsd.dynamic.etp:null;if(e){const t=r.get().streaming.cmsd.abr.etpWeightRatio;t>0&&t<=1&&(u.value=u.value*(1-t)+e*t)}}if(function(e,t,n){return r.get().streaming.abr.throughput.useResourceTimingApi&&n._resourceTimingValues?0===n._resourceTimingValues.transferSize&&n._resourceTimingValues.decodedBodySize>0:!isNaN(t)&&(e===g.default.VIDEO?t<r.get().streaming.cacheLoadThresholds[g.default.VIDEO]:e===g.default.AUDIO?t<r.get().streaming.cacheLoadThresholds[g.default.AUDIO]:void 0)}(e,t._tfinish.getTime()-t.trequest.getTime(),t))return void f.debug(`${e} Assuming segment ${t.url} came from cache, ignoring it for throughput calculation`);f.debug(`Added throughput entry for ${e}: ${u.value} kbit/s`),u.serviceLocation=t._serviceLocation,a[e].push(u),o[e].push({value:n}),function(e){a[e].length>r.get().streaming.abr.throughput.sampleSettings.maxMeasurementsToKeep&&a[e].shift(),o[e].length>r.get().streaming.abr.throughput.sampleSettings.maxMeasurementsToKeep&&o[e].shift()}(e),i.trigger(p.default.THROUGHPUT_MEASUREMENT_STORED,{throughputValues:u}),t.type!==R.HTTPRequest.MPD_TYPE&&(m(s[e],u.value,r.get().streaming.abr.throughput.ewma.weightDownloadTimeMultiplicationFactor*u.downloadTimeInMs,c.bandwidthHalfLife),m(l[e],n,1,c.latencyHalfLife))}catch(e){f.error(e)}},getThroughputDict:function(e){return e?a[e]:a},getEwmaThroughputDict:function(e){return e?s[e]:s},getEwmaLatencyDict:function(e){return e?l[e]:l},getEwmaHalfLife:function(){return c},getLatencyDict:function(e){return e?o[e]:o},reset:E};
2return f=n.getLogger(T),c={bandwidthHalfLife:{fast:r.get().streaming.abr.throughput.ewma.throughputFastHalfLifeSeconds,slow:r.get().streaming.abr.throughput.ewma.throughputSlowHalfLifeSeconds},latencyHalfLife:{fast:r.get().streaming.abr.throughput.ewma.latencyFastHalfLifeCount,slow:r.get().streaming.abr.throughput.ewma.latencySlowHalfLifeCount}},E(),T}ka.__dashjs_factory_name="ThroughputModel";var Ba=r.default.getClassFactory(ka);function Ha(){const e=this.context,t=(0,d.default)(e).getInstance();let n,r,i;function a(){performance.clearResourceTimings()}function s(e){e.metric!==o.HTTP_REQUEST||!e.value||e.value.type!==R.HTTPRequest.MPD_TYPE&&(e.value.type!==R.HTTPRequest.MEDIA_SEGMENT_TYPE||e.mediaType!==g.default.AUDIO&&e.mediaType!==g.default.VIDEO)||n.addEntry(e.mediaType,e.value)}function u(e,t,a=null,o=NaN){let s,u=null,d=n.getEwmaHalfLife(),p=null,S=!0;switch(a||(a=i.get().streaming.abr.throughput.averageCalculationMode),e){case g.default.THROUGHPUT_TYPES.BANDWIDTH:u=a===g.default.THROUGHPUT_CALCULATION_MODES.EWMA?n.getEwmaThroughputDict(t):n.getThroughputDict(t),p=d.bandwidthHalfLife,S=!0,o=isNaN(o)?r.getIsDynamic()?i.get().streaming.abr.throughput.sampleSettings.live:i.get().streaming.abr.throughput.sampleSettings.vod:o;break;case g.default.THROUGHPUT_TYPES.LATENCY:u=a===g.default.THROUGHPUT_CALCULATION_MODES.EWMA?n.getEwmaLatencyDict(t):n.getLatencyDict(t),p=d.latencyHalfLife,S=!1,o=isNaN(o)?i.get().streaming.abr.throughput.sampleSettings.averageLatencySampleAmount:o}if(!u||0===u.length)return NaN;switch(a){case g.default.THROUGHPUT_CALCULATION_MODES.ARITHMETIC_MEAN:return s=l(u,o,e),c(u,s);case g.default.THROUGHPUT_CALCULATION_MODES.BYTE_SIZE_WEIGHTED_ARITHMETIC_MEAN:return s=l(u,o,e),f(u,s);case g.default.THROUGHPUT_CALCULATION_MODES.DATE_WEIGHTED_ARITHMETIC_MEAN:return s=l(u,o,e),h(u,s);case g.default.THROUGHPUT_CALCULATION_MODES.HARMONIC_MEAN:return s=l(u,o,e),m(u,s);case g.default.THROUGHPUT_CALCULATION_MODES.BYTE_SIZE_WEIGHTED_HARMONIC_MEAN:return s=l(u,o,e),E(u,s);case g.default.THROUGHPUT_CALCULATION_MODES.DATE_WEIGHTED_HARMONIC_MEAN:return s=l(u,o,e),T(u,s);case g.default.THROUGHPUT_CALCULATION_MODES.EWMA:return y(u,p,S);case g.default.THROUGHPUT_CALCULATION_MODES.ZLEMA:return s=l(u,o,e),_(u,s)}}function l(e,t,n){if(e){if(t>=e.length)t=e.length;else if(n===g.default.THROUGHPUT_TYPES.BANDWIDTH&&i.get().streaming.abr.throughput.sampleSettings.enableSampleSizeAdjustment)for(let n=1;n<t;++n){const r=e[e.length-n].value/e[e.length-n-1].value;if((r>=i.get().streaming.abr.throughput.sampleSettings.increaseScale||r<=i.get().streaming.abr.throughput.sampleSettings.decreaseScale)&&(t+=1)===e.length)break}}else t=0;return t}function c(e,t){let n=e;return 0!==t&&n&&0!==n.length?(n=n.slice(-t),n.reduce((e,t)=>e+t.value,0)/n.length):NaN}function f(e,t){let n=e;if(0===t||!n||0===n.length)return NaN;n=n.slice(-t);let r=0;return n.reduce((e,t)=>{let n=Math.sqrt(t.downloadedBytes);return r+=n,e+t.value*n},0)/r}function h(e,t){let n=e;if(0===t||!n||0===n.length)return NaN;n=n.slice(-t);let r=0;return n.reduce((e,t,n)=>{let i=n+1;return r+=i,e+t.value*i},0)/r}function m(e,t){let n=e;if(0===t||!n||0===n.length)return NaN;n=n.slice(-t);const r=n.reduce((e,t)=>e+1/t.value,0);return n.length/r}function E(e,t){let n=e;if(0===t||!n||0===n.length)return NaN;n=n.slice(-t);let r=0;const i=n.reduce((e,t)=>{let n=Math.sqrt(t.downloadedBytes);return r+=n,e+1/t.value*n},0);return r/i}function T(e,t){let n=e;if(0===t||!n||0===n.length)return NaN;n=n.slice(-t);let r=0;const i=n.reduce((e,t,n)=>{let i=n+1;return r+=i,e+1/t.value*i},0);return r/i}function y(e,t,n=!0){if(!e||e.totalWeight<=0)return NaN;const r=e.fastEstimate/(1-Math.pow(.5,e.totalWeight/t.fast)),i=e.slowEstimate/(1-Math.pow(.5,e.totalWeight/t.slow));return n?Math.min(r,i):Math.max(r,i)}function _(e,t){if(0===t||!e||0===e.length)return NaN;let n=e.slice(-t).map(e=>e.value),r=2/(n.length+1),i=n[n.length-1],a=n[n.length-1];for(let e=0;e<n.length;e++)i=r*n[e]+(1-r)*i,a=r*i+(1-r)*a;return a}function S(e,t=null,n=NaN){const r=u(g.default.THROUGHPUT_TYPES.BANDWIDTH,e,t,n);return Math.round(r)}
2const I={getArithmeticMean:c,getAverageLatency:function(e,t=null,n=NaN){const r=u(g.default.THROUGHPUT_TYPES.LATENCY,e,t,n);return Math.round(r)},getAverageThroughput:S,getByteSizeWeightedArithmeticMean:f,getByteSizeWeightedHarmonicMean:E,getDateWeightedArithmeticMean:h,getDateWeightedHarmonicMean:T,getEwma:y,getHarmonicMean:m,getRawThroughputData:function(e){return e?n.getThroughputDict(e):[]},getSafeAverageThroughput:function(e,t=null,n=NaN){let r=S(e,t,n);return isNaN(r)||(r*=i.get().streaming.abr.throughput.bandwidthSafetyFactor),r},getZlema:_,initialize:function(){n=Ba(e).create({settings:i}),t.on(p.default.METRIC_ADDED,s,I),window.performance?.addEventListener?.("resourcetimingbufferfull",a)},reset:function(){n.reset(),t.off(p.default.METRIC_ADDED,s,I),window.performance?.removeEventListener?.("resourcetimingbufferfull",a)},setConfig:function(e){e.settings&&(i=e.settings),e.playbackController&&(r=e.playbackController)}};return I}Ha.__dashjs_factory_name="ThroughputController";var Ga=r.default.getSingletonFactory(Ha);function Ya(){const e=this.context,t=(0,d.default)(e).getInstance(),n=(0,l.default)(e).getInstance();let r,i,a,o;function s(e){o=e}function u(e,t,n,r){let i,a=t.adaptation.period.mpd;const o=a.availabilityStartTime;if(r)i=n&&a.timeShiftBufferDepth!==Number.POSITIVE_INFINITY?new Date(o.getTime()+1e3*(e+a.timeShiftBufferDepth)):a.availabilityEndTime;else if(n){const n=t.availabilityTimeOffset;i=new Date(o.getTime()+1e3*(e-n))}else i=o;return i}function c(e,t){return(e.getTime()-t.mpd.availabilityStartTime.getTime()+1e3*o)/1e3}function f(e,t){return e+(t.adaptation.period.start-t.presentationTimeOffset)}function m(e){const t={start:NaN,end:NaN},n=e[0].getAdapter().getRegularPeriods()[0],r=c(new Date,n);if(!e||0===e.length)return{range:t,now:r};e.forEach(e=>{let n=e.getCurrentRepresentationForType(g.default.VIDEO);if(n||(n=e.getCurrentRepresentationForType(g.default.AUDIO)),!n){const t=e.getAdapter(),r=t.getMediaInfoForType(e.getStreamInfo(),g.default.VIDEO)||t.getMediaInfoForType(e.getStreamInfo(),g.default.AUDIO);n=t.getVoRepresentations(r)[0]}let a={start:NaN,end:NaN};if(n)if(n.segmentInfoType===Ce.default.SEGMENT_TIMELINE)a=function(e){const t=e.adaptation.period.mpd.manifest.Period[e.adaptation.period.index].AdaptationSet[e.adaptation.index],n=i.getRepresentationFor(e.index,t),r=n.SegmentTemplate||n.SegmentList,a=r.SegmentTimeline,o=r.timescale,s=a.S,u={start:0,end:0},l=s[0].t,c=!isNaN(l),d=c?l:0;let h,g,p,m,E=0;for(c&&(u.start=f(d/o,e)),p=0,m=s.length;p<m;p++)h=s[p],g=0,h.hasOwnProperty("r")&&(g=h.r),E+=h.d*(1+g);return u.end=f((d+E)/o,e),u}(n);else{const e=n.adaptation.period;a.start=e.start,a.end=Math.max(r,e.start+e.duration)}!isNaN(a.start)&&(isNaN(t.start)||t.start>a.start)&&(t.start=a.start),!isNaN(a.end)&&(isNaN(t.end)||t.end<a.end)&&(t.end=a.end)}),t.end=Math.min(r,t.end);const a=T(e,t.end,!0);return t.end=isNaN(a)?t.end:a,t.start=n&&n.mpd&&n.mpd.timeShiftBufferDepth&&!isNaN(n.mpd.timeShiftBufferDepth)&&!isNaN(t.end)?Math.max(t.end-n.mpd.timeShiftBufferDepth,t.start):t.start,t.start=T(e,t.start),{range:t,now:r}}function E(e,t){a=e-t.end}function T(e,t,n=!1){try{let r=0,i=!1,a=NaN;for(;!i&&r<e.length;){const o=e[r].getStreamInfo();o.start<=t&&(!isFinite(o.duration)||o.start+o.duration>=t)?(a=t,i=!0):!n&&o.start>t&&(isNaN(a)||o.start<a)?a=o.start:n&&o.start+o.duration<t&&(isNaN(a)||o.start+o.duration>a)&&(a=o.start+o.duration),r+=1}return a}catch(e){return t}}function y(e){void 0===e.offset||isNaN(e.offset)||s(e.offset/1e3)}function _(){o=0,a=0}function S(){t.off(h.default.UPDATE_TIME_SYNC_OFFSET,y,this),_()}return r={calcAvailabilityEndTimeFromPresentationTime:function(e,t,n){return u(e,t,n,!0)},calcAvailabilityStartTimeFromPresentationTime:function(e,t,n){return u(e,t,n)},calcMediaTimeFromPresentationTime:function(e,t){return e-t.adaptation.period.start+t.presentationTimeOffset},calcPeriodRelativeTimeFromMpdRelativeTime:function(e,t){return t-e.adaptation.period.start},calcPresentationTimeFromMediaTime:f,calcPresentationTimeFromWallTime:c,calcTimeShiftBufferWindow:function(e,r){if(!r)return function(e){const t={start:NaN,end:NaN};let n=0,r=NaN;
2return e.forEach(e=>{const t=e.getStreamInfo();n+=t.duration,(isNaN(r)||t.start<r)&&(r=t.start)}),t.start=r,t.end=r+n,t}(e);if(n.get().streaming.timeShiftBuffer.calcFromSegmentTimeline){const t=m(e);return E(t.now,t.range),t.range}return function(e){const r={start:NaN,end:NaN};if(!e||0===e.length)return r;const i=e[0].getAdapter().getRegularPeriods()[0],a=c(new Date,i),o=i.mpd.timeShiftBufferDepth,s=isNaN(o)?0:a-o;if(r.start=T(e,s),r.end=!isNaN(r.start)&&a<r.start?a:T(e,a,!0),!isNaN(o)&&r.end<a-o&&(r.end=NaN),n.get().streaming.timeShiftBuffer.fallbackToSegmentTimeline){const n=m(e);if(n.range.end<r.start)return t.trigger(p.default.CONFORMANCE_VIOLATION,{level:Hi.LEVELS.WARNING,event:Hi.EVENTS.INVALID_DVR_WINDOW}),E(n.now,n.range),n.range}return r}(e)},calcWallTimeForSegment:function(e,t){let n,r,i;return t&&(n=e.representation.adaptation.period.mpd.suggestedPresentationDelay,r=e.presentationStartTime+n,i=new Date(e.availabilityStartTime.getTime()+1e3*r)),i},getClientReferenceTime:function(){return Date.now()-1e3*a+1e3*o},getClientTimeOffset:function(){return o},initialize:function(){_(),t.on(h.default.UPDATE_TIME_SYNC_OFFSET,y,this)},reset:S,setClientTimeOffset:s,setConfig:function(e){e&&e.dashManifestModel&&(i=e.dashManifestModel)}},i=(0,wt.default)(e).getInstance(),S(),r}Ya.__dashjs_factory_name="TimelineConverter";var Va=r.default.getSingletonFactory(Ya),qa=class{constructor(){this.t=null,this.xywh=null,this.track=null,this.id=null,this.s=null,this.r=null}};function Ka(){let e,t;return e={initialize:function(e){if(t=new qa,!e)return null;const n=e.indexOf("#");if(-1!==n){const r=e.substr(n+1).split("&");for(let e=0,n=r.length;e<n;++e){const n=r[e],i=n.indexOf("=");if(-1!==i){const e=n.substring(0,i);t.hasOwnProperty(e)&&(t[e]=n.substr(i+1))}}}},getURIFragmentData:function(){return t}},e}Ka.__dashjs_factory_name="URIFragmentModel";var ja=r.default.getSingletonFactory(Ka),Wa=n(1349);const za=new Map([[g.default.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,"loadedmetadata"],[g.default.VIDEO_ELEMENT_READY_STATES.HAVE_CURRENT_DATA,"loadeddata"],[g.default.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA,"canplay"],[g.default.VIDEO_ELEMENT_READY_STATES.HAVE_ENOUGH_DATA,"canplaythrough"]]);function $a(){let e,t,n,r,i,a,o,s,c,f,p,m;const E=this.context,T=(0,d.default)(E).getInstance(),y=[];function _(e,t=!1){n&&(t?n.playbackRate=e:w(g.default.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA,()=>{n.playbackRate=e}))}function S(){return y.length>0}function I(){if(n&&S()&&0===n.playbackRate){const e=document.createEvent("Event");e.initEvent("waiting",!0,!1),n.dispatchEvent(e)}}function A(e,t){n&&n.addEventListener(e,t)}function R(e,t){n&&n.removeEventListener(e,t)}function b(){return n?n.readyState:NaN}function v(){return n?n.buffered:null}function C(){return n?n.clientWidth:NaN}function N(){return n?n.clientHeight:NaN}function D(e,t,r,i,a){if(n)for(let o=0;o<n.textTracks.length;o++)if(n.textTracks[o].kind===e&&(!t||n.textTracks[o].label==t)&&n.textTracks[o].language===r&&n.textTracks[o].isTTML===i&&n.textTracks[o].isEmbedded===a)return n.textTracks[o];return null}function w(e,t){return e===g.default.VIDEO_ELEMENT_READY_STATES.HAVE_NOTHING||b()>=e?(t(),null):function(e,t){const n=()=>{R(e,n),t(e)};return A(e,n),{func:n,event:e}}(za.get(e),t)}return r={addEventListener:A,addTextTrack:function(e,t,r,i,a){if(!n)return null;let o=D(e,t,r,i,a);return o||(o=n.addTextTrack(e,t,r),o.isEmbedded=a,o.isTTML=i),o},appendChild:function(e){n&&(n.appendChild(e),void 0!==e.isTTML&&(n.textTracks[n.textTracks.length-1].isTTML=e.isTTML,n.textTracks[n.textTracks.length-1].isEmbedded=e.isEmbedded))},getBufferRange:v,getClientHeight:N,getClientWidth:C,getElement:function(){return n},getEnded:function(){return n?n.ended:null},getPlaybackQuality:function(){if(!n)return null;let e="webkitDroppedFrameCount"in n&&"webkitDecodedFrameCount"in n,t=null;return"getVideoPlaybackQuality"in n?t=n.getVideoPlaybackQuality():e&&(t={droppedVideoFrames:n.webkitDroppedFrameCount,totalVideoFrames:n.webkitDroppedFrameCount+n.webkitDecodedFrameCount,creationTime:new Date}),t},getPlaybackRate:function(){return n?n.playbackRate:null},getPlayedRanges:function(){return n?n.played:null},getReadyState:b,getSource:function(){return n?n.src:null},getTTMLRenderingDiv:function(){return e},getTextTrack:D,getTextTracks:function(){return n?n.textTracks:[]},getTime:function(){return n?isNaN(t)?n.currentTime:t:null},getVideoElementSize:function(){const e=f.get().streaming.abr.usePixelRatioInLimitBitrateByPortal&&window.hasOwnProperty("devicePixelRatio")?window.devicePixelRatio:1;
2return{elementWidth:C()*e,elementHeight:N()*e}},getVideoHeight:function(){return n?n.videoHeight:NaN},getVideoRelativeOffsetLeft:function(){if(n){const e=n.parentNode.host||n.parentNode;return e?n.getBoundingClientRect().left-e.getBoundingClientRect().left:NaN}return NaN},getVideoRelativeOffsetTop:function(){if(n){const e=n.parentNode.host||n.parentNode;return e?n.getBoundingClientRect().top-e.getBoundingClientRect().top:NaN}return NaN},getVideoWidth:function(){return n?n.videoWidth:NaN},getVttRenderingDiv:function(){return m},initialize:function(){T.on(h.default.PLAYBACK_PLAYING,I,this)},isPaused:function(){return n?n.paused:null},isSeeking:function(){return n?n.seeking||!isNaN(t):null},isStalled:S,pause:function(){n&&(n.pause(),n.autoplay=!1)},play:function(){if(n){n.autoplay=!0;const e=n.play();e&&e.catch&&"undefined"!=typeof Promise&&e.catch(e=>{"NotAllowedError"===e.name&&T.trigger(h.default.PLAYBACK_NOT_ALLOWED),i.warn(`Caught pending play exception - continuing (${e})`)})}},removeChild:function(e){n&&n.removeChild(e)},removeEventListener:R,reset:function(){clearTimeout(p),T.off(h.default.PLAYBACK_PLAYING,I,this),y.length=0,function(){try{o&&n&&(o.unobserve(n),o.disconnect(),o=null)}catch(e){}}()},setConfig:function(e){e&&e.settings&&(f=e.settings)},setCurrentTime:function(e,r){n&&(c&&c.func&&c.event&&R(c.event,c.func),t=e,c=w(g.default.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,()=>{if(n)if(n.currentTime!==t)try{t=r?function(e){const t=v();let n=e,r=9999999999;if(t)for(let i=0;i<t.length;i++){const a=t.start(i),o=t.end(i),s=Math.abs(a-e),u=Math.abs(o-e);if(e>=a&&e<=o)return e;s<r&&(r=s,n=a),u<r&&(r=u,n=o)}return n}(t):t,isNaN(t)||(n.currentTime=t),t=NaN}catch(e){0===n.readyState&&e.code===e.INVALID_STATE_ERR&&(p=setTimeout(function(){n.currentTime=t,t=NaN},400))}else t=NaN}))},setDisableRemotePlayback:function(e){n&&(n.disableRemotePlayback=e)},setElement:function(e){if(!(null==e||e&&/^(VIDEO|AUDIO)$/i.test(e.nodeName)))throw"element is not video or audio DOM type!";n=e,function(e){try{if(!o||!e)return;o.observe(e)}catch(e){}}(n)},setPlaybackRate:_,setSource:function(e){n&&(e?n.src=e:(n.removeAttribute("src"),n.load()))},setStallState:function(e,t){!function(e,t){t?function(e){if(null!==e&&n&&!n.seeking&&-1===y.indexOf(e)&&(y.push(e),f.get().streaming.buffer.syntheticStallEvents.enabled&&n&&1===y.length&&(f.get().streaming.buffer.syntheticStallEvents.ignoreReadyState||b()>=g.default.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA))){a=n.playbackRate,_(0,!0);const e=document.createEvent("Event");e.initEvent("waiting",!0,!1),n.dispatchEvent(e)}}(e):function(e){let t=y.indexOf(e);if(null!==e&&(-1!==t&&y.splice(t,1),f.get().streaming.buffer.syntheticStallEvents.enabled&&n&&!S())){const e=()=>{if(_(a||1,f.get().streaming.buffer.syntheticStallEvents.ignoreReadyState),!n.paused){const e=document.createEvent("Event");e.initEvent("playing",!0,!1),n.dispatchEvent(e)}};f.get().streaming.buffer.syntheticStallEvents.ignoreReadyState?e():(s&&s.func&&s.event&&R(s.event,s.func),s=w(g.default.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA,e))}}(e)}(e,t)},setTTMLRenderingDiv:function(t){e=t,e.style.position="absolute",e.style.display="flex",e.style.overflow="hidden",e.style.pointerEvents="none",e.style.top=0,e.style.left=0},setVttRenderingDiv:function(e){m=e},waitForReadyState:w},i=(0,u.default)(E).getInstance().getLogger(r),f=(0,l.default)(E).getInstance(),t=NaN,function(){try{o=new ResizeObserver(()=>{T.trigger(h.default.VIDEO_ELEMENT_RESIZED)})}catch(e){}}(),r}$a.__dashjs_factory_name="VideoModel";var Qa=r.default.getSingletonFactory($a),Xa=n(8986);function Za(){const e="You must first call initialize() and set a source before calling this method",t="You must first call initialize() and set a valid source and view before calling this method",n="You must first call attachView() to set the video element before calling this method",i="You must first call attachSource() with a valid source before calling this method",a="MediaPlayer not initialized!",s=this.context,c=(0,d.default)(s).getInstance();let f=(0,l.default)(s).getInstance();const m=(0,u.default)(s).getInstance({settings:f});let E,T,y,_,S,I,A,b,v,C,N,D,w,M,P,O,L,U,x,F,k,B,H,G,Y,V,q,K,j,W,z,$,Q,X,Z,J,ee,te,ne,re,ie,ae;function oe(){Re(null),_e(null),_=null,P&&(P.reset(),P=null),O&&(O.reset(),O=null),k&&k.reset(),f.reset(),U&&(U.reset(),U=null),ae&&(ae.resetLoader(),ae=null)}function se(){return!!y&&!!ee.getElement()}function ue(){return(0,Xa.getVersionString)()}function le(){if(!A)throw t;return j.isPaused()}
2function ce(){if(!A)throw t;return j.getIsDynamic()}function fe(e){const t=V&&V.hasVideoTrack()?g.default.VIDEO:g.default.AUDIO;let n=Q.getCurrentDVRInfo(t);return n?de(n.range.start+e,n):0}function de(e,t){let n=j.getOriginalLiveDelay();return e>t.range.end-n&&(e=t.range.end-n),e}function he(e=""){if(!A)throw t;let n=ye().currentTime;return""!==e&&(n=V.getTimeRelativeToStreamId(n,e)),n}function ge(e){(0,Ge.checkParameterType)(e,"boolean"),b=e}function me(){k.restoreDefaultUTCTimingSources()}function Te(){return Q}function ye(){if(!ee.getElement())throw n;return ee.getElement()}function _e(e){if(!S)throw a;ee.setElement(e),e&&(Me(),function(){if(O||"undefined"==typeof dashjs)return;let e=dashjs.MetricsReporting;if("function"==typeof e){let t=e(s).create();O=t.createMetricsReporting({debug:m,eventBus:c,mediaElement:ye(),adapter:x,dashMetrics:Q,mediaPlayerModel:F,events:h.default,constants:g.default,metricsConstants:o})}}(),function(){if(L||"undefined"==typeof dashjs)return;let e=dashjs.MssHandler;"function"==typeof e&&(Ae.default.extend(e.errors),L=e(s).create({eventBus:c,mediaPlayerModel:F,dashMetrics:Q,manifestModel:X,playbackController:j,streamController:V,protectionController:P,baseURLController:H,errHandler:B,events:h.default,constants:g.default,debug:m,initSegmentType:R.HTTPRequest.INIT_SEGMENT_TYPE,BASE64:Ee,ISOBoxer:Ze,settings:f}))}(),V&&V.switchToVideoElement(v)),A&&(ve(),De()),Le(v)}function Se(t,n,r=!0){if(!I)throw e;let i=n?V.getStreamById(n):be();return i?i.getRepresentationsByType(t,r):[]}function Ie(t){if(!I)throw e;let n=V.getActiveStreamInfo();return n?M.getTracksFor(t,n.id).filter(e=>!P||P.areKeyIdsUsable(e.normalizedKeyIds)):[]}function Re(e,t=NaN){if(!S)throw a;"string"==typeof e&&te.initialize(e),null==t&&(t=NaN),isNaN(t)||(t=Math.max(0,t)),v=t,y=e,(I||A)&&(ve(),De()),se()&&Le(v)}function be(){if(!I)throw e;let t=V.getActiveStreamInfo();return t?V.getStreamById(t.id):null}function ve(){A=!1,I=!1,x.reset(),V.reset(),K.reset(),$.reset(),j.reset(),W.reset(),z.reset(),C.reset(),N.reset(),M.reset(),re.reset(),P&&(f.get().streaming.protection.keepProtectionMediaKeys?P.stop():(P.reset(),P=null,Me())),q.reset(),Z.reset(),J.reset()}function De(){k.resetPlaybackSessionSpecificSettings()}function we(){return qn(s).create({debug:m,errHandler:B,dashMetrics:Q,mediaPlayerModel:F,mssHandler:L,settings:f})}function Me(){if(P)return P;if("undefined"==typeof dashjs)return null;let e=dashjs.Protection;if("function"==typeof e){let t=e(s).create();return h.default.extend(e.events),p.default.extend(e.events,{publicOnly:!0}),Ae.default.extend(e.errors),P=t.createProtectionSystem({debug:m,errHandler:B,videoModel:ee,customParametersModel:k,capabilities:G,eventBus:c,events:h.default,BASE64:Ee,constants:g.default,cmcdController:Z,settings:f}),G||(G=(0,nt.default)(s).getInstance()),G.setProtectionController(P),P}return null}function Pe(){if(!S)throw a;if(U)return U;if("undefined"==typeof dashjs)return null;let e=dashjs.OfflineController;if("function"==typeof e){h.default.extend(e.events),p.default.extend(e.events,{publicOnly:!0}),Ae.default.extend(e.errors);const t=we(),n=Qn(s).create();return n.setConfig({manifestModel:X,adapter:x,manifestLoader:t,errHandler:B,contentSteeringController:z}),U=e(s).create({debug:m,manifestUpdater:n,baseURLController:H,manifestLoader:t,manifestModel:X,mediaPlayerModel:F,abrController:C,playbackController:j,adapter:x,errHandler:B,dashMetrics:Q,timelineConverter:w,segmentBaseController:re,schemeLoaderFactory:D,eventBus:c,events:h.default,errors:Ae.default,constants:g.default,settings:f,dashConstants:Ce.default,urlUtils:(0,Ne.default)(s).getInstance()}),U}return null}function Le(e=NaN){U&&U.resetRecords(),!I&&y&&(I=!0,T.info("Streaming Initialized"),function(){const e=we();V||(V=Ki(s).getInstance()),q||(q=Fa(s).create({adapter:x,baseURLController:H,errHandler:B,manifestModel:X,mediaController:M,settings:f,videoModel:ee})),Y.setConfig({adapter:x,capabilities:G,customParametersModel:k,errHandler:B,manifestModel:X,protectionController:P,settings:f}),V.setConfig({abrController:C,adapter:x,baseURLController:H,capabilities:G,capabilitiesFilter:Y,contentSteeringController:z,customParametersModel:k,dashMetrics:Q,errHandler:B,manifestLoader:e,manifestModel:X,mediaController:M,mediaPlayerModel:F,playbackController:j,protectionController:P,segmentBaseController:re,serviceDescriptionController:W,settings:f,textController:q,throughputController:N,timelineConverter:w,uriFragmentModel:te,videoModel:ee}),K.setConfig({adapter:x,playbackController:j,settings:f,streamController:V,timelineConverter:w,videoModel:ee}),j.setConfig({adapter:x,dashMetrics:Q,serviceDescriptionController:W,settings:f,streamController:V,timelineConverter:w,videoModel:ee}),$.setConfig({mediaPlayerModel:F,playbackController:j,settings:f,streamController:V,videoModel:ee}),N.setConfig({settings:f,playbackController:j}),C.setConfig({adapter:x,capabilities:G,cmsdModel:J,customParametersModel:k,dashMetrics:Q,domStorage:ne,mediaPlayerModel:F,settings:f,streamController:V,throughputController:N,videoModel:ee}),Z.setConfig({abrController:C,dashMetrics:Q,errHandler:B,mediaPlayerModel:F,playbackController:j,serviceDescriptionController:W,throughputController:N}),ie.setConfig({serviceDescriptionController:W}),J.setConfig({}),M.initialize(),N.initialize(),C.initialize(),V.initialize(b,_),q.initialize(),K.initialize(),$.initialize(),Z.initialize(b),J.initialize(),z.initialize(),re.initialize()}(),"string"==typeof y?V.load(y,e):V.loadWithManifest(y,e)),!A&&se()&&(A=!0,c.trigger(p.default.PLAYBACK_INITIALIZED),T.info("Playback Initialized"))}return E={addABRCustomRule:function(e,t,n){k.addAbrCustomRule(e,t,n)},addExternalSubtitle:function(e){e instanceof pn.default||T.error("Invalid external subtitle object. Must be an instance of dashjs.ExternalSubtitle"),k.addExternalSubtitle(e)},addRequestInterceptor:function(e){k.addRequestInterceptor(e)},addResponseInterceptor:function(e){k.addResponseInterceptor(e)},addUTCTimingSource:function(e,t){k.addUTCTimingSource(e,t)},attachProtectionController:function(e){P=e},attachSource:Re,attachTTMLRenderingDiv:function(e){if(!ee.getElement())throw n;ee.setTTMLRenderingDiv(e)},attachView:_e,attachVttRenderingDiv:function(e){if(!ee.getElement())throw n;ee.setVttRenderingDiv(e)},clearDefaultUTCTimingSources:function(){k.clearDefaultUTCTimingSources()},convertToTimeCode:function(e){e=Math.max(e,0);
2let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%3600%60);return(0===t?"":t<10?"0"+t.toString()+":":t.toString()+":")+(n<10?"0"+n.toString():n.toString())+":"+(r<10?"0"+r.toString():r.toString())},destroy:function(){oe(),r.default.deleteSingletonInstances(s)},duration:function(){if(!A)throw t;let e=ye().duration;if(j.getIsDynamic()){const t=V&&V.hasVideoTrack()?g.default.VIDEO:g.default.AUDIO;let n=Q.getCurrentDVRInfo(t);e=n?n.range.end-n.range.start:0}return e},enableForcedTextStreaming:function(e){return!(!V.getActiveStreamInfo()||!q)&&q.enableForcedTextStreaming(e)},enableText:function(e){const t=V.getActiveStreamInfo();return!(!t||!q)&&q.enableText(t.id,e)},extend:function(e,t,n){r.default.extend(e,t,n,s)},formatUTC:function(e,t,n,r=!1){const i=new Date(1e3*e),a=i.toLocaleDateString(t),o=i.toLocaleTimeString(t,{hour12:n});return r?o+" "+a:o},getABRCustomRules:function(){return k.getAbrCustomRules()},getActiveStream:be,getAutoPlay:function(){return b},getAvailableBaseUrls:function(){const e=X.getValue();return e?H.getBaseUrls(e):[]},getAvailableLocations:function(){const e=X.getValue();if(!e)return[];const t=x.getLocation(e),n=z.getSynthesizedLocationElements(t);return t.concat(n)},getAverageLatency:function(e=g.default.VIDEO,t=null,n=NaN){return N?N.getAverageLatency(e,t,n):0},getAverageThroughput:function(e=g.default.VIDEO,t=null,n=NaN){return N?N.getAverageThroughput(e,t,n):0},getBufferLength:function(e){const t=[g.default.VIDEO,g.default.AUDIO,g.default.TEXT];if(e)return-1!==t.indexOf(e)?Te().getCurrentBufferLevel(e)||NaN:(T.warn("getBufferLength requested for invalid type"),NaN);{const e=t.map(e=>Ie(e).length>0?Te().getCurrentBufferLevel(e):Number.MAX_VALUE).reduce((e,t)=>Math.min(e,t));return e===Number.MAX_VALUE?NaN:e}},getCurrentLiveLatency:function(){if(!S)throw a;return A?j.getCurrentLiveLatency():NaN},getCurrentRepresentationForType:function(t){if(!I)throw e;if(t!==g.default.IMAGE&&t!==g.default.VIDEO&&t!==g.default.AUDIO)return null;const n=be();if(!n)return null;if(t===g.default.IMAGE){const e=n.getThumbnailController();return e?e.getCurrentTrack():-1}return n.getCurrentRepresentationForType(t)},getCurrentSteeringResponseData:function(){if(z)return z.getCurrentSteeringResponseData()},getCurrentTextTrackIndex:function(){let e=NaN;const t=V.getActiveStreamInfo();if(t&&q)return e=q.getCurrentTrackIdx(t.id),e},getCurrentTrackFor:function(t){if(!I)throw e;let n=V.getActiveStreamInfo();return n?M.getCurrentTrackFor(t,n.id):null},getDashAdapter:function(){return x},getDashMetrics:Te,getDebug:function(){return m},getDvrSeekOffset:fe,getDvrWindow:function(){if(!A)throw t;const e=V&&V.hasVideoTrack()?g.default.VIDEO:g.default.AUDIO;let n=Q.getCurrentDVRInfo(e);if(!n)return{};let r=0;const i=j.getIsDynamic();return i&&(r=n.manifestInfo.availableFrom.getTime()/1e3),{start:n.range.start,end:n.range.end,startAsUtc:i?r+n.range.start:NaN,endAsUtc:i?r+n.range.end:NaN,size:n.range.end-n.range.start}},getExternalSubtitles:function(){k.getExternalSubtitles()},getInitCache:function(){return bt(s).getInstance()},getInitialMediaSettingsFor:function(e){if(!S)throw a;return M.getInitialSettings(e)},getLowLatencyModeEnabled:function(){if(!A)throw t;return j.getLowLatencyModeEnabled()},getManifest:function(){return X.getValue()},getOfflineController:function(){return Pe()},getPlaybackRate:function(){return ye().playbackRate},getProtectionController:function(){return Me()},getProtectionData:function(){return V?V.getProtectionData():null},getRawThroughputData:function(e=g.default.VIDEO){return N?N.getRawThroughputData(e):[]},getRepresentationsByType:function(e,t=null){return Se(e,t,!0)},getRepresentationsByTypeUnfiltered:function(e,t=null){return Se(e,t,!1)},getSafeAverageThroughput:function(e=g.default.VIDEO,t=null,n=NaN){return N?N.getSafeAverageThroughput(e,t,n):0},getSettings:function(){return f.get()},getSource:function(){if(!y)throw i;return y},getStreamsFromManifest:function(t){if(!I)throw e;return x.getStreamsInfo(t)},getTTMLRenderingDiv:function(){return ee?ee.getTTMLRenderingDiv():null},getTargetLiveDelay:function(){if(!A)throw t;return j.getOriginalLiveDelay()},getTracksFor:Ie,getTracksForTypeFromManifest:function(t,n,r){if(!I)throw e;return(r=r||x.getStreamsInfo(n,1)[0])?x.getAllMediaInfoForType(r,t,n):[]},getVersion:ue,getVideoElement:ye,getVolume:function(){return ye().volume},getXHRWithCredentialsForType:function(e){return k.getXHRWithCredentialsForType(e)},initialize:function(e,t,n,r=NaN){G||(G=(0,nt.default)(s).getInstance(),G.setConfig({settings:f,protectionController:P})),B||(B=gn(s).getInstance()),G.supportsMediaSource()?(S||(S=!0,w=Va(s).getInstance(),N||(N=Ga(s).getInstance()),C||(C=pe(s).getInstance()),D||(D=(0,sr.default)(s).getInstance()),j||(j=or(s).getInstance()),M||(M=nr(s).getInstance()),V||(V=Ki(s).getInstance()),K||(K=En(s).getInstance()),$||($=ft(s).getInstance()),W||(W=Ir(s).getInstance()),z||(z=Oe(s).getInstance()),Y||(Y=ut(s).getInstance()),x=Wt(s).getInstance(),X=jn(s).getInstance(),Z=(0,lt.default)(s).getInstance(),J=(0,gt.default)(s).getInstance(),ie=ht(s).getInstance(),Q=dn(s).getInstance({settings:f}),ne=At(s).getInstance({settings:f}),x.setConfig({constants:g.default,cea608parser:new ga,errHandler:B,BASE64:Ee}),H||(H=We(s).create()),H.setConfig({adapter:x,contentSteeringController:z}),W.setConfig({adapter:x}),re||(re=Er(s).getInstance({dashMetrics:Q,mediaPlayerModel:F,errHandler:B,baseURLController:H,events:h.default,eventBus:c,debug:m,boxParser:tt(s).getInstance(),errors:Ae.default})),M.setConfig({domStorage:ne,settings:f,mediaPlayerModel:F,customParametersModel:k,videoModel:ee}),F.setConfig({playbackController:j,serviceDescriptionController:W}),z.setConfig({adapter:x,errHandler:B,dashMetrics:Q,mediaPlayerModel:F,manifestModel:X,serviceDescriptionController:W,throughputController:N,eventBus:c}),me(),ge(void 0===n||n),Pe()),e&&_e(e),t&&Re(t,r),T.info("[dash.js "+ue()+"] MediaPlayer has been initialized")):B.error(new He.default(Ae.default.CAPABILITY_MEDIASOURCE_ERROR_CODE,Ae.default.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE))},isDynamic:ce,isMuted:function(){return ye().muted},isPaused:le,isReady:se,isSeeking:function(){if(!A)throw t;return j.isSeeking()},isTextEnabled:function(){const e=V.getActiveStreamInfo();return!(!e||!q)&&q.isTextEnabled(e)},off:function(e,t,n){c.off(e,t,n)},on:function(e,t,n,r){c.on(e,t,n,r)},pause:function(){if(!A)throw t;j.pause()},play:function(){if(!A)throw t;(!b||le()&&A)&&j.play(!0)}
2,preload:function(){if(!ee.getElement()&&!I){if(!y)throw i;Le(v)}},provideThumbnail:function(e,t){if("function"!=typeof t)return;if(e<0)return void t(null);const n=j.getIsDynamic()?fe(e):e,r=V.getStreamForTime(n);if(null===r)return void t(null);const i=r.getThumbnailController();if(i)return i.provide(n,t);t(null)},refreshManifest:function(e){if(!S)throw a;if(!se())return e(null,i);let t=this;if("function"==typeof e){const n=function(r){c.off(h.default.INTERNAL_MANIFEST_LOADED,n,t),r.error?e(null,r.error):e(r.manifest)};c.on(h.default.INTERNAL_MANIFEST_LOADED,n,t)}V.refreshManifest()},registerCertificateRequestFilter:function(e){k.registerCertificateRequestFilter(e)},registerCertificateResponseFilter:function(e){k.registerCertificateResponseFilter(e)},registerCustomCapabilitiesFilter:function(e){k.registerCustomCapabilitiesFilter(e)},registerLicenseRequestFilter:function(e){k.registerLicenseRequestFilter(e)},registerLicenseResponseFilter:function(e){k.registerLicenseResponseFilter(e)},removeABRCustomRule:function(e){k.removeAbrCustomRule(e)},removeAllABRCustomRule:function(){k.removeAllAbrCustomRule()},removeExternalSubtitleById:function(e){k.removeExternalSubtitleById(e)},removeExternalSubtitleByUrl:function(e){k.removeExternalSubtitleByUrl(e)},removeRequestInterceptor:function(e){k.removeRequestInterceptor(e)},removeResponseInterceptor:function(e){k.removeResponseInterceptor(e)},removeUTCTimingSource:function(e,t){k.removeUTCTimingSource(e,t)},reset:oe,resetCustomInitialTrackSelectionFunction:function(){k.resetCustomInitialTrackSelectionFunction(null)},resetSettings:function(){f.reset()},restoreDefaultUTCTimingSources:me,retrieveManifest:function(e,t){ae&&ae.resetLoader();const n=we(),r=()=>{c.off(h.default.INTERNAL_MANIFEST_LOADED,i,this),n.reset(),ae=null};ae={manifestLoader:n,resetLoader:r};const i=e=>{"function"==typeof t&&(e.error?t(null,e.error):t(e.manifest)),r()};c.on(h.default.INTERNAL_MANIFEST_LOADED,i,this),te.initialize(e),n.load(e)},seek:function(e){if(!A)throw t;if((0,Ge.checkParameterType)(e,"number"),isNaN(e))throw g.default.BAD_ARGUMENT_ERROR;e<0&&(e=0);let n=j.getIsDynamic()?fe(e):e;const r=ye();!j.getIsDynamic()&&r.duration&&(n=Math.min(r.duration,n)),j.seek(n,!1,!1,!0)},seekToOriginalLive:function(){A&&ce()&&j.seekToOriginalLive()},seekToPresentationTime:function(e){if(!A)throw t;if((0,Ge.checkParameterType)(e,"number"),isNaN(e))throw g.default.BAD_ARGUMENT_ERROR;e<0&&(e=0);const n=ye();if(!j.getIsDynamic()&&n.duration&&(e=Math.min(n.duration,e)),j.getIsDynamic()){const t=V&&V.hasVideoTrack()?g.default.VIDEO:g.default.AUDIO;let n=Q.getCurrentDVRInfo(t);if(!n)return;(e=de(e,n))<n.range.start&&(e=n.range.start)}j.seek(e,!1,!1,!0)},setAutoPlay:ge,setConfig:function(e){e&&(e.capabilities&&(G=e.capabilities),e.capabilitiesFilter&&(Y=e.capabilitiesFilter),e.streamController&&(V=e.streamController),e.textController&&(q=e.textController),e.gapController&&(K=e.gapController),e.throughputController&&(N=e.throughputController),e.playbackController&&(j=e.playbackController),e.serviceDescriptionController&&(W=e.serviceDescriptionController),e.contentSteeringController&&(z=e.contentSteeringController),e.clientDataReportingController&&(ie=e.clientDataReportingController),e.catchupController&&($=e.catchupController),e.mediaPlayerModel&&(F=e.mediaPlayerModel),e.customParametersModel&&(k=e.customParametersModel),e.abrController&&(C=e.abrController),e.schemeLoaderFactory&&(D=e.schemeLoaderFactory),e.mediaController&&(M=e.mediaController),e.settings&&(f=e.settings),e.dashMetrics&&(Q=e.dashMetrics))},setCurrentTrack:function(t,n=!1){if(!I)throw e;!P||P.areKeyIdsUsable(t.normalizedKeyIds)?M.setTrack(t,{noSettingsSave:n}):T.error(`Can not switch to track with index ${t.index} because key is not usable`)},setCustomInitialTrackSelectionFunction:function(e){k.setCustomInitialTrackSelectionFunction(e)},setInitialMediaSettingsFor:function(e,t){if(!S)throw a;let n=function(e){const t=f.get().streaming.defaultSchemeIdUri;let n={};function r(e,t,n){let r={};if(t){if(t instanceof Array)throw"Array type not supported for settings!";return t instanceof Object?(r.schemeIdUri=t.schemeIdUri?t.schemeIdUri:"",r.value=t.value?t.value:""):(r.schemeIdUri=n,r.value=t,T.warn("No schemeIdUri provided for "+e+', using default "'+n+'"')),r}return null}return void 0!==e.id&&(n.id=e.id),void 0!==e.lang&&(n.lang=e.lang),isNaN(e.index)||(n.index=e.index),void 0!==e.viewpoint&&(n.viewpoint=r("viewpoint",e.viewpoint,t.viewpoint)),void 0!==e.audioChannelConfiguration&&(n.audioChannelConfiguration=r("audioChannelConfiguration",e.audioChannelConfiguration,t.audioChannelConfiguration)),void 0!==e.role&&null!==e.role&&(n.role=r("role",e.role,t.role),n.role.schemeIdUri===g.default.DASH_ROLE_SCHEME_ID&&"Main"===n.role.value&&(n.role.value=Ce.default.MAIN)),void 0!==e.accessibility&&(n.accessibility=r("accessibility",e.accessibility,t.accessibility)),n}(t);
2M.setInitialSettings(e,n)},setMute:function(e){(0,Ge.checkParameterType)(e,"boolean"),ye().muted=e},setPlaybackRate:function(e){ye().playbackRate=e},setProtectionData:function(e){const t=Wa.default.sanitizeProtectionDataCertUrls(e);_=t,V&&V.setProtectionData(_)},setRepresentationForTypeById:function(t,n,r=!1){if(t!==g.default.IMAGE&&t!==g.default.VIDEO&&t!==g.default.AUDIO)return;if(!I)throw e;const i=be();if(i)if(t===g.default.IMAGE){const e=i.getThumbnailController();e&&e.setTrackById(n)}else{const e=i.getRepresentationForTypeById(t,n);e&&C.manuallySetPlaybackQuality(t,V.getActiveStreamInfo(),e,{forceReplace:r})}},setRepresentationForTypeByIndex:function(t,n,r=!1){if(t!==g.default.IMAGE&&t!==g.default.VIDEO&&t!==g.default.AUDIO)return;if(!I)throw e;const i=be();if(i)if(t===g.default.IMAGE){const e=i.getThumbnailController();e&&e.setTrackByIndex(n)}else{const e=i.getRepresentationForTypeByIndex(t,n);e&&C.manuallySetPlaybackQuality(t,V.getActiveStreamInfo(),e,{forceReplace:r})}},setTextTrack:function(e){if(!A)throw t;const n=V.getActiveStreamInfo();n&&q&&q.setTextTrack(n.id,e)},setVolume:function(e){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw g.default.BAD_ARGUMENT_ERROR;ye().volume=e},setXHRWithCredentialsForType:function(e,t){k.setXHRWithCredentialsForType(e,t)},time:he,timeAsUTC:function(){if(!A)throw t;if(!j.getIsDynamic()||he()<0)return NaN;const e=V&&V.hasVideoTrack()?g.default.VIDEO:g.default.AUDIO;let n,r,i=Q.getCurrentDVRInfo(e);return i?(n=i.manifestInfo.availableFrom.getTime()/1e3,r=n+he(),r):0},timeInDvrWindow:function(){if(!A)throw t;if(!j.getIsDynamic())return he();let e=ye().currentTime;const n=V&&V.hasVideoTrack()?g.default.VIDEO:g.default.AUDIO;let r=Q.getCurrentDVRInfo(n);return e=null===r||0===e?0:Math.max(0,e-r.range.start),e},trigger:function(e,t,n){c.trigger(e,t,n)},triggerSteeringRequest:function(){if(z)return z.loadSteeringData()},unregisterCertificateRequestFilter:function(e){k.unregisterCertificateRequestFilter(e)},unregisterCertificateResponseFilter:function(e){k.unregisterCertificateResponseFilter(e)},unregisterCustomCapabilitiesFilter:function(e){k.unregisterCustomCapabilitiesFilter(e)},unregisterLicenseRequestFilter:function(e){k.unregisterLicenseRequestFilter(e)},unregisterLicenseResponseFilter:function(e){k.unregisterLicenseResponseFilter(e)},updateSettings:function(e){f.update(e)},updateSource:function(e){y=e,V.load(y)}},T=m.getLogger(E),S=!1,A=!1,I=!1,b=!0,v=NaN,P=null,U=null,_=null,x=null,re=null,h.default.extend(p.default),F=ir(s).getInstance(),k=(0,pt.default)(s).getInstance(),ee=Qa(s).getInstance(),te=ja(s).getInstance(),E}Za.__dashjs_factory_name="MediaPlayer";const Ja=r.default.getClassFactory(Za);Ja.events=p.default,Ja.errors=Ae.default,r.default.updateClassFactory(Za.__dashjs_factory_name,Ja);var eo=Ja},1191:function(e,t,n){n.r(t);var r=n(7252);class i extends r.default{constructor(){super(),this.AST_IN_FUTURE="astInFuture",this.BASE_URLS_UPDATED="baseUrlsUpdated",this.BUFFER_EMPTY="bufferStalled",this.BUFFER_LOADED="bufferLoaded",this.BUFFER_LEVEL_STATE_CHANGED="bufferStateChanged",this.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",this.DVB_FONT_DOWNLOAD_ADDED="dvbFontDownloadAdded",this.DVB_FONT_DOWNLOAD_COMPLETE="dvbFontDownloadComplete",this.DVB_FONT_DOWNLOAD_FAILED="dvbFontDownloadFailed",this.DYNAMIC_TO_STATIC="dynamicToStatic",this.ERROR="error",this.FRAGMENT_LOADING_COMPLETED="fragmentLoadingCompleted",this.FRAGMENT_LOADING_PROGRESS="fragmentLoadingProgress",this.FRAGMENT_LOADING_STARTED="fragmentLoadingStarted",this.FRAGMENT_LOADING_ABANDONED="fragmentLoadingAbandoned",this.LOG="log",this.MANIFEST_LOADING_STARTED="manifestLoadingStarted",this.MANIFEST_LOADING_FINISHED="manifestLoadingFinished",this.MANIFEST_LOADED="manifestLoaded",this.METRICS_CHANGED="metricsChanged",this.METRIC_CHANGED="metricChanged",this.METRIC_ADDED="metricAdded",this.METRIC_UPDATED="metricUpdated",this.PERIOD_SWITCH_STARTED="periodSwitchStarted",this.PERIOD_SWITCH_COMPLETED="periodSwitchCompleted",this.QUALITY_CHANGE_REQUESTED="qualityChangeRequested",this.QUALITY_CHANGE_RENDERED="qualityChangeRendered",this.NEW_TRACK_SELECTED="newTrackSelected",this.TRACK_CHANGE_RENDERED="trackChangeRendered",this.STREAM_INITIALIZING="streamInitializing",this.STREAM_UPDATED="streamUpdated",this.STREAM_ACTIVATED="streamActivated",this.STREAM_DEACTIVATED="streamDeactivated",this.STREAM_INITIALIZED="streamInitialized",this.STREAM_TEARDOWN_COMPLETE="streamTeardownComplete",this.TEXT_TRACKS_ADDED="allTextTracksAdded",this.TEXT_TRACK_ADDED="textTrackAdded",this.CUE_ENTER="cueEnter",this.CUE_EXIT="cueExit",this.THROUGHPUT_MEASUREMENT_STORED="throughputMeasurementStored",this.TTML_PARSED="ttmlParsed",this.TTML_TO_PARSE="ttmlToParse",this.CAPTION_RENDERED="captionRendered",this.CAPTION_CONTAINER_RESIZE="captionContainerResize",this.CAN_PLAY="canPlay",this.CAN_PLAY_THROUGH="canPlayThrough",this.PLAYBACK_ENDED="playbackEnded",this.PLAYBACK_ERROR="playbackError",this.PLAYBACK_INITIALIZED="playbackInitialized",this.PLAYBACK_NOT_ALLOWED="playbackNotAllowed",this.PLAYBACK_METADATA_LOADED="playbackMetaDataLoaded",this.PLAYBACK_LOADED_DATA="playbackLoadedData",this.PLAYBACK_PAUSED="playbackPaused",this.PLAYBACK_PLAYING="playbackPlaying",this.PLAYBACK_PROGRESS="playbackProgress",this.PLAYBACK_RATE_CHANGED="playbackRateChanged",this.PLAYBACK_SEEKED="playbackSeeked",this.PLAYBACK_SEEKING="playbackSeeking",this.PLAYBACK_STALLED="playbackStalled",this.PLAYBACK_STARTED="playbackStarted",this.PLAYBACK_TIME_UPDATED="playbackTimeUpdated",this.PLAYBACK_VOLUME_CHANGED="playbackVolumeChanged",this.PLAYBACK_WAITING="playbackWaiting",this.MANIFEST_VALIDITY_CHANGED="manifestValidityChanged",this.EVENT_MODE_ON_START="eventModeOnStart",this.EVENT_MODE_ON_RECEIVE="eventModeOnReceive",this.CONFORMANCE_VIOLATION="conformanceViolation",this.REPRESENTATION_SWITCH="representationSwitch",this.ADAPTATION_SET_REMOVED_NO_CAPABILITIES="adaptationSetRemovedNoCapabilities",this.CONTENT_STEERING_REQUEST_COMPLETED="contentSteeringRequestCompleted",this.INBAND_PRFT="inbandPrft",this.MANAGED_MEDIA_SOURCE_START_STREAMING="managedMediaSourceStartStreaming",this.MANAGED_MEDIA_SOURCE_END_STREAMING="managedMediaSourceEndStreaming"}}let a=new i;t.default=a},6882:function(e,t,n){n.r(t);var r=n(138),i=n(3346),a=n(8261),o=n(5212);function s(){let e,t,n,r;const s=this.context;function u(){const e=function(){if("function"!=typeof r)return null;try{return r()}catch(e){return null}}();return e&&Object.keys(e).length>0?e:n}function l(){const e=u();
2if(e&&e.version)return parseInt(e.version,10);const n=t.get().streaming.cmcd;return n&&n.version?parseInt(n.version,10):o.default.CMCD_DEFAULT_VERSION}function c(e,t,n={}){if(!e||!t)return;let r=t;for(const[e,t]of Object.entries(n))r=r.replace(`{${e}}`,t);const i=r.split(".");let a=e;for(let e=0;e<i.length;e++){const t=i[e];if(null==a)return;const n=t.match(/^([^\[]+)\[(\d+)\]$/);if(n){const[,e,t]=n;if(a=a[e],!Array.isArray(a))return;a=a[parseInt(t,10)]}else a=a[t]}return a}function f(e,n={}){const r=i.default[e];if(!r)return void 0!==n.defaultValue?n.defaultValue:void 0;const a=l(),o={settings:t.get(),manifestParams:u()||{}};if(r.version&&!r.version.includes(a))return void 0!==n.defaultValue?n.defaultValue:void 0;const s={};void 0!==n.targetIndex&&(s.targetIndex=n.targetIndex);const f="applyParametersFromMpd"===e||(o.settings?.streaming?.cmcd?.applyParametersFromMpd??!0),d=[...r.sources].sort((e,t)=>e.priority-t.priority);for(const e of d){if(!f&&e.path.startsWith("manifestParams"))continue;const t=c(o,e.path,s);if(null!=t)return"function"==typeof e.transform?e.transform(t):t}for(const e of d)if((f||!e.path.startsWith("manifestParams"))&&void 0!==e.default)return e.default;return void 0!==n.defaultValue?n.defaultValue:void 0}function d(){if(2!==l())return[];const e=f("eventTargets");return Array.isArray(e)?e:[]}return e={get:f,getEventTarget:function(e){const t=d();return e<0||e>=t.length?null:{get:t=>f(t,{targetIndex:e}),has:t=>null!=f(t,{targetIndex:e}),index:e,raw:t[e]}},getEventTargets:d,getVersion:function(){return l()},has:function(e){return null!=f(e)},hasManifestParams:function(){const e=u();return!(!e||!e.version)},isEnabled:function(){const e=t.get().streaming.cmcd;if(e?.applyParametersFromMpd??1){const e=u
vendor: 9,711 bytes, line 2
2();if(e&&e.version)return!0}return(!e||!1!==e.enabled)&&!0===f("enabled")},reset:function(){n=null,r=null},setManifestParams:function(e){n=e},setManifestParamsProviderFunction:function(e){r=e}},t=(0,a.default)(s).getInstance(),n=null,r=null,e}s.__dashjs_factory_name="CmcdConfigAccessor",t.default=r.default.getSingletonFactory(s)},3346:function(e,t,n){n.r(t);var r=n(5212);const i={version:{version:[1,2],sources:[{path:"manifestParams.version",priority:1,type:"number"},{path:"settings.streaming.cmcd.version",priority:2,type:"number",default:r.default.CMCD_DEFAULT_VERSION}]},enabled:{version:[1,2],sources:[{path:"settings.streaming.cmcd.enabled",priority:1,type:"boolean",default:!1}]},sessionID:{version:[1,2],sources:[{path:"manifestParams.sessionID",priority:1,type:"string"},{path:"settings.streaming.cmcd.sid",priority:2,type:"string",default:null}]},contentID:{version:[1,2],sources:[{path:"manifestParams.contentID",priority:1,type:"string"},{path:"settings.streaming.cmcd.cid",priority:2,type:"string",default:null}]},mode:{version:[1,2],sources:[{path:"manifestParams.mode",priority:1,type:"string"},{path:"settings.streaming.cmcd.mode",priority:2,type:"string",default:r.default.CMCD_MODE_QUERY}]},rtp:{version:[1,2],sources:[{path:"settings.streaming.cmcd.rtp",priority:1,type:"number",default:null}]},rtpSafetyFactor:{version:[1,2],sources:[{path:"settings.streaming.cmcd.rtpSafetyFactor",priority:1,type:"number",default:5}]},keys:{version:[1,2],sources:[{path:"manifestParams.keys",priority:1,type:"array",transform:e=>"string"==typeof e?e.split(" "):e},{path:"settings.streaming.cmcd.enabledKeys",priority:2,type:"array",default:r.default.CMCD_KEYS}]},includeInRequests:{version:[1,2],sources:[{path:"manifestParams.includeInRequests",priority:1,type:"array",transform:e=>"string"==typeof e?e.split(" "):e},{path:"settings.streaming.cmcd.includeInRequests",priority:2,type:"array",default:["segment","mpd"]}]},applyParametersFromMpd:{version:[1,2],sources:[{path:"settings.streaming.cmcd.applyParametersFromMpd",priority:1,type:"boolean",default:!0}]},eventTargets:{version:[2],sources:[{path:"settings.streaming.cmcd.eventTargets",priority:1,type:"array",default:[]}]},targetEnabled:{version:[2],sources:[{path:"settings.streaming.cmcd.eventTargets[{targetIndex}].enabled",priority:1,type:"boolean",default:!0}]},targetUrl:{version:[2],sources:[{path:"settings.streaming.cmcd.eventTargets[{targetIndex}].url",priority:1,type:"string",default:null}]},targetKeys:{version:[2],sources:[{path:"settings.streaming.cmcd.eventTargets[{targetIndex}].enabledKeys",priority:1,type:"array",default:[]}]},targetEvents:{version:[2],sources:[{path:"settings.streaming.cmcd.eventTargets[{targetIndex}].events",priority:1,type:"array",default:[]}]},targetInterval:{version:[2],sources:[{path:"settings.streaming.cmcd.eventTargets[{targetIndex}].interval",priority:1,type:"number",default:r.default.CMCD_DEFAULT_TIME_INTERVAL}]},targetBatchSize:{version:[2],sources:[{path:"settings.streaming.cmcd.eventTargets[{targetIndex}].batchSize",priority:1,type:"number",default:0}]},targetIncludeInRequests:{version:[2],sources:[{path:"settings.streaming.cmcd.eventTargets[{targetIndex}].includeInRequests",priority:1,type:"array"},{path:"settings.streaming.cmcd.includeInRequests",priority:2,type:"array",default:["segment","mpd"]}]}};t.default=i},5212:function(e,t,n){n.r(t);var r=n(8735);t.default={STREAM:"stream",VIDEO:"video",ENHANCEMENT:"enhancement",AUDIO:"audio",TEXT:"text",MUXED:"muxed",IMAGE:"image",STPP:"stpp",TTML:"ttml",VTT:"vtt",WVTT:"wvtt",CONTENT_STEERING:"contentSteering",LIVE_CATCHUP_MODE_DEFAULT:"liveCatchupModeDefault",LIVE_CATCHUP_MODE_LOLP:"liveCatchupModeLoLP",LIVE_CATCHUP_MODE_STEP:"liveCatchupModeStep",MOVING_AVERAGE_SLIDING_WINDOW:"slidingWindow",MOVING_AVERAGE_EWMA:"ewma",BAD_ARGUMENT_ERROR:"Invalid Arguments",MISSING_CONFIG_ERROR:"Missing config parameter(s)",TRACK_SWITCH_MODE_ALWAYS_REPLACE:"alwaysReplace",TRACK_SWITCH_MODE_NEVER_REPLACE:"neverReplace",TRACK_SELECTION_MODE_FIRST_TRACK:"firstTrack",TRACK_SELECTION_MODE_HIGHEST_BITRATE:"highestBitrate",TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY:"highestEfficiency",TRACK_SELECTION_MODE_LOWEST_STARTUP_DELAY:"lowestStartupDelay",TRACK_SELECTION_MODE_WIDEST_RANGE:"widestRange",CMCD_QUERY_KEY:r.CMCD_PARAM,CMCD_MODE_QUERY:r.CmcdTransmissionMode.QUERY,CMCD_MODE_HEADERS:r.CmcdTransmissionMode.HEADERS,CMCD_MODE_BODY:"body",CMCD_AVAILABLE_REQUESTS:["segment","mpd","xlink","steering","other"],CMCD_DEFAULT_TIME_INTERVAL:r.CMCD_DEFAULT_TIME_INTERVAL,CMCD_REPORTING_MODE:r.CmcdReportingMode,CMCD_KEYS:r.CMCD_KEYS,CMCD_REPORTING_EVENTS:r.CmcdEventType,CMCD_PLAYER_STATES:r.CmcdPlayerState,CMCD_DEFAULT_VERSION:1,CMCD_DEFAULT_INCLUDE_IN_REQUESTS:"segment",CMCD_CONTENT_TYPE_HEADER:{"Content-Type":"text/cmcd"},INITIALIZE:"initialize",TEXT_SHOWING:"showing",TEXT_HIDDEN:"hidden",TEXT_DISABLED:"disabled",ACCESSIBILITY_CEA608_SCHEME:"urn:scte:dash:cc:cea-608:2015",CC1:"CC1",CC3:"CC3",UTF8:"utf-8",SCHEME_ID_URI:"schemeIdUri",START_TIME:"starttime",SERVICE_DESCRIPTION_DVB_LL_SCHEME:"urn:dvb:dash:lowlatency:scope:2019",SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME:"urn:dvb:dash:lowlatency:critical:2019",CTA_5004_2023_SCHEME:"urn:mpeg:dash:cta-5004:2023",CTA_5004_2025_SCHEME:"urn:dashif:cta-5004:2025",THUMBNAILS_SCHEME_ID_URIS:["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"],FONT_DOWNLOAD_DVB_SCHEME:"urn:dvb:dash:fontdownload:2014",COLOUR_PRIMARIES_SCHEME_ID_URI:"urn:mpeg:mpegB:cicp:ColourPrimaries",URL_QUERY_INFO_SCHEME:"urn:mpeg:dash:urlparam:2014",EXT_URL_QUERY_INFO_SCHEME:"urn:mpeg:dash:urlparam:2016",ADV_URL_QUERY_INFO_SCHEME:"urn:mpeg:dash:urlparam:2025",URL_QUERY_STATE_PREFIX:/urn:mpeg:dash:state:/,MATRIX_COEFFICIENTS_SCHEME_ID_URI:"urn:mpeg:mpegB:cicp:MatrixCoefficients",TRANSFER_CHARACTERISTICS_SCHEME_ID_URI:"urn:mpeg:mpegB:cicp:TransferCharacteristics",SEGMENT_SEQUENCE_REPRESENTATION_SCHEME_ID_URI:"urn:mpeg:dash:ssr:2023",HDR_METADATA_FORMAT_SCHEME_ID_URI:"urn:dvb:dash:hdr-dmi",HDR_METADATA_FORMAT_VALUES:{ST2094_10:"ST2094-10",SL_HDR2:"SL-HDR2",ST2094_40:"ST2094-40"},MEDIA_CAPABILITIES_API:{COLORGAMUT:{SRGB:"srgb",P3:"p3",REC2020:"rec2020"},TRANSFERFUNCTION:{SRGB:"srgb",PQ:"pq",HLG:"hlg"},HDR_METADATATYPE:{SMPTE_ST_2094_10:"smpteSt2094-10",SLHDR2:"slhdr2",SMPTE_ST_2094_40:"smpteSt2094-40"}},XML:"XML",ARRAY_BUFFER:"ArrayBuffer",DVB_REPORTING_URL:"dvb:reportingUrl",DVB_PROBABILITY:"dvb:probability",OFF_MIMETYPE:"application/font-sfnt",WOFF_MIMETYPE:"application/font-woff",VIDEO_ELEMENT_READY_STATES:{HAVE_NOTHING:0,HAVE_METADATA:1,HAVE_CURRENT_DATA:2,HAVE_FUTURE_DATA:3,HAVE_ENOUGH_DATA:4},FILE_LOADER_TYPES:{FETCH:"fetch_loader",XHR:"xhr_loader"},THROUGHPUT_TYPES:{LATENCY:"throughput_type_latency",BANDWIDTH:"throughput_type_bandwidth"},THROUGHPUT_CALCULATION_MODES:{EWMA:"throughputCalculationModeEwma",ZLEMA:"throughputCalculationModeZlema",ARITHMETIC_MEAN:"throughputCalculationModeArithmeticMean",BYTE_SIZE_WEIGHTED_ARITHMETIC_MEAN:"throughputCalculationModeByteSizeWeightedArithmeticMean",DATE_WEIGHTED_ARITHMETIC_MEAN:"throughputCalculationModeDateWeightedArithmeticMean",HARMONIC_MEAN:"throughputCalculationModeHarmonicMean",BYTE_SIZE_WEIGHTED_HARMONIC_MEAN:"throughputCalculationModeByteSizeWeightedHarmonicMean",DATE_WEIGHTED_HARMONIC_MEAN:"throughputCalculationModeDateWeightedHarmonicMean"},LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE:{MOOF_PARSING:"lowLatencyDownloadTimeCalculationModeMoofParsing",DOWNLOADED_DATA:"lowLatencyDownloadTimeCalculationModeDownloadedData",AAST:"lowLatencyDownloadTimeCalculationModeAast"},RULES_TYPES:{QUALITY_SWITCH_RULES:"qualitySwitchRules",ABANDON_FRAGMENT_RULES:"abandonFragmentRules"},QUALITY_SWITCH_RULES:{BOLA_RULE:"BolaRule",THROUGHPUT_RULE:"ThroughputRule",INSUFFICIENT_BUFFER_RULE:"InsufficientBufferRule",SWITCH_HISTORY_RULE:"SwitchHistoryRule",DROPPED_FRAMES_RULE:"DroppedFramesRule",LEARN_TO_ADAPT_RULE:"L2ARule",LOL_PLUS_RULE:"LoLPRule"},ABANDON_FRAGMENT_RULES:{ABANDON_REQUEST_RULE:"AbandonRequestsRule"},ID3_SCHEME_ID_URI:"https://aomedia.org/emsg/ID3",COMMON_ACCESS_TOKEN_HEADER:"common-access-token",DASH_ROLE_SCHEME_ID:"urn:mpeg:dash:role:2011",CODEC_FAMILIES:{MP3:"mp3",AAC:"aac",AC3:"ac3",EC3:"ec3",DTSX:"dtsx",DTSC:"dtsc",AVC:"avc",HEVC:"hevc"}}},2861:function(e,t,n){n.r(t),t.default={CLEARKEY_KEYSTEM_STRING:"org.w3.clearkey",CLEARKEY_UUID:"e2719d58-a985-b3c9-781a-b030af78d30e",ENCRYPTION_SCHEME_CBCS:"cbcs",ENCRYPTION_SCHEME_CENC:"cenc",FAIRPLAY_KEYSTEM_STRING:"com.apple.fps",FAIRPLAY_UUID:"94ce86fb-07ff-4f43-adb8-93d2fa968ca2",INITIALIZATION_DATA_TYPE_CENC:"cenc",INITIALIZATION_DATA_TYPE_KEYIDS:"keyids",INITIALIZATION_DATA_TYPE_SINF:"sinf",INITIALIZATION_DATA_TYPE_WEBM:"webm",MEDIA_KEY_MESSAGE_TYPES:{LICENSE_REQUEST:"license-request",LICENSE_RENEWAL:"license-renewal",LICENSE_RELEASE:"license-release",INDIVIDUALIZATION_REQUEST:"individualization-request"},MEDIA_KEY_STATUSES:{USABLE:"usable",EXPIRED:"expired",RELEASED:"released",OUTPUT_RESTRICTED:"output-restricted",OUTPUT_DOWNSCALED:"output-downscaled",STATUS_PENDING:"status-pending",INTERNAL_ERROR:"internal-error"},PLAYREADY_KEYSTEM_STRING:"com.microsoft.playready",PLAYREADY_RECOMMENDATION_KEYSTEM_STRING:"com.microsoft.playready.recommendation",PLAYREADY_UUID:"9a04f079-9840-4286-ab92-e65be0885f95",ROBUSTNESS_STRINGS:{WIDEVINE:{SW_SECURE_CRYPTO:"SW_SECURE_CRYPTO",SW_SECURE_DECODE:"SW_SECURE_DECODE",HW_SECURE_CRYPTO:"HW_SECURE_CRYPTO",HW_SECURE_DECODE:"HW_SECURE_DECODE",HW_SECURE_ALL:"HW_SECURE_ALL"}},W3C_CLEARKEY_UUID:"1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",WIDEVINE_KEYSTEM_STRING:"com.widevine.alpha",WIDEVINE_UUID:"edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"}},1234:function(e,t,n){n.r(t);var r=n(8850),i=n(913),a=n(138),o=n(1191),s=n(5212),
2u=n(7568),l=n(8735),c=n(649),f=n(1613),d=n(3773),h=n(8898),g=n(893),p=n(6882);function m(){let e,t,n,a,m,E,T,y,_,S,I=this.context,A=(0,r.default)(I).getInstance(),R=(0,c.default)(I).getInstance();const b={[o.default.PLAYBACK_INITIALIZED]:s.default.CMCD_PLAYER_STATES.STARTING,[o.default.PLAYBACK_PAUSED]:s.default.CMCD_PLAYER_STATES.PAUSED,[o.default.PLAYBACK_ERROR]:s.default.CMCD_PLAYER_STATES.FATAL_ERROR,[o.default.PLAYBACK_ENDED]:s.default.CMCD_PLAYER_STATES.ENDED};let v={};function C(e){n&&n.update({sta:e}),U(s.default.CMCD_REPORTING_EVENTS.PLAY_STATE)}function N(){const t={version:e.getVersion(),transmissionMode:e.get("mode")===s.default.CMCD_MODE_HEADERS?l.CMCD_HEADERS:l.CMCD_QUERY,enabledKeys:e.get("keys"),eventTargets:e.getEventTargets().reduce((t,n,r)=>{if(!F(r))return t;const i=e.getEventTarget(r);return t.push({url:i.get("targetUrl"),events:i.get("targetEvents"),interval:i.get("targetInterval")??s.default.CMCD_DEFAULT_TIME_INTERVAL,batchSize:i.get("targetBatchSize")||1,enabledKeys:i.get("targetKeys")}),t},[])},n=e.get("sessionID");n&&(t.sid=n);const r=e.get("contentID");return r&&(t.cid=r),new l.CmcdReporter(t,D)}function D(e){return new Promise(t=>{const n=new f.default;n.url=e.url,n.method=e.method,n.headers=e.headers,n.body=e.body,n.type=u.HTTPRequest.CMCD_EVENT,S.load({request:n,success:()=>t({status:200}),error:e=>t({status:e?.status||500})})})}function w(){t.onPeriodSwitchComplete()}function M(){t.onPlaybackStarted()}function P(){t.onPlaybackPlaying(),C(s.default.CMCD_PLAYER_STATES.PLAYING)}function O(e){if(e.error?.data?.request?.type!==u.HTTPRequest.CMCD_EVENT){if(n){const t=e.error?.code||e.error?.data?.code;t&&n.update({ec:t})}U(s.default.CMCD_REPORTING_EVENTS.ERROR)}}function L(){_&&n&&(e.get("applyParametersFromMpd")??1)&&e.hasManifestParams()&&(_=!1,n.stop(!0),n=N(),n.start())}function U(e){if(!n)return;L();const r=t.getEventModeData(),i=t.calculateMsd();void 0!==i.msd&&n.update(i),n.recordEvent(e,r)}function x(r){if(n&&F()){L();try{const a=t.deriveCmcdDataForRequest(r),o=t.calculateMsd();void 0!==o.msd&&n.update(o);const u=n.createRequestReport(r,a);r.url=u.url,r.headers=u.headers,r.cmcd=u.customData?.cmcd||{},function(t){const n=e.get("mode"),r={url:t.url,mediaType:t.mediaType,requestType:t.type,cmcdData:t.cmcd,mode:n};if(n===s.default.CMCD_MODE_HEADERS)r.headers=t.headers;else try{const e=new URL(t.url);r.cmcdString=e.searchParams.get(l.CMCD_PARAM)||""}catch(e){r.cmcdString=""}A.trigger(i.default.CMCD_DATA_GENERATED,r)}(r)}catch(e){return T.warn(e),null}}}function F(t=null){return null!==t?function(t){if(2!==e.getVersion())return T.warn("CMCD version 2 is required for target configuration"),!1;const n=e.getEventTarget(t),r=n.get("targetEnabled"),i=n.get("targetUrl");return i?r&&i:(T.warn("Target URL is not configured"),!1)}(t)&&function(t){let n=e.getEventTarget(t).get("targetIncludeInRequests");if(!n)return!0;const r=s.default.CMCD_AVAILABLE_REQUESTS,i=n.filter(e=>!r.includes(e));return i.length===n.length?(T.error("None of the request types are supported."),!1):(i.forEach(e=>{T.warn(`request type ${e} is not supported.`)}),!0)}(t):function(){const t=e.getVersion();return 1!==t&&2!==t?(T.error(`version parameter must be 1 or 2, got ${t}.`),!1):e.isEnabled()}()&&function(){if(2===e.getVersion())return!0;const t=e.get("includeInRequests"),n=s.default.CMCD_AVAILABLE_REQUESTS,r=t.filter(e=>!n.includes(e));return r.length===t.length?(T.error("None of the request types are supported."),!1):(r.forEach(e=>{T.warn(`request type ${e} is not supported.`)}),!0)}()}function k(e){const r=t.onPlaybackRateChanged(e);n&&r&&n.update(r)}function B(e){if(t.updateCmcdManifestParamsInCmcdConfigAccessor(),_=!0,n){const r=t.onManifestLoaded(e);n.update(r)}}function H(e){t.onBufferLevelStateChanged(e)}function G(){t.onPlaybackSeeking(),C(s.default.CMCD_PLAYER_STATES.SEEKING)}function Y(){t.onPlaybackSeeked()}function V(){if(t.wasPlaying()){const e=t.getLastMediaTypeRequest();t.onRebufferingStarted(e),C(s.default.CMCD_PLAYER_STATES.REBUFFERING)}else C(s.default.CMCD_PLAYER_STATES.WAITING)}function q(e){const r=e.customData.request.type;if(!n||!F()||!t.isIncludedInRequestFilter(r))return e.cmcd=e.customData.request.cmcd,e;let i=e.customData.request;return x(i),{...e,url:i.url,headers:i.headers,cmcd:i.cmcd,customData:{...e.customData,cmcd:i.cmcd}}}function K(e){const r=e.request?.customData?.request?.type;return r===u.HTTPRequest.CMCD_EVENT||function(e){if(!n)return;L();const r=t.getEventModeData(),i=t.calculateMsd();void 0!==i.msd&&n.update(i);const a={};if(e.headers)try{const t=e.headers["cmsd-static"];t&&(a.cmsds=btoa(t));const n=e.headers["cmsd-dynamic"];n&&(a.cmsdd=btoa(n))}catch(e){T.warn("Failed to base64 encode CMSD headers, ignoring.",e)}try{n.recordResponseReceived(e,{...r,...a})}catch(e){T.error(e)}}(e),e}function j(){A.off(o.default.PLAYBACK_RATE_CHANGED,k,E),A.off(o.default.MANIFEST_LOADED,B,E),A.off(o.default.BUFFER_LEVEL_STATE_CHANGED,H,E),A.off(o.default.PLAYBACK_SEEKED,Y,E),A.off(o.default.PERIOD_SWITCH_COMPLETED,w,E),A.off(o.default.PLAYBACK_STARTED,M,E),A.off(o.default.MANIFEST_LOADING_STARTED,M,E),A.off(o.default.ERROR,O,E),A.off(o.default.PLAYBACK_PLAYING,P,E),A.off(o.default.PLAYBACK_SEEKING,G,E),A.off(o.default.PLAYBACK_WAITING,V,E),Object.keys(b).forEach(e
2=>{A.off(e,v[e],E)}),n&&(n.stop(!0),n=null),t.resetInitialSettings()}return t=(0,h.default)(I).getInstance(),e=(0,p.default)(I).getInstance(),E={applyCmcdToRequest:x,getCmcdRequestInterceptors:function(){return[q]},getCmcdResponseReceivedInterceptors:function(){return[K]},getCmcdParametersFromManifest:function(){return t.getCmcdParametersFromManifest()},initialize:function(e){_=!1,function(e){A.on(o.default.PLAYBACK_RATE_CHANGED,k,E),A.on(o.default.MANIFEST_LOADED,B,E),A.on(o.default.BUFFER_LEVEL_STATE_CHANGED,H,E),A.on(o.default.PLAYBACK_SEEKED,Y,E),A.on(o.default.PERIOD_SWITCH_COMPLETED,w,E),e?A.on(o.default.MANIFEST_LOADING_STARTED,M,E):A.on(o.default.PLAYBACK_STARTED,M,E),A.on(o.default.ERROR,O,E)}(e),S||(S=(0,d.default)(I).create({errHandler:m,mediaPlayerModel:y,errors:g.default,dashMetrics:a})),n=N(),n.start(),A.on(o.default.PLAYBACK_PLAYING,P,E),A.on(o.default.PLAYBACK_SEEKING,G,E),A.on(o.default.PLAYBACK_WAITING,V,E),Object.entries(b).forEach(([e,t])=>{v[e]||(v[e]=()=>C(t)),A.on(e,v[e],E)})},isCmcdEnabled:F,reset:j,setConfig:function(n){n&&(n.dashMetrics&&(a=n.dashMetrics),n.mediaPlayerModel&&(y=n.mediaPlayerModel),n.errHandler&&(m=n.errHandler),n.urlLoader&&(S=n.urlLoader),n.serviceDescriptionController&&e.setManifestParamsProviderFunction(()=>{const e=n.serviceDescriptionController.getServiceDescriptionSettings();return e?.clientDataReporting?.cmcdParameters||null}),t.setConfig(n))}},T=R.getLogger(E),j(),E}m.__dashjs_factory_name="CmcdController",t.default=a.default.getSingletonFactory(m)},2473:function(e,t,n){n.r(t);var r=n(138),i=n(5212),a=n(7263);function o(){let e,t;function n(){t={}}return e={reset:function(){n()},processResponseHeaders:function(e){if(!(e&&e.headers&&e.request&&e.request.url))return;const n=e.headers[i.default.COMMON_ACCESS_TOKEN_HEADER];if(n){const r=a.default.getHostFromUrl(e.request.url);r&&(t[r]=n)}},getCommonAccessTokenForUrl:function(e){if(!e)return null;const n=a.default.getHostFromUrl(e);return n?t[n]?t[n]:null:void 0}},n(),e}o.__dashjs_factory_name="CommonAccessTokenController",t.default=r.default.getSingletonFactory(o)},5313:function(e,t,n){n.r(t);var r=n(138),i=n(7263),a=n(8854),o=n(5212),s=n(7568),u=n(649);function l(){let e,t,n;const r=this.context;function l(e,t,n,r,s){const u=function(e,t){let n=[];return n=t===a.default.PERIOD?e[a.default.SUPPLEMENTAL_PROPERTY]||[]:[...e[a.default.ESSENTIAL_PROPERTY]||[],...e[a.default.SUPPLEMENTAL_PROPERTY]||[]],n.find(e=>e.schemeIdUri===o.default.URL_QUERY_INFO_SCHEME&&e.UrlQueryInfo||e.schemeIdUri===o.default.EXT_URL_QUERY_INFO_SCHEME&&e.ExtUrlQueryInfo)}(t,s);!function(e,t,n,r){n.initialQueryString="";let i="";const a=e?.ExtUrlQueryInfo||e?.UrlQueryInfo;i=a&&a.queryString?t&&t.length>0?t+"&"+a.queryString:a.queryString:t,"true"===a?.useMPDUrlQuery&&r&&(i=i?i+"&"+r:r),n.initialQueryString=i}(u,r.initialQueryString,e,n),function(e,t,n){if(!e)return void(t.finalQueryString=n);const r=e?.ExtUrlQueryInfo?.queryTemplate||e?.UrlQueryInfo?.queryTemplate||"";t.finalQueryString=r===a.default.QUERY_PART?t?.initialQueryString:""}(u,e,r.finalQueryString),e.sameOriginOnly=u?.ExtUrlQueryInfo?.sameOriginOnly,e.queryParams=i.default.parseQueryParams(e?.finalQueryString),e.includeInRequests=function(e,t){return e?e.ExtUrlQueryInfo?.includeInRequests?e.ExtUrlQueryInfo.includeInRequests.split(" "):[a.default.SEGMENT_TYPE]:t}(u,r.includeInRequests)}return t=(0,u.default)(r).getInstance().getLogger(e),e={getFinalQueryString:function(e){try{if(!n)return null;if(e.type===s.HTTPRequest.MEDIA_SEGMENT_TYPE||e.type===s.HTTPRequest.INIT_SEGMENT_TYPE){const t=e.representation;if(!t)return null;const r=t.adaptation,i=r.period,o=n.period[i.index].adaptation[r.index].representation[t.index],s=new URL(e.url),u=!o.sameOriginOnly||n.origin===s.origin;if(o.includeInRequests.includes(a.default.SEGMENT_TYPE)&&u)return o.queryParams}else if(e.type===s.HTTPRequest.MPD_TYPE){if([a.default.MPD_TYPE,a.default.MPD_PATCH_TYPE].some(e=>n.includeInRequests.includes(e)))return n.queryParams}else if(e.type===s.HTTPRequest.CONTENT_STEERING_TYPE&&n.includeInRequests.includes(a.default.STEERING_TYPE))return n.queryParams}catch(e){return t.error(e),null}},createFinalQueryStrings:function(e){n={origin:new URL(e.url).origin,period:[]};const t=e.url.split("?")[1];l(n,e,t,{initialQueryString:"",includeInRequests:[]}
2,a.default.MPD),e.Period.forEach(e=>{const r={adaptation:[]};l(r,e,t,n,a.default.PERIOD),e.AdaptationSet.forEach(e=>{const n={representation:[]};l(n,e,t,r,a.default.ADAPTATION_SET),e.Representation.forEach(e=>{const r={};l(r,e,t,n,a.default.REPRESENTATION),n.representation.push(r)}),r.adaptation.push(n)}),n.period.push(r)})}},e}l.__dashjs_factory_name="ExtUrlQueryInfoController",t.default=r.default.getSingletonFactory(l)},4469:function(e,t,n){n.r(t),n.d(t,{default:function(){return z}});class r{constructor(){this.mpdurl=null,this.errorcode=null,this.terror=null,this.url=null,this.ipaddress=null,this.servicelocation=null}}r.SSL_CONNECTION_FAILED_PREFIX="SSL",r.DNS_RESOLUTION_FAILED="C00",r.HOST_UNREACHABLE="C01",r.CONNECTION_REFUSED="C02",r.CONNECTION_ERROR="C03",r.CORRUPT_MEDIA_ISOBMFF="M00",r.CORRUPT_MEDIA_OTHER="M01",r.BASE_URL_CHANGED="F00",r.BECAME_REPORTER="S00";var i=r,a=n(913),o=n(138);function s(e){let t,n;const r=(e=e||{}).eventBus,o=e.dashMetrics,s=e.metricsConstants,u=e.events;function l(e){let t=new i;if(n){for(const n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);t.mpdurl||(t.mpdurl=n.originalUrl||n.url),t.terror||(t.terror=new Date),o.addDVBErrors(t)}}function c(e){e.error||(n=e.manifest)}function f(e){l({errorcode:i.BASE_URL_CHANGED,servicelocation:e.entry})}function d(){l({errorcode:i.BECAME_REPORTER})}function h(e){var t;e.metric===s.HTTP_REQUEST&&(0===(t=e.value).responsecode||null==t.responsecode||t.responsecode>=400||t.responsecode<100||t.responsecode>=600)&&l({errorcode:t.responsecode||i.CONNECTION_ERROR,url:t.url,terror:t.tresponse,servicelocation:t._serviceLocation})}function g(e){let t;switch(e.error?e.error.code:0){case MediaError.MEDIA_ERR_NETWORK:t=i.CONNECTION_ERROR;break;case MediaError.MEDIA_ERR_DECODE:t=i.CORRUPT_MEDIA_OTHER;break;default:return}l({errorcode:t})}return t={initialize:function(){r.on(u.MANIFEST_UPDATED,c,t),r.on(u.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,f,t),r.on(u.METRIC_ADDED,h,t),r.on(u.METRIC_UPDATED,h,t),r.on(u.PLAYBACK_ERROR,g,t),r.on(a.default.BECAME_REPORTING_PLAYER,d,t)},reset:function(){r.off(u.MANIFEST_UPDATED,c,t),r.off(u.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,f,t),r.off(u.METRIC_ADDED,h,t),r.off(u.METRIC_UPDATED,h,t),r.off(u.PLAYBACK_ERROR,g,t),r.off(a.default.BECAME_REPORTING_PLAYER,d,t)}},t}s.__dashjs_factory_name="DVBErrorsTranslator";var u=o.default.getSingletonFactory(s),l=n(7377);function c(e){e=e||{};let t,n,r=!1,i=this.context,a=e.mediaElement;return t={initialize:function(e){e&&e.length&&(e.forEach(e=>{let t=e.starttime,r=t+e.duration;n.add(t,r)}),r=!!e[0]._useWallClockTime)},reset:function(){n.clear()},isEnabled:function(){let e,t=n.length;if(!t)return!0;e=r?(new Date).getTime()/1e3:a.currentTime;for(let r=0;r<t;r+=1){let t=n.start(r),i=n.end(r);if(t<=e&&e<i)return!0}return!1}},n=(0,l.default)(i).create(),t}c.__dashjs_factory_name="RangeController";var f=o.default.getClassFactory(c);function d(){return{serialise:function e(t){let n,r,i=[],a=[];for(n in t)if(t.hasOwnProperty(n)&&0!==n.indexOf("_")){if(r=t[n],null==r&&(r=""),Array.isArray(r)){if(!r.length)continue;a=[],r.forEach(function(t){let n="Object"!==Object.prototype.toString.call(t).slice(8,-1);a.push(n?t:e(t))}),r=a.map(encodeURIComponent).join(",")}else"string"==typeof r?r=encodeURIComponent(r):r instanceof Date?r=r.toISOString():"number"==typeof r&&(r=Math.round(r));i.push(n+"="+r)}return i.join("&")}}}d.__dashjs_factory_name="MetricSerialiser";var h=o.default.getSingletonFactory(d);function g(){let e,t,n,r=window.crypto||window.msCrypto,i=Uint32Array,a=Math.pow(2,8*i.BYTES_PER_ELEMENT)-1;function o(){r&&(e||(e=new i(10)),r.getRandomValues(e),t=0)}return n={random:function(n,i){let s;return n||(n=0),i||(i=1),r?(t===e.length&&o(),s=e[t]/a,t+=1):s=Math.random(),s*(i-n)+n}},o(),n}g.__dashjs_factory_name="RNG";var p=o.default.getSingletonFactory(g),m=n(1926),E=n(8261);function T(e){let t;e=e||{};let n,r,i,a,o,s,u,l=this.context,c=(0,E.default)(l).getInstance(),f=[];const d=e.metricsConstants;function g(){a=!1,o=!1,s=null,u=null}return t={report:function(e,t){Array.isArray(t)||(t=[t]),o&&u.isEnabled()&&t.forEach(function(t){let i=n.serialise(t);e!==d.DVB_ERRORS&&(i=`metricname=${e}&${i}`),i=`${s}?${i}`,function(e,t,n){let i=new XMLHttpRequest;i.withCredentials=r.getXHRWithCredentialsForType(d.HTTP_REQUEST_DVB_REPORTING_TYPE);const a=function(){let e=f.indexOf(i);-1!==e&&(f.splice(e,1),!(i.status>=200&&i.status<300)&&n&&n())};f.push(i);try{i.open("GET",e),i.onloadend=a,i.onerror=a,i.send()}
2catch(e){i.onerror()}}(i,0,function(){o=!1})})},initialize:function(e,t){let n;if(u=t,s=c.get().streaming.dvbReporting.reportingUrl||e.dvbReportingUrl,!s)throw new Error('MPD parameter missing "dvb:reportingUrl" or URL not provided in player settings');a||(n=e.dvbProbability,n&&(1e3===n||n/1e3>=i.random())&&(o=!0),a=!0)},reset:function(){g()}},n=h(l).getInstance(),i=p(l).getInstance(),r=(0,m.default)(l).getInstance(),g(),t}T.__dashjs_factory_name="DVBReporting";var y=o.default.getClassFactory(T);function _(e){e=e||{};const t={"urn:dvb:dash:reporting:2014":y},n=this.context;let r;const i=e.debug?e.debug.getLogger(r):{},a=e.metricsConstants,o=e.mediaPlayerModel||{};return r={create:function(e,r){let s;try{s=t[e.schemeIdUri](n).create({metricsConstants:a,mediaPlayerModel:o}),s.initialize(e,r)}catch(t){s=null,i.error(`ReportingFactory: could not create Reporting with schemeIdUri ${e.schemeIdUri} (${t.message})`)}return s},register:function(e,n){t[e]=n},unregister:function(e){delete t[e]}},r}_.__dashjs_factory_name="ReportingFactory";var S=o.default.getSingletonFactory(_);function I(e){let t,n=[];const r=S(this.context).getInstance(e);return t={initialize:function(e,t){e.some(e=>{let i=r.create(e,t);if(i)return n.push(i),!0})},reset:function(){n.forEach(e=>e.reset()),n=[]},report:function(e,t){n.forEach(n=>n.report(e,t))}},t}I.__dashjs_factory_name="ReportingController";var A=o.default.getClassFactory(I);function R(){return{reconstructFullMetricName:function(e,t,n){let r=e;return t&&(r+="("+t,n&&n.length&&(r+=","+n),r+=")"),r},validateN:function(e){if(!e)throw new Error("missing n");if(isNaN(e))throw new Error("n is NaN");if(e<0)throw new Error("n must be positive");return e}}}R.__dashjs_factory_name="HandlerHelpers";var b=o.default.getSingletonFactory(R);function v(e){let t,n,r,i,a,o;e=e||{};let s=this.context,u=b(s).getInstance(),l=[];const c=e.metricsConstants;function f(){let e=function(){try{return Object.keys(l).map(e=>l[e]).reduce((e,t)=>e.level<t.level?e:t)}catch(e){return}}();e&&o!==e.t&&(o=e.t,n.report(i,e))}return t={initialize:function(e,t,o){t&&(r=u.validateN(o),n=t,i=u.reconstructFullMetricName(e,o),a=setInterval(f,r))},reset:function(){clearInterval(a),a=null,r=0,n=null,o=null},handleNewMetric:function(e,t,n){e===c.BUFFER_LEVEL&&(t.level<0?delete l[n]:l[n]=t)}},t}v.__dashjs_factory_name="BufferLevelHandler";var C=o.default.getClassFactory(v),N=o.default.getClassFactory(function(e){let t,n,r=(e=e||{}).eventBus;const i=e.metricsConstants;function o(){r.off(a.default.METRICS_INITIALISATION_COMPLETE,o,this),r.trigger(a.default.BECAME_REPORTING_PLAYER)}return t={initialize:function(e,t){t&&(n=t,r.on(a.default.METRICS_INITIALISATION_COMPLETE,o,this))},reset:function(){n=null},handleNewMetric:function(e,t){e===i.DVB_ERRORS&&n&&n.report(e,t)}},t});function D(e){let t,n,r,i,a,o;e=e||{};let s=[],u=b(this.context).getInstance();const l=e.metricsConstants;function c(){var e=s;e.length&&n&&n.report(a,e),s=[]}return t={initialize:function(e,t,s,l){t&&(r=u.validateN(s),n=t,l&&l.length&&(i=l),a=u.reconstructFullMetricName(e,s,l),o=setInterval(c,r))},reset:function(){clearInterval(o),o=null,r=null,i=null,s=[],n=null},handleNewMetric:function(e,t){e===l.HTTP_REQUEST&&(i&&i!==t.type||s.push(t))}},t}D.__dashjs_factory_name="HttpListHandler";var w=o.default.getClassFactory(D);function M(){let e,t,n;return e={initialize:function(e,r){t=e,n=r},reset:function(){n=null,t=void 0},handleNewMetric:function(e,r){e===t&&n&&n.report(t,r)}},e}M.__dashjs_factory_name="GenericMetricHandler";var P=o.default.getClassFactory(M);function O(e){let t;const n=(e=e||{}).debug?e.debug.getLogger(t):{};let r=/([a-zA-Z]*)(\(([0-9]*)(\,\s*([a-zA-Z]*))?\))?/;const i=this.context;let a={BufferLevel:C,DVBErrors:N,HttpList:w,PlayList:P,RepSwitchList:P,TcpList:P};return t={create:function(t,o){var s,u=t.match(r);if(u){try{(s=a[u[1]](i).create({eventBus:e.eventBus,metricsConstants:e.metricsConstants})).initialize(u[1],o,u[3],u[5])}catch(e){s=null,n.error(`MetricsHandlerFactory: Could not create handler for type ${u[1]} with args ${u[3]}, ${u[5]} (${e.message})`)}return s}},register:function(e,t){a[e]=t},unregister:function(e){delete a[e]}},t}O.__dashjs_factory_name="MetricsHandlerFactory";var L=o.default.getSingletonFactory(O);function U(e){e=e||{};let t,n=[];const r=this.context,i=e.eventBus,a=e.events;let o=L(r).getInstance({debug:e.debug,eventBus:e.eventBus,metricsConstants:e.metricsConstants});
2function s(e){n.forEach(t=>{t.handleNewMetric(e.metric,e.value,e.mediaType)})}return t={initialize:function(e,r){e.split(",").forEach((e,t,i)=>{let a;if(-1!==e.indexOf("(")&&-1===e.indexOf(")")){let n=i[t+1];n&&-1===n.indexOf("(")&&-1!==n.indexOf(")")&&(e+=","+n,delete i[t+1])}a=o.create(e,r),a&&n.push(a)}),i.on(a.METRIC_ADDED,s,t),i.on(a.METRIC_UPDATED,s,t)},reset:function(){i.off(a.METRIC_ADDED,s,t),i.off(a.METRIC_UPDATED,s,t),n.forEach(e=>e.reset()),n=[]}},t}U.__dashjs_factory_name="MetricsHandlersController";var x=o.default.getClassFactory(U);function F(e){let t,n,r,i;e=e||{};let a=this.context;function o(){t&&t.reset(),n&&n.reset(),r&&r.reset()}return i={initialize:function(i){try{r=f(a).create({mediaElement:e.mediaElement}),r.initialize(i.Range),n=A(a).create({debug:e.debug,metricsConstants:e.metricsConstants,mediaPlayerModel:e.mediaPlayerModel}),n.initialize(i.Reporting,r),t=x(a).create({debug:e.debug,eventBus:e.eventBus,metricsConstants:e.metricsConstants,events:e.events}),t.initialize(i.metrics,n)}catch(e){throw o(),e}},reset:o},i}F.__dashjs_factory_name="MetricsController";var k=o.default.getClassFactory(F),B=class{constructor(){this.metrics="",this.Range=[],this.Reporting=[]}},H=class{constructor(){this.starttime=0,this.duration=1/0,this._useWallClockTime=!1}},G=class{constructor(){this.schemeIdUri="",this.value="",this.dvbReportingUrl="",this.dvbProbability=1e3}};function Y(e){let t,n=(e=e||{}).adapter;const r=e.constants;return t={getMetrics:function(e){let t=[];return e&&e.Metrics&&e.Metrics.forEach(i=>{var a=new B,o=n.getIsDynamic(e);i.hasOwnProperty("metrics")&&(a.metrics=i.metrics,i.Range&&i.Range.forEach(t=>{var i=new H;i.starttime=function(e,t,i){let a,o,s=0;return t?s=n.getAvailabilityStartTime(e)/1e3:(a=n.getRegularPeriods(e),a.length&&(s=a[0].start)),o=s,i&&i.hasOwnProperty(r.START_TIME)&&(o+=i.starttime),o}(e,o,t),t.hasOwnProperty("duration")?i.duration=t.duration:i.duration=n.getDuration(e),i._useWallClockTime=o,a.Range.push(i)}),i.Reporting&&(i.Reporting.forEach(e=>{var t=new G;e.hasOwnProperty(r.SCHEME_ID_URI)&&(t.schemeIdUri=e.schemeIdUri,e.hasOwnProperty("value")&&(t.value=e.value),e.hasOwnProperty(r.DVB_REPORTING_URL)&&(t.dvbReportingUrl=e[r.DVB_REPORTING_URL]),e.hasOwnProperty(r.DVB_PROBABILITY)&&(t.dvbProbability=e[r.DVB_PROBABILITY]),a.Reporting.push(t))}),t.push(a)))}),t}},t}Y.__dashjs_factory_name="ManifestParsing";var V=o.default.getSingletonFactory(Y);function q(e){let t;e=e||{};let n={},r=this.context,i=e.eventBus;const o=e.events;function s(t){if(t.error)return;let o=Object.keys(n);V(r).getInstance({adapter:e.adapter,constants:e.constants}).getMetrics(t.manifest).forEach(t=>{const i=JSON.stringify(t);if(n.hasOwnProperty(i))o.splice(i,1);else try{let a=k(r).create(e);a.initialize(t),n[i]=a}catch(e){}}),o.forEach(e=>{n[e].reset(),delete n[e]}),i.trigger(a.default.METRICS_INITIALISATION_COMPLETE)}function u(){Object.keys(n).forEach(e=>{n[e].reset()}),n={}}return t={reset:function(){i.off(o.MANIFEST_UPDATED,s,t),i.off(o.STREAM_TEARDOWN_COMPLETE,u,t)}},i.on(o.MANIFEST_UPDATED,s,t),i.on(o.STREAM_TEARDOWN_COMPLETE,u,t),t}q.__dashjs_factory_name="MetricsCollectionController";var K=o.default.getClassFactory(q);function j(){let e,t,n=this.context;return e={createMetricsReporting:function(e){return t=u(n).getInstance({eventBus:e.eventBus,dashMetrics:e.dashMetrics,metricsConstants:e.metricsConstants,events:e.events}),t.initialize(),K(n).create(e)},getReportingFactory:function(){return S(n).getInstance()},getMetricsHandlerFactory:function(){return L(n).getInstance()}},e}j.__dashjs_factory_name="MetricsReporting";const W=o.default.getClassFactory(j);W.events=a.default,o.default.updateClassFactory(j.__dashjs_factory_name,W);var z=W},913:function(e,t,n){n.r(t);var r=n(7252);class i extends r.default{constructor(){super(),this.METRICS_INITIALISATION_COMPLETE="internal_metricsReportingInitialized",this.BECAME_REPORTING_PLAYER="internal_becameReportingPlayer",this.CMCD_DATA_GENERATED="cmcdDataGenerated"}}let a=new i;t.default=a},8898:function(e,t,n){n.r(t);var r=n(8735),i=n(7568),a=n(1191),o=n(7263),s=n(5212),u=n(138),l=n(93
202),c=n(6882);const f={[i.HTTPRequest.INIT_SEGMENT_TYPE]:"segment",[i.HTTPRequest.MEDIA_SEGMENT_TYPE]:"segment",[i.HTTPRequest.XLINK_EXPANSION_TYPE]:"xlink",[i.HTTPRequest.MPD_TYPE]:"mpd",[i.HTTPRequest.CONTENT_STEERING_TYPE]:"steering",[i.HTTPRequest.OTHER_TYPE]:"other"};function d(){let e,t,n,u,d,h,g,p,m,E,T,y,_,S,I,A,R={},b={},v=this.context;function C(){g=(0,c.default)(v).getInstance(),K()}function N(e){return null!=e&&!isNaN(e)&&isFinite(e)}function D(e,t){const n=[];return N(e)&&n.push((0,r.toCmcdValue)(e,{v:!0})),N(t)&&n.push((0,r.toCmcdValue)(t,{a:!0})),n.length>0?n:null}function w(e,n){M(n);const i=q(n),a=function(e){try{return parseInt(e.bandwidth/1e3)}catch(e){return null}}(e),l=function(e){try{return isNaN(e.duration)?NaN:Math.round(1e3*e.duration)}catch(e){return null}}(e),c=B(n),f=function(e){try{const n=u?u.getPlaybackRate():1,r=t.getCurrentBufferLevel(e);return isNaN(n)||isNaN(r)?null:100*parseInt(r/n*10)}catch(e){return null}}(n),d=G(n),h=O(e.representation?.mediaInfo),p=k(n),y=L(n),_=function(e){if(S&&0!==S.length)for(let t of S)if(t.getType()===e)return t.probeNextRequest()}(n);let I;n===s.default.VIDEO&&(I=r.CmcdObjectType.VIDEO),n===s.default.AUDIO&&(I=r.CmcdObjectType.AUDIO),e.mediaType===s.default.ENHANCEMENT&&(I=r.CmcdObjectType.OTHER),n===s.default.TEXT&&(I="application/mp4"===e.representation.mediaInfo.mimeType?r.CmcdObjectType.TIMED_TEXT:r.CmcdObjectType.CAPTION);const A=g.has("rtp")?g.get("rtp"):function(e){try{let t=u.getPlaybackRate();t||(t=1);let{bandwidth:n,mediaType:r,representation:i,duration:a}=e;if(!i.mediaInfo)return NaN;let o=G(r);0===o&&(o=500);let s=n*a/1e3/(o/t/1e3);const l=g.get("rtpSafetyFactor",{defaultValue:5});return 100*(parseInt(s*l/100)+1)}catch(e){return NaN}}(e);if(isNaN(A)||(i.rtp=A),_&&e.url!==_.url){const t=o.default.getRelativeUrl(e.url,_.url),n=_.range?{r:_.range}:void 0;i.nor=[(0,r.toCmcdValue)(t,n)]}if(a){const e=n===s.default.VIDEO?a:null,t=n===s.default.AUDIO?a:null;i.br=D(e,t)||[(0,r.toCmcdValue)(a,{})]}if(I&&(i.ot=I),isNaN(l)||(i.d=l),!isNaN(c)){const e=n===s.default.VIDEO?c:null,t=n===s.default.AUDIO?c:null;i.mtp=D(e,t)||[(0,r.toCmcdValue)(c,{})]}if(isNaN(f)||(i.dl=f),!isNaN(d)){const e=n===s.default.VIDEO?d:null,t=n===s.default.AUDIO?d:null;i.bl=D(e,t)||[(0,r.toCmcdValue)(d,{})]}if(!isNaN(h)&&isFinite(h)){const e=n===s.default.VIDEO?h:null,t=n===s.default.AUDIO?h:null;i.tb=D(e,t)||[(0,r.toCmcdValue)(h,{})]}if(null!==p&&!isNaN(p)){const e=n===s.default.VIDEO?p:null,t=n===s.default.AUDIO?p:null;i.tpb=D(e,t)||[(0,r.toCmcdValue)(p,{})]}if(null!==y&&!isNaN(y)){const e=n===s.default.VIDEO?y:null,t=n===s.default.AUDIO?y:null;i.pb=D(e,t)||[(0,r.toCmcdValue)(y,{})]}if(E[n]&&(i.bs=!0,E[n]=!1),b[n]){const e=n===s.default.VIDEO?b[n]:null,t=n===s.default.AUDIO?b[n]:null;i.bsd=D(e,t)||[(0,r.toCmcdValue)(b[n],{})],delete b[n]}return!m[n]&&T[n]||(i.su=!0,m[n]=!1,T[n]=!0),Object.assign(i,$()),i}function M(e){T.hasOwnProperty(e)||(T[e]=!1),m.hasOwnProperty(e)||(m[e]=!1),E.hasOwnProperty(e)||(E[e]=!1)}function P(){const e={},t=u.getStreamController()?.getActiveStream();if(!t)return e;const n=t.getCurrentRepresentationForType(s.default.VIDEO),r=t.getCurrentRepresentationForType(s.default.AUDIO),i=D(n?Math.round(n.bitrateInKbit):null,r?Math.round(r.bitrateInKbit):null);return i&&(e.br=i),e}function O(e){try{const t=d.getPossibleVoRepresentationsFilteredBySettings(e).map(e=>e.bitrateInKbit);return Math.max(...t)}catch(e){return null}}function L(e){try{if(!S||0===S.length)return null;const t=S.find(t=>t.getType()===e),n=t?.getRepresentationController()?.getCurrentRepresentation()?.bitrateInKbit;return void 0===n||isNaN(n)?null:Math.round(n)}catch(e){return null}}function U(){const e={},t=D(L(s.default.VIDEO),L(s.default.AUDIO));return t&&(e.pb=t),e}function x(e){if(!S||0===S.length)return null;const t=S.find(t=>t.getType()===e);if(!t)return null;const n=O(t.getMediaInfo());return isFinite(n)&&n>0?n:null}function F(){const e={},t=D(x(s.default.VIDEO),x(s.default.AUDIO));t&&(e.tb=t);const n=D(k(s.default.VIDEO),k(s.default.AUDIO));return n&&(e.tpb=n),e}function k(e){try{if(!S||0===S.length)return null;const t=S.find(t=>t.getType()===e);if(t){const e=O(t.getMediaInfo());return isFinite(e)&&e>0?e:null}return null}catch(e){return null}}function B(e){try{return 100*parseInt(h.getSafeAverageThroughput(e)/100)}catch(e){return null}}function H(){const e={},t=D(B(s.default.VIDEO),B(s.default.AUDIO));return t&&(e.mtp=t),e}function G(e){try{const n=t.getCurrentBufferLevel(e);return isNaN(n)?null:100*parseInt(10*n)}catch(e){return null}}function Y(){const e={},t=D(G(s.default.VIDEO),G(s.default.AUDIO));return t&&(e.bl=t),e}function V(e){null!=R[e]&&(b[e]=Date.now()-R[e],delete R[e])}function q(e){const n={};let r=1e3*u.getCurrentLiveLatency();if(isNaN(r)||(n.ltc=r),"undefined"!=typeof document&&document.hidden&&(n.bg=!0),e&&function(e){return e===s.default.VIDEO||e===s.default.AUDIO||e===s.default.OTHER}(e)){const e=t.getCurrentDroppedFrames()?.droppedFrames;e>0&&(n.df=e)}return n}function K(){E={},m={},T={},_=!1,p=void 0,y=void 0,R={},b={},I=void 0,A=void 0,j()}function j(){if(!u)return;const e=u.getStreamController();if(!e)return;if("function"!=typeof e.getActiveStream)return;const t=e.getActiveStream();t&&(S=t.getStreamProcessors())}function W(){let e={};if(n){const t=n.getServiceDescriptionSettings();t.clientDataReporting&&t.clientDataReporting.cmcdParameters&&(e=t.clientDataReporting.cmcdParameters)}return e}function z(e,t){const n=t??g.get("includeInRequests"),r=f[e];return void 0!==r&&n.includes(r)}function $(){const e={},t=u.getStreamController()?.getActiveStream();if(!t)return e;const n=t.getCurrentRepresentationForType(s.default.VIDEO),r=t.getCurrentRepresentationForType(s.default.AUDIO),i=n?n.bitrateInKbit:0,a=r?r.bitrateInKbit:0,o=D(i>0?Math.round(i):null,a>0?Math.round(a):null);o&&(e.ab=o);const l=t.getRepresentationsByType(s.default.VIDEO)||[],c=t.getRepresentationsByType(s.default.AUDIO)||[],f=l.reduce((e,t)=>
2Math.max(e,t.bitrateInKbit),0),d=c.reduce((e,t)=>Math.max(e,t.bitrateInKbit),0),h=D(f>0?Math.round(f):null,d>0?Math.round(d):null);h&&(e.tab=h);const g=l.length>0?Math.min(...l.map(e=>e.bitrateInKbit)):0,p=c.length>0?Math.min(...c.map(e=>e.bitrateInKbit)):0,m=D(g>0?Math.round(g):null,p>0?Math.round(p):null);return m&&(e.lab=m),e}return e={calculateMsd:function(){const e={},t=y?Date.now()-y:null;return null===t||isNaN(t)||(e.msd=t),e},deriveCmcdDataForRequest:function(e){try{e.type,(t=e.mediaType)!==s.default.VIDEO&&t!==s.default.AUDIO||p&&p!==s.default.AUDIO||(p=t);let n={};if(z(e.type)){if(e.type===i.HTTPRequest.MPD_TYPE)return function(){const e=q();return e.ot=r.CmcdObjectType.MANIFEST,e}();if(e.type===i.HTTPRequest.MEDIA_SEGMENT_TYPE)return M(e.mediaType),w(e,e.mediaType);if(e.type===i.HTTPRequest.INIT_SEGMENT_TYPE)return function(){const e=q();return e.ot=r.CmcdObjectType.INIT,e.su=!0,e}();if(e.type===i.HTTPRequest.OTHER_TYPE||e.type===i.HTTPRequest.XLINK_EXPANSION_TYPE)return function(){const e=q();return e.ot=r.CmcdObjectType.OTHER,e}();if(e.type===i.HTTPRequest.LICENSE)return function(){const e=q();return e.ot=r.CmcdObjectType.KEY,e}();if(e.type===i.HTTPRequest.CONTENT_STEERING_TYPE)return function(e){const t=p?w(e,p):q();return t.ot=r.CmcdObjectType.OTHER,t}(e)}return n}catch(e){return null}var t},getCmcdParametersFromManifest:W,getEventModeData:function(){return{...q(),...$(),...P(),...Y(),...H(),...U(),...F()}},getLastMediaTypeRequest:function(){return p},isIncludedInRequestFilter:z,onBufferLevelStateChanged:function(e){try{e.state&&e.mediaType&&e.state===a.default.BUFFER_EMPTY&&(E[e.mediaType]||(E[e.mediaType]=!0),m[e.mediaType]||(m[e.mediaType]=!0))}catch(e){}},onManifestLoaded:function(e){try{const t=(0,l.default)(v).getInstance().getIsDynamic(e.data);return I=t?`${r.CmcdStreamType.LIVE}`:`${r.CmcdStreamType.VOD}`,A=e.protocol&&"MSS"===e.protocol?`${r.CmcdStreamingFormat.SMOOTH}`:`${r.CmcdStreamingFormat.DASH}`,{st:I,sf:A}}catch(e){return{}}},onPeriodSwitchComplete:function(){j()},onPlaybackPlaying:function(){for(const e in R)R.hasOwnProperty(e)&&V(e)},onPlaybackRateChanged:function(e){return void 0!==e.playbackRate?{pr:e.playbackRate}:null},onPlaybackSeeked:function(){_=!1;for(let e in E)E.hasOwnProperty(e)&&(E[e]=!0);for(let e in m)m.hasOwnProperty(e)&&(m[e]=!0)},onPlaybackSeeking:function(){_=!0}
2,onPlaybackStarted:function(){y||(y=Date.now())},onRebufferingCompleted:V,onRebufferingStarted:function(e){e&&!R[e]&&(R[e]=Date.now())},reset:function(){K()},resetInitialSettings:K,setConfig:function(e){e&&(e.abrController&&(d=e.abrController),e.dashMetrics&&(t=e.dashMetrics),e.playbackController&&(u=e.playbackController),e.throughputController&&(h=e.throughputController),e.serviceDescriptionController&&(n=e.serviceDescriptionController))},setup:C,updateCmcdManifestParamsInCmcdConfigAccessor:function(){const e=W();g&&Object.keys(e).length>0?g.setManifestParams(e):g&&g.setManifestParams(null)},wasPlaying:function(){return!_&&y}},C(),e}d.__dashjs_factory_name="CmcdModel",t.default=u.default.getSingletonFactory(d)},6066:function(e,t,n){n.r(t);var r=n(138),i=n(8850),a=n(3621),o=n(649),s=n(1103);const u=s.CMSD_STATIC.toLowerCase(),l=s.CMSD_DYNAMIC.toLowerCase(),c=["mb","st","sf","v"],f="stream",d={video:s.CmsdObjectType.VIDEO,audio:s.CmsdObjectType.AUDIO,text:s.CmsdObjectType.TIMED_TEXT,stream:f};function h(){const e=this.context,t=(0,i.default)(e).getInstance();let n,r,h,g;function p(){h={},g={}}function m(e){e&&Object.keys(e).forEach(t=>{c.includes(t)||delete e[t]})}function E(e){try{return(0,s.decodeCmsdStatic)(e)}catch(e){r.error("Failed to parse CMSD-Static response header value:",e)}}function T(e){try{const t=(0,s.decodeCmsdDynamic)(e),n=t[t.length-1];return n?.params||{}}catch(e){return r.error("Failed to parse CMSD-Dynamic response header value:",e),{}}}function y(e){return d[e]||s.CmsdObjectType.OTHER}function _(e,t,n){const r=e===s.CMSD_STATIC?h:g,i=r[t]||{},a=r[f]||{};return i[n]||a[n]}return n={setConfig:function(){},initialize:function(){},reset:function(){p()},parseResponseHeaders:function(e,n){let r=null,i=null;for(const n in e){const o=e[n];switch(n){case u:r=E(o),t.trigger(a.default.CMSD_STATIC_HEADER,r);break;case l:i||(i=T(o))}}let o=f;return r&&r.ot?o=r.ot:n&&(o=y(n)),m(h[o]),m(g[o]),r&&(h[o]=Object.assign(h[o]||{},r)),i&&(g[o]=Object.assign(g[o]||{},i)),{static:r,dynamic:i}},getMaxBitrate:function(e){let t=y(e);return _(s.CMSD_DYNAMIC,t,"mb")||-1},getEstimatedThroughput:function(e){let t=y(e);return _(s.CMSD_DYNAMIC,t,"etp")||null},getResponseDelay:function(e){let t=y(e);return _(s.CMSD_DYNAMIC,t,"rd")||null},getRoundTripTime:function(e){let t=y(e);return _(s.CMSD_DYNAMIC,t,"rtt")||null}},r=(0,o.default)(e).getInstance().getLogger(n),p(),n}h.__dashjs_factory_name="CmsdModel",t.default=r.default.getSingletonFactory(h)},1926:function(e,t,n){n.r(t);var r=n(5717),i=n(138),a=n(8261),o=n(656),s=n(5212),u=n(1234),l=n(5560);function c(){let e,t,n,i,c,f,d,h,g,p,m,E,T,y;const _=this.context,S=(0,a.default)(_).getInstance();function I(){f=[],g=[],d=[],h=[],p=[],T=[],m=null,t=[],i=y.getCmcdRequestInterceptors(),c=y.getCmcdResponseReceivedInterceptors(),E=new Set}function A(e,t){let n=-1;e.some((e,r)=>{if(e===t)return n=r,!0}),n<0||e.splice(n,1)}function R(e){let t;for(t=0;t<T.length;t++)if(T[t].rulename===e)return t;return-1}function b(e,t){let n=!1;return E.forEach(r=>{r[e]===t&&(n=!0)}),n}function v(e,n){C(e,n);let i=new r.default;i.schemeIdUri=e,i.value=n,t.push(i)}function C(e,n){(0,o.checkParameterType)(e,"string"),(0,o.checkParameterType)(n,"string"),t.forEach(function(r,i){r.schemeIdUri===e&&r.value===n&&t.splice(i,1)})}return e={addAbrCustomRule:function(e,t,n){if("string"!=typeof e||e!==s.default.RULES_TYPES.ABANDON_FRAGMENT_RULES&&e!==s.default.RULES_TYPES.QUALITY_SWITCH_RULES||"string"!=typeof t)throw s.default.BAD_ARGUMENT_ERROR;let r=R(t);-1===r?T.push({type:e,rulename:t,rule:n}):(T[r].type=e,T[r].rule=n)},addExternalSubtitle:function(e){if(!(e&&void 0!==e.id&&e.url&&e.language&&e.mimeType&&void 0!==e.bandwidth))return;const t=new l.default(e);b("url",t.url)||b("id",t.id)||E.add(t)},addRequestInterceptor:function(e){i.push(e)},addResponseInterceptor:function(e){c.push(e)},addUTCTimingSource:v,clearDefaultUTCTimingSources:function(){t=[]},getAbrCustomRules:function(){return T},getCertificateRequestFilters:function(){return d},getCertificateResponseFilters:function(){return h},getCustomCapabilitiesFilters:function(){return p},getCustomInitialTrackSelectionFunction:function(){return m},getExternalSubtitles:function(){return E},getLicenseRequestFilters:function(){return f},getLicenseResponseFilters:function(){return g},getRequestInterceptors:function(){return i},getResponseInterceptors:function(){return c},getUTCTimingSources:function(){return t},getXHRWithCredentialsForType:function(e){const t=n[e];return void 0===t?n.default:t},registerCertificateRequestFilter:function(e){d.push(e)},registerCertificateResponseFilter:function(e){h.push(e)},registerCustomCapabilitiesFilter:function(e){p.push(e)},registerLicenseRequestFilter:function(e){f.push(e)},registerLicenseResponseFilter:function(e){g.push(e)},removeAbrCustomRule:function(e){if(e){let t=R(e);-1!==t&&T.splice(t,1)}else T=[]},removeAllAbrCustomRule:function(){T=[]}
2,removeExternalSubtitleById:function(e){E.forEach(t=>{t.id===e&&E.delete(t)})},removeExternalSubtitleByUrl:function(e){E.forEach(t=>{t.url===e&&E.delete(t)})},removeRequestInterceptor:function(e){A(i,e)},removeResponseInterceptor:function(e){A(c,e)},removeUTCTimingSource:C,reset:function(){I()},resetCustomInitialTrackSelectionFunction:function(){m=null},resetPlaybackSessionSpecificSettings:function(){E=new Set},restoreDefaultUTCTimingSources:function(){let e=S.get().streaming.utcSynchronization.defaultTimingSource;v(e.scheme,e.value)},setConfig:function(){},setCustomInitialTrackSelectionFunction:function(e){m=e},setXHRWithCredentialsForType:function e(t,r){t?n[t]=!!r:Object.keys(n).forEach(t=>{e(t,r)})},unregisterCertificateRequestFilter:function(e){A(d,e)},unregisterCertificateResponseFilter:function(e){A(h,e)},unregisterCustomCapabilitiesFilter:function(e){A(p,e)},unregisterLicenseRequestFilter:function(e){A(f,e)},unregisterLicenseResponseFilter:function(e){A(g,e)}},n={default:!1},y=(0,u.default)(_).getInstance(),I(),e}c.__dashjs_factory_name="CustomParametersModel",t.default=i.default.getSingletonFactory(c)},1244:function(e,t,n){n.r(t);var r=n(138),i=n(8261),a=n(5212),o=n(649);function s(){const e=this.context,t=(0,i.default)(e).getInstance();let n,r,s;function u(e,t,n){e.customData.reader.read().then(n).catch(function(){l(e)})}function l(e){e.customData.onloadend&&e.customData.onloadend()}function c(){return"undefined"!=typeof performance&&"function"==typeof performance.now?performance.now():Date.now()}function f(){if(this.customData.abortController)this.customData.abortController.abort();else if(this.customData.reader)try{this.customData.reader.cancel(),this.onabort()}catch(e){}}function d(e,t){try{if((e=e.filter(n=>n.bytes>t/4/e.length)).length>1){let t=0;const n=(e[e.length-1].timestamp-e[0].timestamp)/e.length;return e.forEach((r,i)=>{const a=e[i+1];if(a){const e=a.timestamp-r.timestamp;t+=e<n?e:0}}),t}return null}catch(e){return null}}function h(e,t){return 8*e/t}return s=(0,o.default)(e).getInstance().getLogger(n),n={abort:f,calculateDownloadedTime:d,load:function(e,n){const i=function(e){const t=new Headers;if(e.headers)for(let n in e.headers){let r=e.headers[n];r&&t.append(n,r)}return t}(e),o=function(e){let t;return"function"==typeof window.AbortController&&(t=new AbortController,e.customData.abortController=t,t.signal.onabort=e.customData.onabort),e.customData.abort=f.bind(e),t}(e),g=function(e,t,n){return new Request(e.url,{method:e.method,headers:t,credentials:e.credentials,signal:n?n.signal:void 0})}(e,i,o);fetch(g).then(i=>{!function(e,n,i){!function(e,t){e.status=t.status,e.statusText=t.statusText,e.url=t.url;const n={};for(const e of t.headers.keys())n[e]=t.headers.get(e);e.headers=n}(i,e);let o=0,l=!1,f=new Uint8Array,g=0;n.customData.reader=e.body.getReader();let p=[],m=[],E=[],T=!0;const y=t.get().streaming.abr.throughput.lowLatencyDownloadTimeCalculationMode,_=({value:e,done:t})=>{t?function(){if(f){const e=function(){let e=null;return y===a.default.LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE.MOOF_PARSING?e=function(){const e=function(e,t){try{let n,r;if(n=e.slice(0,-1),r=t.slice(0,-1),n.length!==r.length&&s.warn(`[FetchLoader] Moof and Mdat data arrays have different lengths. Moof: ${n.length}, Mdat: ${r.length}`),n.length<=1)return null;let i=[],a=0,o=0;for(let e=0;e<n.length;e++)if(n[e]&&r[e]){let t=r[e].timestamp-n[e].timestamp;if(t>1){const n=h(r[e].bytes,t);i.push(n),o=0}else{0===o&&(o=n[e].timestamp,a=0);let t=r[e].timestamp-o;if(t>1){a+=r[e].bytes;const n=h(a,t);i.push(n),o=0}else a+=r[e].bytes}}return i.length>0?i.reduce((e,t)=>e+t,0)/i.length:null}catch(e){return null}}(m,E);return e?8*o/e:null}():y===a.default.LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE.DOWNLOADED_DATA&&(e=d(p,o)),e}();n.customData.onprogress({loaded:o,total:o,lengthComputable:!0,time:e}),i.data=f.buffer}n.customData.onloadend()}():(e&&e.length>0&&function(e){f=function(e,t){if(0===e.length)return t;const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(f,e),o+=e.length,p.push({timestamp:c(),bytes:e.length}),y===a.default.LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE.MOOF_PARSING&&T&&r.findLastTopIsoBoxCompleted(["moof"],f,g).found&&(T=!1,m.push({timestamp:c()}));const t=r.findLastTopIsoBoxCompleted(["moov","mdat"],f,g);t.found?function(e){const t=function(e){let t;
2return e===f.length?(t=f,f=new Uint8Array):(t=new Uint8Array(f.subarray(0,e)),f=f.subarray(e)),t}(e.startOffsetOfLastFoundTargetBox+e.sizeOfLastFoundTargetBox);y!==a.default.LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE.MOOF_PARSING||T||(T=!0,E.push({timestamp:c(),bytes:t.length})),n.customData.onprogress({data:t.buffer,lengthComputable:!1,noTrace:!0}),g=0}(t):function(e){g=e.startOffsetOfLastCompletedBox+e.sizeOfLastCompletedBox,l||(n.customData.onprogress({lengthComputable:!1,noTrace:!0}),l=!0)}(t)}(e),u(n,0,_))};u(n,0,_)}(i,e,n)}).catch(()=>{l(e)})},reset:function(){},setConfig:function(e){r=e.boxParser}},n}s.__dashjs_factory_name="FetchLoader";const u=r.default.getClassFactory(s);t.default=u},868:function(e,t,n){n.r(t);var r=n(9838),i=n(1244),a=n(7568),o=n(138),s=n(1944),u=n(6066),l=n(7263),c=n(649),f=n(8850),d=n(3621),h=n(8261),g=n(5212),p=n(1926),m=n(2473),E=n(5313),T=n(447),y=n(5099);function _(e){e=e||{};const t=this.context,n=e.errHandler,o=e.dashMetrics,_=e.mediaPlayerModel,S=e.boxParser,I=e.errors,A=(0,f.default)(t).getInstance(),R=(0,h.default)(t).getInstance();let b,v,C,N,D,w,M,P,O,L,U,x;function F(e,u){const c=function(){m()},f=function(t){const n=new Date;G&&(G=!1,(!t.lengthComputable||t.lengthComputable&&t.total!==t.loaded)&&(B.firstByteDate=n,W.resourceTiming.responseStart=n.getTime())),t.lengthComputable&&(B.bytesLoaded=W.length=t.loaded,B.bytesTotal=W.resourceTiming.encodedBodySize=t.total,W.length=t.total,W.resourceTiming.encodedBodySize=t.loaded),t.noTrace||(H.push({s:V,d:t.time?t.time:n.getTime()-V.getTime(),b:[t.loaded?t.loaded-q:0],t:t.throughput}),B.traces=H,V=n,q=t.loaded),K&&(clearTimeout(K),K=null),R.get().streaming.fragmentRequestProgressTimeout>0&&(K=setTimeout(function(){x.warn("Abort request "+j.url+" due to progress timeout"),$.abort(j),c()},R.get().streaming.fragmentRequestProgressTimeout)),e.progress&&t&&e.progress(t)},h=function(){m(!0)},p=function(e){let t;if(e.lengthComputable){let n=e.loaded/e.total*100;t="Request timeout: loaded: "+e.loaded+", out of: "+e.total+" : "+n.toFixed(3)+"% Completed"}else t="Request timeout: non-computable download size";x.warn(t)},m=function(t=!1){-1!==v.indexOf(j)&&v.splice(v.indexOf(j),1),K&&(clearTimeout(K),K=null),L.processResponseHeaders(W),E(),I(),function(e){const t=O.getResponseInterceptors();return t?t.reduce((e,t)=>e.then(e=>t(e)),Promise.resolve(e)):Promise.resolve(e)}(W).then(n=>{if(W=n,function(e,t,n){const r=e.customData.request,i=R.get().streaming.cmsd&&R.get().streaming.cmsd.enabled?w.parseResponseHeaders(t.headers,r.mediaType):null;o.addHttpRequest(r,t.url,t.status,t.headers,n,i)}(j,W,H),t)return void(e.abort&&e.abort(B));B.type===a.HTTPRequest.MPD_TYPE&&(o.addManifestUpdate(B),A.trigger(d.default.MANIFEST_LOADING_FINISHED,{requestObject:B}));const r=!!W.data||B.method===a.HTTPRequest.POST;if(W.status>=200&&W.status<=299&&r)e.success&&e.success(W.data,W.statusText,W.url),e.complete&&e.complete(B,W.statusText);else{try{404===W.status&&R.get().streaming.utcSynchronization.enableBackgroundSyncAfterSegmentDownloadError&&B.type===a.HTTPRequest.MEDIA_SEGMENT_TYPE&&_.getRetryAttemptsForType(a.HTTPRequest.MEDIA_SEGMENT_TYPE)===u&&A.trigger(d.default.ATTEMPT_BACKGROUND_SYNC)}catch(e){}k()}})},E=function(){B.startDate=Y,B.endDate=new Date,B.firstByteDate=B.firstByteDate||Y},I=function(){W.resourceTiming.responseEnd=performance.now(),W.resourceTiming.duration=W.resourceTiming.responseEnd-W.resourceTiming.startTime,function(e,t){if(!R.get().streaming.abr.throughput.useResourceTimingApi)return;if("undefined"==typeof performance||e.range)return;const n=performance.getEntriesByType?.("resource");if(void 0===n||n.length<=0)return;let r=0,i=null;for(;r<n.length;){if(n[r].name===e.url){i=n[r];break}r+=1}(function(e){return e&&!isNaN(e.responseStart)&&e.responseStart>0&&!isNaN(e.responseEnd)&&e.responseEnd>0&&!isNaN(e.transferSize)&&e.transferSize>0})(i)&&(e.customData.request.resourceTimingValues=i,t.resourceTiming.startTime=i.startTime,t.resourceTiming.encodedBodySize=i.encodedBodySize,t.resourceTiming.responseStart=i.responseStart,t.resourceTiming.responseEnd=i.responseEnd,t.resourceTiming.duration=i.duration)}(j,W)},b=function(e,t,n){return new Promise(r=>{(function(e){const t=O.getRequestInterceptors();return t?t.reduce((e,t)=>
2e.then(e=>t(e)),Promise.resolve(e)):Promise.resolve(e)})(t).then(i=>{t=i,n.request=t,t.customData.onloadend=c,t.customData.onprogress=f,t.customData.onabort=h,t.customData.ontimeout=p,n.resourceTiming.startTime=performance.now(),e.load(t,n),r()})})},k=function(){if(u>0){u--,e&&e.request&&(e.request.retryAttempts+=1);let t={config:e};N.push(t),t.timeout=setTimeout(function(){-1!==N.indexOf(t)&&(N.splice(N.indexOf(t),1),F(e,u))},_.getRetryIntervalsForType(B.type))}else{if(B.type===a.HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE)return;n.error(new s.default(D[B.type],B.url+" is not available",{request:B,response:W})),e.error&&e.error(B,"error",W.statusText,W),e.complete&&e.complete(B,W.statusText)}},B=e.request,H=[];let G,Y,V,q,K,j,W;if(B.bytesLoaded=NaN,B.bytesTotal=NaN,B.firstByteDate=null,B.traces=[],G=!0,Y=new Date,V=Y,q=0,K=null,!o||!n)throw new Error("config object is not correct or missing");const z=function(e){let n,s;return!e.isPartialSegmentRequest&&e.hasOwnProperty("availabilityTimeComplete")&&!1===e.availabilityTimeComplete&&window.fetch&&"arraybuffer"===e.responseType&&e.type===a.HTTPRequest.MEDIA_SEGMENT_TYPE?(P||(P=(0,i.default)(t).create(),P.setConfig({dashMetrics:o,boxParser:S})),n=P,s=g.default.FILE_LOADER_TYPES.FETCH):(M||(M=(0,r.default)(t).create()),n=M,s=g.default.FILE_LOADER_TYPES.XHR),{loader:n,fileLoaderType:s}}(B),$=z.loader;var Q;B.fileLoaderType=z.fileLoaderType,B.headers=B.headers||{},0===(Q=B).retryAttempts&&function(e){let t=U.getFinalQueryString(e);t&&(e.url=l.default.addAdditionalQueryParameterToUrl(e.url,t))}(Q),function(e){if(e.queryParams){const t=[];for(const n in e.queryParams)t.push({key:n,value:e.queryParams[n]});e.url=l.default.addAdditionalQueryParameterToUrl(e.url,t)}}(Q),function(e){const t=L.getCommonAccessTokenForUrl(e.url);t&&(e.headers[g.default.COMMON_ACCESS_TOKEN_HEADER]=t)}(Q),B.range&&(B.headers.Range="bytes="+B.range);const X=O.getXHRWithCredentialsForType(B.type);j=new T.default({url:B.url,method:B.method||a.HTTPRequest.GET,responseType:B.responseType,headers:B.headers,credentials:X?"include":"omit",timeout:function(e){return e.type===a.HTTPRequest.MPD_TYPE?R.get().streaming.manifestRequestTimeout||0:((t=e)&&t.type===a.HTTPRequest.INIT_SEGMENT_TYPE||t.type===a.HTTPRequest.INDEX_SEGMENT_TYPE||t.type===a.HTTPRequest.MEDIA_SEGMENT_TYPE||t.type===a.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE||t.type===a.HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE)&&R.get().streaming.fragmentRequestTimeout||0;var t}(B),body:B.body,customData:{request:B}}),W=new y.default({request:j,resourceTiming:{startTime:performance.now(),encodedBodySize:0},status:0});let Z=(new Date).getTime();if(isNaN(B.delayLoadingTime)||Z>=B.delayLoadingTime)return v.push(j),b($,j,W);{let e={httpRequest:j,httpResponse:W};return C.push(e),e.delayTimeout=setTimeout(function(){if(-1!==C.indexOf(e)){C.splice(C.indexOf(e),1);try{Y=new Date,V=Y,v.push(e.httpRequest),b($,e.httpRequest,e.httpResponse)}catch(t){e.httpRequest.onloadend()}}},B.delayLoadingTime-Z),Promise.resolve()}}return b={abort:function(){N.forEach(e=>{clearTimeout(e.timeout),e.config.request&&e.config.abort&&e.config.abort(e.config.request)}),N=[],C.forEach(e=>clearTimeout(e.delayTimeout)),C=[],v.forEach(e=>{const t=e.customData;t&&(t.request&&t.request.type===a.HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE||(t.onloadend=t.onprogress=void 0,t.abort&&t.abort()))}),v=[]},load:function(e){return e.request?F(e,_.getRetryAttemptsForType(e.request.type)):(e.error&&e.error(e.request,"error"),Promise.resolve())},reset:function(){v=[],C=[],N=[],M&&M.reset(),P&&P.reset(),M=null,P=null},resetInitialSettings:function(){M&&M.resetInitialSettings()},setConfig:function(e){e&&(e.commonAccessTokenController&&(L=e.commonAccessTokenController),e.extUrlQueryInfoController&&(U=e.extUrlQueryInfoController))}},x=(0,c.default)(t).getInstance().getLogger(b),v=[],C=[],N=[],w=(0,u.default)(t).getInstance(),O=(0,p.default)(t).getInstance(),L=(0,m.default)(t).getInstance(),U=(0,E.default)(t).getInstance(),D={[a.HTTPRequest.MPD_TYPE]:I.DOWNLOAD_ERROR_ID_MANIFEST_CODE,[a.HTTPRequest.XLINK_EXPANSION_TYPE]:I.DOWNLOAD_ERROR_ID_XLINK_CODE,[a.HTTPRequest.INIT_SEGMENT_TYPE]:I.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE,[a.HTTPRequest.MEDIA_SEGMENT_TYPE]:I.DOWNLOAD_ERROR_ID_CONTENT_CODE,[a.HTTPRequest.INDEX_SEGMENT_TYPE]:I.DOWNLOAD_ERROR_ID_CONTENT_CODE,[a.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE]:I.DOWNLOAD_ERROR_ID_CONTENT_CODE,[a.HTTPRequest.OTHER_TYPE]:I.DOWNLOAD_ERROR_ID_CONTENT_CODE},b}_.__dashjs_factory_name="HTTPLoader";const S=o.default.getClassFactory(_);t.default=S},1721:function(e,t,n){n.r(t);var r=n(138),i=n(868);function a(){let e,t;function n(){t={}}function r(){n()}return r(),e={getLoader:function(e){for(var n in t)if(t.hasOwnProperty(n)&&e.startsWith(n))return t[n];return i.default},registerLoader:function(e,n){t[e]=n},unregisterLoader:function(e){t[e]&&delete t[e]},unregisterAllLoader:n,reset:r},e}a.__dashjs_factory_name="SchemeLoaderFactory";const o=r.default.getSingletonFactory(a);t.default=o},3773:function(e,t,n){n.r(t);var r=n(138),i=n(1721);function a(e){e=e||{};const t=this.context;let n,r,a;return r=(0,i.default)(t).getInstance(),n={abort:function(){a&&a.abort()},load:function(n){if(!a){let i=r.getLoader(n&&n.request?n.request.url:null);a=i(t).create({errHandler:e.errHandler,mediaPlayerModel:e.mediaPlayerModel,dashMetrics:e.dashMetrics,boxParser:e.boxParser?e.boxParser:null,constants:e.constants?e.constants:null,dashConstants:e.dashConstants?e.dashConstants:null,urlUtils:e.urlUtils?e.urlUtils:null,errors:e.errors})}a.load(n)},reset:function(){r&&(r.reset(),r=null),a&&"function"==typeof a.reset&&a.reset(),a=null},resetInitialSettings:function(){a&&"function"==typeof a.resetInitialSettings&&a.resetInitialSettings()}},n}a.__dashjs_factory_name="URLLoader";const o=r.default.getClassFactory(a);t.default=o},9838:function(e,t,n){n.r(t);var r=n(138),i=n(7263);function a(){let e,t;function n(){t&&(t.onloadend=t.onerror=t.onprogress=t.onload=null,t.abort(),t.onabort=t.ontimeout=null,t=null)}return e={load:function(e,r){if(t=null,t=new XMLHttpRequest,t.open(e.method,e.url,!0),e.responseType&&(t.responseType=e.responseType),e.headers)for(let n in e.headers){let r=e.headers[n];r&&t.setRequestHeader(n,r)}t.withCredentials="include"===e.credentials,t.timeout=e.timeout,t.onload=function(){r.url=this.responseURL,r.status=this.status,r.statusText=this.statusText,r.headers=i.default.parseHttpHeaders(this.getAllResponseHeaders()),r.data=this.response},e.customData&&(t.onloadend=e.customData.onloadend,t.onprogress=e.customData.onprogress,t.onabort=e.customData.onabort,t.ontimeout=e.customData.ontimeout);let a=e.body||null;return t.send(a),e.customData.abort=n.bind(this),!0},abort:n,getXhr:function(){return t},reset:function(){n(),e=null},resetInitialSettings:function(){n()}},e}a.__dashjs_factory_name="XHRLoader";const o=r.default.getClassFactory(a);t.default=o},7037:function(e,t,n){n.r(t),n.d(t,{default:function(){return Ae}});var r=n(8854),i=n(2861);const a={prefixes:["clearkey","dashif","ck"]};class o{static findMp4ProtectionElement(e){let t=null;for(let n=0;n<e.length;++n){let a=e[n];a.schemeIdUri&&a.schemeIdUri.toLowerCase()===r.default.MP4_PROTECTION_SCHEME&&a.value&&(
2a.value.toLowerCase()===i.default.ENCRYPTION_SCHEME_CENC||a.value.toLowerCase()===i.default.ENCRYPTION_SCHEME_CBCS)&&(t=a)}return t}static getPSSHData(e){let t=8,n=new DataView(e),r=n.getUint8(t);return t+=20,r>0&&(t+=4+16*n.getUint32(t)),t+=4,e.slice(t)}static getPSSHForKeySystem(e,t){let n=o.parsePSSHList(t);return e&&n.hasOwnProperty(e.uuid.toLowerCase())?n[e.uuid.toLowerCase()]:null}static parseInitDataFromContentProtection(e,t){return"pssh"in e&&e.pssh?(e.pssh.__text=e.pssh.__text.replace(/\r?\n|\r/g,"").replace(/\s+/g,""),t.decodeArray(e.pssh.__text).buffer):null}static parsePSSHList(e){if(null==e)return[];let t=new DataView(e.buffer||e),n={},r=0;for(;;){let e,i,a,o,s,u,l=r;if(r>=t.buffer.byteLength)break;if(e=t.getUint32(r),i=r+e,r+=4,1886614376===t.getUint32(r))if(r+=4,a=t.getUint8(r),0===a||1===a){for(r++,r+=3,o="",s=0;s<4;s++)u=t.getUint8(r+s).toString(16),o+=1===u.length?"0"+u:u;for(r+=4,o+="-",s=0;s<2;s++)u=t.getUint8(r+s).toString(16),o+=1===u.length?"0"+u:u;for(r+=2,o+="-",s=0;s<2;s++)u=t.getUint8(r+s).toString(16),o+=1===u.length?"0"+u:u;for(r+=2,o+="-",s=0;s<2;s++)u=t.getUint8(r+s).toString(16),o+=1===u.length?"0"+u:u;for(r+=2,o+="-",s=0;s<6;s++)u=t.getUint8(r+s).toString(16),o+=1===u.length?"0"+u:u;r+=6,o=o.toLowerCase(),r+=4,n[o]=t.buffer.slice(l,i),r=i}else r=i;else r=i}return n}static getLicenseServerUrlFromMediaInfo(e,t){try{if(!e||0===e.length)return null;let n=0,r=null;for(;n<e.length&&!r;){const i=e[n];if(i&&i.contentProtection&&i.contentProtection.length>0){const e=i.contentProtection.filter(e=>e.schemeIdUri&&e.schemeIdUri===t);if(e&&e.length>0){let t=0;for(;t<e.length&&!r;){const n=e[t];n.laUrl&&n.laUrl.__prefix&&a.prefixes.includes(n.laUrl.__prefix)&&n.laUrl.__text&&(r=n.laUrl.__text),t+=1}}}n+=1}return r}catch(e){return null}}static hexKidToBufferSource(e){const t=e.replace(/-/g,"");return new Uint8Array(t.match(/[\da-f]{2}/gi).map(function(e){return parseInt(e,16)})).buffer}}var s=o,u=class{constructor(e,t,n=null){this.contentType=e,this.robustness=t,this.encryptionScheme=n}},l=class{constructor(e,t,n,r,a,o){this.initDataTypes=o&&o.length>0?o:[i.default.INITIALIZATION_DATA_TYPE_CENC],e&&e.length&&(this.audioCapabilities=e),t&&t.length&&(this.videoCapabilities=t),this.distinctiveIdentifier=n,this.persistentState=r,this.sessionTypes=a}},c=n(1923),f=n(1944),d=class{constructor(e,t,n,r,i,a,o,s){this.url=e,this.method=t,this.responseType=n,this.headers=r,this.withCredentials=i,this.messageType=a,this.sessionId=o,this.data=s}},h=class{constructor(e,t,n){this.url=e,this.headers=t,this.data=n}},g=n(7568),p=n(1349),m=n(7263),E=n(138),T=class{constructor(e,t,n){this.url=e,this.method="GET",this.responseType="arraybuffer",this.headers=t,this.body=null,this.withCredentials=n}},y=class{constructor(e,t,n){this.url=e,this.headers=t,this.data=n}};function _(e){const t=(e=e||{}).BASE64,n=e.cmcdController,r=e.constants,a=e.customParametersModel,o=e.debug,E=e.eventBus,_=e.events,S=e.protectionKeyController,I=e.settings;let A,R,b,v,C,N,D,w,M,P,O,L,U,x,F=e.protectionModel,k=[];function B(){if(!(E&&E.hasOwnProperty("on")&&S&&S.hasOwnProperty("getSupportedKeySystemMetadataFromContentProtection")))throw new Error("Missing config parameter(s)")}function H(e,n){U||C?U&&(P?P.then(()=>{q()}):q()):function(e,n){if(C)return;var r;C=!0;const a=function(e){const t=[];for(let n=0;n<e.length;n++){const r=K(e[n]);t.push({ks:e[n].ks,configs:[r],protData:e[n].protData})}return t}(e=(r=e).sort((e,t)=>(A&&A[e.ks.systemString]&&A[e.ks.systemString].priority>=0?A[e.ks.systemString].priority:r.length)-(A&&A[t.ks.systemString]&&A[t.ks.systemString].priority>=0?A[t.ks.systemString].priority:r.length)));let o;F.requestKeySystemAccess(a).then(e=>(o=e.data,function(e){let t=e&&e.selectedSystemString?e.selectedSystemString:e.keySystem.systemString;return w.info("DRM: KeySystem Access Granted for system string ("+t+")! Selecting key system..."),F.selectKeySystem(e)}(o))).then(e=>{!function(e,n){try{U=e,C=!1,E.trigger(_.KEY_SYSTEM_SELECTED,{data:n});const r=z(U);r&&r.serverCertificate&&r.serverCertificate.length>0&&F.setServerCertificate(t.decodeArray(r.serverCertificate).buffer),U.systemString===i.default.FAIRPLAY_KEYSTEM_STRING?P=G().then(()=>{P=null,q()}).catch(e=>{w.warn("DRM: Certificate acquisition failed for FairPlay: "+(e&&e.message?e.message:e)+". Proceeding anyway."),P=null,q()}):(G().catch(e=>{w.error(e)}),q())}catch(e){w.error(e)}}(e,o)}).catch(e=>{!function(e,t){U=null,C=!1,t||E.trigger(_.KEY_SYSTEM_SELECTED,{data:null,error:new f.default(c.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,c.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+"Error selecting key system! -- "+e.error)})}(e,n)})}
2(e,n)}function G(){if(!U)return Promise.resolve();const e=U.systemString,t=R.get(e);if(t&&(t.applied||t.inProgress))return Promise.resolve();const n=function(){const e=[],t=z(U);return t&&Array.isArray(t.certUrls)&&t.certUrls.length&&t.certUrls.forEach(t=>{e.push(t)}),M.forEach(t=>{t&&t.contentProtection&&t.contentProtection.forEach(t=>{t&&Array.isArray(t.certUrls)&&t.certUrls.length&&t.schemeIdUri.toLowerCase()===U.schemeIdURI&&t.certUrls.forEach(t=>{e.push(t)})})}),p.default.dedupeCertUrls(e)}();if(!n.length)return w.debug("DRM: No Certificate Server URLs found for "+e+". Skipping certificate acquisition."),Promise.resolve();w.debug("DRM: Found "+n.length+" certificate candidate(s) for "+e+". Starting acquisition.");const r=z(U)||{},i=t||{applied:!1,inProgress:!0,attempts:0};return i.inProgress=!0,R.set(e,i),Y(n,0,r,e,i)}function Y(e,t,n,r,i){if(t>=e.length)return function(e,t){return e.inProgress=!1,e.error=e.error||"All certificate candidates failed",w.warn("DRM: All certificate candidates failed for "+t+"."),Promise.reject(new Error(e.error))}(i,r);const o=e[t],s=isNaN(I.get().streaming.retryAttempts[g.HTTPRequest.LICENSE_CERTIFICATE])?3:I.get().streaming.retryAttempts[g.HTTPRequest.LICENSE_CERTIFICATE];return w.debug("DRM: Attempting certificate download ("+(t+1)+"/"+e.length+") url="+o.url),function(e,t){const n=a.getCertificateRequestFilters();let r=!1;t&&"boolean"==typeof t.withCredentials&&(r=t.withCredentials);const i={};t&&ne(i,t.httpRequestHeaders);const o=new T(e.url,i,r);return ie(n,o).then(()=>o)}(o,n).then(e=>V(e,n,s)).then(e=>function(e,t,n,r){if(!e||!e.byteLength)throw new Error("Empty certificate response");return r.urlUsed=t.url,r.buffer=e,function(e,t,n){return new Promise((r,i)=>{try{const t=F.setServerCertificate(e);t&&"function"==typeof t.then?t.then(e=>{r("boolean"!=typeof e||e)}).catch(e=>{n.error=e&&e.message?e.message:e,i(e)}):r(!0)}catch(e){n.error=e&&e.message?e.message:e,w.warn("DRM: setServerCertificate threw for "+t+": "+n.error),i(e)}})}(e,n,r).then(e=>{if(!e)throw new Error("CDM rejected certificate");r.applied=!0,r.inProgress=!1})}(e,o,r,i)).then(()=>{!function(e,t,n){const r=e.certType?" certType="+e.certType:"";w.info("DRM: Server certificate applied successfully from "+n.urlUsed+r+" for "+t+".")}(o,r,i)}).catch(a=>(i.attempts++,i.lastError=a&&a.message?a.message:a,w.warn("DRM: Certificate attempt failed ("+o.url+"): "+i.lastError),Y(e,t+1,n,r,i)))}function V(e,t,n){return new Promise((r,i)=>{const o=new XMLHttpRequest;o.open(e.method,e.url,!0),o.responseType=e.responseType;const s=t&&!isNaN(t.httpTimeout)?t.httpTimeout:8e3;s>0&&(o.timeout=s),o.withCredentials=e.withCredentials;for(const t of Object.keys(e.headers))o.setRequestHeader(t,e.headers[t]);const u=a=>{if(n>0){const o=n-1,s=isNaN(I.get().streaming.retryIntervals[g.HTTPRequest.LICENSE_CERTIFICATE])?500:I.get().streaming.retryIntervals[g.HTTPRequest.LICENSE_CERTIFICATE];w.debug("DRM: Certificate request failed ("+a+"). Retrying... remaining="+o),setTimeout(()=>{V(e,t,o).then(r).catch(i)},s)}else i(new Error(a))};o.onload=function(){if(this.status>=200&&this.status<=299){const e=m.default.parseHttpHeaders(o.getAllResponseHeaders?o.getAllResponseHeaders():null);ie(a.getCertificateResponseFilters(),new y(o.responseURL,e,this.response)).then(()=>{r(this.response)}).catch(()=>{r(this.response)})}else u("HTTP "+this.status)},o.onerror=function(){u("network error")},o.ontimeout=function(){u("timeout")},o.onabort=function(){u("aborted")};try{o.send(e.body)}catch(e){i(e)}})}function q(){let e;for(let n=0;n<O.length;n++)for(e=0;e<O[n].length;e++)if(U===O[n][e].ks){t=O[n][e],S.isClearKey(U)&&function(e){if(e.protData&&e.protData.hasOwnProperty("clearkeys")&&0!==Object.keys(e.protData.clearkeys).length){const t={kids:Object.keys(e.protData.clearkeys)};e.initData=(new TextEncoder).encode(JSON.stringify(t))}}(t),t.sessionId?j(t):null!==t.initData&&W(t);break}var t;O=[]}function K(e){const t=e.protData,n=[],a=[];let o=i.default.INITIALIZATION_DATA_TYPE_CENC;e.ks&&e.ks.systemString===i.default.FAIRPLAY_KEYSTEM_STRING&&(o=i.default.INITIALIZATION_DATA_TYPE_SINF);const s=t&&t.initDataTypes&&t.initDataTypes.length>0?t.initDataTypes:[o],c=t&&t.audioRobustness&&t.audioRobustness.length>0?t.audioRobustness:L,f=t&&t.videoRobustness&&t.videoRobustness.length>0?t.videoRobustness:L,d=e.sessionType,h=t&&t.distinctiveIdentifier?t.distinctiveIdentifier:"optional",g=t&&t.persistentState?t.persistentState:"temporary"===d?"optional":"required",p=e.ks&&e.ks.systemString===i.default.FAIRPLAY_KEYSTEM_STRING?i.default.ENCRYPTION_SCHEME_CBCS:void 0;
2return M.forEach(e=>{e.type===r.AUDIO?n.push(new u(e.codec,c,p)):e.type===r.VIDEO&&a.push(new u(e.codec,f,p))}),new l(n,a,h,g,[d],s)}function j(e){B(),F.loadKeySession(e)}function W(e){if(e&&function(e){if(!e)return!1;try{const t=F.getSessionTokens();for(let n=0;n<t.length;n++)if(t[n].getKeyId()===e)return!0;return!1}catch(e){return!1}}(e.keyId))return;!function(){if(!I)return;const e=I.get().streaming.protection.keepProtectionMediaKeys,t=I.get().streaming.protection.keepProtectionMediaKeysMaximumOpenSessions;if("number"!=typeof t||t<=0)return;if(!e)return void w.warn("DRM: keepProtectionMediaKeysMaximumOpenSessions is set to "+t+", but keepProtectionMediaKeys is not enabled. Therefore, keepProtectionMediaKeysMaximumOpenSessions will be ignored.");if(!F||"function"!=typeof F.getSessionTokens)return;const n=F.getSessionTokens()||[];if(n.length<t)return;const r=n[0];r&&(w.info("DRM: Maximum number of open MediaKeySessions reached ("+t+"), closing oldest session."),Q(r))}();const t=s.getPSSHForKeySystem(U,e?e.initData:null);if(t){if($(t))return;try{e.initData=t,F.createKeySession(e)}catch(e){E.trigger(_.KEY_SESSION_CREATED,{data:null,error:new f.default(c.default.KEY_SESSION_CREATED_ERROR_CODE,c.default.KEY_SESSION_CREATED_ERROR_MESSAGE+e.message)})}}else e&&e.initData?F.createKeySession(e):E.trigger(_.KEY_SESSION_CREATED,{data:null,error:new f.default(c.default.KEY_SESSION_CREATED_ERROR_CODE,c.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Selected key system is "+(U?U.systemString:null)+". needkey/encrypted event contains no initData corresponding to that key system!")})}function z(e){if(e){const t=e.systemString;if(A)return t in A?A[t]:null}return null}function $(e){if(!e)return!1;try{const t=F.getAllInitData();for(let n=0;n<t.length;n++)if(S.initDataEquals(e,t[n]))return w.debug("DRM: Ignoring initData because we have already seen it!"),!0;return!1}catch(e){return!1}}function Q(e){B(),F.closeKeySession(e)}function X(e){B(),e?(F.setMediaElement(e),E.on(_.NEED_KEY,ae,b)):null===e&&(F.setMediaElement(e),E.off(_.NEED_KEY,ae,b))}function Z(e){w.debug("DRM: onKeyMessage");const t=e.data;E.trigger(_.KEY_MESSAGE,{data:t});const n=t.messageType?t.messageType:i.default.MEDIA_KEY_MESSAGE_TYPES.LICENSE_REQUEST,r=t.message,o=t.sessionToken,u=z(U),l=S.getLicenseServerModelInstance(U,u,n),p={sessionToken:o,messageType:n};if(r&&0!==r.byteLength){if(!l)return w.debug("DRM: License server request not required for this message (type = "+e.data.messageType+"). Session ID = "+o.getSessionId()),void J(p);
2if(S.isClearKey(U)){const e=S.processClearKeyLicenseRequest(U,u,r);if(e&&e.keyPairs&&e.keyPairs.length>0)return w.debug("DRM: ClearKey license request handled by application!"),J(p),void F.updateKeySession(o,e)}!function(e,t,n){const r=e.sessionToken,o=e.messageType?e.messageType:i.default.MEDIA_KEY_MESSAGE_TYPES.LICENSE_REQUEST,u={sessionToken:r,messageType:o},l=U?U.systemString:null;let p=function(e,t,n,r,i){let a=null;const o=r.message;if(e&&e.serverURL){const n=e.serverURL;"string"==typeof n&&""!==n?a=n:"object"==typeof n&&n.hasOwnProperty(t)&&(a=n[t])}else if(e&&e.laURL&&""!==e.laURL)a=e.laURL;else if(a=s.getLicenseServerUrlFromMediaInfo(M,U.schemeIdURI),!a&&!S.isClearKey(U)){const e=s.getPSSHData(n.initData);a=U.getLicenseServerURLFromInitData(e),a||(a=r.laURL)}return a=i.getServerURLFromMessage(a,o,t),a}(n,o,r,e,t);if(!p)return void J(u,new f.default(c.default.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE,c.default.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE));const E={};let T=!1;n&&ne(E,n.httpRequestHeaders);const y=e.message;
2ne(E,U.getRequestHeadersFromMessage(y)),Object.keys(E).forEach(e=>{"authorization"===e.toLowerCase()&&(T=!0)}),n&&"boolean"==typeof n.withCredentials&&(T=n.withCredentials);const _=function(e){if(F)if(e.status>=200&&e.status<=299){const n=m.default.parseHttpHeaders(e.getAllResponseHeaders?e.getAllResponseHeaders():null);let i=new h(e.responseURL,n,e.response);ie(a.getLicenseResponseFilters(),i).then(()=>{const n=t.getLicenseMessage(i.data,l,o);null!==n?(J(u),F.updateKeySession(r,n)):re(e,u,l,o,t)})}else re(e,u,l,o,t)},A=function(e){J(u,new f.default(c.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,c.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+l+' update, XHR aborted. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState))},R=function(e){J(u,new f.default(c.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,c.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+l+' update, XHR error. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState))},b=U.getLicenseRequestFromMessage(y),v=t.getHTTPMethod(o),C=t.getResponseType(l,o),N=n&&!isNaN(n.httpTimeout)?n.httpTimeout:8e3,D=r.getSessionId()||null;let w=new d(p,v,C,E,T,o,D,b);const P=isNaN(I.get().streaming.retryAttempts[g.HTTPRequest.LICENSE])?3:I.get().streaming.retryAttempts[g.HTTPRequest.LICENSE];ie(a.getLicenseRequestFilters(),w).then(()=>{ee(w,P,N,_,A,R)})}(t,l,u)}else J(p,new f.default(c.default.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE,c.default.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE))}function J(e,t=null){E.trigger(_.LICENSE_REQUEST_COMPLETE,{data:e,error:t})}function ee(e,t,r,i,a,o){const s=new XMLHttpRequest,u={url:e.url,type:g.HTTPRequest.LICENSE,method:e.method,headers:e.headers||{}};n.applyCmcdToRequest(u),e.url=u.url,e.headers=u.headers,s.open(e.method,e.url,!0),s.responseType=e.responseType,s.withCredentials=e.withCredentials,r>0&&(s.timeout=r);for(const t in e.headers)s.setRequestHeader(t,e.headers[t]);const l=function(){t--;const n=isNaN(I.get().streaming.retryIntervals[g.HTTPRequest.LICENSE])?1e3:I.get().streaming.retryIntervals[g.HTTPRequest.LICENSE];N=setTimeout(function(){ee(e,t,r,i,a,o)},n)};s.onload=function(){D=null,this.status>=200&&this.status<=299||t<=0?i(this):(w.warn("License request failed ("+this.status+"). Retrying it... Pending retries: "+t),l())},s.ontimeout=s.onerror=function(){D=null,t<=0?o(this):(w.warn("License request network request failed . Retrying it... Pending retries: "+t),l())},s.onabort=function(){a(this)},E.trigger(_.LICENSE_REQUEST_SENDING,{url:e.url,headers:e.headers,payload:e.data,sessionId:e.sessionId}),D=s,s.send(e.data)}function te(){D&&(D.onloadend=D.onerror=D.onprogress=void 0,D.abort(),D=null),N&&(clearTimeout(N),N=null)}function ne(e,t){if(t)for(const n in t)e[n]=t[n]}function re(e,t,n,r,i){let a="NONE",o=null;e.response&&(a=i.getErrorResponse(e.response,n,r),o={serverResponse:e.response||null,responseCode:e.status||null,responseText:e.statusText||null}),J(t,new f.default(c.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,c.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+n+' update, XHR complete. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState+". Response is "+a,o))}function ie(e,t){return e?e.reduce((e,n)=>e.then(()=>n(t)),Promise.resolve()):Promise.resolve()}function ae(e,t){if(I.get().streaming.protection.ignoreEmeEncryptedEvent)return;if(w.debug("DRM: onNeedKey"),e.key.initDataType!==i.default.INITIALIZATION_DATA_TYPE_CENC&&e.key.initDataType!==i.default.INITIALIZATION_DATA_TYPE_SINF)return void w.warn("DRM: Only 'cenc' and 'sinf' initData are supported! Ignoring initData of type: "+e.key.initDataType);if(0===M.length&&(w.warn("DRM: onNeedKey called before initializeForMedia, wait until initialized"),(t=void 0===t?1:t+1)<5))return void k.push(setTimeout(()=>{ae(e,t)},500));let n=e.key.initData;ArrayBuffer.isView(n)&&(n=n.buffer);const r=e.key.initDataType===i.default.INITIALIZATION_DATA_TYPE_SINF;if(U){const e=r?n:s.getPSSHForKeySystem(U,n);if(e&&$(e))return}let a;w.debug("DRM: initData:",String.fromCharCode.apply(null,new Uint8Array(n))),a=r?S.getSupportedKeySystemMetadataForSinf(n,A,x):S.getSupportedKeySystemMetadataFromSegmentPssh(n,A,x),0!==a.length?function(e){O.push(e),H(e,!1)}(a):w.debug("DRM: Received needkey event with initData, but we don't support any of the key systems!")}function oe(e,t){if(e.size<=0)return!1;if(t.size>0&&[...e].every(e=>{const n=t.get(e);return void 0!==n&&""!==n}))return!0;const n=F.getSessionTokens();if(n&&n.length>0){const t=n.filter(t=>[...e].includes(t.normalizedKeyId));if(t.some(e=>!e.hasTriggeredKeyStatusMapUpdate)||0===t.length)return!1}return!I.get().streaming.protection.ignoreKeyStatuses&&e&&e.size>0&&t&&t.size>0}return b={areKeyIdsExpired:function(e){try{return!!oe(e,v)&&[...e].every(e=>v.get(e)===i.default.MEDIA_KEY_STATUSES.EXPIRED)}catch(e){return w.error(e),!1}},areKeyIdsUsable:function(e){try{return!oe(e,v)||[...e].some(e=>{const t=v.get(e);return t&&t!==i.default.MEDIA_KEY_STATUSES.INTERNAL_ERROR&&t!==i.default.MEDIA_KEY_STATUSES.OUTPUT_RESTRICTED})}catch(e){return w.error(e),!0}},clearMediaInfoArray:function(){M=[]},closeKeySession:Q,createKeySession:W,getKeySystems:function(){return S?S.getKeySystems():[]},getProtectionData:function(){return A},getSupportedKeySystemMetadataFromContentProtection:function(e){return B(),S.getSupportedKeySystemMetadataFromContentProtection(e,A,x)},handleKeySystemFromManifest:function(){if(!M||0===M.length)return;let e=[];M.forEach(t=>{const n=S.getSupportedKeySystemMetadataFromContentProtection(t.contentProtection,A,x);n.length>0&&(0===e.length&&(e=n),O.push(n))}),e&&e.length>0&&H(e,!0)},initializeForMedia:function(e){if(!e)throw new Error("mediaInfo can not be null or undefined");B(),M.push(e)},loadKeySession:j,removeKeySession:function(e){B(),F.removeKeySession(e)},reset:function(){E.off(_.INTERNAL_KEY_MESSAGE,Z,b),B(),te(),X(null),U=null,C=!1,v=new Map,R=new Map,F&&(F.reset(),F=null),k.forEac
2h(e=>clearTimeout(e)),k=[],M=[],O=[]},setKeySystems:function(e){S&&S.setKeySystems(e)},setMediaElement:X,setProtectionData:function(e){A=e,S.setProtectionData(e)},setRobustnessLevel:function(e){L=e},setServerCertificate:function(e){return B(),F.setServerCertificate(e)},setSessionType:function(e){x=e},stop:function(){te(),F&&F.stop()},updateKeyStatusesMap:function(e){try{if(!e||!e.sessionToken||!e.parsedKeyStatuses)return;e.sessionToken.hasTriggeredKeyStatusMapUpdate=!0;const t=e.parsedKeyStatuses,n=m.default.parseUserAgent(),r=n&&n.browser&&n.browser.name&&"edge"===n.browser.name.toLowerCase();t.forEach(e=>{r&&U.uuid===i.default.PLAYREADY_UUID&&e.keyId&&16===e.keyId.byteLength&&function(e){const t=m.default.bufferSourceToDataView(e),n=t.getUint32(0,!0),r=t.getUint16(4,!0),i=t.getUint16(6,!0);t.setUint32(0,n,!1),t.setUint16(4,r,!1),t.setUint16(6,i,!1)}(e.keyId);const t=m.default.bufferSourceToHex(e.keyId).slice(0,32);t&&""!==t&&v.set(t,e.status)}),E.trigger(_.KEY_STATUSES_MAP_UPDATED,{keyStatusMap:v})}catch(e){w.error(e)}}},w=o.getLogger(b),O=[],M=[],x="temporary",L="",D=null,N=null,v=new Map,R=new Map,P=null,E.on(_.INTERNAL_KEY_MESSAGE,Z,b),b}_.__dashjs_factory_name="ProtectionController";var S=E.default.getClassFactory(_),I=class{constructor(e,t){this.keyID=e,this.key=t}},A=class{constructor(e,t){if(t&&"persistent"!==t&&"temporary"!==t)throw new Error("Invalid ClearKey key set type! Must be one of 'persistent' or 'temporary'");this.keyPairs=e,this.type=t}toJWK(){let e,t=this.keyPairs.length,n={keys:[]};for(e=0;e<t;e++){let t={kty:"oct",alg:"A128KW",kid:this.keyPairs[e].keyID,k:this.keyPairs[e].key};n.keys.push(t)}
vendor: 10,309 bytes, line 2
2this.type&&(n.type=this.type);let r=JSON.stringify(n);const i=r.length;let a=new ArrayBuffer(i),o=new Uint8Array(a);for(e=0;e<i;e++)o[e]=r.charCodeAt(e);return a}};const R=i.default.CLEARKEY_UUID,b=i.default.CLEARKEY_KEYSTEM_STRING,v="urn:uuid:"+R;function C(e){let t;const n=(e=e||{}).BASE64;return t={uuid:R,schemeIdURI:v,systemString:b,getInitData:function(e,t){try{let r=s.parseInitDataFromContentProtection(e,n);if(!r&&t){const e={kids:[function(e){try{let t=e.replace(/-/g,"");return t=btoa(t.match(/\w{2}/g).map(e=>String.fromCharCode(parseInt(e,16))).join("")),t.replace(/=/g,"").replace(/\//g,"_").replace(/\+/g,"-")}catch(e){return null}}(t.cencDefaultKid)]};r=(new TextEncoder).encode(JSON.stringify(e))}return r}catch(e){return null}},getRequestHeadersFromMessage:function(){return{"Content-Type":"application/json"}},getLicenseRequestFromMessage:function(e){return JSON.stringify(JSON.parse(String.fromCharCode.apply(null,new Uint8Array(e))))},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getClearKeysFromProtectionData:function(e,t){let n=null;if(e){const r=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(t))),i=[];for(let t=0;t<r.kids.length;t++){const n=r.kids[t],a=e.clearkeys&&e.clearkeys.hasOwnProperty(n)?e.clearkeys[n]:null;if(!a)throw new Error("DRM: ClearKey keyID ("+n+") is not known!");i.push(new I(n,a))}n=new A(i)}return n}},t}C.__dashjs_factory_name="KeySystemClearKey";var N=E.default.getSingletonFactory(C);const D=i.default.W3C_CLEARKEY_UUID,w=i.default.CLEARKEY_KEYSTEM_STRING,M="urn:uuid:"+D;function P(e){let t;const n=e.BASE64,r=e.debug.getLogger(t);return t={uuid:D,schemeIdURI:M,systemString:w,getInitData:function(e){return s.parseInitDataFromContentProtection(e,n)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(e){return new Uint8Array(e)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null},getClearKeysFromProtectionData:function(e,t){let n=null;if(e){const i=JSON.parse(String.fromCharCode.apply(null,new Uint8Array(t))),a=[];for(let t=0;t<i.kids.length;t++){const n=i.kids[t],r=e.clearkeys&&e.clearkeys.hasOwnProperty(n)?e.clearkeys[n]:null;if(!r)throw new Error("DRM: ClearKey keyID ("+n+") is not known!");a.push(new I(n,r))}n=new A(a),r.warn("ClearKey schemeIdURI is using W3C Common PSSH systemID (1077efec-c0b2-4d02-ace3-3c1e52e2fb4b) in Content Protection. See DASH-IF IOP v4.1 section 7.6.2.4")}return n}},t}P.__dashjs_factory_name="KeySystemW3CClearKey";var O=E.default.getSingletonFactory(P);const L=i.default.WIDEVINE_UUID,U=i.default.WIDEVINE_KEYSTEM_STRING,x="urn:uuid:"+L;function F(e){let t;const n=(e=e||{}).BASE64;return t={uuid:L,schemeIdURI:x,systemString:U,getInitData:function(e){return s.parseInitDataFromContentProtection(e,n)},getRequestHeadersFromMessage:function(){return null},getLicenseRequestFromMessage:function(e){return new Uint8Array(e)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null}},t}F.__dashjs_factory_name="KeySystemWidevine";var k=E.default.getSingletonFactory(F);const B=i.default.PLAYREADY_UUID,H=i.default.PLAYREADY_KEYSTEM_STRING,G="urn:uuid:"+B;function Y(e){let t,n="utf-16";const r=(e=e||{}).BASE64,i=e.settings;function a(){if(!r||!r.hasOwnProperty("decodeArray")||!r.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}return t={uuid:B,schemeIdURI:G,systemString:H,getInitData:function(e){const t=new Uint8Array([112,115,115,104,0,0,0,0]),n=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);let i,o,u,l,c,f=0,d=null;if(a(),!e)return null;if("pssh"in e&&e.pssh)return s.parseInitDataFromContentProtection(e,r);if("pro"in e&&e.pro)d=r.decodeArray(e.pro.__text);else{if(!("prheader"in e)||!e.prheader)return null;d=r.decodeArray(e.prheader.__text)}return i=d.length,o=4+t.length+n.length+4+i,u=new ArrayBuffer(o),l=new Uint8Array(u),c=new DataView(u),c.setUint32(f,o),f+=4,l.set(t,f),f+=t.length,l.set(n,f),f+=n.length,c.setUint32(f,i),f+=4,l.set(d,f),f+=i,l.buffer},getRequestHeadersFromMessage:function(e){let t,r;const a={},o=new DOMParser;if(i&&i.get().streaming.protection.detectPlayreadyMessageFormat&&"utf-16"===n&&e&&e.byteLength%2==1)return a["Content-Type"]="text/xml; charset=utf-8",a;const s="utf-16"===n?new Uint16Array(e):new Uint8Array(e);t=String.fromCharCode.apply(null,s),r=o.parseFromString(t,"application/xml");const u=r.getElementsByTagName("name"),l=r.getElementsByTagName("value");for(let e=0;e<u.length;e++)a[u[e].childNodes[0].nodeValue]=l[e].childNodes[0].nodeValue;return a.hasOwnProperty("Content")&&(a["Content-Type"]=a.Content,delete a.Content),a.hasOwnProperty("Content-Type")||(a["Content-Type"]="text/xml; charset=utf-8"),a},getLicenseRequestFromMessage:function(e){let t=null;const o=new DOMParser;if(i&&i.get().streaming.protection.detectPlayreadyMessageFormat&&"utf-16"===n&&e&&e.byteLength%2==1)return e;const s="utf-16"===n?new Uint16Array(e):new Uint8Array(e);a();const u=String.fromCharCode.apply(null,s),l=o.parseFromString(u,"application/xml");if(!l.getElementsByTagName("PlayReadyKeyMessage")[0])return e;{const e=l.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue;e&&(t=r.decode(e))}return t},getLicenseServerURLFromInitData:function(e){if(e){const t=new DataView(e),n=t.getUint16(4,!0);let r=6;const i=new DOMParser;for(let a=0;a<n;a++){const n=t.getUint16(r,!0);r+=2;const a=t.getUint16(r,!0);if(r+=2,1!==n){r+=a;continue}const o=e.slice(r,r+a),s=String.fromCharCode.apply(null,new Uint16Array(o)),u=i.parseFromString(s,"application/xml");if(u.getElementsByTagName("LA_URL")[0]){const e=u.getElementsByTagName("LA_URL")[0].childNodes[0].nodeValue;if(e)return e}if(u.getElementsByTagName("LUI_URL")[0]){const e=u.getElementsByTagName("LUI_URL")[0].childNodes[0].nodeValue;if(e)return e}}}return null},getCDMData:function(e){let t,n,i,o;if(a(),!e)return null;for(t=[],o=0;o<e.length;++o)t.push(e.charCodeAt(o)),t.push(0);for(t=String.fromCharCode.apply(null,t),t=r.encode(t),n='<PlayReadyCDMData type="LicenseAcquisition"><LicenseAcquisition version="1.0" Proactive="false"><CustomData encoding="base64encoded">%CUSTOMDATA%</CustomData></LicenseAcquisition></PlayReadyCDMData>'.replace("%CUSTOMDATA%",t),i=[],o=0;o<n.length;++o)i.push(n.charCodeAt(o)),i.push(0);return new Uint8Array(i).buffer},setPlayReadyMessageFormat:function(e){if("utf-8"!==e&&"utf-16"!==e)throw new Error('Specified message format is not one of "utf-8" or "utf-16"');n=e}},t}Y.__dashjs_factory_name="KeySystemPlayReady";var V=E.default.getSingletonFactory(Y);const q=i.default.FAIRPLAY_UUID,K=i.default.FAIRPLAY_KEYSTEM_STRING,j="urn:uuid:"+q;function W(){let e;return e={uuid:q,schemeIdURI:j,systemString:K,getInitData:function(){return null},getRequestHeadersFromMessage:function(){return{"Content-Type":"application/octet-stream"}},getLicenseRequestFromMessage:function(e){return new Uint8Array(e)},getLicenseServerURLFromInitData:function(){return null},getCDMData:function(){return null}},e}W.__dashjs_factory_name="KeySystemFairPlay";var z=E.default.getSingletonFactory(W);function $(e){const t=(e=e||{}).BASE64,n={};let r;return n[i.default.WIDEVINE_KEYSTEM_STRING]={responseType:"json",getLicenseMessage:function(e){return t.decodeArray(e.license)},getErrorResponse:function(e){return e}},n[i.default.PLAYREADY_KEYSTEM_STRING]={responseType:"arraybuffer",getLicenseMessage:function(e){return e},getErrorResponse:function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}},r={getServerURLFromMessage:function(e){return e},getHTTPMethod:function(){return"POST"},getResponseType:function(e){return n[e].responseType},getLicenseMessage:function(e,r){return function(){if(!t||!t.hasOwnProperty("decodeArray"))throw new Error("Missing config parameter(s)")}(),n[r].getLicenseMessage(e)},getErrorResponse:function(e,t){return n[t].getErrorResponse(e)}},r}$.__dashjs_factory_name="DRMToday";var Q=E.default.getSingletonFactory($);function X(){let e;const t="http://schemas.xmlsoap.org/soap/envelope/";function n(e){const t=String.fromCharCode.apply(null,new Uint8Array(e));return decodeURIComponent(escape(t))}function r(e){if(window.DOMParser){const r=n(e),i=(new window.DOMParser).parseFromString(r,"text/xml"),a=i?i.getElementsByTagNameNS(t,"Envelope")[0]:null,o=a?a.getElementsByTagNameNS(t,"Body")[0]:null;if(o&&o.getElementsByTagNameNS(t,"Fault")[0])return null}return e}function i(e){let r="",i="",a="",o=-1,s=-1;if(window.DOMParser){const u=n(e),l=(new window.DOMParser).parseFromString(u,"text/xml"),c=l?l.getElementsByTagNameNS(t,"Envelope")[0]:null,f=c?c.getElementsByTagNameNS(t,"Body")[0]:null,d=f?f.getElementsByTagNameNS(t,"Fault")[0]:null,h=d?d.getElementsByTagName("detail")[0]:null,g=h?h.getElementsByTagName("Exception")[0]:null;let p=null;if(null===d)return u;p=d.getElementsByTagName("faultstring")[0].firstChild,r=p?p.nodeValue:null,null!==g&&(p=g.getElementsByTagName("StatusCode")[0],i=p?p.firstChild.nodeValue:null,p=g.getElementsByTagName("Message")[0],a=p?p.firstChild.nodeValue:null,o=a?a.lastIndexOf("[")+1:-1,s=a?a.indexOf("]"):-1,a=a?a.substring(o,s):"")}let u=`code: ${i}, name: ${r}`;return a&&(u+=`, message: ${a}`),u}return e={getServerURLFromMessage:function(e){return e},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(e){return r.call(this,e)},getErrorResponse:function(e){return i.call(this,e)}},e}X.__dashjs_factory_name="PlayReady";var Z=E.default.getSingletonFactory(X);function J(){let e;return e={getServerURLFromMessage:function(e){return e},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"arraybuffer"},getLicenseMessage:function(e){return e},getErrorResponse:function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}},e}J.__dashjs_factory_name="Widevine";var ee=E.default.getSingletonFactory(J);function te(){let e;function t(e){const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n.buffer}return e={getErrorResponse:function(e){return String.fromCharCode.apply(null,new Uint8Array(e))},getHTTPMethod:function(){return"POST"},getLicenseMessage:function(e){if(!e||!e.byteLength)return e;let n;try{n=String.fromCharCode.apply(null,new Uint8Array(e))}
2catch(t){const r=new Uint8Array(e);let i="";for(let e=0;e<r.length;e++)i+=String.fromCharCode(r[e]);n=i}if(!n)return e;if(n=n.trim(),"<ckc>"===n.substr(0,5)&&"</ckc>"===n.substr(-6))return t(n.slice(5,-6));try{const e=JSON.parse(n),r=e.ckc||e.CkcMessage||e.License;if(r)return t(r)}catch(e){}return/^[A-Za-z0-9+/\r\n]+=*$/.test(n)&&n.length>0?t(n):e},getResponseType:function(){return"arraybuffer"},getServerURLFromMessage:function(e){return e}},e}te.__dashjs_factory_name="FairPlay";var ne=E.default.getSingletonFactory(te);function re(){let e;return e={getServerURLFromMessage:function(e){return e},getHTTPMethod:function(){return"POST"},getResponseType:function(){return"json"},getLicenseMessage:function(e){if(!e.hasOwnProperty("keys"))return null;let t=[];for(let n=0;n<e.keys.length;n++){let r=e.keys[n],i=r.kid.replace(/=/g,""),a=r.k.replace(/=/g,"");t.push(new I(i,a))}return new A(t)},getErrorResponse:function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}},e}re.__dashjs_factory_name="ClearKey";var ie=E.default.getSingletonFactory(re),ae=class{constructor(e){this.ks=e.ks,this.keyId=e.keyId,this.initData=e.initData,this.protData=e.protData,this.cdmData=e.cdmData,this.sessionId=e.sessionId,this.sessionType=e.sessionType}};function oe(){let e,t,n,r,a,o,u,l,c=this.context;function f(e){for(let t=0;t<r.length;t++)if(r[t].systemString===e)return r[t];return null}function d(e,t){return t&&e in t?t[e]:null}function h(e,t){return e&&e.sessionId?e.sessionId:t&&t.sessionId?t.sessionId:null}function g(e,t){return e&&e.sessionType?e.sessionType:t}return e={getKeySystemBySystemString:f,getKeySystems:function(){return r},getLicenseServerModelInstance:function(e,t,n){if(n===i.default.MEDIA_KEY_MESSAGE_TYPES.LICENSE_RELEASE||n===i.default.MEDIA_KEY_MESSAGE_TYPES.INDIVIDUALIZATION_REQUEST)return null;let r=null;return t&&t.hasOwnProperty("drmtoday")?r=Q(c).getInstance({BASE64:a}):e.systemString===i.default.WIDEVINE_KEYSTEM_STRING?r=ee(c).getInstance():e.systemString===i.default.FAIRPLAY_KEYSTEM_STRING?r=ne(c).getInstance():e.systemString===i.default.PLAYREADY_KEYSTEM_STRING?r=Z(c).getInstance():e.systemString===i.default.CLEARKEY_KEYSTEM_STRING&&(r=ie(c).getInstance()),r},getSupportedKeySystemMetadataForSinf:function(e,t,n){const r=f(i.default.FAIRPLAY_KEYSTEM_STRING);if(!r)return[];const a=function(e){if(!e||e.byteLength<12)return null;let t;try{const n=String.fromCharCode.apply(null,new Uint8Array(e)),r=JSON.parse(n);if(r.sinf&&r.sinf.length>0){const e=atob(r.sinf[0]);t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n)}}catch(n){t=new Uint8Array(e)}if(!t||t.length<12)return null;for(let e=0;e<t.length-28;e++)if(116===t[e]&&101===t[e+1]&&110===t[e+2]&&99===t[e+3]){const n=e+12;if(n+16>t.length)return null;const r=t.subarray(n,n+16),i=Array.from(r).map(e=>e.toString(16).padStart(2,"0")).join("");return i.slice(0,8)+"-"+i.slice(8,12)+"-"+i.slice(12,16)+"-"+i.slice(16,20)+"-"+i.slice(20,32)}return null}(e),o=t&&t[i.default.FAIRPLAY_KEYSTEM_STRING]||null;return[{ks:r,keyId:a,initData:e,protData:o,cdmData:r.getCDMData(o?o.cdmData:null),sessionType:n}]},getSupportedKeySystemMetadataFromContentProtection:function(e,t,n){let i,a,o,u,l=[];if(!e||!e.length)return l;const c=s.findMp4ProtectionElement(e);for(o=0;o<r.length;o++){a=r[o];const s=d(a.systemString,t);for(u=0;u<e.length;u++)if(i=e[u],i.schemeIdUri.toLowerCase()===a.schemeIdURI){let e=a.getInitData(i,c);const t=new ae({ks:r[o],keyId:i.keyId,initData:e,protData:s,cdmData:a.getCDMData(s?s.cdmData:null),sessionId:h(s,i),sessionType:g(s,n)});s?l.unshift(t):l.push(t)}}return l},getSupportedKeySystemMetadataFromSegmentPssh:function(e,t,n){let i,a,o=[],u=s.parsePSSHList(e);for(let e=0;e<r.length;++e){i=r[e],a=i.systemString;const s=d(a,t);i.uuid in u&&o.push({ks:i,initData:u[i.uuid],protData:s,cdmData:i.getCDMData(s?s.cdmData:null),sessionId:h(s),sessionType:g(s,n)})}return o},initDataEquals:function(e,t){if(e.byteLength===t.byteLength){let n=new Uint8Array(e),r=new Uint8Array(t);for(let e=0;e<n.length;e++)if(n[e]!==r[e])return!1;return!0}return!1},initialize:function(){let e;r=[],e=V(c).getInstance({BASE64:a,settings:o}),r.push(e),e=k(c).getInstance({BASE64:a}),r.push(e),e=z(c).getInstance(),r.push(e),e=N(c).getInstance({BASE64:a}),r.push(e),u=e,e=O(c).getInstance({BASE64:a,debug:t}),r.push(e),l=e},isClearKey:function(e){return e===u||e===l},processClearKeyLicenseRequest:function(e,t,r){try{return e.getClearKeysFromProtectionData(t,r)}catch(e){return n.error("Failed to retrieve clearkeys from ProtectionData"),null}},setConfig:function(r){r&&(r.debug&&(t=r.debug,n=t.getLogger(e)),r.BASE64&&(a=r.BASE64),r.settings&&(o=r.settings))},setKeySystems:function(e){r=e},setProtectionData:function(e){for(var t,n,i=0;i<r.length;i++){var a=r[i];a.hasOwnProperty("init")&&a.init((t=a.systemString,n=void 0,n=null,e&&(n=t in e?e[t]:null),n))}}},e}oe.__dashjs_factory_name="ProtectionKeyController";var se=E.default.getSingletonFactory(oe),ue=n(445),le=class{constructor(e,t){this.initData=e,this.initDataType=t}},ce=class{constructor(e,t,n,r){this.sessionToken=e,this.message=t,this.defaultURL=n,this.messageType=r||i.default.MEDIA_KEY_MESSAGE_TYPES.LICENSE_REQUEST}},fe=class{constructor(e,t){this.keySystem=e,this.ksConfiguration=t,this.nativeMediaKeySystemAccessObject=null,this.selectedSystemString=null}};const de={};function he(e){e=e||{};const t=this.context,n=e.eventBus,r=e.events,a=e.debug;let o,s,u,l,d,h,g,p;function m(e,t,i,a){if(void 0===navigator.requestMediaKeySystemAccess||"function"!=typeof navigator.requestMediaKeySystemAccess){const e="Insecure origins are not allowed";return n.trigger(r.KEY_SYSTEM_ACCESS_COMPLETE,{error:e}),void a({error:e})}const o=e[t].protData&&e[t].protData.systemStringPriority?e[t].protData.systemStringPriority:null,s=e[t].configs,u=e[t].ks;let l=u.systemString;(function(e,t){return new Promise((n,r)=>{E(e,t,0,n,r)})})(o||(de[l]?de[l]:[l]),s).then(e=>{const t=e&&e.nativeMediaKeySystemAccessObject&&"function"==typeof e.nativeMediaKeySystemAccessObject.getConfiguration?e.nativeMediaKeySystemAccessObject.getConfiguration():null,a=new fe(u,t);a.selectedSystemString=e.selectedSystemString,a.nativeMediaKeySystemAccessObject=e.nativeMediaKeySystemAccessObject,n.trigger(r.KEY_SYSTEM_ACCESS_COMPLETE,{data:a}),i({data:a})}).catch(o=>{if(t+1<e.length)m(e,t+1,i,a);else{const e="Key system access denied! ";n.trigger(r.KEY_SYSTEM_ACCESS_COMPLETE,{error:e+o.message}),a({error:e+o.message})}})}function E(e,t,n,r,i){const a=e[n];s.debug(`Requesting key system access for system string ${a}`),navigator.requestMediaKeySystemAccess(a,t).then(e=>{r({nativeMediaKeySystemAccessObject:e,selectedSystemString:a})}).catch(a=>{n+1<e.length?E(e,t,n+1,r,i):i(a)})}function T(e){if(!e||!e.session)return Promise.resolve;const t=e.session;return t.removeEventListener("keystatuseschange",e),t.removeEventListener("message",e),t.close()}function y(e){for(let t=0;t<h.length;t++)if(h[t]===e){h.splice(t,1);break}}function _(e,t){const a={session:e,keyId:t.keyId,normalizedKeyId:t&&t.keyId&&"string"==typeof t.keyId?t.keyId.replace(/-/g,"").toLowerCase():"",initData:t.initData,sessionId:t.sessionId,sessionType:t.sessionType,hasTriggeredKeyStatusMapUpdate:!1,handleEvent:function(e){switch(e.type){case"keystatuseschange":this._onKeyStatusesChange(e);break;case"message":this._onKeyMessage(e)}},_onKeyStatusesChange:function(e){n.trigger(r.KEY_STATUSES_CHANGED,{data:this});const t=[];
2e.target.keyStatuses.forEach(function(){t.push(S(arguments))}),n.trigger(r.INTERNAL_KEY_STATUSES_CHANGED,{parsedKeyStatuses:t,sessionToken:a})},_onKeyMessage:function(e){let t=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;n.trigger(r.INTERNAL_KEY_MESSAGE,{data:new ce(this,t,void 0,e.messageType)})},getKeyId:function(){return this.keyId},getSessionId:function(){return e.sessionId},getSessionType:function(){return this.sessionType},getExpirationTime:function(){return e.expiration},getKeyStatuses:function(){return e.keyStatuses},getUsable:function(){let t=!1;return e.keyStatuses.forEach(function(){S(arguments).status===i.default.MEDIA_KEY_STATUSES.USABLE&&(t=!0)}),t}};return e.addEventListener("keystatuseschange",a),e.addEventListener("message",a),e.closed.then(()=>{y(a),s.debug("DRM: Session closed. SessionID = "+a.getSessionId()),n.trigger(r.KEY_SESSION_CLOSED,{data:a.getSessionId()})}),h.push(a),a}function S(e){let t,n;return e&&e.length>0&&(e[0]&&("string"==typeof e[0]?t=e[0]:n=e[0]),e[1]&&("string"==typeof e[1]?t=e[1]:n=e[1])),{status:t,keyId:n}}return o={closeKeySession:function(e){T(e).catch(function(t){y(e),n.trigger(r.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+e.getSessionId()+") "+t.name})})},createKeySession:function(e){if(!u||!d)throw new Error("Can not create sessions until you have selected a key system");const t=d.createSession(e.sessionType),a=_(t,e);let o;o=u.systemString===i.default.CLEARKEY_KEYSTEM_STRING&&(e.initData||e.protData&&e.protData.clearkeys)?i.default.INITIALIZATION_DATA_TYPE_KEYIDS:u.systemString===i.default.FAIRPLAY_KEYSTEM_STRING?i.default.INITIALIZATION_DATA_TYPE_SINF:i.default.INITIALIZATION_DATA_TYPE_CENC,t.generateRequest(o,e.initData).then(function(){s.debug("DRM: Session created. SessionID = "+a.getSessionId()),n.trigger(r.KEY_SESSION_CREATED,{data:a})}).catch(function(e){y(a),n.trigger(r.KEY_SESSION_CREATED,{data:null,error:new f.default(c.default.KEY_SESSION_CREATED_ERROR_CODE,c.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Error generating key request -- "+e.name)})})},getAllInitData:function(){const e=[];for(let t=0;t<h.length;t++)h[t].initData&&e.push(h[t].initData);return e},getSessionTokens:function(){return h},loadKeySession:function(e){if(!u||!d)throw new Error("Can not load sessions until you have selected a key system");const t=e.sessionId;for(let e=0;e<h.length;e++)if(t===h[e].sessionId)return void s.warn("DRM: Ignoring session ID because we have already seen it!");const i=d.createSession(e.sessionType),a=_(i,e);a.hasTriggeredKeyStatusMapUpdate=!0,i.load(t).then(function(e){e?(s.debug("DRM: Session loaded. SessionID = "+a.getSessionId()),n.trigger(r.KEY_SESSION_CREATED,{data:a})):(y(a),n.trigger(r.KEY_SESSION_CREATED,{data:null,error:new f.default(c.default.KEY_SESSION_CREATED_ERROR_CODE,c.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Could not load session! Invalid Session ID ("+t+")")}))}).catch(function(e){y(a),n.trigger(r.KEY_SESSION_CREATED,{data:null,error:new f.default(c.default.KEY_SESSION_CREATED_ERROR_CODE,c.default.KEY_SESSION_CREATED_ERROR_MESSAGE+"Could not load session ("+t+")! "+e.name)})})},removeKeySession:function(e){e.session.remove().then(function(){s.debug("DRM: Session removed. SessionID = "+e.getSessionId()),n.trigger(r.KEY_SESSION_REMOVED,{data:e.getSessionId()})},function(t){n.trigger(r.KEY_SESSION_REMOVED,{data:null,error:"Error removing session ("+e.getSessionId()+"). "+t.name})})},requestKeySystemAccess:function(e){return new Promise((t,n)=>{m(e,0,t,n)})},reset:function(){const e=h.length;let t;if(0!==e){const i=function(e){y(e),0===h.length&&(l?(l.removeEventListener("encrypted",g),l.setMediaKeys(null).then(function(){n.trigger(r.TEARDOWN_COMPLETE)})):n.trigger(r.TEARDOWN_COMPLETE))};for(let n=0;n<e;n++)t=h[n],function(e){T(t),i(e)}(t)}else n.trigger(r.TEARDOWN_COMPLETE)},selectKeySystem:function(e){return new Promise((t,n)=>{e.nativeMediaKeySystemAccessObject.createMediaKeys().then(t=>(u=e.keySystem,d=t,l?l.setMediaKeys(d):Promise.resolve())).then(()=>{t(u)}).catch(function(){n({error:"Error selecting keys system ("+e.keySystem.systemString+")! Could not create MediaKeys -- TODO"})})})},setMediaElement:function(e){l!==e&&(l&&(l.removeEventListener("encrypted",g),l.setMediaKeys&&l.setMediaKeys(null)),l=e,l&&(l.addEventListener("encrypted",g),l.setMediaKeys&&d&&l.setMediaKeys(d)))},setServerCertificate:function(e){return new Promise((t,i)=>{d.setServerCertificate(e).then(function(){s.info("DRM: License server certificate successfully updated."),n.trigger(r.SERVER_CERTIFICATE_UPDATED),t()}).catch(e=>{i(e),n.trigger(r.SERVER_CERTIFICATE_UPDATED,{error:new f.default(c.default.SERVER_CERTIFICATE_UPDATED_ERROR_CODE,c.default.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE+e.name)})})})},stop:function(){let e;for(let t=0;t<h.length;t++)e=h[t],e.getUsable()||(T(e),y(e))},updateKeySession:function(e,t){const i=e.session;p.isClearKey(u)&&(t=t.toJWK()),i.update(t).then(()=>{n.trigger(r.KEY_SESSION_UPDATED)}).catch(function(t){n.trigger(r.KEY_ERROR,{error:new f.default(c.default.MEDIA_KEYERR_CODE,"Error sending update() message! "+t.name,e)})})}},s=a.getLogger(o),u=null,l=null,d=null,h=[],p=se(t).getInstance(),g={handleEvent:function(e){if("encrypted"===e.type&&e.initData){let t=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;n.trigger(r.NEED_KEY,{key:new le(t,e.initDataType)})}}},o}
vendor: 5,760 bytes, line 2
2de[i.default.PLAYREADY_KEYSTEM_STRING]=[i.default.PLAYREADY_KEYSTEM_STRING,i.default.PLAYREADY_RECOMMENDATION_KEYSTEM_STRING],de[i.default.WIDEVINE_KEYSTEM_STRING]=[i.default.WIDEVINE_KEYSTEM_STRING],de[i.default.FAIRPLAY_KEYSTEM_STRING]=[i.default.FAIRPLAY_KEYSTEM_STRING],de[i.default.CLEARKEY_KEYSTEM_STRING]=[i.default.CLEARKEY_KEYSTEM_STRING],he.__dashjs_factory_name="DefaultProtectionModel";var ge=E.default.getClassFactory(he);function pe(e){e=e||{};const t=this.context,n=e.eventBus,r=e.events,a=e.debug,o=e.api;let s,u,d,h,g,p,m,E,T;function y(){try{for(let e=0;e<m.length;e++)_(m[e]);d&&d.removeEventListener(o.needkey,E),n.trigger(r.TEARDOWN_COMPLETE)}catch(e){n.trigger(r.TEARDOWN_COMPLETE,{error:"Error tearing down key sessions and MediaKeys! -- "+e.message})}}function _(e){const t=e.session;t.removeEventListener(o.error,e),t.removeEventListener(o.message,e),t.removeEventListener(o.ready,e),t.removeEventListener(o.close,e);for(let t=0;t<m.length;t++)if(m[t]===e){m.splice(t,1);break}t[o.release]()}function S(){let e=null;const t=function(){d.removeEventListener("loadedmetadata",e),d[o.setMediaKeys](g),n.trigger(r.VIDEO_ELEMENT_SELECTED)};d.readyState>=1?t():(e=t.bind(this),d.addEventListener("loadedmetadata",e))}return s={getAllInitData:function(){const e=[];for(let t=0;t<m.length;t++)e.push(m[t].initData);return e},getSessionTokens:function(){return m},requestKeySystemAccess:function(e){return new Promise((t,i)=>{let a=!1;for(let i=0;i<e.length;i++){const s=e[i].ks.systemString,u=e[i].configs;let c=null,f=null;for(let e=0;e<u.length;e++){const i=u[e].audioCapabilities,d=u[e].videoCapabilities;if(i&&0!==i.length){c=[];for(let e=0;e<i.length;e++)window[o.MediaKeys].isTypeSupported(s,i[e].contentType)&&c.push(i[e])}if(d&&0!==d.length){f=[];for(let e=0;e<d.length;e++)window[o.MediaKeys].isTypeSupported(s,d[e].contentType)&&f.push(d[e])}if(!c&&!f||c&&0===c.length||f&&0===f.length)continue;a=!0;const h=new l(c,f),g=T.getKeySystemBySystemString(s),p=new fe(g,h);n.trigger(r.KEY_SYSTEM_ACCESS_COMPLETE,{data:p}),t({data:p});break}}if(!a){const e="Key system access denied! -- No valid audio/video content configurations detected!";n.trigger(r.KEY_SYSTEM_ACCESS_COMPLETE,{error:e}),i({error:e})}})},selectKeySystem:function(e){return new Promise((t,n)=>{try{g=e.mediaKeys=new window[o.MediaKeys](e.keySystem.systemString),h=e.keySystem,p=e,d&&S(),t(h)}catch(e){n({error:"Error selecting keys system ("+h.systemString+")! Could not create MediaKeys -- TODO"})}})},setMediaElement:function(e){d!==e&&(d&&d.removeEventListener(o.needkey,E),d=e,d&&(d.addEventListener(o.needkey,E),g&&S()))},createKeySession:function(e){if(!h||!g||!p)throw new Error("Can not create sessions until you have selected a key system");let t=null;if(p.ksConfiguration.videoCapabilities&&p.ksConfiguration.videoCapabilities.length>0&&(t=p.ksConfiguration.videoCapabilities[0]),null===t&&p.ksConfiguration.audioCapabilities&&p.ksConfiguration.audioCapabilities.length>0&&(t=p.ksConfiguration.audioCapabilities[0]),null===t)throw new Error("Can not create sessions for unknown content types.");const i=t.contentType,a=g.createSession(i,new Uint8Array(e.initData),e.cdmData?new Uint8Array(e.cdmData):null),s=function(e,t){return{session:e,keyId:t.keyId,normalizedKeyId:t&&t.keyId&&"string"==typeof t.keyId?t.keyId.replace(/-/g,"").toLowerCase():"",initData:t.initData,hasTriggeredKeyStatusMapUpdate:!1,getKeyId:function(){return this.keyId},getSessionId:function(){return this.session.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"},getKeyStatuses:function(){return{size:0,has:()=>!1,get:()=>{}}},handleEvent:function(e){switch(e.type){case o.error:let t="KeyError";n.trigger(r.KEY_ERROR,{error:new f.default(c.default.MEDIA_KEYERR_CODE,t,this)});break;case o.message:let i=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;n.trigger(r.INTERNAL_KEY_MESSAGE,{data:new ce(this,i,e.destinationURL)});break;case o.ready:u.debug("DRM: Key added."),n.trigger(r.KEY_ADDED);break;case o.close:u.debug("DRM: Session closed. SessionID = "+this.getSessionId()),n.trigger(r.KEY_SESSION_CLOSED,{data:this.getSessionId()})}}}}(a,e);a.addEventListener(o.error,s),a.addEventListener(o.message,s),a.addEventListener(o.ready,s),a.addEventListener(o.close,s),m.push(s),u.debug("DRM: Session created. SessionID = "+s.getSessionId()),n.trigger(r.KEY_SESSION_CREATED,{data:s})},updateKeySession:function(e,t){const i=e.session;T.isClearKey(h)?i.update(new Uint8Array(t.toJWK())):i.update(new Uint8Array(t)),n.trigger(r.KEY_SESSION_UPDATED)},closeKeySession:_,setServerCertificate:function(){return Promise.resolve()},loadKeySession:function(){},removeKeySession:function(){},stop:y,reset:y},u=a.getLogger(s),d=null,h=null,g=null,p=null,m=[],T=se(t).getInstance(),E={handleEvent:function(e){if(e.type===o.needkey&&e.initData){const t=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;n.trigger(r.NEED_KEY,{key:new le(t,i.default.INITIALIZATION_DATA_TYPE_CENC)})}}},s}pe.__dashjs_factory_name="ProtectionModel_3Feb2014";var me=E.default.getClassFactory(pe);function Ee(e){e=e||{};const t=this.context,n=e.eventBus,r=e.events,a=e.debug,o=e.api,s=e.errHandler;let u,d,h,g,p,m,E,T,y;function _(){h&&A();for(let e=0;e<E.length;e++)S(E[e]);n.trigger(r.TEARDOWN_COMPLETE)}function S(e){try{h[o.cancelKeyRequest](g.systemString,e.sessionId)}catch(t){n.trigger(r.KEY_SESSION_CLOSED,{data:null,error:"Error closing session ("+e.sessionId+") "+t.message})}}function I(e,t){if(t&&e){const n=e.length;for(let r=0;r<n;r++)if(e[r].sessionId==t)return e[r];return null}return null}function A(){h.removeEventListener(o.keyerror,y),h.removeEventListener(o.needkey,y),h.removeEventListener(o.keymessage,y),h.removeEventListener(o.keya
2dded,y)}return u={getAllInitData:function(){const e=[];for(let t=0;t<m.length;t++)e.push(m[t].initData);for(let t=0;t<E.length;t++)e.push(E[t].initData);return e},getSessionTokens:function(){return E.concat(m)},requestKeySystemAccess:function(e){return new Promise((t,i)=>{let a=h;a||(a=document.createElement("video"));let o=!1;for(let i=0;i<e.length;i++){const s=e[i].ks.systemString,u=e[i].configs;let c=null,f=null;for(let e=0;e<u.length;e++){const i=u[e].videoCapabilities;if(i&&0!==i.length){f=[];for(let e=0;e<i.length;e++)""!==a.canPlayType(i[e].contentType,s)&&f.push(i[e])}if(!c&&!f||c&&0===c.length||f&&0===f.length)continue;o=!0;const d=new l(c,f),h=p.getKeySystemBySystemString(s),g=new fe(h,d);n.trigger(r.KEY_SYSTEM_ACCESS_COMPLETE,{data:g}),t({data:g});break}}if(!o){const e="Key system access denied! -- No valid audio/video content configurations detected!";n.trigger(r.KEY_SYSTEM_ACCESS_COMPLETE,{error:e}),i({error:e})}})},selectKeySystem:function(e){return g=e.keySystem,Promise.resolve(g)},setMediaElement:function(e){if(h!==e){if(h){A();for(var t=0;t<E.length;t++)S(E[t]);E=[]}h=e,h&&(h.addEventListener(o.keyerror,y),h.addEventListener(o.needkey,y),h.addEventListener(o.keymessage,y),h.addEventListener(o.keyadded,y),n.trigger(r.VIDEO_ELEMENT_SELECTED))}},createKeySession:function(e){if(!g)throw new Error("Can not create sessions until you have selected a key system");if(T||0===E.length){const t={sessionId:null,keyId:e.keyId,normalizedKeyId:e&&e.keyId&&"string"==typeof e.keyId?e.keyId.replace(/-/g,"").toLowerCase():"",initData:e.initData,hasTriggeredKeyStatusMapUpdate:!1,getKeyId:function(){return this.keyId},getSessionId:function(){return this.sessionId},getExpirationTime:function(){return NaN},getSessionType:function(){return"temporary"},getKeyStatuses:function(){return{size:0,has:()=>!1,get:()=>{}}}};return m.push(t),h[o.generateKeyRequest](g.systemString,new Uint8Array(e.initData)),t}throw new Error("Multiple sessions not allowed!")},updateKeySession:function(e,t){const i=e.sessionId;if(p.isClearKey(g))for(let e=0;e<t.keyPairs.length;e++)h[o.addKey](g.systemString,t.keyPairs[e].key,t.keyPairs[e].keyID,i);else h[o.addKey](g.systemString,new Uint8Array(t),new Uint8Array(e.initData),i);n.trigger(r.KEY_SESSION_UPDATED)},closeKeySession:S,setServerCertificate:function(){return Promise.resolve()},loadKeySession:function(){},removeKeySession:function(){},stop:_,reset:_},d=a.getLogger(u),h=null,g=null,m=[],E=[],p=se(t).getInstance(),y={handleEvent:function(e){let t=null;switch(e.type){case o.needkey:let a=ArrayBuffer.isView(e.initData)?e.initData.buffer:e.initData;n.trigger(r.NEED_KEY,{key:new le(a,i.default.INITIALIZATION_DATA_TYPE_CENC)});break;case o.keyerror:if(t=I(E,e.sessionId),t||(t=I(m,e.sessionId)),t){let i=c.default.MEDIA_KEYERR_CODE,a="";switch(e.errorCode.code){case 1:i=c.default.MEDIA_KEYERR_UNKNOWN_CODE,a+="MEDIA_KEYERR_UNKNOWN - "+c.default.MEDIA_KEYERR_UNKNOWN_MESSAGE;break;case 2:i=c.default.MEDIA_KEYERR_CLIENT_CODE,a+="MEDIA_KEYERR_CLIENT - "+c.default.MEDIA_KEYERR_CLIENT_MESSAGE;break;case 3:i=c.default.MEDIA_KEYERR_SERVICE_CODE,a+="MEDIA_KEYERR_SERVICE - "+c.default.MEDIA_KEYERR_SERVICE_MESSAGE;break;case 4:i=c.default.MEDIA_KEYERR_OUTPUT_CODE,a+="MEDIA_KEYERR_OUTPUT - "+c.default.MEDIA_KEYERR_OUTPUT_MESSAGE;break;case 5:i=c.default.MEDIA_KEYERR_HARDWARECHANGE_CODE,a+="MEDIA_KEYERR_HARDWARECHANGE - "+c.default.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE;break;case 6:i=c.default.MEDIA_KEYERR_DOMAIN_CODE,a+="MEDIA_KEYERR_DOMAIN - "+c.default.MEDIA_KEYERR_DOMAIN_MESSAGE}a+=" System Code = "+e.systemCode,n.trigger(r.KEY_ERROR,{error:new f.default(i,a,t)})}else d.error("No session token found for key error");break;case o.keyadded:t=I(E,e.sessionId),t||(t=I(m,e.sessionId)),t?(d.debug("DRM: Key added."),n.trigger(r.KEY_ADDED,{data:t})):d.debug("No session token found for key added");break;case o.keymessage:if(T=null!==e.sessionId&&void 0!==e.sessionId,T?(t=I(E,e.sessionId),!t&&m.length>0&&(t=m.shift(),E.push(t),t.sessionId=e.sessionId,n.trigger(r.KEY_SESSION_CREATED,{data:t}))):m.length>0&&(t=m.shift(),E.push(t),0!==m.length&&s.error(new f.default(c.default.MEDIA_KEY_MESSAGE_ERROR_CODE,c.default.MEDIA_KEY_MESSAGE_ERROR_MESSAGE))),t){let i=ArrayBuffer.isView(e.message)?e.message.buffer:e.message;t.keyMessage=i,n.trigger(r.INTERNAL_KEY_MESSAGE,{data:new ce(t,i,e.defaultURL)})}else d.warn("No session token found for key message")}}},u}Ee.__dashjs_factory_name="ProtectionModel_01b";var Te=E.default.getClassFactory(Ee);const ye=[{generateKeyRequest:"generateKeyRequest",addKey:"addKey",cancelKeyRequest:"cancelKeyRequest",needkey:"needkey",keyerror:"keyerror",keyadded:"keyadded",keymessage:"keymessage"},{generateKeyRequest:"webkitGenerateKeyRequest",addKey:"webkitAddKey",cancelKeyRequest:"webkitCancelKeyRequest",needkey:"webkitneedkey",keyerror:"webkitkeyerror",keyadded:"webkitkeyadded",keymessage:"webkitkeymessage"}],_e=[{setMediaKeys:"setMediaKeys",MediaKeys:"MediaKeys",release:"close",needkey:"needkey",error:"keyerror",message:"keymessage",ready:"keya
2dded",close:"keyclose"},{setMediaKeys:"msSetMediaKeys",MediaKeys:"MSMediaKeys",release:"close",needkey:"msneedkey",error:"mskeyerror",message:"mskeymessage",ready:"mskeyadded",close:"mskeyclose"}];function Se(){let e;const t=this.context;function n(e,t){for(let n=0;n<t.length;n++){const r=t[n];if("function"==typeof e[r[Object.keys(r)[0]]])return r}return null}return e={createProtectionSystem:function(r){let i=null;const a=se(t).getInstance();a.setConfig({debug:r.debug,BASE64:r.BASE64,settings:r.settings}),a.initialize();let o=function(r){const i=r.debug,a=i.getLogger(e),o=r.eventBus,s=r.errHandler,u=r.videoModel?r.videoModel.getElement():null;return u&&void 0===u.onencrypted||u&&void 0===u.mediaKeys?n(u,_e)?(a.info("EME detected on this user agent! (ProtectionModel_3Feb2014)"),me(t).create({debug:i,eventBus:o,events:r.events,api:n(u,_e)})):n(u,ye)?(a.info("EME detected on this user agent! (ProtectionModel_01b)"),Te(t).create({debug:i,eventBus:o,errHandler:s,events:r.events,api:n(u,ye)})):(a.warn("No supported version of EME detected on this user agent! - Attempts to play encrypted content will fail!"),null):(a.info("EME detected on this user agent! (DefaultProtectionModel"),ge(t).create({debug:i,eventBus:o,events:r.events}))}(r);return o&&(i=S(t).create({BASE64:r.BASE64,cmcdController:r.cmcdController,constants:r.constants,customParametersModel:r.customParametersModel,debug:r.debug,eventBus:r.eventBus,events:r.events,protectionKeyController:a,protectionModel:o,settings:r.settings}),r.capabilities.setEncryptedMediaSupported(!0)),i}},e}Se.__dashjs_factory_name="Protection";const Ie=E.default.getClassFactory(Se);Ie.events=ue.default,Ie.errors=c.default,E.default.updateClassFactory(Se.__dashjs_factory_name,Ie);var Ae=Ie},445:function(e,t,n){n.r(t);var r=n(7252);class i extends r.default{constructor(){super(),this.INTERNAL_KEY_MESSAGE="internalKeyMessage",this.INTERNAL_KEY_STATUSES_CHANGED="internalkeyStatusesChanged",this.KEY_ADDED="public_keyAdded",this.KEY_ERROR="public_keyError",this.KEY_MESSAGE="public_keyMessage",this.KEY_SESSION_CLOSED="public_keySessionClosed",this.KEY_SESSION_CREATED="public_keySessionCreated",this.KEY_SESSION_REMOVED="public_keySessionRemoved",this.KEY_STATUSES_CHANGED="public_keyStatusesChanged",this.KEY_STATUSES_MAP_UPDATED="keyStatusesMapUpdated",this.KEY_SYSTEM_ACCESS_COMPLETE="public_keySystemAccessComplete",this.KEY_SYSTEM_SELECTED="public_keySystemSelected",this.LICENSE_REQUEST_COMPLETE="public_licenseRequestComplete",this.LICENSE_REQUEST_SENDING="public_licenseRequestSending",this.NEED_KEY="needkey",this.PROTECTION_CREATED="public_protectioncreated",this.PROTECTION_DESTROYED="public_protectiondestroyed",this.SERVER_CERTIFICATE_UPDATED="serverCertificateUpdated",this.TEARDOWN_COMPLETE="protectionTeardownComplete",this.VIDEO_ELEMENT_SELECTED="videoElementSelected",this.KEY_SESSION_UPDATED="public_keySessionUpdated"}}let a=new i;t.default=a},1923:function(e,t,n){n.r(t);var r=n(8748);class i extends r.default{constructor(){super(),this.MEDIA_KEYERR_CODE=100,this.MEDIA_KEYERR_UNKNOWN_CODE=101,this.MEDIA_KEYERR_CLIENT_CODE=102,this.MEDIA_KEYERR_SERVICE_CODE=103,this.MEDIA_KEYERR_OUTPUT_CODE=104,this.MEDIA_KEYERR_HARDWARECHANGE_CODE=105,this.MEDIA_KEYERR_DOMAIN_CODE=106,this.MEDIA_KEY_MESSAGE_ERROR_CODE=107,this.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE=108,this.SERVER_CERTIFICATE_UPDATED_ERROR_CODE=109,this.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE=110,this.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE=111,this.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE=112,this.KEY_SESSION_CREATED_ERROR_CODE=113,this.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE=114,this.MEDIA_KEYERR_UNKNOWN_MESSAGE="An unspecified error occurred. This value is used for errors that don't match any of the other codes.",this.MEDIA_KEYERR_CLIENT_MESSAGE="The Key System could not be installed or updated.",this.MEDIA_KEYERR_SERVICE_MESSAGE="The message passed into update indicated an error from the license service.",this.MEDIA_KEYERR_OUTPUT_MESSAGE="There is no available output device with the required characteristics for the content protection system.",this.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE="A hardware configuration change caused a content protection error.",this.MEDIA_KEYERR_DOMAIN_MESSAGE="An error occurred in a multi-device domain licensing configuration. The most common error is a failure to join the domain.",this.MEDIA_KEY_MESSAGE_ERROR_MESSAGE="Multiple key sessions were creates with a user-agent that does not support sessionIDs!! Unpredictable behavior ahead!",this.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE="DRM: Empty key message from CDM",this.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE="Error updating server certificate -- ",this.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE="DRM: KeyStatusChange error! -- License has expired",this.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE="DRM: No license server URL specified!",this.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE="DRM: KeySystem Access Denied! -- ",this.KEY_SESSION_CREATED_ERROR_MESSAGE="DRM: unable to create session! --",this.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE="DRM: licenser error! --"}}let a=new i;t.default=a},4246:function(e,t,n){n.r(t);var r=n(138);const i={DEFAULT:.5,STRONG:1,WEAK:0};function a(e,t,n,r){let a,o,s,u,l;return o=void 0===e?null:e,s=function(e){let t=i.DEFAULT;return e!==i.DEFAULT&&e!==i.STRONG&&e!==i.WEAK||(t=e),t}(n),u=void 0===t?null:t,l=void 0===r?null:r,a={representation:o,reason:u,rule:l,priority:s},a}a.__dashjs_factory_name="SwitchRequest";const o=r.default.getClassFactory(a);o.NO_CHANGE=null,o.PRIORITY=i,r.default.updateClassFactory(a.__dashjs_factory_name,o),t.default=o},559:function(e,t,n){n.r(t),n.d(t,{supportsMediaSource:function(){return u}});var r=n(138),i=n(5212),a=n(2861),o=n(7393),s=n(649);function u(){let e="ManagedMediaSource"in window,t="WebKitMediaSource"in window,n="MediaSource"in window;return e||t||n}function l(){let e,t,n,r,l,c;const f=this.context,d=(0,o.default)(f).getInstance();function h(e,t){let n;t===i.default.VIDEO?n=function(e){const t={video:{}};return e?(e.width&&(t.video.width=e.width),e.height&&(t.video.height=e.height),e.framerate&&(t.video.framerate=parseFloat(e.framerate)),e.hdrMetadataType&&(t.video.hdrMetadataType=e.hdrMetadataType),e.colorGamut&&(t.video.colorGamut=e.colorGamut),e.transferFunction&&(t.video.transferFunction=e.transferFunction),t):t}(e):t===i.default.AUDIO&&(n=function(e){const t={audio:{}};
2return e.samplerate&&(t.audio.samplerate=e.samplerate),e.channels&&(t.audio.channels=e.channels),t}(e)),n[t].contentType=e.codec,n[t].bitrate=parseInt(e.bitrate),n.type="media-source";let r=e.codec;return e.width&&e.height&&(r+=';width="'+e.width+'";height="'+e.height+'"'),n.mediaSourceCodecString=r,function(e,t,n){if(!t||!t.keySystemsMetadata||0===t.keySystemsMetadata.length)return[e];const r=[];return t.keySystemsMetadata.forEach(t=>{if(!t.ks)return void r.push({...e});const o=t.protData&&t.protData.systemStringPriority?t.protData.systemStringPriority:null;let s=t.ks.systemString;(o||[s]).forEach(o=>{const s={...e};s.keySystemConfiguration={},o&&(s.keySystemConfiguration.keySystem=o);let u="";t.ks.systemString===a.default.WIDEVINE_KEYSTEM_STRING&&(u=a.default.ROBUSTNESS_STRINGS.WIDEVINE.SW_SECURE_CRYPTO);const l=t.protData,c=l&&l.audioRobustness&&l.audioRobustness.length>0?l.audioRobustness:u,f=l&&l.videoRobustness&&l.videoRobustness.length>0?l.videoRobustness:u;n===i.default.AUDIO?s.keySystemConfiguration[n]={robustness:c}:n===i.default.VIDEO&&(s.keySystemConfiguration[n]={robustness:f}),r.push(s)})}),r}(n,e,t)}function g(e){return t.get().streaming.enhancement.codecs.some(t=>e.includes(t))}function p(e){if(r&&0!==r.length&&e)return r.find(t=>{const n=m(e,t,i.default.AUDIO),r=m(e,t,i.default.VIDEO),a=m(e,t,"keySystemConfiguration");return n&&r&&a})}function m(e,t,n){return!e[n]&&!t[n]||!(!e[n]||!t[n])&&d.areEqual(e[n],t[n])}function E(e,t){return(e=e.filter(e=>!(e.schemeIdUri&&t.some(t=>t.schemeIdUri===e.schemeIdUri)))).push(...t),e}return e={areKeyIdsExpired:function(e){return!!(n&&e&&e.normalizedKeyIds&&0!==e.normalizedKeyIds.size)&&n.areKeyIdsExpired(e.normalizedKeyIds)},areKeyIdsUsable:function(e){return!(n&&e&&e.normalizedKeyIds&&0!==e.normalizedKeyIds.size)||n.areKeyIdsUsable(e.normalizedKeyIds)},isCodecSupportedBasedOnTestedConfigurations:function(e,t){if(!e||!e.codec||!1===e.isSupported)return!1;const n=h(e,t).map(e=>p(e)).filter(e=>null!=e);return!(n&&n.length>0)||function(e){return e.some(e=>e&&e.decodingInfo&&e.decodingInfo.supported)}(n)},isProtectionCompatible:function(e,t){return!t||!(!e.isEncrypted&&t.isEncrypted)},runCodecSupportCheck:function(e,n){if(n!==i.default.AUDIO&&n!==i.default.VIDEO)return Promise.resolve();if(t.get().streaming.enhancement.enabled&&g(e.codec))return r=r.filter(e=>!g(e.mediaSourceCodecString)),Promise.resolve(!0);const a=h(e,n);return function(e,n){return t.get().streaming.capabilities.useMediaCapabilitiesApi&&navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo&&(e.codec&&n===i.default.AUDIO||n===i.default.VIDEO&&e.codec&&e.width&&e.height&&e.bitrate&&e.framerate)}(e,n)?function(e){return new Promise(t=>{if(!e||0===e.length)return void t();const n=e.map(e=>function(e){return new Promise(t=>{p(e)?t():navigator.mediaCapabilities.decodingInfo(e).then(n=>{e.decodingInfo=n,r.push(e),t()}).catch(n=>{e.decodingInfo={supported:!1},r.push(e),c.error(n),t()})})}(e));Promise.allSettled(n).then(()=>{t()}).catch(e=>{c.error(e),t()})})}(a):(function(e){if(!e||!e.length)return;const t=e[0];if(p(t))return;let n={supported:!1};("ManagedMediaSource"in window&&ManagedMediaSource.isTypeSupported(t.mediaSourceCodecString)||"MediaSource"in window&&MediaSource.isTypeSupported(t.mediaSourceCodecString)||"WebKitMediaSource"in window&&WebKitMediaSource.isTypeSupported(t.mediaSourceCodecString))&&(n.supported=!0),t.decodingInfo=n,r.push(t)}(a),Promise.resolve())},setConfig:function(e){e&&(e.settings&&(t=e.settings),e.protectionController&&(n=e.protectionController))},setEncryptedMediaSupported:function(e){l=e},setProtectionController:function(e){n=e},supportsChangeType:function(){return!!window.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType},supportsEncryptedMedia:function(){return l},supportsEssentialProperty:function(e){let n=t.get().streaming.capabilities.supportedEssentialProperties;t.get().streaming.capabilities.useMediaCapabilitiesApi&&t.get().streaming.capabilities.filterVideoColorimetryEssentialProperties&&(n=E(n,[{schemeIdUri:i.default.COLOUR_PRIMARIES_SCHEME_ID_URI},{schemeIdUri:i.default.MATRIX_COEFFICIENTS_SCHEME_ID_URI},{schemeIdUri:i.default.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI}])),t.get().streaming.capabilities.useMediaCapabilitiesApi&&t.get().streaming.capabilities.filterHDRMetadataFormatEssentialProperties&&(n=E(n,[{schemeIdUri:i.default.HDR_METADATA_FORMAT_SCHEME_ID_URI}]));try{return e.inArray(n)}catch(e){return!0}},supportsMediaSource:u},l=!1,r=[],c=(0,s.default)(f).getInstance().getLogger(e),e}l.__dashjs_factory_name="Capabilities",t.default=r.default.getSingletonFactory(l)},1349:function(e,t,n){function r(e){return e?(Array.isArray(e)?e:[e]).map(e=>{if(!e)return null;if("string"==typeof e){const t=e.trim();return t?{url:t,certType:null}:null}if("object"==typeof e){let t=(e.__text||e.text||"").trim();t||"string"!=typeof e.url||(t=e.url.trim());let n=e.certType||e["@certType"]||null;return n&&"string"==typeof n?(n=n.trim(),""===n&&(n=null)):n=null,t?{url:t,certType:n}:null}return null}
2).filter(Boolean):[]}function i(e){if(!Array.isArray(e)||0===e.length)return[];const t=new Set,n=[];for(let r=0;r<e.length;r++){const i=e[r];if(!i||!i.url)continue;const a=i.url+"||"+(i.certType||"");t.has(a)||(t.add(a),n.push(i))}return n}n.r(t),t.default={normalizeCertUrls:r,dedupeCertUrls:i,sanitizeProtectionDataCertUrls:function(e){return e&&"object"==typeof e&&Object.keys(e).forEach(t=>{const n=e[t];n&&Array.isArray(n.certUrls)&&(n.certUrls=i(r(n.certUrls)))}),e}}},7377:function(e,t,n){n.r(t);var r=n(138),i=n(656);function a(){return{customTimeRangeArray:[],length:0,add:function(e,t){let n;for(n=0;n<this.customTimeRangeArray.length&&e>this.customTimeRangeArray[n].start;n++);for(this.customTimeRangeArray.splice(n,0,{start:e,end:t}),n=0;n<this.customTimeRangeArray.length-1;n++)this.mergeRanges(n,n+1)&&n--;this.length=this.customTimeRangeArray.length},clear:function(){this.customTimeRangeArray=[],this.length=0},remove:function(e,t){for(let n=0;n<this.customTimeRangeArray.length;n++)if(e<=this.customTimeRangeArray[n].start&&t>=this.customTimeRangeArray[n].end)this.customTimeRangeArray.splice(n,1),n--;else{if(e>this.customTimeRangeArray[n].start&&t<this.customTimeRangeArray[n].end){this.customTimeRangeArray.splice(n+1,0,{start:t,end:this.customTimeRangeArray[n].end}),this.customTimeRangeArray[n].end=e;break}e>this.customTimeRangeArray[n].start&&e<this.customTimeRangeArray[n].end?this.customTimeRangeArray[n].end=e:t>this.customTimeRangeArray[n].start&&t<this.customTimeRangeArray[n].end&&(this.customTimeRangeArray[n].start=t)}this.length=this.customTimeRangeArray.length},mergeRanges:function(e,t){let n=this.customTimeRangeArray[e],r=this.customTimeRangeArray[t];return n.start<=r.start&&r.start<=n.end&&n.end<=r.end?(n.end=r.end,this.customTimeRangeArray.splice(t,1),!0):r.start<=n.start&&n.start<=r.end&&r.end<=n.end?(n.start=r.start,this.customTimeRangeArray.splice(t,1),!0):r.start<=n.start&&n.start<=r.end&&n.end<=r.end?(this.customTimeRangeArray.splice(e,1),!0):n.start<=r.start&&r.start<=n.end&&r.end<=n.end&&(this.customTimeRangeArray.splice(t,1),!0)},start:function(e){return(0,i.checkInteger)(e),e>=this.customTimeRangeArray.length||e<0?NaN:this.customTimeRangeArray[e].start},end:function(e){return(0,i.checkInteger)(e),e>=this.customTimeRangeArray.length||e<0?NaN:this.customTimeRangeArray[e].end}}}a.__dashjs_factory_name="CustomTimeRanges",t.default=r.default.getClassFactory(a)},9026:function(e,t,n){n.r(t);var r=n(138);function i(){let e;const t=/^[a-z][a-z0-9+\-_.]*:/i,n=/^https?:\/\//i,r=/^https:\/\//i,i=/^([a-z][a-z0-9+\-_.]*:\/\/[^\/]+)\/?/i,a=(e,t)=>{try{return new window.URL(e,t).toString()}catch(t){return e}},o=(e,t)=>{let n=s;if(!t)return e;if(!c(e))return e;f(e)&&(n=u),d(e)&&(n=l);const r=n(t),i="/"!==r.charAt(r.length-1)&&"/"!==e.charAt(0)?"/":"";return[r,e].join(i)};function s(e){const t=e.indexOf("/"),n=e.lastIndexOf("/");return-1!==t?n===t+1?e:(-1!==e.indexOf("?")&&(e=e.substring(0,e.indexOf("?"))),e.substring(0,n+1)):""}function u(e){const t=e.match(i);return t?t[1]:""}function l(e){const n=e.match(t);return n?n[0]:""}function c(e){return!t.test(e)}function f(e){return c(e)&&"/"===e.charAt(0)}function d(e){return 0===e.indexOf("//")}return function(){try{new window.URL("x","http://y"),e=a}catch(e){}finally{e=e||o}}(),{parseBaseUrl:s,parseOrigin:u,parseScheme:l,isRelative:c,isPathAbsolute:f,isSchemeRelative:d,isHTTPURL:function(e){return n.test(e)},isHTTPS:function(e){return r.test(e)},removeHostname:function(e){return/^(?:\w+\:\/\/)?([^\/]+)(.*)$/.exec(e)[2].substring(1)},resolve:function(t,n){return e(t,n)}}}i.__dashjs_factory_name="DefaultURLUtils",t.default=r.default.getSingletonFactory(i)},7393:function(e,t,n){n.r(t);var r=n(138),i=n(7316);function a(){let e;return e={areEqual:function(e,t){return i(e,t)}},e}a.__dashjs_factory_name="ObjectUtils",t.default=r.default.getSingletonFactory(a)},656:function(e,t,n){n.r(t),n.d(t,{checkInteger:function(){return a},checkIsVideoOrAudioType:function(){return s},checkParameterType:function(){return i},checkRange:function(){return o}});var r=n(5212);function i(e,t){if(typeof e!==t)throw r.default.BAD_ARGUMENT_ERROR}function a(e){if(null===e||isNaN(e)||e%1!=0)throw r.default.BAD_ARGUMENT_ERROR+" : argument is not an integer"}function o(e,t,n){if(e<t||e>n)throw r.default.BAD_ARGUMENT_ERROR+" : argument out of range"}function s(e){if("string"!=typeof e||e!==r.default.AUDIO&&e!==r.default.VIDEO)throw r.default.BAD_ARGUMENT_ERROR}},6503:function(e,t,n){n.r(t);var r=n(138),i=n(9026);function a(){let e,t,n=[];const r=this.context;function a(e,r,i){let a=function(e){let r;for(r=0;r<n.length;r++)if(n[r].regex.test(e))return n[r].utils;return t}(i||r);return a&&"function"==typeof a[e]?a[e](r,i):t[e](r,i)}return t=(0,i.default)(r).getInstance(),e={registerUrlRegex:function(e,t){n.push({regex:e,utils:t})},parseBaseUrl:function(e){return a("parseBaseUrl",e)},parseOrigin:function(e){return a("parseOrigin",e)},parseScheme:function(e){return a("parseScheme",e)},isRelative:function(e){return a("isRelative",e)},isPathAbsolute:function(e){return a("isPathAbsolute",e)},isSchemeRelative:function(e){return a("isSchemeRelative",e)},isHTTPURL:function(e){return a("isHTTPURL",e)},isHTTPS:function(e){return a("isHTTPS",e)},removeHostname:function(e){return a("removeHostname",e)},resolve:function(e,t){return a("resolve",e,t)}},e}a.__dashjs_factory_name="URLUtils";const o=r.default.getSingletonFactory(a);t.default=o},1613:function(e,t,n){n.r(t);var r=n(2842);class i extends r.default{constructor(e){super(),this.method=e||null}}t.default=i},447:function(e,t,n){n.r(t),t.default=class{constructor(e){this.url=e.url,this.method=e.method,this.body=void 0!==e.body?e.body:null,this.responseType=void 0!==e.responseType?e.responseType:null,this.headers=void 0!==e.headers?e.headers:{},this.credentials=void 0!==e.credentials?e.credentials:null,this.mode=void 0!==e.mode?e.mode:null,this.timeout=void 0!==e.timeout?e.timeout:0,this.customData=void 0!==e.customData?e.customData:{}}}},5099:function(e,t,n){n.r(t),t.default=class{constructor(e){this.request=e.request,this.url=void 0!==e.url?e.url:null,this.redirected=void 0!==e.redirected&&e.redirected,this.status=void 0!==e.status?e.status:null,this.statusText=void 0!==e.statusText?e.statusText:"",this.type=void 0!==e.type?e.type:"",this.headers=void 0!==e.headers?e.headers:{},this.data=void 0!==e.data?e.data:null,this.resourceTiming=void 0!==e.resourceTiming?e.resourceTiming:null}}},1944:function(e,t,n){n.r(t),t.default=class{constructor(e,t,n){this.co
2de=e||null,this.message=t||null,this.data=n||null}}},5560:function(e,t,n){n.r(t);var r=n(8854);t.default=class{constructor(e){this.id=e.id,this.url=e.url,this.language=e.language,this.mimeType=e.mimeType,this.bandwidth=e.bandwidth,this.periodId=e.periodId||null}serializeToMpdParserFormat(){return{tagName:r.default.ADAPTATION_SET,mimeType:this.mimeType,lang:this.language,Representation:[{tagName:r.default.REPRESENTATION,id:this.id,bandwidth:this.bandwidth,BaseURL:[{tagName:r.default.BASE_URL,__text:this.url}],mimeType:this.mimeType}]}}}},2842:function(e,t,n){n.r(t);var r=n(7568);class i{constructor(e){this.action=i.ACTION_DOWNLOAD,this.availabilityEndTime=null,this.availabilityStartTime=null,this.bandwidth=NaN,this.bytesLoaded=NaN,this.bytesTotal=NaN,this.delayLoadingTime=NaN,this.duration=NaN,this.endDate=null,this.firstByteDate=null,this.index=NaN,this.isPartialSegmentRequest=!1,this.mediaStartTime=NaN,this.mediaType=null,this.presentationStartTime=NaN,this.range=null,this.representation=null,this.responseType="arraybuffer",this.retryAttempts=0,this.serviceLocation=null,this.startDate=null,this.startTime=NaN,this.timescale=NaN,this.type=null,this.url=e||null,this.wallStartTime=null}isInitializationRequest(){return this.type&&this.type===r.HTTPRequest.INIT_SEGMENT_TYPE}setInfo(e){this.type=e&&e.init?r.HTTPRequest.INIT_SEGMENT_TYPE:r.HTTPRequest.MEDIA_SEGMENT_TYPE,this.url=e&&e.url?e.url:null,this.range=e&&e.range?e.range.start+"-"+e.range.end:null,this.mediaType=e&&e.mediaType?e.mediaType:null,this.representation=e&&e.representation?e.representation:null}}i.ACTION_DOWNLOAD="download",i.ACTION_COMPLETE="complete",t.default=i},7568:function(e,t,n){n.r(t),n.d(t,{HTTPRequest:function(){return r},HTTPRequestTrace:function(){return i}});class r{constructor(){this.tcpid=null,this.type=null,this.url=null,this.actualurl=null,this.range=null,this.trequest=null,this.tresponse=null,this.responsecode=null,this.interval=null,this.trace=[],this.cmsd=null,this._stream=null,this._tfinish=null,this._mediaduration=null,this._responseHeaders=null,this._serviceLocation=null,this._fileLoaderType=null,this._resourceTimingValues=null}}class i{constructor(){this.s=null,this.d=null,this.b=[]}}r.BITSTREAM_SWITCHING_SEGMENT_TYPE="BitstreamSwitchingSegment",r.CONTENT_STEERING_TYPE="ContentSteering",r.DVB_REPORTING_TYPE="DVBReporting",r.GET="GET",r.POST="POST",r.HEAD="HEAD",r.INDEX_SEGMENT_TYPE="IndexSegment",r.INIT_SEGMENT_TYPE="InitializationSegment",r.LICENSE="license",r.LICENSE_CERTIFICATE="licenseCertificate",r.MEDIA_SEGMENT_TYPE="MediaSegment",r.MPD_TYPE="MPD",r.MSS_FRAGMENT_INFO_SEGMENT_TYPE="FragmentInfoSegment",r.CMCD_EVENT="CmcdEvent",r.OTHER_TYPE="other",r.XLINK_EXPANSION_TYPE="XLinkExpansion"}},o={};function u(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return i[e](n,n.exports,u),n.exports}u.d=function(e,t){for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};u.r(l),u.d(l,{Constants:function(){return E.default},Debug:function(){return m.default},ExternalSubtitle:function(){return y.default},MediaPlayer:function(){return c.MediaPlayer},MediaPlayerFactory:function(){return p},MetricsReporting:function(){return f.default},Protection:function(){return d.default},default:function(){return _},supportsMediaSource:function(){return T.supportsMediaSource}});var c=u(5393),f=u(4469),d=u(7037),h=u(9839);let g=function(){const e="application/dash+xml";let t;function n(n,r,i){if(!n||!/^VIDEO$/i.test(n.nodeName))return null;if(n._dashjs_player)return n._dashjs_player;let a,o=n.id||n.name||"video element";if(!(r=r||[].slice.call(n.querySelectorAll("source")).filter(function(t){return t.type==e})[0])&&n.src)(r=document.createElement("source")).src=n.src;else if(!r&&!n.src)return null;return i=i||{},a=(0,h.default)(i).create(),a.initialize(n,r.src,n.autoplay),t||(t=a.getDebug().getLogger()),t.debug("Converted "+o+" to dash.js player and added content: "+r.src),n._dashjs_player=a,a}function r(e){return/^VIDEO$/i.test(e.nodeName)?e:r(e.parentNode)}return{create:n,createAll:function(t,i){let a=[];t=t||"[data-dashjs-player]";let o=(i=i||document).querySelectorAll(t);for(let e=0;e<o.length;e++){let t=n(o[e],null);a.push(t)}let s=i.querySelectorAll('source[type="'+e+'"]');for(let e=0;e<s.length;e++){let t=n(r(s[e]),null);a.push(t)}return a}}}();if("undefined"!=typeof window&&window){let w;function M(){window.removeEventListener("load",M),g.createAll()}function P(){window.dashjs&&(window.clearInterval(w),g.createAll())}(!window.dashjs||!window.dashjs.skipAutoCreate)&&window.addEventListener&&("complete"===window.document.readyState?window.dashjs?g.createAll():w=window.setInterval(P,500):window.addEventListener("load",M))}var p=g,m=u(649),E=u(5212),T=u(559),y=u(5560);dashjs.Protection=d.default,dashjs.MetricsReporting=f.default,dashjs.MediaPlayerFactory=p,dashjs.Debug=m.default,dashjs.supportsMediaSource=T.supportsMediaSource,dashjs.Constants=E.default,dashjs.ExternalSubtitle=y.default;var _=dashjs,S=((l=l.default).Constants,l.Debug,l.ExternalSubtitle,l.MediaPlayer),I=(l.MediaPlayerFactory,l.MetricsReporting,l.Protection,l.default,l.supp
2ortsMediaSource,n(3662)),A=n(8558),R=n(1619),b=n(7269),v=function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},C=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};let N=(()=>{var e,t;let n,r,i=[b.JW],a=[],o=I.F;var s=r=class extends o{constructor(){super(...arguments),e.set(this,!1),t.set(this,null),this.dvrToDateSync=null,this.dash=null}applyVideoScale(e){this.mediaElement.style.objectFit="COVER"===e?"cover":"contain"}onError(e){"error"===e.type&&super.onError(e)}onSeekEnd(e){super.onSeekEnd(e),this.updateDVRValues()}onTimeUpdate(e){super.onTimeUpdate(e),!this._dvrModeEnabled&&this.dash&&this.dash.getDvrWindow().size>0&&(this._duration=this.dash.duration(),this._dvrModeEnabled=!0,this._dvrIsLive=this.getCurrentTime()>=this.getDuration(),this.player.viewCtrl.onDVRCallback(!0,this._duration,this._dvrIsLive))}addSource(n){if(v(this,e,!1,"f"),null!==this.dash&&(this.dash.reset(),this.dash=null),"function"!=typeof(window.MediaSource||window.WebKitMediaSource))v(this,t,null,"f"),this.handleError("no media source extensions");else if(/\.mpd([#?].*)?$/iu.test(n.url)){v(this,t,n,"f"),this.dash=S().create();const r={debug:{logLevel:1},streaming:{abr:{limitBitrateByPortal:!0},text:{defaultEnabled:!1}}};n.isUltraLowLatency&&Object.assign(r,{streaming:{lowLatencyEnabled:!0}});const i=(0,A.$N)(this.pc.getPluginData("plugin-dash"),this.mc.getPluginData("plugin-dash")),a=(0,A.$N)(r,i);this.dash.updateSettings(a),this.dash.initialize(this.mediaElement,n.url,!0),this.dash.on("playbackTimeUpdated",()=>{this.dash&&this.dash.time()<0?this.dvrToDateSync=null:this.dvrToDateSync={rel:this.dash?.time()??0,real:1e3*(this.dash?.timeAsUTC()??0),at:Date.now()}}),this.dash.on("streamInitialized",()=>{this.player.pixelController&&this.player.pixelController.loadStream(n.url),C(this,e,"f")||(this.player.dispatchEvent("Player.EVENT_STREAM_LOADED",{}),v(this,e,!0,"f"))}),this.dash.on("playbackMetaDataLoaded",()=>{const e=this.audioTracks.length;this.dash?.getTracksFor("audio")?.length!==e&&(this.getAudioTracks(),super.onAudioTracksChanged())}),this.dash.on("error",e=>{const t=e.error,n=S.errors,r="string"==typeof t?t:Object.keys(S.errors).find(e=>n[e]===t.code)??"";this.error(`DASH ${r}`,e),this.dash?.reset(),this.handleError(e.error)});const o=document.createElement("div");o.classList.add("ardplayer-ttml"),this.vc.elements.viewport.append(o),this.dash.attachTTMLRenderingDiv(o),this.dash.enableText(!1),this.bufferingEventHandler(!0),this.mediaElement.load()}else v(this,t,null,"f"),this.handleError("no valid dash manifest url")}hasSubtitle(){return this.mediaElement.textTracks.length>0}setSubtitleVisible(e,t="",n=R.td.NORMAL){if(this.dash?.enableText(!1),e){const r=this.getTextTrackIndex(t,n);r>=0&&(this.dash?.setTextTrack(r),this.dash?.enableText(e))}}getTextTrackIndex(e,t){const n=this.mediaElement.textTracks;if(n){const r=R.Jf.textTrackKindFor(t);for(let t=0;t<n.length;t++)if((n[t].language===e||(0,A.OT)(n[t].language)===(0,A.OT)(e))&&n[t].kind===r)return t}return-1}getAudioTracks(){const e=this.dash?.getCurrentTrackFor("audio");return this.audioTracks=this.dash?.getTracksFor("audio")?.map(t=>s.mapToAudioTrack(t,t===e))??[],this.audioTracks}setAudioTrack(e){const t=e.dashTrackIndex??-1;if(t>=0){const e=this.dash?.getTracksFor("audio").find(e=>e.index===t);if(e){this.log("dash setting audiotrack");const t=this.dash?.getSettings();this.dash?.updateSettings({streaming:{buffer:{fastSwitchEnabled:!0,flushBufferAtTrackSwitch:!0}}}),this.dash?.setCurrentTrack(e),t&&this.dash?.updateSettings(t)}}}setAudioTrackById(e){const t=this.dash?.getTracksFor("audio").find(t=>
2t.id===e);t&&this.dash?.setCurrentTrack(t)}getAudioTrack(){try{const e=this.dash?.getCurrentTrackFor("audio")??null;return null===e?null:s.mapToAudioTrack(e,!0)}catch(e){return this.log("could not get current audio track",e),null}}static mapToAudioTrack(e,t=!1){const n=e.audioChannelConfiguration?.find(e=>void 0!==e.value&&Number.isInteger(parseInt(e.value,10)))?.value;let r="";if(e.labels.length>0)if("object"==typeof e.labels[0]){const t=e.labels;r=(t.find(e=>(0,A.bS)(e.lang,"de"))??t[0]).text??""}else"string"==typeof e.labels[0]&&(r=e.labels[0]);const i=!(0,A.cl)(e.accessibility)&&e.accessibility.length>0?e.accessibility.some(e=>"description"===e.value):/audio\s*des[ck]ription/iu.test(r),a=!(0,A.cl)(e.accessibility)&&e.accessibility.length>0&&e.accessibility.some(e=>"enhanced-audio-intelligibility"===e.value)||/klare\s*sprache/iu.test(r);return{id:String(e.id),label:r,enabled:t,language:e.lang??"",dashTrackIndex:e.index??-1,isAudioDescription:i,isSpeechOptimized:a,isSimpleLanguage:/einfache\s*sprache/iu.test(r),default:e.roles?.some(e=>"main"===e.value)??void 0,isAtmos:Array.isArray(e.supplementalProperties)&&e.supplementalProperties.some(e=>"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"===e.schemeIdUri&&"JOC"===e.value),channelCount:n?parseInt(n,10):void 0}}canSeek(){return this.mediaElement.seekable.length>0||this._dvrModeEnabled}getDvrToDateSync(){return this.dvrToDateSync}setCurrentTime(e){this.canSeek()&&(this.setSeekEventTimestamps(this.getCurrentTime(),e),this.dash?.seek(e),this.player.model.time=e)}getCurrentTime(){return this.dash?.time()??super.getCurrentTime()}getDuration(){return this.dash?.duration()??0}updateDVRValues(){this._dvrIsLive=this.getCurrentTime()>=this.getDuration(),this.player.viewCtrl.onDVRCallback(!0,this._duration,this._dvrIsLive)}dispose(){null!==this.dash&&(this.dash.reset(),this.dash=null),super.dispose()}debugString(){if(!this.dash)return"no instance";const e=this.dash.getCurrentTrackFor("video");return`Quality ${(this.dash.getCurrentRepresentationForType("video")?.index??-2)+1} of ${e?.representationCount??-1}${!0===C(this,t,"f")?.isAdaptiveQualitySelectable?" (sub-selectable)":""}${e?` | ${String(e.codec)}`:""}\n Buffer ${this.dash.getBufferLength("video")}s`}debugQualityLevel(){return[this.dash?.getCurrentRepresentationForType("video")?.index??-1,this.dash?.getCurrentTrackFor("video")?.representationCount??1]}get subQualities(){const e=[{level:-1,label:"Auto",width:-1,height:-1}];try{const t=this.dash?.getCurrentTrackFor("video");t&&t.bitrateList.forEach((t,n)=>{e.push({level:n,label:(0,A.a7)(t.width??0,t.height??0),width:t.width??0,height:t.height??0,debug:t.id}),e[0].width=Math.max(e[0].width,t.width??0)})}catch(e){}return e}selectSubQuality(e){if(null!==this.dash){const t=this.dash.getCurrentTrackFor("video");t&&(e<0||e>t.representationCount-1?this.dash.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!0},limitBitrateByPortal:!0}}}):(this.dash.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!1},limitBitrateByPortal:!1}}}),this.dash.setRepresentationForTypeByIndex("video",e,(this.dash.getCurrentRepresentationForType("video")?.index??-1)<e)))}}get currentSubQuality(){return null===this.dash||(this.dash.getSettings().streaming?.abr?.autoSwitchBitrate?.video??1)?-1:this.dash.getCurrentRepresentationForType("video")?.index??-1}getClassTypeString(){return"DashVideoCtrl"}};return e=new WeakMap,t=new WeakMap,function(e,t,n){"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}(r,"DashVideoCtrl"),(()=>{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(o[Symbol.metadata]??null):void 0;(function(e,t,n,r,i,a){function o(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,u=r.kind,l="getter"===u?"get":"setter"===u?"set":"value",c=!t&&e?r.static?e:e.prototype:null,f=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),d=!1,h=n.length-1;h>=0;h--){var g={};for(var p in r)g[p]="access"===p?{}:r[p];for(var p in r.access)g.access[p]=r.access[p];g.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializer
2s after decoration has completed");a.push(o(e||null))};var m=(0,n[h])("accessor"===u?{get:f.get,set:f.set}:f[l],g);if("accessor"===u){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(s=o(m.get))&&(f.get=s),(s=o(m.set))&&(f.set=s),(s=o(m.init))&&i.unshift(s)}else(s=o(m))&&("field"===u?i.unshift(s):f[l]=s)}c&&Object.defineProperty(c,r.name,f),d=!0})(null,n={value:r},i,{kind:"class",name:r.name,metadata:e},null,a),s=r=n.value,e&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e}),function(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e)}(r,a)})(),s=r})();const D={Generator:n(2790).X,Controller:N}}}])})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.